aptechka 0.7.10 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Animation-CwgyQH5y.js +110 -0
- package/lib/Animation-DBfrekcV.cjs +1 -0
- package/lib/{Composed-Dx2hs-va.cjs → Composed-CIXY_HwN.cjs} +1 -1
- package/lib/{Composed-DmLYTh1b.js → Composed-CgnR5oah.js} +1 -1
- package/lib/Damped-DmcKRSST.cjs +1 -0
- package/lib/Damped-vepIw9Ku.js +57 -0
- package/lib/{Derived-DlCvc0xQ.js → Derived-B4CxuebG.js} +1 -1
- package/lib/{Derived-a6MDQEPY.cjs → Derived-Xb4EzLLO.cjs} +1 -1
- package/lib/{SourceManager-kxr5eUyL.cjs → SourceManager-Ce49-NQe.cjs} +1 -1
- package/lib/{SourceManager-Bz329f90.js → SourceManager-U3KHUnNl.js} +1 -1
- package/lib/Store-CIs_NjhF.cjs +1 -0
- package/lib/Store-Dqcu1DnE.js +152 -0
- package/lib/{Tweened-B_mclQ61.cjs → Tweened-5Bj7ht3x.cjs} +1 -1
- package/lib/{Tweened-NE8M9onF.js → Tweened-DPi9pZ8Q.js} +1 -1
- package/lib/{Viewport-D9IL7kUQ.js → Viewport-4ZTWxLo_.js} +1 -1
- package/lib/{Viewport-CJeKnL5V.cjs → Viewport-CIBlSU2t.cjs} +1 -1
- package/lib/animation/Animation.d.ts +3 -18
- package/lib/animation/Damped.d.ts +2 -18
- package/lib/animation/Tweened.d.ts +2 -2
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.d.ts +2 -2
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +3 -3
- package/lib/attribute/index.js +1 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +1 -0
- package/lib/canvas/index.js +63 -54
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +3 -3
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/{createStylesheet-p23sZ7Ey.cjs → createStylesheet-BX1RVTfW.cjs} +1 -1
- package/lib/{createStylesheet-CR_yi5tp.js → createStylesheet-CgWN4UhW.js} +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +3 -3
- package/lib/css-property/index.js +1 -1
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/Viewport.d.ts +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/ElementConstructor.d.ts +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +113 -114
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.js +2 -2
- package/lib/en3/misc/En3SourceManager.d.ts +2 -2
- package/lib/en3/misc/index.cjs +1 -1
- package/lib/en3/misc/index.js +2 -2
- package/lib/en3/objects/fluid/En3Fluid.d.ts +5 -5
- package/lib/en3/objects/fluid/Simulation.d.ts +10 -10
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/{index-CoOTQk9H.js → index-C2xWAQFq.js} +3 -3
- package/lib/{index-DVUk3T-y.cjs → index-DfSyc2GT.cjs} +1 -1
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/layout-box/index.d.ts +2 -2
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +7 -7
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +140 -133
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -2
- package/lib/popover/PopoverElement.d.ts +1 -1
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +73 -76
- package/lib/scroll/ScrollElement.d.ts +1 -1
- package/lib/scroll/ScrollSegmentElement.d.ts +6 -6
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +7 -7
- 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 +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/Derived.d.ts +1 -1
- package/lib/store/Resource.d.ts +1 -4
- package/lib/store/Store.d.ts +10 -10
- package/lib/store/StoreRegistry.d.ts +1 -1
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +1 -3
- package/lib/store/index.js +38 -68
- package/lib/tags-C-6uXIAT.js +848 -0
- package/lib/tags-yvEoM921.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/tweaker/TweakerFieldElement.d.ts +3 -3
- package/lib/tweaker/TweakerFolderElement.d.ts +2 -2
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -1
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +56 -56
- package/lib/tweaker/tweakerManagerConstructors.d.ts +1 -1
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/package.json +1 -65
- package/lib/Animation-6Na1MCtM.cjs +0 -1
- package/lib/Animation-CELiTw3n.js +0 -132
- package/lib/Damped-Mx_FNNVz.js +0 -63
- package/lib/Damped-loFiBsBy.cjs +0 -1
- package/lib/ElementConstructor-CAZ2ra8m.cjs +0 -1
- package/lib/ElementConstructor-OYlPJf2L.js +0 -366
- package/lib/Resource-D3TQormz.cjs +0 -1
- package/lib/Resource-DIcoALGo.js +0 -64
- package/lib/Store-6s0YXK4o.cjs +0 -1
- package/lib/Store-BI2xxXOA.js +0 -156
- package/lib/_createStore-Cf1MyeHa.cjs +0 -1
- package/lib/_createStore-Ck9bHolX.js +0 -12
- package/lib/globals-DMjysUXI.js +0 -8
- package/lib/globals-bYKki-b9.cjs +0 -1
- package/lib/instantiate-Cx-JmH6m.cjs +0 -1
- package/lib/instantiate-D87JFF1W.js +0 -125
- package/lib/jsx/ComponentElement.d.ts +0 -18
- package/lib/jsx/globals.d.ts +0 -13
- package/lib/jsx/h.d.ts +0 -7
- package/lib/jsx/hooks/basic/_createStore.d.ts +0 -4
- package/lib/jsx/hooks/basic/attachInternals.d.ts +0 -1
- package/lib/jsx/hooks/basic/attachShadow.d.ts +0 -1
- package/lib/jsx/hooks/basic/attachStylesheet.d.ts +0 -3
- package/lib/jsx/hooks/basic/createContext.d.ts +0 -2
- package/lib/jsx/hooks/basic/onConnect.d.ts +0 -3
- package/lib/jsx/hooks/basic/onDisconnect.d.ts +0 -3
- package/lib/jsx/hooks/onAnimationFrame.cjs +0 -1
- package/lib/jsx/hooks/onAnimationFrame.d.ts +0 -6
- package/lib/jsx/hooks/onAnimationFrame.js +0 -22
- package/lib/jsx/hooks/onElementResize.cjs +0 -1
- package/lib/jsx/hooks/onElementResize.d.ts +0 -5
- package/lib/jsx/hooks/onElementResize.js +0 -11
- package/lib/jsx/hooks/onIntersection.cjs +0 -1
- package/lib/jsx/hooks/onIntersection.d.ts +0 -5
- package/lib/jsx/hooks/onIntersection.js +0 -11
- package/lib/jsx/hooks/onWindowResize.cjs +0 -1
- package/lib/jsx/hooks/onWindowResize.d.ts +0 -3
- package/lib/jsx/hooks/onWindowResize.js +0 -8
- package/lib/jsx/hooks/store/createArrayStore.d.ts +0 -3
- package/lib/jsx/hooks/store/createComposed.d.ts +0 -3
- package/lib/jsx/hooks/store/createDerived.d.ts +0 -3
- package/lib/jsx/hooks/store/createDerivedArray.d.ts +0 -3
- package/lib/jsx/hooks/store/createDerivedComponent.d.ts +0 -3
- package/lib/jsx/hooks/store/createDerivedComponents.d.ts +0 -3
- package/lib/jsx/hooks/store/createResource.d.ts +0 -3
- package/lib/jsx/hooks/store/createStore.d.ts +0 -3
- package/lib/jsx/hooks/store/index.cjs +0 -1
- package/lib/jsx/hooks/store/index.d.ts +0 -7
- package/lib/jsx/hooks/store/index.js +0 -49
- package/lib/jsx/hooks/watchAttribute.cjs +0 -1
- package/lib/jsx/hooks/watchAttribute.d.ts +0 -6
- package/lib/jsx/hooks/watchAttribute.js +0 -17
- package/lib/jsx/hooks/watchCSSProperty.cjs +0 -1
- package/lib/jsx/hooks/watchCSSProperty.d.ts +0 -7
- package/lib/jsx/hooks/watchCSSProperty.js +0 -17
- package/lib/jsx/index.cjs +0 -1
- package/lib/jsx/index.d.ts +0 -13
- package/lib/jsx/index.js +0 -91
- package/lib/jsx/instantiate.d.ts +0 -5
- package/lib/jsx/register.d.ts +0 -1
- package/lib/jsx/render.d.ts +0 -6
- package/lib/jsx/type.d.ts +0 -188
- package/lib/onConnect-DGP866cj.cjs +0 -1
- package/lib/onConnect-y5DrxJ9P.js +0 -7
- package/lib/store/ArrayStore.d.ts +0 -21
- package/lib/store/DerivedArray.d.ts +0 -8
- package/lib/tags-BqJKcIve.js +0 -485
- package/lib/tags-ld5jemJw.cjs +0 -1
package/lib/morph/index.js
CHANGED
|
@@ -1,89 +1,96 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var at = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n);
|
|
2
|
+
var V = (n, t, i) => {
|
|
3
3
|
if (!t.has(n))
|
|
4
4
|
throw TypeError("Cannot " + i);
|
|
5
5
|
};
|
|
6
|
-
var e = (n, t, i) => (
|
|
6
|
+
var e = (n, t, i) => (V(n, t, "read from private field"), i ? i.call(n) : t.get(n)), a = (n, t, i) => {
|
|
7
7
|
if (t.has(n))
|
|
8
8
|
throw TypeError("Cannot add the same private member more than once");
|
|
9
9
|
t instanceof WeakSet ? t.add(n) : t.set(n, i);
|
|
10
|
-
}, c = (n, t, i,
|
|
11
|
-
var
|
|
12
|
-
var T = (n, t, i) => new Promise((
|
|
13
|
-
var
|
|
10
|
+
}, c = (n, t, i, r) => (V(n, t, "write to private field"), r ? r.call(n, i) : t.set(n, i), i);
|
|
11
|
+
var d = (n, t, i) => (V(n, t, "access private method"), i);
|
|
12
|
+
var T = (n, t, i) => new Promise((r, s) => {
|
|
13
|
+
var u = (l) => {
|
|
14
14
|
try {
|
|
15
|
-
|
|
16
|
-
} catch (
|
|
17
|
-
s(
|
|
15
|
+
f(i.next(l));
|
|
16
|
+
} catch (E) {
|
|
17
|
+
s(E);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, p = (l) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
} catch (
|
|
23
|
-
s(
|
|
21
|
+
f(i.throw(l));
|
|
22
|
+
} catch (E) {
|
|
23
|
+
s(E);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
|
|
25
|
+
}, f = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(u, p);
|
|
26
|
+
f((i = i.apply(n, t)).next());
|
|
27
27
|
});
|
|
28
|
-
var rt = (n, t, i) => (t = n[
|
|
29
|
-
import { Notifier as
|
|
30
|
-
import { i as
|
|
31
|
-
import { n as
|
|
32
|
-
var w,
|
|
33
|
-
class
|
|
28
|
+
var rt = (n, t, i) => (t = n[at("asyncIterator")]) ? t.call(n) : (n = n[at("iterator")](), t = {}, i = (r, s) => (s = n[r]) && (t[r] = (u) => new Promise((p, f, l) => (u = s.call(n, u), l = u.done, Promise.resolve(u.value).then((E) => p({ value: E, done: l }), f)))), i("next"), i("return"), t);
|
|
29
|
+
import { Notifier as ot } from "../notifier/index.js";
|
|
30
|
+
import { i as dt } from "../browser-0zX67oeU.js";
|
|
31
|
+
import { n as mt, s as ft, c as pt } from "../url-DMNfW7uN.js";
|
|
32
|
+
var w, h, m, k, y, C, A;
|
|
33
|
+
class Et {
|
|
34
34
|
constructor(t, i) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
a(this, w, void 0);
|
|
36
|
+
a(this, h, void 0);
|
|
37
|
+
a(this, m, void 0);
|
|
38
|
+
a(this, k, void 0);
|
|
39
|
+
a(this, y, void 0);
|
|
40
|
+
a(this, C, (t) => {
|
|
41
41
|
t.preventDefault(), e(this, w).links.forEach((i) => {
|
|
42
|
-
var
|
|
43
|
-
e(this,
|
|
44
|
-
}), e(this, w).navigate(e(this,
|
|
42
|
+
var r;
|
|
43
|
+
e(this, m) === e(i, m) || (r = e(i, y)) != null && r.includes(e(this, m)) ? e(i, h).classList.add("clicked") : e(i, h).classList.remove("clicked");
|
|
44
|
+
}), e(this, w).navigate(e(this, m), e(this, k));
|
|
45
45
|
});
|
|
46
|
-
|
|
47
|
-
e(this, w).prefetch(e(this,
|
|
46
|
+
a(this, A, () => {
|
|
47
|
+
e(this, w).prefetch(e(this, m)), e(this, h).removeEventListener("pointerenter", e(this, A));
|
|
48
48
|
});
|
|
49
|
-
var
|
|
50
|
-
c(this, w, i), c(this,
|
|
49
|
+
var u, p;
|
|
50
|
+
c(this, w, i), c(this, h, t), c(this, m, e(this, h).getAttribute("href") || "/"), c(this, k, e(this, h).getAttribute(
|
|
51
51
|
"data-history-action"
|
|
52
|
-
) || "push"), e(this,
|
|
53
|
-
const
|
|
54
|
-
c(this,
|
|
52
|
+
) || "push"), e(this, h).addEventListener("click", e(this, C));
|
|
53
|
+
const r = i.normalizePath(e(this, m)), s = i.normalizePath(location.pathname);
|
|
54
|
+
c(this, y, (u = e(this, h).getAttribute("data-match-paths")) == null ? void 0 : u.split(",").map((f) => i.normalizePath(f.trim()).pathname)), e(this, h).hasAttribute("data-include") ? s.pathname.includes(r.pathname) && e(this, h).classList.add("current") : r.pathname === s.pathname || (p = e(this, y)) != null && p.includes(s.pathname) ? (e(this, h).classList.add("current"), e(this, h).classList.add("clicked")) : e(this, h).classList.remove("clicked"), e(this, h).hasAttribute("data-prefetch") && e(this, h).addEventListener("pointerenter", e(this, A));
|
|
55
55
|
}
|
|
56
56
|
destroy() {
|
|
57
|
-
e(this,
|
|
57
|
+
e(this, h).removeEventListener("click", e(this, C)), e(this, h).removeEventListener("pointerenter", e(this, A)), e(this, h).classList.remove("current");
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
w = new WeakMap(),
|
|
61
|
-
var H,
|
|
62
|
-
class
|
|
60
|
+
w = new WeakMap(), h = new WeakMap(), m = new WeakMap(), k = new WeakMap(), y = new WeakMap(), C = new WeakMap(), A = new WeakMap();
|
|
61
|
+
var H, z, S, x, M, Y, P, v, b, D, R, F, X, I, Z, q, _, j, ht, B, $, G;
|
|
62
|
+
class wt {
|
|
63
63
|
constructor(t) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
64
|
+
a(this, F);
|
|
65
|
+
a(this, I);
|
|
66
|
+
a(this, q);
|
|
67
|
+
a(this, j);
|
|
68
|
+
a(this, B);
|
|
69
|
+
a(this, H, null);
|
|
70
|
+
a(this, z, null);
|
|
71
|
+
a(this, S, null);
|
|
72
|
+
a(this, x, null);
|
|
73
|
+
a(this, M, []);
|
|
74
|
+
a(this, Y, new DOMParser());
|
|
75
|
+
a(this, P, /* @__PURE__ */ new Map());
|
|
76
|
+
a(this, v, void 0);
|
|
77
|
+
a(this, b, null);
|
|
78
|
+
a(this, D, new ot());
|
|
79
|
+
a(this, R, new ot());
|
|
80
|
+
a(this, G, (t) => {
|
|
81
81
|
t.state && this.navigate(t.state, "none");
|
|
82
82
|
});
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
if (dt) {
|
|
84
|
+
t != null && t.base ? c(this, H, mt(t.base)) : c(this, H, "/"), c(this, z, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), c(this, S, (t == null ? void 0 : t.cachePages) !== !1), c(this, x, d(this, q, _).call(this, document.body));
|
|
85
|
+
const i = this.normalizePath(location.pathname);
|
|
86
|
+
c(this, b, i.pathname), document.documentElement.setAttribute(
|
|
87
|
+
"data-current-pathname",
|
|
88
|
+
e(this, b)
|
|
89
|
+
), document.documentElement.setAttribute(
|
|
90
|
+
"data-current-leaf",
|
|
91
|
+
i.leaf
|
|
92
|
+
), d(this, I, Z).call(this), addEventListener("popstate", e(this, G));
|
|
93
|
+
}
|
|
87
94
|
}
|
|
88
95
|
get currentPathname() {
|
|
89
96
|
return e(this, b);
|
|
@@ -92,7 +99,7 @@ class bt {
|
|
|
92
99
|
return e(this, M);
|
|
93
100
|
}
|
|
94
101
|
normalizePath(t) {
|
|
95
|
-
return
|
|
102
|
+
return ft(t, e(this, H));
|
|
96
103
|
}
|
|
97
104
|
beforeNavigationEvent(t) {
|
|
98
105
|
return e(this, D).subscribe(t);
|
|
@@ -103,126 +110,126 @@ class bt {
|
|
|
103
110
|
prefetch(t) {
|
|
104
111
|
return T(this, null, function* () {
|
|
105
112
|
const i = this.normalizePath(t);
|
|
106
|
-
return
|
|
113
|
+
return d(this, F, X).call(this, i.pathname);
|
|
107
114
|
});
|
|
108
115
|
}
|
|
109
116
|
navigate(t, i = "push") {
|
|
110
117
|
return T(this, null, function* () {
|
|
111
|
-
var
|
|
112
|
-
const
|
|
113
|
-
let { pathname: s, hash:
|
|
118
|
+
var E;
|
|
119
|
+
const r = this.normalizePath(t);
|
|
120
|
+
let { pathname: s, hash: u, parameters: p, leaf: f } = r;
|
|
114
121
|
if (e(this, v) === s || e(this, b) === s)
|
|
115
122
|
return;
|
|
116
123
|
c(this, v, s);
|
|
117
|
-
const
|
|
124
|
+
const l = e(this, P).has(s);
|
|
118
125
|
try {
|
|
119
|
-
let
|
|
126
|
+
let O = !0;
|
|
120
127
|
if (e(this, D).notify({
|
|
121
128
|
pathname: s,
|
|
122
|
-
isCached:
|
|
129
|
+
isCached: l
|
|
123
130
|
}), this.preprocessor)
|
|
124
131
|
try {
|
|
125
|
-
yield new Promise((
|
|
132
|
+
yield new Promise((o, g) => {
|
|
126
133
|
var L;
|
|
127
|
-
(L = this.preprocessor) == null || L.call(this, { pathname: s, resolve:
|
|
134
|
+
(L = this.preprocessor) == null || L.call(this, { pathname: s, resolve: o, reject: g, isCached: l });
|
|
128
135
|
});
|
|
129
|
-
} catch (
|
|
130
|
-
|
|
136
|
+
} catch (o) {
|
|
137
|
+
o ? console.error(o) : console.log("Route change canceled"), O = !1;
|
|
131
138
|
}
|
|
132
|
-
if (!
|
|
139
|
+
if (!O || e(this, v) !== s)
|
|
133
140
|
return;
|
|
134
|
-
const
|
|
141
|
+
const tt = e(this, P).get(s) || (yield d(this, F, X).call(this, s));
|
|
135
142
|
if (e(this, v) !== s)
|
|
136
143
|
return;
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
),
|
|
140
|
-
|
|
141
|
-
if (
|
|
144
|
+
const et = Array.from(document.head.children), it = Array.from(
|
|
145
|
+
tt.head.cloneNode(!0).children
|
|
146
|
+
), st = d(this, j, ht).call(this, et, it), ct = d(this, B, $).call(this, et, st), W = d(this, B, $).call(this, it, st);
|
|
147
|
+
W.forEach((o, g) => {
|
|
148
|
+
if (o.tagName === "SCRIPT" && o.getAttribute("src")) {
|
|
142
149
|
const L = document.createElement("script");
|
|
143
|
-
L.type = "module", L.src =
|
|
150
|
+
L.type = "module", L.src = o.getAttribute("src"), W[g] = L;
|
|
144
151
|
}
|
|
145
|
-
}),
|
|
146
|
-
document.head.appendChild(
|
|
152
|
+
}), W.forEach((o) => {
|
|
153
|
+
document.head.appendChild(o);
|
|
147
154
|
});
|
|
148
|
-
const
|
|
149
|
-
(
|
|
155
|
+
const J = W.filter(
|
|
156
|
+
(o) => o.tagName === "STYLE" || o.tagName === "SCRIPT" || o.tagName === "LINK"
|
|
150
157
|
);
|
|
151
|
-
e(this,
|
|
152
|
-
let
|
|
158
|
+
e(this, z) && J.length && (yield new Promise((o) => T(this, null, function* () {
|
|
159
|
+
let g = 0;
|
|
153
160
|
try {
|
|
154
|
-
for (var L = rt(
|
|
155
|
-
const N =
|
|
161
|
+
for (var L = rt(J), ut, Q, K; ut = !(Q = yield L.next()).done; ut = !1) {
|
|
162
|
+
const N = Q.value;
|
|
156
163
|
N.onload = () => {
|
|
157
|
-
|
|
164
|
+
g++, g === J.length && o();
|
|
158
165
|
};
|
|
159
166
|
}
|
|
160
|
-
} catch (
|
|
161
|
-
|
|
167
|
+
} catch (Q) {
|
|
168
|
+
K = [Q];
|
|
162
169
|
} finally {
|
|
163
170
|
try {
|
|
164
|
-
|
|
171
|
+
ut && (Q = L.return) && (yield Q.call(L));
|
|
165
172
|
} finally {
|
|
166
|
-
if (
|
|
167
|
-
throw
|
|
173
|
+
if (K)
|
|
174
|
+
throw K[0];
|
|
168
175
|
}
|
|
169
176
|
}
|
|
170
|
-
}))),
|
|
171
|
-
|
|
172
|
-
}), c(this, b, s),
|
|
173
|
-
const
|
|
174
|
-
e(this, x).forEach((
|
|
175
|
-
const L =
|
|
176
|
-
let
|
|
177
|
-
|
|
178
|
-
if (
|
|
179
|
-
const N =
|
|
180
|
-
let
|
|
181
|
-
|
|
182
|
-
(
|
|
183
|
-
), N &&
|
|
177
|
+
}))), ct.forEach((o) => {
|
|
178
|
+
o.hasAttribute("data-permanent") || o.remove();
|
|
179
|
+
}), c(this, b, s), pt(i, s, p, u);
|
|
180
|
+
const lt = d(this, q, _).call(this, tt.body.cloneNode(!0));
|
|
181
|
+
e(this, x).forEach((o, g) => {
|
|
182
|
+
const L = lt[g];
|
|
183
|
+
let ut = [...o.childNodes], Q = [...L.childNodes];
|
|
184
|
+
ut.forEach((K) => {
|
|
185
|
+
if (K instanceof HTMLElement) {
|
|
186
|
+
const N = K.getAttribute("data-remain");
|
|
187
|
+
let nt;
|
|
188
|
+
Q = Q.filter(
|
|
189
|
+
(U) => U instanceof HTMLElement && N && U.getAttribute("data-remain") === N ? (nt = U, !1) : !0
|
|
190
|
+
), N && nt || K.remove();
|
|
184
191
|
} else
|
|
185
|
-
|
|
186
|
-
}),
|
|
187
|
-
}),
|
|
188
|
-
} catch (
|
|
189
|
-
console.error(
|
|
192
|
+
K.remove();
|
|
193
|
+
}), o.append(...Q);
|
|
194
|
+
}), d(this, I, Z).call(this), document.documentElement.setAttribute("data-current-pathname", s), document.documentElement.setAttribute("data-current-leaf", f), (E = this.postprocessor) == null || E.call(this, { pathname: s, isCached: l }), e(this, R).notify({ pathname: s, isCached: l });
|
|
195
|
+
} catch (O) {
|
|
196
|
+
console.error(O);
|
|
190
197
|
}
|
|
191
198
|
c(this, v, void 0);
|
|
192
199
|
});
|
|
193
200
|
}
|
|
194
201
|
}
|
|
195
|
-
H = new WeakMap(),
|
|
202
|
+
H = new WeakMap(), z = new WeakMap(), S = new WeakMap(), x = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), P = new WeakMap(), v = new WeakMap(), b = new WeakMap(), D = new WeakMap(), R = new WeakMap(), F = new WeakSet(), X = function(t) {
|
|
196
203
|
return T(this, null, function* () {
|
|
197
|
-
const i = e(this,
|
|
204
|
+
const i = e(this, P).get(t);
|
|
198
205
|
if (i)
|
|
199
206
|
return i;
|
|
200
|
-
const s = yield (yield fetch(t)).text(),
|
|
201
|
-
return e(this,
|
|
207
|
+
const s = yield (yield fetch(t)).text(), u = e(this, Y).parseFromString(s, "text/html");
|
|
208
|
+
return e(this, S) && e(this, P).set(t, u), u;
|
|
202
209
|
});
|
|
203
|
-
}, I = new WeakSet(),
|
|
210
|
+
}, I = new WeakSet(), Z = function() {
|
|
204
211
|
const t = [
|
|
205
212
|
...document.documentElement.querySelectorAll("a")
|
|
206
213
|
].filter((i) => {
|
|
207
|
-
var
|
|
208
|
-
return (
|
|
214
|
+
var r;
|
|
215
|
+
return (r = i.getAttribute("href")) == null ? void 0 : r.startsWith("/");
|
|
209
216
|
});
|
|
210
|
-
e(this, M).forEach((i) => i.destroy()), c(this, M, t.map((i) => new
|
|
211
|
-
}, q = new WeakSet(),
|
|
217
|
+
e(this, M).forEach((i) => i.destroy()), c(this, M, t.map((i) => new Et(i, this)));
|
|
218
|
+
}, q = new WeakSet(), _ = function(t) {
|
|
212
219
|
return [...t.querySelectorAll("[data-morph]")];
|
|
213
|
-
},
|
|
220
|
+
}, j = new WeakSet(), ht = function(t, i) {
|
|
214
221
|
return t.filter(
|
|
215
|
-
(
|
|
216
|
-
(s) => s.outerHTML ===
|
|
222
|
+
(r) => i.find(
|
|
223
|
+
(s) => s.outerHTML === r.outerHTML
|
|
217
224
|
)
|
|
218
225
|
);
|
|
219
|
-
}, B = new WeakSet(),
|
|
226
|
+
}, B = new WeakSet(), $ = function(t, i) {
|
|
220
227
|
return t.filter(
|
|
221
|
-
(
|
|
222
|
-
(s) => s.outerHTML ===
|
|
228
|
+
(r) => !i.find(
|
|
229
|
+
(s) => s.outerHTML === r.outerHTML
|
|
223
230
|
)
|
|
224
231
|
);
|
|
225
|
-
},
|
|
232
|
+
}, G = new WeakMap();
|
|
226
233
|
export {
|
|
227
|
-
|
|
234
|
+
wt as Morph
|
|
228
235
|
};
|
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-
|
|
1
|
+
"use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-CIs_NjhF.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-DmcKRSST.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),x=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),b=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),e.set(i,s),s),h,S,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),b(this,h,void 0),b(this,S,new x.CSSProperty(this,"--damping",20)),b(this,g,new x.CSSProperty(this,"--mass",0)),b(this,z,new x.CSSProperty(this,"--stiffness",0)),b(this,W,new x.CSSProperty(this,"--cartesian",!1)),b(this,R,new x.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,S).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,S).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,S).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;S=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
|
package/lib/pointer/index.js
CHANGED
|
@@ -18,12 +18,12 @@ var s = (e, t, i) => (T(e, t, "read from private field"), i ? i.call(e) : t.get(
|
|
|
18
18
|
throw TypeError("Cannot add the same private member more than once");
|
|
19
19
|
t instanceof WeakSet ? t.add(e) : t.set(e, i);
|
|
20
20
|
}, p = (e, t, i, o) => (T(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i);
|
|
21
|
-
import "../Store-
|
|
21
|
+
import "../Store-Dqcu1DnE.js";
|
|
22
22
|
import { g as K, s as N, n as Q } from "../coordinates-CgdGoSYs.js";
|
|
23
23
|
import { g as U } from "../dom-0S_WDL4g.js";
|
|
24
24
|
import { c as A } from "../math-BOBiC4TN.js";
|
|
25
25
|
import "../ticker/index.js";
|
|
26
|
-
import { D as W } from "../Damped-
|
|
26
|
+
import { D as W } from "../Damped-vepIw9Ku.js";
|
|
27
27
|
import { elementResizer as B } from "../element-resizer/index.js";
|
|
28
28
|
import { windowResizer as G } from "../window-resizer/index.js";
|
|
29
29
|
import { CustomElement as V, define as X } from "../custom-element/index.js";
|
|
@@ -8,7 +8,7 @@ export declare class PopoverElement extends CustomElement {
|
|
|
8
8
|
constructor();
|
|
9
9
|
get history(): Attribute<false>;
|
|
10
10
|
get single(): Attribute<false>;
|
|
11
|
-
get opened(): Store<boolean, keyof import('../store').StoreManagers
|
|
11
|
+
get opened(): Store<boolean, keyof import('../store').StoreManagers>;
|
|
12
12
|
open: (useTransition?: boolean) => void;
|
|
13
13
|
close: () => void;
|
|
14
14
|
protected connectedCallback(): void;
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../attribute/index.cjs"),S=require("../custom-element/index.cjs"),D=require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../attribute/index.cjs"),S=require("../custom-element/index.cjs"),D=require("../Store-CIs_NjhF.cjs"),H=require("../style-At6aDoqG.cjs"),I=require("../browser-CpzFX2xg.cjs"),N=require("../tags-yvEoM921.cjs");var R=Object.defineProperty,G=Object.getOwnPropertyDescriptor,K=(t,e,s,r)=>{for(var a=r>1?void 0:r?G(e,s):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(a=(r?p(e,s,a):p(a))||a);return r&&a&&R(e,s,a),a},b=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},i=(t,e,s)=>(b(t,e,"read from private field"),s?s.call(t):e.get(t)),h=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},W=(t,e,s,r)=>(b(t,e,"write to private field"),e.set(t,s),s),q=(t,e,s)=>(b(t,e,"access private method"),s),M,c,m,d,v,f,O,x,u,g,w,y,L,$,E;exports.PopoverElement=class extends S.CustomElement{constructor(){super(),h(this,O),h(this,u),h(this,L),h(this,M,-1),h(this,c,new D.Store(!1)),h(this,m,void 0),h(this,d,new A.Attribute(this,"history",!1)),h(this,v,new A.Attribute(this,"single",!1)),h(this,f,!1),this.open=(e=!0)=>{if(i(this,c).current)return;i(this,c).current=!0,i(this,v).current&&(exports.PopoverElement.__opened.forEach(r=>r.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),W(this,M,exports.PopoverElement.__opened.length-1),i(this,d).current&&i(this,f)&&history.pushState("","",i(this,O,x)),clearTimeout(i(this,m)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const s=()=>{addEventListener("click",i(this,w)),addEventListener("keydown",i(this,y)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};e?setTimeout(s):s()},this.close=()=>{if(i(this,c).current){if(i(this,c).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),i(this,d).current){const e=new URL(location.href);e.searchParams.delete(i(this,u,g)),history.replaceState(null,"",e.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",i(this,w)),removeEventListener("keydown",i(this,y)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},H.getElementTransitionDurationMS(this)+10)}},h(this,w,e=>{q(this,L,$).call(this,()=>{var p;const r=e.composedPath()[0],a=r instanceof HTMLElement&&(this.contains(r)||((p=this.shadowRoot)==null?void 0:p.contains(r))),l=r instanceof HTMLElement&&r.hasAttribute("outside");(!a||l)&&this.close()})}),h(this,y,e=>{q(this,L,$).call(this,()=>{e.code==="Escape"&&this.close()})}),h(this,E,()=>{W(this,f,!1),i(this,c).current&&i(this,d).current&&!location.search.includes(i(this,u,g))?this.close():!i(this,c).current&&i(this,d).current&&location.search.includes(i(this,u,g))&&this.open(),W(this,f,!0)}),this.setAttribute("popover-target","")}get history(){return i(this,d)}get single(){return i(this,v)}get opened(){return i(this,c)}connectedCallback(){i(this,d).observe(),i(this,v).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",i(this,E)),setTimeout(()=>{i(this,E).call(this)},0)}disconnectedCallback(){i(this,d).unobserve(),i(this,v).unobserve(),exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),clearTimeout(i(this,m)),removeEventListener("popstate",i(this,E))}};M=new WeakMap;c=new WeakMap;m=new WeakMap;d=new WeakMap;v=new WeakMap;f=new WeakMap;O=new WeakSet;x=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${i(this,u,g)}`};u=new WeakSet;g=function(){return`modal-${this.id}`};w=new WeakMap;y=new WeakMap;L=new WeakSet;$=function(t){(exports.PopoverElement.__opened[i(this,M)-1]||exports.PopoverElement.__opened.length===1)&&t()};E=new WeakMap;exports.PopoverElement.__opened=[];exports.PopoverElement=K([S.define("e-popover")],exports.PopoverElement);var U=Object.defineProperty,z=Object.getOwnPropertyDescriptor,F=(t,e,s,r)=>{for(var a=r>1?void 0:r?z(e,s):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(a=(r?p(e,s,a):p(a))||a);return r&&a&&U(e,s,a),a},B=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},o=(t,e,s)=>(B(t,e,"read from private field"),s?s.call(t):e.get(t)),_=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},J=(t,e,s,r)=>(B(t,e,"write to private field"),e.set(t,s),s),n,P,C,k,T;exports.PopoverButtonElement=class extends S.CustomElement{constructor(){super(),_(this,n,void 0),_(this,P,()=>{this.classList.add("triggered")}),_(this,C,()=>{this.classList.add("opened")}),_(this,k,()=>{this.classList.remove("opened")}),_(this,T,()=>{this.classList.remove("triggered")}),I.isBrowser&&N.element(this,{tabindex:this.getAttribute("tabindex")||"0",onClick:()=>{if(o(this,n)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!o(this,n).opened.current?o(this,n).open():(e==="close"||e==="toggle"&&o(this,n).opened.current)&&o(this,n).close()}},onKeydown:e=>{e.code==="Space"&&e.currentTarget.click()}})}get popoverElement(){return o(this,n)}connectedCallback(){var s;const e=this.getAttribute("target");if(e){let r=null;e==="parent"?r=this.closest("[popover-target]"):e==="sibling"?r=(s=this.parentElement)==null?void 0:s.querySelector("[popover-target]"):r=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`),r instanceof HTMLElement?(J(this,n,r),o(this,n).addEventListener("popoverTriggered",o(this,P)),o(this,n).addEventListener("popoverOpened",o(this,C)),o(this,n).addEventListener("popoverClosing",o(this,k)),o(this,n).addEventListener("popoverClosed",o(this,T))):console.warn(this,`target ${e} not found`)}}disconnectedCallback(){o(this,n)&&(o(this,n).removeEventListener("popoverTriggered",o(this,P)),o(this,n).removeEventListener("popoverOpened",o(this,C)),o(this,n).removeEventListener("popoverClosing",o(this,k)),o(this,n).removeEventListener("popoverClosed",o(this,T)))}};n=new WeakMap;P=new WeakMap;C=new WeakMap;k=new WeakMap;T=new WeakMap;exports.PopoverButtonElement=F([S.define("e-popover-button")],exports.PopoverButtonElement);
|
package/lib/popover/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Attribute as x } from "../attribute/index.js";
|
|
2
2
|
import { CustomElement as q, define as H } from "../custom-element/index.js";
|
|
3
|
-
import { S as R } from "../Store-
|
|
3
|
+
import { S as R } from "../Store-Dqcu1DnE.js";
|
|
4
4
|
import { a as B } from "../style-CklEF62D.js";
|
|
5
5
|
import { i as G } from "../browser-0zX67oeU.js";
|
|
6
|
-
import { e as K } from "../tags-
|
|
6
|
+
import { e as K } from "../tags-C-6uXIAT.js";
|
|
7
7
|
var U = Object.defineProperty, z = Object.getOwnPropertyDescriptor, F = (e, t, s, a) => {
|
|
8
8
|
for (var o = a > 1 ? void 0 : a ? z(t, s) : t, c = e.length - 1, v; c >= 0; c--)
|
|
9
9
|
(v = e[c]) && (o = (a ? v(t, s, o) : v(o)) || o);
|
package/lib/router/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Z=(
|
|
1
|
+
"use strict";var Z=(n,e)=>(e=Symbol[n])?e:Symbol.for("Symbol."+n);var K=(n,e,s)=>{if(!e.has(n))throw TypeError("Cannot "+s)};var t=(n,e,s)=>(K(n,e,"read from private field"),s?s.call(n):e.get(n)),r=(n,e,s)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,s)},a=(n,e,s,i)=>(K(n,e,"write to private field"),i?i.call(n,s):e.set(n,s),s);var W=(n,e,s)=>(K(n,e,"access private method"),s);var M=(n,e,s)=>new Promise((i,h)=>{var o=d=>{try{f(s.next(d))}catch(w){h(w)}},c=d=>{try{f(s.throw(d))}catch(w){h(w)}},f=d=>d.done?i(d.value):Promise.resolve(d.value).then(o,c);f((s=s.apply(n,e)).next())});var Y=(n,e,s)=>(e=n[Z("asyncIterator")])?e.call(n):(n=n[Z("iterator")](),e={},s=(i,h)=>(h=n[i])&&(e[i]=o=>new Promise((c,f,d)=>(o=h.call(n,o),d=o.done,Promise.resolve(o.value).then(w=>c({value:w,done:d}),f)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const nt=require("urlpattern-polyfill"),at=require("../notifier/index.cjs"),$=require("../browser-CpzFX2xg.cjs"),rt=require("../function-MthRj-GJ.cjs"),F=require("../url-C3dWnJQg.cjs"),ht=require("../object-CCiXnER2.cjs");var R,O,A,p,m,v,k,L,b,E,x,tt;class ot{constructor(e,s){r(this,x);r(this,R,void 0);r(this,O,void 0);r(this,A,void 0);r(this,p,void 0);r(this,m,void 0);r(this,v,void 0);r(this,k,void 0);r(this,L,null);r(this,b,[]);r(this,E,[]);a(this,R,e),a(this,O,s),a(this,A,new URLPattern({pathname:t(this,R)})),a(this,p,null),a(this,m,null),a(this,v,!1),a(this,k,null),$.isBrowser&&a(this,L,new MutationObserver(i=>{i[0].addedNodes.forEach(o=>{t(this,p)?t(this,E).push(o):t(this,b).push(o)})}))}get pattern(){return t(this,R)}get urlPattern(){return t(this,A)}get isActive(){return t(this,v)}get element(){return t(this,m)}get nest(){return t(this,k)}testPathname(e){return this.urlPattern.test({pathname:e})}render(e,s){return M(this,null,function*(){var i,h;if(t(this,L).observe(document.head,{childList:!0,subtree:!0}),t(this,p))t(this,b).forEach(o=>{document.head.appendChild(o)});else{const o=yield t(this,O).call(this);if(a(this,E,[...t(this,b)]),typeof o.default=="function"&&(a(this,p,o.default),ht.isESClass(o.default))){const c="e-"+((i=t(this,p))==null?void 0:i.name.toLowerCase());customElements.get(c)||customElements.define(c,o.default)}}if(yield W(this,x,tt).call(this),t(this,p)){const o=t(this,A).exec({pathname:s}),c=(o==null?void 0:o.pathname.groups)||{},f=Object.fromEntries(new URLSearchParams(location.search)),d={pathnameParams:c,searchParams:f};a(this,m,new(t(this,p))(d)),e.appendChild(t(this,m)),a(this,k,t(this,m).querySelector("[data-nest]")||((h=t(this,m).shadowRoot)==null?void 0:h.querySelector("[data-nest]"))||t(this,m).shadowRoot||t(this,m)),a(this,v,!0)}t(this,L).disconnect()})}close(){var e;t(this,L).disconnect(),(e=t(this,m))==null||e.remove(),a(this,v,!1),t(this,E).forEach(s=>document.head.removeChild(s)),a(this,E,[])}getAnchorElements(){var s;let e=[];return t(this,m)&&(e=[...t(this,m).querySelectorAll("a")]),(s=t(this,m))!=null&&s.shadowRoot&&(e=[...e,...t(this,m).shadowRoot.querySelectorAll("a")]),e}}R=new WeakMap,O=new WeakMap,A=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,k=new WeakMap,L=new WeakMap,b=new WeakMap,E=new WeakMap,x=new WeakSet,tt=function(){return M(this,null,function*(){const e=t(this,b).filter(c=>c instanceof HTMLElement?c.tagName==="STYLE"||c.tagName==="SCRIPT"||c.tagName==="LINK":!1);try{for(var s=Y(e),i,h,o;i=!(h=yield s.next()).done;i=!1){const c=h.value;yield new Promise(f=>{c.onload=()=>{f()}})}}catch(h){o=[h]}finally{try{i&&(h=s.return)&&(yield h.call(s))}finally{if(o)throw o[0]}}})};var S,u,P,U,q,j;class ct{constructor(e,s){r(this,S,void 0);r(this,u,void 0);r(this,P,void 0);r(this,U,void 0);r(this,q,void 0);r(this,j,e=>{e.preventDefault(),t(this,S).links.forEach(s=>{var i;t(this,P)===t(s,P)||(i=t(s,q))!=null&&i.includes(t(this,P))?t(s,u).classList.add("clicked"):t(s,u).classList.remove("clicked")}),t(this,S).navigate(t(this,P),t(this,U))});var o,c;a(this,S,e),a(this,u,s),a(this,P,t(this,u).getAttribute("href")||"/"),a(this,U,t(this,u).getAttribute("data-history-action")||"push"),t(this,u).addEventListener("click",t(this,j));const i=e.normalizePath(t(this,P)),h=e.normalizePath(location.pathname);a(this,q,(o=t(this,u).getAttribute("data-match-paths"))==null?void 0:o.split(",").map(f=>e.normalizePath(f.trim()).pathname)),t(this,u).hasAttribute("data-include")?h.pathname.includes(i.pathname)&&t(this,u).classList.add("current"):i.pathname===h.pathname||(c=t(this,q))!=null&&c.includes(h.pathname)?(t(this,u).classList.add("current"),t(this,u).classList.add("clicked")):t(this,u).classList.remove("clicked")}destroy(){t(this,u).removeEventListener("click",t(this,j)),t(this,u).classList.remove("current")}}S=new WeakMap,u=new WeakMap,P=new WeakMap,U=new WeakMap,q=new WeakMap,j=new WeakMap;globalThis.URLPattern=nt.URLPattern;var N,C,g,z,T,y,H,B,I,_,et,D;class lt{constructor(e){r(this,_);r(this,N,null);r(this,C,null);r(this,g,[]);r(this,z,null);r(this,T,[]);r(this,y,void 0);r(this,H,null);r(this,B,new at.Notifier);r(this,I,rt.debounce(()=>{const e=s=>s.split("/").length;a(this,g,t(this,g).sort((s,i)=>e(s.pattern)-e(i.pattern))),this.navigate(location.pathname)},0));r(this,D,e=>{e.state&&this.navigate(e.state,"none")});$.isBrowser&&(e!=null&&e.base?a(this,C,F.normalizeBase(e.base)):a(this,C,"/"),a(this,N,(e==null?void 0:e.rootElement)||document.body),addEventListener("popstate",t(this,D)))}get currentPathname(){return t(this,H)}get candidatePathname(){return t(this,y)}get routes(){return t(this,g)}get links(){return t(this,T)}navigationEvent(e){return t(this,B).subscribe(e)}defineRoute(e,s){const i=new ot(e,s);t(this,g).push(i),t(this,I).call(this)}navigate(e,s="push"){return M(this,null,function*(){var Q,V;const i=this.normalizePath(e);let{pathname:h,hash:o,parameters:c,leaf:f}=i;if(t(this,y)===h||t(this,H)===h)return;a(this,y,h);const d=t(this,g).filter(l=>l.isActive),w=t(this,g).filter(l=>!d.includes(l)&&l.testPathname(f)),st=d.filter(l=>!l.testPathname(f)),G=d.filter(l=>l.testPathname(f));let J=!0;if(this.preprocessor)try{yield new Promise((l,it)=>{var X;(X=this.preprocessor)==null||X.call(this,{path:i,resolve:l,reject:it})})}catch(l){l?console.error(l):console.log("Route change canceled"),J=!1}if(J&&t(this,y)===h){a(this,z,G[G.length-1]),st.forEach(l=>{l.close()}),a(this,H,h),F.changeHistory(s,h,c,o);try{for(var mt=Y(w),ft,pt,gt;ft=!(pt=yield mt.next()).done;ft=!1){const l=pt.value;yield l.render(((Q=t(this,z))==null?void 0:Q.nest)||t(this,N),h),a(this,z,l)}}catch(pt){gt=[pt]}finally{try{ft&&(pt=mt.return)&&(yield pt.call(mt))}finally{if(gt)throw gt[0]}}W(this,_,et).call(this),(V=this.postprocessor)==null||V.call(this,{pathname:h}),t(this,B).notify({pathname:h})}})}normalizePath(e){return F.splitPath(e,t(this,C))}}N=new WeakMap,C=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,y=new WeakMap,H=new WeakMap,B=new WeakMap,I=new WeakMap,_=new WeakSet,et=function(){const e=t(this,g).filter(i=>i.isActive),s=Array.from(new Set([...t(this,N).querySelectorAll("a"),...e.map(i=>i.getAnchorElements()).flat()].filter(i=>{var h;return(h=i.getAttribute("href"))==null?void 0:h.startsWith("/")})));t(this,T).forEach(i=>{i.destroy()}),a(this,T,s.map(i=>new ct(this,i)))},D=new WeakMap;exports.Router=lt;
|