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.
Files changed (110) hide show
  1. package/lib/accordion/index.d.ts +0 -1
  2. package/lib/animation/Animation.d.ts +0 -1
  3. package/lib/animation/Damped.d.ts +0 -1
  4. package/lib/animation/Tweened.d.ts +0 -1
  5. package/lib/attribute/index.d.ts +0 -1
  6. package/lib/canvas/index.d.ts +0 -1
  7. package/lib/class-linked-status/index.d.ts +0 -1
  8. package/lib/controls/AutoplayControls.d.ts +0 -1
  9. package/lib/controls/Controls.d.ts +0 -1
  10. package/lib/controls/DragControls.d.ts +0 -1
  11. package/lib/controls/KeyboardControls.d.ts +0 -1
  12. package/lib/controls/WheelControls.d.ts +0 -1
  13. package/lib/css-property/index.d.ts +0 -1
  14. package/lib/device/Viewport.d.ts +0 -1
  15. package/lib/element-resizer/react/index.d.ts +0 -1
  16. package/lib/element-resizer/vanilla/index.d.ts +0 -1
  17. package/lib/en3/En3Raycaster.d.ts +0 -1
  18. package/lib/en3/En3View.d.ts +0 -1
  19. package/lib/en3/en3.d.ts +0 -1
  20. package/lib/en3/index.cjs +2 -2
  21. package/lib/en3/index.js +91 -92
  22. package/lib/en3/utils/coverTexture.d.ts +0 -1
  23. package/lib/en3/utils/dispose.d.ts +0 -1
  24. package/lib/en3/utils/getCurrentViewport.d.ts +0 -1
  25. package/lib/en3/utils/traverseMaterials.d.ts +0 -1
  26. package/lib/en3/utils/traverseMeshes.d.ts +0 -1
  27. package/lib/intersector/react/index.d.ts +0 -1
  28. package/lib/intersector/vanilla/index.d.ts +0 -1
  29. package/lib/ladder/index.d.ts +0 -1
  30. package/lib/layout-box/index.d.ts +0 -1
  31. package/lib/media/index.d.ts +0 -1
  32. package/lib/media-elements/iframe/index.d.ts +0 -1
  33. package/lib/media-elements/image/index.d.ts +0 -1
  34. package/lib/media-elements/index.cjs +2 -2
  35. package/lib/media-elements/index.js +31 -32
  36. package/lib/media-elements/sequence/index.d.ts +0 -1
  37. package/lib/media-elements/source/index.d.ts +0 -1
  38. package/lib/media-elements/video/index.d.ts +0 -1
  39. package/lib/media-elements/youtube/index.d.ts +0 -1
  40. package/lib/morph/Link.d.ts +1 -1
  41. package/lib/morph/Morph.d.ts +18 -3
  42. package/lib/morph/index.cjs +1 -1
  43. package/lib/morph/index.js +184 -150
  44. package/lib/need_redo_tweaker/TweakerBooleanManagerElement.d.ts +0 -1
  45. package/lib/need_redo_tweaker/TweakerColorManagerElement.d.ts +0 -1
  46. package/lib/need_redo_tweaker/TweakerElement.d.ts +0 -1
  47. package/lib/need_redo_tweaker/TweakerFieldElement.d.ts +0 -1
  48. package/lib/need_redo_tweaker/TweakerFolderElement.d.ts +0 -1
  49. package/lib/need_redo_tweaker/TweakerLinkManagerElement.d.ts +0 -1
  50. package/lib/need_redo_tweaker/TweakerNumberManagerElement.d.ts +0 -1
  51. package/lib/need_redo_tweaker/TweakerSelectManagerElement.d.ts +0 -1
  52. package/lib/need_redo_tweaker/TweakerStoreManagerElement.d.ts +0 -1
  53. package/lib/need_redo_tweaker/TweakerStringManagerElement.d.ts +0 -1
  54. package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +0 -1
  55. package/lib/need_redo_tweaker/element-constructor/createStylesheet.d.ts +0 -1
  56. package/lib/need_redo_tweaker/element-constructor/createTheme.d.ts +0 -1
  57. package/lib/need_redo_tweaker/element-constructor/tags.d.ts +0 -1
  58. package/lib/need_redo_tweaker/select/SelectHeadElement.d.ts +0 -1
  59. package/lib/need_redo_tweaker/select/SelectOptionElement.d.ts +0 -1
  60. package/lib/need_redo_tweaker/select/SelectUserElement.d.ts +0 -1
  61. package/lib/need_redo_tweaker/tweakerManagerConstructors.d.ts +0 -1
  62. package/lib/pointer/Pointer.d.ts +0 -1
  63. package/lib/pointer/PointerElement.d.ts +0 -1
  64. package/lib/popover/PopoverButtonElement.d.ts +0 -1
  65. package/lib/popover/PopoverElement.d.ts +0 -1
  66. package/lib/router/Link.d.ts +0 -1
  67. package/lib/router/Router.d.ts +0 -1
  68. package/lib/scroll/react/Scroll.d.ts +0 -1
  69. package/lib/scroll/react/ScrollBulletButtons.d.ts +0 -1
  70. package/lib/scroll/react/ScrollSegment.d.ts +0 -1
  71. package/lib/scroll/react/ScrollSetButton.d.ts +0 -1
  72. package/lib/scroll/react/ScrollStepButton.d.ts +0 -1
  73. package/lib/scroll/react/Scrollbar.d.ts +0 -1
  74. package/lib/scroll/vanilla/ScrollBulletButtonsElement.d.ts +0 -1
  75. package/lib/scroll/vanilla/ScrollButtonElement.d.ts +0 -1
  76. package/lib/scroll/vanilla/ScrollElement.d.ts +0 -1
  77. package/lib/scroll/vanilla/ScrollSection.d.ts +0 -1
  78. package/lib/scroll/vanilla/ScrollSegmentElement.d.ts +0 -1
  79. package/lib/scroll/vanilla/ScrollSetButtonElement.d.ts +0 -1
  80. package/lib/scroll/vanilla/ScrollStepButtonElement.d.ts +0 -1
  81. package/lib/scroll/vanilla/ScrollUserElement.d.ts +0 -1
  82. package/lib/scroll/vanilla/ScrollbarElement.d.ts +0 -1
  83. package/lib/scroll-entries/index.d.ts +0 -1
  84. package/lib/scroll-segment/index.d.ts +0 -1
  85. package/lib/slicer/SlicerElement.d.ts +0 -1
  86. package/lib/slicer/Word.d.ts +0 -1
  87. package/lib/source/SourceManager.d.ts +0 -1
  88. package/lib/source/SourceSet.d.ts +0 -1
  89. package/lib/store/react/useStore.d.ts +0 -1
  90. package/lib/store/vanilla/Composed.d.ts +0 -1
  91. package/lib/store/vanilla/Derived.d.ts +0 -1
  92. package/lib/store/vanilla/DerivedArray.d.ts +0 -1
  93. package/lib/store/vanilla/Resource.d.ts +0 -1
  94. package/lib/store/vanilla/StoreRegistry.d.ts +0 -1
  95. package/lib/studio/Outliner/File/index.d.ts +0 -1
  96. package/lib/studio/Outliner/Folder/index.d.ts +0 -1
  97. package/lib/studio/Outliner/index.d.ts +0 -1
  98. package/lib/studio/Studio/index.d.ts +0 -1
  99. package/lib/studio/Tweaker/index.d.ts +0 -1
  100. package/lib/studio/store.d.ts +0 -1
  101. package/lib/ticker/react/index.d.ts +0 -1
  102. package/lib/ticker/vanilla/index.d.ts +0 -1
  103. package/lib/utils/collisions.d.ts +0 -1
  104. package/lib/utils/coordinates.d.ts +0 -1
  105. package/lib/utils/events.d.ts +1 -1
  106. package/lib/utils/math.d.ts +0 -1
  107. package/lib/utils/ts-react-utility.d.ts +0 -1
  108. package/lib/window-resizer/react/index.d.ts +0 -1
  109. package/lib/window-resizer/vanilla/index.d.ts +0 -1
  110. package/package.json +4 -3
