├── .gitignore ├── module.js ├── CHANGELOG.md ├── rollup.config.js ├── LICENSE ├── package.json ├── .eslintrc.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | dist 4 | index.js 5 | yarn.lock -------------------------------------------------------------------------------- /module.js: -------------------------------------------------------------------------------- 1 | export { default as draw } from 'svelte-transitions-draw'; 2 | export { default as fade } from 'svelte-transitions-fade'; 3 | export { default as fly } from 'svelte-transitions-fly'; 4 | export { default as slide } from 'svelte-transitions-slide'; -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # svelte-transitions changelog 2 | 3 | ## 1.2.0 4 | 5 | * Add `draw` transition 6 | 7 | ## 1.1.1 8 | 9 | * UMD registers as `svelte.transitions`, not `transitions` 10 | 11 | ## 1.1.0 12 | 13 | * Add `fly` and `slide` transitions 14 | 15 | ## 1.0.0 16 | 17 | * First release -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import resolve from 'rollup-plugin-node-resolve'; 2 | 3 | export default { 4 | input: 'module.js', 5 | plugins: [resolve()], 6 | output: [ 7 | { file: 'index.js', format: 'cjs' }, 8 | { file: 'dist/svelte-transitions.js', format: 'umd', name: 'svelte.transitions' } 9 | ] 10 | }; -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 [these people](https://github.com/sveltejs/svelte-transitions/graphs/contributors) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "svelte-transitions", 3 | "version": "1.2.0", 4 | "description": "Officially supported transition plugins for Svelte", 5 | "main": "index.js", 6 | "module": "module.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1", 9 | "build": "rollup -c", 10 | "prepublish": "npm run lint && npm run build", 11 | "lint": "eslint module.js" 12 | }, 13 | "files": [ 14 | "index.js", 15 | "module.js", 16 | "dist" 17 | ], 18 | "repository": { 19 | "type": "git", 20 | "url": "git+https://github.com/sveltejs/svelte-transitions.git" 21 | }, 22 | "keywords": [ 23 | "svelte", 24 | "transitions", 25 | "css", 26 | "animation" 27 | ], 28 | "author": "Rich Harris", 29 | "license": "MIT", 30 | "bugs": { 31 | "url": "https://github.com/sveltejs/svelte-transitions/issues" 32 | }, 33 | "homepage": "https://github.com/sveltejs/svelte-transitions#readme", 34 | "devDependencies": { 35 | "eslint": "^4.19.1", 36 | "eslint-plugin-import": "^2.2.0", 37 | "rollup": "^0.59.1", 38 | "rollup-plugin-node-resolve": "^3.0.0" 39 | }, 40 | "dependencies": { 41 | "svelte-transitions-draw": "^1.0.0", 42 | "svelte-transitions-fade": "^1.0.0", 43 | "svelte-transitions-fly": "^1.0.1", 44 | "svelte-transitions-slide": "^1.0.0" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "rules": { 4 | "indent": [ 2, "tab", { "SwitchCase": 1 } ], 5 | "semi": [ 2, "always" ], 6 | "keyword-spacing": [ 2, { "before": true, "after": true } ], 7 | "space-before-blocks": [ 2, "always" ], 8 | "space-before-function-paren": [ 2, "always" ], 9 | "no-mixed-spaces-and-tabs": [ 2, "smart-tabs" ], 10 | "no-cond-assign": 0, 11 | "no-unused-vars": 2, 12 | "object-shorthand": [ 2, "always" ], 13 | "no-const-assign": 2, 14 | "no-class-assign": 2, 15 | "no-this-before-super": 2, 16 | "no-var": 2, 17 | "no-unreachable": 2, 18 | "valid-typeof": 2, 19 | "quote-props": [ 2, "as-needed" ], 20 | "one-var": [ 2, "never" ], 21 | "prefer-arrow-callback": 2, 22 | "prefer-const": [ 2, { "destructuring": "all" } ], 23 | "arrow-spacing": 2, 24 | "no-inner-declarations": 0 25 | }, 26 | "env": { 27 | "es6": true, 28 | "browser": true, 29 | "node": true, 30 | "mocha": true 31 | }, 32 | "extends": [ 33 | "eslint:recommended", 34 | "plugin:import/errors", 35 | "plugin:import/warnings" 36 | ], 37 | "parserOptions": { 38 | "ecmaVersion": 6, 39 | "sourceType": "module" 40 | }, 41 | "settings": { 42 | "import/core-modules": [ "svelte" ] 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## DEPRECATED — As of Svelte v3, transitions are built into the main package 2 | 3 | # svelte-transitions 4 | 5 | Officially supported transitions plugin for [Svelte](https://svelte.technology). Includes the following: 6 | 7 | * [fade](https://github.com/sveltejs/svelte-transitions-fade) 8 | * [fly](https://github.com/sveltejs/svelte-transitions-fly) 9 | * [slide](https://github.com/sveltejs/svelte-transitions-slide) 10 | * [draw](https://github.com/sveltejs/svelte-transitions-draw) 11 | 12 | ## Usage 13 | 14 | Install with npm or yarn: 15 | 16 | ```bash 17 | npm install --save svelte-transitions 18 | ``` 19 | 20 | Then add the plugins you need to your Svelte component's exported definition: 21 | 22 | ```html 23 | 26 | 27 | {{#if visible}} 28 | 29 |