aptechka 0.25.1 → 0.26.0
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-B9m8bw96.cjs +1 -0
- package/lib/Animation-DN95L7Xo.js +105 -0
- package/lib/Damped-CTsV8tl_.cjs +1 -0
- package/lib/Damped-Chu29wn-.js +53 -0
- package/lib/Tweened-BUuSLSF7.js +44 -0
- package/lib/Tweened-BttGiyB0.cjs +1 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +6 -53
- package/lib/canvas-CU5Xjahf.cjs +1 -0
- package/lib/canvas-DeZ0SLUJ.js +34 -0
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +3 -3
- package/lib/coordinates-CgdGoSYs.js +24 -0
- package/lib/coordinates-D8Np3cPD.cjs +1 -0
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +1 -1
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-resizer/react/index.cjs +1 -0
- package/lib/element-resizer/react/index.js +8 -0
- package/lib/element-resizer/vanilla/index.cjs +1 -0
- package/lib/element-resizer/{index.js → vanilla/index.js} +2 -2
- package/lib/en3/index.cjs +8 -0
- package/lib/en3/index.js +374 -0
- package/lib/events-CsVF98U6.js +6 -0
- package/lib/events-KVanG9sR.cjs +1 -0
- package/lib/intersector/react/index.cjs +1 -0
- package/lib/intersector/react/index.js +12 -0
- package/lib/intersector/vanilla/index.cjs +1 -0
- package/lib/intersector/{index.js → vanilla/index.js} +2 -2
- package/lib/jss-CjccJC-K.js +21 -0
- package/lib/jss-GJLvaNfT.cjs +1 -0
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +3 -3
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +42 -85
- package/lib/math-BOBiC4TN.js +45 -0
- package/lib/math-GDWEqu7y.cjs +1 -0
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/media-elements/index.cjs +5 -0
- package/lib/media-elements/index.js +389 -0
- package/lib/morph/index.cjs +1 -0
- package/lib/morph/index.js +227 -0
- package/lib/need_redo_tweaker/index.cjs +4 -4
- package/lib/need_redo_tweaker/index.js +100 -82
- package/lib/object-CCiXnER2.cjs +1 -0
- package/lib/object-D6MVWB4l.js +85 -0
- package/lib/pointer/index.cjs +1 -0
- package/lib/pointer/index.js +151 -0
- package/lib/polyfills-CM4SCDTt.cjs +1 -0
- package/lib/polyfills-X6KXuHg-.js +33 -0
- package/lib/router/index.cjs +1 -0
- package/lib/router/index.js +266 -0
- package/lib/scroll/react/index.cjs +30 -0
- package/lib/scroll/react/index.js +761 -0
- package/lib/scroll/vanilla/index.cjs +1 -0
- package/lib/scroll/vanilla/index.js +1120 -0
- package/lib/slicer/index.cjs +11 -0
- package/lib/slicer/index.js +108 -0
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +1 -1
- package/lib/style-BqzUd8Fy.cjs +1 -0
- package/lib/style-M-RBTQxT.js +21 -0
- package/lib/ticker/react/index.cjs +1 -0
- package/lib/ticker/react/index.js +19 -0
- package/lib/ticker/vanilla/index.cjs +1 -0
- package/lib/ticker/{index.js → vanilla/index.js} +2 -2
- package/lib/url-BDc0awLa.js +22 -0
- package/lib/url-C3Vj8msL.cjs +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +146 -220
- package/lib/window-resizer/react/index.cjs +1 -0
- package/lib/window-resizer/react/index.js +8 -0
- package/lib/window-resizer/vanilla/index.cjs +1 -0
- package/lib/window-resizer/vanilla/index.js +32 -0
- package/package.json +132 -20
- package/lib/Tweened-CDYmG9hk.js +0 -138
- package/lib/Tweened-DlyMbHu_.cjs +0 -1
- package/lib/animation/Animation.d.ts +0 -34
- package/lib/animation/Damped.d.ts +0 -18
- package/lib/animation/Tweened.d.ts +0 -14
- package/lib/animation/index.d.ts +0 -3
- package/lib/attribute/index.d.ts +0 -14
- package/lib/class-linked-status/index.d.ts +0 -11
- package/lib/connector/index.d.ts +0 -15
- package/lib/controls/AutoplayControls.d.ts +0 -16
- package/lib/controls/Controls.d.ts +0 -8
- package/lib/controls/DragControls.d.ts +0 -15
- package/lib/controls/KeyboardControls.d.ts +0 -13
- package/lib/controls/WheelControls.d.ts +0 -18
- package/lib/controls/index.d.ts +0 -5
- package/lib/css-property/index.d.ts +0 -16
- package/lib/css-unit-parser/index.d.ts +0 -6
- package/lib/css-value-parser/index.d.ts +0 -6
- package/lib/dev/index.d.ts +0 -1
- package/lib/device/Device.d.ts +0 -16
- package/lib/device/Viewport.d.ts +0 -28
- package/lib/device/index.d.ts +0 -2
- package/lib/element-resizer/index.cjs +0 -1
- package/lib/element-resizer/index.d.ts +0 -9
- package/lib/intersector/index.cjs +0 -1
- package/lib/intersector/index.d.ts +0 -9
- package/lib/ladder/index.d.ts +0 -23
- package/lib/layout-box/index.d.ts +0 -95
- package/lib/loading/index.d.ts +0 -38
- package/lib/media/index.d.ts +0 -11
- package/lib/need_redo_tweaker/CheckboxElement.d.ts +0 -14
- package/lib/need_redo_tweaker/TweakerBooleanManagerElement.d.ts +0 -10
- package/lib/need_redo_tweaker/TweakerColorManagerElement.d.ts +0 -10
- package/lib/need_redo_tweaker/TweakerElement.d.ts +0 -17
- package/lib/need_redo_tweaker/TweakerFieldElement.d.ts +0 -19
- package/lib/need_redo_tweaker/TweakerFolderElement.d.ts +0 -23
- package/lib/need_redo_tweaker/TweakerLinkManagerElement.d.ts +0 -10
- package/lib/need_redo_tweaker/TweakerNumberManagerElement.d.ts +0 -13
- package/lib/need_redo_tweaker/TweakerSelectManagerElement.d.ts +0 -10
- package/lib/need_redo_tweaker/TweakerStoreManagerElement.d.ts +0 -9
- package/lib/need_redo_tweaker/TweakerStringManagerElement.d.ts +0 -10
- package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +0 -74
- package/lib/need_redo_tweaker/element-constructor/createStylesheet.d.ts +0 -2
- package/lib/need_redo_tweaker/element-constructor/createTheme.d.ts +0 -12
- package/lib/need_redo_tweaker/element-constructor/index.d.ts +0 -4
- package/lib/need_redo_tweaker/element-constructor/knownSvgTags.d.ts +0 -1
- package/lib/need_redo_tweaker/element-constructor/tags.d.ts +0 -118
- package/lib/need_redo_tweaker/index.d.ts +0 -1
- package/lib/need_redo_tweaker/select/SelectElement.d.ts +0 -24
- package/lib/need_redo_tweaker/select/SelectHeadElement.d.ts +0 -12
- package/lib/need_redo_tweaker/select/SelectOptionElement.d.ts +0 -13
- package/lib/need_redo_tweaker/select/SelectUserElement.d.ts +0 -6
- package/lib/need_redo_tweaker/select/index.d.ts +0 -4
- package/lib/need_redo_tweaker/theme/index.d.ts +0 -35
- package/lib/need_redo_tweaker/tweakerManagerConstructors.d.ts +0 -14
- package/lib/need_redo_tweaker/tweakerStorage.d.ts +0 -23
- package/lib/notifier/index.d.ts +0 -8
- package/lib/order/index.d.ts +0 -22
- package/lib/polyfills-AItxku8u.js +0 -76
- package/lib/polyfills-Caa6z-Ay.cjs +0 -1
- package/lib/scroll-entries/index.d.ts +0 -20
- package/lib/source/SourceClass.d.ts +0 -11
- package/lib/source/SourceManager.d.ts +0 -13
- package/lib/source/SourceSet.d.ts +0 -8
- package/lib/source/index.d.ts +0 -3
- package/lib/store/Composed.d.ts +0 -7
- package/lib/store/Derived.d.ts +0 -7
- package/lib/store/DerivedArray.d.ts +0 -7
- package/lib/store/Resource.d.ts +0 -11
- package/lib/store/Store.d.ts +0 -35
- package/lib/store/StoreRegistry.d.ts +0 -22
- package/lib/store/index.d.ts +0 -6
- package/lib/style-3MQV6Cnl.js +0 -122
- package/lib/style-BoXabX_p.cjs +0 -1
- package/lib/ticker/index.cjs +0 -1
- package/lib/ticker/index.d.ts +0 -21
- package/lib/utils/array.d.ts +0 -2
- package/lib/utils/attributes.d.ts +0 -2
- package/lib/utils/browser.d.ts +0 -1
- package/lib/utils/bytes.d.ts +0 -1
- package/lib/utils/canvas.d.ts +0 -7
- package/lib/utils/collisions.d.ts +0 -3
- package/lib/utils/coordinates.d.ts +0 -13
- package/lib/utils/cssom.d.ts +0 -5
- package/lib/utils/decoding.d.ts +0 -2
- package/lib/utils/dom.d.ts +0 -5
- package/lib/utils/easings.d.ts +0 -17
- package/lib/utils/events.d.ts +0 -8
- package/lib/utils/file.d.ts +0 -1
- package/lib/utils/function.d.ts +0 -2
- package/lib/utils/gestures.d.ts +0 -1
- package/lib/utils/index.d.ts +0 -27
- package/lib/utils/jss.d.ts +0 -12
- package/lib/utils/layout.d.ts +0 -3
- package/lib/utils/math.d.ts +0 -11
- package/lib/utils/number.d.ts +0 -3
- package/lib/utils/object.d.ts +0 -9
- package/lib/utils/polyfills.d.ts +0 -1
- package/lib/utils/promises.d.ts +0 -1
- package/lib/utils/string.d.ts +0 -8
- package/lib/utils/style.d.ts +0 -2
- package/lib/utils/ts-shape.d.ts +0 -20
- package/lib/utils/ts-utility.d.ts +0 -26
- package/lib/utils/url.d.ts +0 -9
- package/lib/window-resizer/index.cjs +0 -1
- package/lib/window-resizer/index.d.ts +0 -9
- package/lib/window-resizer/index.js +0 -42
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";var f=s=>{throw TypeError(s)};var E=(s,t,n)=>t.has(s)||f("Cannot "+n);var e=(s,t,n)=>(E(s,t,"read from private field"),n?n.call(s):t.get(s)),h=(s,t,n)=>t.has(s)?f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,n),i=(s,t,n,d)=>(E(s,t,"write to private field"),d?d.call(s,n):t.set(s,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var p,o;class L{constructor(t){h(this,p);h(this,o);i(this,p,t.index),i(this,o,document.createElement("span")),e(this,o).classList.add("letter"),t.clone?e(this,o).innerHTML=`
|
|
2
|
+
<span class="original">${t.text}</span>
|
|
3
|
+
<span class="clone" aria-hidden>${t.text}</span>
|
|
4
|
+
`:e(this,o).innerHTML=`
|
|
5
|
+
<span class="value">${t.text}</span>
|
|
6
|
+
`}get index(){return e(this,p)}get element(){return e(this,o)}}p=new WeakMap,o=new WeakMap;var y,c,a;class T{constructor(t){h(this,y);h(this,c);h(this,a);i(this,y,t.index),i(this,c,document.createElement("span")),i(this,a,[]),t.letters&&t.lettersAcc!==void 0?(i(this,a,t.text.split("").map((n,d)=>new L({index:t.lettersAcc+d,text:n,clone:t.clone}))),e(this,c).append(...e(this,a).map(n=>n.element))):t.clone?e(this,c).innerHTML=`
|
|
7
|
+
<span class="original">${t.text}</span>
|
|
8
|
+
<span class="clone" aria-hidden>${t.text}</span>
|
|
9
|
+
`:e(this,c).innerHTML=`
|
|
10
|
+
<span class="value">${t.text}</span>
|
|
11
|
+
`,e(this,c).classList.add("word")}get index(){return e(this,y)}get element(){return e(this,c)}get letters(){return e(this,a)}}y=new WeakMap,c=new WeakMap,a=new WeakMap;var g,l,u;class b extends HTMLElement{constructor(){super(...arguments);h(this,g,"");h(this,l,[]);h(this,u,[])}get wordsArray(){return e(this,l)}get lettersArray(){return e(this,u)}get originalText(){return e(this,g)}connectedCallback(){var d;i(this,g,((d=this.textContent)==null?void 0:d.trim())||""),this.innerHTML="";let n=0;i(this,l,e(this,g).replace(/ +/g," ").split(" ").map((r,m)=>{const x=new T({index:m,text:r,letters:this.hasAttribute("letters"),lettersAcc:n,clone:this.hasAttribute("clone")});return n+=x.letters.length,e(this,u).push(...x.letters),x})),this.hasAttribute("index")&&(e(this,l).forEach(r=>{r.element.style.setProperty("--word-index",r.index.toString())}),e(this,u).forEach(r=>{r.element.style.setProperty("--letter-index",r.index.toString())})),e(this,l).forEach((r,m)=>{if(this.appendChild(r.element),m!==e(this,l).length-1){const x=document.createElement("span");x.innerHTML=" ",this.appendChild(x)}}),this.style.setProperty("--words-length",e(this,l).length.toString()),this.style.setProperty("--letters-length",e(this,u).length.toString())}disconnectedCallback(){i(this,l,[]),this.textContent=e(this,g),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")}}g=new WeakMap,l=new WeakMap,u=new WeakMap;customElements.get("e-slicer")||customElements.define("e-slicer",b);exports.Letter=L;exports.SlicerElement=b;exports.Word=T;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var f = (s) => {
|
|
2
|
+
throw TypeError(s);
|
|
3
|
+
};
|
|
4
|
+
var E = (s, t, n) => t.has(s) || f("Cannot " + n);
|
|
5
|
+
var e = (s, t, n) => (E(s, t, "read from private field"), n ? n.call(s) : t.get(s)), h = (s, t, n) => t.has(s) ? f("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, n), i = (s, t, n, d) => (E(s, t, "write to private field"), d ? d.call(s, n) : t.set(s, n), n);
|
|
6
|
+
var u, o;
|
|
7
|
+
class L {
|
|
8
|
+
constructor(t) {
|
|
9
|
+
h(this, u);
|
|
10
|
+
h(this, o);
|
|
11
|
+
i(this, u, t.index), i(this, o, document.createElement("span")), e(this, o).classList.add("letter"), t.clone ? e(this, o).innerHTML = `
|
|
12
|
+
<span class="original">${t.text}</span>
|
|
13
|
+
<span class="clone" aria-hidden>${t.text}</span>
|
|
14
|
+
` : e(this, o).innerHTML = `
|
|
15
|
+
<span class="value">${t.text}</span>
|
|
16
|
+
`;
|
|
17
|
+
}
|
|
18
|
+
get index() {
|
|
19
|
+
return e(this, u);
|
|
20
|
+
}
|
|
21
|
+
get element() {
|
|
22
|
+
return e(this, o);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
u = new WeakMap(), o = new WeakMap();
|
|
26
|
+
var y, c, a;
|
|
27
|
+
class T {
|
|
28
|
+
constructor(t) {
|
|
29
|
+
h(this, y);
|
|
30
|
+
h(this, c);
|
|
31
|
+
h(this, a);
|
|
32
|
+
i(this, y, t.index), i(this, c, document.createElement("span")), i(this, a, []), t.letters && t.lettersAcc !== void 0 ? (i(this, a, t.text.split("").map((n, d) => new L({
|
|
33
|
+
index: t.lettersAcc + d,
|
|
34
|
+
text: n,
|
|
35
|
+
clone: t.clone
|
|
36
|
+
}))), e(this, c).append(...e(this, a).map((n) => n.element))) : t.clone ? e(this, c).innerHTML = `
|
|
37
|
+
<span class="original">${t.text}</span>
|
|
38
|
+
<span class="clone" aria-hidden>${t.text}</span>
|
|
39
|
+
` : e(this, c).innerHTML = `
|
|
40
|
+
<span class="value">${t.text}</span>
|
|
41
|
+
`, e(this, c).classList.add("word");
|
|
42
|
+
}
|
|
43
|
+
get index() {
|
|
44
|
+
return e(this, y);
|
|
45
|
+
}
|
|
46
|
+
get element() {
|
|
47
|
+
return e(this, c);
|
|
48
|
+
}
|
|
49
|
+
get letters() {
|
|
50
|
+
return e(this, a);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
y = new WeakMap(), c = new WeakMap(), a = new WeakMap();
|
|
54
|
+
var g, l, x;
|
|
55
|
+
class w extends HTMLElement {
|
|
56
|
+
constructor() {
|
|
57
|
+
super(...arguments);
|
|
58
|
+
h(this, g, "");
|
|
59
|
+
h(this, l, []);
|
|
60
|
+
h(this, x, []);
|
|
61
|
+
}
|
|
62
|
+
get wordsArray() {
|
|
63
|
+
return e(this, l);
|
|
64
|
+
}
|
|
65
|
+
get lettersArray() {
|
|
66
|
+
return e(this, x);
|
|
67
|
+
}
|
|
68
|
+
get originalText() {
|
|
69
|
+
return e(this, g);
|
|
70
|
+
}
|
|
71
|
+
connectedCallback() {
|
|
72
|
+
var d;
|
|
73
|
+
i(this, g, ((d = this.textContent) == null ? void 0 : d.trim()) || ""), this.innerHTML = "";
|
|
74
|
+
let n = 0;
|
|
75
|
+
i(this, l, e(this, g).replace(/ +/g, " ").split(" ").map((r, m) => {
|
|
76
|
+
const p = new T({
|
|
77
|
+
index: m,
|
|
78
|
+
text: r,
|
|
79
|
+
letters: this.hasAttribute("letters"),
|
|
80
|
+
lettersAcc: n,
|
|
81
|
+
clone: this.hasAttribute("clone")
|
|
82
|
+
});
|
|
83
|
+
return n += p.letters.length, e(this, x).push(...p.letters), p;
|
|
84
|
+
})), this.hasAttribute("index") && (e(this, l).forEach((r) => {
|
|
85
|
+
r.element.style.setProperty("--word-index", r.index.toString());
|
|
86
|
+
}), e(this, x).forEach((r) => {
|
|
87
|
+
r.element.style.setProperty(
|
|
88
|
+
"--letter-index",
|
|
89
|
+
r.index.toString()
|
|
90
|
+
);
|
|
91
|
+
})), e(this, l).forEach((r, m) => {
|
|
92
|
+
if (this.appendChild(r.element), m !== e(this, l).length - 1) {
|
|
93
|
+
const p = document.createElement("span");
|
|
94
|
+
p.innerHTML = " ", this.appendChild(p);
|
|
95
|
+
}
|
|
96
|
+
}), this.style.setProperty("--words-length", e(this, l).length.toString()), this.style.setProperty("--letters-length", e(this, x).length.toString());
|
|
97
|
+
}
|
|
98
|
+
disconnectedCallback() {
|
|
99
|
+
i(this, l, []), this.textContent = e(this, g), this.style.removeProperty("--words-length"), this.style.removeProperty("--letters-length");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
g = new WeakMap(), l = new WeakMap(), x = new WeakMap();
|
|
103
|
+
customElements.get("e-slicer") || customElements.define("e-slicer", w);
|
|
104
|
+
export {
|
|
105
|
+
L as Letter,
|
|
106
|
+
w as SlicerElement,
|
|
107
|
+
T as Word
|
|
108
|
+
};
|
package/lib/source/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var T=
|
|
1
|
+
"use strict";var T=a=>{throw TypeError(a)};var _=(a,e,t)=>e.has(a)||T("Cannot "+t);var r=(a,e,t)=>(_(a,e,"read from private field"),t?t.call(a):e.get(a)),o=(a,e,t)=>e.has(a)?T("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),s=(a,e,t,n)=>(_(a,e,"write to private field"),n?n.call(a,t):e.set(a,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../order/index.cjs"),$=require("../window-resizer/vanilla/index.cjs"),B=require("../Store-CDb6RMce.cjs");var y,g,q,m,c,d,w;class k{constructor(e){o(this,y);o(this,g);o(this,q);o(this,m);o(this,c);o(this,d);o(this,w);s(this,y,e);const t=e.indexOf("?");t>=0&&(e=e.slice(0,t));const n=e.split(".");s(this,g,n[0]);const x=/\d+x/g,h=n.find(u=>u.match(x));s(this,q,h?parseInt(h):1);const f=/\d+max/g,S=/\d+min/g,i=/\d+mar/g,l=/\d+mir/g,E=n.find(u=>u.match(f)),I=n.find(u=>u.match(S)),V=n.find(u=>u.match(i)),b=n.find(u=>u.match(l));V?(s(this,c,parseInt(V)),s(this,d,"max"),s(this,m,`(max-aspect-ratio: ${r(this,c)})`)):b?(s(this,c,parseInt(b)),s(this,d,"max"),s(this,m,`(min-aspect-ratio: ${r(this,c)})`)):E?(s(this,c,parseInt(E)),s(this,d,"max"),s(this,m,`(max-width: ${r(this,c)}px)`)):I?(s(this,c,parseInt(I)),s(this,m,`(min-width: ${r(this,c)}px)`),s(this,d,"min")):(s(this,c,0),s(this,m,`(min-width: ${r(this,c)}px)`),s(this,d,"min")),s(this,w,"."+n[n.length-1])}get url(){return r(this,y)}get name(){return r(this,g)}get density(){return r(this,q)}get query(){return r(this,m)}get extension(){return r(this,w)}get queryType(){return r(this,d)}get queryValue(){return r(this,c)}}y=new WeakMap,g=new WeakMap,q=new WeakMap,m=new WeakMap,c=new WeakMap,d=new WeakMap,w=new WeakMap;var p;class z{constructor(e){o(this,p);s(this,p,new Map);const t=typeof e=="string"?e.trim().split(",").map(i=>i.trim()).filter(i=>!!i):e,n=[];t.forEach(i=>{const l=new k(i);n.push([l.query,l])});const x=n.filter(i=>i[1].queryType.includes("max")).sort((i,l)=>l[1].queryValue-i[1].queryValue),h=n.filter(i=>i[1].queryType.includes("min")&&i[1].queryValue!==0).sort((i,l)=>i[1].queryValue-l[1].queryValue),f=n.filter(i=>i[0]==="(min-width: 0px)");(f?[...f,...x,...h]:[...x,...h]).forEach(i=>{r(this,p).has(i[0])||r(this,p).set(i[0],[]),r(this,p).get(i[0]).push(i[1])})}get mediaBuckets(){return r(this,p)}}p=new WeakMap;var R,M;class O extends B.Store{constructor(t){super(void 0);o(this,R);o(this,M,()=>{let t;r(this,R).mediaBuckets.forEach((h,f)=>{matchMedia(f).matches&&(t=h)});let n,x=0;t==null||t.forEach(h=>{h.density>x&&h.density<=Math.max(devicePixelRatio,1)&&(x=h.density,n=h)}),t!=null&&t.length&&!n&&(n=t[0]),this.current=n});s(this,R,new z(t.srcset))}close(){super.close(),this.disconnect()}connect(){$.windowResizer.subscribe(r(this,M),A.RESIZE_ORDER.SOURCE_MANAGER)}disconnect(){$.windowResizer.unsubscribe(r(this,M))}}R=new WeakMap,M=new WeakMap;exports.Source=k;exports.SourceManager=O;exports.SourceSet=z;
|
package/lib/source/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var k = (a) => {
|
|
|
4
4
|
var A = (a, e, t) => e.has(a) || k("Cannot " + t);
|
|
5
5
|
var r = (a, e, t) => (A(a, e, "read from private field"), t ? t.call(a) : e.get(a)), o = (a, e, t) => e.has(a) ? k("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), i = (a, e, t, n) => (A(a, e, "write to private field"), n ? n.call(a, t) : e.set(a, t), t);
|
|
6
6
|
import { RESIZE_ORDER as S } from "../order/index.js";
|
|
7
|
-
import { windowResizer as B } from "../window-resizer/index.js";
|
|
7
|
+
import { windowResizer as B } from "../window-resizer/vanilla/index.js";
|
|
8
8
|
import { S as T } from "../Store-OTdcl6SX.js";
|
|
9
9
|
var y, g, q, u, c, d, w;
|
|
10
10
|
class O {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function r(n,o){const i=new Blob([JSON.stringify(o)],{type:"application/json"}),e=document.createElement("a");e.download=n+".json",e.href=window.URL.createObjectURL(i),e.dataset.downloadurl=["application/json",e.download,e.href].join(":");const a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(a),e.remove()}function t(n){return parseFloat(getComputedStyle(n).transitionDuration||"")}function c(n){return t(n)*1e3}exports.createJSONAndSave=r;exports.getElementTransitionDurationMS=c;exports.getElementTransitionDurationS=t;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function r(n, t) {
|
|
2
|
+
const o = new Blob([JSON.stringify(t)], { type: "application/json" }), e = document.createElement("a");
|
|
3
|
+
e.download = n + ".json", e.href = window.URL.createObjectURL(o), e.dataset.downloadurl = ["application/json", e.download, e.href].join(":");
|
|
4
|
+
const a = new MouseEvent("click", {
|
|
5
|
+
view: window,
|
|
6
|
+
bubbles: !0,
|
|
7
|
+
cancelable: !0
|
|
8
|
+
});
|
|
9
|
+
e.dispatchEvent(a), e.remove();
|
|
10
|
+
}
|
|
11
|
+
function i(n) {
|
|
12
|
+
return parseFloat(getComputedStyle(n).transitionDuration || "");
|
|
13
|
+
}
|
|
14
|
+
function c(n) {
|
|
15
|
+
return i(n) * 1e3;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
c as a,
|
|
19
|
+
r as c,
|
|
20
|
+
i as g
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),f=require("../vanilla/index.cjs");function n(t,{maxFPS:r,order:s,culling:e}={}){o.useEffect(()=>{let i;return e instanceof Element||typeof e=="string"||typeof e=="object"&&(i=e==null?void 0:e.current),f.ticker.subscribe(t,{maxFPS:r,order:s,culling:i})},[t,r,s,e])}exports.useTicker=n;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useEffect as s } from "react";
|
|
2
|
+
import { ticker as p } from "../vanilla/index.js";
|
|
3
|
+
function b(t, {
|
|
4
|
+
maxFPS: r,
|
|
5
|
+
order: f,
|
|
6
|
+
culling: e
|
|
7
|
+
} = {}) {
|
|
8
|
+
s(() => {
|
|
9
|
+
let o;
|
|
10
|
+
return e instanceof Element || typeof e == "string" || typeof e == "object" && (o = e == null ? void 0 : e.current), p.subscribe(t, {
|
|
11
|
+
maxFPS: r,
|
|
12
|
+
order: f,
|
|
13
|
+
culling: o
|
|
14
|
+
});
|
|
15
|
+
}, [t, r, f, e]);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
b as useTicker
|
|
19
|
+
};
|
|
@@ -0,0 +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("../../browser-CpzFX2xg.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 w,f,a,F,c,d,I,E,k,T;class x{constructor(){h(this,d);h(this,w,0);h(this,f,0);h(this,a);h(this,F,!1);h(this,c,[]);h(this,k,i=>{if(e(this,F)){t(this,F,!1),t(this,w,i-e(this,f));for(const s of e(this,c))s.sync(e(this,f))}t(this,a,requestAnimationFrame(e(this,k))),t(this,f,i-e(this,w));for(const s of e(this,c))s.tick(e(this,f))});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,d,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,d,E).call(this))}destroy(){B.isBrowser&&(S(this,d,E).call(this),document.removeEventListener("visibilitychange",e(this,T)))}}w=new WeakMap,f=new WeakMap,a=new WeakMap,F=new WeakMap,c=new WeakMap,d=new WeakSet,I=function(){e(this,c).length&&!e(this,a)&&t(this,a,requestAnimationFrame(e(this,k)))},E=function(){e(this,a)&&(cancelAnimationFrame(e(this,a)),t(this,a,void 0))},k=new WeakMap,T=new WeakMap;const j=new x;exports.Ticker=x;exports.ticker=j;
|
|
@@ -3,8 +3,8 @@ 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 "
|
|
7
|
-
import { g as P } from "
|
|
6
|
+
import { i as S } from "../../browser-0zX67oeU.js";
|
|
7
|
+
import { g as P } from "../../dom-0S_WDL4g.js";
|
|
8
8
|
var o, u, v, m, b, l, g, F, E;
|
|
9
9
|
class V {
|
|
10
10
|
constructor(i, s) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function p(t, n = "") {
|
|
2
|
+
n = n.endsWith("/") ? n.slice(0, -1) : n, t = t.replace(n, ""), t.startsWith("/") && (t = t.slice(1));
|
|
3
|
+
const c = t.split("#"), s = c[0].split("?"), i = s[0].startsWith("/") ? s[0] : "/" + s[0], o = n + i, h = s == null ? void 0 : s[1], r = c == null ? void 0 : c[1];
|
|
4
|
+
return {
|
|
5
|
+
leaf: i,
|
|
6
|
+
pathname: o,
|
|
7
|
+
parameters: h,
|
|
8
|
+
hash: r
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function e(t = "/") {
|
|
12
|
+
return t.endsWith("/") || (t += "/"), t.startsWith("/") || (t += "/"), t;
|
|
13
|
+
}
|
|
14
|
+
function l(t, n, c, s) {
|
|
15
|
+
const i = c || location.search, o = s ? s.startsWith("#") ? s : "#" + s : "", h = i ? i.startsWith("?") ? i : "?" + i : "", r = `${n}${o}${h}`;
|
|
16
|
+
t === "push" ? history.pushState(null, "", r) : t === "replace" && history.replaceState(null, "", r);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
l as c,
|
|
20
|
+
e as n,
|
|
21
|
+
p as s
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(t,n=""){n=n.endsWith("/")?n.slice(0,-1):n,t=t.replace(n,""),t.startsWith("/")&&(t=t.slice(1));const r=t.split("#"),s=r[0].split("?"),i=s[0].startsWith("/")?s[0]:"/"+s[0],o=n+i,h=s==null?void 0:s[1],c=r==null?void 0:r[1];return{leaf:i,pathname:o,parameters:h,hash:c}}function l(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function p(t,n,r,s){const i=r||location.search,o=s?s.startsWith("#")?s:"#"+s:"",h=i?i.startsWith("?")?i:"?"+i:"",c=`${n}${o}${h}`;t==="push"?history.pushState(null,"",c):t==="replace"&&history.replaceState(null,"",c)}exports.changeHistory=p;exports.normalizeBase=l;exports.splitPath=e;
|
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 h=require("../attributes-Bf2svn4j.cjs"),E=require("../browser-CpzFX2xg.cjs"),l=require("../canvas-CU5Xjahf.cjs"),d=require("../coordinates-D8Np3cPD.cjs"),m=require("../dom-JBOkFLTh.cjs"),s=require("../easings-DsS5-Kqc.cjs"),S=require("../events-KVanG9sR.cjs"),f=require("../style-BqzUd8Fy.cjs"),C=require("../function-MthRj-GJ.cjs"),I=require("../gestures-DHLrn6Q8.cjs"),O=require("../jss-GJLvaNfT.cjs"),g=require("../layout-8ryRAMGJ.cjs"),i=require("../math-GDWEqu7y.cjs"),p=require("../polyfills-CM4SCDTt.cjs"),r=require("../object-CCiXnER2.cjs"),u=require("../string-DhgS_iFl.cjs"),b=require("../url-C3Vj8msL.cjs");function T(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function P(t,e){const n=t.length;e=e%n;const a=new Array(n);for(let o=0;o<n;o++){const c=(o+e)%n;a[c]=t[o]}return a}function v(t,e=2){if(!+t)return"0 Bytes";const n=1024,a=e<0?0:e,o=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],c=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,c)).toFixed(a))} ${o[c]}`}function w(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function x(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function y(t,e){const n=t.styleMap.get(e);if(n){const a=n.toString();return a.startsWith("var")?y(t,a.slice(4,-1)):a}}function q(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(a=>{a instanceof CSSStyleRule&&a.selectorText===":root"&&t.forEach(o=>{const c=y(a,o);c&&(e[o]=c)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function Q(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function B(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function D(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}exports.parseAttribute=h.parseAttribute;exports.parseAttributeValue=h.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=l.contain;exports.cover=l.cover;exports.fixPosition=l.fixPosition;exports.measureText=l.measureText;exports.getPointerPosition=d.getPointerPosition;exports.normalize=d.normalize;exports.screenToCartesian=d.screenToCartesian;exports.findParentElement=m.findParentElement;exports.findScrollParentElement=m.findScrollParentElement;exports.getAllParentElements=m.getAllParentElements;exports.getElement=m.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=S.dispatchEvent;exports.createJSONAndSave=f.createJSONAndSave;exports.getElementTransitionDurationMS=f.getElementTransitionDurationMS;exports.getElementTransitionDurationS=f.getElementTransitionDurationS;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=I.setupDrag;exports.createStylesheet=O.createStylesheet;exports.styleToString=O.styleToString;exports.getCumulativeOffsetLeft=g.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=g.getCumulativeOffsetTop;exports.getCumulativePosition=g.getCumulativePosition;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.nullishCoalescing=p.nullishCoalescing;exports.preciseNumber=p.preciseNumber;exports.roundNumberTo=p.roundNumberTo;exports.toStep=p.toStep;exports.cloneDeep=r.cloneDeep;exports.compareObjects=r.compareObjects;exports.isESClass=r.isESClass;exports.isNullish=r.isNullish;exports.isObject=r.isObject;exports.mergeDeep=r.mergeDeep;exports.mixin=r.mixin;exports.omit=r.omit;exports.pick=r.pick;exports.camelToKebab=u.camelToKebab;exports.capitalize=u.capitalize;exports.generateId=u.generateId;exports.isUppercase=u.isUppercase;exports.kebabToCamel=u.kebabToCamel;exports.snakeToDotted=u.snakeToDotted;exports.toPascalCase=u.toPascalCase;exports.uncapitalize=u.uncapitalize;exports.changeHistory=b.changeHistory;exports.normalizeBase=b.normalizeBase;exports.splitPath=b.splitPath;exports.decode=B;exports.dotCircleCollision=x;exports.dotRectCollision=w;exports.encode=Q;exports.formatBytes=v;exports.getRootVariables=q;exports.insert=T;exports.shiftArray=P;exports.wait=D;
|