@jasonshimmy/custom-elements-runtime 2.2.8 → 2.3.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 (32) hide show
  1. package/dist/custom-elements-runtime.cjs.js +2 -2
  2. package/dist/custom-elements-runtime.cjs.js.map +1 -1
  3. package/dist/custom-elements-runtime.es.js +250 -248
  4. package/dist/custom-elements-runtime.es.js.map +1 -1
  5. package/dist/custom-elements-runtime.event-bus.cjs.js +1 -1
  6. package/dist/custom-elements-runtime.event-bus.es.js +1 -1
  7. package/dist/custom-elements-runtime.router.cjs.js +17 -17
  8. package/dist/custom-elements-runtime.router.cjs.js.map +1 -1
  9. package/dist/custom-elements-runtime.router.es.js +267 -208
  10. package/dist/custom-elements-runtime.router.es.js.map +1 -1
  11. package/dist/custom-elements-runtime.ssr.cjs.js +1 -1
  12. package/dist/custom-elements-runtime.ssr.es.js +1 -1
  13. package/dist/index.d.ts +1 -0
  14. package/dist/logger-BuUYv7C_.js +44 -0
  15. package/dist/logger-BuUYv7C_.js.map +1 -0
  16. package/dist/logger-DiXdWaF-.cjs +2 -0
  17. package/dist/logger-DiXdWaF-.cjs.map +1 -0
  18. package/dist/namespace-helpers-BsKQl3aH.cjs +5 -0
  19. package/dist/namespace-helpers-BsKQl3aH.cjs.map +1 -0
  20. package/dist/namespace-helpers-Dw1mgQab.js +692 -0
  21. package/dist/namespace-helpers-Dw1mgQab.js.map +1 -0
  22. package/dist/runtime/logger.d.ts +6 -0
  23. package/dist/runtime/reactive.d.ts +10 -2
  24. package/package.json +1 -1
  25. package/dist/logger-BpibrmKL.js +0 -25
  26. package/dist/logger-BpibrmKL.js.map +0 -1
  27. package/dist/logger-CqdBMdui.cjs +0 -2
  28. package/dist/logger-CqdBMdui.cjs.map +0 -1
  29. package/dist/namespace-helpers-DwMMXN9Q.cjs +0 -5
  30. package/dist/namespace-helpers-DwMMXN9Q.cjs.map +0 -1
  31. package/dist/namespace-helpers-Vwt2Fzds.js +0 -651
  32. package/dist/namespace-helpers-Vwt2Fzds.js.map +0 -1
