aptechka 0.1.3 → 0.1.6
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/Animated-CJcYqJzq.js +130 -0
- package/lib/Animated-DyZuTEQE.cjs +1 -0
- package/lib/Damped-AHRBHNEQ.cjs +1 -0
- package/lib/Damped-Csj-9_gH.js +36 -0
- package/lib/Derived-Bc88XJ8J.js +27 -0
- package/lib/Derived-SjPdLJiZ.cjs +1 -0
- package/lib/ElementConstructor-9f-12v7T.cjs +1 -0
- package/lib/ElementConstructor-CoKM2CTK.js +228 -0
- package/lib/{SourceManager-vXInLlh_.js → SourceManager-BoP9RAJr.js} +26 -26
- package/lib/SourceManager-CI6NfLzW.cjs +1 -0
- package/lib/Store-D0_rDIsE.cjs +1 -0
- package/lib/Store-JOKrNVEr.js +152 -0
- package/lib/Viewport-COsaberc.cjs +1 -0
- package/lib/Viewport-CXY5xcGJ.js +129 -0
- package/lib/WheelControls-CX9WUbBC.js +83 -0
- package/lib/WheelControls-CfDeGCOU.cjs +1 -0
- package/lib/abstract-elements/AbstractButtonElement.d.ts +5 -0
- package/lib/abstract-elements/index.cjs +1 -0
- package/lib/abstract-elements/index.d.ts +1 -0
- package/lib/abstract-elements/index.js +27 -0
- package/lib/accordion/AccordionElement.d.ts +24 -1
- package/lib/accordion/index.cjs +1 -0
- package/lib/accordion/index.js +166 -0
- package/lib/animation/Animated.d.ts +9 -12
- package/lib/animation/Tweened.d.ts +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.d.ts +1 -1
- package/lib/animation/index.js +11 -17
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +8 -4
- package/lib/attribute/index.js +44 -35
- package/lib/canvas/index.cjs +1 -0
- package/lib/{canvas-2d → canvas}/index.d.ts +4 -3
- package/lib/canvas/index.js +97 -0
- package/lib/connector/index.cjs +1 -0
- package/lib/connector/index.d.ts +15 -0
- package/lib/connector/index.js +54 -0
- package/lib/controls/WheelControls.d.ts +3 -2
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +23 -27
- package/lib/createStylesheet-BON7aJYs.js +10 -0
- package/lib/createStylesheet-uicRVW05.cjs +1 -0
- package/lib/createTheme-BMH9cRrS.js +15 -0
- package/lib/createTheme-COo8IzPG.cjs +1 -0
- package/lib/custom-element/index.cjs +1 -1
- package/lib/custom-element/index.d.ts +3 -1
- package/lib/custom-element/index.js +19 -9
- package/lib/device/Viewport.d.ts +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -121
- package/lib/element-constructor/ElementConstructor.d.ts +15 -17
- package/lib/element-constructor/createStylesheet.d.ts +2 -0
- package/lib/element-constructor/createTheme.d.ts +12 -0
- package/lib/element-constructor/htmlTags.d.ts +115 -113
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.d.ts +2 -1
- package/lib/element-constructor/index.js +387 -1136
- package/lib/element-constructor/svgTags.d.ts +63 -63
- package/lib/element-resizer/index.cjs +1 -0
- package/lib/element-resizer/index.d.ts +9 -0
- package/lib/element-resizer/index.js +64 -0
- package/lib/en3/attachments/En3SourceManager.d.ts +2 -2
- package/lib/en3/index.cjs +7 -7
- package/lib/en3/index.js +252 -242
- package/lib/en3/objects/En3Clip.d.ts +2 -2
- package/lib/events-CoqmkUxo.js +11 -0
- package/lib/events-D68xg4dy.cjs +1 -0
- package/lib/file-EevnUtRj.cjs +1 -0
- package/lib/file-lxi_oXJf.js +13 -0
- package/lib/htmlTags-BCNUG7oK.js +683 -0
- package/lib/htmlTags-BSQys9wH.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +13 -20
- package/lib/index-DgtdcBEI.js +310 -0
- package/lib/index-i_Ki9M-w.cjs +9 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.d.ts +2 -1
- package/lib/intersector/index.js +33 -22
- package/lib/jsx/ComponentElement.d.ts +17 -0
- package/lib/jsx/h.d.ts +8 -0
- package/lib/jsx/hooks.d.ts +25 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +4 -0
- package/lib/jsx/index.js +116 -0
- package/lib/jsx/render.d.ts +2 -0
- package/lib/jsx/type.d.ts +186 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +3 -4
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +1 -0
- package/lib/layout-box/index.js +113 -99
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +1 -1
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +17 -20
- package/lib/modal/ModalElement.d.ts +12 -0
- package/lib/modal/index.cjs +1 -0
- package/lib/modal/index.d.ts +1 -0
- package/lib/modal/index.js +144 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +1 -1
- package/lib/number-Bo5RdrA1.js +23 -0
- package/lib/number-yVpzMdbQ.cjs +1 -0
- package/lib/popover/PopoverButtonElement.d.ts +14 -0
- package/lib/popover/PopoverElement.d.ts +19 -0
- package/lib/popover/index.cjs +1 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +122 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +2 -2
- package/lib/scroll/ScrollElement.d.ts +5 -3
- package/lib/scroll/index.cjs +1 -71
- package/lib/scroll/index.js +349 -314
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.d.ts +1 -1
- package/lib/scroll-entries/index.js +4 -2
- package/lib/select/SelectElement.d.ts +25 -0
- package/lib/select/SelectHeadElement.d.ts +12 -0
- package/lib/select/SelectOptionElement.d.ts +13 -0
- package/lib/select/SelectUserElement.d.ts +7 -0
- package/lib/select/index.cjs +1 -0
- package/lib/select/index.d.ts +4 -0
- package/lib/select/index.js +7 -0
- package/lib/source/SourceClass.d.ts +1 -1
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +13 -18
- package/lib/store/CumulativeResource.d.ts +2 -2
- package/lib/store/Resource.d.ts +1 -1
- package/lib/store/Store.d.ts +55 -9
- package/lib/store/StoreRegistry.d.ts +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -1
- package/lib/store/index.js +105 -66
- package/lib/string-BrDhnNUL.js +39 -0
- package/lib/string-DzUwFYSS.cjs +1 -0
- package/lib/studio/StudioElement.d.ts +3 -0
- package/lib/studio/index.cjs +10 -0
- package/lib/studio/index.js +1004 -0
- package/lib/studio/studioStorage.d.ts +14 -0
- package/lib/studio/tweaker/TweakerBooleanManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerColorManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerElement.d.ts +17 -0
- package/lib/studio/tweaker/TweakerFieldElement.d.ts +21 -0
- package/lib/studio/tweaker/TweakerFolderElement.d.ts +22 -0
- package/lib/studio/tweaker/TweakerLinkManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerNumberManagerElement.d.ts +17 -0
- package/lib/studio/tweaker/TweakerRangeManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerSelectManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerStoreManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerStringManagerElement.d.ts +12 -0
- package/lib/studio/tweaker/tweakerManagerConstructors.d.ts +5 -0
- package/lib/style-At6aDoqG.cjs +1 -0
- package/lib/style-j2TwriJ_.js +10 -0
- package/lib/theme/index.cjs +1 -0
- package/lib/theme/index.d.ts +90 -0
- package/lib/theme/index.js +34 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +1 -1
- package/lib/utils/events.d.ts +6 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +8 -7
- package/lib/utils/index.js +95 -105
- package/lib/utils/number.d.ts +2 -3
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/style.d.ts +2 -0
- package/lib/utils/ts-utility.d.ts +2 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +13 -20
- package/lib/window-resizer/index.cjs +1 -0
- package/lib/window-resizer/index.d.ts +9 -0
- package/lib/window-resizer/index.js +46 -0
- package/package.json +91 -28
- package/lib/Damped-DdPj4Sho.cjs +0 -1
- package/lib/Damped-H3PuZwKV.js +0 -152
- package/lib/SourceManager-tmQlXkSD.cjs +0 -1
- package/lib/Store-qq7IjRLE.js +0 -136
- package/lib/Store-txkR3wXU.cjs +0 -1
- package/lib/WheelControls-9ZQKSYYq.js +0 -83
- package/lib/WheelControls-TYhGU6oA.cjs +0 -1
- package/lib/canvas-2d/index.cjs +0 -5
- package/lib/canvas-2d/index.js +0 -90
- package/lib/element-constructor/specialObjects.d.ts +0 -2
- package/lib/measurer/CumulativeOffsetLeft.d.ts +0 -4
- package/lib/measurer/CumulativeOffsetTop.d.ts +0 -4
- package/lib/measurer/Meaurer.d.ts +0 -8
- package/lib/measurer/index.cjs +0 -1
- package/lib/measurer/index.d.ts +0 -3
- package/lib/measurer/index.js +0 -48
- package/lib/number-2bR0KBcX.cjs +0 -1
- package/lib/number-bCHB2GAD.js +0 -31
- package/lib/resizer/index.cjs +0 -1
- package/lib/resizer/index.d.ts +0 -10
- package/lib/resizer/index.js +0 -45
- package/lib/string-GmxZA5Nq.js +0 -31
- package/lib/string-WmNOGq16.cjs +0 -1
- package/lib/utils/dev.d.ts +0 -3
- /package/lib/{attributes-w0u-KiIb.js → attributes-69we3byR.js} +0 -0
- /package/lib/{attributes-_2U65GDl.cjs → attributes-Bf2svn4j.cjs} +0 -0
- /package/lib/{browser-S4eq8AeN.js → browser-0zX67oeU.js} +0 -0
- /package/lib/{browser-QbF6EW-w.cjs → browser-CpzFX2xg.cjs} +0 -0
- /package/lib/{dom-bHEwc_xV.js → dom-BY7JhTx5.js} +0 -0
- /package/lib/{dom-QhWsdQS2.cjs → dom-qY2LdCVL.cjs} +0 -0
- /package/lib/{easings-uF-tgahf.js → easings-BKi40vHz.js} +0 -0
- /package/lib/{easings-_wFs9ZWc.cjs → easings-DsS5-Kqc.cjs} +0 -0
- /package/lib/{function-zwSFehNd.js → function-C10DGppn.js} +0 -0
- /package/lib/{function-QP7IreXR.cjs → function-MthRj-GJ.cjs} +0 -0
- /package/lib/{layout-rZzbsLPd.cjs → layout-8ryRAMGJ.cjs} +0 -0
- /package/lib/{layout-5SJlcXTY.js → layout-HoBT_Da2.js} +0 -0
- /package/lib/{math-_a3IpKOc.js → math-BOBiC4TN.js} +0 -0
- /package/lib/{math-FNUBmQPK.cjs → math-GDWEqu7y.cjs} +0 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
var v = (s, t, e) => {
|
|
2
|
+
if (!t.has(s))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
|
+
};
|
|
5
|
+
var r = (s, t, e) => (v(s, t, "read from private field"), e ? e.call(s) : t.get(s)), a = (s, t, e) => {
|
|
6
|
+
if (t.has(s))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
9
|
+
}, i = (s, t, e, h) => (v(s, t, "write to private field"), h ? h.call(s, e) : t.set(s, e), e);
|
|
10
|
+
var k = (s, t, e) => (v(s, t, "access private method"), e);
|
|
11
|
+
import { i as z } from "./browser-0zX67oeU.js";
|
|
12
|
+
var l, o, S;
|
|
13
|
+
class A {
|
|
14
|
+
constructor() {
|
|
15
|
+
a(this, l, null);
|
|
16
|
+
a(this, o, "");
|
|
17
|
+
a(this, S, "");
|
|
18
|
+
z && (i(this, o, document.documentElement.getAttribute("data-project") || "unnamed"), i(this, S, r(this, o) ? r(this, o) + "-store-registry" : "store-registry"));
|
|
19
|
+
}
|
|
20
|
+
get projectName() {
|
|
21
|
+
return r(this, o);
|
|
22
|
+
}
|
|
23
|
+
get localStoreRegistryName() {
|
|
24
|
+
return r(this, S);
|
|
25
|
+
}
|
|
26
|
+
get loadedState() {
|
|
27
|
+
return r(this, l);
|
|
28
|
+
}
|
|
29
|
+
saveState() {
|
|
30
|
+
const t = this.getState(), e = JSON.stringify(t);
|
|
31
|
+
localStorage.setItem(r(this, S), e);
|
|
32
|
+
}
|
|
33
|
+
loadState(t = localStorage.getItem(
|
|
34
|
+
r(this, S)
|
|
35
|
+
)) {
|
|
36
|
+
t && (typeof t == "string" ? i(this, l, JSON.parse(t)) : i(this, l, t), f.current.forEach((e) => {
|
|
37
|
+
this.updateStore(e);
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
resetState() {
|
|
41
|
+
f.current.forEach((t) => {
|
|
42
|
+
t.reset();
|
|
43
|
+
}), this.saveState();
|
|
44
|
+
}
|
|
45
|
+
updateStore(t) {
|
|
46
|
+
var h, p;
|
|
47
|
+
if (!Array.isArray((h = r(this, l)) == null ? void 0 : h.stores))
|
|
48
|
+
return t;
|
|
49
|
+
const e = t.passport;
|
|
50
|
+
if (e) {
|
|
51
|
+
const N = (p = r(this, l)) == null ? void 0 : p.stores.find(
|
|
52
|
+
(j) => j.name === e.name
|
|
53
|
+
);
|
|
54
|
+
N && (t.current = N.value);
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
}
|
|
58
|
+
getState() {
|
|
59
|
+
const t = {
|
|
60
|
+
stores: []
|
|
61
|
+
};
|
|
62
|
+
return f.current.forEach((e) => {
|
|
63
|
+
e.passport && (t.stores.find((h) => h.name === e.passport.name) || t.stores.push({
|
|
64
|
+
value: e.current,
|
|
65
|
+
name: e.passport.name
|
|
66
|
+
}));
|
|
67
|
+
}), t;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
l = new WeakMap(), o = new WeakMap(), S = new WeakMap();
|
|
71
|
+
const M = new A();
|
|
72
|
+
var u, m, g, d, y, n, b, c, w, R;
|
|
73
|
+
class q {
|
|
74
|
+
constructor(t, e) {
|
|
75
|
+
a(this, w);
|
|
76
|
+
a(this, u, void 0);
|
|
77
|
+
a(this, m, void 0);
|
|
78
|
+
a(this, g, void 0);
|
|
79
|
+
a(this, d, void 0);
|
|
80
|
+
a(this, y, void 0);
|
|
81
|
+
a(this, n, /* @__PURE__ */ new Set());
|
|
82
|
+
a(this, b, void 0);
|
|
83
|
+
a(this, c, void 0);
|
|
84
|
+
i(this, u, e == null ? void 0 : e.passport), i(this, m, t), i(this, g, void 0), i(this, d, t), i(this, y, (e == null ? void 0 : e.equalityCheck) || ((h, p) => h === p)), e != null && e.validate && this.addMiddleware(e.validate), i(this, b, (e == null ? void 0 : e.skipSubscribeNotification) || !1), r(this, u) && M.updateStore(this);
|
|
85
|
+
}
|
|
86
|
+
get passport() {
|
|
87
|
+
return r(this, u);
|
|
88
|
+
}
|
|
89
|
+
get initial() {
|
|
90
|
+
return r(this, m);
|
|
91
|
+
}
|
|
92
|
+
get previous() {
|
|
93
|
+
return r(this, g);
|
|
94
|
+
}
|
|
95
|
+
get current() {
|
|
96
|
+
return r(this, d);
|
|
97
|
+
}
|
|
98
|
+
set current(t) {
|
|
99
|
+
if (!r(this, y).call(this, r(this, d), t)) {
|
|
100
|
+
if (i(this, g, r(this, d)), r(this, c))
|
|
101
|
+
for (const e of r(this, c))
|
|
102
|
+
t = e(t);
|
|
103
|
+
i(this, d, t), k(this, w, R).call(this);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
get subscribers() {
|
|
107
|
+
return r(this, n);
|
|
108
|
+
}
|
|
109
|
+
get entry() {
|
|
110
|
+
return {
|
|
111
|
+
current: r(this, d),
|
|
112
|
+
previous: r(this, g)
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
addMiddleware(t) {
|
|
116
|
+
r(this, c) || i(this, c, /* @__PURE__ */ new Set()), r(this, c).add(t);
|
|
117
|
+
}
|
|
118
|
+
removeMiddleware(t) {
|
|
119
|
+
var e, h;
|
|
120
|
+
(e = r(this, c)) == null || e.delete(t), (h = r(this, c)) != null && h.size || i(this, c, void 0);
|
|
121
|
+
}
|
|
122
|
+
subscribe(t) {
|
|
123
|
+
return r(this, u) && !r(this, n).size && C(this), r(this, n).add(t), r(this, b) || t(this.entry), () => {
|
|
124
|
+
this.unsubscribe(t);
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
unsubscribe(t) {
|
|
128
|
+
r(this, n).delete(t), r(this, u) && !r(this, n).size && E(this);
|
|
129
|
+
}
|
|
130
|
+
reset() {
|
|
131
|
+
this.current = this.initial;
|
|
132
|
+
}
|
|
133
|
+
close() {
|
|
134
|
+
r(this, n).clear(), r(this, u) && E(this);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
u = new WeakMap(), m = new WeakMap(), g = new WeakMap(), d = new WeakMap(), y = new WeakMap(), n = new WeakMap(), b = new WeakMap(), c = new WeakMap(), w = new WeakSet(), R = function() {
|
|
138
|
+
for (const t of r(this, n))
|
|
139
|
+
t(this.entry);
|
|
140
|
+
};
|
|
141
|
+
const f = new q([]);
|
|
142
|
+
function C(s) {
|
|
143
|
+
f.current.includes(s) || (f.current = [...f.current, s]);
|
|
144
|
+
}
|
|
145
|
+
function E(s) {
|
|
146
|
+
f.current.includes(s) && (f.current = f.current.filter((t) => t !== s));
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
q as S,
|
|
150
|
+
f as a,
|
|
151
|
+
M as s
|
|
152
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var W=(t,n,o)=>{if(!n.has(t))throw TypeError("Cannot "+o)};var i=(t,n,o)=>(W(t,n,"read from private field"),o?o.call(t):n.get(t)),s=(t,n,o)=>{if(n.has(t))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(t):n.set(t,o)},e=(t,n,o,v)=>(W(t,n,"write to private field"),v?v.call(t,o):n.set(t,o),o);const k=require("./order/index.cjs"),A=require("./window-resizer/index.cjs"),D=require("./browser-CpzFX2xg.cjs"),_=require("detect-gpu"),q=require("./Store-D0_rDIsE.cjs");var r,l,m,c,g,u,w,x,d;class I{constructor(){s(this,r,"unknown");s(this,l,"unknown");s(this,m,0);s(this,c,null);s(this,g,!1);s(this,u,!1);s(this,w,!1);s(this,x,!1);s(this,d,!1);var n,o;if(D.isBrowser){e(this,c,_.getGPUTier()),i(this,c).then(a=>{e(this,l,a.gpu||"unknown"),e(this,m,a.tier)}),A.windowResizer.subscribe(()=>{e(this,g,/Mobi|Android/i.test(navigator.userAgent)),e(this,u,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{e(this,u,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},k.RESIZE_ORDER.DEVICE);{const a=document.createElement("canvas"),P=a.getContext("webgl")||a.getContext("experimental-webgl");e(this,w,P&&P instanceof WebGLRenderingContext||!1)}{const a=document.createElement("canvas");a.getContext("2d")&&e(this,x,a.toDataURL("image/webp").indexOf("data:image/webp")==0)}const v=window.navigator.userAgent,E=((o=(n=window.navigator)==null?void 0:n.userAgentData)==null?void 0:o.platform)||window.navigator.platform,O=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],R=["Win32","Win64","Windows","WinCE"],T=["iPhone","iPad","iPod"];O.includes(E)?(e(this,r,"macOS"),e(this,d,!0)):T.includes(E)?(e(this,r,"iOS"),e(this,d,!0)):R.includes(E)?e(this,r,"Windows"):/Android/.test(v)?e(this,r,"Android"):/Linux/.test(E)?e(this,r,"Linux"):e(this,r,"unknown")}}get OS(){return i(this,r)}get gpu(){return i(this,l)}get gpuTier(){return i(this,m)}get gpuDetection(){return i(this,c)}get isMobile(){return i(this,g)}get isTouch(){return i(this,u)}get isWebgl(){return i(this,w)}get isWebp(){return i(this,x)}get isApple(){return i(this,d)}}r=new WeakMap,l=new WeakMap,m=new WeakMap,c=new WeakMap,g=new WeakMap,u=new WeakMap,w=new WeakMap,x=new WeakMap,d=new WeakMap;const M=new I;var S=(t=>(t.mobile="600px",t.tablet="1024px",t.notebook="1280px",t.desktop="1281px",t))(S||{}),C=(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))(C||{}),p,b,f,h;class L{constructor(){s(this,p,0);s(this,b,0);s(this,f,0);s(this,h,new q.Store(void 0));D.isBrowser&&A.windowResizer.subscribe(()=>{e(this,p,document.documentElement.clientWidth),e(this,b,innerHeight),e(this,f,devicePixelRatio),matchMedia("(max-width: 600px)").matches?i(this,h).current="mobile":matchMedia("(max-width: 1024px)").matches?i(this,h).current="tablet":matchMedia("(max-width: 1280px)").matches?i(this,h).current="notebook":matchMedia("(min-width: 1281px)").matches&&(i(this,h).current="desktop")},k.RESIZE_ORDER.DEVICE)}get width(){return i(this,p)}get height(){return i(this,b)}get store_type(){return i(this,h)}get pixelRatio(){return i(this,f)}}p=new WeakMap,b=new WeakMap,f=new WeakMap,h=new WeakMap;const z=new L;exports.ViewportBreakpoints=S;exports.ViewportMediaRules=C;exports.device=M;exports.viewport=z;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
var W = (t, n, o) => {
|
|
2
|
+
if (!n.has(t))
|
|
3
|
+
throw TypeError("Cannot " + o);
|
|
4
|
+
};
|
|
5
|
+
var i = (t, n, o) => (W(t, n, "read from private field"), o ? o.call(t) : n.get(t)), s = (t, n, o) => {
|
|
6
|
+
if (n.has(t))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
n instanceof WeakSet ? n.add(t) : n.set(t, o);
|
|
9
|
+
}, e = (t, n, o, v) => (W(t, n, "write to private field"), v ? v.call(t, o) : n.set(t, o), o);
|
|
10
|
+
import { RESIZE_ORDER as k } from "./order/index.js";
|
|
11
|
+
import { windowResizer as A } from "./window-resizer/index.js";
|
|
12
|
+
import { i as C } from "./browser-0zX67oeU.js";
|
|
13
|
+
import { getGPUTier as O } from "detect-gpu";
|
|
14
|
+
import { S as I } from "./Store-JOKrNVEr.js";
|
|
15
|
+
var r, d, l, c, g, m, p, x, u;
|
|
16
|
+
class L {
|
|
17
|
+
constructor() {
|
|
18
|
+
s(this, r, "unknown");
|
|
19
|
+
s(this, d, "unknown");
|
|
20
|
+
s(this, l, 0);
|
|
21
|
+
s(this, c, null);
|
|
22
|
+
s(this, g, !1);
|
|
23
|
+
s(this, m, !1);
|
|
24
|
+
s(this, p, !1);
|
|
25
|
+
s(this, x, !1);
|
|
26
|
+
s(this, u, !1);
|
|
27
|
+
var n, o;
|
|
28
|
+
if (C) {
|
|
29
|
+
e(this, c, O()), i(this, c).then((a) => {
|
|
30
|
+
e(this, d, a.gpu || "unknown"), e(this, l, a.tier);
|
|
31
|
+
}), A.subscribe(() => {
|
|
32
|
+
e(this, g, /Mobi|Android/i.test(navigator.userAgent)), e(this, m, "ontouchstart" in window || navigator.maxTouchPoints > 0), setTimeout(() => {
|
|
33
|
+
e(this, m, "ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
34
|
+
}, 0);
|
|
35
|
+
}, k.DEVICE);
|
|
36
|
+
{
|
|
37
|
+
const a = document.createElement("canvas"), E = a.getContext("webgl") || a.getContext("experimental-webgl");
|
|
38
|
+
e(this, p, E && E instanceof WebGLRenderingContext || !1);
|
|
39
|
+
}
|
|
40
|
+
{
|
|
41
|
+
const a = document.createElement("canvas");
|
|
42
|
+
a.getContext("2d") && e(this, x, a.toDataURL("image/webp").indexOf("data:image/webp") == 0);
|
|
43
|
+
}
|
|
44
|
+
const v = window.navigator.userAgent, P = ((o = (n = window.navigator) == null ? void 0 : n.userAgentData) == null ? void 0 : o.platform) || window.navigator.platform, D = [
|
|
45
|
+
"Macintosh",
|
|
46
|
+
"MacIntel",
|
|
47
|
+
"MacPPC",
|
|
48
|
+
"Mac68K",
|
|
49
|
+
"macOS"
|
|
50
|
+
], S = ["Win32", "Win64", "Windows", "WinCE"], T = ["iPhone", "iPad", "iPod"];
|
|
51
|
+
D.includes(P) ? (e(this, r, "macOS"), e(this, u, !0)) : T.includes(P) ? (e(this, r, "iOS"), e(this, u, !0)) : S.includes(P) ? e(this, r, "Windows") : /Android/.test(v) ? e(this, r, "Android") : /Linux/.test(P) ? e(this, r, "Linux") : e(this, r, "unknown");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
get OS() {
|
|
55
|
+
return i(this, r);
|
|
56
|
+
}
|
|
57
|
+
get gpu() {
|
|
58
|
+
return i(this, d);
|
|
59
|
+
}
|
|
60
|
+
get gpuTier() {
|
|
61
|
+
return i(this, l);
|
|
62
|
+
}
|
|
63
|
+
get gpuDetection() {
|
|
64
|
+
return i(this, c);
|
|
65
|
+
}
|
|
66
|
+
get isMobile() {
|
|
67
|
+
return i(this, g);
|
|
68
|
+
}
|
|
69
|
+
get isTouch() {
|
|
70
|
+
return i(this, m);
|
|
71
|
+
}
|
|
72
|
+
get isWebgl() {
|
|
73
|
+
return i(this, p);
|
|
74
|
+
}
|
|
75
|
+
get isWebp() {
|
|
76
|
+
return i(this, x);
|
|
77
|
+
}
|
|
78
|
+
get isApple() {
|
|
79
|
+
return i(this, u);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
r = new WeakMap(), d = new WeakMap(), l = new WeakMap(), c = new WeakMap(), g = new WeakMap(), m = new WeakMap(), p = new WeakMap(), x = new WeakMap(), u = new WeakMap();
|
|
83
|
+
const Z = new L();
|
|
84
|
+
var M = /* @__PURE__ */ ((t) => (t.mobile = "600px", t.tablet = "1024px", t.notebook = "1280px", t.desktop = "1281px", t))(M || {}), _ = /* @__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))(_ || {}), w, f, b, h;
|
|
85
|
+
class y {
|
|
86
|
+
constructor() {
|
|
87
|
+
s(this, w, 0);
|
|
88
|
+
s(this, f, 0);
|
|
89
|
+
s(this, b, 0);
|
|
90
|
+
s(this, h, new I(
|
|
91
|
+
void 0
|
|
92
|
+
));
|
|
93
|
+
C && A.subscribe(() => {
|
|
94
|
+
e(this, w, document.documentElement.clientWidth), e(this, f, innerHeight), e(this, b, devicePixelRatio), matchMedia(
|
|
95
|
+
"(max-width: 600px)"
|
|
96
|
+
/* <=mobile */
|
|
97
|
+
).matches ? i(this, h).current = "mobile" : matchMedia(
|
|
98
|
+
"(max-width: 1024px)"
|
|
99
|
+
/* <=tablet */
|
|
100
|
+
).matches ? i(this, h).current = "tablet" : matchMedia(
|
|
101
|
+
"(max-width: 1280px)"
|
|
102
|
+
/* <=notebook */
|
|
103
|
+
).matches ? i(this, h).current = "notebook" : matchMedia(
|
|
104
|
+
"(min-width: 1281px)"
|
|
105
|
+
/* >=desktop */
|
|
106
|
+
).matches && (i(this, h).current = "desktop");
|
|
107
|
+
}, k.DEVICE);
|
|
108
|
+
}
|
|
109
|
+
get width() {
|
|
110
|
+
return i(this, w);
|
|
111
|
+
}
|
|
112
|
+
get height() {
|
|
113
|
+
return i(this, f);
|
|
114
|
+
}
|
|
115
|
+
get store_type() {
|
|
116
|
+
return i(this, h);
|
|
117
|
+
}
|
|
118
|
+
get pixelRatio() {
|
|
119
|
+
return i(this, b);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
w = new WeakMap(), f = new WeakMap(), b = new WeakMap(), h = new WeakMap();
|
|
123
|
+
const j = new y();
|
|
124
|
+
export {
|
|
125
|
+
M as V,
|
|
126
|
+
_ as a,
|
|
127
|
+
Z as d,
|
|
128
|
+
j as v
|
|
129
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var b = (t, i, e) => i in t ? v(t, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[i] = e;
|
|
3
|
+
var g = (t, i, e) => (b(t, typeof i != "symbol" ? i + "" : i, e), e), y = (t, i, e) => {
|
|
4
|
+
if (!i.has(t))
|
|
5
|
+
throw TypeError("Cannot " + e);
|
|
6
|
+
};
|
|
7
|
+
var s = (t, i, e) => (y(t, i, "read from private field"), e ? e.call(t) : i.get(t)), h = (t, i, e) => {
|
|
8
|
+
if (i.has(t))
|
|
9
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
10
|
+
i instanceof WeakSet ? i.add(t) : i.set(t, e);
|
|
11
|
+
}, n = (t, i, e, a) => (y(t, i, "write to private field"), a ? a.call(t, e) : i.set(t, e), e);
|
|
12
|
+
import { i as r } from "./browser-0zX67oeU.js";
|
|
13
|
+
import { g as u } from "./dom-BY7JhTx5.js";
|
|
14
|
+
import { Notifier as M } from "./notifier/index.js";
|
|
15
|
+
var m;
|
|
16
|
+
class x {
|
|
17
|
+
constructor() {
|
|
18
|
+
h(this, m, new M());
|
|
19
|
+
}
|
|
20
|
+
get changeEvent() {
|
|
21
|
+
return s(this, m);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
m = new WeakMap();
|
|
25
|
+
var d, o;
|
|
26
|
+
class A extends x {
|
|
27
|
+
constructor(e) {
|
|
28
|
+
super();
|
|
29
|
+
h(this, d, null);
|
|
30
|
+
h(this, o, (e) => {
|
|
31
|
+
const a = e.shiftKey ? -1 : 1;
|
|
32
|
+
e.code === "Space" ? this.changeEvent.notify(a * 500) : e.code === "ArrowLeft" ? this.changeEvent.notify(-1 * 100) : e.code === "ArrowRight" ? this.changeEvent.notify(1 * 100) : e.code === "ArrowUp" ? this.changeEvent.notify(-1 * 100) : e.code === "ArrowDown" ? this.changeEvent.notify(1 * 100) : e.code === "PageUp" ? this.changeEvent.notify(-1 * 1e3) : e.code === "PageDown" ? this.changeEvent.notify(1 * 1e3) : e.code === "Home" ? this.changeEvent.notify("min") : e.code === "End" && this.changeEvent.notify("max");
|
|
33
|
+
});
|
|
34
|
+
r && n(this, d, e != null && e.element && u(e.element) || window);
|
|
35
|
+
}
|
|
36
|
+
connect() {
|
|
37
|
+
r && s(this, d).addEventListener("keydown", s(this, o));
|
|
38
|
+
}
|
|
39
|
+
disconnect() {
|
|
40
|
+
r && s(this, d).removeEventListener("keydown", s(this, o));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
d = new WeakMap(), o = new WeakMap();
|
|
44
|
+
var l, c, f, w;
|
|
45
|
+
class C extends x {
|
|
46
|
+
constructor(e) {
|
|
47
|
+
super();
|
|
48
|
+
g(this, "axis");
|
|
49
|
+
g(this, "speed");
|
|
50
|
+
g(this, "debounce");
|
|
51
|
+
h(this, l, null);
|
|
52
|
+
h(this, c, void 0);
|
|
53
|
+
h(this, f, void 0);
|
|
54
|
+
h(this, w, (e) => {
|
|
55
|
+
let a = 0;
|
|
56
|
+
if (!(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY)))
|
|
57
|
+
if (a = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), e.preventDefault(), this.debounce) {
|
|
58
|
+
const E = Date.now();
|
|
59
|
+
if (E - s(this, f) > 40 && (a = 100 * Math.sign(a)), n(this, f, E), Math.abs(a) < 100 || s(this, c))
|
|
60
|
+
return;
|
|
61
|
+
this.changeEvent.notify(a), n(this, c, setTimeout(() => {
|
|
62
|
+
n(this, c, void 0);
|
|
63
|
+
}, 80));
|
|
64
|
+
} else
|
|
65
|
+
this.changeEvent.notify(a);
|
|
66
|
+
});
|
|
67
|
+
this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, n(this, f, Date.now()), r && n(this, l, e != null && e.element && u(e.element) || window);
|
|
68
|
+
}
|
|
69
|
+
connect() {
|
|
70
|
+
r && s(this, l).addEventListener("wheel", s(this, w), {
|
|
71
|
+
passive: !1
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
disconnect() {
|
|
75
|
+
r && s(this, l).removeEventListener("wheel", s(this, w));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
l = new WeakMap(), c = new WeakMap(), f = new WeakMap(), w = new WeakMap();
|
|
79
|
+
export {
|
|
80
|
+
x as C,
|
|
81
|
+
A as K,
|
|
82
|
+
C as W
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var x=Object.defineProperty;var v=(t,s,e)=>s in t?x(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var g=(t,s,e)=>(v(t,typeof s!="symbol"?s+"":s,e),e),m=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var i=(t,s,e)=>(m(t,s,"read from private field"),e?e.call(t):s.get(t)),a=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},h=(t,s,e,n)=>(m(t,s,"write to private field"),n?n.call(t,e):s.set(t,e),e);const r=require("./browser-CpzFX2xg.cjs"),b=require("./dom-qY2LdCVL.cjs"),M=require("./notifier/index.cjs");var u;class E{constructor(){a(this,u,new M.Notifier)}get changeEvent(){return i(this,u)}}u=new WeakMap;var d,o;class L extends E{constructor(e){super();a(this,d,null);a(this,o,e=>{const n=e.shiftKey?-1:1;e.code==="Space"?this.changeEvent.notify(n*500):e.code==="ArrowLeft"?this.changeEvent.notify(-1*100):e.code==="ArrowRight"?this.changeEvent.notify(1*100):e.code==="ArrowUp"?this.changeEvent.notify(-1*100):e.code==="ArrowDown"?this.changeEvent.notify(1*100):e.code==="PageUp"?this.changeEvent.notify(-1*1e3):e.code==="PageDown"?this.changeEvent.notify(1*1e3):e.code==="Home"?this.changeEvent.notify("min"):e.code==="End"&&this.changeEvent.notify("max")});r.isBrowser&&h(this,d,e!=null&&e.element&&b.getElement(e.element)||window)}connect(){r.isBrowser&&i(this,d).addEventListener("keydown",i(this,o))}disconnect(){r.isBrowser&&i(this,d).removeEventListener("keydown",i(this,o))}}d=new WeakMap,o=new WeakMap;var l,c,f,w;class B extends E{constructor(e){super();g(this,"axis");g(this,"speed");g(this,"debounce");a(this,l,null);a(this,c,void 0);a(this,f,void 0);a(this,w,e=>{let n=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)))if(n=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),e.preventDefault(),this.debounce){const y=Date.now();if(y-i(this,f)>40&&(n=100*Math.sign(n)),h(this,f,y),Math.abs(n)<100||i(this,c))return;this.changeEvent.notify(n),h(this,c,setTimeout(()=>{h(this,c,void 0)},80))}else this.changeEvent.notify(n)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,h(this,f,Date.now()),r.isBrowser&&h(this,l,e!=null&&e.element&&b.getElement(e.element)||window)}connect(){r.isBrowser&&i(this,l).addEventListener("wheel",i(this,w),{passive:!1})}disconnect(){r.isBrowser&&i(this,l).removeEventListener("wheel",i(this,w))}}l=new WeakMap,c=new WeakMap,f=new WeakMap,w=new WeakMap;exports.Controls=E;exports.KeyboardControls=L;exports.WheelControls=B;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../custom-element/index.cjs"),r=require("../ElementConstructor-9f-12v7T.cjs"),s=require("../browser-CpzFX2xg.cjs");class n extends e.CustomElement{constructor(){super(),s.isBrowser&&r.element(this,{attributes:{tabIndex:this.getAttribute("tabindex")||"0",role:"button"},style:{cursor:"default"},events:{keydown:t=>{t.code==="Space"&&this.click()},click:()=>{this.click()}}})}}exports.AbstractButtonElement=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AbstractButtonElement } from './AbstractButtonElement';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CustomElement as e } from "../custom-element/index.js";
|
|
2
|
+
import { e as s } from "../ElementConstructor-CoKM2CTK.js";
|
|
3
|
+
import { i as r } from "../browser-0zX67oeU.js";
|
|
4
|
+
class l extends e {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), r && s(this, {
|
|
7
|
+
attributes: {
|
|
8
|
+
tabIndex: this.getAttribute("tabindex") || "0",
|
|
9
|
+
role: "button"
|
|
10
|
+
},
|
|
11
|
+
style: {
|
|
12
|
+
cursor: "default"
|
|
13
|
+
},
|
|
14
|
+
events: {
|
|
15
|
+
keydown: (t) => {
|
|
16
|
+
t.code === "Space" && this.click();
|
|
17
|
+
},
|
|
18
|
+
click: () => {
|
|
19
|
+
this.click();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
l as AbstractButtonElement
|
|
27
|
+
};
|
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
import { CustomElement } from '../custom-element';
|
|
2
2
|
import { Attribute } from '../attribute';
|
|
3
|
+
import { Axes2D } from '../utils';
|
|
4
|
+
export interface AccordionItemToggleEventDetail {
|
|
5
|
+
opened: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface AccordionToggleOptions {
|
|
8
|
+
skipTransition?: boolean;
|
|
9
|
+
exclude?: HTMLElement;
|
|
10
|
+
}
|
|
3
11
|
export declare class AccordionElement extends CustomElement {
|
|
4
12
|
#private;
|
|
5
|
-
|
|
13
|
+
constructor();
|
|
14
|
+
get axisAttribute(): Attribute<Axes2D>;
|
|
6
15
|
get multipleAttribute(): Attribute<false>;
|
|
16
|
+
createItem(element: HTMLElement): void;
|
|
17
|
+
removeItem(element: HTMLElement): void;
|
|
18
|
+
closeAll(options?: AccordionToggleOptions): void;
|
|
19
|
+
openAll(options?: AccordionToggleOptions): void;
|
|
20
|
+
protected connectedCallback(): void;
|
|
21
|
+
protected disconnectedCallback(): void;
|
|
22
|
+
}
|
|
23
|
+
declare global {
|
|
24
|
+
interface HTMLElementTagNameMap {
|
|
25
|
+
'e-accordion': AccordionElement;
|
|
26
|
+
}
|
|
27
|
+
interface HTMLElementEventMap {
|
|
28
|
+
'e-accordion-item-toggle': CustomEvent<AccordionItemToggleEventDetail>;
|
|
29
|
+
}
|
|
7
30
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var I=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var t=(s,e,i)=>(I(s,e,"read from private field"),i?i.call(s):e.get(s)),h=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},d=(s,e,i,l)=>(I(s,e,"write to private field"),l?l.call(s,i):e.set(s,i),i);var a=(s,e,i)=>(I(s,e,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("../custom-element/index.cjs"),N=require("../attribute/index.cjs"),J=require("../browser-CpzFX2xg.cjs"),K=require("../events-D68xg4dy.cjs"),Q=require("../style-At6aDoqG.cjs");var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(s,e,i,l)=>{for(var g=l>1?void 0:l?V(e,i):e,O=s.length-1,S;O>=0;O--)(S=s[O])&&(g=(l?S(e,i,g):S(g))||g);return l&&g&&U(e,i,g),g},$=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},o=(s,e,i)=>($(s,e,"read from private field"),i?i.call(s):e.get(s)),L=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},R=(s,e,i,l)=>($(s,e,"write to private field"),l?l.call(s,i):e.set(s,i),i),W,q,u,y,z,P,E,r,f,n,p,k,w,v,x,F,T,b,H,A,c,m,_,M,C,D;class B{constructor(e,i){h(this,x);h(this,c);h(this,_);h(this,C);h(this,E,null);h(this,r,null);h(this,f,null);h(this,n,null);h(this,p,null);h(this,k,!1);h(this,w,void 0);h(this,v,!1);h(this,T,()=>{t(this,v)?this.close():this.open()});h(this,b,()=>{t(this,v)&&(a(this,c,m).call(this,0,!0),a(this,c,m).call(this,t(this,n).scrollHeight))});h(this,H,()=>{a(this,_,M).call(this,"size-change")});h(this,A,()=>{t(this,v)&&(a(this,c,m).call(this,0,!0),a(this,c,m).call(this,t(this,n).scrollHeight))});i.firstElementChild instanceof HTMLElement&&i.lastElementChild instanceof HTMLElement?(d(this,E,e),d(this,r,i),d(this,f,i.firstElementChild),d(this,n,i.lastElementChild),t(this,f).style.cursor="default",t(this,n).style.height="0px",t(this,n).style.overflow="hidden",d(this,p,new ResizeObserver(t(this,H))),addEventListener("resize",t(this,b)),t(this,f).addEventListener("click",t(this,T)),t(this,r).addEventListener("e-size-change",t(this,A)),t(this,r).hasAttribute("data-opened")&&this.open({skipTransition:!0})):e.removeItem(t(this,r))}get element(){return t(this,r)}destroy(){t(this,f)&&(t(this,r).classList.remove("opened","triggered"),t(this,f).style.cursor="",a(this,c,m).call(this,void 0),t(this,p).disconnect(),removeEventListener("resize",t(this,b)),t(this,f).removeEventListener("click",t(this,T)),t(this,r).removeEventListener("e-size-change",t(this,A)),clearTimeout(t(this,w)))}open(e){e!=null&&e.skipTransition&&a(this,C,D).call(this),t(this,E).multipleAttribute.current||t(this,E).closeAll({exclude:t(this,r)}),t(this,k)||t(this,p).observe(t(this,n)),d(this,v,!0),clearTimeout(t(this,w)),t(this,r).classList.add("triggered"),a(this,c,m).call(this,t(this,n).scrollHeight),setTimeout(()=>{t(this,r).classList.add("opened")},0),a(this,_,M).call(this,"toggle")}close(e){e!=null&&e.skipTransition&&a(this,C,D).call(this),d(this,v,!1),t(this,r).classList.remove("opened"),a(this,c,m).call(this,0),d(this,w,setTimeout(()=>{t(this,r).classList.remove("triggered")},Q.getElementTransitionDurationMS(t(this,n)))),a(this,_,M).call(this,"toggle")}}E=new WeakMap,r=new WeakMap,f=new WeakMap,n=new WeakMap,p=new WeakMap,k=new WeakMap,w=new WeakMap,v=new WeakMap,x=new WeakSet,F=function(){return t(this,r).parentElement||t(this,r).getRootNode()},T=new WeakMap,b=new WeakMap,H=new WeakMap,A=new WeakMap,c=new WeakSet,m=function(e,i=!1){i&&(t(this,n).style.transition="all 0s",setTimeout(()=>{t(this,n).style.transition=""})),e!=null?t(this,n).style.height=`${e}px`:t(this,n).style.height=""},_=new WeakSet,M=function(e){e==="toggle"?t(this,r).dispatchEvent(new CustomEvent("e-accordion-item-toggle",{bubbles:!0,composed:!0,detail:{opened:t(this,v)}})):e==="size-change"&&K.dispatchSizeChangeEvent(t(this,x,F))},C=new WeakSet,D=function(){t(this,n).style.transition="all 0s",setTimeout(()=>{t(this,n).style.transition=""},50)};exports.AccordionElement=class extends G.CustomElement{constructor(){super(),L(this,z),L(this,W,new N.Attribute(this,"axis","y")),L(this,q,new N.Attribute(this,"multiple",!1)),L(this,u,[]),L(this,y,null),J.isBrowser&&R(this,y,new MutationObserver(e=>{e.forEach(i=>{i.removedNodes.forEach(l=>{l instanceof HTMLElement&&this.removeItem(l)}),i.addedNodes.forEach(l=>{l instanceof HTMLElement&&this.createItem(l)})})}))}get axisAttribute(){return o(this,W)}get multipleAttribute(){return o(this,q)}createItem(e){o(this,u).find(i=>i.element===e)||o(this,u).push(new B(this,e))}removeItem(e){R(this,u,o(this,u).filter(i=>{if(i.element!==e)return!0;i.destroy()}))}closeAll(e){o(this,u).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.close(e)})}openAll(e){o(this,u).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.open(e)})}connectedCallback(){o(this,y).observe(o(this,z,P),{childList:!0}),R(this,u,[...o(this,z,P).children].map(e=>{if(e instanceof HTMLElement)return new B(this,e)}).filter(e=>!!e))}disconnectedCallback(){o(this,y).disconnect()}};W=new WeakMap;q=new WeakMap;u=new WeakMap;y=new WeakMap;z=new WeakSet;P=function(){return this.shadowRoot?this.shadowRoot:this};exports.AccordionElement=X([G.define("e-accordion")],exports.AccordionElement);
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
var S = (t, e, s) => {
|
|
2
|
+
if (!e.has(t))
|
|
3
|
+
throw TypeError("Cannot " + s);
|
|
4
|
+
};
|
|
5
|
+
var i = (t, e, s) => (S(t, e, "read from private field"), s ? s.call(t) : e.get(t)), h = (t, e, s) => {
|
|
6
|
+
if (e.has(t))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
e instanceof WeakSet ? e.add(t) : e.set(t, s);
|
|
9
|
+
}, d = (t, e, s, o) => (S(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s);
|
|
10
|
+
var l = (t, e, s) => (S(t, e, "access private method"), s);
|
|
11
|
+
import { CustomElement as J, define as K } from "../custom-element/index.js";
|
|
12
|
+
import { Attribute as B } from "../attribute/index.js";
|
|
13
|
+
import { i as Q } from "../browser-0zX67oeU.js";
|
|
14
|
+
import { d as U } from "../events-CoqmkUxo.js";
|
|
15
|
+
import { g as V } from "../style-j2TwriJ_.js";
|
|
16
|
+
var X = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, Z = (t, e, s, o) => {
|
|
17
|
+
for (var g = o > 1 ? void 0 : o ? Y(e, s) : e, O = t.length - 1, I; O >= 0; O--)
|
|
18
|
+
(I = t[O]) && (g = (o ? I(e, s, g) : I(g)) || g);
|
|
19
|
+
return o && g && X(e, s, g), g;
|
|
20
|
+
}, q = (t, e, s) => {
|
|
21
|
+
if (!e.has(t))
|
|
22
|
+
throw TypeError("Cannot " + s);
|
|
23
|
+
}, a = (t, e, s) => (q(t, e, "read from private field"), s ? s.call(t) : e.get(t)), _ = (t, e, s) => {
|
|
24
|
+
if (e.has(t))
|
|
25
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
26
|
+
e instanceof WeakSet ? e.add(t) : e.set(t, s);
|
|
27
|
+
}, R = (t, e, s, o) => (q(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s), W, P, f, T, z, D, p, r, u, n, E, M, w, m, x, F, y, C, H, b, c, v, L, k, A, N;
|
|
28
|
+
class G {
|
|
29
|
+
constructor(e, s) {
|
|
30
|
+
h(this, x);
|
|
31
|
+
h(this, c);
|
|
32
|
+
h(this, L);
|
|
33
|
+
h(this, A);
|
|
34
|
+
h(this, p, null);
|
|
35
|
+
h(this, r, null);
|
|
36
|
+
h(this, u, null);
|
|
37
|
+
h(this, n, null);
|
|
38
|
+
h(this, E, null);
|
|
39
|
+
h(this, M, !1);
|
|
40
|
+
h(this, w, void 0);
|
|
41
|
+
h(this, m, !1);
|
|
42
|
+
h(this, y, () => {
|
|
43
|
+
i(this, m) ? this.close() : this.open();
|
|
44
|
+
});
|
|
45
|
+
h(this, C, () => {
|
|
46
|
+
i(this, m) && (l(this, c, v).call(this, 0, !0), l(this, c, v).call(this, i(this, n).scrollHeight));
|
|
47
|
+
});
|
|
48
|
+
h(this, H, () => {
|
|
49
|
+
l(this, L, k).call(this, "size-change");
|
|
50
|
+
});
|
|
51
|
+
h(this, b, () => {
|
|
52
|
+
i(this, m) && (l(this, c, v).call(this, 0, !0), l(this, c, v).call(this, i(this, n).scrollHeight));
|
|
53
|
+
});
|
|
54
|
+
s.firstElementChild instanceof HTMLElement && s.lastElementChild instanceof HTMLElement ? (d(this, p, e), d(this, r, s), d(this, u, s.firstElementChild), d(this, n, s.lastElementChild), i(this, u).style.cursor = "default", i(this, n).style.height = "0px", i(this, n).style.overflow = "hidden", d(this, E, new ResizeObserver(i(this, H))), addEventListener("resize", i(this, C)), i(this, u).addEventListener("click", i(this, y)), i(this, r).addEventListener(
|
|
55
|
+
"e-size-change",
|
|
56
|
+
i(this, b)
|
|
57
|
+
), i(this, r).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) : e.removeItem(i(this, r));
|
|
58
|
+
}
|
|
59
|
+
get element() {
|
|
60
|
+
return i(this, r);
|
|
61
|
+
}
|
|
62
|
+
destroy() {
|
|
63
|
+
i(this, u) && (i(this, r).classList.remove("opened", "triggered"), i(this, u).style.cursor = "", l(this, c, v).call(this, void 0), i(this, E).disconnect(), removeEventListener("resize", i(this, C)), i(this, u).removeEventListener("click", i(this, y)), i(this, r).removeEventListener(
|
|
64
|
+
"e-size-change",
|
|
65
|
+
i(this, b)
|
|
66
|
+
), clearTimeout(i(this, w)));
|
|
67
|
+
}
|
|
68
|
+
open(e) {
|
|
69
|
+
e != null && e.skipTransition && l(this, A, N).call(this), i(this, p).multipleAttribute.current || i(this, p).closeAll({ exclude: i(this, r) }), i(this, M) || i(this, E).observe(i(this, n)), d(this, m, !0), clearTimeout(i(this, w)), i(this, r).classList.add("triggered"), l(this, c, v).call(this, i(this, n).scrollHeight), setTimeout(() => {
|
|
70
|
+
i(this, r).classList.add("opened");
|
|
71
|
+
}, 0), l(this, L, k).call(this, "toggle");
|
|
72
|
+
}
|
|
73
|
+
close(e) {
|
|
74
|
+
e != null && e.skipTransition && l(this, A, N).call(this), d(this, m, !1), i(this, r).classList.remove("opened"), l(this, c, v).call(this, 0), d(this, w, setTimeout(() => {
|
|
75
|
+
i(this, r).classList.remove("triggered");
|
|
76
|
+
}, V(i(this, n)))), l(this, L, k).call(this, "toggle");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
p = new WeakMap(), r = new WeakMap(), u = new WeakMap(), n = new WeakMap(), E = new WeakMap(), M = new WeakMap(), w = new WeakMap(), m = new WeakMap(), x = new WeakSet(), F = function() {
|
|
80
|
+
return i(this, r).parentElement || i(this, r).getRootNode();
|
|
81
|
+
}, y = new WeakMap(), C = new WeakMap(), H = new WeakMap(), b = new WeakMap(), c = new WeakSet(), v = function(e, s = !1) {
|
|
82
|
+
s && (i(this, n).style.transition = "all 0s", setTimeout(() => {
|
|
83
|
+
i(this, n).style.transition = "";
|
|
84
|
+
})), e != null ? i(this, n).style.height = `${e}px` : i(this, n).style.height = "";
|
|
85
|
+
}, L = new WeakSet(), k = function(e) {
|
|
86
|
+
e === "toggle" ? i(this, r).dispatchEvent(
|
|
87
|
+
new CustomEvent(
|
|
88
|
+
"e-accordion-item-toggle",
|
|
89
|
+
{
|
|
90
|
+
bubbles: !0,
|
|
91
|
+
composed: !0,
|
|
92
|
+
detail: {
|
|
93
|
+
opened: i(this, m)
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
) : e === "size-change" && U(i(this, x, F));
|
|
98
|
+
}, A = new WeakSet(), N = function() {
|
|
99
|
+
i(this, n).style.transition = "all 0s", setTimeout(() => {
|
|
100
|
+
i(this, n).style.transition = "";
|
|
101
|
+
}, 50);
|
|
102
|
+
};
|
|
103
|
+
let $ = class extends J {
|
|
104
|
+
constructor() {
|
|
105
|
+
super(), _(this, z), _(this, W, new B(this, "axis", "y")), _(this, P, new B(this, "multiple", !1)), _(this, f, []), _(this, T, null), Q && R(this, T, new MutationObserver((t) => {
|
|
106
|
+
t.forEach((e) => {
|
|
107
|
+
e.removedNodes.forEach((s) => {
|
|
108
|
+
s instanceof HTMLElement && this.removeItem(s);
|
|
109
|
+
}), e.addedNodes.forEach((s) => {
|
|
110
|
+
s instanceof HTMLElement && this.createItem(s);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
get axisAttribute() {
|
|
116
|
+
return a(this, W);
|
|
117
|
+
}
|
|
118
|
+
get multipleAttribute() {
|
|
119
|
+
return a(this, P);
|
|
120
|
+
}
|
|
121
|
+
createItem(t) {
|
|
122
|
+
a(this, f).find((e) => e.element === t) || a(this, f).push(new G(this, t));
|
|
123
|
+
}
|
|
124
|
+
removeItem(t) {
|
|
125
|
+
R(this, f, a(this, f).filter((e) => {
|
|
126
|
+
if (e.element !== t)
|
|
127
|
+
return !0;
|
|
128
|
+
e.destroy();
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
closeAll(t) {
|
|
132
|
+
a(this, f).forEach((e) => {
|
|
133
|
+
(t == null ? void 0 : t.exclude) !== e.element && e.close(t);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
openAll(t) {
|
|
137
|
+
a(this, f).forEach((e) => {
|
|
138
|
+
(t == null ? void 0 : t.exclude) !== e.element && e.open(t);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
connectedCallback() {
|
|
142
|
+
a(this, T).observe(a(this, z, D), {
|
|
143
|
+
childList: !0
|
|
144
|
+
}), R(this, f, [...a(this, z, D).children].map((t) => {
|
|
145
|
+
if (t instanceof HTMLElement)
|
|
146
|
+
return new G(this, t);
|
|
147
|
+
}).filter((t) => !!t));
|
|
148
|
+
}
|
|
149
|
+
disconnectedCallback() {
|
|
150
|
+
a(this, T).disconnect();
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
W = /* @__PURE__ */ new WeakMap();
|
|
154
|
+
P = /* @__PURE__ */ new WeakMap();
|
|
155
|
+
f = /* @__PURE__ */ new WeakMap();
|
|
156
|
+
T = /* @__PURE__ */ new WeakMap();
|
|
157
|
+
z = /* @__PURE__ */ new WeakSet();
|
|
158
|
+
D = function() {
|
|
159
|
+
return this.shadowRoot ? this.shadowRoot : this;
|
|
160
|
+
};
|
|
161
|
+
$ = Z([
|
|
162
|
+
K("e-accordion")
|
|
163
|
+
], $);
|
|
164
|
+
export {
|
|
165
|
+
$ as AccordionElement
|
|
166
|
+
};
|