├── .npmrc ├── src ├── routes │ ├── +layout.ts │ ├── +page.css │ └── +page.svelte ├── lib │ ├── index.ts │ ├── Bullet.svelte │ ├── LeftNav.svelte │ ├── RightNav.svelte │ ├── PlayPause.svelte │ ├── Fullscreen.svelte │ ├── types.ts │ ├── Item.svelte │ ├── SVG.svelte │ ├── Thumbnail.svelte │ ├── app.css.map │ ├── Slide.svelte │ ├── SwipeWrapper.svelte │ ├── ThumbnailSwipeWrapper.svelte │ ├── ThumbnailWrapper.svelte │ ├── SlideWrapper.svelte │ ├── styling.ts │ ├── app.scss │ ├── app.css │ └── ImageGallery.svelte ├── app.html └── app.d.ts ├── static ├── 1.jpg ├── 10.jpg ├── 11.jpg ├── 12.jpg ├── 1t.jpg ├── 2.jpg ├── 2t.jpg ├── 3.jpg ├── 3t.jpg ├── 4.jpg ├── 4t.jpg ├── 4v.jpg ├── 5.jpg ├── 5t.jpg ├── 6.jpg ├── 6t.jpg ├── 7.jpg ├── 7t.jpg ├── 8.jpg ├── 8t.jpg ├── 9.jpg ├── 9t.jpg ├── 10t.jpg ├── 11t.jpg ├── 12t.jpg └── favicon.png ├── .vscode └── settings.json ├── .gitignore ├── vite.config.js ├── .eslintignore ├── .prettierignore ├── .prettierrc ├── svelte.config.js ├── .github └── workflows │ ├── lint.yml │ ├── check.yml │ └── static.yml ├── tsconfig.json ├── .eslintrc.cjs ├── LICENSE ├── package.json └── README.md /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /src/routes/+layout.ts: -------------------------------------------------------------------------------- 1 | export const prerender = true; 2 | -------------------------------------------------------------------------------- /static/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/1.jpg -------------------------------------------------------------------------------- /static/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/10.jpg -------------------------------------------------------------------------------- /static/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/11.jpg -------------------------------------------------------------------------------- /static/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/12.jpg -------------------------------------------------------------------------------- /static/1t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/1t.jpg -------------------------------------------------------------------------------- /static/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/2.jpg -------------------------------------------------------------------------------- /static/2t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/2t.jpg -------------------------------------------------------------------------------- /static/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/3.jpg -------------------------------------------------------------------------------- /static/3t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/3t.jpg -------------------------------------------------------------------------------- /static/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/4.jpg -------------------------------------------------------------------------------- /static/4t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/4t.jpg -------------------------------------------------------------------------------- /static/4v.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/4v.jpg -------------------------------------------------------------------------------- /static/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/5.jpg -------------------------------------------------------------------------------- /static/5t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/5t.jpg -------------------------------------------------------------------------------- /static/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/6.jpg -------------------------------------------------------------------------------- /static/6t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/6t.jpg -------------------------------------------------------------------------------- /static/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/7.jpg -------------------------------------------------------------------------------- /static/7t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/7t.jpg -------------------------------------------------------------------------------- /static/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/8.jpg -------------------------------------------------------------------------------- /static/8t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/8t.jpg -------------------------------------------------------------------------------- /static/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/9.jpg -------------------------------------------------------------------------------- /static/9t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/9t.jpg -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[svelte]": { 3 | "editor.tabSize": 2 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /static/10t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/10t.jpg -------------------------------------------------------------------------------- /static/11t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/11t.jpg -------------------------------------------------------------------------------- /static/12t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/12t.jpg -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react2svelte/image-gallery/HEAD/static/favicon.png -------------------------------------------------------------------------------- /src/lib/index.ts: -------------------------------------------------------------------------------- 1 | // Reexport your entry components here 2 | 3 | import ImageGallery from '$lib/ImageGallery.svelte'; 4 | 5 | export default ImageGallery; 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | .idea 12 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | 3 | /** @type {import('vite').UserConfig} */ 4 | const config = { 5 | plugins: [sveltekit()] 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": false, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 100, 6 | "plugins": ["prettier-plugin-svelte"], 7 | "pluginSearchDirs": ["."], 8 | "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] 9 | } 10 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |
%sveltekit.body%
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/app.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // See https://kit.svelte.dev/docs/types#app 5 | // for information about these interfaces 6 | // and what to do when importing types 7 | declare namespace App { 8 | // interface Error {} 9 | // interface Locals {} 10 | // interface PageData {} 11 | // interface Platform {} 12 | } 13 | -------------------------------------------------------------------------------- /svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-static'; 2 | import { vitePreprocess } from '@sveltejs/kit/vite'; 3 | 4 | /** @type {import('@sveltejs/kit').Config} */ 5 | const config = { 6 | // Consult https://kit.svelte.dev/docs/integrations#preprocessors 7 | // for more information about preprocessors 8 | preprocess: vitePreprocess(), 9 | 10 | kit: { 11 | adapter: adapter() 12 | } 13 | }; 14 | 15 | export default config; 16 | -------------------------------------------------------------------------------- /src/lib/Bullet.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 19 | -------------------------------------------------------------------------------- /src/lib/RightNav.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | -------------------------------------------------------------------------------- /src/lib/PlayPause.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | 18 | -------------------------------------------------------------------------------- /src/lib/Fullscreen.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | 18 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint 2 | 3 | on: 4 | push: 5 | branches: 6 | - '**' 7 | pull_request: 8 | branches: 9 | - '**' 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Use Node.js ${{ matrix.node-version }} 17 | uses: actions/setup-node@v1 18 | with: 19 | node-version: 16.x 20 | - uses: actions/cache@v2 21 | with: 22 | path: ~/.npm 23 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} 24 | - run: npm ci 25 | - run: npm run lint 26 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.svelte-kit/tsconfig.json", 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "checkJs": true, 6 | "esModuleInterop": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "resolveJsonModule": true, 9 | "skipLibCheck": true, 10 | "sourceMap": true, 11 | "strict": true 12 | } 13 | // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias 14 | // 15 | // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes 16 | // from the referenced tsconfig.json - TypeScript does not merge them in 17 | } 18 | -------------------------------------------------------------------------------- /.github/workflows/check.yml: -------------------------------------------------------------------------------- 1 | name: Check 2 | 3 | on: 4 | push: 5 | branches: 6 | - '**' 7 | pull_request: 8 | branches: 9 | - '**' 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Use Node.js ${{ matrix.node-version }} 17 | uses: actions/setup-node@v1 18 | with: 19 | node-version: 16.x 20 | - uses: actions/cache@v2 21 | with: 22 | path: ~/.npm 23 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} 24 | - run: npm ci 25 | - run: npm run check 26 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], 5 | plugins: ['svelte3', '@typescript-eslint'], 6 | ignorePatterns: ['*.cjs'], 7 | overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], 8 | settings: { 9 | 'svelte3/typescript': () => require('typescript') 10 | }, 11 | parserOptions: { 12 | sourceType: 'module', 13 | ecmaVersion: 2020 14 | }, 15 | env: { 16 | browser: true, 17 | es2017: true, 18 | node: true 19 | }, 20 | rules: { 21 | '@typescript-eslint/ban-types': 'off', 22 | '@typescript-eslint/no-inferrable-types': 'off' 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /src/lib/types.ts: -------------------------------------------------------------------------------- 1 | export type Direction = 'left' | 'right'; 2 | export type Position = 'top' | 'bottom' | 'left' | 'right'; 3 | export type MouseOrKeyboard = 'mouse' | 'keyboard'; 4 | export type LoadingStrategy = 'eager' | 'lazy'; 5 | 6 | export type TImage = { 7 | srcSet: string; 8 | media: string; 9 | }; 10 | 11 | export type TImageSet = TImage[]; 12 | 13 | export type TItem = Partial<{ 14 | bulletClass: string; 15 | description: string; 16 | original: string; 17 | originalHeight: number; 18 | originalWidth: number; 19 | loading: LoadingStrategy; 20 | thumbnailHeight: number; 21 | thumbnailWidth: number; 22 | thumbnailLoading: LoadingStrategy; 23 | fullscreen: string; 24 | originalAlt: string; 25 | originalTitle: string; 26 | thumbnail: string; 27 | thumbnailAlt: string; 28 | thumbnailLabel: string; 29 | thumbnailTitle: string; 30 | originalClass: string; 31 | thumbnailClass: string; 32 | imageSet: TImageSet[]; 33 | srcset: string; 34 | sizes: string; 35 | }>; 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 react2svelte 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/lib/Item.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 | {originalAlt} dispatch('imageload', event)} 31 | on:error={(event) => dispatch('imageerror', event)} 32 | {loading} 33 | /> 34 | {#if description} 35 | 36 | {description} 37 | 38 | {/if} 39 | -------------------------------------------------------------------------------- /src/lib/SVG.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | {#if icon === 'left'} 18 | 19 | {:else if icon === 'right'} 20 | 21 | {:else if icon === 'maximize'} 22 | 25 | {:else if icon === 'minimize'} 26 | 29 | {:else if icon === 'play'} 30 | 31 | {:else if icon === 'pause'} 32 | 33 | 34 | {/if} 35 | 36 | -------------------------------------------------------------------------------- /src/lib/Thumbnail.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 | 44 | -------------------------------------------------------------------------------- /.github/workflows/static.yml: -------------------------------------------------------------------------------- 1 | # Simple workflow for deploying static content to GitHub Pages 2 | name: Deploy static content to Pages 3 | 4 | on: 5 | # Runs on pushes targeting the default branch 6 | push: 7 | branches: ['main'] 8 | 9 | # Allows you to run this workflow manually from the Actions tab 10 | workflow_dispatch: 11 | 12 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | # Allow one concurrent deployment 19 | concurrency: 20 | group: 'pages' 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | # Single deploy job since we're just deploying 25 | deploy: 26 | environment: 27 | name: github-pages 28 | url: ${{ steps.deployment.outputs.page_url }} 29 | runs-on: ubuntu-latest 30 | steps: 31 | - name: Checkout 32 | uses: actions/checkout@v3 33 | - name: Setup Pages 34 | uses: actions/configure-pages@v2 35 | - name: Setup Node.js environment 36 | uses: actions/setup-node@v3.6.0 37 | - name: install dependencies 38 | run: npm install 39 | - name: build site 40 | run: npm run buildDemo 41 | - name: Upload artifact 42 | uses: actions/upload-pages-artifact@v1 43 | with: 44 | # Upload entire repository 45 | path: './build' 46 | - name: Deploy to GitHub Pages 47 | id: deployment 48 | uses: actions/deploy-pages@v1 49 | -------------------------------------------------------------------------------- /src/lib/app.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sourceRoot":"","sources":["src/app.scss"],"names":[],"mappings":"AAgBA;EACE,OAfS;EAgBT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;IACE,OA1BI;;EA2BJ;IACE;;;AAKN;EAEE;;;AAMA;EACE;;;AAKN;AAAA;EAEE;EACA;;AAEA;AAAA;EACE;EACA;;AAGF;EAVF;AAAA;IAWI;;EAEA;AAAA;IACE;IACA;;;AAIJ;EAnBF;AAAA;IAoBI;;EAEA;AAAA;IACE;IACA;;;;AAKN;EACE;;;AAGF;EACE;;;AAGF;AAAA;EAEE;EACA;EACA;;AAEA;AAAA;EACE;EACA;;AAGF;EACE;AAAA;IACE;IACA;;;AAIJ;EACE;AAAA;IACE;IACA;;;AAIJ;AAAA;EACE;EACA;EACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAIF;EAtHI;EAAA;EAAA;EAAA;EAAA;EAwHF,6BA7He;EA8Hf;;AAEA;EACE,YApIO;EAqIP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAKN;EACE;EACA;EACA;;AAEA;EACE,YA3JO;;AA8JT;EACE;;AAKA;EACE;;;AAKN;EACE;;AAEA;EAEE;EACA;;AAEA;EALF;IAMI;;;AAGJ;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;AAGF;EACE,YAjNkB;EAkNlB;EACA,OAtNO;EAuNP;EACA;EACA;EACA;EACA;;AAEA;EAVF;IAWI;IACA;IACA;;;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA,YApPQ;EAqPR;EACA;EACA;EACA;EACA;EACA;;AAEA;EAbF;IAcI;IACA;;;AAGF;EAlBF;IAmBI;;;AAGF;EACE;EACA,YA1QI;EA2QJ;;AAGF;EACE;EACA;EACA,YAnRK;;AAsRP;EACE;IACE,YAtRE;IAuRF;;EAGF;IACE,YA3RE;;;;AAiSV;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAEF;EAEE;EACA;EACA;;AAEA;EANF;IAOI;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAMR;EAEE;;AAEA;EAJF;IAKI;;;;AAKN;EACE;EACA;;AAEA;EAJF;IAKI;;;AAGF;EACE;EACA;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EARF;IASI;IACA;;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EAEE;EACA;;AAEA;EALF;IAMI;;;AAIJ;EACE;IACE;IACA;;;AAEA;EAJF;IAKI;;;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aA/ZU;EAgaV;EACA;EACA;;AAEA;EAdF;IAeI;IACA;;;;AAIJ;EACE,YA7aoB;EA8apB,OAjbS;EAkbT;EACA;EACA;EACA;EACA;EACA;;AAEA;EAVF;IAWI;IACA","file":"app.css"} -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@react2svelte/image-gallery", 3 | "version": "1.0.1", 4 | "license": "MIT", 5 | "description": "Svelte image gallery ported from react-image-gallery", 6 | "homepage": "https://react2svelte.github.io/image-gallery/", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/react2svelte/image-gallery" 10 | }, 11 | "scripts": { 12 | "dev": "vite dev", 13 | "build": "svelte-kit sync && svelte-package", 14 | "buildDemo": "vite build", 15 | "prepublishOnly": "echo 'Did you mean to publish `./package/`, instead of `./`?' && exit 1", 16 | "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --use-new-transformation", 17 | "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", 18 | "lint": "prettier --plugin-search-dir . --check . && eslint .", 19 | "format": "prettier --plugin-search-dir . --write ." 20 | }, 21 | "devDependencies": { 22 | "@sveltejs/adapter-static": "^1.0.1", 23 | "@sveltejs/kit": "^1.0.0", 24 | "@sveltejs/package": "^1.0.0", 25 | "@types/throttle-debounce": "^5.0.0", 26 | "@typescript-eslint/eslint-plugin": "^5.45.0", 27 | "@typescript-eslint/parser": "^5.45.0", 28 | "eslint": "^8.28.0", 29 | "eslint-config-prettier": "^8.5.0", 30 | "eslint-plugin-svelte3": "^4.0.0", 31 | "prettier": "^2.8.0", 32 | "prettier-plugin-svelte": "^2.8.1", 33 | "sass": "^1.57.1", 34 | "svelte": "^3.54.0", 35 | "svelte-check": "^2.9.2", 36 | "tslib": "^2.4.1", 37 | "typescript": "^4.9.3", 38 | "vite": "^4.0.0" 39 | }, 40 | "type": "module", 41 | "dependencies": { 42 | "@react2svelte/swipable": "^0.1.4", 43 | "@react2svelte/swipeable": "^0.1.4", 44 | "clsx": "^1.2.1", 45 | "throttle-debounce": "^5.0.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/lib/Slide.svelte: -------------------------------------------------------------------------------- 1 | 25 | 26 |