diff --git a/README.md b/README.md index d9f25e1..23dea78 100755 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@
[![npm Version](https://badgen.net/npm/v/scroll-snap-slider)](https://www.npmjs.com/package/scroll-snap-slider) [![Dependency Count: 0](https://badgen.net/bundlephobia/dependency-count/scroll-snap-slider)](https://bundlephobia.com/result?p=scroll-snap-slider) -[![minzippped Size](https://badgen.net/bundlephobia/minzip/scroll-snap-slider)](https://bundlephobia.com/result?p=scroll-snap-slider) +[![minzipped Size](https://badgen.net/bundlephobia/minzip/scroll-snap-slider)](https://bundlephobia.com/result?p=scroll-snap-slider) Mostly CSS slider with great performance. @@ -54,9 +54,9 @@ the entrypoint changing from 'ScrollSnapSlider' to 'index'. | index | 348 B | 143 B | | ScrollSnapAutoplay | 1479 B | 559 B | | ScrollSnapDraggable | 2459 B | 772 B | -| ScrollSnapLoop | 1840 B | 623 B | +| ScrollSnapLoop | 1849 B | 615 B | | ScrollSnapPlugin | 70 B | 110 B | -| ScrollSnapSlider | 2361 B | 811 B | +| ScrollSnapSlider | 2361 B | 809 B | ## Restrictions @@ -77,9 +77,7 @@ yarn add scroll-snap-slider ## Usage -HTML + CSS are enough for a working slider. You can use IDs and anchor links to create navigation buttons. - -The ES6 class provided in this package augments the slider with a few events and methods. +The class provided in this package augments a slider with a few events and methods. ### Markup @@ -111,7 +109,7 @@ You can add whatever markup inside the slides. ### Additional Styles -Prevents page navigation on horizontal scrolling, i.E. on MacOS. +Prevents page navigation on horizontal scrolling, i.E. on macOS. [\[Support tables\]](https://caniuse.com/?search=overscroll-behavior) ```css @@ -138,44 +136,44 @@ events and exposes a few methods, with which you can enhance your slider's behav **Default behaviour:** ```javascript -import {ScrollSnapSlider} from 'scroll-snap-slider' +import { ScrollSnapSlider } from 'scroll-snap-slider' const element = document.querySelector('.example-slider') -const slider = new ScrollSnapSlider({element}) +const slider = new ScrollSnapSlider({ element }) slider.addEventListener('slide-start', function (event) { - console.info(`Started sliding towards slide ${event.detail}.`) + console.info(`Started sliding towards slide ${event.detail}.`) }) slider.addEventListener('slide-pass', function (event) { - console.info(`Passing slide ${event.detail}.`) + console.info(`Passing slide ${event.detail}.`) }) slider.addEventListener('slide-stop', function (event) { - console.info(`Stopped sliding at slide ${event.detail}.`) + console.info(`Stopped sliding at slide ${event.detail}.`) }) ``` **Advanced config:** ```javascript -import {ScrollSnapSlider} from 'scroll-snap-slider' +import { ScrollSnapSlider } from 'scroll-snap-slider' // Do not automatically attach scroll listener const slider = new ScrollSnapSlider({ - element: document.querySelector('.example-slider'), - scrollTimeout: 50, // Sets a shorter timeout to detect scroll end - roundingMethod: Math.round, // Dispatch 'slide-pass' events around the center of each slide - // roundingMethod: Math.ceil, // Dispatch 'slide-pass' events as soon as the next one is visible - // roundingMethod: Math.floor, // Dispatch 'slide-pass' events only when the next one is fully visible - sizingMethod(slider) { - - // with padding - return slider.element.firstElementChild.offsetWidth - - // without padding - // return slider.element.firstElementChild.clientWidth - } + element: document.querySelector('.example-slider'), + scrollTimeout: 50, // Sets a shorter timeout to detect scroll end + roundingMethod: Math.round, // Dispatch 'slide-pass' events around the center of each slide + // roundingMethod: Math.ceil, // Dispatch 'slide-pass' events as soon as the next one is visible + // roundingMethod: Math.floor, // Dispatch 'slide-pass' events only when the next one is fully visible + sizingMethod (slider) { + + // with padding + return slider.element.firstElementChild.offsetWidth + + // without padding + // return slider.element.firstElementChild.clientWidth + } }) ``` @@ -191,14 +189,14 @@ You can add one or multiple of the available Plugins: Additional Note: The `ScrollSnapDraggable` and `ScrollSnapLoop` **do not** work well together. ```javascript -import {ScrollSnapSlider} from 'scroll-snap-slider/src/ScrollSnapSlider.js' -import {ScrollSnapAutoplay} from 'scroll-snap-slider/src/ScrollSnapAutoplay.js' -import {ScrollSnapLoop} from 'scroll-snap-slider/src/ScrollSnapLoop.js' +import { ScrollSnapSlider } from 'scroll-snap-slider/src/ScrollSnapSlider.js' +import { ScrollSnapAutoplay } from 'scroll-snap-slider/src/ScrollSnapAutoplay.js' +import { ScrollSnapLoop } from 'scroll-snap-slider/src/ScrollSnapLoop.js' const element = document.querySelector('.example-slider') -const slider = new ScrollSnapSlider({element}).with([ - new ScrollSnapAutoplay(1200), - new ScrollSnapLoop +const slider = new ScrollSnapSlider({ element }).with([ + new ScrollSnapAutoplay(1200), + new ScrollSnapLoop ]) ``` @@ -207,40 +205,40 @@ Creating your own plugin: ```javascript export class CustomPlugin extends ScrollSnapPlugin { - /** - * Pass any config here - * @param {*} config - */ - constructor(config) { - super() - - this.config = config - } - - /** - * Chose a unique plugin name. If you need multiple instances of the same plugin on a slider, each must return a unique id. - * @return {String} - */ - get id() { - return 'lubba-wubba-dub-dub' - } - - /** - * Attach listeners, fetch DOM things, save reference to the slider - * @param {ScrollSnapSlider} slider - * @override - */ - enable(slider) { - // TODO method stub - } - - /** - * Free resources, remove listeners, ... - * @override - */ - disable() { - // TODO method stub - } + /** + * Pass any config here + * @param {*} config + */ + constructor (config) { + super() + + this.config = config + } + + /** + * Chose a unique plugin name. If you need multiple instances of the same plugin on a slider, each must return a unique id. + * @return {String} + */ + get id () { + return 'lubba-wubba-dub-dub' + } + + /** + * Attach listeners, fetch DOM things, save reference to the slider + * @param {ScrollSnapSlider} slider + * @override + */ + enable (slider) { + // TODO method stub + } + + /** + * Free resources, remove listeners, ... + * @override + */ + disable () { + // TODO method stub + } } ``` @@ -248,7 +246,7 @@ export class CustomPlugin extends ScrollSnapPlugin { | Method | Description | |--------------------------------|-----------------------------------------------------------------------------| -| `slideTo(index: Number): void` | Scrolls to slide with at `index`. | +| `slideTo(index: Number): void` | Scrolls to slide at `index`. | | `addEventListener(...)` | This is a shortcut for `slider.element.addEventListener(...)`. | | `removeEventListener(...)` | This is a shortcut for `slider.element.removeEventListener(...)`. | | `attachEventListeners()` | Enables the JS behaviour of this plugin. This is called in the constructor. | diff --git a/demo/slider-simple.js b/demo/slider-simple.js index db38176..090bf87 100644 --- a/demo/slider-simple.js +++ b/demo/slider-simple.js @@ -1,8 +1,8 @@ import { - ScrollSnapAutoplay, - ScrollSnapDraggable, - ScrollSnapLoop, - ScrollSnapSlider + ScrollSnapAutoplay, + ScrollSnapDraggable, + ScrollSnapLoop, + ScrollSnapSlider } from '../dist/scroll-snap-slider.mjs' const sliderSimpleElement = document.querySelector('.scroll-snap-slider.-simple') @@ -25,6 +25,7 @@ const prev = document.querySelector('.indicators.-simple .arrow.-prev') const next = document.querySelector('.indicators.-simple .arrow.-next') const setSelected = function (event) { + console.info(event) const slideElementIndex = event.detail const slideElement = slides[slideElementIndex] diff --git a/dist/scroll-snap-slider.iife.js b/dist/scroll-snap-slider.iife.js index 06d69f0..d849d7e 100644 --- a/dist/scroll-snap-slider.iife.js +++ b/dist/scroll-snap-slider.iife.js @@ -268,7 +268,7 @@ var ScrollSnapSlider = function(exports) { this.slider.element.style.scrollSnapStop = ""; this.slider.element.style.scrollSnapType = ""; this.slider.attachListeners(); - setTimeout(this.slider.update, 0); + requestAnimationFrame(this.slider.update); } /** * Move last slide to the start of the slider. @@ -452,18 +452,18 @@ var ScrollSnapSlider = function(exports) { * Updates the computed values */ update = () => { - requestAnimationFrame(() => { - this.slide = this.roundingMethod(this.element.scrollLeft / this.itemSize); - this.slideScrollLeft = this.slide * this.itemSize; - }); + this.slide = this.roundingMethod(this.element.scrollLeft / this.itemSize); + this.slideScrollLeft = this.slide * this.itemSize; }; /** * Calculate all necessary things and dispatch an event when sliding stops */ onScrollEnd = () => { - this.scrollTimeoutId = null; - this.update(); - this.dispatch("slide-stop", this.slide); + requestAnimationFrame(() => { + this.scrollTimeoutId = null; + this.update(); + this.dispatch("slide-stop", this.slide); + }); }; /** * This will recompute the itemSize diff --git a/dist/scroll-snap-slider.js b/dist/scroll-snap-slider.js index 7a5ba5c..d7e8f19 100644 --- a/dist/scroll-snap-slider.js +++ b/dist/scroll-snap-slider.js @@ -268,7 +268,7 @@ class ScrollSnapLoop extends ScrollSnapPlugin { this.slider.element.style.scrollSnapStop = ""; this.slider.element.style.scrollSnapType = ""; this.slider.attachListeners(); - setTimeout(this.slider.update, 0); + requestAnimationFrame(this.slider.update); } /** * Move last slide to the start of the slider. @@ -452,18 +452,18 @@ class ScrollSnapSlider { * Updates the computed values */ update = () => { - requestAnimationFrame(() => { - this.slide = this.roundingMethod(this.element.scrollLeft / this.itemSize); - this.slideScrollLeft = this.slide * this.itemSize; - }); + this.slide = this.roundingMethod(this.element.scrollLeft / this.itemSize); + this.slideScrollLeft = this.slide * this.itemSize; }; /** * Calculate all necessary things and dispatch an event when sliding stops */ onScrollEnd = () => { - this.scrollTimeoutId = null; - this.update(); - this.dispatch("slide-stop", this.slide); + requestAnimationFrame(() => { + this.scrollTimeoutId = null; + this.update(); + this.dispatch("slide-stop", this.slide); + }); }; /** * This will recompute the itemSize diff --git a/dist/scroll-snap-slider.mjs b/dist/scroll-snap-slider.mjs index 7032cb0..9d09228 100644 --- a/dist/scroll-snap-slider.mjs +++ b/dist/scroll-snap-slider.mjs @@ -266,7 +266,7 @@ class ScrollSnapLoop extends ScrollSnapPlugin { this.slider.element.style.scrollSnapStop = ""; this.slider.element.style.scrollSnapType = ""; this.slider.attachListeners(); - setTimeout(this.slider.update, 0); + requestAnimationFrame(this.slider.update); } /** * Move last slide to the start of the slider. @@ -450,18 +450,18 @@ class ScrollSnapSlider { * Updates the computed values */ update = () => { - requestAnimationFrame(() => { - this.slide = this.roundingMethod(this.element.scrollLeft / this.itemSize); - this.slideScrollLeft = this.slide * this.itemSize; - }); + this.slide = this.roundingMethod(this.element.scrollLeft / this.itemSize); + this.slideScrollLeft = this.slide * this.itemSize; }; /** * Calculate all necessary things and dispatch an event when sliding stops */ onScrollEnd = () => { - this.scrollTimeoutId = null; - this.update(); - this.dispatch("slide-stop", this.slide); + requestAnimationFrame(() => { + this.scrollTimeoutId = null; + this.update(); + this.dispatch("slide-stop", this.slide); + }); }; /** * This will recompute the itemSize diff --git a/dist/scroll-snap-slider.umd.js b/dist/scroll-snap-slider.umd.js index 9a4670b..82eded2 100644 --- a/dist/scroll-snap-slider.umd.js +++ b/dist/scroll-snap-slider.umd.js @@ -270,7 +270,7 @@ this.slider.element.style.scrollSnapStop = ""; this.slider.element.style.scrollSnapType = ""; this.slider.attachListeners(); - setTimeout(this.slider.update, 0); + requestAnimationFrame(this.slider.update); } /** * Move last slide to the start of the slider. @@ -454,18 +454,18 @@ * Updates the computed values */ update = () => { - requestAnimationFrame(() => { - this.slide = this.roundingMethod(this.element.scrollLeft / this.itemSize); - this.slideScrollLeft = this.slide * this.itemSize; - }); + this.slide = this.roundingMethod(this.element.scrollLeft / this.itemSize); + this.slideScrollLeft = this.slide * this.itemSize; }; /** * Calculate all necessary things and dispatch an event when sliding stops */ onScrollEnd = () => { - this.scrollTimeoutId = null; - this.update(); - this.dispatch("slide-stop", this.slide); + requestAnimationFrame(() => { + this.scrollTimeoutId = null; + this.update(); + this.dispatch("slide-stop", this.slide); + }); }; /** * This will recompute the itemSize diff --git a/docs/assets/main.js b/docs/assets/main.js index 7270cff..3092fea 100644 --- a/docs/assets/main.js +++ b/docs/assets/main.js @@ -1,8 +1,8 @@ "use strict"; -"use strict";(()=>{var Pe=Object.create;var ne=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Ie(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Pe(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` - ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(He=!0,F="touchstart",pe="touchmove",B="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(B,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`,this.handleValueChange()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(e=>{e.style.display="block";let n=Array.from(e.querySelectorAll(".tsd-index-link")).every(r=>r.offsetParent==null);e.style.display=n?"none":"block"})}};var Z=class extends C{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); +"use strict";(()=>{var Ie=Object.create;var ne=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Ie(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var He={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>He[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",H="mouseup",J={x:0,y:0},fe=!1,ee=!1,Be=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(Be=!0,F="touchstart",pe="touchmove",H="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(H,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(H,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(H,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.updateIndexHeadingVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.updateIndexHeadingVisibility()}updateIndexHeadingVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}};var Z=class extends C{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/docs/classes/ScrollSnapAutoplay.ScrollSnapAutoplay.html b/docs/classes/ScrollSnapAutoplay.ScrollSnapAutoplay.html index 934c7bf..749793a 100644 --- a/docs/classes/ScrollSnapAutoplay.ScrollSnapAutoplay.html +++ b/docs/classes/ScrollSnapAutoplay.ScrollSnapAutoplay.html @@ -1,5 +1,5 @@ ScrollSnapAutoplay | scroll-snap-slider

Classdesc

Plugin that automatically changes slides.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Constructors

Properties

debounceId: number

Used to debounce the re-enabling after a user interaction

-
events: string[]

Event names that temporarily disable the autoplay behaviour

-
interval: number

Interval ID

-
intervalDuration: number

Duration in milliseconds between slide changes

-

Reference to the slider this plugin is attached to.

-
timeoutDuration: number

Duration in milliseconds after human interaction where the slider will not autoplay

-

Accessors

  • get id(): string
  • Unique Plugin ID, used as index in ScrollSnapSlider::plugins.

    -

    Returns string

    See

Methods

  • Remove listeners, clean up dependencies and free up memory. +

Constructors

Properties

debounceId: number

Used to debounce the re-enabling after a user interaction

+
events: string[]

Event names that temporarily disable the autoplay behaviour

+
interval: number

Interval ID

+
intervalDuration: number

Duration in milliseconds between slide changes

+

Reference to the slider this plugin is attached to.

+
timeoutDuration: number

Duration in milliseconds after human interaction where the slider will not autoplay

+

Accessors

  • get id(): string
  • Unique Plugin ID, used as index in ScrollSnapSlider::plugins.

    +

    Returns string

    See

Methods

  • Disable the autoplay behaviour and set a timeout to re-enable it.

    -

    Returns void

  • Disable the autoplay behaviour and set a timeout to re-enable it.

    +

    Returns void

Generated using TypeDoc

\ No newline at end of file +

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/ScrollSnapDraggable.ScrollSnapDraggable.html b/docs/classes/ScrollSnapDraggable.ScrollSnapDraggable.html index d1b4a71..372f5cd 100644 --- a/docs/classes/ScrollSnapDraggable.ScrollSnapDraggable.html +++ b/docs/classes/ScrollSnapDraggable.ScrollSnapDraggable.html @@ -1,5 +1,5 @@ ScrollSnapDraggable | scroll-snap-slider

Classdesc

Plugin that enables mouse/pointer drag. Note, that touch interaction is enabled natively in all browsers.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

lastX: number

Last drag event position

-
quickSwipeDistance: number

If this is null: +

Constructors

Properties

lastX: number

Last drag event position

+
quickSwipeDistance: number

If this is null: The next/previous slide will not be reached unless you drag for more than half the slider's width.

If this is a number: Dragging any slide for more than this distance in pixels will slide to the next slide in the desired direction.

-

Reference to the slider this plugin is attached to.

-
startX: number

Where the dragging started

-

Accessors

  • get id(): string
  • Unique Plugin ID, used as index in ScrollSnapSlider::plugins.

    -

    Returns string

    See

Methods

  • Scroll the slider the appropriate amount of pixels and update the last event position

    -

    Parameters

    • event: MouseEvent

    Returns void

  • Clear disable timeout, set up variables and styles and attach the listener.

    -

    Parameters

    • event: MouseEvent

    Returns void

Reference to the slider this plugin is attached to.

+
startX: number

Where the dragging started

+

Accessors

  • get id(): string
  • Unique Plugin ID, used as index in ScrollSnapSlider::plugins.

    +

    Returns string

    See

Methods

  • Scroll the slider the appropriate amount of pixels and update the last event position

    +

    Parameters

    • event: MouseEvent

    Returns void

  • Clear disable timeout, set up variables and styles and attach the listener.

    +

    Parameters

    • event: MouseEvent

    Returns void

  • Remove listener and clean up the styles. Note: We first restore the smooth behaviour, then manually snap to the current slide. Using a timeout, we then restore the rest of the snap behaviour.

    -

    Parameters

    • event: MouseEvent

    Returns void

Generated using TypeDoc

\ No newline at end of file +

Parameters

  • event: MouseEvent

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/ScrollSnapLoop.ScrollSnapLoop.html b/docs/classes/ScrollSnapLoop.ScrollSnapLoop.html index 886eddd..9f58992 100644 --- a/docs/classes/ScrollSnapLoop.ScrollSnapLoop.html +++ b/docs/classes/ScrollSnapLoop.ScrollSnapLoop.html @@ -1,6 +1,6 @@ ScrollSnapLoop | scroll-snap-slider

Plugin to loop around to the first slide at the end and to the last slide at the start All slides should have a unique and numeric data-index attribute.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

Properties

Reference to the slider this plugin is attached to.

-

Accessors

  • get id(): string
  • Unique Plugin ID, used as index in ScrollSnapSlider::plugins.

    -

    Returns string

    See

Methods

  • Remove listeners, clean up dependencies and free up memory. +

Constructors

Properties

Reference to the slider this plugin is attached to.

+

Accessors

  • get id(): string
  • Unique Plugin ID, used as index in ScrollSnapSlider::plugins.

    +

    Returns string

    See

Methods

  • Determine which slide to move where and apply the change.

    -

    Returns void

  • Sort items to their initial position after disabling

    -

    Parameters

    • a: HTMLOrSVGElement
    • b: HTMLOrSVGElement

    Returns number

Generated using TypeDoc

\ No newline at end of file +

Returns void

  • Determine which slide to move where and apply the change.

    +

    Returns void

  • Sort items to their initial position after disabling

    +

    Parameters

    • a: HTMLOrSVGElement
    • b: HTMLOrSVGElement

    Returns number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/ScrollSnapPlugin.ScrollSnapPlugin.html b/docs/classes/ScrollSnapPlugin.ScrollSnapPlugin.html index f0a131a..83e8b31 100644 --- a/docs/classes/ScrollSnapPlugin.ScrollSnapPlugin.html +++ b/docs/classes/ScrollSnapPlugin.ScrollSnapPlugin.html @@ -1,13 +1,13 @@ ScrollSnapPlugin | scroll-snap-slider

Abstract class used for plugins, that extend the slider's behaviour.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

Properties

Reference to the slider this plugin is attached to.

-

Accessors

  • get id(): string
  • Unique Plugin ID, used as index in ScrollSnapSlider::plugins.

    -

    Returns string

    See

Methods

  • Remove listeners, clean up dependencies and free up memory. +

Constructors

Properties

Reference to the slider this plugin is attached to.

+

Accessors

  • get id(): string
  • Unique Plugin ID, used as index in ScrollSnapSlider::plugins.

    +

    Returns string

    See

Methods

  • Remove listeners, clean up dependencies and free up memory. Override this with custom behaviour.

    -

    Returns void

  • Add listeners, compute things and enable the desired behaviour. Override this with custom behaviour.

    -

    Returns void

Generated using TypeDoc

\ No newline at end of file +

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/ScrollSnapSlider.ScrollSnapSlider.html b/docs/classes/ScrollSnapSlider.ScrollSnapSlider.html index 239093f..70fe3ac 100644 --- a/docs/classes/ScrollSnapSlider.ScrollSnapSlider.html +++ b/docs/classes/ScrollSnapSlider.ScrollSnapSlider.html @@ -1,5 +1,5 @@ ScrollSnapSlider | scroll-snap-slider

Classdesc

Mostly CSS slider with great performance.

-

Constructors

Constructors

Properties

Constructors

Properties

addEventListener: {
    <K>(type, listener, options?): void;
    (type, listener, options?): void;
}

Type declaration

    • <K>(type, listener, options?): void
    • Type Parameters

      • K extends keyof HTMLElementEventMap

      Parameters

      • type: K
      • listener: ((this, ev) => any)
          • (this, ev): any
          • Parameters

            • this: HTMLElement
            • ev: HTMLElementEventMap[K]

            Returns any

      • Optional options: boolean | AddEventListenerOptions

      Returns void

      Inherit Doc

    • (type, listener, options?): void
    • Parameters

      • type: string
      • listener: EventListenerOrEventListenerObject
      • Optional options: boolean | AddEventListenerOptions

      Returns void

      Inherit Doc

Inherit Doc

element: HTMLElement

Base element of this slider

-
itemSize: number

Calculated size of a single item

-
plugins: Map<string, ScrollSnapPlugin>

additional behaviour

-
removeEventListener: {
    <K>(type, listener, options?): void;
    (type, listener, options?): void;
}

Type declaration

    • <K>(type, listener, options?): void
    • Type Parameters

      • K extends keyof HTMLElementEventMap

      Parameters

      • type: K
      • listener: ((this, ev) => any)
          • (this, ev): any
          • Parameters

            • this: HTMLElement
            • ev: HTMLElementEventMap[K]

            Returns any

      • Optional options: boolean | EventListenerOptions

      Returns void

      Inherit Doc

    • (type, listener, options?): void
    • Parameters

      • type: string
      • listener: EventListenerOrEventListenerObject
      • Optional options: boolean | EventListenerOptions

      Returns void

      Inherit Doc

Inherit Doc

resizeObserver: ResizeObserver

Resize observer used to update item size

-
roundingMethod: ((value) => number)

Rounding method used to calculate the current slide (e.g. Math.floor, Math.round, Math.ceil, or totally custom.)

+

Parameters

Returns ScrollSnapSlider

Properties

addEventListener: {
    <K>(type, listener, options?): void;
    (type, listener, options?): void;
}

Type declaration

    • <K>(type, listener, options?): void
    • Type Parameters

      • K extends keyof HTMLElementEventMap

      Parameters

      • type: K
      • listener: ((this, ev) => any)
          • (this, ev): any
          • Parameters

            • this: HTMLElement
            • ev: HTMLElementEventMap[K]

            Returns any

      • Optional options: boolean | AddEventListenerOptions

      Returns void

      Inherit Doc

    • (type, listener, options?): void
    • Parameters

      • type: string
      • listener: EventListenerOrEventListenerObject
      • Optional options: boolean | AddEventListenerOptions

      Returns void

      Inherit Doc

Inherit Doc

element: HTMLElement

Base element of this slider

+
itemSize: number

Calculated size of a single item

+
plugins: Map<string, ScrollSnapPlugin>

additional behaviour

+
removeEventListener: {
    <K>(type, listener, options?): void;
    (type, listener, options?): void;
}

Type declaration

    • <K>(type, listener, options?): void
    • Type Parameters

      • K extends keyof HTMLElementEventMap

      Parameters

      • type: K
      • listener: ((this, ev) => any)
          • (this, ev): any
          • Parameters

            • this: HTMLElement
            • ev: HTMLElementEventMap[K]

            Returns any

      • Optional options: boolean | EventListenerOptions

      Returns void

      Inherit Doc

    • (type, listener, options?): void
    • Parameters

      • type: string
      • listener: EventListenerOrEventListenerObject
      • Optional options: boolean | EventListenerOptions

      Returns void

      Inherit Doc

Inherit Doc

resizeObserver: ResizeObserver

Resize observer used to update item size

+
roundingMethod: ((value) => number)

Rounding method used to calculate the current slide (e.g. Math.floor, Math.round, Math.ceil, or totally custom.)

Type declaration

    • (value): number
    • Rounding method used to calculate the current slide (e.g. Math.floor, Math.round, Math.ceil, or totally custom.)

      Parameters

      • value: number

        factor indicating th current position (e.g "0" for first slide, "2.5" for third slide and a half)

      Returns number

      f(x) - integer factor indicating the currently 'active' slide.

Param: value

factor indicating th current position (e.g "0" for first slide, "2.5" for third slide and a half)

Returns

f(x) - integer factor indicating the currently 'active' slide.

-
scrollTimeout: number

Timeout delay in milliseconds used to catch the end of scroll events

-
scrollTimeoutId: number

Timeout ID used to catch the end of scroll events

-
sizingMethod: ((slider, entries?) => number)

Computes a single number representing the slides widths. +

scrollTimeout: number

Timeout delay in milliseconds used to catch the end of scroll events

+
scrollTimeoutId: number

Timeout ID used to catch the end of scroll events

+
sizingMethod: ((slider, entries?) => number)

Computes a single number representing the slides widths. By default, this will use the first slide's offsetWidth. Possible values could be an average of all slides, the min or max values, ...

Type declaration

    • (slider, entries?): number
    • Computes a single number representing the slides widths. @@ -47,19 +47,19 @@

      Returns

      f(x) - integer factor indicating the currently 'active

Param: slider

current slider

Param: entries

resized entries

Returns

integer size of a slide in pixels

-
slide: number

Active slide

-
slideScrollLeft: number

Active slide's scrollLeft in the containing element

-

Methods

  • Dispatches an event on the slider's element

    -

    Parameters

    • event: string
    • detail: unknown

    Returns boolean

  • Calculate all necessary things and dispatch an event when sliding stops

    -

    Returns void

slide: number

Active slide

+
slideScrollLeft: number

Active slide's scrollLeft in the containing element

+

Methods

  • Dispatches an event on the slider's element

    +

    Parameters

    • event: string
    • detail: unknown

    Returns boolean

  • Calculate all necessary things and dispatch an event when sliding stops

    +

    Returns void

  • This will recompute the itemSize

    Parameters

    • Optional entries: ResizeObserverEntry[]

      Optional entries delivered from a ResizeObserver

      -

    Returns void

  • Extend the Slider's functionality with Plugins

    +

Returns void

Generated using TypeDoc

\ No newline at end of file +

Returns ScrollSnapSlider

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/ScrollSnapAutoplay.html b/docs/modules/ScrollSnapAutoplay.html index 90e6ede..06d4b2d 100644 --- a/docs/modules/ScrollSnapAutoplay.html +++ b/docs/modules/ScrollSnapAutoplay.html @@ -1,2 +1,2 @@ -ScrollSnapAutoplay | scroll-snap-slider

Module ScrollSnapAutoplay

Index

Classes

ScrollSnapAutoplay +ScrollSnapAutoplay | scroll-snap-slider

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/ScrollSnapDraggable.html b/docs/modules/ScrollSnapDraggable.html index f51e69c..f502488 100644 --- a/docs/modules/ScrollSnapDraggable.html +++ b/docs/modules/ScrollSnapDraggable.html @@ -1,2 +1,2 @@ -ScrollSnapDraggable | scroll-snap-slider

Module ScrollSnapDraggable

Index

Classes

ScrollSnapDraggable +ScrollSnapDraggable | scroll-snap-slider

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/ScrollSnapLoop.html b/docs/modules/ScrollSnapLoop.html index c4d8fe4..2e3ec54 100644 --- a/docs/modules/ScrollSnapLoop.html +++ b/docs/modules/ScrollSnapLoop.html @@ -1,2 +1,2 @@ -ScrollSnapLoop | scroll-snap-slider

Index

Classes

ScrollSnapLoop +ScrollSnapLoop | scroll-snap-slider

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/ScrollSnapPlugin.html b/docs/modules/ScrollSnapPlugin.html index a39bedc..c6be012 100644 --- a/docs/modules/ScrollSnapPlugin.html +++ b/docs/modules/ScrollSnapPlugin.html @@ -1,2 +1,2 @@ -ScrollSnapPlugin | scroll-snap-slider

Module ScrollSnapPlugin

Index

Classes

ScrollSnapPlugin +ScrollSnapPlugin | scroll-snap-slider

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/ScrollSnapSlider.html b/docs/modules/ScrollSnapSlider.html index f7ec4d6..597985e 100644 --- a/docs/modules/ScrollSnapSlider.html +++ b/docs/modules/ScrollSnapSlider.html @@ -1,3 +1,3 @@ -ScrollSnapSlider | scroll-snap-slider

Module ScrollSnapSlider

Index

Classes

ScrollSnapSlider +ScrollSnapSlider | scroll-snap-slider

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/index.html b/docs/modules/index.html index 0fbdf31..2e0c8cd 100644 --- a/docs/modules/index.html +++ b/docs/modules/index.html @@ -1,4 +1,4 @@ -index | scroll-snap-slider

References

ScrollSnapAutoplay +index | scroll-snap-slider

References

ScrollSnapAutoplay ScrollSnapDraggable ScrollSnapLoop ScrollSnapPlugin diff --git a/docs/types/ScrollSnapSlider.ScrollSnapSliderOptions.html b/docs/types/ScrollSnapSlider.ScrollSnapSliderOptions.html index 57f0f1f..a7e4eb1 100644 --- a/docs/types/ScrollSnapSlider.ScrollSnapSliderOptions.html +++ b/docs/types/ScrollSnapSlider.ScrollSnapSliderOptions.html @@ -1,2 +1,2 @@ ScrollSnapSliderOptions | scroll-snap-slider
ScrollSnapSliderOptions: Partial<ScrollSnapSlider> & {
    element: HTMLElement;
}

All options have sensitive defaults. The only required option is the element.

-

Type declaration

  • element: HTMLElement

Generated using TypeDoc

\ No newline at end of file +

Type declaration

  • element: HTMLElement

Generated using TypeDoc

\ No newline at end of file diff --git a/package.json b/package.json index 0c53073..7111ce1 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll-snap-slider", - "version": "3.2.0", + "version": "3.3.0", "description": "Mostly CSS slider with great performance.", "keywords": [ "slider", @@ -24,28 +24,28 @@ "license": "MIT", "private": false, "devDependencies": { - "@types/node": "^20.11.5", - "@typescript-eslint/eslint-plugin": "^6.19.0", - "@typescript-eslint/parser": "^6.19.0", + "@types/node": "^20.11.17", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", "bash-echolorized": "^1.0.1", - "core-js": "^3.35.0", + "core-js": "^3.35.1", "eslint": "^8.56.0", "eslint-config-standard": "^17.1.0", "eslint-plugin-compat": "^4.2.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-n": "^16.6.2", "eslint-plugin-promise": "6.1.1", - "postcss": "^8.4.33", + "postcss": "^8.4.35", "postcss-scss": "^4.0.9", "sass": "^1.70.0", - "stylelint": "^16.1.0", + "stylelint": "^16.2.1", "stylelint-config-standard": "^36.0.0", "stylelint-config-standard-scss": "^13.0.0", "stylelint-order": "^6.0.4", - "typedoc": "^0.25.7", + "typedoc": "^0.25.8", "typescript": "^5.3.3", - "vite": "^5.0.11", - "vite-plugin-dts": "^3.7.1" + "vite": "^5.1.1", + "vite-plugin-dts": "^3.7.2" }, "scripts": { "setup-git-hooks": "git config core.hooksPath hooks", diff --git a/src/ScrollSnapLoop.ts b/src/ScrollSnapLoop.ts index 7f8b18b..d503dbe 100755 --- a/src/ScrollSnapLoop.ts +++ b/src/ScrollSnapLoop.ts @@ -9,7 +9,7 @@ export class ScrollSnapLoop extends ScrollSnapPlugin { /** * @inheritDoc */ - public get id(): string { + public get id (): string { return 'ScrollSnapLoop' } @@ -17,7 +17,7 @@ export class ScrollSnapLoop extends ScrollSnapPlugin { * @inheritDoc * @override */ - public enable(): void { + public enable (): void { this.slider.addEventListener('slide-pass', this.loopSlides) this.slider.addEventListener('slide-stop', this.loopSlides) this.loopSlides() @@ -27,7 +27,7 @@ export class ScrollSnapLoop extends ScrollSnapPlugin { * @inheritDoc * @override */ - public disable(): void { + public disable (): void { this.slider.removeEventListener('slide-pass', this.loopSlides) this.slider.removeEventListener('slide-stop', this.loopSlides) @@ -40,7 +40,7 @@ export class ScrollSnapLoop extends ScrollSnapPlugin { /** * Remove snapping behaviour */ - private removeSnapping() { + private removeSnapping () { this.slider.detachListeners() this.slider.element.style.scrollBehavior = 'auto' this.slider.element.style.scrollSnapStop = 'unset' @@ -50,18 +50,18 @@ export class ScrollSnapLoop extends ScrollSnapPlugin { /** * Add snapping behaviour */ - private addSnapping() { + private addSnapping () { this.slider.element.style.scrollBehavior = '' this.slider.element.style.scrollSnapStop = '' this.slider.element.style.scrollSnapType = '' this.slider.attachListeners() - setTimeout(this.slider.update, 0) + requestAnimationFrame(this.slider.update) } /** * Move last slide to the start of the slider. */ - private loopEndToStart() { + private loopEndToStart () { requestAnimationFrame(() => { this.removeSnapping() this.slider.element.prepend(this.slider.element.children[this.slider.element.children.length - 1]) @@ -73,7 +73,7 @@ export class ScrollSnapLoop extends ScrollSnapPlugin { /** * Move first slide to the end of the slider. */ - private loopStartToEnd() { + private loopStartToEnd () { requestAnimationFrame(() => { this.removeSnapping() this.slider.element.append(this.slider.element.children[0]) @@ -106,7 +106,7 @@ export class ScrollSnapLoop extends ScrollSnapPlugin { /** * Sort items to their initial position after disabling */ - private sortFunction(a: HTMLOrSVGElement, b: HTMLOrSVGElement): number { + private sortFunction (a: HTMLOrSVGElement, b: HTMLOrSVGElement): number { return parseInt(a.dataset.index, 10) - parseInt(b.dataset.index, 10) } } diff --git a/src/ScrollSnapSlider.ts b/src/ScrollSnapSlider.ts index 8c3df13..73cc7a2 100755 --- a/src/ScrollSnapSlider.ts +++ b/src/ScrollSnapSlider.ts @@ -83,7 +83,7 @@ export class ScrollSnapSlider { /** * Bind methods and possibly attach listeners. */ - constructor(options: ScrollSnapSliderOptions) { + constructor (options: ScrollSnapSliderOptions) { Object.assign(this, { scrollTimeout: 100, roundingMethod: Math.round, @@ -114,7 +114,7 @@ export class ScrollSnapSlider { * @param plugins Plugins to attach * @param enabled Whether the plugins are enabled right away */ - public with(plugins: ScrollSnapPlugin[], enabled = true): ScrollSnapSlider { + public with (plugins: ScrollSnapPlugin[], enabled = true): ScrollSnapSlider { for (const plugin of plugins) { plugin.slider = this this.plugins.set(plugin.id, plugin) @@ -127,14 +127,14 @@ export class ScrollSnapSlider { /** * Attach all necessary listeners */ - public attachListeners(): void { + public attachListeners (): void { this.addEventListener('scroll', this.onScroll, { passive: true }) } /** * Detach all listeners */ - public detachListeners(): void { + public detachListeners (): void { this.removeEventListener('scroll', this.onScroll) this.scrollTimeoutId && clearTimeout(this.scrollTimeoutId) } @@ -153,7 +153,7 @@ export class ScrollSnapSlider { /** * Free resources and listeners, disable plugins */ - public destroy(): void { + public destroy (): void { this.scrollTimeoutId && clearTimeout(this.scrollTimeoutId) this.detachListeners() @@ -168,19 +168,19 @@ export class ScrollSnapSlider { * Updates the computed values */ update = () => { - requestAnimationFrame(() => { - this.slide = this.roundingMethod(this.element.scrollLeft / this.itemSize) - this.slideScrollLeft = this.slide * this.itemSize - }) + this.slide = this.roundingMethod(this.element.scrollLeft / this.itemSize) + this.slideScrollLeft = this.slide * this.itemSize } /** * Calculate all necessary things and dispatch an event when sliding stops */ private onScrollEnd = () => { - this.scrollTimeoutId = null - this.update() - this.dispatch('slide-stop', this.slide) + requestAnimationFrame(() => { + this.scrollTimeoutId = null + this.update() + this.dispatch('slide-stop', this.slide) + }) } /** @@ -197,7 +197,7 @@ export class ScrollSnapSlider { /** * Dispatches an event on the slider's element */ - private dispatch(event: string, detail: unknown): boolean { + private dispatch (event: string, detail: unknown): boolean { return this.element.dispatchEvent( new CustomEvent(event, { detail diff --git a/vite.config.ts b/vite.config.ts index 945fb92..793526b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,6 +10,7 @@ export default defineConfig({ build: { target: 'ESNext', minify: false, + emptyOutDir: false, lib: { entry: resolve(__dirname, 'src/index.ts'), name: 'ScrollSnapSlider', diff --git a/yarn.lock b/yarn.lock index fd8c578..f89329b 100755 --- a/yarn.lock +++ b/yarn.lock @@ -33,17 +33,17 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.11.tgz#becf8ee33aad2a35ed5607f521fe6e72a615f905" integrity sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g== -"@csstools/css-parser-algorithms@^2.4.0": +"@csstools/css-parser-algorithms@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.5.0.tgz#0c03cd5418a9f404a05ff2ffcb1b69d04e8ec532" integrity sha512-abypo6m9re3clXA00eu5syw+oaPHbJTPapu9C4pzNsJ4hdZDzushT50Zhu+iIYXgEe1CxnRMn7ngsbV+MLrlpQ== -"@csstools/css-tokenizer@^2.2.2": +"@csstools/css-tokenizer@^2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.2.3.tgz#b099d543ea57b64f495915a095ead583866c50c6" integrity sha512-pp//EvZ9dUmGuGtG1p+n17gTHEOqu9jO+FiCUjNN3BDmyhdA2Jq9QsVeR7K8/2QCK17HSsioPlTW9ZkzoWb3Lg== -"@csstools/media-query-list-parser@^2.1.6": +"@csstools/media-query-list-parser@^2.1.7": version "2.1.7" resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.7.tgz#a4836e3dbd693081a30b32ce9c2a781e1be16788" integrity sha512-lHPKJDkPUECsyAvD60joYfDmp8UERYxHGkFfyLJFTVK/ERJe0sVlIFLXU5XFxdjNDTerp5L4KeaKG+Z5S94qxQ== @@ -444,10 +444,10 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/node@^20.11.5": - version "20.11.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.5.tgz#be10c622ca7fcaa3cf226cf80166abc31389d86e" - integrity sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w== +"@types/node@^20.11.17": + version "20.11.17" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.17.tgz#cdd642d0e62ef3a861f88ddbc2b61e32578a9292" + integrity sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw== dependencies: undici-types "~5.26.4" @@ -456,16 +456,16 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.3.tgz#9a726e116beb26c24f1ccd6850201e1246122e04" integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw== -"@typescript-eslint/eslint-plugin@^6.19.0": - version "6.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.19.0.tgz#db03f3313b57a30fbbdad2e6929e88fc7feaf9ba" - integrity sha512-DUCUkQNklCQYnrBSSikjVChdc84/vMPDQSgJTHBZ64G9bA9w0Crc0rd2diujKbTdp6w2J47qkeHQLoi0rpLCdg== +"@typescript-eslint/eslint-plugin@^6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" + integrity sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.19.0" - "@typescript-eslint/type-utils" "6.19.0" - "@typescript-eslint/utils" "6.19.0" - "@typescript-eslint/visitor-keys" "6.19.0" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/type-utils" "6.21.0" + "@typescript-eslint/utils" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -473,47 +473,47 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^6.19.0": - version "6.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.19.0.tgz#80344086f362181890ade7e94fc35fe0480bfdf5" - integrity sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow== +"@typescript-eslint/parser@^6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" + integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== dependencies: - "@typescript-eslint/scope-manager" "6.19.0" - "@typescript-eslint/types" "6.19.0" - "@typescript-eslint/typescript-estree" "6.19.0" - "@typescript-eslint/visitor-keys" "6.19.0" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.19.0": - version "6.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.19.0.tgz#b6d2abb825b29ab70cb542d220e40c61c1678116" - integrity sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ== +"@typescript-eslint/scope-manager@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1" + integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg== dependencies: - "@typescript-eslint/types" "6.19.0" - "@typescript-eslint/visitor-keys" "6.19.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/type-utils@6.19.0": - version "6.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.19.0.tgz#522a494ef0d3e9fdc5e23a7c22c9331bbade0101" - integrity sha512-mcvS6WSWbjiSxKCwBcXtOM5pRkPQ6kcDds/juxcy/727IQr3xMEcwr/YLHW2A2+Fp5ql6khjbKBzOyjuPqGi/w== +"@typescript-eslint/type-utils@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" + integrity sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag== dependencies: - "@typescript-eslint/typescript-estree" "6.19.0" - "@typescript-eslint/utils" "6.19.0" + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/utils" "6.21.0" debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@6.19.0": - version "6.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.19.0.tgz#689b0498c436272a6a2059b09f44bcbd90de294a" - integrity sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A== +"@typescript-eslint/types@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" + integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/typescript-estree@6.19.0": - version "6.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.0.tgz#0813ba364a409afb4d62348aec0202600cb468fa" - integrity sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ== +"@typescript-eslint/typescript-estree@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" + integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ== dependencies: - "@typescript-eslint/types" "6.19.0" - "@typescript-eslint/visitor-keys" "6.19.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -521,25 +521,25 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.19.0": - version "6.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.19.0.tgz#557b72c3eeb4f73bef8037c85dae57b21beb1a4b" - integrity sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw== +"@typescript-eslint/utils@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" + integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.19.0" - "@typescript-eslint/types" "6.19.0" - "@typescript-eslint/typescript-estree" "6.19.0" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" semver "^7.5.4" -"@typescript-eslint/visitor-keys@6.19.0": - version "6.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.0.tgz#4565e0ecd63ca1f81b96f1dd76e49f746c6b2b49" - integrity sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ== +"@typescript-eslint/visitor-keys@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47" + integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A== dependencies: - "@typescript-eslint/types" "6.19.0" + "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0": @@ -948,10 +948,10 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -core-js@^3.35.0: - version "3.35.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.35.0.tgz#58e651688484f83c34196ca13f099574ee53d6b4" - integrity sha512-ntakECeqg81KqMueeGJ79Q5ZgQNR+6eaE8sxGCx62zMbAIj65q+uYvatToew3m6eAGdU4gNZwpZ34NMe4GYswg== +core-js@^3.35.1: + version "3.35.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.35.1.tgz#9c28f8b7ccee482796f8590cc8d15739eaaf980c" + integrity sha512-IgdsbxNyMskrTFxa9lWHyMwAJU5gXOPP+1yO+K59d50VLVAIDAbs7gIv705KzALModfK3ZrSZTPNpC0PQgIZuw== cosmiconfig@^9.0.0: version "9.0.0" @@ -2230,10 +2230,10 @@ mdn-data@2.0.30: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.30.tgz#ce4df6f80af6cfbe218ecd5c552ba13c4dfa08cc" integrity sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA== -meow@^13.0.0: - version "13.1.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-13.1.0.tgz#62995b0e8c3951739fe6e0a4becdd4d0df23eb37" - integrity sha512-o5R/R3Tzxq0PJ3v3qcQJtSvSE9nKOLSAaDuuoMzDVuGTwHdccMWcYomh9Xolng2tjT6O/Y83d+0coVGof6tqmA== +meow@^13.1.0: + version "13.2.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-13.2.0.tgz#6b7d63f913f984063b3cc261b6e8800c4cd3474f" + integrity sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA== merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" @@ -2486,6 +2486,14 @@ postcss-selector-parser@^6.0.13: cssesc "^3.0.0" util-deprecate "^1.0.2" +postcss-selector-parser@^6.0.15: + version "6.0.15" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz#11cc2b21eebc0b99ea374ffb9887174855a01535" + integrity sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + postcss-sorting@^8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/postcss-sorting/-/postcss-sorting-8.0.2.tgz#6393385ece272baf74bee9820fb1b58098e4eeca" @@ -2514,6 +2522,15 @@ postcss@^8.4.33: picocolors "^1.0.0" source-map-js "^1.0.2" +postcss@^8.4.35: + version "8.4.35" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.35.tgz#60997775689ce09011edf083a549cea44aabe2f7" + integrity sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.0.2" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -2897,14 +2914,14 @@ stylelint-scss@^6.0.0: postcss-selector-parser "^6.0.13" postcss-value-parser "^4.2.0" -stylelint@^16.1.0: - version "16.1.0" - resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.1.0.tgz#d289c36b0dd344a65c55897d636b3b8b213dc908" - integrity sha512-Sh1rRV0lN1qxz/QsuuooLWsIZ/ona7NKw/fRZd6y6PyXYdD2W0EAzJ8yJcwSx4Iw/muz0CF09VZ+z4EiTAcKmg== +stylelint@^16.2.1: + version "16.2.1" + resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.2.1.tgz#895d6d42523c5126ec0895f0ca2a58febeb77e89" + integrity sha512-SfIMGFK+4n7XVAyv50CpVfcGYWG4v41y6xG7PqOgQSY8M/PgdK0SQbjWFblxjJZlN9jNq879mB4BCZHJRIJ1hA== dependencies: - "@csstools/css-parser-algorithms" "^2.4.0" - "@csstools/css-tokenizer" "^2.2.2" - "@csstools/media-query-list-parser" "^2.1.6" + "@csstools/css-parser-algorithms" "^2.5.0" + "@csstools/css-tokenizer" "^2.2.3" + "@csstools/media-query-list-parser" "^2.1.7" "@csstools/selector-specificity" "^3.0.1" balanced-match "^2.0.0" colord "^2.9.3" @@ -2924,14 +2941,14 @@ stylelint@^16.1.0: is-plain-object "^5.0.0" known-css-properties "^0.29.0" mathml-tag-names "^2.1.3" - meow "^13.0.0" + meow "^13.1.0" micromatch "^4.0.5" normalize-path "^3.0.0" picocolors "^1.0.0" - postcss "^8.4.32" + postcss "^8.4.33" postcss-resolve-nested-selector "^0.1.1" postcss-safe-parser "^7.0.0" - postcss-selector-parser "^6.0.13" + postcss-selector-parser "^6.0.15" postcss-value-parser "^4.2.0" resolve-from "^5.0.0" string-width "^4.2.3" @@ -3062,10 +3079,10 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typedoc@^0.25.7: - version "0.25.7" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.7.tgz#11e3f527ca80ca3c029cb8e15f362e6d9f715e25" - integrity sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow== +typedoc@^0.25.8: + version "0.25.8" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.8.tgz#7d0e1bf12d23bf1c459fd4893c82cb855911ff12" + integrity sha512-mh8oLW66nwmeB9uTa0Bdcjfis+48bAjSH3uqdzSuSawfduROQLlXw//WSNZLYDdhmMVB7YcYZicq6e8T0d271A== dependencies: lunr "^2.3.9" marked "^4.3.0" @@ -3122,10 +3139,10 @@ validator@^13.7.0: resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA== -vite-plugin-dts@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/vite-plugin-dts/-/vite-plugin-dts-3.7.1.tgz#b2c76749e78348d355c816c30583c2aa574c7986" - integrity sha512-VZJckNFpVfRAkmOxhGT5OgTUVWVXxkNQqLpBUuiNGAr9HbtvmvsPLo2JB3Xhn+o/Z9+CT6YZfYa4bX9SGR5hNw== +vite-plugin-dts@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/vite-plugin-dts/-/vite-plugin-dts-3.7.2.tgz#20a33f4bfaafcb0983b9e714db69d4f977d2b4d8" + integrity sha512-kg//1nDA01b8rufJf4TsvYN8LMkdwv0oBYpiQi6nRwpHyue+wTlhrBiqgipdFpMnW1oOYv6ywmzE5B0vg6vSEA== dependencies: "@microsoft/api-extractor" "7.39.0" "@rollup/pluginutils" "^5.1.0" @@ -3134,13 +3151,13 @@ vite-plugin-dts@^3.7.1: kolorist "^1.8.0" vue-tsc "^1.8.26" -vite@^5.0.11: - version "5.0.11" - resolved "https://registry.yarnpkg.com/vite/-/vite-5.0.11.tgz#31562e41e004cb68e1d51f5d2c641ab313b289e4" - integrity sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA== +vite@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.1.1.tgz#294e39b199d669981efc7e0261b14f78ec80819e" + integrity sha512-wclpAgY3F1tR7t9LL5CcHC41YPkQIpKUGeIuT8MdNwNZr6OqOTLs7JX5vIHAtzqLWXts0T+GDrh9pN2arneKqg== dependencies: esbuild "^0.19.3" - postcss "^8.4.32" + postcss "^8.4.35" rollup "^4.2.0" optionalDependencies: fsevents "~2.3.3"