@manyducks.co/dolla 2.0.0-alpha.1 → 2.0.0-alpha.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/README.md +90 -17
- package/dist/index.d.ts +6 -29
- package/dist/index.js +720 -685
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.d.ts +1 -1
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/jsx-runtime.js +2 -2
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/markup.d.ts +19 -13
- package/dist/modules/dolla.d.ts +33 -9
- package/dist/modules/router.d.ts +3 -4
- package/dist/nodes/cond.d.ts +6 -7
- package/dist/nodes/html.d.ts +7 -8
- package/dist/nodes/observer.d.ts +6 -7
- package/dist/nodes/outlet.d.ts +9 -10
- package/dist/nodes/portal.d.ts +6 -7
- package/dist/nodes/repeat.d.ts +6 -7
- package/dist/nodes/text.d.ts +5 -6
- package/dist/{fragment-DHJiX0-a.js → passthrough-DrtCifRF.js} +461 -474
- package/dist/passthrough-DrtCifRF.js.map +1 -0
- package/dist/signals.d.ts +2 -2
- package/dist/types.d.ts +1 -1
- package/dist/view.d.ts +9 -3
- package/dist/views/default-crash-view.d.ts +18 -0
- package/dist/views/passthrough.d.ts +5 -0
- package/package.json +1 -1
- package/vite.config.js +1 -0
- package/dist/fragment-DHJiX0-a.js.map +0 -1
- package/dist/views/default-crash-page.d.ts +0 -8
- package/dist/views/default-view.d.ts +0 -2
- package/dist/views/fragment.d.ts +0 -2
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
var
|
|
2
|
-
var ce = (t, e, n) => e in t ?
|
|
3
|
-
var
|
|
1
|
+
var ue = Object.defineProperty;
|
|
2
|
+
var ce = (t, e, n) => e in t ? ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var f = (t, e, n) => ce(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
function le(t) {
|
|
5
5
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
7
|
+
var j = { exports: {} }, W;
|
|
8
8
|
function ae() {
|
|
9
|
-
return
|
|
9
|
+
return W || (W = 1, function(t, e) {
|
|
10
10
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
11
11
|
var n = /* @__PURE__ */ function() {
|
|
12
|
-
function
|
|
13
|
-
var
|
|
12
|
+
function u(l, d) {
|
|
13
|
+
var h = [], C = !0, w = !1, k = void 0;
|
|
14
14
|
try {
|
|
15
|
-
for (var v
|
|
15
|
+
for (var $, v = l[Symbol.iterator](); !(C = ($ = v.next()).done) && (h.push($.value), !(d && h.length === d)); C = !0) ;
|
|
16
16
|
} catch (m) {
|
|
17
|
-
|
|
17
|
+
w = !0, k = m;
|
|
18
18
|
} finally {
|
|
19
19
|
try {
|
|
20
|
-
!C &&
|
|
20
|
+
!C && v.return && v.return();
|
|
21
21
|
} finally {
|
|
22
|
-
if (
|
|
22
|
+
if (w) throw k;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return h;
|
|
26
26
|
}
|
|
27
|
-
return function(
|
|
28
|
-
if (Array.isArray(
|
|
29
|
-
if (Symbol.iterator in Object(
|
|
27
|
+
return function(l, d) {
|
|
28
|
+
if (Array.isArray(l)) return l;
|
|
29
|
+
if (Symbol.iterator in Object(l)) return u(l, d);
|
|
30
30
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
31
31
|
};
|
|
32
|
-
}(), o = function(
|
|
33
|
-
return
|
|
34
|
-
return 16 >
|
|
32
|
+
}(), o = function(u) {
|
|
33
|
+
return u.reduce(function(l, d) {
|
|
34
|
+
return 16 > d ? l + "0" + d.toString(16) : l + d.toString(16);
|
|
35
35
|
}, "#");
|
|
36
|
-
}, r = function(
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
return
|
|
40
|
-
}, k =
|
|
41
|
-
return [k, v
|
|
42
|
-
}, s = function(
|
|
43
|
-
var C =
|
|
44
|
-
return m * (
|
|
45
|
-
}, k =
|
|
46
|
-
return [k, v
|
|
47
|
-
}, i = function(
|
|
48
|
-
return
|
|
49
|
-
return
|
|
36
|
+
}, r = function(u, l, d) {
|
|
37
|
+
var h = 0.5 > d ? d * (1 + l) : d + l - d * l, C = 2 * d - h, w = function(m, p, a) {
|
|
38
|
+
var y = Math.round, g = 0 > a ? a + 1 : 1 < a ? a - 1 : a;
|
|
39
|
+
return g = g < 1 / 6 ? m + 6 * (p - m) * g : g < 1 / 2 ? p : g < 2 / 3 ? m + 6 * (p - m) * (2 / 3 - g) : m, y(255 * g);
|
|
40
|
+
}, k = w(C, h, u + 1 / 3), $ = w(C, h, u), v = w(C, h, u - 1 / 3);
|
|
41
|
+
return [k, $, v];
|
|
42
|
+
}, s = function(u, l, d, h) {
|
|
43
|
+
var C = u % 1007 / 1007, w = function(m, p, a) {
|
|
44
|
+
return m * (a - p) + p;
|
|
45
|
+
}, k = w(C, l.min, l.max), $ = w(C, d.min, d.max), v = w(C, h.max, h.min);
|
|
46
|
+
return [k, $, v];
|
|
47
|
+
}, i = function(u) {
|
|
48
|
+
return u.split("").reduce(function(l, d, h) {
|
|
49
|
+
return l * d.charCodeAt(0) * h + 1;
|
|
50
50
|
}, 1);
|
|
51
|
-
},
|
|
52
|
-
var
|
|
53
|
-
return
|
|
51
|
+
}, c = function(u) {
|
|
52
|
+
var l = u.str, d = u.hue, h = d === void 0 ? { min: 0, max: 360 } : d, C = u.sat, w = C === void 0 ? { min: 0.35, max: 0.65 } : C, k = u.light, $ = k === void 0 ? { min: 0.3, max: 0.7 } : k, v = u.hashFunction, m = v === void 0 ? i : v, p = u.scheme, a = p === void 0 ? "hex" : p, y = s(m(l), h, w, $), g = n(y, 3), S = g[0], F = g[1], B = g[2], K = r(S / 360, F, B), ie = o(K);
|
|
53
|
+
return a === "hsl" ? [S, F, B] : a === "rgb" ? K : ie;
|
|
54
54
|
};
|
|
55
|
-
e.default =
|
|
56
|
-
}(
|
|
55
|
+
e.default = c, t.exports = e.default;
|
|
56
|
+
}(j, j.exports)), j.exports;
|
|
57
57
|
}
|
|
58
58
|
var de = ae();
|
|
59
|
-
const
|
|
60
|
-
function
|
|
59
|
+
const fe = /* @__PURE__ */ le(de);
|
|
60
|
+
function q(t) {
|
|
61
61
|
if (t === void 0)
|
|
62
62
|
return "undefined";
|
|
63
63
|
if (t === null)
|
|
@@ -69,38 +69,38 @@ function R(t) {
|
|
|
69
69
|
case "function":
|
|
70
70
|
return Y(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
|
-
function
|
|
81
|
-
const e = t[0], n = (o) =>
|
|
80
|
+
function z(...t) {
|
|
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
|
-
function
|
|
85
|
-
const e = t[0], n =
|
|
86
|
-
if (
|
|
84
|
+
function Oe(...t) {
|
|
85
|
+
const e = t[0], n = A(t[2]) ? t[2] : "Expected an array of valid items. Got type: %t, value: %v", o = (r) => {
|
|
86
|
+
if (P(r) && r.every((s) => e(s)))
|
|
87
87
|
return !0;
|
|
88
88
|
throw new TypeError(_(r, n));
|
|
89
89
|
};
|
|
90
90
|
return t.length < 2 ? o : o(t[1]);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function A(t) {
|
|
93
93
|
return typeof t == "string";
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
if (
|
|
95
|
+
function Ve(t, e) {
|
|
96
|
+
if (A(t))
|
|
97
97
|
return !0;
|
|
98
98
|
throw new TypeError(_(t, e ?? "Expected a string. Got type: %t, value: %v"));
|
|
99
99
|
}
|
|
100
100
|
function E(t) {
|
|
101
101
|
return typeof t == "function" && !Y(t);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function D(t) {
|
|
104
104
|
return typeof t == "number" && !isNaN(t);
|
|
105
105
|
}
|
|
106
106
|
function he(t) {
|
|
@@ -112,37 +112,37 @@ function Y(t) {
|
|
|
112
112
|
return typeof t == "function" && /^\s*class\s+/.test(t.toString());
|
|
113
113
|
}
|
|
114
114
|
function Pe(...t) {
|
|
115
|
-
const e = t[0], n =
|
|
115
|
+
const e = t[0], n = A(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
118
|
throw new TypeError(_(r, n));
|
|
119
119
|
};
|
|
120
120
|
return t.length < 2 ? o : o(t[1]);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
return t != null && typeof t == "object" && !
|
|
122
|
+
function L(t) {
|
|
123
|
+
return t != null && typeof t == "object" && !P(t);
|
|
124
124
|
}
|
|
125
125
|
function _(t, e) {
|
|
126
126
|
var r;
|
|
127
|
-
const n =
|
|
127
|
+
const n = q(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);
|
|
129
129
|
}
|
|
130
|
-
const
|
|
130
|
+
const Fe = () => {
|
|
131
131
|
};
|
|
132
|
-
function
|
|
132
|
+
function H(t) {
|
|
133
133
|
return t != null && typeof t == "object" && !Array.isArray(t) && Object.getPrototypeOf(t) === Object.getPrototypeOf({});
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function I(t, e) {
|
|
136
136
|
if (t === e)
|
|
137
137
|
return !0;
|
|
138
|
-
if (
|
|
138
|
+
if (b(t) || b(e))
|
|
139
139
|
return !1;
|
|
140
|
-
if (
|
|
140
|
+
if (H(t) && H(e)) {
|
|
141
141
|
const n = Object.keys(t), o = Object.keys(e);
|
|
142
142
|
if (n.length !== o.length)
|
|
143
143
|
return !1;
|
|
144
144
|
for (const r in t)
|
|
145
|
-
if (!
|
|
145
|
+
if (!I(t[r], e[r]))
|
|
146
146
|
return !1;
|
|
147
147
|
return !0;
|
|
148
148
|
}
|
|
@@ -150,13 +150,13 @@ function L(t, e) {
|
|
|
150
150
|
if (t.length !== e.length)
|
|
151
151
|
return !1;
|
|
152
152
|
for (const n in t)
|
|
153
|
-
if (!
|
|
153
|
+
if (!I(t[n], e[n]))
|
|
154
154
|
return !1;
|
|
155
155
|
return !0;
|
|
156
156
|
}
|
|
157
157
|
return t === e;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function pe(t, e) {
|
|
160
160
|
const n = (o) => {
|
|
161
161
|
const r = {};
|
|
162
162
|
for (const s in o)
|
|
@@ -171,8 +171,8 @@ function Ue() {
|
|
|
171
171
|
if (typeof global < "u" && global.console)
|
|
172
172
|
return global.console;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
return
|
|
174
|
+
function je(t) {
|
|
175
|
+
return fe({
|
|
176
176
|
str: t,
|
|
177
177
|
sat: { min: 0.35, max: 0.55 },
|
|
178
178
|
light: { min: 0.6, max: 0.6 }
|
|
@@ -200,20 +200,20 @@ function Ie(t) {
|
|
|
200
200
|
return !(s.some((i) => i(o)) || r.length > 0 && !r.some((i) => i(o)));
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function b(t) {
|
|
204
204
|
return !(t == null || typeof t != "object" || typeof t.get != "function" || typeof t.watch != "function");
|
|
205
205
|
}
|
|
206
206
|
function Z(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
|
|
210
|
-
return
|
|
209
|
+
function T(t) {
|
|
210
|
+
return b(t) ? t.get() : t;
|
|
211
211
|
}
|
|
212
212
|
function J(t) {
|
|
213
|
-
return
|
|
213
|
+
return b(t) ? t : R(t);
|
|
214
214
|
}
|
|
215
215
|
function Le(t, e) {
|
|
216
|
-
const [n, o] =
|
|
216
|
+
const [n, o] = O(t, e);
|
|
217
217
|
return {
|
|
218
218
|
get: n.get,
|
|
219
219
|
watch: n.watch,
|
|
@@ -227,14 +227,14 @@ function Ge(t, e) {
|
|
|
227
227
|
set: e
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function qe(t, e) {
|
|
231
231
|
return function(o) {
|
|
232
232
|
const r = t.get();
|
|
233
233
|
let s;
|
|
234
234
|
typeof o == "function" ? s = o(r) : s = o, e(s, r);
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function R(t) {
|
|
238
238
|
return {
|
|
239
239
|
get() {
|
|
240
240
|
return t;
|
|
@@ -245,207 +245,210 @@ function B(t) {
|
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function O(t, e) {
|
|
249
249
|
let n = t, o = [];
|
|
250
250
|
function r() {
|
|
251
|
-
for (const
|
|
252
|
-
|
|
251
|
+
for (const u of o)
|
|
252
|
+
u(n);
|
|
253
253
|
}
|
|
254
|
-
function s(
|
|
255
|
-
return e != null && e.equality ? e.equality(
|
|
254
|
+
function s(u, l) {
|
|
255
|
+
return e != null && e.equality ? e.equality(u, l) : I(u, l);
|
|
256
256
|
}
|
|
257
257
|
const i = {
|
|
258
258
|
get() {
|
|
259
|
-
return
|
|
259
|
+
return T(n);
|
|
260
260
|
},
|
|
261
|
-
watch(
|
|
262
|
-
return o.push(
|
|
263
|
-
o.splice(o.indexOf(
|
|
261
|
+
watch(u, l) {
|
|
262
|
+
return o.push(u), l != null && l.lazy || u(i.get()), function() {
|
|
263
|
+
o.splice(o.indexOf(u), 1);
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
266
|
+
};
|
|
267
|
+
function c(u) {
|
|
268
|
+
let l;
|
|
269
|
+
typeof u == "function" ? l = u(n) : l = u, s(l, n) || (n = l, r());
|
|
270
|
+
}
|
|
271
|
+
return [i, c];
|
|
270
272
|
}
|
|
271
|
-
const
|
|
272
|
-
function
|
|
273
|
-
t = t.map((p) =>
|
|
274
|
-
let o = new Array(t.length).fill(
|
|
275
|
-
function
|
|
276
|
-
for (const
|
|
277
|
-
|
|
273
|
+
const me = Symbol("EMPTY");
|
|
274
|
+
function ye(t, e, n) {
|
|
275
|
+
t = t.map((p) => b(p) ? p : R(p));
|
|
276
|
+
let o = new Array(t.length).fill(me, 0, t.length), r, s = [], i = !1, c = [], u, l;
|
|
277
|
+
function d(p = w()) {
|
|
278
|
+
for (const a of s)
|
|
279
|
+
a(p);
|
|
278
280
|
}
|
|
279
|
-
function
|
|
280
|
-
return n != null && n.equality ? n.equality(p,
|
|
281
|
+
function h(p, a) {
|
|
282
|
+
return n != null && n.equality ? n.equality(p, a) : I(p, a);
|
|
281
283
|
}
|
|
282
284
|
function C() {
|
|
283
|
-
const p = t.map((
|
|
284
|
-
for (let
|
|
285
|
-
if (!
|
|
285
|
+
const p = t.map((a) => a.get());
|
|
286
|
+
for (let a = 0; a < t.length; a++)
|
|
287
|
+
if (!h(p[a], o[a])) {
|
|
286
288
|
k(e(...p)), o = p;
|
|
287
289
|
break;
|
|
288
290
|
}
|
|
289
291
|
}
|
|
290
|
-
function
|
|
291
|
-
return i || C(),
|
|
292
|
+
function w() {
|
|
293
|
+
return i || C(), l = T(r), l;
|
|
292
294
|
}
|
|
293
295
|
function k(p) {
|
|
294
|
-
p !== r && (
|
|
295
|
-
const
|
|
296
|
-
|
|
296
|
+
p !== r && (u && (u(), u = void 0), r = p, l = T(p), b(p) && i && (u = p.watch((a) => {
|
|
297
|
+
const y = T(a);
|
|
298
|
+
h(y, l) || (l = y, d(y));
|
|
297
299
|
})));
|
|
298
300
|
}
|
|
299
|
-
function
|
|
301
|
+
function $() {
|
|
300
302
|
let p = [...o];
|
|
301
|
-
for (let
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
const
|
|
306
|
-
o[
|
|
303
|
+
for (let a = 0; a < t.length; a++) {
|
|
304
|
+
const y = t[a];
|
|
305
|
+
c.push(
|
|
306
|
+
y.watch((g) => {
|
|
307
|
+
const S = o[a];
|
|
308
|
+
o[a] = g, i && !h(g, S) && (k(e(...o)), d(T(r)));
|
|
307
309
|
})
|
|
308
310
|
);
|
|
309
311
|
}
|
|
310
312
|
i = !0;
|
|
311
|
-
for (let
|
|
312
|
-
if (!
|
|
313
|
-
k(e(...o)),
|
|
313
|
+
for (let a = 0; a < t.length; a++)
|
|
314
|
+
if (!h(o[a], p[a])) {
|
|
315
|
+
k(e(...o)), d(T(r));
|
|
314
316
|
break;
|
|
315
317
|
}
|
|
316
318
|
}
|
|
317
|
-
function
|
|
318
|
-
for (const p of
|
|
319
|
+
function v() {
|
|
320
|
+
for (const p of c)
|
|
319
321
|
p();
|
|
320
|
-
|
|
322
|
+
c = [], u && (u(), u = void 0), i = !1;
|
|
321
323
|
}
|
|
322
324
|
return {
|
|
323
325
|
get() {
|
|
324
|
-
return
|
|
326
|
+
return w();
|
|
325
327
|
},
|
|
326
|
-
watch(p,
|
|
327
|
-
return i ||
|
|
328
|
-
s.splice(s.indexOf(p), 1), i && s.length === 0 &&
|
|
328
|
+
watch(p, a) {
|
|
329
|
+
return i || $(), s.push(p), a != null && a.lazy || p(w()), function() {
|
|
330
|
+
s.splice(s.indexOf(p), 1), i && s.length === 0 && v();
|
|
329
331
|
};
|
|
330
332
|
}
|
|
331
333
|
};
|
|
332
334
|
}
|
|
333
|
-
function
|
|
335
|
+
function G(t, e) {
|
|
334
336
|
if (t.length === 0)
|
|
335
337
|
throw new TypeError("Expected at least one signal.");
|
|
336
|
-
if (t.some((n) => !
|
|
338
|
+
if (t.some((n) => !b(n)))
|
|
337
339
|
throw new TypeError("All values must be signals");
|
|
338
|
-
return t = t.map((n) =>
|
|
340
|
+
return t = t.map((n) => b(n) ? n : R(n)), t.length > 1 ? ye(t, e).watch(() => null) : t[0].watch(e);
|
|
339
341
|
}
|
|
340
|
-
|
|
342
|
+
function ge(t) {
|
|
343
|
+
for (var e, n, o = arguments, r = 1, s = "", i = "", c = [0], u = function(h) {
|
|
344
|
+
r === 1 && (h || (s = s.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? c.push(h ? o[h] : s) : r === 3 && (h || s) ? (c[1] = h ? o[h] : s, r = 2) : r === 2 && s === "..." && h ? c[2] = Object.assign(c[2] || {}, o[h]) : r === 2 && s && !h ? (c[2] = c[2] || {})[s] = !0 : r >= 5 && (r === 5 ? ((c[2] = c[2] || {})[n] = h ? s ? s + o[h] : o[h] : s, r = 6) : (h || s) && (c[2][n] += h ? s + o[h] : s)), s = "";
|
|
345
|
+
}, l = 0; l < t.length; l++) {
|
|
346
|
+
l && (r === 1 && u(), u(l));
|
|
347
|
+
for (var d = 0; d < t[l].length; d++) e = t[l][d], r === 1 ? e === "<" ? (u(), c = [c, "", null], r = 3) : s += e : r === 4 ? s === "--" && e === ">" ? (r = 1, s = "") : s = e + s[0] : i ? e === i ? i = "" : s += e : e === '"' || e === "'" ? i = e : e === ">" ? (u(), r = 1) : r && (e === "=" ? (r = 5, n = s, s = "") : e === "/" && (r < 5 || t[l][d + 1] === ">") ? (u(), r === 3 && (c = c[0]), r = c, (c = c[0]).push(this.apply(null, r.slice(1))), r = 0) : e === " " || e === " " || e === `
|
|
348
|
+
` || e === "\r" ? (u(), r = 2) : s += e), r === 3 && s === "!--" && (r = 4, c = c[0]);
|
|
349
|
+
}
|
|
350
|
+
return u(), c.length > 2 ? c.slice(1) : c[1];
|
|
351
|
+
}
|
|
352
|
+
class Ce {
|
|
341
353
|
constructor(e) {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
this.$predicate = e.$predicate, this.thenContent = e.thenContent ?
|
|
353
|
-
}
|
|
354
|
-
get
|
|
354
|
+
f(this, "node");
|
|
355
|
+
f(this, "endNode");
|
|
356
|
+
f(this, "$predicate");
|
|
357
|
+
f(this, "stopCallback");
|
|
358
|
+
f(this, "thenContent");
|
|
359
|
+
f(this, "elseContent");
|
|
360
|
+
f(this, "connectedContent", []);
|
|
361
|
+
f(this, "elementContext");
|
|
362
|
+
f(this, "initialUpdateHappened", !1);
|
|
363
|
+
f(this, "previousValue");
|
|
364
|
+
this.$predicate = e.$predicate, this.thenContent = e.thenContent ? U(e.thenContent) : void 0, this.elseContent = e.elseContent ? U(e.elseContent) : void 0, this.elementContext = e.elementContext, this.elementContext.root.getEnv() === "development" ? (this.node = document.createComment("Conditional"), this.endNode = document.createComment("/Conditional")) : (this.node = document.createTextNode(""), this.endNode = document.createTextNode(""));
|
|
365
|
+
}
|
|
366
|
+
get isMounted() {
|
|
355
367
|
return this.node.parentNode != null;
|
|
356
368
|
}
|
|
357
|
-
|
|
358
|
-
this.
|
|
369
|
+
mount(e, n) {
|
|
370
|
+
this.isMounted || (e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null), this.elementContext.root.getEnv() === "development" && e.insertBefore(this.endNode, this.node.nextSibling), this.stopCallback = this.$predicate.watch((o) => {
|
|
359
371
|
(!this.initialUpdateHappened || o && !this.previousValue || !o && this.previousValue) && (this.update(o), this.initialUpdateHappened = !0, this.previousValue = o);
|
|
360
372
|
}));
|
|
361
373
|
}
|
|
362
|
-
|
|
374
|
+
unmount() {
|
|
363
375
|
var e, n;
|
|
364
376
|
this.stopCallback && (this.stopCallback(), this.stopCallback = void 0);
|
|
365
377
|
for (const o of this.connectedContent)
|
|
366
|
-
o.
|
|
367
|
-
this.connectedContent = [], this.
|
|
378
|
+
o.unmount();
|
|
379
|
+
this.connectedContent = [], this.isMounted && ((e = this.node.parentNode) == null || e.removeChild(this.node), (n = this.endNode.parentNode) == null || n.removeChild(this.endNode));
|
|
368
380
|
}
|
|
369
381
|
update(e) {
|
|
370
382
|
var n;
|
|
371
383
|
for (const o of this.connectedContent)
|
|
372
|
-
o.
|
|
384
|
+
o.unmount();
|
|
373
385
|
if (this.connectedContent = [], this.node.parentNode != null) {
|
|
374
|
-
e && this.thenContent ? this.connectedContent =
|
|
386
|
+
e && this.thenContent ? this.connectedContent = x(this.elementContext, this.thenContent) : !e && this.elseContent && (this.connectedContent = x(this.elementContext, this.elseContent));
|
|
375
387
|
for (let o = 0; o < this.connectedContent.length; o++) {
|
|
376
388
|
const r = this.connectedContent[o], s = ((n = this.connectedContent[o - 1]) == null ? void 0 : n.node) ?? this.node;
|
|
377
|
-
r.
|
|
389
|
+
r.mount(this.node.parentNode, s);
|
|
378
390
|
}
|
|
379
|
-
this.elementContext.root.
|
|
391
|
+
this.elementContext.root.getEnv() === "development" && (this.node.textContent = `Conditional (${e ? "truthy" : "falsy"})`);
|
|
380
392
|
}
|
|
381
393
|
}
|
|
382
|
-
async setChildren(e) {
|
|
383
|
-
}
|
|
384
394
|
}
|
|
385
395
|
let Q = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce((e, n) => (n &= 63, n < 36 ? e += n.toString(36) : n < 62 ? e += (n - 26).toString(36).toUpperCase() : n > 62 ? e += "-" : e += "_", e), "");
|
|
386
|
-
const
|
|
396
|
+
const be = (t) => /^on[A-Z]/.test(t);
|
|
387
397
|
class we {
|
|
388
398
|
constructor({ tag: e, props: n, children: o, elementContext: r }) {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
399
|
+
f(this, "node");
|
|
400
|
+
f(this, "props");
|
|
401
|
+
f(this, "children");
|
|
402
|
+
f(this, "stopCallbacks", []);
|
|
403
|
+
f(this, "elementContext");
|
|
404
|
+
f(this, "uniqueId", Q());
|
|
395
405
|
// Prevents 'onClickOutside' handlers from firing in the same cycle in which the element is connected.
|
|
396
|
-
|
|
397
|
-
if (r = { ...r }, e.toLowerCase() === "svg" && (r.isSVG = !0), r.isSVG ? this.node = document.createElementNS("http://www.w3.org/2000/svg", e) : this.node = document.createElement(e), r.root.
|
|
406
|
+
f(this, "canClickAway", !1);
|
|
407
|
+
if (r = { ...r }, e.toLowerCase() === "svg" && (r.isSVG = !0), r.isSVG ? this.node = document.createElementNS("http://www.w3.org/2000/svg", e) : this.node = document.createElement(e), r.root.getEnv() === "development" && (this.node.dataset.uniqueId = this.uniqueId), n.ref)
|
|
398
408
|
if (oe(n.ref))
|
|
399
409
|
n.ref.node = this.node;
|
|
400
410
|
else
|
|
401
411
|
throw new Error("Expected ref to be a Ref object. Got: " + n.ref);
|
|
402
412
|
this.props = {
|
|
403
|
-
...
|
|
413
|
+
...pe(["ref", "class", "className"], n),
|
|
404
414
|
class: n.className ?? n.class
|
|
405
|
-
}, this.children = o ?
|
|
415
|
+
}, this.children = o ? x(r, o) : [], this.elementContext = r;
|
|
406
416
|
}
|
|
407
|
-
get
|
|
417
|
+
get isMounted() {
|
|
408
418
|
return this.node.parentNode != null;
|
|
409
419
|
}
|
|
410
|
-
|
|
420
|
+
mount(e, n) {
|
|
411
421
|
if (e == null)
|
|
412
422
|
throw new Error(`HTML element requires a parent element as the first argument to connect. Got: ${e}`);
|
|
413
|
-
if (!this.
|
|
423
|
+
if (!this.isMounted) {
|
|
414
424
|
for (const o of this.children)
|
|
415
|
-
o.
|
|
425
|
+
o.mount(this.node);
|
|
416
426
|
this.applyProps(this.node, this.props), this.props.style && this.applyStyles(this.node, this.props.style, this.stopCallbacks), this.props.class && this.applyClasses(this.node, this.props.class, this.stopCallbacks);
|
|
417
427
|
}
|
|
418
428
|
e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null), setTimeout(() => {
|
|
419
429
|
this.canClickAway = !0;
|
|
420
430
|
}, 0);
|
|
421
431
|
}
|
|
422
|
-
|
|
432
|
+
unmount() {
|
|
423
433
|
var e;
|
|
424
|
-
if (this.
|
|
434
|
+
if (this.isMounted) {
|
|
425
435
|
for (const n of this.children)
|
|
426
|
-
n.
|
|
436
|
+
n.unmount();
|
|
427
437
|
(e = this.node.parentNode) == null || e.removeChild(this.node), this.canClickAway = !1;
|
|
428
438
|
for (const n of this.stopCallbacks)
|
|
429
439
|
n();
|
|
430
440
|
this.stopCallbacks = [];
|
|
431
441
|
}
|
|
432
442
|
}
|
|
433
|
-
setChildren(e) {
|
|
434
|
-
var s, i;
|
|
435
|
-
const n = this.children, o = [], r = Math.max(n.length, e.length);
|
|
436
|
-
for (let l = 0; l < r; l++)
|
|
437
|
-
!n[l] && e[l] ? (o[l] = e[l], o[l].connect(this.node, (s = o[l - 1]) == null ? void 0 : s.node)) : n[l] && !e[l] ? n[l].disconnect() : n[l] != e[l] && (o[l] = e[l], n[l].disconnect(), o[l].connect(this.node, (i = o[l - 1]) == null ? void 0 : i.node));
|
|
438
|
-
this.children = o;
|
|
439
|
-
}
|
|
440
443
|
getUpdateKey(e, n) {
|
|
441
444
|
return `${this.uniqueId}:${e}:${n}`;
|
|
442
445
|
}
|
|
443
446
|
applyProps(e, n) {
|
|
444
447
|
const o = (r, s, i) => {
|
|
445
|
-
|
|
446
|
-
r.watch((
|
|
448
|
+
b(r) ? this.stopCallbacks.push(
|
|
449
|
+
r.watch((c) => {
|
|
447
450
|
this.elementContext.root.render.update(() => {
|
|
448
|
-
s(
|
|
451
|
+
s(c);
|
|
449
452
|
}, i);
|
|
450
453
|
})
|
|
451
454
|
) : this.elementContext.root.render.update(() => {
|
|
@@ -456,50 +459,50 @@ class we {
|
|
|
456
459
|
const s = n[r];
|
|
457
460
|
if (r === "attributes") {
|
|
458
461
|
const i = s;
|
|
459
|
-
for (const
|
|
462
|
+
for (const c in i)
|
|
460
463
|
o(
|
|
461
|
-
i[
|
|
462
|
-
(
|
|
463
|
-
|
|
464
|
+
i[c],
|
|
465
|
+
(u) => {
|
|
466
|
+
u == null ? e.removeAttribute(c) : e.setAttribute(c, String(u));
|
|
464
467
|
},
|
|
465
|
-
this.getUpdateKey("attr",
|
|
468
|
+
this.getUpdateKey("attr", c)
|
|
466
469
|
);
|
|
467
470
|
} else if (r === "eventListeners") {
|
|
468
471
|
const i = s;
|
|
469
|
-
for (const
|
|
470
|
-
const
|
|
471
|
-
e.addEventListener(
|
|
472
|
-
e.removeEventListener(
|
|
472
|
+
for (const c in i) {
|
|
473
|
+
const u = b(s) ? (l) => s.get()(l) : s;
|
|
474
|
+
e.addEventListener(c, u), this.stopCallbacks.push(() => {
|
|
475
|
+
e.removeEventListener(c, u);
|
|
473
476
|
});
|
|
474
477
|
}
|
|
475
478
|
} else if (r === "onClickOutside" || r === "onclickoutside") {
|
|
476
|
-
const i = (
|
|
477
|
-
this.canClickAway && !e.contains(
|
|
478
|
-
},
|
|
479
|
-
window.addEventListener("click", i,
|
|
480
|
-
window.removeEventListener("click", i,
|
|
479
|
+
const i = (u) => {
|
|
480
|
+
this.canClickAway && !e.contains(u.target) && (b(s) ? s.get()(u) : s(u));
|
|
481
|
+
}, c = { capture: !0 };
|
|
482
|
+
window.addEventListener("click", i, c), this.stopCallbacks.push(() => {
|
|
483
|
+
window.removeEventListener("click", i, c);
|
|
481
484
|
});
|
|
482
485
|
} else if (r === "$$value") {
|
|
483
486
|
if (!Z(s))
|
|
484
487
|
throw new TypeError(`$$value attribute must be a settable signal. Got: ${s}`);
|
|
485
488
|
o(
|
|
486
489
|
s,
|
|
487
|
-
(
|
|
488
|
-
e.value = String(
|
|
490
|
+
(c) => {
|
|
491
|
+
e.value = String(c);
|
|
489
492
|
},
|
|
490
493
|
this.getUpdateKey("attr", "value")
|
|
491
494
|
);
|
|
492
|
-
const i = (
|
|
493
|
-
const
|
|
494
|
-
s.set(
|
|
495
|
+
const i = (c) => {
|
|
496
|
+
const u = ke(s.get(), c.currentTarget.value);
|
|
497
|
+
s.set(u);
|
|
495
498
|
};
|
|
496
499
|
e.addEventListener("input", i), this.stopCallbacks.push(() => {
|
|
497
500
|
e.removeEventListener("input", i);
|
|
498
501
|
});
|
|
499
|
-
} else if (
|
|
500
|
-
const i = r.slice(2).toLowerCase(),
|
|
501
|
-
e.addEventListener(i,
|
|
502
|
-
e.removeEventListener(i,
|
|
502
|
+
} else if (be(r)) {
|
|
503
|
+
const i = r.slice(2).toLowerCase(), c = b(s) ? (u) => s.get()(u) : s;
|
|
504
|
+
e.addEventListener(i, c), this.stopCallbacks.push(() => {
|
|
505
|
+
e.removeEventListener(i, c);
|
|
503
506
|
});
|
|
504
507
|
} else if (r.includes("-"))
|
|
505
508
|
o(
|
|
@@ -509,7 +512,7 @@ class we {
|
|
|
509
512
|
},
|
|
510
513
|
this.getUpdateKey("attr", r)
|
|
511
514
|
);
|
|
512
|
-
else if (!
|
|
515
|
+
else if (!ve.includes(r))
|
|
513
516
|
if (this.elementContext.isSVG)
|
|
514
517
|
o(
|
|
515
518
|
s,
|
|
@@ -556,8 +559,8 @@ class we {
|
|
|
556
559
|
const i = r.toLowerCase();
|
|
557
560
|
o(
|
|
558
561
|
s,
|
|
559
|
-
(
|
|
560
|
-
|
|
562
|
+
(c) => {
|
|
563
|
+
c == null ? e.removeAttribute(i) : e.setAttribute(i, String(c));
|
|
561
564
|
},
|
|
562
565
|
this.getUpdateKey("attr", i)
|
|
563
566
|
);
|
|
@@ -592,35 +595,35 @@ class we {
|
|
|
592
595
|
e.style.cssText = "";
|
|
593
596
|
else if (typeof n == "string")
|
|
594
597
|
e.style.cssText = n;
|
|
595
|
-
else if (
|
|
598
|
+
else if (b(n)) {
|
|
596
599
|
let s;
|
|
597
|
-
const i = n.watch((
|
|
600
|
+
const i = n.watch((c) => {
|
|
598
601
|
this.elementContext.root.render.update(
|
|
599
602
|
() => {
|
|
600
|
-
E(s) && s(), e.style.cssText = "", s = this.applyStyles(e,
|
|
603
|
+
E(s) && s(), e.style.cssText = "", s = this.applyStyles(e, c, o);
|
|
601
604
|
},
|
|
602
605
|
this.getUpdateKey("styles", "*")
|
|
603
606
|
);
|
|
604
607
|
});
|
|
605
608
|
o.push(i), r.push(i);
|
|
606
|
-
} else if (
|
|
609
|
+
} else if (L(n)) {
|
|
607
610
|
n = n;
|
|
608
611
|
for (const s in n) {
|
|
609
|
-
const i = n[s],
|
|
610
|
-
if (
|
|
611
|
-
const
|
|
612
|
+
const i = n[s], c = s.startsWith("--") ? (u, l) => l == null ? e.style.removeProperty(u) : e.style.setProperty(u, l) : (u, l) => e.style[u] = l ?? "";
|
|
613
|
+
if (b(i)) {
|
|
614
|
+
const u = i.watch((l) => {
|
|
612
615
|
this.elementContext.root.render.update(
|
|
613
616
|
() => {
|
|
614
|
-
|
|
617
|
+
l != null ? c(s, l) : e.style.removeProperty(s);
|
|
615
618
|
},
|
|
616
619
|
this.getUpdateKey("style", s)
|
|
617
620
|
);
|
|
618
621
|
});
|
|
619
|
-
o.push(
|
|
620
|
-
} else if (
|
|
621
|
-
|
|
622
|
-
else if (
|
|
623
|
-
|
|
622
|
+
o.push(u), r.push(u);
|
|
623
|
+
} else if (A(i))
|
|
624
|
+
c(s, i);
|
|
625
|
+
else if (D(i))
|
|
626
|
+
c(s, String(i));
|
|
624
627
|
else
|
|
625
628
|
throw new TypeError(`Style properties should be strings, $states or numbers. Got (${s}: ${i})`);
|
|
626
629
|
}
|
|
@@ -633,12 +636,12 @@ class we {
|
|
|
633
636
|
}
|
|
634
637
|
applyClasses(e, n, o) {
|
|
635
638
|
const r = [];
|
|
636
|
-
if (
|
|
639
|
+
if (b(n)) {
|
|
637
640
|
let s;
|
|
638
|
-
const i = n.watch((
|
|
641
|
+
const i = n.watch((c) => {
|
|
639
642
|
this.elementContext.root.render.update(
|
|
640
643
|
() => {
|
|
641
|
-
E(s) && s(), e.removeAttribute("class"), s = this.applyClasses(e,
|
|
644
|
+
E(s) && s(), e.removeAttribute("class"), s = this.applyClasses(e, c, o);
|
|
642
645
|
},
|
|
643
646
|
this.getUpdateKey("attr", "class")
|
|
644
647
|
);
|
|
@@ -647,15 +650,15 @@ class we {
|
|
|
647
650
|
} else {
|
|
648
651
|
const s = X(n);
|
|
649
652
|
for (const i in s) {
|
|
650
|
-
const
|
|
651
|
-
if (
|
|
652
|
-
const
|
|
653
|
+
const c = s[i];
|
|
654
|
+
if (b(c)) {
|
|
655
|
+
const u = c.watch((l) => {
|
|
653
656
|
this.elementContext.root.render.update(() => {
|
|
654
|
-
|
|
657
|
+
l ? e.classList.add(i) : e.classList.remove(i);
|
|
655
658
|
});
|
|
656
659
|
});
|
|
657
|
-
o.push(
|
|
658
|
-
} else
|
|
660
|
+
o.push(u), r.push(u);
|
|
661
|
+
} else c && e.classList.add(i);
|
|
659
662
|
}
|
|
660
663
|
}
|
|
661
664
|
return function() {
|
|
@@ -666,37 +669,37 @@ class we {
|
|
|
666
669
|
}
|
|
667
670
|
function X(t) {
|
|
668
671
|
let e = {};
|
|
669
|
-
if (
|
|
672
|
+
if (A(t)) {
|
|
670
673
|
const n = t.split(" ");
|
|
671
674
|
for (const o of n)
|
|
672
675
|
e[o] = !0;
|
|
673
|
-
} else
|
|
676
|
+
} else L(t) ? Object.assign(e, t) : Array.isArray(t) && Array.from(t).filter((n) => n != null).forEach((n) => {
|
|
674
677
|
Object.assign(e, X(n));
|
|
675
678
|
});
|
|
676
679
|
return e;
|
|
677
680
|
}
|
|
678
|
-
function
|
|
681
|
+
function ke(t, e) {
|
|
679
682
|
const n = typeof t;
|
|
680
683
|
return n === "string" ? String(e) : n === "number" ? Number(e) : n === "boolean" ? !!e : e;
|
|
681
684
|
}
|
|
682
|
-
const
|
|
685
|
+
const ve = ["ref", "children", "class", "style", "data"];
|
|
683
686
|
class $e {
|
|
684
687
|
constructor({ signals: e, renderFn: n, elementContext: o }) {
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
688
|
+
f(this, "node");
|
|
689
|
+
f(this, "endNode");
|
|
690
|
+
f(this, "connectedViews", []);
|
|
691
|
+
f(this, "renderFn");
|
|
692
|
+
f(this, "elementContext");
|
|
693
|
+
f(this, "observerControls");
|
|
691
694
|
this.elementContext = o, this.renderFn = n, this.node = document.createComment("Observer"), this.endNode = document.createComment("/Observer");
|
|
692
695
|
let r;
|
|
693
696
|
this.observerControls = {
|
|
694
697
|
start: () => {
|
|
695
|
-
r == null && (r =
|
|
698
|
+
r == null && (r = G(e, (...s) => {
|
|
696
699
|
const i = this.renderFn(...s);
|
|
697
|
-
if (!
|
|
700
|
+
if (!se(i))
|
|
698
701
|
throw console.error(i), new TypeError(
|
|
699
|
-
`Observer received invalid value to render. Got type: ${
|
|
702
|
+
`Observer received invalid value to render. Got type: ${q(i)}, value: ${i}`
|
|
700
703
|
);
|
|
701
704
|
Array.isArray(i) ? this.update(...i) : this.update(i);
|
|
702
705
|
}));
|
|
@@ -706,335 +709,322 @@ class $e {
|
|
|
706
709
|
}
|
|
707
710
|
};
|
|
708
711
|
}
|
|
709
|
-
get
|
|
712
|
+
get isMounted() {
|
|
710
713
|
return this.node.parentNode != null;
|
|
711
714
|
}
|
|
712
|
-
|
|
713
|
-
this.
|
|
715
|
+
mount(e, n) {
|
|
716
|
+
this.isMounted || (e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null), this.observerControls.start());
|
|
714
717
|
}
|
|
715
|
-
|
|
718
|
+
unmount() {
|
|
716
719
|
var e;
|
|
717
|
-
this.observerControls.stop(), this.
|
|
718
|
-
}
|
|
719
|
-
async setChildren() {
|
|
720
|
-
console.warn("setChildren is not implemented for Dynamic");
|
|
720
|
+
this.observerControls.stop(), this.isMounted && (this.cleanup(), (e = this.node.parentNode) == null || e.removeChild(this.node));
|
|
721
721
|
}
|
|
722
722
|
cleanup() {
|
|
723
723
|
var e;
|
|
724
724
|
for (; this.connectedViews.length > 0; )
|
|
725
|
-
(e = this.connectedViews.pop()) == null || e.
|
|
725
|
+
(e = this.connectedViews.pop()) == null || e.unmount();
|
|
726
726
|
}
|
|
727
727
|
update(...e) {
|
|
728
728
|
var o, r;
|
|
729
|
-
if (this.cleanup(), e == null || !this.
|
|
729
|
+
if (this.cleanup(), e == null || !this.isMounted)
|
|
730
730
|
return;
|
|
731
|
-
const n = e.map((s) => ne(s) ? s :
|
|
731
|
+
const n = e.map((s) => ne(s) ? s : V(s) ? M(x(this.elementContext, s)) : M(x(this.elementContext, U(s))));
|
|
732
732
|
for (const s of n) {
|
|
733
733
|
const i = ((o = this.connectedViews.at(-1)) == null ? void 0 : o.node) || this.node;
|
|
734
|
-
s.
|
|
734
|
+
s.mount(this.node.parentNode, i), this.connectedViews.push(s);
|
|
735
735
|
}
|
|
736
|
-
if (this.elementContext.root.
|
|
736
|
+
if (this.elementContext.root.getEnv() === "development") {
|
|
737
737
|
const s = (r = this.connectedViews.at(-1)) == null ? void 0 : r.node;
|
|
738
738
|
this.endNode.previousSibling !== s && this.node.parentNode.insertBefore(this.endNode, (s == null ? void 0 : s.nextSibling) ?? null);
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
}
|
|
742
|
-
class
|
|
742
|
+
class Ne {
|
|
743
743
|
constructor(e) {
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
this.$children = e.$children, this.elementContext = e.elementContext, this.elementContext.root.
|
|
751
|
-
}
|
|
752
|
-
get
|
|
744
|
+
f(this, "node");
|
|
745
|
+
f(this, "endNode");
|
|
746
|
+
f(this, "$children");
|
|
747
|
+
f(this, "stopCallback");
|
|
748
|
+
f(this, "connectedChildren", []);
|
|
749
|
+
f(this, "elementContext");
|
|
750
|
+
this.$children = e.$children, this.elementContext = e.elementContext, this.elementContext.root.getEnv() === "development" ? (this.node = document.createComment("Outlet"), this.endNode = document.createComment("/Outlet")) : (this.node = document.createTextNode(""), this.endNode = document.createTextNode(""));
|
|
751
|
+
}
|
|
752
|
+
get isMounted() {
|
|
753
753
|
var e;
|
|
754
754
|
return ((e = this.node) == null ? void 0 : e.parentNode) != null;
|
|
755
755
|
}
|
|
756
|
-
|
|
757
|
-
this.
|
|
756
|
+
mount(e, n) {
|
|
757
|
+
this.isMounted || (e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null), this.stopCallback = this.$children.watch((o) => {
|
|
758
758
|
this.update(o);
|
|
759
759
|
}));
|
|
760
760
|
}
|
|
761
|
-
|
|
761
|
+
unmount() {
|
|
762
762
|
var e;
|
|
763
|
-
if (this.stopCallback && (this.stopCallback(), this.stopCallback = void 0), this.
|
|
763
|
+
if (this.stopCallback && (this.stopCallback(), this.stopCallback = void 0), this.isMounted) {
|
|
764
764
|
for (const n of this.connectedChildren)
|
|
765
|
-
n.
|
|
765
|
+
n.unmount();
|
|
766
766
|
this.connectedChildren = [], (e = this.endNode.parentNode) == null || e.removeChild(this.endNode);
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
update(e) {
|
|
770
770
|
var n, o, r;
|
|
771
771
|
for (const s of this.connectedChildren)
|
|
772
|
-
s.
|
|
772
|
+
s.unmount();
|
|
773
773
|
for (let s = 0; s < e.length; s++) {
|
|
774
|
-
const i = e[s],
|
|
775
|
-
i.
|
|
774
|
+
const i = e[s], c = s > 0 ? e[s] : void 0;
|
|
775
|
+
i.mount(this.node.parentElement, c == null ? void 0 : c.node);
|
|
776
776
|
}
|
|
777
|
-
this.connectedChildren = e, this.elementContext.root.
|
|
777
|
+
this.connectedChildren = e, this.elementContext.root.getEnv() === "development" && (this.node.textContent = `Outlet (${e.length} ${e.length === 1 ? "child" : "children"})`, (r = this.node.parentElement) == null || r.insertBefore(
|
|
778
778
|
this.endNode,
|
|
779
779
|
((o = (n = this.connectedChildren[this.connectedChildren.length - 1]) == null ? void 0 : n.node) == null ? void 0 : o.nextSibling) ?? null
|
|
780
780
|
));
|
|
781
781
|
}
|
|
782
|
-
setChildren(e) {
|
|
783
|
-
throw new Error("setChildren is not supported on Outlet");
|
|
784
|
-
}
|
|
785
782
|
}
|
|
786
|
-
class
|
|
783
|
+
class xe {
|
|
787
784
|
constructor(e) {
|
|
788
|
-
|
|
789
|
-
|
|
785
|
+
f(this, "config");
|
|
786
|
+
f(this, "handle");
|
|
790
787
|
this.config = e;
|
|
791
788
|
}
|
|
792
|
-
get
|
|
793
|
-
return this.handle ? this.handle.
|
|
789
|
+
get isMounted() {
|
|
790
|
+
return this.handle ? this.handle.isMounted : !1;
|
|
794
791
|
}
|
|
795
|
-
|
|
792
|
+
mount(e, n) {
|
|
796
793
|
const { content: o, parent: r } = this.config;
|
|
797
|
-
ne(o) ? this.handle = o :
|
|
794
|
+
ne(o) ? this.handle = o : V(o) ? this.handle = M(x(this.config.elementContext, o)) : this.handle = M(x(this.config.elementContext, U(o))), this.handle.mount(r);
|
|
798
795
|
}
|
|
799
|
-
|
|
796
|
+
unmount() {
|
|
800
797
|
var e;
|
|
801
|
-
(e = this.handle) != null && e.
|
|
802
|
-
}
|
|
803
|
-
setChildren(e) {
|
|
804
|
-
var n;
|
|
805
|
-
(n = this.handle) == null || n.setChildren(e);
|
|
798
|
+
(e = this.handle) != null && e.isMounted && this.handle.unmount();
|
|
806
799
|
}
|
|
807
800
|
}
|
|
808
801
|
function ee(t, e, n, o = []) {
|
|
809
802
|
t = { ...t };
|
|
810
|
-
const [r, s] =
|
|
803
|
+
const [r, s] = O(x(t, o));
|
|
811
804
|
let i = !1;
|
|
812
|
-
const
|
|
805
|
+
const c = [], u = [], l = [], d = [], h = [], C = Q(), [w, k] = O(e.name), $ = t.root.createLogger(w, { uid: C }), v = {
|
|
813
806
|
get uid() {
|
|
814
807
|
return C;
|
|
815
808
|
},
|
|
816
|
-
setName(
|
|
817
|
-
k(
|
|
809
|
+
setName(a) {
|
|
810
|
+
k(a);
|
|
818
811
|
},
|
|
819
|
-
beforeMount(
|
|
820
|
-
|
|
812
|
+
beforeMount(a) {
|
|
813
|
+
u.push(a);
|
|
821
814
|
},
|
|
822
|
-
onMount(
|
|
823
|
-
|
|
815
|
+
onMount(a) {
|
|
816
|
+
l.push(a);
|
|
824
817
|
},
|
|
825
|
-
beforeUnmount(
|
|
826
|
-
|
|
818
|
+
beforeUnmount(a) {
|
|
819
|
+
d.push(a);
|
|
827
820
|
},
|
|
828
|
-
onUnmount(
|
|
829
|
-
|
|
821
|
+
onUnmount(a) {
|
|
822
|
+
h.push(a);
|
|
830
823
|
},
|
|
831
|
-
watch(
|
|
824
|
+
watch(a, y) {
|
|
832
825
|
if (i) {
|
|
833
|
-
const
|
|
834
|
-
return
|
|
826
|
+
const g = G(a, y);
|
|
827
|
+
return c.push(g), g;
|
|
835
828
|
} else {
|
|
836
|
-
let
|
|
837
|
-
return
|
|
838
|
-
|
|
839
|
-
}), function
|
|
840
|
-
|
|
829
|
+
let g, S = !1;
|
|
830
|
+
return l.push(() => {
|
|
831
|
+
S || (g = G(a, y), c.push(g));
|
|
832
|
+
}), function F() {
|
|
833
|
+
F != null && (S = !0, F());
|
|
841
834
|
};
|
|
842
835
|
}
|
|
843
836
|
},
|
|
844
837
|
outlet() {
|
|
845
|
-
return
|
|
838
|
+
return N("$outlet", { $children: r });
|
|
846
839
|
}
|
|
847
840
|
};
|
|
848
|
-
Object.assign(
|
|
841
|
+
Object.assign(v, $);
|
|
849
842
|
let m;
|
|
850
843
|
function p() {
|
|
851
|
-
let
|
|
844
|
+
let a;
|
|
852
845
|
try {
|
|
853
|
-
|
|
846
|
+
a = e(n, v);
|
|
854
847
|
} catch (y) {
|
|
855
|
-
throw y instanceof Error &&
|
|
848
|
+
throw y instanceof Error && $.crash(y), y;
|
|
856
849
|
}
|
|
857
|
-
if (
|
|
850
|
+
if (a instanceof Promise)
|
|
858
851
|
throw new TypeError("View function cannot return a Promise.");
|
|
859
|
-
if (
|
|
860
|
-
m =
|
|
861
|
-
else if (
|
|
862
|
-
m =
|
|
863
|
-
else if (
|
|
864
|
-
m =
|
|
865
|
-
|
|
852
|
+
if (a !== null) if (a instanceof Node)
|
|
853
|
+
m = M(x(t, N("$node", { value: a })));
|
|
854
|
+
else if (V(a) || z(V, a))
|
|
855
|
+
m = M(x(t, a));
|
|
856
|
+
else if (b(a))
|
|
857
|
+
m = M(
|
|
858
|
+
x(t, N("$observer", { signals: [a], renderFn: (y) => y }))
|
|
866
859
|
);
|
|
867
860
|
else {
|
|
868
861
|
const y = new TypeError(
|
|
869
|
-
`Expected '${e.name}' function to return a DOM node, Markup element, Readable or null. Got: ${
|
|
862
|
+
`Expected '${e.name}' function to return a DOM node, Markup element, Readable or null. Got: ${q(a)}`
|
|
870
863
|
);
|
|
871
|
-
|
|
864
|
+
$.crash(y);
|
|
872
865
|
}
|
|
873
866
|
}
|
|
874
867
|
return {
|
|
875
868
|
get node() {
|
|
876
869
|
return m == null ? void 0 : m.node;
|
|
877
870
|
},
|
|
878
|
-
get
|
|
871
|
+
get isMounted() {
|
|
879
872
|
return i;
|
|
880
873
|
},
|
|
881
|
-
|
|
882
|
-
const
|
|
883
|
-
if (!
|
|
884
|
-
for (p();
|
|
885
|
-
|
|
886
|
-
m && m.
|
|
887
|
-
for (;
|
|
888
|
-
|
|
874
|
+
mount(a, y) {
|
|
875
|
+
const g = i;
|
|
876
|
+
if (!g)
|
|
877
|
+
for (p(); u.length > 0; )
|
|
878
|
+
u.shift()();
|
|
879
|
+
m && m.mount(a, y), g || (i = !0, requestAnimationFrame(() => {
|
|
880
|
+
for (; l.length > 0; )
|
|
881
|
+
l.shift()();
|
|
889
882
|
}));
|
|
890
883
|
},
|
|
891
|
-
|
|
892
|
-
for (;
|
|
893
|
-
|
|
894
|
-
for (m && m.
|
|
895
|
-
|
|
896
|
-
for (;
|
|
897
|
-
|
|
884
|
+
unmount() {
|
|
885
|
+
for (; d.length > 0; )
|
|
886
|
+
d.shift()();
|
|
887
|
+
for (m && m.unmount(), i = !1; h.length > 0; )
|
|
888
|
+
h.shift()();
|
|
889
|
+
for (; c.length > 0; )
|
|
890
|
+
c.shift()();
|
|
898
891
|
},
|
|
899
|
-
|
|
900
|
-
s(
|
|
892
|
+
setChildren(a) {
|
|
893
|
+
s(a);
|
|
901
894
|
}
|
|
902
895
|
};
|
|
903
896
|
}
|
|
904
897
|
class Se {
|
|
905
898
|
constructor({ elementContext: e, $items: n, renderFn: o, keyFn: r }) {
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
this.elementContext = e, this.$items = n, this.renderFn = o, this.keyFn = r, this.elementContext.root.
|
|
915
|
-
}
|
|
916
|
-
get
|
|
899
|
+
f(this, "node");
|
|
900
|
+
f(this, "endNode");
|
|
901
|
+
f(this, "$items");
|
|
902
|
+
f(this, "stopCallback");
|
|
903
|
+
f(this, "connectedItems", []);
|
|
904
|
+
f(this, "elementContext");
|
|
905
|
+
f(this, "renderFn");
|
|
906
|
+
f(this, "keyFn");
|
|
907
|
+
this.elementContext = e, this.$items = n, this.renderFn = o, this.keyFn = r, this.elementContext.root.getEnv() === "development" ? (this.node = document.createComment("Repeat"), this.endNode = document.createComment("/Repeat")) : (this.node = document.createTextNode(""), this.endNode = document.createTextNode(""));
|
|
908
|
+
}
|
|
909
|
+
get isMounted() {
|
|
917
910
|
return this.node.parentNode != null;
|
|
918
911
|
}
|
|
919
|
-
|
|
920
|
-
this.
|
|
912
|
+
mount(e, n) {
|
|
913
|
+
this.isMounted || (e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null), this.stopCallback = this.$items.watch((o) => {
|
|
921
914
|
this._update(Array.from(o));
|
|
922
915
|
}));
|
|
923
916
|
}
|
|
924
|
-
|
|
917
|
+
unmount() {
|
|
925
918
|
var e, n;
|
|
926
|
-
this.stopCallback && (this.stopCallback(), this.stopCallback = void 0), this.
|
|
927
|
-
}
|
|
928
|
-
setChildren() {
|
|
929
|
-
console.warn("setChildren is not implemented for repeat()");
|
|
919
|
+
this.stopCallback && (this.stopCallback(), this.stopCallback = void 0), this.isMounted && ((e = this.node.parentNode) == null || e.removeChild(this.node), (n = this.endNode.parentNode) == null || n.removeChild(this.endNode)), this._cleanup();
|
|
930
920
|
}
|
|
931
921
|
_cleanup() {
|
|
932
922
|
for (const e of this.connectedItems)
|
|
933
|
-
e.handle.
|
|
923
|
+
e.handle.unmount();
|
|
934
924
|
this.connectedItems = [];
|
|
935
925
|
}
|
|
936
926
|
_update(e) {
|
|
937
|
-
var s, i,
|
|
938
|
-
if (e.length === 0 || !this.
|
|
927
|
+
var s, i, c;
|
|
928
|
+
if (e.length === 0 || !this.isMounted)
|
|
939
929
|
return this._cleanup();
|
|
940
930
|
const n = [];
|
|
941
931
|
let o = 0;
|
|
942
|
-
for (const
|
|
932
|
+
for (const u of e)
|
|
943
933
|
n.push({
|
|
944
|
-
key: this.keyFn(
|
|
945
|
-
value:
|
|
934
|
+
key: this.keyFn(u, o),
|
|
935
|
+
value: u,
|
|
946
936
|
index: o++
|
|
947
937
|
});
|
|
948
938
|
const r = [];
|
|
949
|
-
for (const
|
|
950
|
-
n.find((
|
|
951
|
-
for (const
|
|
952
|
-
const
|
|
953
|
-
if (
|
|
954
|
-
|
|
939
|
+
for (const u of this.connectedItems)
|
|
940
|
+
n.find((d) => d.key === u.key) || u.handle.unmount();
|
|
941
|
+
for (const u of n) {
|
|
942
|
+
const l = this.connectedItems.find((d) => d.key === u.key);
|
|
943
|
+
if (l)
|
|
944
|
+
l.setValue(u.value), l.setIndex(u.index), r[u.index] = l;
|
|
955
945
|
else {
|
|
956
|
-
const [
|
|
957
|
-
r[
|
|
958
|
-
key:
|
|
959
|
-
$value:
|
|
960
|
-
setValue:
|
|
946
|
+
const [d, h] = O(u.value), [C, w] = O(u.index);
|
|
947
|
+
r[u.index] = {
|
|
948
|
+
key: u.key,
|
|
949
|
+
$value: d,
|
|
950
|
+
setValue: h,
|
|
961
951
|
$index: C,
|
|
962
|
-
setIndex:
|
|
963
|
-
handle: ee(this.elementContext,
|
|
964
|
-
$value:
|
|
952
|
+
setIndex: w,
|
|
953
|
+
handle: ee(this.elementContext, Ee, {
|
|
954
|
+
$value: d,
|
|
965
955
|
$index: C,
|
|
966
956
|
renderFn: this.renderFn
|
|
967
957
|
})
|
|
968
958
|
};
|
|
969
959
|
}
|
|
970
960
|
}
|
|
971
|
-
for (let
|
|
972
|
-
const
|
|
973
|
-
|
|
961
|
+
for (let u = 0; u < r.length; u++) {
|
|
962
|
+
const l = r[u], d = ((s = r[u - 1]) == null ? void 0 : s.handle.node) ?? this.node;
|
|
963
|
+
l.handle.mount(this.node.parentNode, d);
|
|
974
964
|
}
|
|
975
|
-
if (this.connectedItems = r, this.elementContext.root.
|
|
965
|
+
if (this.connectedItems = r, this.elementContext.root.getEnv() === "development") {
|
|
976
966
|
this.node.textContent = `Repeat (${r.length} item${r.length === 1 ? "" : "s"})`;
|
|
977
|
-
const
|
|
978
|
-
(
|
|
967
|
+
const u = ((i = r.at(-1)) == null ? void 0 : i.handle.node) ?? this.node;
|
|
968
|
+
(c = this.node.parentNode) == null || c.insertBefore(this.endNode, u.nextSibling);
|
|
979
969
|
}
|
|
980
970
|
}
|
|
981
971
|
}
|
|
982
|
-
function
|
|
972
|
+
function Ee({ $value: t, $index: e, renderFn: n }, o) {
|
|
983
973
|
return n(t, e, o);
|
|
984
974
|
}
|
|
985
|
-
class
|
|
975
|
+
class Me {
|
|
986
976
|
constructor({ value: e }) {
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
977
|
+
f(this, "node", document.createTextNode(""));
|
|
978
|
+
f(this, "value", "");
|
|
979
|
+
f(this, "stopCallback");
|
|
990
980
|
this.value = e;
|
|
991
981
|
}
|
|
992
|
-
get
|
|
982
|
+
get isMounted() {
|
|
993
983
|
return this.node.parentNode != null;
|
|
994
984
|
}
|
|
995
|
-
async
|
|
996
|
-
this.
|
|
985
|
+
async mount(e, n = null) {
|
|
986
|
+
this.isMounted || (b(this.value) ? this.stopCallback = this.value.watch((o) => {
|
|
997
987
|
this.update(o);
|
|
998
988
|
}) : this.update(this.value)), e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null);
|
|
999
989
|
}
|
|
1000
|
-
async
|
|
1001
|
-
this.
|
|
990
|
+
async unmount() {
|
|
991
|
+
this.isMounted && (this.stopCallback && (this.stopCallback(), this.stopCallback = void 0), this.node.parentNode.removeChild(this.node));
|
|
1002
992
|
}
|
|
1003
993
|
update(e) {
|
|
1004
994
|
e != null ? this.node.textContent = e.toString() : this.node.textContent = "";
|
|
1005
995
|
}
|
|
1006
|
-
async setChildren() {
|
|
1007
|
-
}
|
|
1008
996
|
}
|
|
1009
997
|
const te = Symbol("Markup");
|
|
1010
|
-
function
|
|
1011
|
-
return
|
|
998
|
+
function V(t) {
|
|
999
|
+
return L(t) && t[te] === !0;
|
|
1012
1000
|
}
|
|
1013
1001
|
function ne(t) {
|
|
1014
|
-
return
|
|
1002
|
+
return L(t) && E(t.connect) && E(t.disconnect);
|
|
1015
1003
|
}
|
|
1016
|
-
function
|
|
1017
|
-
return
|
|
1004
|
+
function U(t) {
|
|
1005
|
+
return P(t) || (t = [t]), t.flat(1 / 0).filter((e) => e != null && e !== !1).map((e) => {
|
|
1018
1006
|
if (e instanceof Node)
|
|
1019
|
-
return
|
|
1020
|
-
if (
|
|
1007
|
+
return N("$node", { value: e });
|
|
1008
|
+
if (e instanceof re)
|
|
1009
|
+
return N("$node", { value: e.node });
|
|
1010
|
+
if (V(e))
|
|
1021
1011
|
return e;
|
|
1022
|
-
if (
|
|
1023
|
-
return
|
|
1024
|
-
if (
|
|
1025
|
-
return
|
|
1012
|
+
if (A(e) || D(e))
|
|
1013
|
+
return N("$text", { value: e });
|
|
1014
|
+
if (b(e))
|
|
1015
|
+
return N("$observer", {
|
|
1026
1016
|
signals: [e],
|
|
1027
1017
|
renderFn: (n) => n
|
|
1028
1018
|
});
|
|
1029
1019
|
throw console.error(e), new TypeError(`Unexpected child type. Got: ${e}`);
|
|
1030
1020
|
});
|
|
1031
1021
|
}
|
|
1032
|
-
function
|
|
1022
|
+
function N(t, e, ...n) {
|
|
1033
1023
|
return e != null && Ae(e), {
|
|
1034
1024
|
[te]: !0,
|
|
1035
1025
|
type: t,
|
|
1036
1026
|
props: e,
|
|
1037
|
-
children:
|
|
1027
|
+
children: U(n)
|
|
1038
1028
|
};
|
|
1039
1029
|
}
|
|
1040
1030
|
function Ae(t) {
|
|
@@ -1044,26 +1034,27 @@ function Ae(t) {
|
|
|
1044
1034
|
if (e.startsWith("$$") && t[e] !== void 0) {
|
|
1045
1035
|
if (!Z(t[e]))
|
|
1046
1036
|
throw new TypeError(`Prop '${e}' is named as a SettableSignal but value is not. Got: ${t[e]}`);
|
|
1047
|
-
} else if (e.startsWith("$") && t[e] !== void 0 && !
|
|
1037
|
+
} else if (e.startsWith("$") && t[e] !== void 0 && !b(t[e]))
|
|
1048
1038
|
throw new TypeError(`Prop '${e}' is named as a Signal but value is not. Got: ${t[e]}`);
|
|
1049
1039
|
}
|
|
1050
|
-
|
|
1040
|
+
const _e = ge.bind(N);
|
|
1041
|
+
function Re(t, e, n) {
|
|
1051
1042
|
const o = J(t);
|
|
1052
|
-
return
|
|
1043
|
+
return N("$cond", {
|
|
1053
1044
|
$predicate: o,
|
|
1054
1045
|
thenContent: e,
|
|
1055
1046
|
elseContent: n
|
|
1056
1047
|
});
|
|
1057
1048
|
}
|
|
1058
|
-
function
|
|
1049
|
+
function Be(t, e, n) {
|
|
1059
1050
|
const o = J(t);
|
|
1060
|
-
return
|
|
1051
|
+
return N("$repeat", { $items: o, keyFn: e, renderFn: n });
|
|
1061
1052
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return
|
|
1053
|
+
function Ke(t, e) {
|
|
1054
|
+
return N("$portal", { parent: t, content: e });
|
|
1064
1055
|
}
|
|
1065
|
-
function
|
|
1066
|
-
const [t, e] =
|
|
1056
|
+
function We() {
|
|
1057
|
+
const [t, e] = O();
|
|
1067
1058
|
return {
|
|
1068
1059
|
get: t.get,
|
|
1069
1060
|
watch: t.watch,
|
|
@@ -1078,46 +1069,44 @@ function Be() {
|
|
|
1078
1069
|
function oe(t) {
|
|
1079
1070
|
return !(t == null || typeof t != "object" || !t.hasOwnProperty("node"));
|
|
1080
1071
|
}
|
|
1081
|
-
class
|
|
1072
|
+
class re {
|
|
1082
1073
|
constructor(e) {
|
|
1083
|
-
|
|
1074
|
+
f(this, "node");
|
|
1084
1075
|
this.node = e;
|
|
1085
1076
|
}
|
|
1086
|
-
get
|
|
1077
|
+
get isMounted() {
|
|
1087
1078
|
return this.node.parentNode != null;
|
|
1088
1079
|
}
|
|
1089
|
-
async
|
|
1080
|
+
async mount(e, n) {
|
|
1090
1081
|
e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null);
|
|
1091
1082
|
}
|
|
1092
|
-
async
|
|
1083
|
+
async unmount() {
|
|
1093
1084
|
this.node.parentNode && this.node.parentNode.removeChild(this.node);
|
|
1094
1085
|
}
|
|
1095
|
-
async setChildren(e) {
|
|
1096
|
-
}
|
|
1097
1086
|
}
|
|
1098
|
-
function
|
|
1099
|
-
return (
|
|
1087
|
+
function x(t, e) {
|
|
1088
|
+
return (P(e) ? e : [e]).map((o) => {
|
|
1100
1089
|
if (E(o.type))
|
|
1101
|
-
return ee(
|
|
1102
|
-
if (
|
|
1090
|
+
return ee(t, o.type, o.props, o.children);
|
|
1091
|
+
if (A(o.type))
|
|
1103
1092
|
switch (o.type) {
|
|
1104
1093
|
case "$node": {
|
|
1105
1094
|
const r = o.props;
|
|
1106
|
-
return new
|
|
1095
|
+
return new re(r.value);
|
|
1107
1096
|
}
|
|
1108
1097
|
case "$text": {
|
|
1109
1098
|
const r = o.props;
|
|
1110
|
-
return new
|
|
1099
|
+
return new Me({
|
|
1111
1100
|
value: r.value
|
|
1112
1101
|
});
|
|
1113
1102
|
}
|
|
1114
1103
|
case "$cond": {
|
|
1115
1104
|
const r = o.props;
|
|
1116
|
-
return new
|
|
1105
|
+
return new Ce({
|
|
1117
1106
|
$predicate: r.$predicate,
|
|
1118
1107
|
thenContent: r.thenContent,
|
|
1119
1108
|
elseContent: r.elseContent,
|
|
1120
|
-
elementContext:
|
|
1109
|
+
elementContext: t
|
|
1121
1110
|
});
|
|
1122
1111
|
}
|
|
1123
1112
|
case "$repeat": {
|
|
@@ -1126,7 +1115,7 @@ function S(t, e) {
|
|
|
1126
1115
|
$items: r.$items,
|
|
1127
1116
|
keyFn: r.keyFn,
|
|
1128
1117
|
renderFn: r.renderFn,
|
|
1129
|
-
elementContext:
|
|
1118
|
+
elementContext: t
|
|
1130
1119
|
});
|
|
1131
1120
|
}
|
|
1132
1121
|
case "$observer": {
|
|
@@ -1134,22 +1123,22 @@ function S(t, e) {
|
|
|
1134
1123
|
return new $e({
|
|
1135
1124
|
signals: r.signals,
|
|
1136
1125
|
renderFn: r.renderFn,
|
|
1137
|
-
elementContext:
|
|
1126
|
+
elementContext: t
|
|
1138
1127
|
});
|
|
1139
1128
|
}
|
|
1140
1129
|
case "$outlet": {
|
|
1141
1130
|
const r = o.props;
|
|
1142
|
-
return new
|
|
1131
|
+
return new Ne({
|
|
1143
1132
|
$children: r.$children,
|
|
1144
|
-
elementContext:
|
|
1133
|
+
elementContext: t
|
|
1145
1134
|
});
|
|
1146
1135
|
}
|
|
1147
1136
|
case "$portal": {
|
|
1148
1137
|
const r = o.props;
|
|
1149
|
-
return new
|
|
1138
|
+
return new xe({
|
|
1150
1139
|
content: r.content,
|
|
1151
1140
|
parent: r.parent,
|
|
1152
|
-
elementContext:
|
|
1141
|
+
elementContext: t
|
|
1153
1142
|
});
|
|
1154
1143
|
}
|
|
1155
1144
|
default:
|
|
@@ -1157,85 +1146,83 @@ function S(t, e) {
|
|
|
1157
1146
|
throw new Error(`Unknown markup type: ${o.type}`);
|
|
1158
1147
|
return new we({
|
|
1159
1148
|
tag: o.type,
|
|
1160
|
-
props: o.props,
|
|
1149
|
+
props: o.props ?? {},
|
|
1161
1150
|
children: o.children,
|
|
1162
|
-
elementContext:
|
|
1151
|
+
elementContext: t
|
|
1163
1152
|
});
|
|
1164
1153
|
}
|
|
1165
1154
|
else
|
|
1166
1155
|
throw new TypeError(`Expected a string or view function. Got: ${o.type}`);
|
|
1167
1156
|
});
|
|
1168
1157
|
}
|
|
1169
|
-
function
|
|
1158
|
+
function M(t) {
|
|
1170
1159
|
if (t.length === 1)
|
|
1171
1160
|
return t[0];
|
|
1172
|
-
const e = document.createComment("
|
|
1161
|
+
const e = document.createComment("Fragment");
|
|
1173
1162
|
let n = !1;
|
|
1174
1163
|
return {
|
|
1175
1164
|
get node() {
|
|
1176
1165
|
return e;
|
|
1177
1166
|
},
|
|
1178
|
-
get
|
|
1167
|
+
get isMounted() {
|
|
1179
1168
|
return n;
|
|
1180
1169
|
},
|
|
1181
|
-
|
|
1170
|
+
mount(o, r) {
|
|
1182
1171
|
var s;
|
|
1183
1172
|
o.insertBefore(e, r || null);
|
|
1184
1173
|
for (const i of t) {
|
|
1185
|
-
const
|
|
1186
|
-
i.
|
|
1174
|
+
const c = ((s = t[t.length - 1]) == null ? void 0 : s.node) ?? e;
|
|
1175
|
+
i.mount(o, c);
|
|
1187
1176
|
}
|
|
1188
1177
|
n = !0;
|
|
1189
1178
|
},
|
|
1190
|
-
|
|
1179
|
+
unmount() {
|
|
1191
1180
|
if (n) {
|
|
1192
1181
|
for (const o of t)
|
|
1193
|
-
o.
|
|
1182
|
+
o.unmount();
|
|
1194
1183
|
e.remove();
|
|
1195
1184
|
}
|
|
1196
1185
|
n = !1;
|
|
1197
|
-
},
|
|
1198
|
-
setChildren() {
|
|
1199
|
-
throw new Error("setChildren not supported on renderHandle");
|
|
1200
1186
|
}
|
|
1201
1187
|
};
|
|
1202
1188
|
}
|
|
1203
|
-
function
|
|
1204
|
-
return t == null || t === !1 || typeof t == "string" || typeof t == "number" ||
|
|
1189
|
+
function se(t) {
|
|
1190
|
+
return t == null || t === !1 || typeof t == "string" || typeof t == "number" || V(t) || b(t) || z(se, t);
|
|
1205
1191
|
}
|
|
1206
1192
|
function He(t, e) {
|
|
1207
1193
|
return e.outlet();
|
|
1208
1194
|
}
|
|
1209
1195
|
export {
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1196
|
+
x as A,
|
|
1197
|
+
qe as B,
|
|
1198
|
+
Ke as C,
|
|
1199
|
+
Be as D,
|
|
1200
|
+
He as P,
|
|
1201
|
+
b as a,
|
|
1202
|
+
I as b,
|
|
1203
|
+
Re as c,
|
|
1204
|
+
ye as d,
|
|
1205
|
+
E as e,
|
|
1206
|
+
A as f,
|
|
1207
|
+
O as g,
|
|
1208
|
+
_e as h,
|
|
1209
|
+
L as i,
|
|
1210
|
+
Ve as j,
|
|
1211
|
+
Oe as k,
|
|
1225
1212
|
Ie as l,
|
|
1226
1213
|
Le as m,
|
|
1227
|
-
|
|
1228
|
-
|
|
1214
|
+
T as n,
|
|
1215
|
+
We as o,
|
|
1229
1216
|
oe as p,
|
|
1230
1217
|
Pe as q,
|
|
1231
|
-
|
|
1218
|
+
N as r,
|
|
1232
1219
|
J as s,
|
|
1233
1220
|
Ge as t,
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1221
|
+
Ue as u,
|
|
1222
|
+
Fe as v,
|
|
1223
|
+
G as w,
|
|
1237
1224
|
je as x,
|
|
1238
|
-
|
|
1239
|
-
|
|
1225
|
+
ee as y,
|
|
1226
|
+
M as z
|
|
1240
1227
|
};
|
|
1241
|
-
//# sourceMappingURL=
|
|
1228
|
+
//# sourceMappingURL=passthrough-DrtCifRF.js.map
|