@manyducks.co/dolla 2.0.0-alpha.7 → 2.0.0-alpha.8
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/index.js +57 -57
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/jsx-runtime.js +2 -2
- package/dist/nodes/html.d.ts +1 -1
- package/dist/{passthrough-BVaqqjam.js → passthrough-9kwwjgWk.js} +103 -90
- package/dist/passthrough-9kwwjgWk.js.map +1 -0
- package/notes/scratch.md +37 -0
- package/package.json +1 -1
- package/dist/passthrough-BVaqqjam.js.map +0 -1
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as s } from "./passthrough-
|
|
2
|
-
import { P as m } from "./passthrough-
|
|
1
|
+
import { r as s } from "./passthrough-9kwwjgWk.js";
|
|
2
|
+
import { P as m } from "./passthrough-9kwwjgWk.js";
|
|
3
3
|
function d(n, r, t, e, a, l) {
|
|
4
4
|
const i = { ...o(["children", "key"], r) }, c = Array.isArray(r.children) ? r.children : [r.children];
|
|
5
5
|
return s(n, i, ...c);
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as t } from "./passthrough-
|
|
2
|
-
import { P as l } from "./passthrough-
|
|
1
|
+
import { r as t } from "./passthrough-9kwwjgWk.js";
|
|
2
|
+
import { P as l } from "./passthrough-9kwwjgWk.js";
|
|
3
3
|
function d(n, e, r) {
|
|
4
4
|
return t(n, e ? { ...u(["children", "key"], e) } : void 0, e.children);
|
|
5
5
|
}
|
package/dist/nodes/html.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ElementContext, type Markup, type MarkupNode, type Ref } from "../markup.js";
|
|
2
2
|
import { type StopFunction } from "../state.js";
|
|
3
3
|
type HTMLOptions = {
|
|
4
4
|
elementContext: ElementContext;
|
|
@@ -10,16 +10,16 @@ function ae() {
|
|
|
10
10
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
11
11
|
var n = /* @__PURE__ */ function() {
|
|
12
12
|
function u(l, d) {
|
|
13
|
-
var h = [], b = !0, C = !1,
|
|
13
|
+
var h = [], b = !0, C = !1, v = void 0;
|
|
14
14
|
try {
|
|
15
|
-
for (var $,
|
|
15
|
+
for (var $, k = l[Symbol.iterator](); !(b = ($ = k.next()).done) && (h.push($.value), !(d && h.length === d)); b = !0) ;
|
|
16
16
|
} catch (g) {
|
|
17
|
-
C = !0,
|
|
17
|
+
C = !0, v = g;
|
|
18
18
|
} finally {
|
|
19
19
|
try {
|
|
20
|
-
!b &&
|
|
20
|
+
!b && k.return && k.return();
|
|
21
21
|
} finally {
|
|
22
|
-
if (C) throw
|
|
22
|
+
if (C) throw v;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
return h;
|
|
@@ -37,20 +37,20 @@ function ae() {
|
|
|
37
37
|
var h = 0.5 > d ? d * (1 + l) : d + l - d * l, b = 2 * d - h, C = function(g, m, a) {
|
|
38
38
|
var p = Math.round, y = 0 > a ? a + 1 : 1 < a ? a - 1 : a;
|
|
39
39
|
return y = y < 1 / 6 ? g + 6 * (m - g) * y : y < 1 / 2 ? m : y < 2 / 3 ? g + 6 * (m - g) * (2 / 3 - y) : g, p(255 * y);
|
|
40
|
-
},
|
|
41
|
-
return [
|
|
40
|
+
}, v = C(b, h, u + 1 / 3), $ = C(b, h, u), k = C(b, h, u - 1 / 3);
|
|
41
|
+
return [v, $, k];
|
|
42
42
|
}, i = function(u, l, d, h) {
|
|
43
43
|
var b = u % 1007 / 1007, C = function(g, m, a) {
|
|
44
44
|
return g * (a - m) + m;
|
|
45
|
-
},
|
|
46
|
-
return [
|
|
45
|
+
}, v = C(b, l.min, l.max), $ = C(b, d.min, d.max), k = C(b, h.max, h.min);
|
|
46
|
+
return [v, $, k];
|
|
47
47
|
}, s = function(u) {
|
|
48
48
|
return u.split("").reduce(function(l, d, h) {
|
|
49
49
|
return l * d.charCodeAt(0) * h + 1;
|
|
50
50
|
}, 1);
|
|
51
51
|
}, c = function(u) {
|
|
52
|
-
var l = u.str, d = u.hue, h = d === void 0 ? { min: 0, max: 360 } : d, b = u.sat, C = b === void 0 ? { min: 0.35, max: 0.65 } : b,
|
|
53
|
-
return a === "hsl" ? [N,
|
|
52
|
+
var l = u.str, d = u.hue, h = d === void 0 ? { min: 0, max: 360 } : d, b = u.sat, C = b === void 0 ? { min: 0.35, max: 0.65 } : b, v = u.light, $ = v === void 0 ? { min: 0.3, max: 0.7 } : v, k = u.hashFunction, g = k === void 0 ? s : k, m = u.scheme, a = m === void 0 ? "hex" : m, p = i(g(l), h, C, $), y = n(p, 3), N = y[0], E = y[1], W = y[2], H = r(N / 360, E, W), ie = o(H);
|
|
53
|
+
return a === "hsl" ? [N, E, W] : a === "rgb" ? H : ie;
|
|
54
54
|
};
|
|
55
55
|
e.default = c, t.exports = e.default;
|
|
56
56
|
}(U, U.exports)), U.exports;
|
|
@@ -69,35 +69,35 @@ function _(t) {
|
|
|
69
69
|
case "function":
|
|
70
70
|
return J(t) ? "class" : e;
|
|
71
71
|
case "object":
|
|
72
|
-
return
|
|
72
|
+
return P(t) ? "array" : he(t) ? "promise" : e;
|
|
73
73
|
default:
|
|
74
74
|
return e;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function P(t) {
|
|
78
78
|
return Array.isArray(t);
|
|
79
79
|
}
|
|
80
80
|
function Y(...t) {
|
|
81
|
-
const e = t[0], n = (o) =>
|
|
81
|
+
const e = t[0], n = (o) => P(o) && o.every((r) => e(r));
|
|
82
82
|
return t.length < 2 ? n : n(t[1]);
|
|
83
83
|
}
|
|
84
84
|
function Fe(...t) {
|
|
85
|
-
const e = t[0], n =
|
|
86
|
-
if (
|
|
85
|
+
const e = t[0], n = O(t[2]) ? t[2] : "Expected an array of valid items. Got type: %t, value: %v", o = (r) => {
|
|
86
|
+
if (P(r) && r.every((i) => e(i)))
|
|
87
87
|
return !0;
|
|
88
|
-
throw new TypeError(
|
|
88
|
+
throw new TypeError(B(r, n));
|
|
89
89
|
};
|
|
90
90
|
return t.length < 2 ? o : o(t[1]);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function O(t) {
|
|
93
93
|
return typeof t == "string";
|
|
94
94
|
}
|
|
95
95
|
function Pe(t, e) {
|
|
96
|
-
if (
|
|
96
|
+
if (O(t))
|
|
97
97
|
return !0;
|
|
98
|
-
throw new TypeError(
|
|
98
|
+
throw new TypeError(B(t, e ?? "Expected a string. Got type: %t, value: %v"));
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function A(t) {
|
|
101
101
|
return typeof t == "function" && !J(t);
|
|
102
102
|
}
|
|
103
103
|
function fe(t) {
|
|
@@ -106,23 +106,23 @@ function fe(t) {
|
|
|
106
106
|
function he(t) {
|
|
107
107
|
if (t == null) return !1;
|
|
108
108
|
const e = t;
|
|
109
|
-
return e instanceof Promise ||
|
|
109
|
+
return e instanceof Promise || A(e.then) && A(e.catch) && A(e.finally);
|
|
110
110
|
}
|
|
111
111
|
function J(t) {
|
|
112
112
|
return typeof t == "function" && /^\s*class\s+/.test(t.toString());
|
|
113
113
|
}
|
|
114
114
|
function je(...t) {
|
|
115
|
-
const e = t[0], n =
|
|
115
|
+
const e = t[0], n = O(t[2]) ? t[2] : `Expected instance of ${e.name}. Got type: %t, value: %v`, o = (r) => {
|
|
116
116
|
if (r instanceof e)
|
|
117
117
|
return !0;
|
|
118
|
-
throw new TypeError(
|
|
118
|
+
throw new TypeError(B(r, n));
|
|
119
119
|
};
|
|
120
120
|
return t.length < 2 ? o : o(t[1]);
|
|
121
121
|
}
|
|
122
122
|
function L(t) {
|
|
123
|
-
return t != null && typeof t == "object" && !
|
|
123
|
+
return t != null && typeof t == "object" && !P(t);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function B(t, e) {
|
|
126
126
|
var r;
|
|
127
127
|
const n = _(t), o = ((r = t == null ? void 0 : t.toString) == null ? void 0 : r.call(t)) || String(t);
|
|
128
128
|
return e.replaceAll("%t", n).replaceAll("%v", o);
|
|
@@ -203,14 +203,14 @@ function Le(t) {
|
|
|
203
203
|
function w(t) {
|
|
204
204
|
return !(t == null || typeof t != "object" || typeof t.get != "function" || typeof t.watch != "function");
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function R(t) {
|
|
207
207
|
return !(t == null || typeof t != "object" || typeof t.set != "function" || typeof t.get != "function" || typeof t.watch != "function");
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function T(t) {
|
|
210
210
|
return w(t) ? t.get() : t;
|
|
211
211
|
}
|
|
212
212
|
function q(t) {
|
|
213
|
-
return
|
|
213
|
+
return R(t) ? {
|
|
214
214
|
get: t.get,
|
|
215
215
|
watch: t.watch
|
|
216
216
|
} : w(t) ? t : {
|
|
@@ -223,7 +223,7 @@ function q(t) {
|
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
function qe(t, e) {
|
|
226
|
-
const [n, o] =
|
|
226
|
+
const [n, o] = V(t, e);
|
|
227
227
|
return {
|
|
228
228
|
get: n.get,
|
|
229
229
|
watch: n.watch,
|
|
@@ -244,18 +244,22 @@ function _e(t, e) {
|
|
|
244
244
|
typeof o == "function" ? i = o(r) : i = o, e(i, r);
|
|
245
245
|
};
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function V(t, e) {
|
|
248
248
|
let n = t, o = [];
|
|
249
249
|
function r() {
|
|
250
250
|
for (const u of o)
|
|
251
|
-
|
|
251
|
+
try {
|
|
252
|
+
u(n);
|
|
253
|
+
} catch (l) {
|
|
254
|
+
console.warn("error in state watcher", u), console.error(l);
|
|
255
|
+
}
|
|
252
256
|
}
|
|
253
257
|
function i(u, l) {
|
|
254
258
|
return e != null && e.equality ? e.equality(u, l) : I(u, l);
|
|
255
259
|
}
|
|
256
260
|
const s = {
|
|
257
261
|
get() {
|
|
258
|
-
return
|
|
262
|
+
return T(n);
|
|
259
263
|
},
|
|
260
264
|
watch(u, l) {
|
|
261
265
|
return o.push(u), l != null && l.lazy || u(s.get()), function() {
|
|
@@ -284,16 +288,16 @@ function ge(t, e, n) {
|
|
|
284
288
|
const m = t.map((a) => a.get());
|
|
285
289
|
for (let a = 0; a < t.length; a++)
|
|
286
290
|
if (!h(m[a], o[a])) {
|
|
287
|
-
|
|
291
|
+
v(e(...m)), o = m;
|
|
288
292
|
break;
|
|
289
293
|
}
|
|
290
294
|
}
|
|
291
295
|
function C() {
|
|
292
|
-
return s || b(), l =
|
|
296
|
+
return s || b(), l = T(r), l;
|
|
293
297
|
}
|
|
294
|
-
function
|
|
295
|
-
m !== r && (u && (u(), u = void 0), r = m, l =
|
|
296
|
-
const p =
|
|
298
|
+
function v(m) {
|
|
299
|
+
m !== r && (u && (u(), u = void 0), r = m, l = T(m), w(m) && s && (u = m.watch((a) => {
|
|
300
|
+
const p = T(a);
|
|
297
301
|
h(p, l) || (l = p, d(p));
|
|
298
302
|
})));
|
|
299
303
|
}
|
|
@@ -304,18 +308,26 @@ function ge(t, e, n) {
|
|
|
304
308
|
c.push(
|
|
305
309
|
p.watch((y) => {
|
|
306
310
|
const N = o[a];
|
|
307
|
-
o[a] = y, s && !h(y, N)
|
|
311
|
+
if (o[a] = y, s && !h(y, N)) {
|
|
312
|
+
try {
|
|
313
|
+
let E = e(...o);
|
|
314
|
+
v(E);
|
|
315
|
+
} catch (E) {
|
|
316
|
+
console.warn("error when updating source values", o, e.toString()), console.error(E);
|
|
317
|
+
}
|
|
318
|
+
d(T(r));
|
|
319
|
+
}
|
|
308
320
|
})
|
|
309
321
|
);
|
|
310
322
|
}
|
|
311
323
|
s = !0;
|
|
312
324
|
for (let a = 0; a < t.length; a++)
|
|
313
325
|
if (!h(o[a], m[a])) {
|
|
314
|
-
|
|
326
|
+
v(e(...o)), d(T(r));
|
|
315
327
|
break;
|
|
316
328
|
}
|
|
317
329
|
}
|
|
318
|
-
function
|
|
330
|
+
function k() {
|
|
319
331
|
for (const m of c)
|
|
320
332
|
m();
|
|
321
333
|
c = [], u && (u(), u = void 0), s = !1;
|
|
@@ -326,7 +338,7 @@ function ge(t, e, n) {
|
|
|
326
338
|
},
|
|
327
339
|
watch(m, a) {
|
|
328
340
|
return s || $(), i.push(m), a != null && a.lazy || m(C()), function() {
|
|
329
|
-
i.splice(i.indexOf(m), 1), s && i.length === 0 &&
|
|
341
|
+
i.splice(i.indexOf(m), 1), s && i.length === 0 && k();
|
|
330
342
|
};
|
|
331
343
|
}
|
|
332
344
|
};
|
|
@@ -396,8 +408,8 @@ let Q = (t = 21) => {
|
|
|
396
408
|
e += we[n[t] & 63];
|
|
397
409
|
return e;
|
|
398
410
|
};
|
|
399
|
-
const
|
|
400
|
-
class
|
|
411
|
+
const ve = (t) => /^on[A-Z]/.test(t);
|
|
412
|
+
class ke {
|
|
401
413
|
constructor({ tag: e, props: n, children: o, elementContext: r }) {
|
|
402
414
|
f(this, "node");
|
|
403
415
|
f(this, "props");
|
|
@@ -488,12 +500,12 @@ class ve {
|
|
|
488
500
|
window.removeEventListener("click", s, c);
|
|
489
501
|
});
|
|
490
502
|
} else if (r === "$$value") {
|
|
491
|
-
if (!
|
|
503
|
+
if (!R(i))
|
|
492
504
|
throw new TypeError(`$$value attribute must be a settable state. Got: ${i}`);
|
|
493
505
|
o(
|
|
494
506
|
i,
|
|
495
507
|
(c) => {
|
|
496
|
-
e.value = String(c);
|
|
508
|
+
c == null ? e.value = "" : e.value = String(c);
|
|
497
509
|
},
|
|
498
510
|
this.getUpdateKey("attr", "value")
|
|
499
511
|
);
|
|
@@ -504,7 +516,7 @@ class ve {
|
|
|
504
516
|
e.addEventListener("input", s), this.stopCallbacks.push(() => {
|
|
505
517
|
e.removeEventListener("input", s);
|
|
506
518
|
});
|
|
507
|
-
} else if (
|
|
519
|
+
} else if (ve(r)) {
|
|
508
520
|
const s = r.slice(2).toLowerCase(), c = w(i) ? (u) => i.get()(u) : i;
|
|
509
521
|
e.addEventListener(s, c), this.stopCallbacks.push(() => {
|
|
510
522
|
e.removeEventListener(s, c);
|
|
@@ -560,6 +572,7 @@ class ve {
|
|
|
560
572
|
case "exportParts":
|
|
561
573
|
case "part":
|
|
562
574
|
case "translate":
|
|
575
|
+
case "type":
|
|
563
576
|
case "title": {
|
|
564
577
|
const s = r.toLowerCase();
|
|
565
578
|
o(
|
|
@@ -601,7 +614,7 @@ class ve {
|
|
|
601
614
|
const s = n.watch((c) => {
|
|
602
615
|
this.elementContext.root.render.update(
|
|
603
616
|
() => {
|
|
604
|
-
|
|
617
|
+
A(i) && i(), e.style.cssText = "", i = this.applyStyles(e, c, o);
|
|
605
618
|
},
|
|
606
619
|
this.getUpdateKey("styles", "*")
|
|
607
620
|
);
|
|
@@ -633,7 +646,7 @@ class ve {
|
|
|
633
646
|
const s = n.watch((c) => {
|
|
634
647
|
this.elementContext.root.render.update(
|
|
635
648
|
() => {
|
|
636
|
-
|
|
649
|
+
A(i) && i(), e.removeAttribute("class"), i = this.applyClasses(e, c, o);
|
|
637
650
|
},
|
|
638
651
|
this.getUpdateKey("attr", "class")
|
|
639
652
|
);
|
|
@@ -661,18 +674,18 @@ class ve {
|
|
|
661
674
|
}
|
|
662
675
|
function X(t) {
|
|
663
676
|
let e = {};
|
|
664
|
-
if (
|
|
677
|
+
if (O(t)) {
|
|
665
678
|
const n = t.split(" ");
|
|
666
679
|
for (const o of n)
|
|
667
680
|
e[o] = !0;
|
|
668
|
-
} else L(t) ? Object.assign(e, t) : Array.isArray(t) && Array.from(t).filter(
|
|
681
|
+
} else L(t) ? Object.assign(e, t) : Array.isArray(t) && Array.from(t).filter(Boolean).forEach((n) => {
|
|
669
682
|
Object.assign(e, X(n));
|
|
670
683
|
});
|
|
671
|
-
return e;
|
|
684
|
+
return delete e.undefined, e;
|
|
672
685
|
}
|
|
673
686
|
function ee(t) {
|
|
674
687
|
let e = {};
|
|
675
|
-
if (
|
|
688
|
+
if (O(t)) {
|
|
676
689
|
const n = t.split(";").filter((o) => o.trim() !== "");
|
|
677
690
|
for (const o of n) {
|
|
678
691
|
const [r, i] = o.split(":"), s = {
|
|
@@ -742,7 +755,7 @@ class xe {
|
|
|
742
755
|
var o, r;
|
|
743
756
|
if (this.cleanup(), e == null || !this.isMounted)
|
|
744
757
|
return;
|
|
745
|
-
const n = e.map((i) => te(i) ? i :
|
|
758
|
+
const n = e.map((i) => te(i) ? i : F(i) ? M(S(this.elementContext, i)) : M(S(this.elementContext, j(i))));
|
|
746
759
|
for (const i of n) {
|
|
747
760
|
const s = ((o = this.connectedViews.at(-1)) == null ? void 0 : o.node) || this.node;
|
|
748
761
|
i.mount(this.node.parentNode, s), this.connectedViews.push(i);
|
|
@@ -805,7 +818,7 @@ class Ee {
|
|
|
805
818
|
}
|
|
806
819
|
mount(e, n) {
|
|
807
820
|
const { content: o, parent: r } = this.config;
|
|
808
|
-
te(o) ? this.handle = o :
|
|
821
|
+
te(o) ? this.handle = o : F(o) ? this.handle = M(S(this.config.elementContext, o)) : this.handle = M(S(this.config.elementContext, j(o))), this.handle.mount(r);
|
|
809
822
|
}
|
|
810
823
|
unmount() {
|
|
811
824
|
var e;
|
|
@@ -814,9 +827,9 @@ class Ee {
|
|
|
814
827
|
}
|
|
815
828
|
function K(t, e, n, o = []) {
|
|
816
829
|
t = { ...t, data: {}, parent: t };
|
|
817
|
-
const [r, i] =
|
|
830
|
+
const [r, i] = V(S(t, o));
|
|
818
831
|
let s = !1;
|
|
819
|
-
const c = [], u = [], l = [], d = [], h = [], b = Q(), [C,
|
|
832
|
+
const c = [], u = [], l = [], d = [], h = [], b = Q(), [C, v] = V(e.name), $ = t.root.createLogger(C, { uid: b }), k = {
|
|
820
833
|
get uid() {
|
|
821
834
|
return b;
|
|
822
835
|
},
|
|
@@ -846,7 +859,7 @@ function K(t, e, n, o = []) {
|
|
|
846
859
|
return y;
|
|
847
860
|
},
|
|
848
861
|
setName(a) {
|
|
849
|
-
|
|
862
|
+
v(a);
|
|
850
863
|
},
|
|
851
864
|
beforeMount(a) {
|
|
852
865
|
u.push(a);
|
|
@@ -868,8 +881,8 @@ function K(t, e, n, o = []) {
|
|
|
868
881
|
let y, N = !1;
|
|
869
882
|
return l.push(() => {
|
|
870
883
|
N || (y = G(a, p), c.push(y));
|
|
871
|
-
}), function
|
|
872
|
-
|
|
884
|
+
}), function E() {
|
|
885
|
+
E != null && (N = !0, E());
|
|
873
886
|
};
|
|
874
887
|
}
|
|
875
888
|
},
|
|
@@ -877,23 +890,23 @@ function K(t, e, n, o = []) {
|
|
|
877
890
|
return x("$outlet", { $children: r });
|
|
878
891
|
}
|
|
879
892
|
};
|
|
880
|
-
Object.assign(
|
|
893
|
+
Object.assign(k, $);
|
|
881
894
|
let g;
|
|
882
895
|
function m() {
|
|
883
896
|
let a;
|
|
884
897
|
try {
|
|
885
|
-
a = e(n,
|
|
898
|
+
a = e(n, k);
|
|
886
899
|
} catch (p) {
|
|
887
900
|
throw p instanceof Error && $.crash(p), p;
|
|
888
901
|
}
|
|
889
902
|
if (a instanceof Promise)
|
|
890
903
|
throw new TypeError("View function cannot return a Promise.");
|
|
891
904
|
if (a !== null) if (a instanceof Node)
|
|
892
|
-
g =
|
|
893
|
-
else if (
|
|
894
|
-
g =
|
|
905
|
+
g = M(S(t, x("$node", { value: a })));
|
|
906
|
+
else if (F(a) || Y(F, a))
|
|
907
|
+
g = M(S(t, a));
|
|
895
908
|
else if (w(a))
|
|
896
|
-
g =
|
|
909
|
+
g = M(
|
|
897
910
|
S(t, x("$observer", { states: [a], renderFn: (p) => p }))
|
|
898
911
|
);
|
|
899
912
|
else {
|
|
@@ -983,7 +996,7 @@ class Ae {
|
|
|
983
996
|
if (l)
|
|
984
997
|
l.setValue(u.value), l.setIndex(u.index), r[u.index] = l;
|
|
985
998
|
else {
|
|
986
|
-
const [d, h] =
|
|
999
|
+
const [d, h] = V(u.value), [b, C] = V(u.index);
|
|
987
1000
|
r[u.index] = {
|
|
988
1001
|
key: u.key,
|
|
989
1002
|
$value: d,
|
|
@@ -1034,21 +1047,21 @@ class Oe {
|
|
|
1034
1047
|
e != null ? this.node.textContent = e.toString() : this.node.textContent = "";
|
|
1035
1048
|
}
|
|
1036
1049
|
}
|
|
1037
|
-
function
|
|
1050
|
+
function F(t) {
|
|
1038
1051
|
return L(t) && (typeof t.type == "string" || typeof t.type == "function") && Array.isArray(t.children);
|
|
1039
1052
|
}
|
|
1040
1053
|
function te(t) {
|
|
1041
|
-
return L(t) &&
|
|
1054
|
+
return L(t) && A(t.connect) && A(t.disconnect);
|
|
1042
1055
|
}
|
|
1043
1056
|
function j(t) {
|
|
1044
|
-
return
|
|
1057
|
+
return P(t) || (t = [t]), t.flat(1 / 0).filter((e) => e != null && e !== !1).map((e) => {
|
|
1045
1058
|
if (e instanceof Node)
|
|
1046
1059
|
return x("$node", { value: e });
|
|
1047
1060
|
if (e instanceof oe)
|
|
1048
1061
|
return x("$node", { value: e.node });
|
|
1049
|
-
if (
|
|
1062
|
+
if (F(e))
|
|
1050
1063
|
return e;
|
|
1051
|
-
if (
|
|
1064
|
+
if (O(e) || fe(e))
|
|
1052
1065
|
return x("$text", { value: e });
|
|
1053
1066
|
if (w(e))
|
|
1054
1067
|
return x("$observer", {
|
|
@@ -1070,13 +1083,13 @@ function Te(t) {
|
|
|
1070
1083
|
throw console.warn(t.ref), new TypeError(`Prop 'ref' must be a Ref object. Got: ${t.ref}`);
|
|
1071
1084
|
for (const e in t)
|
|
1072
1085
|
if (e.startsWith("$$") && t[e] !== void 0) {
|
|
1073
|
-
if (!
|
|
1086
|
+
if (!R(t[e]))
|
|
1074
1087
|
throw new TypeError(`Prop '${e}' is named as a SettableState but value is not. Got: ${t[e]}`);
|
|
1075
1088
|
} else if (e.startsWith("$") && t[e] !== void 0 && !w(t[e]))
|
|
1076
1089
|
throw new TypeError(`Prop '${e}' is named as a State but value is not. Got: ${t[e]}`);
|
|
1077
1090
|
}
|
|
1078
|
-
const
|
|
1079
|
-
function
|
|
1091
|
+
const Be = be.bind(x);
|
|
1092
|
+
function Re(t, e, n) {
|
|
1080
1093
|
const o = q(t);
|
|
1081
1094
|
return x("$cond", {
|
|
1082
1095
|
$predicate: o,
|
|
@@ -1092,7 +1105,7 @@ function We(t, e) {
|
|
|
1092
1105
|
return x("$portal", { parent: t, content: e });
|
|
1093
1106
|
}
|
|
1094
1107
|
function He() {
|
|
1095
|
-
const [t, e] =
|
|
1108
|
+
const [t, e] = V();
|
|
1096
1109
|
return {
|
|
1097
1110
|
get: t.get,
|
|
1098
1111
|
watch: t.watch,
|
|
@@ -1123,10 +1136,10 @@ class oe {
|
|
|
1123
1136
|
}
|
|
1124
1137
|
}
|
|
1125
1138
|
function S(t, e) {
|
|
1126
|
-
return (
|
|
1127
|
-
if (
|
|
1139
|
+
return (P(e) ? e : [e]).map((o) => {
|
|
1140
|
+
if (A(o.type))
|
|
1128
1141
|
return K(t, o.type, o.props, o.children);
|
|
1129
|
-
if (
|
|
1142
|
+
if (O(o.type))
|
|
1130
1143
|
switch (o.type) {
|
|
1131
1144
|
case "$node": {
|
|
1132
1145
|
const r = o.props;
|
|
@@ -1182,7 +1195,7 @@ function S(t, e) {
|
|
|
1182
1195
|
default:
|
|
1183
1196
|
if (o.type.startsWith("$"))
|
|
1184
1197
|
throw new Error(`Unknown markup type: ${o.type}`);
|
|
1185
|
-
return new
|
|
1198
|
+
return new ke({
|
|
1186
1199
|
tag: o.type,
|
|
1187
1200
|
props: o.props ?? {},
|
|
1188
1201
|
children: o.children,
|
|
@@ -1193,7 +1206,7 @@ function S(t, e) {
|
|
|
1193
1206
|
throw new TypeError(`Expected a string or view function. Got: ${o.type}`);
|
|
1194
1207
|
});
|
|
1195
1208
|
}
|
|
1196
|
-
function
|
|
1209
|
+
function M(t) {
|
|
1197
1210
|
if (t.length === 1)
|
|
1198
1211
|
return t[0];
|
|
1199
1212
|
const e = document.createComment("Fragment");
|
|
@@ -1225,7 +1238,7 @@ function A(t) {
|
|
|
1225
1238
|
};
|
|
1226
1239
|
}
|
|
1227
1240
|
function re(t) {
|
|
1228
|
-
return t == null || t === !1 || typeof t == "string" || typeof t == "number" ||
|
|
1241
|
+
return t == null || t === !1 || typeof t == "string" || typeof t == "number" || F(t) || w(t) || Y(re, t);
|
|
1229
1242
|
}
|
|
1230
1243
|
function ze(t, e) {
|
|
1231
1244
|
return e.outlet();
|
|
@@ -1238,12 +1251,12 @@ export {
|
|
|
1238
1251
|
ze as P,
|
|
1239
1252
|
w as a,
|
|
1240
1253
|
I as b,
|
|
1241
|
-
|
|
1254
|
+
Re as c,
|
|
1242
1255
|
ge as d,
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1256
|
+
A as e,
|
|
1257
|
+
O as f,
|
|
1258
|
+
V as g,
|
|
1259
|
+
Be as h,
|
|
1247
1260
|
L as i,
|
|
1248
1261
|
Pe as j,
|
|
1249
1262
|
Fe as k,
|
|
@@ -1257,10 +1270,10 @@ export {
|
|
|
1257
1270
|
Ue as s,
|
|
1258
1271
|
q as t,
|
|
1259
1272
|
pe as u,
|
|
1260
|
-
|
|
1273
|
+
T as v,
|
|
1261
1274
|
G as w,
|
|
1262
1275
|
Ie as x,
|
|
1263
1276
|
K as y,
|
|
1264
|
-
|
|
1277
|
+
M as z
|
|
1265
1278
|
};
|
|
1266
|
-
//# sourceMappingURL=passthrough-
|
|
1279
|
+
//# sourceMappingURL=passthrough-9kwwjgWk.js.map
|