aptechka 0.64.0 → 0.64.3
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-BRqj4VfN.cjs +1 -0
- package/lib/{Animation-Cb-klopb.js → Animation-D29tc5VS.js} +5 -4
- package/lib/Damped-BD1OQ1fH.cjs +1 -0
- package/lib/{Damped-ByZFbNSt.js → Damped-YrqW5V4w.js} +5 -4
- package/lib/DragControls-D8BXtKVu.cjs +1 -0
- package/lib/DragControls-DGDUw6bM.js +226 -0
- package/lib/ScrollSegmentElement-B6gp1q_z.js +459 -0
- package/lib/ScrollSegmentElement-DtMMAirz.cjs +1 -0
- package/lib/SourceElement-D_YeNqsI.cjs +5 -0
- package/lib/SourceElement-jbviggZp.js +217 -0
- package/lib/{Store-swP_0ymB.js → Store-0BVty6AZ.js} +2 -1
- package/lib/Store-Cd1GlEmZ.cjs +1 -0
- package/lib/Tweened-B-AHx93m.cjs +1 -0
- package/lib/{Tweened-DzZwfKNm.js → Tweened-_pF0zXXN.js} +9 -8
- package/lib/Viewport-DA10iWAO.js +109 -0
- package/lib/Viewport-DB0qAZPJ.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +2 -1
- 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 +5 -4
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +2 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +5 -5
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +6 -223
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +15 -14
- package/lib/custom-scrollbar/index.cjs +1 -1
- package/lib/custom-scrollbar/index.js +25 -24
- 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 +5 -106
- package/lib/element-linked-store/index.cjs +1 -1
- package/lib/element-linked-store/index.js +5 -4
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +22 -21
- package/lib/en3/En3View.d.ts +2 -2
- package/lib/en3/en3.d.ts +3 -2
- package/lib/en3/index.cjs +3 -3
- package/lib/en3/index.js +93 -91
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +4 -3
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +5 -4
- package/lib/{index-euf5anj6.js → index-Bv9zgfdb.js} +3 -2
- package/lib/index-DekP7OZe.cjs +1 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +4 -3
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +41 -40
- package/lib/{layout-DpZo-I0y.js → layout-BSMtwCga.js} +2 -2
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +18 -17
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +4 -3
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +2 -2
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +12 -11
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +3 -2
- package/lib/need_redo_tweaker/index.cjs +3 -3
- package/lib/need_redo_tweaker/index.js +368 -340
- package/lib/pixel-perfect/index.cjs +1 -1
- package/lib/pixel-perfect/index.js +2 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +19 -18
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +3 -2
- package/lib/radio/index.cjs +1 -1
- package/lib/radio/index.js +2 -1
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +11 -10
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +66 -65
- package/lib/{scroll-Benkuq-t.js → scroll-BWF48oHS.js} +11 -10
- package/lib/scroll-CFDCeArT.cjs +1 -0
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +3 -456
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +4 -3
- package/lib/size-element/index.cjs +1 -1
- package/lib/size-element/index.js +2 -1
- package/lib/slicer/index.cjs +3 -3
- package/lib/slicer/index.js +31 -30
- package/lib/source/SourceElement.d.ts +1 -1
- package/lib/source/index.cjs +1 -5
- package/lib/source/index.js +5 -214
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +14 -13
- package/lib/stylesheet-DpnWNVyD.js +24 -0
- package/lib/stylesheet-HWF2a3nr.cjs +1 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +14 -13
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +5 -5
- package/lib/utils/jss.d.ts +0 -1
- package/lib/utils/stylesheet.d.ts +2 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +11 -10
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +9 -8
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +12 -11
- package/package.json +4 -4
- package/lib/Animation-dD_idtTU.cjs +0 -1
- package/lib/Damped-B8bmTxAr.cjs +0 -1
- package/lib/Store-GokLe_g-.cjs +0 -1
- package/lib/Tweened-BsL9FamJ.cjs +0 -1
- package/lib/index-Cqw2NKev.cjs +0 -1
- package/lib/jss-CRBgdvJ3.cjs +0 -1
- package/lib/jss-DtnXPEnq.js +0 -23
- package/lib/scroll-DAhSpkhR.cjs +0 -1
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
var W = (n) => {
|
|
2
|
+
throw TypeError(n);
|
|
3
|
+
};
|
|
4
|
+
var G = (n, r, e) => r.has(n) || W("Cannot " + e);
|
|
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
|
+
import { ElementLinkedStore as Q } from "./element-linked-store/index.js";
|
|
7
|
+
import { i as X } from "./index-Bv9zgfdb.js";
|
|
8
|
+
import { d as D } from "./events-CsVF98U6.js";
|
|
9
|
+
import { k as Y } from "./string-BlMQbe8b.js";
|
|
10
|
+
import "construct-style-sheets-polyfill";
|
|
11
|
+
import { loading as K } from "./loading/index.js";
|
|
12
|
+
import { RESIZE_ORDER as tt } from "./order/index.js";
|
|
13
|
+
import { windowResizer as Z } from "./window-resizer/index.js";
|
|
14
|
+
import { S as et } from "./Store-0BVty6AZ.js";
|
|
15
|
+
var O, w, C, E, u, f, k;
|
|
16
|
+
class st {
|
|
17
|
+
constructor(r) {
|
|
18
|
+
i(this, O);
|
|
19
|
+
i(this, w);
|
|
20
|
+
i(this, C);
|
|
21
|
+
i(this, E);
|
|
22
|
+
i(this, u);
|
|
23
|
+
i(this, f);
|
|
24
|
+
i(this, k);
|
|
25
|
+
s(this, O, r);
|
|
26
|
+
let e = r.split(".");
|
|
27
|
+
const o = /\b\d{1,2}x\b/g, d = e.find((g) => g.match(o) && parseInt(g));
|
|
28
|
+
s(this, C, d ? parseInt(d) : 1), d && (e = e.slice(0, -1)), s(this, w, e.length > 1 ? e.slice(0, -1).join(".") : e.join("."));
|
|
29
|
+
const l = /\d+max/g, x = /\d+min/g, B = /\d+mar/g, P = /\d+mir/g, _ = e.find((g) => g.match(l)), h = e.find((g) => g.match(x)), b = e.find((g) => g.match(B)), N = e.find((g) => g.match(P));
|
|
30
|
+
b ? (s(this, u, parseInt(b)), s(this, f, "max"), s(this, E, `(max-aspect-ratio: ${t(this, u)})`)) : N ? (s(this, u, parseInt(N)), s(this, f, "max"), s(this, E, `(min-aspect-ratio: ${t(this, u)})`)) : _ ? (s(this, u, parseInt(_)), s(this, f, "max"), s(this, E, `(max-width: ${t(this, u)}px)`)) : h ? (s(this, u, parseInt(h)), s(this, E, `(min-width: ${t(this, u)}px)`), s(this, f, "min")) : (s(this, u, 0), s(this, E, `(min-width: ${t(this, u)}px)`), s(this, f, "min")), s(this, w, t(this, w).replace(
|
|
31
|
+
`.${t(this, u)}${t(this, f)}`,
|
|
32
|
+
""
|
|
33
|
+
)), s(this, k, e[e.length - 1] === t(this, w) ? "" : "." + e[e.length - 1]), s(this, k, t(this, k).replace(
|
|
34
|
+
`.${t(this, u)}${t(this, f)}`,
|
|
35
|
+
""
|
|
36
|
+
));
|
|
37
|
+
}
|
|
38
|
+
get url() {
|
|
39
|
+
return t(this, O);
|
|
40
|
+
}
|
|
41
|
+
get name() {
|
|
42
|
+
return t(this, w);
|
|
43
|
+
}
|
|
44
|
+
get density() {
|
|
45
|
+
return t(this, C);
|
|
46
|
+
}
|
|
47
|
+
get query() {
|
|
48
|
+
return t(this, E);
|
|
49
|
+
}
|
|
50
|
+
get extension() {
|
|
51
|
+
return t(this, k);
|
|
52
|
+
}
|
|
53
|
+
get queryType() {
|
|
54
|
+
return t(this, f);
|
|
55
|
+
}
|
|
56
|
+
get queryValue() {
|
|
57
|
+
return t(this, u);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
O = new WeakMap(), w = new WeakMap(), C = new WeakMap(), E = new WeakMap(), u = new WeakMap(), f = new WeakMap(), k = new WeakMap();
|
|
61
|
+
var S;
|
|
62
|
+
class J {
|
|
63
|
+
constructor(r, e) {
|
|
64
|
+
i(this, S);
|
|
65
|
+
s(this, S, /* @__PURE__ */ new Map());
|
|
66
|
+
const o = (e == null ? void 0 : e.mediaBuckets) !== !1, d = typeof r == "string" ? o ? r.trim().split(",").map((h) => h.trim()).filter((h) => !!h) : [r] : r, l = [];
|
|
67
|
+
d.forEach((h) => {
|
|
68
|
+
const b = new st(h);
|
|
69
|
+
l.push([b.query, b]);
|
|
70
|
+
});
|
|
71
|
+
const x = l.filter((h) => h[1].queryType.includes("max")).sort((h, b) => b[1].queryValue - h[1].queryValue), B = l.filter((h) => h[1].queryType.includes("min") && h[1].queryValue !== 0).sort((h, b) => h[1].queryValue - b[1].queryValue), P = l.filter((h) => h[0] === "(min-width: 0px)");
|
|
72
|
+
(P ? [...P, ...x, ...B] : [...x, ...B]).forEach((h) => {
|
|
73
|
+
t(this, S).has(h[0]) || t(this, S).set(h[0], []), t(this, S).get(h[0]).push(h[1]);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
get mediaBuckets() {
|
|
77
|
+
return t(this, S);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
S = new WeakMap();
|
|
81
|
+
var M, A;
|
|
82
|
+
class it extends et {
|
|
83
|
+
constructor(e) {
|
|
84
|
+
super(void 0);
|
|
85
|
+
i(this, M);
|
|
86
|
+
i(this, A, () => {
|
|
87
|
+
let e;
|
|
88
|
+
t(this, M).mediaBuckets.forEach((l, x) => {
|
|
89
|
+
matchMedia(x).matches && (e = l);
|
|
90
|
+
});
|
|
91
|
+
let o, d = 0;
|
|
92
|
+
e == null || e.forEach((l) => {
|
|
93
|
+
l.density > d && l.density <= Math.max(devicePixelRatio, 1) && (d = l.density, o = l);
|
|
94
|
+
}), e != null && e.length && !o && (o = e[0]), this.current = o;
|
|
95
|
+
});
|
|
96
|
+
s(this, M, new J(e.srcset, e.sourceSetOptions));
|
|
97
|
+
}
|
|
98
|
+
updateSource(e) {
|
|
99
|
+
s(this, M, new J(e.srcset, e.sourceSetOptions)), t(this, A).call(this);
|
|
100
|
+
}
|
|
101
|
+
close() {
|
|
102
|
+
super.close(), this.disconnect();
|
|
103
|
+
}
|
|
104
|
+
connect() {
|
|
105
|
+
Z.subscribe(t(this, A), tt.SOURCE_MANAGER), t(this, A).call(this);
|
|
106
|
+
}
|
|
107
|
+
disconnect() {
|
|
108
|
+
Z.unsubscribe(t(this, A));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
M = new WeakMap(), A = new WeakMap();
|
|
112
|
+
let rt = 0;
|
|
113
|
+
var m, a, y, L, p, V, I, c, R, $, q, z, T, F, H, v, j;
|
|
114
|
+
class pt extends HTMLElement {
|
|
115
|
+
constructor(e) {
|
|
116
|
+
super();
|
|
117
|
+
i(this, T);
|
|
118
|
+
i(this, m, null);
|
|
119
|
+
i(this, a, null);
|
|
120
|
+
i(this, y, !1);
|
|
121
|
+
i(this, L, !1);
|
|
122
|
+
i(this, p, !1);
|
|
123
|
+
i(this, V, "");
|
|
124
|
+
i(this, I, "");
|
|
125
|
+
i(this, c, new Q(this, {
|
|
126
|
+
loading: !1,
|
|
127
|
+
loaded: !1,
|
|
128
|
+
error: !1,
|
|
129
|
+
clear: !1
|
|
130
|
+
}));
|
|
131
|
+
i(this, R, null);
|
|
132
|
+
i(this, $);
|
|
133
|
+
i(this, q, null);
|
|
134
|
+
i(this, z);
|
|
135
|
+
i(this, H, (e) => {
|
|
136
|
+
const o = e[0];
|
|
137
|
+
t(this, p) && (!t(this, L) || this.hasAttribute("reload-source")) && o.isIntersecting && this.triggerLazyLoad(), o.isIntersecting ? D(this, "sourceCapture", { custom: !0 }) : (this.hasAttribute("reload-source") && (U(this, T, F).call(this, void 0), s(this, L, !1)), D(this, "sourceRelease", { custom: !0 }));
|
|
138
|
+
});
|
|
139
|
+
i(this, v, () => {
|
|
140
|
+
t(this, c).set("loaded", !0), t(this, c).set("error", !1), t(this, c).set("loading", !1), !t(this, p) && !t(this, y) && K.complete(t(this, I)), D(this, "sourceLoaded", { custom: !0 });
|
|
141
|
+
const e = getComputedStyle(this).getPropertyValue("--clear-duration");
|
|
142
|
+
e ? s(this, $, setTimeout(() => {
|
|
143
|
+
t(this, c).set("clear", !0);
|
|
144
|
+
}, parseFloat(e) * 1e3)) : t(this, c).set("clear", !0), s(this, y, !0);
|
|
145
|
+
});
|
|
146
|
+
i(this, j, (e) => {
|
|
147
|
+
t(this, c).set("loaded", !1), t(this, c).set("error", !0), t(this, c).set("loading", !1), !t(this, p) && !t(this, y) && K.error(t(this, I)), D(this, "sourceError", { custom: !0 }), s(this, y, !0);
|
|
148
|
+
});
|
|
149
|
+
s(this, z, e == null ? void 0 : e.sourceSetOptions), X && window.IntersectionObserver && s(this, R, new IntersectionObserver(
|
|
150
|
+
t(this, H)
|
|
151
|
+
));
|
|
152
|
+
}
|
|
153
|
+
get consumerElement() {
|
|
154
|
+
return t(this, a);
|
|
155
|
+
}
|
|
156
|
+
get sourceManager() {
|
|
157
|
+
return t(this, m);
|
|
158
|
+
}
|
|
159
|
+
get status() {
|
|
160
|
+
return t(this, c);
|
|
161
|
+
}
|
|
162
|
+
get isLazy() {
|
|
163
|
+
return t(this, p);
|
|
164
|
+
}
|
|
165
|
+
get currentURL() {
|
|
166
|
+
return t(this, q);
|
|
167
|
+
}
|
|
168
|
+
get isFirstLoadHappened() {
|
|
169
|
+
return t(this, y);
|
|
170
|
+
}
|
|
171
|
+
triggerLazyLoad() {
|
|
172
|
+
!t(this, L) && t(this, m).current && t(this, m).current !== t(this, m).previous && (s(this, L, !0), U(this, T, F).call(this, t(this, m).current));
|
|
173
|
+
}
|
|
174
|
+
connectedCallback() {
|
|
175
|
+
s(this, V, `source-consumer-${++rt}`);
|
|
176
|
+
const e = this.getAttribute("srcset") || "", o = this.hasAttribute("notify") ? this.closest(this.getAttribute("notify")) : null;
|
|
177
|
+
o && t(this, c).addElement(o), s(this, a, this.createConsumer()), t(this, a).style.cssText = `
|
|
178
|
+
display: block;
|
|
179
|
+
width: 100%;
|
|
180
|
+
height: 100%;
|
|
181
|
+
`, t(this, a).classList.add("source-consumer"), Array.from(this.attributes).forEach((d) => {
|
|
182
|
+
if (d.name !== "srcset") {
|
|
183
|
+
const l = d.nodeValue || "", x = Y(d.name);
|
|
184
|
+
x in t(this, a) && (t(this, a)[x] = l || !0);
|
|
185
|
+
}
|
|
186
|
+
}), this.appendChild(t(this, a)), s(this, m, new it({
|
|
187
|
+
srcset: e,
|
|
188
|
+
sourceSetOptions: t(this, z)
|
|
189
|
+
})), s(this, p, this.hasAttribute("lazy")), t(this, m).subscribe((d) => {
|
|
190
|
+
(!t(this, p) || t(this, p) && t(this, L)) && U(this, T, F).call(this, d.current);
|
|
191
|
+
}), t(this, m).connect(), t(this, R).observe(this);
|
|
192
|
+
}
|
|
193
|
+
disconnectedCallback() {
|
|
194
|
+
var e;
|
|
195
|
+
clearTimeout(t(this, $)), t(this, R).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, L, !1), t(this, c).reset();
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
m = new WeakMap(), a = new WeakMap(), y = new WeakMap(), L = new WeakMap(), p = new WeakMap(), V = new WeakMap(), I = new WeakMap(), c = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), q = new WeakMap(), z = new WeakMap(), T = new WeakSet(), F = function(e) {
|
|
199
|
+
if (clearTimeout(t(this, $)), 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) {
|
|
200
|
+
s(this, I, `${t(this, V)}-${e.url}`);
|
|
201
|
+
const o = this.hasAttribute("keep-source-parameters");
|
|
202
|
+
t(this, c).set("loading", !0), s(this, q, o ? e.url : e.name + e.extension), this.consumeSource(t(this, q)), !t(this, p) && !t(this, y) && K.add(t(this, I)), t(this, a).onloadeddata = () => {
|
|
203
|
+
t(this, v).call(this);
|
|
204
|
+
}, t(this, a).onload = () => {
|
|
205
|
+
t(this, v).call(this);
|
|
206
|
+
}, t(this, a).onerror = () => {
|
|
207
|
+
t(this, j).call(this, t(this, q));
|
|
208
|
+
};
|
|
209
|
+
} else
|
|
210
|
+
s(this, q, null), this.consumeSource(null);
|
|
211
|
+
}, H = new WeakMap(), v = new WeakMap(), j = new WeakMap();
|
|
212
|
+
export {
|
|
213
|
+
st as S,
|
|
214
|
+
pt as a,
|
|
215
|
+
J as b,
|
|
216
|
+
it as c
|
|
217
|
+
};
|
|
@@ -4,7 +4,8 @@ var v = (r) => {
|
|
|
4
4
|
var w = (r, t, e) => t.has(r) || v("Cannot " + e);
|
|
5
5
|
var i = (r, t, e) => (w(r, t, "read from private field"), e ? e.call(r) : t.get(r)), u = (r, t, e) => t.has(r) ? v("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), h = (r, t, e, a) => (w(r, t, "write to private field"), a ? a.call(r, e) : t.set(r, e), e);
|
|
6
6
|
import { Notifier as C } from "./notifier/index.js";
|
|
7
|
-
import { i as _ } from "./index-
|
|
7
|
+
import { i as _ } from "./index-Bv9zgfdb.js";
|
|
8
|
+
import "construct-style-sheets-polyfill";
|
|
8
9
|
var f;
|
|
9
10
|
class z {
|
|
10
11
|
constructor() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var v=r=>{throw TypeError(r)};var w=(r,t,e)=>t.has(r)||v("Cannot "+e);var i=(r,t,e)=>(w(r,t,"read from private field"),e?e.call(r):t.get(r)),u=(r,t,e)=>t.has(r)?v("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),h=(r,t,e,a)=>(w(r,t,"write to private field"),a?a.call(r,e):t.set(r,e),e);const C=require("./notifier/index.cjs"),z=require("./index-DekP7OZe.cjs");require("construct-style-sheets-polyfill");var l;class E{constructor(){u(this,l);this.storage=null,this.name="store-registry",h(this,l,null),z.isBrowser&&(this.storage=localStorage)}get loadedState(){return i(this,l)}saveState(){const t=this.getState(),e=JSON.stringify(t);localStorage.setItem(this.name,e)}loadState(t=localStorage.getItem(this.name)){t&&(typeof t=="string"?h(this,l,JSON.parse(t)):h(this,l,t),f.current.forEach(e=>{e.name&&this.updateStore(e)}))}resetState(){f.current.forEach(t=>{t.name&&t.reset()}),this.saveState()}updateStore(t){var e,a;if(!Array.isArray((e=i(this,l))==null?void 0:e.stores))return t;if(t.name){const y=(a=i(this,l))==null?void 0:a.stores.find(N=>N.name===t.name);y&&(t.current=y.value)}return t}getState(){const t={stores:[]};return f.current.forEach(e=>{e.name&&(t.stores.find(a=>a.name===e.name)||t.stores.push({value:e.current,name:e.name}))}),t}}l=new WeakMap;const _=new E;var d,s,S,c,m,n,g,b;class q{constructor(t,e){u(this,d);u(this,s);u(this,S);u(this,c,new C.Notifier);u(this,m);u(this,n);u(this,g);u(this,b);h(this,d,e==null?void 0:e.name),this.__manager=e==null?void 0:e.__manager,h(this,s,{initial:t,previous:void 0,current:t}),h(this,S,(e==null?void 0:e.equalityCheck)||((a,y)=>a===y)),e!=null&&e.validate&&this.addMiddleware(e.validate),h(this,g,(e==null?void 0:e.notifyAndClose)||!1),h(this,b,(e==null?void 0:e.invisible)||!1),h(this,m,(e==null?void 0:e.skipSubscribeNotification)||!1),i(this,d)&&_.updateStore(this)}get name(){return i(this,d)}get initial(){return i(this,s).initial}get previous(){return i(this,s).previous}get current(){return i(this,s).current}set current(t){if(!i(this,S).call(this,i(this,s).current,t)){if(i(this,s).previous=i(this,s).current,i(this,n))for(const e of i(this,n))t=e(t);i(this,s).current=t,this.notify(),i(this,g)&&this.close()}}get subscribers(){return i(this,c).subscribers}notify(){i(this,c).notify(i(this,s))}addMiddleware(t){i(this,n)||h(this,n,new Set),i(this,n).add(t)}removeMiddleware(t){var e,a;(e=i(this,n))==null||e.delete(t),(a=i(this,n))!=null&&a.size||h(this,n,void 0)}subscribe(t,e){return!i(this,b)&&!i(this,c).size&&M(this),i(this,c).subscribe(t,e),i(this,m)||t(i(this,s)),()=>{this.unsubscribe(t)}}unsubscribe(t){i(this,c).unsubscribe(t),i(this,c).size||A(this)}reset(){this.current=Array.isArray(this.initial)?[...this.initial]:this.initial}close(){i(this,c).close(),i(this,s).previous=void 0,i(this,s).current=i(this,s).initial,A(this)}}d=new WeakMap,s=new WeakMap,S=new WeakMap,c=new WeakMap,m=new WeakMap,n=new WeakMap,g=new WeakMap,b=new WeakMap;const f=new q([],{invisible:!0});function M(r){f.current.includes(r)||(f.current=[...f.current,r])}function A(r){f.current.includes(r)&&(f.current=f.current.filter(t=>t!==r))}exports.Store=q;exports.activeStores=f;exports.storeRegistry=_;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var F=Object.defineProperty,b=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var d=i=>{throw TypeError(i)};var h=(i,r,e)=>r in i?F(i,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[r]=e,g=(i,r)=>{for(var e in r||(r={}))O.call(r,e)&&h(i,e,r[e]);if(m)for(var e of m(r))w.call(r,e)&&h(i,e,r[e]);return i},f=(i,r)=>b(i,y(r));var q=(i,r,e)=>r.has(i)||d("Cannot "+e);var s=(i,r,e)=>(q(i,r,"read from private field"),e?e.call(i):r.get(i)),c=(i,r,e)=>r.has(i)?d("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,e),l=(i,r,e,a)=>(q(i,r,"write to private field"),a?a.call(i,e):r.set(i,e),e);const u=require("./easings-GegIwET5.cjs"),S=require("./math-GDWEqu7y.cjs"),T=require("./number-DyefJ5a1.cjs"),x=require("./polyfills-Df4r-ETT.cjs");require("construct-style-sheets-polyfill");require("./index-DekP7OZe.cjs");const z=require("./Animation-BRqj4VfN.cjs");var n,t;class C extends z.Animation{constructor(e,a){super(e||0,a);c(this,n,u.linear);c(this,t,1e3);this.updateOptions(f(g({},a),{equalize:!0}))}updateOptions(e){super.updateOptions(e),l(this,n,typeof(e==null?void 0:e.easing)=="function"?e.easing:typeof(e==null?void 0:e.easing)=="string"&&u.easings[e.easing]||u.linear),l(this,t,(e==null?void 0:e.duration)===!1?0:x.nullishCoalescing(e==null?void 0:e.duration,s(this,t)))}handleAnimationFrame(e){const a=e.timeElapsedSinceSubscription/1e3/(s(this,t)/1e3)||0,A=s(this,n).call(this,S.clamp(a,0,1));this.current=T.preciseNumber(this.from+(this.target-this.from)*A,6),a>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,t=new WeakMap;exports.Tweened=C;
|
|
@@ -14,33 +14,34 @@ var c = (a, r, e) => r in a ? O(a, r, { enumerable: !0, configurable: !0, writab
|
|
|
14
14
|
return a;
|
|
15
15
|
}, g = (a, r) => b(a, x(r));
|
|
16
16
|
var A = (a, r, e) => r.has(a) || f("Cannot " + e);
|
|
17
|
-
var
|
|
17
|
+
var s = (a, r, e) => (A(a, r, "read from private field"), e ? e.call(a) : r.get(a)), n = (a, r, e) => r.has(a) ? f("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, e), u = (a, r, e, i) => (A(a, r, "write to private field"), i ? i.call(a, e) : r.set(a, e), e);
|
|
18
18
|
import { l as h, e as T } from "./easings-BEmRlrDd.js";
|
|
19
19
|
import { c as q } from "./math-BOBiC4TN.js";
|
|
20
20
|
import { p as w } from "./number-CbdpfO3u.js";
|
|
21
21
|
import { n as z } from "./polyfills-DJrTJQky.js";
|
|
22
|
-
import "
|
|
23
|
-
import
|
|
24
|
-
|
|
22
|
+
import "construct-style-sheets-polyfill";
|
|
23
|
+
import "./index-Bv9zgfdb.js";
|
|
24
|
+
import { A as C } from "./Animation-D29tc5VS.js";
|
|
25
|
+
var m, t;
|
|
25
26
|
class G extends C {
|
|
26
27
|
constructor(e, i) {
|
|
27
28
|
super(e || 0, i);
|
|
28
|
-
n(this,
|
|
29
|
+
n(this, m, h);
|
|
29
30
|
n(this, t, 1e3);
|
|
30
31
|
this.updateOptions(g(d({}, i), { equalize: !0 }));
|
|
31
32
|
}
|
|
32
33
|
updateOptions(e) {
|
|
33
|
-
super.updateOptions(e), u(this,
|
|
34
|
+
super.updateOptions(e), u(this, m, typeof (e == null ? void 0 : e.easing) == "function" ? e.easing : typeof (e == null ? void 0 : e.easing) == "string" ? T[e.easing] || h : h), u(this, t, (e == null ? void 0 : e.duration) === !1 ? 0 : z(e == null ? void 0 : e.duration, s(this, t)));
|
|
34
35
|
}
|
|
35
36
|
handleAnimationFrame(e) {
|
|
36
|
-
const i = e.timeElapsedSinceSubscription / 1e3 / (
|
|
37
|
+
const i = e.timeElapsedSinceSubscription / 1e3 / (s(this, t) / 1e3) || 0, F = s(this, m).call(this, q(i, 0, 1));
|
|
37
38
|
this.current = w(this.from + (this.target - this.from) * F, 6), i > 1 && this.unlistenAnimationFrame();
|
|
38
39
|
}
|
|
39
40
|
start() {
|
|
40
41
|
this.unlistenAnimationFrame(), this.listenAnimationFrame();
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
m = new WeakMap(), t = new WeakMap();
|
|
44
45
|
export {
|
|
45
46
|
G as T
|
|
46
47
|
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
var v = (t) => {
|
|
2
|
+
throw TypeError(t);
|
|
3
|
+
};
|
|
4
|
+
var E = (t, e, n) => e.has(t) || v("Cannot " + n);
|
|
5
|
+
var s = (t, e, n) => (E(t, e, "read from private field"), n ? n.call(t) : e.get(t)), o = (t, e, n) => e.has(t) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), i = (t, e, n, p) => (E(t, e, "write to private field"), p ? p.call(t, n) : e.set(t, n), n);
|
|
6
|
+
import { RESIZE_ORDER as P } from "./order/index.js";
|
|
7
|
+
import { windowResizer as W } from "./window-resizer/index.js";
|
|
8
|
+
import { i as A } from "./index-Bv9zgfdb.js";
|
|
9
|
+
import "construct-style-sheets-polyfill";
|
|
10
|
+
import { S as z } from "./Store-0BVty6AZ.js";
|
|
11
|
+
var a, m, r, d, l, c;
|
|
12
|
+
class O {
|
|
13
|
+
constructor() {
|
|
14
|
+
o(this, a);
|
|
15
|
+
o(this, m);
|
|
16
|
+
o(this, r);
|
|
17
|
+
o(this, d);
|
|
18
|
+
o(this, l);
|
|
19
|
+
o(this, c);
|
|
20
|
+
var e, n;
|
|
21
|
+
if (i(this, a, "unknown"), i(this, m, !1), i(this, r, !1), i(this, d, !1), i(this, l, !1), i(this, c, !1), this.resize = () => {
|
|
22
|
+
i(this, m, /Mobi|Android/i.test(navigator.userAgent)), i(this, r, "ontouchstart" in window || navigator.maxTouchPoints > 0), setTimeout(() => {
|
|
23
|
+
i(this, r, "ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
24
|
+
}, 0);
|
|
25
|
+
}, A) {
|
|
26
|
+
this.resize(), W.subscribe(this.resize, P.DEVICE);
|
|
27
|
+
{
|
|
28
|
+
const w = document.createElement("canvas"), b = w.getContext("webgl") || w.getContext("experimental-webgl");
|
|
29
|
+
i(this, d, b && b instanceof WebGLRenderingContext || !1);
|
|
30
|
+
}
|
|
31
|
+
{
|
|
32
|
+
const w = document.createElement("canvas");
|
|
33
|
+
w.getContext("2d") && i(this, l, w.toDataURL("image/webp").indexOf("data:image/webp") == 0);
|
|
34
|
+
}
|
|
35
|
+
const p = window.navigator.userAgent, f = ((n = (e = window.navigator) == null ? void 0 : e.userAgentData) == null ? void 0 : n.platform) || window.navigator.platform, C = [
|
|
36
|
+
"Macintosh",
|
|
37
|
+
"MacIntel",
|
|
38
|
+
"MacPPC",
|
|
39
|
+
"Mac68K",
|
|
40
|
+
"macOS"
|
|
41
|
+
], S = ["Win32", "Win64", "Windows", "WinCE"], k = ["iPhone", "iPad", "iPod"];
|
|
42
|
+
C.includes(f) ? (i(this, a, "macOS"), i(this, c, !0)) : k.includes(f) ? (i(this, a, "iOS"), i(this, c, !0)) : S.includes(f) ? i(this, a, "Windows") : /Android/.test(p) ? i(this, a, "Android") : /Linux/.test(f) ? i(this, a, "Linux") : i(this, a, "unknown");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
get OS() {
|
|
46
|
+
return s(this, a);
|
|
47
|
+
}
|
|
48
|
+
get isMobile() {
|
|
49
|
+
return s(this, m);
|
|
50
|
+
}
|
|
51
|
+
get isTouch() {
|
|
52
|
+
return s(this, r);
|
|
53
|
+
}
|
|
54
|
+
get isWebgl() {
|
|
55
|
+
return s(this, d);
|
|
56
|
+
}
|
|
57
|
+
get isWebp() {
|
|
58
|
+
return s(this, l);
|
|
59
|
+
}
|
|
60
|
+
get isApple() {
|
|
61
|
+
return s(this, c);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
a = new WeakMap(), m = new WeakMap(), r = new WeakMap(), d = new WeakMap(), l = new WeakMap(), c = new WeakMap();
|
|
65
|
+
const K = new O();
|
|
66
|
+
var D = /* @__PURE__ */ ((t) => (t.mobile = "600px", t.tablet = "1024px", t.notebook = "1280px", t.desktop = "1281px", t))(D || {}), T = /* @__PURE__ */ ((t) => (t["<=mobile"] = "(max-width: 600px)", t[">=mobile"] = "(min-width: 601px)", t["<=tablet"] = "(max-width: 1024px)", t[">=tablet"] = "(min-width: 1025px)", t["<=notebook"] = "(max-width: 1280px)", t[">=notebook"] = "(min-width: 1281px)", t["<=desktop"] = "(max-width: 1280px)", t[">=desktop"] = "(min-width: 1281px)", t))(T || {}), u, x, g, h;
|
|
67
|
+
class I {
|
|
68
|
+
constructor() {
|
|
69
|
+
o(this, u);
|
|
70
|
+
o(this, x);
|
|
71
|
+
o(this, g);
|
|
72
|
+
o(this, h);
|
|
73
|
+
i(this, u, 0), i(this, x, 0), i(this, g, 0), i(this, h, new z(void 0)), this.resize = () => {
|
|
74
|
+
i(this, u, document.documentElement.clientWidth), i(this, x, innerHeight), i(this, g, devicePixelRatio), matchMedia(
|
|
75
|
+
"(max-width: 600px)"
|
|
76
|
+
/* <=mobile */
|
|
77
|
+
).matches ? s(this, h).current = "mobile" : matchMedia(
|
|
78
|
+
"(max-width: 1024px)"
|
|
79
|
+
/* <=tablet */
|
|
80
|
+
).matches ? s(this, h).current = "tablet" : matchMedia(
|
|
81
|
+
"(max-width: 1280px)"
|
|
82
|
+
/* <=notebook */
|
|
83
|
+
).matches ? s(this, h).current = "notebook" : matchMedia(
|
|
84
|
+
"(min-width: 1281px)"
|
|
85
|
+
/* >=desktop */
|
|
86
|
+
).matches && (s(this, h).current = "desktop");
|
|
87
|
+
}, A && (this.resize(), W.subscribe(this.resize, P.DEVICE));
|
|
88
|
+
}
|
|
89
|
+
get width() {
|
|
90
|
+
return s(this, u);
|
|
91
|
+
}
|
|
92
|
+
get height() {
|
|
93
|
+
return s(this, x);
|
|
94
|
+
}
|
|
95
|
+
get type() {
|
|
96
|
+
return s(this, h);
|
|
97
|
+
}
|
|
98
|
+
get pixelRatio() {
|
|
99
|
+
return s(this, g);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
u = new WeakMap(), x = new WeakMap(), g = new WeakMap(), h = new WeakMap();
|
|
103
|
+
const U = new I();
|
|
104
|
+
export {
|
|
105
|
+
D as V,
|
|
106
|
+
T as a,
|
|
107
|
+
K as d,
|
|
108
|
+
U as v
|
|
109
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var v=t=>{throw TypeError(t)};var E=(t,i,n)=>i.has(t)||v("Cannot "+n);var s=(t,i,n)=>(E(t,i,"read from private field"),n?n.call(t):i.get(t)),o=(t,i,n)=>i.has(t)?v("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,n),e=(t,i,n,p)=>(E(t,i,"write to private field"),p?p.call(t,n):i.set(t,n),n);const P=require("./order/index.cjs"),W=require("./window-resizer/index.cjs"),z=require("./index-DekP7OZe.cjs");require("construct-style-sheets-polyfill");const R=require("./Store-Cd1GlEmZ.cjs");var r,d,a,m,l,c;class D{constructor(){o(this,r);o(this,d);o(this,a);o(this,m);o(this,l);o(this,c);var i,n;if(e(this,r,"unknown"),e(this,d,!1),e(this,a,!1),e(this,m,!1),e(this,l,!1),e(this,c,!1),this.resize=()=>{e(this,d,/Mobi|Android/i.test(navigator.userAgent)),e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},z.isBrowser){this.resize(),W.windowResizer.subscribe(this.resize,P.RESIZE_ORDER.DEVICE);{const g=document.createElement("canvas"),f=g.getContext("webgl")||g.getContext("experimental-webgl");e(this,m,f&&f instanceof WebGLRenderingContext||!1)}{const g=document.createElement("canvas");g.getContext("2d")&&e(this,l,g.toDataURL("image/webp").indexOf("data:image/webp")==0)}const p=window.navigator.userAgent,b=((n=(i=window.navigator)==null?void 0:i.userAgentData)==null?void 0:n.platform)||window.navigator.platform,k=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],C=["Win32","Win64","Windows","WinCE"],O=["iPhone","iPad","iPod"];k.includes(b)?(e(this,r,"macOS"),e(this,c,!0)):O.includes(b)?(e(this,r,"iOS"),e(this,c,!0)):C.includes(b)?e(this,r,"Windows"):/Android/.test(p)?e(this,r,"Android"):/Linux/.test(b)?e(this,r,"Linux"):e(this,r,"unknown")}}get OS(){return s(this,r)}get isMobile(){return s(this,d)}get isTouch(){return s(this,a)}get isWebgl(){return s(this,m)}get isWebp(){return s(this,l)}get isApple(){return s(this,c)}}r=new WeakMap,d=new WeakMap,a=new WeakMap,m=new WeakMap,l=new WeakMap,c=new WeakMap;const q=new D;var A=(t=>(t.mobile="600px",t.tablet="1024px",t.notebook="1280px",t.desktop="1281px",t))(A||{}),S=(t=>(t["<=mobile"]="(max-width: 600px)",t[">=mobile"]="(min-width: 601px)",t["<=tablet"]="(max-width: 1024px)",t[">=tablet"]="(min-width: 1025px)",t["<=notebook"]="(max-width: 1280px)",t[">=notebook"]="(min-width: 1281px)",t["<=desktop"]="(max-width: 1280px)",t[">=desktop"]="(min-width: 1281px)",t))(S||{}),u,w,x,h;class I{constructor(){o(this,u);o(this,w);o(this,x);o(this,h);e(this,u,0),e(this,w,0),e(this,x,0),e(this,h,new R.Store(void 0)),this.resize=()=>{e(this,u,document.documentElement.clientWidth),e(this,w,innerHeight),e(this,x,devicePixelRatio),matchMedia("(max-width: 600px)").matches?s(this,h).current="mobile":matchMedia("(max-width: 1024px)").matches?s(this,h).current="tablet":matchMedia("(max-width: 1280px)").matches?s(this,h).current="notebook":matchMedia("(min-width: 1281px)").matches&&(s(this,h).current="desktop")},z.isBrowser&&(this.resize(),W.windowResizer.subscribe(this.resize,P.RESIZE_ORDER.DEVICE))}get width(){return s(this,u)}get height(){return s(this,w)}get type(){return s(this,h)}get pixelRatio(){return s(this,x)}}u=new WeakMap,w=new WeakMap,x=new WeakMap,h=new WeakMap;const M=new I;exports.ViewportBreakpoints=A;exports.ViewportMediaRules=S;exports.device=q;exports.viewport=M;
|
package/lib/accordion/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var k=s=>{throw TypeError(s)};var p=(s,i,t)=>i.has(s)||k("Cannot "+t);var e=(s,i,t)=>(p(s,i,"read from private field"),t?t.call(s):i.get(s)),l=(s,i,t)=>i.has(s)?k("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),c=(s,i,t,r)=>(p(s,i,"write to private field"),r?r.call(s,t):i.set(s,t),t),m=(s,i,t)=>(p(s,i,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../attribute/index.cjs"),q=require("../index-
|
|
1
|
+
"use strict";var k=s=>{throw TypeError(s)};var p=(s,i,t)=>i.has(s)||k("Cannot "+t);var e=(s,i,t)=>(p(s,i,"read from private field"),t?t.call(s):i.get(s)),l=(s,i,t)=>i.has(s)?k("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),c=(s,i,t,r)=>(p(s,i,"write to private field"),r?r.call(s,t):i.set(s,t),t),m=(s,i,t)=>(p(s,i,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../attribute/index.cjs"),q=require("../index-DekP7OZe.cjs"),z=require("../events-KVanG9sR.cjs"),H=require("../style-At6aDoqG.cjs");require("construct-style-sheets-polyfill");var d,n,f,h,E,u,o,x,A,y,v,C;class S{constructor(i,t){l(this,o);l(this,d,null);l(this,n,null);l(this,f,null);l(this,h,null);l(this,E);l(this,u,!1);l(this,A,()=>{e(this,u)?this.close():this.open()});l(this,y,i=>{e(this,u)&&!(i instanceof CustomEvent)&&(m(this,o,v).call(this,0,!0),m(this,o,v).call(this,e(this,o,x)))});t.firstElementChild instanceof HTMLElement&&t.lastElementChild instanceof HTMLElement?(c(this,d,i),c(this,n,t),c(this,f,t.firstElementChild),c(this,h,t.lastElementChild),e(this,h).style.overflow="hidden",e(this,d).axisAttribute.current==="y"?e(this,h).style.height="0px":e(this,h).style.width="0px",addEventListener("resize",e(this,y)),e(this,f).addEventListener("click",e(this,A)),e(this,n).hasAttribute("data-opened")&&this.open({skipTransition:!0})):i.removeItem(e(this,n))}get element(){return e(this,n)}destroy(){e(this,f)&&(e(this,n).classList.remove("opened","triggered"),e(this,n).removeAttribute("data-opened"),e(this,f).style.cursor="",m(this,o,v).call(this,void 0),removeEventListener("resize",e(this,y)),e(this,f).removeEventListener("click",e(this,A)),clearTimeout(e(this,E)))}open(i){i!=null&&i.skipTransition&&m(this,o,C).call(this),e(this,d).multipleAttribute.current||e(this,d).closeAll({exclude:e(this,n)}),c(this,u,!0),clearTimeout(e(this,E)),e(this,n).classList.add("triggered"),m(this,o,v).call(this,e(this,o,x)),setTimeout(()=>{e(this,n).classList.add("opened"),e(this,n).setAttribute("data-opened",""),c(this,E,setTimeout(()=>{window.dispatchEvent(new CustomEvent("resize"))},H.getElementTransitionDurationMS(e(this,h))))},0),z.dispatchEvent(this.element,"accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,u),element:e(this,n)}})}close(i){i!=null&&i.skipTransition&&m(this,o,C).call(this),clearTimeout(e(this,E)),c(this,u,!1),e(this,n).classList.remove("opened"),m(this,o,v).call(this,0),c(this,E,setTimeout(()=>{e(this,n).classList.remove("triggered"),window.dispatchEvent(new CustomEvent("resize"))},H.getElementTransitionDurationMS(e(this,h)))),z.dispatchEvent(this.element,"accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,u),element:e(this,n)}})}}d=new WeakMap,n=new WeakMap,f=new WeakMap,h=new WeakMap,E=new WeakMap,u=new WeakMap,o=new WeakSet,x=function(){return e(this,d).axisAttribute.current==="x"?e(this,h).scrollWidth:e(this,h).scrollHeight},A=new WeakMap,y=new WeakMap,v=function(i,t=!1){t&&(e(this,h).style.transition="all 0s",setTimeout(()=>{e(this,h).style.transition=""}));const r=e(this,d).axisAttribute.current==="x"?"width":"height";i!=null?e(this,h).style[r]=`${i}px`:e(this,h).style[r]=""},C=function(){e(this,h).style.transition="all 0s",setTimeout(()=>{e(this,h).style.transition=""},50)};var b,T,a,g,L,M;class O extends HTMLElement{constructor(){super();l(this,L);l(this,b,new I.Attribute(this,"axis","y"));l(this,T,new I.Attribute(this,"multiple",!1));l(this,a,[]);l(this,g,null);q.isBrowser&&c(this,g,new MutationObserver(t=>{t.forEach(r=>{r.removedNodes.forEach(w=>{w instanceof HTMLElement&&this.removeItem(w)}),r.addedNodes.forEach(w=>{w instanceof HTMLElement&&this.createItem(w)})})}))}get axisAttribute(){return e(this,b)}get multipleAttribute(){return e(this,T)}createItem(t){e(this,a).find(r=>r.element===t)||e(this,a).push(new S(this,t))}removeItem(t){c(this,a,e(this,a).filter(r=>{if(r.element!==t)return!0;r.destroy()}))}closeAll(t){e(this,a).forEach(r=>{(t==null?void 0:t.exclude)!==r.element&&r.close(t)})}openAll(t){e(this,a).forEach(r=>{(t==null?void 0:t.exclude)!==r.element&&r.open(t)})}connectedCallback(){e(this,b).observe(),e(this,T).observe(),e(this,g).observe(e(this,L,M),{childList:!0}),c(this,a,[...e(this,L,M).children].map(t=>{if(t instanceof HTMLElement)return new S(this,t)}).filter(t=>!!t))}disconnectedCallback(){e(this,b).unobserve(),e(this,T).unobserve(),e(this,g).disconnect()}}b=new WeakMap,T=new WeakMap,a=new WeakMap,g=new WeakMap,L=new WeakSet,M=function(){return this.shadowRoot?this.shadowRoot:this};q.isBrowser&&!customElements.get("e-accordion")&&customElements.define("e-accordion",O);exports.AccordionElement=O;
|
package/lib/accordion/index.js
CHANGED
|
@@ -4,9 +4,10 @@ var I = (s) => {
|
|
|
4
4
|
var x = (s, i, t) => i.has(s) || I("Cannot " + t);
|
|
5
5
|
var e = (s, i, t) => (x(s, i, "read from private field"), t ? t.call(s) : i.get(s)), n = (s, i, t) => i.has(s) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), a = (s, i, t, r) => (x(s, i, "write to private field"), r ? r.call(s, t) : i.set(s, t), t), m = (s, i, t) => (x(s, i, "access private method"), t);
|
|
6
6
|
import { Attribute as M } from "../attribute/index.js";
|
|
7
|
-
import { i as R } from "../index-
|
|
7
|
+
import { i as R } from "../index-Bv9zgfdb.js";
|
|
8
8
|
import { d as z } from "../events-CsVF98U6.js";
|
|
9
9
|
import { g as H } from "../style-j2TwriJ_.js";
|
|
10
|
+
import "construct-style-sheets-polyfill";
|
|
10
11
|
var d, h, f, l, E, u, o, y, w, L, v, C;
|
|
11
12
|
class S {
|
|
12
13
|
constructor(i, t) {
|
package/lib/animation/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-BRqj4VfN.cjs"),n=require("../Damped-BD1OQ1fH.cjs"),i=require("../Tweened-B-AHx93m.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
|
package/lib/animation/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as r } from "../Animation-
|
|
2
|
-
import { D as m } from "../Damped-
|
|
3
|
-
import { T as t } from "../Tweened-
|
|
1
|
+
import { A as r } from "../Animation-D29tc5VS.js";
|
|
2
|
+
import { D as m } from "../Damped-YrqW5V4w.js";
|
|
3
|
+
import { T as t } from "../Tweened-_pF0zXXN.js";
|
|
4
4
|
export {
|
|
5
5
|
r as Animation,
|
|
6
6
|
m as Damped,
|
package/lib/attribute/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var q=t=>{throw TypeError(t)};var v=(t,s,e)=>s.has(t)||q("Cannot "+e);var r=(t,s,e)=>(v(t,s,"read from private field"),e?e.call(t):s.get(t)),h=(t,s,e)=>s.has(t)?q("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),n=(t,s,e,c)=>(v(t,s,"write to private field"),c?c.call(t,e):s.set(t,e),e),d=(t,s,e)=>(v(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../Store-Cd1GlEmZ.cjs"),S=require("../attributes-Bf2svn4j.cjs"),p=require("../index-DekP7OZe.cjs"),O=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");var i,u,o,b,a,g;class w extends A.Store{constructor(e,c,y,l){super(y,l);h(this,a);h(this,i,null);h(this,u);h(this,o,null);h(this,b,!1);n(this,u,c),p.isBrowser&&(n(this,i,O.getElement(e)),n(this,o,new MutationObserver(f=>{f.forEach(m=>{m.type==="attributes"&&m.attributeName===r(this,u)&&d(this,a,g).call(this)})})),l!=null&&l.sync&&this.subscribe(f=>{r(this,i).setAttribute(r(this,u),f.current.toString())}))}subscribe(e,c){return this.subscribers.length||this.observe(),super.subscribe(e,c)}unsubscribe(e){super.unsubscribe(e),this.subscribers.length||this.unobserve()}observe(){r(this,b)||(n(this,b,!0),r(this,o).observe(r(this,i),{attributes:!0}),d(this,a,g).call(this))}unobserve(){r(this,b)&&(n(this,b,!1),r(this,o).disconnect())}close(){super.close(),this.unobserve()}}i=new WeakMap,u=new WeakMap,o=new WeakMap,b=new WeakMap,a=new WeakSet,g=function(){const e=r(this,i).getAttribute(r(this,u));e!=null&&(this.current=S.parseAttributeValue(e))};exports.Attribute=w;
|
package/lib/attribute/index.js
CHANGED
|
@@ -3,12 +3,13 @@ var d = (e) => {
|
|
|
3
3
|
};
|
|
4
4
|
var m = (e, s, t) => s.has(e) || d("Cannot " + t);
|
|
5
5
|
var r = (e, s, t) => (m(e, s, "read from private field"), t ? t.call(e) : s.get(e)), c = (e, s, t) => s.has(e) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), a = (e, s, t, h) => (m(e, s, "write to private field"), h ? h.call(e, t) : s.set(e, t), t), v = (e, s, t) => (m(e, s, "access private method"), t);
|
|
6
|
-
import { S as y } from "../Store-
|
|
6
|
+
import { S as y } from "../Store-0BVty6AZ.js";
|
|
7
7
|
import { p as S } from "../attributes-69we3byR.js";
|
|
8
|
-
import { i as w } from "../index-
|
|
8
|
+
import { i as w } from "../index-Bv9zgfdb.js";
|
|
9
9
|
import { g as x } from "../dom-CVWzyXPH.js";
|
|
10
|
+
import "construct-style-sheets-polyfill";
|
|
10
11
|
var i, u, n, b, o, p;
|
|
11
|
-
class
|
|
12
|
+
class V extends y {
|
|
12
13
|
constructor(t, h, A, f) {
|
|
13
14
|
super(A, f);
|
|
14
15
|
c(this, o);
|
|
@@ -47,5 +48,5 @@ i = new WeakMap(), u = new WeakMap(), n = new WeakMap(), b = new WeakMap(), o =
|
|
|
47
48
|
t != null && (this.current = S(t));
|
|
48
49
|
};
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
+
V as Attribute
|
|
51
52
|
};
|
package/lib/billboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Q=i=>{throw TypeError(i)};var O=(i,r,e)=>r.has(i)||Q("Cannot "+e);var t=(i,r,e)=>(O(i,r,"read from private field"),e?e.call(i):r.get(i)),s=(i,r,e)=>r.has(i)?Q("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,e),d=(i,r,e,n)=>(O(i,r,"write to private field"),n?n.call(i,e):r.set(i,e),e),m=(i,r,e)=>(O(i,r,"access private method"),e);var J=(i,r,e)=>new Promise((n,l)=>{var a=y=>{try{G(e.next(y))}catch(N){l(N)}},x=y=>{try{G(e.throw(y))}catch(N){l(N)}},G=y=>y.done?n(y.value):Promise.resolve(y.value).then(a,x);G((e=e.apply(i,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../index-
|
|
1
|
+
"use strict";var Q=i=>{throw TypeError(i)};var O=(i,r,e)=>r.has(i)||Q("Cannot "+e);var t=(i,r,e)=>(O(i,r,"read from private field"),e?e.call(i):r.get(i)),s=(i,r,e)=>r.has(i)?Q("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,e),d=(i,r,e,n)=>(O(i,r,"write to private field"),n?n.call(i,e):r.set(i,e),e),m=(i,r,e)=>(O(i,r,"access private method"),e);var J=(i,r,e)=>new Promise((n,l)=>{var a=y=>{try{G(e.next(y))}catch(N){l(N)}},x=y=>{try{G(e.throw(y))}catch(N){l(N)}},G=y=>y.done?n(y.value):Promise.resolve(y.value).then(a,x);G((e=e.apply(i,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../index-DekP7OZe.cjs"),K=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");const M=require("../css-property/index.cjs"),W=require("../events-KVanG9sR.cjs"),X=require("../gestures-C7gbKx11.cjs"),Y=require("../math-GDWEqu7y.cjs"),Z=require("../number-DyefJ5a1.cjs");var P,k,f,E,L,S,o,h,u,$,A,_,B,j,F;class z extends HTMLElement{constructor(){super(...arguments);s(this,u);s(this,P,new M.CSSProperty(this,"--resize",!0));s(this,k,new M.CSSProperty(this,"--loop",!0));s(this,f,new M.CSSProperty(this,"--autoplay",!1));s(this,E,new M.CSSProperty(this,"--swipe","x"));s(this,L);s(this,S,!1);s(this,o,[]);s(this,h,0);s(this,A,e=>{d(this,S,e.isIntersecting),t(this,S)?m(this,u,$).call(this):clearInterval(t(this,L))});s(this,_,()=>{clearInterval(t(this,L)),t(this,S)&&d(this,L,setInterval(t(this,j),parseFloat(t(this,f).current||"0")*1e3))});s(this,j,()=>{m(this,u,B).call(this,t(this,h)+1)});s(this,F,e=>{if(!t(this,E).current)return;let n=0;X.setupDrag(l=>{const a=e.x-l.x,x=e.y-l.y;t(this,E).current==="x"?Math.abs(a)>Math.abs(x)&&Math.abs(a)>10&&(n=Math.sign(a)):t(this,E).current==="y"&&Math.abs(x)>Math.abs(a)&&Math.abs(x)>10&&(n=Math.sign(x))},()=>{n&&this.shift(n)})})}get counter(){return t(this,h)}get loop(){return t(this,k)}get autoplay(){return t(this,f)}get swipe(){return t(this,E)}get itemElements(){return t(this,o)}addItem(e){t(this,o).push(e),m(this,u,B).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(m(this,u,B).call(this,e),m(this,u,$).call(this))}shift(e){this.set(t(this,h)+e)}connectedCallback(){var e;d(this,o,[...this.querySelectorAll(`[data-billboard-item${this.id?`="${this.id}"`:""}]`)]),(e=t(this,o)[0])==null||e.classList.add("current"),t(this,f).subscribe(n=>{n.current?(I.intersector.subscribe(this,t(this,A)),m(this,u,$).call(this)):(d(this,S,!0),I.intersector.unsubscribe(t(this,A)),clearInterval(t(this,L)),m(this,u,B).call(this,0))}),t(this,f).observe(),t(this,E).observe(),t(this,k).observe(),t(this,P).observe(),m(this,u,B).call(this,0),this.addEventListener("pointerdown",t(this,F))}disconnectedCallback(){t(this,f).unobserve(),t(this,E).unobserve(),t(this,k).unobserve(),t(this,P).unobserve(),I.intersector.unsubscribe(t(this,A)),clearInterval(t(this,L))}}P=new WeakMap,k=new WeakMap,f=new WeakMap,E=new WeakMap,L=new WeakMap,S=new WeakMap,o=new WeakMap,h=new WeakMap,u=new WeakSet,$=function(){t(this,f).current!==!1&&t(this,_).call(this)},A=new WeakMap,_=new WeakMap,B=function(e=t(this,h)){const n=t(this,h);t(this,k).current?d(this,h,Z.loopNumber(e,t(this,o).length)):d(this,h,Y.clamp(e,0,t(this,o).length-1)),this.classList.remove("forward","backward"),t(this,h)-n>=0?this.classList.add("forward"):t(this,h)-n<0&&this.classList.add("backward"),t(this,o).forEach((l,a)=>{l.classList.remove("current","previous","next"),a===t(this,h)?l.classList.add("current"):a<t(this,h)?l.classList.add("previous"):a>t(this,h)&&l.classList.add("next")}),this.classList.toggle("has-length",t(this,o).length>1),this.classList.toggle("start",t(this,h)===0),this.classList.toggle("end",t(this,h)===t(this,o).length-1),this.style.setProperty("--counter",t(this,h).toString()),this.style.setProperty("--sections",t(this,o).length.toString()),t(this,h)!==n&&(W.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,h)}}),t(this,P).current&&setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0))},j=new WeakMap,F=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",z);var b,T,p,H,q;class R extends HTMLElement{constructor(){super(...arguments);s(this,b,null);s(this,T,null);s(this,p,[]);s(this,H,e=>{const n=e.currentTarget,l=t(this,p).findIndex(a=>a===n);l>=0&&t(this,b).set(l)});s(this,q,()=>{t(this,p).forEach((e,n)=>{n===t(this,b).counter?e.classList.add("current"):e.classList.remove("current")})})}connectedCallback(){return J(this,null,function*(){var e;if(d(this,b,K.findParentElement(this,z)),t(this,b)&&(yield customElements.whenDefined("e-billboard"),this.isConnected)){this.innerHTML="";const n=t(this,b).itemElements.length;d(this,T,document.createElement("div"));for(let l=0;l<n;l++){const a=document.createElement("button");a.setAttribute("aria-label",`Go to item ${l+1}`),t(this,p).push(a),t(this,T).appendChild(a)}this.appendChild(t(this,T)),t(this,p).forEach(l=>{l.addEventListener("click",t(this,H))}),(e=t(this,b))==null||e.addEventListener("billboardChange",t(this,q)),t(this,q).call(this)}})}disconnectedCallback(){var e;t(this,p).forEach(n=>{n.removeEventListener("click",t(this,H))}),(e=t(this,b))==null||e.removeEventListener("billboardChange",t(this,q)),this.innerHTML="",d(this,p,[])}}b=new WeakMap,T=new WeakMap,p=new WeakMap,H=new WeakMap,q=new WeakMap;I.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",R);var v,g,w;class U extends HTMLElement{constructor(){super();s(this,v,new M.CSSProperty(this,"--index",0));s(this,g,null);s(this,w,()=>{var e;t(this,v).current===((e=t(this,g))==null?void 0:e.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",e=>{t(this,g)&&(!this.handleClick||this.handleClick(e))&&t(this,g).set(t(this,v).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){var e;this.tabIndex=0,d(this,g,K.findParentElement(this,z)),(e=t(this,g))==null||e.addEventListener("billboardChange",t(this,w)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&t(this,w).call(this)}),t(this,v).subscribe(t(this,w)),t(this,v).observe()}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,v).unsubscribe(t(this,w)),t(this,v).unobserve(),(e=t(this,g))==null||e.removeEventListener("billboardChange",t(this,w))}}v=new WeakMap,g=new WeakMap,w=new WeakMap;I.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",U);var C,c,D;class V extends HTMLElement{constructor(){super();s(this,C,new M.CSSProperty(this,"--step",1));s(this,c,null);s(this,D,()=>{t(this,c)&&(!t(this,c).loop.current&&(t(this,c).counter===0&&t(this,C).current<=0||t(this,c).counter===t(this,c).itemElements.length-1&&t(this,C).current>=0)?this.setAttribute("disabled",""):this.removeAttribute("disabled"))});this.addEventListener("click",e=>{t(this,c)&&(!this.handleClick||this.handleClick(e))&&t(this,c).shift(t(this,C).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){return J(this,null,function*(){var e;yield customElements.whenDefined("e-billboard"),t(this,C).observe(),this.tabIndex=0,d(this,c,K.findParentElement(this,z)),(e=t(this,c))==null||e.addEventListener("billboardChange",t(this,D)),setTimeout(()=>{t(this,D).call(this)},0)})}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,C).unobserve(),(e=t(this,c))==null||e.removeEventListener("billboardChange",t(this,D))}}C=new WeakMap,c=new WeakMap,D=new WeakMap;I.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",V);exports.BillboardBulletsElement=R;exports.BillboardElement=z;exports.BillboardSetButtonElement=U;exports.BillboardStepButtonElement=V;
|
package/lib/billboard/index.js
CHANGED
|
@@ -19,8 +19,9 @@ var K = (i, r, e) => new Promise((n, l) => {
|
|
|
19
19
|
}, N = (C) => C.done ? n(C.value) : Promise.resolve(C.value).then(a, M);
|
|
20
20
|
N((e = e.apply(i, r)).next());
|
|
21
21
|
});
|
|
22
|
-
import { a as O, i as Q } from "../index-
|
|
22
|
+
import { a as O, i as Q } from "../index-Bv9zgfdb.js";
|
|
23
23
|
import { b as R } from "../dom-CVWzyXPH.js";
|
|
24
|
+
import "construct-style-sheets-polyfill";
|
|
24
25
|
import { CSSProperty as S } from "../css-property/index.js";
|
|
25
26
|
import { d as V } from "../events-CsVF98U6.js";
|
|
26
27
|
import { s as W } from "../gestures-CcXV6fCp.js";
|
package/lib/canvas/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var f=i=>{throw TypeError(i)};var R=(i,s,e)=>s.has(i)||f("Cannot "+e);var t=(i,s,e)=>(R(i,s,"read from private field"),e?e.call(i):s.get(i)),n=(i,s,e)=>s.has(i)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,e),c=(i,s,e,d)=>(R(i,s,"write to private field"),d?d.call(i,e):s.set(i,e),e),o=(i,s,e)=>(R(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../css-property/index.cjs"),
|
|
1
|
+
"use strict";var f=i=>{throw TypeError(i)};var R=(i,s,e)=>s.has(i)||f("Cannot "+e);var t=(i,s,e)=>(R(i,s,"read from private field"),e?e.call(i):s.get(i)),n=(i,s,e)=>s.has(i)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,e),c=(i,s,e,d)=>(R(i,s,"write to private field"),d?d.call(i,e):s.set(i,e),e),o=(i,s,e)=>(R(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../css-property/index.cjs"),y=require("../element-resizer/index.cjs"),w=require("../ticker/index.cjs"),C=require("../index-DekP7OZe.cjs"),B=require("../math-GDWEqu7y.cjs"),F=require("../stylesheet-HWF2a3nr.cjs");var a,r,m,l,u,p,b,x,h,E,P,g,v,S,q;class k extends HTMLElement{constructor(){super();n(this,h);n(this,a,new z.CSSProperty(this,"--fps",0));n(this,r,null);n(this,m,null);n(this,l,0);n(this,u,0);n(this,p,1);n(this,b,0);n(this,x,1);n(this,g,e=>{c(this,p,B.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,u,e.contentRect.height),t(this,r).width=t(this,l)*this.pixelRatio,t(this,r).height=t(this,u)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),o(this,h,q).call(this),o(this,h,S).call(this)});n(this,v,e=>{c(this,b,e.timestamp),c(this,x,e.timeBetweenFrames),o(this,h,S).call(this)});if(C.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[F.createStylesheet({" :host, canvas":{display:"block",width:"100%",height:"100%"}})],c(this,r,document.createElement("canvas")),c(this,m,t(this,r).getContext("2d")),e.appendChild(t(this,r)),t(this,a).subscribe(d=>{typeof d.previous!="undefined"&&d.current!==d.previous&&o(this,h,E).call(this)})}}get fpsCSSProperty(){return t(this,a)}get canvasElement(){return t(this,r)}get context(){return t(this,m)}get pixelRatio(){return t(this,p)}get width(){return t(this,l)}get height(){return t(this,u)}get detail(){return{width:t(this,l),height:t(this,u),element:this,canvasElement:t(this,r),pixelRatio:t(this,p),context:t(this,m),timestamp:t(this,b),timeBetweenFrames:t(this,x)}}connectedCallback(){t(this,a).observe(),y.elementResizer.subscribe(this,t(this,g)),o(this,h,E).call(this)}disconnectedCallback(){t(this,a).unobserve(),y.elementResizer.unsubscribe(t(this,g)),o(this,h,P).call(this)}}a=new WeakMap,r=new WeakMap,m=new WeakMap,l=new WeakMap,u=new WeakMap,p=new WeakMap,b=new WeakMap,x=new WeakMap,h=new WeakSet,E=function(){w.ticker.unsubscribe(t(this,v)),this.hasAttribute("static")||w.ticker.subscribe(t(this,v),{culling:this,maxFPS:t(this,a).current})},P=function(){w.ticker.unsubscribe(t(this,v))},g=new WeakMap,v=new WeakMap,S=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))},q=function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))};C.isBrowser&&!customElements.get("e-canvas")&&customElements.define("e-canvas",k);exports.CanvasElement=k;
|
package/lib/canvas/index.js
CHANGED
|
@@ -6,9 +6,9 @@ var t = (i, s, e) => (x(i, s, "read from private field"), e ? e.call(i) : s.get(
|
|
|
6
6
|
import { CSSProperty as z } from "../css-property/index.js";
|
|
7
7
|
import { elementResizer as C } from "../element-resizer/index.js";
|
|
8
8
|
import { ticker as w } from "../ticker/index.js";
|
|
9
|
-
import { i as y } from "../index-
|
|
10
|
-
import { c as B } from "../
|
|
11
|
-
import { c as F } from "../
|
|
9
|
+
import { i as y } from "../index-Bv9zgfdb.js";
|
|
10
|
+
import { c as B } from "../math-BOBiC4TN.js";
|
|
11
|
+
import { c as F } from "../stylesheet-DpnWNVyD.js";
|
|
12
12
|
var o, r, d, m, l, u, b, f, n, R, k, g, v, E, P;
|
|
13
13
|
class L extends HTMLElement {
|
|
14
14
|
constructor() {
|
|
@@ -23,7 +23,7 @@ class L extends HTMLElement {
|
|
|
23
23
|
h(this, b, 0);
|
|
24
24
|
h(this, f, 1);
|
|
25
25
|
h(this, g, (e) => {
|
|
26
|
-
a(this, u,
|
|
26
|
+
a(this, u, B(devicePixelRatio, 1, 2)), a(this, m, e.contentRect.width), a(this, l, e.contentRect.height), t(this, r).width = t(this, m) * this.pixelRatio, t(this, r).height = t(this, l) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), c(this, n, P).call(this), c(this, n, E).call(this);
|
|
27
27
|
});
|
|
28
28
|
h(this, v, (e) => {
|
|
29
29
|
a(this, b, e.timestamp), a(this, f, e.timeBetweenFrames), c(this, n, E).call(this);
|
|
@@ -31,7 +31,7 @@ class L extends HTMLElement {
|
|
|
31
31
|
if (y) {
|
|
32
32
|
const e = this.attachShadow({ mode: "open" });
|
|
33
33
|
e.adoptedStyleSheets = [
|
|
34
|
-
|
|
34
|
+
F({
|
|
35
35
|
" :host, canvas": {
|
|
36
36
|
display: "block",
|
|
37
37
|
width: "100%",
|
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../DragControls-D8BXtKVu.cjs");exports.AutoplayControls=o.AutoplayControls;exports.Controls=o.Controls;exports.DragControls=o.DragControls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;
|