aptechka 0.43.4 → 0.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Animation-D1lL_XhF.cjs +1 -0
- package/lib/Animation-Je56LXXj.js +106 -0
- package/lib/{Damped-DxylD27S.js → Damped-BMmEn7PH.js} +4 -3
- package/lib/Damped-BbJjFOLH.cjs +1 -0
- package/lib/{Store-Cm3LPXlx.js → Store-D2xCXENW.js} +1 -1
- package/lib/Store-DRp_K37w.cjs +1 -0
- package/lib/{Tweened-p5hYr6lL.js → Tweened-BNCj14Jz.js} +4 -3
- package/lib/Tweened-Dk1UNPSH.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +45 -45
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +2 -2
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +11 -11
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +12 -11
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +3 -3
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +7 -6
- package/lib/custom-scrollbar/index.cjs +1 -1
- package/lib/custom-scrollbar/index.js +13 -12
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +7 -6
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +2 -2
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +1 -1
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +9 -8
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +6 -5
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +5 -4
- package/lib/index-Cqw2NKev.cjs +1 -0
- package/lib/index-euf5anj6.js +64 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +4 -61
- package/lib/{jss-CjccJC-K.js → jss-BQSxj7Ls.js} +1 -1
- package/lib/jss-B_mh4mIw.cjs +1 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +35 -34
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +1 -1
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +10 -9
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +17 -16
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +7 -6
- package/lib/morph/Morph.d.ts +11 -2
- package/lib/morph/MorphAnnouncer.d.ts +0 -1
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +263 -211
- package/lib/need_redo_tweaker/index.cjs +3 -3
- package/lib/need_redo_tweaker/index.js +260 -260
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +34 -33
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +25 -25
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +6 -5
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +278 -278
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +57 -56
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +6 -6
- package/lib/size-element/index.cjs +1 -1
- package/lib/size-element/index.js +12 -11
- package/lib/slicer/SlicerElement.d.ts +2 -2
- package/lib/slicer/index.cjs +2 -2
- package/lib/slicer/index.js +10 -9
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +13 -12
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +1 -1
- package/lib/url-CLvdjbII.cjs +1 -0
- package/lib/url-CfcHdBT6.js +49 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +163 -148
- package/lib/utils/timeouts.d.ts +5 -0
- package/lib/utils/url.d.ts +15 -2
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +7 -6
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +1 -1
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +13 -12
- package/package.json +1 -1
- package/lib/Animation-CMiBKrwE.cjs +0 -1
- package/lib/Animation-DPRlQfW2.js +0 -105
- package/lib/Damped-CHZ314Rn.cjs +0 -1
- package/lib/Store-C2J4Q87x.cjs +0 -1
- package/lib/Tweened-Dn6CMA-p.cjs +0 -1
- package/lib/browser-0zX67oeU.js +0 -4
- package/lib/browser-CpzFX2xg.cjs +0 -1
- package/lib/jss-GJLvaNfT.cjs +0 -1
- package/lib/url-CHQeS8b5.cjs +0 -1
- package/lib/url-DqQuzXwT.js +0 -37
package/lib/source/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var Z=h=>{throw TypeError(h)};var G=(h,r,e)=>r.has(h)||Z("Cannot "+e);var t=(h,r,e)=>(G(h,r,"read from private field"),e?e.call(h):r.get(h)),i=(h,r,e)=>r.has(h)?Z("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(h):r.set(h,e),s=(h,r,e,o)=>(G(h,r,"write to private field"),o?o.call(h,e):r.set(h,e),e),
|
|
1
|
+
"use strict";var Z=h=>{throw TypeError(h)};var G=(h,r,e)=>r.has(h)||Z("Cannot "+e);var t=(h,r,e)=>(G(h,r,"read from private field"),e?e.call(h):r.get(h)),i=(h,r,e)=>r.has(h)?Z("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(h):r.set(h,e),s=(h,r,e,o)=>(G(h,r,"write to private field"),o?o.call(h,e):r.set(h,e),e),P=(h,r,e)=>(G(h,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("../class-linked-status/index.cjs"),tt=require("../index-Cqw2NKev.cjs"),U=require("../events-KVanG9sR.cjs"),et=require("../string-DhgS_iFl.cjs"),K=require("../loading/index.cjs"),st=require("../order/index.cjs"),J=require("../window-resizer/index.cjs"),it=require("../Store-DRp_K37w.cjs");var $,w,O,S,u,f,M;class Q{constructor(r){i(this,$);i(this,w);i(this,O);i(this,S);i(this,u);i(this,f);i(this,M);s(this,$,r);let e=r.split(".");const o=/\b\d{1,2}x\b/g,d=e.find(p=>p.match(o)&&parseInt(p));s(this,O,d?parseInt(d):1),d&&(e=e.slice(0,-1)),s(this,w,e.length>1?e.slice(0,-1).join("."):e.join("."));const l=/\d+max/g,x=/\d+min/g,B=/\d+mar/g,_=/\d+mir/g,H=e.find(p=>p.match(l)),n=e.find(p=>p.match(x)),b=e.find(p=>p.match(B)),W=e.find(p=>p.match(_));b?(s(this,u,parseInt(b)),s(this,f,"max"),s(this,S,`(max-aspect-ratio: ${t(this,u)})`)):W?(s(this,u,parseInt(W)),s(this,f,"max"),s(this,S,`(min-aspect-ratio: ${t(this,u)})`)):H?(s(this,u,parseInt(H)),s(this,f,"max"),s(this,S,`(max-width: ${t(this,u)}px)`)):n?(s(this,u,parseInt(n)),s(this,S,`(min-width: ${t(this,u)}px)`),s(this,f,"min")):(s(this,u,0),s(this,S,`(min-width: ${t(this,u)}px)`),s(this,f,"min")),s(this,w,t(this,w).replace(`.${t(this,u)}${t(this,f)}`,"")),s(this,M,e[e.length-1]===t(this,w)?"":"."+e[e.length-1]),s(this,M,t(this,M).replace(`.${t(this,u)}${t(this,f)}`,""))}get url(){return t(this,$)}get name(){return t(this,w)}get density(){return t(this,O)}get query(){return t(this,S)}get extension(){return t(this,M)}get queryType(){return t(this,f)}get queryValue(){return t(this,u)}}$=new WeakMap,w=new WeakMap,O=new WeakMap,S=new WeakMap,u=new WeakMap,f=new WeakMap,M=new WeakMap;let rt=0;var m,a,y,q,g,z,R,c,v,A,E,C,I,j,D,V,F;class nt extends HTMLElement{constructor(e){super();i(this,I);i(this,m,null);i(this,a,null);i(this,y,!1);i(this,q,!1);i(this,g,!1);i(this,z,"");i(this,R,"");i(this,c,new Y.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1,clear:!1}));i(this,v,null);i(this,A);i(this,E,null);i(this,C);i(this,D,e=>{const o=e[0];t(this,g)&&(!t(this,q)||this.hasAttribute("reload-source"))&&o.isIntersecting&&this.triggerLazyLoad(),o.isIntersecting?U.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(P(this,I,j).call(this,void 0),s(this,q,!1)),U.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,V,()=>{t(this,c).set("loaded",!0),t(this,c).set("error",!1),t(this,c).set("loading",!1),!t(this,g)&&!t(this,y)&&K.loading.complete(t(this,R)),U.dispatchEvent(this,"sourceLoaded",{custom:!0});const e=getComputedStyle(this).getPropertyValue("--clear-duration");e?s(this,A,setTimeout(()=>{t(this,c).set("clear",!0)},parseFloat(e)*1e3)):t(this,c).set("clear",!0),s(this,y,!0)});i(this,F,e=>{t(this,c).set("loaded",!1),t(this,c).set("error",!0),t(this,c).set("loading",!1),!t(this,g)&&!t(this,y)&&K.loading.error(t(this,R)),U.dispatchEvent(this,"sourceError",{custom:!0}),s(this,y,!0)});s(this,C,e==null?void 0:e.sourceSetOptions),tt.isBrowser&&window.IntersectionObserver&&s(this,v,new IntersectionObserver(t(this,D)))}get consumerElement(){return t(this,a)}get sourceManager(){return t(this,m)}get status(){return t(this,c)}get isLazy(){return t(this,g)}get currentURL(){return t(this,E)}get isFirstLoadHappened(){return t(this,y)}triggerLazyLoad(){!t(this,q)&&t(this,m).current&&t(this,m).current!==t(this,m).previous&&(s(this,q,!0),P(this,I,j).call(this,t(this,m).current))}connectedCallback(){s(this,z,`source-consumer-${++rt}`);const e=this.getAttribute("srcset")||"",o=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;o&&t(this,c).addElement(o),s(this,a,this.createConsumer()),t(this,a).style.cssText=`
|
|
2
2
|
display: block;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100%;
|
|
5
|
-
`,t(this,a).classList.add("source-consumer"),Array.from(this.attributes).forEach(d=>{if(d.name!=="srcset"){const l=d.nodeValue||"",x=et.kebabToCamel(d.name);x in t(this,a)&&(t(this,a)[x]=l||!0)}}),this.appendChild(t(this,a)),s(this,m,new X({srcset:e,sourceSetOptions:t(this,C)})),s(this,g,this.hasAttribute("lazy")),t(this,m).subscribe(d=>{(!t(this,g)||t(this,g)&&t(this,
|
|
5
|
+
`,t(this,a).classList.add("source-consumer"),Array.from(this.attributes).forEach(d=>{if(d.name!=="srcset"){const l=d.nodeValue||"",x=et.kebabToCamel(d.name);x in t(this,a)&&(t(this,a)[x]=l||!0)}}),this.appendChild(t(this,a)),s(this,m,new X({srcset:e,sourceSetOptions:t(this,C)})),s(this,g,this.hasAttribute("lazy")),t(this,m).subscribe(d=>{(!t(this,g)||t(this,g)&&t(this,q))&&P(this,I,j).call(this,d.current)}),t(this,m).connect(),t(this,v).observe(this)}disconnectedCallback(){var e;clearTimeout(t(this,A)),t(this,v).disconnect(),(e=t(this,m))==null||e.close(),t(this,a)&&(t(this,a).onloadeddata=null,t(this,a).onload=null,t(this,a).onerror=null,t(this,a).remove()),s(this,y,!1),s(this,q,!1),t(this,c).reset()}}m=new WeakMap,a=new WeakMap,y=new WeakMap,q=new WeakMap,g=new WeakMap,z=new WeakMap,R=new WeakMap,c=new WeakMap,v=new WeakMap,A=new WeakMap,E=new WeakMap,C=new WeakMap,I=new WeakSet,j=function(e){if(clearTimeout(t(this,A)),t(this,a).onloadeddata=null,t(this,a).onload=null,t(this,a).onerror=null,t(this,c).set("loaded",!1),t(this,c).set("error",!1),t(this,c).set("loading",!1),t(this,c).set("clear",!1),e){s(this,R,`${t(this,z)}-${e.url}`);const o=this.hasAttribute("keep-source-parameters");t(this,c).set("loading",!0),s(this,E,o?e.url:e.name+e.extension),this.consumeSource(t(this,E)),!t(this,g)&&!t(this,y)&&K.loading.add(t(this,R)),t(this,a).onloadeddata=()=>{t(this,V).call(this)},t(this,a).onload=()=>{t(this,V).call(this)},t(this,a).onerror=()=>{t(this,F).call(this,t(this,E))}}else s(this,E,null),this.consumeSource(null)},D=new WeakMap,V=new WeakMap,F=new WeakMap;var L;class N{constructor(r,e){i(this,L);s(this,L,new Map);const o=(e==null?void 0:e.mediaBuckets)!==!1,d=typeof r=="string"?o?r.trim().split(",").map(n=>n.trim()).filter(n=>!!n):[r]:r,l=[];d.forEach(n=>{const b=new Q(n);l.push([b.query,b])});const x=l.filter(n=>n[1].queryType.includes("max")).sort((n,b)=>b[1].queryValue-n[1].queryValue),B=l.filter(n=>n[1].queryType.includes("min")&&n[1].queryValue!==0).sort((n,b)=>n[1].queryValue-b[1].queryValue),_=l.filter(n=>n[0]==="(min-width: 0px)");(_?[..._,...x,...B]:[...x,...B]).forEach(n=>{t(this,L).has(n[0])||t(this,L).set(n[0],[]),t(this,L).get(n[0]).push(n[1])})}get mediaBuckets(){return t(this,L)}}L=new WeakMap;var T,k;class X extends it.Store{constructor(e){super(void 0);i(this,T);i(this,k,()=>{let e;t(this,T).mediaBuckets.forEach((l,x)=>{matchMedia(x).matches&&(e=l)});let o,d=0;e==null||e.forEach(l=>{l.density>d&&l.density<=Math.max(devicePixelRatio,1)&&(d=l.density,o=l)}),e!=null&&e.length&&!o&&(o=e[0]),this.current=o});s(this,T,new N(e.srcset,e.sourceSetOptions))}updateSource(e){s(this,T,new N(e.srcset,e.sourceSetOptions)),t(this,k).call(this)}close(){super.close(),this.disconnect()}connect(){J.windowResizer.subscribe(t(this,k),st.RESIZE_ORDER.SOURCE_MANAGER),t(this,k).call(this)}disconnect(){J.windowResizer.unsubscribe(t(this,k))}}T=new WeakMap,k=new WeakMap;exports.Source=Q;exports.SourceElement=nt;exports.SourceManager=X;exports.SourceSet=N;
|
package/lib/source/index.js
CHANGED
|
@@ -4,13 +4,13 @@ var W = (n) => {
|
|
|
4
4
|
var G = (n, r, e) => r.has(n) || W("Cannot " + e);
|
|
5
5
|
var t = (n, r, e) => (G(n, r, "read from private field"), e ? e.call(n) : r.get(n)), i = (n, r, e) => r.has(n) ? W("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(n) : r.set(n, e), s = (n, r, e, o) => (G(n, r, "write to private field"), o ? o.call(n, e) : r.set(n, e), e), U = (n, r, e) => (G(n, r, "access private method"), e);
|
|
6
6
|
import { ClassLinkedStatus as Q } from "../class-linked-status/index.js";
|
|
7
|
-
import { i as X } from "../
|
|
7
|
+
import { i as X } from "../index-euf5anj6.js";
|
|
8
8
|
import { d as D } from "../events-CsVF98U6.js";
|
|
9
9
|
import { k as Y } from "../string-f0Dnk0L1.js";
|
|
10
10
|
import { loading as K } from "../loading/index.js";
|
|
11
11
|
import { RESIZE_ORDER as tt } from "../order/index.js";
|
|
12
12
|
import { windowResizer as Z } from "../window-resizer/index.js";
|
|
13
|
-
import { S as et } from "../Store-
|
|
13
|
+
import { S as et } from "../Store-D2xCXENW.js";
|
|
14
14
|
var C, E, O, L, u, f, k;
|
|
15
15
|
class st {
|
|
16
16
|
constructor(r) {
|
package/lib/store/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var g=r=>{throw TypeError(r)};var v=(r,s,e)=>s.has(r)||g("Cannot "+e);var c=(r,s,e)=>(v(r,s,"read from private field"),e?e.call(r):s.get(r)),n=(r,s,e)=>s.has(r)?g("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),h=(r,s,e,t)=>(v(r,s,"write to private field"),t?t.call(r,e):s.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../Store-
|
|
1
|
+
"use strict";var g=r=>{throw TypeError(r)};var v=(r,s,e)=>s.has(r)||g("Cannot "+e);var c=(r,s,e)=>(v(r,s,"read from private field"),e?e.call(r):s.get(r)),n=(r,s,e)=>s.has(r)?g("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),h=(r,s,e,t)=>(v(r,s,"write to private field"),t?t.call(r,e):s.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../Store-DRp_K37w.cjs"),m=require("../function-MthRj-GJ.cjs");require("../index-Cqw2NKev.cjs");var d;class D extends i.Store{constructor(e,t,u){super(null,u);n(this,d);h(this,d,e.subscribe(a=>{this.current=t(a.current)}))}close(){super.close(),c(this,d).call(this)}}d=new WeakMap;var b;class R extends i.Store{constructor(e,t,u){super(null,u);n(this,b);h(this,b,e.subscribe(a=>{this.current=a.current.map((p,x,y)=>t(p,x,y))}))}close(){super.close(),c(this,b).call(this)}}b=new WeakMap;var f,o,l;class q extends i.Store{constructor(e,t,u){super(e,u);n(this,f);n(this,o);n(this,l,0);h(this,o,new i.Store(!1)),h(this,f,t),u!=null&&u.manualControl||this.refetch()}get isPending(){return c(this,o)}refetch(){c(this,o).current=!0,h(this,l,c(this,l)+1);const e=c(this,l);c(this,f).call(this).then(t=>{e===c(this,l)&&(c(this,o).current=!1,this.current=t)})}}f=new WeakMap,o=new WeakMap,l=new WeakMap;var S;class C extends i.Store{constructor(e,t,u){super(null,u);n(this,S,[]);const a=m.debounce(()=>{this.current=t()},0);e.forEach(p=>{c(this,S).push(p.subscribe(()=>{a()}))})}close(){super.close(),c(this,S).forEach(e=>e())}}S=new WeakMap;exports.Store=i.Store;exports.activeStores=i.activeStores;exports.storeRegistry=i.storeRegistry;exports.Composed=C;exports.Derived=D;exports.DerivedArray=R;exports.Resource=q;
|
package/lib/store/index.js
CHANGED
|
@@ -3,11 +3,12 @@ var x = (e) => {
|
|
|
3
3
|
};
|
|
4
4
|
var g = (e, r, s) => r.has(e) || x("Cannot " + s);
|
|
5
5
|
var c = (e, r, s) => (g(e, r, "read from private field"), s ? s.call(e) : r.get(e)), i = (e, r, s) => r.has(e) ? x("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, s), h = (e, r, s, t) => (g(e, r, "write to private field"), t ? t.call(e, s) : r.set(e, s), s);
|
|
6
|
-
import { S as a } from "../Store-
|
|
7
|
-
import { a as
|
|
6
|
+
import { S as a } from "../Store-D2xCXENW.js";
|
|
7
|
+
import { a as q, s as z } from "../Store-D2xCXENW.js";
|
|
8
8
|
import { d as y } from "../function-C10DGppn.js";
|
|
9
|
+
import "../index-euf5anj6.js";
|
|
9
10
|
var d;
|
|
10
|
-
class
|
|
11
|
+
class P extends a {
|
|
11
12
|
constructor(s, t, u) {
|
|
12
13
|
super(null, u);
|
|
13
14
|
i(this, d);
|
|
@@ -21,7 +22,7 @@ class I extends a {
|
|
|
21
22
|
}
|
|
22
23
|
d = new WeakMap();
|
|
23
24
|
var f;
|
|
24
|
-
class
|
|
25
|
+
class R extends a {
|
|
25
26
|
constructor(s, t, u) {
|
|
26
27
|
super(null, u);
|
|
27
28
|
i(this, f);
|
|
@@ -35,7 +36,7 @@ class P extends a {
|
|
|
35
36
|
}
|
|
36
37
|
f = new WeakMap();
|
|
37
38
|
var b, n, o;
|
|
38
|
-
class
|
|
39
|
+
class w extends a {
|
|
39
40
|
constructor(s, t, u) {
|
|
40
41
|
super(s, u);
|
|
41
42
|
i(this, b);
|
|
@@ -56,7 +57,7 @@ class R extends a {
|
|
|
56
57
|
}
|
|
57
58
|
b = new WeakMap(), n = new WeakMap(), o = new WeakMap();
|
|
58
59
|
var p;
|
|
59
|
-
class
|
|
60
|
+
class A extends a {
|
|
60
61
|
constructor(s, t, u) {
|
|
61
62
|
super(null, u);
|
|
62
63
|
i(this, p, []);
|
|
@@ -77,11 +78,11 @@ class w extends a {
|
|
|
77
78
|
}
|
|
78
79
|
p = new WeakMap();
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
A as Composed,
|
|
82
|
+
P as Derived,
|
|
83
|
+
R as DerivedArray,
|
|
84
|
+
w as Resource,
|
|
84
85
|
a as Store,
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
q as activeStores,
|
|
87
|
+
z as storeRegistry
|
|
87
88
|
};
|
package/lib/ticker/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var L=r=>{throw TypeError(r)};var A=(r,i,s)=>i.has(r)||L("Cannot "+s);var e=(r,i,s)=>(A(r,i,"read from private field"),s?s.call(r):i.get(r)),h=(r,i,s)=>i.has(r)?L("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(r):i.set(r,s),t=(r,i,s,n)=>(A(r,i,"write to private field"),n?n.call(r,s):i.set(r,s),s),S=(r,i,s)=>(A(r,i,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../
|
|
1
|
+
"use strict";var L=r=>{throw TypeError(r)};var A=(r,i,s)=>i.has(r)||L("Cannot "+s);var e=(r,i,s)=>(A(r,i,"read from private field"),s?s.call(r):i.get(r)),h=(r,i,s)=>i.has(r)?L("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(r):i.set(r,s),t=(r,i,s,n)=>(A(r,i,"write to private field"),n?n.call(r,s):i.set(r,s),s),S=(r,i,s)=>(A(r,i,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../index-Cqw2NKev.cjs"),M=require("../dom-JBOkFLTh.cjs");var o,u,v,b,m,l,g,y,q;class V{constructor(i,s){h(this,o);h(this,u);h(this,v);h(this,b,0);h(this,m,0);h(this,l,0);h(this,g,!1);h(this,y,null);h(this,q,i=>{const s=i[0];t(this,g,s.isIntersecting)});if(t(this,o,i),t(this,u,s==null?void 0:s.maxFPS),t(this,v,(s==null?void 0:s.order)||0),s!=null&&s.culling&&B.isBrowser){const n=M.getElement(s.culling);n&&(t(this,y,new IntersectionObserver(e(this,q))),e(this,y).observe(n))}else t(this,g,!0)}get callback(){return e(this,o)}get order(){return e(this,v)}sync(i){t(this,b,i-e(this,l))}tick(i){if(t(this,l,Math.max(0,i-e(this,b))),e(this,m)||t(this,m,i),e(this,u))if(e(this,l)>=1e3/e(this,u))t(this,b,i-e(this,l)%e(this,u));else return;else t(this,b,i);e(this,g)&&e(this,o).call(this,{timeBetweenFrames:e(this,l),timestamp:i,subscribeTimestamp:e(this,m),timeElapsedSinceSubscription:i-e(this,m)})}destroy(){var i;(i=e(this,y))==null||i.disconnect()}}o=new WeakMap,u=new WeakMap,v=new WeakMap,b=new WeakMap,m=new WeakMap,l=new WeakMap,g=new WeakMap,y=new WeakMap,q=new WeakMap;var k,d,a,F,c,f,I,E,w,T;class x{constructor(){h(this,f);h(this,k,0);h(this,d,0);h(this,a);h(this,F,!1);h(this,c,[]);h(this,w,i=>{if(e(this,F)){t(this,F,!1),t(this,k,i-e(this,d));for(const s of e(this,c))s.sync(e(this,d))}t(this,a,requestAnimationFrame(e(this,w))),t(this,d,i-e(this,k));for(const s of e(this,c))s.tick(e(this,d))});h(this,T,()=>{document.hidden&&t(this,F,!0)});B.isBrowser&&document.addEventListener("visibilitychange",e(this,T))}subscribe(i,s){if(!e(this,c).find(n=>n.callback===i)){const n=new V(i,s);n.sync(performance.now()),e(this,c).push(n),t(this,c,e(this,c).sort((O,P)=>O.order-P.order))}return S(this,f,I).call(this),()=>this.unsubscribe(i)}unsubscribe(i){const s=e(this,c).filter(n=>n.callback===i);s.length&&(s.forEach(n=>n.destroy()),t(this,c,e(this,c).filter(n=>n.callback!==i)),e(this,c).length||S(this,f,E).call(this))}destroy(){B.isBrowser&&(S(this,f,E).call(this),document.removeEventListener("visibilitychange",e(this,T)))}}k=new WeakMap,d=new WeakMap,a=new WeakMap,F=new WeakMap,c=new WeakMap,f=new WeakSet,I=function(){e(this,c).length&&!e(this,a)&&t(this,a,requestAnimationFrame(e(this,w)))},E=function(){e(this,a)&&(cancelAnimationFrame(e(this,a)),t(this,a,void 0))},w=new WeakMap,T=new WeakMap;const j=new x;exports.Ticker=x;exports.ticker=j;
|
package/lib/ticker/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var q = (r) => {
|
|
|
3
3
|
};
|
|
4
4
|
var L = (r, i, s) => i.has(r) || q("Cannot " + s);
|
|
5
5
|
var e = (r, i, s) => (L(r, i, "read from private field"), s ? s.call(r) : i.get(r)), h = (r, i, s) => i.has(r) ? q("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(r) : i.set(r, s), t = (r, i, s, n) => (L(r, i, "write to private field"), n ? n.call(r, s) : i.set(r, s), s), A = (r, i, s) => (L(r, i, "access private method"), s);
|
|
6
|
-
import { i as S } from "../
|
|
6
|
+
import { i as S } from "../index-euf5anj6.js";
|
|
7
7
|
import { g as P } from "../dom-CVWzyXPH.js";
|
|
8
8
|
var o, u, v, m, b, l, g, F, E;
|
|
9
9
|
class V {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var P=Object.defineProperty,S=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var n=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;var c=(t,s,a)=>s in t?P(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a,i=(t,s)=>{for(var a in s||(s={}))u.call(s,a)&&c(t,a,s[a]);if(n)for(var a of n(s))p.call(s,a)&&c(t,a,s[a]);return t},o=(t,s)=>S(t,W(s));function y(t,{base:s="",trailingSlash:a=!1}={}){s=s.endsWith("/")?s.slice(0,-1):s,t=t.replace(s,""),t.startsWith("/")&&(t=t.slice(1));const h=t.split("#"),e=h[0].split("?");let r=e[0].startsWith("/")?e[0]:"/"+e[0];a?r=!r.endsWith("/")&&r!=="/"?r+"/":r:r=r.endsWith("/")&&r!=="/"?r.slice(0,-1):r;const f=s+r,m=e==null?void 0:e[1],l=h==null?void 0:h[1];return{leaf:r,pathname:f,parameters:m,hash:l}}function d(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function g(t){const s=(t==null?void 0:t.searchParameters)||location.search,a=t.hash?t.hash.startsWith("#")?t.hash:"#"+t.hash:"",h=s?s.startsWith("?")?s:"?"+s:"",e=`${t.pathname}${a}${h}`,r=o(i({},t.state),{path:e});t.action==="push"?history.pushState(r,"",e):t.action==="replace"&&history.replaceState(r,"",e)}function $(t){const s=new URLSearchParams(t),a={};for(const[h,e]of s)a[h]=e;return a}function w(t,s){const a=new URL(location.href),h=(s==null?void 0:s.toString())||"";a.searchParams.set(t,h),history.replaceState(history.state,"",a.href)}exports.changeHistory=g;exports.normalizeBase=d;exports.parseSearchParameters=$;exports.splitPath=y;exports.updateSearchParameter=w;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var W = Object.defineProperty, P = Object.defineProperties;
|
|
2
|
+
var u = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var h = Object.getOwnPropertySymbols;
|
|
4
|
+
var S = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var c = (t, s, a) => s in t ? W(t, s, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[s] = a, o = (t, s) => {
|
|
6
|
+
for (var a in s || (s = {}))
|
|
7
|
+
S.call(s, a) && c(t, a, s[a]);
|
|
8
|
+
if (h)
|
|
9
|
+
for (var a of h(s))
|
|
10
|
+
p.call(s, a) && c(t, a, s[a]);
|
|
11
|
+
return t;
|
|
12
|
+
}, i = (t, s) => P(t, u(s));
|
|
13
|
+
function d(t, { base: s = "", trailingSlash: a = !1 } = {}) {
|
|
14
|
+
s = s.endsWith("/") ? s.slice(0, -1) : s, t = t.replace(s, ""), t.startsWith("/") && (t = t.slice(1));
|
|
15
|
+
const n = t.split("#"), e = n[0].split("?");
|
|
16
|
+
let r = e[0].startsWith("/") ? e[0] : "/" + e[0];
|
|
17
|
+
a ? r = !r.endsWith("/") && r !== "/" ? r + "/" : r : r = r.endsWith("/") && r !== "/" ? r.slice(0, -1) : r;
|
|
18
|
+
const f = s + r, l = e == null ? void 0 : e[1], m = n == null ? void 0 : n[1];
|
|
19
|
+
return {
|
|
20
|
+
leaf: r,
|
|
21
|
+
pathname: f,
|
|
22
|
+
parameters: l,
|
|
23
|
+
hash: m
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function $(t = "/") {
|
|
27
|
+
return t.endsWith("/") || (t += "/"), t.startsWith("/") || (t += "/"), t;
|
|
28
|
+
}
|
|
29
|
+
function g(t) {
|
|
30
|
+
const s = (t == null ? void 0 : t.searchParameters) || location.search, a = t.hash ? t.hash.startsWith("#") ? t.hash : "#" + t.hash : "", n = s ? s.startsWith("?") ? s : "?" + s : "", e = `${t.pathname}${a}${n}`, r = i(o({}, t.state), { path: e });
|
|
31
|
+
t.action === "push" ? history.pushState(r, "", e) : t.action === "replace" && history.replaceState(r, "", e);
|
|
32
|
+
}
|
|
33
|
+
function w(t) {
|
|
34
|
+
const s = new URLSearchParams(t), a = {};
|
|
35
|
+
for (const [n, e] of s)
|
|
36
|
+
a[n] = e;
|
|
37
|
+
return a;
|
|
38
|
+
}
|
|
39
|
+
function L(t, s) {
|
|
40
|
+
const a = new URL(location.href), n = (s == null ? void 0 : s.toString()) || "";
|
|
41
|
+
a.searchParams.set(t, n), history.replaceState(history.state, "", a.href);
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
g as c,
|
|
45
|
+
$ as n,
|
|
46
|
+
w as p,
|
|
47
|
+
d as s,
|
|
48
|
+
L as u
|
|
49
|
+
};
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../attributes-Bf2svn4j.cjs"),O=require("../index-Cqw2NKev.cjs"),g=require("../canvas-CU5Xjahf.cjs"),C=require("../coordinates-D8Np3cPD.cjs"),u=require("../dom-JBOkFLTh.cjs"),s=require("../easings-GegIwET5.cjs"),P=require("../events-KVanG9sR.cjs"),T=require("../file-DSpfWdd9.cjs"),S=require("../function-MthRj-GJ.cjs"),w=require("../gestures-DHLrn6Q8.cjs"),E=require("../jss-B_mh4mIw.cjs"),p=require("../layout-Ctc2p3uz.cjs"),i=require("../math-GDWEqu7y.cjs"),m=require("../polyfills-BANSrI_m.cjs"),c=require("../object-CCiXnER2.cjs"),l=require("../string-DhgS_iFl.cjs"),v=require("../style-At6aDoqG.cjs"),f=require("../url-CLvdjbII.cjs");function q(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function Q(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let r=0;r<n;r++){const a=(r+e)%n;o[a]=t[r]}return o}function B(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,r=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],a=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,a)).toFixed(o))} ${r[a]}`}function D(t){if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{console.log("Text copied to clipboard successfully!")}).catch(e=>{console.error("Failed to copy text to clipboard:",e)});else{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.top="0",e.style.left="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")?console.log("Text copied to clipboard successfully!"):console.error("Failed to copy text to clipboard.")}catch(n){console.error("Failed to copy text to clipboard:",n)}document.body.removeChild(e)}}function A(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function R(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function x(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?x(t,o.slice(4,-1)):o}}function N(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(r=>{const a=x(o,r);a&&(e[r]=a)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function z(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function M(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function V(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}function j(t,{behaviour:e="instant",offset:n=0,center:o=!1}={}){var a;const r=u.getElement(t);if(r){const d=u.findScrollParentElement(r),b=p.getCumulativeOffsetTop(r),h=(typeof n=="number"?n:((a=u.getElement(n))==null?void 0:a.offsetHeight)||0)*-1,y=o?innerHeight/2*-1+r.offsetHeight/2:0;d==null||d.scroll({top:b+h+y,behavior:e})}}function U(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function k(t,e,n,o){let r,a=!1,d=0;const b=()=>{clearInterval(r),o!=null&&o.restartCounter&&(d=0),a&&(r=setInterval(()=>{n(d++)},e))},h=O.intersector.subscribe(t,y=>{a=y.isIntersecting,b()});return()=>{h(),clearInterval(r)}}exports.parseAttribute=I.parseAttribute;exports.parseAttributeValue=I.parseAttributeValue;exports.isBrowser=O.isBrowser;exports.contain=g.contain;exports.cover=g.cover;exports.fixPosition=g.fixPosition;exports.measureText=g.measureText;exports.getPointerPosition=C.getPointerPosition;exports.normalize=C.normalize;exports.screenToCartesian=C.screenToCartesian;exports.findParentElement=u.findParentElement;exports.findScrollParentElement=u.findScrollParentElement;exports.getAllParentElements=u.getAllParentElements;exports.getElement=u.getElement;exports.easeInCubic=s.easeInCubic;exports.easeInExpo=s.easeInExpo;exports.easeInOutCubic=s.easeInOutCubic;exports.easeInOutExpo=s.easeInOutExpo;exports.easeInOutQuad=s.easeInOutQuad;exports.easeInOutQuart=s.easeInOutQuart;exports.easeInOutQuint=s.easeInOutQuint;exports.easeInQuad=s.easeInQuad;exports.easeInQuart=s.easeInQuart;exports.easeInQuint=s.easeInQuint;exports.easeOutCubic=s.easeOutCubic;exports.easeOutExpo=s.easeOutExpo;exports.easeOutQuad=s.easeOutQuad;exports.easeOutQuart=s.easeOutQuart;exports.easeOutQuint=s.easeOutQuint;exports.linear=s.linear;exports.dispatchEvent=P.dispatchEvent;exports.createJSONAndSave=T.createJSONAndSave;exports.downloadURI=T.downloadURI;exports.debounce=S.debounce;exports.throttle=S.throttle;exports.setupDrag=w.setupDrag;exports.createStylesheet=E.createStylesheet;exports.styleToString=E.styleToString;exports.getCumulativeOffsetLeft=p.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=p.getCumulativeOffsetTop;exports.getCumulativePosition=p.getCumulativePosition;exports.getStickyOffset=p.getStickyOffset;exports.calculateDistance=i.calculateDistance;exports.calculateDistanceWithRadius=i.calculateDistanceWithRadius;exports.clamp=i.clamp;exports.damp=i.damp;exports.lerp=i.lerp;exports.mapRange=i.mapRange;exports.round=i.round;exports.smootherstep=i.smootherstep;exports.smoothstep=i.smoothstep;exports.step=i.step;exports.loopNumber=m.loopNumber;exports.nullishCoalescing=m.nullishCoalescing;exports.preciseNumber=m.preciseNumber;exports.roundNumberTo=m.roundNumberTo;exports.toStep=m.toStep;exports.cloneDeep=c.cloneDeep;exports.compareObjects=c.compareObjects;exports.isESClass=c.isESClass;exports.isNullish=c.isNullish;exports.isObject=c.isObject;exports.mergeDeep=c.mergeDeep;exports.mixin=c.mixin;exports.omit=c.omit;exports.pick=c.pick;exports.camelToKebab=l.camelToKebab;exports.capitalize=l.capitalize;exports.generateId=l.generateId;exports.isUppercase=l.isUppercase;exports.kebabToCamel=l.kebabToCamel;exports.snakeToDotted=l.snakeToDotted;exports.toPascalCase=l.toPascalCase;exports.uncapitalize=l.uncapitalize;exports.getElementTransitionDurationMS=v.getElementTransitionDurationMS;exports.getElementTransitionDurationS=v.getElementTransitionDurationS;exports.changeHistory=f.changeHistory;exports.normalizeBase=f.normalizeBase;exports.parseSearchParameters=f.parseSearchParameters;exports.splitPath=f.splitPath;exports.updateSearchParameter=f.updateSearchParameter;exports.cloneTemplateContent=U;exports.copyTextToClipboard=D;exports.decode=M;exports.dotCircleCollision=R;exports.dotRectCollision=A;exports.encode=z;exports.formatBytes=B;exports.getRootVariables=N;exports.insert=q;exports.scrollToElement=j;exports.setIntervalOnIntersection=k;exports.shiftArray=Q;exports.wait=V;
|
package/lib/utils/index.d.ts
CHANGED