├── .eslintrc.json ├── .gitattributes ├── .gitignore ├── .whitesource ├── LICENSE ├── README.md ├── bower.json ├── config.rb ├── css ├── example.css └── smartscroll.css ├── examples ├── auto-hash │ └── index.html ├── different-heights-hybrid-scroll │ └── index.html ├── different-heights-inner-section-scroll │ └── index.html ├── different-heights │ └── index.html ├── hybrid-scroll │ └── index.html ├── index.html ├── keep-history │ └── index.html ├── permalink │ └── index.html ├── responsive │ └── index.html └── touch-events │ └── index.html ├── package.json ├── sass ├── example.scss └── smartscroll.scss ├── smartscroll.js ├── smartscroll.min.js └── yarn.lock /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "airbnb-base", 3 | "plugins": [ 4 | "import" 5 | ], 6 | "parserOptions": { 7 | "ecmaVersion": 5 8 | }, 9 | "env": { 10 | "browser": true, 11 | "jquery": true 12 | }, 13 | "globals": { 14 | "Lethargy": true, 15 | "EventEmitter": true 16 | }, 17 | "rules": { 18 | "func-names": ["warn", "as-needed"], 19 | "comma-dangle": ["warn", "always-multiline"], 20 | "prefer-arrow-callback": 0, 21 | "no-var": 0, 22 | "vars-on-top": 0, 23 | "no-redeclare": 0, 24 | "no-plusplus": 0, 25 | "prefer-template": 0, 26 | "brace-style": ["warn", "1tbs"] 27 | } 28 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | examples/* linguist-documentation 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .sass-cache 2 | *.css.map 3 | bower_components/ 4 | node_modules/ 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | 11 | # Runtime data 12 | pids 13 | *.pid 14 | *.seed 15 | 16 | # Directory for instrumented libs generated by jscoverage/JSCover 17 | lib-cov 18 | 19 | # Coverage directory used by tools like istanbul 20 | coverage 21 | 22 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 23 | .grunt 24 | 25 | # node-waf configuration 26 | .lock-wscript 27 | 28 | # Compiled binary addons (http://nodejs.org/api/addons.html) 29 | build/Release 30 | 31 | # Dependency directory 32 | # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git 33 | node_modules 34 | 35 | # Optional npm cache directory 36 | .npm 37 | 38 | # Optional REPL history 39 | .node_repl_history -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | #### WhiteSource "Bolt for Github" configuration file #### 3 | ########################################################## 4 | 5 | # Configuration # 6 | #---------------# 7 | ws.repo.scan=true 8 | vulnerable.check.run.conclusion.level=success -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Daniel Li 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 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # smartscroll 2 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fd4nyll%2Fsmartscroll.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fd4nyll%2Fsmartscroll?ref=badge_shield) 3 | 4 | 5 | smartscroll is a tiny (1815b minfied + gzipped) jQuery plugin that has these *independent* features: 6 | 7 | 1. Section scrolling - Scrolljacking 8 | 2. Auto-hash - Updates the URL hash based on current position on page 9 | 3. Responsive - You can disable scrolljacking below a set breakpoint 10 | 11 | It also supports: 12 | 13 | 1. Varied Section Heights 14 | 2. Hybrid Scrolling - Both normal and scrolljacking on the same page 15 | 3. Compatible with scrollbar - Can use scrollbar as well as mousewheel 16 | 4. Disabling permalink history 17 | 5. Correctly detects scroll events for inertial scrolling, by integrating with [lethargy](https://github.com/d4nyll/lethargy) as a soft dependency (which means it will work without it) 18 | 6. Provides events you can listen to, by integrating with [EventEmitter](https://github.com/Olical/EventEmitter) as a soft dependency 19 | 20 | ### [Demo](//d4nyll.github.io/smartscroll/) 21 | 22 | ### Requirements 23 | 24 | 1. **There can only be one set of adjoining sections** 25 | 26 | ### How to Use 27 | 28 | Install [lethargy](https://github.com/d4nyll/lethargy), which is available as a [Bower](http://bower.io/) package, which you can install with `bower install`. 29 | 30 | Structure your HTML like so (default options included) 31 | 32 | 33 |
34 |
35 |
36 |
37 | 39 | 57 | 58 | 59 | > You may also want to link to `styles.css`, but all that does is to ensure the `html` and `body` elements have no margins nor padding 60 | 61 | > You may also leave out [lethargy](https://github.com/d4nyll/lethargy), but smartscroll may not work as well with scroll devices that uses inertial scrolling. Performance with lethargy can be slower, but it will be improved with further development. 62 | 63 | ##### Options 64 | 65 | * `mode` - (String) Valid options are: 66 | * `vp` (Viewport) - The sections will be automatically sized to be the same as the viewport 67 | * `set` - Use the height and width set by CSS (use this for having different heights for different sections) 68 | * `autoHash` - (Boolean) Whether the auto-hashing feature is enabled. If you use this feature, it is important to use EventEmitter as well, otherwise smartscroll will listen to every `scroll` event, which is very resource-draining and can make the animation more 'glitchy' 69 | * `sectionScroll` - (Boolean) Whether the section-scrolling feature is enabled 70 | * `initialScroll` - (Boolean) Whether smartscroll should scroll to the position specified by the hash on initial load 71 | * `keepHistory` - (Boolean) Whether scrolling through different sections will be recorded in the browser's history 72 | * `sectionWrapperSelector` - (String) The CSS selector for the block element which wraps around your sections 73 | * `sectionClass` - (String) The class name applied to each section 74 | * `animationSpeed` - (Integer) Time taken for the scroll animation, in miliseconds 75 | * `headerHash` - (String) The hash for the section above the sections, must be non-empty to reliably ensure the page do not jump when updating the hash value across browsers (as `#` means `_top`) 76 | * `breakpoint` - (Integer) The width of the browser below which scrolljacking will be disabled 77 | * `sectionSelector` - (String) The selector applied to each section, overrides `sectionClass` and allow more flexibility in choosing a selector. (Added in 2.1.0) 78 | * `dynamicHeight` - (Boolean) If you are going to be dynamically adding and removing content so as to change the position and/or size of the section wrappers and/or sections, then set this to true. Set to false otherwise to increase performance. 79 | * `eventEmitter` - (Object) If you pass in an [EventEmitter](https://github.com/Olical/EventEmitter) object, autoHashing will be much more efficient. You can also listen to the scroll events this way. Defaults to `null`. 80 | * `ie8` - If you need to support Internet Explorer 8, change this to `true`. Defaults to `false`. 81 | * `bindSwipe` - (Boolean) Allow for listening of swipe events. Requires EventEmitter. Defaults to `true` 82 | * `bindKeyboard` - (Boolean) Allow for keyboard events (up and down arrows) to control slides. Defaults to `true` 83 | 84 | ### Events 85 | 86 | Smartscroll has a soft dependency on [EventEmitter](https://github.com/Olical/EventEmitter). If present, smartscroll can provide six events `scrollStart`, `scrollEnd`, `swipeLeft`, `swipeRight`, `swipeDown` and `swipeUp`. The `scrollStart` and `scrollEnd` listener will receive the slide number as its only argument; the first slide will have a number of `1`, the section before the sectionWrapper will have a number of `0`. 87 | 88 | var ee = new EventEmitter(); 89 | var scrollStartListener = function (slideNumber) { 90 | console.log("Scrolling to " + slideNumber); 91 | } 92 | var scrollEndListener = function () { 93 | console.log("Scrolling End"); 94 | } 95 | ee.addListener('scrollStart', scrollStartListener); 96 | ee.addListener('scrollEnd', scrollEndListener); 97 | $.smartscroll({ 98 | ... 99 | eventEmitter: ee 100 | }); 101 | 102 | The other listeners receive no arguments. 103 | 104 | var ee = new EventEmitter(); 105 | var swipeUpListener = function () { 106 | console.log("Swiping Up"); 107 | } 108 | var swipeDownListener = function () { 109 | console.log("Swiping Down"); 110 | } 111 | $.smartscroll({ 112 | ... 113 | eventEmitter: ee, 114 | bindSwipe: true 115 | }); 116 | ee.addListener('swipeUp', swipeUpListener); 117 | ee.addListener('swipeDown', swipeDownListener); 118 | 119 | ### Manual Scroll 120 | 121 | You can manually scroll up or scroll down. 122 | 123 | When you first initiate smartscroll with `$.smartscroll()`, it returns an object. In that object is the `scroll` function, which is called with a single parameter. If the parameter is truthy, it will scroll down, otherwise, it will scroll up. 124 | 125 | var smartscroll = $.smartscroll(); 126 | smartscroll.scroll(1); 127 | 128 | ### Architecture 129 | 130 | Currently, there are two features of smartscroll, and this is how it's implemented: 131 | 132 | 1. Smooth scroll by section 133 | 134 | The [`mousewheel`](https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel) and [`DOMMouseScroll`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMMouseScroll) (for Firefox) events are bound. 135 | 136 | When such event is fired in `vp` mode, smartscroll will find it's most prominent section (one which occupies most of the screen), and smoothly scroll to the section above or below it. 137 | 138 | When the event is fired in `set` mode, smartscroll will find which section occupies the middle of the screen, and smoothly scroll to the section above or below it. 139 | 140 | When scrolling outside of the sections, normal scrolling resumes. 141 | 142 | 2. Changing URL hash based on the current section 143 | 144 | The `scroll` event is bound. 145 | 146 | When the event is fired in `vp` mode, smartscroll will see which section occupies the *top* of the viewport, and if the hash is different, replace it with the new one. 147 | 148 | When the event is fired in `set` mode, smartscroll will see which section occupies the *middle* of the viewport, and if the hash is different, replace it with the new one. 149 | 150 | 151 | ## License 152 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fd4nyll%2Fsmartscroll.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fd4nyll%2Fsmartscroll?ref=badge_large) -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "smartscroll", 3 | "main": [ 4 | "smartscroll.js", 5 | "sass/smartscroll.scss" 6 | ], 7 | "version": "2.5.3", 8 | "homepage": "https://github.com/d4nyll/smartscroll", 9 | "repository": { 10 | "type": "git", 11 | "url": "git@github.com:d4nyll/smartscroll.git" 12 | }, 13 | "authors": [ 14 | "Daniel Li " 15 | ], 16 | "description": "Scrolljacking jQuery plugin", 17 | "keywords": [ 18 | "scrolljacking", 19 | "hash", 20 | "scroll", 21 | "jQuery" 22 | ], 23 | "license": "MIT", 24 | "ignore": [ 25 | "**/.*", 26 | "node_modules", 27 | "bower_components", 28 | "test", 29 | "tests" 30 | ], 31 | "dependencies": { 32 | "lethargy": "1.0.4" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /config.rb: -------------------------------------------------------------------------------- 1 | # Require any additional compass plugins here. 2 | 3 | # Set this to the root of your project when deployed: 4 | http_path = "/" 5 | css_dir = "css" 6 | sass_dir = "sass" 7 | images_dir = "images" 8 | javascripts_dir = "javascripts" 9 | 10 | # You can select your preferred output style here (can be overridden via the command line): 11 | # output_style = :expanded or :nested or :compact or :compressed 12 | 13 | # To enable relative paths to assets via compass helper functions. Uncomment: 14 | # relative_assets = true 15 | 16 | # To disable debugging comments that display the original location of your selectors. Uncomment: 17 | # line_comments = false 18 | 19 | 20 | # If you prefer the indented syntax, you might want to regenerate this 21 | # project again passing --syntax sass, or you can uncomment this: 22 | # preferred_syntax = :sass 23 | # and then run: 24 | # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 25 | -------------------------------------------------------------------------------- /css/example.css: -------------------------------------------------------------------------------- 1 | /* line 1, ../sass/example.scss */ 2 | .header, .footer, .section { 3 | display: table; 4 | width: 100%; 5 | text-align: center; 6 | padding: 15%; 7 | box-sizing: border-box; 8 | } 9 | /* line 7, ../sass/example.scss */ 10 | .header > div, .footer > div, .section > div { 11 | display: table-cell; 12 | vertical-align: middle; 13 | } 14 | 15 | /* line 13, ../sass/example.scss */ 16 | html, body { 17 | font-family: Montserrat,sans-serif; 18 | } 19 | 20 | /* line 17, ../sass/example.scss */ 21 | a { 22 | color: inherit; 23 | text-decoration: underline; 24 | font-weight: 700; 25 | } 26 | 27 | /* line 23, ../sass/example.scss */ 28 | ul { 29 | padding-left: 0; 30 | } 31 | 32 | /* line 27, ../sass/example.scss */ 33 | li { 34 | list-style: none; 35 | } 36 | 37 | /* line 31, ../sass/example.scss */ 38 | .header, .footer { 39 | height: 700px; 40 | } 41 | 42 | /* line 40, ../sass/example.scss */ 43 | .section:nth-child(6n+1) { 44 | height: 700px; 45 | background-color: #FF708F; 46 | } 47 | 48 | /* line 45, ../sass/example.scss */ 49 | .section:nth-child(6n+2) { 50 | height: 1000px; 51 | background-color: #E89D5D; 52 | } 53 | 54 | /* line 50, ../sass/example.scss */ 55 | .section:nth-child(6n+3) { 56 | height: 500px; 57 | background-color: #FFE33E; 58 | } 59 | 60 | /* line 55, ../sass/example.scss */ 61 | .section:nth-child(6n+4) { 62 | height: 900px; 63 | background-color: #7AE856; 64 | } 65 | 66 | /* line 60, ../sass/example.scss */ 67 | .section:nth-child(6n+5) { 68 | height: 1500px; 69 | background-color: #7AFFE6; 70 | } 71 | 72 | /* line 65, ../sass/example.scss */ 73 | .section:nth-child(6n) { 74 | height: 400px; 75 | background-color: #6E74F5; 76 | } 77 | -------------------------------------------------------------------------------- /css/smartscroll.css: -------------------------------------------------------------------------------- 1 | /* line 1, ../sass/smartscroll.scss */ 2 | html, body { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | -------------------------------------------------------------------------------- /examples/auto-hash/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |

