@manyducks.co/dolla 3.2.0 → 3.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.
- package/dist/core/index.d.ts +1 -1
- package/dist/core/signals.d.ts +23 -1
- package/dist/{core-2CFW0uRa.js → core-BRSu5hVw.js} +83 -76
- package/dist/core-BRSu5hVw.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/router.js +138 -138
- package/dist/translate.js +17 -17
- package/package.json +1 -1
- package/dist/core-2CFW0uRa.js.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createRoot } from "./root.js";
|
|
2
2
|
export type { DollaPlugin } from "./root.js";
|
|
3
|
-
export { batch, compose, createAtom, createEffect, createStream, peek, subscribe, unwrap } from "./signals.js";
|
|
3
|
+
export { batch, compose, createAtom, createEffect, createSetter, createStream, peek, subscribe, unwrap, } from "./signals.js";
|
|
4
4
|
export type { Getter, Setter } from "./signals.js";
|
|
5
5
|
export { addStore, getNearestViewNode, getRootElement, getStore, onCleanup, onEffect, onMount } from "./context.js";
|
|
6
6
|
export type { Context } from "./context.js";
|
package/dist/core/signals.d.ts
CHANGED
|
@@ -42,7 +42,25 @@ export declare function createAtom<T>(): AtomAccessors<T | undefined>;
|
|
|
42
42
|
* getValue("overwritten");
|
|
43
43
|
* getInputValue(); // "overwritten"
|
|
44
44
|
*/
|
|
45
|
-
export declare function createAtom<T>(
|
|
45
|
+
export declare function createAtom<T>(initialValue: Getter<T>): AtomAccessors<T>;
|
|
46
|
+
/**
|
|
47
|
+
* Creates a new atom with a value computed from an existing getter.
|
|
48
|
+
* This is usually used to create a 'settable' getter, in which you can store
|
|
49
|
+
* a temporary value until it gets overwritten by a _real_ update.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* const [getValue, setValue] = createAtom("");
|
|
53
|
+
* const [getInputValue, setInputValue] = createAtom(getValue);
|
|
54
|
+
*
|
|
55
|
+
* setInputValue("temporary");
|
|
56
|
+
* getValue("");
|
|
57
|
+
* getInputValue(); // "temporary"
|
|
58
|
+
*
|
|
59
|
+
* setValue("overwritten");
|
|
60
|
+
* getValue("overwritten");
|
|
61
|
+
* getInputValue(); // "overwritten"
|
|
62
|
+
*/
|
|
63
|
+
export declare function createAtom<T>(initialValue: MaybeGetter<T>): AtomAccessors<T>;
|
|
46
64
|
/**
|
|
47
65
|
* Creates a new atom with an initial value.
|
|
48
66
|
* Returns a `[getter, setter]` function tuple.
|
|
@@ -51,6 +69,10 @@ export declare function createAtom<T>(compute: Getter<T>): AtomAccessors<T>;
|
|
|
51
69
|
* const [getCount, setCount] = createAtom(5);
|
|
52
70
|
*/
|
|
53
71
|
export declare function createAtom<T>(initialValue: T): AtomAccessors<T>;
|
|
72
|
+
/**
|
|
73
|
+
* Creates a customsetter with a `getter` as its source.
|
|
74
|
+
*/
|
|
75
|
+
export declare function createSetter<T>(getter: Getter<T>, callback: (current: T) => T | void): Setter<T>;
|
|
54
76
|
export declare function compose<T>(getter: T | ((previousValue?: T) => Getter<T> | T)): Getter<T>;
|
|
55
77
|
export declare function createEffect(fn: () => void): () => void;
|
|
56
78
|
/**
|
|
@@ -56,7 +56,7 @@ function _(e, t, n) {
|
|
|
56
56
|
i !== void 0 && (i._prevDep = o), r === void 0 ? t._deps = o : r._nextDep = o, a === void 0 ? e._subs = o : a._nextSub = o;
|
|
57
57
|
}
|
|
58
58
|
function ee(e) {
|
|
59
|
-
e._flags & u.Mutable ? e._depsTail !== void 0 && (e._depsTail = void 0, e._flags = u.Mutable | u.Dirty, S(e)) :
|
|
59
|
+
e._flags & u.Mutable ? e._depsTail !== void 0 && (e._depsTail = void 0, e._flags = u.Mutable | u.Dirty, S(e)) : he.call(e);
|
|
60
60
|
}
|
|
61
61
|
function te(e, t = e._sub) {
|
|
62
62
|
let n = e._dep, r = e._prevDep, i = e._nextDep, a = e._nextSub, o = e._prevSub;
|
|
@@ -267,7 +267,11 @@ function pe(e) {
|
|
|
267
267
|
e !== void 0 && (re(e), f || x());
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
function me() {
|
|
270
|
+
function me(e, t) {
|
|
271
|
+
let n = typeof t == "function" ? t(D(this)) : t;
|
|
272
|
+
return e(n) ?? n;
|
|
273
|
+
}
|
|
274
|
+
function he() {
|
|
271
275
|
this._depsTail = void 0, this._flags = u.None, S(this);
|
|
272
276
|
let e = this._subs;
|
|
273
277
|
e !== void 0 && te(e), this._cleanup?.(), this._cleanup = void 0;
|
|
@@ -296,6 +300,9 @@ function C(e) {
|
|
|
296
300
|
return [fe.bind(t), pe.bind(t)];
|
|
297
301
|
}
|
|
298
302
|
}
|
|
303
|
+
function ge(e, t) {
|
|
304
|
+
return me.bind(e, t);
|
|
305
|
+
}
|
|
299
306
|
function w(e) {
|
|
300
307
|
return o(e) ? ue.bind({
|
|
301
308
|
_value: void 0,
|
|
@@ -324,7 +331,7 @@ function T(e) {
|
|
|
324
331
|
} finally {
|
|
325
332
|
h = n, t._flags &= ~u.RecursedCheck;
|
|
326
333
|
}
|
|
327
|
-
return
|
|
334
|
+
return he.bind(t);
|
|
328
335
|
}
|
|
329
336
|
function E(e) {
|
|
330
337
|
return o(e) ? e() : e;
|
|
@@ -337,7 +344,7 @@ function D(e) {
|
|
|
337
344
|
b(t);
|
|
338
345
|
}
|
|
339
346
|
}
|
|
340
|
-
function
|
|
347
|
+
function _e(e) {
|
|
341
348
|
++f;
|
|
342
349
|
try {
|
|
343
350
|
e();
|
|
@@ -429,7 +436,7 @@ function k({ value: e, signal: t }) {
|
|
|
429
436
|
}
|
|
430
437
|
};
|
|
431
438
|
}
|
|
432
|
-
function
|
|
439
|
+
function ve(e) {
|
|
433
440
|
let t = {
|
|
434
441
|
_currentValue: e?.initialValue,
|
|
435
442
|
_pendingValue: e?.initialValue,
|
|
@@ -447,9 +454,9 @@ function ge(e) {
|
|
|
447
454
|
}
|
|
448
455
|
//#endregion
|
|
449
456
|
//#region src/core/markup/types.ts
|
|
450
|
-
var
|
|
451
|
-
static [
|
|
452
|
-
get [
|
|
457
|
+
var ye = Symbol(), be = Symbol(), xe = Symbol(), A = class {
|
|
458
|
+
static [xe] = !0;
|
|
459
|
+
get [be]() {
|
|
453
460
|
return !0;
|
|
454
461
|
}
|
|
455
462
|
}, j = class extends A {
|
|
@@ -470,7 +477,7 @@ var _e = Symbol(), ve = Symbol(), ye = Symbol(), A = class {
|
|
|
470
477
|
e || this.#e.parentNode?.removeChild(this.#e);
|
|
471
478
|
}
|
|
472
479
|
move(e, t) {
|
|
473
|
-
|
|
480
|
+
Me(e, this.#e, t);
|
|
474
481
|
}
|
|
475
482
|
};
|
|
476
483
|
//#endregion
|
|
@@ -543,7 +550,7 @@ var N = class extends A {
|
|
|
543
550
|
a && (r = a);
|
|
544
551
|
}
|
|
545
552
|
}
|
|
546
|
-
},
|
|
553
|
+
}, Se = Symbol("parentElement"), P = Symbol("debug"), F = Symbol("isSVG"), Ce = ["ref", "children"], we = class extends A {
|
|
547
554
|
#e;
|
|
548
555
|
#t;
|
|
549
556
|
#n;
|
|
@@ -553,7 +560,7 @@ var N = class extends A {
|
|
|
553
560
|
#o;
|
|
554
561
|
constructor(e, t, n) {
|
|
555
562
|
if (super(), this.#t = n, this.#n = e, t === "svg" ? (this.#n = K(e), this.#n[F] = !0, this.#r = !0) : this.#n[F] && t === "foreignObject" && (this.#n = K(e), this.#n[F] = !1, this.#r = !1), this.#n[F] ? this.#e = document.createElementNS("http://www.w3.org/2000/svg", t) : this.#e = document.createElement(t), this.#n[P]) {
|
|
556
|
-
let e =
|
|
563
|
+
let e = Le(this.#n);
|
|
557
564
|
e && (this.#e.dataset.view = e.context.name);
|
|
558
565
|
}
|
|
559
566
|
}
|
|
@@ -565,7 +572,7 @@ var N = class extends A {
|
|
|
565
572
|
}
|
|
566
573
|
mount(e, t) {
|
|
567
574
|
let r = this.isMounted();
|
|
568
|
-
if (!r && (this.#c(this.#e, n(
|
|
575
|
+
if (!r && (this.#c(this.#e, n(Ce, this.#t)), this.#t.children)) {
|
|
569
576
|
this.#i = z(this.#n, this.#t.children);
|
|
570
577
|
for (let e of this.#i) e.mount(this.#e);
|
|
571
578
|
}
|
|
@@ -634,13 +641,13 @@ var N = class extends A {
|
|
|
634
641
|
n.forEach((e) => {
|
|
635
642
|
e(), this.#a.delete(e);
|
|
636
643
|
}), n.clear(), e.style.cssText = "";
|
|
637
|
-
let r =
|
|
644
|
+
let r = Ee(t);
|
|
638
645
|
for (let [t, { value: i, priority: a }] of Object.entries(r)) if (o(i)) {
|
|
639
646
|
let r = O(i, (n) => {
|
|
640
|
-
n ? e.style.setProperty(t,
|
|
647
|
+
n ? e.style.setProperty(t, Oe(n), a) : e.style.removeProperty(t);
|
|
641
648
|
});
|
|
642
649
|
this.#a.add(r), n.add(r);
|
|
643
|
-
} else i != null && e.style.setProperty(t,
|
|
650
|
+
} else i != null && e.style.setProperty(t, Oe(i), a);
|
|
644
651
|
};
|
|
645
652
|
o(t) ? this.#a.add(O(t, r)) : r(t);
|
|
646
653
|
}
|
|
@@ -649,7 +656,7 @@ var N = class extends A {
|
|
|
649
656
|
n.forEach((e) => {
|
|
650
657
|
e(), this.#a.delete(e);
|
|
651
658
|
}), n.clear(), I(e, "class", null);
|
|
652
|
-
let r =
|
|
659
|
+
let r = Te(t);
|
|
653
660
|
for (let [t, i] of Object.entries(r)) if (t !== "undefined") if (o(i)) {
|
|
654
661
|
let r = O(i, (n) => e.classList.toggle(t, !!n));
|
|
655
662
|
this.#a.add(r), n.add(r);
|
|
@@ -658,22 +665,22 @@ var N = class extends A {
|
|
|
658
665
|
o(t) ? this.#a.add(O(t, r)) : r(t);
|
|
659
666
|
}
|
|
660
667
|
};
|
|
661
|
-
function
|
|
662
|
-
return a(e) ? Object.fromEntries(e.split(" ").map((e) => [e, !0])) : i(e) ? Object.assign({}, ...e.filter(Boolean).map(
|
|
668
|
+
function Te(e) {
|
|
669
|
+
return a(e) ? Object.fromEntries(e.split(" ").map((e) => [e, !0])) : i(e) ? Object.assign({}, ...e.filter(Boolean).map(Te)) : l(e) ? e : {};
|
|
663
670
|
}
|
|
664
|
-
function
|
|
671
|
+
function Ee(e) {
|
|
665
672
|
return a(e) ? Object.fromEntries(e.split(";").filter((e) => e.trim()).map((e) => {
|
|
666
673
|
let [t, n] = e.split(":");
|
|
667
|
-
return [
|
|
674
|
+
return [De(t.trim()), {
|
|
668
675
|
value: n.replace("!important", "").trim(),
|
|
669
676
|
priority: n.includes("!important") ? "important" : ""
|
|
670
677
|
}];
|
|
671
|
-
})) : i(e) ? Object.assign({}, ...e.filter(Boolean).map(
|
|
678
|
+
})) : i(e) ? Object.assign({}, ...e.filter(Boolean).map(Ee)) : l(e) ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e.startsWith("--") ? e : De(e), { value: t }])) : {};
|
|
672
679
|
}
|
|
673
|
-
function
|
|
680
|
+
function De(e) {
|
|
674
681
|
return e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (e, t) => (t ? "-" : "") + e.toLowerCase());
|
|
675
682
|
}
|
|
676
|
-
function
|
|
683
|
+
function Oe(e) {
|
|
677
684
|
return c(e) ? `${e}px` : e;
|
|
678
685
|
}
|
|
679
686
|
function I(e, t, n) {
|
|
@@ -683,20 +690,20 @@ function I(e, t, n) {
|
|
|
683
690
|
//#region src/core/markup/utils.ts
|
|
684
691
|
function L(e, t) {
|
|
685
692
|
return {
|
|
686
|
-
[
|
|
693
|
+
[ye]: !0,
|
|
687
694
|
type: e,
|
|
688
695
|
props: t
|
|
689
696
|
};
|
|
690
697
|
}
|
|
691
|
-
function De(e) {
|
|
692
|
-
return e && e[_e];
|
|
693
|
-
}
|
|
694
|
-
function Oe(e) {
|
|
695
|
-
return e && e[ve];
|
|
696
|
-
}
|
|
697
698
|
function ke(e) {
|
|
698
699
|
return e && e[ye];
|
|
699
700
|
}
|
|
701
|
+
function Ae(e) {
|
|
702
|
+
return e && e[be];
|
|
703
|
+
}
|
|
704
|
+
function je(e) {
|
|
705
|
+
return e && e[xe];
|
|
706
|
+
}
|
|
700
707
|
function R(e, t = K()) {
|
|
701
708
|
let n = z(t, e);
|
|
702
709
|
return n.length === 1 ? n[0] : new N(t, () => n);
|
|
@@ -706,10 +713,10 @@ function z(e, ...t) {
|
|
|
706
713
|
function r(t) {
|
|
707
714
|
if (!(t == null || t === !1)) if (i(t)) for (let e = 0; e < t.length; e++) r(t[e]);
|
|
708
715
|
else if (a(t) || c(t)) n.push(new j(e, V(String(t))));
|
|
709
|
-
else if (
|
|
716
|
+
else if (ke(t)) {
|
|
710
717
|
let { type: r, props: i } = t;
|
|
711
|
-
|
|
712
|
-
} else
|
|
718
|
+
je(r) ? n.push(new r(e, ...i.args)) : o(r) ? n.push(new U(e, r, i)) : a(r) && n.push(new we(e, r, i));
|
|
719
|
+
} else Ae(t) ? n.push(t) : t instanceof Node ? n.push(new j(e, t)) : o(t) && n.push(new N(e, t));
|
|
713
720
|
}
|
|
714
721
|
for (let e = 0; e < t.length; e++) r(t[e]);
|
|
715
722
|
return n;
|
|
@@ -720,7 +727,7 @@ function B(e, t, n) {
|
|
|
720
727
|
function V(e) {
|
|
721
728
|
return document.createTextNode(e);
|
|
722
729
|
}
|
|
723
|
-
function
|
|
730
|
+
function Me(e, t, n) {
|
|
724
731
|
let r = n?.nextSibling ?? null;
|
|
725
732
|
if (e.moveBefore) try {
|
|
726
733
|
e.moveBefore(t, r);
|
|
@@ -733,13 +740,13 @@ function H(e, t, n) {
|
|
|
733
740
|
}
|
|
734
741
|
//#endregion
|
|
735
742
|
//#region src/core/markup/nodes/view.ts
|
|
736
|
-
var
|
|
743
|
+
var Ne = Symbol.for("ViewNode"), U = class extends A {
|
|
737
744
|
#e;
|
|
738
745
|
#t;
|
|
739
746
|
#n;
|
|
740
747
|
context;
|
|
741
748
|
constructor(e, t, n) {
|
|
742
|
-
super(), this.context = K(e), this.context[
|
|
749
|
+
super(), this.context = K(e), this.context[Ne] = this, this.context.name = t.name, this.#e = n, this.#t = t;
|
|
743
750
|
}
|
|
744
751
|
getRoot() {
|
|
745
752
|
return this.#n?.getRoot();
|
|
@@ -766,12 +773,12 @@ function K(e) {
|
|
|
766
773
|
return Object.assign(Object.create(e ?? null), { isMounted: !1 });
|
|
767
774
|
}
|
|
768
775
|
function q(e) {
|
|
769
|
-
e.isMounted || (e.isMounted = !0,
|
|
776
|
+
e.isMounted || (e.isMounted = !0, Pe(e, W));
|
|
770
777
|
}
|
|
771
778
|
function J(e) {
|
|
772
|
-
e.isMounted && (e.isMounted = !1,
|
|
779
|
+
e.isMounted && (e.isMounted = !1, Pe(e, G));
|
|
773
780
|
}
|
|
774
|
-
function
|
|
781
|
+
function Pe(e, t) {
|
|
775
782
|
if (Object.hasOwn(e, t)) {
|
|
776
783
|
for (let n of e[t]) n();
|
|
777
784
|
e[t].length = 0;
|
|
@@ -783,36 +790,36 @@ function Y(e, t) {
|
|
|
783
790
|
function X(e, t) {
|
|
784
791
|
Object.hasOwn(e, G) ? e[G].push(t) : e[G] = [t];
|
|
785
792
|
}
|
|
786
|
-
function
|
|
793
|
+
function Fe(e, t) {
|
|
787
794
|
e.isMounted ? X(e, T(t)) : Y(e, () => {
|
|
788
795
|
X(e, T(t));
|
|
789
796
|
});
|
|
790
797
|
}
|
|
791
|
-
function
|
|
792
|
-
return e[
|
|
798
|
+
function Ie(e) {
|
|
799
|
+
return e[Se];
|
|
793
800
|
}
|
|
794
|
-
function
|
|
795
|
-
return e[
|
|
801
|
+
function Le(e) {
|
|
802
|
+
return e[Ne];
|
|
796
803
|
}
|
|
797
804
|
var Z = Symbol("Dolla.StoreId");
|
|
798
|
-
function
|
|
805
|
+
function Re(e, t, ...n) {
|
|
799
806
|
t[Z] ??= Symbol(t.name), r(!Object.hasOwn(e, t[Z]), "Store was already provided on this context.");
|
|
800
807
|
let i = K(e);
|
|
801
808
|
return Y(e, () => q(i)), X(e, () => J(i)), i.name = t.name, e[t[Z]] = t.call(i, n[0], i);
|
|
802
809
|
}
|
|
803
|
-
function
|
|
810
|
+
function ze(e, t) {
|
|
804
811
|
let n = t[Z], i = n ? e[n] : void 0;
|
|
805
812
|
return r(i != null, `Store '${t.name}' is not provided by this context.`), i;
|
|
806
813
|
}
|
|
807
814
|
//#endregion
|
|
808
815
|
//#region src/core/root.ts
|
|
809
|
-
function
|
|
816
|
+
function Be(e, t) {
|
|
810
817
|
let n = a(e) ? document.querySelector(e) : e;
|
|
811
818
|
r(n, "Element cannot be null.");
|
|
812
819
|
let i = K();
|
|
813
820
|
i.name = "dolla:root";
|
|
814
821
|
let s = [], c = [];
|
|
815
|
-
i[
|
|
822
|
+
i[Se] = n, i[P] = !!t?.debug;
|
|
816
823
|
let l = null, u = {
|
|
817
824
|
plugin: d,
|
|
818
825
|
mount: f,
|
|
@@ -834,23 +841,23 @@ function Re(e, t) {
|
|
|
834
841
|
}
|
|
835
842
|
//#endregion
|
|
836
843
|
//#region src/core/debug.ts
|
|
837
|
-
var
|
|
844
|
+
var Ve = () => {}, He = {
|
|
838
845
|
trace: 1,
|
|
839
846
|
info: 1,
|
|
840
847
|
log: 2,
|
|
841
848
|
warn: 3,
|
|
842
849
|
error: 4,
|
|
843
850
|
silent: 5
|
|
844
|
-
},
|
|
845
|
-
|
|
846
|
-
},
|
|
847
|
-
|
|
851
|
+
}, Ue = 1, We = (e) => !e.startsWith("dolla:"), Ge = (e) => {
|
|
852
|
+
Ue = He[e] || 1;
|
|
853
|
+
}, Ke = (e) => {
|
|
854
|
+
We = e;
|
|
848
855
|
}, Q = globalThis.console || {};
|
|
849
|
-
function
|
|
856
|
+
function qe(e, ...t) {
|
|
850
857
|
let n = e.name, r, i = (e, i) => {
|
|
851
|
-
if (i <
|
|
858
|
+
if (i < Ue || !We(n) || !Q[e]) return Ve;
|
|
852
859
|
if (!r) {
|
|
853
|
-
let e = "%c" + n, i = [`color:${
|
|
860
|
+
let e = "%c" + n, i = [`color:${Ye(n)};font-weight:bold`];
|
|
854
861
|
for (let [n, r] of t) e += `%c[${n}: %c${r}%c]`, i.push("color:#777", "color:#aaa", "color:#777");
|
|
855
862
|
r = [e, ...i];
|
|
856
863
|
}
|
|
@@ -874,18 +881,18 @@ function Ge(e, ...t) {
|
|
|
874
881
|
}
|
|
875
882
|
};
|
|
876
883
|
}
|
|
877
|
-
function
|
|
884
|
+
function Je(e, ...t) {
|
|
878
885
|
let n = K();
|
|
879
|
-
return n.name = e,
|
|
886
|
+
return n.name = e, qe(n, ...t);
|
|
880
887
|
}
|
|
881
|
-
function
|
|
888
|
+
function Ye(e) {
|
|
882
889
|
let t = 0;
|
|
883
890
|
for (let n = 0; n < e.length; n++) t = (t + e.charCodeAt(n) * 10) % 360;
|
|
884
891
|
return `oklch(0.68 0.15 ${t}deg)`;
|
|
885
892
|
}
|
|
886
893
|
//#endregion
|
|
887
894
|
//#region src/core/markup/nodes/portal.ts
|
|
888
|
-
var
|
|
895
|
+
var Xe = class extends A {
|
|
889
896
|
#e = V("");
|
|
890
897
|
#t;
|
|
891
898
|
#n;
|
|
@@ -907,9 +914,9 @@ var Je = class extends A {
|
|
|
907
914
|
this.isMounted() && (e || this.#e.parentNode?.removeChild(this.#e), this.#i?.isMounted() && this.#i.unmount(!1));
|
|
908
915
|
}
|
|
909
916
|
move(e, t) {
|
|
910
|
-
|
|
917
|
+
Me(e, this.#e, t);
|
|
911
918
|
}
|
|
912
|
-
},
|
|
919
|
+
}, Ze = class extends A {
|
|
913
920
|
#e = V("");
|
|
914
921
|
#t;
|
|
915
922
|
#n;
|
|
@@ -947,7 +954,7 @@ var Je = class extends A {
|
|
|
947
954
|
if (!this.isMounted()) return;
|
|
948
955
|
if (e.length === 0) return this._cleanup(!1);
|
|
949
956
|
let t = /* @__PURE__ */ new Map();
|
|
950
|
-
|
|
957
|
+
_e(() => {
|
|
951
958
|
let n = new Set(e.map((e, t) => this.#r(e, t)));
|
|
952
959
|
for (let [e, t] of this.#o.entries()) n.has(e) || t._node.unmount(!1);
|
|
953
960
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -976,31 +983,31 @@ var Je = class extends A {
|
|
|
976
983
|
};
|
|
977
984
|
//#endregion
|
|
978
985
|
//#region src/core/markup/helpers.ts
|
|
979
|
-
function
|
|
980
|
-
return o(e) ? L(
|
|
986
|
+
function Qe(e, t, n) {
|
|
987
|
+
return o(e) ? L(Ze, { args: [
|
|
981
988
|
e,
|
|
982
989
|
t,
|
|
983
990
|
n
|
|
984
991
|
] }) : Array.from(e).map((e, t) => n(() => e, () => t));
|
|
985
992
|
}
|
|
986
|
-
function
|
|
993
|
+
function $e(e, t, n) {
|
|
987
994
|
return o(e) ? L(N, { args: [w(() => e() ? t : n)] }) : e ? t : n;
|
|
988
995
|
}
|
|
989
|
-
function
|
|
990
|
-
return
|
|
996
|
+
function et(e, t, n) {
|
|
997
|
+
return $e(e, t, n);
|
|
991
998
|
}
|
|
992
|
-
function
|
|
993
|
-
return
|
|
999
|
+
function tt(e, t, n) {
|
|
1000
|
+
return $e(e, n, t);
|
|
994
1001
|
}
|
|
995
|
-
function
|
|
996
|
-
return L(
|
|
1002
|
+
function nt(e, t) {
|
|
1003
|
+
return L(Xe, { args: [t, e] });
|
|
997
1004
|
}
|
|
998
1005
|
//#endregion
|
|
999
1006
|
//#region src/core/markup/html.ts
|
|
1000
1007
|
var $ = /* @__PURE__ */ function(e) {
|
|
1001
1008
|
return e[e.Slash = 0] = "Slash", e[e.Text = 1] = "Text", e[e.Whitespace = 2] = "Whitespace", e[e.TagName = 3] = "TagName", e[e.Comment = 4] = "Comment", e[e.PropSet = 5] = "PropSet", e[e.PropAppend = 6] = "PropAppend", e;
|
|
1002
1009
|
}($ || {});
|
|
1003
|
-
function
|
|
1010
|
+
function rt(e, ...t) {
|
|
1004
1011
|
let n = [e, ...t], r = $.Text, i = "", a = "", o = [0], s = "", c = (e) => {
|
|
1005
1012
|
r === $.Text && (e || (i = i.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? o.push(e ? n[e] : i) : r === $.TagName && (e || i) ? (o[1] = e ? n[e] : i, r = $.Whitespace) : r === $.Whitespace && i === "..." && e ? o[2] = Object.assign(o[2] || {}, n[e]) : r === $.Whitespace && i && !e ? (o[2] = o[2] || {})[i] = !0 : r >= $.PropSet && (r === $.PropSet ? ((o[2] = o[2] || {})[s] = e ? i ? i + n[e] : n[e] : i, r = $.PropAppend) : (e || i) && (o[2][s] += e ? i + n[e] : i)), i = "";
|
|
1006
1013
|
};
|
|
@@ -1035,13 +1042,13 @@ function tt(e, ...t) {
|
|
|
1035
1042
|
}
|
|
1036
1043
|
//#endregion
|
|
1037
1044
|
//#region src/core/ref.ts
|
|
1038
|
-
function
|
|
1045
|
+
function it() {
|
|
1039
1046
|
let e;
|
|
1040
1047
|
return ((...t) => t.length ? (e = t[0], () => {
|
|
1041
1048
|
e = void 0;
|
|
1042
1049
|
}) : e);
|
|
1043
1050
|
}
|
|
1044
1051
|
//#endregion
|
|
1045
|
-
export { ge as A, R as C, w as D,
|
|
1052
|
+
export { ge as A, t as B, R as C, w as D, _e as E, r as F, i as I, o as L, D as M, O as N, C as O, E as P, l as R, L as S, N as T, X as _, tt as a, U as b, qe as c, Be as d, Re as f, ze as g, Ie as h, Qe as i, ve as j, T as k, Ke as l, Le as m, rt as n, et as o, K as p, nt as r, Je as s, it as t, Ge as u, Fe as v, P as w, H as x, Y as y, a as z };
|
|
1046
1053
|
|
|
1047
|
-
//# sourceMappingURL=core-
|
|
1054
|
+
//# sourceMappingURL=core-BRSu5hVw.js.map
|