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