smartscroll - Auto-Hash

15 |

A tiny (1838b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing

16 |

See it on GitHub, or see some comparisons

17 |

Try out other examples!

18 | 27 |
28 |
29 |
30 |
31 |

The URL hash will change as you scroll through different sections.

32 |
33 |
34 |
35 |
36 |

You can enable this feature only, without scrolljacking - all features in smartscroll are independent of each other!

37 |
38 |
39 |
40 |
41 |

Just include the option autoHash: true, 42 | sectionScroll: false.

43 |
44 |
45 |
46 | 47 | 48 | 54 | 55 | -------------------------------------------------------------------------------- /examples/different-heights-hybrid-scroll/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |

smartscroll - Different Heights & Hybrid Scroll

14 |

A tiny (1838b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing

15 |

See it on GitHub, or see some comparisons

16 |

Try out other examples!

17 | 26 |
27 |
28 |
29 |
30 |

This section is not inside the section wrapper, so normal scrolling here!

31 |
32 |
33 |
34 |
35 |
36 |

Normally, your sections will have to be 100% of the viewport for it to work.

37 |
38 |
39 |
40 |
41 |

With smartscroll, the section can all be of different heights!

42 |
43 |
44 |
45 |
46 |

Just include the option mode: "set".

47 |
48 |
49 |
50 |
51 |

Just include the option mode: "set".

52 |
53 |
54 |
55 | 60 | 65 | 66 | 67 | 68 | 75 | 76 | -------------------------------------------------------------------------------- /examples/different-heights-inner-section-scroll/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |

smartscroll - Different Heights

15 |

A tiny (1838b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing

16 |

See it on GitHub, or see some comparisons

17 |

Try out other examples!

18 | 27 |
28 |
29 |
30 |
31 |

Normally, your sections will have to be 100% of the viewport for it to work.

32 |
33 |
34 |
35 |
36 |

With smartscroll, the section can all be of different heights!

37 |
38 |
39 |
40 |
41 |

Just include the option mode: "set".

42 |
43 |
44 |
45 | 46 | 47 | 52 | 53 | -------------------------------------------------------------------------------- /examples/different-heights/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |

smartscroll - Different Heights

15 |

A tiny (1838b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing

16 |

See it on GitHub, or see some comparisons

17 |

Try out other examples!

18 | 27 |
28 |
29 |
30 |
31 |

Normally, your sections will have to be 100% of the viewport for it to work.

32 |
33 |
34 |
35 |
36 |

With smartscroll, the section can all be of different heights!

37 |
38 |
39 |
40 |
41 |

Just include the option mode: "set".

42 |
43 |
44 |
45 | 46 | 47 | 54 | 55 | -------------------------------------------------------------------------------- /examples/hybrid-scroll/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |

smartscroll - Hybrid Scroll

14 |

A tiny (1838b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing

15 |

See it on GitHub, or see some comparisons

16 |

Try out other examples!

17 | 26 |
27 |
28 |
29 |
30 |

This section is not inside the section wrapper, so normal scrolling here!

31 |
32 |
33 |
34 |
35 |
36 |

Hybrid Scroll

37 |

You can scroll normally in the white areas above, and also by sections in these coloured areas!

38 |
39 |
40 |
41 |
42 |

Hybrid Scroll

43 |

You can scroll normally in the white areas above, and also by sections in these coloured areas!

44 |
45 |
46 |
47 |
48 |

Hybrid Scroll

49 |

You can scroll normally in the white areas above, and also by sections in these coloured areas!

50 |
51 |
52 |
53 | 112 | 113 | 114 | 117 | 118 | -------------------------------------------------------------------------------- /examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |

smartscroll

14 |

A tiny (1838b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing

15 |

See it on GitHub, or see some comparisons

16 |

Try out other examples!

17 | 26 |
27 |
28 |
29 |
30 |

This section is not inside the section wrapper, so normal scrolling here!

31 |
32 |
33 |
34 |
35 |
36 |

Compatible with scrollbar

37 |

Try scrolling with the mouse wheel as well as the scrollbar, it works as you expect!

38 |
39 |
40 |
41 |
42 |

Permalink

43 |

You can bookmark a particular section, and it will stay there when you return!

44 | Demo 45 |
46 |
47 |
48 |
49 |

Different Heights

50 |

Normally, your sections will have to be 100% of the viewport (like it is now) for it to work. With smartscroll, the section can all be of different heights!

51 | Demo 52 |
53 |
54 |
55 |
56 |

Hybrid Scroll

57 |

You can scroll normally in the white areas above, and also by sections in these coloured areas!

58 | Demo 59 |
60 |
61 |
62 |
63 |

Auto-Hash

64 |

Noticed when you scrolled down, the URL's hash changes automatically? That's the auto-hash feature! You can enable it just by itself!

65 | Demo 66 |
67 |
68 |
69 |
70 |

Keep History

71 |

By default, scrolling through different sections does not add to your history, but if you like that feature, you can turn it on too!

72 | Demo 73 |
74 |
75 |
76 |
77 |

Responsive

78 |

You can disable section scrolling for windows below a certain width. Do not confuse this with touch devices, where scrolljacking is disabled by design.

79 | Demo 80 |
81 |
82 |
83 | 84 | 85 | 86 | 104 | 105 | -------------------------------------------------------------------------------- /examples/keep-history/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |

smartscroll - Keep History

15 |

A tiny (1838b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing

16 |

See it on GitHub, or see some comparisons

17 |

Try out other examples!

18 | 27 |
28 |
29 |
30 |
31 |

By default, smartscroll don't store your scrolling history into your browser history.
But you can enable it by passing in the keepHistory: true option.

32 |
33 |
34 |
35 |
36 |

As you scroll down, check your browser history, it'll be recorded.

37 |
38 |
39 |
40 | 41 | 42 | 47 | 48 | -------------------------------------------------------------------------------- /examples/permalink/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |

smartscroll - Permalink

15 |

A tiny (1838b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing

16 |

See it on GitHub, or see some comparisons

17 |

Try out other examples!

18 | 27 |
28 |
29 |
30 |
31 |

If you bookmark this page and come back to it, it will land you back at the correct position on the page

32 |
33 |
34 |
35 |
36 |

smartscroll have this enabled by default.

37 |
38 |
39 |
40 |
41 |

You can turn it off by passing in the option initialScroll: false.

42 |
43 |
44 |
45 | 46 | 47 | 50 | 51 | -------------------------------------------------------------------------------- /examples/responsive/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |

smartscroll - Responsive

14 |

A tiny (1838b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing

15 |

See it on GitHub, or see some comparisons

16 |

Try out other examples!

17 | 26 |
27 |
28 |
29 |
30 |

This section is not inside the section wrapper, so normal scrolling here!

31 |
32 |
33 |
34 |
35 |
36 |

Compatible with scrollbar

37 |

Try scrolling with the mouse wheel as well as the scrollbar, it works as you expect!

38 |
39 |
40 |
41 |
42 |

Permalink

43 |

You can bookmark a particular section, and it will stay there when you return!

44 | Demo 45 |
46 |
47 |
48 |
49 |

Different Heights

50 |

Normally, your sections will have to be 100% of the viewport (like it is now) for it to work. With smartscroll, the section can all be of different heights!

51 | Demo 52 |
53 |
54 |
55 |
56 |

Hybrid Scroll

57 |

You can scroll normally in the white areas above, and also by sections in these coloured areas!

58 | Demo 59 |
60 |
61 |
62 |
63 |

Auto-Hash

64 |

Noticed when you scrolled down, the URL's hash changes automatically? That's the auto-hash feature! You can enable it just by itself!

65 | Demo 66 |
67 |
68 |
69 |
70 |

Keep History

71 |

By default, scrolling through different sections does not add to your history, but if you like that feature, you can turn it on too!

72 | Demo 73 |
74 |
75 |
76 | 77 | 78 | 86 | 87 | -------------------------------------------------------------------------------- /examples/touch-events/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |

smartscroll

14 |

A tiny (1838b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing

15 |

See it on GitHub, or see some comparisons

16 |

Try out other examples!

17 | 26 |
27 |
28 |
29 |
30 |

This section is not inside the section wrapper, so normal scrolling here!

31 |
32 |
33 |
34 |
35 |
36 |

Supports Swipe events

37 |

Try swiping up, down, left or right on a touch device and see the colour of the coloured box change.

38 |
39 |
40 |
41 |
42 |

Supports Swipe events

43 |

Try swiping up, down, left or right on a touch device and see the colour of the coloured box change.

44 |
45 |
46 |
47 |
48 |

Supports Swipe events

49 |

Try swiping up, down, left or right on a touch device and see the colour of the coloured box change.

50 |
51 |
52 |
53 |
54 |

Supports Swipe events

55 |

Try swiping up, down, left or right on a touch device and see the colour of the coloured box change.

56 |
57 |
58 |
59 |
60 |

Supports Swipe events

61 |

Try swiping up, down, left or right on a touch device and see the colour of the coloured box change.

62 |
63 |
64 |
65 |
66 |

Supports Swipe events

67 |

Try swiping up, down, left or right on a touch device and see the colour of the coloured box change.

68 |
69 |
70 |
71 |
72 | 73 | 74 | 75 | 104 | 105 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "smartscroll", 3 | "version": "2.5.6", 4 | "description": "Scrolljacking jQuery plugin", 5 | "main": "smartscroll.js", 6 | "directories": { 7 | "example": "examples" 8 | }, 9 | "scripts": { 10 | "build": "npm run format && npm run minify", 11 | "lint": "eslint smartscroll.js", 12 | "format": "eslint smartscroll.js --fix", 13 | "minify": "uglifyjs smartscroll.js --ie8 --compress --mangle -o smartscroll.min.js" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "git@github.com/d4nyll/smartscroll.git" 18 | }, 19 | "keywords": [ 20 | "scrolljacking", 21 | "scroll", 22 | "hash", 23 | "jquery", 24 | "jquery-plugin", 25 | "ecosystem:jquery" 26 | ], 27 | "author": "Daniel Li ", 28 | "license": "MIT", 29 | "bugs": { 30 | "url": "https://github.com/d4nyll/smartscroll/issues" 31 | }, 32 | "homepage": "https://github.com/d4nyll/smartscroll#readme", 33 | "devDependencies": { 34 | "eslint": "^5.16.0", 35 | "eslint-config-airbnb": "^17.1.1", 36 | "eslint-config-airbnb-base": "^13.2.0", 37 | "eslint-plugin-import": "^2.18.0", 38 | "uglify-js": "^3.6.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /sass/example.scss: -------------------------------------------------------------------------------- 1 | %center-middle { 2 | display: table; 3 | width: 100%; 4 | text-align: center; 5 | padding: 15%; 6 | box-sizing: border-box; 7 | > div { 8 | display: table-cell; 9 | vertical-align: middle; 10 | } 11 | } 12 | 13 | html, body { 14 | font-family: Montserrat,sans-serif; 15 | } 16 | 17 | a { 18 | color: inherit; 19 | text-decoration: underline; 20 | font-weight: 700; 21 | } 22 | 23 | ul { 24 | padding-left: 0; 25 | } 26 | 27 | li { 28 | list-style: none; 29 | } 30 | 31 | .header, .footer { 32 | @extend %center-middle; 33 | height: 700px; 34 | } 35 | 36 | .section { 37 | @extend %center-middle; 38 | } 39 | 40 | .section:nth-child(6n+1) { 41 | height: 700px; 42 | background-color: #FF708F; 43 | } 44 | 45 | .section:nth-child(6n+2) { 46 | height: 1000px; 47 | background-color: #E89D5D; 48 | } 49 | 50 | .section:nth-child(6n+3) { 51 | height: 500px; 52 | background-color: #FFE33E; 53 | } 54 | 55 | .section:nth-child(6n+4) { 56 | height: 900px; 57 | background-color: #7AE856; 58 | } 59 | 60 | .section:nth-child(6n+5) { 61 | height: 1500px; 62 | background-color: #7AFFE6; 63 | } 64 | 65 | .section:nth-child(6n) { 66 | height: 400px; 67 | background-color: #6E74F5; 68 | } 69 | -------------------------------------------------------------------------------- /sass/smartscroll.scss: -------------------------------------------------------------------------------- 1 | html, body { 2 | margin: 0; 3 | padding: 0; 4 | } -------------------------------------------------------------------------------- /smartscroll.js: -------------------------------------------------------------------------------- 1 | (function ($) { // eslint-disable-line func-names 2 | /** 3 | * CONSTANTS 4 | */ 5 | 6 | var MOUSE_EVENTS_STRING = 'mousewheel DOMMouseScroll wheel MozMousePixelScroll'; 7 | 8 | /** 9 | * DEPENDENCIES 10 | */ 11 | 12 | // Register lethargy as a soft dependency 13 | var lethargy; 14 | if (typeof Lethargy !== 'undefined' && Lethargy !== null) { 15 | lethargy = new Lethargy(); 16 | } 17 | 18 | /** 19 | * FUNCTIONS 20 | */ 21 | 22 | var getWindowTop = function () { 23 | // jQuery uses only window.pageYOffset 24 | // https://github.com/jquery/jquery/blob/29370190605ed5ddf5d0371c6ad886a4a4b5e0f9/src/offset.js#L184 25 | return Math.max( 26 | // Does not work for IE8 or below 27 | // Alias for window.scrollY 28 | // https://developer.mozilla.org/en-US/docs/Web/API/Window/pageYOffset 29 | window.pageYOffset, 30 | 31 | // Does not work for IE versions below Edge 32 | // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY 33 | // 34 | // window.scrollY, 35 | 36 | // Caters for quirks mode 37 | // Deprecated in ES5 strict mode 38 | // so for standards mode use document.documentElement.scrollTop instead 39 | // 40 | window.document.body.scrollTop, 41 | 42 | // Caters for standards mode 43 | // Should be the same as `window.pageYOffset` 44 | window.document.documentElement.scrollTop 45 | ); 46 | }; 47 | 48 | $.smartscroll = function smartscroll(overrides) { // eslint-disable-line no-param-reassign 49 | /** 50 | * OPTIONS 51 | */ 52 | 53 | // Replace defaults with user-specified options 54 | // Properties that are `null` or `undefined` are ignored - https://api.jquery.com/jquery.extend/ 55 | var options = $.extend({}, $.smartscroll.defaults, overrides); 56 | 57 | // If `options.sectionSelector` is not set, use `options.sectionClass` 58 | if (!options.sectionSelector) { 59 | options.sectionSelector = '.' + options.sectionClass; 60 | } 61 | 62 | // Invalidate eventEmitter if: 63 | if ( 64 | // EventEmitter is not available / loaded, 65 | typeof EventEmitter === 'undefined' 66 | || EventEmitter === null 67 | // or the property of options.eventEmitter it is not an EventEmitter instance 68 | || (options.eventEmitter && options.eventEmitter.constructor !== EventEmitter) 69 | ) { 70 | options.eventEmitter = null; 71 | } 72 | 73 | if (options.bindSwipe) { 74 | // Adapted from http://stackoverflow.com/a/23230280/2317532, 75 | // licensed under cc by-sa 3.0 with attribution required 76 | // http://creativecommons.org/licenses/by-sa/3.0/ 77 | // (Might want to checkout http://stackoverflow.com/a/17567696/2317532 when time permits) 78 | var xDown = null; 79 | var yDown = null; 80 | 81 | var handleTouchStart = function (event) { 82 | var e = event.originalEvent || event; 83 | xDown = e.touches[0].clientX; 84 | yDown = e.touches[0].clientY; 85 | }; 86 | 87 | var handleTouchMove = function (event) { 88 | var e = event.originalEvent || event; 89 | if (!xDown || !yDown) { 90 | return; 91 | } 92 | 93 | var xUp = e.touches[0].clientX; 94 | var yUp = e.touches[0].clientY; 95 | 96 | var xDiff = xDown - xUp; 97 | var yDiff = yDown - yUp; 98 | 99 | if (Math.abs(xDiff) > Math.abs(yDiff)) { 100 | if (xDiff > 0) { 101 | options.eventEmitter.emitEvent('swipeLeft'); 102 | } else { 103 | options.eventEmitter.emitEvent('swipeRight'); 104 | } 105 | } else if (yDiff > 0) { 106 | options.eventEmitter.emitEvent('swipeUp'); 107 | } else { 108 | options.eventEmitter.emitEvent('swipeDown'); 109 | } 110 | /* reset values */ 111 | xDown = null; 112 | yDown = null; 113 | }; 114 | } 115 | 116 | /** 117 | * RUNTIME VARIABLES 118 | */ 119 | 120 | // Whether jQuery is currently animating the scroll event 121 | var isScrolling = false; 122 | 123 | var sections = []; 124 | 125 | var sectionWrapperTop; 126 | var sectionWrapperBottom; 127 | 128 | var validBreakPoint = false; 129 | var belowBreakpoint = false; 130 | 131 | var currentHash = window.location.hash; 132 | 133 | // Store the current section wrapper method for later use 134 | var sectionWrapper = $(options.sectionWrapperSelector + ':first'); 135 | 136 | /** 137 | * FUNCTIONS 138 | */ 139 | 140 | // Check if the view is currently within the section wrapper 141 | var sectionWrapperIsVisible = function () { 142 | var windowTop = getWindowTop(); 143 | var windowBottom = windowTop + $(window).height(); 144 | // Only affect scrolling if within the sectionWrapper area 145 | if ( 146 | windowBottom > sectionWrapperTop 147 | && windowTop <= sectionWrapperBottom 148 | ) { 149 | return true; 150 | } 151 | return false; 152 | }; 153 | 154 | // Update the values for `sections` 155 | var calculateSectionBottoms = function () { 156 | var tmpSections = []; 157 | sectionWrapperTop = Math.round( 158 | sectionWrapper.position().top 159 | + parseInt(sectionWrapper.css('paddingTop'), 10) 160 | + parseInt(sectionWrapper.css('borderTopWidth'), 10) 161 | + parseInt(sectionWrapper.css('marginTop'), 10)); 162 | 163 | // We use `height()` instead of `innerHeight()` or `outerHeight()` 164 | // because we don't care about the padding in the sectionWrapper at the bottom 165 | sectionWrapperBottom = Math.round( 166 | sectionWrapperTop 167 | + sectionWrapper.height(), 10); 168 | tmpSections.push(sectionWrapperTop); 169 | $(options.sectionSelector).each(function (i, el) { // eslint-disable-line func-names 170 | tmpSections.push(Math.round( 171 | sectionWrapperTop 172 | + $(el).position().top // This will be relative to the sectionWrapper 173 | + $(el).outerHeight() 174 | )); 175 | }); 176 | sections = tmpSections; 177 | }; 178 | 179 | // Given the event object, determines if it's up or down, 180 | // or invalid according to lethargy 181 | var getScrollAction = function (e) { 182 | // Always register the action with lethargy 183 | var validScroll; 184 | if (lethargy) { 185 | validScroll = lethargy.check(e); 186 | } 187 | // Do nothing if it is already scrolling 188 | if (!isScrolling) { 189 | if (lethargy) { 190 | if (validScroll === 1) { 191 | return 'up'; 192 | } else if (validScroll === -1) { 193 | return 'down'; 194 | } 195 | } else if (e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0) { 196 | return 'up'; 197 | } else if (e.originalEvent.wheelDelta < 0 || e.originalEvent.detail > 0) { 198 | return 'down'; 199 | } 200 | } 201 | return false; 202 | }; 203 | 204 | // Checks the slide that is occupying the position specified 205 | var getSectionIndexAt = function (position) { 206 | for (var i = 0; i < sections.length; i += 1) { 207 | if (position <= sections[i]) { 208 | return i; 209 | } 210 | } 211 | return sections.length; 212 | }; 213 | 214 | // Change the hash (and also record history depending on options) 215 | var autoHash = function () { 216 | var newHash; 217 | // If the middle of the screen is above the top of the section wrapper 218 | // Set the hash to the header's hash 219 | if ((getWindowTop() + ($(window).height() / 2)) < sectionWrapperTop) { 220 | newHash = options.headerHash; 221 | } else { 222 | // Otherwise, get the index of the section at the middle of the screen 223 | var slideIndex = getSectionIndexAt(getWindowTop() + ($(window).height() / 2)); 224 | if (slideIndex !== undefined) { 225 | // And get the data-hash attribute of the section 226 | newHash = $(options.sectionSelector + ':nth-of-type(' + slideIndex + ')').data('hash'); 227 | } 228 | } 229 | if (typeof newHash === 'undefined' || !(window.location.hash === ('#' + newHash))) { 230 | if (typeof newHash === 'undefined') { 231 | newHash = options.headerHash; 232 | } 233 | if (!options.keepHistory) { 234 | window.location.replace(window.location.href.split('#')[0] + '#' + newHash); 235 | } else { 236 | window.location.hash = newHash; 237 | } 238 | } 239 | }; 240 | 241 | // Animates the scroll to the pixel specified 242 | // at the speed (milisseconds) specified 243 | var scrollToPixel = function (pixel, speed) { 244 | if (isScrolling) { 245 | return; 246 | } 247 | isScrolling = true; 248 | $('body,html').stop(true, true).animate({ 249 | scrollTop: pixel, 250 | }, speed, function () { // eslint-disable-line func-names 251 | isScrolling = false; 252 | if (options.eventEmitter) { 253 | var windowTop = getWindowTop(); 254 | var sectionIndexAtWindowMiddle = getSectionIndexAt(windowTop + ($(window).height() / 2)); 255 | options.eventEmitter.emitEvent('scrollEnd', [sectionIndexAtWindowMiddle]); 256 | } 257 | }); 258 | }; 259 | 260 | // Make this public 261 | this.scroll = function scroll(down) { 262 | if (sections) { 263 | var windowTop = getWindowTop(); 264 | var sectionIndexAtWindowMiddle; 265 | if (options.eventEmitter) { 266 | sectionIndexAtWindowMiddle = getSectionIndexAt(windowTop + ($(window).height() / 2)); 267 | var nextSlideNumber = down ? ( 268 | sectionIndexAtWindowMiddle + 1 269 | ) : ( 270 | sectionIndexAtWindowMiddle - 1 271 | ); 272 | options.eventEmitter.emitEvent('scrollStart', [nextSlideNumber]); 273 | } 274 | for (var i = 0; i < sections.length; i += 1) { 275 | if (windowTop < sections[i]) { 276 | if (down) { 277 | scrollToPixel(sections[i], options.animationSpeed); 278 | } else { 279 | scrollToPixel(sections[i - 1] - $(window).height(), options.animationSpeed); 280 | } 281 | if (options.eventEmitter) { 282 | options.eventEmitter.emitEvent('scrollEnd', [sectionIndexAtWindowMiddle]); 283 | } 284 | return false; 285 | } 286 | } 287 | } 288 | return undefined; 289 | }; 290 | 291 | 292 | // Bind scroll events and perform scrolljacking 293 | var bindScroll = function () { 294 | $(window).bind(MOUSE_EVENTS_STRING, function (e) { // eslint-disable-line func-names 295 | var scrollAction = getScrollAction(e); 296 | if (options.dynamicHeight) { 297 | calculateSectionBottoms(); 298 | } 299 | var windowTop = getWindowTop(); 300 | var windowBottom = windowTop + $(window).height(); 301 | // Only affect scrolling if within the sectionWrapper area 302 | if ( 303 | windowBottom > sectionWrapperTop 304 | && windowTop <= sectionWrapperBottom 305 | ) { 306 | // Only hijack the scroll when windowTop and windowBottom are touching different slides 307 | // `!==` instead of `<` caters for when `getSectionIndexAtWindowBottom` is `undefined` 308 | // (at the end of the area) 309 | var sectionIndexAtWindowTop = getSectionIndexAt(windowTop); 310 | var sectionIndexAtWindowMiddle = getSectionIndexAt(windowTop + ($(window).height() / 2)); 311 | var sectionIndexAtWindowBottom = getSectionIndexAt(windowBottom); 312 | if (sectionIndexAtWindowTop !== sectionIndexAtWindowBottom 313 | || !options.innerSectionScroll) { 314 | e.preventDefault(); 315 | e.stopPropagation(); 316 | if (scrollAction) { 317 | if (scrollAction === 'up') { 318 | if (options.toptotop) { 319 | scrollToPixel( 320 | sections[sectionIndexAtWindowMiddle - 2] + 1 321 | , options.animationSpeed 322 | ); 323 | } else { 324 | scrollToPixel( 325 | sections[sectionIndexAtWindowMiddle - 1] - $(window).height() 326 | , options.animationSpeed 327 | ); 328 | } 329 | if (options.eventEmitter) { 330 | options.eventEmitter.emitEvent('scrollStart', [sectionIndexAtWindowMiddle - 1]); 331 | } 332 | } else if (scrollAction === 'down') { 333 | scrollToPixel(sections[sectionIndexAtWindowMiddle] + 1, options.animationSpeed); 334 | if (options.eventEmitter) { 335 | options.eventEmitter.emitEvent('scrollStart', [sectionIndexAtWindowMiddle + 1]); 336 | } 337 | } 338 | } 339 | } 340 | } 341 | }); 342 | }; 343 | 344 | // Remove all functions bound to mouse events 345 | var unbindScroll = function () { 346 | $(window).unbind(MOUSE_EVENTS_STRING); 347 | }; 348 | 349 | /** 350 | * INITIAL SETUP 351 | */ 352 | 353 | sectionWrapper.css({ 354 | position: 'relative', 355 | }); 356 | 357 | // Need to wait until content and CSS has been parsed 358 | // So the height is accurate 359 | setTimeout(function () { // eslint-disable-line func-names 360 | calculateSectionBottoms(); 361 | 362 | // autoHash 363 | 364 | if (options.autoHash) { 365 | if (options.eventEmitter !== null && !options.hashContinuousUpdate) { 366 | options.eventEmitter.addListener('scrollEnd', autoHash); 367 | } else { 368 | // Fallback with binding scroll events. 369 | // Many scroll events are fired and so is very resource-intensive 370 | $(window).bind('scroll', autoHash); 371 | } 372 | } 373 | 374 | // Scroll to hash 375 | 376 | if (options.initialScroll && currentHash.length > 0) { 377 | // Remove the '#' from the hash and use jQuery to check 378 | // if an element exists with that hash in the 'data-hash' attribute 379 | var matchedObject = $('[data-hash="' + currentHash.substr(1) + '"]'); 380 | // If there is a matched element, scroll to the first element at time 0 (immediately) 381 | if (matchedObject.length > 0) { 382 | scrollToPixel(matchedObject[0].offsetTop + sectionWrapperTop, 0); 383 | } 384 | } 385 | }, 50); 386 | 387 | $(window).bind('resize', calculateSectionBottoms); 388 | 389 | // Breakpoint 390 | 391 | // If options.breakpoint is a valid value, 392 | // set this.validBreakPoint to true 393 | if ( 394 | options.breakpoint !== null 395 | && options.breakpoint === parseInt(options.breakpoint, 10) 396 | && options.breakpoint > 0 397 | ) { 398 | validBreakPoint = true; 399 | } 400 | 401 | // Mode 402 | 403 | // If the mode is set to vp (viewpoint), 404 | // make the height of each section the same as the viewport 405 | if (options.mode === 'vp') { 406 | // IE8 does not support viewport 407 | // http://caniuse.com/#feat=viewport-units 408 | if (options.ie8) { 409 | var resizeToVP = function () { 410 | $(options.sectionSelector).css({ 411 | height: $(window).height(), 412 | }); 413 | }; 414 | 415 | // Initial resizing on load 416 | resizeToVP(); 417 | 418 | // Run resizeToVP whenever the window resizes 419 | $(window).bind('resize', resizeToVP); 420 | } else { 421 | // Use viewport to avoid binding to resize events 422 | $(options.sectionSelector).css({ 423 | height: '100vh', 424 | }); 425 | } 426 | } 427 | 428 | // Scrolljacking 429 | if (options.sectionScroll) { 430 | // If the breakpoint option is set 431 | if (validBreakPoint) { 432 | // Run the following whenever the window is resized 433 | $(window).bind('resize', function () { // eslint-disable-line func-names 434 | // If the window width is below the breakpoint, 435 | // Unbind scroll 436 | if ($(window).width() < options.breakpoint) { 437 | // Only unbind once (minimize resource usage) 438 | if (!belowBreakpoint) { 439 | unbindScroll(); 440 | // Set belowBreakpoint to true to prevent further unbinding events 441 | belowBreakpoint = true; 442 | return false; 443 | } 444 | } else if (belowBreakpoint) { 445 | // If the screen width is currently equal to or above the breakpoint 446 | // Bind scroll only if it's not bound already 447 | bindScroll(); 448 | belowBreakpoint = false; 449 | } 450 | return undefined; 451 | }); 452 | } 453 | bindScroll(); 454 | } 455 | 456 | if (options.bindSwipe) { 457 | $(window).on('touchstart', handleTouchStart); // eslint-disable-line block-scoped-var 458 | $(window).on('touchmove', handleTouchMove); // eslint-disable-line block-scoped-var 459 | } 460 | if (options.bindKeyboard) { 461 | var handleKeydown = function (event) { 462 | var e = event.originalEvent || event; 463 | if (options.dynamicHeight) { 464 | calculateSectionBottoms(); 465 | } 466 | var windowTop = getWindowTop(); 467 | var windowBottom = windowTop + $(window).height(); 468 | // Only affect scrolling if within the sectionWrapper area 469 | if (sectionWrapperIsVisible()) { 470 | // Only hijack the scroll when windowTop and windowBottom are touching different slides 471 | // `!==` instead of `<` caters for when `getSectionIndexAtWindowBottom` is `undefined` 472 | // (at the end of the area) 473 | var sectionIndexAtWindowTop = getSectionIndexAt(windowTop); 474 | var sectionIndexAtWindowMiddle = getSectionIndexAt(windowTop + ($(window).height() / 2)); 475 | var sectionIndexAtWindowBottom = getSectionIndexAt(windowBottom); 476 | if (sectionIndexAtWindowTop !== sectionIndexAtWindowBottom 477 | || !options.innerSectionScroll) { 478 | switch (e.which) { 479 | // up arrow 480 | case 38: 481 | e.preventDefault(); 482 | e.stopPropagation(); 483 | if (options.toptotop) { 484 | scrollToPixel( 485 | sections[sectionIndexAtWindowMiddle - 2] + 1 486 | , options.animationSpeed); 487 | } else { 488 | scrollToPixel( 489 | sections[sectionIndexAtWindowMiddle - 1] - $(window).height() 490 | , options.animationSpeed); 491 | } 492 | if (options.eventEmitter) { 493 | options.eventEmitter.emitEvent('scrollStart', [sectionIndexAtWindowMiddle - 1]); 494 | } 495 | break; 496 | // down arrow 497 | case 40: 498 | e.preventDefault(); 499 | e.stopPropagation(); 500 | scrollToPixel(sections[sectionIndexAtWindowMiddle] + 1, options.animationSpeed); 501 | if (options.eventEmitter) { 502 | options.eventEmitter.emitEvent('scrollStart', [sectionIndexAtWindowMiddle + 1]); 503 | } 504 | break; 505 | 506 | default: 507 | } 508 | } 509 | } 510 | }; 511 | $(window).on('keydown', handleKeydown); 512 | } 513 | return this; 514 | }; 515 | 516 | // Set default options 517 | $.smartscroll.defaults = { // eslint-disable-line no-param-reassign 518 | animationSpeed: 700, 519 | autoHash: true, 520 | breakpoint: null, 521 | initialScroll: true, 522 | headerHash: 'header', 523 | keepHistory: false, 524 | mode: 'vp', // "vp", "set" 525 | sectionClass: 'section', 526 | sectionSelector: null, 527 | sectionScroll: true, 528 | sectionWrapperSelector: '.section-wrapper', 529 | eventEmitter: null, 530 | dynamicHeight: false, 531 | ie8: false, 532 | hashContinuousUpdate: true, 533 | innerSectionScroll: true, 534 | toptotop: false, 535 | bindSwipe: true, 536 | bindKeyboard: true, 537 | }; 538 | }(jQuery)); 539 | -------------------------------------------------------------------------------- /smartscroll.min.js: -------------------------------------------------------------------------------- 1 | !function(e){var t,n="mousewheel DOMMouseScroll wheel MozMousePixelScroll";"undefined"!=typeof Lethargy&&null!==Lethargy&&(t=new Lethargy);var i=function(){return Math.max(window.pageYOffset,window.document.body.scrollTop,window.document.documentElement.scrollTop)};e.smartscroll=function(o){var r=e.extend({},e.smartscroll.defaults,o);if(r.sectionSelector||(r.sectionSelector="."+r.sectionClass),("undefined"==typeof EventEmitter||null===EventEmitter||r.eventEmitter&&r.eventEmitter.constructor!==EventEmitter)&&(r.eventEmitter=null),r.bindSwipe)var a=null,l=null,s=function(e){var t=e.originalEvent||e;a=t.touches[0].clientX,l=t.touches[0].clientY},c=function(e){var t=e.originalEvent||e;if(a&&l){var n=t.touches[0].clientX,i=t.touches[0].clientY,o=a-n,s=l-i;Math.abs(o)>Math.abs(s)?o>0?r.eventEmitter.emitEvent("swipeLeft"):r.eventEmitter.emitEvent("swipeRight"):s>0?r.eventEmitter.emitEvent("swipeUp"):r.eventEmitter.emitEvent("swipeDown"),a=null,l=null}};var d,h,u=!1,w=[],v=!1,p=!1,f=window.location.hash,m=e(r.sectionWrapperSelector+":first"),E=function(){var t=[];d=Math.round(m.position().top+parseInt(m.css("paddingTop"),10)+parseInt(m.css("borderTopWidth"),10)+parseInt(m.css("marginTop"),10)),h=Math.round(d+m.height(),10),t.push(d),e(r.sectionSelector).each(function(n,i){t.push(Math.round(d+e(i).position().top+e(i).outerHeight()))}),w=t},g=function(e){for(var t=0;t0||e.originalEvent.detail<0)return"up";if(e.originalEvent.wheelDelta<0||e.originalEvent.detail>0)return"down"}return!1}(n);r.dynamicHeight&&E();var a=i(),l=a+e(window).height();if(l>d&&a<=h){var s=g(a),c=g(a+e(window).height()/2);s===g(l)&&r.innerSectionScroll||(n.preventDefault(),n.stopPropagation(),o&&("up"===o?(r.toptotop?b(w[c-2]+1,r.animationSpeed):b(w[c-1]-e(window).height(),r.animationSpeed),r.eventEmitter&&r.eventEmitter.emitEvent("scrollStart",[c-1])):"down"===o&&(b(w[c]+1,r.animationSpeed),r.eventEmitter&&r.eventEmitter.emitEvent("scrollStart",[c+1]))))}})};if(m.css({position:"relative"}),setTimeout(function(){if(E(),r.autoHash&&(null===r.eventEmitter||r.hashContinuousUpdate?e(window).bind("scroll",S):r.eventEmitter.addListener("scrollEnd",S)),r.initialScroll&&f.length>0){var t=e('[data-hash="'+f.substr(1)+'"]');t.length>0&&b(t[0].offsetTop+d,0)}},50),e(window).bind("resize",E),null!==r.breakpoint&&r.breakpoint===parseInt(r.breakpoint,10)&&r.breakpoint>0&&(v=!0),"vp"===r.mode)if(r.ie8){var k=function(){e(r.sectionSelector).css({height:e(window).height()})};k(),e(window).bind("resize",k)}else e(r.sectionSelector).css({height:"100vh"});if(r.sectionScroll&&(v&&e(window).bind("resize",function(){if(e(window).width()d&&t<=h}()){var l=g(o),s=g(o+e(window).height()/2);if(l!==g(a)||!r.innerSectionScroll)switch(n.which){case 38:n.preventDefault(),n.stopPropagation(),r.toptotop?b(w[s-2]+1,r.animationSpeed):b(w[s-1]-e(window).height(),r.animationSpeed),r.eventEmitter&&r.eventEmitter.emitEvent("scrollStart",[s-1]);break;case 40:n.preventDefault(),n.stopPropagation(),b(w[s]+1,r.animationSpeed),r.eventEmitter&&r.eventEmitter.emitEvent("scrollStart",[s+1])}}})}return this},e.smartscroll.defaults={animationSpeed:700,autoHash:!0,breakpoint:null,initialScroll:!0,headerHash:"header",keepHistory:!1,mode:"vp",sectionClass:"section",sectionSelector:null,sectionScroll:!0,sectionWrapperSelector:".section-wrapper",eventEmitter:null,dynamicHeight:!1,ie8:!1,hashContinuousUpdate:!0,innerSectionScroll:!0,toptotop:!1,bindSwipe:!0,bindKeyboard:!0}}(jQuery); -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/code-frame@^7.0.0": 6 | version "7.0.0" 7 | resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" 8 | dependencies: 9 | "@babel/highlight" "^7.0.0" 10 | 11 | "@babel/highlight@^7.0.0": 12 | version "7.0.0" 13 | resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" 14 | dependencies: 15 | chalk "^2.0.0" 16 | esutils "^2.0.2" 17 | js-tokens "^4.0.0" 18 | 19 | acorn-jsx@^5.0.0: 20 | version "5.0.1" 21 | resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" 22 | 23 | acorn@^6.0.7: 24 | version "6.1.1" 25 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" 26 | 27 | ajv@^6.9.1: 28 | version "6.10.0" 29 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" 30 | dependencies: 31 | fast-deep-equal "^2.0.1" 32 | fast-json-stable-stringify "^2.0.0" 33 | json-schema-traverse "^0.4.1" 34 | uri-js "^4.2.2" 35 | 36 | ansi-escapes@^3.2.0: 37 | version "3.2.0" 38 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" 39 | 40 | ansi-regex@^3.0.0: 41 | version "3.0.0" 42 | resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 43 | 44 | ansi-regex@^4.0.0: 45 | version "4.0.0" 46 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.0.0.tgz#70de791edf021404c3fd615aa89118ae0432e5a9" 47 | 48 | ansi-styles@^3.2.0, ansi-styles@^3.2.1: 49 | version "3.2.1" 50 | resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 51 | dependencies: 52 | color-convert "^1.9.0" 53 | 54 | argparse@^1.0.7: 55 | version "1.0.10" 56 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 57 | dependencies: 58 | sprintf-js "~1.0.2" 59 | 60 | array-includes@^3.0.3: 61 | version "3.0.3" 62 | resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" 63 | dependencies: 64 | define-properties "^1.1.2" 65 | es-abstract "^1.7.0" 66 | 67 | astral-regex@^1.0.0: 68 | version "1.0.0" 69 | resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" 70 | 71 | balanced-match@^0.4.1: 72 | version "0.4.2" 73 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 74 | 75 | brace-expansion@^1.1.7: 76 | version "1.1.7" 77 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" 78 | dependencies: 79 | balanced-match "^0.4.1" 80 | concat-map "0.0.1" 81 | 82 | builtin-modules@^1.0.0: 83 | version "1.1.1" 84 | resolved "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 85 | 86 | callsites@^3.0.0: 87 | version "3.0.0" 88 | resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.0.0.tgz#fb7eb569b72ad7a45812f93fd9430a3e410b3dd3" 89 | 90 | chalk@^2.0.0, chalk@^2.1.0: 91 | version "2.4.1" 92 | resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" 93 | dependencies: 94 | ansi-styles "^3.2.1" 95 | escape-string-regexp "^1.0.5" 96 | supports-color "^5.3.0" 97 | 98 | chalk@^2.4.2: 99 | version "2.4.2" 100 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" 101 | dependencies: 102 | ansi-styles "^3.2.1" 103 | escape-string-regexp "^1.0.5" 104 | supports-color "^5.3.0" 105 | 106 | chardet@^0.7.0: 107 | version "0.7.0" 108 | resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" 109 | 110 | cli-cursor@^2.1.0: 111 | version "2.1.0" 112 | resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" 113 | dependencies: 114 | restore-cursor "^2.0.0" 115 | 116 | cli-width@^2.0.0: 117 | version "2.1.0" 118 | resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" 119 | 120 | color-convert@^1.9.0: 121 | version "1.9.3" 122 | resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 123 | dependencies: 124 | color-name "1.1.3" 125 | 126 | color-name@1.1.3: 127 | version "1.1.3" 128 | resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 129 | 130 | commander@~2.20.0: 131 | version "2.20.0" 132 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" 133 | 134 | concat-map@0.0.1: 135 | version "0.0.1" 136 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 137 | 138 | confusing-browser-globals@^1.0.5: 139 | version "1.0.7" 140 | resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.7.tgz#5ae852bd541a910e7ffb2dbb864a2d21a36ad29b" 141 | 142 | contains-path@^0.1.0: 143 | version "0.1.0" 144 | resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" 145 | 146 | cross-spawn@^6.0.5: 147 | version "6.0.5" 148 | resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" 149 | dependencies: 150 | nice-try "^1.0.4" 151 | path-key "^2.0.1" 152 | semver "^5.5.0" 153 | shebang-command "^1.2.0" 154 | which "^1.2.9" 155 | 156 | debug@^2.6.8, debug@^2.6.9: 157 | version "2.6.9" 158 | resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" 159 | dependencies: 160 | ms "2.0.0" 161 | 162 | debug@^4.0.1: 163 | version "4.1.0" 164 | resolved "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" 165 | dependencies: 166 | ms "^2.1.1" 167 | 168 | deep-is@~0.1.3: 169 | version "0.1.3" 170 | resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" 171 | 172 | define-properties@^1.1.2, define-properties@^1.1.3: 173 | version "1.1.3" 174 | resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" 175 | dependencies: 176 | object-keys "^1.0.12" 177 | 178 | doctrine@1.5.0: 179 | version "1.5.0" 180 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" 181 | dependencies: 182 | esutils "^2.0.2" 183 | isarray "^1.0.0" 184 | 185 | doctrine@^3.0.0: 186 | version "3.0.0" 187 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" 188 | dependencies: 189 | esutils "^2.0.2" 190 | 191 | emoji-regex@^7.0.1: 192 | version "7.0.3" 193 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" 194 | 195 | error-ex@^1.2.0: 196 | version "1.3.2" 197 | resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" 198 | dependencies: 199 | is-arrayish "^0.2.1" 200 | 201 | es-abstract@^1.12.0, es-abstract@^1.7.0: 202 | version "1.13.0" 203 | resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" 204 | dependencies: 205 | es-to-primitive "^1.2.0" 206 | function-bind "^1.1.1" 207 | has "^1.0.3" 208 | is-callable "^1.1.4" 209 | is-regex "^1.0.4" 210 | object-keys "^1.0.12" 211 | 212 | es-to-primitive@^1.2.0: 213 | version "1.2.0" 214 | resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" 215 | dependencies: 216 | is-callable "^1.1.4" 217 | is-date-object "^1.0.1" 218 | is-symbol "^1.0.2" 219 | 220 | escape-string-regexp@^1.0.5: 221 | version "1.0.5" 222 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 223 | 224 | eslint-config-airbnb-base@^13.2.0: 225 | version "13.2.0" 226 | resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.2.0.tgz#f6ea81459ff4dec2dda200c35f1d8f7419d57943" 227 | dependencies: 228 | confusing-browser-globals "^1.0.5" 229 | object.assign "^4.1.0" 230 | object.entries "^1.1.0" 231 | 232 | eslint-config-airbnb@^17.1.1: 233 | version "17.1.1" 234 | resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-17.1.1.tgz#2272e0b86bb1e2b138cdf88d07a3b6f4cda3d626" 235 | dependencies: 236 | eslint-config-airbnb-base "^13.2.0" 237 | object.assign "^4.1.0" 238 | object.entries "^1.1.0" 239 | 240 | eslint-import-resolver-node@^0.3.2: 241 | version "0.3.2" 242 | resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" 243 | dependencies: 244 | debug "^2.6.9" 245 | resolve "^1.5.0" 246 | 247 | eslint-module-utils@^2.4.0: 248 | version "2.4.0" 249 | resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz#8b93499e9b00eab80ccb6614e69f03678e84e09a" 250 | dependencies: 251 | debug "^2.6.8" 252 | pkg-dir "^2.0.0" 253 | 254 | eslint-plugin-import@^2.18.0: 255 | version "2.18.0" 256 | resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.0.tgz#7a5ba8d32622fb35eb9c8db195c2090bd18a3678" 257 | dependencies: 258 | array-includes "^3.0.3" 259 | contains-path "^0.1.0" 260 | debug "^2.6.9" 261 | doctrine "1.5.0" 262 | eslint-import-resolver-node "^0.3.2" 263 | eslint-module-utils "^2.4.0" 264 | has "^1.0.3" 265 | lodash "^4.17.11" 266 | minimatch "^3.0.4" 267 | read-pkg-up "^2.0.0" 268 | resolve "^1.11.0" 269 | 270 | eslint-scope@^4.0.3: 271 | version "4.0.3" 272 | resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" 273 | dependencies: 274 | esrecurse "^4.1.0" 275 | estraverse "^4.1.1" 276 | 277 | eslint-utils@^1.3.1: 278 | version "1.3.1" 279 | resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" 280 | 281 | eslint-visitor-keys@^1.0.0: 282 | version "1.0.0" 283 | resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" 284 | 285 | eslint@^5.16.0: 286 | version "5.16.0" 287 | resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" 288 | dependencies: 289 | "@babel/code-frame" "^7.0.0" 290 | ajv "^6.9.1" 291 | chalk "^2.1.0" 292 | cross-spawn "^6.0.5" 293 | debug "^4.0.1" 294 | doctrine "^3.0.0" 295 | eslint-scope "^4.0.3" 296 | eslint-utils "^1.3.1" 297 | eslint-visitor-keys "^1.0.0" 298 | espree "^5.0.1" 299 | esquery "^1.0.1" 300 | esutils "^2.0.2" 301 | file-entry-cache "^5.0.1" 302 | functional-red-black-tree "^1.0.1" 303 | glob "^7.1.2" 304 | globals "^11.7.0" 305 | ignore "^4.0.6" 306 | import-fresh "^3.0.0" 307 | imurmurhash "^0.1.4" 308 | inquirer "^6.2.2" 309 | js-yaml "^3.13.0" 310 | json-stable-stringify-without-jsonify "^1.0.1" 311 | levn "^0.3.0" 312 | lodash "^4.17.11" 313 | minimatch "^3.0.4" 314 | mkdirp "^0.5.1" 315 | natural-compare "^1.4.0" 316 | optionator "^0.8.2" 317 | path-is-inside "^1.0.2" 318 | progress "^2.0.0" 319 | regexpp "^2.0.1" 320 | semver "^5.5.1" 321 | strip-ansi "^4.0.0" 322 | strip-json-comments "^2.0.1" 323 | table "^5.2.3" 324 | text-table "^0.2.0" 325 | 326 | espree@^5.0.1: 327 | version "5.0.1" 328 | resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" 329 | dependencies: 330 | acorn "^6.0.7" 331 | acorn-jsx "^5.0.0" 332 | eslint-visitor-keys "^1.0.0" 333 | 334 | esprima@^4.0.0: 335 | version "4.0.1" 336 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 337 | 338 | esquery@^1.0.1: 339 | version "1.0.1" 340 | resolved "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" 341 | dependencies: 342 | estraverse "^4.0.0" 343 | 344 | esrecurse@^4.1.0: 345 | version "4.1.0" 346 | resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" 347 | dependencies: 348 | estraverse "~4.1.0" 349 | object-assign "^4.0.1" 350 | 351 | estraverse@^4.0.0, estraverse@^4.1.1: 352 | version "4.2.0" 353 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" 354 | 355 | estraverse@~4.1.0: 356 | version "4.1.1" 357 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" 358 | 359 | esutils@^2.0.2: 360 | version "2.0.2" 361 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 362 | 363 | external-editor@^3.0.3: 364 | version "3.0.3" 365 | resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" 366 | dependencies: 367 | chardet "^0.7.0" 368 | iconv-lite "^0.4.24" 369 | tmp "^0.0.33" 370 | 371 | fast-deep-equal@^2.0.1: 372 | version "2.0.1" 373 | resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" 374 | 375 | fast-json-stable-stringify@^2.0.0: 376 | version "2.0.0" 377 | resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" 378 | 379 | fast-levenshtein@~2.0.4: 380 | version "2.0.6" 381 | resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 382 | 383 | figures@^2.0.0: 384 | version "2.0.0" 385 | resolved "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" 386 | dependencies: 387 | escape-string-regexp "^1.0.5" 388 | 389 | file-entry-cache@^5.0.1: 390 | version "5.0.1" 391 | resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" 392 | dependencies: 393 | flat-cache "^2.0.1" 394 | 395 | find-up@^2.0.0, find-up@^2.1.0: 396 | version "2.1.0" 397 | resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" 398 | dependencies: 399 | locate-path "^2.0.0" 400 | 401 | flat-cache@^2.0.1: 402 | version "2.0.1" 403 | resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" 404 | dependencies: 405 | flatted "^2.0.0" 406 | rimraf "2.6.3" 407 | write "1.0.3" 408 | 409 | flatted@^2.0.0: 410 | version "2.0.0" 411 | resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" 412 | 413 | fs.realpath@^1.0.0: 414 | version "1.0.0" 415 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 416 | 417 | function-bind@^1.0.2: 418 | version "1.1.0" 419 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" 420 | 421 | function-bind@^1.1.1: 422 | version "1.1.1" 423 | resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" 424 | 425 | functional-red-black-tree@^1.0.1: 426 | version "1.0.1" 427 | resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" 428 | 429 | glob@^7.1.2, glob@^7.1.3: 430 | version "7.1.3" 431 | resolved "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" 432 | dependencies: 433 | fs.realpath "^1.0.0" 434 | inflight "^1.0.4" 435 | inherits "2" 436 | minimatch "^3.0.4" 437 | once "^1.3.0" 438 | path-is-absolute "^1.0.0" 439 | 440 | globals@^11.7.0: 441 | version "11.9.0" 442 | resolved "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249" 443 | 444 | graceful-fs@^4.1.2: 445 | version "4.1.11" 446 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 447 | 448 | has-flag@^3.0.0: 449 | version "3.0.0" 450 | resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 451 | 452 | has-symbols@^1.0.0: 453 | version "1.0.0" 454 | resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" 455 | 456 | has@^1.0.1: 457 | version "1.0.1" 458 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" 459 | dependencies: 460 | function-bind "^1.0.2" 461 | 462 | has@^1.0.3: 463 | version "1.0.3" 464 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" 465 | dependencies: 466 | function-bind "^1.1.1" 467 | 468 | hosted-git-info@^2.1.4: 469 | version "2.7.1" 470 | resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" 471 | 472 | iconv-lite@^0.4.24: 473 | version "0.4.24" 474 | resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" 475 | dependencies: 476 | safer-buffer ">= 2.1.2 < 3" 477 | 478 | ignore@^4.0.6: 479 | version "4.0.6" 480 | resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" 481 | 482 | import-fresh@^3.0.0: 483 | version "3.0.0" 484 | resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390" 485 | dependencies: 486 | parent-module "^1.0.0" 487 | resolve-from "^4.0.0" 488 | 489 | imurmurhash@^0.1.4: 490 | version "0.1.4" 491 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 492 | 493 | inflight@^1.0.4: 494 | version "1.0.6" 495 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 496 | dependencies: 497 | once "^1.3.0" 498 | wrappy "1" 499 | 500 | inherits@2: 501 | version "2.0.3" 502 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 503 | 504 | inquirer@^6.2.2: 505 | version "6.2.2" 506 | resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.2.tgz#46941176f65c9eb20804627149b743a218f25406" 507 | dependencies: 508 | ansi-escapes "^3.2.0" 509 | chalk "^2.4.2" 510 | cli-cursor "^2.1.0" 511 | cli-width "^2.0.0" 512 | external-editor "^3.0.3" 513 | figures "^2.0.0" 514 | lodash "^4.17.11" 515 | mute-stream "0.0.7" 516 | run-async "^2.2.0" 517 | rxjs "^6.4.0" 518 | string-width "^2.1.0" 519 | strip-ansi "^5.0.0" 520 | through "^2.3.6" 521 | 522 | is-arrayish@^0.2.1: 523 | version "0.2.1" 524 | resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 525 | 526 | is-builtin-module@^1.0.0: 527 | version "1.0.0" 528 | resolved "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" 529 | dependencies: 530 | builtin-modules "^1.0.0" 531 | 532 | is-callable@^1.1.4: 533 | version "1.1.4" 534 | resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" 535 | 536 | is-date-object@^1.0.1: 537 | version "1.0.1" 538 | resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" 539 | 540 | is-fullwidth-code-point@^2.0.0: 541 | version "2.0.0" 542 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 543 | 544 | is-promise@^2.1.0: 545 | version "2.1.0" 546 | resolved "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" 547 | 548 | is-regex@^1.0.4: 549 | version "1.0.4" 550 | resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" 551 | dependencies: 552 | has "^1.0.1" 553 | 554 | is-symbol@^1.0.2: 555 | version "1.0.2" 556 | resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" 557 | dependencies: 558 | has-symbols "^1.0.0" 559 | 560 | isarray@^1.0.0: 561 | version "1.0.0" 562 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 563 | 564 | isexe@^2.0.0: 565 | version "2.0.0" 566 | resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 567 | 568 | js-tokens@^4.0.0: 569 | version "4.0.0" 570 | resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" 571 | 572 | js-yaml@^3.13.0: 573 | version "3.13.1" 574 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" 575 | dependencies: 576 | argparse "^1.0.7" 577 | esprima "^4.0.0" 578 | 579 | json-schema-traverse@^0.4.1: 580 | version "0.4.1" 581 | resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" 582 | 583 | json-stable-stringify-without-jsonify@^1.0.1: 584 | version "1.0.1" 585 | resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" 586 | 587 | levn@^0.3.0, levn@~0.3.0: 588 | version "0.3.0" 589 | resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" 590 | dependencies: 591 | prelude-ls "~1.1.2" 592 | type-check "~0.3.2" 593 | 594 | load-json-file@^2.0.0: 595 | version "2.0.0" 596 | resolved "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" 597 | dependencies: 598 | graceful-fs "^4.1.2" 599 | parse-json "^2.2.0" 600 | pify "^2.0.0" 601 | strip-bom "^3.0.0" 602 | 603 | locate-path@^2.0.0: 604 | version "2.0.0" 605 | resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" 606 | dependencies: 607 | p-locate "^2.0.0" 608 | path-exists "^3.0.0" 609 | 610 | lodash@^4.17.11: 611 | version "4.17.14" 612 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" 613 | 614 | mimic-fn@^1.0.0: 615 | version "1.2.0" 616 | resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" 617 | 618 | minimatch@^3.0.4: 619 | version "3.0.4" 620 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 621 | dependencies: 622 | brace-expansion "^1.1.7" 623 | 624 | minimist@0.0.8: 625 | version "0.0.8" 626 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 627 | 628 | mkdirp@^0.5.1: 629 | version "0.5.1" 630 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 631 | dependencies: 632 | minimist "0.0.8" 633 | 634 | ms@2.0.0: 635 | version "2.0.0" 636 | resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 637 | 638 | ms@^2.1.1: 639 | version "2.1.1" 640 | resolved "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" 641 | 642 | mute-stream@0.0.7: 643 | version "0.0.7" 644 | resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" 645 | 646 | natural-compare@^1.4.0: 647 | version "1.4.0" 648 | resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" 649 | 650 | nice-try@^1.0.4: 651 | version "1.0.5" 652 | resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" 653 | 654 | normalize-package-data@^2.3.2: 655 | version "2.4.0" 656 | resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" 657 | dependencies: 658 | hosted-git-info "^2.1.4" 659 | is-builtin-module "^1.0.0" 660 | semver "2 || 3 || 4 || 5" 661 | validate-npm-package-license "^3.0.1" 662 | 663 | object-assign@^4.0.1: 664 | version "4.1.1" 665 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 666 | 667 | object-keys@^1.0.11, object-keys@^1.0.12: 668 | version "1.0.12" 669 | resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" 670 | 671 | object.assign@^4.1.0: 672 | version "4.1.0" 673 | resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" 674 | dependencies: 675 | define-properties "^1.1.2" 676 | function-bind "^1.1.1" 677 | has-symbols "^1.0.0" 678 | object-keys "^1.0.11" 679 | 680 | object.entries@^1.1.0: 681 | version "1.1.0" 682 | resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.0.tgz#2024fc6d6ba246aee38bdb0ffd5cfbcf371b7519" 683 | dependencies: 684 | define-properties "^1.1.3" 685 | es-abstract "^1.12.0" 686 | function-bind "^1.1.1" 687 | has "^1.0.3" 688 | 689 | once@^1.3.0: 690 | version "1.4.0" 691 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 692 | dependencies: 693 | wrappy "1" 694 | 695 | onetime@^2.0.0: 696 | version "2.0.1" 697 | resolved "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" 698 | dependencies: 699 | mimic-fn "^1.0.0" 700 | 701 | optionator@^0.8.2: 702 | version "0.8.2" 703 | resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" 704 | dependencies: 705 | deep-is "~0.1.3" 706 | fast-levenshtein "~2.0.4" 707 | levn "~0.3.0" 708 | prelude-ls "~1.1.2" 709 | type-check "~0.3.2" 710 | wordwrap "~1.0.0" 711 | 712 | os-tmpdir@~1.0.2: 713 | version "1.0.2" 714 | resolved "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 715 | 716 | p-limit@^1.1.0: 717 | version "1.3.0" 718 | resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" 719 | dependencies: 720 | p-try "^1.0.0" 721 | 722 | p-locate@^2.0.0: 723 | version "2.0.0" 724 | resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" 725 | dependencies: 726 | p-limit "^1.1.0" 727 | 728 | p-try@^1.0.0: 729 | version "1.0.0" 730 | resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" 731 | 732 | parent-module@^1.0.0: 733 | version "1.0.0" 734 | resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.0.tgz#df250bdc5391f4a085fb589dad761f5ad6b865b5" 735 | dependencies: 736 | callsites "^3.0.0" 737 | 738 | parse-json@^2.2.0: 739 | version "2.2.0" 740 | resolved "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" 741 | dependencies: 742 | error-ex "^1.2.0" 743 | 744 | path-exists@^3.0.0: 745 | version "3.0.0" 746 | resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" 747 | 748 | path-is-absolute@^1.0.0: 749 | version "1.0.1" 750 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 751 | 752 | path-is-inside@^1.0.2: 753 | version "1.0.2" 754 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 755 | 756 | path-key@^2.0.1: 757 | version "2.0.1" 758 | resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" 759 | 760 | path-parse@^1.0.5: 761 | version "1.0.5" 762 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" 763 | 764 | path-parse@^1.0.6: 765 | version "1.0.6" 766 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 767 | 768 | path-type@^2.0.0: 769 | version "2.0.0" 770 | resolved "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" 771 | dependencies: 772 | pify "^2.0.0" 773 | 774 | pify@^2.0.0: 775 | version "2.3.0" 776 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 777 | 778 | pkg-dir@^2.0.0: 779 | version "2.0.0" 780 | resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" 781 | dependencies: 782 | find-up "^2.1.0" 783 | 784 | prelude-ls@~1.1.2: 785 | version "1.1.2" 786 | resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" 787 | 788 | progress@^2.0.0: 789 | version "2.0.1" 790 | resolved "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz#c9242169342b1c29d275889c95734621b1952e31" 791 | 792 | punycode@^2.1.0: 793 | version "2.1.1" 794 | resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" 795 | 796 | read-pkg-up@^2.0.0: 797 | version "2.0.0" 798 | resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" 799 | dependencies: 800 | find-up "^2.0.0" 801 | read-pkg "^2.0.0" 802 | 803 | read-pkg@^2.0.0: 804 | version "2.0.0" 805 | resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" 806 | dependencies: 807 | load-json-file "^2.0.0" 808 | normalize-package-data "^2.3.2" 809 | path-type "^2.0.0" 810 | 811 | regexpp@^2.0.1: 812 | version "2.0.1" 813 | resolved "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" 814 | 815 | resolve-from@^4.0.0: 816 | version "4.0.0" 817 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" 818 | 819 | resolve@^1.11.0: 820 | version "1.11.0" 821 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.0.tgz#4014870ba296176b86343d50b60f3b50609ce232" 822 | dependencies: 823 | path-parse "^1.0.6" 824 | 825 | resolve@^1.5.0: 826 | version "1.8.1" 827 | resolved "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" 828 | dependencies: 829 | path-parse "^1.0.5" 830 | 831 | restore-cursor@^2.0.0: 832 | version "2.0.0" 833 | resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" 834 | dependencies: 835 | onetime "^2.0.0" 836 | signal-exit "^3.0.2" 837 | 838 | rimraf@2.6.3: 839 | version "2.6.3" 840 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" 841 | dependencies: 842 | glob "^7.1.3" 843 | 844 | run-async@^2.2.0: 845 | version "2.3.0" 846 | resolved "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" 847 | dependencies: 848 | is-promise "^2.1.0" 849 | 850 | rxjs@^6.4.0: 851 | version "6.4.0" 852 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" 853 | dependencies: 854 | tslib "^1.9.0" 855 | 856 | "safer-buffer@>= 2.1.2 < 3": 857 | version "2.1.2" 858 | resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" 859 | 860 | "semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.5.1: 861 | version "5.6.0" 862 | resolved "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" 863 | 864 | shebang-command@^1.2.0: 865 | version "1.2.0" 866 | resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" 867 | dependencies: 868 | shebang-regex "^1.0.0" 869 | 870 | shebang-regex@^1.0.0: 871 | version "1.0.0" 872 | resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" 873 | 874 | signal-exit@^3.0.2: 875 | version "3.0.2" 876 | resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 877 | 878 | slice-ansi@^2.1.0: 879 | version "2.1.0" 880 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" 881 | dependencies: 882 | ansi-styles "^3.2.0" 883 | astral-regex "^1.0.0" 884 | is-fullwidth-code-point "^2.0.0" 885 | 886 | source-map@~0.6.1: 887 | version "0.6.1" 888 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 889 | 890 | spdx-correct@^3.0.0: 891 | version "3.0.2" 892 | resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz#19bb409e91b47b1ad54159243f7312a858db3c2e" 893 | dependencies: 894 | spdx-expression-parse "^3.0.0" 895 | spdx-license-ids "^3.0.0" 896 | 897 | spdx-exceptions@^2.1.0: 898 | version "2.2.0" 899 | resolved "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" 900 | 901 | spdx-expression-parse@^3.0.0: 902 | version "3.0.0" 903 | resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" 904 | dependencies: 905 | spdx-exceptions "^2.1.0" 906 | spdx-license-ids "^3.0.0" 907 | 908 | spdx-license-ids@^3.0.0: 909 | version "3.0.2" 910 | resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz#a59efc09784c2a5bada13cfeaf5c75dd214044d2" 911 | 912 | sprintf-js@~1.0.2: 913 | version "1.0.3" 914 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 915 | 916 | string-width@^2.1.0: 917 | version "2.1.1" 918 | resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" 919 | dependencies: 920 | is-fullwidth-code-point "^2.0.0" 921 | strip-ansi "^4.0.0" 922 | 923 | string-width@^3.0.0: 924 | version "3.0.0" 925 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.0.0.tgz#5a1690a57cc78211fffd9bf24bbe24d090604eb1" 926 | dependencies: 927 | emoji-regex "^7.0.1" 928 | is-fullwidth-code-point "^2.0.0" 929 | strip-ansi "^5.0.0" 930 | 931 | strip-ansi@^4.0.0: 932 | version "4.0.0" 933 | resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" 934 | dependencies: 935 | ansi-regex "^3.0.0" 936 | 937 | strip-ansi@^5.0.0: 938 | version "5.0.0" 939 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.0.0.tgz#f78f68b5d0866c20b2c9b8c61b5298508dc8756f" 940 | dependencies: 941 | ansi-regex "^4.0.0" 942 | 943 | strip-bom@^3.0.0: 944 | version "3.0.0" 945 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 946 | 947 | strip-json-comments@^2.0.1: 948 | version "2.0.1" 949 | resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 950 | 951 | supports-color@^5.3.0: 952 | version "5.5.0" 953 | resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 954 | dependencies: 955 | has-flag "^3.0.0" 956 | 957 | table@^5.2.3: 958 | version "5.2.3" 959 | resolved "https://registry.yarnpkg.com/table/-/table-5.2.3.tgz#cde0cc6eb06751c009efab27e8c820ca5b67b7f2" 960 | dependencies: 961 | ajv "^6.9.1" 962 | lodash "^4.17.11" 963 | slice-ansi "^2.1.0" 964 | string-width "^3.0.0" 965 | 966 | text-table@^0.2.0: 967 | version "0.2.0" 968 | resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" 969 | 970 | through@^2.3.6: 971 | version "2.3.8" 972 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 973 | 974 | tmp@^0.0.33: 975 | version "0.0.33" 976 | resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" 977 | dependencies: 978 | os-tmpdir "~1.0.2" 979 | 980 | tslib@^1.9.0: 981 | version "1.9.3" 982 | resolved "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" 983 | 984 | type-check@~0.3.2: 985 | version "0.3.2" 986 | resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" 987 | dependencies: 988 | prelude-ls "~1.1.2" 989 | 990 | uglify-js@^3.6.0: 991 | version "3.6.0" 992 | resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" 993 | dependencies: 994 | commander "~2.20.0" 995 | source-map "~0.6.1" 996 | 997 | uri-js@^4.2.2: 998 | version "4.2.2" 999 | resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" 1000 | dependencies: 1001 | punycode "^2.1.0" 1002 | 1003 | validate-npm-package-license@^3.0.1: 1004 | version "3.0.4" 1005 | resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" 1006 | dependencies: 1007 | spdx-correct "^3.0.0" 1008 | spdx-expression-parse "^3.0.0" 1009 | 1010 | which@^1.2.9: 1011 | version "1.3.1" 1012 | resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" 1013 | dependencies: 1014 | isexe "^2.0.0" 1015 | 1016 | wordwrap@~1.0.0: 1017 | version "1.0.0" 1018 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" 1019 | 1020 | wrappy@1: 1021 | version "1.0.2" 1022 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1023 | 1024 | write@1.0.3: 1025 | version "1.0.3" 1026 | resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" 1027 | dependencies: 1028 | mkdirp "^0.5.1" 1029 | --------------------------------------------------------------------------------