@tempots/dom 28.6.1 → 28.6.3
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/index.cjs +1 -1
- package/index.js +130 -124
- package/package.json +1 -1
- package/renderable/attribute.d.ts +329 -225
- package/renderable/element.d.ts +13 -6
- package/renderable/on.d.ts +36 -1
- package/renderable/style.d.ts +2 -2
- package/std/signal-utils.d.ts +3 -11
- package/std/value.d.ts +3 -3
- package/types/aria-attributes.d.ts +14 -9
- package/types/domain.d.ts +16 -6
- package/types/html-attributes.d.ts +38 -6
- package/types/html-events.d.ts +36 -1
- package/types/html-tags.d.ts +5 -1
- package/types/mathml-attributes.d.ts +67 -30
- package/types/mathml-tags.d.ts +3 -1
- package/types/svg-attributes.d.ts +210 -180
- package/types/svg-tags.d.ts +1 -0
package/index.js
CHANGED
|
@@ -298,17 +298,17 @@ const H = class H {
|
|
|
298
298
|
* @returns A property that holds the mapped value and can be observed for changes.
|
|
299
299
|
*/
|
|
300
300
|
o(this, "mapAsync", (e, t, r, n = (i, l) => i === l) => {
|
|
301
|
-
const i =
|
|
301
|
+
const i = v(t, n);
|
|
302
302
|
let l = 0, c = new AbortController();
|
|
303
303
|
return i.onDispose(
|
|
304
|
-
this.on(async (
|
|
305
|
-
const
|
|
304
|
+
this.on(async (u) => {
|
|
305
|
+
const a = ++l;
|
|
306
306
|
c.abort(), c = new AbortController();
|
|
307
307
|
try {
|
|
308
|
-
const h = await e(
|
|
309
|
-
|
|
308
|
+
const h = await e(u, { abortSignal: c.signal });
|
|
309
|
+
a === l && i.set(h);
|
|
310
310
|
} catch (h) {
|
|
311
|
-
if (
|
|
311
|
+
if (a === l)
|
|
312
312
|
if (r != null)
|
|
313
313
|
i.set(r(h));
|
|
314
314
|
else
|
|
@@ -348,7 +348,7 @@ const H = class H {
|
|
|
348
348
|
o(this, "deriveProp", ({
|
|
349
349
|
autoDisposeProp: e = !0,
|
|
350
350
|
equals: t
|
|
351
|
-
} = {}) => this.feedProp(
|
|
351
|
+
} = {}) => this.feedProp(v(this.get(), t), e));
|
|
352
352
|
/**
|
|
353
353
|
* Derives a new signal from the current signal. Useful to create a new signal that emits the same values as the current signal but can be disposed independently.
|
|
354
354
|
* @returns A new signal that emits the same values as the current signal.
|
|
@@ -545,8 +545,8 @@ const J = class J extends d {
|
|
|
545
545
|
const n = this;
|
|
546
546
|
return function i(l) {
|
|
547
547
|
const c = n.value;
|
|
548
|
-
n.update((
|
|
549
|
-
(
|
|
548
|
+
n.update((u) => t(u, l)), !n.equals(c, n.value) && r.forEach(
|
|
549
|
+
(u) => u({
|
|
550
550
|
previousState: c,
|
|
551
551
|
state: n.value,
|
|
552
552
|
action: l,
|
|
@@ -619,7 +619,7 @@ const Z = (s, e, t = (r, n) => r === n) => {
|
|
|
619
619
|
n.dispose(), t.abortSignal != null && t.abortSignal.removeEventListener("abort", i);
|
|
620
620
|
};
|
|
621
621
|
return t.abortSignal != null && t.abortSignal.addEventListener("abort", i), i;
|
|
622
|
-
},
|
|
622
|
+
}, v = (s, e = (t, r) => t === r) => new j(s, e), G = (s, e = (t, r) => t === r) => new d(s, e), ce = () => (
|
|
623
623
|
/* c8 ignore next */
|
|
624
624
|
typeof window < "u" ? window : void 0
|
|
625
625
|
), y = {
|
|
@@ -692,7 +692,7 @@ const Z = (s, e, t = (r, n) => r === n) => {
|
|
|
692
692
|
deriveProp: (s, {
|
|
693
693
|
autoDisposeProp: e = !0,
|
|
694
694
|
equals: t
|
|
695
|
-
} = {}) => d.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) :
|
|
695
|
+
} = {}) => d.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : v(s, t)
|
|
696
696
|
}, K = (...s) => (e, t) => {
|
|
697
697
|
if (s.length === 1)
|
|
698
698
|
return y.toSignal(s[0]).map(e);
|
|
@@ -715,7 +715,7 @@ const Z = (s, e, t = (r, n) => r === n) => {
|
|
|
715
715
|
t
|
|
716
716
|
);
|
|
717
717
|
};
|
|
718
|
-
class
|
|
718
|
+
class ue {
|
|
719
719
|
constructor() {
|
|
720
720
|
o(this, "_store", /* @__PURE__ */ new Map());
|
|
721
721
|
/**
|
|
@@ -734,33 +734,33 @@ class ae {
|
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
const
|
|
737
|
+
const ae = ({
|
|
738
738
|
key: s,
|
|
739
739
|
defaultValue: e,
|
|
740
740
|
store: t,
|
|
741
741
|
serialize: r = JSON.stringify,
|
|
742
742
|
deserialize: n = JSON.parse,
|
|
743
|
-
equals: i = (c,
|
|
743
|
+
equals: i = (c, u) => c === u,
|
|
744
744
|
onLoad: l = (c) => c
|
|
745
745
|
}) => {
|
|
746
|
-
const c = t.getItem(s),
|
|
746
|
+
const c = t.getItem(s), u = new j(
|
|
747
747
|
c != null ? l(n(c)) : typeof e == "function" ? e() : e,
|
|
748
748
|
i
|
|
749
749
|
);
|
|
750
|
-
return
|
|
750
|
+
return u.on((a) => t.setItem(s, r(a))), u;
|
|
751
751
|
}, Dt = (s) => {
|
|
752
752
|
var e;
|
|
753
|
-
return
|
|
753
|
+
return ae({
|
|
754
754
|
...s,
|
|
755
755
|
/* c8 ignore next 3 */
|
|
756
|
-
store: ((e = ce()) == null ? void 0 : e.localStorage) ?? new
|
|
756
|
+
store: ((e = ce()) == null ? void 0 : e.localStorage) ?? new ue()
|
|
757
757
|
});
|
|
758
758
|
}, Ot = (s) => {
|
|
759
759
|
var e;
|
|
760
|
-
return
|
|
760
|
+
return ae({
|
|
761
761
|
...s,
|
|
762
762
|
/* c8 ignore next 3 */
|
|
763
|
-
store: ((e = ce()) == null ? void 0 : e.sessionStorage) ?? new
|
|
763
|
+
store: ((e = ce()) == null ? void 0 : e.sessionStorage) ?? new ue()
|
|
764
764
|
});
|
|
765
765
|
};
|
|
766
766
|
function le(s) {
|
|
@@ -768,20 +768,20 @@ function le(s) {
|
|
|
768
768
|
}
|
|
769
769
|
const Fe = (s, e, t, r) => {
|
|
770
770
|
const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((A) => A), l = (r == null ? void 0 : r.equals) ?? ((A, $) => A === $);
|
|
771
|
-
let c = r == null ? void 0 : r.interpolate,
|
|
772
|
-
const p = new P(e, l), m =
|
|
771
|
+
let c = r == null ? void 0 : r.interpolate, u = s, a = e(), h = performance.now(), g = null, T = !0;
|
|
772
|
+
const p = new P(e, l), m = v(s, l);
|
|
773
773
|
m.onDispose(() => {
|
|
774
774
|
g !== null && cancelAnimationFrame(g);
|
|
775
775
|
}), m.onDispose(p.dispose), t.forEach((A) => {
|
|
776
776
|
A.setDerivative(p), A.onDispose(m.dispose);
|
|
777
777
|
});
|
|
778
778
|
const C = (A) => {
|
|
779
|
-
|
|
779
|
+
a = A, h = performance.now(), u = m.value, T && (T = !1, g = le(se));
|
|
780
780
|
}, se = () => {
|
|
781
781
|
const $ = (performance.now() - h) / y.get(n), Me = i($);
|
|
782
|
-
c == null && (c = je(
|
|
783
|
-
let re = c(
|
|
784
|
-
$ >= 1 ? (T = !0, re =
|
|
782
|
+
c == null && (c = je(u));
|
|
783
|
+
let re = c(u, a, Me);
|
|
784
|
+
$ >= 1 ? (T = !0, re = a) : g = le(se), m.set(re);
|
|
785
785
|
};
|
|
786
786
|
return p.on(C), m;
|
|
787
787
|
}, Mt = (s, e) => {
|
|
@@ -802,7 +802,7 @@ const Fe = (s, e, t, r) => {
|
|
|
802
802
|
return e(n);
|
|
803
803
|
}, t);
|
|
804
804
|
}, Ht = (s) => Be(s, (e) => e), kt = (s, e) => {
|
|
805
|
-
const t =
|
|
805
|
+
const t = v(s.get());
|
|
806
806
|
let r = null;
|
|
807
807
|
const n = s.on((i) => {
|
|
808
808
|
r != null && clearTimeout(r), r = setTimeout(
|
|
@@ -818,7 +818,13 @@ const Fe = (s, e, t, r) => {
|
|
|
818
818
|
}, Nt = (s) => (...e) => K(
|
|
819
819
|
s,
|
|
820
820
|
...e
|
|
821
|
-
)((t, ...r) => t(...r))
|
|
821
|
+
)((t, ...r) => t(...r));
|
|
822
|
+
function $t(...s) {
|
|
823
|
+
return K(...s)((...e) => {
|
|
824
|
+
for (const t of e) if (t != null) return t;
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
const he = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), fe = /* @__PURE__ */ new Set(["selected"]), de = /* @__PURE__ */ new Set([
|
|
822
828
|
"rowSpan",
|
|
823
829
|
"colSpan",
|
|
824
830
|
"tabIndex",
|
|
@@ -1130,7 +1136,7 @@ const Ge = (s) => Symbol(s), ee = (s, e) => {
|
|
|
1130
1136
|
`Cannot find element by selector for render: ${e}`
|
|
1131
1137
|
);
|
|
1132
1138
|
r !== !1 && (t ?? l.ownerDocument) != null && l.nodeType === 1 && (l.innerHTML = "");
|
|
1133
|
-
const c = Je(l),
|
|
1139
|
+
const c = Je(l), u = me(l) ? void 0 : l, a = L.of(c, u, i), h = ee(s, a);
|
|
1134
1140
|
let g;
|
|
1135
1141
|
return n && (g = new MutationObserver((T) => {
|
|
1136
1142
|
var p;
|
|
@@ -1151,7 +1157,7 @@ const Ge = (s) => Symbol(s), ee = (s, e) => {
|
|
|
1151
1157
|
} = {
|
|
1152
1158
|
selector: "body"
|
|
1153
1159
|
}) => {
|
|
1154
|
-
const n = y.toSignal(e).deriveProp(), i = new
|
|
1160
|
+
const n = y.toSignal(e).deriveProp(), i = new ve(t, void 0), l = new D(i, void 0, { currentURL: n }, r);
|
|
1155
1161
|
return {
|
|
1156
1162
|
clear: ee(s(), l),
|
|
1157
1163
|
root: i,
|
|
@@ -1173,8 +1179,8 @@ class jt {
|
|
|
1173
1179
|
setClass: i,
|
|
1174
1180
|
getStyles: l,
|
|
1175
1181
|
setStyles: c,
|
|
1176
|
-
appendHTML:
|
|
1177
|
-
getInnerHTML:
|
|
1182
|
+
appendHTML: u,
|
|
1183
|
+
getInnerHTML: a,
|
|
1178
1184
|
setInnerHTML: h,
|
|
1179
1185
|
getInnerText: g,
|
|
1180
1186
|
setInnerText: T
|
|
@@ -1303,24 +1309,24 @@ class jt {
|
|
|
1303
1309
|
if (n.hasAttributes()) {
|
|
1304
1310
|
const c = n.getAttributes();
|
|
1305
1311
|
if (t) {
|
|
1306
|
-
const
|
|
1307
|
-
c.forEach(([
|
|
1308
|
-
const h = this.getAttribute(l,
|
|
1309
|
-
h != null &&
|
|
1310
|
-
}),
|
|
1312
|
+
const u = [];
|
|
1313
|
+
c.forEach(([a]) => {
|
|
1314
|
+
const h = this.getAttribute(l, a);
|
|
1315
|
+
h != null && u.push([a, h]);
|
|
1316
|
+
}), u.length > 0 && this.setAttribute(
|
|
1311
1317
|
l,
|
|
1312
1318
|
U,
|
|
1313
|
-
JSON.stringify(Object.fromEntries(
|
|
1319
|
+
JSON.stringify(Object.fromEntries(u))
|
|
1314
1320
|
);
|
|
1315
1321
|
}
|
|
1316
|
-
c.forEach(([
|
|
1317
|
-
this.setAttribute(l,
|
|
1322
|
+
c.forEach(([u, a]) => {
|
|
1323
|
+
this.setAttribute(l, u, a);
|
|
1318
1324
|
});
|
|
1319
1325
|
}
|
|
1320
1326
|
}
|
|
1321
1327
|
});
|
|
1322
1328
|
});
|
|
1323
|
-
this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML =
|
|
1329
|
+
this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML = u, this.getInnerHTML = a, this.setInnerHTML = h, this.getInnerText = g, this.setInnerText = T;
|
|
1324
1330
|
}
|
|
1325
1331
|
}
|
|
1326
1332
|
const Ye = () => {
|
|
@@ -1412,14 +1418,14 @@ class Ae {
|
|
|
1412
1418
|
this.trigger("click", {});
|
|
1413
1419
|
});
|
|
1414
1420
|
o(this, "on", (e, t, r, n) => {
|
|
1415
|
-
var
|
|
1416
|
-
const i = (
|
|
1417
|
-
c(), t(
|
|
1418
|
-
} : (
|
|
1421
|
+
var u;
|
|
1422
|
+
const i = (u = this.properties)[x] ?? (u[x] = {}), l = n != null && n.once ? (a) => {
|
|
1423
|
+
c(), t(a, r);
|
|
1424
|
+
} : (a) => t(a, r);
|
|
1419
1425
|
i[e] = [...i[e] ?? [], l];
|
|
1420
1426
|
const c = () => {
|
|
1421
|
-
const
|
|
1422
|
-
h !== -1 && (
|
|
1427
|
+
const a = i[e] ?? [], h = a.indexOf(l);
|
|
1428
|
+
h !== -1 && (a.splice(h, 1), a.length === 0 ? (delete i[e], Object.keys(i).length === 0 && delete this.properties[x]) : i[e] = a, (n == null ? void 0 : n.signal) != null && n.signal.removeEventListener("abort", c));
|
|
1423
1429
|
};
|
|
1424
1430
|
return (n == null ? void 0 : n.signal) != null && n.signal.addEventListener("abort", c), c;
|
|
1425
1431
|
});
|
|
@@ -1470,20 +1476,20 @@ class Ae {
|
|
|
1470
1476
|
}
|
|
1471
1477
|
}
|
|
1472
1478
|
const lt = (s) => s.replace(/"/g, """), ct = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1473
|
-
class
|
|
1479
|
+
class ut extends Ae {
|
|
1474
1480
|
constructor(t, r, n) {
|
|
1475
1481
|
super(n);
|
|
1476
1482
|
o(this, "isPortal", () => !1);
|
|
1477
1483
|
o(this, "toHTML", (t = !1) => {
|
|
1478
|
-
const r = this.children.map((
|
|
1484
|
+
const r = this.children.map((u) => u.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
|
|
1479
1485
|
let i = null;
|
|
1480
|
-
const l = this.getVisibleAttributes().map(([
|
|
1486
|
+
const l = this.getVisibleAttributes().map(([u, a]) => u === "class" ? ` class="${a.join(" ")}"` : u === "style" ? typeof a == "string" ? ` style="${a}"` : ` style="${Object.entries(a).map(([h, g]) => `${h}: ${g};`).join(" ")}"` : ht.has(u) ? ` ${u}` : u === "innerHTML" ? (i = a, "") : u === "innerText" ? (i = ct(a), "") : ` ${u}="${lt(a)}"`).join(""), c = t ? ` ${Te}` : "";
|
|
1481
1487
|
return ft.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${i ?? r}</${this.tagName}>`;
|
|
1482
1488
|
});
|
|
1483
1489
|
this.tagName = t, this.namespace = r;
|
|
1484
1490
|
}
|
|
1485
1491
|
}
|
|
1486
|
-
class
|
|
1492
|
+
class ve extends Ae {
|
|
1487
1493
|
constructor(t, r) {
|
|
1488
1494
|
super(r);
|
|
1489
1495
|
o(this, "isPortal", () => !0);
|
|
@@ -1492,7 +1498,7 @@ class _e extends Ae {
|
|
|
1492
1498
|
this.selector = t;
|
|
1493
1499
|
}
|
|
1494
1500
|
}
|
|
1495
|
-
class
|
|
1501
|
+
class at {
|
|
1496
1502
|
constructor(e) {
|
|
1497
1503
|
o(this, "id", Se());
|
|
1498
1504
|
o(this, "isElement", () => !1);
|
|
@@ -1512,7 +1518,7 @@ class D {
|
|
|
1512
1518
|
this.element.children.push(e);
|
|
1513
1519
|
});
|
|
1514
1520
|
o(this, "makeChildElement", (e, t) => {
|
|
1515
|
-
const r = new
|
|
1521
|
+
const r = new ut(e, t, this.element);
|
|
1516
1522
|
return this.appendOrInsert(r), new D(
|
|
1517
1523
|
r,
|
|
1518
1524
|
void 0,
|
|
@@ -1521,7 +1527,7 @@ class D {
|
|
|
1521
1527
|
);
|
|
1522
1528
|
});
|
|
1523
1529
|
o(this, "makeChildText", (e) => {
|
|
1524
|
-
const t = new
|
|
1530
|
+
const t = new at(e);
|
|
1525
1531
|
return this.appendOrInsert(t), new D(
|
|
1526
1532
|
this.element,
|
|
1527
1533
|
t,
|
|
@@ -1538,7 +1544,7 @@ class D {
|
|
|
1538
1544
|
});
|
|
1539
1545
|
o(this, "makeRef", () => this.makeChildText(""));
|
|
1540
1546
|
o(this, "makePortal", (e) => {
|
|
1541
|
-
const t = new
|
|
1547
|
+
const t = new ve(e, this.element);
|
|
1542
1548
|
return this.appendOrInsert(t), new D(
|
|
1543
1549
|
t,
|
|
1544
1550
|
void 0,
|
|
@@ -1587,17 +1593,17 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1587
1593
|
"readonly",
|
|
1588
1594
|
"required",
|
|
1589
1595
|
"selected"
|
|
1590
|
-
]), ft = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]),
|
|
1596
|
+
]), ft = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), _e = (s) => (e) => e.makeChildText(s).clear, Ee = (s) => (e) => {
|
|
1591
1597
|
const t = e.makeChildText(s.value), r = s.on(t.setText);
|
|
1592
1598
|
return (n) => {
|
|
1593
1599
|
r(), t.clear(n);
|
|
1594
1600
|
};
|
|
1595
|
-
}, qt = (s) => d.is(s) ? Ee(s) :
|
|
1601
|
+
}, qt = (s) => d.is(s) ? Ee(s) : _e(s), b = (...s) => (e) => {
|
|
1596
1602
|
const t = s.map((r) => f(r)(e));
|
|
1597
1603
|
return (r) => {
|
|
1598
1604
|
t.forEach((n) => n(r));
|
|
1599
1605
|
};
|
|
1600
|
-
},
|
|
1606
|
+
}, _ = () => () => {
|
|
1601
1607
|
}, dt = (s) => (e) => (e.addClasses(s), (t) => {
|
|
1602
1608
|
t && e.removeClasses(s);
|
|
1603
1609
|
}), pt = (s) => (e) => {
|
|
@@ -1717,11 +1723,11 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1717
1723
|
}
|
|
1718
1724
|
), f = (s) => {
|
|
1719
1725
|
if (s == null)
|
|
1720
|
-
return
|
|
1726
|
+
return _;
|
|
1721
1727
|
if (Array.isArray(s))
|
|
1722
1728
|
return b(...s.map(f));
|
|
1723
1729
|
if (typeof s == "string")
|
|
1724
|
-
return
|
|
1730
|
+
return _e(s);
|
|
1725
1731
|
if (d.is(s))
|
|
1726
1732
|
return Ee(s);
|
|
1727
1733
|
if (typeof s == "function")
|
|
@@ -1780,20 +1786,20 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1780
1786
|
), xe = (s, e) => {
|
|
1781
1787
|
if (typeof e == "function")
|
|
1782
1788
|
return xe(s, { then: e });
|
|
1783
|
-
const t = e.pending != null ? f(e.pending()) :
|
|
1789
|
+
const t = e.pending != null ? f(e.pending()) : _, r = e.then, n = e.error != null ? (i) => f(e.error(i)) : () => _;
|
|
1784
1790
|
return (i) => {
|
|
1785
1791
|
let l = !0;
|
|
1786
|
-
const c = s(),
|
|
1787
|
-
let
|
|
1792
|
+
const c = s(), u = i.makeRef();
|
|
1793
|
+
let a = f(t)(u);
|
|
1788
1794
|
return c.then(
|
|
1789
1795
|
(h) => {
|
|
1790
|
-
l && (
|
|
1796
|
+
l && (a(!0), a = f(r(h))(u));
|
|
1791
1797
|
},
|
|
1792
1798
|
(h) => {
|
|
1793
|
-
l && (
|
|
1799
|
+
l && (a(!0), a = f(n(h))(u));
|
|
1794
1800
|
}
|
|
1795
1801
|
), (h) => {
|
|
1796
|
-
l = !1,
|
|
1802
|
+
l = !1, a(h), u.clear(h);
|
|
1797
1803
|
};
|
|
1798
1804
|
};
|
|
1799
1805
|
}, zt = (s, e) => xe(() => s, e), Pe = (s, e, t) => (r) => r.on(s, e, t), yt = (s) => Pe("click", (e, t) => {
|
|
@@ -1883,16 +1889,16 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1883
1889
|
const n = r.makeRef();
|
|
1884
1890
|
let i, l;
|
|
1885
1891
|
const c = s.map((h) => Object.keys(h)[0]);
|
|
1886
|
-
let
|
|
1887
|
-
const
|
|
1888
|
-
if (h !==
|
|
1889
|
-
|
|
1892
|
+
let u;
|
|
1893
|
+
const a = c.on((h) => {
|
|
1894
|
+
if (h !== u) {
|
|
1895
|
+
u = h, l == null || l.dispose(), i == null || i(!0), l = s.map((T) => T[h]);
|
|
1890
1896
|
const g = e[h](l);
|
|
1891
1897
|
i = f(g)(n);
|
|
1892
1898
|
}
|
|
1893
1899
|
});
|
|
1894
1900
|
return (h) => {
|
|
1895
|
-
l == null || l.dispose(),
|
|
1901
|
+
l == null || l.dispose(), a(), n.clear(h), i == null || i(h);
|
|
1896
1902
|
};
|
|
1897
1903
|
};
|
|
1898
1904
|
const t = Object.keys(s)[0];
|
|
@@ -1901,15 +1907,15 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1901
1907
|
y.map(s, (r) => ({ [r[e]]: r })),
|
|
1902
1908
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1903
1909
|
t
|
|
1904
|
-
), cs = (s, e) => Le(s, "kind", e),
|
|
1910
|
+
), cs = (s, e) => Le(s, "kind", e), us = (s, e) => {
|
|
1905
1911
|
const t = y.map(s, ([r, n]) => ({ [r]: n }));
|
|
1906
1912
|
return Y(t, e);
|
|
1907
|
-
},
|
|
1913
|
+
}, as = (s, e) => Le(s, "type", e), vt = (s, e) => Y(
|
|
1908
1914
|
y.map(s, (t) => ({ [t]: !0 })),
|
|
1909
1915
|
e
|
|
1910
1916
|
), hs = (s, e = {}) => (t) => {
|
|
1911
1917
|
const r = (e == null ? void 0 : e.firstSeparator) ?? s, n = (e == null ? void 0 : e.lastSeparator) ?? s;
|
|
1912
|
-
return
|
|
1918
|
+
return vt(
|
|
1913
1919
|
t.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
|
|
1914
1920
|
{
|
|
1915
1921
|
first: r,
|
|
@@ -1925,21 +1931,21 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1925
1931
|
return (n) => {
|
|
1926
1932
|
const i = n.makeRef();
|
|
1927
1933
|
let l = () => {
|
|
1928
|
-
}, c = !1,
|
|
1929
|
-
const
|
|
1930
|
-
h == null ? (l(!0), l = f(t == null ? void 0 : t())(i), c = !1,
|
|
1934
|
+
}, c = !1, u = null;
|
|
1935
|
+
const a = r.on((h) => {
|
|
1936
|
+
h == null ? (l(!0), l = f(t == null ? void 0 : t())(i), c = !1, u == null || u.dispose(), u = null) : c ? u.set(h) : (u = v(h), l(!0), l = f(e(u))(
|
|
1931
1937
|
i
|
|
1932
1938
|
), c = !0);
|
|
1933
1939
|
});
|
|
1934
1940
|
return (h) => {
|
|
1935
|
-
|
|
1941
|
+
u == null || u.dispose(), a(), l == null || l(h), i.clear(h);
|
|
1936
1942
|
};
|
|
1937
1943
|
};
|
|
1938
1944
|
} else {
|
|
1939
1945
|
const r = s;
|
|
1940
1946
|
if (r == null) {
|
|
1941
1947
|
const n = t == null ? void 0 : t();
|
|
1942
|
-
return n != null ? f(n) :
|
|
1948
|
+
return n != null ? f(n) : _;
|
|
1943
1949
|
}
|
|
1944
1950
|
return f(e(G(r)));
|
|
1945
1951
|
}
|
|
@@ -1948,17 +1954,17 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1948
1954
|
if (s.some(
|
|
1949
1955
|
(p) => !d.is(p) && p == null
|
|
1950
1956
|
))
|
|
1951
|
-
return (t != null ? f(t == null ? void 0 : t()) :
|
|
1957
|
+
return (t != null ? f(t == null ? void 0 : t()) : _)(
|
|
1952
1958
|
n
|
|
1953
1959
|
);
|
|
1954
1960
|
const l = s.map(() => null), c = s.map(
|
|
1955
1961
|
(p) => d.is(p) ? p.value != null : p != null
|
|
1956
1962
|
);
|
|
1957
|
-
let
|
|
1958
|
-
const
|
|
1963
|
+
let u = null;
|
|
1964
|
+
const a = v(c.every((p) => p)), h = (p, m) => {
|
|
1959
1965
|
if (p.value != null) {
|
|
1960
1966
|
if (l[m] == null) {
|
|
1961
|
-
const C =
|
|
1967
|
+
const C = v(p.value);
|
|
1962
1968
|
l[m] = C;
|
|
1963
1969
|
} else
|
|
1964
1970
|
l[m].value = p.value;
|
|
@@ -1969,18 +1975,18 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1969
1975
|
let g = s.length - 1;
|
|
1970
1976
|
const T = s.map((p, m) => {
|
|
1971
1977
|
if (!d.is(p)) {
|
|
1972
|
-
const C =
|
|
1978
|
+
const C = v(p);
|
|
1973
1979
|
return l[m] = C, () => {
|
|
1974
1980
|
};
|
|
1975
1981
|
}
|
|
1976
1982
|
return p.on(() => {
|
|
1977
|
-
h(p, m), g === 0 ?
|
|
1983
|
+
h(p, m), g === 0 ? a.value = c.every((C) => C) : g--;
|
|
1978
1984
|
});
|
|
1979
1985
|
});
|
|
1980
|
-
return
|
|
1981
|
-
|
|
1986
|
+
return a.on((p) => {
|
|
1987
|
+
u == null || u(!0), u = null, p ? u = f(e(...l))(n) : u = f((t == null ? void 0 : t()) ?? _)(n);
|
|
1982
1988
|
}), (p) => {
|
|
1983
|
-
l.forEach((m) => m == null ? void 0 : m.dispose()),
|
|
1989
|
+
l.forEach((m) => m == null ? void 0 : m.dispose()), a.dispose(), T.forEach((m) => m()), u == null || u(p), n.clear(p);
|
|
1984
1990
|
};
|
|
1985
1991
|
}, M = (...s) => (e) => (t) => s.forEach((r) => r(t, e)), De = (s, e, t) => {
|
|
1986
1992
|
if (d.is(s)) {
|
|
@@ -1989,17 +1995,17 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1989
1995
|
const i = n.makeRef();
|
|
1990
1996
|
let l = () => {
|
|
1991
1997
|
};
|
|
1992
|
-
const c = r.on((
|
|
1993
|
-
l(!0),
|
|
1998
|
+
const c = r.on((u) => {
|
|
1999
|
+
l(!0), u ? l = f(e())(i) : l = f(t == null ? void 0 : t())(i);
|
|
1994
2000
|
});
|
|
1995
|
-
return (
|
|
1996
|
-
l(
|
|
2001
|
+
return (u) => {
|
|
2002
|
+
l(u), c(), i.clear(u);
|
|
1997
2003
|
};
|
|
1998
2004
|
};
|
|
1999
2005
|
} else {
|
|
2000
2006
|
if (s) {
|
|
2001
2007
|
const n = e();
|
|
2002
|
-
return n != null ? f(n) :
|
|
2008
|
+
return n != null ? f(n) : _;
|
|
2003
2009
|
}
|
|
2004
2010
|
return f(t == null ? void 0 : t());
|
|
2005
2011
|
}
|
|
@@ -2019,7 +2025,7 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
2019
2025
|
f(e(r)),
|
|
2020
2026
|
De(
|
|
2021
2027
|
r.isLast,
|
|
2022
|
-
() =>
|
|
2028
|
+
() => _,
|
|
2023
2029
|
() => t(n)
|
|
2024
2030
|
)
|
|
2025
2031
|
);
|
|
@@ -2028,11 +2034,11 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
2028
2034
|
return (r) => {
|
|
2029
2035
|
const n = s.derive(), i = r.makeRef(), l = [];
|
|
2030
2036
|
return n.on((c) => {
|
|
2031
|
-
const
|
|
2032
|
-
for (const
|
|
2033
|
-
|
|
2034
|
-
for (let
|
|
2035
|
-
const h = new Q(
|
|
2037
|
+
const u = l.splice(c);
|
|
2038
|
+
for (const a of u)
|
|
2039
|
+
a(!0);
|
|
2040
|
+
for (let a = l.length; a < c; a++) {
|
|
2041
|
+
const h = new Q(a, n);
|
|
2036
2042
|
l.push(
|
|
2037
2043
|
b(
|
|
2038
2044
|
M(h.dispose),
|
|
@@ -2042,8 +2048,8 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
2042
2048
|
}
|
|
2043
2049
|
}), (c) => {
|
|
2044
2050
|
n.dispose();
|
|
2045
|
-
for (const
|
|
2046
|
-
|
|
2051
|
+
for (const u of l)
|
|
2052
|
+
u(c);
|
|
2047
2053
|
l.length = 0, i.clear(c);
|
|
2048
2054
|
};
|
|
2049
2055
|
};
|
|
@@ -2089,7 +2095,7 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
2089
2095
|
};
|
|
2090
2096
|
}
|
|
2091
2097
|
return f(e(s));
|
|
2092
|
-
}, Ts = (s, e, t = () =>
|
|
2098
|
+
}, Ts = (s, e, t = () => _) => Y(
|
|
2093
2099
|
y.map(
|
|
2094
2100
|
s,
|
|
2095
2101
|
(r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
|
|
@@ -2101,7 +2107,7 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
2101
2107
|
), bs = (s, e) => (t) => {
|
|
2102
2108
|
const r = t.makePortal(s), n = ee(f(e), r);
|
|
2103
2109
|
return () => n(!0);
|
|
2104
|
-
}, R = /* @__PURE__ */ new Map(),
|
|
2110
|
+
}, R = /* @__PURE__ */ new Map(), _t = (s) => ({
|
|
2105
2111
|
mark: Ge(`Probe(${s.description})`),
|
|
2106
2112
|
create: ({ callback: e = () => {
|
|
2107
2113
|
}, timeout: t = 10 } = {}) => {
|
|
@@ -2121,7 +2127,7 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
2121
2127
|
onUse: () => i.counter++
|
|
2122
2128
|
};
|
|
2123
2129
|
}
|
|
2124
|
-
}), Ss =
|
|
2130
|
+
}), Ss = _t(Symbol("GlobalProbe")), Et = (s, e) => (t) => {
|
|
2125
2131
|
const r = t.getStyle(s);
|
|
2126
2132
|
return t.setStyle(s, e), (n) => {
|
|
2127
2133
|
n && t.setStyle(s, r);
|
|
@@ -2152,11 +2158,11 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
2152
2158
|
}
|
|
2153
2159
|
return () => {
|
|
2154
2160
|
};
|
|
2155
|
-
},
|
|
2161
|
+
}, vs = (s) => (e) => {
|
|
2156
2162
|
const t = s(e);
|
|
2157
2163
|
return t == null ? () => {
|
|
2158
2164
|
} : f(t)(e);
|
|
2159
|
-
},
|
|
2165
|
+
}, _s = (s) => Ct((e) => s(e.element)), Es = (s) => (e) => {
|
|
2160
2166
|
if (e.isHeadlessDOM()) {
|
|
2161
2167
|
const t = s(e);
|
|
2162
2168
|
if (t)
|
|
@@ -2174,11 +2180,11 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
2174
2180
|
}
|
|
2175
2181
|
const i = [], l = s({
|
|
2176
2182
|
use: ({ mark: c }) => {
|
|
2177
|
-
const { value:
|
|
2178
|
-
return
|
|
2183
|
+
const { value: u, onUse: a } = r().getProvider(c);
|
|
2184
|
+
return a == null || a(), u;
|
|
2179
2185
|
},
|
|
2180
|
-
set: ({ mark: c, create:
|
|
2181
|
-
const { value: h, dispose: g, onUse: T } = a
|
|
2186
|
+
set: ({ mark: c, create: u }, a) => {
|
|
2187
|
+
const { value: h, dispose: g, onUse: T } = u(a, r());
|
|
2182
2188
|
i.push(g), n(r().setProvider(c, h, T));
|
|
2183
2189
|
}
|
|
2184
2190
|
});
|
|
@@ -2206,7 +2212,7 @@ export {
|
|
|
2206
2212
|
we as El,
|
|
2207
2213
|
Ce as ElNS,
|
|
2208
2214
|
Q as ElementPosition,
|
|
2209
|
-
|
|
2215
|
+
_ as Empty,
|
|
2210
2216
|
ds as Ensure,
|
|
2211
2217
|
ps as EnsureAll,
|
|
2212
2218
|
ms as ForEach,
|
|
@@ -2214,20 +2220,20 @@ export {
|
|
|
2214
2220
|
Ss as GlobalProbe,
|
|
2215
2221
|
jt as HeadlessAdapter,
|
|
2216
2222
|
D as HeadlessContext,
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2223
|
+
ut as HeadlessElement,
|
|
2224
|
+
ve as HeadlessPortal,
|
|
2225
|
+
at as HeadlessText,
|
|
2220
2226
|
ys as MapSignal,
|
|
2221
|
-
|
|
2227
|
+
ue as MemoryStore,
|
|
2222
2228
|
Ts as NotEmpty,
|
|
2223
2229
|
yt as OnChecked,
|
|
2224
2230
|
M as OnDispose,
|
|
2225
2231
|
Y as OneOf,
|
|
2226
2232
|
Le as OneOfField,
|
|
2227
2233
|
cs as OneOfKind,
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2234
|
+
us as OneOfTuple,
|
|
2235
|
+
as as OneOfType,
|
|
2236
|
+
vt as OneOfValue,
|
|
2231
2237
|
bs as Portal,
|
|
2232
2238
|
j as Prop,
|
|
2233
2239
|
ws as Provide,
|
|
@@ -2243,8 +2249,8 @@ export {
|
|
|
2243
2249
|
y as Value,
|
|
2244
2250
|
De as When,
|
|
2245
2251
|
Ct as WithBrowserCtx,
|
|
2246
|
-
|
|
2247
|
-
|
|
2252
|
+
vs as WithCtx,
|
|
2253
|
+
_s as WithElement,
|
|
2248
2254
|
Es as WithHeadlessCtx,
|
|
2249
2255
|
te as WithProvider,
|
|
2250
2256
|
Te as _NODE_PLACEHOLDER_ATTR,
|
|
@@ -2254,7 +2260,7 @@ export {
|
|
|
2254
2260
|
We as _makeSetter,
|
|
2255
2261
|
V as _removeDOMNode,
|
|
2256
2262
|
Ee as _signalText,
|
|
2257
|
-
|
|
2263
|
+
_e as _staticText,
|
|
2258
2264
|
Mt as animateSignal,
|
|
2259
2265
|
Fe as animateSignals,
|
|
2260
2266
|
Bt as aria,
|
|
@@ -2288,13 +2294,13 @@ export {
|
|
|
2288
2294
|
$e as interpolateString,
|
|
2289
2295
|
Pt as joinSignals,
|
|
2290
2296
|
Dt as localStorageProp,
|
|
2291
|
-
|
|
2297
|
+
_t as makeProbe,
|
|
2292
2298
|
Ge as makeProviderMark,
|
|
2293
2299
|
Yt as math,
|
|
2294
2300
|
Ut as mathAttr,
|
|
2295
2301
|
Ht as merge,
|
|
2296
2302
|
X as on,
|
|
2297
|
-
|
|
2303
|
+
v as prop,
|
|
2298
2304
|
It as render,
|
|
2299
2305
|
ee as renderWithContext,
|
|
2300
2306
|
f as renderableOfTNode,
|
|
@@ -2302,7 +2308,7 @@ export {
|
|
|
2302
2308
|
Rt as runHeadless,
|
|
2303
2309
|
Ot as sessionStorageProp,
|
|
2304
2310
|
G as signal,
|
|
2305
|
-
|
|
2311
|
+
ae as storedProp,
|
|
2306
2312
|
As as style,
|
|
2307
2313
|
Xt as svg,
|
|
2308
2314
|
Wt as svgAttr
|