@@ -1,163 +1,165 @@
1
- var rt = (s, t) => (t = Symbol[s]) ? t : Symbol.for("Symbol." + s), at = (s) => {
2
- throw TypeError(s);
1
+ var rt = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), ot = (n) => {
2
+ throw TypeError(n);
3
3
  };
4
- var U = (s, t, i) => t.has(s) || at("Cannot " + i);
5
- var e = (s, t, i) => (U(s, t, "read from private field"), i ? i.call(s) : t.get(s)), r = (s, t, i) => t.has(s) ? at("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, i), c = (s, t, i, n) => (U(s, t, "write to private field"), n ? n.call(s, i) : t.set(s, i), i), L = (s, t, i) => (U(s, t, "access private method"), i);
6
- var N = (s, t, i) => new Promise((n, l) => {
7
- var u = (m) => {
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
- g(i.next(m));
10
- } catch (A) {
11
- l(A);
9
+ E(i.next(f));
10
+ } catch (b) {
11
+ l(b);
12
12
  }
13
- }, h = (m) => {
13
+ }, r = (f) => {
14
14
  try {
15
- g(i.throw(m));
16
- } catch (A) {
17
- l(A);
15
+ E(i.throw(f));
16
+ } catch (b) {
17
+ l(b);
18
18
  }
19
- }, g = (m) => m.done ? n(m.value) : Promise.resolve(m.value).then(u, h);
20
- g((i = i.apply(s, t)).next());
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 = (s, t, i) => (t = s[rt("asyncIterator")]) ? t.call(s) : (s = s[rt("iterator")](), t = {}, i = (n, l) => (l = s[n]) && (t[n] = (u) => new Promise((h, g, m) => (u = l.call(s, u), m = u.done, Promise.resolve(u.value).then((A) => h({ value: A, done: m }), g)))), i("next"), i("return"), t);
23
- import { Notifier as ot } from "../notifier/index.js";
24
- import { i as gt } from "../browser-0zX67oeU.js";
25
- import { n as Et, c as ct, s as vt } from "../url-B5eH5z6S.js";
26
- import { loading as lt } from "../loading/index.js";
27
- var w, o, f, T, C, k, S, H;
28
- class ut {
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
- r(this, w);
31
- r(this, o);
32
- r(this, f);
33
- r(this, T);
34
- r(this, C);
35
- r(this, k);
36
- r(this, S, (t) => {
37
- t.preventDefault(), e(this, w).links.forEach((i) => {
38
- var n;
39
- e(this, f) === e(i, f) || (n = e(i, k)) != null && n.includes(e(this, f)) ? e(i, o).classList.add("clicked") : e(i, o).classList.remove("clicked");
40
- }), e(this, w).navigate(e(this, f), {
41
- historyAction: e(this, T),
42
- state: e(this, C)
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
- r(this, H, () => {
46
- e(this, w).prefetch(e(this, f)), e(this, o).removeEventListener("pointerenter", e(this, H));
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, h;
49
- c(this, w, i), c(this, o, t), c(this, f, e(this, o).getAttribute("href") || "/"), c(this, T, e(this, o).getAttribute(
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, C, e(this, o).getAttribute("data-state") || void 0), e(this, o).addEventListener("click", e(this, S));
52
- const n = i.normalizePath(e(this, f)), l = i.normalizePath(location.pathname);
53
- c(this, k, (u = e(this, o).getAttribute("data-match-paths")) == null ? void 0 : u.split(",").map((g) => i.normalizePath(g.trim()).pathname)), e(this, o).hasAttribute("data-include") ? l.pathname.includes(n.pathname) && e(this, o).classList.add("current") : n.pathname === l.pathname || (h = e(this, k)) != null && h.includes(l.pathname) ? (e(this, o).classList.add("current"), e(this, o).classList.add("clicked")) : e(this, o).classList.remove("clicked"), e(this, o).hasAttribute("data-prefetch") && e(this, o).addEventListener("pointerenter", e(this, H));
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, o).removeEventListener("click", e(this, S)), e(this, o).removeEventListener("pointerenter", e(this, H)), e(this, o).classList.remove("current");
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
- w = new WeakMap(), o = new WeakMap(), f = new WeakMap(), T = new WeakMap(), C = new WeakMap(), k = new WeakMap(), S = new WeakMap(), H = new WeakMap();
60
- var z, x, D, R, P, Y, y, b, p, _, F, I, q, d, V, X, dt, Z, j;
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
- r(this, d);
64
- r(this, z, null);
65
- r(this, x, null);
66
- r(this, D, null);
67
- r(this, R, null);
68
- r(this, P, []);
69
- r(this, Y, new DOMParser());
70
- r(this, y, /* @__PURE__ */ new Map());
71
- r(this, b);
72
- r(this, p, null);
73
- r(this, _);
74
- r(this, F);
75
- r(this, I, new ot());
76
- r(this, q, new ot());
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 (gt) {
81
- c(this, z, Et(t == null ? void 0 : t.base)), c(this, x, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), c(this, D, (t == null ? void 0 : t.cachePages) !== !1), c(this, R, L(this, d, X).call(this, document.body));
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, p, i.pathname), document.documentElement.setAttribute(
85
+ c(this, L, i.pathname), document.documentElement.setAttribute(
84
86
  "data-current-pathname",
85
- e(this, p)
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, p),
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, p);
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, F);
108
+ return e(this, _);
105
109
  }
106
110
  get links() {
107
- return e(this, P);
111
+ return e(this, g);
108
112
  }
109
113
  normalizePath(t) {
110
- return vt(t, e(this, z));
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 N(this, null, function* () {
117
+ return z(this, null, function* () {
120
118
  const i = this.normalizePath(t);
121
- return L(this, d, V).call(this, i.pathname);
119
+ return P(this, m, Q).call(this, i.pathname);
122
120
  });
123
121
  }
124
122
  navigate(l) {
125
- return N(this, arguments, function* (t, { historyAction: i = "push", state: n } = {}) {
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: h, hash: g, parameters: m, leaf: A } = u;
129
- if (e(this, b) === h || e(this, p) === h)
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, F, n), c(this, b, h);
132
- const B = e(this, y).has(h);
131
+ c(this, _, s), c(this, y, r);
132
+ const C = e(this, H).has(r);
133
133
  try {
134
- lt.add("__morph");
135
- let O = !0;
136
- if (e(this, I).notify({
137
- pathname: h,
138
- isCached: B,
139
- state: n
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, E) => {
143
- var v;
144
- (v = this.preprocessor) == null || v.call(this, { pathname: h, resolve: a, reject: E, isCached: B, state: n });
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"), O = !1;
149
+ a ? console.error(a) : console.log("Route change canceled"), q = !1;
148
150
  }
149
- if (!O || e(this, b) !== h)
151
+ if (!q || e(this, y) !== r)
150
152
  return;
151
- const tt = e(this, y).get(h) || (yield L(this, d, V).call(this, h));
152
- if (e(this, b) !== h)
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 et = Array.from(document.head.children), it = Array.from(
155
- tt.head.cloneNode(!0).children
156
- ), st = L(this, d, dt).call(this, et, it), mt = L(this, d, Z).call(this, et, st), W = L(this, d, Z).call(this, it, st);
157
- W.forEach((a, E) => {
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 v = document.createElement("script");
160
- v.type = "module", v.src = a.getAttribute("src"), W[E] = v;
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, x) && G.length && (yield new Promise((a) => N(this, null, function* () {
169
- let E = 0;
170
+ e(this, B) && G.length && (yield new Promise((a) => z(this, null, function* () {
171
+ let A = 0;
170
172
  try {
171
- for (var v = ht(G), pt, J, K; pt = !(J = yield v.next()).done; pt = !1) {
172
- const M = J.value;
173
- M.onload = () => {
174
- E++, E === G.length && a();
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 (J) {
178
- K = [J];
179
+ } catch (S) {
180
+ nt = [S];
179
181
  } finally {
180
182
  try {
181
- pt && (J = v.return) && (yield J.call(v));
183
+ st && (S = w.return) && (yield S.call(w));
182
184
  } finally {
183
- if (K)
184
- throw K[0];
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, _, e(this, p)), c(this, p, h), ct(i, h, m, g);
190
- const ft = L(this, d, X).call(this, tt.body.cloneNode(!0));
191
- e(this, R).forEach((a, E) => {
192
- const v = ft[E];
193
- let pt = [...a.childNodes], J = [...v.childNodes];
194
- pt.forEach((K) => {
195
- if (K instanceof HTMLElement) {
196
- const M = K.getAttribute("data-remain");
197
- let nt;
198
- J = J.filter(
199
- (Q) => Q instanceof HTMLElement && M && Q.getAttribute("data-remain") === M ? (nt = Q, !1) : !0
200
- ), M && nt || K.remove();
201
- } else
202
- K.remove();
203
- }), a.append(...J);
204
- }), this.findLinks(), document.documentElement.setAttribute("data-current-pathname", h), document.documentElement.setAttribute("data-current-leaf", A), ($ = this.postprocessor) == null || $.call(this, { pathname: h, isCached: B, state: n }), e(this, q).notify({ pathname: h, isCached: B, state: n }), lt.complete("__morph");
205
- } catch (O) {
206
- console.error(O);
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, b, void 0);
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
- e(this, P).push(new ut(i, this));
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 n;
222
- return ((n = i.getAttribute("href")) == null ? void 0 : n.startsWith("/")) && !i.hasAttribute("download") && !i.hasAttribute("data-morph-skip");
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, P).forEach((i) => i.destroy()), c(this, P, t.map((i) => new ut(i, this)));
258
+ e(this, g).forEach((i) => i.destroy()), c(this, g, t.map((i) => new lt(i, this)));
226
259
  }
227
260
  }
228
- z = new WeakMap(), x = new WeakMap(), D = new WeakMap(), R = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), y = new WeakMap(), b = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), F = new WeakMap(), I = new WeakMap(), q = new WeakMap(), d = new WeakSet(), V = function(t) {
229
- return N(this, null, function* () {
230
- const i = e(this, y).get(t);
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, D) && e(this, y).set(t, u), u;
267
+ return e(this, F) && e(this, H).set(t, u), u;
235
268
  });
236
- }, X = function(t) {
237
- return [...t.querySelectorAll("[data-morph]")];
238
- }, dt = function(t, i) {
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
- (n) => i.find(
241
- (l) => l.outerHTML === n.outerHTML
274
+ (s) => i.find(
275
+ (l) => l.outerHTML === s.outerHTML
242
276
  )
243
277
  );
244
- }, Z = function(t, i) {
278
+ }, X = function(t, i) {
245
279
  return t.filter(
246
- (n) => !i.find(
247
- (l) => l.outerHTML === n.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 { TweakerFolderElement } from './TweakerFolderElement';
3
-
4
3
  export interface StoreBox {
5
4
  store: Store;
6
5
  remainingFolders: Array<string>;
@@ -1,5 +1,4 @@
1
1
  import { Store } from '../store/vanilla';
2
-
3
2
  export interface TweakerFieldParameters {
4
3
  store: Store<any>;
5
4
  }
@@ -1,7 +1,6 @@
1
1
  import { Store } from '../store/vanilla';
2
2
  import { TweakerFieldElement } from './TweakerFieldElement';
3
3
  import { StoreBox } from './TweakerElement';
4
-
5
4
  export interface TweakerFolderParameters {
6
5
  key: string;
7
6
  storeBox?: StoreBox;
@@ -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,5 +1,4 @@
1
1
  import { Store } from '../store/vanilla';
2
-
3
2
  export declare class TweakerStoreManagerElement<S extends Store<any>> extends HTMLElement {
4
3
  #private;
5
4
  constructor(...stores: Array<S>);
@@ -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,3 +1,2 @@
1
1
  import { ElementConstructorJSS } from './ElementConstructor';
2
-
3
2
  export declare function createStylesheet<T extends ElementConstructorJSS>(object?: T): CSSStyleSheet;
@@ -1,5 +1,4 @@
1
1
  import { CamelToKebab } from '../../utils';
2
-
3
2
  export interface CreateThemeOptions<P extends string = ''> {
4
3
  prefix?: P;
5
4
  }
@@ -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>;
@@ -1,5 +1,4 @@
1
1
  import { SelectUserElement } from './SelectUserElement';
2
-
3
2
  export declare class SelectHeadElement extends SelectUserElement {
4
3
  #private;
5
4
  constructor();
@@ -1,5 +1,4 @@
1
1
  import { SelectUserElement } from './SelectUserElement';
2
-
3
2
  export declare class SelectOptionElement extends SelectUserElement {
4
3
  #private;
5
4
  constructor();
@@ -1,5 +1,4 @@
1
1
  import { SelectElement } from './SelectElement';
2
-
3
2
  export declare class SelectUserElement extends HTMLElement {
4
3
  #private;
5
4
  get selectElement(): SelectElement;
@@ -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;
@@ -1,6 +1,5 @@
1
1
  import { Damped, DampedOptions } from '../animation';
2
2
  import { ElementOrSelector } from '../utils';
3
-
4
3
  export interface PointerParameters {
5
4
  element: ElementOrSelector<HTMLElement>;
6
5
  damped?: DampedOptions;
@@ -1,5 +1,4 @@
1
1
  import { Pointer } from './Pointer';
2
-
3
2
  export declare class PointerElement extends HTMLElement {
4
3
  #private;
5
4
  constructor();
@@ -1,6 +1,5 @@
1
1
  import { CSSProperty } from '../css-property';
2
2
  import { PopoverElement } from './PopoverElement';
3
-
4
3
  export type PopoverButtonType = 'open' | 'close' | 'toggle';
5
4
  export declare class PopoverButtonElement extends HTMLElement {
6
5
  #private;
@@ -1,6 +1,5 @@
1
1
  import { CSSProperty } from '../css-property';
2
2
  import { Store } from '../store/vanilla';
3
-
4
3
  export interface PopoverEvents {
5
4
  popoverTriggered: CustomEvent<{
6
5
  trigger: any;
@@ -1,5 +1,4 @@
1
1
  import { Router } from './Router';
2
-
3
2
  export declare class Link {
4
3
  #private;
5
4
  constructor(router: Router, element: HTMLElement);
@@ -1,7 +1,6 @@
1
1
  import { splitPath, ChangeHistoryAction } from '../utils';
2
2
  import { Route, RouteModule } from './Route';
3
3
  import { Link } from './Link';
4
-
5
4
  export interface RouterPreprocessorEntry {
6
5
  path: ReturnType<typeof splitPath>;
7
6
  resolve: () => void;