aptechka 0.79.0 → 0.80.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 (150) hide show
  1. package/lib/{Animation-BDEX44-i.js → Animation-C4tLEBGM.js} +2 -2
  2. package/lib/{Animation-hZcAchp_.cjs → Animation-jmvFcNfM.cjs} +1 -1
  3. package/lib/Composed-BB1MtFiT.js +70 -0
  4. package/lib/Composed-CSeUTRCg.cjs +1 -0
  5. package/lib/{Damped-z9Uaw2MJ.cjs → Damped-77Urmi3q.cjs} +1 -1
  6. package/lib/{Damped-CtQmJ52v.js → Damped-DVG5nrYV.js} +2 -2
  7. package/lib/DerivedArray-B8A0-8uT.cjs +1 -0
  8. package/lib/DerivedArray-D3scYQdp.js +59 -0
  9. package/lib/{DragControls-K67-diF5.cjs → DragControls-BlL26P1V.cjs} +1 -1
  10. package/lib/{DragControls-DyIrD3GV.js → DragControls-Cm_88cLt.js} +4 -4
  11. package/lib/{SourceElement-VVdVc1d-.cjs → SourceElement-BBfaAgwe.cjs} +1 -1
  12. package/lib/{SourceElement-BnMxiOqY.js → SourceElement-BiNNtaz9.js} +2 -2
  13. package/lib/Store-1JrMCgdX.cjs +1 -0
  14. package/lib/{Store-0BVty6AZ.js → Store-BtVtCGLk.js} +52 -35
  15. package/lib/{Tweened-BlZB0vl4.js → Tweened-C1lnK6n9.js} +2 -2
  16. package/lib/{Tweened-mvHucL4Y.cjs → Tweened-CXQrFQth.cjs} +1 -1
  17. package/lib/{Viewport-DB0qAZPJ.cjs → Viewport-Cx50Hufs.cjs} +1 -1
  18. package/lib/{Viewport-DA10iWAO.js → Viewport-DbN_JWBM.js} +2 -2
  19. package/lib/accordion/index.cjs +1 -1
  20. package/lib/accordion/index.js +1 -1
  21. package/lib/animation/index.cjs +1 -1
  22. package/lib/animation/index.js +3 -3
  23. package/lib/attribute/index.cjs +1 -1
  24. package/lib/attribute/index.js +3 -3
  25. package/lib/billboard/index.cjs +1 -1
  26. package/lib/billboard/index.js +2 -2
  27. package/lib/canvas/index.cjs +1 -1
  28. package/lib/canvas/index.js +2 -2
  29. package/lib/connector/index.cjs +1 -1
  30. package/lib/connector/index.js +2 -1
  31. package/lib/controls/index.cjs +1 -1
  32. package/lib/controls/index.js +1 -1
  33. package/lib/css-property/index.cjs +1 -1
  34. package/lib/css-property/index.js +3 -3
  35. package/lib/css-value-parser/index.cjs +1 -1
  36. package/lib/css-value-parser/index.js +1 -1
  37. package/lib/dev/index.cjs +1 -1
  38. package/lib/dev/index.js +2 -2
  39. package/lib/device/index.cjs +1 -1
  40. package/lib/device/index.js +1 -1
  41. package/lib/{dom-CVWzyXPH.js → dom-fgxIeFxm.js} +22 -7
  42. package/lib/dom-hTEdqeoj.cjs +1 -0
  43. package/lib/element-linked-store/index.cjs +1 -1
  44. package/lib/element-linked-store/index.js +2 -2
  45. package/lib/element-resizer/index.cjs +1 -1
  46. package/lib/element-resizer/index.js +2 -2
  47. package/lib/en3/index.cjs +1 -1
  48. package/lib/en3/index.js +2 -2
  49. package/lib/iframe/index.cjs +1 -1
  50. package/lib/iframe/index.js +3 -3
  51. package/lib/image/index.cjs +1 -1
  52. package/lib/image/index.js +4 -4
  53. package/lib/{index-DekP7OZe.cjs → index-CKTweR3M.cjs} +1 -1
  54. package/lib/{index-Bv9zgfdb.js → index-JqYHGoo6.js} +1 -1
  55. package/lib/intersector/index.cjs +1 -1
  56. package/lib/intersector/index.js +2 -2
  57. package/lib/jsx/ComponentElement.d.ts +13 -0
  58. package/lib/jsx/h.d.ts +3 -0
  59. package/lib/jsx/hooks/common.d.ts +1 -0
  60. package/lib/jsx/hooks/component/lifecycle.d.ts +4 -0
  61. package/lib/jsx/hooks/component/useInternals.d.ts +2 -0
  62. package/lib/jsx/hooks/component/useShadow.d.ts +2 -0
  63. package/lib/jsx/hooks/component/useStylesheet.d.ts +8 -0
  64. package/lib/jsx/hooks/store.d.ts +8 -0
  65. package/lib/jsx/index.cjs +1 -0
  66. package/lib/jsx/index.d.ts +9 -0
  67. package/lib/jsx/index.js +140 -0
  68. package/lib/jsx/render.d.ts +1 -0
  69. package/lib/jsx/type.d.ts +224 -0
  70. package/lib/jsx/utils/attributes/class.d.ts +5 -0
  71. package/lib/jsx/utils/attributes/setAttributes.d.ts +2 -0
  72. package/lib/jsx/utils/attributes/style.d.ts +6 -0
  73. package/lib/jsx/utils/children/filterChildren.d.ts +2 -0
  74. package/lib/jsx/utils/children/findTextNode.d.ts +1 -0
  75. package/lib/jsx/utils/children/removeChildren.d.ts +1 -0
  76. package/lib/jsx/utils/children/storeChildren.d.ts +2 -0
  77. package/lib/jsx/utils/elementStoreSubscription.d.ts +2 -0
  78. package/lib/ladder/index.cjs +1 -1
  79. package/lib/ladder/index.js +2 -2
  80. package/lib/layout-box/index.cjs +1 -1
  81. package/lib/layout-box/index.js +2 -2
  82. package/lib/loading/index.cjs +1 -1
  83. package/lib/loading/index.js +1 -1
  84. package/lib/masonry-layout/index.cjs +1 -1
  85. package/lib/masonry-layout/index.js +2 -2
  86. package/lib/media/index.cjs +1 -1
  87. package/lib/media/index.js +2 -2
  88. package/lib/morph/Morph.d.ts +3 -21
  89. package/lib/morph/index.cjs +1 -1
  90. package/lib/morph/index.js +3 -3
  91. package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +1 -1
  92. package/lib/need_redo_tweaker/index.cjs +1 -1
  93. package/lib/need_redo_tweaker/index.js +8 -8
  94. package/lib/pixel-perfect/index.cjs +1 -1
  95. package/lib/pixel-perfect/index.js +3 -3
  96. package/lib/pointer/index.cjs +1 -1
  97. package/lib/pointer/index.js +4 -4
  98. package/lib/popover/index.cjs +1 -1
  99. package/lib/popover/index.js +3 -3
  100. package/lib/radio/index.cjs +1 -1
  101. package/lib/radio/index.js +1 -1
  102. package/lib/render-BCEBRfHS.js +196 -0
  103. package/lib/render-Rv0UMACs.cjs +1 -0
  104. package/lib/router/Link.d.ts +3 -1
  105. package/lib/router/Route.d.ts +9 -10
  106. package/lib/router/Router.d.ts +13 -13
  107. package/lib/router/index.cjs +1 -1
  108. package/lib/router/index.d.ts +2 -2
  109. package/lib/router/index.js +267 -216
  110. package/lib/scroll/index.cjs +1 -1
  111. package/lib/scroll/index.js +8 -8
  112. package/lib/{scroll-DNGJVxa2.js → scroll-7JSxRKFK.js} +2 -2
  113. package/lib/{scroll-CIdNtj3G.cjs → scroll-DxcPU0vk.cjs} +1 -1
  114. package/lib/scroll-entries/index.cjs +1 -1
  115. package/lib/scroll-entries/index.js +1 -1
  116. package/lib/scroll-kit/index.cjs +1 -1
  117. package/lib/scroll-kit/index.js +4 -4
  118. package/lib/sequence/index.cjs +1 -1
  119. package/lib/sequence/index.js +3 -3
  120. package/lib/size-element/index.cjs +1 -1
  121. package/lib/size-element/index.js +1 -1
  122. package/lib/slicer/SlicerElement.d.ts +1 -1
  123. package/lib/slicer/index.cjs +1 -1
  124. package/lib/slicer/index.js +13 -13
  125. package/lib/source/index.cjs +1 -1
  126. package/lib/source/index.js +1 -1
  127. package/lib/store/DerivedArray.d.ts +11 -1
  128. package/lib/store/Store.d.ts +5 -0
  129. package/lib/store/index.cjs +1 -1
  130. package/lib/store/index.js +10 -87
  131. package/lib/{stylesheet-HWF2a3nr.cjs → stylesheet-BcwbfhBp.cjs} +1 -1
  132. package/lib/{stylesheet-DpnWNVyD.js → stylesheet-JlRFfJIc.js} +1 -1
  133. package/lib/ticker/index.cjs +1 -1
  134. package/lib/ticker/index.js +2 -2
  135. package/lib/url-C2kASACG.cjs +1 -0
  136. package/lib/{url-Ddgqz4Q_.js → url-CGbjOTU4.js} +17 -17
  137. package/lib/utils/dom.d.ts +2 -0
  138. package/lib/utils/index.cjs +1 -1
  139. package/lib/utils/index.js +102 -100
  140. package/lib/utils/url.d.ts +3 -2
  141. package/lib/video/index.cjs +1 -1
  142. package/lib/video/index.js +3 -3
  143. package/lib/window-resizer/index.cjs +1 -1
  144. package/lib/window-resizer/index.js +1 -1
  145. package/lib/youtube/index.cjs +1 -1
  146. package/lib/youtube/index.js +3 -3
  147. package/package.json +21 -11
  148. package/lib/Store-Cd1GlEmZ.cjs +0 -1
  149. package/lib/dom-JBOkFLTh.cjs +0 -1
  150. package/lib/url-VIZgwj_h.cjs +0 -1
