aptechka 0.2.0 → 0.2.2
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/ComponentElement-BUesLP4b.cjs +1 -0
- package/lib/ComponentElement-NMlh1Ptn.js +92 -0
- package/lib/Composed-ClTo1f0b.js +79 -0
- package/lib/Composed-Mdr4ZFbI.cjs +1 -0
- package/lib/ElementConstructor-B61ZFTEB.cjs +1 -0
- package/lib/{ElementConstructor-1bvPqYNa.js → ElementConstructor-CvNdPKJy.js} +6 -5
- package/lib/abstract-elements/index.cjs +1 -1
- package/lib/abstract-elements/index.js +1 -1
- package/lib/animation/hooks/index.cjs +1 -0
- package/lib/animation/hooks/index.d.ts +8 -0
- package/lib/animation/hooks/index.js +38 -0
- package/lib/attribute/hooks/index.d.ts +2 -0
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +0 -2
- package/lib/attribute/index.js +35 -50
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/controls/hooks/index.d.ts +1 -0
- package/lib/{createStylesheet-B5Nhxdpo.cjs → createStylesheet-C0OnN0Br.cjs} +1 -1
- package/lib/{createStylesheet-DpGvTRP3.js → createStylesheet-CD11E4C8.js} +1 -1
- package/lib/{createTheme-CLqJF9Pw.cjs → createTheme-B_W5dUY9.cjs} +1 -1
- package/lib/{createTheme-WJyOPh-q.js → createTheme-D0IoYkYN.js} +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +4 -4
- package/lib/element-resizer/hooks/index.cjs +1 -0
- package/lib/element-resizer/hooks/index.d.ts +4 -0
- package/lib/element-resizer/hooks/index.js +12 -0
- package/lib/en3/index.cjs +7 -7
- package/lib/en3/index.d.ts +1 -0
- package/lib/en3/index.js +639 -620
- package/lib/en3/utils/getCurrentViewport.d.ts +7 -0
- package/lib/{index-BNZNGmrW.cjs → index--wI4MTuv.cjs} +1 -1
- package/lib/{index-DMIfOO2r.js → index-Dq6GRJ9W.js} +2 -2
- package/lib/instantiate-BAz2WZtO.cjs +1 -0
- package/lib/instantiate-BDteLwW6.js +55 -0
- package/lib/intersector/hooks/index.cjs +1 -0
- package/lib/intersector/hooks/index.d.ts +4 -0
- package/lib/intersector/hooks/index.js +12 -0
- package/lib/jsx/hooks/index.cjs +1 -0
- package/lib/jsx/hooks/index.d.ts +7 -0
- package/lib/jsx/hooks/index.js +76 -0
- package/lib/jsx/hooks/useContext.d.ts +2 -2
- package/lib/jsx/index.cjs +1 -1
- package/lib/jsx/index.d.ts +2 -9
- package/lib/jsx/index.js +11 -95
- package/lib/jsx/instantiate.d.ts +1 -0
- package/lib/jsx/register.d.ts +1 -0
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +82 -81
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +2 -2
- package/lib/object-BZELAoVj.cjs +1 -0
- package/lib/object-R34VLqhp.js +85 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +21 -21
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +2 -2
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/slicer/DecoderElement.d.ts +10 -0
- package/lib/slicer/Letter.d.ts +11 -0
- package/lib/slicer/SlicerElement.d.ts +21 -0
- package/lib/slicer/Word.d.ts +16 -0
- package/lib/slicer/index.cjs +11 -0
- package/lib/slicer/index.d.ts +4 -0
- package/lib/slicer/index.js +165 -0
- package/lib/store/hooks/index.cjs +1 -0
- package/lib/{jsx/hooks/useStore.d.ts → store/hooks/index.d.ts} +1 -1
- package/lib/store/hooks/index.js +31 -0
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +48 -111
- package/lib/string-3lAkpJJP.js +51 -0
- package/lib/string-vBu90jhV.cjs +1 -0
- package/lib/studio/index.cjs +1 -1
- package/lib/studio/index.js +6 -5
- package/lib/{tags-D0k7-iVY.js → tags-C2jg1zYB.js} +1 -1
- package/lib/{tags-DGIuh1Hi.cjs → tags-DX-eNxbA.cjs} +1 -1
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.d.ts +1 -1
- package/lib/theme/index.js +3 -3
- package/lib/ticker/hooks/index.cjs +1 -0
- package/lib/ticker/hooks/index.d.ts +5 -0
- package/lib/ticker/hooks/index.js +23 -0
- package/lib/ticker/index.d.ts +1 -1
- package/lib/useConnect-CXdqKdRX.js +9 -0
- package/lib/useConnect-DcfeqwzW.cjs +1 -0
- package/lib/useCreate-ClGKVMeG.cjs +1 -0
- package/lib/useCreate-DQSfJu7r.js +7 -0
- package/lib/useDisconnect-D5cBD1bq.js +9 -0
- package/lib/useDisconnect-sA74z4IZ.cjs +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +28 -27
- package/lib/utils/ts-utility.d.ts +5 -0
- package/lib/window-resizer/hooks/index.cjs +1 -0
- package/lib/window-resizer/hooks/index.d.ts +2 -0
- package/lib/window-resizer/hooks/index.js +9 -0
- package/package.json +67 -2
- package/lib/ElementConstructor-CdUaQS-S.cjs +0 -1
- package/lib/getComponentElement-B0Qb2RbZ.js +0 -145
- package/lib/getComponentElement-BcreYwFe.cjs +0 -1
- package/lib/jsx/getComponentElement.d.ts +0 -2
- package/lib/string-Cgp_uJvP.cjs +0 -1
- package/lib/string-DCGBU6em.js +0 -134
package/lib/layout-box/index.js
CHANGED
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
var
|
|
1
|
+
var k = (i, e, s) => {
|
|
2
2
|
if (!e.has(i))
|
|
3
3
|
throw TypeError("Cannot " + s);
|
|
4
4
|
};
|
|
5
|
-
var t = (i, e, s) => (
|
|
5
|
+
var t = (i, e, s) => (k(i, e, "read from private field"), s ? s.call(i) : e.get(i)), h = (i, e, s) => {
|
|
6
6
|
if (e.has(i))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
e instanceof WeakSet ? e.add(i) : e.set(i, s);
|
|
9
|
-
}, n = (i, e, s, o) => (
|
|
10
|
-
var
|
|
11
|
-
import { cssUnitParser as
|
|
12
|
-
import { Ladder as
|
|
13
|
-
import { TICK_ORDER as
|
|
14
|
-
import { scrollEntries as
|
|
9
|
+
}, n = (i, e, s, o) => (k(i, e, "write to private field"), o ? o.call(i, s) : e.set(i, s), s);
|
|
10
|
+
var E = (i, e, s) => (k(i, e, "access private method"), s);
|
|
11
|
+
import { cssUnitParser as lt } from "../css-unit-parser/index.js";
|
|
12
|
+
import { Ladder as I } from "../ladder/index.js";
|
|
13
|
+
import { TICK_ORDER as ot, RESIZE_ORDER as at } from "../order/index.js";
|
|
14
|
+
import { scrollEntries as ct } from "../scroll-entries/index.js";
|
|
15
15
|
import { ticker as G } from "../ticker/index.js";
|
|
16
16
|
import { i as J } from "../browser-0zX67oeU.js";
|
|
17
17
|
import { g as N } from "../dom-BY7JhTx5.js";
|
|
18
|
-
import { g as
|
|
18
|
+
import { g as K, a as $ } from "../layout-HoBT_Da2.js";
|
|
19
19
|
import { elementResizer as Q } from "../element-resizer/index.js";
|
|
20
|
-
|
|
20
|
+
import { windowResizer as j } from "../window-resizer/index.js";
|
|
21
|
+
function ut(i) {
|
|
21
22
|
const e = Math.sqrt(
|
|
22
23
|
i.m11 * i.m11 + i.m12 * i.m12 + i.m13 * i.m13
|
|
23
24
|
), s = Math.sqrt(
|
|
24
25
|
i.m21 * i.m21 + i.m22 * i.m22 + i.m23 * i.m23
|
|
25
26
|
), o = Math.sqrt(
|
|
26
27
|
i.m31 * i.m31 + i.m32 * i.m32 + i.m33 * i.m33
|
|
27
|
-
),
|
|
28
|
+
), Y = Math.atan2(i.m32, i.m33), H = Math.atan2(
|
|
28
29
|
-i.m31,
|
|
29
30
|
Math.sqrt(i.m32 * i.m32 + i.m33 * i.m33)
|
|
30
|
-
),
|
|
31
|
+
), U = Math.atan2(i.m21, i.m11), u = i.m41, C = i.m42 * -1, R = i.m43;
|
|
31
32
|
return {
|
|
32
33
|
scaleX: e,
|
|
33
34
|
scaleY: s,
|
|
34
35
|
scaleZ: o,
|
|
35
|
-
rotationX:
|
|
36
|
-
rotationY:
|
|
37
|
-
rotationZ:
|
|
36
|
+
rotationX: Y,
|
|
37
|
+
rotationY: H,
|
|
38
|
+
rotationZ: U,
|
|
38
39
|
translationX: u,
|
|
39
|
-
translationY:
|
|
40
|
-
translationZ:
|
|
40
|
+
translationY: C,
|
|
41
|
+
translationZ: R
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
var a,
|
|
44
|
-
class
|
|
44
|
+
var a, m, p, _, T, O, b, v, Z, y, M, L, S, d, x, P, X, A, f, z, g, c, r, l, W, F, B, tt, D, et, V, st, w, q;
|
|
45
|
+
class vt {
|
|
45
46
|
constructor(e, s) {
|
|
46
47
|
h(this, W);
|
|
47
|
-
h(this, V);
|
|
48
48
|
h(this, B);
|
|
49
49
|
h(this, D);
|
|
50
|
+
h(this, V);
|
|
50
51
|
h(this, a, null);
|
|
51
|
-
h(this,
|
|
52
|
-
h(this,
|
|
52
|
+
h(this, m, null);
|
|
53
|
+
h(this, p, []);
|
|
53
54
|
h(this, _, "auto");
|
|
54
|
-
h(this,
|
|
55
|
-
h(this,
|
|
55
|
+
h(this, T, "top");
|
|
56
|
+
h(this, O, !1);
|
|
57
|
+
h(this, b, !0);
|
|
56
58
|
h(this, v, !0);
|
|
57
|
-
h(this,
|
|
58
|
-
h(this, T, !0);
|
|
59
|
+
h(this, Z, !0);
|
|
59
60
|
h(this, y, 0);
|
|
60
61
|
h(this, M, 0);
|
|
61
|
-
h(this,
|
|
62
|
+
h(this, L, 0);
|
|
62
63
|
h(this, S, 0);
|
|
63
64
|
h(this, d, 0);
|
|
64
|
-
h(this,
|
|
65
|
-
h(this,
|
|
66
|
-
h(this,
|
|
67
|
-
h(this,
|
|
68
|
-
h(this,
|
|
65
|
+
h(this, x, 0);
|
|
66
|
+
h(this, P, 0);
|
|
67
|
+
h(this, X, 0);
|
|
68
|
+
h(this, A, 0);
|
|
69
|
+
h(this, f, { x: 0, y: 0, z: 0 });
|
|
69
70
|
h(this, z, { x: 0, y: 0, z: 0 });
|
|
70
71
|
h(this, g, { x: 1, y: 1, z: 1 });
|
|
71
|
-
h(this, c, new
|
|
72
|
-
h(this, r, new
|
|
73
|
-
h(this, l, new
|
|
74
|
-
h(this,
|
|
75
|
-
J &&
|
|
72
|
+
h(this, c, new I({ x: 0, y: 0, z: 0 }));
|
|
73
|
+
h(this, r, new I({ x: 0, y: 0, z: 0 }));
|
|
74
|
+
h(this, l, new I({ x: 0, y: 0, z: 0 }));
|
|
75
|
+
h(this, w, () => {
|
|
76
|
+
J && E(this, D, et).call(this);
|
|
76
77
|
});
|
|
77
|
-
h(this,
|
|
78
|
-
|
|
78
|
+
h(this, q, () => {
|
|
79
|
+
E(this, V, st).call(this), E(this, W, F).call(this);
|
|
79
80
|
});
|
|
80
|
-
J && (n(this, a, N(e) || document.body), n(this,
|
|
81
|
+
J && (n(this, a, N(e) || document.body), n(this, m, N(s == null ? void 0 : s.containerElement) || document.body), n(this, _, (s == null ? void 0 : s.scrollAxis) || "auto"), n(this, T, (s == null ? void 0 : s.frontSide) || "top"), n(this, O, (s == null ? void 0 : s.cartesian) || !1), n(this, b, (s == null ? void 0 : s.sizeStep) !== void 0 ? s.sizeStep : !0), n(this, v, (s == null ? void 0 : s.positionStep) !== void 0 ? s.positionStep : !0), n(this, Z, (s == null ? void 0 : s.transformStep) !== void 0 ? s.transformStep : !0), t(this, l).setStep("_size", "+", {
|
|
81
82
|
x: 1,
|
|
82
83
|
y: 1,
|
|
83
84
|
z: 1
|
|
@@ -98,19 +99,19 @@ class Mt {
|
|
|
98
99
|
y: 0,
|
|
99
100
|
z: 0
|
|
100
101
|
}), addEventListener("DOMContentLoaded", () => {
|
|
101
|
-
|
|
102
|
+
ct.getAll(this.element).forEach((o) => {
|
|
102
103
|
this.setScrollStep(() => o);
|
|
103
104
|
});
|
|
104
|
-
}), G.subscribe(t(this,
|
|
105
|
-
order:
|
|
105
|
+
}), G.subscribe(t(this, q), {
|
|
106
|
+
order: ot.LAYOUT_BOX,
|
|
106
107
|
culling: s != null && s.culling ? this.element : void 0
|
|
107
|
-
}), Q.subscribe(this.element, t(this,
|
|
108
|
+
}), Q.subscribe(this.element, t(this, w)), j.subscribe(t(this, w), at.LAYOUT_BOX));
|
|
108
109
|
}
|
|
109
110
|
get element() {
|
|
110
111
|
return t(this, a);
|
|
111
112
|
}
|
|
112
113
|
get containerElement() {
|
|
113
|
-
return t(this,
|
|
114
|
+
return t(this, m);
|
|
114
115
|
}
|
|
115
116
|
get position() {
|
|
116
117
|
return t(this, r).current;
|
|
@@ -128,7 +129,7 @@ class Mt {
|
|
|
128
129
|
return t(this, S);
|
|
129
130
|
}
|
|
130
131
|
get front() {
|
|
131
|
-
return t(this,
|
|
132
|
+
return t(this, x);
|
|
132
133
|
}
|
|
133
134
|
get width() {
|
|
134
135
|
return t(this, y);
|
|
@@ -137,7 +138,7 @@ class Mt {
|
|
|
137
138
|
return t(this, M);
|
|
138
139
|
}
|
|
139
140
|
get depth() {
|
|
140
|
-
return t(this,
|
|
141
|
+
return t(this, L);
|
|
141
142
|
}
|
|
142
143
|
bindObject(e) {
|
|
143
144
|
e.position && t(this, r).bind(e.position), e.rotation && t(this, c).bind(e.rotation), e.scale && t(this, l).bind(e.scale);
|
|
@@ -146,15 +147,15 @@ class Mt {
|
|
|
146
147
|
e.position && t(this, r).unbind(e.position), e.rotation && t(this, c).unbind(e.rotation), e.scale && t(this, l).unbind(e.scale);
|
|
147
148
|
}
|
|
148
149
|
setScrollStep(e) {
|
|
149
|
-
return t(this,
|
|
150
|
+
return t(this, p).includes(e) || t(this, p).push(e), () => this.deleteScrollStep(e);
|
|
150
151
|
}
|
|
151
152
|
deleteScrollStep(e) {
|
|
152
|
-
n(this,
|
|
153
|
+
n(this, p, t(this, p).filter(
|
|
153
154
|
(s) => s !== e
|
|
154
155
|
));
|
|
155
156
|
}
|
|
156
157
|
destroy() {
|
|
157
|
-
G.unsubscribe(t(this,
|
|
158
|
+
G.unsubscribe(t(this, q)), Q.unsubscribe(t(this, w)), j.unsubscribe(t(this, w)), t(this, r).close(), t(this, c).close(), t(this, l).close();
|
|
158
159
|
}
|
|
159
160
|
setPositionStep(...e) {
|
|
160
161
|
t(this, r).setStep(...e);
|
|
@@ -184,27 +185,27 @@ class Mt {
|
|
|
184
185
|
t(this, l).deleteStep(...e);
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
|
-
a = new WeakMap(),
|
|
188
|
+
a = new WeakMap(), m = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), T = new WeakMap(), O = new WeakMap(), b = new WeakMap(), v = new WeakMap(), Z = new WeakMap(), y = new WeakMap(), M = new WeakMap(), L = new WeakMap(), S = new WeakMap(), d = new WeakMap(), x = new WeakMap(), P = new WeakMap(), X = new WeakMap(), A = new WeakMap(), f = new WeakMap(), z = new WeakMap(), g = new WeakMap(), c = new WeakMap(), r = new WeakMap(), l = new WeakMap(), W = new WeakSet(), F = function() {
|
|
188
189
|
t(this, l).calculate(), t(this, r).calculate(), t(this, c).calculate();
|
|
189
|
-
},
|
|
190
|
+
}, B = new WeakSet(), tt = function() {
|
|
190
191
|
t(this, l).setStep("_size", "+", {
|
|
191
|
-
x: t(this,
|
|
192
|
-
y: t(this,
|
|
193
|
-
z: t(this,
|
|
192
|
+
x: t(this, b) ? t(this, y) : 1,
|
|
193
|
+
y: t(this, b) ? t(this, M) : 1,
|
|
194
|
+
z: t(this, b) ? t(this, L) : 1
|
|
194
195
|
});
|
|
195
|
-
const e = t(this,
|
|
196
|
+
const e = t(this, v) ? t(this, P) : 0, s = t(this, v) ? t(this, X) : 0, o = t(this, v) ? t(this, A) : 0;
|
|
196
197
|
t(this, r).setStep("_position", "+", {
|
|
197
198
|
x: e,
|
|
198
199
|
y: s,
|
|
199
200
|
z: o
|
|
200
|
-
}), t(this,
|
|
201
|
+
}), t(this, Z) ? (t(this, l).setStep("_scale", "*", {
|
|
201
202
|
x: t(this, g).x,
|
|
202
203
|
y: t(this, g).y,
|
|
203
204
|
z: t(this, g).z
|
|
204
205
|
}), t(this, r).setStep("_translation", "+", {
|
|
205
|
-
x: t(this,
|
|
206
|
-
y: t(this,
|
|
207
|
-
z: t(this,
|
|
206
|
+
x: t(this, f).x,
|
|
207
|
+
y: t(this, f).y,
|
|
208
|
+
z: t(this, f).z
|
|
208
209
|
}), t(this, c).setStep("_rotation", "+", {
|
|
209
210
|
x: t(this, z).x,
|
|
210
211
|
y: t(this, z).y,
|
|
@@ -222,35 +223,35 @@ a = new WeakMap(), p = new WeakMap(), f = new WeakMap(), _ = new WeakMap(), Y =
|
|
|
222
223
|
y: 0,
|
|
223
224
|
z: 0
|
|
224
225
|
}));
|
|
225
|
-
},
|
|
226
|
+
}, D = new WeakSet(), et = function() {
|
|
226
227
|
const e = getComputedStyle(t(this, a));
|
|
227
|
-
n(this, y, Math.max(t(this, a).clientWidth, 1)), n(this, M, Math.max(t(this, a).clientHeight, 1)), n(this,
|
|
228
|
-
|
|
228
|
+
n(this, y, Math.max(t(this, a).clientWidth, 1)), n(this, M, Math.max(t(this, a).clientHeight, 1)), n(this, L, Math.max(
|
|
229
|
+
lt.parse(e.getPropertyValue("--depth") || "0px"),
|
|
229
230
|
1
|
|
230
231
|
));
|
|
231
|
-
const s =
|
|
232
|
-
if (n(this, d,
|
|
233
|
-
const
|
|
234
|
-
n(this, d, (
|
|
232
|
+
const s = K(t(this, m)), o = $(t(this, m)), Y = t(this, m).clientWidth, H = t(this, m).clientHeight;
|
|
233
|
+
if (n(this, d, K(t(this, a)) - s), n(this, S, $(t(this, a)) - o), t(this, _) === "z") {
|
|
234
|
+
const C = t(this, d) / Y, R = t(this, S) / H;
|
|
235
|
+
n(this, d, (C - Math.floor(C)) * Y), n(this, S, (R - Math.floor(R)) * H), t(this, T) === "left" ? n(this, x, K(t(this, a)) - s - t(this, d)) : n(this, x, $(t(this, a)) - o - t(this, S));
|
|
235
236
|
}
|
|
236
|
-
if (n(this, d, t(this, d) + t(this, a).clientLeft), n(this, S, t(this, S) + t(this, a).clientTop), t(this,
|
|
237
|
-
const
|
|
238
|
-
n(this,
|
|
237
|
+
if (n(this, d, t(this, d) + t(this, a).clientLeft), n(this, S, t(this, S) + t(this, a).clientTop), t(this, O)) {
|
|
238
|
+
const C = Math.round(Y / 2), R = Math.round(H / 2), it = t(this, y) ? Math.round(t(this, y) / 2) : 0, ht = t(this, M) ? Math.round(t(this, M) / 2) : 0, nt = t(this, d) - C + it, rt = (t(this, S) - R + ht) * -1;
|
|
239
|
+
n(this, P, nt), n(this, X, rt);
|
|
239
240
|
} else
|
|
240
|
-
n(this,
|
|
241
|
-
n(this,
|
|
242
|
-
const
|
|
243
|
-
t(this,
|
|
244
|
-
},
|
|
245
|
-
for (let e = 0; e < t(this,
|
|
246
|
-
const s = t(this,
|
|
241
|
+
n(this, P, t(this, d)), n(this, X, t(this, S));
|
|
242
|
+
n(this, A, t(this, x) * -1);
|
|
243
|
+
const U = new WebKitCSSMatrix(e.transform), u = ut(U);
|
|
244
|
+
t(this, f).x = u.translationX, t(this, f).y = u.translationY, t(this, f).z = u.translationZ, t(this, g).x = u.scaleX, t(this, g).y = u.scaleY, t(this, g).z = u.scaleZ, t(this, z).x = u.rotationX, t(this, z).y = u.rotationY, t(this, z).z = u.rotationZ, E(this, B, tt).call(this), E(this, W, F).call(this);
|
|
245
|
+
}, V = new WeakSet(), st = function() {
|
|
246
|
+
for (let e = 0; e < t(this, p).length; e++) {
|
|
247
|
+
const s = t(this, p)[e]();
|
|
247
248
|
let o = s.axis;
|
|
248
249
|
t(this, _) !== "auto" && (o = t(this, _)), t(this, r).setStep(`_scroll_${e}`, "+", {
|
|
249
|
-
[o]: s.value * (o === "x" ? -1 : t(this,
|
|
250
|
+
[o]: s.value * (o === "x" ? -1 : t(this, O) ? 1 : -1)
|
|
250
251
|
});
|
|
251
252
|
}
|
|
252
|
-
},
|
|
253
|
+
}, w = new WeakMap(), q = new WeakMap();
|
|
253
254
|
export {
|
|
254
|
-
|
|
255
|
-
|
|
255
|
+
vt as LayoutBox,
|
|
256
|
+
ut as decomposeCSSMatrix
|
|
256
257
|
};
|
package/lib/modal/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const b=require("../browser-CpzFX2xg.cjs"),s=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const b=require("../browser-CpzFX2xg.cjs"),s=require("../tags-DX-eNxbA.cjs"),m=require("../createStylesheet-C0OnN0Br.cjs"),g=require("../popover/index.cjs"),d=require("../theme/index.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=(t,e,o,r)=>{for(var n=r>1?void 0:r?_(e,o):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(n=(r?h(e,o,n):h(n))||n);return r&&n&&w(e,o,n),n},p=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(p(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},f=(t,e,o,r)=>(p(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const C=m.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:d.aptechkaTheme.durationShort.var},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",top:"var(---close-button-top, 0.5em)",right:"var(---close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(---close-button-size, 1.5em)",height:"var(---close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:d.aptechkaTheme.durationShort.var,willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(---close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${d.aptechkaTheme.colorDark.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends g.PopoverElement{constructor(){super(),u(this,i,null),u(this,a,null),b.isBrowser&&(this.openShadow(C),s.element(this,{children:s.div({class:"inner",outside:!0,children:s.div({class:"content",children:[s.element("e-popover-button",{type:"close",target:this.id,class:"close-button",children:[s.slot({name:"close-button",children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>f(this,a,e)})}),f(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=y([v.define("e-modal")],exports.ModalElement);
|
package/lib/modal/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { define as g } from "../custom-element/index.js";
|
|
2
2
|
import "../Store-JOKrNVEr.js";
|
|
3
3
|
import { i as w } from "../browser-0zX67oeU.js";
|
|
4
|
-
import { e as d, D as f, ax as u, aA as _ } from "../tags-
|
|
5
|
-
import { c as y } from "../createStylesheet-
|
|
4
|
+
import { e as d, D as f, ax as u, aA as _ } from "../tags-C2jg1zYB.js";
|
|
5
|
+
import { c as y } from "../createStylesheet-CD11E4C8.js";
|
|
6
6
|
import { PopoverElement as C } from "../popover/index.js";
|
|
7
7
|
import { aptechkaTheme as h } from "../theme/index.js";
|
|
8
8
|
var k = Object.defineProperty, x = Object.getOwnPropertyDescriptor, z = (t, e, o, r) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function s(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function c(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Node)return e;const t=Array.isArray(e)?[]:{};for(const r in e)e.hasOwnProperty(r)&&(t[r]=c(e[r]));return t}function f(e,t,r=s){for(const n in t)r(t[n])?(e[n]||Object.assign(e,{[n]:{}}),f(e[n],t[n],r)):Object.assign(e,{[n]:t[n]});return e}function u(e){return e===null||typeof e=="undefined"}function i(e,t){if(typeof e!=typeof t)return!1;if([e,t].some(r=>u(r)))return e===t;if(Array.isArray(e)){const r=e.length>t.length?e:t,n=e.length>t.length?t:e;return r.every((o,p)=>i(o,n[p]))}if(typeof e!="object"||e instanceof Node||typeof e=="object"&&e.constructor.toString().startsWith("class"))return e===t;for(const r in e){if(!t.hasOwnProperty(r))return!1;if(typeof e[r]=="object"&&typeof t[r]=="object"){if(!i(e[r],t[r]))return!1}else if(e[r]!==t[r])return!1}return!0}function y(e,t){const r={};for(const n in e)t.includes(n)&&(r[n]=e[n]);return r}function l(e,t){const r={};for(const n in e)t.includes(n)||(r[n]=e[n]);return r}function a(e){var t;return typeof e=="function"&&((t=Object.getOwnPropertyDescriptor(e,"prototype"))==null?void 0:t.writable)===!1}function O(e,...t){t.forEach(r=>{Object.getOwnPropertyNames(r.prototype).forEach(n=>{console.log(n),Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(r.prototype,n)||Object.create(null))})})}exports.cloneDeep=c;exports.compareObjects=i;exports.isESClass=a;exports.isNullish=u;exports.isObject=s;exports.mergeDeep=f;exports.mixin=O;exports.omit=l;exports.pick=y;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
function c(e) {
|
|
2
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
3
|
+
}
|
|
4
|
+
function y(e) {
|
|
5
|
+
if (e === null || typeof e != "object")
|
|
6
|
+
return e;
|
|
7
|
+
if (e instanceof Date)
|
|
8
|
+
return new Date(e.getTime());
|
|
9
|
+
if (e instanceof Node)
|
|
10
|
+
return e;
|
|
11
|
+
const t = Array.isArray(e) ? [] : {};
|
|
12
|
+
for (const r in e)
|
|
13
|
+
e.hasOwnProperty(r) && (t[r] = y(e[r]));
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
function o(e, t, r = c) {
|
|
17
|
+
for (const n in t)
|
|
18
|
+
r(t[n]) ? (e[n] || Object.assign(e, { [n]: {} }), o(e[n], t[n], r)) : Object.assign(e, { [n]: t[n] });
|
|
19
|
+
return e;
|
|
20
|
+
}
|
|
21
|
+
function u(e) {
|
|
22
|
+
return e === null || typeof e == "undefined";
|
|
23
|
+
}
|
|
24
|
+
function i(e, t) {
|
|
25
|
+
if (typeof e != typeof t)
|
|
26
|
+
return !1;
|
|
27
|
+
if ([e, t].some((r) => u(r)))
|
|
28
|
+
return e === t;
|
|
29
|
+
if (Array.isArray(e)) {
|
|
30
|
+
const r = e.length > t.length ? e : t, n = e.length > t.length ? t : e;
|
|
31
|
+
return r.every(
|
|
32
|
+
(s, f) => i(s, n[f])
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
if (typeof e != "object" || e instanceof Node || typeof e == "object" && e.constructor.toString().startsWith("class"))
|
|
36
|
+
return e === t;
|
|
37
|
+
for (const r in e) {
|
|
38
|
+
if (!t.hasOwnProperty(r))
|
|
39
|
+
return !1;
|
|
40
|
+
if (typeof e[r] == "object" && typeof t[r] == "object") {
|
|
41
|
+
if (!i(e[r], t[r]))
|
|
42
|
+
return !1;
|
|
43
|
+
} else if (e[r] !== t[r])
|
|
44
|
+
return !1;
|
|
45
|
+
}
|
|
46
|
+
return !0;
|
|
47
|
+
}
|
|
48
|
+
function a(e, t) {
|
|
49
|
+
const r = {};
|
|
50
|
+
for (const n in e)
|
|
51
|
+
t.includes(n) && (r[n] = e[n]);
|
|
52
|
+
return r;
|
|
53
|
+
}
|
|
54
|
+
function p(e, t) {
|
|
55
|
+
const r = {};
|
|
56
|
+
for (const n in e)
|
|
57
|
+
t.includes(n) || (r[n] = e[n]);
|
|
58
|
+
return r;
|
|
59
|
+
}
|
|
60
|
+
function l(e) {
|
|
61
|
+
var t;
|
|
62
|
+
return typeof e == "function" && ((t = Object.getOwnPropertyDescriptor(e, "prototype")) == null ? void 0 : t.writable) === !1;
|
|
63
|
+
}
|
|
64
|
+
function O(e, ...t) {
|
|
65
|
+
t.forEach((r) => {
|
|
66
|
+
Object.getOwnPropertyNames(r.prototype).forEach((n) => {
|
|
67
|
+
console.log(n), Object.defineProperty(
|
|
68
|
+
e.prototype,
|
|
69
|
+
n,
|
|
70
|
+
Object.getOwnPropertyDescriptor(r.prototype, n) || /* @__PURE__ */ Object.create(null)
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
c as a,
|
|
77
|
+
u as b,
|
|
78
|
+
y as c,
|
|
79
|
+
i as d,
|
|
80
|
+
O as e,
|
|
81
|
+
l as i,
|
|
82
|
+
o as m,
|
|
83
|
+
p as o,
|
|
84
|
+
a as p
|
|
85
|
+
};
|
package/lib/router/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var X=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var z=(n,t,s)=>{if(!t.has(n))throw TypeError("Cannot "+s)};var e=(n,t,s)=>(z(n,t,"read from private field"),s?s.call(n):t.get(n)),o=(n,t,s)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,s)},r=(n,t,s,i)=>(z(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s);var F=(n,t,s)=>(z(n,t,"access private method"),s);var B=(n,t,s)=>new Promise((i,f)=>{var h=u=>{try{d(s.next(u))}catch(T){f(T)}},a=u=>{try{d(s.throw(u))}catch(T){f(T)}},d=u=>u.done?i(u.value):Promise.resolve(u.value).then(h,a);d((s=s.apply(n,t)).next())});var G=(n,t,s)=>(t=n[X("asyncIterator")])?t.call(n):(n=n[X("iterator")](),t={},s=(i,f)=>(f=n[i])&&(t[i]=h=>new Promise((a,d,u)=>(h=f.call(n,h),u=h.done,Promise.resolve(h.value).then(T=>a({value:T,done:u}),d)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const et=require("urlpattern-polyfill"),st=require("../notifier/index.cjs"),_=require("../browser-CpzFX2xg.cjs"),it=require("../function-MthRj-GJ.cjs");require("../Store-D0_rDIsE.cjs");const Z=require("../
|
|
1
|
+
"use strict";var X=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var z=(n,t,s)=>{if(!t.has(n))throw TypeError("Cannot "+s)};var e=(n,t,s)=>(z(n,t,"read from private field"),s?s.call(n):t.get(n)),o=(n,t,s)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,s)},r=(n,t,s,i)=>(z(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s);var F=(n,t,s)=>(z(n,t,"access private method"),s);var B=(n,t,s)=>new Promise((i,f)=>{var h=u=>{try{d(s.next(u))}catch(T){f(T)}},a=u=>{try{d(s.throw(u))}catch(T){f(T)}},d=u=>u.done?i(u.value):Promise.resolve(u.value).then(h,a);d((s=s.apply(n,t)).next())});var G=(n,t,s)=>(t=n[X("asyncIterator")])?t.call(n):(n=n[X("iterator")](),t={},s=(i,f)=>(f=n[i])&&(t[i]=h=>new Promise((a,d,u)=>(h=f.call(n,h),u=h.done,Promise.resolve(h.value).then(T=>a({value:T,done:u}),d)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const et=require("urlpattern-polyfill"),st=require("../notifier/index.cjs"),_=require("../browser-CpzFX2xg.cjs"),it=require("../function-MthRj-GJ.cjs");require("../Store-D0_rDIsE.cjs");const Z=require("../object-BZELAoVj.cjs"),nt=require("../instantiate-BAz2WZtO.cjs");var b,O,R,m,l,v,S,p,P,y,I,$;class rt{constructor(t,s){o(this,I);o(this,b,void 0);o(this,O,void 0);o(this,R,void 0);o(this,m,void 0);o(this,l,void 0);o(this,v,void 0);o(this,S,void 0);o(this,p,null);o(this,P,[]);o(this,y,[]);r(this,b,t),r(this,O,s),r(this,R,new URLPattern({pathname:e(this,b)})),r(this,m,null),r(this,l,null),r(this,v,!1),r(this,S,null),_.isBrowser&&r(this,p,new MutationObserver(i=>{i[0].addedNodes.forEach(h=>{e(this,m)?e(this,y).push(h):e(this,P).push(h)})}))}get pattern(){return e(this,b)}get urlPattern(){return e(this,R)}get isActive(){return e(this,v)}get element(){return e(this,l)}get nest(){return e(this,S)}testPathname(t){return this.urlPattern.test({pathname:t})}render(t,s){return B(this,null,function*(){var i,f;if(e(this,p).observe(document.head,{childList:!0,subtree:!0}),e(this,m))e(this,P).forEach(h=>{document.head.appendChild(h)});else{const h=yield e(this,O).call(this);if(r(this,y,[...e(this,P)]),typeof h.default=="function"&&(r(this,m,h.default),Z.isESClass(h.default))){const a="e-"+((i=e(this,m))==null?void 0:i.name.toLowerCase());customElements.get(a)||customElements.define(a,h.default)}}if(yield F(this,I,$).call(this),e(this,m)){const h=e(this,R).exec({pathname:s}),a=(h==null?void 0:h.pathname.groups)||{},d=Object.fromEntries(new URLSearchParams(location.search)),u={pathnameParams:a,searchParams:d};Z.isESClass(e(this,m))?r(this,l,new(e(this,m))(u)):r(this,l,nt.instantiate(e(this,m),u)),t.appendChild(e(this,l)),r(this,S,e(this,l).querySelector("[data-nest]")||((f=e(this,l).shadowRoot)==null?void 0:f.querySelector("[data-nest]"))||e(this,l).shadowRoot||e(this,l)),r(this,v,!0)}e(this,p).disconnect()})}close(){var t;e(this,p).disconnect(),(t=e(this,l))==null||t.remove(),r(this,v,!1),e(this,y).forEach(s=>document.head.removeChild(s)),r(this,y,[])}getAnchorElements(){var s;let t=[];return e(this,l)&&(t=[...e(this,l).querySelectorAll("a")]),(s=e(this,l))!=null&&s.shadowRoot&&(t=[...t,...e(this,l).shadowRoot.querySelectorAll("a")]),t}}b=new WeakMap,O=new WeakMap,R=new WeakMap,m=new WeakMap,l=new WeakMap,v=new WeakMap,S=new WeakMap,p=new WeakMap,P=new WeakMap,y=new WeakMap,I=new WeakSet,$=function(){return B(this,null,function*(){const t=e(this,P).filter(a=>a instanceof HTMLElement?a.tagName==="STYLE"||a.tagName==="SCRIPT"||a.tagName==="LINK":!1);try{for(var s=G(t),i,f,h;i=!(f=yield s.next()).done;i=!1){const a=f.value;yield new Promise(d=>{a.onload=()=>{d()}})}}catch(f){h=[f]}finally{try{i&&(f=s.return)&&(yield f.call(s))}finally{if(h)throw h[0]}}})};var H,g,A,U,j;class ot{constructor(t,s){o(this,H,void 0);o(this,g,void 0);o(this,A,void 0);o(this,U,void 0);o(this,j,t=>{t.preventDefault(),e(this,H).navigate(e(this,A),e(this,U))});r(this,H,t),r(this,g,s),r(this,A,e(this,g).getAttribute("href")||"/"),r(this,U,e(this,g).getAttribute("data-history-action")||"push"),e(this,g).addEventListener("click",e(this,j)),location.pathname===e(this,A)&&e(this,g).classList.add("current")}destroy(){e(this,g).removeEventListener("click",e(this,j)),e(this,g).classList.remove("current")}}H=new WeakMap,g=new WeakMap,A=new WeakMap,U=new WeakMap,j=new WeakMap;globalThis.URLPattern=et.URLPattern;var q,k,w,C,M,E,N,x,D,K,tt,W;const Y=class Y{constructor(t){o(this,K);o(this,q,null);o(this,k,void 0);o(this,w,[]);o(this,C,null);o(this,M,[]);o(this,E,void 0);o(this,N,null);o(this,x,new st.Notifier);o(this,D,it.debounce(()=>{const t=s=>s.split("/").length;r(this,w,e(this,w).sort((s,i)=>t(s.pattern)-t(i.pattern))),this.navigate(location.pathname.replace(e(this,k),""))},0));o(this,W,t=>{t.state&&this.navigate(t.state,"none")});r(this,k,(t==null?void 0:t.base)||""),Y.active=this,_.isBrowser&&(r(this,q,(t==null?void 0:t.rootElement)||document.body),addEventListener("popstate",e(this,W)))}get currentPathname(){return e(this,N)}get candidatePathname(){return e(this,E)}get routes(){return e(this,w)}navigationEvent(t){return e(this,x).subscribe(t)}defineRoute(t,s){const i=new rt(t,s);e(this,w).push(i),e(this,D).call(this)}navigate(t,s="push"){return B(this,null,function*(){var u,Q;if(e(this,E)===t||e(this,N)===t)return;Y.active=this,r(this,E,t);const i=e(this,w).filter(c=>c.isActive),f=e(this,w).filter(c=>!i.includes(c)&&c.testPathname(t)),h=i.filter(c=>!c.testPathname(t)),a=i.filter(c=>c.testPathname(t));let d=!0;if(this.preprocessor)try{yield new Promise((c,L)=>{var V;(V=this.preprocessor)==null||V.call(this,{pathname:t,resolve:c,reject:L})})}catch(c){c?console.error(c):console.log("Route change canceled"),d=!1}if(d&&e(this,E)===t){r(this,C,a[a.length-1]),h.forEach(L=>{L.close()}),r(this,N,t);try{for(var T=G(f),ct,lt,ut;ct=!(lt=yield T.next()).done;ct=!1){const L=lt.value;yield L.render(((u=e(this,C))==null?void 0:u.nest)||e(this,q),t),r(this,C,L)}}catch(lt){ut=[lt]}finally{try{ct&&(lt=T.return)&&(yield lt.call(T))}finally{if(ut)throw ut[0]}}const c=e(this,k)+t+location.search;s==="push"?history.pushState(c,"",c):s==="replace"&&history.replaceState(c,"",c),F(this,K,tt).call(this),(Q=this.postprocessor)==null||Q.call(this,{pathname:t}),e(this,x).notify({pathname:t})}})}};q=new WeakMap,k=new WeakMap,w=new WeakMap,C=new WeakMap,M=new WeakMap,E=new WeakMap,N=new WeakMap,x=new WeakMap,D=new WeakMap,K=new WeakSet,tt=function(){const t=e(this,w).filter(i=>i.isActive),s=Array.from(new Set([...e(this,q).querySelectorAll("a"),...t.map(i=>i.getAnchorElements()).flat()].filter(i=>{var f;return(f=i.getAttribute("href"))==null?void 0:f.startsWith("/")})));e(this,M).forEach(i=>{i.destroy()}),r(this,M,s.map(i=>new ot(this,i)))},W=new WeakMap;let J=Y;exports.Router=J;
|
package/lib/router/index.js
CHANGED
|
@@ -31,8 +31,8 @@ import { Notifier as st } from "../notifier/index.js";
|
|
|
31
31
|
import { i as Z } from "../browser-0zX67oeU.js";
|
|
32
32
|
import { d as it } from "../function-C10DGppn.js";
|
|
33
33
|
import "../Store-JOKrNVEr.js";
|
|
34
|
-
import { i as V } from "../
|
|
35
|
-
import {
|
|
34
|
+
import { i as V } from "../object-R34VLqhp.js";
|
|
35
|
+
import { i as nt } from "../instantiate-BDteLwW6.js";
|
|
36
36
|
var R, U, b, m, l, w, A, v, P, E, B, _;
|
|
37
37
|
class rt {
|
|
38
38
|
constructor(t, s) {
|
|
@@ -142,44 +142,44 @@ R = new WeakMap(), U = new WeakMap(), b = new WeakMap(), m = new WeakMap(), l =
|
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
144
|
};
|
|
145
|
-
var H,
|
|
145
|
+
var H, p, S, O, x;
|
|
146
146
|
class ot {
|
|
147
147
|
constructor(t, s) {
|
|
148
148
|
o(this, H, void 0);
|
|
149
|
-
o(this,
|
|
149
|
+
o(this, p, void 0);
|
|
150
150
|
o(this, S, void 0);
|
|
151
151
|
o(this, O, void 0);
|
|
152
152
|
o(this, x, (t) => {
|
|
153
153
|
t.preventDefault(), e(this, H).navigate(e(this, S), e(this, O));
|
|
154
154
|
});
|
|
155
|
-
r(this, H, t), r(this,
|
|
155
|
+
r(this, H, t), r(this, p, s), r(this, S, e(this, p).getAttribute("href") || "/"), r(this, O, e(this, p).getAttribute("data-history-action") || "push"), e(this, p).addEventListener("click", e(this, x)), location.pathname === e(this, S) && e(this, p).classList.add("current");
|
|
156
156
|
}
|
|
157
157
|
destroy() {
|
|
158
|
-
e(this,
|
|
158
|
+
e(this, p).removeEventListener("click", e(this, x)), e(this, p).classList.remove("current");
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
H = new WeakMap(),
|
|
161
|
+
H = new WeakMap(), p = new WeakMap(), S = new WeakMap(), O = new WeakMap(), x = new WeakMap();
|
|
162
162
|
globalThis.URLPattern = et;
|
|
163
|
-
var k,
|
|
163
|
+
var k, N, g, C, I, L, q, M, D, K, tt, W;
|
|
164
164
|
const Y = class Y {
|
|
165
165
|
constructor(t) {
|
|
166
166
|
o(this, K);
|
|
167
167
|
o(this, k, null);
|
|
168
|
-
o(this,
|
|
169
|
-
o(this,
|
|
170
|
-
o(this,
|
|
168
|
+
o(this, N, void 0);
|
|
169
|
+
o(this, g, []);
|
|
170
|
+
o(this, C, null);
|
|
171
171
|
o(this, I, []);
|
|
172
172
|
o(this, L, void 0);
|
|
173
173
|
o(this, q, null);
|
|
174
174
|
o(this, M, new st());
|
|
175
175
|
o(this, D, it(() => {
|
|
176
176
|
const t = (s) => s.split("/").length;
|
|
177
|
-
r(this,
|
|
177
|
+
r(this, g, e(this, g).sort((s, i) => t(s.pattern) - t(i.pattern))), this.navigate(location.pathname.replace(e(this, N), ""));
|
|
178
178
|
}, 0));
|
|
179
179
|
o(this, W, (t) => {
|
|
180
180
|
t.state && this.navigate(t.state, "none");
|
|
181
181
|
});
|
|
182
|
-
r(this,
|
|
182
|
+
r(this, N, (t == null ? void 0 : t.base) || ""), Y.active = this, Z && (r(this, k, (t == null ? void 0 : t.rootElement) || document.body), addEventListener("popstate", e(this, W)));
|
|
183
183
|
}
|
|
184
184
|
get currentPathname() {
|
|
185
185
|
return e(this, q);
|
|
@@ -188,14 +188,14 @@ const Y = class Y {
|
|
|
188
188
|
return e(this, L);
|
|
189
189
|
}
|
|
190
190
|
get routes() {
|
|
191
|
-
return e(this,
|
|
191
|
+
return e(this, g);
|
|
192
192
|
}
|
|
193
193
|
navigationEvent(t) {
|
|
194
194
|
return e(this, M).subscribe(t);
|
|
195
195
|
}
|
|
196
196
|
defineRoute(t, s) {
|
|
197
197
|
const i = new rt(t, s);
|
|
198
|
-
e(this,
|
|
198
|
+
e(this, g).push(i), e(this, D).call(this);
|
|
199
199
|
}
|
|
200
200
|
navigate(t, s = "push") {
|
|
201
201
|
return j(this, null, function* () {
|
|
@@ -203,7 +203,7 @@ const Y = class Y {
|
|
|
203
203
|
if (e(this, L) === t || e(this, q) === t)
|
|
204
204
|
return;
|
|
205
205
|
Y.active = this, r(this, L, t);
|
|
206
|
-
const i = e(this,
|
|
206
|
+
const i = e(this, g).filter((c) => c.isActive), f = e(this, g).filter(
|
|
207
207
|
(c) => !i.includes(c) && c.testPathname(t)
|
|
208
208
|
), h = i.filter((c) => !c.testPathname(t)), a = i.filter((c) => c.testPathname(t));
|
|
209
209
|
let d = !0;
|
|
@@ -217,13 +217,13 @@ const Y = class Y {
|
|
|
217
217
|
c ? console.error(c) : console.log("Route change canceled"), d = !1;
|
|
218
218
|
}
|
|
219
219
|
if (d && e(this, L) === t) {
|
|
220
|
-
r(this,
|
|
220
|
+
r(this, C, a[a.length - 1]), h.forEach((y) => {
|
|
221
221
|
y.close();
|
|
222
222
|
}), r(this, q, t);
|
|
223
223
|
try {
|
|
224
224
|
for (var T = F(f), wt, vt, Pt; wt = !(vt = yield T.next()).done; wt = !1) {
|
|
225
225
|
const y = vt.value;
|
|
226
|
-
yield y.render(((u = e(this,
|
|
226
|
+
yield y.render(((u = e(this, C)) == null ? void 0 : u.nest) || e(this, k), t), r(this, C, y);
|
|
227
227
|
}
|
|
228
228
|
} catch (vt) {
|
|
229
229
|
Pt = [vt];
|
|
@@ -235,14 +235,14 @@ const Y = class Y {
|
|
|
235
235
|
throw Pt[0];
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
const c = e(this,
|
|
238
|
+
const c = e(this, N) + t + location.search;
|
|
239
239
|
s === "push" ? history.pushState(c, "", c) : s === "replace" && history.replaceState(c, "", c), z(this, K, tt).call(this), (G = this.postprocessor) == null || G.call(this, { pathname: t }), e(this, M).notify({ pathname: t });
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
k = new WeakMap(),
|
|
245
|
-
const t = e(this,
|
|
244
|
+
k = new WeakMap(), N = new WeakMap(), g = new WeakMap(), C = new WeakMap(), I = new WeakMap(), L = new WeakMap(), q = new WeakMap(), M = new WeakMap(), D = new WeakMap(), K = new WeakSet(), tt = function() {
|
|
245
|
+
const t = e(this, g).filter((i) => i.isActive), s = Array.from(
|
|
246
246
|
new Set(
|
|
247
247
|
[
|
|
248
248
|
...e(this, k).querySelectorAll("a"),
|