aptechka 0.8.4 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ElementConstructor-OK-6OPjh.cjs +1 -0
- package/lib/ElementConstructor-rValMo8f.js +372 -0
- package/lib/_createStore-C75y9luu.cjs +1 -0
- package/lib/_createStore-D3qHYaSz.js +12 -0
- package/lib/accordion/AccordionElement.d.ts +1 -2
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +110 -122
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +4 -5
- package/lib/canvas/index.js +69 -75
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.d.ts +1 -3
- package/lib/checkbox/index.js +42 -45
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.d.ts +2 -2
- package/lib/connector/index.js +39 -34
- package/lib/counter/index.d.ts +1 -3
- package/lib/{createStylesheet-BsMSWX0q.cjs → createStylesheet-9nksoWW0.cjs} +1 -1
- package/lib/{createStylesheet-BxKITIVV.js → createStylesheet-BrFGJ8Q7.js} +1 -1
- package/lib/element-constructor/ElementConstructor.d.ts +6 -5
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +114 -113
- package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -2
- package/lib/globals-DMjysUXI.js +8 -0
- package/lib/globals-bYKki-b9.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +7 -15
- package/lib/index-3R8YL-P3.js +266 -0
- package/lib/index-CyQAdqFu.cjs +9 -0
- package/lib/instantiate-BuVJ8pIJ.cjs +1 -0
- package/lib/instantiate-TYteKsII.js +134 -0
- package/lib/jsx/ComponentElement.d.ts +18 -0
- package/lib/jsx/globals.d.ts +13 -0
- package/lib/jsx/h.d.ts +6 -0
- package/lib/jsx/hooks/animation/createDamped.d.ts +3 -0
- package/lib/jsx/hooks/animation/createTweened.d.ts +3 -0
- package/lib/jsx/hooks/animation/index.cjs +1 -0
- package/lib/jsx/hooks/animation/index.d.ts +2 -0
- package/lib/jsx/hooks/animation/index.js +15 -0
- package/lib/jsx/hooks/basic/_createStore.d.ts +4 -0
- package/lib/jsx/hooks/basic/attachInternals.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachShadow.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachStylesheet.d.ts +3 -0
- package/lib/jsx/hooks/basic/createContext.d.ts +2 -0
- package/lib/jsx/hooks/basic/createRef.d.ts +3 -0
- package/lib/jsx/hooks/basic/onConnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onDisconnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onStoreChange.d.ts +3 -0
- package/lib/jsx/hooks/onAnimationFrame.cjs +1 -0
- package/lib/jsx/hooks/onAnimationFrame.d.ts +6 -0
- package/lib/jsx/hooks/onAnimationFrame.js +22 -0
- package/lib/jsx/hooks/onElementResize.cjs +1 -0
- package/lib/jsx/hooks/onElementResize.d.ts +5 -0
- package/lib/jsx/hooks/onElementResize.js +11 -0
- package/lib/jsx/hooks/onIntersection.cjs +1 -0
- package/lib/jsx/hooks/onIntersection.d.ts +5 -0
- package/lib/jsx/hooks/onIntersection.js +11 -0
- package/lib/jsx/hooks/onWindowResize.cjs +1 -0
- package/lib/jsx/hooks/onWindowResize.d.ts +3 -0
- package/lib/jsx/hooks/onWindowResize.js +8 -0
- package/lib/jsx/hooks/store/createCached.d.ts +3 -0
- package/lib/jsx/hooks/store/createComposed.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerived.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedArray.d.ts +3 -0
- package/lib/jsx/hooks/store/createResource.d.ts +3 -0
- package/lib/jsx/hooks/store/createStore.d.ts +3 -0
- package/lib/jsx/hooks/store/index.cjs +1 -0
- package/lib/jsx/hooks/store/index.d.ts +6 -0
- package/lib/jsx/hooks/store/index.js +31 -0
- package/lib/jsx/hooks/watchAttribute.cjs +1 -0
- package/lib/jsx/hooks/watchAttribute.d.ts +6 -0
- package/lib/jsx/hooks/watchAttribute.js +17 -0
- package/lib/jsx/hooks/watchCSSProperty.cjs +1 -0
- package/lib/jsx/hooks/watchCSSProperty.d.ts +7 -0
- package/lib/jsx/hooks/watchCSSProperty.js +17 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +15 -0
- package/lib/jsx/index.js +106 -0
- package/lib/jsx/instantiate.d.ts +5 -0
- package/lib/jsx/register.d.ts +1 -0
- package/lib/jsx/render.d.ts +6 -0
- package/lib/jsx/type.d.ts +198 -0
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +34 -36
- package/lib/onConnect-DGP866cj.cjs +1 -0
- package/lib/onConnect-y5DrxJ9P.js +7 -0
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +5 -4
- package/lib/order/index.js +1 -1
- package/lib/pointer/PointerElement.d.ts +1 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +105 -117
- package/lib/popover/PopoverButtonElement.d.ts +1 -2
- package/lib/popover/PopoverElement.d.ts +1 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +109 -124
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +76 -73
- package/lib/scroll/ScrollElement.d.ts +1 -2
- package/lib/scroll/ScrollUserElement.d.ts +1 -2
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +674 -753
- package/lib/select/SelectElement.d.ts +1 -3
- package/lib/select/SelectUserElement.d.ts +1 -2
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +104 -107
- package/lib/slicer/SlicerElement.d.ts +1 -2
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +88 -106
- package/lib/source/SourceElement.d.ts +1 -2
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +19 -20
- package/lib/store/Cached.d.ts +13 -0
- package/lib/store/Derived.d.ts +3 -3
- package/lib/store/DerivedArray.d.ts +8 -0
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.js +65 -31
- package/lib/tags-BosXYPYv.cjs +1 -0
- package/lib/tags-D0kLlFdQ.js +485 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -1
- package/lib/tweaker/TweakerFieldElement.d.ts +1 -2
- package/lib/tweaker/TweakerFolderElement.d.ts +1 -2
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -2
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +393 -472
- package/lib/utils/bytes.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +122 -105
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +25 -29
- package/package.json +73 -9
- package/lib/custom-element/index.cjs +0 -1
- package/lib/custom-element/index.d.ts +0 -8
- package/lib/custom-element/index.js +0 -30
- package/lib/index-CzpP1Tg6.cjs +0 -9
- package/lib/index-Dwd_62sm.js +0 -301
- package/lib/tags-CAfasCGV.cjs +0 -1
- package/lib/tags-D9lNDPX8.js +0 -848
package/lib/accordion/index.js
CHANGED
|
@@ -1,188 +1,176 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var B = (l, i, t) => {
|
|
2
|
+
if (!i.has(l))
|
|
3
|
+
throw TypeError("Cannot " + t);
|
|
4
4
|
};
|
|
5
|
-
var e = (i, t
|
|
6
|
-
if (
|
|
5
|
+
var e = (l, i, t) => (B(l, i, "read from private field"), t ? t.call(l) : i.get(l)), s = (l, i, t) => {
|
|
6
|
+
if (i.has(l))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
var
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
h(this, S);
|
|
36
|
-
h(this, a, null);
|
|
37
|
-
h(this, r, null);
|
|
38
|
-
h(this, m, null);
|
|
39
|
-
h(this, l, null);
|
|
40
|
-
h(this, L, null);
|
|
41
|
-
h(this, O, !1);
|
|
42
|
-
h(this, w, void 0);
|
|
43
|
-
h(this, v, !1);
|
|
44
|
-
h(this, A, []);
|
|
45
|
-
h(this, C, () => {
|
|
46
|
-
e(this, v) ? this.close() : this.open();
|
|
8
|
+
i instanceof WeakSet ? i.add(l) : i.set(l, t);
|
|
9
|
+
}, a = (l, i, t, h) => (B(l, i, "write to private field"), h ? h.call(l, t) : i.set(l, t), t);
|
|
10
|
+
var o = (l, i, t) => (B(l, i, "access private method"), t);
|
|
11
|
+
import { Attribute as P } from "../attribute/index.js";
|
|
12
|
+
import { i as q } from "../browser-0zX67oeU.js";
|
|
13
|
+
import { g as F } from "../dom-P5QbAASX.js";
|
|
14
|
+
import { d as G, a as J } from "../events-CJTUMSLU.js";
|
|
15
|
+
import { g as K } from "../style-j2TwriJ_.js";
|
|
16
|
+
var c, r, f, n, v, M, L, m, y, H, j, T, I, A, z, R, C, d, g, E, b, w, W, k;
|
|
17
|
+
class $ {
|
|
18
|
+
constructor(i, t) {
|
|
19
|
+
s(this, H);
|
|
20
|
+
s(this, T);
|
|
21
|
+
s(this, d);
|
|
22
|
+
s(this, E);
|
|
23
|
+
s(this, w);
|
|
24
|
+
s(this, c, null);
|
|
25
|
+
s(this, r, null);
|
|
26
|
+
s(this, f, null);
|
|
27
|
+
s(this, n, null);
|
|
28
|
+
s(this, v, null);
|
|
29
|
+
s(this, M, !1);
|
|
30
|
+
s(this, L, void 0);
|
|
31
|
+
s(this, m, !1);
|
|
32
|
+
s(this, y, []);
|
|
33
|
+
s(this, A, () => {
|
|
34
|
+
e(this, m) ? this.close() : this.open();
|
|
47
35
|
});
|
|
48
|
-
|
|
49
|
-
e(this,
|
|
36
|
+
s(this, z, () => {
|
|
37
|
+
e(this, m) && (o(this, d, g).call(this, 0, !0), o(this, d, g).call(this, e(this, T, I)));
|
|
50
38
|
});
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
s(this, R, () => {
|
|
40
|
+
o(this, E, b).call(this, "size-change");
|
|
53
41
|
});
|
|
54
|
-
|
|
55
|
-
e(this,
|
|
56
|
-
|
|
57
|
-
left: e(this,
|
|
58
|
-
top: e(this,
|
|
42
|
+
s(this, C, (i) => {
|
|
43
|
+
e(this, m) && (o(this, d, g).call(this, 0, !0), o(this, d, g).call(this, e(this, T, I)), e(this, y).forEach((t) => {
|
|
44
|
+
t.element.scroll({
|
|
45
|
+
left: e(this, c).axisAttribute.current === "x" ? t.scroll : 0,
|
|
46
|
+
top: e(this, c).axisAttribute.current === "y" ? t.scroll : 0
|
|
59
47
|
});
|
|
60
48
|
}));
|
|
61
49
|
});
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
element:
|
|
66
|
-
scroll: e(this,
|
|
50
|
+
s(this, k, () => {
|
|
51
|
+
const i = F(e(this, r));
|
|
52
|
+
a(this, y, i.map((t) => ({
|
|
53
|
+
element: t,
|
|
54
|
+
scroll: e(this, c).axisAttribute.current === "y" ? t.scrollTop : t.scrollLeft
|
|
67
55
|
})));
|
|
68
56
|
});
|
|
69
|
-
|
|
57
|
+
t.firstElementChild instanceof HTMLElement && t.lastElementChild instanceof HTMLElement ? (a(this, c, i), a(this, r, t), a(this, f, t.firstElementChild), a(this, n, t.lastElementChild), e(this, f).style.cursor = "default", e(this, n).style.overflow = "hidden", e(this, c).axisAttribute.current === "y" ? e(this, n).style.height = "0px" : e(this, n).style.width = "0px", a(this, v, new ResizeObserver(e(this, R))), addEventListener("resize", e(this, z)), e(this, f).addEventListener("click", e(this, A)), e(this, r).addEventListener(
|
|
70
58
|
"beforeSizeChange",
|
|
71
59
|
e(this, k)
|
|
72
60
|
), e(this, r).addEventListener(
|
|
73
61
|
"sizeChange",
|
|
74
|
-
e(this,
|
|
75
|
-
), e(this, r).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) :
|
|
62
|
+
e(this, C)
|
|
63
|
+
), e(this, r).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) : i.removeItem(e(this, r));
|
|
76
64
|
}
|
|
77
65
|
get element() {
|
|
78
66
|
return e(this, r);
|
|
79
67
|
}
|
|
80
68
|
destroy() {
|
|
81
|
-
e(this,
|
|
69
|
+
e(this, f) && (e(this, r).classList.remove("opened", "triggered"), e(this, f).style.cursor = "", o(this, d, g).call(this, void 0), e(this, v).disconnect(), removeEventListener("resize", e(this, z)), e(this, f).removeEventListener("click", e(this, A)), e(this, r).removeEventListener(
|
|
82
70
|
"beforeSizeChange",
|
|
83
71
|
e(this, k)
|
|
84
72
|
), e(this, r).removeEventListener(
|
|
85
73
|
"sizeChange",
|
|
86
|
-
e(this,
|
|
87
|
-
), clearTimeout(e(this,
|
|
74
|
+
e(this, C)
|
|
75
|
+
), clearTimeout(e(this, L)));
|
|
88
76
|
}
|
|
89
|
-
open(
|
|
90
|
-
|
|
77
|
+
open(i) {
|
|
78
|
+
o(this, E, b).call(this, "before-toggle"), i != null && i.skipTransition && o(this, w, W).call(this), e(this, c).multipleAttribute.current || e(this, c).closeAll({ exclude: e(this, r) }), e(this, M) || e(this, v).observe(e(this, n)), a(this, m, !0), clearTimeout(e(this, L)), e(this, r).classList.add("triggered"), o(this, d, g).call(this, e(this, T, I)), setTimeout(() => {
|
|
91
79
|
e(this, r).classList.add("opened");
|
|
92
|
-
}, 0),
|
|
80
|
+
}, 0), o(this, E, b).call(this, "toggle");
|
|
93
81
|
}
|
|
94
|
-
close(
|
|
95
|
-
|
|
82
|
+
close(i) {
|
|
83
|
+
o(this, E, b).call(this, "before-toggle"), i != null && i.skipTransition && o(this, w, W).call(this), a(this, m, !1), e(this, r).classList.remove("opened"), o(this, d, g).call(this, 0), a(this, L, setTimeout(() => {
|
|
96
84
|
e(this, r).classList.remove("triggered");
|
|
97
|
-
},
|
|
85
|
+
}, K(e(this, n)))), o(this, E, b).call(this, "toggle");
|
|
98
86
|
}
|
|
99
87
|
}
|
|
100
|
-
|
|
88
|
+
c = new WeakMap(), r = new WeakMap(), f = new WeakMap(), n = new WeakMap(), v = new WeakMap(), M = new WeakMap(), L = new WeakMap(), m = new WeakMap(), y = new WeakMap(), H = new WeakSet(), j = function() {
|
|
101
89
|
return e(this, r).parentElement || e(this, r).getRootNode();
|
|
102
90
|
}, T = new WeakSet(), I = function() {
|
|
103
|
-
return e(this,
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
e(this,
|
|
91
|
+
return e(this, c).axisAttribute.current === "x" ? e(this, n).scrollWidth : e(this, n).scrollHeight;
|
|
92
|
+
}, A = new WeakMap(), z = new WeakMap(), R = new WeakMap(), C = new WeakMap(), d = new WeakSet(), g = function(i, t = !1) {
|
|
93
|
+
t && (e(this, n).style.transition = "all 0s", setTimeout(() => {
|
|
94
|
+
e(this, n).style.transition = "";
|
|
107
95
|
}));
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
|
|
96
|
+
const h = e(this, c).axisAttribute.current === "x" ? "width" : "height";
|
|
97
|
+
i != null ? e(this, n).style[h] = `${i}px` : e(this, n).style[h] = "";
|
|
98
|
+
}, E = new WeakSet(), b = function(i) {
|
|
99
|
+
i === "before-toggle" ? G(e(this, r)) : i === "toggle" ? e(this, r).dispatchEvent(
|
|
112
100
|
new CustomEvent("accordionItemToggle", {
|
|
113
101
|
bubbles: !0,
|
|
114
102
|
composed: !0,
|
|
115
103
|
detail: {
|
|
116
|
-
opened: e(this,
|
|
104
|
+
opened: e(this, m)
|
|
117
105
|
}
|
|
118
106
|
})
|
|
119
|
-
) :
|
|
120
|
-
},
|
|
121
|
-
e(this,
|
|
122
|
-
e(this,
|
|
107
|
+
) : i === "size-change" && J(e(this, H, j));
|
|
108
|
+
}, w = new WeakSet(), W = function() {
|
|
109
|
+
e(this, n).style.transition = "all 0s", setTimeout(() => {
|
|
110
|
+
e(this, n).style.transition = "";
|
|
123
111
|
}, 50);
|
|
124
112
|
}, k = new WeakMap();
|
|
125
|
-
|
|
113
|
+
var O, N, u, p, S, D;
|
|
114
|
+
class Q extends HTMLElement {
|
|
126
115
|
constructor() {
|
|
127
|
-
super()
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
116
|
+
super();
|
|
117
|
+
s(this, S);
|
|
118
|
+
s(this, O, new P(this, "axis", "y"));
|
|
119
|
+
s(this, N, new P(this, "multiple", !1));
|
|
120
|
+
s(this, u, []);
|
|
121
|
+
s(this, p, null);
|
|
122
|
+
q && a(this, p, new MutationObserver((t) => {
|
|
123
|
+
t.forEach((h) => {
|
|
124
|
+
h.removedNodes.forEach((x) => {
|
|
125
|
+
x instanceof HTMLElement && this.removeItem(x);
|
|
126
|
+
}), h.addedNodes.forEach((x) => {
|
|
127
|
+
x instanceof HTMLElement && this.createItem(x);
|
|
133
128
|
});
|
|
134
129
|
});
|
|
135
130
|
}));
|
|
136
131
|
}
|
|
137
132
|
get axisAttribute() {
|
|
138
|
-
return
|
|
133
|
+
return e(this, O);
|
|
139
134
|
}
|
|
140
135
|
get multipleAttribute() {
|
|
141
|
-
return
|
|
136
|
+
return e(this, N);
|
|
142
137
|
}
|
|
143
|
-
createItem(
|
|
144
|
-
|
|
138
|
+
createItem(t) {
|
|
139
|
+
e(this, u).find((h) => h.element === t) || e(this, u).push(new $(this, t));
|
|
145
140
|
}
|
|
146
|
-
removeItem(
|
|
147
|
-
|
|
148
|
-
if (
|
|
141
|
+
removeItem(t) {
|
|
142
|
+
a(this, u, e(this, u).filter((h) => {
|
|
143
|
+
if (h.element !== t)
|
|
149
144
|
return !0;
|
|
150
|
-
|
|
145
|
+
h.destroy();
|
|
151
146
|
}));
|
|
152
147
|
}
|
|
153
|
-
closeAll(
|
|
154
|
-
|
|
155
|
-
(
|
|
148
|
+
closeAll(t) {
|
|
149
|
+
e(this, u).forEach((h) => {
|
|
150
|
+
(t == null ? void 0 : t.exclude) !== h.element && h.close(t);
|
|
156
151
|
});
|
|
157
152
|
}
|
|
158
|
-
openAll(
|
|
159
|
-
|
|
160
|
-
(
|
|
153
|
+
openAll(t) {
|
|
154
|
+
e(this, u).forEach((h) => {
|
|
155
|
+
(t == null ? void 0 : t.exclude) !== h.element && h.open(t);
|
|
161
156
|
});
|
|
162
157
|
}
|
|
163
158
|
connectedCallback() {
|
|
164
|
-
|
|
159
|
+
e(this, p).observe(e(this, S, D), {
|
|
165
160
|
childList: !0
|
|
166
|
-
}),
|
|
167
|
-
if (
|
|
168
|
-
return new
|
|
169
|
-
}).filter((
|
|
161
|
+
}), a(this, u, [...e(this, S, D).children].map((t) => {
|
|
162
|
+
if (t instanceof HTMLElement)
|
|
163
|
+
return new $(this, t);
|
|
164
|
+
}).filter((t) => !!t));
|
|
170
165
|
}
|
|
171
166
|
disconnectedCallback() {
|
|
172
|
-
|
|
167
|
+
e(this, p).disconnect();
|
|
173
168
|
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
G = /* @__PURE__ */ new WeakMap();
|
|
177
|
-
u = /* @__PURE__ */ new WeakMap();
|
|
178
|
-
x = /* @__PURE__ */ new WeakMap();
|
|
179
|
-
M = /* @__PURE__ */ new WeakSet();
|
|
180
|
-
$ = function() {
|
|
169
|
+
}
|
|
170
|
+
O = new WeakMap(), N = new WeakMap(), u = new WeakMap(), p = new WeakMap(), S = new WeakSet(), D = function() {
|
|
181
171
|
return this.shadowRoot ? this.shadowRoot : this;
|
|
182
172
|
};
|
|
183
|
-
|
|
184
|
-
X("e-accordion")
|
|
185
|
-
], K);
|
|
173
|
+
customElements.get("e-accordion") || customElements.define("e-accordion", Q);
|
|
186
174
|
export {
|
|
187
|
-
|
|
175
|
+
Q as AccordionElement
|
|
188
176
|
};
|
package/lib/canvas/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var S=(i,s,e)=>{if(!s.has(i))throw TypeError("Cannot "+e)};var t=(i,s,e)=>(S(i,s,"read from private field"),e?e.call(i):s.get(i)),h=(i,s,e)=>{if(s.has(i))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(i):s.set(i,e)},r=(i,s,e,n)=>(S(i,s,"write to private field"),n?n.call(i,e):s.set(i,e),e);var o=(i,s,e)=>(S(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../css-property/index.cjs");require("../Store-Cr3VaD9G.cjs");const L=require("../math-GDWEqu7y.cjs"),y=require("../ticker/index.cjs"),k=require("../tags-BosXYPYv.cjs"),_=require("../createStylesheet-9nksoWW0.cjs"),q=require("../element-resizer/index.cjs"),M=_.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});var a,c,d,l,u,m,v,b,g,f,w,z,x,p,R,C,E,F;class P extends HTMLElement{constructor(){super();h(this,g);h(this,w);h(this,R);h(this,E);h(this,a,new B.CSSProperty(this,"--fps",0));h(this,c,null);h(this,d,null);h(this,l,0);h(this,u,0);h(this,m,1);h(this,v,0);h(this,b,1);h(this,x,e=>{r(this,m,L.clamp(devicePixelRatio,1,2)),r(this,l,e.contentRect.width),r(this,u,e.contentRect.height),t(this,c).width=t(this,l)*this.pixelRatio,t(this,c).height=t(this,u)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),o(this,E,F).call(this),o(this,R,C).call(this)});h(this,p,e=>{r(this,v,e.timestamp),r(this,b,e.timeBetweenFrames),o(this,R,C).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(M),k.element(this,{children:k.canvas({ref:n=>{r(this,c,n),r(this,d,n.getContext("2d"))}})}),t(this,a).subscribe(n=>{typeof n.previous!="undefined"&&n.current!==n.previous&&o(this,g,f).call(this)})}get fpsCSSProperty(){return t(this,a)}get canvasElement(){return t(this,c)}get context(){return t(this,d)}get pixelRatio(){return t(this,m)}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,c),pixelRatio:t(this,m),context:t(this,d),timestamp:t(this,v),timeBetweenFrames:t(this,b)}}connectedCallback(){t(this,a).observe(),q.elementResizer.subscribe(this,t(this,x)),o(this,g,f).call(this)}disconnectedCallback(){t(this,a).unobserve(),q.elementResizer.unsubscribe(t(this,x)),o(this,w,z).call(this)}}a=new WeakMap,c=new WeakMap,d=new WeakMap,l=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,b=new WeakMap,g=new WeakSet,f=function(){y.ticker.unsubscribe(t(this,p)),this.hasAttribute("static")||y.ticker.subscribe(t(this,p),{culling:this,maxFPS:t(this,a).current})},w=new WeakSet,z=function(){y.ticker.unsubscribe(t(this,p))},x=new WeakMap,p=new WeakMap,R=new WeakSet,C=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))},E=new WeakSet,F=function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))};customElements.get("e-canvas")||customElements.define("e-canvas",P);exports.CanvasElement=P;
|
package/lib/canvas/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CSSProperty } from '../css-property';
|
|
2
|
-
import { CustomElement } from '../custom-element';
|
|
3
2
|
|
|
4
3
|
export interface Canvas2DRenderDetail {
|
|
5
4
|
pixelRatio: number;
|
|
@@ -11,8 +10,8 @@ export interface Canvas2DRenderDetail {
|
|
|
11
10
|
timestamp: number;
|
|
12
11
|
timeBetweenFrames: number;
|
|
13
12
|
}
|
|
14
|
-
export type
|
|
15
|
-
export declare class CanvasElement extends
|
|
13
|
+
export type CanvasRenderEvent = CustomEvent<Canvas2DRenderDetail>;
|
|
14
|
+
export declare class CanvasElement extends HTMLElement {
|
|
16
15
|
#private;
|
|
17
16
|
constructor();
|
|
18
17
|
get fpsCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;
|
|
@@ -30,7 +29,7 @@ declare global {
|
|
|
30
29
|
'e-canvas': CanvasElement;
|
|
31
30
|
}
|
|
32
31
|
interface HTMLElementEventMap {
|
|
33
|
-
canvasRender:
|
|
34
|
-
canvasResize:
|
|
32
|
+
canvasRender: CanvasRenderEvent;
|
|
33
|
+
canvasResize: CanvasRenderEvent;
|
|
35
34
|
}
|
|
36
35
|
}
|
package/lib/canvas/index.js
CHANGED
|
@@ -1,115 +1,111 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { elementResizer as y } from "../element-resizer/index.js";
|
|
8
|
-
import { ticker as E } from "../ticker/index.js";
|
|
9
|
-
var G = Object.defineProperty, H = Object.getOwnPropertyDescriptor, I = (t, i, s, d) => {
|
|
10
|
-
for (var h = d > 1 ? void 0 : d ? H(i, s) : i, x = t.length - 1, g; x >= 0; x--)
|
|
11
|
-
(g = t[x]) && (h = (d ? g(i, s, h) : g(h)) || h);
|
|
12
|
-
return d && h && G(i, s, h), h;
|
|
13
|
-
}, M = (t, i, s) => {
|
|
14
|
-
if (!i.has(t))
|
|
15
|
-
throw TypeError("Cannot " + s);
|
|
16
|
-
}, e = (t, i, s) => (M(t, i, "read from private field"), s ? s.call(t) : i.get(t)), a = (t, i, s) => {
|
|
17
|
-
if (i.has(t))
|
|
1
|
+
var E = (i, s, e) => {
|
|
2
|
+
if (!s.has(i))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
|
+
};
|
|
5
|
+
var t = (i, s, e) => (E(i, s, "read from private field"), e ? e.call(i) : s.get(i)), h = (i, s, e) => {
|
|
6
|
+
if (s.has(i))
|
|
18
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
8
|
+
s instanceof WeakSet ? s.add(i) : s.set(i, e);
|
|
9
|
+
}, r = (i, s, e, n) => (E(i, s, "write to private field"), n ? n.call(i, e) : s.set(i, e), e);
|
|
10
|
+
var c = (i, s, e) => (E(i, s, "access private method"), e);
|
|
11
|
+
import { CSSProperty as F } from "../css-property/index.js";
|
|
12
|
+
import "../Store-Qr3SNOSf.js";
|
|
13
|
+
import { c as B } from "../math-BOBiC4TN.js";
|
|
14
|
+
import { ticker as S } from "../ticker/index.js";
|
|
15
|
+
import { e as L, q } from "../tags-D0kLlFdQ.js";
|
|
16
|
+
import { c as A } from "../createStylesheet-BrFGJ8Q7.js";
|
|
17
|
+
import { elementResizer as k } from "../element-resizer/index.js";
|
|
18
|
+
const H = A({
|
|
22
19
|
":host, canvas": {
|
|
23
20
|
display: "block",
|
|
24
21
|
width: "100%",
|
|
25
22
|
height: "100%"
|
|
26
23
|
}
|
|
27
24
|
});
|
|
28
|
-
|
|
25
|
+
var a, o, p, m, l, d, v, b, f, C, w, P, g, u, x, y, R, z;
|
|
26
|
+
class M extends HTMLElement {
|
|
29
27
|
constructor() {
|
|
30
|
-
super()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
super();
|
|
29
|
+
h(this, f);
|
|
30
|
+
h(this, w);
|
|
31
|
+
h(this, x);
|
|
32
|
+
h(this, R);
|
|
33
|
+
h(this, a, new F(this, "--fps", 0));
|
|
34
|
+
h(this, o, null);
|
|
35
|
+
h(this, p, null);
|
|
36
|
+
h(this, m, 0);
|
|
37
|
+
h(this, l, 0);
|
|
38
|
+
h(this, d, 1);
|
|
39
|
+
h(this, v, 0);
|
|
40
|
+
h(this, b, 1);
|
|
41
|
+
h(this, g, (e) => {
|
|
42
|
+
r(this, d, B(devicePixelRatio, 1, 2)), r(this, m, e.contentRect.width), r(this, l, e.contentRect.height), t(this, o).width = t(this, m) * this.pixelRatio, t(this, o).height = t(this, l) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), c(this, R, z).call(this), c(this, x, y).call(this);
|
|
43
|
+
});
|
|
44
|
+
h(this, u, (e) => {
|
|
45
|
+
r(this, v, e.timestamp), r(this, b, e.timeBetweenFrames), c(this, x, y).call(this);
|
|
46
|
+
});
|
|
47
|
+
this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(H), L(this, {
|
|
48
|
+
children: q({
|
|
49
|
+
ref: (n) => {
|
|
50
|
+
r(this, o, n), r(this, p, n.getContext("2d"));
|
|
38
51
|
}
|
|
39
52
|
})
|
|
40
|
-
}),
|
|
41
|
-
typeof
|
|
53
|
+
}), t(this, a).subscribe((n) => {
|
|
54
|
+
typeof n.previous != "undefined" && n.current !== n.previous && c(this, f, C).call(this);
|
|
42
55
|
});
|
|
43
56
|
}
|
|
44
57
|
get fpsCSSProperty() {
|
|
45
|
-
return
|
|
58
|
+
return t(this, a);
|
|
46
59
|
}
|
|
47
60
|
get canvasElement() {
|
|
48
|
-
return
|
|
61
|
+
return t(this, o);
|
|
49
62
|
}
|
|
50
63
|
get context() {
|
|
51
|
-
return
|
|
64
|
+
return t(this, p);
|
|
52
65
|
}
|
|
53
66
|
get pixelRatio() {
|
|
54
|
-
return
|
|
67
|
+
return t(this, d);
|
|
55
68
|
}
|
|
56
69
|
get width() {
|
|
57
|
-
return
|
|
70
|
+
return t(this, m);
|
|
58
71
|
}
|
|
59
72
|
get height() {
|
|
60
|
-
return
|
|
73
|
+
return t(this, l);
|
|
61
74
|
}
|
|
62
75
|
get detail() {
|
|
63
76
|
return {
|
|
64
|
-
width:
|
|
65
|
-
height:
|
|
77
|
+
width: t(this, m),
|
|
78
|
+
height: t(this, l),
|
|
66
79
|
element: this,
|
|
67
|
-
canvasElement:
|
|
68
|
-
pixelRatio:
|
|
69
|
-
context:
|
|
70
|
-
timestamp:
|
|
71
|
-
timeBetweenFrames:
|
|
80
|
+
canvasElement: t(this, o),
|
|
81
|
+
pixelRatio: t(this, d),
|
|
82
|
+
context: t(this, p),
|
|
83
|
+
timestamp: t(this, v),
|
|
84
|
+
timeBetweenFrames: t(this, b)
|
|
72
85
|
};
|
|
73
86
|
}
|
|
74
87
|
connectedCallback() {
|
|
75
|
-
|
|
88
|
+
t(this, a).observe(), k.subscribe(this, t(this, g)), c(this, f, C).call(this);
|
|
76
89
|
}
|
|
77
90
|
disconnectedCallback() {
|
|
78
|
-
|
|
91
|
+
t(this, a).unobserve(), k.unsubscribe(t(this, g)), c(this, w, P).call(this);
|
|
79
92
|
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
u = /* @__PURE__ */ new WeakMap();
|
|
84
|
-
p = /* @__PURE__ */ new WeakMap();
|
|
85
|
-
l = /* @__PURE__ */ new WeakMap();
|
|
86
|
-
v = /* @__PURE__ */ new WeakMap();
|
|
87
|
-
f = /* @__PURE__ */ new WeakMap();
|
|
88
|
-
_ = /* @__PURE__ */ new WeakMap();
|
|
89
|
-
w = /* @__PURE__ */ new WeakSet();
|
|
90
|
-
S = function() {
|
|
91
|
-
E.unsubscribe(e(this, m)), this.hasAttribute("static") || E.subscribe(e(this, m), {
|
|
93
|
+
}
|
|
94
|
+
a = new WeakMap(), o = new WeakMap(), p = new WeakMap(), m = new WeakMap(), l = new WeakMap(), d = new WeakMap(), v = new WeakMap(), b = new WeakMap(), f = new WeakSet(), C = function() {
|
|
95
|
+
S.unsubscribe(t(this, u)), this.hasAttribute("static") || S.subscribe(t(this, u), {
|
|
92
96
|
culling: this,
|
|
93
|
-
maxFPS:
|
|
97
|
+
maxFPS: t(this, a).current
|
|
94
98
|
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
E.unsubscribe(e(this, m));
|
|
99
|
-
};
|
|
100
|
-
R = /* @__PURE__ */ new WeakMap();
|
|
101
|
-
m = /* @__PURE__ */ new WeakMap();
|
|
102
|
-
k = /* @__PURE__ */ new WeakSet();
|
|
103
|
-
C = function() {
|
|
99
|
+
}, w = new WeakSet(), P = function() {
|
|
100
|
+
S.unsubscribe(t(this, u));
|
|
101
|
+
}, g = new WeakMap(), u = new WeakMap(), x = new WeakSet(), y = function() {
|
|
104
102
|
this.dispatchEvent(
|
|
105
103
|
new CustomEvent("canvasRender", {
|
|
106
104
|
composed: !0,
|
|
107
105
|
detail: this.detail
|
|
108
106
|
})
|
|
109
107
|
);
|
|
110
|
-
}
|
|
111
|
-
b = /* @__PURE__ */ new WeakSet();
|
|
112
|
-
F = function() {
|
|
108
|
+
}, R = new WeakSet(), z = function() {
|
|
113
109
|
this.dispatchEvent(
|
|
114
110
|
new CustomEvent("canvasResize", {
|
|
115
111
|
composed: !0,
|
|
@@ -117,9 +113,7 @@ F = function() {
|
|
|
117
113
|
})
|
|
118
114
|
);
|
|
119
115
|
};
|
|
120
|
-
|
|
121
|
-
A("e-canvas")
|
|
122
|
-
], P);
|
|
116
|
+
customElements.get("e-canvas") || customElements.define("e-canvas", M);
|
|
123
117
|
export {
|
|
124
|
-
|
|
118
|
+
M as CanvasElement
|
|
125
119
|
};
|
package/lib/checkbox/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";var p=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var a=(t,s,e)=>(p(t,s,"read from private field"),e?e.call(t):s.get(t)),d=(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)},g=(t,s,e,i)=>(p(t,s,"write to private field"),i?i.call(t,e):s.set(t,e),e);var o=(t,s,e)=>(p(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-Cr3VaD9G.cjs");require("../ticker/index.cjs");const c=require("../tags-BosXYPYv.cjs"),k=require("../createStylesheet-9nksoWW0.cjs"),m=require("../theme/index.cjs"),f='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',b=k.createStylesheet({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:m.aptechkaTheme.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:m.aptechkaTheme.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:m.aptechkaTheme.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var h,r,l,n;const v=class v extends HTMLElement{constructor(){super();d(this,l);d(this,h,null);d(this,r,void 0);this.attachShadow({mode:"open"}).adoptedStyleSheets.push(b),g(this,r,this.attachInternals()),c.element(this,{children:c.label({children:[c.span({class:"fake",children:c.slot({children:[c.span({class:"default",children:[f]})]})}),c.input({ref:i=>{g(this,h,i),i.required=this.hasAttribute("required"),i.value=this.getAttribute("value")||"",i.checked=this.hasAttribute("checked"),i.name=this.getAttribute("name")||"",o(this,l,n).call(this)},class:"real",type:"checkbox",onChange:()=>{o(this,l,n).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return a(this,h).checked}set checked(e){a(this,h).checked=e,o(this,l,n).call(this)}get value(){return a(this,h).value}set value(e){a(this,h).value=e,o(this,l,n).call(this)}};h=new WeakMap,r=new WeakMap,l=new WeakSet,n=function(){this.checked?a(this,r).setFormValue(this.value):a(this,r).setFormValue(null),this.classList.toggle("checked",this.checked)},v.formAssociated=!0;let u=v;customElements.get("e-checkbox")||customElements.define("e-checkbox",u);exports.CheckboxElement=u;
|
package/lib/checkbox/index.d.ts
CHANGED