From 041962aca4a0977b339debf503ad5d5d9bb4323f Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Tue, 8 Sep 2015 11:54:19 -0400 Subject: [PATCH 01/63] Add a few tests (finally). Many more needed. --- test/index.html | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ test/tests.js | 24 +++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 test/index.html create mode 100644 test/tests.js diff --git a/test/index.html b/test/index.html new file mode 100644 index 0000000..46c5fe1 --- /dev/null +++ b/test/index.html @@ -0,0 +1,52 @@ + + + + + Smooth Scroll Plugin Tests + + + + +
+
+ +
+

Bacon ipsum dolor amet andouille tri-tip salami frankfurter fatback venison. Cupim sausage rump boudin pork loin, salami kielbasa chuck jowl venison kevin prosciutto flank ribeye. Alcatra chuck sausage meatball beef ribs brisket biltong rump andouille tenderloin leberkas. Bacon andouille pork loin chuck shankle, ground round hamburger ham hock ball tip meatball sirloin drumstick flank kielbasa prosciutto.

+

Hamburger pig sausage, pancetta rump turducken shankle landjaeger pork belly bresaola jerky brisket leberkas porchetta swine. Pork shankle salami, sausage ham cupim andouille. Sirloin sausage jerky, leberkas chuck short ribs pancetta t-bone kielbasa strip steak prosciutto salami beef ribs frankfurter. Brisket doner andouille t-bone prosciutto short loin. Kielbasa tenderloin doner beef ribs shankle.

+

Kielbasa cupim boudin shank frankfurter. Short loin shank shankle sausage, salami pork loin leberkas biltong venison. Bresaola chuck chicken drumstick. Fatback cupim short ribs jerky brisket pancetta flank cow beef ribs salami capicola picanha rump short loin meatloaf. Corned beef meatloaf pork belly picanha alcatra pork chop.

+

Sirloin frankfurter tongue pork, filet mignon drumstick shankle beef ribs tri-tip turducken hamburger salami andouille meatloaf. Andouille landjaeger flank boudin beef short ribs brisket alcatra kielbasa ham pork loin pancetta. Pancetta tenderloin shoulder, porchetta tri-tip pastrami ham pork loin tail swine andouille. Sausage landjaeger strip steak tail corned beef biltong meatball picanha beef ribs swine kielbasa. T-bone tail rump kevin doner chuck. Prosciutto andouille pork loin shankle t-bone, turducken sirloin landjaeger pancetta picanha spare ribs filet mignon. Shank ham beef chuck salami tail t-bone shoulder beef ribs kevin.

+ +
+

Bacon ipsum dolor amet andouille tri-tip salami frankfurter fatback venison. Cupim sausage rump boudin pork loin, salami kielbasa chuck jowl venison kevin prosciutto flank ribeye. Alcatra chuck sausage meatball beef ribs brisket biltong rump andouille tenderloin leberkas. Bacon andouille pork loin chuck shankle, ground round hamburger ham hock ball tip meatball sirloin drumstick flank kielbasa prosciutto.

+

Hamburger pig sausage, pancetta rump turducken shankle landjaeger pork belly bresaola jerky brisket leberkas porchetta swine. Pork shankle salami, sausage ham cupim andouille. Sirloin sausage jerky, leberkas chuck short ribs pancetta t-bone kielbasa strip steak prosciutto salami beef ribs frankfurter. Brisket doner andouille t-bone prosciutto short loin. Kielbasa tenderloin doner beef ribs shankle.

+

Kielbasa cupim boudin shank frankfurter. Short loin shank shankle sausage, salami pork loin leberkas biltong venison. Bresaola chuck chicken drumstick. Fatback cupim short ribs jerky brisket pancetta flank cow beef ribs salami capicola picanha rump short loin meatloaf. Corned beef meatloaf pork belly picanha alcatra pork chop.

+

Sirloin frankfurter tongue pork, filet mignon drumstick shankle beef ribs tri-tip turducken hamburger salami andouille meatloaf. Andouille landjaeger flank boudin beef short ribs brisket alcatra kielbasa ham pork loin pancetta. Pancetta tenderloin shoulder, porchetta tri-tip pastrami ham pork loin tail swine andouille. Sausage landjaeger strip steak tail corned beef biltong meatball picanha beef ribs swine kielbasa. T-bone tail rump kevin doner chuck. Prosciutto andouille pork loin shankle t-bone, turducken sirloin landjaeger pancetta picanha spare ribs filet mignon. Shank ham beef chuck salami tail t-bone shoulder beef ribs kevin.

+

Drumstick bacon turducken boudin ribeye cupim. Flank bresaola porchetta hamburger capicola. Sirloin tenderloin jowl, corned beef t-bone meatloaf swine pig. Swine ham hock beef ribs pork, strip steak rump picanha tail kielbasa turducken shank flank short loin chuck.

+

Prosciutto meatloaf t-bone shankle biltong, spare ribs pork belly pork cupim. Brisket pork loin kevin short loin cupim chuck jerky sirloin t-bone pig. Doner bresaola boudin beef frankfurter jowl t-bone ham hock strip steak turducken jerky leberkas alcatra flank shoulder. Tenderloin cupim hamburger, cow shoulder capicola jowl shankle swine pork loin meatloaf. Biltong drumstick meatloaf, cow pork belly ham hock pancetta alcatra landjaeger leberkas ball tip salami hamburger turkey.

+

Chuck kielbasa shoulder fatback venison pastrami, sausage rump cupim sirloin ham hock tail. Kevin prosciutto capicola brisket beef ribs chicken andouille. Spare ribs meatball kielbasa ribeye pork belly turkey ham. Ham hock beef ribs hamburger, bresaola pork biltong landjaeger. Ball tip picanha short ribs andouille chicken. Cow spare ribs bresaola tongue, ribeye hamburger biltong shank filet mignon drumstick brisket capicola rump short loin. Ham hock bacon sirloin kielbasa sausage doner shoulder.

+

Kielbasa cow tail pork, salami jowl leberkas kevin rump swine jerky. Strip steak turducken flank, jowl andouille bacon meatloaf venison alcatra short ribs prosciutto ribeye. Corned beef short loin leberkas tenderloin bresaola sausage pancetta frankfurter bacon. Turducken kevin landjaeger, corned beef bresaola picanha chuck. Ground round shoulder picanha pancetta, fatback shankle pork loin pastrami tri-tip.

+

Ribeye ham sirloin, ham hock short ribs flank ground round landjaeger brisket. Chicken prosciutto salami, bresaola capicola jowl ham hock filet mignon pork spare ribs doner biltong. Ball tip hamburger tongue, porchetta short loin meatball pork bresaola meatloaf fatback. Ham sausage ground round tongue pancetta beef ribs. Jerky cow tri-tip shank, tenderloin drumstick tongue ball tip strip steak leberkas pig. Sausage pork chop alcatra, boudin ground round picanha bresaola doner pancetta cow. Porchetta salami short ribs, drumstick ground round shank leberkas tail rump bacon andouille tenderloin sausage meatloaf chicken.

+

Salami tongue picanha, cupim cow ground round bacon turducken fatback meatloaf landjaeger leberkas kevin. Ground round kielbasa swine pork loin kevin ball tip. Shankle beef ribs venison biltong turkey, strip steak short ribs fatback kielbasa tenderloin pastrami ham hock ham. Salami bacon tail tongue pancetta cupim pastrami pork chop prosciutto brisket beef ribs. Swine salami ball tip tongue, turducken sausage pork belly frankfurter picanha capicola andouille meatloaf biltong short ribs hamburger. Shankle meatloaf tenderloin meatball, boudin ground round andouille cupim short loin filet mignon capicola. Boudin bresaola spare ribs meatloaf, alcatra bacon pork loin frankfurter prosciutto meatball pork belly salami.

+

Corned beef doner flank kevin. Alcatra ham hock kielbasa, pork loin turkey landjaeger bresaola shankle t-bone rump flank tenderloin beef. Meatball shank turducken leberkas t-bone. Ground round beef swine rump porchetta pork chop tri-tip pork loin kielbasa pastrami frankfurter pork andouille.

+

Turkey chicken tongue boudin cupim flank porchetta pastrami. Cow ham alcatra, porchetta turkey doner t-bone ribeye brisket spare ribs short ribs kielbasa. Ribeye ground round tenderloin beef ribs. Pancetta capicola porchetta ball tip doner drumstick boudin t-bone shankle. Pancetta flank leberkas, chicken tri-tip porchetta drumstick tail ribeye venison. Landjaeger alcatra turkey, picanha porchetta beef frankfurter meatball bacon pig short loin.

+

Filet mignon beef corned beef biltong doner, kielbasa prosciutto venison tenderloin. Shoulder bresaola t-bone pig tenderloin, meatball spare ribs leberkas tongue drumstick picanha rump ground round. Tongue short ribs pig salami rump, boudin andouille hamburger pancetta meatball. Filet mignon capicola pancetta cupim, shank jerky ham hock pork spare ribs strip steak short ribs rump alcatra. Shoulder short ribs picanha, chicken beef ham pork chop leberkas pastrami bresaola meatball salami. Salami pork chop ham hock pork meatloaf kielbasa turkey ribeye chicken tenderloin hamburger boudin frankfurter. Tri-tip hamburger short ribs short loin ham ball tip shoulder landjaeger tongue pig.

+

Flank pastrami sausage jerky cupim. Corned beef shankle boudin pancetta salami short ribs. Frankfurter beef ribs ribeye corned beef pastrami landjaeger flank meatloaf pork chop. Prosciutto pig frankfurter leberkas ham hock. Cupim flank tenderloin shank porchetta tail.

+

Bresaola beef ribs beef, tongue picanha sirloin short loin biltong. Short ribs leberkas jerky beef ribs tongue bacon pork chop. Meatloaf shankle short loin, jerky cupim chuck ground round biltong ham cow tenderloin. Sausage pancetta ribeye, venison doner landjaeger kielbasa bresaola. Leberkas tail andouille jowl spare ribs pork frankfurter pork belly salami sausage t-bone rump tongue. Flank chuck pork chop short ribs ball tip ham hock jerky shankle beef kielbasa prosciutto salami.

