aptechka 0.40.6 → 0.41.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/accordion/index.d.ts +0 -1
- package/lib/animation/Animation.d.ts +0 -1
- package/lib/animation/Damped.d.ts +0 -1
- package/lib/animation/Tweened.d.ts +0 -1
- package/lib/attribute/index.d.ts +0 -1
- package/lib/canvas/index.d.ts +0 -1
- package/lib/class-linked-status/index.d.ts +0 -1
- package/lib/controls/AutoplayControls.d.ts +0 -1
- package/lib/controls/Controls.d.ts +0 -1
- package/lib/controls/DragControls.d.ts +0 -1
- package/lib/controls/KeyboardControls.d.ts +0 -1
- package/lib/controls/WheelControls.d.ts +0 -1
- package/lib/css-property/index.d.ts +0 -1
- package/lib/device/Viewport.d.ts +0 -1
- package/lib/element-resizer/react/index.d.ts +0 -1
- package/lib/element-resizer/vanilla/index.d.ts +0 -1
- package/lib/en3/En3Raycaster.d.ts +0 -1
- package/lib/en3/En3View.d.ts +0 -1
- package/lib/en3/en3.d.ts +0 -1
- package/lib/en3/index.cjs +2 -2
- package/lib/en3/index.js +91 -92
- package/lib/en3/utils/coverTexture.d.ts +0 -1
- package/lib/en3/utils/dispose.d.ts +0 -1
- package/lib/en3/utils/getCurrentViewport.d.ts +0 -1
- package/lib/en3/utils/traverseMaterials.d.ts +0 -1
- package/lib/en3/utils/traverseMeshes.d.ts +0 -1
- package/lib/intersector/react/index.d.ts +0 -1
- package/lib/intersector/vanilla/index.d.ts +0 -1
- package/lib/ladder/index.d.ts +0 -1
- package/lib/layout-box/index.d.ts +0 -1
- package/lib/media/index.d.ts +0 -1
- package/lib/media-elements/iframe/index.d.ts +0 -1
- package/lib/media-elements/image/index.d.ts +0 -1
- package/lib/media-elements/index.cjs +2 -2
- package/lib/media-elements/index.js +31 -32
- package/lib/media-elements/sequence/index.d.ts +0 -1
- package/lib/media-elements/source/index.d.ts +0 -1
- package/lib/media-elements/video/index.d.ts +0 -1
- package/lib/media-elements/youtube/index.d.ts +0 -1
- package/lib/morph/Link.d.ts +1 -1
- package/lib/morph/Morph.d.ts +18 -3
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +184 -150
- package/lib/need_redo_tweaker/TweakerBooleanManagerElement.d.ts +0 -1
- package/lib/need_redo_tweaker/TweakerColorManagerElement.d.ts +0 -1
- package/lib/need_redo_tweaker/TweakerElement.d.ts +0 -1
- package/lib/need_redo_tweaker/TweakerFieldElement.d.ts +0 -1
- package/lib/need_redo_tweaker/TweakerFolderElement.d.ts +0 -1
- package/lib/need_redo_tweaker/TweakerLinkManagerElement.d.ts +0 -1
- package/lib/need_redo_tweaker/TweakerNumberManagerElement.d.ts +0 -1
- package/lib/need_redo_tweaker/TweakerSelectManagerElement.d.ts +0 -1
- package/lib/need_redo_tweaker/TweakerStoreManagerElement.d.ts +0 -1
- package/lib/need_redo_tweaker/TweakerStringManagerElement.d.ts +0 -1
- package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +0 -1
- package/lib/need_redo_tweaker/element-constructor/createStylesheet.d.ts +0 -1
- package/lib/need_redo_tweaker/element-constructor/createTheme.d.ts +0 -1
- package/lib/need_redo_tweaker/element-constructor/tags.d.ts +0 -1
- package/lib/need_redo_tweaker/select/SelectHeadElement.d.ts +0 -1
- package/lib/need_redo_tweaker/select/SelectOptionElement.d.ts +0 -1
- package/lib/need_redo_tweaker/select/SelectUserElement.d.ts +0 -1
- package/lib/need_redo_tweaker/tweakerManagerConstructors.d.ts +0 -1
- package/lib/pointer/Pointer.d.ts +0 -1
- package/lib/pointer/PointerElement.d.ts +0 -1
- package/lib/popover/PopoverButtonElement.d.ts +0 -1
- package/lib/popover/PopoverElement.d.ts +0 -1
- package/lib/router/Link.d.ts +0 -1
- package/lib/router/Router.d.ts +0 -1
- package/lib/scroll/react/Scroll.d.ts +0 -1
- package/lib/scroll/react/ScrollBulletButtons.d.ts +0 -1
- package/lib/scroll/react/ScrollSegment.d.ts +0 -1
- package/lib/scroll/react/ScrollSetButton.d.ts +0 -1
- package/lib/scroll/react/ScrollStepButton.d.ts +0 -1
- package/lib/scroll/react/Scrollbar.d.ts +0 -1
- package/lib/scroll/vanilla/ScrollBulletButtonsElement.d.ts +0 -1
- package/lib/scroll/vanilla/ScrollButtonElement.d.ts +0 -1
- package/lib/scroll/vanilla/ScrollElement.d.ts +0 -1
- package/lib/scroll/vanilla/ScrollSection.d.ts +0 -1
- package/lib/scroll/vanilla/ScrollSegmentElement.d.ts +0 -1
- package/lib/scroll/vanilla/ScrollSetButtonElement.d.ts +0 -1
- package/lib/scroll/vanilla/ScrollStepButtonElement.d.ts +0 -1
- package/lib/scroll/vanilla/ScrollUserElement.d.ts +0 -1
- package/lib/scroll/vanilla/ScrollbarElement.d.ts +0 -1
- package/lib/scroll-entries/index.d.ts +0 -1
- package/lib/scroll-segment/index.d.ts +0 -1
- package/lib/slicer/SlicerElement.d.ts +0 -1
- package/lib/slicer/Word.d.ts +0 -1
- package/lib/source/SourceManager.d.ts +0 -1
- package/lib/source/SourceSet.d.ts +0 -1
- package/lib/store/react/useStore.d.ts +0 -1
- package/lib/store/vanilla/Composed.d.ts +0 -1
- package/lib/store/vanilla/Derived.d.ts +0 -1
- package/lib/store/vanilla/DerivedArray.d.ts +0 -1
- package/lib/store/vanilla/Resource.d.ts +0 -1
- package/lib/store/vanilla/StoreRegistry.d.ts +0 -1
- package/lib/studio/Outliner/File/index.d.ts +0 -1
- package/lib/studio/Outliner/Folder/index.d.ts +0 -1
- package/lib/studio/Outliner/index.d.ts +0 -1
- package/lib/studio/Studio/index.d.ts +0 -1
- package/lib/studio/Tweaker/index.d.ts +0 -1
- package/lib/studio/store.d.ts +0 -1
- package/lib/ticker/react/index.d.ts +0 -1
- package/lib/ticker/vanilla/index.d.ts +0 -1
- package/lib/utils/collisions.d.ts +0 -1
- package/lib/utils/coordinates.d.ts +0 -1
- package/lib/utils/events.d.ts +1 -1
- package/lib/utils/math.d.ts +0 -1
- package/lib/utils/ts-react-utility.d.ts +0 -1
- package/lib/window-resizer/react/index.d.ts +0 -1
- package/lib/window-resizer/vanilla/index.d.ts +0 -1
- package/package.json +4 -3
package/lib/morph/index.js
CHANGED
|
@@ -1,163 +1,165 @@
|
|
|
1
|
-
var rt = (
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var rt = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), ot = (n) => {
|
|
2
|
+
throw TypeError(n);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var e = (
|
|
6
|
-
var
|
|
7
|
-
var u = (
|
|
4
|
+
var J = (n, t, i) => t.has(n) || ot("Cannot " + i);
|
|
5
|
+
var e = (n, t, i) => (J(n, t, "read from private field"), i ? i.call(n) : t.get(n)), o = (n, t, i) => t.has(n) ? ot("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, i), c = (n, t, i, s) => (J(n, t, "write to private field"), s ? s.call(n, i) : t.set(n, i), i), P = (n, t, i) => (J(n, t, "access private method"), i);
|
|
6
|
+
var z = (n, t, i) => new Promise((s, l) => {
|
|
7
|
+
var u = (f) => {
|
|
8
8
|
try {
|
|
9
|
-
|
|
10
|
-
} catch (
|
|
11
|
-
l(
|
|
9
|
+
E(i.next(f));
|
|
10
|
+
} catch (b) {
|
|
11
|
+
l(b);
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, r = (f) => {
|
|
14
14
|
try {
|
|
15
|
-
|
|
16
|
-
} catch (
|
|
17
|
-
l(
|
|
15
|
+
E(i.throw(f));
|
|
16
|
+
} catch (b) {
|
|
17
|
+
l(b);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
20
|
-
|
|
19
|
+
}, E = (f) => f.done ? s(f.value) : Promise.resolve(f.value).then(u, r);
|
|
20
|
+
E((i = i.apply(n, t)).next());
|
|
21
21
|
});
|
|
22
|
-
var ht = (
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { n as
|
|
26
|
-
import { loading as
|
|
27
|
-
var
|
|
28
|
-
class
|
|
22
|
+
var ht = (n, t, i) => (t = n[rt("asyncIterator")]) ? t.call(n) : (n = n[rt("iterator")](), t = {}, i = (s, l) => (l = n[s]) && (t[s] = (u) => new Promise((r, E, f) => (u = l.call(n, u), f = u.done, Promise.resolve(u.value).then((b) => r({ value: b, done: f }), E)))), i("next"), i("return"), t);
|
|
23
|
+
import { i as pt } from "../browser-0zX67oeU.js";
|
|
24
|
+
import { d as V } from "../events-CsVF98U6.js";
|
|
25
|
+
import { n as Lt, c as ct, s as Et } from "../url-B5eH5z6S.js";
|
|
26
|
+
import { loading as dt } from "../loading/index.js";
|
|
27
|
+
var T, h, p, x, D, M, I, k;
|
|
28
|
+
class lt {
|
|
29
29
|
constructor(t, i) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
t.preventDefault(), e(this,
|
|
38
|
-
var
|
|
39
|
-
e(this,
|
|
40
|
-
}), e(this,
|
|
41
|
-
historyAction: e(this,
|
|
42
|
-
state: e(this,
|
|
30
|
+
o(this, T);
|
|
31
|
+
o(this, h);
|
|
32
|
+
o(this, p);
|
|
33
|
+
o(this, x);
|
|
34
|
+
o(this, D);
|
|
35
|
+
o(this, M);
|
|
36
|
+
o(this, I, (t) => {
|
|
37
|
+
t.preventDefault(), e(this, T).links.forEach((i) => {
|
|
38
|
+
var s;
|
|
39
|
+
e(this, p) === e(i, p) || (s = e(i, M)) != null && s.includes(e(this, p)) ? e(i, h).classList.add("clicked") : e(i, h).classList.remove("clicked");
|
|
40
|
+
}), e(this, T).navigate(e(this, p), {
|
|
41
|
+
historyAction: e(this, x),
|
|
42
|
+
state: e(this, D)
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
|
-
|
|
46
|
-
e(this,
|
|
45
|
+
o(this, k, () => {
|
|
46
|
+
e(this, T).prefetch(e(this, p)), e(this, h).removeEventListener("pointerenter", e(this, k));
|
|
47
47
|
});
|
|
48
|
-
var u,
|
|
49
|
-
c(this,
|
|
48
|
+
var u, r;
|
|
49
|
+
c(this, T, i), c(this, h, t), c(this, p, e(this, h).getAttribute("href") || "/"), c(this, x, e(this, h).getAttribute(
|
|
50
50
|
"data-history-action"
|
|
51
|
-
) || "push"), c(this,
|
|
52
|
-
const
|
|
53
|
-
c(this,
|
|
51
|
+
) || "push"), c(this, D, e(this, h).getAttribute("data-state") || void 0), e(this, h).addEventListener("click", e(this, I));
|
|
52
|
+
const s = i.normalizePath(e(this, p)), l = i.normalizePath(location.pathname);
|
|
53
|
+
c(this, M, (u = e(this, h).getAttribute("data-match-paths")) == null ? void 0 : u.split(",").map((E) => i.normalizePath(E.trim()).pathname)), e(this, h).hasAttribute("data-include") ? l.pathname.includes(s.pathname) && e(this, h).classList.add("current") : s.pathname === l.pathname || (r = e(this, M)) != null && r.includes(l.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, k));
|
|
54
|
+
}
|
|
55
|
+
get element() {
|
|
56
|
+
return e(this, h);
|
|
54
57
|
}
|
|
55
58
|
destroy() {
|
|
56
|
-
e(this,
|
|
59
|
+
e(this, h).removeEventListener("click", e(this, I)), e(this, h).removeEventListener("pointerenter", e(this, k)), e(this, h).classList.remove("current");
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
|
-
|
|
60
|
-
var
|
|
62
|
+
T = new WeakMap(), h = new WeakMap(), p = new WeakMap(), x = new WeakMap(), D = new WeakMap(), M = new WeakMap(), I = new WeakMap(), k = new WeakMap();
|
|
63
|
+
var R, B, F, N, g, Y, H, y, L, O, _, v, m, Q, U, ut, X, j;
|
|
61
64
|
class yt {
|
|
62
65
|
constructor(t) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
r(this, j, (t) => {
|
|
66
|
+
o(this, m);
|
|
67
|
+
o(this, R, null);
|
|
68
|
+
o(this, B, null);
|
|
69
|
+
o(this, F, null);
|
|
70
|
+
o(this, N, null);
|
|
71
|
+
o(this, g, []);
|
|
72
|
+
o(this, Y, new DOMParser());
|
|
73
|
+
o(this, H, /* @__PURE__ */ new Map());
|
|
74
|
+
o(this, y);
|
|
75
|
+
o(this, L, null);
|
|
76
|
+
o(this, O);
|
|
77
|
+
o(this, _);
|
|
78
|
+
o(this, v, []);
|
|
79
|
+
o(this, j, (t) => {
|
|
78
80
|
t.state && this.navigate(t.state, { historyAction: "none" });
|
|
79
81
|
});
|
|
80
|
-
if (
|
|
81
|
-
c(this,
|
|
82
|
+
if (pt) {
|
|
83
|
+
c(this, R, Lt(t == null ? void 0 : t.base)), c(this, B, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), c(this, F, (t == null ? void 0 : t.cachePages) !== !1), c(this, N, P(this, m, U).call(this, document.body));
|
|
82
84
|
const i = this.normalizePath(location.pathname);
|
|
83
|
-
c(this,
|
|
85
|
+
c(this, L, i.pathname), document.documentElement.setAttribute(
|
|
84
86
|
"data-current-pathname",
|
|
85
|
-
e(this,
|
|
87
|
+
e(this, L)
|
|
86
88
|
), document.documentElement.setAttribute(
|
|
87
89
|
"data-current-leaf",
|
|
88
90
|
i.leaf
|
|
89
91
|
), this.findLinks(), addEventListener("popstate", e(this, j)), ct(
|
|
90
92
|
"replace",
|
|
91
|
-
e(this,
|
|
93
|
+
e(this, L),
|
|
92
94
|
i.parameters,
|
|
93
95
|
i.hash
|
|
94
|
-
)
|
|
96
|
+
), e(this, N).map((s) => [...s.children]).flat().forEach((s) => {
|
|
97
|
+
s instanceof HTMLElement && s.classList.add("current");
|
|
98
|
+
});
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
get currentPathname() {
|
|
98
|
-
return e(this,
|
|
102
|
+
return e(this, L);
|
|
99
103
|
}
|
|
100
104
|
get previousPathname() {
|
|
101
|
-
return e(this,
|
|
105
|
+
return e(this, O);
|
|
102
106
|
}
|
|
103
107
|
get currentState() {
|
|
104
|
-
return e(this,
|
|
108
|
+
return e(this, _);
|
|
105
109
|
}
|
|
106
110
|
get links() {
|
|
107
|
-
return e(this,
|
|
111
|
+
return e(this, g);
|
|
108
112
|
}
|
|
109
113
|
normalizePath(t) {
|
|
110
|
-
return
|
|
111
|
-
}
|
|
112
|
-
beforeNavigationEvent(t) {
|
|
113
|
-
return e(this, I).subscribe(t);
|
|
114
|
-
}
|
|
115
|
-
afterNavigationEvent(t) {
|
|
116
|
-
return e(this, q).subscribe(t);
|
|
114
|
+
return Et(t, e(this, R));
|
|
117
115
|
}
|
|
118
116
|
prefetch(t) {
|
|
119
|
-
return
|
|
117
|
+
return z(this, null, function* () {
|
|
120
118
|
const i = this.normalizePath(t);
|
|
121
|
-
return
|
|
119
|
+
return P(this, m, Q).call(this, i.pathname);
|
|
122
120
|
});
|
|
123
121
|
}
|
|
124
122
|
navigate(l) {
|
|
125
|
-
return
|
|
126
|
-
var
|
|
123
|
+
return z(this, arguments, function* (t, { historyAction: i = "push", state: s } = {}) {
|
|
124
|
+
var Z;
|
|
125
|
+
if (e(this, v).length)
|
|
126
|
+
return;
|
|
127
127
|
const u = this.normalizePath(t);
|
|
128
|
-
let { pathname:
|
|
129
|
-
if (e(this,
|
|
128
|
+
let { pathname: r, hash: E, parameters: f, leaf: b } = u;
|
|
129
|
+
if (e(this, y) === r || e(this, L) === r)
|
|
130
130
|
return;
|
|
131
|
-
c(this,
|
|
132
|
-
const
|
|
131
|
+
c(this, _, s), c(this, y, r);
|
|
132
|
+
const C = e(this, H).has(r);
|
|
133
133
|
try {
|
|
134
|
-
|
|
135
|
-
let
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
134
|
+
dt.add("__morph");
|
|
135
|
+
let q = !0;
|
|
136
|
+
if (V(document, "morphBeforeNavigation", {
|
|
137
|
+
detail: {
|
|
138
|
+
pathname: r,
|
|
139
|
+
isCached: C,
|
|
140
|
+
state: s
|
|
141
|
+
}
|
|
140
142
|
}), this.preprocessor)
|
|
141
143
|
try {
|
|
142
|
-
yield new Promise((a,
|
|
143
|
-
var
|
|
144
|
-
(
|
|
144
|
+
yield new Promise((a, A) => {
|
|
145
|
+
var w;
|
|
146
|
+
(w = this.preprocessor) == null || w.call(this, { pathname: r, resolve: a, reject: A, isCached: C, state: s });
|
|
145
147
|
});
|
|
146
148
|
} catch (a) {
|
|
147
|
-
a ? console.error(a) : console.log("Route change canceled"),
|
|
149
|
+
a ? console.error(a) : console.log("Route change canceled"), q = !1;
|
|
148
150
|
}
|
|
149
|
-
if (!
|
|
151
|
+
if (!q || e(this, y) !== r)
|
|
150
152
|
return;
|
|
151
|
-
const
|
|
152
|
-
if (e(this,
|
|
153
|
+
const $ = e(this, H).get(r) || (yield P(this, m, Q).call(this, r));
|
|
154
|
+
if (e(this, y) !== r)
|
|
153
155
|
return;
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
),
|
|
157
|
-
W.forEach((a,
|
|
156
|
+
const tt = Array.from(document.head.children), et = Array.from(
|
|
157
|
+
$.head.cloneNode(!0).children
|
|
158
|
+
), it = P(this, m, ut).call(this, tt, et), mt = P(this, m, X).call(this, tt, it), W = P(this, m, X).call(this, et, it);
|
|
159
|
+
W.forEach((a, A) => {
|
|
158
160
|
if (a.tagName === "SCRIPT" && a.getAttribute("src")) {
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
+
const w = document.createElement("script");
|
|
162
|
+
w.type = "module", w.src = a.getAttribute("src"), W[A] = w;
|
|
161
163
|
}
|
|
162
164
|
}), W.forEach((a) => {
|
|
163
165
|
document.head.appendChild(a);
|
|
@@ -165,86 +167,118 @@ class yt {
|
|
|
165
167
|
const G = W.filter(
|
|
166
168
|
(a) => (a.tagName === "STYLE" || a.tagName === "SCRIPT" || a.tagName === "LINK") && a.getAttribute("rel") !== "canonical"
|
|
167
169
|
);
|
|
168
|
-
e(this,
|
|
169
|
-
let
|
|
170
|
+
e(this, B) && G.length && (yield new Promise((a) => z(this, null, function* () {
|
|
171
|
+
let A = 0;
|
|
170
172
|
try {
|
|
171
|
-
for (var
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
for (var w = ht(G), st, S, nt; st = !(S = yield w.next()).done; st = !1) {
|
|
174
|
+
const K = S.value;
|
|
175
|
+
K.onload = () => {
|
|
176
|
+
A++, A === G.length && a();
|
|
175
177
|
};
|
|
176
178
|
}
|
|
177
|
-
} catch (
|
|
178
|
-
|
|
179
|
+
} catch (S) {
|
|
180
|
+
nt = [S];
|
|
179
181
|
} finally {
|
|
180
182
|
try {
|
|
181
|
-
|
|
183
|
+
st && (S = w.return) && (yield S.call(w));
|
|
182
184
|
} finally {
|
|
183
|
-
if (
|
|
184
|
-
throw
|
|
185
|
+
if (nt)
|
|
186
|
+
throw nt[0];
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
}))), mt.forEach((a) => {
|
|
188
190
|
a.hasAttribute("data-permanent") || a.remove();
|
|
189
|
-
}), c(this,
|
|
190
|
-
const ft =
|
|
191
|
-
e(this,
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
)
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
191
|
+
}), c(this, O, e(this, L)), c(this, L, r), ct(i, r, f, E);
|
|
192
|
+
const ft = P(this, m, U).call(this, $.body.cloneNode(!0));
|
|
193
|
+
e(this, v).forEach((a) => clearTimeout(a)), c(this, v, []), e(this, N).forEach((a, A) => {
|
|
194
|
+
const w = ft[A], st = getComputedStyle(a).getPropertyValue("--morph-duration"), S = [...w.childNodes];
|
|
195
|
+
if (st) {
|
|
196
|
+
const nt = [...a.childNodes];
|
|
197
|
+
nt.forEach((d) => {
|
|
198
|
+
d instanceof HTMLElement && d.classList.add("old");
|
|
199
|
+
}), S.forEach((d) => {
|
|
200
|
+
d instanceof HTMLElement && d.classList.add("new");
|
|
201
|
+
}), a.append(...S), setTimeout(() => {
|
|
202
|
+
S.forEach((d) => {
|
|
203
|
+
d instanceof HTMLElement && d.classList.add("in");
|
|
204
|
+
});
|
|
205
|
+
}, 10);
|
|
206
|
+
const K = {
|
|
207
|
+
element: a,
|
|
208
|
+
pathname: r,
|
|
209
|
+
isCached: C,
|
|
210
|
+
state: s
|
|
211
|
+
};
|
|
212
|
+
V(document, "morphBeforeElementOut", {
|
|
213
|
+
detail: K
|
|
214
|
+
});
|
|
215
|
+
const at = setTimeout(() => {
|
|
216
|
+
nt.forEach((d) => d.remove()), S.forEach((d) => {
|
|
217
|
+
d instanceof HTMLElement && (d.classList.remove("new", "in"), d.classList.add("current"));
|
|
218
|
+
}), V(document, "morphAfterElementOut", {
|
|
219
|
+
detail: K
|
|
220
|
+
}), c(this, v, e(this, v).filter((d) => d !== at));
|
|
221
|
+
}, (parseFloat(st) || 0) * 1e3 + 10);
|
|
222
|
+
e(this, v).push(at);
|
|
223
|
+
} else
|
|
224
|
+
a.innerHTML = "", a.append(...S);
|
|
225
|
+
}), this.findLinks(), document.documentElement.setAttribute("data-current-pathname", r), document.documentElement.setAttribute("data-current-leaf", b), (Z = this.postprocessor) == null || Z.call(this, { pathname: r, isCached: C, state: s }), V(document, "morphAfterNavigation", {
|
|
226
|
+
detail: {
|
|
227
|
+
pathname: r,
|
|
228
|
+
isCached: C,
|
|
229
|
+
state: s
|
|
230
|
+
}
|
|
231
|
+
}), dt.complete("__morph");
|
|
232
|
+
} catch (q) {
|
|
233
|
+
console.error(q);
|
|
207
234
|
}
|
|
208
|
-
c(this,
|
|
235
|
+
c(this, y, void 0);
|
|
209
236
|
});
|
|
210
237
|
}
|
|
238
|
+
addLink(t) {
|
|
239
|
+
e(this, g).push(new lt(t, this));
|
|
240
|
+
}
|
|
211
241
|
addLinks(t) {
|
|
212
242
|
t.forEach((i) => {
|
|
213
|
-
|
|
243
|
+
this.addLink(i);
|
|
214
244
|
});
|
|
215
245
|
}
|
|
246
|
+
removeLink(t) {
|
|
247
|
+
c(this, g, e(this, g).filter((i) => i.element === t ? (i.destroy(), !1) : !0));
|
|
248
|
+
}
|
|
216
249
|
findLinks() {
|
|
217
250
|
const t = [
|
|
218
251
|
...document.documentElement.querySelectorAll("a")
|
|
219
252
|
].filter(
|
|
220
253
|
(i) => {
|
|
221
|
-
var
|
|
222
|
-
return ((
|
|
254
|
+
var s;
|
|
255
|
+
return ((s = i.getAttribute("href")) == null ? void 0 : s.startsWith("/")) && !i.hasAttribute("download") && !i.hasAttribute("data-morph-skip");
|
|
223
256
|
}
|
|
224
257
|
);
|
|
225
|
-
e(this,
|
|
258
|
+
e(this, g).forEach((i) => i.destroy()), c(this, g, t.map((i) => new lt(i, this)));
|
|
226
259
|
}
|
|
227
260
|
}
|
|
228
|
-
|
|
229
|
-
return
|
|
230
|
-
const i = e(this,
|
|
261
|
+
R = new WeakMap(), B = new WeakMap(), F = new WeakMap(), N = new WeakMap(), g = new WeakMap(), Y = new WeakMap(), H = new WeakMap(), y = new WeakMap(), L = new WeakMap(), O = new WeakMap(), _ = new WeakMap(), v = new WeakMap(), m = new WeakSet(), Q = function(t) {
|
|
262
|
+
return z(this, null, function* () {
|
|
263
|
+
const i = e(this, H).get(t);
|
|
231
264
|
if (i)
|
|
232
265
|
return i;
|
|
233
266
|
const l = yield (yield fetch(t)).text(), u = e(this, Y).parseFromString(l, "text/html");
|
|
234
|
-
return e(this,
|
|
267
|
+
return e(this, F) && e(this, H).set(t, u), u;
|
|
235
268
|
});
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
|
|
269
|
+
}, U = function(t) {
|
|
270
|
+
const i = [...t.querySelectorAll("[data-morph]")];
|
|
271
|
+
return i.length ? i : [t];
|
|
272
|
+
}, ut = function(t, i) {
|
|
239
273
|
return t.filter(
|
|
240
|
-
(
|
|
241
|
-
(l) => l.outerHTML ===
|
|
274
|
+
(s) => i.find(
|
|
275
|
+
(l) => l.outerHTML === s.outerHTML
|
|
242
276
|
)
|
|
243
277
|
);
|
|
244
|
-
},
|
|
278
|
+
}, X = function(t, i) {
|
|
245
279
|
return t.filter(
|
|
246
|
-
(
|
|
247
|
-
(l) => l.outerHTML ===
|
|
280
|
+
(s) => !i.find(
|
|
281
|
+
(l) => l.outerHTML === s.outerHTML
|
|
248
282
|
)
|
|
249
283
|
);
|
|
250
284
|
}, j = new WeakMap();
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Store } from '../store/vanilla';
|
|
2
2
|
import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
|
|
3
|
-
|
|
4
3
|
export declare class TweakerBooleanManagerElement extends TweakerStoreManagerElement<Store<boolean>> {
|
|
5
4
|
constructor(...stores: Array<Store<boolean>>);
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Store } from '../store/vanilla';
|
|
2
2
|
import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
|
|
3
|
-
|
|
4
3
|
export declare class TweakerColorManagerElement extends TweakerStoreManagerElement<Store<string>> {
|
|
5
4
|
constructor(...stores: Array<Store<string>>);
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Store } from '../store/vanilla';
|
|
2
2
|
import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
|
|
3
|
-
|
|
4
3
|
export declare class TweakerLinkManagerElement extends TweakerStoreManagerElement<Store<string>> {
|
|
5
4
|
constructor(...stores: Array<Store<string>>);
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Store } from '../store/vanilla';
|
|
2
2
|
import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
|
|
3
|
-
|
|
4
3
|
export declare class TweakerNumberManagerElement extends TweakerStoreManagerElement<Store<Array<number> | number>> {
|
|
5
4
|
#private;
|
|
6
5
|
constructor(...stores: Array<Store<Array<number> | number>>);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Store } from '../store/vanilla';
|
|
2
2
|
import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
|
|
3
|
-
|
|
4
3
|
export declare class TweakerSelectManagerElement extends TweakerStoreManagerElement<Store<string>> {
|
|
5
4
|
constructor(...stores: Array<Store<string>>);
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Store } from '../store/vanilla';
|
|
2
2
|
import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
|
|
3
|
-
|
|
4
3
|
export declare class TweakerStringManagerElement<S extends Store<any> = Store<string>> extends TweakerStoreManagerElement<S> {
|
|
5
4
|
constructor(...stores: Array<S>);
|
|
6
5
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Store } from '../../store/vanilla';
|
|
2
2
|
import { SplitFirst } from '../../utils';
|
|
3
3
|
import { ConnectorConnectCallback, ConnectorDisconnectCallback } from '../../connector';
|
|
4
|
-
|
|
5
4
|
export type StoreOr<T> = T | Store<T>;
|
|
6
5
|
export type ElementConstructorTagNameMap = HTMLElementTagNameMap & SVGElementTagNameMap;
|
|
7
6
|
export type ElementConstructorTagNames = keyof ElementConstructorTagNameMap;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ElementConstructorTagObject, ElementConstructor, ElementConstructorJSS, ElementConstructorTagNames } from './ElementConstructor';
|
|
2
|
-
|
|
3
2
|
export declare function element<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames>(node: T, object: ElementConstructorTagObject<T>): ElementConstructor<T>;
|
|
4
3
|
export declare function element<T extends string = string>(node: T, object: ElementConstructorTagObject<Element>): ElementConstructor<Element>;
|
|
5
4
|
export declare function a(object?: ElementConstructorTagObject<'a'>): ElementConstructor<"a", HTMLAnchorElement & SVGAElement>;
|
|
@@ -4,7 +4,6 @@ import { TweakerLinkManagerElement } from './TweakerLinkManagerElement';
|
|
|
4
4
|
import { TweakerNumberManagerElement } from './TweakerNumberManagerElement';
|
|
5
5
|
import { TweakerSelectManagerElement } from './TweakerSelectManagerElement';
|
|
6
6
|
import { TweakerStringManagerElement } from './TweakerStringManagerElement';
|
|
7
|
-
|
|
8
7
|
export declare const tweakerManagerConstructors: {
|
|
9
8
|
boolean: typeof TweakerBooleanManagerElement;
|
|
10
9
|
color: typeof TweakerColorManagerElement;
|
package/lib/pointer/Pointer.d.ts
CHANGED
package/lib/router/Link.d.ts
CHANGED
package/lib/router/Router.d.ts
CHANGED