keits 0.1.0 → 0.1.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/forms.js +4 -1
- package/dist/dev/index.js +5 -3
- package/dist/dev/shared/element-Bgf6SNbW.js +21 -0
- package/dist/dev/shared/{hydrate-C8cOsDDH.js → hydrate-g_akkVyT.js} +1 -1
- package/dist/dev/shared/{element-DXwmUAnz.js → insert-DadcXJL8.js} +97 -21
- package/dist/dev/shared/{mount-CDB2HgN5.js → mount-BtpMEhSZ.js} +1 -1
- package/dist/dev/static.js +2 -2
- package/dist/dev/svg.js +2 -2
- package/dist/dev/testing.js +32 -12
- package/dist/prod/forms.js +40 -38
- package/dist/prod/index.js +36 -36
- package/dist/prod/shared/element-B-0tH1YW.js +15 -0
- package/dist/prod/shared/{hydrate-kKnJbkV7.js → hydrate-DhHCtdOz.js} +28 -28
- package/dist/prod/shared/insert-CbcOsYmu.js +192 -0
- package/dist/prod/shared/{mount-DbeKIoyD.js → mount-BEAO35S_.js} +1 -1
- package/dist/prod/static.js +2 -2
- package/dist/prod/svg.js +2 -2
- package/dist/prod/testing.js +35 -18
- package/dist/types/api/client.d.ts +2 -2
- package/dist/types/api/index.d.ts +3 -3
- package/dist/types/async/index.d.ts +2 -2
- package/dist/types/async/lazy.d.ts +1 -1
- package/dist/types/async/render-context.d.ts +2 -2
- package/dist/types/async/resource.d.ts +1 -1
- package/dist/types/async/suspense-context.d.ts +1 -1
- package/dist/types/core/computed.d.ts +1 -1
- package/dist/types/core/signal.d.ts +2 -2
- package/dist/types/dom/element.d.ts +1 -1
- package/dist/types/dom/index.d.ts +6 -6
- package/dist/types/dom/insert.d.ts +1 -1
- package/dist/types/dom/mount.d.ts +1 -1
- package/dist/types/dom/props.d.ts +2 -0
- package/dist/types/dom/tags.d.ts +112 -112
- package/dist/types/flow/catch.d.ts +1 -1
- package/dist/types/flow/dynamic.d.ts +1 -1
- package/dist/types/flow/for.d.ts +2 -2
- package/dist/types/flow/if.d.ts +2 -2
- package/dist/types/flow/index.d.ts +8 -8
- package/dist/types/flow/portal.d.ts +1 -1
- package/dist/types/flow/range.d.ts +1 -1
- package/dist/types/flow/suspense.d.ts +1 -1
- package/dist/types/flow/switch.d.ts +1 -1
- package/dist/types/forms/form.d.ts +3 -3
- package/dist/types/forms/index.d.ts +2 -2
- package/dist/types/index.d.ts +12 -12
- package/dist/types/router/index.d.ts +4 -4
- package/dist/types/router/match.d.ts +1 -1
- package/dist/types/router/router.d.ts +2 -2
- package/dist/types/router/types.d.ts +2 -2
- package/dist/types/static/head.d.ts +2 -2
- package/dist/types/static/hydrate.d.ts +1 -1
- package/dist/types/static/index.d.ts +4 -4
- package/dist/types/static/island.d.ts +1 -1
- package/dist/types/static/render.d.ts +1 -1
- package/dist/types/static/server-dom.d.ts +1 -1
- package/dist/types/svg/element.d.ts +1 -1
- package/dist/types/svg/index.d.ts +3 -3
- package/dist/types/svg/tags.d.ts +63 -63
- package/dist/types/svg/types.d.ts +1 -1
- package/dist/types/testing/index.d.ts +13 -6
- package/dist/types/vite/index.d.ts +1 -1
- package/package.json +8 -8
- package/dist/dev/shared/namespaces-Cz82B0Pr.js +0 -84
- package/dist/prod/shared/element-DCit4-3e.js +0 -129
- package/dist/prod/shared/namespaces-BSRrBJIU.js +0 -71
package/dist/prod/index.js
CHANGED
|
@@ -3,17 +3,17 @@ import { n as t, t as n } from "./shared/render-effect-UFDi2Pfh.js";
|
|
|
3
3
|
import { t as r } from "./shared/computed-BjqJ6Pps.js";
|
|
4
4
|
import { a as i, d as a, i as o, p as s, t as c, x as l } from "./shared/graph-CR2WKbwr.js";
|
|
5
5
|
import { a as u, c as d, n as f, o as p, r as m, s as h, t as g } from "./shared/owner-DBi3odT4.js";
|
|
6
|
-
import { a as _, i as v, o as
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as b } from "./shared/element-
|
|
9
|
-
import {
|
|
10
|
-
import { t as ie } from "./shared/mount-
|
|
11
|
-
import { n as
|
|
6
|
+
import { a as _, i as v, o as y } from "./shared/render-context-DF8lr1uu.js";
|
|
7
|
+
import { n as ee, r as te, t as ne } from "./shared/store-CvW0DbmK.js";
|
|
8
|
+
import { n as b } from "./shared/element-B-0tH1YW.js";
|
|
9
|
+
import { l as re, r as x, s as S, t as C } from "./shared/insert-CbcOsYmu.js";
|
|
10
|
+
import { t as ie } from "./shared/mount-BEAO35S_.js";
|
|
11
|
+
import { n as w, t as T } from "./shared/resource-Ch5tVseZ.js";
|
|
12
12
|
// src/core/env.ts
|
|
13
|
-
var
|
|
13
|
+
var E = typeof window > "u", D = /* @__PURE__ */ b("a"), O = /* @__PURE__ */ b("abbr"), k = /* @__PURE__ */ b("address"), A = /* @__PURE__ */ b("area"), j = /* @__PURE__ */ b("article"), M = /* @__PURE__ */ b("aside"), N = /* @__PURE__ */ b("audio"), P = /* @__PURE__ */ b("b"), F = /* @__PURE__ */ b("base"), I = /* @__PURE__ */ b("bdi"), L = /* @__PURE__ */ b("bdo"), R = /* @__PURE__ */ b("blockquote"), z = /* @__PURE__ */ b("body"), B = /* @__PURE__ */ b("br"), V = /* @__PURE__ */ b("button"), H = /* @__PURE__ */ b("canvas"), U = /* @__PURE__ */ b("caption"), W = /* @__PURE__ */ b("cite"), G = /* @__PURE__ */ b("code"), K = /* @__PURE__ */ b("col"), q = /* @__PURE__ */ b("colgroup"), J = /* @__PURE__ */ b("data"), Y = /* @__PURE__ */ b("datalist"), ae = /* @__PURE__ */ b("dd"), oe = /* @__PURE__ */ b("del"), se = /* @__PURE__ */ b("details"), ce = /* @__PURE__ */ b("dfn"), le = /* @__PURE__ */ b("dialog"), ue = /* @__PURE__ */ b("div"), de = /* @__PURE__ */ b("dl"), fe = /* @__PURE__ */ b("dt"), pe = /* @__PURE__ */ b("em"), me = /* @__PURE__ */ b("embed"), he = /* @__PURE__ */ b("fieldset"), ge = /* @__PURE__ */ b("figcaption"), _e = /* @__PURE__ */ b("figure"), ve = /* @__PURE__ */ b("footer"), ye = /* @__PURE__ */ b("form"), be = /* @__PURE__ */ b("h1"), xe = /* @__PURE__ */ b("h2"), Se = /* @__PURE__ */ b("h3"), Ce = /* @__PURE__ */ b("h4"), we = /* @__PURE__ */ b("h5"), Te = /* @__PURE__ */ b("h6"), Ee = /* @__PURE__ */ b("head"), De = /* @__PURE__ */ b("header"), Oe = /* @__PURE__ */ b("hgroup"), ke = /* @__PURE__ */ b("hr"), Ae = /* @__PURE__ */ b("html"), je = /* @__PURE__ */ b("i"), Me = /* @__PURE__ */ b("iframe"), Ne = /* @__PURE__ */ b("img"), Pe = /* @__PURE__ */ b("input"), Fe = /* @__PURE__ */ b("ins"), Ie = /* @__PURE__ */ b("kbd"), Le = /* @__PURE__ */ b("label"), Re = /* @__PURE__ */ b("legend"), ze = /* @__PURE__ */ b("li"), Be = /* @__PURE__ */ b("link"), Ve = /* @__PURE__ */ b("main"), He = /* @__PURE__ */ b("map"), Ue = /* @__PURE__ */ b("mark"), We = /* @__PURE__ */ b("menu"), Ge = /* @__PURE__ */ b("meta"), Ke = /* @__PURE__ */ b("meter"), qe = /* @__PURE__ */ b("nav"), Je = /* @__PURE__ */ b("noscript"), Ye = /* @__PURE__ */ b("object"), Xe = /* @__PURE__ */ b("ol"), Ze = /* @__PURE__ */ b("optgroup"), Qe = /* @__PURE__ */ b("option"), $e = /* @__PURE__ */ b("output"), et = /* @__PURE__ */ b("p"), tt = /* @__PURE__ */ b("picture"), nt = /* @__PURE__ */ b("pre"), rt = /* @__PURE__ */ b("progress"), it = /* @__PURE__ */ b("q"), at = /* @__PURE__ */ b("rp"), ot = /* @__PURE__ */ b("rt"), st = /* @__PURE__ */ b("ruby"), ct = /* @__PURE__ */ b("s"), lt = /* @__PURE__ */ b("samp"), ut = /* @__PURE__ */ b("script"), dt = /* @__PURE__ */ b("search"), ft = /* @__PURE__ */ b("section"), pt = /* @__PURE__ */ b("select"), mt = /* @__PURE__ */ b("slot"), ht = /* @__PURE__ */ b("small"), gt = /* @__PURE__ */ b("source"), _t = /* @__PURE__ */ b("span"), vt = /* @__PURE__ */ b("strong"), yt = /* @__PURE__ */ b("style"), bt = /* @__PURE__ */ b("sub"), xt = /* @__PURE__ */ b("summary"), St = /* @__PURE__ */ b("sup"), Ct = /* @__PURE__ */ b("table"), wt = /* @__PURE__ */ b("tbody"), Tt = /* @__PURE__ */ b("td"), Et = /* @__PURE__ */ b("template"), Dt = /* @__PURE__ */ b("textarea"), Ot = /* @__PURE__ */ b("tfoot"), kt = /* @__PURE__ */ b("th"), At = /* @__PURE__ */ b("thead"), jt = /* @__PURE__ */ b("time"), Mt = /* @__PURE__ */ b("title"), Nt = /* @__PURE__ */ b("tr"), Pt = /* @__PURE__ */ b("track"), Ft = /* @__PURE__ */ b("u"), It = /* @__PURE__ */ b("ul"), X = /* @__PURE__ */ b("var"), Lt = /* @__PURE__ */ b("video"), Rt = /* @__PURE__ */ b("wbr");
|
|
14
14
|
// src/dom/unsafe.ts
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
15
|
+
function zt(e) {
|
|
16
|
+
if (S.html !== void 0) return S.html(e);
|
|
17
17
|
let t = document.createElement("template");
|
|
18
18
|
return t.innerHTML = e, t.content;
|
|
19
19
|
}
|
|
@@ -21,15 +21,15 @@ function Rt(e) {
|
|
|
21
21
|
function Z(e, t) {
|
|
22
22
|
return f((n) => {
|
|
23
23
|
let r = e();
|
|
24
|
-
if (
|
|
24
|
+
if (Bt(r)) return {
|
|
25
25
|
item: t,
|
|
26
26
|
index: null,
|
|
27
27
|
dispose: n,
|
|
28
28
|
first: r,
|
|
29
29
|
last: r
|
|
30
30
|
};
|
|
31
|
-
let i =
|
|
32
|
-
return i.append(a, o),
|
|
31
|
+
let i = S.fragment(), a = S.marker(), o = S.marker();
|
|
32
|
+
return i.append(a, o), C(i, r, o), {
|
|
33
33
|
item: t,
|
|
34
34
|
index: null,
|
|
35
35
|
dispose: n,
|
|
@@ -38,7 +38,7 @@ function Z(e, t) {
|
|
|
38
38
|
};
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Bt(e) {
|
|
42
42
|
return typeof e == "object" && !!e && e.nodeType === 1;
|
|
43
43
|
}
|
|
44
44
|
function Q(e, t, n) {
|
|
@@ -61,8 +61,8 @@ function $(e) {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
// src/flow/for.ts
|
|
64
|
-
function
|
|
65
|
-
let a =
|
|
64
|
+
function Vt(t, r, i) {
|
|
65
|
+
let a = S.marker(), o = S.fragment();
|
|
66
66
|
o.append(a);
|
|
67
67
|
let s = [], l = null;
|
|
68
68
|
c(() => {
|
|
@@ -76,7 +76,7 @@ function Bt(t, r, i) {
|
|
|
76
76
|
let t = a.parentNode;
|
|
77
77
|
if (e.length === 0) {
|
|
78
78
|
for (let e of s) $(e);
|
|
79
|
-
s = [], l === null && i?.fallback && (l = Z(i.fallback, null), Q(t, l, a));
|
|
79
|
+
s = [], l === null && i?.fallback && (l = Z(i.fallback, null), Q(t, l, a)), x(t);
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
l !== null && ($(l), l = null);
|
|
@@ -95,12 +95,12 @@ function Bt(t, r, i) {
|
|
|
95
95
|
c[t] = l;
|
|
96
96
|
}
|
|
97
97
|
for (let e = 0; e < s.length; e++) r[e] || $(s[e]);
|
|
98
|
-
let u =
|
|
98
|
+
let u = Ht(c), f = a;
|
|
99
99
|
for (let e = o.length - 1; e >= 0; e--) {
|
|
100
100
|
let n = o[e];
|
|
101
101
|
u.has(e) || Q(t, n, f), f = n.first;
|
|
102
102
|
}
|
|
103
|
-
s = o;
|
|
103
|
+
s = o, x(t);
|
|
104
104
|
}
|
|
105
105
|
function d(t, n) {
|
|
106
106
|
let i = () => {}, a = Z(() => {
|
|
@@ -111,7 +111,7 @@ function Bt(t, r, i) {
|
|
|
111
111
|
}
|
|
112
112
|
return o;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Ht(e) {
|
|
115
115
|
let t = [], n = Array(e.length);
|
|
116
116
|
for (let r = 0; r < e.length; r++) {
|
|
117
117
|
let i = e[r];
|
|
@@ -128,19 +128,19 @@ function Vt(e) {
|
|
|
128
128
|
return r;
|
|
129
129
|
}
|
|
130
130
|
// src/flow/if.ts
|
|
131
|
-
function
|
|
131
|
+
function Ut(e, t, n) {
|
|
132
132
|
let i = r(e), a = r(() => !!i()), o = i;
|
|
133
133
|
return () => a() ? l(() => t(o)) : n ? l(n) : null;
|
|
134
134
|
}
|
|
135
135
|
// src/flow/show.ts
|
|
136
|
-
function
|
|
136
|
+
function Wt(e, t) {
|
|
137
137
|
let r = t.style.display;
|
|
138
138
|
return n(() => {
|
|
139
139
|
e() ? t.style.display = r : t.style.display = "none";
|
|
140
140
|
}), t;
|
|
141
141
|
}
|
|
142
142
|
// src/flow/switch.ts
|
|
143
|
-
function
|
|
143
|
+
function Gt(e, t, n) {
|
|
144
144
|
let i = r(e);
|
|
145
145
|
return () => {
|
|
146
146
|
let e = t[i()] ?? n;
|
|
@@ -148,7 +148,7 @@ function Wt(e, t, n) {
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
// src/flow/dynamic.ts
|
|
151
|
-
function
|
|
151
|
+
function Kt(e, t) {
|
|
152
152
|
let n = r(e);
|
|
153
153
|
return () => {
|
|
154
154
|
let e = n();
|
|
@@ -156,24 +156,24 @@ function Gt(e, t) {
|
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
// src/flow/catch.ts
|
|
159
|
-
function
|
|
159
|
+
function qt(t, n) {
|
|
160
160
|
let r = e(null), i = () => r.set(null);
|
|
161
161
|
return () => {
|
|
162
162
|
let e = r();
|
|
163
163
|
return l(e === null ? () => g(() => {
|
|
164
|
-
let e =
|
|
165
|
-
return
|
|
164
|
+
let e = S.fragment();
|
|
165
|
+
return C(e, t()), e;
|
|
166
166
|
}, (e) => r.set({ error: e })) : () => n(e.error, i));
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
169
|
// src/flow/portal.ts
|
|
170
|
-
function
|
|
170
|
+
function Jt(e, t) {
|
|
171
171
|
if (a()) return s(), null;
|
|
172
172
|
let n = t === void 0 ? document.body : t;
|
|
173
173
|
if (n === null) throw Error("[keits] no target");
|
|
174
|
-
let r =
|
|
174
|
+
let r = S.marker(), i = S.marker();
|
|
175
175
|
n.append(r, i);
|
|
176
|
-
let o = f((t) => (re(() =>
|
|
176
|
+
let o = f((t) => (re(() => C(n, l(e), i)), t));
|
|
177
177
|
return c(() => {
|
|
178
178
|
o();
|
|
179
179
|
let e = r;
|
|
@@ -184,20 +184,20 @@ function qt(e, t) {
|
|
|
184
184
|
}), null;
|
|
185
185
|
}
|
|
186
186
|
// src/flow/suspense.ts
|
|
187
|
-
function
|
|
187
|
+
function Yt(t, r) {
|
|
188
188
|
let a = e(0), o = /* @__PURE__ */ new Set(), s = { wait(e, t) {
|
|
189
189
|
o.has(e) || (o.add(e), a.set((e) => e + 1), t(() => {
|
|
190
190
|
o.delete(e), a.set((e) => e - 1);
|
|
191
191
|
}));
|
|
192
|
-
} }, u =
|
|
192
|
+
} }, u = S.fragment(), d = S.marker(), f = S.marker();
|
|
193
193
|
u.append(d, f);
|
|
194
|
-
let { release: p } = i(() => _(
|
|
194
|
+
let { release: p } = i(() => _(w, s, () => C(u, l(t), f))), m = {
|
|
195
195
|
item: null,
|
|
196
196
|
index: null,
|
|
197
197
|
dispose: () => {},
|
|
198
198
|
first: d,
|
|
199
199
|
last: f
|
|
200
|
-
}, h =
|
|
200
|
+
}, h = S.marker(), g = S.fragment();
|
|
201
201
|
g.append(h);
|
|
202
202
|
let v = null;
|
|
203
203
|
return c(() => v?.dispose()), n(() => {
|
|
@@ -209,17 +209,17 @@ function Jt(t, r) {
|
|
|
209
209
|
}), g;
|
|
210
210
|
}
|
|
211
211
|
// src/async/lazy.ts
|
|
212
|
-
function
|
|
212
|
+
function Xt(e) {
|
|
213
213
|
let t, n, r = () => n ??= Promise.resolve(e()).then((e) => t = e.default, (e) => {
|
|
214
214
|
throw n = void 0, e;
|
|
215
215
|
});
|
|
216
216
|
return Object.assign((e) => {
|
|
217
217
|
if (t !== void 0) return l(() => t(e));
|
|
218
|
-
let n =
|
|
218
|
+
let n = T(() => t ?? r());
|
|
219
219
|
return () => {
|
|
220
220
|
let t = n();
|
|
221
221
|
return t ? l(() => t(e)) : null;
|
|
222
222
|
};
|
|
223
223
|
}, { preload: r });
|
|
224
224
|
}
|
|
225
|
-
export {
|
|
225
|
+
export { D as $a, O as $abbr, k as $address, A as $area, j as $article, M as $aside, N as $audio, P as $b, F as $base, I as $bdi, L as $bdo, R as $blockquote, z as $body, B as $br, V as $button, H as $canvas, U as $caption, qt as $catch, W as $cite, G as $code, K as $col, q as $colgroup, J as $data, Y as $datalist, ae as $dd, oe as $del, se as $details, ce as $dfn, le as $dialog, ue as $div, de as $dl, fe as $dt, Kt as $dynamic, pe as $em, me as $embed, he as $fieldset, ge as $figcaption, _e as $figure, ve as $footer, Vt as $for, ye as $form, be as $h1, xe as $h2, Se as $h3, Ce as $h4, we as $h5, Te as $h6, Ee as $head, De as $header, Oe as $hgroup, ke as $hr, Ae as $html, je as $i, Ut as $if, Me as $iframe, Ne as $img, Pe as $input, Fe as $ins, Ie as $kbd, Le as $label, Re as $legend, ze as $li, Be as $link, Ve as $main, He as $map, Ue as $mark, We as $menu, Ge as $meta, Ke as $meter, qe as $nav, Je as $noscript, Ye as $object, Xe as $ol, Ze as $optgroup, Qe as $option, $e as $output, et as $p, tt as $picture, Jt as $portal, nt as $pre, rt as $progress, it as $q, at as $rp, ot as $rt, st as $ruby, ct as $s, lt as $samp, ut as $script, dt as $search, ft as $section, pt as $select, Wt as $show, mt as $slot, ht as $small, gt as $source, _t as $span, vt as $strong, yt as $style, bt as $sub, xt as $summary, St as $sup, Yt as $suspense, Gt as $switch, Ct as $table, wt as $tbody, Tt as $td, Et as $template, Dt as $textarea, Ot as $tfoot, kt as $th, At as $thead, jt as $time, Mt as $title, Nt as $tr, Pt as $track, Ft as $u, It as $ul, X as $var, Lt as $video, Rt as $wbr, o as batch, g as catchError, r as computed, v as createContext, f as createRoot, t as effect, m as getOwner, b as html, C as insert, E as isServer, a as isStaticRender, Xt as lazy, ie as mount, u as onCleanup, p as onMount, _ as provide, ne as reconcile, h as renderStatic, T as resource, d as runWithOwner, e as signal, ee as store, zt as unsafeHTML, l as untrack, te as unwrap, y as useContext };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { n as e, s as t, t as n } from "./insert-CbcOsYmu.js";
|
|
2
|
+
// src/dom/element.ts
|
|
3
|
+
function r(e) {
|
|
4
|
+
return i(e, null);
|
|
5
|
+
}
|
|
6
|
+
function i(r, i) {
|
|
7
|
+
return (o, s) => {
|
|
8
|
+
let c = t.element(r, i);
|
|
9
|
+
return a(o) ? (n(c, s), e(c, o), typeof o.ref == "function" && o.ref(c)) : o == null ? n(c, s) : n(c, o), c;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function a(e) {
|
|
13
|
+
return typeof e == "object" && !!e && !Array.isArray(e) && typeof e.nodeType != "number";
|
|
14
|
+
}
|
|
15
|
+
export { r as n, i as t };
|
|
@@ -2,7 +2,7 @@ import { _ as e, p as t, s as n, u as r, v as i, y as a } from "./graph-CR2WKbwr
|
|
|
2
2
|
import { t as o } from "./render-effect-UFDi2Pfh.js";
|
|
3
3
|
import { a as s, i as c } from "./owner-DBi3odT4.js";
|
|
4
4
|
import { a as l, i as u, o as d, r as f, t as p } from "./render-context-DF8lr1uu.js";
|
|
5
|
-
import {
|
|
5
|
+
import { a as m, c as h, i as g, o as _, t as v } from "./insert-CbcOsYmu.js";
|
|
6
6
|
// src/static/json.ts
|
|
7
7
|
function y(e) {
|
|
8
8
|
return JSON.stringify(e).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
@@ -10,13 +10,13 @@ function y(e) {
|
|
|
10
10
|
// src/static/head.ts
|
|
11
11
|
var b = u(null);
|
|
12
12
|
function x(e) {
|
|
13
|
-
let t = d(b) ?? (typeof document > "u" ? null :
|
|
13
|
+
let t = d(b) ?? (typeof document > "u" ? null : E());
|
|
14
14
|
if (t === null) return;
|
|
15
15
|
let n = {};
|
|
16
|
-
o(() => t.set(n,
|
|
16
|
+
o(() => t.set(n, ee(e))), s(() => t.remove(n));
|
|
17
17
|
}
|
|
18
18
|
var S = (e) => typeof e == "function" ? e() : e, C = (e) => `"${e.replace(/["\\]/g, "\\$&")}"`;
|
|
19
|
-
function
|
|
19
|
+
function ee(e) {
|
|
20
20
|
let t = [], n = (e, n, r) => {
|
|
21
21
|
r !== void 0 && t.push({
|
|
22
22
|
key: `${e}:${n}`,
|
|
@@ -63,7 +63,7 @@ function w(e) {
|
|
|
63
63
|
selector: "script[type=\"application/ld+json\"]"
|
|
64
64
|
}), t;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function w(e = () => {}) {
|
|
67
67
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
68
68
|
set(r, i) {
|
|
69
69
|
t.set(r, i), e(n.winners());
|
|
@@ -79,11 +79,11 @@ function T(e = () => {}) {
|
|
|
79
79
|
};
|
|
80
80
|
return n;
|
|
81
81
|
}
|
|
82
|
-
var
|
|
83
|
-
function
|
|
84
|
-
if (
|
|
82
|
+
var T = null;
|
|
83
|
+
function E() {
|
|
84
|
+
if (T !== null) return T;
|
|
85
85
|
let e = /* @__PURE__ */ new Map(), t = document.title;
|
|
86
|
-
return
|
|
86
|
+
return T = w((n) => {
|
|
87
87
|
for (let [r, i] of e) n.has(r) || (i === null ? document.title = t : i.remove(), e.delete(r));
|
|
88
88
|
for (let [t, r] of n) {
|
|
89
89
|
if (r.tag === "title") {
|
|
@@ -97,7 +97,7 @@ function ee() {
|
|
|
97
97
|
for (let [e, t] of Object.entries(r.attrs)) i.getAttribute(e) !== t && i.setAttribute(e, t);
|
|
98
98
|
r.text !== void 0 && i.textContent !== r.text && (i.textContent = r.text), e.set(t, i);
|
|
99
99
|
}
|
|
100
|
-
}),
|
|
100
|
+
}), T;
|
|
101
101
|
}
|
|
102
102
|
// src/static/server-dom.ts
|
|
103
103
|
var D = class {
|
|
@@ -199,7 +199,7 @@ var D = class {
|
|
|
199
199
|
"source",
|
|
200
200
|
"track",
|
|
201
201
|
"wbr"
|
|
202
|
-
]),
|
|
202
|
+
]), P = /* @__PURE__ */ new Set(["script", "style"]), F = /^[^\s"'<>/=\u0000-\u001f\u007f]+$/, te = {
|
|
203
203
|
className: "class",
|
|
204
204
|
htmlFor: "for",
|
|
205
205
|
httpEquiv: "http-equiv",
|
|
@@ -213,7 +213,7 @@ var D = class {
|
|
|
213
213
|
#e = /* @__PURE__ */ new Map();
|
|
214
214
|
#t = {};
|
|
215
215
|
constructor(e, t) {
|
|
216
|
-
if (super(), !
|
|
216
|
+
if (super(), !F.test(e)) throw Error("[keits/static] bad tag");
|
|
217
217
|
this.localName = t === null ? e.toLowerCase() : e, this.namespaceURI = t, this.classList = new L(this), this.style = new R(this);
|
|
218
218
|
}
|
|
219
219
|
getAttribute(e) {
|
|
@@ -223,7 +223,7 @@ var D = class {
|
|
|
223
223
|
return this.#e.has(this.#n(e));
|
|
224
224
|
}
|
|
225
225
|
setAttribute(e, t) {
|
|
226
|
-
if (!
|
|
226
|
+
if (!F.test(e)) throw Error("[keits/static] bad attribute");
|
|
227
227
|
this.#e.set(this.#n(e), String(t));
|
|
228
228
|
}
|
|
229
229
|
removeAttribute(e) {
|
|
@@ -264,7 +264,7 @@ var D = class {
|
|
|
264
264
|
this.setAttribute("class", e);
|
|
265
265
|
}
|
|
266
266
|
set htmlFor(e) {
|
|
267
|
-
this.setAttribute(
|
|
267
|
+
this.setAttribute(te.htmlFor, e);
|
|
268
268
|
}
|
|
269
269
|
set draggable(e) {
|
|
270
270
|
this.setAttribute("draggable", String(e));
|
|
@@ -275,7 +275,7 @@ var D = class {
|
|
|
275
275
|
print(e) {
|
|
276
276
|
e.push(`<${this.localName}`);
|
|
277
277
|
for (let [t, n] of this.#e) e.push(n === "" ? ` ${t}` : ` ${t}="${V(n)}"`);
|
|
278
|
-
e.push(">"), this.namespaceURI === null && N.has(this.localName) || (this.printChildren(e, this.namespaceURI === null &&
|
|
278
|
+
e.push(">"), this.namespaceURI === null && N.has(this.localName) || (this.printChildren(e, this.namespaceURI === null && P.has(this.localName)), e.push(`</${this.localName}>`));
|
|
279
279
|
}
|
|
280
280
|
}, L = class {
|
|
281
281
|
#e;
|
|
@@ -354,7 +354,7 @@ function H(e) {
|
|
|
354
354
|
}
|
|
355
355
|
var U = {
|
|
356
356
|
element(e, n) {
|
|
357
|
-
let i = new I(e, n === "http://www.w3.org/2000/svg" ?
|
|
357
|
+
let i = new I(e, n === "http://www.w3.org/2000/svg" ? g : n), a = t();
|
|
358
358
|
return a !== null && r() && i.setAttribute("data-k", a), i;
|
|
359
359
|
},
|
|
360
360
|
text: (e) => new A(e),
|
|
@@ -372,7 +372,7 @@ function W(e) {
|
|
|
372
372
|
// src/static/render.ts
|
|
373
373
|
var G = 0, K = null;
|
|
374
374
|
async function q(t, o = {}) {
|
|
375
|
-
G++ === 0 && (K =
|
|
375
|
+
G++ === 0 && (K = h(U)), e();
|
|
376
376
|
let s = /* @__PURE__ */ new Set(), c = {}, u = {
|
|
377
377
|
wait(e) {
|
|
378
378
|
s.add(e);
|
|
@@ -382,14 +382,14 @@ async function q(t, o = {}) {
|
|
|
382
382
|
store(e, t, n) {
|
|
383
383
|
r(n) && (c[e] = t);
|
|
384
384
|
}
|
|
385
|
-
}, d =
|
|
385
|
+
}, d = w(), f = () => {};
|
|
386
386
|
try {
|
|
387
387
|
let e = i((e) => {
|
|
388
388
|
f = e;
|
|
389
389
|
let r = U.fragment();
|
|
390
390
|
return l(p, u, () => l(b, d, () => {
|
|
391
391
|
let e = n();
|
|
392
|
-
e.key = "0", e.keyCount = 0, o.hydrate && (e.hydratable = !0),
|
|
392
|
+
e.key = "0", e.keyCount = 0, o.hydrate && (e.hydratable = !0), v(r, t());
|
|
393
393
|
})), r;
|
|
394
394
|
}), r = o.timeout ?? 1e4, a = Date.now() + r;
|
|
395
395
|
for (; s.size > 0;) await J(Promise.all(s), a - Date.now(), r);
|
|
@@ -399,7 +399,7 @@ async function q(t, o = {}) {
|
|
|
399
399
|
data: X(c)
|
|
400
400
|
};
|
|
401
401
|
} finally {
|
|
402
|
-
f(), a(), --G === 0 &&
|
|
402
|
+
f(), a(), --G === 0 && h(K);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
function J(e, t, n) {
|
|
@@ -412,7 +412,7 @@ function Y(e) {
|
|
|
412
412
|
let t = "";
|
|
413
413
|
for (let n of e.values()) {
|
|
414
414
|
let e = Object.entries(n.attrs).map(([e, t]) => {
|
|
415
|
-
if (!
|
|
415
|
+
if (!F.test(e)) throw Error("[keits/static] bad attribute");
|
|
416
416
|
return ` ${e}="${V(t)}"`;
|
|
417
417
|
}).join("");
|
|
418
418
|
n.tag === "title" ? t += `<title>${B(n.text ?? "")}</title>` : n.tag === "script" ? t += `<script${e}>${n.text ?? ""}<\/script>` : t += `<${n.tag}${e}>`;
|
|
@@ -435,15 +435,15 @@ function re() {
|
|
|
435
435
|
Q = null;
|
|
436
436
|
}
|
|
437
437
|
var ie = {
|
|
438
|
-
...
|
|
438
|
+
..._,
|
|
439
439
|
element(e, n) {
|
|
440
440
|
let r = t();
|
|
441
|
-
if (Z !== null && r !== null && !
|
|
441
|
+
if (Z !== null && r !== null && !m()) {
|
|
442
442
|
let t = Z.byKey.get(r);
|
|
443
443
|
if (t !== void 0 && t.localName === (n === null ? e.toLowerCase() : e)) return Z.byKey.delete(r), t.removeAttribute("data-k"), $(t), t;
|
|
444
444
|
Z.mismatch ??= t === void 0 ? `no <${e}> with key ${r}` : `<${t.localName}> instead of <${e}> at key ${r}`;
|
|
445
445
|
}
|
|
446
|
-
return
|
|
446
|
+
return _.element(e, n);
|
|
447
447
|
}
|
|
448
448
|
};
|
|
449
449
|
function $(e) {
|
|
@@ -460,19 +460,19 @@ function ae(t, n, r = "0") {
|
|
|
460
460
|
mismatch: null
|
|
461
461
|
};
|
|
462
462
|
f(ne);
|
|
463
|
-
let s = Z, l =
|
|
463
|
+
let s = Z, l = h(ie);
|
|
464
464
|
Z = o, e();
|
|
465
465
|
let u;
|
|
466
466
|
try {
|
|
467
|
-
$(n), u = c(r, !1, (e) => (
|
|
467
|
+
$(n), u = c(r, !1, (e) => (v(n, t()), e));
|
|
468
468
|
} finally {
|
|
469
|
-
a(), Z = s,
|
|
469
|
+
a(), Z = s, h(l);
|
|
470
470
|
}
|
|
471
471
|
let d = n.querySelector("[data-k]");
|
|
472
472
|
if (o.mismatch === null && d === null) return u;
|
|
473
473
|
u(), n.textContent = "", e();
|
|
474
474
|
try {
|
|
475
|
-
return c(r, !1, (e) => (
|
|
475
|
+
return c(r, !1, (e) => (v(n, t()), e));
|
|
476
476
|
} finally {
|
|
477
477
|
a();
|
|
478
478
|
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { d as e, g as t, i as n, l as r, s as i } from "./graph-CR2WKbwr.js";
|
|
2
|
+
import { t as a } from "./unsafe-keys-C5PMlerl.js";
|
|
3
|
+
import { t as o } from "./render-effect-UFDi2Pfh.js";
|
|
4
|
+
// src/dom/hooks.ts
|
|
5
|
+
var s = {
|
|
6
|
+
element: (e, t) => t === null ? document.createElement(e) : document.createElementNS(t, e),
|
|
7
|
+
text: (e) => document.createTextNode(e),
|
|
8
|
+
marker: () => document.createComment(""),
|
|
9
|
+
fragment: () => document.createDocumentFragment()
|
|
10
|
+
}, c = 0;
|
|
11
|
+
function l(e) {
|
|
12
|
+
c++;
|
|
13
|
+
try {
|
|
14
|
+
return e();
|
|
15
|
+
} finally {
|
|
16
|
+
c--;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function u() {
|
|
20
|
+
return c > 0;
|
|
21
|
+
}
|
|
22
|
+
var d = s;
|
|
23
|
+
function f(e) {
|
|
24
|
+
let t = d;
|
|
25
|
+
return d = e, t;
|
|
26
|
+
}
|
|
27
|
+
// src/dom/events.ts
|
|
28
|
+
function p(t, n, r) {
|
|
29
|
+
let i = r, a;
|
|
30
|
+
if (Array.isArray(r) && ([i, a] = r), typeof i != "function") throw Error("[keits] bad handler");
|
|
31
|
+
e() || m(t, n.slice(2), i, a);
|
|
32
|
+
}
|
|
33
|
+
function m(e, a, o, s) {
|
|
34
|
+
let c = i();
|
|
35
|
+
e.addEventListener(a, (e) => {
|
|
36
|
+
n(() => {
|
|
37
|
+
try {
|
|
38
|
+
let i = t(c, () => o(e));
|
|
39
|
+
h(i) && i.then(void 0, (e) => n(() => r(e, c)));
|
|
40
|
+
} catch (e) {
|
|
41
|
+
r(e, c);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}, s);
|
|
45
|
+
}
|
|
46
|
+
function h(e) {
|
|
47
|
+
return typeof e?.then == "function";
|
|
48
|
+
}
|
|
49
|
+
// src/dom/namespaces.ts
|
|
50
|
+
var g = "http://www.w3.org/2000/svg", _ = /* @__PURE__ */ new Set([
|
|
51
|
+
"innerhtml",
|
|
52
|
+
"outerhtml",
|
|
53
|
+
"srcdoc"
|
|
54
|
+
]), v = /* @__PURE__ */ new Set([
|
|
55
|
+
"href",
|
|
56
|
+
"src",
|
|
57
|
+
"action",
|
|
58
|
+
"formaction",
|
|
59
|
+
"poster",
|
|
60
|
+
"cite",
|
|
61
|
+
"data",
|
|
62
|
+
"xlink:href",
|
|
63
|
+
"to",
|
|
64
|
+
"from",
|
|
65
|
+
"values"
|
|
66
|
+
]), y = "about:invalid#keits-blocked";
|
|
67
|
+
function b(e, t) {
|
|
68
|
+
for (let n in t) {
|
|
69
|
+
let r = t[n];
|
|
70
|
+
n !== "ref" && (n === "class" ? O(e, r) : n === "style" ? M(e, r) : n.toLowerCase().startsWith("on") ? p(e, n, r) : typeof r == "function" ? o(() => x(e, n, r())) : x(e, n, r));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function x(t, n, r) {
|
|
74
|
+
let i = n.toLowerCase();
|
|
75
|
+
if (_.has(i) || a.has(n) || i.startsWith("on") && typeof r == "string") throw Error("[keits] unsafe prop");
|
|
76
|
+
v.has(i) && r != null && r !== !1 && T(String(r)) && (r = y), n in t && t.namespaceURI !== "http://www.w3.org/2000/svg" ? (t[n] = r, e() ? E(t, n, r) : n === "value" && t.localName === "select" && C(t, r)) : n.startsWith("aria-") && typeof r == "boolean" ? t.setAttribute(n, String(r)) : r == null || r === !1 ? t.removeAttribute(n) : t.setAttribute(n, r === !0 ? "" : String(r));
|
|
77
|
+
}
|
|
78
|
+
var S = /* @__PURE__ */ new WeakMap();
|
|
79
|
+
function C(e, t) {
|
|
80
|
+
S.has(e) || e.addEventListener("change", () => S.set(e, e.value)), S.set(e, t == null ? "" : String(t));
|
|
81
|
+
}
|
|
82
|
+
function w(e) {
|
|
83
|
+
let t = e;
|
|
84
|
+
t?.localName === "optgroup" && (t = t.parentElement);
|
|
85
|
+
let n = t && S.get(t);
|
|
86
|
+
n != null && t.value !== n && (t.value = n);
|
|
87
|
+
}
|
|
88
|
+
function T(e) {
|
|
89
|
+
return e.replace(/[\u0000-\u0020]/g, "").toLowerCase().split(";").some((e) => e.startsWith("javascript:"));
|
|
90
|
+
}
|
|
91
|
+
function E(e, t, n) {
|
|
92
|
+
t === "value" ? e.localName === "textarea" ? e.textContent = n == null ? "" : String(n) : e.localName === "select" ? D(e, n == null ? "" : String(n)) : n == null ? e.removeAttribute("value") : e.setAttribute("value", String(n)) : (t === "checked" || t === "selected") && e.toggleAttribute(t, n === !0);
|
|
93
|
+
}
|
|
94
|
+
function D(e, t) {
|
|
95
|
+
for (let n = e.firstChild; n !== null; n = n.nextSibling) {
|
|
96
|
+
if (n.nodeType !== 1) continue;
|
|
97
|
+
let e = n;
|
|
98
|
+
e.localName === "option" ? e.toggleAttribute("selected", (e.getAttribute("value") ?? e.textContent) === t) : D(e, t);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function O(e, t) {
|
|
102
|
+
if (typeof t == "function") {
|
|
103
|
+
o(() => k(e, j(t())));
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
let n = [], r = [];
|
|
107
|
+
A(t, n, (e, t) => r.push([e, t])), n.length > 0 && e.classList.add(...n);
|
|
108
|
+
for (let [t, n] of r) o(() => e.classList.toggle(t, n()));
|
|
109
|
+
}
|
|
110
|
+
function k(e, t) {
|
|
111
|
+
t === "" ? e.removeAttribute("class") : e.setAttribute("class", t);
|
|
112
|
+
}
|
|
113
|
+
function A(e, t, n) {
|
|
114
|
+
if (e) {
|
|
115
|
+
if (typeof e == "string") for (let n of e.split(/\s+/)) n && t.push(n);
|
|
116
|
+
else if (Array.isArray(e)) for (let r of e) A(r, t, n);
|
|
117
|
+
else for (let [r, i] of Object.entries(e)) typeof i == "function" ? n ? n(r, i) : i() && t.push(r) : i && t.push(r);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function j(e) {
|
|
121
|
+
let t = [];
|
|
122
|
+
return A(e, t), t.join(" ");
|
|
123
|
+
}
|
|
124
|
+
function M(e, t) {
|
|
125
|
+
let n = e.style;
|
|
126
|
+
if (typeof t == "function") {
|
|
127
|
+
let e = [];
|
|
128
|
+
o(() => {
|
|
129
|
+
let r = t();
|
|
130
|
+
if (typeof r == "string" || r == null) {
|
|
131
|
+
n.cssText = r ?? "", e = [];
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
let i = Object.keys(r);
|
|
135
|
+
for (let t of e) t in r || n.removeProperty(t);
|
|
136
|
+
for (let e of i) P(n, e, N(r[e]));
|
|
137
|
+
e = i;
|
|
138
|
+
});
|
|
139
|
+
} else if (typeof t == "string") n.cssText = t;
|
|
140
|
+
else if (t != null) for (let [e, r] of Object.entries(t)) typeof r == "function" ? o(() => P(n, e, r())) : P(n, e, r);
|
|
141
|
+
}
|
|
142
|
+
function N(e) {
|
|
143
|
+
return typeof e == "function" ? e() : e;
|
|
144
|
+
}
|
|
145
|
+
function P(e, t, n) {
|
|
146
|
+
n == null || n === "" ? e.removeProperty(t) : e.setProperty(t, String(n));
|
|
147
|
+
}
|
|
148
|
+
// src/dom/insert.ts
|
|
149
|
+
function F(e, t, n = null) {
|
|
150
|
+
if (t != null && typeof t != "boolean") {
|
|
151
|
+
if (typeof t == "function") return z(e, t, n);
|
|
152
|
+
if (I(t)) for (let r of t) F(e, r, n);
|
|
153
|
+
else if (typeof t == "object") {
|
|
154
|
+
if (!t.nodeType) throw Error("[keits] bad child");
|
|
155
|
+
e.insertBefore(t, n);
|
|
156
|
+
} else e.insertBefore(d.text(String(t)), n);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function I(e) {
|
|
160
|
+
return Array.isArray(e);
|
|
161
|
+
}
|
|
162
|
+
function L(e) {
|
|
163
|
+
return e === null || typeof e != "object" && typeof e != "function";
|
|
164
|
+
}
|
|
165
|
+
function R(e) {
|
|
166
|
+
return e == null || typeof e == "boolean" ? "" : String(e);
|
|
167
|
+
}
|
|
168
|
+
function z(e, t, n) {
|
|
169
|
+
let r = d.text("");
|
|
170
|
+
e.insertBefore(r, n);
|
|
171
|
+
let i = null, a = null;
|
|
172
|
+
o(() => {
|
|
173
|
+
let e = t();
|
|
174
|
+
if (i === null || a === null) {
|
|
175
|
+
if (L(e)) {
|
|
176
|
+
let t = R(e);
|
|
177
|
+
r.data !== t && (r.data = t);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
i = d.marker(), a = d.marker(), r.before(i), r.after(a), r.remove();
|
|
181
|
+
}
|
|
182
|
+
B(i, a), F(a.parentNode, e, a), w(a.parentNode);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function B(e, t) {
|
|
186
|
+
let n = e.nextSibling;
|
|
187
|
+
for (; n !== null && n !== t;) {
|
|
188
|
+
let e = n.nextSibling;
|
|
189
|
+
n.remove(), n = e;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
export { u as a, f as c, g as i, l, b as n, s as o, w as r, d as s, F as t };
|
package/dist/prod/static.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as e, r as t, t as n } from "./shared/hydrate-
|
|
1
|
+
import { i as e, r as t, t as n } from "./shared/hydrate-DhHCtdOz.js";
|
|
2
2
|
import { d as r, s as i } from "./shared/graph-CR2WKbwr.js";
|
|
3
3
|
import { a, n as o } from "./shared/owner-DBi3odT4.js";
|
|
4
|
-
import {
|
|
4
|
+
import { s, t as c } from "./shared/insert-CbcOsYmu.js";
|
|
5
5
|
// src/static/island.ts
|
|
6
6
|
function l(e, t, n = {}) {
|
|
7
7
|
return Object.assign((l) => {
|