ajo 0.1.31 → 0.1.32
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/LLMs.md +349 -329
- package/context.js +18 -18
- package/dist/html.cjs +1 -1
- package/dist/html.js +47 -46
- package/dist/index.cjs +1 -1
- package/dist/index.js +86 -70
- package/dist/jsx.cjs +1 -0
- package/dist/jsx.js +12 -0
- package/html.js +137 -142
- package/index.js +309 -286
- package/jsx.js +21 -0
- package/license +15 -15
- package/package.json +19 -3
- package/readme.md +447 -434
- package/types.ts +135 -91
package/context.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export const Context = Symbol.for('ajo.context')
|
|
2
|
-
|
|
3
|
-
export const context = (fallback, key = Symbol()) => function (...args) {
|
|
4
|
-
|
|
5
|
-
const self = this ?? component
|
|
6
|
-
|
|
7
|
-
return self
|
|
8
|
-
? args.length
|
|
9
|
-
? self[Context][key] = args[0]
|
|
10
|
-
: key in self[Context]
|
|
11
|
-
? self[Context][key]
|
|
12
|
-
: fallback
|
|
13
|
-
: fallback
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
let component = null
|
|
17
|
-
|
|
18
|
-
export const current = (...args) => args.length ? (component = args[0]) : component
|
|
1
|
+
export const Context = Symbol.for('ajo.context')
|
|
2
|
+
|
|
3
|
+
export const context = (fallback, key = Symbol()) => function (...args) {
|
|
4
|
+
|
|
5
|
+
const self = this ?? component
|
|
6
|
+
|
|
7
|
+
return self
|
|
8
|
+
? args.length
|
|
9
|
+
? self[Context][key] = args[0]
|
|
10
|
+
: key in self[Context]
|
|
11
|
+
? self[Context][key]
|
|
12
|
+
: fallback
|
|
13
|
+
: fallback
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let component = null
|
|
17
|
+
|
|
18
|
+
export const current = (...args) => args.length ? (component = args[0]) : component
|
package/dist/html.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./context.cjs"),$=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),y=Symbol.for("ajo.args"),u=e=>e.replace(/[&<>"']/g,t=>`&#${t.charCodeAt(0)};`),m=()=>{},p={tag:"div"},w=e=>{let t="";return c(e,n=>t+=n),t},c=(e,t)=>{if(e==null)return;const n=typeof e;if(n!="boolean")if(n=="string")t(u(e));else if(n=="number"||n=="bigint")t(u(String(e)));else if(Symbol.iterator in e)for(e of e)c(e,t);else"nodeName"in e?typeof e.nodeName=="function"?v(e,t):g(e,t):t(u(String(e)))},g=(e,t)=>{const{nodeName:n,children:s}=e;let l="";for(const o in e)o=="nodeName"||o=="children"||o=="key"||o=="skip"||o=="memo"||o=="ref"||o.startsWith("set:")||e[o]==null||e[o]===!1||(e[o]===!0?l+=` ${o}`:l+=` ${o}="${u(String(e[o]))}"`);$.has(n)?t(`<${n}${l}>`):(t(`<${n}${l}>`),s!=null&&c(s,t),t(`</${n}>`))},v=({nodeName:e,fallback:t=e.fallback,...n},s)=>{e.constructor.name=="GeneratorFunction"?x(e,n,s):c(e(n),s)},x=(e,t,n)=>{const s={...e.attrs},l={...e.args};for(const r in t)r.startsWith("attr:")?s[r.slice(5)]=t[r]:r=="key"||r=="skip"||r=="memo"||r=="ref"||r.startsWith("set:")?s[r]=t[r]:l[r]=t[r];const o=new AbortController,b={*[Symbol.iterator](){for(;;)yield this[y]},[a.Context]:Object.create(a.current()?.[a.Context]??null),[y]:l,signal:o.signal,next:m,return:m,throw:r=>{throw r}},f=e.call(b,l),k=a.current();a.current(b);const d=r=>({...s,nodeName:e.is??p.tag,children:r});let i="";try{g(d(f.next().value),r=>i+=r)}catch(r){i="",g(d(f.throw(r).value),S=>i+=S)}finally{f.return(),o.abort(),a.current(k)}n(i)};exports.defaults=p;exports.html=c;exports.render=w;
|
package/dist/html.js
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
import { Context as
|
|
2
|
-
const
|
|
3
|
-
},
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
r.startsWith("set:") || i[r] == null || i[r] === !1 || (i[r] === !0 ? o += ` ${r}` : o += ` ${r}="${d(String(i[r]))}"`);
|
|
10
|
-
p.has(e) ? yield `<${e}${o}>` : (yield `<${e}${o}>`, n != null && (yield* g(n)), yield `</${e}>`);
|
|
11
|
-
}, c = function* (e) {
|
|
12
|
-
if (e == null) return;
|
|
13
|
-
const n = typeof e;
|
|
1
|
+
import { Context as d, current as c } from "./context.js";
|
|
2
|
+
const w = /* @__PURE__ */ new Set(["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), p = /* @__PURE__ */ Symbol.for("ajo.args"), i = (t) => t.replace(/[&<>"']/g, (e) => `&#${e.charCodeAt(0)};`), m = () => {
|
|
3
|
+
}, S = { tag: "div" }, C = (t) => {
|
|
4
|
+
let e = "";
|
|
5
|
+
return f(t, (n) => e += n), e;
|
|
6
|
+
}, f = (t, e) => {
|
|
7
|
+
if (t == null) return;
|
|
8
|
+
const n = typeof t;
|
|
14
9
|
if (n != "boolean")
|
|
15
|
-
if (n == "string")
|
|
16
|
-
else if (n == "number" || n == "bigint")
|
|
17
|
-
else if (Symbol.iterator in
|
|
18
|
-
else "nodeName" in
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
if (n == "string") e(i(t));
|
|
11
|
+
else if (n == "number" || n == "bigint") e(i(String(t)));
|
|
12
|
+
else if (Symbol.iterator in t) for (t of t) f(t, e);
|
|
13
|
+
else "nodeName" in t ? typeof t.nodeName == "function" ? v(t, e) : g(t, e) : e(i(String(t)));
|
|
14
|
+
}, g = (t, e) => {
|
|
15
|
+
const { nodeName: n, children: s } = t;
|
|
16
|
+
let l = "";
|
|
17
|
+
for (const o in t)
|
|
18
|
+
o == "nodeName" || o == "children" || o == "key" || o == "skip" || o == "memo" || o == "ref" || o.startsWith("set:") || t[o] == null || t[o] === !1 || (t[o] === !0 ? l += ` ${o}` : l += ` ${o}="${i(String(t[o]))}"`);
|
|
19
|
+
w.has(n) ? e(`<${n}${l}>`) : (e(`<${n}${l}>`), s != null && f(s, e), e(`</${n}>`));
|
|
20
|
+
}, v = ({ nodeName: t, fallback: e = t.fallback, ...n }, s) => {
|
|
21
|
+
t.constructor.name == "GeneratorFunction" ? x(t, n, s) : f(t(n), s);
|
|
22
|
+
}, x = (t, e, n) => {
|
|
23
|
+
const s = { ...t.attrs }, l = { ...t.args };
|
|
24
|
+
for (const r in e)
|
|
25
|
+
r.startsWith("attr:") ? s[r.slice(5)] = e[r] : r == "key" || r == "skip" || r == "memo" || r == "ref" || r.startsWith("set:") ? s[r] = e[r] : l[r] = e[r];
|
|
26
|
+
const o = new AbortController(), b = {
|
|
27
|
+
*[Symbol.iterator]() {
|
|
28
|
+
for (; ; ) yield this[p];
|
|
29
|
+
},
|
|
30
|
+
[d]: Object.create(c()?.[d] ?? null),
|
|
31
|
+
[p]: l,
|
|
32
|
+
signal: o.signal,
|
|
33
|
+
next: m,
|
|
34
|
+
return: m,
|
|
35
|
+
throw: (r) => {
|
|
36
|
+
throw r;
|
|
33
37
|
}
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
const
|
|
38
|
+
}, u = t.call(b, l), k = c();
|
|
39
|
+
c(b);
|
|
40
|
+
const y = (r) => ({ ...s, nodeName: t.is ?? S.tag, children: r });
|
|
41
|
+
let a = "";
|
|
37
42
|
try {
|
|
38
|
-
|
|
39
|
-
} catch (
|
|
40
|
-
|
|
43
|
+
g(y(u.next().value), (r) => a += r);
|
|
44
|
+
} catch (r) {
|
|
45
|
+
a = "", g(y(u.throw(r).value), ($) => a += $);
|
|
41
46
|
} finally {
|
|
42
|
-
|
|
47
|
+
u.return(), o.abort(), c(k);
|
|
43
48
|
}
|
|
44
|
-
|
|
45
|
-
if ("children" in r) {
|
|
46
|
-
const l = [...c(r.children)];
|
|
47
|
-
l.length ? r.children = l.length == 1 ? l[0] : l : delete r.children;
|
|
48
|
-
}
|
|
49
|
-
return r;
|
|
49
|
+
n(a);
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
S as defaults,
|
|
53
|
+
f as html,
|
|
54
|
+
C as render
|
|
54
55
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./context.cjs"),{isArray:x}=Array,{assign:N,create:A}=Object,a=Symbol.for("ajo.key"),g=Symbol.for("ajo.keyed"),C=Symbol.for("ajo.memo"),u=Symbol.for("ajo.cache"),f=Symbol.for("ajo.generator"),o=Symbol.for("ajo.iterator"),S=Symbol.for("ajo.render"),c=Symbol.for("ajo.args"),h=Symbol.for("ajo.controller"),E={tag:"div"},v=(r,t)=>(t&&(r.is=t),r),m=(r,t,e=t.firstChild,n=null)=>{for(p(r,i=>{const s=typeof i=="string"?M(i,e):W(i,t,e);e==null?b(t,s,n):s==e?e=s.nextSibling:s==e.nextSibling?(b(t,e,n),e=s.nextSibling):b(t,s,e)});e!=n;){const i=e.nextSibling;e.nodeType==1&&O(e),t.removeChild(e),e=i}},p=(r,t)=>{if(r==null)return;const e=typeof r;if(e!="boolean")if(e=="string")t(r);else if(e=="number"||e=="bigint")t(String(r));else if(Symbol.iterator in r)for(r of r)p(r,t);else"nodeName"in r?typeof r.nodeName=="function"?T(r,t):t(r):t(String(r))},T=({nodeName:r,...t},e)=>{r.constructor.name=="GeneratorFunction"?e(G(r,t)):p(r(t),e)},G=(r,t)=>{const e={...r.attrs},n={...r.args};for(const i in t)i.startsWith("attr:")?e[i.slice(5)]=t[i]:i=="key"||i=="skip"||i=="memo"||i=="ref"||i.startsWith("set:")?e[i]=t[i]:n[i]=t[i];return{...e,nodeName:r.is??E.tag,[f]:r,[c]:n}},M=(r,t)=>{for(;t&&t.nodeType!=3;)t=t.nextSibling;return t?t.data!=r&&(t.data=r):t=document.createTextNode(r),t},W=(r,t,e)=>{const{nodeName:n,children:i,key:s,skip:k,memo:w,[f]:y,[c]:j}=r;for(s!=null&&(e=(t[g]??=new Map).get(s)??e);e&&(e.localName!=n||e[a]!=null&&e[a]!=s||e[f]&&e[f]!=y);)e=e[a]!=null?null:e.nextElementSibling;return e??=document.createElementNS(r.xmlns??t.namespaceURI,n),s!=null&&t[g].set(e[a]=s,e),(w==null||I(e[C],e[C]=w))&&(B(e[u],e[u]=r,e),k||(y?R(y,j,e):m(i,e))),e},B=(r,t,e)=>{for(const n in{...r,...t})n=="nodeName"||n=="children"||n=="key"||n=="skip"||n=="memo"||r?.[n]===t[n]||(n=="ref"&&typeof t[n]=="function"?t[n](e):n.startsWith("set:")?e[n.slice(4)]=t[n]:t[n]==null||t[n]===!1?e.removeAttribute(n):e.setAttribute(n,t[n]===!0?"":t[n]))},I=(r,t)=>x(r)&&x(t)?r.some((e,n)=>e!==t[n]):r!==t,K=(r,t)=>{let e=t.firstElementChild;for(;e;)if(r(e)&&e.firstElementChild)e=e.firstElementChild;else{for(;e!=t&&!e.nextElementSibling;)e=e.parentNode??t;e=e!=t&&e.nextElementSibling}},b=(r,t,e)=>{if(t.isConnected&&t.contains(document.activeElement)){const n=t.nextSibling;for(;e&&e!=t;){const i=e.nextSibling;r.insertBefore(e,n),e=i}}else r.insertBefore(t,e)},O=r=>{let t=r;for(;t.firstElementChild;)t=t.firstElementChild;for(;;){const{nextElementSibling:e,parentNode:n}=t;if(t[a]!=null&&n?.[g]?.delete(t[a]),typeof t.return=="function"&&t.return(!1),typeof t[u]?.ref=="function"&&t[u].ref(null),t===r)break;if(t=e??n??r,e)for(;t.firstElementChild;)t=t.firstElementChild}},R=(r,t,e)=>{e[f]??=(N(e,q)[l.Context]=A(l.current()?.[l.Context]??null),r),e[c]=t,e[S]()},q={*[Symbol.iterator](){for(;;)yield this[c]},[S](){const r=l.current();l.current(this);try{this[o]||(this.signal=(this[h]=new AbortController).signal,this[o]=this[f].call(this,this[c]));const{value:t,done:e}=this[o].next();m(t,this),e&&this.return()}catch(t){this.throw(t)}finally{l.current(r)}},next(r,t){if(!this.isConnected)return t;try{typeof r=="function"&&(t=r.call(this,this[c]))}catch(e){return this.throw(e)}return l.current()?.contains(this)||this[S](),t},throw(r){for(let t=this;t;t=t.parentNode)if(t[o]?.throw)try{return m(t[o].throw(r).value,t)}catch(e){r=new Error(e?.message??e,{cause:r})}throw r},return(r=!0){r&&K(t=>typeof t.return=="function"?t.return():!0,this);try{this[o]?.return()}catch(t){this.throw(t)}finally{this[o]=null,this[h]?.abort()}}};exports.defaults=E;exports.render=m;exports.stateful=v;
|
package/dist/index.js
CHANGED
|
@@ -1,94 +1,110 @@
|
|
|
1
|
-
import { Context as
|
|
2
|
-
const
|
|
3
|
-
for (
|
|
4
|
-
const
|
|
5
|
-
|
|
1
|
+
import { Context as x, current as c } from "./context.js";
|
|
2
|
+
const { isArray: h } = Array, { assign: N, create: A } = Object, l = /* @__PURE__ */ Symbol.for("ajo.key"), b = /* @__PURE__ */ Symbol.for("ajo.keyed"), C = /* @__PURE__ */ Symbol.for("ajo.memo"), u = /* @__PURE__ */ Symbol.for("ajo.cache"), a = /* @__PURE__ */ Symbol.for("ajo.generator"), o = /* @__PURE__ */ Symbol.for("ajo.iterator"), g = /* @__PURE__ */ Symbol.for("ajo.render"), f = /* @__PURE__ */ Symbol.for("ajo.args"), E = /* @__PURE__ */ Symbol.for("ajo.controller"), v = { tag: "div" }, q = (r, t) => (t && (r.is = t), r), S = (r, t, e = t.firstChild, i = null) => {
|
|
3
|
+
for (p(r, (n) => {
|
|
4
|
+
const s = typeof n == "string" ? W(n, e) : B(n, t, e);
|
|
5
|
+
e == null ? y(t, s, i) : s == e ? e = s.nextSibling : s == e.nextSibling ? (y(t, e, i), e = s.nextSibling) : y(t, s, e);
|
|
6
|
+
}); e != i; ) {
|
|
7
|
+
const n = e.nextSibling;
|
|
8
|
+
e.nodeType == 1 && R(e), t.removeChild(e), e = n;
|
|
6
9
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, v = function* ({ nodeName: e, ...t }) {
|
|
20
|
-
e.constructor.name == "GeneratorFunction" ? yield E(e, t) : yield* S(e(t));
|
|
21
|
-
}, E = (e, t) => {
|
|
22
|
-
const r = { ...e.attrs }, s = { ...e.args };
|
|
10
|
+
}, p = (r, t) => {
|
|
11
|
+
if (r == null) return;
|
|
12
|
+
const e = typeof r;
|
|
13
|
+
if (e != "boolean")
|
|
14
|
+
if (e == "string") t(r);
|
|
15
|
+
else if (e == "number" || e == "bigint") t(String(r));
|
|
16
|
+
else if (Symbol.iterator in r) for (r of r) p(r, t);
|
|
17
|
+
else "nodeName" in r ? typeof r.nodeName == "function" ? G(r, t) : t(r) : t(String(r));
|
|
18
|
+
}, G = ({ nodeName: r, ...t }, e) => {
|
|
19
|
+
r.constructor.name == "GeneratorFunction" ? e(T(r, t)) : p(r(t), e);
|
|
20
|
+
}, T = (r, t) => {
|
|
21
|
+
const e = { ...r.attrs }, i = { ...r.args };
|
|
23
22
|
for (const n in t)
|
|
24
|
-
n.startsWith("attr:") ?
|
|
25
|
-
return { ...
|
|
26
|
-
},
|
|
23
|
+
n.startsWith("attr:") ? e[n.slice(5)] = t[n] : n == "key" || n == "skip" || n == "memo" || n == "ref" || n.startsWith("set:") ? e[n] = t[n] : i[n] = t[n];
|
|
24
|
+
return { ...e, nodeName: r.is ?? v.tag, [a]: r, [f]: i };
|
|
25
|
+
}, W = (r, t) => {
|
|
27
26
|
for (; t && t.nodeType != 3; ) t = t.nextSibling;
|
|
28
|
-
return t ? t.data !=
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
return t ? t.data != r && (t.data = r) : t = document.createTextNode(r), t;
|
|
28
|
+
}, B = (r, t, e) => {
|
|
29
|
+
const { nodeName: i, children: n, key: s, skip: k, memo: w, [a]: m, [f]: j } = r;
|
|
30
|
+
for (s != null && (e = (t[b] ??= /* @__PURE__ */ new Map()).get(s) ?? e); e && (e.localName != i || e[l] != null && e[l] != s || e[a] && e[a] != m); ) e = e[l] != null ? null : e.nextElementSibling;
|
|
31
|
+
return e ??= document.createElementNS(r.xmlns ?? t.namespaceURI, i), s != null && t[b].set(e[l] = s, e), (w == null || K(e[C], e[C] = w)) && (I(e[u], e[u] = r, e), k || (m ? F(m, j, e) : S(n, e))), e;
|
|
32
|
+
}, I = (r, t, e) => {
|
|
33
|
+
for (const i in { ...r, ...t })
|
|
34
|
+
i == "nodeName" || i == "children" || i == "key" || i == "skip" || i == "memo" || r?.[i] === t[i] || (i == "ref" && typeof t[i] == "function" ? t[i](e) : i.startsWith("set:") ? e[i.slice(4)] = t[i] : t[i] == null || t[i] === !1 ? e.removeAttribute(i) : e.setAttribute(i, t[i] === !0 ? "" : t[i]));
|
|
35
|
+
}, K = (r, t) => h(r) && h(t) ? r.some((e, i) => e !== t[i]) : r !== t, M = (r, t) => {
|
|
36
|
+
let e = t.firstElementChild;
|
|
37
|
+
for (; e; )
|
|
38
|
+
if (r(e) && e.firstElementChild) e = e.firstElementChild;
|
|
39
|
+
else {
|
|
40
|
+
for (; e != t && !e.nextElementSibling; ) e = e.parentNode ?? t;
|
|
41
|
+
e = e != t && e.nextElementSibling;
|
|
42
|
+
}
|
|
43
|
+
}, y = (r, t, e) => {
|
|
44
|
+
if (t.isConnected && t.contains(document.activeElement)) {
|
|
45
|
+
const i = t.nextSibling;
|
|
46
|
+
for (; e && e != t; ) {
|
|
47
|
+
const n = e.nextSibling;
|
|
48
|
+
r.insertBefore(e, i), e = n;
|
|
41
49
|
}
|
|
42
|
-
} else
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
} else r.insertBefore(t, e);
|
|
51
|
+
}, R = (r) => {
|
|
52
|
+
let t = r;
|
|
53
|
+
for (; t.firstElementChild; ) t = t.firstElementChild;
|
|
54
|
+
for (; ; ) {
|
|
55
|
+
const { nextElementSibling: e, parentNode: i } = t;
|
|
56
|
+
if (t[l] != null && i?.[b]?.delete(t[l]), typeof t.return == "function" && t.return(!1), typeof t[u]?.ref == "function" && t[u].ref(null), t === r) break;
|
|
57
|
+
if (t = e ?? i ?? r, e) for (; t.firstElementChild; ) t = t.firstElementChild;
|
|
58
|
+
}
|
|
59
|
+
}, F = (r, t, e) => {
|
|
60
|
+
e[a] ??= (N(e, O)[x] = A(c()?.[x] ?? null), r), e[f] = t, e[g]();
|
|
61
|
+
}, O = {
|
|
62
|
+
*[Symbol.iterator]() {
|
|
63
|
+
for (; ; ) yield this[f];
|
|
64
|
+
},
|
|
65
|
+
[g]() {
|
|
66
|
+
const r = c();
|
|
67
|
+
c(this);
|
|
54
68
|
try {
|
|
55
|
-
this[o] || (this.signal = (this[
|
|
56
|
-
const { value: t, done:
|
|
57
|
-
|
|
69
|
+
this[o] || (this.signal = (this[E] = new AbortController()).signal, this[o] = this[a].call(this, this[f]));
|
|
70
|
+
const { value: t, done: e } = this[o].next();
|
|
71
|
+
S(t, this), e && this.return();
|
|
58
72
|
} catch (t) {
|
|
59
73
|
this.throw(t);
|
|
60
74
|
} finally {
|
|
61
|
-
|
|
75
|
+
c(r);
|
|
62
76
|
}
|
|
63
77
|
},
|
|
64
|
-
next(
|
|
78
|
+
next(r, t) {
|
|
79
|
+
if (!this.isConnected) return t;
|
|
65
80
|
try {
|
|
66
|
-
typeof
|
|
67
|
-
} catch (
|
|
68
|
-
return this.throw(
|
|
81
|
+
typeof r == "function" && (t = r.call(this, this[f]));
|
|
82
|
+
} catch (e) {
|
|
83
|
+
return this.throw(e);
|
|
69
84
|
}
|
|
70
|
-
return
|
|
85
|
+
return c()?.contains(this) || this[g](), t;
|
|
71
86
|
},
|
|
72
|
-
throw(
|
|
87
|
+
throw(r) {
|
|
73
88
|
for (let t = this; t; t = t.parentNode) if (t[o]?.throw) try {
|
|
74
|
-
return
|
|
75
|
-
} catch (
|
|
76
|
-
|
|
89
|
+
return S(t[o].throw(r).value, t);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
r = new Error(e?.message ?? e, { cause: r });
|
|
77
92
|
}
|
|
78
|
-
throw
|
|
93
|
+
throw r;
|
|
79
94
|
},
|
|
80
|
-
return() {
|
|
95
|
+
return(r = !0) {
|
|
96
|
+
r && M((t) => typeof t.return == "function" ? t.return() : !0, this);
|
|
81
97
|
try {
|
|
82
98
|
this[o]?.return();
|
|
83
|
-
} catch (
|
|
84
|
-
this.throw(
|
|
99
|
+
} catch (t) {
|
|
100
|
+
this.throw(t);
|
|
85
101
|
} finally {
|
|
86
|
-
this[o] = null, this[
|
|
102
|
+
this[o] = null, this[E]?.abort();
|
|
87
103
|
}
|
|
88
104
|
}
|
|
89
105
|
};
|
|
90
106
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
107
|
+
v as defaults,
|
|
108
|
+
S as render,
|
|
109
|
+
q as stateful
|
|
94
110
|
};
|
package/dist/jsx.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=e=>e.children,c=(e,n,...t)=>((n??={}).nodeName=e,!("children"in n)&&t.length&&(n.children=t.length==1?t[0]:t),n);function s(e,n,t){return t!=null&&((n??={}).key=t),c(e,n)}const j=s,l=s;exports.Fragment=i;exports.h=c;exports.jsx=s;exports.jsxDEV=l;exports.jsxs=j;
|
package/dist/jsx.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const l = (e) => e.children, i = (e, n, ...t) => ((n ??= {}).nodeName = e, !("children" in n) && t.length && (n.children = t.length == 1 ? t[0] : t), n);
|
|
2
|
+
function c(e, n, t) {
|
|
3
|
+
return t != null && ((n ??= {}).key = t), i(e, n);
|
|
4
|
+
}
|
|
5
|
+
const s = c, u = c;
|
|
6
|
+
export {
|
|
7
|
+
l as Fragment,
|
|
8
|
+
i as h,
|
|
9
|
+
c as jsx,
|
|
10
|
+
u as jsxDEV,
|
|
11
|
+
s as jsxs
|
|
12
|
+
};
|