@manyducks.co/dolla 2.0.0-alpha.29 → 2.0.0-alpha.30
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/context.d.ts +6 -0
- package/dist/core/nodes/view.d.ts +2 -1
- package/dist/core/store.d.ts +2 -1
- package/dist/index.js +415 -398
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/jsx-runtime.js +2 -2
- package/dist/{passthrough-eH8w4zJi.js → passthrough-d2lcM0cd.js} +248 -196
- package/dist/passthrough-d2lcM0cd.js.map +1 -0
- package/package.json +1 -1
- package/dist/passthrough-eH8w4zJi.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
1
|
+
var jt = Object.defineProperty;
|
|
2
2
|
var ot = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var o = (r, t, e) =>
|
|
7
|
-
var O = (r, t, e) => (ut(r, t, "read from private field"), e ? e.call(r) : t.get(r)),
|
|
5
|
+
var Ut = (r, t, e) => t in r ? jt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
6
|
+
var o = (r, t, e) => Ut(r, typeof t != "symbol" ? t + "" : t, e), ut = (r, t, e) => t.has(r) || ot("Cannot " + e);
|
|
7
|
+
var O = (r, t, e) => (ut(r, t, "read from private field"), e ? e.call(r) : t.get(r)), W = (r, t, e) => t.has(r) ? ot("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), F = (r, t, e, n) => (ut(r, t, "write to private field"), n ? n.call(r, e) : t.set(r, e), e);
|
|
8
8
|
function Mt(r) {
|
|
9
9
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var P = { exports: {} }, ct;
|
|
12
12
|
function Rt() {
|
|
13
|
-
return
|
|
13
|
+
return ct || (ct = 1, function(r, t) {
|
|
14
14
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
15
15
|
var e = /* @__PURE__ */ function() {
|
|
16
|
-
function h(
|
|
16
|
+
function h(a, f) {
|
|
17
17
|
var l = [], d = !0, p = !1, _ = void 0;
|
|
18
18
|
try {
|
|
19
|
-
for (var x, y =
|
|
20
|
-
} catch (
|
|
21
|
-
p = !0, _ =
|
|
19
|
+
for (var x, y = a[Symbol.iterator](); !(d = (x = y.next()).done) && (l.push(x.value), !(f && l.length === f)); d = !0) ;
|
|
20
|
+
} catch (w) {
|
|
21
|
+
p = !0, _ = w;
|
|
22
22
|
} finally {
|
|
23
23
|
try {
|
|
24
24
|
!d && y.return && y.return();
|
|
@@ -28,40 +28,40 @@ function Rt() {
|
|
|
28
28
|
}
|
|
29
29
|
return l;
|
|
30
30
|
}
|
|
31
|
-
return function(
|
|
32
|
-
if (Array.isArray(
|
|
33
|
-
if (Symbol.iterator in Object(
|
|
31
|
+
return function(a, f) {
|
|
32
|
+
if (Array.isArray(a)) return a;
|
|
33
|
+
if (Symbol.iterator in Object(a)) return h(a, f);
|
|
34
34
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
35
35
|
};
|
|
36
36
|
}(), n = function(h) {
|
|
37
|
-
return h.reduce(function(
|
|
38
|
-
return 16 > f ?
|
|
37
|
+
return h.reduce(function(a, f) {
|
|
38
|
+
return 16 > f ? a + "0" + f.toString(16) : a + f.toString(16);
|
|
39
39
|
}, "#");
|
|
40
|
-
}, s = function(h,
|
|
41
|
-
var l = 0.5 > f ? f * (1 +
|
|
42
|
-
var z = Math.round,
|
|
43
|
-
return
|
|
40
|
+
}, s = function(h, a, f) {
|
|
41
|
+
var l = 0.5 > f ? f * (1 + a) : f + a - f * a, d = 2 * f - l, p = function(w, C, S) {
|
|
42
|
+
var z = Math.round, g = 0 > S ? S + 1 : 1 < S ? S - 1 : S;
|
|
43
|
+
return g = g < 1 / 6 ? w + 6 * (C - w) * g : g < 1 / 2 ? C : g < 2 / 3 ? w + 6 * (C - w) * (2 / 3 - g) : w, z(255 * g);
|
|
44
44
|
}, _ = p(d, l, h + 1 / 3), x = p(d, l, h), y = p(d, l, h - 1 / 3);
|
|
45
45
|
return [_, x, y];
|
|
46
|
-
}, i = function(h,
|
|
47
|
-
var d = h % 1007 / 1007, p = function(
|
|
48
|
-
return
|
|
49
|
-
}, _ = p(d,
|
|
46
|
+
}, i = function(h, a, f, l) {
|
|
47
|
+
var d = h % 1007 / 1007, p = function(w, C, S) {
|
|
48
|
+
return w * (S - C) + C;
|
|
49
|
+
}, _ = p(d, a.min, a.max), x = p(d, f.min, f.max), y = p(d, l.max, l.min);
|
|
50
50
|
return [_, x, y];
|
|
51
51
|
}, u = function(h) {
|
|
52
|
-
return h.split("").reduce(function(
|
|
53
|
-
return
|
|
52
|
+
return h.split("").reduce(function(a, f, l) {
|
|
53
|
+
return a * f.charCodeAt(0) * l + 1;
|
|
54
54
|
}, 1);
|
|
55
|
-
},
|
|
56
|
-
var
|
|
57
|
-
return S === "hsl" ? [nt, rt, st] : S === "rgb" ? it :
|
|
55
|
+
}, c = function(h) {
|
|
56
|
+
var a = h.str, f = h.hue, l = f === void 0 ? { min: 0, max: 360 } : f, d = h.sat, p = d === void 0 ? { min: 0.35, max: 0.65 } : d, _ = h.light, x = _ === void 0 ? { min: 0.3, max: 0.7 } : _, y = h.hashFunction, w = y === void 0 ? u : y, C = h.scheme, S = C === void 0 ? "hex" : C, z = i(w(a), l, p, x), g = e(z, 3), nt = g[0], rt = g[1], st = g[2], it = s(nt / 360, rt, st), qt = n(it);
|
|
57
|
+
return S === "hsl" ? [nt, rt, st] : S === "rgb" ? it : qt;
|
|
58
58
|
};
|
|
59
|
-
t.default =
|
|
60
|
-
}(
|
|
59
|
+
t.default = c, r.exports = t.default;
|
|
60
|
+
}(P, P.exports)), P.exports;
|
|
61
61
|
}
|
|
62
62
|
var Dt = Rt();
|
|
63
63
|
const zt = /* @__PURE__ */ Mt(Dt);
|
|
64
|
-
function
|
|
64
|
+
function V(r) {
|
|
65
65
|
const t = typeof r;
|
|
66
66
|
switch (t) {
|
|
67
67
|
case "undefined":
|
|
@@ -105,7 +105,7 @@ function ke(r, t) {
|
|
|
105
105
|
return !0;
|
|
106
106
|
throw new TypeError(R(r, t ?? "Expected a string. Got type: %t, value: %v"));
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function I(r) {
|
|
109
109
|
return typeof r == "function" && !Kt(r);
|
|
110
110
|
}
|
|
111
111
|
function Gt(r) {
|
|
@@ -127,12 +127,12 @@ function bt(r) {
|
|
|
127
127
|
}
|
|
128
128
|
function R(r, t) {
|
|
129
129
|
var s;
|
|
130
|
-
const e =
|
|
130
|
+
const e = V(r), n = ((s = r == null ? void 0 : r.toString) == null ? void 0 : s.call(r)) || String(r);
|
|
131
131
|
return t.replaceAll("%t", e).replaceAll("%v", n);
|
|
132
132
|
}
|
|
133
|
-
var G,
|
|
133
|
+
var G, at;
|
|
134
134
|
function Bt() {
|
|
135
|
-
return
|
|
135
|
+
return at || (at = 1, G = function r(t, e) {
|
|
136
136
|
if (t === e) return !0;
|
|
137
137
|
if (t && e && typeof t == "object" && typeof e == "object") {
|
|
138
138
|
if (t.constructor !== e.constructor) return !1;
|
|
@@ -190,8 +190,8 @@ function Et(r, t) {
|
|
|
190
190
|
}
|
|
191
191
|
function Ee(r, t) {
|
|
192
192
|
if (Object.is(r, t)) return !0;
|
|
193
|
-
const e =
|
|
194
|
-
if (e !==
|
|
193
|
+
const e = V(r);
|
|
194
|
+
if (e !== V(t))
|
|
195
195
|
return !1;
|
|
196
196
|
switch (e) {
|
|
197
197
|
case "object":
|
|
@@ -212,7 +212,7 @@ function Ee(r, t) {
|
|
|
212
212
|
if (r[s] !== t[s]) return !1;
|
|
213
213
|
return !0;
|
|
214
214
|
case "set":
|
|
215
|
-
if (
|
|
215
|
+
if (I(r.symmetricDifference))
|
|
216
216
|
return r.symmetricDifference(t).size === 0;
|
|
217
217
|
for (const s of r.keys())
|
|
218
218
|
if (r[s] !== t.get(s)) return !1;
|
|
@@ -237,7 +237,7 @@ function Oe(r) {
|
|
|
237
237
|
light: { min: 0.6, max: 0.6 }
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Ve(r) {
|
|
241
241
|
if (r instanceof RegExp)
|
|
242
242
|
return (n) => r.test(n);
|
|
243
243
|
const t = {
|
|
@@ -260,7 +260,7 @@ function Ne(r) {
|
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
262
|
var Xt = Object.defineProperty, Qt = (r, t, e) => t in r ? Xt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, ht = (r, t, e) => Qt(r, typeof t != "symbol" ? t + "" : t, e);
|
|
263
|
-
class
|
|
263
|
+
class q {
|
|
264
264
|
constructor() {
|
|
265
265
|
ht(this, "_l", /* @__PURE__ */ new Map()), ht(this, "_a", (t) => {
|
|
266
266
|
if (typeof t != "string" && !(t instanceof Symbol))
|
|
@@ -275,8 +275,8 @@ class j {
|
|
|
275
275
|
} catch (i) {
|
|
276
276
|
let u = this._l.get("error");
|
|
277
277
|
if (u != null && u.length)
|
|
278
|
-
for (const
|
|
279
|
-
|
|
278
|
+
for (const c of u)
|
|
279
|
+
c(i, t, s, ...e);
|
|
280
280
|
else throw i;
|
|
281
281
|
}
|
|
282
282
|
return t != "*" && this.emit("*", t, ...e) || n.length > 0;
|
|
@@ -303,25 +303,25 @@ class j {
|
|
|
303
303
|
return [...this._l.entries()].filter(([, t]) => t.length).map(([t]) => t);
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
var
|
|
307
|
-
class
|
|
306
|
+
var $, E;
|
|
307
|
+
class $e {
|
|
308
308
|
constructor(t) {
|
|
309
309
|
// #dolla;
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
310
|
+
W(this, $);
|
|
311
|
+
W(this, E);
|
|
312
|
+
F(this, $, t.createLogger("Dolla.stats")), F(this, E, N());
|
|
313
313
|
let e;
|
|
314
314
|
O(this, E).emitter.on("statsChanged", () => {
|
|
315
315
|
e && clearTimeout(e), e = setTimeout(() => {
|
|
316
|
-
O(this,
|
|
316
|
+
O(this, $).info(O(this, E).stats);
|
|
317
317
|
}, 200);
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
|
|
321
|
+
$ = new WeakMap(), E = new WeakMap();
|
|
322
322
|
const B = Symbol.for("DollaStatsStore");
|
|
323
323
|
function lt() {
|
|
324
|
-
const r = new
|
|
324
|
+
const r = new q(), t = {
|
|
325
325
|
watcherCount: 0,
|
|
326
326
|
viewCount: 0
|
|
327
327
|
};
|
|
@@ -331,24 +331,24 @@ function lt() {
|
|
|
331
331
|
t.watcherCount += e, r.emit("statsChanged");
|
|
332
332
|
}), { emitter: r, stats: t };
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function N() {
|
|
335
335
|
return typeof window < "u" ? (window[B] || (window[B] = lt()), window[B]) : lt();
|
|
336
336
|
}
|
|
337
337
|
function At() {
|
|
338
|
-
|
|
338
|
+
N().emitter.emit("_incrementWatcherCount", 1);
|
|
339
339
|
}
|
|
340
340
|
function Ot() {
|
|
341
|
-
|
|
341
|
+
N().emitter.emit("_incrementWatcherCount", -1);
|
|
342
342
|
}
|
|
343
343
|
function te() {
|
|
344
|
-
|
|
344
|
+
N().emitter.emit("_incrementViewCount", 1);
|
|
345
345
|
}
|
|
346
346
|
function ee() {
|
|
347
|
-
|
|
347
|
+
N().emitter.emit("_incrementViewCount", -1);
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const Vt = Symbol.for("DollaState"), $t = Symbol.for("DollaRef"), Lt = Symbol.for("DollaMarkup"), M = Symbol.for("DollaMarkupElement"), ne = Symbol.for("DollaStore"), Nt = Symbol.for("DollaStoreFactory");
|
|
350
350
|
function m(r) {
|
|
351
|
-
return (r == null ? void 0 : r[
|
|
351
|
+
return (r == null ? void 0 : r[Vt]) === !0;
|
|
352
352
|
}
|
|
353
353
|
function re(r) {
|
|
354
354
|
return m(r) ? r.get() : r;
|
|
@@ -392,7 +392,7 @@ class se {
|
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
var mt;
|
|
395
|
-
mt =
|
|
395
|
+
mt = Vt;
|
|
396
396
|
class X {
|
|
397
397
|
constructor(t) {
|
|
398
398
|
o(this, mt, !0);
|
|
@@ -527,7 +527,7 @@ function D() {
|
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function Le(r) {
|
|
531
531
|
function t() {
|
|
532
532
|
if (arguments.length === 1)
|
|
533
533
|
r = arguments[0];
|
|
@@ -535,32 +535,32 @@ function $e(r) {
|
|
|
535
535
|
throw new Error(`Too many arguments. Expected 0 or 1. Got: ${arguments.length}`);
|
|
536
536
|
return r;
|
|
537
537
|
}
|
|
538
|
-
return t[
|
|
538
|
+
return t[$t] = !0, t;
|
|
539
539
|
}
|
|
540
540
|
function ue(r) {
|
|
541
|
-
return (r == null ? void 0 : r[
|
|
541
|
+
return (r == null ? void 0 : r[$t]) === !0;
|
|
542
542
|
}
|
|
543
|
-
var
|
|
543
|
+
var L;
|
|
544
544
|
class Q {
|
|
545
545
|
constructor(t, e) {
|
|
546
546
|
o(this, "type");
|
|
547
547
|
o(this, "detail");
|
|
548
|
-
|
|
548
|
+
W(this, L, !1);
|
|
549
549
|
this.type = t, this.detail = e;
|
|
550
550
|
}
|
|
551
551
|
get propagationStopped() {
|
|
552
|
-
return O(this,
|
|
552
|
+
return O(this, L);
|
|
553
553
|
}
|
|
554
554
|
stopPropagation() {
|
|
555
|
-
|
|
555
|
+
F(this, L, !0);
|
|
556
556
|
}
|
|
557
557
|
get [Symbol.toStringTag]() {
|
|
558
558
|
return "ContextEvent";
|
|
559
559
|
}
|
|
560
560
|
// stopImmediatePropagation() {}
|
|
561
561
|
}
|
|
562
|
-
|
|
563
|
-
let
|
|
562
|
+
L = new WeakMap();
|
|
563
|
+
let ce = class {
|
|
564
564
|
constructor(t) {
|
|
565
565
|
o(this, "__store");
|
|
566
566
|
this.__store = t;
|
|
@@ -589,14 +589,39 @@ let ae = class {
|
|
|
589
589
|
}
|
|
590
590
|
return null;
|
|
591
591
|
}
|
|
592
|
+
// on<T = unknown>(eventName: string, listener: (...args: any) => void): void {
|
|
593
|
+
// this.__store._elementContext.emitter.on(eventName, listener);
|
|
594
|
+
// }
|
|
595
|
+
// off<T = unknown>(eventName: string, listener: (...args: any) => void): void {
|
|
596
|
+
// this.__store._elementContext.emitter.off(eventName, listener);
|
|
597
|
+
// }
|
|
598
|
+
// once<T = unknown>(eventName: string, listener: (...args: any) => void): void {
|
|
599
|
+
// this.__store._elementContext.emitter.once(eventName, listener);
|
|
600
|
+
// }
|
|
592
601
|
on(t, e) {
|
|
593
|
-
|
|
602
|
+
if (t === "*") {
|
|
603
|
+
const n = (s, i) => {
|
|
604
|
+
e(i);
|
|
605
|
+
};
|
|
606
|
+
this.__store._elementContext.emitter.on(t, n), this.__store._wildcardListeners.set(e, n);
|
|
607
|
+
} else
|
|
608
|
+
this.__store._elementContext.emitter.on(t, e);
|
|
594
609
|
}
|
|
595
610
|
off(t, e) {
|
|
596
|
-
|
|
611
|
+
if (t === "*") {
|
|
612
|
+
const n = this.__store._wildcardListeners.get(e);
|
|
613
|
+
n && (this.__store._elementContext.emitter.off(t, n), this.__store._wildcardListeners.delete(e));
|
|
614
|
+
} else
|
|
615
|
+
this.__store._elementContext.emitter.off(t, e);
|
|
597
616
|
}
|
|
598
617
|
once(t, e) {
|
|
599
|
-
|
|
618
|
+
if (t === "*") {
|
|
619
|
+
const n = (s, i) => {
|
|
620
|
+
this.__store._wildcardListeners.delete(e), e(i);
|
|
621
|
+
};
|
|
622
|
+
this.__store._elementContext.emitter.once(t, n), this.__store._wildcardListeners.set(e, n);
|
|
623
|
+
} else
|
|
624
|
+
this.__store._elementContext.emitter.once(t, e);
|
|
600
625
|
}
|
|
601
626
|
emit(t, e) {
|
|
602
627
|
return this.__store._elementContext.emitter.emit(t, new Q(t, e));
|
|
@@ -621,7 +646,7 @@ let ae = class {
|
|
|
621
646
|
}
|
|
622
647
|
}
|
|
623
648
|
};
|
|
624
|
-
class
|
|
649
|
+
class ae {
|
|
625
650
|
constructor(t, e, n) {
|
|
626
651
|
o(this, "key");
|
|
627
652
|
o(this, "_fn");
|
|
@@ -632,7 +657,8 @@ class ce {
|
|
|
632
657
|
o(this, "value");
|
|
633
658
|
o(this, "isMounted", !1);
|
|
634
659
|
o(this, "_elementContext");
|
|
635
|
-
o(this, "_emitter", new
|
|
660
|
+
o(this, "_emitter", new q());
|
|
661
|
+
o(this, "_wildcardListeners", /* @__PURE__ */ new Map());
|
|
636
662
|
o(this, "_logger");
|
|
637
663
|
o(this, "_watcher", D());
|
|
638
664
|
this.key = t, this._fn = e, this._options = n;
|
|
@@ -650,7 +676,7 @@ class ce {
|
|
|
650
676
|
this._elementContext = t, this._logger = t.root.createLogger(this._fn.name), this._emitter.on("error", (n, s, ...i) => {
|
|
651
677
|
console.log({ error: n, eventName: s, args: i }), this._logger.crash(n);
|
|
652
678
|
});
|
|
653
|
-
const e = new
|
|
679
|
+
const e = new ce(this);
|
|
654
680
|
try {
|
|
655
681
|
this.value = this._fn.call(e, this._options, e);
|
|
656
682
|
} catch (n) {
|
|
@@ -666,29 +692,29 @@ class ce {
|
|
|
666
692
|
}
|
|
667
693
|
}
|
|
668
694
|
function he(r) {
|
|
669
|
-
return (r == null ? void 0 : r[
|
|
695
|
+
return (r == null ? void 0 : r[Nt]) === !0;
|
|
670
696
|
}
|
|
671
697
|
function le(r) {
|
|
672
698
|
return (r == null ? void 0 : r[ne]) === !0;
|
|
673
699
|
}
|
|
674
|
-
function
|
|
700
|
+
function We(r) {
|
|
675
701
|
const t = Z();
|
|
676
702
|
function e(n) {
|
|
677
|
-
return new
|
|
703
|
+
return new ae(t, r, n);
|
|
678
704
|
}
|
|
679
|
-
return e[
|
|
705
|
+
return e[Nt] = !0, e.key = t, e;
|
|
680
706
|
}
|
|
681
707
|
class H extends Error {
|
|
682
708
|
}
|
|
683
709
|
function fe(r) {
|
|
684
|
-
for (var t, e, n = arguments, s = 1, i = "", u = "",
|
|
685
|
-
s === 1 && (l || (i = i.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ?
|
|
686
|
-
},
|
|
687
|
-
|
|
688
|
-
for (var f = 0; f < r[
|
|
689
|
-
` || t === "\r" ? (h(), s = 2) : i += t), s === 3 && i === "!--" && (s = 4,
|
|
710
|
+
for (var t, e, n = arguments, s = 1, i = "", u = "", c = [0], h = function(l) {
|
|
711
|
+
s === 1 && (l || (i = i.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? c.push(l ? n[l] : i) : s === 3 && (l || i) ? (c[1] = l ? n[l] : i, s = 2) : s === 2 && i === "..." && l ? c[2] = Object.assign(c[2] || {}, n[l]) : s === 2 && i && !l ? (c[2] = c[2] || {})[i] = !0 : s >= 5 && (s === 5 ? ((c[2] = c[2] || {})[e] = l ? i ? i + n[l] : n[l] : i, s = 6) : (l || i) && (c[2][e] += l ? i + n[l] : i)), i = "";
|
|
712
|
+
}, a = 0; a < r.length; a++) {
|
|
713
|
+
a && (s === 1 && h(), h(a));
|
|
714
|
+
for (var f = 0; f < r[a].length; f++) t = r[a][f], s === 1 ? t === "<" ? (h(), c = [c, "", null], s = 3) : i += t : s === 4 ? i === "--" && t === ">" ? (s = 1, i = "") : i = t + i[0] : u ? t === u ? u = "" : i += t : t === '"' || t === "'" ? u = t : t === ">" ? (h(), s = 1) : s && (t === "=" ? (s = 5, e = i, i = "") : t === "/" && (s < 5 || r[a][f + 1] === ">") ? (h(), s === 3 && (c = c[0]), s = c, (c = c[0]).push(this.apply(null, s.slice(1))), s = 0) : t === " " || t === " " || t === `
|
|
715
|
+
` || t === "\r" ? (h(), s = 2) : i += t), s === 3 && i === "!--" && (s = 4, c = c[0]);
|
|
690
716
|
}
|
|
691
|
-
return h(),
|
|
717
|
+
return h(), c.length > 2 ? c.slice(1) : c[1];
|
|
692
718
|
}
|
|
693
719
|
var _t;
|
|
694
720
|
_t = M;
|
|
@@ -709,11 +735,11 @@ class dt {
|
|
|
709
735
|
}
|
|
710
736
|
}
|
|
711
737
|
const de = (r) => /^on[A-Z]/.test(r);
|
|
712
|
-
var
|
|
713
|
-
|
|
738
|
+
var wt;
|
|
739
|
+
wt = M;
|
|
714
740
|
class pe {
|
|
715
741
|
constructor({ tag: t, props: e, children: n, elementContext: s }) {
|
|
716
|
-
o(this,
|
|
742
|
+
o(this, wt, !0);
|
|
717
743
|
o(this, "node");
|
|
718
744
|
o(this, "props");
|
|
719
745
|
o(this, "childMarkup", []);
|
|
@@ -785,28 +811,28 @@ class pe {
|
|
|
785
811
|
for (const u in i)
|
|
786
812
|
this.attachProp(
|
|
787
813
|
i[u],
|
|
788
|
-
(
|
|
789
|
-
|
|
814
|
+
(c) => {
|
|
815
|
+
c == null ? t.removeAttribute(u) : t.setAttribute(u, String(c));
|
|
790
816
|
},
|
|
791
817
|
this.getUpdateKey("attr", u)
|
|
792
818
|
);
|
|
793
819
|
} else if (n === "eventListeners") {
|
|
794
820
|
const i = s;
|
|
795
821
|
for (const u in i) {
|
|
796
|
-
const
|
|
797
|
-
t.addEventListener(u,
|
|
798
|
-
t.removeEventListener(u,
|
|
822
|
+
const c = m(s) ? (h) => s.get()(h) : s;
|
|
823
|
+
t.addEventListener(u, c), this.stopCallbacks.push(() => {
|
|
824
|
+
t.removeEventListener(u, c);
|
|
799
825
|
});
|
|
800
826
|
}
|
|
801
827
|
} else if (n === "onClickOutside" || n === "onclickoutside") {
|
|
802
|
-
const i = (
|
|
803
|
-
this.canClickAway && !t.contains(
|
|
828
|
+
const i = (c) => {
|
|
829
|
+
this.canClickAway && !t.contains(c.target) && (m(s) ? s.get()(c) : s(c));
|
|
804
830
|
}, u = { capture: !0 };
|
|
805
831
|
window.addEventListener("click", i, u), this.stopCallbacks.push(() => {
|
|
806
832
|
window.removeEventListener("click", i, u);
|
|
807
833
|
});
|
|
808
834
|
} else if (de(n)) {
|
|
809
|
-
const i = n.slice(2).toLowerCase(), u = m(s) ? (
|
|
835
|
+
const i = n.slice(2).toLowerCase(), u = m(s) ? (c) => s.get()(c) : s;
|
|
810
836
|
t.addEventListener(i, u), this.stopCallbacks.push(() => {
|
|
811
837
|
t.removeEventListener(i, u);
|
|
812
838
|
});
|
|
@@ -900,27 +926,27 @@ class pe {
|
|
|
900
926
|
const s = [];
|
|
901
927
|
if (m(e)) {
|
|
902
928
|
let i;
|
|
903
|
-
const u = e.watch((
|
|
929
|
+
const u = e.watch((c) => {
|
|
904
930
|
this._mutate(
|
|
905
931
|
() => {
|
|
906
|
-
|
|
932
|
+
I(i) && i(), t.style.cssText = "", i = this.applyStyles(t, c, n);
|
|
907
933
|
},
|
|
908
934
|
this.getUpdateKey("styles", "*")
|
|
909
935
|
);
|
|
910
936
|
});
|
|
911
937
|
n.push(u), s.push(u);
|
|
912
938
|
} else {
|
|
913
|
-
const i =
|
|
939
|
+
const i = Ft(e);
|
|
914
940
|
for (const u in i) {
|
|
915
|
-
const { value:
|
|
916
|
-
if (m(
|
|
917
|
-
const
|
|
941
|
+
const { value: c, priority: h } = i[u];
|
|
942
|
+
if (m(c)) {
|
|
943
|
+
const a = c.watch((f) => {
|
|
918
944
|
this._mutate(() => {
|
|
919
945
|
f ? t.style.setProperty(u, String(f), h) : t.style.removeProperty(u);
|
|
920
946
|
});
|
|
921
947
|
});
|
|
922
|
-
n.push(
|
|
923
|
-
} else
|
|
948
|
+
n.push(a), s.push(a);
|
|
949
|
+
} else c != null && t.style.setProperty(u, String(c));
|
|
924
950
|
}
|
|
925
951
|
}
|
|
926
952
|
return function() {
|
|
@@ -932,27 +958,27 @@ class pe {
|
|
|
932
958
|
const s = [];
|
|
933
959
|
if (m(e)) {
|
|
934
960
|
let i;
|
|
935
|
-
const u = e.watch((
|
|
961
|
+
const u = e.watch((c) => {
|
|
936
962
|
this._mutate(
|
|
937
963
|
() => {
|
|
938
|
-
|
|
964
|
+
I(i) && i(), t.removeAttribute("class"), i = this.applyClasses(t, c, n);
|
|
939
965
|
},
|
|
940
966
|
this.getUpdateKey("attr", "class")
|
|
941
967
|
);
|
|
942
968
|
});
|
|
943
969
|
n.push(u), s.push(u);
|
|
944
970
|
} else {
|
|
945
|
-
const i =
|
|
971
|
+
const i = Wt(e);
|
|
946
972
|
for (const u in i) {
|
|
947
|
-
const
|
|
948
|
-
if (m(
|
|
949
|
-
const h =
|
|
973
|
+
const c = i[u];
|
|
974
|
+
if (m(c)) {
|
|
975
|
+
const h = c.watch((a) => {
|
|
950
976
|
this._mutate(() => {
|
|
951
|
-
|
|
977
|
+
a ? t.classList.add(u) : t.classList.remove(u);
|
|
952
978
|
});
|
|
953
979
|
});
|
|
954
980
|
n.push(h), s.push(h);
|
|
955
|
-
} else
|
|
981
|
+
} else c && t.classList.add(u);
|
|
956
982
|
}
|
|
957
983
|
}
|
|
958
984
|
return function() {
|
|
@@ -961,18 +987,18 @@ class pe {
|
|
|
961
987
|
};
|
|
962
988
|
}
|
|
963
989
|
}
|
|
964
|
-
function
|
|
990
|
+
function Wt(r) {
|
|
965
991
|
let t = {};
|
|
966
992
|
if (b(r)) {
|
|
967
993
|
const e = r.split(" ");
|
|
968
994
|
for (const n of e)
|
|
969
995
|
t[n] = !0;
|
|
970
996
|
} else bt(r) ? Object.assign(t, r) : Array.isArray(r) && Array.from(r).filter(Boolean).forEach((e) => {
|
|
971
|
-
Object.assign(t,
|
|
997
|
+
Object.assign(t, Wt(e));
|
|
972
998
|
});
|
|
973
999
|
return delete t.undefined, t;
|
|
974
1000
|
}
|
|
975
|
-
function
|
|
1001
|
+
function Ft(r) {
|
|
976
1002
|
let t = {};
|
|
977
1003
|
if (b(r)) {
|
|
978
1004
|
const e = r.split(";").filter((n) => n.trim() !== "");
|
|
@@ -987,7 +1013,7 @@ function Pt(r) {
|
|
|
987
1013
|
for (const e in r)
|
|
988
1014
|
e.startsWith("--") ? t[e] = { value: r[e] } : t[pt(e)] = { value: r[e] };
|
|
989
1015
|
else Array.isArray(r) && Array.from(r).filter((e) => e != null).forEach((e) => {
|
|
990
|
-
Object.assign(t,
|
|
1016
|
+
Object.assign(t, Ft(e));
|
|
991
1017
|
});
|
|
992
1018
|
return t;
|
|
993
1019
|
}
|
|
@@ -995,11 +1021,11 @@ function pt(r) {
|
|
|
995
1021
|
return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, e) => (e ? "-" : "") + t.toLowerCase());
|
|
996
1022
|
}
|
|
997
1023
|
const me = ["ref", "children", "class", "style", "data"];
|
|
998
|
-
var
|
|
999
|
-
|
|
1024
|
+
var gt;
|
|
1025
|
+
gt = M;
|
|
1000
1026
|
class _e {
|
|
1001
1027
|
constructor({ sources: t, renderFn: e, elementContext: n }) {
|
|
1002
|
-
o(this,
|
|
1028
|
+
o(this, gt, !0);
|
|
1003
1029
|
o(this, "node", document.createTextNode(""));
|
|
1004
1030
|
o(this, "children", []);
|
|
1005
1031
|
o(this, "renderFn");
|
|
@@ -1014,9 +1040,9 @@ class _e {
|
|
|
1014
1040
|
mount(t, e) {
|
|
1015
1041
|
this.isMounted || (t.insertBefore(this.node, (e == null ? void 0 : e.nextSibling) ?? null), this.watcher.watch(this.sources, (...n) => {
|
|
1016
1042
|
const s = this.renderFn(...n);
|
|
1017
|
-
if (!
|
|
1043
|
+
if (!It(s))
|
|
1018
1044
|
throw console.error(s, n), new TypeError(
|
|
1019
|
-
`Observer received invalid value to render. Got type: ${
|
|
1045
|
+
`Observer received invalid value to render. Got type: ${V(s)}, value: ${s}`
|
|
1020
1046
|
);
|
|
1021
1047
|
this.update(A(s) ? s : [s]);
|
|
1022
1048
|
}));
|
|
@@ -1031,21 +1057,21 @@ class _e {
|
|
|
1031
1057
|
this.children = [];
|
|
1032
1058
|
}
|
|
1033
1059
|
update(t) {
|
|
1034
|
-
var i, u,
|
|
1060
|
+
var i, u, c;
|
|
1035
1061
|
if (this.cleanup(!1), t == null || t.length === 0 || !this.isMounted)
|
|
1036
1062
|
return;
|
|
1037
|
-
const e = t.flatMap((h) =>
|
|
1063
|
+
const e = t.flatMap((h) => Tt(h) ? h : k(this.elementContext, tt(h)));
|
|
1038
1064
|
for (const h of e) {
|
|
1039
|
-
const
|
|
1040
|
-
h.mount(this.node.parentNode,
|
|
1065
|
+
const a = ((i = this.children.at(-1)) == null ? void 0 : i.node) || this.node;
|
|
1066
|
+
h.mount(this.node.parentNode, a), this.children.push(h);
|
|
1041
1067
|
}
|
|
1042
|
-
const n = this.node.parentNode, s = ((
|
|
1068
|
+
const n = this.node.parentNode, s = ((c = (u = this.children.at(-1)) == null ? void 0 : u.node) == null ? void 0 : c.nextSibling) ?? null;
|
|
1043
1069
|
n.insertBefore(this.node, s);
|
|
1044
1070
|
}
|
|
1045
1071
|
}
|
|
1046
1072
|
var yt;
|
|
1047
1073
|
yt = M;
|
|
1048
|
-
class
|
|
1074
|
+
class Pt {
|
|
1049
1075
|
constructor(t) {
|
|
1050
1076
|
o(this, yt, !0);
|
|
1051
1077
|
o(this, "node", document.createTextNode(""));
|
|
@@ -1081,7 +1107,7 @@ class Tt {
|
|
|
1081
1107
|
}
|
|
1082
1108
|
var St;
|
|
1083
1109
|
St = M;
|
|
1084
|
-
class
|
|
1110
|
+
class we {
|
|
1085
1111
|
constructor(t) {
|
|
1086
1112
|
o(this, St, !0);
|
|
1087
1113
|
o(this, "config");
|
|
@@ -1093,17 +1119,17 @@ class ge {
|
|
|
1093
1119
|
}
|
|
1094
1120
|
mount(t, e) {
|
|
1095
1121
|
const { content: n, parent: s } = this.config;
|
|
1096
|
-
|
|
1122
|
+
Tt(n) ? this.element = n : this.element = T(k(this.config.elementContext, tt(n))), this.element.mount(s);
|
|
1097
1123
|
}
|
|
1098
1124
|
unmount(t = !1) {
|
|
1099
1125
|
var e;
|
|
1100
1126
|
(e = this.element) != null && e.isMounted && this.element.unmount(t);
|
|
1101
1127
|
}
|
|
1102
1128
|
}
|
|
1103
|
-
function
|
|
1129
|
+
function Fe(r) {
|
|
1104
1130
|
return r;
|
|
1105
1131
|
}
|
|
1106
|
-
class
|
|
1132
|
+
class ge {
|
|
1107
1133
|
constructor(t) {
|
|
1108
1134
|
o(this, "__view");
|
|
1109
1135
|
this.__view = t;
|
|
@@ -1135,14 +1161,39 @@ class we {
|
|
|
1135
1161
|
}
|
|
1136
1162
|
return null;
|
|
1137
1163
|
}
|
|
1164
|
+
// on<T = unknown>(eventName: string, listener: (...args: any) => void): void {
|
|
1165
|
+
// this.__view._elementContext.emitter.on(eventName, listener);
|
|
1166
|
+
// }
|
|
1167
|
+
// off<T = unknown>(eventName: string, listener: (...args: any) => void): void {
|
|
1168
|
+
// this.__view._elementContext.emitter.off(eventName, listener);
|
|
1169
|
+
// }
|
|
1170
|
+
// once<T = unknown>(eventName: string, listener: (...args: any) => void): void {
|
|
1171
|
+
// this.__view._elementContext.emitter.once(eventName, listener);
|
|
1172
|
+
// }
|
|
1138
1173
|
on(t, e) {
|
|
1139
|
-
|
|
1174
|
+
if (t === "*") {
|
|
1175
|
+
const n = (s, i) => {
|
|
1176
|
+
e(i);
|
|
1177
|
+
};
|
|
1178
|
+
this.__view._elementContext.emitter.on(t, n), this.__view._wildcardListeners.set(e, n);
|
|
1179
|
+
} else
|
|
1180
|
+
this.__view._elementContext.emitter.on(t, e);
|
|
1140
1181
|
}
|
|
1141
1182
|
off(t, e) {
|
|
1142
|
-
|
|
1183
|
+
if (t === "*") {
|
|
1184
|
+
const n = this.__view._wildcardListeners.get(e);
|
|
1185
|
+
n && (this.__view._elementContext.emitter.off(t, n), this.__view._wildcardListeners.delete(e));
|
|
1186
|
+
} else
|
|
1187
|
+
this.__view._elementContext.emitter.off(t, e);
|
|
1143
1188
|
}
|
|
1144
1189
|
once(t, e) {
|
|
1145
|
-
|
|
1190
|
+
if (t === "*") {
|
|
1191
|
+
const n = (s, i) => {
|
|
1192
|
+
this.__view._wildcardListeners.delete(e), e(i);
|
|
1193
|
+
};
|
|
1194
|
+
this.__view._elementContext.emitter.once(t, n), this.__view._wildcardListeners.set(e, n);
|
|
1195
|
+
} else
|
|
1196
|
+
this.__view._elementContext.emitter.once(t, e);
|
|
1146
1197
|
}
|
|
1147
1198
|
emit(t, e) {
|
|
1148
1199
|
return this.__view._elementContext.emitter.emit(t, new Q(t, e));
|
|
@@ -1216,20 +1267,21 @@ const et = class et {
|
|
|
1216
1267
|
o(this, "_$children");
|
|
1217
1268
|
o(this, "_setChildren");
|
|
1218
1269
|
o(this, "_watcher", D());
|
|
1219
|
-
o(this, "_emitter", new
|
|
1270
|
+
o(this, "_emitter", new q());
|
|
1271
|
+
o(this, "_wildcardListeners", /* @__PURE__ */ new Map());
|
|
1220
1272
|
o(this, "isMounted", !1);
|
|
1221
1273
|
this._elementContext = {
|
|
1222
1274
|
...t,
|
|
1223
1275
|
data: {},
|
|
1224
1276
|
parent: t,
|
|
1225
1277
|
viewName: e.name,
|
|
1226
|
-
emitter: new
|
|
1278
|
+
emitter: new q(),
|
|
1227
1279
|
stores: /* @__PURE__ */ new Map()
|
|
1228
|
-
}, this._logger = t.root.createLogger(e.name || "🌇 anonymous view", { uid: this.uniqueId }), this._view = e, this._props = n, this._childMarkup = s, [this._$children, this._setChildren] = Y([]), this._emitter.on("error", (i, u, ...
|
|
1229
|
-
this._logger.error({ error: i, eventName: u, args:
|
|
1280
|
+
}, this._logger = t.root.createLogger(e.name || "🌇 anonymous view", { uid: this.uniqueId }), this._view = e, this._props = n, this._childMarkup = s, [this._$children, this._setChildren] = Y([]), this._emitter.on("error", (i, u, ...c) => {
|
|
1281
|
+
this._logger.error({ error: i, eventName: u, args: c }), this._logger.crash(i);
|
|
1230
1282
|
}), this._elementContext.emitter.on("*", (i, u) => {
|
|
1231
|
-
var
|
|
1232
|
-
u instanceof Q && (u.propagationStopped || (
|
|
1283
|
+
var c;
|
|
1284
|
+
u instanceof Q && (u.propagationStopped || (c = this._elementContext.parent) == null || c.emitter.emit(i, u));
|
|
1233
1285
|
});
|
|
1234
1286
|
}
|
|
1235
1287
|
/*===============================*\
|
|
@@ -1257,7 +1309,7 @@ const et = class et {
|
|
|
1257
1309
|
|| Internal ||
|
|
1258
1310
|
\*===============================*/
|
|
1259
1311
|
_initialize() {
|
|
1260
|
-
const t = new
|
|
1312
|
+
const t = new ge(this);
|
|
1261
1313
|
let e;
|
|
1262
1314
|
try {
|
|
1263
1315
|
e = this._view.call(t, this._props, t), this._childMarkup.length && this._setChildren(k(this._elementContext, this._childMarkup));
|
|
@@ -1265,22 +1317,22 @@ const et = class et {
|
|
|
1265
1317
|
throw n instanceof Error && this._logger.crash(n), n;
|
|
1266
1318
|
}
|
|
1267
1319
|
if (e !== null) if (e instanceof Node)
|
|
1268
|
-
this._element =
|
|
1269
|
-
else if (
|
|
1270
|
-
this._element =
|
|
1320
|
+
this._element = T(k(this._elementContext, v("$node", { value: e })));
|
|
1321
|
+
else if (U(e) || kt(U, e))
|
|
1322
|
+
this._element = T(k(this._elementContext, e));
|
|
1271
1323
|
else if (m(e))
|
|
1272
|
-
this._element =
|
|
1324
|
+
this._element = T(
|
|
1273
1325
|
k(this._elementContext, v("$observer", { sources: [e], renderFn: (n) => n }))
|
|
1274
1326
|
);
|
|
1275
1327
|
else {
|
|
1276
1328
|
const n = new TypeError(
|
|
1277
|
-
`Expected '${this._view.name}' function to return a DOM node, Markup element, Readable or null. Got: ${
|
|
1329
|
+
`Expected '${this._view.name}' function to return a DOM node, Markup element, Readable or null. Got: ${V(e)}`
|
|
1278
1330
|
);
|
|
1279
1331
|
this._logger.crash(n);
|
|
1280
1332
|
}
|
|
1281
1333
|
}
|
|
1282
1334
|
};
|
|
1283
|
-
let
|
|
1335
|
+
let j = et;
|
|
1284
1336
|
var Ct;
|
|
1285
1337
|
Ct = M;
|
|
1286
1338
|
class ye {
|
|
@@ -1315,33 +1367,33 @@ class ye {
|
|
|
1315
1367
|
this.connectedItems = [];
|
|
1316
1368
|
}
|
|
1317
1369
|
_update(t) {
|
|
1318
|
-
var u,
|
|
1370
|
+
var u, c, h;
|
|
1319
1371
|
if (t.length === 0 || !this.isMounted)
|
|
1320
1372
|
return this._cleanup(!1);
|
|
1321
1373
|
const e = [];
|
|
1322
1374
|
let n = 0;
|
|
1323
|
-
for (const
|
|
1375
|
+
for (const a of t)
|
|
1324
1376
|
e.push({
|
|
1325
|
-
key: this.keyFn(
|
|
1326
|
-
value:
|
|
1377
|
+
key: this.keyFn(a, n),
|
|
1378
|
+
value: a,
|
|
1327
1379
|
index: n++
|
|
1328
1380
|
});
|
|
1329
1381
|
const s = [];
|
|
1330
|
-
for (const
|
|
1331
|
-
e.find((l) => l.key ===
|
|
1332
|
-
for (const
|
|
1333
|
-
const f = this.connectedItems.find((l) => l.key ===
|
|
1382
|
+
for (const a of this.connectedItems)
|
|
1383
|
+
e.find((l) => l.key === a.key) || a.element.unmount(!1);
|
|
1384
|
+
for (const a of e) {
|
|
1385
|
+
const f = this.connectedItems.find((l) => l.key === a.key);
|
|
1334
1386
|
if (f)
|
|
1335
|
-
f.setValue(
|
|
1387
|
+
f.setValue(a.value), f.setIndex(a.index), s[a.index] = f;
|
|
1336
1388
|
else {
|
|
1337
|
-
const [l, d] = Y(
|
|
1338
|
-
s[
|
|
1339
|
-
key:
|
|
1389
|
+
const [l, d] = Y(a.value), [p, _] = Y(a.index);
|
|
1390
|
+
s[a.index] = {
|
|
1391
|
+
key: a.key,
|
|
1340
1392
|
$value: l,
|
|
1341
1393
|
setValue: d,
|
|
1342
1394
|
$index: p,
|
|
1343
1395
|
setIndex: _,
|
|
1344
|
-
element: new
|
|
1396
|
+
element: new j(this.elementContext, Se, {
|
|
1345
1397
|
$value: l,
|
|
1346
1398
|
$index: p,
|
|
1347
1399
|
renderFn: this.renderFn
|
|
@@ -1349,26 +1401,26 @@ class ye {
|
|
|
1349
1401
|
};
|
|
1350
1402
|
}
|
|
1351
1403
|
}
|
|
1352
|
-
for (let
|
|
1353
|
-
const f = s[
|
|
1404
|
+
for (let a = 0; a < s.length; a++) {
|
|
1405
|
+
const f = s[a], l = ((u = s[a - 1]) == null ? void 0 : u.element.node) ?? this.node;
|
|
1354
1406
|
f.element.mount(this.node.parentNode, l);
|
|
1355
1407
|
}
|
|
1356
1408
|
this.connectedItems = s;
|
|
1357
|
-
const i = ((
|
|
1409
|
+
const i = ((c = s.at(-1)) == null ? void 0 : c.element.node) ?? this.node;
|
|
1358
1410
|
(h = this.node.parentNode) == null || h.insertBefore(this.node, i.nextSibling);
|
|
1359
1411
|
}
|
|
1360
1412
|
}
|
|
1361
1413
|
function Se({ $value: r, $index: t, renderFn: e }, n) {
|
|
1362
1414
|
return n.setName("@RepeatItem"), e.call(n, r, t, n);
|
|
1363
1415
|
}
|
|
1364
|
-
function
|
|
1365
|
-
return (r == null ? void 0 : r[
|
|
1416
|
+
function U(r) {
|
|
1417
|
+
return (r == null ? void 0 : r[Lt]) === !0;
|
|
1366
1418
|
}
|
|
1367
|
-
function
|
|
1419
|
+
function Tt(r) {
|
|
1368
1420
|
return (r == null ? void 0 : r[M]) === !0;
|
|
1369
1421
|
}
|
|
1370
1422
|
function tt(r) {
|
|
1371
|
-
return A(r) || (r = [r]), r.flat(1 / 0).filter((t) => t != null && t !== !1).map((t) =>
|
|
1423
|
+
return A(r) || (r = [r]), r.flat(1 / 0).filter((t) => t != null && t !== !1).map((t) => U(t) ? t : t instanceof Node ? v("$node", { value: t }) : m(t) ? v("$observer", {
|
|
1372
1424
|
sources: [t],
|
|
1373
1425
|
renderFn: (e) => e
|
|
1374
1426
|
}) : v("$text", { value: t }));
|
|
@@ -1377,7 +1429,7 @@ function v(r, t, ...e) {
|
|
|
1377
1429
|
return new ve(r, t, ...e);
|
|
1378
1430
|
}
|
|
1379
1431
|
var xt;
|
|
1380
|
-
xt =
|
|
1432
|
+
xt = Lt;
|
|
1381
1433
|
class ve {
|
|
1382
1434
|
constructor(t, e, ...n) {
|
|
1383
1435
|
o(this, xt, !0);
|
|
@@ -1387,24 +1439,24 @@ class ve {
|
|
|
1387
1439
|
this.type = t, this.props = e, this.children = tt(n);
|
|
1388
1440
|
}
|
|
1389
1441
|
}
|
|
1390
|
-
const
|
|
1391
|
-
function
|
|
1442
|
+
const Pe = fe.bind(v);
|
|
1443
|
+
function Te(r, t, e) {
|
|
1392
1444
|
return v("$observer", {
|
|
1393
1445
|
sources: [r],
|
|
1394
1446
|
renderFn: (n) => n && t ? t : !n && e ? e : null
|
|
1395
1447
|
});
|
|
1396
1448
|
}
|
|
1397
|
-
function
|
|
1449
|
+
function Ie(r, t, e) {
|
|
1398
1450
|
const n = J(r);
|
|
1399
1451
|
return v("$repeat", { $items: n, keyFn: t, renderFn: e });
|
|
1400
1452
|
}
|
|
1401
|
-
function
|
|
1453
|
+
function qe(r, t) {
|
|
1402
1454
|
return v("$portal", { parent: r, content: t });
|
|
1403
1455
|
}
|
|
1404
1456
|
function k(r, t) {
|
|
1405
1457
|
return (A(t) ? t : [t]).map((n) => {
|
|
1406
|
-
if (
|
|
1407
|
-
return new
|
|
1458
|
+
if (I(n.type))
|
|
1459
|
+
return new j(r, n.type, n.props, n.children);
|
|
1408
1460
|
if (b(n.type))
|
|
1409
1461
|
switch (n.type) {
|
|
1410
1462
|
case "$node": {
|
|
@@ -1434,11 +1486,11 @@ function k(r, t) {
|
|
|
1434
1486
|
}
|
|
1435
1487
|
case "$outlet": {
|
|
1436
1488
|
const s = n.props;
|
|
1437
|
-
return new
|
|
1489
|
+
return new Pt(s.$children);
|
|
1438
1490
|
}
|
|
1439
1491
|
case "$portal": {
|
|
1440
1492
|
const s = n.props;
|
|
1441
|
-
return new
|
|
1493
|
+
return new we({
|
|
1442
1494
|
content: s.content,
|
|
1443
1495
|
parent: s.parent,
|
|
1444
1496
|
elementContext: r
|
|
@@ -1458,49 +1510,49 @@ function k(r, t) {
|
|
|
1458
1510
|
throw new TypeError(`Expected a string or view function. Got: ${n.type}`);
|
|
1459
1511
|
});
|
|
1460
1512
|
}
|
|
1461
|
-
function
|
|
1462
|
-
return r.length === 1 ? r[0] : new
|
|
1513
|
+
function T(r) {
|
|
1514
|
+
return r.length === 1 ? r[0] : new Pt(r);
|
|
1463
1515
|
}
|
|
1464
|
-
function
|
|
1465
|
-
return r == null || r === !1 || b(r) || Gt(r) ||
|
|
1516
|
+
function It(r) {
|
|
1517
|
+
return r == null || r === !1 || b(r) || Gt(r) || U(r) || m(r) || kt(It, r);
|
|
1466
1518
|
}
|
|
1467
|
-
function
|
|
1519
|
+
function je(r, t) {
|
|
1468
1520
|
return t.outlet();
|
|
1469
1521
|
}
|
|
1470
1522
|
export {
|
|
1471
1523
|
Zt as A,
|
|
1472
1524
|
Oe as B,
|
|
1473
1525
|
Q as C,
|
|
1474
|
-
|
|
1526
|
+
T as D,
|
|
1475
1527
|
k as E,
|
|
1476
|
-
|
|
1528
|
+
We as F,
|
|
1477
1529
|
Et as G,
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1530
|
+
qe as H,
|
|
1531
|
+
Ie as I,
|
|
1532
|
+
Fe as J,
|
|
1533
|
+
je as P,
|
|
1534
|
+
$e as S,
|
|
1535
|
+
j as V,
|
|
1484
1536
|
b as a,
|
|
1485
1537
|
Ae as b,
|
|
1486
1538
|
Y as c,
|
|
1487
1539
|
oe as d,
|
|
1488
|
-
|
|
1540
|
+
I as e,
|
|
1489
1541
|
ke as f,
|
|
1490
1542
|
Me as g,
|
|
1491
1543
|
xe as h,
|
|
1492
1544
|
bt as i,
|
|
1493
|
-
|
|
1494
|
-
|
|
1545
|
+
Pe as j,
|
|
1546
|
+
Te as k,
|
|
1495
1547
|
D as l,
|
|
1496
|
-
|
|
1548
|
+
Ve as m,
|
|
1497
1549
|
J as n,
|
|
1498
1550
|
re as o,
|
|
1499
|
-
|
|
1551
|
+
q as p,
|
|
1500
1552
|
m as q,
|
|
1501
|
-
|
|
1553
|
+
Le as r,
|
|
1502
1554
|
Ee as s,
|
|
1503
|
-
|
|
1555
|
+
V as t,
|
|
1504
1556
|
ue as u,
|
|
1505
1557
|
he as v,
|
|
1506
1558
|
H as w,
|
|
@@ -1508,4 +1560,4 @@ export {
|
|
|
1508
1560
|
be as y,
|
|
1509
1561
|
v as z
|
|
1510
1562
|
};
|
|
1511
|
-
//# sourceMappingURL=passthrough-
|
|
1563
|
+
//# sourceMappingURL=passthrough-d2lcM0cd.js.map
|