@@ -0,0 +1,196 @@
1
+ var O = Object.defineProperty, q = Object.defineProperties;
2
+ var w = Object.getOwnPropertyDescriptors;
3
+ var g = Object.getOwnPropertySymbols;
4
+ var B = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
5
+ var _ = (r) => {
6
+ throw TypeError(r);
7
+ };
8
+ var L = (r, o, t) => o in r ? O(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t, A = (r, o) => {
9
+ for (var t in o || (o = {}))
10
+ B.call(o, t) && L(r, t, o[t]);
11
+ if (g)
12
+ for (var t of g(o))
13
+ K.call(o, t) && L(r, t, o[t]);
14
+ return r;
15
+ }, N = (r, o) => q(r, w(o));
16
+ var D = (r, o, t) => o.has(r) || _("Cannot " + t);
17
+ var u = (r, o, t) => (D(r, o, "read from private field"), t ? t.call(r) : o.get(r)), m = (r, o, t) => o.has(r) ? _("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(r) : o.set(r, t), S = (r, o, t, s) => (D(r, o, "write to private field"), s ? s.call(r, t) : o.set(r, t), t);
18
+ import { S as h } from "./Store-BtVtCGLk.js";
19
+ import { c as R } from "./string-BlMQbe8b.js";
20
+ import "construct-style-sheets-polyfill";
21
+ import "./index-JqYHGoo6.js";
22
+ import { connector as H } from "./connector/index.js";
23
+ import { a as M } from "./DerivedArray-D3scYQdp.js";
24
+ const P = { current: null };
25
+ var d, p;
26
+ class $ extends HTMLElement {
27
+ constructor() {
28
+ super();
29
+ m(this, d, []);
30
+ m(this, p, []);
31
+ P.current = this;
32
+ }
33
+ addConnectCallback(t) {
34
+ u(this, d).push(t);
35
+ }
36
+ addDisconnectCallback(t) {
37
+ u(this, p).push(t);
38
+ }
39
+ connectedCallback() {
40
+ u(this, d).forEach((t) => {
41
+ const s = t(this);
42
+ s && u(this, p).push(s);
43
+ });
44
+ }
45
+ disconnectedCallback() {
46
+ u(this, p).forEach((t) => {
47
+ t(this);
48
+ }), S(this, d, []), S(this, p, []);
49
+ }
50
+ }
51
+ d = new WeakMap(), p = new WeakMap();
52
+ function l(r, o, t) {
53
+ const s = o.subscribe((i) => {
54
+ t(i);
55
+ });
56
+ H.subscribe(r, {
57
+ disconnectCallback: () => {
58
+ s();
59
+ },
60
+ maxWaitSec: 20,
61
+ unsubscribeAfterDisconnect: !0
62
+ });
63
+ }
64
+ function W(r, o) {
65
+ o && (o instanceof h ? l(r, o, (t) => {
66
+ t.previous && r.classList.remove(t.previous.toString()), t.current && r.classList.add(t.current.toString());
67
+ }) : typeof o == "object" && !Array.isArray(o) ? Object.entries(o).forEach(([t, s]) => {
68
+ s instanceof h ? l(r, s, (i) => {
69
+ r.classList.toggle(t, !!i.current);
70
+ }) : s && r.classList.add(t);
71
+ }) : Array.isArray(o) ? o.forEach((t) => {
72
+ typeof t == "string" ? r.classList.add(t) : W(r, t);
73
+ }) : o.toString().split(" ").map((t) => r.classList.add(t.trim())));
74
+ }
75
+ function z(r, o) {
76
+ o && (typeof o == "object" ? Object.entries(o).forEach(([t, s]) => {
77
+ s instanceof h ? l(r, s, (i) => {
78
+ var f;
79
+ r.style[t] = (f = i.current) == null ? void 0 : f.toString();
80
+ }) : (typeof s == "number" || typeof s == "string" || typeof s == "boolean") && (r.style[t] = s.toString());
81
+ }) : typeof o == "string" && (r.style = o));
82
+ }
83
+ function C(r, o, t) {
84
+ o === "ref" && t ? Array.isArray(t) ? t.forEach((s) => {
85
+ typeof s == "object" && "value" in s && (s.value = r);
86
+ }) : typeof t == "object" && "value" in t && (t.value = r) : o === "className" || o === "class" ? W(r, t) : o === "style" ? z(r, t) : typeof t == "number" ? o === "tabIndex" ? r.setAttribute("tabindex", t.toString()) : C(r, o, t.toString()) : typeof t == "string" ? o === "htmlFor" ? r.setAttribute("for", t) : r.setAttribute(o, t) : typeof t == "boolean" ? t ? r.setAttribute(o, "") : r.removeAttribute(o) : t instanceof h && l(r, t, (s) => {
87
+ o in r ? r[o] = s.current : C(r, o, s.current);
88
+ });
89
+ }
90
+ function G(r, o) {
91
+ for (const [t, s] of Object.entries(o != null ? o : {}))
92
+ typeof s == "function" && t.startsWith("on") ? r.addEventListener(
93
+ t.replace("on", "").toLowerCase(),
94
+ s
95
+ ) : C(r, t, s);
96
+ }
97
+ function I(r) {
98
+ const o = [];
99
+ return r.forEach((t) => {
100
+ t != null && (typeof t == "number" ? o.push(t.toString()) : Array.isArray(t) ? t.forEach((s) => {
101
+ o.push(...I(s));
102
+ }) : o.push(t));
103
+ }), o;
104
+ }
105
+ function J(r, o) {
106
+ const t = [...r.childNodes].filter((n) => n.__storeId === o.id), s = o.current, i = Array.isArray(s) ? s : [s], f = [];
107
+ if (i.forEach((n) => {
108
+ let e = null;
109
+ typeof n == "boolean" || typeof n == "number" || typeof n == "string" ? e = document.createTextNode(n.toString()) : n instanceof Node && (e = n), e && (e.__storeId = o.id, f.push(e));
110
+ }), o instanceof M) {
111
+ const n = [];
112
+ f.forEach((e, c) => {
113
+ const a = t.find(
114
+ (b) => b.__key === e.__key
115
+ );
116
+ a ? a.isEqualNode(e) ? n.push(a) : (a.replaceWith(e), n.push(e)) : (n.push(e), r.appendChild(e));
117
+ }), t.forEach((e) => {
118
+ n.includes(e) || e.remove();
119
+ });
120
+ } else
121
+ f.forEach((n, e) => {
122
+ var a;
123
+ const c = t[e];
124
+ if (c)
125
+ c.isEqualNode(n) || (c.replaceWith(n), t[e] = n);
126
+ else {
127
+ const b = t[t.length - 1];
128
+ b ? (a = b.parentNode) == null || a.insertBefore(
129
+ n,
130
+ b.nextSibling
131
+ ) : r.appendChild(n);
132
+ }
133
+ }), t.slice(f.length).forEach((n) => {
134
+ n.remove();
135
+ });
136
+ }
137
+ class E {
138
+ constructor(o, t, s) {
139
+ this.tag = o, this.attributes = t, this.children = s;
140
+ }
141
+ }
142
+ function y(r, o, t) {
143
+ const s = I(t);
144
+ G(r, o), s.forEach((i) => {
145
+ i instanceof h ? l(r, i, () => {
146
+ J(r, i);
147
+ }) : i instanceof E ? i.tag === "shadow" && r.shadowRoot ? y(
148
+ r.shadowRoot,
149
+ i.attributes,
150
+ i.children
151
+ ) : y(r, i.attributes, i.children) : r.append(i);
152
+ });
153
+ }
154
+ function Q(r, o, ...t) {
155
+ var s;
156
+ if (typeof r == "string") {
157
+ if (r === "component")
158
+ return new E(r, o, t);
159
+ if (r === "shadow")
160
+ return new E(r, o, t);
161
+ {
162
+ const i = document.createElement(r);
163
+ return y(i, o, t), i;
164
+ }
165
+ } else {
166
+ if (r === F)
167
+ return F(t);
168
+ if (r.template)
169
+ return r(A({}, o));
170
+ const i = `e-${R(r.name)}`;
171
+ let f = customElements.get(i);
172
+ f || (f = (s = class extends $ {
173
+ constructor() {
174
+ super();
175
+ }
176
+ }, s.formAssociated = r.formAssociated, s), customElements.define(i, f));
177
+ const n = new f(), e = N(A({}, o), {
178
+ children: t
179
+ }), c = r(e);
180
+ return c instanceof E && (c != null && c.children || c.attributes) && y(n, c.attributes, c.children), n;
181
+ }
182
+ }
183
+ function F(r) {
184
+ const o = document.createDocumentFragment();
185
+ return y(o, void 0, r), o;
186
+ }
187
+ function k(r, o, t) {
188
+ const s = /* @__PURE__ */ Q(o, A({}, t));
189
+ return r.append(s), s;
190
+ }
191
+ export {
192
+ F,
193
+ P as a,
194
+ Q as h,
195
+ k as r
196
+ };
@@ -0,0 +1 @@
1
+ "use strict";var w=Object.defineProperty,B=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var _=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var q=r=>{throw TypeError(r)};var m=(r,o,t)=>o in r?w(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t,A=(r,o)=>{for(var t in o||(o={}))R.call(o,t)&&m(r,t,o[t]);if(_)for(var t of _(o))H.call(o,t)&&m(r,t,o[t]);return r},N=(r,o)=>B(r,K(o));var D=(r,o,t)=>o.has(r)||q("Cannot "+t);var p=(r,o,t)=>(D(r,o,"read from private field"),t?t.call(r):o.get(r)),S=(r,o,t)=>o.has(r)?q("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(r):o.set(r,t),g=(r,o,t,e)=>(D(r,o,"write to private field"),e?e.call(r,t):o.set(r,t),t);const h=require("./Store-1JrMCgdX.cjs"),M=require("./string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");require("./index-CKTweR3M.cjs");const P=require("./connector/index.cjs"),$=require("./DerivedArray-B8A0-8uT.cjs"),F={current:null};var d,u;class z extends HTMLElement{constructor(){super();S(this,d,[]);S(this,u,[]);F.current=this}addConnectCallback(t){p(this,d).push(t)}addDisconnectCallback(t){p(this,u).push(t)}connectedCallback(){p(this,d).forEach(t=>{const e=t(this);e&&p(this,u).push(e)})}disconnectedCallback(){p(this,u).forEach(t=>{t(this)}),g(this,d,[]),g(this,u,[])}}d=new WeakMap,u=new WeakMap;function l(r,o,t){const e=o.subscribe(s=>{t(s)});P.connector.subscribe(r,{disconnectCallback:()=>{e()},maxWaitSec:20,unsubscribeAfterDisconnect:!0})}function W(r,o){o&&(o instanceof h.Store?l(r,o,t=>{t.previous&&r.classList.remove(t.previous.toString()),t.current&&r.classList.add(t.current.toString())}):typeof o=="object"&&!Array.isArray(o)?Object.entries(o).forEach(([t,e])=>{e instanceof h.Store?l(r,e,s=>{r.classList.toggle(t,!!s.current)}):e&&r.classList.add(t)}):Array.isArray(o)?o.forEach(t=>{typeof t=="string"?r.classList.add(t):W(r,t)}):o.toString().split(" ").map(t=>r.classList.add(t.trim())))}function G(r,o){o&&(typeof o=="object"?Object.entries(o).forEach(([t,e])=>{e instanceof h.Store?l(r,e,s=>{var c;r.style[t]=(c=s.current)==null?void 0:c.toString()}):(typeof e=="number"||typeof e=="string"||typeof e=="boolean")&&(r.style[t]=e.toString())}):typeof o=="string"&&(r.style=o))}function C(r,o,t){o==="ref"&&t?Array.isArray(t)?t.forEach(e=>{typeof e=="object"&&"value"in e&&(e.value=r)}):typeof t=="object"&&"value"in t&&(t.value=r):o==="className"||o==="class"?W(r,t):o==="style"?G(r,t):typeof t=="number"?o==="tabIndex"?r.setAttribute("tabindex",t.toString()):C(r,o,t.toString()):typeof t=="string"?o==="htmlFor"?r.setAttribute("for",t):r.setAttribute(o,t):typeof t=="boolean"?t?r.setAttribute(o,""):r.removeAttribute(o):t instanceof h.Store&&l(r,t,e=>{o in r?r[o]=e.current:C(r,o,e.current)})}function J(r,o){for(const[t,e]of Object.entries(o!=null?o:{}))typeof e=="function"&&t.startsWith("on")?r.addEventListener(t.replace("on","").toLowerCase(),e):C(r,t,e)}function I(r){const o=[];return r.forEach(t=>{t!=null&&(typeof t=="number"?o.push(t.toString()):Array.isArray(t)?t.forEach(e=>{o.push(...I(e))}):o.push(t))}),o}function Q(r,o){const t=[...r.childNodes].filter(n=>n.__storeId===o.id),e=o.current,s=Array.isArray(e)?e:[e],c=[];if(s.forEach(n=>{let i=null;typeof n=="boolean"||typeof n=="number"||typeof n=="string"?i=document.createTextNode(n.toString()):n instanceof Node&&(i=n),i&&(i.__storeId=o.id,c.push(i))}),o instanceof $.DerivedKeyedArray){const n=[];c.forEach((i,f)=>{const a=t.find(b=>b.__key===i.__key);a?a.isEqualNode(i)?n.push(a):(a.replaceWith(i),n.push(i)):(n.push(i),r.appendChild(i))}),t.forEach(i=>{n.includes(i)||i.remove()})}else c.forEach((n,i)=>{var a;const f=t[i];if(f)f.isEqualNode(n)||(f.replaceWith(n),t[i]=n);else{const b=t[t.length-1];b?(a=b.parentNode)==null||a.insertBefore(n,b.nextSibling):r.appendChild(n)}}),t.slice(c.length).forEach(n=>{n.remove()})}class E{constructor(o,t,e){this.tag=o,this.attributes=t,this.children=e}}function y(r,o,t){const e=I(t);J(r,o),e.forEach(s=>{s instanceof h.Store?l(r,s,()=>{Q(r,s)}):s instanceof E?s.tag==="shadow"&&r.shadowRoot?y(r.shadowRoot,s.attributes,s.children):y(r,s.attributes,s.children):r.append(s)})}function O(r,o,...t){var e;if(typeof r=="string"){if(r==="component")return new E(r,o,t);if(r==="shadow")return new E(r,o,t);{const s=document.createElement(r);return y(s,o,t),s}}else{if(r===L)return L(t);if(r.template)return r(A({},o));const s=`e-${M.camelToKebab(r.name)}`;let c=customElements.get(s);c||(c=(e=class extends z{constructor(){super()}},e.formAssociated=r.formAssociated,e),customElements.define(s,c));const n=new c,i=N(A({},o),{children:t}),f=r(i);return f instanceof E&&(f!=null&&f.children||f.attributes)&&y(n,f.attributes,f.children),n}}function L(r){const o=document.createDocumentFragment();return y(o,void 0,r),o}function U(r,o,t){const e=O(o,A({},t));return r.append(e),e}exports.Fragment=L;exports.activeComponent=F;exports.h=O;exports.render=U;
@@ -1,6 +1,8 @@
1
+ import { SplitPathResult } from '../utils';
1
2
  import { Router } from './Router';
2
3
  export declare class Link {
3
4
  #private;
4
- constructor(router: Router, element: HTMLElement);
5
+ constructor(router: Router, element: HTMLAnchorElement);
6
+ checkCurrent(url: SplitPathResult): void;
5
7
  destroy(): void;
6
8
  }
@@ -1,21 +1,20 @@
1
- export type RouteModule = () => Promise<any>;
2
- export type RouteURLParams<T extends string = string> = Partial<{
3
- [key in T]: string;
1
+ export type RouteModule = () => Promise<{
2
+ default?: RouteComponent;
4
3
  }>;
5
- export type RouteParameters<PathnameParams extends string = string, SearchParams extends string = string> = {
6
- pathnameParams: RouteURLParams<PathnameParams>;
7
- searchParams: RouteURLParams<SearchParams>;
8
- };
4
+ export type RouteComponent = CustomElementConstructor | JSX.Component;
5
+ export type HeadNode = HTMLStyleElement | HTMLScriptElement | HTMLLinkElement;
6
+ export interface RouteParameters {
7
+ urlPatternResult: URLPatternResult;
8
+ }
9
9
  export declare class Route {
10
10
  #private;
11
11
  constructor(pattern: string, module: RouteModule);
12
12
  get pattern(): string;
13
- get urlPattern(): URLPattern;
14
13
  get isActive(): boolean;
15
14
  get element(): HTMLElement | null;
16
- get nest(): HTMLElement | ShadowRoot | null;
15
+ get nest(): Element | ShadowRoot | null;
17
16
  testPathname(pathname: string): boolean;
18
- render(containerElement: HTMLElement | ShadowRoot, pathname: string): Promise<void>;
17
+ render(container: Element | ShadowRoot, pathname: string): Promise<void>;
19
18
  close(): void;
20
19
  getAnchorElements(): HTMLAnchorElement[];
21
20
  }
@@ -1,8 +1,8 @@
1
- import { splitPath, ChangeHistoryAction } from '../utils';
2
- import { Route, RouteModule } from './Route';
1
+ import { ChangeHistoryAction, SplitPathResult } from '../utils';
3
2
  import { Link } from './Link';
3
+ import { Route, RouteModule } from './Route';
4
4
  export interface RouterPreprocessorEntry {
5
- path: ReturnType<typeof splitPath>;
5
+ path: SplitPathResult;
6
6
  resolve: () => void;
7
7
  reject: () => void;
8
8
  }
@@ -15,6 +15,10 @@ export interface RouterAfterNavigationEntry {
15
15
  pathname: string;
16
16
  }
17
17
  export type RouterAfterNavigationCallback = (entry: RouterAfterNavigationEntry) => void;
18
+ export interface RouterNavigateOptions {
19
+ historyAction?: ChangeHistoryAction;
20
+ revalidate?: boolean;
21
+ }
18
22
  export interface RouterParameters {
19
23
  rootElement?: HTMLElement;
20
24
  base?: string;
@@ -24,18 +28,14 @@ export declare class Router {
24
28
  preprocessor?: RouterPreprocessor;
25
29
  postprocessor?: RouterPostprocessor;
26
30
  constructor(parameters?: RouterParameters);
27
- get currentPathname(): string;
28
- get candidatePathname(): string | undefined;
31
+ get candidateURL(): SplitPathResult | null;
32
+ get currentURL(): SplitPathResult;
29
33
  get routes(): Route[];
30
34
  get links(): Link[];
35
+ run(): void;
36
+ destroy(): void;
31
37
  navigationEvent(callback: RouterAfterNavigationCallback): () => void;
32
38
  defineRoute(pattern: string, module: RouteModule): void;
33
- navigate(path: string, action?: ChangeHistoryAction): Promise<void>;
34
- normalizePath(path: string): {
35
- leaf: string;
36
- pathname: string;
37
- parameters: string;
38
- hash: string;
39
- path: string;
40
- };
39
+ navigate(path: string, options?: RouterNavigateOptions): Promise<void>;
40
+ normalizePath(path: string): SplitPathResult;
41
41
  }
@@ -1 +1 @@
1
- "use strict";var Z=(n,e)=>(e=Symbol[n])?e:Symbol.for("Symbol."+n),$=n=>{throw TypeError(n)};var K=(n,e,s)=>e.has(n)||$("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)=>e.has(n)?$("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),W=(n,e,s)=>(K(n,e,"access private method"),s);var B=(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 at=require("urlpattern-polyfill"),rt=require("../notifier/index.cjs"),tt=require("../index-DekP7OZe.cjs"),ht=require("../function-MthRj-GJ.cjs");require("construct-style-sheets-polyfill");const F=require("../url-VIZgwj_h.cjs"),ot=require("../object-CCiXnER2.cjs");var R,O,A,p,m,v,k,L,b,E,M,et;class ct{constructor(e,s){r(this,M);r(this,R);r(this,O);r(this,A);r(this,p);r(this,m);r(this,v);r(this,k);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),tt.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 B(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),ot.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,M,et).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,M=new WeakSet,et=function(){return B(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 lt{constructor(e,s){r(this,S);r(this,u);r(this,P);r(this,U);r(this,q);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=at.URLPattern;var N,C,g,z,T,y,H,x,_,I,st,D;class ut{constructor(e){r(this,I);r(this,N,null);r(this,C,null);r(this,g,[]);r(this,z,null);r(this,T,[]);r(this,y);r(this,H,null);r(this,x,new rt.Notifier);r(this,_,ht.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=>{var s;(s=e.state)!=null&&s.path&&this.navigate(e.state.path,"none")});tt.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,x).subscribe(e)}defineRoute(e,s){const i=new ct(e,s);t(this,g).push(i),t(this,_).call(this)}navigate(e,s="push"){return B(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)),it=d.filter(l=>!l.testPathname(f)),G=d.filter(l=>l.testPathname(f));let J=!0;if(this.preprocessor)try{yield new Promise((l,nt)=>{var X;(X=this.preprocessor)==null||X.call(this,{path:i,resolve:l,reject:nt})})}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]),it.forEach(l=>{l.close()}),a(this,H,h),F.changeHistory({action:s,pathname:h,searchParameters:c,hash:o});try{for(var ft=Y(w),pt,gt,Pt;pt=!(gt=yield ft.next()).done;pt=!1){const l=gt.value;yield l.render(((Q=t(this,z))==null?void 0:Q.nest)||t(this,N),h),a(this,z,l)}}catch(gt){Pt=[gt]}finally{try{pt&&(gt=ft.return)&&(yield gt.call(ft))}finally{if(Pt)throw Pt[0]}}W(this,I,st).call(this),(V=this.postprocessor)==null||V.call(this,{pathname:h}),t(this,x).notify({pathname:h})}})}normalizePath(e){return F.splitPath(e,{base:t(this,C)})}}N=new WeakMap,C=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,y=new WeakMap,H=new WeakMap,x=new WeakMap,_=new WeakMap,I=new WeakSet,st=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 lt(this,i)))},D=new WeakMap;exports.Router=ut;
1
+ "use strict";var Y=c=>{throw TypeError(c)};var F=(c,t,s)=>t.has(c)||Y("Cannot "+s);var e=(c,t,s)=>(F(c,t,"read from private field"),s?s.call(c):t.get(c)),a=(c,t,s)=>t.has(c)?Y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(c):t.set(c,s),h=(c,t,s,i)=>(F(c,t,"write to private field"),i?i.call(c,s):t.set(c,s),s),n=(c,t,s)=>(F(c,t,"access private method"),s);var g=(c,t,s)=>new Promise((i,l)=>{var m=f=>{try{L(s.next(f))}catch(D){l(D)}},w=f=>{try{L(s.throw(f))}catch(D){l(D)}},L=f=>f.done?i(f.value):Promise.resolve(f.value).then(m,w);L((s=s.apply(c,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pt=require("../notifier/index.cjs");require("construct-style-sheets-polyfill");require("../index-CKTweR3M.cjs");const x=require("../url-C2kASACG.cjs"),ft=require("urlpattern-polyfill"),gt=require("../render-Rv0UMACs.cjs"),Rt=require("../dom-hTEdqeoj.cjs"),_=require("../object-CCiXnER2.cjs");var b,y,B,G,H;class yt{constructor(t,s){a(this,B);a(this,b);a(this,y);a(this,H,t=>{t.preventDefault();const s=e(this,B,G),i=e(this,y).getAttribute("data-history-action")||"push";e(this,b).navigate(s,{historyAction:i})});h(this,b,t),h(this,y,s),e(this,y).addEventListener("click",e(this,H))}checkCurrent(t){}destroy(){e(this,y).removeEventListener("click",e(this,H)),e(this,y).classList.remove("current")}}b=new WeakMap,y=new WeakMap,B=new WeakSet,G=function(){const t=new URL(e(this,y).href);return e(this,b).normalizePath(t.pathname+t.search+t.hash).path},H=new WeakMap;var C,T,S,d,u,k,M,P,A,N,o,J,Q,V,X,Z,$,tt,et,st,K;class vt{constructor(t,s){a(this,o);a(this,C);a(this,T);a(this,S);a(this,d,null);a(this,u,null);a(this,k,!1);a(this,M,null);a(this,P);a(this,A,[]);a(this,N,[]);h(this,C,t),h(this,T,s),h(this,S,new URLPattern({pathname:e(this,C)})),h(this,P,new MutationObserver(n(this,o,et).bind(this)))}get pattern(){return e(this,C)}get isActive(){return e(this,k)}get element(){return e(this,u)}get nest(){return e(this,M)}testPathname(t){return e(this,S).test({pathname:t})}render(t,s){return g(this,null,function*(){e(this,P).observe(document.head,{childList:!0,subtree:!0}),e(this,d)?n(this,o,V).call(this):yield n(this,o,J).call(this),yield n(this,o,st).call(this),e(this,d)&&(yield n(this,o,X).call(this,t,s)),e(this,P).disconnect()})}close(){n(this,o,$).call(this)}getAnchorElements(){const t=[];return e(this,u)&&(t.push(...e(this,u).querySelectorAll("a")),Rt.traverseShadowRoots(e(this,u),s=>{t.push(...s.shadowRoot.querySelectorAll("a"))})),t}}C=new WeakMap,T=new WeakMap,S=new WeakMap,d=new WeakMap,u=new WeakMap,k=new WeakMap,M=new WeakMap,P=new WeakMap,A=new WeakMap,N=new WeakMap,o=new WeakSet,J=function(){return g(this,null,function*(){const t=yield e(this,T).call(this);h(this,N,[...e(this,A)]),typeof t.default=="function"&&(h(this,d,t.default),yield n(this,o,Q).call(this))})},Q=function(){return g(this,null,function*(){if(e(this,d)&&_.isESClass(e(this,d))){const t=`e-${e(this,d).name.toLowerCase()}`;customElements.get(t)||customElements.define(t,e(this,d))}})},V=function(){e(this,A).forEach(t=>{document.head.appendChild(t.cloneNode(!0))})},X=function(t,s){return g(this,null,function*(){const l={urlPatternResult:e(this,S).exec({pathname:s})};_.isESClass(e(this,d))?(h(this,u,new(e(this,d))(l)),t.appendChild(e(this,u))):h(this,u,gt.render(t,e(this,d),l)),n(this,o,Z).call(this),h(this,k,!0)})},Z=function(){var t;e(this,u)&&h(this,M,e(this,u).querySelector("[data-nest]")||((t=e(this,u).shadowRoot)==null?void 0:t.querySelector("[data-nest]"))||e(this,u).shadowRoot||e(this,u))},$=function(){var t;e(this,P).disconnect(),(t=e(this,u))==null||t.remove(),h(this,k,!1),n(this,o,tt).call(this)},tt=function(){e(this,N).forEach(t=>{t.parentNode===document.head&&document.head.removeChild(t)}),h(this,N,[])},et=function(t){t.forEach(s=>{s.addedNodes.forEach(i=>{e(this,d)?e(this,N).push(i):e(this,A).push(i)})})},st=function(){return g(this,null,function*(){const t=e(this,A).filter(n(this,o,K));yield Promise.all(t.map(s=>new Promise(i=>{n(this,o,K).call(this,s)?s.onload=()=>i():i()})))})},K=function(t){return t instanceof HTMLElement&&(t.tagName==="STYLE"||t.tagName==="SCRIPT"||t.tagName==="LINK")};globalThis.URLPattern=ft.URLPattern;var q,I,R,U,E,v,j,p,z,r,it,at,rt,ht,nt,ot,ct,lt,ut,W,dt,mt,O;class wt{constructor(t){a(this,r);a(this,q);a(this,I);a(this,R,[]);a(this,U,null);a(this,E,[]);a(this,v,null);a(this,j,null);a(this,p,null);a(this,z,new pt.Notifier);a(this,O,t=>{var s;(s=t.state)!=null&&s.path&&this.navigate(t.state.path,{historyAction:"none"})});var s;h(this,I,t!=null&&t.base?x.normalizeBase(t.base):"/"),h(this,q,(s=t==null?void 0:t.rootElement)!=null?s:document.body),h(this,p,this.normalizePath(location.pathname+location.search+location.hash)),n(this,r,it).call(this)}get candidateURL(){return e(this,v)}get currentURL(){return e(this,p)}get routes(){return e(this,R)}get links(){return e(this,E)}run(){n(this,r,lt).call(this),this.navigate(e(this,p).path,{revalidate:!0})}destroy(){removeEventListener("popstate",e(this,O)),n(this,r,W).call(this),e(this,R).forEach(t=>t.close()),e(this,z).close()}navigationEvent(t){return e(this,z).subscribe(t)}defineRoute(t,s){const i=new vt(t,s);e(this,R).push(i)}navigate(t,s){return g(this,null,function*(){var l,m,w;const i=this.normalizePath(t);if(!(s!=null&&s.revalidate)&&(((l=e(this,v))==null?void 0:l.pathname)===i.pathname||e(this,p).pathname===i.pathname)){((m=e(this,p))==null?void 0:m.parameters)!==i.parameters&&(h(this,j,e(this,p)),h(this,p,i),x.changeHistory({action:((w=e(this,p))==null?void 0:w.hash)!==i.hash?"replace":(s==null?void 0:s.historyAction)||"push",pathname:i.pathname,searchParameters:i.parameters,hash:i.hash})),e(this,E).forEach(L=>{L.checkCurrent(i)});return}h(this,v,i),(yield n(this,r,at).call(this,e(this,v)))&&i.path===e(this,v).path&&(yield n(this,r,rt).call(this,e(this,v),s))})}normalizePath(t){return x.splitPath(t,{base:e(this,I)})}}q=new WeakMap,I=new WeakMap,R=new WeakMap,U=new WeakMap,E=new WeakMap,v=new WeakMap,j=new WeakMap,p=new WeakMap,z=new WeakMap,r=new WeakSet,it=function(){addEventListener("popstate",e(this,O))},at=function(t){return g(this,null,function*(){if(!this.preprocessor)return!0;try{return yield new Promise((s,i)=>{var l;(l=this.preprocessor)==null||l.call(this,{path:t,resolve:s,reject:i})}),!0}catch(s){return console.error(s!=null?s:"Route change canceled"),!1}})},rt=function(i){return g(this,arguments,function*(t,s={}){var f;const{activeRoutes:l,newRoutes:m,oldRoutes:w,keepRoutes:L}=n(this,r,ht).call(this,t.leaf);h(this,U,(f=L[L.length-1])!=null?f:null),n(this,r,nt).call(this,w),h(this,p,t),x.changeHistory({action:s.historyAction||"push",pathname:t.pathname,searchParameters:t.parameters,hash:t.hash}),yield n(this,r,ot).call(this,m,t.leaf),n(this,r,ut).call(this),n(this,r,ct).call(this,t.pathname)})},ht=function(t){const s=e(this,R).filter(i=>i.isActive);return{activeRoutes:s,newRoutes:e(this,R).filter(i=>!s.includes(i)&&i.testPathname(t)),oldRoutes:s.filter(i=>!i.testPathname(t)),keepRoutes:s.filter(i=>i.testPathname(t))}},nt=function(t){t.forEach(s=>s.close())},ot=function(t,s){return g(this,null,function*(){var i,l;for(const m of t){const w=(l=(i=e(this,U))==null?void 0:i.nest)!=null?l:e(this,q);yield m.render(w,s),h(this,U,m)}})},ct=function(t){var s;(s=this.postprocessor)==null||s.call(this,{pathname:t}),e(this,z).notify({pathname:t})},lt=function(){e(this,R).sort((t,s)=>{const i=t.pattern.split("/").length,l=s.pattern.split("/").length;return i-l})},ut=function(){n(this,r,W).call(this),n(this,r,dt).call(this)},W=function(){e(this,E).forEach(t=>t.destroy()),h(this,E,[])},dt=function(){const t=e(this,R).filter(i=>i.isActive),s=n(this,r,mt).call(this,t);h(this,E,s.map(i=>new yt(this,i)))},mt=function(t){const s=Array.from(e(this,q).querySelectorAll("a")),i=t.flatMap(l=>l.getAnchorElements());return Array.from(new Set([...s,...i].filter(l=>{var m;return(m=l.getAttribute("href"))==null?void 0:m.startsWith("/")})))},O=new WeakMap;exports.Router=wt;
@@ -1,2 +1,2 @@
1
- export { Router, type RouterPreprocessorEntry, type RouterPreprocessor, type RouterPostprocessor, type RouterAfterNavigationCallback, type RouterParameters, } from './Router';
2
- export { type RouteModule, type RouteParameters, type RouteURLParams, } from './Route';
1
+ export { Router, type RouterAfterNavigationCallback, type RouterParameters, type RouterPostprocessor, type RouterPreprocessor, type RouterPreprocessorEntry, } from './Router';
2
+ export { type RouteModule, type RouteParameters } from './Route';