@@ -1,208 +1,267 @@
1
- import { component as P, html as R, useOnConnected as B, useOnDisconnected as U, useProps as V, useStyle as H } from "./custom-elements-runtime.es.js";
2
- import { r as q, c as m } from "./namespace-helpers-Vwt2Fzds.js";
3
- import { createStore as j } from "./custom-elements-runtime.store.es.js";
4
- import { d as x, a as $ } from "./logger-BpibrmKL.js";
5
- import { match as F } from "./custom-elements-runtime.directives.es.js";
6
- const D = (c) => c ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(c)) : {}, S = (c, o) => {
7
- for (const t of c) {
8
- const h = [], l = t.path.replace(/:[^/]+/g, (i) => (h.push(i.slice(1)), "([^/]+)")), f = new RegExp(`^${l}$`), s = o.match(f);
9
- if (s) {
10
- const i = {};
11
- return h.forEach((v, b) => {
12
- i[v] = s[b + 1];
13
- }), { route: t, params: i };
1
+ import { component as O, html as S, useOnConnected as N, useOnDisconnected as j, useProps as W, useStyle as F } from "./custom-elements-runtime.es.js";
2
+ import { r as _, c as g } from "./namespace-helpers-Dw1mgQab.js";
3
+ import { createStore as B } from "./custom-elements-runtime.store.es.js";
4
+ import { d as C, a as $ } from "./logger-BuUYv7C_.js";
5
+ import { match as M } from "./custom-elements-runtime.directives.es.js";
6
+ const T = (n) => n ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(n)) : {}, U = /* @__PURE__ */ new WeakMap();
7
+ function V(n) {
8
+ return n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
9
+ }
10
+ function D(n) {
11
+ if (!n) return "/";
12
+ let r = n.replace(/\/+/g, "/");
13
+ return r.startsWith("/") || (r = "/" + r), r.length > 1 && r.endsWith("/") && (r = r.slice(0, -1)), r;
14
+ }
15
+ function z(n) {
16
+ const r = n.path || "/", t = D(r), f = t === "/" ? [] : t.split("/").filter(Boolean), s = [], i = [];
17
+ for (let c = 0; c < f.length; c++) {
18
+ const d = f[c];
19
+ if (d === "*") {
20
+ if (c !== f.length - 1)
21
+ return $(
22
+ `Route '${n.path}' contains a '*' splat in a non-terminal position; splats must be the last segment. This route will be ignored.`
23
+ ), { invalid: !0 };
24
+ const p = `splat${s.length}`;
25
+ s.push(p), i.push("__SPLAT__");
26
+ continue;
27
+ }
28
+ const w = d.match(/^:([A-Za-z0-9_-]+)(\*)?$/);
29
+ if (w) {
30
+ const p = w[1], b = !!w[2];
31
+ if (b && c !== f.length - 1)
32
+ return $(
33
+ `Route '${n.path}' contains a splat param ':${p}*' in a non-terminal position; splats must be the last segment. This route will be ignored.`
34
+ ), { invalid: !0 };
35
+ s.push(p), i.push(b ? "__SPLAT__" : "([^/]+)");
36
+ continue;
37
+ }
38
+ i.push(V(d));
39
+ }
40
+ let o;
41
+ if (i.length === 0)
42
+ o = "^/$";
43
+ else if (i[i.length - 1] === "__SPLAT__") {
44
+ const d = i.slice(0, -1).join("/");
45
+ d ? o = `^/${d}(?:/(.*))?(?:/)?$` : o = "^(?:/(.*))?(?:/)?$";
46
+ } else
47
+ o = `^/${i.join("/")}(?:/)?$`;
48
+ try {
49
+ return { regex: new RegExp(o), paramNames: s };
50
+ } catch (c) {
51
+ return $(`Failed to compile route regex for '${n.path}': ${String(c)}`), { invalid: !0 };
52
+ }
53
+ }
54
+ const x = (n, r) => {
55
+ const t = D(r);
56
+ for (const f of n) {
57
+ let s = U.get(f);
58
+ if (s || (s = z(f), U.set(f, s)), s.invalid) continue;
59
+ const { regex: i, paramNames: o } = s, c = i.exec(t);
60
+ if (c) {
61
+ const d = {}, w = (p) => {
62
+ try {
63
+ return decodeURIComponent(p);
64
+ } catch {
65
+ return p;
66
+ }
67
+ };
68
+ for (let p = 0; p < o.length; p++) {
69
+ const b = c[p + 1] || "";
70
+ d[o[p]] = b ? w(b) : "";
71
+ }
72
+ return { route: f, params: d };
14
73
  }
15
74
  }
16
75
  return { route: null, params: {} };
17
76
  };
18
- function A(c, o) {
19
- for (const t of c)
20
- if (S([t], o).route !== null) return t;
77
+ function A(n, r) {
78
+ for (const t of n)
79
+ if (x([t], r).route !== null) return t;
21
80
  return null;
22
81
  }
23
- const O = {};
24
- async function I(c) {
25
- if (c.component) return c.component;
26
- if (c.load) {
27
- if (O[c.path]) return O[c.path];
82
+ const L = {};
83
+ async function H(n) {
84
+ if (n.component) return n.component;
85
+ if (n.load) {
86
+ if (L[n.path]) return L[n.path];
28
87
  try {
29
- const o = await c.load();
30
- return O[c.path] = o.default, o.default;
88
+ const r = await n.load();
89
+ return L[n.path] = r.default, r.default;
31
90
  } catch {
32
- throw new Error(`Failed to load component for route: ${c.path}`);
91
+ throw new Error(`Failed to load component for route: ${n.path}`);
33
92
  }
34
93
  }
35
- throw new Error(`No component or loader defined for route: ${c.path}`);
94
+ throw new Error(`No component or loader defined for route: ${n.path}`);
36
95
  }
37
- function M(c) {
38
- const { routes: o, base: t = "", initialUrl: h } = c;
39
- let l, f, s, i, v, b, w;
40
- const k = async (n, a) => {
41
- const e = A(o, n.path);
96
+ function I(n) {
97
+ const { routes: r, base: t = "", initialUrl: f } = n;
98
+ let s, i, o, c, d, w, p;
99
+ const b = async (u, l) => {
100
+ const e = A(r, u.path);
42
101
  if (!e || !e.beforeEnter) return !0;
43
102
  try {
44
- const r = await e.beforeEnter(n, a);
45
- return typeof r == "string" ? (await g(r, !0), !1) : r !== !1;
46
- } catch (r) {
47
- return x("beforeEnter error", r), !1;
103
+ const a = await e.beforeEnter(u, l);
104
+ return typeof a == "string" ? (await R(a, !0), !1) : a !== !1;
105
+ } catch (a) {
106
+ return C("beforeEnter error", a), !1;
48
107
  }
49
- }, C = async (n, a) => {
50
- const e = A(o, n.path);
108
+ }, k = async (u, l) => {
109
+ const e = A(r, u.path);
51
110
  if (!e || !e.onEnter) return !0;
52
111
  try {
53
- const r = await e.onEnter(n, a);
54
- return typeof r == "string" ? (await g(r, !0), !1) : r !== !1;
55
- } catch (r) {
56
- return x("onEnter error", r), !1;
112
+ const a = await e.onEnter(u, l);
113
+ return typeof a == "string" ? (await R(a, !0), !1) : a !== !1;
114
+ } catch (a) {
115
+ return C("onEnter error", a), !1;
57
116
  }
58
- }, L = (n, a) => {
59
- const e = A(o, n.path);
117
+ }, q = (u, l) => {
118
+ const e = A(r, u.path);
60
119
  if (!(!e || !e.afterEnter))
61
120
  try {
62
- e.afterEnter(n, a);
63
- } catch (r) {
64
- x("afterEnter error", r);
121
+ e.afterEnter(u, l);
122
+ } catch (a) {
123
+ C("afterEnter error", a);
65
124
  }
66
- }, g = async (n, a = !1) => {
125
+ }, R = async (u, l = !1) => {
67
126
  try {
68
127
  const e = {
69
- path: n.replace(t, "") || "/",
128
+ path: u.replace(t, "") || "/",
70
129
  query: {}
71
- }, r = S(o, e.path);
72
- if (!r.route) throw new Error(`No route found for ${e.path}`);
73
- const p = s.getState(), u = {
130
+ }, a = x(r, e.path);
131
+ if (!a.route) throw new Error(`No route found for ${e.path}`);
132
+ const m = o.getState(), h = {
74
133
  path: e.path,
75
- params: r.params,
134
+ params: a.params,
76
135
  query: e.query
77
136
  };
78
- if (!await k(u, p) || !await C(u, p)) return;
79
- typeof window < "u" && typeof document < "u" && (a ? window.history.replaceState({}, "", t + n) : window.history.pushState({}, "", t + n)), s.setState(u), L(u, p);
137
+ if (!await b(h, m) || !await k(h, m)) return;
138
+ typeof window < "u" && typeof document < "u" && (l ? window.history.replaceState({}, "", t + u) : window.history.pushState({}, "", t + u)), o.setState(h), q(h, m);
80
139
  } catch (e) {
81
- x("Navigation error:", e);
140
+ C("Navigation error:", e);
82
141
  }
83
142
  };
84
- if (typeof window < "u" && typeof document < "u" && typeof h > "u") {
85
- l = () => {
86
- const a = new URL(window.location.href), e = a.pathname.replace(t, "") || "/", r = D(a.search);
87
- return { path: e, query: r };
88
- }, f = l();
89
- const n = S(o, f.path);
90
- s = j({
91
- path: f.path,
92
- params: n.params,
93
- query: f.query
94
- }), i = async (a = !1) => {
95
- const e = l();
96
- await g(e.path, a);
97
- }, window.addEventListener("popstate", () => i(!0)), v = (a) => g(a, !1), b = (a) => g(a, !0), w = () => window.history.back();
143
+ if (typeof window < "u" && typeof document < "u" && typeof f > "u") {
144
+ s = () => {
145
+ const l = new URL(window.location.href), e = l.pathname.replace(t, "") || "/", a = T(l.search);
146
+ return { path: e, query: a };
147
+ }, i = s();
148
+ const u = x(r, i.path);
149
+ o = B({
150
+ path: i.path,
151
+ params: u.params,
152
+ query: i.query
153
+ }), c = async (l = !1) => {
154
+ const e = s();
155
+ await R(e.path, l);
156
+ }, window.addEventListener("popstate", () => c(!0)), d = (l) => R(l, !1), w = (l) => R(l, !0), p = () => window.history.back();
98
157
  } else {
99
- l = () => {
100
- const e = new URL(h || "/", "http://localhost"), r = e.pathname.replace(t, "") || "/", p = D(e.search);
101
- return { path: r, query: p };
102
- }, f = l();
103
- const n = S(o, f.path);
104
- s = j({
105
- path: f.path,
106
- params: n.params,
107
- query: f.query
108
- }), i = async () => {
109
- const e = l();
110
- await a(e.path);
158
+ s = () => {
159
+ const e = new URL(f || "/", "http://localhost"), a = e.pathname.replace(t, "") || "/", m = T(e.search);
160
+ return { path: a, query: m };
161
+ }, i = s();
162
+ const u = x(r, i.path);
163
+ o = B({
164
+ path: i.path,
165
+ params: u.params,
166
+ query: i.query
167
+ }), c = async () => {
168
+ const e = s();
169
+ await l(e.path);
111
170
  };
112
- const a = async (e) => {
171
+ const l = async (e) => {
113
172
  try {
114
- const r = {
173
+ const a = {
115
174
  path: e.replace(t, "") || "/",
116
175
  query: {}
117
- }, p = S(o, r.path);
118
- if (!p.route) throw new Error(`No route found for ${r.path}`);
119
- const u = s.getState(), d = {
120
- path: r.path,
121
- params: p.params,
122
- query: r.query
123
- }, y = A(o, d.path);
176
+ }, m = x(r, a.path);
177
+ if (!m.route) throw new Error(`No route found for ${a.path}`);
178
+ const h = o.getState(), v = {
179
+ path: a.path,
180
+ params: m.params,
181
+ query: a.query
182
+ }, y = A(r, v.path);
124
183
  if (y?.beforeEnter) {
125
- const E = await y.beforeEnter(d, u);
184
+ const E = await y.beforeEnter(v, h);
126
185
  if (typeof E == "string") {
127
- await a(E);
186
+ await l(E);
128
187
  return;
129
188
  }
130
189
  if (E === !1) return;
131
190
  }
132
191
  if (y?.onEnter) {
133
- const E = await y.onEnter(d, u);
192
+ const E = await y.onEnter(v, h);
134
193
  if (typeof E == "string") {
135
- await a(E);
194
+ await l(E);
136
195
  return;
137
196
  }
138
197
  if (E === !1) return;
139
198
  }
140
- s.setState(d), y?.afterEnter && y.afterEnter(d, u);
141
- } catch (r) {
142
- throw x("SSR navigation error:", r), r;
199
+ o.setState(v), y?.afterEnter && y.afterEnter(v, h);
200
+ } catch (a) {
201
+ throw C("SSR navigation error:", a), a;
143
202
  }
144
203
  };
145
- v = async (e) => a(e), b = async (e) => a(e), w = () => {
204
+ d = async (e) => l(e), w = async (e) => l(e), p = () => {
146
205
  };
147
206
  }
148
207
  return {
149
- store: s,
150
- push: v,
151
- replace: b,
152
- back: w,
153
- subscribe: s.subscribe,
154
- matchRoute: (n) => S(o, n),
155
- getCurrent: () => s.getState(),
156
- resolveRouteComponent: I
208
+ store: o,
209
+ push: d,
210
+ replace: w,
211
+ back: p,
212
+ subscribe: o.subscribe,
213
+ matchRoute: (u) => x(r, u),
214
+ getCurrent: () => o.getState(),
215
+ resolveRouteComponent: H
157
216
  };
158
217
  }
159
- function G(c, o) {
160
- return S(c, o);
218
+ function X(n, r) {
219
+ return x(n, r);
161
220
  }
162
- let N = null;
163
- function J(c) {
164
- const o = M(c);
165
- return N = o, P("router-view", async () => {
166
- const t = N || o;
167
- if (!t) return R`<div>Router not initialized.</div>`;
168
- const h = q(t.getCurrent());
169
- let l;
170
- B(() => {
221
+ let P = null;
222
+ function Y(n) {
223
+ const r = I(n);
224
+ return P = r, O("router-view", async () => {
225
+ const t = P || r;
226
+ if (!t) return S`<div>Router not initialized.</div>`;
227
+ const f = _(t.getCurrent());
228
+ let s;
229
+ N(() => {
171
230
  try {
172
- t && typeof t.subscribe == "function" && (l = t.subscribe((s) => {
231
+ t && typeof t.subscribe == "function" && (s = t.subscribe((o) => {
173
232
  try {
174
- h.value = s;
175
- } catch (i) {
176
- $("router-view subscription update failed", i);
233
+ f.value = o;
234
+ } catch (c) {
235
+ $("router-view subscription update failed", c);
177
236
  }
178
237
  }));
179
- } catch (s) {
180
- $("router-view subscribe failed", s);
238
+ } catch (o) {
239
+ $("router-view subscribe failed", o);
181
240
  }
182
- }), U(() => {
183
- if (typeof l == "function")
241
+ }), j(() => {
242
+ if (typeof s == "function")
184
243
  try {
185
- l();
186
- } catch (s) {
187
- $("router-view unsubscribe failed", s);
244
+ s();
245
+ } catch (o) {
246
+ $("router-view unsubscribe failed", o);
188
247
  }
189
248
  });
190
- const f = t.matchRoute(h.value.path);
191
- if (!f || !f.route) return R`<div>Not found</div>`;
249
+ const i = t.matchRoute(f.value.path);
250
+ if (!i || !i.route) return S`<div>Not found</div>`;
192
251
  try {
193
- const i = await t.resolveRouteComponent(f.route);
194
- if (typeof i == "string")
195
- return { tag: i, props: {}, children: [] };
196
- if (typeof i == "function") {
197
- const v = i();
198
- return (v instanceof Promise ? v : Promise.resolve(v)).then((w) => typeof w == "string" ? { tag: w, props: {}, children: [] } : w);
252
+ const c = await t.resolveRouteComponent(i.route);
253
+ if (typeof c == "string")
254
+ return { tag: c, props: {}, children: [] };
255
+ if (typeof c == "function") {
256
+ const d = c();
257
+ return (d instanceof Promise ? d : Promise.resolve(d)).then((p) => typeof p == "string" ? { tag: p, props: {}, children: [] } : p);
199
258
  }
200
- return R`<div>Invalid route component</div>`;
259
+ return S`<div>Invalid route component</div>`;
201
260
  } catch {
202
- return R`<div>Invalid route component</div>`;
261
+ return S`<div>Invalid route component</div>`;
203
262
  }
204
- }), P("router-link", () => {
205
- const t = V({
263
+ }), O("router-link", () => {
264
+ const t = W({
206
265
  to: "",
207
266
  tag: "a",
208
267
  replace: !1,
@@ -215,107 +274,107 @@ function J(c) {
215
274
  // allow host `class` and `style` attributes to be read via useProps
216
275
  class: "",
217
276
  style: ""
218
- }), h = N || o, l = q(h.getCurrent());
219
- let f;
220
- H(() => "a,button{display:inline-block;}");
221
- const s = q(t.class || ""), i = q(t.style || "");
222
- B((p) => {
277
+ }), f = P || r, s = _(f.getCurrent());
278
+ let i;
279
+ F(() => "a,button{display:inline-block;}");
280
+ const o = _(t.class || ""), c = _(t.style || "");
281
+ N((m) => {
223
282
  try {
224
- h && typeof h.subscribe == "function" && (f = h.subscribe((u) => {
283
+ f && typeof f.subscribe == "function" && (i = f.subscribe((h) => {
225
284
  try {
226
- l.value = u;
227
- } catch (d) {
228
- $("router-link subscription update failed", d);
285
+ s.value = h;
286
+ } catch (v) {
287
+ $("router-link subscription update failed", v);
229
288
  }
230
289
  }));
231
- } catch (u) {
232
- $("router-link subscribe failed", u);
290
+ } catch (h) {
291
+ $("router-link subscribe failed", h);
233
292
  }
234
293
  try {
235
- const u = p?._host;
236
- if (u instanceof HTMLElement) {
237
- const d = u.getAttribute("class"), y = u.getAttribute("style");
238
- d && (s.value = d), y && (i.value = y), d !== null && u.removeAttribute("class"), y !== null && u.removeAttribute("style");
294
+ const h = m?._host;
295
+ if (h instanceof HTMLElement) {
296
+ const v = h.getAttribute("class"), y = h.getAttribute("style");
297
+ v && (o.value = v), y && (c.value = y), v !== null && h.removeAttribute("class"), y !== null && h.removeAttribute("style");
239
298
  }
240
- } catch (u) {
241
- $("router-link host migration failed", u);
299
+ } catch (h) {
300
+ $("router-link host migration failed", h);
242
301
  }
243
- }), U(() => {
244
- if (typeof f == "function")
302
+ }), j(() => {
303
+ if (typeof i == "function")
245
304
  try {
246
- f();
247
- } catch (p) {
248
- $("router-link unsubscribe failed", p);
305
+ i();
306
+ } catch (m) {
307
+ $("router-link unsubscribe failed", m);
249
308
  }
250
309
  });
251
- const v = m(
252
- () => l.value.path === t.to
253
- ), b = m(
254
- () => t.exact ? v.value : l.value && typeof l.value.path == "string" ? l.value.path.startsWith(t.to) : !1
255
- ), w = m(() => {
256
- const u = (s && s.value || t.class || "").split(/\s+/).filter(Boolean), d = {};
257
- for (const y of u) d[y] = !0;
258
- return d;
259
- }), k = m(() => ({
260
- ...w.value,
261
- [t.activeClass || "active"]: b.value,
262
- [t.exactActiveClass || "exact-active"]: v.value
263
- })), C = m(
264
- () => Object.keys(k.value).filter((p) => k.value[p]).join(" ")
265
- ), L = m(() => t.tag === "button"), g = m(
266
- () => v.value ? t.ariaCurrentValue : ""
267
- ), n = m(() => !!t.disabled), a = m(
310
+ const d = g(
311
+ () => s.value.path === t.to
312
+ ), w = g(
313
+ () => t.exact ? d.value : s.value && typeof s.value.path == "string" ? s.value.path.startsWith(t.to) : !1
314
+ ), p = g(() => {
315
+ const h = (o && o.value || t.class || "").split(/\s+/).filter(Boolean), v = {};
316
+ for (const y of h) v[y] = !0;
317
+ return v;
318
+ }), b = g(() => ({
319
+ ...p.value,
320
+ [t.activeClass || "active"]: w.value,
321
+ [t.exactActiveClass || "exact-active"]: d.value
322
+ })), k = g(
323
+ () => Object.keys(b.value).filter((m) => b.value[m]).join(" ")
324
+ ), q = g(() => t.tag === "button"), R = g(
325
+ () => d.value ? t.ariaCurrentValue : ""
326
+ ), u = g(() => !!t.disabled), l = g(
268
327
  () => !!t.external && (t.tag === "a" || !t.tag)
269
- ), e = m(
270
- () => i && i.value || t.style || ""
271
- ), r = (p) => {
328
+ ), e = g(
329
+ () => c && c.value || t.style || ""
330
+ ), a = (m) => {
272
331
  if (t.disabled) {
273
- p.preventDefault();
332
+ m.preventDefault();
274
333
  return;
275
334
  }
276
- t.external && (t.tag === "a" || !t.tag) || (p.preventDefault(), t.replace ? h.replace(t.to) : h.push(t.to));
335
+ t.external && (t.tag === "a" || !t.tag) || (m.preventDefault(), t.replace ? f.replace(t.to) : f.push(t.to));
277
336
  };
278
- return R`
279
- ${F().when(
280
- L.value,
281
- R`
337
+ return S`
338
+ ${M().when(
339
+ q.value,
340
+ S`
282
341
  <button
283
342
  part="button"
284
- class="${C.value}"
343
+ class="${k.value}"
285
344
  style="${e.value || null}"
286
- aria-current="${g.value}"
287
- disabled="${n.value ? "" : null}"
288
- aria-disabled="${n.value ? "true" : null}"
289
- tabindex="${n.value ? "-1" : null}"
290
- @click="${r}"
345
+ aria-current="${R.value}"
346
+ disabled="${u.value ? "" : null}"
347
+ aria-disabled="${u.value ? "true" : null}"
348
+ tabindex="${u.value ? "-1" : null}"
349
+ @click="${a}"
291
350
  >
292
351
  <slot></slot>
293
352
  </button>
294
353
  `
295
- ).otherwise(R`
354
+ ).otherwise(S`
296
355
  <a
297
356
  part="link"
298
357
  href="${t.to}"
299
- class="${C.value}"
358
+ class="${k.value}"
300
359
  style="${e.value || null}"
301
- aria-current="${g.value}"
302
- aria-disabled="${n.value ? "true" : null}"
303
- tabindex="${n.value ? "-1" : null}"
304
- target="${a.value ? "_blank" : null}"
305
- rel="${a.value ? "noopener noreferrer" : null}"
306
- @click="${r}"
360
+ aria-current="${R.value}"
361
+ aria-disabled="${u.value ? "true" : null}"
362
+ tabindex="${u.value ? "-1" : null}"
363
+ target="${l.value ? "_blank" : null}"
364
+ rel="${l.value ? "noopener noreferrer" : null}"
365
+ @click="${a}"
307
366
  ><slot></slot
308
367
  ></a>
309
368
  `).done()}
310
369
  `;
311
- }), o;
370
+ }), r;
312
371
  }
313
372
  export {
314
- J as initRouter,
315
- S as matchRoute,
316
- G as matchRouteSSR,
317
- D as parseQuery,
318
- I as resolveRouteComponent,
319
- M as useRouter
373
+ Y as initRouter,
374
+ x as matchRoute,
375
+ X as matchRouteSSR,
376
+ T as parseQuery,
377
+ H as resolveRouteComponent,
378
+ I as useRouter
320
379
  };
321
380
  //# sourceMappingURL=custom-elements-runtime.router.es.js.map