+ + +
+ + + + + + diff --git a/test/tests.js b/test/tests.js new file mode 100644 index 0000000..321cc49 --- /dev/null +++ b/test/tests.js @@ -0,0 +1,24 @@ +/* globals QUnit: false */ + +QUnit.module('filterPath'); + +QUnit.test( 'Link paths not location path', function( assert ) { + var locationPath = $.smoothScroll.filterPath(location.pathname); + $('a[href*=#]').each(function() { + assert.notEqual(locationPath, this.pathname); + }); +}); + +QUnit.module('scrollable'); + +QUnit.test( 'Returns first scrollable element (html,body)', function( assert ) { + var scrollable = $('html,body').firstScrollable(); + assert.equal(scrollable.length, 1, 'One scrollable element is returned'); + assert.equal(scrollable[0], document.body, 'Scrollable element is '); +}); + +QUnit.test( 'Returns scrollable element (div#scrollable)', function( assert ) { + var scrollable = $('#scrollable').scrollable(); + assert.equal(scrollable.length, 1, 'One scrollable element is returned'); + assert.equal(scrollable[0].id, 'scrollable', 'Scrollable element is
'); +}); From f2b800cec21e9f0f56880e81088d071daa0bc3c6 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Tue, 8 Sep 2015 12:16:09 -0400 Subject: [PATCH 02/63] Remove smooth-scroll.jquery.json. No longer used. --- Gruntfile.js | 21 ++------------------- smooth-scroll.jquery.json | 33 --------------------------------- 2 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 smooth-scroll.jquery.json diff --git a/Gruntfile.js b/Gruntfile.js index 6e3e44e..6a81bcf 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -123,33 +123,16 @@ module.exports = function(grunt) { var pkg = grunt.file.readJSON('package.json'), pkgBasename = grunt.config('pluginName'), bowerFile = grunt.config('bower'), - bower = grunt.file.readJSON(bowerFile), - jqConfigFile = pkgBasename + '.jquery.json', - jqConfig = grunt.file.readJSON(jqConfigFile); + bower = grunt.file.readJSON(bowerFile); - ['main', 'version', 'dependencies', 'keywords'].forEach(function(el) { + ['main', 'dependencies', 'keywords'].forEach(function(el) { bower[el] = pkg[el]; - jqConfig[el] = pkg[el]; }); - ['author', 'repository', 'homepage', 'docs', 'bugs', 'demo', 'licenses'].forEach(function(el) { - jqConfig[el] = pkg[el]; - }); - - jqConfig.keywords.shift(); - - jqConfig.name = pkgBasename; bower.name = 'jquery-' + pkgBasename; grunt.file.write( bowerFile, JSON.stringify(bower, null, 2) + '\n'); grunt.log.writeln( 'File "' + bowerFile + '" updated."' ); - - while ( /jquery/i.test(jqConfig.keywords[0]) ) { - jqConfig.keywords.shift(); - } - - grunt.file.write( jqConfigFile, JSON.stringify(jqConfig, null, 2) + '\n'); - grunt.log.writeln( 'File "' + jqConfigFile + '" updated."' ); }); grunt.registerTask('docs', 'Convert readme.md to html and concat with header and footer for index.html', function() { diff --git a/smooth-scroll.jquery.json b/smooth-scroll.jquery.json deleted file mode 100644 index bffc110..0000000 --- a/smooth-scroll.jquery.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "smooth-scroll", - "version": "1.5.5", - "title": "Smooth Scroll", - "description": "Easy implementation of smooth scrolling for same-page links", - "author": { - "name": "Karl Swedberg", - "email": "kswedberg@gmail.com", - "url": "http://www.learningjquery.com/" - }, - "repository": { - "type": "git", - "url": "https://github.com/kswedberg/jquery-smooth-scroll" - }, - "homepage": "https://github.com/kswedberg/jquery-smooth-scroll", - "docs": "https://github.com/kswedberg/jquery-smooth-scroll", - "bugs": "https://github.com/kswedberg/jquery-smooth-scroll/issues", - "demo": "http://plugins.learningjquery.com/smooth-scroll/demo/", - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/kswedberg/jquery-smooth-scroll/blob/master/LICENSE-MIT" - } - ], - "dependencies": { - "jquery": ">=1.3" - }, - "keywords": [ - "scroll", - "animation" - ], - "main": "jquery.smooth-scroll.js" -} From 6478c4367926bf17cc9ac4e86fb22374659eb30f Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Tue, 8 Sep 2015 12:18:21 -0400 Subject: [PATCH 03/63] Add check for `document.scrollingElement` * See https://dev.opera.com/articles/fixing-the-scrolltop-bug/ --- jquery.smooth-scroll.js | 17 +++++++++++++---- jquery.smooth-scroll.min.js | 4 ++-- package.json | 2 +- src/jquery.smooth-scroll.js | 15 ++++++++++++--- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index 0ecc899..e95bb36 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ /*! - * jQuery Smooth Scroll - v1.5.5 - 2015-02-19 + * jQuery Smooth Scroll - v1.5.6 - 2015-09-08 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2015 Karl Swedberg * Licensed MIT (https://github.com/kswedberg/jquery-smooth-scroll/blob/master/LICENSE-MIT) @@ -18,7 +18,7 @@ } }(function ($) { - var version = '1.5.5', + var version = '1.5.6', optionOverrides = {}, defaults = { exclude: [], @@ -58,9 +58,18 @@ dir = opts.dir && opts.dir === 'left' ? 'scrollLeft' : 'scrollTop'; this.each(function() { - - if (this === document || this === window) { return; } var el = $(this); + + if (this === document || this === window) { + return; + } + + if ( document.scrollingElement && (this === document.documentElement || this === document.body) ) { + scrollable.push(document.scrollingElement); + + return false; + } + if ( el[dir]() > 0 ) { scrollable.push(this); } else { diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index a2b55a5..2e70391 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,7 +1,7 @@ /*! - * jQuery Smooth Scroll - v1.5.5 - 2015-02-19 + * jQuery Smooth Scroll - v1.5.6 - 2015-09-08 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2015 Karl Swedberg * Licensed MIT (https://github.com/kswedberg/jquery-smooth-scroll/blob/master/LICENSE-MIT) */ -(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?t(require("jquery")):t(jQuery)})(function(t){function e(t){return t.replace(/(:|\.|\/)/g,"\\$1")}var l="1.5.5",o={},n={exclude:[],excludeWithin:[],offset:0,direction:"top",scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},s=function(e){var l=[],o=!1,n=e.dir&&"left"===e.dir?"scrollLeft":"scrollTop";return this.each(function(){if(this!==document&&this!==window){var e=t(this);e[n]()>0?l.push(this):(e[n](1),o=e[n]()>0,o&&l.push(this),e[n](0))}}),l.length||this.each(function(){"BODY"===this.nodeName&&(l=[this])}),"first"===e.el&&l.length>1&&(l=[l[0]]),l};t.fn.extend({scrollable:function(t){var e=s.call(this,{dir:t});return this.pushStack(e)},firstScrollable:function(t){var e=s.call(this,{el:"first",dir:t});return this.pushStack(e)},smoothScroll:function(l,o){if(l=l||{},"options"===l)return o?this.each(function(){var e=t(this),l=t.extend(e.data("ssOpts")||{},o);t(this).data("ssOpts",l)}):this.first().data("ssOpts");var n=t.extend({},t.fn.smoothScroll.defaults,l),s=t.smoothScroll.filterPath(location.pathname);return this.unbind("click.smoothscroll").bind("click.smoothscroll",function(l){var o=this,r=t(this),i=t.extend({},n,r.data("ssOpts")||{}),c=n.exclude,a=i.excludeWithin,f=0,h=0,u=!0,d={},p=location.hostname===o.hostname||!o.hostname,m=i.scrollTarget||t.smoothScroll.filterPath(o.pathname)===s,S=e(o.hash);if(i.scrollTarget||p&&m&&S){for(;u&&c.length>f;)r.is(e(c[f++]))&&(u=!1);for(;u&&a.length>h;)r.closest(a[h++]).length&&(u=!1)}else u=!1;u&&(i.preventDefault&&l.preventDefault(),t.extend(d,i,{scrollTarget:i.scrollTarget||S,link:o}),t.smoothScroll(d))}),this}}),t.smoothScroll=function(e,l){if("options"===e&&"object"==typeof l)return t.extend(o,l);var n,s,r,i,c,a=0,f="offset",h="scrollTop",u={},d={};"number"==typeof e?(n=t.extend({link:null},t.fn.smoothScroll.defaults,o),r=e):(n=t.extend({link:null},t.fn.smoothScroll.defaults,e||{},o),n.scrollElement&&(f="position","static"===n.scrollElement.css("position")&&n.scrollElement.css("position","relative"))),h="left"===n.direction?"scrollLeft":h,n.scrollElement?(s=n.scrollElement,/^(?:HTML|BODY)$/.test(s[0].nodeName)||(a=s[h]())):s=t("html, body").firstScrollable(n.direction),n.beforeScroll.call(s,n),r="number"==typeof e?e:l||t(n.scrollTarget)[f]()&&t(n.scrollTarget)[f]()[n.direction]||0,u[h]=r+a+n.offset,i=n.speed,"auto"===i&&(c=u[h]-s.scrollTop(),0>c&&(c*=-1),i=c/n.autoCoefficient),d={duration:i,easing:n.easing,complete:function(){n.afterScroll.call(n.link,n)}},n.step&&(d.step=n.step),s.length?s.stop().animate(u,d):n.afterScroll.call(n.link,n)},t.smoothScroll.version=l,t.smoothScroll.filterPath=function(t){return t=t||"",t.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},t.fn.smoothScroll.defaults=n}); \ No newline at end of file +(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?t(require("jquery")):t(jQuery)})(function(t){function e(t){return t.replace(/(:|\.|\/)/g,"\\$1")}var l="1.5.6",o={},n={exclude:[],excludeWithin:[],offset:0,direction:"top",scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},s=function(e){var l=[],o=!1,n=e.dir&&"left"===e.dir?"scrollLeft":"scrollTop";return this.each(function(){var e=t(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?(e[n]()>0?l.push(this):(e[n](1),o=e[n]()>0,o&&l.push(this),e[n](0)),void 0):(l.push(document.scrollingElement),!1)}),l.length||this.each(function(){"BODY"===this.nodeName&&(l=[this])}),"first"===e.el&&l.length>1&&(l=[l[0]]),l};t.fn.extend({scrollable:function(t){var e=s.call(this,{dir:t});return this.pushStack(e)},firstScrollable:function(t){var e=s.call(this,{el:"first",dir:t});return this.pushStack(e)},smoothScroll:function(l,o){if(l=l||{},"options"===l)return o?this.each(function(){var e=t(this),l=t.extend(e.data("ssOpts")||{},o);t(this).data("ssOpts",l)}):this.first().data("ssOpts");var n=t.extend({},t.fn.smoothScroll.defaults,l),s=t.smoothScroll.filterPath(location.pathname);return this.unbind("click.smoothscroll").bind("click.smoothscroll",function(l){var o=this,r=t(this),i=t.extend({},n,r.data("ssOpts")||{}),c=n.exclude,a=i.excludeWithin,f=0,u=0,h=!0,d={},m=location.hostname===o.hostname||!o.hostname,p=i.scrollTarget||t.smoothScroll.filterPath(o.pathname)===s,g=e(o.hash);if(i.scrollTarget||m&&p&&g){for(;h&&c.length>f;)r.is(e(c[f++]))&&(h=!1);for(;h&&a.length>u;)r.closest(a[u++]).length&&(h=!1)}else h=!1;h&&(i.preventDefault&&l.preventDefault(),t.extend(d,i,{scrollTarget:i.scrollTarget||g,link:o}),t.smoothScroll(d))}),this}}),t.smoothScroll=function(e,l){if("options"===e&&"object"==typeof l)return t.extend(o,l);var n,s,r,i,c,a=0,f="offset",u="scrollTop",h={},d={};"number"==typeof e?(n=t.extend({link:null},t.fn.smoothScroll.defaults,o),r=e):(n=t.extend({link:null},t.fn.smoothScroll.defaults,e||{},o),n.scrollElement&&(f="position","static"===n.scrollElement.css("position")&&n.scrollElement.css("position","relative"))),u="left"===n.direction?"scrollLeft":u,n.scrollElement?(s=n.scrollElement,/^(?:HTML|BODY)$/.test(s[0].nodeName)||(a=s[u]())):s=t("html, body").firstScrollable(n.direction),n.beforeScroll.call(s,n),r="number"==typeof e?e:l||t(n.scrollTarget)[f]()&&t(n.scrollTarget)[f]()[n.direction]||0,h[u]=r+a+n.offset,i=n.speed,"auto"===i&&(c=h[u]-s.scrollTop(),0>c&&(c*=-1),i=c/n.autoCoefficient),d={duration:i,easing:n.easing,complete:function(){n.afterScroll.call(n.link,n)}},n.step&&(d.step=n.step),s.length?s.stop().animate(h,d):n.afterScroll.call(n.link,n)},t.smoothScroll.version=l,t.smoothScroll.filterPath=function(t){return t=t||"",t.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},t.fn.smoothScroll.defaults=n}); \ No newline at end of file diff --git a/package.json b/package.json index a07e495..2a8c4c3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jquery-smooth-scroll", "title": "jQuery Smooth Scroll", - "version": "1.5.5", + "version": "1.5.6", "scripts": {}, "main": "jquery.smooth-scroll.js", "author": { diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index 28ac4db..722bc8f 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ (function($) { - var version = '1.5.5', + var version = '1.5.6', optionOverrides = {}, defaults = { exclude: [], @@ -39,9 +39,18 @@ dir = opts.dir && opts.dir === 'left' ? 'scrollLeft' : 'scrollTop'; this.each(function() { - - if (this === document || this === window) { return; } var el = $(this); + + if (this === document || this === window) { + return; + } + + if ( document.scrollingElement && (this === document.documentElement || this === document.body) ) { + scrollable.push(document.scrollingElement); + + return false; + } + if ( el[dir]() > 0 ) { scrollable.push(this); } else { From ba978e149e0f7db2a56574faed57ef9e23b1c4b0 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 15 Nov 2015 15:30:36 -0500 Subject: [PATCH 04/63] Bower is dead. Long live npm. --- Gruntfile.js | 35 +++++++++-------------------------- bower.json | 20 -------------------- readme.md | 6 ------ 3 files changed, 9 insertions(+), 52 deletions(-) delete mode 100644 bower.json diff --git a/Gruntfile.js b/Gruntfile.js index 6a81bcf..8177b45 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,7 +18,6 @@ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pluginName: 'smooth-scroll', - bower: './bower.json', pkg: grunt.file.readJSON('package.json'), meta: { banner: '/*!<%= "\\n" %>' + @@ -32,7 +31,7 @@ module.exports = function(grunt) { '<%= "\\n" %>' + ' */' + '<%= "\\n\\n" %>' }, - concat: { + concat: { all: { src: ['src/jquery.<%= pluginName %>.js'], dest: 'jquery.<%= pluginName %>.js' @@ -41,8 +40,8 @@ module.exports = function(grunt) { stripBanners: true, banner: '<%= meta.banner %>', process: function(src) { - var umdHead = grunt.file.read('lib/tmpl/umdhead.tpl'), - umdFoot = grunt.file.read('lib/tmpl/umdfoot.tpl'); + var umdHead = grunt.file.read('lib/tmpl/umdhead.tpl'); + var umdFoot = grunt.file.read('lib/tmpl/umdfoot.tpl'); src = src .replace('(function($) {', umdHead) @@ -119,33 +118,17 @@ module.exports = function(grunt) { } }); - grunt.registerTask( 'configs', 'Update json configs based on package.json', function() { - var pkg = grunt.file.readJSON('package.json'), - pkgBasename = grunt.config('pluginName'), - bowerFile = grunt.config('bower'), - bower = grunt.file.readJSON(bowerFile); - - ['main', 'dependencies', 'keywords'].forEach(function(el) { - bower[el] = pkg[el]; - }); - - bower.name = 'jquery-' + pkgBasename; - - grunt.file.write( bowerFile, JSON.stringify(bower, null, 2) + '\n'); - grunt.log.writeln( 'File "' + bowerFile + '" updated."' ); - }); - grunt.registerTask('docs', 'Convert readme.md to html and concat with header and footer for index.html', function() { - var readme = grunt.file.read('readme.md'), - head = grunt.template.process( grunt.file.read('lib/tmpl/header.tpl') ), - foot = grunt.file.read('lib/tmpl/footer.tpl'), - doc = marked(readme); + var readme = grunt.file.read('readme.md'); + var head = grunt.template.process(grunt.file.read('lib/tmpl/header.tpl')); + var foot = grunt.file.read('lib/tmpl/footer.tpl'); + var doc = marked(readme); grunt.file.write('index.html', head + doc + foot); }); - grunt.registerTask('build', ['jshint', 'concat', 'version:same', 'configs', 'uglify', 'docs']); - grunt.registerTask('patch', ['jshint', 'concat', 'version:bannerPatch', 'version:patch', 'configs', 'uglify']); + grunt.registerTask('build', ['jshint', 'concat', 'version:same', 'uglify', 'docs']); + grunt.registerTask('patch', ['jshint', 'concat', 'version:bannerPatch', 'version:patch', 'uglify']); grunt.registerTask('default', ['build']); grunt.loadNpmTasks('grunt-contrib-jshint'); diff --git a/bower.json b/bower.json deleted file mode 100644 index 46ac35e..0000000 --- a/bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "jquery-smooth-scroll", - "dependencies": { - "jquery": ">=1.3" - }, - "main": "jquery.smooth-scroll.js", - "ignore": [ - "demo/", - "lib/", - "src/", - "Gruntfile.js", - "package.json", - "smooth-scroll.jquery.json" - ], - "keywords": [ - "jquery-plugin", - "scroll", - "animation" - ] -} diff --git a/readme.md b/readme.md index b1de8f0..3a15ac9 100644 --- a/readme.md +++ b/readme.md @@ -12,12 +12,6 @@ Using npm: npm install jquery-smooth-scroll ``` -Using bower: - -```bash -bower install jquery-smooth-scroll -``` - The old-fashioned way: Go to the following URL in your browser and copy/paste the code into your own file: From adcccaa06fafbc2e8628739089d88210b4494b48 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Wed, 16 Dec 2015 08:13:32 -0500 Subject: [PATCH 05/63] Ensure variable [scrollDir]() is used, not scrollTop(). Use Math.ab() instead of multiply by -1 if negative. --- jquery.smooth-scroll.js | 9 +++------ jquery.smooth-scroll.min.js | 4 ++-- package.json | 2 +- src/jquery.smooth-scroll.js | 7 ++----- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index e95bb36..c291db6 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ /*! - * jQuery Smooth Scroll - v1.5.6 - 2015-09-08 + * jQuery Smooth Scroll - v1.5.6 - 2015-12-14 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2015 Karl Swedberg * Licensed MIT (https://github.com/kswedberg/jquery-smooth-scroll/blob/master/LICENSE-MIT) @@ -231,12 +231,9 @@ // automatically calculate the speed of the scroll based on distance / coefficient if (speed === 'auto') { - // $scroller.scrollTop() is position before scroll, aniProps[scrollDir] is position after + // $scroller[scrollDir]() is position before scroll, aniProps[scrollDir] is position after // When delta is greater, speed will be greater. - delta = aniProps[scrollDir] - $scroller.scrollTop(); - if(delta < 0) { - delta *= -1; - } + delta = Math.abs(aniProps[scrollDir] - $scroller[scrollDir]()); // Divide the delta by the coefficient speed = delta / opts.autoCoefficient; diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index 2e70391..1d99cdc 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,7 +1,7 @@ /*! - * jQuery Smooth Scroll - v1.5.6 - 2015-09-08 + * jQuery Smooth Scroll - v1.5.6 - 2015-12-14 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2015 Karl Swedberg * Licensed MIT (https://github.com/kswedberg/jquery-smooth-scroll/blob/master/LICENSE-MIT) */ -(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?t(require("jquery")):t(jQuery)})(function(t){function e(t){return t.replace(/(:|\.|\/)/g,"\\$1")}var l="1.5.6",o={},n={exclude:[],excludeWithin:[],offset:0,direction:"top",scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},s=function(e){var l=[],o=!1,n=e.dir&&"left"===e.dir?"scrollLeft":"scrollTop";return this.each(function(){var e=t(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?(e[n]()>0?l.push(this):(e[n](1),o=e[n]()>0,o&&l.push(this),e[n](0)),void 0):(l.push(document.scrollingElement),!1)}),l.length||this.each(function(){"BODY"===this.nodeName&&(l=[this])}),"first"===e.el&&l.length>1&&(l=[l[0]]),l};t.fn.extend({scrollable:function(t){var e=s.call(this,{dir:t});return this.pushStack(e)},firstScrollable:function(t){var e=s.call(this,{el:"first",dir:t});return this.pushStack(e)},smoothScroll:function(l,o){if(l=l||{},"options"===l)return o?this.each(function(){var e=t(this),l=t.extend(e.data("ssOpts")||{},o);t(this).data("ssOpts",l)}):this.first().data("ssOpts");var n=t.extend({},t.fn.smoothScroll.defaults,l),s=t.smoothScroll.filterPath(location.pathname);return this.unbind("click.smoothscroll").bind("click.smoothscroll",function(l){var o=this,r=t(this),i=t.extend({},n,r.data("ssOpts")||{}),c=n.exclude,a=i.excludeWithin,f=0,u=0,h=!0,d={},m=location.hostname===o.hostname||!o.hostname,p=i.scrollTarget||t.smoothScroll.filterPath(o.pathname)===s,g=e(o.hash);if(i.scrollTarget||m&&p&&g){for(;h&&c.length>f;)r.is(e(c[f++]))&&(h=!1);for(;h&&a.length>u;)r.closest(a[u++]).length&&(h=!1)}else h=!1;h&&(i.preventDefault&&l.preventDefault(),t.extend(d,i,{scrollTarget:i.scrollTarget||g,link:o}),t.smoothScroll(d))}),this}}),t.smoothScroll=function(e,l){if("options"===e&&"object"==typeof l)return t.extend(o,l);var n,s,r,i,c,a=0,f="offset",u="scrollTop",h={},d={};"number"==typeof e?(n=t.extend({link:null},t.fn.smoothScroll.defaults,o),r=e):(n=t.extend({link:null},t.fn.smoothScroll.defaults,e||{},o),n.scrollElement&&(f="position","static"===n.scrollElement.css("position")&&n.scrollElement.css("position","relative"))),u="left"===n.direction?"scrollLeft":u,n.scrollElement?(s=n.scrollElement,/^(?:HTML|BODY)$/.test(s[0].nodeName)||(a=s[u]())):s=t("html, body").firstScrollable(n.direction),n.beforeScroll.call(s,n),r="number"==typeof e?e:l||t(n.scrollTarget)[f]()&&t(n.scrollTarget)[f]()[n.direction]||0,h[u]=r+a+n.offset,i=n.speed,"auto"===i&&(c=h[u]-s.scrollTop(),0>c&&(c*=-1),i=c/n.autoCoefficient),d={duration:i,easing:n.easing,complete:function(){n.afterScroll.call(n.link,n)}},n.step&&(d.step=n.step),s.length?s.stop().animate(h,d):n.afterScroll.call(n.link,n)},t.smoothScroll.version=l,t.smoothScroll.filterPath=function(t){return t=t||"",t.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},t.fn.smoothScroll.defaults=n}); \ No newline at end of file +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){function b(a){return a.replace(/(:|\.|\/)/g,"\\$1")}var c="1.5.6",d={},e={exclude:[],excludeWithin:[],offset:0,direction:"top",scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},f=function(b){var c=[],d=!1,e=b.dir&&"left"===b.dir?"scrollLeft":"scrollTop";return this.each(function(){var b=a(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(b[e]()>0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){"BODY"===this.nodeName&&(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=f.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=f.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(c,d){if(c=c||{},"options"===c)return d?this.each(function(){var b=a(this),c=a.extend(b.data("ssOpts")||{},d);a(this).data("ssOpts",c)}):this.first().data("ssOpts");var e=a.extend({},a.fn.smoothScroll.defaults,c),f=a.smoothScroll.filterPath(location.pathname);return this.unbind("click.smoothscroll").bind("click.smoothscroll",function(c){var d=this,g=a(this),h=a.extend({},e,g.data("ssOpts")||{}),i=e.exclude,j=h.excludeWithin,k=0,l=0,m=!0,n={},o=location.hostname===d.hostname||!d.hostname,p=h.scrollTarget||a.smoothScroll.filterPath(d.pathname)===f,q=b(d.hash);if(h.scrollTarget||o&&p&&q){for(;m&&k< 0) { - delta *= -1; - } + delta = Math.abs(aniProps[scrollDir] - $scroller[scrollDir]()); // Divide the delta by the coefficient speed = delta / opts.autoCoefficient; From e3819408685c6ca3c9d295a21f79f85466bcb8a3 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Wed, 16 Dec 2015 08:22:25 -0500 Subject: [PATCH 06/63] Release 1.5.7 --- jquery.smooth-scroll.js | 4 ++-- jquery.smooth-scroll.min.js | 4 ++-- package.json | 2 +- src/jquery.smooth-scroll.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index c291db6..f1508e8 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ /*! - * jQuery Smooth Scroll - v1.5.6 - 2015-12-14 + * jQuery Smooth Scroll - v1.5.7 - 2015-12-16 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2015 Karl Swedberg * Licensed MIT (https://github.com/kswedberg/jquery-smooth-scroll/blob/master/LICENSE-MIT) @@ -18,7 +18,7 @@ } }(function ($) { - var version = '1.5.6', + var version = '1.5.7', optionOverrides = {}, defaults = { exclude: [], diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index 1d99cdc..2dc83a2 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,7 +1,7 @@ /*! - * jQuery Smooth Scroll - v1.5.6 - 2015-12-14 + * jQuery Smooth Scroll - v1.5.7 - 2015-12-16 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2015 Karl Swedberg * Licensed MIT (https://github.com/kswedberg/jquery-smooth-scroll/blob/master/LICENSE-MIT) */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){function b(a){return a.replace(/(:|\.|\/)/g,"\\$1")}var c="1.5.6",d={},e={exclude:[],excludeWithin:[],offset:0,direction:"top",scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},f=function(b){var c=[],d=!1,e=b.dir&&"left"===b.dir?"scrollLeft":"scrollTop";return this.each(function(){var b=a(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(b[e]()>0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){"BODY"===this.nodeName&&(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=f.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=f.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(c,d){if(c=c||{},"options"===c)return d?this.each(function(){var b=a(this),c=a.extend(b.data("ssOpts")||{},d);a(this).data("ssOpts",c)}):this.first().data("ssOpts");var e=a.extend({},a.fn.smoothScroll.defaults,c),f=a.smoothScroll.filterPath(location.pathname);return this.unbind("click.smoothscroll").bind("click.smoothscroll",function(c){var d=this,g=a(this),h=a.extend({},e,g.data("ssOpts")||{}),i=e.exclude,j=h.excludeWithin,k=0,l=0,m=!0,n={},o=location.hostname===d.hostname||!d.hostname,p=h.scrollTarget||a.smoothScroll.filterPath(d.pathname)===f,q=b(d.hash);if(h.scrollTarget||o&&p&&q){for(;m&&k0?l.push(this):(e[n](1),o=e[n]()>0,o&&l.push(this),e[n](0)),void 0):(l.push(document.scrollingElement),!1)}),l.length||this.each(function(){"BODY"===this.nodeName&&(l=[this])}),"first"===e.el&&l.length>1&&(l=[l[0]]),l};t.fn.extend({scrollable:function(t){var e=s.call(this,{dir:t});return this.pushStack(e)},firstScrollable:function(t){var e=s.call(this,{el:"first",dir:t});return this.pushStack(e)},smoothScroll:function(l,o){if(l=l||{},"options"===l)return o?this.each(function(){var e=t(this),l=t.extend(e.data("ssOpts")||{},o);t(this).data("ssOpts",l)}):this.first().data("ssOpts");var n=t.extend({},t.fn.smoothScroll.defaults,l),s=t.smoothScroll.filterPath(location.pathname);return this.unbind("click.smoothscroll").bind("click.smoothscroll",function(l){var o=this,r=t(this),i=t.extend({},n,r.data("ssOpts")||{}),c=n.exclude,a=i.excludeWithin,f=0,u=0,h=!0,d={},m=location.hostname===o.hostname||!o.hostname,p=i.scrollTarget||t.smoothScroll.filterPath(o.pathname)===s,g=e(o.hash);if(i.scrollTarget||m&&p&&g){for(;h&&c.length>f;)r.is(e(c[f++]))&&(h=!1);for(;h&&a.length>u;)r.closest(a[u++]).length&&(h=!1)}else h=!1;h&&(i.preventDefault&&l.preventDefault(),t.extend(d,i,{scrollTarget:i.scrollTarget||g,link:o}),t.smoothScroll(d))}),this}}),t.smoothScroll=function(e,l){if("options"===e&&"object"==typeof l)return t.extend(o,l);var n,s,r,i,c,a=0,f="offset",u="scrollTop",h={},d={};"number"==typeof e?(n=t.extend({link:null},t.fn.smoothScroll.defaults,o),r=e):(n=t.extend({link:null},t.fn.smoothScroll.defaults,e||{},o),n.scrollElement&&(f="position","static"===n.scrollElement.css("position")&&n.scrollElement.css("position","relative"))),u="left"===n.direction?"scrollLeft":u,n.scrollElement?(s=n.scrollElement,/^(?:HTML|BODY)$/.test(s[0].nodeName)||(a=s[u]())):s=t("html, body").firstScrollable(n.direction),n.beforeScroll.call(s,n),r="number"==typeof e?e:l||t(n.scrollTarget)[f]()&&t(n.scrollTarget)[f]()[n.direction]||0,h[u]=r+a+n.offset,i=n.speed,"auto"===i&&(c=Math.abs(h[u]-s[u]()),i=c/n.autoCoefficient),d={duration:i,easing:n.easing,complete:function(){n.afterScroll.call(n.link,n)}},n.step&&(d.step=n.step),s.length?s.stop().animate(h,d):n.afterScroll.call(n.link,n)},t.smoothScroll.version=l,t.smoothScroll.filterPath=function(t){return t=t||"",t.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},t.fn.smoothScroll.defaults=n}); diff --git a/package.json b/package.json index 7fdbb27..3c03f4e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jquery-smooth-scroll", "title": "jQuery Smooth Scroll", - "version": "1.5.6", + "version": "1.5.7", "scripts": {}, "main": "jquery.smooth-scroll.js", "author": { diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index 3035fb9..63a3437 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ (function($) { - var version = '1.5.6', + var version = '1.5.7', optionOverrides = {}, defaults = { exclude: [], From 9f34a80041d082c4d8344a0a8183b014cf378000 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Tue, 22 Dec 2015 08:11:18 -0500 Subject: [PATCH 07/63] Add optional support for event delegation --- src/jquery.smooth-scroll.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index 63a3437..3e4c75e 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -3,12 +3,16 @@ optionOverrides = {}, defaults = { exclude: [], - excludeWithin:[], + excludeWithin: [], offset: 0, // one of 'top' or 'left' direction: 'top', + // if set, bind click events through delegation + // supported since jQuery 1.4.2 + delegateSelector: null, + // jQuery set of elements you wish to scroll (for $.smoothScroll). // if null (default), $('html, body').firstScrollable() is used. scrollElement: null, @@ -113,9 +117,7 @@ var opts = $.extend({}, $.fn.smoothScroll.defaults, options), locationPath = $.smoothScroll.filterPath(location.pathname); - this - .unbind('click.smoothscroll') - .bind('click.smoothscroll', function(event) { + var clickHandler = function(event) { var link = this, $link = $(this), thisOpts = $.extend({}, opts, $link.data('ssOpts') || {}), @@ -156,7 +158,17 @@ $.smoothScroll( clickOpts ); } - }); + }; + + if (options.delegateSelector !== null) { + this + .undelegate(options.delegateSelector, 'click.smoothscroll') + .delegate(options.delegateSelector, 'click.smoothscroll', clickHandler); + } else { + this + .unbind('click.smoothscroll') + .bind('click.smoothscroll', clickHandler); + } return this; } From dfe6c9e8864768170c3511d138a6d2b0646cb80e Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Tue, 22 Dec 2015 08:48:26 -0500 Subject: [PATCH 08/63] Update docs and minor bump --- Gruntfile.js | 4 +--- demo/index.html | 7 ++++++- index.html | 11 ++++------- jquery.smooth-scroll.js | 28 ++++++++++++++++++++-------- jquery.smooth-scroll.min.js | 6 +++--- package.json | 11 +++-------- readme.md | 3 +++ src/jquery.smooth-scroll.js | 2 +- 8 files changed, 41 insertions(+), 31 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8177b45..6b3d26d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -26,8 +26,7 @@ module.exports = function(grunt) { '<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' + ' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>' + '<%= "\\n" %>' + - ' * Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>' + - ' (<%= _.pluck(pkg.licenses, "url").join(", ") %>)' + + ' * Licensed <%= pkg.license %>' + '<%= "\\n" %>' + ' */' + '<%= "\\n\\n" %>' }, @@ -97,7 +96,6 @@ module.exports = function(grunt) { patch: { src: [ 'package.json', - '<%= pluginName %>.jquery.json', 'src/jquery.<%= pluginName %>.js', 'jquery.<%= pluginName %>.js' ], diff --git a/demo/index.html b/demo/index.html index 6f1d44e..88a4924 100644 --- a/demo/index.html +++ b/demo/index.html @@ -4,6 +4,9 @@ Smooth Scroll jQuery Plugin Demo + + +

Smooth Scroll jQuery Plugin with Back Button Support

+
+ +

p1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

p2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ back to nav +

p3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ back to nav +

p4 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ back to nav +

p5 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ back to nav +

p6 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ back to nav + +
+ + + + + + diff --git a/demo/index.html b/demo/index.html index 88a4924..02b5292 100644 --- a/demo/index.html +++ b/demo/index.html @@ -45,28 +45,29 @@ }); }); - $('#change-speed').on('click', function() { - var $p1 = $('ul.mainnav a').first(), - p1Opts = $p1.smoothScroll('options') || {}; + $('#change-speed').bind('click', function() { + var $p1 = $('ul.mainnav a').first(); + var p1Opts = $p1.smoothScroll('options') || {}; p1Opts.speed = p1Opts.speed === 1400 ? 400 : 1400; $p1.smoothScroll('options', p1Opts); }); - $('button.scrollsomething').click(function() { + $('button.scrollsomething').bind('click', function(event) { + event.preventDefault(); $.smoothScroll({ scrollElement: $('div.scrollme'), scrollTarget: '#findme' }); - return false; }); - $('button.scrollhorz').click(function() { + $('button.scrollhorz').bind('click', function(event) { + event.preventDefault(); $.smoothScroll({ direction: 'left', scrollElement: $('div.scrollme'), scrollTarget: '.horiz' }); - return false; + }); }); @@ -84,7 +85,8 @@
  • p5
  • bbq.html#p5
  • -

    Or, try it with hashchange support

    +

    Try it with jQuery BBQ hashchange support

    +

    Or, native hashchange support (IE9+)

    Toggle scrolling speed for the p1 link

    diff --git a/demo/scroll-behavior-smooth.html b/demo/scroll-behavior-smooth.html new file mode 100644 index 0000000..3379bcb --- /dev/null +++ b/demo/scroll-behavior-smooth.html @@ -0,0 +1,134 @@ + + + + + Smooth Scroll jQuery Plugin Demo + + + + + + + +
    +

    Scroll the Document to one of the following paragraphs:

    + +

    Or, try it with hashchange support

    +

    Toggle scrolling speed for the p1 link

    + + + +
    +
    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

    +
    + You found me by scrolling horizontally. nice job! +
    +
    +

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

    +

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

    +
    +

    YOU FOUND ME! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

    +
    + You scrolled horizontally and vertically. Awesome! +
    +
    +

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

    +

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

    +
    + +

    p1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +

    p2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +

    p3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +

    p4 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +

    p5 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +

    p6 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    + + +
    + + From 3064e264d8426ea5faed902cf8a207f1beba7b8f Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sat, 16 Jan 2016 15:42:08 -0500 Subject: [PATCH 17/63] Fix uglifying. --- Gruntfile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index bafd536..083776e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -56,7 +56,8 @@ module.exports = function(grunt) { 'jquery.<%= pluginName %>.min.js': ['<%= concat.all.dest %>'] }, options: { - preserveComments: 'some' + banner: '<%= meta.banner %>', + // preserveComments: /\/\*[\s\S]*/ } } }, From bf6705fa967601181a0fa80b5baddf352b041721 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sat, 16 Jan 2016 15:42:33 -0500 Subject: [PATCH 18/63] Build and bump to 1.6.2. --- index.html | 15 ++++++++++---- jquery.smooth-scroll.js | 25 +++++++++++++++-------- jquery.smooth-scroll.min.js | 40 ++++--------------------------------- package.json | 2 +- src/jquery.smooth-scroll.js | 2 +- 5 files changed, 34 insertions(+), 50 deletions(-) diff --git a/index.html b/index.html index e6a5401..130b13a 100644 --- a/index.html +++ b/index.html @@ -77,7 +77,7 @@

    Smooth Scroll Plugin

    NPM

    Download

    Using npm:

    -
    1
    npm install jquery-smooth-scroll
    +
    1
    npm install jquery-smooth-scroll

    The old-fashioned way:

    Go to the following URL in your browser and copy/paste the code into your own file: @@ -98,7 +98,7 @@

    $.fn.smoothScroll

    Options

    The following options, shown with their default values, are available for both $.fn.smoothScroll and $.smoothScroll:

    -
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    {
      offset: 0,
     
      // one of 'top' or 'left'
      direction: 'top',
     
      // only use if you want to override default behavior
      scrollTarget: null,
     
      // string to use as selector for event delegation (Requires jQuery >=1.4.2)
      delegateSelector: null,
     
      // fn(opts) function to be called before scrolling occurs.
      // `this` is the element(s) being scrolled
      beforeScroll: function() {},
     
      // fn(opts) function to be called after scrolling occurs.
      // `this` is the triggering element
      afterScroll: function() {},
      easing: 'swing',
     
      // speed can be a number or 'auto'
      // if 'auto', the speed will be calculated based on the formula:
      // (current scroll position - target scroll position) / autoCoeffic
      speed: 400,
     
      // autoCoefficent: Only used when speed set to "auto".
      // The higher this number, the faster the scroll speed
      autoCoefficient: 2,
     
      // $.fn.smoothScroll only: whether to prevent the default click action
      preventDefault: true
     
    }
    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    {
      offset: 0,
     
      // one of 'top' or 'left'
      direction: 'top',
     
      // only use if you want to override default behavior
      scrollTarget: null,
     
      // string to use as selector for event delegation (Requires jQuery >=1.4.2)
      delegateSelector: null,
     
      // fn(opts) function to be called before scrolling occurs.
      // `this` is the element(s) being scrolled
      beforeScroll: function() {},
     
      // fn(opts) function to be called after scrolling occurs.
      // `this` is the triggering element
      afterScroll: function() {},
      easing: 'swing',
     
      // speed can be a number or 'auto'
      // if 'auto', the speed will be calculated based on the formula:
      // (current scroll position - target scroll position) / autoCoeffic
      speed: 400,
     
      // autoCoefficent: Only used when speed set to "auto".
      // The higher this number, the faster the scroll speed
      autoCoefficient: 2,
     
      // $.fn.smoothScroll only: whether to prevent the default click action
      preventDefault: true
     
    }

    The options object for $.fn.smoothScroll can take two additional properties: exclude and excludeWithin. The value for both of these is an array of @@ -115,7 +115,7 @@

    $.smoothScroll

    document.body)
  • Doesn't automatically fire, so you need to bind it to some other user interaction. For example:

    -
    1
    2
    3
    4
    5
    6
    7
    $('button.scrollsomething').on('click', function() {
      $.smoothScroll({
        scrollElement: $('div.scrollme'),
        scrollTarget: '#findme'
      });
      return false;
    });
    +
    1
    2
    3
    4
    5
    6
    7
    $('button.scrollsomething').on('click', function() {
      $.smoothScroll({
        scrollElement: $('div.scrollme'),
        scrollTarget: '#findme'
      });
      return false;
    });
  • The $.smoothScroll method can take one or two arguments.

      @@ -129,7 +129,7 @@

      $.smoothScroll

      Additional Option

      The following option, in addition to those listed for $.fn.smoothScroll above, is available for $.smoothScroll:

      -
      1
      2
      3
      4
      5
      {
        // jQuery set of elements you wish to scroll.
        //  if null (default), $('html, body').firstScrollable() is used.
        scrollElement: null
      }
      +
      1
      2
      3
      4
      5
      {
        // jQuery set of elements you wish to scroll.
        //  if null (default), $('html, body').firstScrollable() is used.
        scrollElement: null
      }

      $.fn.scrollable

        @@ -163,6 +163,13 @@

        Notes

        therefore, will be called against no elements (which, in most cases, means that nothing will happen).
      +

      Contributing

      +

      Thank you! Please consider the following when working on this repo before you submit a pull request:

      +
        +
      • For code changes, please work on the "source" file: src/jquery.smooth-scroll.js.
      • +
      • Style conventions are noted in the jshint grunt file options and the .jscsrc file. To be sure your additions comply, run grunt lint from the command line.
      • +
      • If possible, please use Tim Pope's git commit message style. Multiple commits in a pull request will be squashed into a single commit. I may adjust the message for clarity, style, or grammar. I manually commit all merged PRs using the --author flag to ensure that proper authorship (yours) is maintained.
      • +
      diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index e409a96..2e5f9ab 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,7 +1,7 @@ /*! - * jQuery Smooth Scroll - v1.6.1 - 2015-12-26 + * jQuery Smooth Scroll - v1.6.2 - 2016-01-16 * https://github.com/kswedberg/jquery-smooth-scroll - * Copyright (c) 2015 Karl Swedberg + * Copyright (c) 2016 Karl Swedberg * Licensed MIT */ @@ -18,7 +18,7 @@ } }(function($) { - var version = '1.6.1'; + var version = '1.6.2'; var optionOverrides = {}; var defaults = { exclude: [], @@ -89,13 +89,21 @@ } }); - // If no scrollable elements, fall back to , - // if it's in the jQuery collection - // (doing this because Safari sets scrollTop async, - // so can't set it to 1 and immediately get the value.) if (!scrollable.length) { this.each(function() { - if (this.nodeName === 'BODY') { + // If no scrollable elements and has scroll-behavior:smooth because + // "When this property is specified on the root element, it applies to the viewport instead." + // and "The scroll-behavior property of the … body element is *not* propagated to the viewport." + // → https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior + if (this === document.documentElement && $(this).css('scrollBehavior') === 'smooth') { + scrollable = [this]; + } + + // If still no scrollable elements, fall back to , + // if it's in the jQuery collection + // (doing this because Safari sets scrollTop async, + // so can't set it to 1 and immediately get the value.) + if (!scrollable.length && this.nodeName === 'BODY') { scrollable = [this]; } }); @@ -297,3 +305,4 @@ $.fn.smoothScroll.defaults = defaults; })); + diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index c4a3d13..921a61e 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,40 +1,8 @@ /*! - * jQuery Smooth Scroll - v1.6.1 - 2015-12-26 + * jQuery Smooth Scroll - v1.6.2 - 2016-01-16 * https://github.com/kswedberg/jquery-smooth-scroll - * Copyright (c) 2015 Karl Swedberg + * Copyright (c) 2016 Karl Swedberg * Licensed MIT */ -!function(a){"function"==typeof define&&define.amd? -// AMD. Register as an anonymous module. -define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){var b="1.6.1",c={},d={exclude:[],excludeWithin:[],offset:0, -// one of 'top' or 'left' -direction:"top", -// if set, bind click events through delegation -// supported since jQuery 1.4.2 -delegateSelector:null, -// jQuery set of elements you wish to scroll (for $.smoothScroll). -// if null (default), $('html, body').firstScrollable() is used. -scrollElement:null, -// only use if you want to override default behavior -scrollTarget:null, -// fn(opts) function to be called before scrolling occurs. -// `this` is the element(s) being scrolled -beforeScroll:function(){}, -// fn(opts) function to be called after scrolling occurs. -// `this` is the triggering element -afterScroll:function(){},easing:"swing",speed:400, -// coefficient for "auto" speed -autoCoefficient:2, -// $.fn.smoothScroll only: whether to prevent the default click action -preventDefault:!0},e=function(b){var c=[],d=!1,e=b.dir&&"left"===b.dir?"scrollLeft":"scrollTop"; -// If no scrollable elements, fall back to , -// if it's in the jQuery collection -// (doing this because Safari sets scrollTop async, -// so can't set it to 1 and immediately get the value.) -// Use the first scrollable element if we're calling firstScrollable() -return this.each(function(){var b=a(this);if(this!==document&&this!==window) -// if scroll(Top|Left) === 0, nudge the element 1px and see if it moves -// then put it back, of course -return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(b[e]()>0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){"BODY"===this.nodeName&&(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(g.scrollTarget||p&&q&&r){for(;l&&j0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(g.scrollTarget||p&&q&&r){for(;l&&j Date: Mon, 18 Jan 2016 08:02:11 -0500 Subject: [PATCH 19/63] Put Bower support (bower.json) back in. Fixes #91 --- Gruntfile.js | 20 ++++++++++++++++++++ bower.json | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 bower.json diff --git a/Gruntfile.js b/Gruntfile.js index 083776e..7b5ba73 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -130,6 +130,26 @@ module.exports = function(grunt) { grunt.file.write('index.html', head + doc + foot); }); + grunt.registerTask('updateBower', 'Update bower.json to match package.json', function() { + var pkg = require('./package.json'); + var props = ['name', 'main', 'homepage', 'repository', 'dependencies', 'keywords', 'license']; + var json = { + description: 'Easy implementation of smooth scrolling for same-page links' + }; + + props.forEach(function(item) { + if (pkg[item]) { + json[item] = pkg[item]; + } + }); + + json.authors = [pkg.author]; + json.moduleType = ['amd', 'node']; + json.ignore = ['demo/', 'lib/', 'src/', 'test/', '**/.*', 'Gruntfile.js', 'package.json']; + + grunt.file.write('bower.json', JSON.stringify(json, null, 2)); + }); + grunt.registerTask('lint', ['jshint', 'jscs']); grunt.registerTask('build', ['lint', 'concat', 'version', 'uglify', 'docs']); grunt.registerTask('patch', ['lint', 'concat', 'version::patch', 'uglify']); diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..0021198 --- /dev/null +++ b/bower.json @@ -0,0 +1,40 @@ +{ + "description": "Easy implementation of smooth scrolling for same-page links", + "name": "jquery-smooth-scroll", + "main": "jquery.smooth-scroll.js", + "homepage": "https://github.com/kswedberg/jquery-smooth-scroll", + "repository": { + "type": "git", + "url": "https://github.com/kswedberg/jquery-smooth-scroll" + }, + "dependencies": { + "jquery": ">=1.4.2" + }, + "keywords": [ + "jQuery", + "jquery-plugin", + "scroll", + "animation" + ], + "license": "MIT", + "authors": [ + { + "name": "Karl Swedberg", + "email": "kswedberg@gmail.com", + "url": "http://www.learningjquery.com/" + } + ], + "moduleType": [ + "amd", + "node" + ], + "ignore": [ + "demo/", + "lib/", + "src/", + "test/", + "**/.*", + "Gruntfile.js", + "package.json" + ] +} \ No newline at end of file From 6902687d40d21a46d26d24cdd46e0293ed4fd848 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Mon, 18 Jan 2016 08:38:31 -0500 Subject: [PATCH 20/63] Fix version from bad tag --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3a8cf0a..fe0f291 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jquery-smooth-scroll", "title": "jQuery Smooth Scroll", - "version": "1.6.2", + "version": "1.7.0", "scripts": {}, "main": "jquery.smooth-scroll.js", "author": { From b192367d731a75b041621977e97218172d8f3a17 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Mon, 18 Jan 2016 08:43:13 -0500 Subject: [PATCH 21/63] Bump for bower support and bad tag fix --- jquery.smooth-scroll.js | 5 ++--- jquery.smooth-scroll.min.js | 4 ++-- package.json | 2 +- src/jquery.smooth-scroll.js | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index 2e5f9ab..bbc9262 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ /*! - * jQuery Smooth Scroll - v1.6.2 - 2016-01-16 + * jQuery Smooth Scroll - v1.7.1 - 2016-01-18 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2016 Karl Swedberg * Licensed MIT @@ -18,7 +18,7 @@ } }(function($) { - var version = '1.6.2'; + var version = '1.7.1'; var optionOverrides = {}; var defaults = { exclude: [], @@ -305,4 +305,3 @@ $.fn.smoothScroll.defaults = defaults; })); - diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index 921a61e..337051c 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,8 +1,8 @@ /*! - * jQuery Smooth Scroll - v1.6.2 - 2016-01-16 + * jQuery Smooth Scroll - v1.7.1 - 2016-01-18 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2016 Karl Swedberg * Licensed MIT */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){var b="1.6.2",c={},d={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},e=function(b){var c=[],d=!1,e=b.dir&&"left"===b.dir?"scrollLeft":"scrollTop";return this.each(function(){var b=a(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(b[e]()>0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(g.scrollTarget||p&&q&&r){for(;l&&j0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(g.scrollTarget||p&&q&&r){for(;l&&j Date: Sat, 23 Jan 2016 15:45:39 -0500 Subject: [PATCH 22/63] Ensure links to nonexistent elements don't trigger scroll. Fixes #92. --- src/jquery.smooth-scroll.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index 486874c..54105e7 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -148,6 +148,10 @@ var pathMatch = thisOpts.scrollTarget || (linkPath === locationPath); var thisHash = escapeSelector(link.hash); + if (thisHash && !$(thisHash).length) { + include = false; + } + if (!thisOpts.scrollTarget && (!hostMatch || !pathMatch || !thisHash)) { include = false; } else { From baa0e68a56a69bac7555bda0bc09aa77f9fe40e0 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sat, 23 Jan 2016 15:47:36 -0500 Subject: [PATCH 23/63] Add link to nonexistent element to demo and tests for avoiding scroll (and for scroll). --- demo/index.html | 1 + test/index.html | 12 ++++++------ test/tests.js | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/demo/index.html b/demo/index.html index 02b5292..03ac6e6 100644 --- a/demo/index.html +++ b/demo/index.html @@ -83,6 +83,7 @@
    • p3
    • p4
    • p5
    • +
    • link to nowhere
    • bbq.html#p5

    Try it with jQuery BBQ hashchange support

    diff --git a/test/index.html b/test/index.html index 46c5fe1..9804f2c 100644 --- a/test/index.html +++ b/test/index.html @@ -10,6 +10,7 @@ width: 200px; } #scrollable { + border: 1px solid red; height: 200px; overflow: auto; } @@ -18,12 +19,11 @@
    - + go to one +
    -

    Bacon ipsum dolor amet andouille tri-tip salami frankfurter fatback venison. Cupim sausage rump boudin pork loin, salami kielbasa chuck jowl venison kevin prosciutto flank ribeye. Alcatra chuck sausage meatball beef ribs brisket biltong rump andouille tenderloin leberkas. Bacon andouille pork loin chuck shankle, ground round hamburger ham hock ball tip meatball sirloin drumstick flank kielbasa prosciutto.

    -

    Hamburger pig sausage, pancetta rump turducken shankle landjaeger pork belly bresaola jerky brisket leberkas porchetta swine. Pork shankle salami, sausage ham cupim andouille. Sirloin sausage jerky, leberkas chuck short ribs pancetta t-bone kielbasa strip steak prosciutto salami beef ribs frankfurter. Brisket doner andouille t-bone prosciutto short loin. Kielbasa tenderloin doner beef ribs shankle.

    -

    Kielbasa cupim boudin shank frankfurter. Short loin shank shankle sausage, salami pork loin leberkas biltong venison. Bresaola chuck chicken drumstick. Fatback cupim short ribs jerky brisket pancetta flank cow beef ribs salami capicola picanha rump short loin meatloaf. Corned beef meatloaf pork belly picanha alcatra pork chop.

    -

    Sirloin frankfurter tongue pork, filet mignon drumstick shankle beef ribs tri-tip turducken hamburger salami andouille meatloaf. Andouille landjaeger flank boudin beef short ribs brisket alcatra kielbasa ham pork loin pancetta. Pancetta tenderloin shoulder, porchetta tri-tip pastrami ham pork loin tail swine andouille. Sausage landjaeger strip steak tail corned beef biltong meatball picanha beef ribs swine kielbasa. T-bone tail rump kevin doner chuck. Prosciutto andouille pork loin shankle t-bone, turducken sirloin landjaeger pancetta picanha spare ribs filet mignon. Shank ham beef chuck salami tail t-bone shoulder beef ribs kevin.

    +
    big block
    +

    Sirloin frankfurter tongue pork, filet mignon drumstick shankle beef ribs tri-tip turducken hamburger salami andouille meatloaf. Andouille landjaeger flank boudin beef short ribs brisket alcatra kielbasa ham pork loin pancetta. Pancetta tenderloin shoulder, porchetta tri-tip pastrami ham pork loin tail swine andouille. Sausage landjaeger strip steak tail corned beef biltong meatball picanha beef ribs swine kielbasa. T-bone tail rump kevin doner chuck. Prosciutto andouille pork loin shankle t-bone, turducken sirloin landjaeger pancetta picanha spare ribs filet mignon. Shank ham beef chuck salami tail t-bone shoulder beef ribs kevin.

    Bacon ipsum dolor amet andouille tri-tip salami frankfurter fatback venison. Cupim sausage rump boudin pork loin, salami kielbasa chuck jowl venison kevin prosciutto flank ribeye. Alcatra chuck sausage meatball beef ribs brisket biltong rump andouille tenderloin leberkas. Bacon andouille pork loin chuck shankle, ground round hamburger ham hock ball tip meatball sirloin drumstick flank kielbasa prosciutto.

    @@ -38,7 +38,7 @@

    Salami tongue picanha, cupim cow ground round bacon turducken fatback meatloaf landjaeger leberkas kevin. Ground round kielbasa swine pork loin kevin ball tip. Shankle beef ribs venison biltong turkey, strip steak short ribs fatback kielbasa tenderloin pastrami ham hock ham. Salami bacon tail tongue pancetta cupim pastrami pork chop prosciutto brisket beef ribs. Swine salami ball tip tongue, turducken sausage pork belly frankfurter picanha capicola andouille meatloaf biltong short ribs hamburger. Shankle meatloaf tenderloin meatball, boudin ground round andouille cupim short loin filet mignon capicola. Boudin bresaola spare ribs meatloaf, alcatra bacon pork loin frankfurter prosciutto meatball pork belly salami.

    Corned beef doner flank kevin. Alcatra ham hock kielbasa, pork loin turkey landjaeger bresaola shankle t-bone rump flank tenderloin beef. Meatball shank turducken leberkas t-bone. Ground round beef swine rump porchetta pork chop tri-tip pork loin kielbasa pastrami frankfurter pork andouille.

    Turkey chicken tongue boudin cupim flank porchetta pastrami. Cow ham alcatra, porchetta turkey doner t-bone ribeye brisket spare ribs short ribs kielbasa. Ribeye ground round tenderloin beef ribs. Pancetta capicola porchetta ball tip doner drumstick boudin t-bone shankle. Pancetta flank leberkas, chicken tri-tip porchetta drumstick tail ribeye venison. Landjaeger alcatra turkey, picanha porchetta beef frankfurter meatball bacon pig short loin.

    -

    Filet mignon beef corned beef biltong doner, kielbasa prosciutto venison tenderloin. Shoulder bresaola t-bone pig tenderloin, meatball spare ribs leberkas tongue drumstick picanha rump ground round. Tongue short ribs pig salami rump, boudin andouille hamburger pancetta meatball. Filet mignon capicola pancetta cupim, shank jerky ham hock pork spare ribs strip steak short ribs rump alcatra. Shoulder short ribs picanha, chicken beef ham pork chop leberkas pastrami bresaola meatball salami. Salami pork chop ham hock pork meatloaf kielbasa turkey ribeye chicken tenderloin hamburger boudin frankfurter. Tri-tip hamburger short ribs short loin ham ball tip shoulder landjaeger tongue pig.

    +

    Filet mignon beef corned beef biltong doner, kielbasa prosciutto venison tenderloin. Shoulder bresaola t-bone pig tenderloin, meatball spare ribs leberkas tongue drumstick picanha rump ground round. Tongue short ribs pig salami rump, boudin andouille hamburger pancetta meatball. Filet mignon capicola pancetta cupim, shank jerky ham hock pork spare ribs strip steak short ribs rump alcatra. Shoulder short ribs picanha, chicken beef ham pork chop leberkas pastrami bresaola meatball salami. Salami pork chop ham hock pork meatloaf kielbasa turkey ribeye chicken tenderloin hamburger boudin frankfurter. Tri-tip hamburger short ribs short loin ham ball tip shoulder landjaeger tongue pig.

    Flank pastrami sausage jerky cupim. Corned beef shankle boudin pancetta salami short ribs. Frankfurter beef ribs ribeye corned beef pastrami landjaeger flank meatloaf pork chop. Prosciutto pig frankfurter leberkas ham hock. Cupim flank tenderloin shank porchetta tail.

    Bresaola beef ribs beef, tongue picanha sirloin short loin biltong. Short ribs leberkas jerky beef ribs tongue bacon pork chop. Meatloaf shankle short loin, jerky cupim chuck ground round biltong ham cow tenderloin. Sausage pancetta ribeye, venison doner landjaeger kielbasa bresaola. Leberkas tail andouille jowl spare ribs pork frankfurter pork belly salami sausage t-bone rump tongue. Flank chuck pork chop short ribs ball tip ham hock jerky shankle beef kielbasa prosciutto salami.

    diff --git a/test/tests.js b/test/tests.js index cf21c43..0c4b426 100644 --- a/test/tests.js +++ b/test/tests.js @@ -22,3 +22,36 @@ QUnit.test('Returns scrollable element (div#scrollable)', function(assert) { assert.equal(scrollable.length, 1, 'One scrollable element is returned'); assert.equal(scrollable[0].id, 'scrollable', 'Scrollable element is
    '); }); + +QUnit.module('$.smoothScroll'); +QUnit.test('Scrolls the #scrollable element, or not.', function(assert) { + var done = assert.async(2); + + $.smoothScroll({ + scrollElement: $('#scrollable'), + scrollTarget: '#does-not-exist', + speed: 200, + afterScroll: function() { + var scrollTop = $('#scrollable').scrollTop(); + assert.equal(scrollTop, 0, '#scrollable element does not scroll to non-existant element'); + + // Trigger the next scroll, which should actually work + $('#scrollit').trigger('click'); + done(); + } + }); + + $('#scrollit').bind('click', function(event) { + event.preventDefault(); + $.smoothScroll({ + scrollElement: $('#scrollable'), + scrollTarget: '#findme', + speed: 200, + afterScroll: function() { + var scrollTop = $('#scrollable').scrollTop(); + assert.equal(scrollTop, 100, '#scrollable element scrolls'); + done(); + } + }); + }); +}); From cfb4c29bea87fa95cac373aa9eff1298a0a2b8be Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sat, 23 Jan 2016 16:14:47 -0500 Subject: [PATCH 24/63] Gruntfile: fix grunt-version config so everything gets correct version. --- Gruntfile.js | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 7b5ba73..a164a33 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,7 @@ /*global module:false*/ module.exports = function(grunt) { - + var pkg = grunt.file.readJSON('package.json'); var marked = require('marked'); var hl = require('node-syntaxhighlighter'); @@ -18,7 +18,7 @@ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pluginName: 'smooth-scroll', - pkg: grunt.file.readJSON('package.json'), + pkg: pkg, meta: { banner: '/*!<%= "\\n" %>' + ' * <%= pkg.title %> - v<%= pkg.version %> - ' + @@ -103,21 +103,22 @@ module.exports = function(grunt) { } }, version: { - - files: { - src: [ - 'package.json', - 'src/jquery.<%= pluginName %>.js', - 'jquery.<%= pluginName %>.js' - ] + src: { + src: ['src/jquery.<%= pluginName %>.js'] }, - banner: { - src: ['jquery.<%= pluginName %>.js'], + banners: { + pkg: pkg, + src: [ + 'jquery.<%= pluginName %>.js', + 'jquery.<%= pluginName %>.min.js' + ], options: { prefix: '- v' } }, - + package: { + src: ['package.json'] + }, } }); @@ -152,9 +153,12 @@ module.exports = function(grunt) { grunt.registerTask('lint', ['jshint', 'jscs']); grunt.registerTask('build', ['lint', 'concat', 'version', 'uglify', 'docs']); - grunt.registerTask('patch', ['lint', 'concat', 'version::patch', 'uglify']); grunt.registerTask('default', ['build']); + ['patch', 'minor', 'major'].forEach(function(release) { + grunt.registerTask(release, ['lint', 'version:src:' + release, 'concat', 'uglify', 'version:banners:' + release, 'version:package:' + release]); + }); + grunt.loadNpmTasks('grunt-jscs'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-uglify'); From 7c327265673e06234f7ae740cbcf3aaf984ffed3 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 24 Jan 2016 21:37:31 -0500 Subject: [PATCH 25/63] Build and bump to 1.7.2. --- index.html | 8 ++++---- jquery.smooth-scroll.js | 9 +++++++-- jquery.smooth-scroll.min.js | 4 ++-- package.json | 2 +- src/jquery.smooth-scroll.js | 2 +- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 130b13a..d4d97dc 100644 --- a/index.html +++ b/index.html @@ -77,7 +77,7 @@

    Smooth Scroll Plugin

    NPM

    Download

    Using npm:

    -
    1
    npm install jquery-smooth-scroll
    +
    1
    npm install jquery-smooth-scroll

    The old-fashioned way:

    Go to the following URL in your browser and copy/paste the code into your own file: @@ -98,7 +98,7 @@

    $.fn.smoothScroll

    Options

    The following options, shown with their default values, are available for both $.fn.smoothScroll and $.smoothScroll:

    -
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    {
      offset: 0,
     
      // one of 'top' or 'left'
      direction: 'top',
     
      // only use if you want to override default behavior
      scrollTarget: null,
     
      // string to use as selector for event delegation (Requires jQuery >=1.4.2)
      delegateSelector: null,
     
      // fn(opts) function to be called before scrolling occurs.
      // `this` is the element(s) being scrolled
      beforeScroll: function() {},
     
      // fn(opts) function to be called after scrolling occurs.
      // `this` is the triggering element
      afterScroll: function() {},
      easing: 'swing',
     
      // speed can be a number or 'auto'
      // if 'auto', the speed will be calculated based on the formula:
      // (current scroll position - target scroll position) / autoCoeffic
      speed: 400,
     
      // autoCoefficent: Only used when speed set to "auto".
      // The higher this number, the faster the scroll speed
      autoCoefficient: 2,
     
      // $.fn.smoothScroll only: whether to prevent the default click action
      preventDefault: true
     
    }
    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    {
      offset: 0,
     
      // one of 'top' or 'left'
      direction: 'top',
     
      // only use if you want to override default behavior
      scrollTarget: null,
     
      // string to use as selector for event delegation (Requires jQuery >=1.4.2)
      delegateSelector: null,
     
      // fn(opts) function to be called before scrolling occurs.
      // `this` is the element(s) being scrolled
      beforeScroll: function() {},
     
      // fn(opts) function to be called after scrolling occurs.
      // `this` is the triggering element
      afterScroll: function() {},
      easing: 'swing',
     
      // speed can be a number or 'auto'
      // if 'auto', the speed will be calculated based on the formula:
      // (current scroll position - target scroll position) / autoCoeffic
      speed: 400,
     
      // autoCoefficent: Only used when speed set to "auto".
      // The higher this number, the faster the scroll speed
      autoCoefficient: 2,
     
      // $.fn.smoothScroll only: whether to prevent the default click action
      preventDefault: true
     
    }

    The options object for $.fn.smoothScroll can take two additional properties: exclude and excludeWithin. The value for both of these is an array of @@ -115,7 +115,7 @@

    $.smoothScroll

    document.body)
  • Doesn't automatically fire, so you need to bind it to some other user interaction. For example:

    -
    1
    2
    3
    4
    5
    6
    7
    $('button.scrollsomething').on('click', function() {
      $.smoothScroll({
        scrollElement: $('div.scrollme'),
        scrollTarget: '#findme'
      });
      return false;
    });
    +
    1
    2
    3
    4
    5
    6
    7
    $('button.scrollsomething').on('click', function() {
      $.smoothScroll({
        scrollElement: $('div.scrollme'),
        scrollTarget: '#findme'
      });
      return false;
    });
  • The $.smoothScroll method can take one or two arguments.

      @@ -129,7 +129,7 @@

      $.smoothScroll

      Additional Option

      The following option, in addition to those listed for $.fn.smoothScroll above, is available for $.smoothScroll:

      -
      1
      2
      3
      4
      5
      {
        // jQuery set of elements you wish to scroll.
        //  if null (default), $('html, body').firstScrollable() is used.
        scrollElement: null
      }
      +
      1
      2
      3
      4
      5
      {
        // jQuery set of elements you wish to scroll.
        //  if null (default), $('html, body').firstScrollable() is used.
        scrollElement: null
      }

      $.fn.scrollable

        diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index bbc9262..02b06d8 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ /*! - * jQuery Smooth Scroll - v1.7.1 - 2016-01-18 + * jQuery Smooth Scroll - v1.7.2 - 2016-01-23 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2016 Karl Swedberg * Licensed MIT @@ -18,7 +18,7 @@ } }(function($) { - var version = '1.7.1'; + var version = '1.7.2'; var optionOverrides = {}; var defaults = { exclude: [], @@ -167,6 +167,10 @@ var pathMatch = thisOpts.scrollTarget || (linkPath === locationPath); var thisHash = escapeSelector(link.hash); + if (thisHash && !$(thisHash).length) { + include = false; + } + if (!thisOpts.scrollTarget && (!hostMatch || !pathMatch || !thisHash)) { include = false; } else { @@ -305,3 +309,4 @@ $.fn.smoothScroll.defaults = defaults; })); + diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index 337051c..2477dd0 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,8 +1,8 @@ /*! - * jQuery Smooth Scroll - v1.7.1 - 2016-01-18 + * jQuery Smooth Scroll - v1.7.2 - 2016-01-23 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2016 Karl Swedberg * Licensed MIT */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){var b="1.7.1",c={},d={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},e=function(b){var c=[],d=!1,e=b.dir&&"left"===b.dir?"scrollLeft":"scrollTop";return this.each(function(){var b=a(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(b[e]()>0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(g.scrollTarget||p&&q&&r){for(;l&&j0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j Date: Sun, 20 Mar 2016 14:42:50 -0400 Subject: [PATCH 26/63] Update readme with a couple examples --- index.html | 24 +++++++++++++++++++---- readme.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index d4d97dc..2443d33 100644 --- a/index.html +++ b/index.html @@ -77,7 +77,7 @@

        Smooth Scroll Plugin

        NPM

        Download

        Using npm:

        -
        1
        npm install jquery-smooth-scroll
        +
        1
        npm install jquery-smooth-scroll

        The old-fashioned way:

        Go to the following URL in your browser and copy/paste the code into your own file: @@ -98,7 +98,7 @@

        $.fn.smoothScroll

      Options

      The following options, shown with their default values, are available for both $.fn.smoothScroll and $.smoothScroll:

      -
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      {
        offset: 0,
       
        // one of 'top' or 'left'
        direction: 'top',
       
        // only use if you want to override default behavior
        scrollTarget: null,
       
        // string to use as selector for event delegation (Requires jQuery >=1.4.2)
        delegateSelector: null,
       
        // fn(opts) function to be called before scrolling occurs.
        // `this` is the element(s) being scrolled
        beforeScroll: function() {},
       
        // fn(opts) function to be called after scrolling occurs.
        // `this` is the triggering element
        afterScroll: function() {},
        easing: 'swing',
       
        // speed can be a number or 'auto'
        // if 'auto', the speed will be calculated based on the formula:
        // (current scroll position - target scroll position) / autoCoeffic
        speed: 400,
       
        // autoCoefficent: Only used when speed set to "auto".
        // The higher this number, the faster the scroll speed
        autoCoefficient: 2,
       
        // $.fn.smoothScroll only: whether to prevent the default click action
        preventDefault: true
       
      }
      +
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      {
        offset: 0,
       
        // one of 'top' or 'left'
        direction: 'top',
       
        // only use if you want to override default behavior
        scrollTarget: null,
       
        // string to use as selector for event delegation (Requires jQuery >=1.4.2)
        delegateSelector: null,
       
        // fn(opts) function to be called before scrolling occurs.
        // `this` is the element(s) being scrolled
        beforeScroll: function() {},
       
        // fn(opts) function to be called after scrolling occurs.
        // `this` is the triggering element
        afterScroll: function() {},
        easing: 'swing',
       
        // speed can be a number or 'auto'
        // if 'auto', the speed will be calculated based on the formula:
        // (current scroll position - target scroll position) / autoCoeffic
        speed: 400,
       
        // autoCoefficent: Only used when speed set to "auto".
        // The higher this number, the faster the scroll speed
        autoCoefficient: 2,
       
        // $.fn.smoothScroll only: whether to prevent the default click action
        preventDefault: true
       
      }

      The options object for $.fn.smoothScroll can take two additional properties: exclude and excludeWithin. The value for both of these is an array of @@ -115,7 +115,7 @@

      $.smoothScroll

      document.body)
    • Doesn't automatically fire, so you need to bind it to some other user interaction. For example:

      -
      1
      2
      3
      4
      5
      6
      7
      $('button.scrollsomething').on('click', function() {
        $.smoothScroll({
          scrollElement: $('div.scrollme'),
          scrollTarget: '#findme'
        });
        return false;
      });
      +
      1
      2
      3
      4
      5
      6
      7
      $('button.scrollsomething').on('click', function() {
        $.smoothScroll({
          scrollElement: $('div.scrollme'),
          scrollTarget: '#findme'
        });
        return false;
      });
    • The $.smoothScroll method can take one or two arguments.

        @@ -129,7 +129,7 @@

        $.smoothScroll

        Additional Option

        The following option, in addition to those listed for $.fn.smoothScroll above, is available for $.smoothScroll:

        -
        1
        2
        3
        4
        5
        {
          // jQuery set of elements you wish to scroll.
          //  if null (default), $('html, body').firstScrollable() is used.
          scrollElement: null
        }
        +
        1
        2
        3
        4
        5
        {
          // jQuery set of elements you wish to scroll.
          //  if null (default), $('html, body').firstScrollable() is used.
          scrollElement: null
        }

        $.fn.scrollable

          @@ -148,6 +148,22 @@

          $.fn.firstScrollable

          $('html, body').firstScrollable().animate({scrollTop: someNumber}, someSpeed)
        +

        Examples

        +

        Smooth scrolling on page load

        +

        If you want to scroll to an element when the page loads, use $.smoothScroll() in a script at the end of the body or use $(document).ready(). To prevent the browser from automatically scrolling to the element on its own, your link on page 1 will need to include a fragment identifier that does not match an element id on page 2. To ensure that users without JavaScript get to the same element, you should modify the link's hash on page 1 with JavaScript. Your script on page 2 will then modify it back to the correct one when you call $.smoothScroll().

        +

        For example, let's say you want to smooth scroll to <div id="scrolltome"></div> on page-2.html. For page-1.html, your script might do the following:

        +
        1
        2
        3
        4
        5
        $('a[href="page-2.html#scrolltome"]').attr('href', function() {
          var hrefParts = this.href.split(/#/);
          hrefParts[1] = 'smoothScroll' + hrefParts[1];
          return hrefParts.join('#');
        });
        +
        +

        Then for page-2.html, your script would do this:

        +
        1
        2
        3
        4
        5
        6
        7
        8
        // Call $.smoothScroll if location.hash starts with "#smoothScroll"
        var reSmooth = /^#smoothScroll/;
        var id;
        if (reSmooth.test(location.hash)) {
          // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
          id = '#' + location.hash.replace(reSmooth, '');
          $.smoothScroll({scrollTarget: id});
        }
        +
        +

        Focus element after scrolling to it.

        +

        Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form. With the smoothScroll plugin, you can use the afterScroll callback function. Here is an example that focuses the first input within the form after scrolling to the form:

        +
        1
        2
        3
        4
        5
        $('a.example').smoothScroll({
          afterScroll: function(options) {
            $(options.scrollTarget).find('input')[0].focus();
          }
        });
        +
        +

        For accessibility reasons, it might make sense to focus any element you scroll to, even if it's not a natively focusable element. To do so, you could add a tabIndex attribute to the target element:

        +
        1
        2
        3
        4
        5
        6
        7
        8
        $('a.example').smoothScroll({
          afterScroll: function(options) {
            var $tgt = $(options.scrollTarget);
            $tgt.attr('tabIndex', '0');
            // Using $tgt[0] allows us to call .focus() on the DOM node itself, not the jQuery collection
            $tgt[0].focus();
          }
        });
        +

        Notes

        • To determine where to scroll the page, the $.fn.smoothScroll method looks diff --git a/readme.md b/readme.md index 38baeb2..07c0976 100644 --- a/readme.md +++ b/readme.md @@ -138,6 +138,62 @@ for `$.smoothScroll`: `$('html, body').firstScrollable().animate({scrollTop: someNumber}, someSpeed)` +## Examples + +### Smooth scrolling on page load + +If you want to scroll to an element when the page loads, use `$.smoothScroll()` in a script at the end of the body or use `$(document).ready()`. To prevent the browser from automatically scrolling to the element on its own, your link on page 1 will need to include a fragment identifier that does _not_ match an element id on page 2. To ensure that users without JavaScript get to the same element, you should modify the link's hash on page 1 with JavaScript. Your script on page 2 will then modify it back to the correct one when you call `$.smoothScroll()`. + +For example, let's say you want to smooth scroll to `
          ` on page-2.html. For page-1.html, your script might do the following: + +```js +$('a[href="page-2.html#scrolltome"]').attr('href', function() { + var hrefParts = this.href.split(/#/); + hrefParts[1] = 'smoothScroll' + hrefParts[1]; + return hrefParts.join('#'); +}); + +``` + +Then for page-2.html, your script would do this: + +```js +// Call $.smoothScroll if location.hash starts with "#smoothScroll" +var reSmooth = /^#smoothScroll/; +var id; +if (reSmooth.test(location.hash)) { + // Strip the "#smoothScroll" part off (and put "#" back on the beginning) + id = '#' + location.hash.replace(reSmooth, ''); + $.smoothScroll({scrollTarget: id}); +} +``` + +## Focus element after scrolling to it. + +Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form. With the smoothScroll plugin, you can use the `afterScroll` callback function. Here is an example that focuses the first input within the form after scrolling to the form: + +```js +$('a.example').smoothScroll({ + afterScroll: function(options) { + $(options.scrollTarget).find('input')[0].focus(); + } +}); + +``` + +For accessibility reasons, it might make sense to focus any element you scroll to, even if it's not a natively focusable element. To do so, you could add a `tabIndex` attribute to the target element: + +```js +$('a.example').smoothScroll({ + afterScroll: function(options) { + var $tgt = $(options.scrollTarget); + $tgt.attr('tabIndex', '0'); + // Using $tgt[0] allows us to call .focus() on the DOM node itself, not the jQuery collection + $tgt[0].focus(); + } +}); +``` + ## Notes * To determine where to scroll the page, the `$.fn.smoothScroll` method looks From bf3b07cb53c15d5f903219f303368ded4546d695 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 31 Jul 2016 15:55:28 -0400 Subject: [PATCH 27/63] Documentation and demo updates. --- .jscsrc | 1 - demo/bbq.html | 4 ++++ demo/hashchange.html | 28 ++++++++++++++++++---------- readme.md | 10 ++++++---- src/jquery.smooth-scroll.js | 7 +++++++ 5 files changed, 35 insertions(+), 15 deletions(-) diff --git a/.jscsrc b/.jscsrc index 2fb84d0..d458b8c 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,5 +1,4 @@ { - "esnext": true, "requireCurlyBraces": [ "if", "else", diff --git a/demo/bbq.html b/demo/bbq.html index af2bb2c..1af2fac 100644 --- a/demo/bbq.html +++ b/demo/bbq.html @@ -45,6 +45,10 @@

          Smooth Scroll jQuery Plugin with Back Button Support

  • + diff --git a/readme.md b/readme.md index 07c0976..3afb789 100644 --- a/readme.md +++ b/readme.md @@ -30,10 +30,9 @@ You can try a bare-bones demo at [kswedberg.github.io/jquery-smooth-scroll/demo/ * Exclude links if they are within a containing element: `$('#container a').smoothScroll({excludeWithin: ['.container2']});` * Exclude links if they match certain conditions: `$('a').smoothScroll({exclude: ['.rough','#chunky']});` * Adjust where the scrolling stops: `$('.backtotop').smoothScroll({offset: -100});` -* Add a callback function that is triggered before the scroll starts: `$('a').smoothScroll({beforeScroll: function() { alert('ready to go!'); }}); +* Add a callback function that is triggered before the scroll starts: `$('a').smoothScroll({beforeScroll: function() { alert('ready to go!'); }});` * Add a callback function that is triggered after the scroll is complete: `$('a').smoothScroll({afterScroll: function() { alert('we made it!'); }});` -* Add back button support by including a history management plugin such as [Ben Alman's BBQ](http://benalman.com/code/projects/jquery-bbq/docs/files/jquery-ba-bbq-js.html). See [demo/bbq.html](demo/bbq.html) for an example of how to implement this. - +* Add back button support by using a [`hashchange` event listener](https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent). You can also include a history management plugin such as [Ben Alman's BBQ](http://benalman.com/code/projects/jquery-bbq/docs/files/jquery-ba-bbq-js.html) for ancient browser support (IE < 8), but you'll need jQuery 1.8 or earlier. See [demo/hashchange.html](demo/hashchange.html) or [demo/bbq.html](demo/bbq.html) for an example of how to implement. #### Options @@ -49,7 +48,7 @@ The following options, shown with their default values, are available for both ` // only use if you want to override default behavior scrollTarget: null, - // string to use as selector for event delegation (Requires jQuery >=1.4.2) + // string to use as selector for event delegation delegateSelector: null, // fn(opts) function to be called before scrolling occurs. @@ -59,6 +58,9 @@ The following options, shown with their default values, are available for both ` // fn(opts) function to be called after scrolling occurs. // `this` is the triggering element afterScroll: function() {}, + + // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin + // from jQuery UI or elsewhere easing: 'swing', // speed can be a number or 'auto' diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index ff41dbb..41987d3 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -27,7 +27,14 @@ // fn(opts) function to be called after scrolling occurs. // `this` is the triggering element afterScroll: function() {}, + + // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin + // from jQuery UI or elsewhere easing: 'swing', + + // speed can be a number or 'auto' + // if 'auto', the speed will be calculated based on the formula: + // (current scroll position - target scroll position) / autoCoeffic speed: 400, // coefficient for "auto" speed From 6d865c0e3da84f85d3594249d58efc709fb7a4dd Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 31 Jul 2016 16:10:16 -0400 Subject: [PATCH 28/63] Update event methods from bind/delegate to on --- demo/jq3.html | 141 +++ lib/jquery/ui-easing.js | 1648 +++++++++++++++++++++++++++++++++++ src/jquery.smooth-scroll.js | 8 +- 3 files changed, 1793 insertions(+), 4 deletions(-) create mode 100644 demo/jq3.html create mode 100644 lib/jquery/ui-easing.js diff --git a/demo/jq3.html b/demo/jq3.html new file mode 100644 index 0000000..47d4a2e --- /dev/null +++ b/demo/jq3.html @@ -0,0 +1,141 @@ + + + + + Smooth Scroll jQuery Plugin Demo + + + + + + + + + +
    +

    Scroll the Document to one of the following paragraphs:

    + +

    Try it with jQuery BBQ hashchange support

    +

    Or, native hashchange support (IE9+)

    +

    Toggle scrolling speed for the p1 link

    + + + +
    +
    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

    +
    + You found me by scrolling horizontally. nice job! +
    +
    +

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

    +

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

    +
    +

    YOU FOUND ME! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

    +
    + You scrolled horizontally and vertically. Awesome! +
    +
    +

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

    +

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

    +
    + +

    p1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +

    p2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +

    p3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +

    p4 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +

    p5 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +

    p6 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    + + +
    + + diff --git a/lib/jquery/ui-easing.js b/lib/jquery/ui-easing.js new file mode 100644 index 0000000..3d51ef9 --- /dev/null +++ b/lib/jquery/ui-easing.js @@ -0,0 +1,1648 @@ +/*! jQuery UI - v1.12.0 - 2016-07-31 +* http://jqueryui.com +* Includes: effect.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +(function(factory) { + if (typeof define === 'function' && define.amd) { + + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else { + + // Browser globals + factory(jQuery); + } +}(function($) { + +$.ui = $.ui || {}; + +var version = $.ui.version = '1.12.0'; + + +/*! + * jQuery UI Effects 1.12.0 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Effects Core +//>>group: Effects +// jscs:disable maximumLineLength +//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. +// jscs:enable maximumLineLength +//>>docs: http://api.jqueryui.com/category/effects-core/ +//>>demos: http://jqueryui.com/effect/ + +var dataSpace = 'ui-effects-', + dataSpaceStyle = 'ui-effects-style', + dataSpaceAnimated = 'ui-effects-animated', + + // Create a local jQuery because jQuery Color relies on it and the + // global may not exist with AMD and a custom build (#10199) + jQuery = $; + +$.effects = { + effect: {} +}; + +/*! + * jQuery Color Animations v2.1.2 + * https://github.com/jquery/jquery-color + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: Wed Jan 16 08:47:09 2013 -0600 + */ +(function(jQuery, undefined) { + + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + + "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", + + // Plusequals test for += 100 -= 100 + rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, + + // A set of RE's that can match strings and generate color tuples. + stringParsers = [ { + re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ], + execResult[ 3 ], + execResult[ 4 ] + ]; + } + }, { + re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ] * 2.55, + execResult[ 2 ] * 2.55, + execResult[ 3 ] * 2.55, + execResult[ 4 ] + ]; + } + }, { + + // This regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ], 16 ) + ]; + } + }, { + + // This regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) + ]; + } + }, { + re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + space: "hsla", + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ] / 100, + execResult[ 3 ] / 100, + execResult[ 4 ] + ]; + } + } ], + + // JQuery.Color( ) + color = jQuery.Color = function( color, green, blue, alpha ) { + return new jQuery.Color.fn.parse( color, green, blue, alpha ); + }, + spaces = { + rgba: { + props: { + red: { + idx: 0, + type: "byte" + }, + green: { + idx: 1, + type: "byte" + }, + blue: { + idx: 2, + type: "byte" + } + } + }, + + hsla: { + props: { + hue: { + idx: 0, + type: "degrees" + }, + saturation: { + idx: 1, + type: "percent" + }, + lightness: { + idx: 2, + type: "percent" + } + } + } + }, + propTypes = { + "byte": { + floor: true, + max: 255 + }, + "percent": { + max: 1 + }, + "degrees": { + mod: 360, + floor: true + } + }, + support = color.support = {}, + + // Element for support tests + supportElem = jQuery( "

    " )[ 0 ], + + // Colors = jQuery.Color.names + colors, + + // Local aliases of functions called often + each = jQuery.each; + +// Determine rgba support immediately +supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; +support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; + +// Define cache name and alpha properties +// for rgba and hsla spaces +each( spaces, function( spaceName, space ) { + space.cache = "_" + spaceName; + space.props.alpha = { + idx: 3, + type: "percent", + def: 1 + }; +} ); + +function clamp( value, prop, allowEmpty ) { + var type = propTypes[ prop.type ] || {}; + + if ( value == null ) { + return ( allowEmpty || !prop.def ) ? null : prop.def; + } + + // ~~ is an short way of doing floor for positive numbers + value = type.floor ? ~~value : parseFloat( value ); + + // IE will pass in empty strings as value for alpha, + // which will hit this case + if ( isNaN( value ) ) { + return prop.def; + } + + if ( type.mod ) { + + // We add mod before modding to make sure that negatives values + // get converted properly: -10 -> 350 + return ( value + type.mod ) % type.mod; + } + + // For now all property types without mod have min and max + return 0 > value ? 0 : type.max < value ? type.max : value; +} + +function stringParse( string ) { + var inst = color(), + rgba = inst._rgba = []; + + string = string.toLowerCase(); + + each( stringParsers, function( i, parser ) { + var parsed, + match = parser.re.exec( string ), + values = match && parser.parse( match ), + spaceName = parser.space || "rgba"; + + if ( values ) { + parsed = inst[ spaceName ]( values ); + + // If this was an rgba parse the assignment might happen twice + // oh well.... + inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; + rgba = inst._rgba = parsed._rgba; + + // Exit each( stringParsers ) here because we matched + return false; + } + } ); + + // Found a stringParser that handled it + if ( rgba.length ) { + + // If this came from a parsed string, force "transparent" when alpha is 0 + // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) + if ( rgba.join() === "0,0,0,0" ) { + jQuery.extend( rgba, colors.transparent ); + } + return inst; + } + + // Named colors + return colors[ string ]; +} + +color.fn = jQuery.extend( color.prototype, { + parse: function( red, green, blue, alpha ) { + if ( red === undefined ) { + this._rgba = [ null, null, null, null ]; + return this; + } + if ( red.jquery || red.nodeType ) { + red = jQuery( red ).css( green ); + green = undefined; + } + + var inst = this, + type = jQuery.type( red ), + rgba = this._rgba = []; + + // More than 1 argument specified - assume ( red, green, blue, alpha ) + if ( green !== undefined ) { + red = [ red, green, blue, alpha ]; + type = "array"; + } + + if ( type === "string" ) { + return this.parse( stringParse( red ) || colors._default ); + } + + if ( type === "array" ) { + each( spaces.rgba.props, function( key, prop ) { + rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); + } ); + return this; + } + + if ( type === "object" ) { + if ( red instanceof color ) { + each( spaces, function( spaceName, space ) { + if ( red[ space.cache ] ) { + inst[ space.cache ] = red[ space.cache ].slice(); + } + } ); + } else { + each( spaces, function( spaceName, space ) { + var cache = space.cache; + each( space.props, function( key, prop ) { + + // If the cache doesn't exist, and we know how to convert + if ( !inst[ cache ] && space.to ) { + + // If the value was null, we don't need to copy it + // if the key was alpha, we don't need to copy it either + if ( key === "alpha" || red[ key ] == null ) { + return; + } + inst[ cache ] = space.to( inst._rgba ); + } + + // This is the only case where we allow nulls for ALL properties. + // call clamp with alwaysAllowEmpty + inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); + } ); + + // Everything defined but alpha? + if ( inst[ cache ] && + jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { + + // Use the default of 1 + inst[ cache ][ 3 ] = 1; + if ( space.from ) { + inst._rgba = space.from( inst[ cache ] ); + } + } + } ); + } + return this; + } + }, + is: function( compare ) { + var is = color( compare ), + same = true, + inst = this; + + each( spaces, function( _, space ) { + var localCache, + isCache = is[ space.cache ]; + if ( isCache ) { + localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; + each( space.props, function( _, prop ) { + if ( isCache[ prop.idx ] != null ) { + same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); + return same; + } + } ); + } + return same; + } ); + return same; + }, + _space: function() { + var used = [], + inst = this; + each( spaces, function( spaceName, space ) { + if ( inst[ space.cache ] ) { + used.push( spaceName ); + } + } ); + return used.pop(); + }, + transition: function( other, distance ) { + var end = color( other ), + spaceName = end._space(), + space = spaces[ spaceName ], + startColor = this.alpha() === 0 ? color( "transparent" ) : this, + start = startColor[ space.cache ] || space.to( startColor._rgba ), + result = start.slice(); + + end = end[ space.cache ]; + each( space.props, function( key, prop ) { + var index = prop.idx, + startValue = start[ index ], + endValue = end[ index ], + type = propTypes[ prop.type ] || {}; + + // If null, don't override start value + if ( endValue === null ) { + return; + } + + // If null - use end + if ( startValue === null ) { + result[ index ] = endValue; + } else { + if ( type.mod ) { + if ( endValue - startValue > type.mod / 2 ) { + startValue += type.mod; + } else if ( startValue - endValue > type.mod / 2 ) { + startValue -= type.mod; + } + } + result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); + } + } ); + return this[ spaceName ]( result ); + }, + blend: function( opaque ) { + + // If we are already opaque - return ourself + if ( this._rgba[ 3 ] === 1 ) { + return this; + } + + var rgb = this._rgba.slice(), + a = rgb.pop(), + blend = color( opaque )._rgba; + + return color( jQuery.map( rgb, function( v, i ) { + return ( 1 - a ) * blend[ i ] + a * v; + } ) ); + }, + toRgbaString: function() { + var prefix = "rgba(", + rgba = jQuery.map( this._rgba, function( v, i ) { + return v == null ? ( i > 2 ? 1 : 0 ) : v; + } ); + + if ( rgba[ 3 ] === 1 ) { + rgba.pop(); + prefix = "rgb("; + } + + return prefix + rgba.join() + ")"; + }, + toHslaString: function() { + var prefix = "hsla(", + hsla = jQuery.map( this.hsla(), function( v, i ) { + if ( v == null ) { + v = i > 2 ? 1 : 0; + } + + // Catch 1 and 2 + if ( i && i < 3 ) { + v = Math.round( v * 100 ) + "%"; + } + return v; + } ); + + if ( hsla[ 3 ] === 1 ) { + hsla.pop(); + prefix = "hsl("; + } + return prefix + hsla.join() + ")"; + }, + toHexString: function( includeAlpha ) { + var rgba = this._rgba.slice(), + alpha = rgba.pop(); + + if ( includeAlpha ) { + rgba.push( ~~( alpha * 255 ) ); + } + + return "#" + jQuery.map( rgba, function( v ) { + + // Default to 0 when nulls exist + v = ( v || 0 ).toString( 16 ); + return v.length === 1 ? "0" + v : v; + } ).join( "" ); + }, + toString: function() { + return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); + } +} ); +color.fn.parse.prototype = color.fn; + +// Hsla conversions adapted from: +// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 + +function hue2rgb( p, q, h ) { + h = ( h + 1 ) % 1; + if ( h * 6 < 1 ) { + return p + ( q - p ) * h * 6; + } + if ( h * 2 < 1 ) { + return q; + } + if ( h * 3 < 2 ) { + return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; + } + return p; +} + +spaces.hsla.to = function( rgba ) { + if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { + return [ null, null, null, rgba[ 3 ] ]; + } + var r = rgba[ 0 ] / 255, + g = rgba[ 1 ] / 255, + b = rgba[ 2 ] / 255, + a = rgba[ 3 ], + max = Math.max( r, g, b ), + min = Math.min( r, g, b ), + diff = max - min, + add = max + min, + l = add * 0.5, + h, s; + + if ( min === max ) { + h = 0; + } else if ( r === max ) { + h = ( 60 * ( g - b ) / diff ) + 360; + } else if ( g === max ) { + h = ( 60 * ( b - r ) / diff ) + 120; + } else { + h = ( 60 * ( r - g ) / diff ) + 240; + } + + // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0% + // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) + if ( diff === 0 ) { + s = 0; + } else if ( l <= 0.5 ) { + s = diff / add; + } else { + s = diff / ( 2 - add ); + } + return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; +}; + +spaces.hsla.from = function( hsla ) { + if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { + return [ null, null, null, hsla[ 3 ] ]; + } + var h = hsla[ 0 ] / 360, + s = hsla[ 1 ], + l = hsla[ 2 ], + a = hsla[ 3 ], + q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, + p = 2 * l - q; + + return [ + Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), + Math.round( hue2rgb( p, q, h ) * 255 ), + Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), + a + ]; +}; + +each( spaces, function( spaceName, space ) { + var props = space.props, + cache = space.cache, + to = space.to, + from = space.from; + + // Makes rgba() and hsla() + color.fn[ spaceName ] = function( value ) { + + // Generate a cache for this space if it doesn't exist + if ( to && !this[ cache ] ) { + this[ cache ] = to( this._rgba ); + } + if ( value === undefined ) { + return this[ cache ].slice(); + } + + var ret, + type = jQuery.type( value ), + arr = ( type === "array" || type === "object" ) ? value : arguments, + local = this[ cache ].slice(); + + each( props, function( key, prop ) { + var val = arr[ type === "object" ? key : prop.idx ]; + if ( val == null ) { + val = local[ prop.idx ]; + } + local[ prop.idx ] = clamp( val, prop ); + } ); + + if ( from ) { + ret = color( from( local ) ); + ret[ cache ] = local; + return ret; + } else { + return color( local ); + } + }; + + // Makes red() green() blue() alpha() hue() saturation() lightness() + each( props, function( key, prop ) { + + // Alpha is included in more than one space + if ( color.fn[ key ] ) { + return; + } + color.fn[ key ] = function( value ) { + var vtype = jQuery.type( value ), + fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), + local = this[ fn ](), + cur = local[ prop.idx ], + match; + + if ( vtype === "undefined" ) { + return cur; + } + + if ( vtype === "function" ) { + value = value.call( this, cur ); + vtype = jQuery.type( value ); + } + if ( value == null && prop.empty ) { + return this; + } + if ( vtype === "string" ) { + match = rplusequals.exec( value ); + if ( match ) { + value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); + } + } + local[ prop.idx ] = value; + return this[ fn ]( local ); + }; + } ); +} ); + +// Add cssHook and .fx.step function for each named hook. +// accept a space separated string of properties +color.hook = function( hook ) { + var hooks = hook.split( " " ); + each( hooks, function( i, hook ) { + jQuery.cssHooks[ hook ] = { + set: function( elem, value ) { + var parsed, curElem, + backgroundColor = ""; + + if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || + ( parsed = stringParse( value ) ) ) ) { + value = color( parsed || value ); + if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { + curElem = hook === "backgroundColor" ? elem.parentNode : elem; + while ( + ( backgroundColor === "" || backgroundColor === "transparent" ) && + curElem && curElem.style + ) { + try { + backgroundColor = jQuery.css( curElem, "backgroundColor" ); + curElem = curElem.parentNode; + } catch ( e ) { + } + } + + value = value.blend( backgroundColor && backgroundColor !== "transparent" ? + backgroundColor : + "_default" ); + } + + value = value.toRgbaString(); + } + try { + elem.style[ hook ] = value; + } catch ( e ) { + + // Wrapped to prevent IE from throwing errors on "invalid" values like + // 'auto' or 'inherit' + } + } + }; + jQuery.fx.step[ hook ] = function( fx ) { + if ( !fx.colorInit ) { + fx.start = color( fx.elem, hook ); + fx.end = color( fx.end ); + fx.colorInit = true; + } + jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); + }; + } ); + +}; + +color.hook( stepHooks ); + +jQuery.cssHooks.borderColor = { + expand: function( value ) { + var expanded = {}; + + each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { + expanded[ "border" + part + "Color" ] = value; + } ); + return expanded; + } +}; + +// Basic color names only. +// Usage of any of the other color names requires adding yourself or including +// jquery.color.svg-names.js. +colors = jQuery.Color.names = { + + // 4.1. Basic color keywords + aqua: "#00ffff", + black: "#000000", + blue: "#0000ff", + fuchsia: "#ff00ff", + gray: "#808080", + green: "#008000", + lime: "#00ff00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + purple: "#800080", + red: "#ff0000", + silver: "#c0c0c0", + teal: "#008080", + white: "#ffffff", + yellow: "#ffff00", + + // 4.2.3. "transparent" color keyword + transparent: [ null, null, null, 0 ], + + _default: "#ffffff" +}; + +} )( jQuery ); + +/******************************************************************************/ +/****************************** CLASS ANIMATIONS ******************************/ +/******************************************************************************/ +( function() { + +var classAnimationActions = [ "add", "remove", "toggle" ], + shorthandStyles = { + border: 1, + borderBottom: 1, + borderColor: 1, + borderLeft: 1, + borderRight: 1, + borderTop: 1, + borderWidth: 1, + margin: 1, + padding: 1 + }; + +$.each( + [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], + function( _, prop ) { + $.fx.step[ prop ] = function( fx ) { + if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { + jQuery.style( fx.elem, prop, fx.end ); + fx.setAttr = true; + } + }; + } +); + +function getElementStyles( elem ) { + var key, len, + style = elem.ownerDocument.defaultView ? + elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : + elem.currentStyle, + styles = {}; + + if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { + len = style.length; + while ( len-- ) { + key = style[ len ]; + if ( typeof style[ key ] === "string" ) { + styles[ $.camelCase( key ) ] = style[ key ]; + } + } + + // Support: Opera, IE <9 + } else { + for ( key in style ) { + if ( typeof style[ key ] === "string" ) { + styles[ key ] = style[ key ]; + } + } + } + + return styles; +} + +function styleDifference( oldStyle, newStyle ) { + var diff = {}, + name, value; + + for ( name in newStyle ) { + value = newStyle[ name ]; + if ( oldStyle[ name ] !== value ) { + if ( !shorthandStyles[ name ] ) { + if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { + diff[ name ] = value; + } + } + } + } + + return diff; +} + +// Support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +$.effects.animateClass = function( value, duration, easing, callback ) { + var o = $.speed( duration, easing, callback ); + + return this.queue( function() { + var animated = $( this ), + baseClass = animated.attr( "class" ) || "", + applyClassChange, + allAnimations = o.children ? animated.find( "*" ).addBack() : animated; + + // Map the animated objects to store the original styles. + allAnimations = allAnimations.map( function() { + var el = $( this ); + return { + el: el, + start: getElementStyles( this ) + }; + } ); + + // Apply class change + applyClassChange = function() { + $.each( classAnimationActions, function( i, action ) { + if ( value[ action ] ) { + animated[ action + "Class" ]( value[ action ] ); + } + } ); + }; + applyClassChange(); + + // Map all animated objects again - calculate new styles and diff + allAnimations = allAnimations.map( function() { + this.end = getElementStyles( this.el[ 0 ] ); + this.diff = styleDifference( this.start, this.end ); + return this; + } ); + + // Apply original class + animated.attr( "class", baseClass ); + + // Map all animated objects again - this time collecting a promise + allAnimations = allAnimations.map( function() { + var styleInfo = this, + dfd = $.Deferred(), + opts = $.extend( {}, o, { + queue: false, + complete: function() { + dfd.resolve( styleInfo ); + } + } ); + + this.el.animate( this.diff, opts ); + return dfd.promise(); + } ); + + // Once all animations have completed: + $.when.apply( $, allAnimations.get() ).done( function() { + + // Set the final class + applyClassChange(); + + // For each animated element, + // clear all css properties that were animated + $.each( arguments, function() { + var el = this.el; + $.each( this.diff, function( key ) { + el.css( key, "" ); + } ); + } ); + + // This is guarnteed to be there if you use jQuery.speed() + // it also handles dequeuing the next anim... + o.complete.call( animated[ 0 ] ); + } ); + } ); +}; + +$.fn.extend( { + addClass: ( function( orig ) { + return function( classNames, speed, easing, callback ) { + return speed ? + $.effects.animateClass.call( this, + { add: classNames }, speed, easing, callback ) : + orig.apply( this, arguments ); + }; + } )( $.fn.addClass ), + + removeClass: ( function( orig ) { + return function( classNames, speed, easing, callback ) { + return arguments.length > 1 ? + $.effects.animateClass.call( this, + { remove: classNames }, speed, easing, callback ) : + orig.apply( this, arguments ); + }; + } )( $.fn.removeClass ), + + toggleClass: ( function( orig ) { + return function( classNames, force, speed, easing, callback ) { + if ( typeof force === "boolean" || force === undefined ) { + if ( !speed ) { + + // Without speed parameter + return orig.apply( this, arguments ); + } else { + return $.effects.animateClass.call( this, + ( force ? { add: classNames } : { remove: classNames } ), + speed, easing, callback ); + } + } else { + + // Without force parameter + return $.effects.animateClass.call( this, + { toggle: classNames }, force, speed, easing ); + } + }; + } )( $.fn.toggleClass ), + + switchClass: function( remove, add, speed, easing, callback ) { + return $.effects.animateClass.call( this, { + add: add, + remove: remove + }, speed, easing, callback ); + } +} ); + +} )(); + +/******************************************************************************/ +/*********************************** EFFECTS **********************************/ +/******************************************************************************/ + +( function() { + +if ( $.expr && $.expr.filters && $.expr.filters.animated ) { + $.expr.filters.animated = ( function( orig ) { + return function( elem ) { + return !!$( elem ).data( dataSpaceAnimated ) || orig( elem ); + }; + } )( $.expr.filters.animated ); +} + +if ( $.uiBackCompat !== false ) { + $.extend( $.effects, { + + // Saves a set of properties in a data storage + save: function( element, set ) { + var i = 0, length = set.length; + for ( ; i < length; i++ ) { + if ( set[ i ] !== null ) { + element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); + } + } + }, + + // Restores a set of previously saved properties from a data storage + restore: function( element, set ) { + var val, i = 0, length = set.length; + for ( ; i < length; i++ ) { + if ( set[ i ] !== null ) { + val = element.data( dataSpace + set[ i ] ); + element.css( set[ i ], val ); + } + } + }, + + setMode: function( el, mode ) { + if ( mode === "toggle" ) { + mode = el.is( ":hidden" ) ? "show" : "hide"; + } + return mode; + }, + + // Wraps the element around a wrapper that copies position properties + createWrapper: function( element ) { + + // If the element is already wrapped, return it + if ( element.parent().is( ".ui-effects-wrapper" ) ) { + return element.parent(); + } + + // Wrap the element + var props = { + width: element.outerWidth( true ), + height: element.outerHeight( true ), + "float": element.css( "float" ) + }, + wrapper = $( "

    " ) + .addClass( "ui-effects-wrapper" ) + .css( { + fontSize: "100%", + background: "transparent", + border: "none", + margin: 0, + padding: 0 + } ), + + // Store the size in case width/height are defined in % - Fixes #5245 + size = { + width: element.width(), + height: element.height() + }, + active = document.activeElement; + + // Support: Firefox + // Firefox incorrectly exposes anonymous content + // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 + try { + active.id; + } catch ( e ) { + active = document.body; + } + + element.wrap( wrapper ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).trigger( "focus" ); + } + + // Hotfix for jQuery 1.4 since some change in wrap() seems to actually + // lose the reference to the wrapped element + wrapper = element.parent(); + + // Transfer positioning properties to the wrapper + if ( element.css( "position" ) === "static" ) { + wrapper.css( { position: "relative" } ); + element.css( { position: "relative" } ); + } else { + $.extend( props, { + position: element.css( "position" ), + zIndex: element.css( "z-index" ) + } ); + $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) { + props[ pos ] = element.css( pos ); + if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { + props[ pos ] = "auto"; + } + } ); + element.css( { + position: "relative", + top: 0, + left: 0, + right: "auto", + bottom: "auto" + } ); + } + element.css( size ); + + return wrapper.css( props ).show(); + }, + + removeWrapper: function( element ) { + var active = document.activeElement; + + if ( element.parent().is( ".ui-effects-wrapper" ) ) { + element.parent().replaceWith( element ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).trigger( "focus" ); + } + } + + return element; + } + } ); +} + +$.extend( $.effects, { + version: "1.12.0", + + define: function( name, mode, effect ) { + if ( !effect ) { + effect = mode; + mode = "effect"; + } + + $.effects.effect[ name ] = effect; + $.effects.effect[ name ].mode = mode; + + return effect; + }, + + scaledDimensions: function( element, percent, direction ) { + if ( percent === 0 ) { + return { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + }; + } + + var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1, + y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1; + + return { + height: element.height() * y, + width: element.width() * x, + outerHeight: element.outerHeight() * y, + outerWidth: element.outerWidth() * x + }; + + }, + + clipToBox: function( animation ) { + return { + width: animation.clip.right - animation.clip.left, + height: animation.clip.bottom - animation.clip.top, + left: animation.clip.left, + top: animation.clip.top + }; + }, + + // Injects recently queued functions to be first in line (after "inprogress") + unshift: function( element, queueLength, count ) { + var queue = element.queue(); + + if ( queueLength > 1 ) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queueLength, count ) ) ); + } + element.dequeue(); + }, + + saveStyle: function( element ) { + element.data( dataSpaceStyle, element[ 0 ].style.cssText ); + }, + + restoreStyle: function( element ) { + element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || ""; + element.removeData( dataSpaceStyle ); + }, + + mode: function( element, mode ) { + var hidden = element.is( ":hidden" ); + + if ( mode === "toggle" ) { + mode = hidden ? "show" : "hide"; + } + if ( hidden ? mode === "hide" : mode === "show" ) { + mode = "none"; + } + return mode; + }, + + // Translates a [top,left] array into a baseline value + getBaseline: function( origin, original ) { + var y, x; + + switch ( origin[ 0 ] ) { + case "top": + y = 0; + break; + case "middle": + y = 0.5; + break; + case "bottom": + y = 1; + break; + default: + y = origin[ 0 ] / original.height; + } + + switch ( origin[ 1 ] ) { + case "left": + x = 0; + break; + case "center": + x = 0.5; + break; + case "right": + x = 1; + break; + default: + x = origin[ 1 ] / original.width; + } + + return { + x: x, + y: y + }; + }, + + // Creates a placeholder element so that the original element can be made absolute + createPlaceholder: function( element ) { + var placeholder, + cssPosition = element.css( "position" ), + position = element.position(); + + // Lock in margins first to account for form elements, which + // will change margin if you explicitly set height + // see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380 + // Support: Safari + element.css( { + marginTop: element.css( "marginTop" ), + marginBottom: element.css( "marginBottom" ), + marginLeft: element.css( "marginLeft" ), + marginRight: element.css( "marginRight" ) + } ) + .outerWidth( element.outerWidth() ) + .outerHeight( element.outerHeight() ); + + if ( /^(static|relative)/.test( cssPosition ) ) { + cssPosition = "absolute"; + + placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( { + + // Convert inline to inline block to account for inline elements + // that turn to inline block based on content (like img) + display: /^(inline|ruby)/.test( element.css( "display" ) ) ? + "inline-block" : + "block", + visibility: "hidden", + + // Margins need to be set to account for margin collapse + marginTop: element.css( "marginTop" ), + marginBottom: element.css( "marginBottom" ), + marginLeft: element.css( "marginLeft" ), + marginRight: element.css( "marginRight" ), + "float": element.css( "float" ) + } ) + .outerWidth( element.outerWidth() ) + .outerHeight( element.outerHeight() ) + .addClass( "ui-effects-placeholder" ); + + element.data( dataSpace + "placeholder", placeholder ); + } + + element.css( { + position: cssPosition, + left: position.left, + top: position.top + } ); + + return placeholder; + }, + + removePlaceholder: function( element ) { + var dataKey = dataSpace + "placeholder", + placeholder = element.data( dataKey ); + + if ( placeholder ) { + placeholder.remove(); + element.removeData( dataKey ); + } + }, + + // Removes a placeholder if it exists and restores + // properties that were modified during placeholder creation + cleanUp: function( element ) { + $.effects.restoreStyle( element ); + $.effects.removePlaceholder( element ); + }, + + setTransition: function( element, list, factor, value ) { + value = value || {}; + $.each( list, function( i, x ) { + var unit = element.cssUnit( x ); + if ( unit[ 0 ] > 0 ) { + value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; + } + } ); + return value; + } +} ); + +// Return an effect options object for the given parameters: +function _normalizeArguments( effect, options, speed, callback ) { + + // Allow passing all options as the first parameter + if ( $.isPlainObject( effect ) ) { + options = effect; + effect = effect.effect; + } + + // Convert to an object + effect = { effect: effect }; + + // Catch (effect, null, ...) + if ( options == null ) { + options = {}; + } + + // Catch (effect, callback) + if ( $.isFunction( options ) ) { + callback = options; + speed = null; + options = {}; + } + + // Catch (effect, speed, ?) + if ( typeof options === "number" || $.fx.speeds[ options ] ) { + callback = speed; + speed = options; + options = {}; + } + + // Catch (effect, options, callback) + if ( $.isFunction( speed ) ) { + callback = speed; + speed = null; + } + + // Add options to effect + if ( options ) { + $.extend( effect, options ); + } + + speed = speed || options.duration; + effect.duration = $.fx.off ? 0 : + typeof speed === "number" ? speed : + speed in $.fx.speeds ? $.fx.speeds[ speed ] : + $.fx.speeds._default; + + effect.complete = callback || options.complete; + + return effect; +} + +function standardAnimationOption( option ) { + + // Valid standard speeds (nothing, number, named speed) + if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { + return true; + } + + // Invalid strings - treat as "normal" speed + if ( typeof option === "string" && !$.effects.effect[ option ] ) { + return true; + } + + // Complete callback + if ( $.isFunction( option ) ) { + return true; + } + + // Options hash (but not naming an effect) + if ( typeof option === "object" && !option.effect ) { + return true; + } + + // Didn't match any standard API + return false; +} + +$.fn.extend( { + effect: function( /* effect, options, speed, callback */ ) { + var args = _normalizeArguments.apply( this, arguments ), + effectMethod = $.effects.effect[ args.effect ], + defaultMode = effectMethod.mode, + queue = args.queue, + queueName = queue || "fx", + complete = args.complete, + mode = args.mode, + modes = [], + prefilter = function( next ) { + var el = $( this ), + normalizedMode = $.effects.mode( el, mode ) || defaultMode; + + // Sentinel for duck-punching the :animated psuedo-selector + el.data( dataSpaceAnimated, true ); + + // Save effect mode for later use, + // we can't just call $.effects.mode again later, + // as the .show() below destroys the initial state + modes.push( normalizedMode ); + + // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13 + if ( defaultMode && ( normalizedMode === "show" || + ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) { + el.show(); + } + + if ( !defaultMode || normalizedMode !== "none" ) { + $.effects.saveStyle( el ); + } + + if ( $.isFunction( next ) ) { + next(); + } + }; + + if ( $.fx.off || !effectMethod ) { + + // Delegate to the original method (e.g., .show()) if possible + if ( mode ) { + return this[ mode ]( args.duration, complete ); + } else { + return this.each( function() { + if ( complete ) { + complete.call( this ); + } + } ); + } + } + + function run( next ) { + var elem = $( this ); + + function cleanup() { + elem.removeData( dataSpaceAnimated ); + + $.effects.cleanUp( elem ); + + if ( args.mode === "hide" ) { + elem.hide(); + } + + done(); + } + + function done() { + if ( $.isFunction( complete ) ) { + complete.call( elem[ 0 ] ); + } + + if ( $.isFunction( next ) ) { + next(); + } + } + + // Override mode option on a per element basis, + // as toggle can be either show or hide depending on element state + args.mode = modes.shift(); + + if ( $.uiBackCompat !== false && !defaultMode ) { + if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { + + // Call the core method to track "olddisplay" properly + elem[ mode ](); + done(); + } else { + effectMethod.call( elem[ 0 ], args, done ); + } + } else { + if ( args.mode === "none" ) { + + // Call the core method to track "olddisplay" properly + elem[ mode ](); + done(); + } else { + effectMethod.call( elem[ 0 ], args, cleanup ); + } + } + } + + // Run prefilter on all elements first to ensure that + // any showing or hiding happens before placeholder creation, + // which ensures that any layout changes are correctly captured. + return queue === false ? + this.each( prefilter ).each( run ) : + this.queue( queueName, prefilter ).queue( queueName, run ); + }, + + show: ( function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "show"; + return this.effect.call( this, args ); + } + }; + } )( $.fn.show ), + + hide: ( function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "hide"; + return this.effect.call( this, args ); + } + }; + } )( $.fn.hide ), + + toggle: ( function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) || typeof option === "boolean" ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "toggle"; + return this.effect.call( this, args ); + } + }; + } )( $.fn.toggle ), + + cssUnit: function( key ) { + var style = this.css( key ), + val = []; + + $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { + if ( style.indexOf( unit ) > 0 ) { + val = [ parseFloat( style ), unit ]; + } + } ); + return val; + }, + + cssClip: function( clipObj ) { + if ( clipObj ) { + return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + + clipObj.bottom + "px " + clipObj.left + "px)" ); + } + return parseClip( this.css( "clip" ), this ); + }, + + transfer: function( options, done ) { + var element = $( this ), + target = $( options.to ), + targetFixed = target.css( "position" ) === "fixed", + body = $( "body" ), + fixTop = targetFixed ? body.scrollTop() : 0, + fixLeft = targetFixed ? body.scrollLeft() : 0, + endPosition = target.offset(), + animation = { + top: endPosition.top - fixTop, + left: endPosition.left - fixLeft, + height: target.innerHeight(), + width: target.innerWidth() + }, + startPosition = element.offset(), + transfer = $( "
    " ) + .appendTo( "body" ) + .addClass( options.className ) + .css( { + top: startPosition.top - fixTop, + left: startPosition.left - fixLeft, + height: element.innerHeight(), + width: element.innerWidth(), + position: targetFixed ? "fixed" : "absolute" + } ) + .animate( animation, options.duration, options.easing, function() { + transfer.remove(); + if ( $.isFunction( done ) ) { + done(); + } + } ); + } +} ); + +function parseClip( str, element ) { + var outerWidth = element.outerWidth(), + outerHeight = element.outerHeight(), + clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, + values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ]; + + return { + top: parseFloat( values[ 1 ] ) || 0, + right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ), + bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ), + left: parseFloat( values[ 4 ] ) || 0 + }; +} + +$.fx.step.clip = function( fx ) { + if ( !fx.clipInit ) { + fx.start = $( fx.elem ).cssClip(); + if ( typeof fx.end === "string" ) { + fx.end = parseClip( fx.end, fx.elem ); + } + fx.clipInit = true; + } + + $( fx.elem ).cssClip( { + top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top, + right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right, + bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom, + left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left + } ); +}; + +} )(); + +/******************************************************************************/ +/*********************************** EASING ***********************************/ +/******************************************************************************/ + +( function() { + +// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing) + +var baseEasings = {}; + +$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { + baseEasings[ name ] = function( p ) { + return Math.pow( p, i + 2 ); + }; +} ); + +$.extend( baseEasings, { + Sine: function( p ) { + return 1 - Math.cos( p * Math.PI / 2 ); + }, + Circ: function( p ) { + return 1 - Math.sqrt( 1 - p * p ); + }, + Elastic: function( p ) { + return p === 0 || p === 1 ? p : + -Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 ); + }, + Back: function( p ) { + return p * p * ( 3 * p - 2 ); + }, + Bounce: function( p ) { + var pow2, + bounce = 4; + + while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} + return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); + } +} ); + +$.each( baseEasings, function( name, easeIn ) { + $.easing[ "easeIn" + name ] = easeIn; + $.easing[ "easeOut" + name ] = function( p ) { + return 1 - easeIn( 1 - p ); + }; + $.easing[ "easeInOut" + name ] = function( p ) { + return p < 0.5 ? + easeIn( p * 2 ) / 2 : + 1 - easeIn( p * -2 + 2 ) / 2; + }; +} ); + +} )(); + +var effect = $.effects; + + + + +})); diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index 41987d3..fb76bad 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -191,12 +191,12 @@ if (options.delegateSelector !== null) { this - .undelegate(options.delegateSelector, 'click.smoothscroll') - .delegate(options.delegateSelector, 'click.smoothscroll', clickHandler); + .off('click.smoothscroll', options.delegateSelector) + .on('click.smoothscroll', options.delegateSelector, clickHandler); } else { this - .unbind('click.smoothscroll') - .bind('click.smoothscroll', clickHandler); + .off('click.smoothscroll') + .on('click.smoothscroll', clickHandler); } return this; From ab98c961cc3bdb58d6aa86964be0b01a9523bbbf Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 31 Jul 2016 16:13:44 -0400 Subject: [PATCH 29/63] Bump to 2.0 --- jquery.smooth-scroll.js | 19 +++++++++++++------ jquery.smooth-scroll.min.js | 4 ++-- package.json | 2 +- readme.md | 6 ++++-- src/jquery.smooth-scroll.js | 2 +- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index 02b06d8..e63ae9e 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ /*! - * jQuery Smooth Scroll - v1.7.2 - 2016-01-23 + * jQuery Smooth Scroll - v2.0.0 - 2016-07-31 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2016 Karl Swedberg * Licensed MIT @@ -18,7 +18,7 @@ } }(function($) { - var version = '1.7.2'; + var version = '2.0.0'; var optionOverrides = {}; var defaults = { exclude: [], @@ -46,7 +46,14 @@ // fn(opts) function to be called after scrolling occurs. // `this` is the triggering element afterScroll: function() {}, + + // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin + // from jQuery UI or elsewhere easing: 'swing', + + // speed can be a number or 'auto' + // if 'auto', the speed will be calculated based on the formula: + // (current scroll position - target scroll position) / autoCoeffic speed: 400, // coefficient for "auto" speed @@ -203,12 +210,12 @@ if (options.delegateSelector !== null) { this - .undelegate(options.delegateSelector, 'click.smoothscroll') - .delegate(options.delegateSelector, 'click.smoothscroll', clickHandler); + .off('click.smoothscroll', options.delegateSelector) + .on('click.smoothscroll', options.delegateSelector, clickHandler); } else { this - .unbind('click.smoothscroll') - .bind('click.smoothscroll', clickHandler); + .off('click.smoothscroll') + .on('click.smoothscroll', clickHandler); } return this; diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index 2477dd0..e71624a 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,8 +1,8 @@ /*! - * jQuery Smooth Scroll - v1.7.2 - 2016-01-23 + * jQuery Smooth Scroll - v2.0.0 - 2016-07-31 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2016 Karl Swedberg * Licensed MIT */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){var b="1.7.2",c={},d={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},e=function(b){var c=[],d=!1,e=b.dir&&"left"===b.dir?"scrollLeft":"scrollTop";return this.each(function(){var b=a(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(b[e]()>0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j
    ` on page-2.html. For page-1.html, your script might do the following: @@ -157,7 +159,7 @@ $('a[href="page-2.html#scrolltome"]').attr('href', function() { ``` -Then for page-2.html, your script would do this: +Then for page-2.html, your script would do this: ```js // Call $.smoothScroll if location.hash starts with "#smoothScroll" diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index fb76bad..80eb297 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ (function($) { - var version = '1.7.2'; + var version = '2.0.0'; var optionOverrides = {}; var defaults = { exclude: [], From 7017931274baf1f80a1a93f3cdd56eee5e77c777 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Wed, 7 Sep 2016 09:17:29 -0400 Subject: [PATCH 30/63] Update jQuery dependency and fix bower.json building in Gruntfile.js --- Gruntfile.js | 6 +++--- bower.json | 2 +- index.html | 25 +++++++++++++------------ package.json | 2 +- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index a164a33..80be692 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -133,7 +133,7 @@ module.exports = function(grunt) { grunt.registerTask('updateBower', 'Update bower.json to match package.json', function() { var pkg = require('./package.json'); - var props = ['name', 'main', 'homepage', 'repository', 'dependencies', 'keywords', 'license']; + var props = ['name', 'main', 'homepage', 'version', 'repository', 'dependencies', 'keywords', 'license']; var json = { description: 'Easy implementation of smooth scrolling for same-page links' }; @@ -152,11 +152,11 @@ module.exports = function(grunt) { }); grunt.registerTask('lint', ['jshint', 'jscs']); - grunt.registerTask('build', ['lint', 'concat', 'version', 'uglify', 'docs']); + grunt.registerTask('build', ['lint', 'concat', 'version', 'updateBower', 'uglify', 'docs']); grunt.registerTask('default', ['build']); ['patch', 'minor', 'major'].forEach(function(release) { - grunt.registerTask(release, ['lint', 'version:src:' + release, 'concat', 'uglify', 'version:banners:' + release, 'version:package:' + release]); + grunt.registerTask(release, ['lint', 'version:src:' + release, 'concat', 'uglify', 'version:banners:' + release, 'version:package:' + release, 'updateBower']); }); grunt.loadNpmTasks('grunt-jscs'); diff --git a/bower.json b/bower.json index 0021198..30899b8 100644 --- a/bower.json +++ b/bower.json @@ -8,7 +8,7 @@ "url": "https://github.com/kswedberg/jquery-smooth-scroll" }, "dependencies": { - "jquery": ">=1.4.2" + "jquery": ">=1.7.0" }, "keywords": [ "jQuery", diff --git a/index.html b/index.html index 2443d33..9bfd7a0 100644 --- a/index.html +++ b/index.html @@ -75,9 +75,10 @@

    Smooth Scroll Plugin

    Allows for easy implementation of smooth scrolling for same-page links.

    NPM

    +

    Note: Version 2.0+ of this plugin requires jQuery version 1.7 or greater.

    Download

    Using npm:

    -
    1
    npm install jquery-smooth-scroll
    +
    1
    npm install jquery-smooth-scroll

    The old-fashioned way:

    Go to the following URL in your browser and copy/paste the code into your own file: @@ -92,13 +93,13 @@

    $.fn.smoothScroll

  • Exclude links if they are within a containing element: $('#container a').smoothScroll({excludeWithin: ['.container2']});
  • Exclude links if they match certain conditions: $('a').smoothScroll({exclude: ['.rough','#chunky']});
  • Adjust where the scrolling stops: $('.backtotop').smoothScroll({offset: -100});
  • -
  • Add a callback function that is triggered before the scroll starts: `$('a').smoothScroll({beforeScroll: function() { alert('ready to go!'); }});
  • +
  • Add a callback function that is triggered before the scroll starts: $('a').smoothScroll({beforeScroll: function() { alert('ready to go!'); }});
  • Add a callback function that is triggered after the scroll is complete: $('a').smoothScroll({afterScroll: function() { alert('we made it!'); }});
  • -
  • Add back button support by including a history management plugin such as Ben Alman's BBQ. See demo/bbq.html for an example of how to implement this.
  • +
  • Add back button support by using a hashchange event listener. You can also include a history management plugin such as Ben Alman's BBQ for ancient browser support (IE < 8), but you'll need jQuery 1.8 or earlier. See demo/hashchange.html or demo/bbq.html for an example of how to implement.
  • Options

    The following options, shown with their default values, are available for both $.fn.smoothScroll and $.smoothScroll:

    -
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    {
      offset: 0,
     
      // one of 'top' or 'left'
      direction: 'top',
     
      // only use if you want to override default behavior
      scrollTarget: null,
     
      // string to use as selector for event delegation (Requires jQuery >=1.4.2)
      delegateSelector: null,
     
      // fn(opts) function to be called before scrolling occurs.
      // `this` is the element(s) being scrolled
      beforeScroll: function() {},
     
      // fn(opts) function to be called after scrolling occurs.
      // `this` is the triggering element
      afterScroll: function() {},
      easing: 'swing',
     
      // speed can be a number or 'auto'
      // if 'auto', the speed will be calculated based on the formula:
      // (current scroll position - target scroll position) / autoCoeffic
      speed: 400,
     
      // autoCoefficent: Only used when speed set to "auto".
      // The higher this number, the faster the scroll speed
      autoCoefficient: 2,
     
      // $.fn.smoothScroll only: whether to prevent the default click action
      preventDefault: true
     
    }
    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    {
      offset: 0,
     
      // one of 'top' or 'left'
      direction: 'top',
     
      // only use if you want to override default behavior
      scrollTarget: null,
     
      // string to use as selector for event delegation
      delegateSelector: null,
     
      // fn(opts) function to be called before scrolling occurs.
      // `this` is the element(s) being scrolled
      beforeScroll: function() {},
     
      // fn(opts) function to be called after scrolling occurs.
      // `this` is the triggering element
      afterScroll: function() {},
     
      // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin
      // from jQuery UI or elsewhere
      easing: 'swing',
     
      // speed can be a number or 'auto'
      // if 'auto', the speed will be calculated based on the formula:
      // (current scroll position - target scroll position) / autoCoeffic
      speed: 400,
     
      // autoCoefficent: Only used when speed set to "auto".
      // The higher this number, the faster the scroll speed
      autoCoefficient: 2,
     
      // $.fn.smoothScroll only: whether to prevent the default click action
      preventDefault: true
     
    }

    The options object for $.fn.smoothScroll can take two additional properties: exclude and excludeWithin. The value for both of these is an array of @@ -115,7 +116,7 @@

    $.smoothScroll

    document.body)
  • Doesn't automatically fire, so you need to bind it to some other user interaction. For example:

    -
    1
    2
    3
    4
    5
    6
    7
    $('button.scrollsomething').on('click', function() {
      $.smoothScroll({
        scrollElement: $('div.scrollme'),
        scrollTarget: '#findme'
      });
      return false;
    });
    +
    1
    2
    3
    4
    5
    6
    7
    $('button.scrollsomething').on('click', function() {
      $.smoothScroll({
        scrollElement: $('div.scrollme'),
        scrollTarget: '#findme'
      });
      return false;
    });
  • The $.smoothScroll method can take one or two arguments.

      @@ -129,7 +130,7 @@

      $.smoothScroll

      Additional Option

      The following option, in addition to those listed for $.fn.smoothScroll above, is available for $.smoothScroll:

      -
      1
      2
      3
      4
      5
      {
        // jQuery set of elements you wish to scroll.
        //  if null (default), $('html, body').firstScrollable() is used.
        scrollElement: null
      }
      +
      1
      2
      3
      4
      5
      {
        // jQuery set of elements you wish to scroll.
        //  if null (default), $('html, body').firstScrollable() is used.
        scrollElement: null
      }

      $.fn.scrollable

        @@ -150,19 +151,19 @@

        $.fn.firstScrollable

      Examples

      Smooth scrolling on page load

      -

      If you want to scroll to an element when the page loads, use $.smoothScroll() in a script at the end of the body or use $(document).ready(). To prevent the browser from automatically scrolling to the element on its own, your link on page 1 will need to include a fragment identifier that does not match an element id on page 2. To ensure that users without JavaScript get to the same element, you should modify the link's hash on page 1 with JavaScript. Your script on page 2 will then modify it back to the correct one when you call $.smoothScroll().

      +

      If you want to scroll to an element when the page loads, use $.smoothScroll() in a script at the end of the body or use $(document).ready(). To prevent the browser from automatically scrolling to the element on its own, your link on page 1 will need to include a fragment identifier that does not match an element id on page 2. To ensure that users without JavaScript get to the same element, you should modify the link's hash on page 1 with JavaScript. Your script on page 2 will then modify it back to the correct one when you call $.smoothScroll().

      For example, let's say you want to smooth scroll to <div id="scrolltome"></div> on page-2.html. For page-1.html, your script might do the following:

      -
      1
      2
      3
      4
      5
      $('a[href="page-2.html#scrolltome"]').attr('href', function() {
        var hrefParts = this.href.split(/#/);
        hrefParts[1] = 'smoothScroll' + hrefParts[1];
        return hrefParts.join('#');
      });
      +
      1
      2
      3
      4
      5
      $('a[href="page-2.html#scrolltome"]').attr('href', function() {
        var hrefParts = this.href.split(/#/);
        hrefParts[1] = 'smoothScroll' + hrefParts[1];
        return hrefParts.join('#');
      });
      -

      Then for page-2.html, your script would do this:

      -
      1
      2
      3
      4
      5
      6
      7
      8
      // Call $.smoothScroll if location.hash starts with "#smoothScroll"
      var reSmooth = /^#smoothScroll/;
      var id;
      if (reSmooth.test(location.hash)) {
        // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
        id = '#' + location.hash.replace(reSmooth, '');
        $.smoothScroll({scrollTarget: id});
      }
      +

      Then for page-2.html, your script would do this:

      +
      1
      2
      3
      4
      5
      6
      7
      8
      // Call $.smoothScroll if location.hash starts with "#smoothScroll"
      var reSmooth = /^#smoothScroll/;
      var id;
      if (reSmooth.test(location.hash)) {
        // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
        id = '#' + location.hash.replace(reSmooth, '');
        $.smoothScroll({scrollTarget: id});
      }

      Focus element after scrolling to it.

      Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form. With the smoothScroll plugin, you can use the afterScroll callback function. Here is an example that focuses the first input within the form after scrolling to the form:

      -
      1
      2
      3
      4
      5
      $('a.example').smoothScroll({
        afterScroll: function(options) {
          $(options.scrollTarget).find('input')[0].focus();
        }
      });
      +
      1
      2
      3
      4
      5
      $('a.example').smoothScroll({
        afterScroll: function(options) {
          $(options.scrollTarget).find('input')[0].focus();
        }
      });

      For accessibility reasons, it might make sense to focus any element you scroll to, even if it's not a natively focusable element. To do so, you could add a tabIndex attribute to the target element:

      -
      1
      2
      3
      4
      5
      6
      7
      8
      $('a.example').smoothScroll({
        afterScroll: function(options) {
          var $tgt = $(options.scrollTarget);
          $tgt.attr('tabIndex', '0');
          // Using $tgt[0] allows us to call .focus() on the DOM node itself, not the jQuery collection
          $tgt[0].focus();
        }
      });
      +
      1
      2
      3
      4
      5
      6
      7
      8
      $('a.example').smoothScroll({
        afterScroll: function(options) {
          var $tgt = $(options.scrollTarget);
          $tgt.attr('tabIndex', '0');
          // Using $tgt[0] allows us to call .focus() on the DOM node itself, not the jQuery collection
          $tgt[0].focus();
        }
      });

      Notes

        diff --git a/package.json b/package.json index c52888a..021ba5c 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "demo": "http://plugins.learningjquery.com/smooth-scroll/demo/", "license": "MIT", "dependencies": { - "jquery": ">=1.4.2" + "jquery": ">=1.7.0" }, "devDependencies": { "grunt": "^0.4.5", From 80e9fc790aa677919820a98bd9b97935c2d11973 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Wed, 7 Sep 2016 09:17:52 -0400 Subject: [PATCH 31/63] Bump to 2.0.1 --- bower.json | 1 + jquery.smooth-scroll.js | 4 ++-- jquery.smooth-scroll.min.js | 4 ++-- package.json | 2 +- src/jquery.smooth-scroll.js | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index 30899b8..effbfbf 100644 --- a/bower.json +++ b/bower.json @@ -3,6 +3,7 @@ "name": "jquery-smooth-scroll", "main": "jquery.smooth-scroll.js", "homepage": "https://github.com/kswedberg/jquery-smooth-scroll", + "version": "2.0.1", "repository": { "type": "git", "url": "https://github.com/kswedberg/jquery-smooth-scroll" diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index e63ae9e..7455479 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ /*! - * jQuery Smooth Scroll - v2.0.0 - 2016-07-31 + * jQuery Smooth Scroll - v2.0.1 - 2016-09-07 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2016 Karl Swedberg * Licensed MIT @@ -18,7 +18,7 @@ } }(function($) { - var version = '2.0.0'; + var version = '2.0.1'; var optionOverrides = {}; var defaults = { exclude: [], diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index e71624a..c4f04c9 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,8 +1,8 @@ /*! - * jQuery Smooth Scroll - v2.0.0 - 2016-07-31 + * jQuery Smooth Scroll - v2.0.1 - 2016-09-07 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2016 Karl Swedberg * Licensed MIT */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){var b="2.0.0",c={},d={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},e=function(b){var c=[],d=!1,e=b.dir&&"left"===b.dir?"scrollLeft":"scrollTop";return this.each(function(){var b=a(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(b[e]()>0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j Date: Sun, 1 Jan 2017 13:57:14 -0500 Subject: [PATCH 32/63] Add relative scroll feature --- src/jquery.smooth-scroll.js | 42 ++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index 81ed452..5119aff 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -105,6 +105,7 @@ return scrollable; }; + var rRelative = /^([\-\+]=)(\d+)/; $.fn.extend({ scrollable: function(dir) { var scrl = getScrollable.call(this, {dir: dir}); @@ -203,20 +204,37 @@ } }); + var getExplicitOffset = function(val) { + var explicit = {relative: ''}; + var parts = typeof val === 'string' && rRelative.exec(val); + + if (typeof val === 'number') { + explicit.px = val; + } else if (parts) { + explicit.relative = parts[1]; + explicit.px = parseFloat(parts[2]) || 0; + } + + return explicit; + }; + $.smoothScroll = function(options, px) { if (options === 'options' && typeof px === 'object') { return $.extend(optionOverrides, px); } - var opts, $scroller, scrollTargetOffset, speed, delta; + var opts, $scroller, speed, delta; + var explicitOffset = getExplicitOffset(options); + var scrollTargetOffset = {}; var scrollerOffset = 0; var offPos = 'offset'; var scrollDir = 'scrollTop'; var aniProps = {}; var aniOpts = {}; - if (typeof options === 'number') { + console.log(explicitOffset); + + if (explicitOffset.px) { opts = $.extend({link: null}, $.fn.smoothScroll.defaults, optionOverrides); - scrollTargetOffset = options; } else { opts = $.extend({link: null}, $.fn.smoothScroll.defaults, options || {}, optionOverrides); @@ -227,6 +245,10 @@ opts.scrollElement.css('position', 'relative'); } } + + if (px) { + explicitOffset = getExplicitOffset(px); + } } scrollDir = opts.direction === 'left' ? 'scrollLeft' : scrollDir; @@ -234,7 +256,7 @@ if (opts.scrollElement) { $scroller = opts.scrollElement; - if (!(/^(?:HTML|BODY)$/).test($scroller[0].nodeName)) { + if (!explicitOffset.px && !(/^(?:HTML|BODY)$/).test($scroller[0].nodeName)) { scrollerOffset = $scroller[scrollDir](); } } else { @@ -244,13 +266,13 @@ // beforeScroll callback function must fire before calculating offset opts.beforeScroll.call($scroller, opts); - scrollTargetOffset = (typeof options === 'number') ? options : - px || - ($(opts.scrollTarget)[offPos]() && - $(opts.scrollTarget)[offPos]()[opts.direction]) || - 0; + scrollTargetOffset = explicitOffset.px ? explicitOffset : { + relative: '', + px: ($(opts.scrollTarget)[offPos]() && $(opts.scrollTarget)[offPos]()[opts.direction]) || 0 + }; + + aniProps[scrollDir] = scrollTargetOffset.relative + (scrollTargetOffset.px + scrollerOffset + opts.offset); - aniProps[scrollDir] = scrollTargetOffset + scrollerOffset + opts.offset; speed = opts.speed; // automatically calculate the speed of the scroll based on distance / coefficient From fc48ff1b77fb4156439a7aee875571e65ba1a348 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 1 Jan 2017 13:57:33 -0500 Subject: [PATCH 33/63] Tests for relative scroll feature --- test/tests.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/test/tests.js b/test/tests.js index 0c4b426..68ed132 100644 --- a/test/tests.js +++ b/test/tests.js @@ -55,3 +55,49 @@ QUnit.test('Scrolls the #scrollable element, or not.', function(assert) { }); }); }); + +QUnit.test('Scrolls the #scrollable element to absolute or relative scroll position', function(assert) { + var done = assert.async(3); + + var finalScroll = function() { + $.smoothScroll({ + scrollElement: $('#scrollable'), + speed: 100, + afterScroll: function() { + var scrollTop = $('#scrollable').scrollTop(); + assert.equal(scrollTop, 10, '#scrollable element scrolls back to 10'); + + // Trigger the next scroll, which should actually work + done(); + } + }, 10); + }; + + $.smoothScroll({ + scrollElement: $('#scrollable'), + speed: 100, + afterScroll: function() { + var scrollTop = $('#scrollable').scrollTop(); + assert.equal(scrollTop, 15, '#scrollable element scrolls to 15'); + + // Trigger the next scroll, which should actually work + $('#scrollit').trigger('click'); + done(); + } + }, 15); + + $('#scrollit').bind('click', function(event) { + event.preventDefault(); + + $.smoothScroll({ + scrollElement: $('#scrollable'), + speed: 100, + afterScroll: function() { + var scrollTop = $('#scrollable').scrollTop(); + assert.equal(scrollTop, 25, '#scrollable element scrolls "+=10" to 25'); + done(); + finalScroll(); + } + }, '+=10'); + }); +}); From cced664f07e55f061f9b1b81f95121ca71ada817 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 1 Jan 2017 13:58:02 -0500 Subject: [PATCH 34/63] Add relative scroll to demo and general demo cleanup --- demo/bbq.html | 74 +++++++++---------- demo/demo.css | 88 +++++++++++++++++++++++ demo/hashchange.html | 65 ++++++++--------- demo/index.html | 166 ++++++++++++++++++++++++------------------- 4 files changed, 244 insertions(+), 149 deletions(-) create mode 100644 demo/demo.css diff --git a/demo/bbq.html b/demo/bbq.html index 1af2fac..439bc51 100644 --- a/demo/bbq.html +++ b/demo/bbq.html @@ -2,46 +2,40 @@ - Smooth Scroll jQuery Plugin Demo - + + Smooth Scroll jQuery Plugin Demo - BBQ + + -

        Smooth Scroll jQuery Plugin with Back Button Support

        - -

        p1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        -

        p2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        - back to nav -

        p3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        - back to nav -

        p4 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        - back to nav -

        p5 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        - back to nav -

        p6 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        - back to nav +

        Smooth Scroll jQuery Plugin with Back Button Support

        +
        + +

        p1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        +

        p2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        + back to nav +

        p3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        + back to nav +

        p4 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        + back to nav +

        p5 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        + back to nav +

        p6 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        + back to nav + +
        @@ -53,15 +47,17 @@

        Smooth Scroll jQuery Plugin with Back Button Support

        diff --git a/demo/index.html b/demo/index.html index 03ac6e6..ba41838 100644 --- a/demo/index.html +++ b/demo/index.html @@ -3,31 +3,8 @@ Smooth Scroll jQuery Plugin Demo - - + + + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        -

        Scroll the Document to one of the following paragraphs:

        - -

        Try it with jQuery BBQ hashchange support

        -

        Or, native hashchange support (IE9+)

        -

        Toggle scrolling speed for the p1 link

        - - +
        +

        jQuery smoothScroll Demo

        +

        Try it with jQuery BBQ hashchange support or native hashchange support (IE9+)

        +

        Scroll the Document to one of the following paragraphs:

        +
        -
        -
        -

        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -

        -
        - You found me by scrolling horizontally. nice job! -
        -
        -

        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

        -

        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -

        -

        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

        -
        -

        YOU FOUND ME! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -

        -
        - You scrolled horizontally and vertically. Awesome! +
        + +

        Toggle scrolling speed for the p1 link

        + +
        +

        Scrollable div

        +
        +
        +

        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

        +
        + You found me by scrolling horizontally. nice job! +
        +
        +

        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

        +

        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

        +

        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

        +
        +

        YOU FOUND ME! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

        +
        + You scrolled horizontally and vertically. Awesome! +
        +
        +

        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

        +

        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +

        +

        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

        + +

        +

        -

        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

        -

        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -

        -

        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -

        +

        p1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        +

        p2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        +

        p3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        +

        p4 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        +

        p5 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        +

        p6 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        +
        - -

        p1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        -

        p2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        -

        p3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        -

        p4 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        -

        p5 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        -

        p6 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

        - -
        From 0ded196296b398363f8cd719f3cd94dfc5f11818 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 1 Jan 2017 13:58:40 -0500 Subject: [PATCH 35/63] Release 2.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5190db2..a72d7db 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jquery-smooth-scroll", "title": "jQuery Smooth Scroll", - "version": "2.0.1", + "version": "2.1.0", "scripts": {}, "main": "jquery.smooth-scroll.js", "author": { From 8cc29da87a47452ce61e8d34357ec40408e31b4d Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 1 Jan 2017 14:01:52 -0500 Subject: [PATCH 36/63] Build and bump to 2.1.1 --- bower.json | 2 +- index.html | 16 ++++++------- jquery.smooth-scroll.js | 48 +++++++++++++++++++++++++++---------- jquery.smooth-scroll.min.js | 6 ++--- package.json | 2 +- src/jquery.smooth-scroll.js | 2 +- 6 files changed, 49 insertions(+), 27 deletions(-) diff --git a/bower.json b/bower.json index effbfbf..9682965 100644 --- a/bower.json +++ b/bower.json @@ -3,7 +3,7 @@ "name": "jquery-smooth-scroll", "main": "jquery.smooth-scroll.js", "homepage": "https://github.com/kswedberg/jquery-smooth-scroll", - "version": "2.0.1", + "version": "2.1.1", "repository": { "type": "git", "url": "https://github.com/kswedberg/jquery-smooth-scroll" diff --git a/index.html b/index.html index 9bfd7a0..32f6a7c 100644 --- a/index.html +++ b/index.html @@ -78,7 +78,7 @@

        Smooth Scroll Plugin

        Note: Version 2.0+ of this plugin requires jQuery version 1.7 or greater.

        Download

        Using npm:

        -
        1
        npm install jquery-smooth-scroll
        +
        1
        npm install jquery-smooth-scroll

        The old-fashioned way:

        Go to the following URL in your browser and copy/paste the code into your own file: @@ -99,7 +99,7 @@

        $.fn.smoothScroll

      Options

      The following options, shown with their default values, are available for both $.fn.smoothScroll and $.smoothScroll:

      -
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      {
        offset: 0,
       
        // one of 'top' or 'left'
        direction: 'top',
       
        // only use if you want to override default behavior
        scrollTarget: null,
       
        // string to use as selector for event delegation
        delegateSelector: null,
       
        // fn(opts) function to be called before scrolling occurs.
        // `this` is the element(s) being scrolled
        beforeScroll: function() {},
       
        // fn(opts) function to be called after scrolling occurs.
        // `this` is the triggering element
        afterScroll: function() {},
       
        // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin
        // from jQuery UI or elsewhere
        easing: 'swing',
       
        // speed can be a number or 'auto'
        // if 'auto', the speed will be calculated based on the formula:
        // (current scroll position - target scroll position) / autoCoeffic
        speed: 400,
       
        // autoCoefficent: Only used when speed set to "auto".
        // The higher this number, the faster the scroll speed
        autoCoefficient: 2,
       
        // $.fn.smoothScroll only: whether to prevent the default click action
        preventDefault: true
       
      }
      +
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      {
        offset: 0,
       
        // one of 'top' or 'left'
        direction: 'top',
       
        // only use if you want to override default behavior
        scrollTarget: null,
       
        // string to use as selector for event delegation
        delegateSelector: null,
       
        // fn(opts) function to be called before scrolling occurs.
        // `this` is the element(s) being scrolled
        beforeScroll: function() {},
       
        // fn(opts) function to be called after scrolling occurs.
        // `this` is the triggering element
        afterScroll: function() {},
       
        // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin
        // from jQuery UI or elsewhere
        easing: 'swing',
       
        // speed can be a number or 'auto'
        // if 'auto', the speed will be calculated based on the formula:
        // (current scroll position - target scroll position) / autoCoeffic
        speed: 400,
       
        // autoCoefficent: Only used when speed set to "auto".
        // The higher this number, the faster the scroll speed
        autoCoefficient: 2,
       
        // $.fn.smoothScroll only: whether to prevent the default click action
        preventDefault: true
       
      }

      The options object for $.fn.smoothScroll can take two additional properties: exclude and excludeWithin. The value for both of these is an array of @@ -116,7 +116,7 @@

      $.smoothScroll

      document.body)
    • Doesn't automatically fire, so you need to bind it to some other user interaction. For example:

      -
      1
      2
      3
      4
      5
      6
      7
      $('button.scrollsomething').on('click', function() {
        $.smoothScroll({
          scrollElement: $('div.scrollme'),
          scrollTarget: '#findme'
        });
        return false;
      });
      +
      1
      2
      3
      4
      5
      6
      7
      $('button.scrollsomething').on('click', function() {
        $.smoothScroll({
          scrollElement: $('div.scrollme'),
          scrollTarget: '#findme'
        });
        return false;
      });
    • The $.smoothScroll method can take one or two arguments.

        @@ -130,7 +130,7 @@

        $.smoothScroll

        Additional Option

        The following option, in addition to those listed for $.fn.smoothScroll above, is available for $.smoothScroll:

        -
        1
        2
        3
        4
        5
        {
          // jQuery set of elements you wish to scroll.
          //  if null (default), $('html, body').firstScrollable() is used.
          scrollElement: null
        }
        +
        1
        2
        3
        4
        5
        {
          // jQuery set of elements you wish to scroll.
          //  if null (default), $('html, body').firstScrollable() is used.
          scrollElement: null
        }

        $.fn.scrollable

          @@ -153,17 +153,17 @@

          Examples

          Smooth scrolling on page load

          If you want to scroll to an element when the page loads, use $.smoothScroll() in a script at the end of the body or use $(document).ready(). To prevent the browser from automatically scrolling to the element on its own, your link on page 1 will need to include a fragment identifier that does not match an element id on page 2. To ensure that users without JavaScript get to the same element, you should modify the link's hash on page 1 with JavaScript. Your script on page 2 will then modify it back to the correct one when you call $.smoothScroll().

          For example, let's say you want to smooth scroll to <div id="scrolltome"></div> on page-2.html. For page-1.html, your script might do the following:

          -
          1
          2
          3
          4
          5
          $('a[href="page-2.html#scrolltome"]').attr('href', function() {
            var hrefParts = this.href.split(/#/);
            hrefParts[1] = 'smoothScroll' + hrefParts[1];
            return hrefParts.join('#');
          });
          +
          1
          2
          3
          4
          5
          $('a[href="page-2.html#scrolltome"]').attr('href', function() {
            var hrefParts = this.href.split(/#/);
            hrefParts[1] = 'smoothScroll' + hrefParts[1];
            return hrefParts.join('#');
          });

          Then for page-2.html, your script would do this:

          -
          1
          2
          3
          4
          5
          6
          7
          8
          // Call $.smoothScroll if location.hash starts with "#smoothScroll"
          var reSmooth = /^#smoothScroll/;
          var id;
          if (reSmooth.test(location.hash)) {
            // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
            id = '#' + location.hash.replace(reSmooth, '');
            $.smoothScroll({scrollTarget: id});
          }
          +
          1
          2
          3
          4
          5
          6
          7
          8
          // Call $.smoothScroll if location.hash starts with "#smoothScroll"
          var reSmooth = /^#smoothScroll/;
          var id;
          if (reSmooth.test(location.hash)) {
            // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
            id = '#' + location.hash.replace(reSmooth, '');
            $.smoothScroll({scrollTarget: id});
          }

          Focus element after scrolling to it.

          Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form. With the smoothScroll plugin, you can use the afterScroll callback function. Here is an example that focuses the first input within the form after scrolling to the form:

          -
          1
          2
          3
          4
          5
          $('a.example').smoothScroll({
            afterScroll: function(options) {
              $(options.scrollTarget).find('input')[0].focus();
            }
          });
          +
          1
          2
          3
          4
          5
          $('a.example').smoothScroll({
            afterScroll: function(options) {
              $(options.scrollTarget).find('input')[0].focus();
            }
          });

          For accessibility reasons, it might make sense to focus any element you scroll to, even if it's not a natively focusable element. To do so, you could add a tabIndex attribute to the target element:

          -
          1
          2
          3
          4
          5
          6
          7
          8
          $('a.example').smoothScroll({
            afterScroll: function(options) {
              var $tgt = $(options.scrollTarget);
              $tgt.attr('tabIndex', '0');
              // Using $tgt[0] allows us to call .focus() on the DOM node itself, not the jQuery collection
              $tgt[0].focus();
            }
          });
          +
          1
          2
          3
          4
          5
          6
          7
          8
          $('a.example').smoothScroll({
            afterScroll: function(options) {
              var $tgt = $(options.scrollTarget);
              $tgt.attr('tabIndex', '0');
              // Using $tgt[0] allows us to call .focus() on the DOM node itself, not the jQuery collection
              $tgt[0].focus();
            }
          });

          Notes

            diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index 7455479..88a82f0 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,7 +1,7 @@ /*! - * jQuery Smooth Scroll - v2.0.1 - 2016-09-07 + * jQuery Smooth Scroll - v2.1.1 - 2017-01-01 * https://github.com/kswedberg/jquery-smooth-scroll - * Copyright (c) 2016 Karl Swedberg + * Copyright (c) 2017 Karl Swedberg * Licensed MIT */ @@ -18,7 +18,7 @@ } }(function($) { - var version = '2.0.1'; + var version = '2.1.1'; var optionOverrides = {}; var defaults = { exclude: [], @@ -124,6 +124,7 @@ return scrollable; }; + var rRelative = /^([\-\+]=)(\d+)/; $.fn.extend({ scrollable: function(dir) { var scrl = getScrollable.call(this, {dir: dir}); @@ -222,20 +223,37 @@ } }); + var getExplicitOffset = function(val) { + var explicit = {relative: ''}; + var parts = typeof val === 'string' && rRelative.exec(val); + + if (typeof val === 'number') { + explicit.px = val; + } else if (parts) { + explicit.relative = parts[1]; + explicit.px = parseFloat(parts[2]) || 0; + } + + return explicit; + }; + $.smoothScroll = function(options, px) { if (options === 'options' && typeof px === 'object') { return $.extend(optionOverrides, px); } - var opts, $scroller, scrollTargetOffset, speed, delta; + var opts, $scroller, speed, delta; + var explicitOffset = getExplicitOffset(options); + var scrollTargetOffset = {}; var scrollerOffset = 0; var offPos = 'offset'; var scrollDir = 'scrollTop'; var aniProps = {}; var aniOpts = {}; - if (typeof options === 'number') { + console.log(explicitOffset); + + if (explicitOffset.px) { opts = $.extend({link: null}, $.fn.smoothScroll.defaults, optionOverrides); - scrollTargetOffset = options; } else { opts = $.extend({link: null}, $.fn.smoothScroll.defaults, options || {}, optionOverrides); @@ -246,6 +264,10 @@ opts.scrollElement.css('position', 'relative'); } } + + if (px) { + explicitOffset = getExplicitOffset(px); + } } scrollDir = opts.direction === 'left' ? 'scrollLeft' : scrollDir; @@ -253,7 +275,7 @@ if (opts.scrollElement) { $scroller = opts.scrollElement; - if (!(/^(?:HTML|BODY)$/).test($scroller[0].nodeName)) { + if (!explicitOffset.px && !(/^(?:HTML|BODY)$/).test($scroller[0].nodeName)) { scrollerOffset = $scroller[scrollDir](); } } else { @@ -263,13 +285,13 @@ // beforeScroll callback function must fire before calculating offset opts.beforeScroll.call($scroller, opts); - scrollTargetOffset = (typeof options === 'number') ? options : - px || - ($(opts.scrollTarget)[offPos]() && - $(opts.scrollTarget)[offPos]()[opts.direction]) || - 0; + scrollTargetOffset = explicitOffset.px ? explicitOffset : { + relative: '', + px: ($(opts.scrollTarget)[offPos]() && $(opts.scrollTarget)[offPos]()[opts.direction]) || 0 + }; + + aniProps[scrollDir] = scrollTargetOffset.relative + (scrollTargetOffset.px + scrollerOffset + opts.offset); - aniProps[scrollDir] = scrollTargetOffset + scrollerOffset + opts.offset; speed = opts.speed; // automatically calculate the speed of the scroll based on distance / coefficient diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index c4f04c9..983c4ac 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,8 +1,8 @@ /*! - * jQuery Smooth Scroll - v2.0.1 - 2016-09-07 + * jQuery Smooth Scroll - v2.1.1 - 2017-01-01 * https://github.com/kswedberg/jquery-smooth-scroll - * Copyright (c) 2016 Karl Swedberg + * Copyright (c) 2017 Karl Swedberg * Licensed MIT */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){var b="2.0.1",c={},d={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},e=function(b){var c=[],d=!1,e=b.dir&&"left"===b.dir?"scrollLeft":"scrollTop";return this.each(function(){var b=a(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(b[e]()>0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c};a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c},f=/^([\-\+]=)(\d+)/;a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j Date: Sun, 1 Jan 2017 14:20:45 -0500 Subject: [PATCH 37/63] Update docs to include relative scrolling --- index.html | 25 +++++++++++++++---------- readme.md | 17 ++++++++++++++--- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 32f6a7c..30d6035 100644 --- a/index.html +++ b/index.html @@ -78,7 +78,7 @@

            Smooth Scroll Plugin

            Note: Version 2.0+ of this plugin requires jQuery version 1.7 or greater.

            Download

            Using npm:

            -
            1
            npm install jquery-smooth-scroll
            +
            1
            npm install jquery-smooth-scroll

            The old-fashioned way:

            Go to the following URL in your browser and copy/paste the code into your own file: @@ -99,7 +99,7 @@

            $.fn.smoothScroll

          Options

          The following options, shown with their default values, are available for both $.fn.smoothScroll and $.smoothScroll:

          -
          1
          2
          3
          4
          5
          6
          7
          8
          9
          10
          11
          12
          13
          14
          15
          16
          17
          18
          19
          20
          21
          22
          23
          24
          25
          26
          27
          28
          29
          30
          31
          32
          33
          34
          35
          36
          37
          {
            offset: 0,
           
            // one of 'top' or 'left'
            direction: 'top',
           
            // only use if you want to override default behavior
            scrollTarget: null,
           
            // string to use as selector for event delegation
            delegateSelector: null,
           
            // fn(opts) function to be called before scrolling occurs.
            // `this` is the element(s) being scrolled
            beforeScroll: function() {},
           
            // fn(opts) function to be called after scrolling occurs.
            // `this` is the triggering element
            afterScroll: function() {},
           
            // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin
            // from jQuery UI or elsewhere
            easing: 'swing',
           
            // speed can be a number or 'auto'
            // if 'auto', the speed will be calculated based on the formula:
            // (current scroll position - target scroll position) / autoCoeffic
            speed: 400,
           
            // autoCoefficent: Only used when speed set to "auto".
            // The higher this number, the faster the scroll speed
            autoCoefficient: 2,
           
            // $.fn.smoothScroll only: whether to prevent the default click action
            preventDefault: true
           
          }
          +
          1
          2
          3
          4
          5
          6
          7
          8
          9
          10
          11
          12
          13
          14
          15
          16
          17
          18
          19
          20
          21
          22
          23
          24
          25
          26
          27
          28
          29
          30
          31
          32
          33
          34
          35
          36
          37
          {
            offset: 0,
           
            // one of 'top' or 'left'
            direction: 'top',
           
            // only use if you want to override default behavior
            scrollTarget: null,
           
            // string to use as selector for event delegation
            delegateSelector: null,
           
            // fn(opts) function to be called before scrolling occurs.
            // `this` is the element(s) being scrolled
            beforeScroll: function() {},
           
            // fn(opts) function to be called after scrolling occurs.
            // `this` is the triggering element
            afterScroll: function() {},
           
            // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin
            // from jQuery UI or elsewhere
            easing: 'swing',
           
            // speed can be a number or 'auto'
            // if 'auto', the speed will be calculated based on the formula:
            // (current scroll position - target scroll position) / autoCoeffic
            speed: 400,
           
            // autoCoefficent: Only used when speed set to "auto".
            // The higher this number, the faster the scroll speed
            autoCoefficient: 2,
           
            // $.fn.smoothScroll only: whether to prevent the default click action
            preventDefault: true
           
          }

          The options object for $.fn.smoothScroll can take two additional properties: exclude and excludeWithin. The value for both of these is an array of @@ -116,21 +116,22 @@

          $.smoothScroll

          document.body)
        • Doesn't automatically fire, so you need to bind it to some other user interaction. For example:

          -
          1
          2
          3
          4
          5
          6
          7
          $('button.scrollsomething').on('click', function() {
            $.smoothScroll({
              scrollElement: $('div.scrollme'),
              scrollTarget: '#findme'
            });
            return false;
          });
          +
          1
          2
          3
          4
          5
          6
          7
          $('button.scrollsomething').on('click', function() {
            $.smoothScroll({
              scrollElement: $('div.scrollme'),
              scrollTarget: '#findme'
            });
            return false;
          });
        • The $.smoothScroll method can take one or two arguments.

            -
          • If the first argument is a number, the document is scrolled to that +
          • If the first argument is a number or a "relative string," the document is scrolled to that position. If it's an options object, those options determine how the document (or other element) will be scrolled.
          • -
          • If a number is provided as the second argument, it will override whatever may have been set for the scrollTarget option.
          • +
          • If a number or "relative string" is provided as the second argument, it will override whatever may have been set for the scrollTarget option.
          • +
          • The relative string syntax, introduced in version 2.1, looks like +=100px or -=50px (see below for an example).

        Additional Option

        The following option, in addition to those listed for $.fn.smoothScroll above, is available for $.smoothScroll:

        -
        1
        2
        3
        4
        5
        {
          // jQuery set of elements you wish to scroll.
          //  if null (default), $('html, body').firstScrollable() is used.
          scrollElement: null
        }
        +
        1
        2
        3
        4
        5
        {
          // The jQuery set of elements you wish to scroll.
          //  if null (default), $('html, body').firstScrollable() is used.
          scrollElement: null
        }

        $.fn.scrollable

          @@ -150,20 +151,24 @@

          $.fn.firstScrollable

          someSpeed)

        Examples

        +

        Scroll down one "page" at a time (v2.1+)

        +

        With smoothScroll version 2.1 and later, you can use the "relative string" syntax to scroll an element or the document a certain number of pixels relative to its current position. The following code will scroll the document down one page at a time when the user clicks the ".pagedown" button:

        +
        1
        2
        3
        $('button.pagedown').on('click', function() {
          $.smoothScroll('+=' + $(window).height());
        });
        +

        Smooth scrolling on page load

        If you want to scroll to an element when the page loads, use $.smoothScroll() in a script at the end of the body or use $(document).ready(). To prevent the browser from automatically scrolling to the element on its own, your link on page 1 will need to include a fragment identifier that does not match an element id on page 2. To ensure that users without JavaScript get to the same element, you should modify the link's hash on page 1 with JavaScript. Your script on page 2 will then modify it back to the correct one when you call $.smoothScroll().

        For example, let's say you want to smooth scroll to <div id="scrolltome"></div> on page-2.html. For page-1.html, your script might do the following:

        -
        1
        2
        3
        4
        5
        $('a[href="page-2.html#scrolltome"]').attr('href', function() {
          var hrefParts = this.href.split(/#/);
          hrefParts[1] = 'smoothScroll' + hrefParts[1];
          return hrefParts.join('#');
        });
        +
        1
        2
        3
        4
        5
        $('a[href="page-2.html#scrolltome"]').attr('href', function() {
          var hrefParts = this.href.split(/#/);
          hrefParts[1] = 'smoothScroll' + hrefParts[1];
          return hrefParts.join('#');
        });

        Then for page-2.html, your script would do this:

        -
        1
        2
        3
        4
        5
        6
        7
        8
        // Call $.smoothScroll if location.hash starts with "#smoothScroll"
        var reSmooth = /^#smoothScroll/;
        var id;
        if (reSmooth.test(location.hash)) {
          // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
          id = '#' + location.hash.replace(reSmooth, '');
          $.smoothScroll({scrollTarget: id});
        }
        +
        1
        2
        3
        4
        5
        6
        7
        8
        // Call $.smoothScroll if location.hash starts with "#smoothScroll"
        var reSmooth = /^#smoothScroll/;
        var id;
        if (reSmooth.test(location.hash)) {
          // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
          id = '#' + location.hash.replace(reSmooth, '');
          $.smoothScroll({scrollTarget: id});
        }

        Focus element after scrolling to it.

        Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form. With the smoothScroll plugin, you can use the afterScroll callback function. Here is an example that focuses the first input within the form after scrolling to the form:

        -
        1
        2
        3
        4
        5
        $('a.example').smoothScroll({
          afterScroll: function(options) {
            $(options.scrollTarget).find('input')[0].focus();
          }
        });
        +
        1
        2
        3
        4
        5
        $('a.example').smoothScroll({
          afterScroll: function(options) {
            $(options.scrollTarget).find('input')[0].focus();
          }
        });

        For accessibility reasons, it might make sense to focus any element you scroll to, even if it's not a natively focusable element. To do so, you could add a tabIndex attribute to the target element:

        -
        1
        2
        3
        4
        5
        6
        7
        8
        $('a.example').smoothScroll({
          afterScroll: function(options) {
            var $tgt = $(options.scrollTarget);
            $tgt.attr('tabIndex', '0');
            // Using $tgt[0] allows us to call .focus() on the DOM node itself, not the jQuery collection
            $tgt[0].focus();
          }
        });
        +
        1
        2
        3
        4
        5
        6
        7
        8
        $('a.example').smoothScroll({
          afterScroll: function(options) {
            var $tgt = $(options.scrollTarget);
            $tgt.attr('tabIndex', '0');
            // Using $tgt[0] allows us to call .focus() on the DOM node itself, not the jQuery collection
            $tgt[0].focus();
          }
        });

        Notes

          diff --git a/readme.md b/readme.md index 39826d8..6b7b786 100644 --- a/readme.md +++ b/readme.md @@ -108,10 +108,11 @@ options object as the second. }); * The `$.smoothScroll` method can take one or two arguments. - * If the first argument is a number, the document is scrolled to that + * If the first argument is a number or a "relative string," the document is scrolled to that position. If it's an options object, those options determine how the document (or other element) will be scrolled. - * If a number is provided as the second argument, it will override whatever may have been set for the `scrollTarget` option. + * If a number or "relative string" is provided as the second argument, it will override whatever may have been set for the `scrollTarget` option. + * The relative string syntax, introduced in version 2.1, looks like `+=100px` or `-=50px` (see below for an example). #### Additional Option The following option, in addition to those listed for `$.fn.smoothScroll` above, is available @@ -119,7 +120,7 @@ for `$.smoothScroll`: ```javascript { - // jQuery set of elements you wish to scroll. + // The jQuery set of elements you wish to scroll. // if null (default), $('html, body').firstScrollable() is used. scrollElement: null } @@ -144,6 +145,16 @@ for `$.smoothScroll`: ## Examples +### Scroll down one "page" at a time (v2.1+) + +With smoothScroll version 2.1 and later, you can use the "relative string" syntax to scroll an element or the document a certain number of pixels relative to its current position. The following code will scroll the document down one page at a time when the user clicks the ".pagedown" button: + + ```js + $('button.pagedown').on('click', function() { + $.smoothScroll('+=' + $(window).height()); + }); + ``` + ### Smooth scrolling on page load If you want to scroll to an element when the page loads, use `$.smoothScroll()` in a script at the end of the body or use `$(document).ready()`. To prevent the browser from automatically scrolling to the element on its own, your link on page 1 will need to include a fragment identifier that does _not_ match an element id on page 2. To ensure that users without JavaScript get to the same element, you should modify the link's hash on page 1 with JavaScript. Your script on page 2 will then modify it back to the correct one when you call `$.smoothScroll()`. From db02ef1e8c54a19f1654d8e0e79122bdedd7bbf4 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 1 Jan 2017 14:25:32 -0500 Subject: [PATCH 38/63] Tweak readme --- readme.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/readme.md b/readme.md index 6b7b786..cad38fb 100644 --- a/readme.md +++ b/readme.md @@ -98,21 +98,21 @@ options object as the second. `document.body`) * Doesn't automatically fire, so you need to bind it to some other user interaction. For example: - - $('button.scrollsomething').on('click', function() { - $.smoothScroll({ - scrollElement: $('div.scrollme'), - scrollTarget: '#findme' - }); - return false; - }); - + ```js + $('button.scrollsomething').on('click', function() { + $.smoothScroll({ + scrollElement: $('div.scrollme'), + scrollTarget: '#findme' + }); + return false; + }); + ``` * The `$.smoothScroll` method can take one or two arguments. * If the first argument is a number or a "relative string," the document is scrolled to that position. If it's an options object, those options determine how the document (or other element) will be scrolled. * If a number or "relative string" is provided as the second argument, it will override whatever may have been set for the `scrollTarget` option. - * The relative string syntax, introduced in version 2.1, looks like `+=100px` or `-=50px` (see below for an example). + * The relative string syntax, introduced in version 2.1, looks like `"+=100px"` or `"-=50px"` (see below for an example). #### Additional Option The following option, in addition to those listed for `$.fn.smoothScroll` above, is available From be5bc554c2f9dce4502453629faf712d601837b9 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 1 Jan 2017 14:29:22 -0500 Subject: [PATCH 39/63] Add link from demo to repo --- demo/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/demo/index.html b/demo/index.html index ba41838..b8ea84d 100644 --- a/demo/index.html +++ b/demo/index.html @@ -87,6 +87,7 @@

          jQuery smoothScroll Demo

          +

          View GitHub Repo

          Try it with jQuery BBQ hashchange support or native hashchange support (IE9+)

          Scroll the Document to one of the following paragraphs:

          From 6905213c917392bcaea5c09db56603a923d20b59 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sun, 1 Jan 2017 14:37:25 -0500 Subject: [PATCH 40/63] Demo css tweak --- demo/demo.css | 1 + 1 file changed, 1 insertion(+) diff --git a/demo/demo.css b/demo/demo.css index 5aa2c2d..ac3a0ff 100644 --- a/demo/demo.css +++ b/demo/demo.css @@ -1,6 +1,7 @@ body { font-family: Helvetica, Arial, sans-serif; color: #353536; + line-height: 1.4; } h1 { margin-top: 0; From 9090002f326aa36f0ecb066a9181fbf178ebfdcf Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Thu, 19 Jan 2017 08:38:00 -0500 Subject: [PATCH 41/63] Remove console.log. Thanks, @Daijobou! --- src/jquery.smooth-scroll.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index 84c6b01..0580749 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -231,8 +231,6 @@ var aniProps = {}; var aniOpts = {}; - console.log(explicitOffset); - if (explicitOffset.px) { opts = $.extend({link: null}, $.fn.smoothScroll.defaults, optionOverrides); } else { From 1136a50566a316ca7db12ac3f8e3856a238b0cc9 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Thu, 19 Jan 2017 08:57:13 -0500 Subject: [PATCH 42/63] Build and patch increment --- bower.json | 2 +- jquery.smooth-scroll.js | 6 ++---- jquery.smooth-scroll.min.js | 4 ++-- package.json | 2 +- src/jquery.smooth-scroll.js | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/bower.json b/bower.json index 9682965..8e0ccdc 100644 --- a/bower.json +++ b/bower.json @@ -3,7 +3,7 @@ "name": "jquery-smooth-scroll", "main": "jquery.smooth-scroll.js", "homepage": "https://github.com/kswedberg/jquery-smooth-scroll", - "version": "2.1.1", + "version": "2.1.2", "repository": { "type": "git", "url": "https://github.com/kswedberg/jquery-smooth-scroll" diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index 88a82f0..0ea4440 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ /*! - * jQuery Smooth Scroll - v2.1.1 - 2017-01-01 + * jQuery Smooth Scroll - v2.1.2 - 2017-01-19 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2017 Karl Swedberg * Licensed MIT @@ -18,7 +18,7 @@ } }(function($) { - var version = '2.1.1'; + var version = '2.1.2'; var optionOverrides = {}; var defaults = { exclude: [], @@ -250,8 +250,6 @@ var aniProps = {}; var aniOpts = {}; - console.log(explicitOffset); - if (explicitOffset.px) { opts = $.extend({link: null}, $.fn.smoothScroll.defaults, optionOverrides); } else { diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index 983c4ac..618942a 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,8 +1,8 @@ /*! - * jQuery Smooth Scroll - v2.1.1 - 2017-01-01 + * jQuery Smooth Scroll - v2.1.2 - 2017-01-19 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2017 Karl Swedberg * Licensed MIT */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){var b="2.1.1",c={},d={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},e=function(b){var c=[],d=!1,e=b.dir&&"left"===b.dir?"scrollLeft":"scrollTop";return this.each(function(){var b=a(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(b[e]()>0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c},f=/^([\-\+]=)(\d+)/;a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c},f=/^([\-\+]=)(\d+)/;a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j Date: Fri, 5 May 2017 11:43:42 -0400 Subject: [PATCH 43/63] Update Grunt & its plugins. Switch to eslint --- .eslintrc.js | 3 +++ Gruntfile.js | 14 +++++--------- package.json | 22 ++++++++++++---------- 3 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..701dd0d --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + extends: 'kswedberg/es5' +}; diff --git a/Gruntfile.js b/Gruntfile.js index 80be692..9e6255e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,5 +1,3 @@ -/*global module:false*/ - module.exports = function(grunt) { var pkg = grunt.file.readJSON('package.json'); var marked = require('marked'); @@ -94,12 +92,10 @@ module.exports = function(grunt) { } } }, - jscs: { - src: 'src/**/*.js', + eslint: { + target: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'], options: { - config: '.jscsrc', - fix: true, - verbose: true + configFile: '.eslintrc.js', } }, version: { @@ -151,7 +147,7 @@ module.exports = function(grunt) { grunt.file.write('bower.json', JSON.stringify(json, null, 2)); }); - grunt.registerTask('lint', ['jshint', 'jscs']); + grunt.registerTask('lint', ['eslint']); grunt.registerTask('build', ['lint', 'concat', 'version', 'updateBower', 'uglify', 'docs']); grunt.registerTask('default', ['build']); @@ -159,7 +155,7 @@ module.exports = function(grunt) { grunt.registerTask(release, ['lint', 'version:src:' + release, 'concat', 'uglify', 'version:banners:' + release, 'version:package:' + release, 'updateBower']); }); - grunt.loadNpmTasks('grunt-jscs'); + grunt.loadNpmTasks('grunt-eslint'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-concat'); diff --git a/package.json b/package.json index 1e2fe71..65607c7 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "author": { "name": "Karl Swedberg", "email": "kswedberg@gmail.com", - "url": "http://www.learningjquery.com/" + "url": "https://karlswedberg.com/" }, "repository": { "type": "git", @@ -22,15 +22,17 @@ "jquery": ">=1.7.0" }, "devDependencies": { - "grunt": "^0.4.5", - "grunt-contrib-concat": "^0.5.1", - "grunt-contrib-jshint": "^0.11.3", - "grunt-contrib-uglify": "^0.11.0", - "grunt-contrib-watch": "^0.6.1", - "grunt-jscs": "^2.5.0", - "grunt-shell": "^1.1.2", - "grunt-version": "^1.0.0", - "marked": "^0.3.5", + "eslint-config-kswedberg": "^1.3.0", + "grunt": "^1.0.1", + "grunt-contrib-concat": "^1.0.1", + "grunt-contrib-jshint": "^1.1.0", + "grunt-contrib-uglify": "^2.3.0", + "grunt-contrib-watch": "^1.0.0", + "grunt-eslint": "^19.0.0", + "grunt-shell": "^2.1.0", + "grunt-version": "^1.1.1", + "lodash": "^4.17.4", + "marked": "^0.3.6", "node-syntaxhighlighter": "^0.8.1", "qunitjs": "^1.20.0" }, From ee541b63373cbcee909adb022c66f82485893623 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Fri, 5 May 2017 11:44:15 -0400 Subject: [PATCH 44/63] Lint tests.js --- test/tests.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/tests.js b/test/tests.js index 68ed132..d9b62e9 100644 --- a/test/tests.js +++ b/test/tests.js @@ -4,6 +4,7 @@ QUnit.module('filterPath'); QUnit.test('Link paths not location path', function(assert) { var locationPath = $.smoothScroll.filterPath(location.pathname); + $('a[href*=#]').each(function() { assert.notEqual(locationPath, this.pathname); }); @@ -13,12 +14,14 @@ QUnit.module('scrollable'); QUnit.test('Returns first scrollable element (html,body)', function(assert) { var scrollable = $('html,body').firstScrollable(); + assert.equal(scrollable.length, 1, 'One scrollable element is returned'); assert.equal(scrollable[0], document.body, 'Scrollable element is '); }); QUnit.test('Returns scrollable element (div#scrollable)', function(assert) { var scrollable = $('#scrollable').scrollable(); + assert.equal(scrollable.length, 1, 'One scrollable element is returned'); assert.equal(scrollable[0].id, 'scrollable', 'Scrollable element is
          '); }); @@ -33,6 +36,7 @@ QUnit.test('Scrolls the #scrollable element, or not.', function(assert) { speed: 200, afterScroll: function() { var scrollTop = $('#scrollable').scrollTop(); + assert.equal(scrollTop, 0, '#scrollable element does not scroll to non-existant element'); // Trigger the next scroll, which should actually work @@ -49,6 +53,7 @@ QUnit.test('Scrolls the #scrollable element, or not.', function(assert) { speed: 200, afterScroll: function() { var scrollTop = $('#scrollable').scrollTop(); + assert.equal(scrollTop, 100, '#scrollable element scrolls'); done(); } @@ -65,6 +70,7 @@ QUnit.test('Scrolls the #scrollable element to absolute or relative scroll posit speed: 100, afterScroll: function() { var scrollTop = $('#scrollable').scrollTop(); + assert.equal(scrollTop, 10, '#scrollable element scrolls back to 10'); // Trigger the next scroll, which should actually work @@ -78,6 +84,7 @@ QUnit.test('Scrolls the #scrollable element to absolute or relative scroll posit speed: 100, afterScroll: function() { var scrollTop = $('#scrollable').scrollTop(); + assert.equal(scrollTop, 15, '#scrollable element scrolls to 15'); // Trigger the next scroll, which should actually work @@ -94,6 +101,7 @@ QUnit.test('Scrolls the #scrollable element to absolute or relative scroll posit speed: 100, afterScroll: function() { var scrollTop = $('#scrollable').scrollTop(); + assert.equal(scrollTop, 25, '#scrollable element scrolls "+=10" to 25'); done(); finalScroll(); From d73ec9374c44191a48cad816170642dfa7042550 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Fri, 5 May 2017 12:20:42 -0400 Subject: [PATCH 45/63] Grunt lint: fix: true --- Gruntfile.js | 1 + demo/index.html | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 9e6255e..a28c743 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -95,6 +95,7 @@ module.exports = function(grunt) { eslint: { target: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'], options: { + fix: true, configFile: '.eslintrc.js', } }, diff --git a/demo/index.html b/demo/index.html index b8ea84d..009a2be 100644 --- a/demo/index.html +++ b/demo/index.html @@ -48,8 +48,11 @@ }); $('#scroll-relative-plus').on('click', function() { - var wHeight = $(window).height(); - $.smoothScroll('+=100px'); + $.smoothScroll({ + afterScroll: function() { + console.log('hello!') + } + }, '+=100px'); }); $('#scroll-relative-minus').on('click', function() { $.smoothScroll('-=100px'); From 8a981b46bcee93f529633686d18ec0c738dfad96 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Fri, 5 May 2017 12:23:22 -0400 Subject: [PATCH 46/63] Add autoFocus option --- src/jquery.smooth-scroll.js | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index 0aa1784..97ea8a1 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -20,6 +20,9 @@ // only use if you want to override default behavior scrollTarget: null, + // automatically focus the target element after scrolling to it + autoFocus: false, + // fn(opts) function to be called before scrolling occurs. // `this` is the element(s) being scrolled beforeScroll: function() {}, @@ -106,6 +109,7 @@ }; var rRelative = /^([\-\+]=)(\d+)/; + $.fn.extend({ scrollable: function(dir) { var scrl = getScrollable.call(this, {dir: dir}); @@ -218,6 +222,21 @@ return explicit; }; + var onAfterScroll = function(opts) { + var $tgt = $(opts.scrollTarget); + + if (opts.autoFocus && $tgt.length) { + $tgt[0].focus(); + + if (!$tgt.is(document.activeElement)) { + $tgt.prop({tabIndex: -1}); + $tgt[0].focus(); + } + } + + opts.afterScroll.call(opts.link, opts); + }; + $.smoothScroll = function(options, px) { if (options === 'options' && typeof px === 'object') { return $.extend(optionOverrides, px); @@ -288,7 +307,7 @@ duration: speed, easing: opts.easing, complete: function() { - opts.afterScroll.call(opts.link, opts); + onAfterScroll(opts); } }; @@ -299,7 +318,7 @@ if ($scroller.length) { $scroller.stop().animate(aniProps, aniOpts); } else { - opts.afterScroll.call(opts.link, opts); + onAfterScroll(opts); } }; From 6365a123d0e1594450604510e3f680f5a830e85b Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Fri, 5 May 2017 12:23:41 -0400 Subject: [PATCH 47/63] Update readme and tests for autoFocus --- readme.md | 25 ++++++++++++++++++------- test/tests.js | 14 ++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index cad38fb..779e92c 100644 --- a/readme.md +++ b/readme.md @@ -47,9 +47,12 @@ The following options, shown with their default values, are available for both ` // one of 'top' or 'left' direction: 'top', - // only use if you want to override default behavior + // only use if you want to override default behavior or if using $.smoothScroll scrollTarget: null, + // automatically focus the target element after scrolling to it (see readme for details) + autoFocus: false, + // string to use as selector for event delegation delegateSelector: null, @@ -67,7 +70,7 @@ The following options, shown with their default values, are available for both ` // speed can be a number or 'auto' // if 'auto', the speed will be calculated based on the formula: - // (current scroll position - target scroll position) / autoCoeffic + // (current scroll position - target scroll position) / autoCoefficient speed: 400, // autoCoefficent: Only used when speed set to "auto". @@ -185,7 +188,12 @@ if (reSmooth.test(location.hash)) { ## Focus element after scrolling to it. -Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form. With the smoothScroll plugin, you can use the `afterScroll` callback function. Here is an example that focuses the first input within the form after scrolling to the form: +Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form. + +* As of **smoothScroll version 2.2**, the plugin will automatically focus the element if you set the `autoFocus` option to `true`. +* In the future, versions 3.x and later will have `autoFocus` set to true **by default**. +* If you are using the low-level `$.smoothScroll` method, `autoFocus` will only work if you've also provided a value for the `scrollTarget` option. +* Prior to version 2.2, you can use the `afterScroll` callback function. Here is an example that focuses the first input within the form after scrolling to the form: ```js $('a.example').smoothScroll({ @@ -196,15 +204,18 @@ $('a.example').smoothScroll({ ``` -For accessibility reasons, it might make sense to focus any element you scroll to, even if it's not a natively focusable element. To do so, you could add a `tabIndex` attribute to the target element: +For accessibility reasons, it might make sense to focus any element you scroll to, even if it's not a natively focusable element. To do so, you could add a `tabIndex` attribute to the target element (this, again, is for versions prior to 2.2): ```js -$('a.example').smoothScroll({ +$('div.example').smoothScroll({ afterScroll: function(options) { var $tgt = $(options.scrollTarget); - $tgt.attr('tabIndex', '0'); - // Using $tgt[0] allows us to call .focus() on the DOM node itself, not the jQuery collection $tgt[0].focus(); + + if (!$tgt.is(document.activeElement)) { + $tgt.attr('tabIndex', '-1'); + $tgt[0].focus(); + } } }); ``` diff --git a/test/tests.js b/test/tests.js index d9b62e9..77bca60 100644 --- a/test/tests.js +++ b/test/tests.js @@ -61,6 +61,20 @@ QUnit.test('Scrolls the #scrollable element, or not.', function(assert) { }); }); +QUnit.test('Auto-focuses the scroll target element after scrolling', function(assert) { + var done = assert.async(1); + + $.smoothScroll({ + scrollTarget: '#scrollable', + speed: 100, + autoFocus: true, + afterScroll: function(opts) { + assert.equal($(opts.scrollTarget)[0], document.activeElement, 'autofocus scrollTarget'); + done(); + } + }); +}); + QUnit.test('Scrolls the #scrollable element to absolute or relative scroll position', function(assert) { var done = assert.async(3); From e73a51db43e07d74813a70c6b5eb44b4abed1f02 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Fri, 5 May 2017 12:26:58 -0400 Subject: [PATCH 48/63] Build and bump to 2.2 --- bower.json | 4 ++-- index.html | 39 +++++++++++++++++++++---------------- jquery.smooth-scroll.js | 27 +++++++++++++++++++++---- jquery.smooth-scroll.min.js | 5 +++-- package.json | 2 +- src/jquery.smooth-scroll.js | 2 +- 6 files changed, 52 insertions(+), 27 deletions(-) diff --git a/bower.json b/bower.json index 8e0ccdc..e8a5183 100644 --- a/bower.json +++ b/bower.json @@ -3,7 +3,7 @@ "name": "jquery-smooth-scroll", "main": "jquery.smooth-scroll.js", "homepage": "https://github.com/kswedberg/jquery-smooth-scroll", - "version": "2.1.2", + "version": "2.2.0", "repository": { "type": "git", "url": "https://github.com/kswedberg/jquery-smooth-scroll" @@ -22,7 +22,7 @@ { "name": "Karl Swedberg", "email": "kswedberg@gmail.com", - "url": "http://www.learningjquery.com/" + "url": "https://karlswedberg.com/" } ], "moduleType": [ diff --git a/index.html b/index.html index 30d6035..60ff050 100644 --- a/index.html +++ b/index.html @@ -78,7 +78,7 @@

          Smooth Scroll Plugin

          Note: Version 2.0+ of this plugin requires jQuery version 1.7 or greater.

          Download

          Using npm:

          -
          1
          npm install jquery-smooth-scroll
          +
          1
          npm install jquery-smooth-scroll

          The old-fashioned way:

          Go to the following URL in your browser and copy/paste the code into your own file: @@ -99,7 +99,7 @@

          $.fn.smoothScroll

        Options

        The following options, shown with their default values, are available for both $.fn.smoothScroll and $.smoothScroll:

        -
        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        {
          offset: 0,
         
          // one of 'top' or 'left'
          direction: 'top',
         
          // only use if you want to override default behavior
          scrollTarget: null,
         
          // string to use as selector for event delegation
          delegateSelector: null,
         
          // fn(opts) function to be called before scrolling occurs.
          // `this` is the element(s) being scrolled
          beforeScroll: function() {},
         
          // fn(opts) function to be called after scrolling occurs.
          // `this` is the triggering element
          afterScroll: function() {},
         
          // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin
          // from jQuery UI or elsewhere
          easing: 'swing',
         
          // speed can be a number or 'auto'
          // if 'auto', the speed will be calculated based on the formula:
          // (current scroll position - target scroll position) / autoCoeffic
          speed: 400,
         
          // autoCoefficent: Only used when speed set to "auto".
          // The higher this number, the faster the scroll speed
          autoCoefficient: 2,
         
          // $.fn.smoothScroll only: whether to prevent the default click action
          preventDefault: true
         
        }
        +
        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        {
          offset: 0,
         
          // one of 'top' or 'left'
          direction: 'top',
         
          // only use if you want to override default behavior or if using $.smoothScroll
          scrollTarget: null,
         
          // automatically focus the target element after scrolling to it (see readme for details)
          autoFocus: false,
         
          // string to use as selector for event delegation
          delegateSelector: null,
         
          // fn(opts) function to be called before scrolling occurs.
          // `this` is the element(s) being scrolled
          beforeScroll: function() {},
         
          // fn(opts) function to be called after scrolling occurs.
          // `this` is the triggering element
          afterScroll: function() {},
         
          // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin
          // from jQuery UI or elsewhere
          easing: 'swing',
         
          // speed can be a number or 'auto'
          // if 'auto', the speed will be calculated based on the formula:
          // (current scroll position - target scroll position) / autoCoefficient
          speed: 400,
         
          // autoCoefficent: Only used when speed set to "auto".
          // The higher this number, the faster the scroll speed
          autoCoefficient: 2,
         
          // $.fn.smoothScroll only: whether to prevent the default click action
          preventDefault: true
         
        }

        The options object for $.fn.smoothScroll can take two additional properties: exclude and excludeWithin. The value for both of these is an array of @@ -114,24 +114,23 @@

        $.smoothScroll

      • Utility method works without a selector: $.smoothScroll()
      • Can be used to scroll any element (not just document.documentElement / document.body)
      • -
      • Doesn't automatically fire, so you need to bind it to some other user -interaction. For example:

        -
        1
        2
        3
        4
        5
        6
        7
        $('button.scrollsomething').on('click', function() {
          $.smoothScroll({
            scrollElement: $('div.scrollme'),
            scrollTarget: '#findme'
          });
          return false;
        });
        -
      • -
      • The $.smoothScroll method can take one or two arguments.

        -
          +
        • Doesn't automatically fire, so you need to bind it to some other user +interaction. For example:
          1
          2
          3
          4
          5
          6
          7
          $('button.scrollsomething').on('click', function() {
            $.smoothScroll({
              scrollElement: $('div.scrollme'),
              scrollTarget: '#findme'
            });
            return false;
          });
          +
          +
        • +
        • The $.smoothScroll method can take one or two arguments.
          • If the first argument is a number or a "relative string," the document is scrolled to that position. If it's an options object, those options determine how the document (or other element) will be scrolled.
          • If a number or "relative string" is provided as the second argument, it will override whatever may have been set for the scrollTarget option.
          • -
          • The relative string syntax, introduced in version 2.1, looks like +=100px or -=50px (see below for an example).
          • +
          • The relative string syntax, introduced in version 2.1, looks like "+=100px" or "-=50px" (see below for an example).

        Additional Option

        The following option, in addition to those listed for $.fn.smoothScroll above, is available for $.smoothScroll:

        -
        1
        2
        3
        4
        5
        {
          // The jQuery set of elements you wish to scroll.
          //  if null (default), $('html, body').firstScrollable() is used.
          scrollElement: null
        }
        +
        1
        2
        3
        4
        5
        {
          // The jQuery set of elements you wish to scroll.
          //  if null (default), $('html, body').firstScrollable() is used.
          scrollElement: null
        }

        $.fn.scrollable

          @@ -153,22 +152,28 @@

          $.fn.firstScrollable

          Examples

          Scroll down one "page" at a time (v2.1+)

          With smoothScroll version 2.1 and later, you can use the "relative string" syntax to scroll an element or the document a certain number of pixels relative to its current position. The following code will scroll the document down one page at a time when the user clicks the ".pagedown" button:

          -
          1
          2
          3
          $('button.pagedown').on('click', function() {
            $.smoothScroll('+=' + $(window).height());
          });
          +
          1
          2
          3
          $('button.pagedown').on('click', function() {
            $.smoothScroll('+=' + $(window).height());
          });

          Smooth scrolling on page load

          If you want to scroll to an element when the page loads, use $.smoothScroll() in a script at the end of the body or use $(document).ready(). To prevent the browser from automatically scrolling to the element on its own, your link on page 1 will need to include a fragment identifier that does not match an element id on page 2. To ensure that users without JavaScript get to the same element, you should modify the link's hash on page 1 with JavaScript. Your script on page 2 will then modify it back to the correct one when you call $.smoothScroll().

          For example, let's say you want to smooth scroll to <div id="scrolltome"></div> on page-2.html. For page-1.html, your script might do the following:

          -
          1
          2
          3
          4
          5
          $('a[href="page-2.html#scrolltome"]').attr('href', function() {
            var hrefParts = this.href.split(/#/);
            hrefParts[1] = 'smoothScroll' + hrefParts[1];
            return hrefParts.join('#');
          });
          +
          1
          2
          3
          4
          5
          $('a[href="page-2.html#scrolltome"]').attr('href', function() {
            var hrefParts = this.href.split(/#/);
            hrefParts[1] = 'smoothScroll' + hrefParts[1];
            return hrefParts.join('#');
          });

          Then for page-2.html, your script would do this:

          -
          1
          2
          3
          4
          5
          6
          7
          8
          // Call $.smoothScroll if location.hash starts with "#smoothScroll"
          var reSmooth = /^#smoothScroll/;
          var id;
          if (reSmooth.test(location.hash)) {
            // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
            id = '#' + location.hash.replace(reSmooth, '');
            $.smoothScroll({scrollTarget: id});
          }
          +
          1
          2
          3
          4
          5
          6
          7
          8
          // Call $.smoothScroll if location.hash starts with "#smoothScroll"
          var reSmooth = /^#smoothScroll/;
          var id;
          if (reSmooth.test(location.hash)) {
            // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
            id = '#' + location.hash.replace(reSmooth, '');
            $.smoothScroll({scrollTarget: id});
          }

          Focus element after scrolling to it.

          -

          Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form. With the smoothScroll plugin, you can use the afterScroll callback function. Here is an example that focuses the first input within the form after scrolling to the form:

          -
          1
          2
          3
          4
          5
          $('a.example').smoothScroll({
            afterScroll: function(options) {
              $(options.scrollTarget).find('input')[0].focus();
            }
          });
          +

          Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form.

          +
            +
          • As of smoothScroll version 2.2, the plugin will automatically focus the element if you set the autoFocus option to true.
          • +
          • In the future, versions 3.x and later will have autoFocus set to true by default.
          • +
          • If you are using the low-level $.smoothScroll method, autoFocus will only work if you've also provided a value for the scrollTarget option.
          • +
          • Prior to version 2.2, you can use the afterScroll callback function. Here is an example that focuses the first input within the form after scrolling to the form:
          • +
          +
          1
          2
          3
          4
          5
          $('a.example').smoothScroll({
            afterScroll: function(options) {
              $(options.scrollTarget).find('input')[0].focus();
            }
          });
          -

          For accessibility reasons, it might make sense to focus any element you scroll to, even if it's not a natively focusable element. To do so, you could add a tabIndex attribute to the target element:

          -
          1
          2
          3
          4
          5
          6
          7
          8
          $('a.example').smoothScroll({
            afterScroll: function(options) {
              var $tgt = $(options.scrollTarget);
              $tgt.attr('tabIndex', '0');
              // Using $tgt[0] allows us to call .focus() on the DOM node itself, not the jQuery collection
              $tgt[0].focus();
            }
          });
          +

          For accessibility reasons, it might make sense to focus any element you scroll to, even if it's not a natively focusable element. To do so, you could add a tabIndex attribute to the target element (this, again, is for versions prior to 2.2):

          +
          1
          2
          3
          4
          5
          6
          7
          8
          9
          10
          11
          $('div.example').smoothScroll({
            afterScroll: function(options) {
              var $tgt = $(options.scrollTarget);
              $tgt[0].focus();
           
              if (!$tgt.is(document.activeElement)) {
                $tgt.attr('tabIndex', '-1');
                $tgt[0].focus();
              }
            }
          });

          Notes

            diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index 0ea4440..82f1263 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -1,5 +1,5 @@ /*! - * jQuery Smooth Scroll - v2.1.2 - 2017-01-19 + * jQuery Smooth Scroll - v2.2.0 - 2017-05-05 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2017 Karl Swedberg * Licensed MIT @@ -18,7 +18,7 @@ } }(function($) { - var version = '2.1.2'; + var version = '2.2.0'; var optionOverrides = {}; var defaults = { exclude: [], @@ -39,6 +39,9 @@ // only use if you want to override default behavior scrollTarget: null, + // automatically focus the target element after scrolling to it + autoFocus: false, + // fn(opts) function to be called before scrolling occurs. // `this` is the element(s) being scrolled beforeScroll: function() {}, @@ -125,6 +128,7 @@ }; var rRelative = /^([\-\+]=)(\d+)/; + $.fn.extend({ scrollable: function(dir) { var scrl = getScrollable.call(this, {dir: dir}); @@ -237,6 +241,21 @@ return explicit; }; + var onAfterScroll = function(opts) { + var $tgt = $(opts.scrollTarget); + + if (opts.autoFocus && $tgt.length) { + $tgt[0].focus(); + + if (!$tgt.is(document.activeElement)) { + $tgt.prop({tabIndex: -1}); + $tgt[0].focus(); + } + } + + opts.afterScroll.call(opts.link, opts); + }; + $.smoothScroll = function(options, px) { if (options === 'options' && typeof px === 'object') { return $.extend(optionOverrides, px); @@ -307,7 +326,7 @@ duration: speed, easing: opts.easing, complete: function() { - opts.afterScroll.call(opts.link, opts); + onAfterScroll(opts); } }; @@ -318,7 +337,7 @@ if ($scroller.length) { $scroller.stop().animate(aniProps, aniOpts); } else { - opts.afterScroll.call(opts.link, opts); + onAfterScroll(opts); } }; diff --git a/jquery.smooth-scroll.min.js b/jquery.smooth-scroll.min.js index 618942a..db422a3 100644 --- a/jquery.smooth-scroll.min.js +++ b/jquery.smooth-scroll.min.js @@ -1,8 +1,9 @@ /*! - * jQuery Smooth Scroll - v2.1.2 - 2017-01-19 + * jQuery Smooth Scroll - v2.2.0 - 2017-05-05 * https://github.com/kswedberg/jquery-smooth-scroll * Copyright (c) 2017 Karl Swedberg * Licensed MIT */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){var b="2.1.2",c={},d={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},e=function(b){var c=[],d=!1,e=b.dir&&"left"===b.dir?"scrollLeft":"scrollTop";return this.each(function(){var b=a(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(b[e]()>0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c},f=/^([\-\+]=)(\d+)/;a.fn.extend({scrollable:function(a){var b=e.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=e.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if(b=b||{},"options"===b)return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j0?c.push(this):(b[e](1),d=b[e]()>0,d&&c.push(this),b[e](0))):(c.push(document.scrollingElement),!1)}),c.length||this.each(function(){this===document.documentElement&&"smooth"===a(this).css("scrollBehavior")&&(c=[this]),c.length||"BODY"!==this.nodeName||(c=[this])}),"first"===b.el&&c.length>1&&(c=[c[0]]),c},e=/^([\-\+]=)(\d+)/;a.fn.extend({scrollable:function(a){var b=d.call(this,{dir:a});return this.pushStack(b)},firstScrollable:function(a){var b=d.call(this,{el:"first",dir:a});return this.pushStack(b)},smoothScroll:function(b,c){if("options"===(b=b||{}))return c?this.each(function(){var b=a(this),d=a.extend(b.data("ssOpts")||{},c);a(this).data("ssOpts",d)}):this.first().data("ssOpts");var d=a.extend({},a.fn.smoothScroll.defaults,b),e=function(b){var c=function(a){return a.replace(/(:|\.|\/)/g,"\\$1")},e=this,f=a(this),g=a.extend({},d,f.data("ssOpts")||{}),h=d.exclude,i=g.excludeWithin,j=0,k=0,l=!0,m={},n=a.smoothScroll.filterPath(location.pathname),o=a.smoothScroll.filterPath(e.pathname),p=location.hostname===e.hostname||!e.hostname,q=g.scrollTarget||o===n,r=c(e.hash);if(r&&!a(r).length&&(l=!1),g.scrollTarget||p&&q&&r){for(;l&&j Date: Wed, 10 May 2017 08:00:37 -0400 Subject: [PATCH 49/63] Update readme --- readme.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 779e92c..1754895 100644 --- a/readme.md +++ b/readme.md @@ -50,7 +50,8 @@ The following options, shown with their default values, are available for both ` // only use if you want to override default behavior or if using $.smoothScroll scrollTarget: null, - // automatically focus the target element after scrolling to it (see readme for details) + // automatically focus the target element after scrolling to it + // (see https://github.com/kswedberg/jquery-smooth-scroll#focus-element-after-scrolling-to-it for details) autoFocus: false, // string to use as selector for event delegation @@ -186,11 +187,16 @@ if (reSmooth.test(location.hash)) { } ``` -## Focus element after scrolling to it. +### Focus element after scrolling to it. Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form. * As of **smoothScroll version 2.2**, the plugin will automatically focus the element if you set the `autoFocus` option to `true`. + ```js + $('div.example').smoothScroll({ + autoFocus: true + }); + ``` * In the future, versions 3.x and later will have `autoFocus` set to true **by default**. * If you are using the low-level `$.smoothScroll` method, `autoFocus` will only work if you've also provided a value for the `scrollTarget` option. * Prior to version 2.2, you can use the `afterScroll` callback function. Here is an example that focuses the first input within the form after scrolling to the form: From 965affd7edd2dffb034bf5b706c93d6a56d8ab97 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Sat, 7 Oct 2017 22:39:08 -0400 Subject: [PATCH 50/63] Add note about not using body by itself for scrollElement option --- readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.md b/readme.md index 1754895..e6528e9 100644 --- a/readme.md +++ b/readme.md @@ -130,6 +130,9 @@ for `$.smoothScroll`: } ``` +#### Note: +If you use `$.smoothScroll`, do NOT use the `body` element (`document.body` or `$('body')`) alone for the `scrollElement` option. Probably not a good idea to use `document.documentElement` (`$('html')`) by itself either. + ### $.fn.scrollable * Selects the matched element(s) that are scrollable. Acts just like a From d7df558ed0cba5f3d018d233bfd3dbf8ea9a9a40 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Mon, 13 Jan 2020 10:06:29 -0500 Subject: [PATCH 51/63] Lint readme.md and add .nvmrc --- .nvmrc | 1 + readme.md | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +6 diff --git a/readme.md b/readme.md index e6528e9..be10d6a 100644 --- a/readme.md +++ b/readme.md @@ -98,10 +98,10 @@ options object as the second. ### $.smoothScroll * Utility method works without a selector: `$.smoothScroll()` -* Can be used to scroll any element (not just `document.documentElement` / - `document.body`) +* Can be used to scroll any element (not just `document.documentElement` / `document.body`) * Doesn't automatically fire, so you need to bind it to some other user interaction. For example: + ```js $('button.scrollsomething').on('click', function() { $.smoothScroll({ @@ -111,14 +111,16 @@ options object as the second. return false; }); ``` + * The `$.smoothScroll` method can take one or two arguments. - * If the first argument is a number or a "relative string," the document is scrolled to that + * If the first argument is a number or a "relative string," the document is scrolled to that position. If it's an options object, those options determine how the document (or other element) will be scrolled. - * If a number or "relative string" is provided as the second argument, it will override whatever may have been set for the `scrollTarget` option. - * The relative string syntax, introduced in version 2.1, looks like `"+=100px"` or `"-=50px"` (see below for an example). + * If a number or "relative string" is provided as the second argument, it will override whatever may have been set for the `scrollTarget` option. + * The relative string syntax, introduced in version 2.1, looks like `"+=100px"` or `"-=50px"` (see below for an example). #### Additional Option + The following option, in addition to those listed for `$.fn.smoothScroll` above, is available for `$.smoothScroll`: @@ -131,6 +133,7 @@ for `$.smoothScroll`: ``` #### Note: + If you use `$.smoothScroll`, do NOT use the `body` element (`document.body` or `$('body')`) alone for the `scrollElement` option. Probably not a good idea to use `document.documentElement` (`$('html')`) by itself either. ### $.fn.scrollable @@ -195,11 +198,13 @@ if (reSmooth.test(location.hash)) { Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form. * As of **smoothScroll version 2.2**, the plugin will automatically focus the element if you set the `autoFocus` option to `true`. + ```js $('div.example').smoothScroll({ autoFocus: true }); ``` + * In the future, versions 3.x and later will have `autoFocus` set to true **by default**. * If you are using the low-level `$.smoothScroll` method, `autoFocus` will only work if you've also provided a value for the `scrollTarget` option. * Prior to version 2.2, you can use the `afterScroll` callback function. Here is an example that focuses the first input within the form after scrolling to the form: From 3948290d5692124e94c896f3c2979ba496c387fd Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Mon, 13 Jan 2020 10:06:51 -0500 Subject: [PATCH 52/63] Add note in readme about document.scrollingElement use. Closes #108 --- index.html | 41 +++++++++++++++++++++++++---------------- readme.md | 2 ++ 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index 60ff050..a0e933d 100644 --- a/index.html +++ b/index.html @@ -78,7 +78,7 @@

            Smooth Scroll Plugin

            Note: Version 2.0+ of this plugin requires jQuery version 1.7 or greater.

            Download

            Using npm:

            -
            1
            npm install jquery-smooth-scroll
            +
            1
            npm install jquery-smooth-scroll

            The old-fashioned way:

            Go to the following URL in your browser and copy/paste the code into your own file: @@ -99,7 +99,7 @@

            $.fn.smoothScroll

          Options

          The following options, shown with their default values, are available for both $.fn.smoothScroll and $.smoothScroll:

          -
          1
          2
          3
          4
          5
          6
          7
          8
          9
          10
          11
          12
          13
          14
          15
          16
          17
          18
          19
          20
          21
          22
          23
          24
          25
          26
          27
          28
          29
          30
          31
          32
          33
          34
          35
          36
          37
          38
          39
          40
          {
            offset: 0,
           
            // one of 'top' or 'left'
            direction: 'top',
           
            // only use if you want to override default behavior or if using $.smoothScroll
            scrollTarget: null,
           
            // automatically focus the target element after scrolling to it (see readme for details)
            autoFocus: false,
           
            // string to use as selector for event delegation
            delegateSelector: null,
           
            // fn(opts) function to be called before scrolling occurs.
            // `this` is the element(s) being scrolled
            beforeScroll: function() {},
           
            // fn(opts) function to be called after scrolling occurs.
            // `this` is the triggering element
            afterScroll: function() {},
           
            // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin
            // from jQuery UI or elsewhere
            easing: 'swing',
           
            // speed can be a number or 'auto'
            // if 'auto', the speed will be calculated based on the formula:
            // (current scroll position - target scroll position) / autoCoefficient
            speed: 400,
           
            // autoCoefficent: Only used when speed set to "auto".
            // The higher this number, the faster the scroll speed
            autoCoefficient: 2,
           
            // $.fn.smoothScroll only: whether to prevent the default click action
            preventDefault: true
           
          }
          +
          1
          2
          3
          4
          5
          6
          7
          8
          9
          10
          11
          12
          13
          14
          15
          16
          17
          18
          19
          20
          21
          22
          23
          24
          25
          26
          27
          28
          29
          30
          31
          32
          33
          34
          35
          36
          37
          38
          39
          40
          41
          {
            offset: 0,
           
            // one of 'top' or 'left'
            direction: 'top',
           
            // only use if you want to override default behavior or if using $.smoothScroll
            scrollTarget: null,
           
            // automatically focus the target element after scrolling to it
            autoFocus: false,
           
            // string to use as selector for event delegation
            delegateSelector: null,
           
            // fn(opts) function to be called before scrolling occurs.
            // `this` is the element(s) being scrolled
            beforeScroll: function() {},
           
            // fn(opts) function to be called after scrolling occurs.
            // `this` is the triggering element
            afterScroll: function() {},
           
            // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin
            // from jQuery UI or elsewhere
            easing: 'swing',
           
            // speed can be a number or 'auto'
            // if 'auto', the speed will be calculated based on the formula:
            // (current scroll position - target scroll position) / autoCoefficient
            speed: 400,
           
            // autoCoefficent: Only used when speed set to "auto".
            // The higher this number, the faster the scroll speed
            autoCoefficient: 2,
           
            // $.fn.smoothScroll only: whether to prevent the default click action
            preventDefault: true
           
          }

          The options object for $.fn.smoothScroll can take two additional properties: exclude and excludeWithin. The value for both of these is an array of @@ -112,13 +112,14 @@

          Setting options after initial call$.smoothScroll

          • Utility method works without a selector: $.smoothScroll()
          • -
          • Can be used to scroll any element (not just document.documentElement / -document.body)
          • -
          • Doesn't automatically fire, so you need to bind it to some other user -interaction. For example:
            1
            2
            3
            4
            5
            6
            7
            $('button.scrollsomething').on('click', function() {
              $.smoothScroll({
                scrollElement: $('div.scrollme'),
                scrollTarget: '#findme'
              });
              return false;
            });
            +
          • Can be used to scroll any element (not just document.documentElement / document.body)
          • +
          • Doesn't automatically fire, so you need to bind it to some other user +interaction. For example:

            +
            1
            2
            3
            4
            5
            6
            7
            $('button.scrollsomething').on('click', function() {
              $.smoothScroll({
                scrollElement: $('div.scrollme'),
                scrollTarget: '#findme'
              });
              return false;
            });
          • -
          • The $.smoothScroll method can take one or two arguments.
              +
            • The $.smoothScroll method can take one or two arguments.

              +
              • If the first argument is a number or a "relative string," the document is scrolled to that position. If it's an options object, those options determine how the document (or other element) will be scrolled.
              • @@ -130,12 +131,15 @@

                $.smoothScroll

                Additional Option

                The following option, in addition to those listed for $.fn.smoothScroll above, is available for $.smoothScroll:

                -
                1
                2
                3
                4
                5
                {
                  // The jQuery set of elements you wish to scroll.
                  //  if null (default), $('html, body').firstScrollable() is used.
                  scrollElement: null
                }
                +
                1
                2
                3
                4
                5
                {
                  // The jQuery set of elements you wish to scroll.
                  //  if null (default), $('html, body').firstScrollable() is used.
                  scrollElement: null
                }
                +

                Note:

                +

                If you use $.smoothScroll, do NOT use the body element (document.body or $('body')) alone for the scrollElement option. Probably not a good idea to use document.documentElement ($('html')) by itself either.

                $.fn.scrollable

                • Selects the matched element(s) that are scrollable. Acts just like a DOM traversal method such as .find() or .next().
                • +
                • Uses document.scrollingElement on compatible browsers when the selector is 'html' or 'body' or 'html, body'.
                • The resulting jQuery set may consist of zero, one, or multiple elements.
                @@ -148,32 +152,37 @@

                $.fn.firstScrollable

                to use for "document" scrolling: $('html, body').firstScrollable().animate({scrollTop: someNumber}, someSpeed) +
              • Uses document.scrollingElement on compatible browsers when the selector is 'html' or 'body' or 'html, body'.

              Examples

              Scroll down one "page" at a time (v2.1+)

              With smoothScroll version 2.1 and later, you can use the "relative string" syntax to scroll an element or the document a certain number of pixels relative to its current position. The following code will scroll the document down one page at a time when the user clicks the ".pagedown" button:

              -
              1
              2
              3
              $('button.pagedown').on('click', function() {
                $.smoothScroll('+=' + $(window).height());
              });
              +
              1
              2
              3
              $('button.pagedown').on('click', function() {
                $.smoothScroll('+=' + $(window).height());
              });

              Smooth scrolling on page load

              If you want to scroll to an element when the page loads, use $.smoothScroll() in a script at the end of the body or use $(document).ready(). To prevent the browser from automatically scrolling to the element on its own, your link on page 1 will need to include a fragment identifier that does not match an element id on page 2. To ensure that users without JavaScript get to the same element, you should modify the link's hash on page 1 with JavaScript. Your script on page 2 will then modify it back to the correct one when you call $.smoothScroll().

              For example, let's say you want to smooth scroll to <div id="scrolltome"></div> on page-2.html. For page-1.html, your script might do the following:

              -
              1
              2
              3
              4
              5
              $('a[href="page-2.html#scrolltome"]').attr('href', function() {
                var hrefParts = this.href.split(/#/);
                hrefParts[1] = 'smoothScroll' + hrefParts[1];
                return hrefParts.join('#');
              });
              +
              1
              2
              3
              4
              5
              $('a[href="page-2.html#scrolltome"]').attr('href', function() {
                var hrefParts = this.href.split(/#/);
                hrefParts[1] = 'smoothScroll' + hrefParts[1];
                return hrefParts.join('#');
              });

              Then for page-2.html, your script would do this:

              -
              1
              2
              3
              4
              5
              6
              7
              8
              // Call $.smoothScroll if location.hash starts with "#smoothScroll"
              var reSmooth = /^#smoothScroll/;
              var id;
              if (reSmooth.test(location.hash)) {
                // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
                id = '#' + location.hash.replace(reSmooth, '');
                $.smoothScroll({scrollTarget: id});
              }
              +
              1
              2
              3
              4
              5
              6
              7
              8
              // Call $.smoothScroll if location.hash starts with "#smoothScroll"
              var reSmooth = /^#smoothScroll/;
              var id;
              if (reSmooth.test(location.hash)) {
                // Strip the "#smoothScroll" part off (and put "#" back on the beginning)
                id = '#' + location.hash.replace(reSmooth, '');
                $.smoothScroll({scrollTarget: id});
              }
              -

              Focus element after scrolling to it.

              +

              Focus element after scrolling to it.

              Imagine you have a link to a form somewhere on the same page. When the user clicks the link, you want the user to be able to begin interacting with that form.

                -
              • As of smoothScroll version 2.2, the plugin will automatically focus the element if you set the autoFocus option to true.
              • -
              • In the future, versions 3.x and later will have autoFocus set to true by default.
              • +
              • As of smoothScroll version 2.2, the plugin will automatically focus the element if you set the autoFocus option to true.

                +
                1
                2
                3
                $('div.example').smoothScroll({
                  autoFocus: true
                });
                +
                +
              • +
              • In the future, versions 3.x and later will have autoFocus set to true by default.

                +
              • If you are using the low-level $.smoothScroll method, autoFocus will only work if you've also provided a value for the scrollTarget option.
              • Prior to version 2.2, you can use the afterScroll callback function. Here is an example that focuses the first input within the form after scrolling to the form:
              -
              1
              2
              3
              4
              5
              $('a.example').smoothScroll({
                afterScroll: function(options) {
                  $(options.scrollTarget).find('input')[0].focus();
                }
              });
              +
              1
              2
              3
              4
              5
              $('a.example').smoothScroll({
                afterScroll: function(options) {
                  $(options.scrollTarget).find('input')[0].focus();
                }
              });

              For accessibility reasons, it might make sense to focus any element you scroll to, even if it's not a natively focusable element. To do so, you could add a tabIndex attribute to the target element (this, again, is for versions prior to 2.2):

              -
              1
              2
              3
              4
              5
              6
              7
              8
              9
              10
              11
              $('div.example').smoothScroll({
                afterScroll: function(options) {
                  var $tgt = $(options.scrollTarget);
                  $tgt[0].focus();
               
                  if (!$tgt.is(document.activeElement)) {
                    $tgt.attr('tabIndex', '-1');
                    $tgt[0].focus();
                  }
                }
              });
              +
              1
              2
              3
              4
              5
              6
              7
              8
              9
              10
              11
              $('div.example').smoothScroll({
                afterScroll: function(options) {
                  var $tgt = $(options.scrollTarget);
                  $tgt[0].focus();
               
                  if (!$tgt.is(document.activeElement)) {
                    $tgt.attr('tabIndex', '-1');
                    $tgt[0].focus();
                  }
                }
              });

              Notes

                diff --git a/readme.md b/readme.md index be10d6a..a48d170 100644 --- a/readme.md +++ b/readme.md @@ -140,6 +140,7 @@ If you use `$.smoothScroll`, do NOT use the `body` element (`document.body` or ` * Selects the matched element(s) that are scrollable. Acts just like a DOM traversal method such as `.find()` or `.next()`. +* Uses `document.scrollingElement` on compatible browsers when the selector is 'html' or 'body' or 'html, body'. * The resulting jQuery set may consist of **zero, one, or multiple** elements. @@ -152,6 +153,7 @@ If you use `$.smoothScroll`, do NOT use the `body` element (`document.body` or ` to use for "document" scrolling: `$('html, body').firstScrollable().animate({scrollTop: someNumber}, someSpeed)` +* Uses `document.scrollingElement` on compatible browsers when the selector is 'html' or 'body' or 'html, body'. ## Examples From c03648ad8259f31fc8eec1dd8cc061a259a5f5ef Mon Sep 17 00:00:00 2001 From: Yash Chauhan <32420644+yc9274@users.noreply.github.com> Date: Sat, 16 May 2020 14:44:45 +0530 Subject: [PATCH 53/63] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index a48d170..da34928 100644 --- a/readme.md +++ b/readme.md @@ -17,7 +17,7 @@ npm install jquery-smooth-scroll The old-fashioned way: Go to the following URL in your browser and copy/paste the code into your own file: -https://raw.githubusercontent.com/kswedberg/jquery-smooth-scroll/master/jquery.smooth-scroll.js +https://raw.githubusercontent.com/kswedberg/jquery-smooth-scroll/master/jquery.smooth-scroll.min.js ## Demo From 6921aa0da4b12414289c3183440bad30623c95d9 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Thu, 9 Jul 2020 11:45:46 -0400 Subject: [PATCH 54/63] Update readme with setup using CDN and grabbing standard or minified versions --- readme.md | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index da34928..c8ce806 100644 --- a/readme.md +++ b/readme.md @@ -6,18 +6,41 @@ Allows for easy implementation of smooth scrolling for same-page links. Note: Version 2.0+ of this plugin requires jQuery version 1.7 or greater. -## Download +## Setup -Using npm: +### ES Module ```bash npm install jquery-smooth-scroll ``` -The old-fashioned way: +or -Go to the following URL in your browser and copy/paste the code into your own file: -https://raw.githubusercontent.com/kswedberg/jquery-smooth-scroll/master/jquery.smooth-scroll.min.js +```bash +yarn add jquery-smooth-scroll +``` + +Then, use `import jquery-smooth-scroll`; + +**Note**: This assumes `window.jQuery` is available at time of import. + +### CDN + +```html + + + +``` + +### Copy/paste + +Grab the code and paste it into your own file: + +* [Standard version](https://raw.githubusercontent.com/kswedberg/jquery-smooth-scroll/master/jquery.smooth-scroll.js) +* [Minified version](https://raw.githubusercontent.com/kswedberg/jquery-smooth-scroll/master/jquery.smooth-scroll.js) ## Demo From 5c999995e05735435f43cda7db7eb8b33b2afaae Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Tue, 30 Aug 2022 10:07:56 -0400 Subject: [PATCH 55/63] Update dependencies and fix a test --- package.json | 18 +- test/index.html | 224 ++++-- test/tests.js | 3 +- yarn.lock | 1798 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1985 insertions(+), 58 deletions(-) create mode 100644 yarn.lock diff --git a/package.json b/package.json index d16b2a6..a5229e5 100644 --- a/package.json +++ b/package.json @@ -22,19 +22,19 @@ "jquery": ">=1.7.0" }, "devDependencies": { - "eslint-config-kswedberg": "^1.3.0", + "eslint-config-kswedberg": "^5.1.1", "grunt": "^1.0.1", - "grunt-contrib-concat": "^1.0.1", - "grunt-contrib-jshint": "^1.1.0", - "grunt-contrib-uglify": "^2.3.0", + "grunt-contrib-concat": "^2.1.0", + "grunt-contrib-jshint": "^3.2.0", + "grunt-contrib-uglify": "^5.2.2", "grunt-contrib-watch": "^1.0.0", - "grunt-eslint": "^19.0.0", - "grunt-shell": "^2.1.0", - "grunt-version": "^1.1.1", + "grunt-eslint": "^24.0.0", + "grunt-shell": "^4.0.0", + "grunt-version": "^3.0.0", "lodash": "^4.17.4", - "marked": "^0.3.6", + "marked": "^4.0.19", "node-syntaxhighlighter": "^0.8.1", - "qunitjs": "^1.20.0" + "qunit": "^2.19.1" }, "keywords": [ "jQuery", diff --git a/test/index.html b/test/index.html index 9804f2c..b097238 100644 --- a/test/index.html +++ b/test/index.html @@ -1,52 +1,180 @@ - - - Smooth Scroll Plugin Tests - - - - -
                -
                - go to one - -
                -
                big block
                -

                Sirloin frankfurter tongue pork, filet mignon drumstick shankle beef ribs tri-tip turducken hamburger salami andouille meatloaf. Andouille landjaeger flank boudin beef short ribs brisket alcatra kielbasa ham pork loin pancetta. Pancetta tenderloin shoulder, porchetta tri-tip pastrami ham pork loin tail swine andouille. Sausage landjaeger strip steak tail corned beef biltong meatball picanha beef ribs swine kielbasa. T-bone tail rump kevin doner chuck. Prosciutto andouille pork loin shankle t-bone, turducken sirloin landjaeger pancetta picanha spare ribs filet mignon. Shank ham beef chuck salami tail t-bone shoulder beef ribs kevin.

                - + + + Smooth Scroll Plugin Tests + + + + +
                +
                + go to one + +
                +
                big block
                +

                + Sirloin frankfurter tongue pork, filet mignon drumstick shankle beef + ribs tri-tip turducken hamburger salami andouille meatloaf. Andouille + landjaeger flank boudin beef short ribs brisket alcatra kielbasa ham + pork loin pancetta. Pancetta tenderloin shoulder, porchetta tri-tip + pastrami ham pork loin tail swine andouille. Sausage landjaeger strip + steak tail corned beef biltong meatball picanha beef ribs swine + kielbasa. T-bone tail rump kevin doner chuck. Prosciutto andouille + pork loin shankle t-bone, turducken sirloin landjaeger pancetta + picanha spare ribs filet mignon. Shank ham beef chuck salami tail + t-bone shoulder beef ribs kevin. +

                +
                +

                + Bacon ipsum dolor amet andouille tri-tip salami frankfurter fatback + venison. Cupim sausage rump boudin pork loin, salami kielbasa chuck jowl + venison kevin prosciutto flank ribeye. Alcatra chuck sausage meatball + beef ribs brisket biltong rump andouille tenderloin leberkas. Bacon + andouille pork loin chuck shankle, ground round hamburger ham hock ball + tip meatball sirloin drumstick flank kielbasa prosciutto. +

                +

                + Hamburger pig sausage, pancetta rump turducken shankle landjaeger pork + belly bresaola jerky brisket leberkas porchetta swine. Pork shankle + salami, sausage ham cupim andouille. Sirloin sausage jerky, leberkas + chuck short ribs pancetta t-bone kielbasa strip steak prosciutto salami + beef ribs frankfurter. Brisket doner andouille t-bone prosciutto short + loin. Kielbasa tenderloin doner beef ribs shankle. +

                +

                + Kielbasa cupim boudin shank frankfurter. Short loin shank shankle + sausage, salami pork loin leberkas biltong venison. Bresaola chuck + chicken drumstick. Fatback cupim short ribs jerky brisket pancetta flank + cow beef ribs salami capicola picanha rump short loin meatloaf. Corned + beef meatloaf pork belly picanha alcatra pork chop. +

                +

                + Sirloin frankfurter tongue pork, filet mignon drumstick shankle beef + ribs tri-tip turducken hamburger salami andouille meatloaf. Andouille + landjaeger flank boudin beef short ribs brisket alcatra kielbasa ham + pork loin pancetta. Pancetta tenderloin shoulder, porchetta tri-tip + pastrami ham pork loin tail swine andouille. Sausage landjaeger strip + steak tail corned beef biltong meatball picanha beef ribs swine + kielbasa. T-bone tail rump kevin doner chuck. Prosciutto andouille pork + loin shankle t-bone, turducken sirloin landjaeger pancetta picanha spare + ribs filet mignon. Shank ham beef chuck salami tail t-bone shoulder beef + ribs kevin. +

                +

                + Drumstick bacon turducken boudin ribeye cupim. Flank bresaola porchetta + hamburger capicola. Sirloin tenderloin jowl, corned beef t-bone meatloaf + swine pig. Swine ham hock beef ribs pork, strip steak rump picanha tail + kielbasa turducken shank flank short loin chuck. +

                +

                + Prosciutto meatloaf t-bone shankle biltong, spare ribs pork belly pork + cupim. Brisket pork loin kevin short loin cupim chuck jerky sirloin + t-bone pig. Doner bresaola boudin beef frankfurter jowl t-bone ham hock + strip steak turducken jerky leberkas alcatra flank shoulder. Tenderloin + cupim hamburger, cow shoulder capicola jowl shankle swine pork loin + meatloaf. Biltong drumstick meatloaf, cow pork belly ham hock pancetta + alcatra landjaeger leberkas ball tip salami hamburger turkey. +

                +

                + Chuck kielbasa shoulder fatback venison pastrami, sausage rump cupim + sirloin ham hock tail. Kevin prosciutto capicola brisket beef ribs + chicken andouille. Spare ribs meatball kielbasa ribeye pork belly turkey + ham. Ham hock beef ribs hamburger, bresaola pork biltong landjaeger. + Ball tip picanha short ribs andouille chicken. Cow spare ribs bresaola + tongue, ribeye hamburger biltong shank filet mignon drumstick brisket + capicola rump short loin. Ham hock bacon sirloin kielbasa sausage doner + shoulder. +

                +

                + Kielbasa cow tail pork, salami jowl leberkas kevin rump swine jerky. + Strip steak turducken flank, jowl andouille bacon meatloaf venison + alcatra short ribs prosciutto ribeye. Corned beef short loin leberkas + tenderloin bresaola sausage pancetta frankfurter bacon. Turducken kevin + landjaeger, corned beef bresaola picanha chuck. Ground round shoulder + picanha pancetta, fatback shankle pork loin pastrami tri-tip. +

                +

                + Ribeye ham sirloin, ham hock short ribs flank ground round landjaeger + brisket. Chicken prosciutto salami, bresaola capicola jowl ham hock + filet mignon pork spare ribs doner biltong. Ball tip hamburger tongue, + porchetta short loin meatball pork bresaola meatloaf fatback. Ham + sausage ground round tongue pancetta beef ribs. Jerky cow tri-tip shank, + tenderloin drumstick tongue ball tip strip steak leberkas pig. Sausage + pork chop alcatra, boudin ground round picanha bresaola doner pancetta + cow. Porchetta salami short ribs, drumstick ground round shank leberkas + tail rump bacon andouille tenderloin sausage meatloaf chicken. +

                +

                + Salami tongue picanha, cupim cow ground round bacon turducken fatback + meatloaf landjaeger leberkas kevin. Ground round kielbasa swine pork + loin kevin ball tip. Shankle beef ribs venison biltong turkey, strip + steak short ribs fatback kielbasa tenderloin pastrami ham hock ham. + Salami bacon tail tongue pancetta cupim pastrami pork chop prosciutto + brisket beef ribs. Swine salami ball tip tongue, turducken sausage pork + belly frankfurter picanha capicola andouille meatloaf biltong short ribs + hamburger. Shankle meatloaf tenderloin meatball, boudin ground round + andouille cupim short loin filet mignon capicola. Boudin bresaola spare + ribs meatloaf, alcatra bacon pork loin frankfurter prosciutto meatball + pork belly salami. +

                +

                + Corned beef doner flank kevin. Alcatra ham hock kielbasa, pork loin + turkey landjaeger bresaola shankle t-bone rump flank tenderloin beef. + Meatball shank turducken leberkas t-bone. Ground round beef swine rump + porchetta pork chop tri-tip pork loin kielbasa pastrami frankfurter pork + andouille. +

                +

                + Turkey chicken tongue boudin cupim flank porchetta pastrami. Cow ham + alcatra, porchetta turkey doner t-bone ribeye brisket spare ribs short + ribs kielbasa. Ribeye ground round tenderloin beef ribs. Pancetta + capicola porchetta ball tip doner drumstick boudin t-bone shankle. + Pancetta flank leberkas, chicken tri-tip porchetta drumstick tail ribeye + venison. Landjaeger alcatra turkey, picanha porchetta beef frankfurter + meatball bacon pig short loin. +

                +

                + Filet mignon beef corned beef biltong doner, kielbasa prosciutto venison + tenderloin. Shoulder bresaola t-bone pig tenderloin, meatball spare ribs + leberkas tongue drumstick picanha rump ground round. Tongue short ribs + pig salami rump, boudin andouille hamburger pancetta meatball. Filet + mignon capicola pancetta cupim, shank jerky ham hock pork spare ribs + strip steak short ribs rump alcatra. Shoulder short ribs picanha, + chicken beef ham pork chop leberkas pastrami bresaola meatball salami. + Salami pork chop ham hock pork meatloaf kielbasa turkey ribeye chicken + tenderloin hamburger boudin frankfurter. Tri-tip hamburger short ribs + short loin ham ball tip shoulder landjaeger tongue pig. +

                +

                + Flank pastrami sausage jerky cupim. Corned beef shankle boudin pancetta + salami short ribs. Frankfurter beef ribs ribeye corned beef pastrami + landjaeger flank meatloaf pork chop. Prosciutto pig frankfurter leberkas + ham hock. Cupim flank tenderloin shank porchetta tail. +

                +

                + Bresaola beef ribs beef, tongue picanha sirloin short loin biltong. + Short ribs leberkas jerky beef ribs tongue bacon pork chop. Meatloaf + shankle short loin, jerky cupim chuck ground round biltong ham cow + tenderloin. Sausage pancetta ribeye, venison doner landjaeger kielbasa + bresaola. Leberkas tail andouille jowl spare ribs pork frankfurter pork + belly salami sausage t-bone rump tongue. Flank chuck pork chop short + ribs ball tip ham hock jerky shankle beef kielbasa prosciutto salami. +

                -

                Bacon ipsum dolor amet andouille tri-tip salami frankfurter fatback venison. Cupim sausage rump boudin pork loin, salami kielbasa chuck jowl venison kevin prosciutto flank ribeye. Alcatra chuck sausage meatball beef ribs brisket biltong rump andouille tenderloin leberkas. Bacon andouille pork loin chuck shankle, ground round hamburger ham hock ball tip meatball sirloin drumstick flank kielbasa prosciutto.

                -

                Hamburger pig sausage, pancetta rump turducken shankle landjaeger pork belly bresaola jerky brisket leberkas porchetta swine. Pork shankle salami, sausage ham cupim andouille. Sirloin sausage jerky, leberkas chuck short ribs pancetta t-bone kielbasa strip steak prosciutto salami beef ribs frankfurter. Brisket doner andouille t-bone prosciutto short loin. Kielbasa tenderloin doner beef ribs shankle.

                -

                Kielbasa cupim boudin shank frankfurter. Short loin shank shankle sausage, salami pork loin leberkas biltong venison. Bresaola chuck chicken drumstick. Fatback cupim short ribs jerky brisket pancetta flank cow beef ribs salami capicola picanha rump short loin meatloaf. Corned beef meatloaf pork belly picanha alcatra pork chop.

                -

                Sirloin frankfurter tongue pork, filet mignon drumstick shankle beef ribs tri-tip turducken hamburger salami andouille meatloaf. Andouille landjaeger flank boudin beef short ribs brisket alcatra kielbasa ham pork loin pancetta. Pancetta tenderloin shoulder, porchetta tri-tip pastrami ham pork loin tail swine andouille. Sausage landjaeger strip steak tail corned beef biltong meatball picanha beef ribs swine kielbasa. T-bone tail rump kevin doner chuck. Prosciutto andouille pork loin shankle t-bone, turducken sirloin landjaeger pancetta picanha spare ribs filet mignon. Shank ham beef chuck salami tail t-bone shoulder beef ribs kevin.

                -

                Drumstick bacon turducken boudin ribeye cupim. Flank bresaola porchetta hamburger capicola. Sirloin tenderloin jowl, corned beef t-bone meatloaf swine pig. Swine ham hock beef ribs pork, strip steak rump picanha tail kielbasa turducken shank flank short loin chuck.

                -

                Prosciutto meatloaf t-bone shankle biltong, spare ribs pork belly pork cupim. Brisket pork loin kevin short loin cupim chuck jerky sirloin t-bone pig. Doner bresaola boudin beef frankfurter jowl t-bone ham hock strip steak turducken jerky leberkas alcatra flank shoulder. Tenderloin cupim hamburger, cow shoulder capicola jowl shankle swine pork loin meatloaf. Biltong drumstick meatloaf, cow pork belly ham hock pancetta alcatra landjaeger leberkas ball tip salami hamburger turkey.

                -

                Chuck kielbasa shoulder fatback venison pastrami, sausage rump cupim sirloin ham hock tail. Kevin prosciutto capicola brisket beef ribs chicken andouille. Spare ribs meatball kielbasa ribeye pork belly turkey ham. Ham hock beef ribs hamburger, bresaola pork biltong landjaeger. Ball tip picanha short ribs andouille chicken. Cow spare ribs bresaola tongue, ribeye hamburger biltong shank filet mignon drumstick brisket capicola rump short loin. Ham hock bacon sirloin kielbasa sausage doner shoulder.

                -

                Kielbasa cow tail pork, salami jowl leberkas kevin rump swine jerky. Strip steak turducken flank, jowl andouille bacon meatloaf venison alcatra short ribs prosciutto ribeye. Corned beef short loin leberkas tenderloin bresaola sausage pancetta frankfurter bacon. Turducken kevin landjaeger, corned beef bresaola picanha chuck. Ground round shoulder picanha pancetta, fatback shankle pork loin pastrami tri-tip.

                -

                Ribeye ham sirloin, ham hock short ribs flank ground round landjaeger brisket. Chicken prosciutto salami, bresaola capicola jowl ham hock filet mignon pork spare ribs doner biltong. Ball tip hamburger tongue, porchetta short loin meatball pork bresaola meatloaf fatback. Ham sausage ground round tongue pancetta beef ribs. Jerky cow tri-tip shank, tenderloin drumstick tongue ball tip strip steak leberkas pig. Sausage pork chop alcatra, boudin ground round picanha bresaola doner pancetta cow. Porchetta salami short ribs, drumstick ground round shank leberkas tail rump bacon andouille tenderloin sausage meatloaf chicken.

                -

                Salami tongue picanha, cupim cow ground round bacon turducken fatback meatloaf landjaeger leberkas kevin. Ground round kielbasa swine pork loin kevin ball tip. Shankle beef ribs venison biltong turkey, strip steak short ribs fatback kielbasa tenderloin pastrami ham hock ham. Salami bacon tail tongue pancetta cupim pastrami pork chop prosciutto brisket beef ribs. Swine salami ball tip tongue, turducken sausage pork belly frankfurter picanha capicola andouille meatloaf biltong short ribs hamburger. Shankle meatloaf tenderloin meatball, boudin ground round andouille cupim short loin filet mignon capicola. Boudin bresaola spare ribs meatloaf, alcatra bacon pork loin frankfurter prosciutto meatball pork belly salami.

                -

                Corned beef doner flank kevin. Alcatra ham hock kielbasa, pork loin turkey landjaeger bresaola shankle t-bone rump flank tenderloin beef. Meatball shank turducken leberkas t-bone. Ground round beef swine rump porchetta pork chop tri-tip pork loin kielbasa pastrami frankfurter pork andouille.

                -

                Turkey chicken tongue boudin cupim flank porchetta pastrami. Cow ham alcatra, porchetta turkey doner t-bone ribeye brisket spare ribs short ribs kielbasa. Ribeye ground round tenderloin beef ribs. Pancetta capicola porchetta ball tip doner drumstick boudin t-bone shankle. Pancetta flank leberkas, chicken tri-tip porchetta drumstick tail ribeye venison. Landjaeger alcatra turkey, picanha porchetta beef frankfurter meatball bacon pig short loin.

                -

                Filet mignon beef corned beef biltong doner, kielbasa prosciutto venison tenderloin. Shoulder bresaola t-bone pig tenderloin, meatball spare ribs leberkas tongue drumstick picanha rump ground round. Tongue short ribs pig salami rump, boudin andouille hamburger pancetta meatball. Filet mignon capicola pancetta cupim, shank jerky ham hock pork spare ribs strip steak short ribs rump alcatra. Shoulder short ribs picanha, chicken beef ham pork chop leberkas pastrami bresaola meatball salami. Salami pork chop ham hock pork meatloaf kielbasa turkey ribeye chicken tenderloin hamburger boudin frankfurter. Tri-tip hamburger short ribs short loin ham ball tip shoulder landjaeger tongue pig.

                -

                Flank pastrami sausage jerky cupim. Corned beef shankle boudin pancetta salami short ribs. Frankfurter beef ribs ribeye corned beef pastrami landjaeger flank meatloaf pork chop. Prosciutto pig frankfurter leberkas ham hock. Cupim flank tenderloin shank porchetta tail.

                -

                Bresaola beef ribs beef, tongue picanha sirloin short loin biltong. Short ribs leberkas jerky beef ribs tongue bacon pork chop. Meatloaf shankle short loin, jerky cupim chuck ground round biltong ham cow tenderloin. Sausage pancetta ribeye, venison doner landjaeger kielbasa bresaola. Leberkas tail andouille jowl spare ribs pork frankfurter pork belly salami sausage t-bone rump tongue. Flank chuck pork chop short ribs ball tip ham hock jerky shankle beef kielbasa prosciutto salami.

                - - -
                - - - - - + + + + + diff --git a/test/tests.js b/test/tests.js index 77bca60..1708ba7 100644 --- a/test/tests.js +++ b/test/tests.js @@ -14,9 +14,10 @@ QUnit.module('scrollable'); QUnit.test('Returns first scrollable element (html,body)', function(assert) { var scrollable = $('html,body').firstScrollable(); + var scrollingElement = document.scrollingElement || document.body; assert.equal(scrollable.length, 1, 'One scrollable element is returned'); - assert.equal(scrollable[0], document.body, 'Scrollable element is '); + assert.equal(scrollable[0], scrollingElement, 'Scrollable element matches document.scrollingElement or '); }); QUnit.test('Returns scrollable element (div#scrollable)', function(assert) { diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..a6094aa --- /dev/null +++ b/yarn.lock @@ -0,0 +1,1798 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@eslint/eslintrc@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.1.tgz#de0807bfeffc37b964a7d0400e0c348ce5a2543d" + integrity sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.4.0" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@humanwhocodes/config-array@^0.10.4": + version "0.10.4" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c" + integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/gitignore-to-minimatch@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" + integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.8.0: + version "8.8.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== + +ajv@^6.10.0, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-each@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" + integrity sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA== + +array-slice@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" + integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +async@^2.6.0: + version "2.6.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== + dependencies: + lodash "^4.17.14" + +async@~3.2.0: + version "3.2.4" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" + integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +body@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/body/-/body-5.1.0.tgz#e4ba0ce410a46936323367609ecb4e6553125069" + integrity sha512-chUsBxGRtuElD6fmw1gHLpvnKdVLK302peeFa9ZqAEk8TyzZ3fygLyUEDDPTJvL9+Bor0dIwn6ePOsRM2y0zQQ== + dependencies: + continuable-cache "^0.3.1" + error "^7.0.0" + raw-body "~1.1.0" + safe-json-parse "~1.0.1" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +bytes@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-1.0.0.tgz#3569ede8ba34315fab99c3e92cb04c7220de1fa8" + integrity sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ== + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2, chalk@~4.1.0, chalk@~4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +cli@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14" + integrity sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg== + dependencies: + exit "0.1.2" + glob "^7.1.1" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + integrity sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w== + +commander@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +console-browserify@1.1.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + integrity sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg== + dependencies: + date-now "^0.1.4" + +continuable-cache@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" + integrity sha512-TF30kpKhTH8AGCG3dut0rdd/19B7Z+qCnrMoBLpyQu/2drZdNrrpcjPEoJeSVsQM+8KmWG5O56oPDjSSUsuTyA== + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + integrity sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw== + +dateformat@~3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" + integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== + +debug@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.1, debug@^4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +dom-serializer@0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +domelementtype@1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domelementtype@^2.0.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + integrity sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ== + dependencies: + domelementtype "1" + +domutils@1.5: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw== + dependencies: + dom-serializer "0" + domelementtype "1" + +duplexer@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== + +entities@1.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" + integrity sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ== + +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + +error@^7.0.0: + version "7.2.1" + resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894" + integrity sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA== + dependencies: + string-template "~0.2.1" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-kswedberg@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-kswedberg/-/eslint-config-kswedberg-5.1.1.tgz#9d09f8db20c9a69d286e7dfd74670f9e5468a19c" + integrity sha512-NAR85XyhdTGpr7MVKwT6XeoT3VzsGvLTS/3APMPls2OnehlCEcEh6X0MpRlF/c9xQWtAMUbFyOSUEWC2u/IJQw== + +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^8.0.1: + version "8.23.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.0.tgz#a184918d288820179c6041bb3ddcc99ce6eea040" + integrity sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA== + dependencies: + "@eslint/eslintrc" "^1.3.1" + "@humanwhocodes/config-array" "^0.10.4" + "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" + "@humanwhocodes/module-importer" "^1.0.1" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.4.0" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + functional-red-black-tree "^1.0.1" + glob-parent "^6.0.1" + globals "^13.15.0" + globby "^11.1.0" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + +espree@^9.4.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" + integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +eventemitter2@~0.4.13: + version "0.4.14" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" + integrity sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ== + +exit@0.1.2, exit@0.1.x, exit@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw== + dependencies: + homedir-polyfill "^1.0.1" + +extend@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + +faye-websocket@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + integrity sha512-Xhj93RXbMSq8urNCUq4p9l0P6hnySJ/7YNRhYNug0bLOuii7pKO7xQFb5mx9xZXWCar88pLPb805PvUkwrLZpQ== + dependencies: + websocket-driver ">=0.5.1" + +figures@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +findup-sync@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-4.0.0.tgz#956c9cdde804052b881b428512905c4a5f2cdef0" + integrity sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.0" + micromatch "^4.0.2" + resolve-dir "^1.0.1" + +findup-sync@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.3.0.tgz#37930aa5d816b777c03445e1966cc6790a4c0b16" + integrity sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg== + dependencies: + glob "~5.0.0" + +fined@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" + integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== + dependencies: + expand-tilde "^2.0.2" + is-plain-object "^2.0.3" + object.defaults "^1.1.0" + object.pick "^1.2.0" + parse-filepath "^1.0.1" + +flagged-respawn@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" + integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flatted@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== + +for-own@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + integrity sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg== + dependencies: + for-in "^1.0.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +gaze@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" + integrity sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g== + dependencies: + globule "^1.0.0" + +get-intrinsic@^1.0.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +getobject@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/getobject/-/getobject-1.0.2.tgz#25ec87a50370f6dcc3c6ba7ef43c4c16215c4c89" + integrity sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg== + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^7.1.1, glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@~5.0.0: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@~7.1.1, glob@~7.1.6: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg== + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + +globals@^13.15.0: + version "13.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" + integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== + dependencies: + type-fest "^0.20.2" + +globalyzer@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465" + integrity sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q== + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +globrex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" + integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== + +globule@^1.0.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.4.tgz#7c11c43056055a75a6e68294453c17f2796170fb" + integrity sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg== + dependencies: + glob "~7.1.1" + lodash "^4.17.21" + minimatch "~3.0.2" + +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + +grunt-cli@~1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/grunt-cli/-/grunt-cli-1.4.3.tgz#22c9f1a3d2780bf9b0d206e832e40f8f499175ff" + integrity sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ== + dependencies: + grunt-known-options "~2.0.0" + interpret "~1.1.0" + liftup "~3.0.1" + nopt "~4.0.1" + v8flags "~3.2.0" + +grunt-contrib-concat@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz#9ac62117a18b48d1bfccb3eef46c960bbd163d75" + integrity sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw== + dependencies: + chalk "^4.1.2" + source-map "^0.5.3" + +grunt-contrib-jshint@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/grunt-contrib-jshint/-/grunt-contrib-jshint-3.2.0.tgz#d97c125ce6dafef1b0cc766cd87201ae0fb7b408" + integrity sha512-pcXWCSZWfoMSvcV4BwH21TUtLtcX0Ms8IGuOPIcLeXK3fud9KclY7iqMKY94jFx8TxZzh028YYtpR+io8DiEaQ== + dependencies: + chalk "~4.1.2" + hooker "^0.2.3" + jshint "~2.13.4" + +grunt-contrib-uglify@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/grunt-contrib-uglify/-/grunt-contrib-uglify-5.2.2.tgz#447c0b58451a1fca20768371e07e723a870dfe98" + integrity sha512-ITxiWxrjjP+RZu/aJ5GLvdele+sxlznh+6fK9Qckio5ma8f7Iv8woZjRkGfafvpuygxNefOJNc+hfjjBayRn2Q== + dependencies: + chalk "^4.1.2" + maxmin "^3.0.0" + uglify-js "^3.16.1" + uri-path "^1.0.0" + +grunt-contrib-watch@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz#c143ca5b824b288a024b856639a5345aedb78ed4" + integrity sha512-yGweN+0DW5yM+oo58fRu/XIRrPcn3r4tQx+nL7eMRwjpvk+rQY6R8o94BPK0i2UhTg9FN21hS+m8vR8v9vXfeg== + dependencies: + async "^2.6.0" + gaze "^1.1.0" + lodash "^4.17.10" + tiny-lr "^1.1.1" + +grunt-eslint@^24.0.0: + version "24.0.0" + resolved "https://registry.yarnpkg.com/grunt-eslint/-/grunt-eslint-24.0.0.tgz#ad14e1cd9c869e0365e2bf4a97241c0c8844c7cc" + integrity sha512-WpTeBBFweyhMuPjGwRSQV9JFJ+EczIdlsc7Dd/1g78QVI1aZsk4g/H3e+3S5HEwsS1RKL2YZIrGj8hMLlBfN8w== + dependencies: + chalk "^4.1.2" + eslint "^8.0.1" + +grunt-known-options@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/grunt-known-options/-/grunt-known-options-2.0.0.tgz#cac641e897f9a0a680b8c9839803d35f3325103c" + integrity sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA== + +grunt-legacy-log-utils@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz#49a8c7dc74051476dcc116c32faf9db8646856ef" + integrity sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw== + dependencies: + chalk "~4.1.0" + lodash "~4.17.19" + +grunt-legacy-log@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz#1c6eaf92371ea415af31ea84ce50d434ef6d39c4" + integrity sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA== + dependencies: + colors "~1.1.2" + grunt-legacy-log-utils "~2.1.0" + hooker "~0.2.3" + lodash "~4.17.19" + +grunt-legacy-util@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz#0f929d13a2faf9988c9917c82bff609e2d9ba255" + integrity sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w== + dependencies: + async "~3.2.0" + exit "~0.1.2" + getobject "~1.0.0" + hooker "~0.2.3" + lodash "~4.17.21" + underscore.string "~3.3.5" + which "~2.0.2" + +grunt-shell@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/grunt-shell/-/grunt-shell-4.0.0.tgz#9b04a18a59c3113f24391a3fb5625320538cbd1c" + integrity sha512-dHFy8VZDfWGYLTeNvIHze4PKXGvIlDWuN0UE7hUZstTQeiEyv1VmW1MaDYQ3X5tE3bCi3bEia1gGKH8z/f1czQ== + dependencies: + chalk "^3.0.0" + npm-run-path "^2.0.0" + strip-ansi "^6.0.1" + +grunt-version@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/grunt-version/-/grunt-version-3.0.0.tgz#d8bed534d133999fda781357a4b87af9caa8f2ca" + integrity sha512-ifjJDlpFC6qZuBl7jJrbmef74/uIIZ/rstZoOULdnWMrturwLY9WYS/d8INceFchfduG6zWQEDF0L4nIhxGysA== + dependencies: + grunt "^1.4.1" + semver "^7.3.5" + +grunt@^1.0.1, grunt@^1.4.1: + version "1.5.3" + resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.5.3.tgz#3214101d11257b7e83cf2b38ea173b824deab76a" + integrity sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ== + dependencies: + dateformat "~3.0.3" + eventemitter2 "~0.4.13" + exit "~0.1.2" + findup-sync "~0.3.0" + glob "~7.1.6" + grunt-cli "~1.4.3" + grunt-known-options "~2.0.0" + grunt-legacy-log "~3.0.0" + grunt-legacy-util "~2.0.1" + iconv-lite "~0.4.13" + js-yaml "~3.14.0" + minimatch "~3.0.4" + mkdirp "~1.0.4" + nopt "~3.0.6" + rimraf "~3.0.2" + +gzip-size@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" + integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== + dependencies: + duplexer "^0.1.1" + pify "^4.0.1" + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== + dependencies: + parse-passwd "^1.0.0" + +hooker@^0.2.3, hooker@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/hooker/-/hooker-0.2.3.tgz#b834f723cc4a242aa65963459df6d984c5d3d959" + integrity sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA== + +htmlparser2@3.8.x: + version "3.8.3" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" + integrity sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q== + dependencies: + domelementtype "1" + domhandler "2.3" + domutils "1.5" + entities "1.0" + readable-stream "1.1" + +http-parser-js@>=0.5.1: + version "0.5.8" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3" + integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== + +iconv-lite@~0.4.13: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@~2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@^1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +interpret@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" + integrity sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA== + +is-absolute@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" + integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== + dependencies: + is-relative "^1.0.0" + is-windows "^1.0.1" + +is-core-module@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== + dependencies: + has "^1.0.3" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-relative@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" + integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== + dependencies: + is-unc-path "^1.0.0" + +is-unc-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" + integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== + dependencies: + unc-path-regex "^0.1.2" + +is-windows@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + +jquery@>=1.7.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.1.tgz#fab0408f8b45fc19f956205773b62b292c147a16" + integrity sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +js-yaml@~3.14.0: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jshint@~2.13.4: + version "2.13.5" + resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.13.5.tgz#34654b44387ef112b39c205e2e70b99385376579" + integrity sha512-dB2n1w3OaQ35PLcBGIWXlszjbPZwsgZoxsg6G8PtNf2cFMC1l0fObkYLUuXqTTdi6tKw4sAjfUseTdmDMHQRcg== + dependencies: + cli "~1.0.0" + console-browserify "1.1.x" + exit "0.1.x" + htmlparser2 "3.8.x" + lodash "~4.17.21" + minimatch "~3.0.2" + strip-json-comments "1.0.x" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +liftup@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/liftup/-/liftup-3.0.1.tgz#1cb81aff0f368464ed3a5f1a7286372d6b1a60ce" + integrity sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw== + dependencies: + extend "^3.0.2" + findup-sync "^4.0.0" + fined "^1.2.0" + flagged-respawn "^1.0.1" + is-plain-object "^2.0.4" + object.map "^1.0.1" + rechoir "^0.7.0" + resolve "^1.19.0" + +livereload-js@^2.3.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.4.0.tgz#447c31cf1ea9ab52fc20db615c5ddf678f78009c" + integrity sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw== + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.21, lodash@^4.17.4, lodash@~4.17.19, lodash@~4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +make-iterator@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" + integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== + dependencies: + kind-of "^6.0.2" + +map-cache@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== + +marked@^4.0.19: + version "4.0.19" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.19.tgz#d36198d1ac1255525153c351c68c75bc1d7aee46" + integrity sha512-rgQF/OxOiLcvgUAj1Q1tAf4Bgxn5h5JZTp04Fx4XUkVhs7B+7YA9JEWJhJpoO8eJt8MkZMwqLCNeNqj1bCREZQ== + +maxmin@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/maxmin/-/maxmin-3.0.0.tgz#3ee9acc8a2b9f2b5416e94f5705319df8a9c71e6" + integrity sha512-wcahMInmGtg/7c6a75fr21Ch/Ks1Tb+Jtoan5Ft4bAI0ZvJqyOw8kkM7e7p8hDSzY805vmxwHT50KcjGwKyJ0g== + dependencies: + chalk "^4.1.0" + figures "^3.2.0" + gzip-size "^5.1.1" + pretty-bytes "^5.3.0" + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.2, micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@~3.0.2, minimatch@~3.0.4: + version "3.0.8" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" + integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== + dependencies: + brace-expansion "^1.1.7" + +mkdirp@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +node-syntaxhighlighter@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/node-syntaxhighlighter/-/node-syntaxhighlighter-0.8.1.tgz#7b34e1fbb11c8fc8e0a62adbe232dea5ae58e89a" + integrity sha512-N+3ARVNqKNIYslQAmHiX1KqPy8nNRrAdErbtoAVxHNEyO9uKOmfcmYrOniWJkZpl1taUnSOmr8Iz0KapE7kjmA== + +node-watch@0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/node-watch/-/node-watch-0.7.3.tgz#6d4db88e39c8d09d3ea61d6568d80e5975abc7ab" + integrity sha512-3l4E8uMPY1HdMMryPRUAl+oIHtXtyiTlIiESNSVSNxcPfzAFzeTbXFQkZfAwBbo0B1qMSG8nUABx+Gd+YrbKrQ== + +nopt@~3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg== + dependencies: + abbrev "1" + +nopt@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== + dependencies: + abbrev "1" + osenv "^0.1.4" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw== + dependencies: + path-key "^2.0.0" + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + +object.defaults@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" + integrity sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA== + dependencies: + array-each "^1.0.1" + array-slice "^1.0.0" + for-own "^1.0.0" + isobject "^3.0.0" + +object.map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" + integrity sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w== + dependencies: + for-own "^1.0.0" + make-iterator "^1.0.0" + +object.pick@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== + dependencies: + isobject "^3.0.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ== + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-filepath@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" + integrity sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q== + dependencies: + is-absolute "^1.0.0" + map-cache "^0.2.0" + path-root "^0.1.1" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + integrity sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ== + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + integrity sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg== + dependencies: + path-root-regex "^0.1.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +pretty-bytes@^5.3.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" + integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@^6.4.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +qunit@^2.19.1: + version "2.19.1" + resolved "https://registry.yarnpkg.com/qunit/-/qunit-2.19.1.tgz#eb1afd188da9e47f07c13aa70461a1d9c4505490" + integrity sha512-gSGuw0vErE/rNjnlBW/JmE7NNubBlGrDPQvsug32ejYhcVFuZec9yoU0+C30+UgeCGwq6Ap89K65dMGo+kDGZQ== + dependencies: + commander "7.2.0" + node-watch "0.7.3" + tiny-glob "0.2.9" + +raw-body@~1.1.0: + version "1.1.7" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-1.1.7.tgz#1d027c2bfa116acc6623bca8f00016572a87d425" + integrity sha512-WmJJU2e9Y6M5UzTOkHaM7xJGAPQD8PNzx3bAd2+uhZAim6wDk6dAZxPVYLF67XhbR4hmKGh33Lpmh4XWrCH5Mg== + dependencies: + bytes "1" + string_decoder "0.10" + +readable-stream@1.1: + version "1.1.13" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" + integrity sha512-E98tWzqShvKDGpR2MbjsDkDQWLW2TfWUC15H4tNQhIJ5Lsta84l8nUGL9/ybltGwe+wZzWPpc1Kmd2wQP4bdCA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +rechoir@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" + integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== + dependencies: + resolve "^1.9.0" + +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +resolve-dir@^1.0.0, resolve-dir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg== + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@^1.19.0, resolve@^1.9.0: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^3.0.2, rimraf@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-buffer@>=5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-json-parse@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57" + integrity sha512-o0JmTu17WGUaUOHa1l0FPGXKBfijbxK6qoHzlkihsDXxzBHvJcA7zgviKR92Xs841rX9pK16unfphLq0/KqX7A== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +semver@^7.3.5: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map@^0.5.3: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== + +sprintf-js@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" + integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +string-template@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" + integrity sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw== + +string_decoder@0.10, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== + +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-json-comments@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + integrity sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg== + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +tiny-glob@0.2.9: + version "0.2.9" + resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2" + integrity sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg== + dependencies: + globalyzer "0.1.0" + globrex "^0.1.2" + +tiny-lr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tiny-lr/-/tiny-lr-1.1.1.tgz#9fa547412f238fedb068ee295af8b682c98b2aab" + integrity sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA== + dependencies: + body "^5.1.0" + debug "^3.1.0" + faye-websocket "~0.10.0" + livereload-js "^2.3.0" + object-assign "^4.1.0" + qs "^6.4.0" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +uglify-js@^3.16.1: + version "3.17.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.0.tgz#55bd6e9d19ce5eef0d5ad17cd1f587d85b180a85" + integrity sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg== + +unc-path-regex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + integrity sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg== + +underscore.string@~3.3.5: + version "3.3.6" + resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.3.6.tgz#ad8cf23d7423cb3b53b898476117588f4e2f9159" + integrity sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ== + dependencies: + sprintf-js "^1.1.1" + util-deprecate "^1.0.2" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +uri-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/uri-path/-/uri-path-1.0.0.tgz#9747f018358933c31de0fccfd82d138e67262e32" + integrity sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg== + +util-deprecate@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +v8flags@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656" + integrity sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg== + dependencies: + homedir-polyfill "^1.0.1" + +websocket-driver@>=0.5.1: + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== + +which@^1.2.14: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1, which@~2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 81de13c253a747c1da00ce74e1fc600ae65dc278 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Tue, 29 Aug 2023 10:39:21 -0400 Subject: [PATCH 56/63] Lint js files --- .eslintrc.js | 5 ++++- Gruntfile.js | 17 ++++++++--------- src/jquery.smooth-scroll.js | 22 ++++++++++------------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 701dd0d..56cbb6e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,6 @@ module.exports = { - extends: 'kswedberg/es5' + extends: 'kswedberg/es5', + rules: { + 'comma-dangle': ['warn', 'never'] + } }; diff --git a/Gruntfile.js b/Gruntfile.js index a28c743..9a733e6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -5,10 +5,9 @@ module.exports = function(grunt) { marked.setOptions({ highlight: function(code, lang) { - lang = lang || 'javascript'; - lang = hl.getLanguage(lang); + var language = hl.getLanguage(lang || 'javascript'); - return hl.highlight(code, lang); + return hl.highlight(code, language); }, gfm: true }); @@ -40,11 +39,11 @@ module.exports = function(grunt) { var umdHead = grunt.file.read('lib/tmpl/umdhead.tpl'); var umdFoot = grunt.file.read('lib/tmpl/umdfoot.tpl'); - src = src + var ret = src .replace('(function($) {', umdHead) .replace('})(jQuery);', umdFoot); - return src; + return ret; } } }, @@ -54,7 +53,7 @@ module.exports = function(grunt) { 'jquery.<%= pluginName %>.min.js': ['<%= concat.all.dest %>'] }, options: { - banner: '<%= meta.banner %>', + banner: '<%= meta.banner %>' // preserveComments: /\/\*[\s\S]*/ } } @@ -95,8 +94,8 @@ module.exports = function(grunt) { eslint: { target: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'], options: { - fix: true, - configFile: '.eslintrc.js', + fix: true + // configFile: '.eslintrc.js', } }, version: { @@ -115,7 +114,7 @@ module.exports = function(grunt) { }, package: { src: ['package.json'] - }, + } } }); diff --git a/src/jquery.smooth-scroll.js b/src/jquery.smooth-scroll.js index 6b5c2f8..93f4b05 100644 --- a/src/jquery.smooth-scroll.js +++ b/src/jquery.smooth-scroll.js @@ -25,11 +25,11 @@ // fn(opts) function to be called before scrolling occurs. // `this` is the element(s) being scrolled - beforeScroll: function() {}, + beforeScroll: function() {/* empty by default */}, // fn(opts) function to be called after scrolling occurs. // `this` is the triggering element - afterScroll: function() {}, + afterScroll: function() {/* empty by default */}, // easing name. jQuery comes with "swing" and "linear." For others, you'll need an easing plugin // from jQuery UI or elsewhere @@ -108,7 +108,7 @@ return scrollable; }; - var rRelative = /^([\-\+]=)(\d+)/; + var rRelative = /^([-+]=)(\d+)/; $.fn.extend({ scrollable: function(dir) { @@ -123,9 +123,9 @@ }, smoothScroll: function(options, extra) { - options = options || {}; + var userOptions = options || {}; - if (options === 'options') { + if (userOptions === 'options') { if (!extra) { return this.first().data('ssOpts'); } @@ -138,7 +138,7 @@ }); } - var opts = $.extend({}, $.fn.smoothScroll.defaults, options); + var opts = $.extend({}, $.fn.smoothScroll.defaults, userOptions); var clickHandler = function(event) { var escapeSelector = function(str) { @@ -324,12 +324,10 @@ $.smoothScroll.version = version; $.smoothScroll.filterPath = function(string) { - string = string || ''; - - return string - .replace(/^\//, '') - .replace(/(?:index|default).[a-zA-Z]{3,4}$/, '') - .replace(/\/$/, ''); + return (string || '') + .replace(/^\//, '') + .replace(/(?:index|default).[a-zA-Z]{3,4}$/, '') + .replace(/\/$/, ''); }; // default options From 2f9905167f9e3d463da6a24784f24328d45a59b2 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Tue, 29 Aug 2023 10:44:48 -0400 Subject: [PATCH 57/63] Update packages --- package.json | 2 +- yarn.lock | 406 +++++++++++++++++++++++++-------------------------- 2 files changed, 199 insertions(+), 209 deletions(-) diff --git a/package.json b/package.json index a5229e5..c114cae 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "demo": "http://plugins.learningjquery.com/smooth-scroll/demo/", "license": "MIT", "dependencies": { - "jquery": ">=1.7.0" + "jquery": ">=1.12.2" }, "devDependencies": { "eslint-config-kswedberg": "^5.1.1", diff --git a/yarn.lock b/yarn.lock index a6094aa..11385ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,34 +2,51 @@ # yarn lockfile v1 -"@eslint/eslintrc@^1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.1.tgz#de0807bfeffc37b964a7d0400e0c348ce5a2543d" - integrity sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ== +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.6.1": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.0.tgz#11195513186f68d42fbf449f9a7136b2c0c92005" + integrity sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg== + +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.4.0" - globals "^13.15.0" + espree "^9.6.0" + globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.10.4": - version "0.10.4" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c" - integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw== +"@eslint/js@8.48.0": + version "8.48.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.48.0.tgz#642633964e217905436033a2bd08bf322849b7fb" + integrity sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw== + +"@humanwhocodes/config-array@^0.11.10": + version "0.11.10" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2" + integrity sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" - minimatch "^3.0.4" - -"@humanwhocodes/gitignore-to-minimatch@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" - integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== + minimatch "^3.0.5" "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" @@ -49,12 +66,12 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@2.0.5": version "2.0.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -72,12 +89,12 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.8.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" - integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== +acorn@^8.9.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -121,11 +138,6 @@ array-slice@^1.0.0: resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - async@^2.6.0: version "2.6.4" resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" @@ -273,6 +285,11 @@ dateformat@~3.0.3: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== +dateformat@~4.6.2: + version "4.6.3" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" + integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA== + debug@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -297,13 +314,6 @@ detect-file@^1.0.0: resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" integrity sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q== -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -377,98 +387,84 @@ escape-string-regexp@^4.0.0: integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== eslint-config-kswedberg@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-kswedberg/-/eslint-config-kswedberg-5.1.1.tgz#9d09f8db20c9a69d286e7dfd74670f9e5468a19c" - integrity sha512-NAR85XyhdTGpr7MVKwT6XeoT3VzsGvLTS/3APMPls2OnehlCEcEh6X0MpRlF/c9xQWtAMUbFyOSUEWC2u/IJQw== + version "5.3.4" + resolved "https://registry.yarnpkg.com/eslint-config-kswedberg/-/eslint-config-kswedberg-5.3.4.tgz#01ae24080896ad78a7be1c34aaf89dac3872153e" + integrity sha512-uHh3mkaUTmlJX1JAyP9AQgsm0ICQq0Wq2grx66yJxRV69UhMrc5gN+fHDLChF4ixDgz8tBSnss7umDjYTW/jTg== -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== - -eslint@^8.0.1: - version "8.23.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.0.tgz#a184918d288820179c6041bb3ddcc99ce6eea040" - integrity sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA== - dependencies: - "@eslint/eslintrc" "^1.3.1" - "@humanwhocodes/config-array" "^0.10.4" - "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.44.0: + version "8.48.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.48.0.tgz#bf9998ba520063907ba7bfe4c480dc8be03c2155" + integrity sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.48.0" + "@humanwhocodes/config-array" "^0.11.10" "@humanwhocodes/module-importer" "^1.0.1" - ajv "^6.10.0" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" find-up "^5.0.0" - functional-red-black-tree "^1.0.1" - glob-parent "^6.0.1" - globals "^13.15.0" - globby "^11.1.0" - grapheme-splitter "^1.0.4" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" + is-path-inside "^3.0.3" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" + optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.4.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" - integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^8.8.0" + acorn "^8.9.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" + eslint-visitor-keys "^3.4.1" esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" @@ -516,17 +512,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.2.9: - version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" - integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -538,9 +523,9 @@ fast-levenshtein@^2.0.6: integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== dependencies: reusify "^1.0.4" @@ -597,6 +582,16 @@ findup-sync@~0.3.0: dependencies: glob "~5.0.0" +findup-sync@~5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-5.0.0.tgz#54380ad965a7edca00cc8f63113559aadc541bd2" + integrity sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.3" + micromatch "^4.0.4" + resolve-dir "^1.0.1" + fined@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" @@ -614,14 +609,15 @@ flagged-respawn@^1.0.1: integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.1.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.0.tgz#0e54ab4a1a60fe87e2946b6b00657f1c99e1af3f" + integrity sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew== dependencies: - flatted "^3.1.0" + flatted "^3.2.7" + keyv "^4.5.3" rimraf "^3.0.2" -flatted@^3.1.0: +flatted@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== @@ -648,11 +644,6 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - gaze@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" @@ -674,14 +665,7 @@ getobject@~1.0.0: resolved "https://registry.yarnpkg.com/getobject/-/getobject-1.0.2.tgz#25ec87a50370f6dcc3c6ba7ef43c4c16215c4c89" integrity sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg== -glob-parent@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.1: +glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== @@ -743,10 +727,10 @@ global-prefix@^1.0.1: is-windows "^1.0.1" which "^1.2.14" -globals@^13.15.0: - version "13.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" - integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== +globals@^13.19.0: + version "13.21.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.21.0.tgz#163aae12f34ef502f5153cfbdd3600f36c63c571" + integrity sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg== dependencies: type-fest "^0.20.2" @@ -755,18 +739,6 @@ globalyzer@0.1.0: resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465" integrity sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q== -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - globrex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" @@ -781,10 +753,10 @@ globule@^1.0.0: lodash "^4.17.21" minimatch "~3.0.2" -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== grunt-cli@~1.4.3: version "1.4.3" @@ -835,12 +807,12 @@ grunt-contrib-watch@^1.0.0: tiny-lr "^1.1.1" grunt-eslint@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/grunt-eslint/-/grunt-eslint-24.0.0.tgz#ad14e1cd9c869e0365e2bf4a97241c0c8844c7cc" - integrity sha512-WpTeBBFweyhMuPjGwRSQV9JFJ+EczIdlsc7Dd/1g78QVI1aZsk4g/H3e+3S5HEwsS1RKL2YZIrGj8hMLlBfN8w== + version "24.3.0" + resolved "https://registry.yarnpkg.com/grunt-eslint/-/grunt-eslint-24.3.0.tgz#2b82d107f6963de91daf58cf8311221a806a6de5" + integrity sha512-dUPiRgX8fhmh4uwTAn9xrzg7HV5j5DhGmZZGJdHfjy/AN9G4jD+5IjfbcAJ209JcIG8m4B7xz3crIhuDSm3siQ== dependencies: chalk "^4.1.2" - eslint "^8.0.1" + eslint "^8.44.0" grunt-known-options@~2.0.0: version "2.0.0" @@ -895,7 +867,26 @@ grunt-version@^3.0.0: grunt "^1.4.1" semver "^7.3.5" -grunt@^1.0.1, grunt@^1.4.1: +grunt@^1.0.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.6.1.tgz#0b4dd1524f26676dcf45d8f636b8d9061a8ede16" + integrity sha512-/ABUy3gYWu5iBmrUSRBP97JLpQUm0GgVveDCp6t3yRNIoltIYw7rEj3g5y1o2PGPR2vfTRGa7WC/LZHLTXnEzA== + dependencies: + dateformat "~4.6.2" + eventemitter2 "~0.4.13" + exit "~0.1.2" + findup-sync "~5.0.0" + glob "~7.1.6" + grunt-cli "~1.4.3" + grunt-known-options "~2.0.0" + grunt-legacy-log "~3.0.0" + grunt-legacy-util "~2.0.1" + iconv-lite "~0.6.3" + js-yaml "~3.14.0" + minimatch "~3.0.4" + nopt "~3.0.6" + +grunt@^1.4.1: version "1.5.3" resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.5.3.tgz#3214101d11257b7e83cf2b38ea173b824deab76a" integrity sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ== @@ -976,12 +967,19 @@ iconv-lite@~0.4.13: dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@~0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -1025,10 +1023,10 @@ is-absolute@^1.0.0: is-relative "^1.0.0" is-windows "^1.0.1" -is-core-module@^2.9.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" - integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== +is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== dependencies: has "^1.0.3" @@ -1037,7 +1035,7 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: +is-glob@^4.0.0, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -1049,6 +1047,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -1090,10 +1093,10 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== -jquery@>=1.7.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.1.tgz#fab0408f8b45fc19f956205773b62b292c147a16" - integrity sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw== +jquery@>=1.12.2: + version "3.7.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" + integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== js-yaml@^4.1.0: version "4.1.0" @@ -1123,6 +1126,11 @@ jshint@~2.13.4: minimatch "~3.0.2" strip-json-comments "1.0.x" +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -1133,6 +1141,13 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +keyv@^4.5.3: + version "4.5.3" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.3.tgz#00873d2b046df737963157bd04f294ca818c9c25" + integrity sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug== + dependencies: + json-buffer "3.0.1" + kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -1202,9 +1217,9 @@ map-cache@^0.2.0: integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== marked@^4.0.19: - version "4.0.19" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.19.tgz#d36198d1ac1255525153c351c68c75bc1d7aee46" - integrity sha512-rgQF/OxOiLcvgUAj1Q1tAf4Bgxn5h5JZTp04Fx4XUkVhs7B+7YA9JEWJhJpoO8eJt8MkZMwqLCNeNqj1bCREZQ== + version "4.3.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" + integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== maxmin@^3.0.0: version "3.0.0" @@ -1216,11 +1231,6 @@ maxmin@^3.0.0: gzip-size "^5.1.1" pretty-bytes "^5.3.0" -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" @@ -1229,7 +1239,7 @@ micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" -"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -1337,17 +1347,17 @@ once@^1.3.0: dependencies: wrappy "1" -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.3" os-homedir@^1.0.0: version "1.0.2" @@ -1439,11 +1449,6 @@ path-root@^0.1.1: dependencies: path-root-regex "^0.1.0" -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -1465,9 +1470,9 @@ pretty-bytes@^5.3.0: integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== qs@^6.4.0: version "6.11.0" @@ -1482,9 +1487,9 @@ queue-microtask@^1.2.2: integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== qunit@^2.19.1: - version "2.19.1" - resolved "https://registry.yarnpkg.com/qunit/-/qunit-2.19.1.tgz#eb1afd188da9e47f07c13aa70461a1d9c4505490" - integrity sha512-gSGuw0vErE/rNjnlBW/JmE7NNubBlGrDPQvsug32ejYhcVFuZec9yoU0+C30+UgeCGwq6Ap89K65dMGo+kDGZQ== + version "2.19.4" + resolved "https://registry.yarnpkg.com/qunit/-/qunit-2.19.4.tgz#2d689bb1165edd4b812e3ed2ee06ff907e9f2ece" + integrity sha512-aqUzzUeCqlleWYKlpgfdHHw9C6KxkB9H3wNfiBg5yHqQMzy0xw/pbCRHYFkjl8MsP/t8qkTQE+JTYL71azgiew== dependencies: commander "7.2.0" node-watch "0.7.3" @@ -1515,11 +1520,6 @@ rechoir@^0.7.0: dependencies: resolve "^1.9.0" -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" @@ -1534,11 +1534,11 @@ resolve-from@^4.0.0: integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve@^1.19.0, resolve@^1.9.0: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + version "1.22.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== dependencies: - is-core-module "^2.9.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -1571,7 +1571,7 @@ safe-json-parse@~1.0.1: resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57" integrity sha512-o0JmTu17WGUaUOHa1l0FPGXKBfijbxK6qoHzlkihsDXxzBHvJcA7zgviKR92Xs841rX9pK16unfphLq0/KqX7A== -"safer-buffer@>= 2.1.2 < 3": +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -1604,11 +1604,6 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - source-map@^0.5.3: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -1646,7 +1641,7 @@ strip-json-comments@1.0.x: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" integrity sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -1777,11 +1772,6 @@ which@^2.0.1, which@~2.0.2: dependencies: isexe "^2.0.0" -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" From 03ce9b74d5e382af0e48a74bbeb9148ad11bd48b Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Tue, 29 Aug 2023 10:48:43 -0400 Subject: [PATCH 58/63] Bump node version in .nvmrc --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 1e8b314..b6a7d89 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -6 +16 From 641f46c962d46eba854ddd1ea2e1826159475fc6 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Tue, 29 Aug 2023 11:03:15 -0400 Subject: [PATCH 59/63] Update grunt-version --- yarn.lock | 80 +++++++++---------------------------------------------- 1 file changed, 12 insertions(+), 68 deletions(-) diff --git a/yarn.lock b/yarn.lock index 11385ef..b4e0da0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -280,11 +280,6 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw== -dateformat@~3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" - integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== - dateformat@~4.6.2: version "4.6.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" @@ -575,13 +570,6 @@ findup-sync@^4.0.0: micromatch "^4.0.2" resolve-dir "^1.0.1" -findup-sync@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.3.0.tgz#37930aa5d816b777c03445e1966cc6790a4c0b16" - integrity sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg== - dependencies: - glob "~5.0.0" - findup-sync@~5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-5.0.0.tgz#54380ad965a7edca00cc8f63113559aadc541bd2" @@ -684,17 +672,6 @@ glob@^7.1.1, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@~5.0.0: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@~7.1.1, glob@~7.1.6: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" @@ -860,14 +837,14 @@ grunt-shell@^4.0.0: strip-ansi "^6.0.1" grunt-version@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/grunt-version/-/grunt-version-3.0.0.tgz#d8bed534d133999fda781357a4b87af9caa8f2ca" - integrity sha512-ifjJDlpFC6qZuBl7jJrbmef74/uIIZ/rstZoOULdnWMrturwLY9WYS/d8INceFchfduG6zWQEDF0L4nIhxGysA== + version "3.0.1" + resolved "https://registry.yarnpkg.com/grunt-version/-/grunt-version-3.0.1.tgz#e19eba52b66aac629c766670f404f4a41ba0341f" + integrity sha512-GBGCQffBZVYlRAnZn5qJ+4E+u4hH0VfhYjQoLqPSfeTO1QuSoG3CR7p4dK3v/gHp3ct9kN2pZrOJnutsdbEUvA== dependencies: grunt "^1.4.1" - semver "^7.3.5" + semver "^7.5.4" -grunt@^1.0.1: +grunt@^1.0.1, grunt@^1.4.1: version "1.6.1" resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.6.1.tgz#0b4dd1524f26676dcf45d8f636b8d9061a8ede16" integrity sha512-/ABUy3gYWu5iBmrUSRBP97JLpQUm0GgVveDCp6t3yRNIoltIYw7rEj3g5y1o2PGPR2vfTRGa7WC/LZHLTXnEzA== @@ -886,27 +863,6 @@ grunt@^1.0.1: minimatch "~3.0.4" nopt "~3.0.6" -grunt@^1.4.1: - version "1.5.3" - resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.5.3.tgz#3214101d11257b7e83cf2b38ea173b824deab76a" - integrity sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ== - dependencies: - dateformat "~3.0.3" - eventemitter2 "~0.4.13" - exit "~0.1.2" - findup-sync "~0.3.0" - glob "~7.1.6" - grunt-cli "~1.4.3" - grunt-known-options "~2.0.0" - grunt-legacy-log "~3.0.0" - grunt-legacy-util "~2.0.1" - iconv-lite "~0.4.13" - js-yaml "~3.14.0" - minimatch "~3.0.4" - mkdirp "~1.0.4" - nopt "~3.0.6" - rimraf "~3.0.2" - gzip-size@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" @@ -960,13 +916,6 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3" integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== -iconv-lite@~0.4.13: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - iconv-lite@~0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" @@ -1239,7 +1188,7 @@ micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" -"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -1253,11 +1202,6 @@ minimatch@~3.0.2, minimatch@~3.0.4: dependencies: brace-expansion "^1.1.7" -mkdirp@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -1547,7 +1491,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.2, rimraf@~3.0.2: +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -1571,15 +1515,15 @@ safe-json-parse@~1.0.1: resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57" integrity sha512-o0JmTu17WGUaUOHa1l0FPGXKBfijbxK6qoHzlkihsDXxzBHvJcA7zgviKR92Xs841rX9pK16unfphLq0/KqX7A== -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": +"safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -semver@^7.3.5: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== +semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" From 5b52bcde24156ae848222cfdc93b20c893bebeb6 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Tue, 2 Jan 2024 12:54:30 -0500 Subject: [PATCH 60/63] Move jquery dependency to devDependencies and update to latest 3.x.x * consumer can use any jQuery version >= 1.7, but I don't want dependabot warnings --- package.json | 5 ++--- yarn.lock | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c114cae..4042886 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,7 @@ "bugs": "https://github.com/kswedberg/jquery-smooth-scroll/issues", "demo": "http://plugins.learningjquery.com/smooth-scroll/demo/", "license": "MIT", - "dependencies": { - "jquery": ">=1.12.2" - }, + "dependencies": {}, "devDependencies": { "eslint-config-kswedberg": "^5.1.1", "grunt": "^1.0.1", @@ -31,6 +29,7 @@ "grunt-eslint": "^24.0.0", "grunt-shell": "^4.0.0", "grunt-version": "^3.0.0", + "jquery": "^3.7.1", "lodash": "^4.17.4", "marked": "^4.0.19", "node-syntaxhighlighter": "^0.8.1", diff --git a/yarn.lock b/yarn.lock index b4e0da0..4b97d92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1042,7 +1042,7 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== -jquery@>=1.12.2: +jquery@^3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== From 1f98389199afe3c6e2a6cd4d04b26b55a0456635 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:05:00 +0000 Subject: [PATCH 61/63] Bump braces from 3.0.2 to 3.0.3 Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4b97d92..514900c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -174,11 +174,11 @@ brace-expansion@^1.1.7: concat-map "0.0.1" braces@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - fill-range "^7.0.1" + fill-range "^7.1.1" bytes@1: version "1.0.0" @@ -545,10 +545,10 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" From c35c0a716482c049e23799ac133041e907445464 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 14:55:42 +0000 Subject: [PATCH 62/63] Bump micromatch from 4.0.5 to 4.0.8 Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8. - [Release notes](https://github.com/micromatch/micromatch/releases) - [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8) --- updated-dependencies: - dependency-name: micromatch dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 514900c..f347416 100644 --- a/yarn.lock +++ b/yarn.lock @@ -173,7 +173,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.2: +braces@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== @@ -1181,11 +1181,11 @@ maxmin@^3.0.0: pretty-bytes "^5.3.0" micromatch@^4.0.2, micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: - braces "^3.0.2" + braces "^3.0.3" picomatch "^2.3.1" minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: From beeb7eace7bcc86a9c5f2779d1657a0c0e8c5f43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:40:46 +0000 Subject: [PATCH 63/63] Bump cross-spawn from 7.0.3 to 7.0.6 Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6. - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index f347416..f589f55 100644 --- a/yarn.lock +++ b/yarn.lock @@ -267,9 +267,9 @@ core-util-is@~1.0.0: integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0"