keits 0.0.1 → 0.0.2
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/dev/index.js +141 -310
- package/dist/dev/shared/element-By0uLZli.js +544 -0
- package/dist/dev/svg.js +70 -0
- package/dist/prod/index.js +110 -312
- package/dist/prod/shared/element-C8c5hIhH.js +394 -0
- package/dist/prod/svg.js +8 -0
- package/dist/types/dom/element.d.ts +3 -0
- package/dist/types/dom/events.d.ts +1 -0
- package/dist/types/dom/hooks.d.ts +8 -0
- package/dist/types/dom/index.d.ts +6 -0
- package/dist/types/dom/insert.d.ts +2 -0
- package/dist/types/dom/mount.d.ts +2 -0
- package/dist/types/dom/namespaces.d.ts +1 -0
- package/dist/types/dom/props.d.ts +3 -0
- package/dist/types/dom/render-effect.d.ts +1 -0
- package/dist/types/dom/tags.d.ts +112 -0
- package/dist/types/dom/types.d.ts +43 -0
- package/dist/types/dom/unsafe.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/svg/element.d.ts +2 -0
- package/dist/types/svg/index.d.ts +3 -0
- package/dist/types/svg/tags.d.ts +63 -0
- package/dist/types/svg/types.d.ts +13 -0
- package/package.json +11 -3
package/dist/prod/index.js
CHANGED
|
@@ -1,213 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
function f(t) {
|
|
3
|
-
let r = e;
|
|
4
|
-
r !== null && t.seenBy !== n && (t.seenBy = n, i === null && r.sources[a] === t ? a++ : ((i ??= []).push(t), t.observers.push(r)));
|
|
5
|
-
}
|
|
6
|
-
function p() {
|
|
7
|
-
return e !== null;
|
|
8
|
-
}
|
|
9
|
-
function m(e) {
|
|
10
|
-
if (e.observers.length !== 0) {
|
|
11
|
-
o++;
|
|
12
|
-
try {
|
|
13
|
-
for (let t of e.observers) h(t, 2);
|
|
14
|
-
} finally {
|
|
15
|
-
S();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
function h(e, t) {
|
|
20
|
-
if (e.state >= t) return;
|
|
21
|
-
let n = e.state === 0;
|
|
22
|
-
if (e.state = t, n) {
|
|
23
|
-
if (e.kind === 1) c.push(e);
|
|
24
|
-
else for (let t of e.observers) h(t, 1);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function g(e) {
|
|
28
|
-
if (e.state === 1) {
|
|
29
|
-
for (let t of e.sources) if (t.kind === 2 && (g(t), e.state === 2)) break;
|
|
30
|
-
}
|
|
31
|
-
e.state === 2 ? e.kind === 1 ? _(e) : ee(e) : e.state = 0;
|
|
32
|
-
}
|
|
33
|
-
function ee(e) {
|
|
34
|
-
let t;
|
|
35
|
-
e.computing = !0;
|
|
36
|
-
try {
|
|
37
|
-
let n = v(e, () => e.fn(e.value));
|
|
38
|
-
t = !e.hasValue || e.hasError || e.equals === !1 || !e.equals(e.value, n), t && (e.value = n), e.hasValue = !0, e.hasError = !1, e.error = void 0;
|
|
39
|
-
} catch (n) {
|
|
40
|
-
t = !0, e.hasError = !0, e.error = n;
|
|
41
|
-
} finally {
|
|
42
|
-
e.computing = !1;
|
|
43
|
-
}
|
|
44
|
-
if (t) for (let t of e.observers) t.state === 1 && (t.state = 2);
|
|
45
|
-
}
|
|
46
|
-
function _(e) {
|
|
47
|
-
try {
|
|
48
|
-
v(e, e.fn);
|
|
49
|
-
} catch (t) {
|
|
50
|
-
j(t, e);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function v(o, s) {
|
|
54
|
-
k(o);
|
|
55
|
-
let c = e, l = t, u = n, d = i, f = a;
|
|
56
|
-
e = o, t = o, n = ++r, i = null, a = 0, o.state = 0;
|
|
57
|
-
try {
|
|
58
|
-
return s();
|
|
59
|
-
} finally {
|
|
60
|
-
y(o, i, a), e = c, t = l, n = u, i = d, a = f;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function y(e, t, n) {
|
|
64
|
-
if (e.disposed) {
|
|
65
|
-
if (t !== null) for (let n of t) b(n, e);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
let r = e.sources;
|
|
69
|
-
for (let t = n; t < r.length; t++) b(r[t], e);
|
|
70
|
-
if (r.length = n, t !== null) for (let e of t) r.push(e);
|
|
71
|
-
}
|
|
72
|
-
function b(e, t) {
|
|
73
|
-
let n = e.observers, r = n.lastIndexOf(t);
|
|
74
|
-
r !== -1 && (n[r] = n[n.length - 1], n.pop());
|
|
75
|
-
}
|
|
76
|
-
function x(e) {
|
|
77
|
-
o++;
|
|
78
|
-
try {
|
|
79
|
-
return e();
|
|
80
|
-
} finally {
|
|
81
|
-
S();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function S() {
|
|
85
|
-
--o === 0 && te();
|
|
86
|
-
}
|
|
87
|
-
function te() {
|
|
88
|
-
do
|
|
89
|
-
w(), l.length > 0 && C();
|
|
90
|
-
while (c.length > 0 || l.length > 0);
|
|
91
|
-
if (u.length > 0) {
|
|
92
|
-
let e = u.splice(0);
|
|
93
|
-
throw e.length === 1 ? e[0] : AggregateError(e, "[keits] multiple unhandled errors");
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
function C() {
|
|
97
|
-
o++;
|
|
98
|
-
let e = l.splice(0);
|
|
99
|
-
try {
|
|
100
|
-
for (let { owner: t, fn: n } of e) if (!t?.disposed) try {
|
|
101
|
-
O(t, n);
|
|
102
|
-
} catch (e) {
|
|
103
|
-
j(e, t);
|
|
104
|
-
}
|
|
105
|
-
} finally {
|
|
106
|
-
o--;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
function w() {
|
|
110
|
-
o++;
|
|
111
|
-
let e = ++s, t = !1;
|
|
112
|
-
try {
|
|
113
|
-
for (let t = 0; t < c.length; t++) {
|
|
114
|
-
let n = c[t];
|
|
115
|
-
n.state !== 0 && (n.flushId !== e && (n.flushId = e, n.flushRuns = 0), ++n.flushRuns > 100 ? (n.state = 0, j(re(n), n)) : ne(n));
|
|
116
|
-
}
|
|
117
|
-
t = !0;
|
|
118
|
-
} finally {
|
|
119
|
-
if (!t) for (let e of c) e.state = 0;
|
|
120
|
-
c.length = 0, o--;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function ne(e) {
|
|
124
|
-
let t = [];
|
|
125
|
-
for (let n = e.owner; n !== null; n = n.owner) n.kind !== 3 && n.state !== 0 && t.push(n);
|
|
126
|
-
for (let e = t.length - 1; e >= 0; e--) g(t[e]);
|
|
127
|
-
g(e);
|
|
128
|
-
}
|
|
129
|
-
function re(e) {
|
|
130
|
-
return /* @__PURE__ */ Error("[keits] infinite update loop");
|
|
131
|
-
}
|
|
132
|
-
function T(t) {
|
|
133
|
-
let n = e;
|
|
134
|
-
e = null;
|
|
135
|
-
try {
|
|
136
|
-
return t();
|
|
137
|
-
} finally {
|
|
138
|
-
e = n;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
function E(e) {
|
|
142
|
-
let n = t;
|
|
143
|
-
e.owner = n, n !== null && (n.children ??= []).push(e);
|
|
144
|
-
}
|
|
145
|
-
function D() {
|
|
146
|
-
return t;
|
|
147
|
-
}
|
|
148
|
-
function O(n, r) {
|
|
149
|
-
let i = t, a = e;
|
|
150
|
-
t = n, e = null;
|
|
151
|
-
try {
|
|
152
|
-
return r();
|
|
153
|
-
} finally {
|
|
154
|
-
t = i, e = a;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function ie(e) {
|
|
158
|
-
return t !== null && ((t.cleanups ??= []).push(e), !0);
|
|
159
|
-
}
|
|
160
|
-
function ae(e) {
|
|
161
|
-
d > 0 || l.push({
|
|
162
|
-
owner: t,
|
|
163
|
-
fn: e
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
function k(e) {
|
|
167
|
-
let t = e.children, n = e.cleanups;
|
|
168
|
-
if (e.children = null, e.cleanups = null, t !== null) for (let e = t.length - 1; e >= 0; e--) A(t[e]);
|
|
169
|
-
if (n !== null) for (let t = n.length - 1; t >= 0; t--) try {
|
|
170
|
-
n[t]();
|
|
171
|
-
} catch (t) {
|
|
172
|
-
j(t, e);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
function A(e) {
|
|
176
|
-
if (!e.disposed) {
|
|
177
|
-
if (e.disposed = !0, e.kind !== 3) {
|
|
178
|
-
for (let t of e.sources) b(t, e);
|
|
179
|
-
e.sources.length = 0, e.state = 0;
|
|
180
|
-
}
|
|
181
|
-
k(e);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
function j(e, t) {
|
|
185
|
-
for (let n = t; n !== null; n = n.owner) {
|
|
186
|
-
if (n.kind !== 3 || n.handler === null || n.disposed) continue;
|
|
187
|
-
let t = n.handler;
|
|
188
|
-
try {
|
|
189
|
-
O(n.owner, () => t(e));
|
|
190
|
-
return;
|
|
191
|
-
} catch (t) {
|
|
192
|
-
e = t;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
if (o === 0) throw e;
|
|
196
|
-
u.push(e);
|
|
197
|
-
}
|
|
198
|
-
function M() {
|
|
199
|
-
return d > 0;
|
|
200
|
-
}
|
|
201
|
-
function oe(e) {
|
|
202
|
-
d++;
|
|
203
|
-
try {
|
|
204
|
-
return e();
|
|
205
|
-
} finally {
|
|
206
|
-
d--;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
1
|
+
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, s as m, u as h, v as g, x as _, y as v } from "./shared/element-C8c5hIhH.js";
|
|
209
2
|
// src/core/signal.ts
|
|
210
|
-
function
|
|
3
|
+
function y(e, t) {
|
|
211
4
|
let n = {
|
|
212
5
|
kind: 0,
|
|
213
6
|
value: e,
|
|
@@ -215,31 +8,14 @@ function se(e, t) {
|
|
|
215
8
|
observers: [],
|
|
216
9
|
seenBy: 0
|
|
217
10
|
};
|
|
218
|
-
return Object.assign(() => (
|
|
11
|
+
return Object.assign(() => (g(n), n.value), { set: (e) => {
|
|
219
12
|
let t = typeof e == "function" ? e(n.value) : e;
|
|
220
|
-
n.equals !== !1 && n.equals(n.value, t) || (n.value = t,
|
|
13
|
+
n.equals !== !1 && n.equals(n.value, t) || (n.value = t, o(n));
|
|
221
14
|
} });
|
|
222
15
|
}
|
|
223
|
-
// src/core/effect.ts
|
|
224
|
-
function ce(e, t) {
|
|
225
|
-
if (M()) return;
|
|
226
|
-
let n = {
|
|
227
|
-
kind: 1,
|
|
228
|
-
fn: e,
|
|
229
|
-
state: 0,
|
|
230
|
-
sources: [],
|
|
231
|
-
flushId: 0,
|
|
232
|
-
flushRuns: 0,
|
|
233
|
-
owner: null,
|
|
234
|
-
children: null,
|
|
235
|
-
cleanups: null,
|
|
236
|
-
disposed: !1
|
|
237
|
-
};
|
|
238
|
-
E(n), x(() => _(n));
|
|
239
|
-
}
|
|
240
16
|
// src/core/computed.ts
|
|
241
|
-
function
|
|
242
|
-
let
|
|
17
|
+
function b(e, t) {
|
|
18
|
+
let r = {
|
|
243
19
|
kind: 2,
|
|
244
20
|
fn: e,
|
|
245
21
|
value: void 0,
|
|
@@ -259,67 +35,67 @@ function le(e, t) {
|
|
|
259
35
|
cleanups: null,
|
|
260
36
|
disposed: !1
|
|
261
37
|
};
|
|
262
|
-
return
|
|
263
|
-
if (
|
|
264
|
-
if (
|
|
265
|
-
return
|
|
38
|
+
return l(r), () => {
|
|
39
|
+
if (r.computing) throw x(r);
|
|
40
|
+
if (r.state !== 0 && n(r), g(r), r.hasError) throw r.error;
|
|
41
|
+
return r.value;
|
|
266
42
|
};
|
|
267
43
|
}
|
|
268
|
-
function
|
|
44
|
+
function x(e) {
|
|
269
45
|
return /* @__PURE__ */ Error("[keits] cycle detected");
|
|
270
46
|
}
|
|
271
47
|
// src/core/env.ts
|
|
272
|
-
var
|
|
48
|
+
var S = typeof window > "u";
|
|
273
49
|
// src/core/owner.ts
|
|
274
|
-
function
|
|
275
|
-
return
|
|
50
|
+
function C() {
|
|
51
|
+
return a();
|
|
276
52
|
}
|
|
277
|
-
function
|
|
278
|
-
return
|
|
53
|
+
function w(t, n) {
|
|
54
|
+
return e(t, n);
|
|
279
55
|
}
|
|
280
|
-
function
|
|
281
|
-
let
|
|
56
|
+
function T(t) {
|
|
57
|
+
let n = {
|
|
282
58
|
kind: 3,
|
|
283
|
-
owner:
|
|
59
|
+
owner: a(),
|
|
284
60
|
children: null,
|
|
285
61
|
cleanups: null,
|
|
286
62
|
disposed: !1,
|
|
287
63
|
handler: null
|
|
288
|
-
},
|
|
289
|
-
return
|
|
64
|
+
}, r = () => h(() => i(n));
|
|
65
|
+
return h(() => {
|
|
290
66
|
try {
|
|
291
|
-
return
|
|
67
|
+
return e(n, () => t(r));
|
|
292
68
|
} catch (e) {
|
|
293
|
-
throw
|
|
69
|
+
throw i(n), e;
|
|
294
70
|
}
|
|
295
71
|
});
|
|
296
72
|
}
|
|
297
|
-
function
|
|
298
|
-
|
|
73
|
+
function E(e) {
|
|
74
|
+
m(e);
|
|
299
75
|
}
|
|
300
|
-
function
|
|
301
|
-
|
|
76
|
+
function D(e) {
|
|
77
|
+
r(e);
|
|
302
78
|
}
|
|
303
|
-
function
|
|
304
|
-
let
|
|
79
|
+
function ee(t, n) {
|
|
80
|
+
let r = {
|
|
305
81
|
kind: 3,
|
|
306
82
|
owner: null,
|
|
307
83
|
children: null,
|
|
308
84
|
cleanups: null,
|
|
309
85
|
disposed: !1,
|
|
310
|
-
handler:
|
|
86
|
+
handler: n
|
|
311
87
|
};
|
|
312
|
-
return
|
|
88
|
+
return l(r), h(() => {
|
|
313
89
|
try {
|
|
314
|
-
return
|
|
90
|
+
return e(r, t);
|
|
315
91
|
} catch (e) {
|
|
316
|
-
|
|
92
|
+
p(e, r);
|
|
317
93
|
return;
|
|
318
94
|
}
|
|
319
95
|
});
|
|
320
96
|
}
|
|
321
|
-
function
|
|
322
|
-
return
|
|
97
|
+
function te(e) {
|
|
98
|
+
return _(() => T((t) => {
|
|
323
99
|
try {
|
|
324
100
|
return e();
|
|
325
101
|
} finally {
|
|
@@ -328,11 +104,11 @@ function R(e) {
|
|
|
328
104
|
}));
|
|
329
105
|
}
|
|
330
106
|
// src/core/context.ts
|
|
331
|
-
function
|
|
107
|
+
function O(e, t) {
|
|
332
108
|
return { defaultValue: e };
|
|
333
109
|
}
|
|
334
|
-
function
|
|
335
|
-
let
|
|
110
|
+
function k(t, n, r) {
|
|
111
|
+
let i = {
|
|
336
112
|
kind: 3,
|
|
337
113
|
owner: null,
|
|
338
114
|
children: null,
|
|
@@ -340,50 +116,50 @@ function B(e, t, n) {
|
|
|
340
116
|
disposed: !1,
|
|
341
117
|
handler: null,
|
|
342
118
|
context: {
|
|
343
|
-
key:
|
|
344
|
-
value:
|
|
119
|
+
key: t,
|
|
120
|
+
value: n
|
|
345
121
|
}
|
|
346
122
|
};
|
|
347
|
-
return
|
|
123
|
+
return l(i), e(i, r);
|
|
348
124
|
}
|
|
349
|
-
function
|
|
350
|
-
for (let t =
|
|
125
|
+
function A(e) {
|
|
126
|
+
for (let t = a(); t !== null; t = t.owner) if (t.kind === 3 && t.context?.key === e) return t.context.value;
|
|
351
127
|
return e.defaultValue;
|
|
352
128
|
}
|
|
353
129
|
// src/core/store.ts
|
|
354
|
-
var
|
|
355
|
-
function
|
|
356
|
-
let n =
|
|
130
|
+
var j = Symbol("raw"), M = Symbol("shape"), N = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = 0;
|
|
131
|
+
function I(e, t) {
|
|
132
|
+
let n = z(e);
|
|
357
133
|
return [n, (e) => {
|
|
358
|
-
|
|
134
|
+
F++;
|
|
359
135
|
try {
|
|
360
|
-
|
|
136
|
+
v(() => h(() => e(n)));
|
|
361
137
|
} finally {
|
|
362
|
-
|
|
138
|
+
F--;
|
|
363
139
|
}
|
|
364
140
|
}];
|
|
365
141
|
}
|
|
366
|
-
function
|
|
142
|
+
function L(e) {
|
|
367
143
|
if (typeof e == "object" && e) {
|
|
368
|
-
let t = e[
|
|
144
|
+
let t = e[j];
|
|
369
145
|
if (t !== void 0) return t;
|
|
370
146
|
}
|
|
371
147
|
return e;
|
|
372
148
|
}
|
|
373
|
-
function
|
|
149
|
+
function R(e) {
|
|
374
150
|
if (typeof e != "object" || !e) return !1;
|
|
375
151
|
if (Array.isArray(e)) return !0;
|
|
376
152
|
let t = Object.getPrototypeOf(e);
|
|
377
153
|
return t === Object.prototype || t === null;
|
|
378
154
|
}
|
|
379
|
-
function
|
|
380
|
-
if (!
|
|
381
|
-
let t =
|
|
382
|
-
return t === void 0 && (t = new Proxy(e,
|
|
155
|
+
function z(e) {
|
|
156
|
+
if (!R(e)) return e;
|
|
157
|
+
let t = N.get(e);
|
|
158
|
+
return t === void 0 && (t = new Proxy(e, U), N.set(e, t)), t;
|
|
383
159
|
}
|
|
384
|
-
function
|
|
385
|
-
let n =
|
|
386
|
-
n === void 0 &&
|
|
160
|
+
function B(e, t) {
|
|
161
|
+
let n = P.get(e);
|
|
162
|
+
n === void 0 && P.set(e, n = /* @__PURE__ */ new Map());
|
|
387
163
|
let r = n.get(t);
|
|
388
164
|
return r === void 0 && n.set(t, r = {
|
|
389
165
|
kind: 0,
|
|
@@ -391,70 +167,92 @@ function Y(e, t) {
|
|
|
391
167
|
seenBy: 0
|
|
392
168
|
}), r;
|
|
393
169
|
}
|
|
394
|
-
function
|
|
395
|
-
let n =
|
|
396
|
-
n !== void 0 &&
|
|
170
|
+
function V(e, t) {
|
|
171
|
+
let n = P.get(e)?.get(t);
|
|
172
|
+
n !== void 0 && o(n);
|
|
397
173
|
}
|
|
398
|
-
function
|
|
174
|
+
function H(e) {
|
|
399
175
|
return !1;
|
|
400
176
|
}
|
|
401
|
-
var
|
|
177
|
+
var U = {
|
|
402
178
|
get(e, t) {
|
|
403
|
-
if (t ===
|
|
179
|
+
if (t === j) return e;
|
|
404
180
|
let n = e[t];
|
|
405
|
-
return
|
|
181
|
+
return s() && (Object.hasOwn(e, t) || !(t in e)) && g(B(e, t)), z(n);
|
|
406
182
|
},
|
|
407
183
|
has(e, t) {
|
|
408
|
-
return
|
|
184
|
+
return s() && g(B(e, t)), t in e;
|
|
409
185
|
},
|
|
410
186
|
ownKeys(e) {
|
|
411
|
-
return
|
|
187
|
+
return s() && g(B(e, M)), Reflect.ownKeys(e);
|
|
412
188
|
},
|
|
413
189
|
set(e, t, n) {
|
|
414
|
-
if (
|
|
415
|
-
let t =
|
|
190
|
+
if (F === 0) {
|
|
191
|
+
let t = H(e);
|
|
416
192
|
if (t) throw t;
|
|
417
193
|
return !1;
|
|
418
194
|
}
|
|
419
|
-
let r = e, i =
|
|
195
|
+
let r = e, i = L(n), a = Object.hasOwn(e, t), o = r[t], s = Array.isArray(e), c = s ? e.length : 0;
|
|
420
196
|
if (a && Object.is(o, i)) return !0;
|
|
421
|
-
if (r[t] = i,
|
|
197
|
+
if (r[t] = i, V(e, t), a || V(e, M), s) {
|
|
422
198
|
let n = e.length;
|
|
423
199
|
if (n !== c) {
|
|
424
|
-
t !== "length" &&
|
|
425
|
-
for (let t = n; t < c; t++)
|
|
200
|
+
t !== "length" && V(e, "length"), V(e, M);
|
|
201
|
+
for (let t = n; t < c; t++) V(e, String(t));
|
|
426
202
|
}
|
|
427
203
|
}
|
|
428
204
|
return !0;
|
|
429
205
|
},
|
|
430
206
|
deleteProperty(e, t) {
|
|
431
|
-
if (
|
|
432
|
-
let t =
|
|
207
|
+
if (F === 0) {
|
|
208
|
+
let t = H(e);
|
|
433
209
|
if (t) throw t;
|
|
434
210
|
return !1;
|
|
435
211
|
}
|
|
436
|
-
return Object.hasOwn(e, t) && (delete e[t],
|
|
212
|
+
return Object.hasOwn(e, t) && (delete e[t], V(e, t), V(e, M)), !0;
|
|
437
213
|
}
|
|
438
214
|
};
|
|
439
|
-
function
|
|
440
|
-
|
|
215
|
+
function W(e, t, n = {}) {
|
|
216
|
+
G(z(L(e)), L(t), n.key);
|
|
441
217
|
}
|
|
442
|
-
function
|
|
443
|
-
let r =
|
|
218
|
+
function G(e, t, n) {
|
|
219
|
+
let r = L(e), i = e;
|
|
444
220
|
if (Array.isArray(r) && Array.isArray(t)) {
|
|
445
221
|
let e = /* @__PURE__ */ new Map();
|
|
446
|
-
if (n !== void 0) for (let t of r)
|
|
222
|
+
if (n !== void 0) for (let t of r) R(t) && e.set(t[n], t);
|
|
447
223
|
for (let a = 0; a < t.length; a++) {
|
|
448
|
-
let o = t[a], s = n !== void 0 &&
|
|
449
|
-
i[a] =
|
|
224
|
+
let o = t[a], s = n !== void 0 && R(o) ? e.get(o[n]) : r[a];
|
|
225
|
+
i[a] = K(s, o, n);
|
|
450
226
|
}
|
|
451
227
|
r.length !== t.length && (i.length = t.length);
|
|
452
228
|
} else {
|
|
453
|
-
for (let e of Object.keys(t)) i[e] =
|
|
229
|
+
for (let e of Object.keys(t)) i[e] = K(r[e], t[e], n);
|
|
454
230
|
for (let e of Object.keys(r)) Object.hasOwn(t, e) || delete i[e];
|
|
455
231
|
}
|
|
456
232
|
}
|
|
457
|
-
function
|
|
458
|
-
return
|
|
233
|
+
function K(e, t, n) {
|
|
234
|
+
return R(e) && R(t) && Array.isArray(e) === Array.isArray(t) ? (G(z(e), t, n), e) : t;
|
|
235
|
+
}
|
|
236
|
+
// src/dom/tags.ts
|
|
237
|
+
var q = /* @__PURE__ */ d("a"), J = /* @__PURE__ */ d("abbr"), Y = /* @__PURE__ */ d("address"), X = /* @__PURE__ */ d("area"), Z = /* @__PURE__ */ d("article"), Q = /* @__PURE__ */ d("aside"), ne = /* @__PURE__ */ d("audio"), re = /* @__PURE__ */ d("b"), ie = /* @__PURE__ */ d("base"), ae = /* @__PURE__ */ d("bdi"), oe = /* @__PURE__ */ d("bdo"), se = /* @__PURE__ */ d("blockquote"), ce = /* @__PURE__ */ d("body"), le = /* @__PURE__ */ d("br"), ue = /* @__PURE__ */ d("button"), de = /* @__PURE__ */ d("canvas"), fe = /* @__PURE__ */ d("caption"), pe = /* @__PURE__ */ d("cite"), me = /* @__PURE__ */ d("code"), he = /* @__PURE__ */ d("col"), ge = /* @__PURE__ */ d("colgroup"), _e = /* @__PURE__ */ d("data"), ve = /* @__PURE__ */ d("datalist"), ye = /* @__PURE__ */ d("dd"), be = /* @__PURE__ */ d("del"), xe = /* @__PURE__ */ d("details"), Se = /* @__PURE__ */ d("dfn"), Ce = /* @__PURE__ */ d("dialog"), we = /* @__PURE__ */ d("div"), Te = /* @__PURE__ */ d("dl"), Ee = /* @__PURE__ */ d("dt"), De = /* @__PURE__ */ d("em"), Oe = /* @__PURE__ */ d("embed"), ke = /* @__PURE__ */ d("fieldset"), Ae = /* @__PURE__ */ d("figcaption"), je = /* @__PURE__ */ d("figure"), Me = /* @__PURE__ */ d("footer"), Ne = /* @__PURE__ */ d("form"), Pe = /* @__PURE__ */ d("h1"), Fe = /* @__PURE__ */ d("h2"), Ie = /* @__PURE__ */ d("h3"), Le = /* @__PURE__ */ d("h4"), Re = /* @__PURE__ */ d("h5"), ze = /* @__PURE__ */ d("h6"), Be = /* @__PURE__ */ d("head"), Ve = /* @__PURE__ */ d("header"), He = /* @__PURE__ */ d("hgroup"), Ue = /* @__PURE__ */ d("hr"), We = /* @__PURE__ */ d("html"), Ge = /* @__PURE__ */ d("i"), Ke = /* @__PURE__ */ d("iframe"), qe = /* @__PURE__ */ d("img"), Je = /* @__PURE__ */ d("input"), Ye = /* @__PURE__ */ d("ins"), Xe = /* @__PURE__ */ d("kbd"), Ze = /* @__PURE__ */ d("label"), Qe = /* @__PURE__ */ d("legend"), $e = /* @__PURE__ */ d("li"), et = /* @__PURE__ */ d("link"), tt = /* @__PURE__ */ d("main"), nt = /* @__PURE__ */ d("map"), rt = /* @__PURE__ */ d("mark"), it = /* @__PURE__ */ d("menu"), at = /* @__PURE__ */ d("meta"), ot = /* @__PURE__ */ d("meter"), st = /* @__PURE__ */ d("nav"), ct = /* @__PURE__ */ d("noscript"), lt = /* @__PURE__ */ d("object"), ut = /* @__PURE__ */ d("ol"), dt = /* @__PURE__ */ d("optgroup"), ft = /* @__PURE__ */ d("option"), pt = /* @__PURE__ */ d("output"), mt = /* @__PURE__ */ d("p"), ht = /* @__PURE__ */ d("picture"), gt = /* @__PURE__ */ d("pre"), _t = /* @__PURE__ */ d("progress"), vt = /* @__PURE__ */ d("q"), yt = /* @__PURE__ */ d("rp"), bt = /* @__PURE__ */ d("rt"), xt = /* @__PURE__ */ d("ruby"), St = /* @__PURE__ */ d("s"), Ct = /* @__PURE__ */ d("samp"), wt = /* @__PURE__ */ d("script"), Tt = /* @__PURE__ */ d("search"), Et = /* @__PURE__ */ d("section"), Dt = /* @__PURE__ */ d("select"), Ot = /* @__PURE__ */ d("slot"), kt = /* @__PURE__ */ d("small"), At = /* @__PURE__ */ d("source"), jt = /* @__PURE__ */ d("span"), Mt = /* @__PURE__ */ d("strong"), Nt = /* @__PURE__ */ d("style"), Pt = /* @__PURE__ */ d("sub"), Ft = /* @__PURE__ */ d("summary"), It = /* @__PURE__ */ d("sup"), Lt = /* @__PURE__ */ d("table"), Rt = /* @__PURE__ */ d("tbody"), zt = /* @__PURE__ */ d("td"), Bt = /* @__PURE__ */ d("template"), $ = /* @__PURE__ */ d("textarea"), Vt = /* @__PURE__ */ d("tfoot"), Ht = /* @__PURE__ */ d("th"), Ut = /* @__PURE__ */ d("thead"), Wt = /* @__PURE__ */ d("time"), Gt = /* @__PURE__ */ d("title"), Kt = /* @__PURE__ */ d("tr"), qt = /* @__PURE__ */ d("track"), Jt = /* @__PURE__ */ d("u"), Yt = /* @__PURE__ */ d("ul"), Xt = /* @__PURE__ */ d("var"), Zt = /* @__PURE__ */ d("video"), Qt = /* @__PURE__ */ d("wbr");
|
|
238
|
+
// src/dom/mount.ts
|
|
239
|
+
function $t(e, n) {
|
|
240
|
+
if (n === null) throw Error("[keits] no target");
|
|
241
|
+
let r = t.marker(), i = t.marker();
|
|
242
|
+
n.append(r, i);
|
|
243
|
+
let a = T((t) => (c(n, e(), i), t));
|
|
244
|
+
return () => {
|
|
245
|
+
a();
|
|
246
|
+
let e = r;
|
|
247
|
+
for (; e !== null;) {
|
|
248
|
+
let t = e === i ? null : e.nextSibling;
|
|
249
|
+
e.remove(), e = t;
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
// src/dom/unsafe.ts
|
|
254
|
+
function en(e) {
|
|
255
|
+
let t = document.createElement("template");
|
|
256
|
+
return t.innerHTML = e, t.content;
|
|
459
257
|
}
|
|
460
|
-
export {
|
|
258
|
+
export { q as $a, J as $abbr, Y as $address, X as $area, Z as $article, Q as $aside, ne as $audio, re as $b, ie as $base, ae as $bdi, oe as $bdo, se as $blockquote, ce as $body, le as $br, ue as $button, de as $canvas, fe as $caption, pe as $cite, me as $code, he as $col, ge as $colgroup, _e as $data, ve as $datalist, ye as $dd, be as $del, xe as $details, Se as $dfn, Ce as $dialog, we as $div, Te as $dl, Ee as $dt, De as $em, Oe as $embed, ke as $fieldset, Ae as $figcaption, je as $figure, Me as $footer, Ne as $form, Pe as $h1, Fe as $h2, Ie as $h3, Le as $h4, Re as $h5, ze as $h6, Be as $head, Ve as $header, He as $hgroup, Ue as $hr, We as $html, Ge as $i, Ke as $iframe, qe as $img, Je as $input, Ye as $ins, Xe as $kbd, Ze as $label, Qe as $legend, $e as $li, et as $link, tt as $main, nt as $map, rt as $mark, it as $menu, at as $meta, ot as $meter, st as $nav, ct as $noscript, lt as $object, ut as $ol, dt as $optgroup, ft as $option, pt as $output, mt as $p, ht as $picture, gt as $pre, _t as $progress, vt as $q, yt as $rp, bt as $rt, xt as $ruby, St as $s, Ct as $samp, wt as $script, Tt as $search, Et as $section, Dt as $select, Ot as $slot, kt as $small, At as $source, jt as $span, Mt as $strong, Nt as $style, Pt as $sub, Ft as $summary, It as $sup, Lt as $table, Rt as $tbody, zt as $td, Bt as $template, $ as $textarea, Vt as $tfoot, Ht as $th, Ut as $thead, Wt as $time, Gt as $title, Kt as $tr, qt as $track, Jt as $u, Yt as $ul, Xt as $var, Zt as $video, Qt as $wbr, h as batch, ee as catchError, b as computed, O as createContext, T as createRoot, f as effect, C as getOwner, d as html, c as insert, S as isServer, u as isStaticRender, $t as mount, E as onCleanup, D as onMount, k as provide, W as reconcile, te as renderStatic, w as runWithOwner, y as signal, I as store, en as unsafeHTML, v as untrack, L as unwrap, A as useContext };
|