@jasonshimmy/custom-elements-runtime 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements-runtime.cjs.js +14 -14
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +94 -87
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +14 -14
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -252,10 +252,10 @@ function Pe(e, t, r) {
|
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function Oe(e, t, r, n) {
|
|
256
256
|
e.onConnected && !r && (e.onConnected(t), n(!0));
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function Me(e, t, r, n, o, s, i, a) {
|
|
259
259
|
e.onDisconnected && e.onDisconnected(t), r.forEach((c) => c()), n(), o(), s(!1), i(null), a(!1);
|
|
260
260
|
}
|
|
261
261
|
function We(e, t, r, n, o) {
|
|
@@ -314,7 +314,7 @@ function Ne(e, t, r, n, o, s, i) {
|
|
|
314
314
|
const p = String(g ?? "");
|
|
315
315
|
(!i || i.value !== p) && (r.value = g);
|
|
316
316
|
}
|
|
317
|
-
const w = a || l === "checkbox" || l === "radio" || l === "select" ? "change" : "input",
|
|
317
|
+
const w = a || l === "checkbox" || l === "radio" || l === "select" ? "change" : "input", S = (p) => {
|
|
318
318
|
if (p.isComposing || o._isComposing || p.isTrusted === !1) return;
|
|
319
319
|
const u = p.target;
|
|
320
320
|
if (u._modelUpdating) return;
|
|
@@ -353,7 +353,7 @@ function Ne(e, t, r, n, o, s, i) {
|
|
|
353
353
|
}, 0), s._requestRender && s._requestRender();
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
|
-
if (o[w] =
|
|
356
|
+
if (o[w] = S, l === "text" || l === "textarea") {
|
|
357
357
|
const p = () => {
|
|
358
358
|
o._isComposing = !0;
|
|
359
359
|
}, u = (h) => {
|
|
@@ -560,13 +560,13 @@ function P(e, t, r) {
|
|
|
560
560
|
if (e.tag === "#anchor") {
|
|
561
561
|
const g = e, l = Array.isArray(g.children) ? g.children : [], x = document.createTextNode(""), w = document.createTextNode("");
|
|
562
562
|
g.key != null && (x.key = `${g.key}:start`, w.key = `${g.key}:end`), g._startNode = x, g._endNode = w;
|
|
563
|
-
const
|
|
564
|
-
|
|
563
|
+
const S = document.createDocumentFragment();
|
|
564
|
+
S.appendChild(x);
|
|
565
565
|
for (const p of l) {
|
|
566
566
|
const u = P(p, t);
|
|
567
|
-
|
|
567
|
+
S.appendChild(u);
|
|
568
568
|
}
|
|
569
|
-
return
|
|
569
|
+
return S.appendChild(w), S;
|
|
570
570
|
}
|
|
571
571
|
const n = document.createElement(e.tag);
|
|
572
572
|
e.key != null && (n.key = e.key);
|
|
@@ -631,16 +631,16 @@ function Fe(e, t, r, n, o) {
|
|
|
631
631
|
const f = /* @__PURE__ */ new Set();
|
|
632
632
|
let y = e.firstChild;
|
|
633
633
|
function g(x, w) {
|
|
634
|
-
let
|
|
635
|
-
for (;
|
|
636
|
-
|
|
634
|
+
let S = x;
|
|
635
|
+
for (; S && (f.add(S), S !== w); )
|
|
636
|
+
S = S.nextSibling;
|
|
637
637
|
}
|
|
638
|
-
function l(x, w,
|
|
638
|
+
function l(x, w, S, p) {
|
|
639
639
|
const u = [];
|
|
640
640
|
let h = x.nextSibling;
|
|
641
641
|
for (; h && h !== w; )
|
|
642
642
|
u.push(h), h = h.nextSibling;
|
|
643
|
-
const b = Array.isArray(
|
|
643
|
+
const b = Array.isArray(S) ? S : [];
|
|
644
644
|
if (p.some((v) => v && v.key != null) || b.some((v) => v && v.key != null)) {
|
|
645
645
|
const v = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
646
646
|
for (const C of b)
|
|
@@ -685,7 +685,7 @@ function Fe(e, t, r, n, o) {
|
|
|
685
685
|
for (const x of r) {
|
|
686
686
|
let w;
|
|
687
687
|
if (x.tag === "#anchor") {
|
|
688
|
-
const
|
|
688
|
+
const S = x.key, p = `${S}:start`, u = `${S}:end`;
|
|
689
689
|
let h = c.get(p), b = c.get(u);
|
|
690
690
|
const d = Array.isArray(x.children) ? x.children : [];
|
|
691
691
|
if (h || (h = document.createTextNode(""), h.key = p), b || (b = document.createTextNode(""), b.key = u), x._startNode = h, x._endNode = b, !e.contains(h) || !e.contains(b)) {
|
|
@@ -697,17 +697,17 @@ function Fe(e, t, r, n, o) {
|
|
|
697
697
|
l(
|
|
698
698
|
h,
|
|
699
699
|
b,
|
|
700
|
-
a.get(
|
|
700
|
+
a.get(S)?.children,
|
|
701
701
|
d
|
|
702
702
|
);
|
|
703
703
|
g(h, b), y = b.nextSibling;
|
|
704
704
|
continue;
|
|
705
705
|
}
|
|
706
706
|
if (x.key != null && c.has(x.key)) {
|
|
707
|
-
const
|
|
707
|
+
const S = a.get(x.key);
|
|
708
708
|
w = Y(
|
|
709
709
|
c.get(x.key),
|
|
710
|
-
|
|
710
|
+
S,
|
|
711
711
|
x,
|
|
712
712
|
n,
|
|
713
713
|
o
|
|
@@ -1460,74 +1460,74 @@ function ot(e) {
|
|
|
1460
1460
|
function w(p, u = !1) {
|
|
1461
1461
|
const h = l(p);
|
|
1462
1462
|
(p.includes("mask-image") || p.includes("sm: hover") || p.includes("sm:hover") || p.includes("mask.svg")) && console.error("DEBUG generateRule:", p, h);
|
|
1463
|
-
let b = !1, d = h.find((
|
|
1463
|
+
let b = !1, d = h.find(($) => ($.startsWith("!") && (b = !0, $ = $.slice(1)), se[$] || ce($) || ue($) || fe($) || G($)));
|
|
1464
1464
|
if (!d) return null;
|
|
1465
1465
|
const v = d.replace(/^!/, ""), m = se[v] ?? ce(v) ?? ue(v) ?? fe(v) ?? G(v);
|
|
1466
1466
|
if (!m) return null;
|
|
1467
1467
|
const k = h.indexOf(d);
|
|
1468
1468
|
let _ = k >= 0 ? h.slice(0, k) : [];
|
|
1469
|
-
u && (_ = _.filter((
|
|
1469
|
+
u && (_ = _.filter(($) => $ !== "dark"));
|
|
1470
1470
|
const C = `.${tt(p)}`, E = "__SUBJECT__", j = b ? m.replace(/;$/, " !important;") : m;
|
|
1471
1471
|
let A = E;
|
|
1472
1472
|
const re = [];
|
|
1473
|
-
for (const
|
|
1474
|
-
|
|
1475
|
-
_ = _.filter((
|
|
1473
|
+
for (const $ of _)
|
|
1474
|
+
$.startsWith("group-") ? (A = `.group:${$.slice(6)} ${A}`, re.push($)) : $.startsWith("peer-") && (A = A.replace(E, `.peer:${$.slice(5)}~${E}`), re.push($));
|
|
1475
|
+
_ = _.filter(($) => !re.includes($));
|
|
1476
1476
|
const ne = [], me = [];
|
|
1477
1477
|
let N = null;
|
|
1478
|
-
for (const
|
|
1479
|
-
if (
|
|
1480
|
-
const
|
|
1481
|
-
if (
|
|
1482
|
-
N =
|
|
1478
|
+
for (const $ of _) {
|
|
1479
|
+
if ($ === "dark" || le.includes($)) continue;
|
|
1480
|
+
const M = et($);
|
|
1481
|
+
if (M) {
|
|
1482
|
+
N = M;
|
|
1483
1483
|
continue;
|
|
1484
1484
|
}
|
|
1485
|
-
const L = x(
|
|
1485
|
+
const L = x($);
|
|
1486
1486
|
if (L) {
|
|
1487
1487
|
N ? me.push(L) : ne.push(L);
|
|
1488
1488
|
continue;
|
|
1489
1489
|
}
|
|
1490
|
-
const B = Xe[
|
|
1490
|
+
const B = Xe[$];
|
|
1491
1491
|
typeof B == "function" && (A = B(A, j).split("{")[0]);
|
|
1492
1492
|
}
|
|
1493
|
-
function je(
|
|
1494
|
-
if (!
|
|
1493
|
+
function je($, M) {
|
|
1494
|
+
if (!M) return $;
|
|
1495
1495
|
let L = 0, B = 0;
|
|
1496
|
-
if (
|
|
1496
|
+
if ($.length && ($[0] === ">" || $[0] === "+" || $[0] === "~" || $[0] === " ")) {
|
|
1497
1497
|
let T = 1;
|
|
1498
|
-
for (; T <
|
|
1499
|
-
for (; T <
|
|
1500
|
-
const z =
|
|
1501
|
-
if (z === "[" ? L++ : z === "]" && L > 0 ? L-- : z === "(" ? B++ : z === ")" && B > 0 && B--, L === 0 && B === 0 && (
|
|
1502
|
-
return
|
|
1498
|
+
for (; T < $.length && $[T] === " "; ) T++;
|
|
1499
|
+
for (; T < $.length; T++) {
|
|
1500
|
+
const z = $[T];
|
|
1501
|
+
if (z === "[" ? L++ : z === "]" && L > 0 ? L-- : z === "(" ? B++ : z === ")" && B > 0 && B--, L === 0 && B === 0 && ($[T] === ">" || $[T] === "+" || $[T] === "~" || $[T] === " "))
|
|
1502
|
+
return $.slice(0, T) + M + $.slice(T);
|
|
1503
1503
|
}
|
|
1504
|
-
return
|
|
1504
|
+
return $ + M;
|
|
1505
1505
|
}
|
|
1506
|
-
for (let T = 0; T <
|
|
1507
|
-
const z =
|
|
1506
|
+
for (let T = 0; T < $.length; T++) {
|
|
1507
|
+
const z = $[T];
|
|
1508
1508
|
if (z === "[" ? L++ : z === "]" && L > 0 ? L-- : z === "(" ? B++ : z === ")" && B > 0 && B--, L === 0 && B === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
|
|
1509
|
-
return
|
|
1509
|
+
return $.slice(0, T) + M + $.slice(T);
|
|
1510
1510
|
}
|
|
1511
|
-
return
|
|
1511
|
+
return $ + M;
|
|
1512
1512
|
}
|
|
1513
1513
|
const oe = ne.join(""), K = me.join("");
|
|
1514
1514
|
if (N)
|
|
1515
1515
|
if (N.includes("&")) {
|
|
1516
|
-
const
|
|
1516
|
+
const $ = N.indexOf("&"), M = N.slice(0, $), L = N.slice($ + 1), B = E + oe, T = A;
|
|
1517
1517
|
if (ne.length === 0)
|
|
1518
|
-
A = T.replace(E,
|
|
1518
|
+
A = T.replace(E, M + B + K + L);
|
|
1519
1519
|
else {
|
|
1520
1520
|
const z = je(L, K);
|
|
1521
|
-
A = T.replace(E,
|
|
1521
|
+
A = T.replace(E, M + B + z);
|
|
1522
1522
|
}
|
|
1523
1523
|
} else
|
|
1524
1524
|
A = A.replace(E, `${N}${E + oe}`), K && (A = A.replace(E, `${E}${K}`));
|
|
1525
1525
|
else
|
|
1526
1526
|
A = E + oe + K;
|
|
1527
1527
|
A = A.replace(new RegExp(E, "g"), C);
|
|
1528
|
-
let
|
|
1529
|
-
const ie = _.filter((
|
|
1530
|
-
return u && H ?
|
|
1528
|
+
let O = `${A}{${j}}`;
|
|
1529
|
+
const ie = _.filter(($) => le.includes($)), H = ie.length ? ie[ie.length - 1] : null, be = _.includes("dark");
|
|
1530
|
+
return u && H ? O = `@media (prefers-color-scheme: dark) and ${ae[H]}{${O}}` : u ? O = `@media (prefers-color-scheme: dark){${O}}` : be && H ? O = `@media (prefers-color-scheme: dark) and ${ae[H]}{${O}}` : be ? O = `@media (prefers-color-scheme: dark){${O}}` : H && (O = `@media ${ae[H]}{${O}}`), O;
|
|
1531
1531
|
}
|
|
1532
1532
|
for (const p of o) {
|
|
1533
1533
|
const u = l(p), h = u.find(
|
|
@@ -1543,8 +1543,8 @@ function ot(e) {
|
|
|
1543
1543
|
m && (v === 1 ? s.push(m) : v === 2 ? i.push(m) : v === 3 && a.push(m));
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
|
-
const
|
|
1547
|
-
return Se.set(e, { css:
|
|
1546
|
+
const S = [...s, ...i, ...a, ...c].join("");
|
|
1547
|
+
return Se.set(e, { css: S, timestamp: t }), S;
|
|
1548
1548
|
}
|
|
1549
1549
|
const J = [];
|
|
1550
1550
|
function it(e, t, r, n, o, s, i, a) {
|
|
@@ -1707,7 +1707,7 @@ function ct(e) {
|
|
|
1707
1707
|
}
|
|
1708
1708
|
connectedCallback() {
|
|
1709
1709
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
1710
|
-
|
|
1710
|
+
Oe(
|
|
1711
1711
|
e,
|
|
1712
1712
|
this.context,
|
|
1713
1713
|
this._mounted,
|
|
@@ -1719,7 +1719,7 @@ function ct(e) {
|
|
|
1719
1719
|
}
|
|
1720
1720
|
disconnectedCallback() {
|
|
1721
1721
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
1722
|
-
|
|
1722
|
+
Me(
|
|
1723
1723
|
e,
|
|
1724
1724
|
this.context,
|
|
1725
1725
|
this._listeners,
|
|
@@ -1943,9 +1943,9 @@ function ut(e, t = [], r = {}) {
|
|
|
1943
1943
|
g || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
|
|
1944
1944
|
const x = ["model", "bind", "show", "class", "style"];
|
|
1945
1945
|
if (c === ":") {
|
|
1946
|
-
const [w,
|
|
1946
|
+
const [w, ...S] = f.split(".");
|
|
1947
1947
|
if (x.includes(w)) {
|
|
1948
|
-
const p = [
|
|
1948
|
+
const p = [...S];
|
|
1949
1949
|
s[w] = {
|
|
1950
1950
|
value: l,
|
|
1951
1951
|
modifiers: p
|
|
@@ -1968,7 +1968,7 @@ function dt(e, t, r) {
|
|
|
1968
1968
|
for (let d = 0; d < e.length; d++)
|
|
1969
1969
|
i += e[d], d < t.length && (i += `{{${d}}}`);
|
|
1970
1970
|
const a = /<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, c = [];
|
|
1971
|
-
let f, y = [], g = null, l = {}, x, w = 0,
|
|
1971
|
+
let f, y = [], g = null, l = {}, x, w = 0, S = [];
|
|
1972
1972
|
function p(d) {
|
|
1973
1973
|
!d || typeof d != "object" || ee(d) || (d.props || d.attrs ? (d.props && (l.props || (l.props = {}), Object.assign(l.props, d.props)), d.attrs && (l.attrs || (l.attrs = {}), Object.keys(d.attrs).forEach((v) => {
|
|
1974
1974
|
if (v === "style" && l.attrs.style) {
|
|
@@ -1987,7 +1987,7 @@ function dt(e, t, r) {
|
|
|
1987
1987
|
}))) : (l.props || (l.props = {}), Object.assign(l.props, d)));
|
|
1988
1988
|
}
|
|
1989
1989
|
function u(d, v) {
|
|
1990
|
-
const m = g ? y :
|
|
1990
|
+
const m = g ? y : S;
|
|
1991
1991
|
if (ee(d)) {
|
|
1992
1992
|
const k = d.key ?? v;
|
|
1993
1993
|
let _ = d.children;
|
|
@@ -2048,8 +2048,8 @@ function dt(e, t, r) {
|
|
|
2048
2048
|
y.length === 1 && X(y[0]) && y[0].tag === "#text" ? typeof y[0].children == "string" ? y[0].children : "" : y.length ? y : void 0,
|
|
2049
2049
|
x
|
|
2050
2050
|
), A = c.pop();
|
|
2051
|
-
A ? (g = A.tag, l = A.props, x = A.key, y = A.children, y.push(j)) : (
|
|
2052
|
-
} else m ? g ? y.push(V(d, E, void 0, void 0)) :
|
|
2051
|
+
A ? (g = A.tag, l = A.props, x = A.key, y = A.children, y.push(j)) : (S.push(j), g = null, l = {}, x = void 0, y = []);
|
|
2052
|
+
} else m ? g ? y.push(V(d, E, void 0, void 0)) : S.push(V(d, E, void 0, void 0)) : (g && c.push({
|
|
2053
2053
|
tag: g,
|
|
2054
2054
|
props: l,
|
|
2055
2055
|
children: y,
|
|
@@ -2059,7 +2059,7 @@ function dt(e, t, r) {
|
|
|
2059
2059
|
const d = Number(f[3]), v = t[d], m = `interp-${d}`;
|
|
2060
2060
|
u(v, m);
|
|
2061
2061
|
} else if (f[4]) {
|
|
2062
|
-
const d = f[4], v = g ? y :
|
|
2062
|
+
const d = f[4], v = g ? y : S, m = d.split(/({{\d+}})/);
|
|
2063
2063
|
for (const k of m) {
|
|
2064
2064
|
if (!k) continue;
|
|
2065
2065
|
const _ = k.match(/^{{(\d+)}}$/);
|
|
@@ -2072,7 +2072,7 @@ function dt(e, t, r) {
|
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
|
-
const b =
|
|
2075
|
+
const b = S.filter((d) => X(d) && d.tag === "#text" ? typeof d.children == "string" && d.children.trim() !== "" : !0);
|
|
2076
2076
|
return b.length === 1 ? b[0] : b.length > 1 ? b : V("div", {}, "", "fallback-root");
|
|
2077
2077
|
}
|
|
2078
2078
|
function U(e, ...t) {
|
|
@@ -2107,38 +2107,38 @@ async function pt(e) {
|
|
|
2107
2107
|
function ht(e) {
|
|
2108
2108
|
const { routes: t, base: r = "", initialUrl: n } = e;
|
|
2109
2109
|
let o, s, i, a, c, f, y;
|
|
2110
|
-
const g = async (
|
|
2111
|
-
const u = t.find((h) => W([h],
|
|
2110
|
+
const g = async (S, p) => {
|
|
2111
|
+
const u = t.find((h) => W([h], S.path).route !== null);
|
|
2112
2112
|
if (u?.beforeEnter)
|
|
2113
2113
|
try {
|
|
2114
|
-
const h = await u.beforeEnter(
|
|
2114
|
+
const h = await u.beforeEnter(S, p);
|
|
2115
2115
|
return typeof h == "string" ? (await w(h, !0), !1) : h !== !1;
|
|
2116
2116
|
} catch (h) {
|
|
2117
2117
|
return console.error("beforeEnter error", h), !1;
|
|
2118
2118
|
}
|
|
2119
2119
|
return !0;
|
|
2120
|
-
}, l = async (
|
|
2121
|
-
const u = t.find((h) => W([h],
|
|
2120
|
+
}, l = async (S, p) => {
|
|
2121
|
+
const u = t.find((h) => W([h], S.path).route !== null);
|
|
2122
2122
|
if (u?.onEnter)
|
|
2123
2123
|
try {
|
|
2124
|
-
const h = await u.onEnter(
|
|
2124
|
+
const h = await u.onEnter(S, p);
|
|
2125
2125
|
return typeof h == "string" ? (await w(h, !0), !1) : h !== !1;
|
|
2126
2126
|
} catch (h) {
|
|
2127
2127
|
return console.error("onEnter error", h), !1;
|
|
2128
2128
|
}
|
|
2129
2129
|
return !0;
|
|
2130
|
-
}, x = (
|
|
2131
|
-
const u = t.find((h) => W([h],
|
|
2130
|
+
}, x = (S, p) => {
|
|
2131
|
+
const u = t.find((h) => W([h], S.path).route !== null);
|
|
2132
2132
|
if (u?.afterEnter)
|
|
2133
2133
|
try {
|
|
2134
|
-
u.afterEnter(
|
|
2134
|
+
u.afterEnter(S, p);
|
|
2135
2135
|
} catch (h) {
|
|
2136
2136
|
console.error("afterEnter error", h);
|
|
2137
2137
|
}
|
|
2138
|
-
}, w = async (
|
|
2138
|
+
}, w = async (S, p = !1) => {
|
|
2139
2139
|
try {
|
|
2140
2140
|
const u = {
|
|
2141
|
-
path:
|
|
2141
|
+
path: S.replace(r, "") || "/",
|
|
2142
2142
|
query: {}
|
|
2143
2143
|
}, h = W(t, u.path);
|
|
2144
2144
|
if (!h) throw new Error(`No route found for ${u.path}`);
|
|
@@ -2148,7 +2148,7 @@ function ht(e) {
|
|
|
2148
2148
|
query: u.query
|
|
2149
2149
|
};
|
|
2150
2150
|
if (!await g(d, b) || !await l(d, b)) return;
|
|
2151
|
-
typeof window < "u" && typeof document < "u" && (p ? window.history.replaceState({}, "", r +
|
|
2151
|
+
typeof window < "u" && typeof document < "u" && (p ? window.history.replaceState({}, "", r + S) : window.history.pushState({}, "", r + S)), i.setState(d), x(d, b);
|
|
2152
2152
|
} catch (u) {
|
|
2153
2153
|
console.error("Navigation error:", u);
|
|
2154
2154
|
}
|
|
@@ -2158,10 +2158,10 @@ function ht(e) {
|
|
|
2158
2158
|
const p = new URL(window.location.href), u = p.pathname.replace(r, "") || "/", h = Ce(p.search);
|
|
2159
2159
|
return { path: u, query: h };
|
|
2160
2160
|
}, s = o();
|
|
2161
|
-
const
|
|
2161
|
+
const S = W(t, s.path);
|
|
2162
2162
|
i = ve({
|
|
2163
2163
|
path: s.path,
|
|
2164
|
-
params:
|
|
2164
|
+
params: S.params,
|
|
2165
2165
|
query: s.query
|
|
2166
2166
|
}), a = async (p = !1) => {
|
|
2167
2167
|
const u = o();
|
|
@@ -2172,10 +2172,10 @@ function ht(e) {
|
|
|
2172
2172
|
const u = new URL(n || "/", "http://localhost"), h = u.pathname.replace(r, "") || "/", b = Ce(u.search);
|
|
2173
2173
|
return { path: h, query: b };
|
|
2174
2174
|
}, s = o();
|
|
2175
|
-
const
|
|
2175
|
+
const S = W(t, s.path);
|
|
2176
2176
|
i = ve({
|
|
2177
2177
|
path: s.path,
|
|
2178
|
-
params:
|
|
2178
|
+
params: S.params,
|
|
2179
2179
|
query: s.query
|
|
2180
2180
|
}), a = async () => {
|
|
2181
2181
|
const u = o();
|
|
@@ -2232,7 +2232,7 @@ function ht(e) {
|
|
|
2232
2232
|
replace: f,
|
|
2233
2233
|
back: y,
|
|
2234
2234
|
subscribe: i.subscribe,
|
|
2235
|
-
matchRoute: (
|
|
2235
|
+
matchRoute: (S) => W(t, S),
|
|
2236
2236
|
getCurrent: () => i.getState(),
|
|
2237
2237
|
resolveRouteComponent: pt
|
|
2238
2238
|
};
|
|
@@ -2281,25 +2281,32 @@ function $t(e) {
|
|
|
2281
2281
|
},
|
|
2282
2282
|
style: (r) => r.style,
|
|
2283
2283
|
render: (r) => {
|
|
2284
|
-
const n = t.getCurrent(), o = r.to, s = r.exact, i = r.exactActiveClass, a = r.activeClass, c = r.ariaCurrentValue, f = r.tag, y = r.disabled, g = r.external, l = n.path === o, x = s ? l : n && typeof n.path == "string" ? n.path.startsWith(o) : !1, w = l ?
|
|
2284
|
+
const n = t.getCurrent(), o = r.to, s = r.exact, i = r.exactActiveClass, a = r.activeClass, c = r.ariaCurrentValue, f = r.tag, y = r.disabled, g = r.external, l = n.path === o, x = s ? l : n && typeof n.path == "string" ? n.path.startsWith(o) : !1, w = l ? `aria-current="${c}"` : "", S = (r.class || "").split(/\s+/).filter(Boolean), p = {};
|
|
2285
|
+
for (const v of S) p[v] = !0;
|
|
2286
|
+
const u = {
|
|
2287
|
+
...p,
|
|
2288
|
+
// Also include the configurable names (may duplicate the above)
|
|
2289
|
+
[a]: x,
|
|
2290
|
+
[i]: l
|
|
2291
|
+
}, h = f === "button", b = y ? h ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", d = g && (f === "a" || !f) ? 'target="_blank" rel="noopener noreferrer"' : "";
|
|
2285
2292
|
return U`
|
|
2286
|
-
${Le().when(
|
|
2293
|
+
${Le().when(h, U`
|
|
2287
2294
|
<button
|
|
2288
2295
|
part="button"
|
|
2289
|
-
:class="${
|
|
2290
|
-
${
|
|
2291
|
-
${
|
|
2292
|
-
${
|
|
2296
|
+
:class="${u}"
|
|
2297
|
+
${w}
|
|
2298
|
+
${b}
|
|
2299
|
+
${d}
|
|
2293
2300
|
@click="navigate"
|
|
2294
2301
|
><slot></slot></button>
|
|
2295
2302
|
`).otherwise(U`
|
|
2296
2303
|
<a
|
|
2297
2304
|
part="link"
|
|
2298
2305
|
href="${o}"
|
|
2299
|
-
:class="${
|
|
2300
|
-
${
|
|
2301
|
-
${
|
|
2302
|
-
${
|
|
2306
|
+
:class="${u}"
|
|
2307
|
+
${w}
|
|
2308
|
+
${b}
|
|
2309
|
+
${d}
|
|
2303
2310
|
@click="navigate"
|
|
2304
2311
|
><slot></slot></a>
|
|
2305
2312
|
`).done()}
|