@elurjs/core 3.6.1 → 3.7.0-beta.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/dist/lib/async.cjs +1 -1
- package/dist/lib/async.js +1 -1
- package/dist/lib/component.cjs +1 -2
- package/dist/lib/component.js +2 -66
- package/dist/lib/context.cjs +1 -1
- package/dist/lib/context.js +35 -23
- package/dist/lib/devtools.cjs +1 -1
- package/dist/lib/devtools.js +1 -1
- package/dist/lib/elur/async.cjs +1 -1
- package/dist/lib/elur/async.cjs.map +1 -1
- package/dist/lib/elur/async.js +1 -1
- package/dist/lib/elur/component.cjs +1 -2
- package/dist/lib/elur/component.d.cts +1 -17
- package/dist/lib/elur/component.d.ts +1 -17
- package/dist/lib/elur/component.js +2 -66
- package/dist/lib/elur/context.cjs +1 -1
- package/dist/lib/elur/context.cjs.map +1 -1
- package/dist/lib/elur/context.d.cts +5 -0
- package/dist/lib/elur/context.d.ts +5 -0
- package/dist/lib/elur/context.js +35 -23
- package/dist/lib/elur/context.js.map +1 -1
- package/dist/lib/elur/devtools.cjs +1 -1
- package/dist/lib/elur/devtools.cjs.map +1 -1
- package/dist/lib/elur/devtools.js +1 -1
- package/dist/lib/elur/form.cjs +1 -1
- package/dist/lib/elur/form.cjs.map +1 -1
- package/dist/lib/elur/form.js +1 -1
- package/dist/lib/elur/hydrate/index.cjs +1 -2
- package/dist/lib/elur/hydrate/index.d.cts +1 -13
- package/dist/lib/elur/hydrate/index.d.ts +1 -13
- package/dist/lib/elur/hydrate/index.js +2 -410
- package/dist/lib/elur/lifecycle.cjs +1 -1
- package/dist/lib/elur/lifecycle.cjs.map +1 -1
- package/dist/lib/elur/lifecycle.d.cts +27 -0
- package/dist/lib/elur/lifecycle.d.ts +27 -0
- package/dist/lib/elur/lifecycle.js +4 -0
- package/dist/lib/elur/lifecycle.js.map +1 -1
- package/dist/lib/elur/next/component.d.cts +281 -0
- package/dist/lib/elur/next/component.d.ts +281 -0
- package/dist/lib/elur/next/dom-write.d.cts +18 -0
- package/dist/lib/elur/next/dom-write.d.ts +18 -0
- package/dist/lib/elur/next/hydrate.d.cts +14 -0
- package/dist/lib/elur/next/hydrate.d.ts +14 -0
- package/dist/lib/elur/next/keyed-diff.d.cts +46 -0
- package/dist/lib/elur/next/keyed-diff.d.ts +46 -0
- package/dist/lib/elur/next/mount-helpers.d.cts +25 -0
- package/dist/lib/elur/next/mount-helpers.d.ts +25 -0
- package/dist/lib/elur/next/mount.d.cts +29 -0
- package/dist/lib/elur/next/mount.d.ts +29 -0
- package/dist/lib/elur/next/node-binding.d.cts +6 -0
- package/dist/lib/elur/next/node-binding.d.ts +6 -0
- package/dist/lib/elur/next/reactivity.d.cts +193 -0
- package/dist/lib/elur/next/reactivity.d.ts +193 -0
- package/dist/lib/elur/next-2/component.cjs +2 -0
- package/dist/lib/elur/next-2/component.cjs.map +1 -0
- package/dist/lib/elur/next-2/component.d.cts +283 -0
- package/dist/lib/elur/next-2/component.d.ts +283 -0
- package/dist/lib/elur/next-2/component.js +340 -0
- package/dist/lib/elur/next-2/component.js.map +1 -0
- package/dist/lib/elur/next-2/dom-write.cjs +2 -0
- package/dist/lib/elur/next-2/dom-write.cjs.map +1 -0
- package/dist/lib/elur/next-2/dom-write.d.cts +18 -0
- package/dist/lib/elur/next-2/dom-write.d.ts +18 -0
- package/dist/lib/elur/next-2/dom-write.js +31 -0
- package/dist/lib/elur/next-2/dom-write.js.map +1 -0
- package/dist/lib/elur/next-2/hydrate.cjs +2 -0
- package/dist/lib/elur/next-2/hydrate.cjs.map +1 -0
- package/dist/lib/elur/next-2/hydrate.d.cts +30 -0
- package/dist/lib/elur/next-2/hydrate.d.ts +30 -0
- package/dist/lib/elur/next-2/hydrate.js +449 -0
- package/dist/lib/elur/next-2/hydrate.js.map +1 -0
- package/dist/lib/elur/next-2/keyed-diff.cjs +2 -0
- package/dist/lib/elur/next-2/keyed-diff.cjs.map +1 -0
- package/dist/lib/elur/next-2/keyed-diff.d.cts +79 -0
- package/dist/lib/elur/next-2/keyed-diff.d.ts +79 -0
- package/dist/lib/elur/next-2/keyed-diff.js +208 -0
- package/dist/lib/elur/next-2/keyed-diff.js.map +1 -0
- package/dist/lib/elur/next-2/mount-helpers.cjs +2 -0
- package/dist/lib/elur/next-2/mount-helpers.cjs.map +1 -0
- package/dist/lib/elur/next-2/mount-helpers.d.cts +25 -0
- package/dist/lib/elur/next-2/mount-helpers.d.ts +25 -0
- package/dist/lib/elur/next-2/mount-helpers.js +87 -0
- package/dist/lib/elur/next-2/mount-helpers.js.map +1 -0
- package/dist/lib/elur/next-2/mount.cjs +2 -0
- package/dist/lib/elur/next-2/mount.cjs.map +1 -0
- package/dist/lib/elur/next-2/mount.d.cts +29 -0
- package/dist/lib/elur/next-2/mount.d.ts +29 -0
- package/dist/lib/elur/next-2/mount.js +34 -0
- package/dist/lib/elur/next-2/mount.js.map +1 -0
- package/dist/lib/elur/next-2/node-binding.cjs +2 -0
- package/dist/lib/elur/next-2/node-binding.cjs.map +1 -0
- package/dist/lib/elur/next-2/node-binding.d.cts +6 -0
- package/dist/lib/elur/next-2/node-binding.d.ts +6 -0
- package/dist/lib/elur/next-2/node-binding.js +130 -0
- package/dist/lib/elur/next-2/node-binding.js.map +1 -0
- package/dist/lib/elur/next-2/reactivity.cjs +2 -0
- package/dist/lib/elur/next-2/reactivity.cjs.map +1 -0
- package/dist/lib/elur/next-2/reactivity.d.cts +220 -0
- package/dist/lib/elur/next-2/reactivity.d.ts +220 -0
- package/dist/lib/elur/next-2/reactivity.js +614 -0
- package/dist/lib/elur/next-2/reactivity.js.map +1 -0
- package/dist/lib/elur/next-2/scheduler.cjs +2 -0
- package/dist/lib/elur/next-2/scheduler.cjs.map +1 -0
- package/dist/lib/elur/next-2/scheduler.d.cts +23 -0
- package/dist/lib/elur/next-2/scheduler.d.ts +23 -0
- package/dist/lib/elur/next-2/scheduler.js +26 -0
- package/dist/lib/elur/next-2/scheduler.js.map +1 -0
- package/dist/lib/elur/plugins.cjs +1 -1
- package/dist/lib/elur/plugins.cjs.map +1 -1
- package/dist/lib/elur/plugins.js +1 -1
- package/dist/lib/elur/reactivity.cjs +1 -2
- package/dist/lib/elur/reactivity.d.cts +1 -67
- package/dist/lib/elur/reactivity.d.ts +1 -67
- package/dist/lib/elur/reactivity.js +2 -218
- package/dist/lib/elur/router.cjs +2 -2
- package/dist/lib/elur/router.cjs.map +1 -1
- package/dist/lib/elur/router.js +2 -2
- package/dist/lib/elur/router.js.map +1 -1
- package/dist/lib/elur/server/index.cjs +1 -1
- package/dist/lib/elur/server/index.cjs.map +1 -1
- package/dist/lib/elur/server/index.js +180 -108
- package/dist/lib/elur/server/index.js.map +1 -1
- package/dist/lib/elur/store.cjs +1 -1
- package/dist/lib/elur/store.cjs.map +1 -1
- package/dist/lib/elur/store.js +10 -4
- package/dist/lib/elur/store.js.map +1 -1
- package/dist/lib/elur/template/bindings.cjs +1 -1
- package/dist/lib/elur/template/bindings.cjs.map +1 -1
- package/dist/lib/elur/template/bindings.js +98 -84
- package/dist/lib/elur/template/bindings.js.map +1 -1
- package/dist/lib/elur/template/dom-write.d.cts +1 -5
- package/dist/lib/elur/template/dom-write.d.ts +1 -5
- package/dist/lib/elur/template/error-boundary.cjs +1 -1
- package/dist/lib/elur/template/error-boundary.cjs.map +1 -1
- package/dist/lib/elur/template/error-boundary.js +56 -50
- package/dist/lib/elur/template/error-boundary.js.map +1 -1
- package/dist/lib/elur/template/html.cjs +1 -1
- package/dist/lib/elur/template/html.cjs.map +1 -1
- package/dist/lib/elur/template/html.js +40 -37
- package/dist/lib/elur/template/html.js.map +1 -1
- package/dist/lib/elur/template/index.cjs +1 -1
- package/dist/lib/elur/template/index.d.cts +2 -1
- package/dist/lib/elur/template/index.d.ts +2 -1
- package/dist/lib/elur/template/index.js +13 -12
- package/dist/lib/elur/template/keyed-diff.d.cts +1 -32
- package/dist/lib/elur/template/keyed-diff.d.ts +1 -32
- package/dist/lib/elur/template/keyed.cjs +1 -1
- package/dist/lib/elur/template/keyed.cjs.map +1 -1
- package/dist/lib/elur/template/keyed.d.cts +10 -2
- package/dist/lib/elur/template/keyed.d.ts +10 -2
- package/dist/lib/elur/template/keyed.js +12 -1
- package/dist/lib/elur/template/keyed.js.map +1 -1
- package/dist/lib/elur/template/mount-helpers.d.cts +1 -29
- package/dist/lib/elur/template/mount-helpers.d.ts +1 -29
- package/dist/lib/elur/template/node-binding.d.cts +1 -6
- package/dist/lib/elur/template/node-binding.d.ts +1 -6
- package/dist/lib/elur/template/portal.cjs +1 -1
- package/dist/lib/elur/template/portal.cjs.map +1 -1
- package/dist/lib/elur/template/portal.js +1 -1
- package/dist/lib/elur/template/transitions.cjs +1 -1
- package/dist/lib/elur/template/transitions.cjs.map +1 -1
- package/dist/lib/elur/template/transitions.js +2 -2
- package/dist/lib/elur/template/types.cjs +1 -1
- package/dist/lib/elur/template/types.cjs.map +1 -1
- package/dist/lib/elur/template/types.d.cts +55 -0
- package/dist/lib/elur/template/types.d.ts +55 -0
- package/dist/lib/elur/template/types.js +5 -1
- package/dist/lib/elur/template/types.js.map +1 -1
- package/dist/lib/elur.cjs +1 -1
- package/dist/lib/elur.js +2 -2
- package/dist/lib/form.cjs +1 -1
- package/dist/lib/form.js +1 -1
- package/dist/lib/hydrate.cjs +1 -2
- package/dist/lib/hydrate.js +2 -410
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +2 -2
- package/dist/lib/lifecycle.cjs +1 -1
- package/dist/lib/lifecycle.js +4 -0
- package/dist/lib/plugins.cjs +1 -1
- package/dist/lib/plugins.js +1 -1
- package/dist/lib/router.cjs +2 -2
- package/dist/lib/router.js +2 -2
- package/dist/lib/server.cjs +1 -1
- package/dist/lib/server.js +180 -108
- package/dist/lib/signals.cjs +1 -2
- package/dist/lib/signals.js +2 -218
- package/dist/lib/store.cjs +1 -1
- package/dist/lib/store.js +10 -4
- package/dist/lib/template.cjs +1 -1
- package/dist/lib/template.js +13 -12
- package/package.json +7 -9
- package/dist/lib/elur/component.cjs.map +0 -1
- package/dist/lib/elur/component.js.map +0 -1
- package/dist/lib/elur/hydrate/index.cjs.map +0 -1
- package/dist/lib/elur/hydrate/index.js.map +0 -1
- package/dist/lib/elur/reactivity.cjs.map +0 -1
- package/dist/lib/elur/reactivity.js.map +0 -1
- package/dist/lib/elur/template/dom-write.cjs +0 -2
- package/dist/lib/elur/template/dom-write.cjs.map +0 -1
- package/dist/lib/elur/template/dom-write.js +0 -16
- package/dist/lib/elur/template/dom-write.js.map +0 -1
- package/dist/lib/elur/template/keyed-diff.cjs +0 -2
- package/dist/lib/elur/template/keyed-diff.cjs.map +0 -1
- package/dist/lib/elur/template/keyed-diff.js +0 -100
- package/dist/lib/elur/template/keyed-diff.js.map +0 -1
- package/dist/lib/elur/template/mount-helpers.cjs +0 -2
- package/dist/lib/elur/template/mount-helpers.cjs.map +0 -1
- package/dist/lib/elur/template/mount-helpers.js +0 -132
- package/dist/lib/elur/template/mount-helpers.js.map +0 -1
- package/dist/lib/elur/template/node-binding.cjs +0 -2
- package/dist/lib/elur/template/node-binding.cjs.map +0 -1
- package/dist/lib/elur/template/node-binding.js +0 -95
- package/dist/lib/elur/template/node-binding.js.map +0 -1
|
@@ -1,410 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { isElurComponent as a } from "./lifecycle.js";
|
|
4
|
-
import { _captureContextSnapshot as o, _popComponentContext as s, _pushComponentContext as c } from "./context.js";
|
|
5
|
-
import { deserializeRepeatKey as l, normalizeRepeatKey as u, serializeRepeatKey as d } from "./elur/template/keyed.js";
|
|
6
|
-
import { createKeyedMount as f, reconcileKeyedList as p } from "./elur/template/keyed-diff.js";
|
|
7
|
-
import { sanitizeUrl as m } from "./elur/template/sanitize.js";
|
|
8
|
-
import { activateDelegatedEvent as h, isDelegableEvent as g } from "./elur/template/bindings.js";
|
|
9
|
-
//#region src/elur/hydrate/index.ts
|
|
10
|
-
function _(e, t, r = {}) {
|
|
11
|
-
try {
|
|
12
|
-
if (a(e)) return v(e, t, r);
|
|
13
|
-
let i = e[n];
|
|
14
|
-
return i || j(r, -1, "descriptor", "Template has no hydration descriptor"), { unmount: y(i, t, r) };
|
|
15
|
-
} catch (n) {
|
|
16
|
-
if (r.mismatch === "throw") throw n;
|
|
17
|
-
return r.mismatch !== "remount" && console.warn("[elur] Hydration mismatch; remounting root:", n), t.replaceChildren(), { unmount: a(e) ? e.render()._render(t, null) : e._render(t, null) };
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function v(e, t, r) {
|
|
21
|
-
c();
|
|
22
|
-
let i = () => {};
|
|
23
|
-
try {
|
|
24
|
-
try {
|
|
25
|
-
e.onInit?.();
|
|
26
|
-
} catch (t) {
|
|
27
|
-
if (e.onError) e.onError(t);
|
|
28
|
-
else throw t;
|
|
29
|
-
}
|
|
30
|
-
let a = e.render()[n];
|
|
31
|
-
a || j(r, -1, "descriptor", "Component template has no hydration descriptor"), i = y(a, t, r);
|
|
32
|
-
} finally {
|
|
33
|
-
s();
|
|
34
|
-
}
|
|
35
|
-
let a = e.onMount?.();
|
|
36
|
-
return { unmount() {
|
|
37
|
-
e.onUnmount?.(), typeof a == "function" && a(), i();
|
|
38
|
-
} };
|
|
39
|
-
}
|
|
40
|
-
function y(e, t, n, r) {
|
|
41
|
-
let i = b(t, r), a = [];
|
|
42
|
-
for (let t = 0; t < e.contexts.length; t++) {
|
|
43
|
-
let r = e.contexts[t], o = e.values[t];
|
|
44
|
-
if (r.type === "event") {
|
|
45
|
-
let e = i.events.get(t);
|
|
46
|
-
e || j(n, t, "event", `Missing event marker ${t}`), e.removeAttribute(`data-elur-e-${t}`), a.push(S(e, r.eventName, r.modifiers, o));
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
if (r.type === "attr") {
|
|
50
|
-
let e = i.attributes.get(t);
|
|
51
|
-
e || j(n, t, "attribute", `Missing attribute marker ${t}`), e.removeAttribute(`data-elur-a-${t}`), a.push(C(e, r.attrName, r.url === !0, o));
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
let s = i.nodes.get(t);
|
|
55
|
-
s || j(n, t, "node", `Missing node marker ${t}`);
|
|
56
|
-
let c = w(s, o, n, i.keyed.get(t), i.arrayItems.get(t));
|
|
57
|
-
c && a.push(c);
|
|
58
|
-
}
|
|
59
|
-
return () => {
|
|
60
|
-
for (let e = a.length - 1; e >= 0; e--) a[e]();
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
function b(e, t) {
|
|
64
|
-
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = [], l = [], u = [], d = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT), f;
|
|
65
|
-
for (; f = d.nextNode();) {
|
|
66
|
-
if (t && !x(f, t)) continue;
|
|
67
|
-
if (f.nodeType === Node.COMMENT_NODE) {
|
|
68
|
-
let e = f, t = /^elur-(\d+)$/.exec(e.data);
|
|
69
|
-
if (t) {
|
|
70
|
-
let n = Number(t[1]);
|
|
71
|
-
c.length === 0 && r.set(n, e), c.push(n);
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
let i = /^elur-end-(\d+)$/.exec(e.data);
|
|
75
|
-
if (i) {
|
|
76
|
-
let t = Number(i[1]);
|
|
77
|
-
if (c.pop() === t && c.length === 0) {
|
|
78
|
-
let i = r.get(t);
|
|
79
|
-
i && n.set(t, {
|
|
80
|
-
start: i,
|
|
81
|
-
end: e
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
let a = /^elur-ki:(.+)$/.exec(e.data);
|
|
87
|
-
if (a) {
|
|
88
|
-
let t = a[1];
|
|
89
|
-
l.length === 0 && c.length === 1 ? l.push({
|
|
90
|
-
start: e,
|
|
91
|
-
serializedKey: t,
|
|
92
|
-
parentIndex: c[c.length - 1]
|
|
93
|
-
}) : l.push({
|
|
94
|
-
start: e,
|
|
95
|
-
serializedKey: t,
|
|
96
|
-
parentIndex: -1
|
|
97
|
-
});
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
if (e.data === "elur-ke") {
|
|
101
|
-
let t = l.pop();
|
|
102
|
-
if (t) {
|
|
103
|
-
if (t.parentIndex >= 0) {
|
|
104
|
-
let n = o.get(t.parentIndex) ?? [];
|
|
105
|
-
n.push({
|
|
106
|
-
start: t.start,
|
|
107
|
-
end: e,
|
|
108
|
-
serializedKey: t.serializedKey
|
|
109
|
-
}), o.set(t.parentIndex, n);
|
|
110
|
-
}
|
|
111
|
-
} else throw Error("[elur] Hydration marker mismatch: orphan keyed end marker (elur-ke)");
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
if (e.data === "elur-ai") {
|
|
115
|
-
u.length === 0 && c.length === 1 ? u.push({
|
|
116
|
-
start: e,
|
|
117
|
-
parentIndex: c[c.length - 1]
|
|
118
|
-
}) : u.push({
|
|
119
|
-
start: e,
|
|
120
|
-
parentIndex: -1
|
|
121
|
-
});
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
if (e.data === "elur-aiend") {
|
|
125
|
-
let t = u.pop();
|
|
126
|
-
if (t && t.parentIndex >= 0) {
|
|
127
|
-
let n = s.get(t.parentIndex) ?? [];
|
|
128
|
-
n.push({
|
|
129
|
-
start: t.start,
|
|
130
|
-
end: e
|
|
131
|
-
}), s.set(t.parentIndex, n);
|
|
132
|
-
}
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
if (c.length > 0) continue;
|
|
138
|
-
let e = f;
|
|
139
|
-
for (let t of Array.from(e.attributes)) {
|
|
140
|
-
let n = /^data-elur-e-(\d+)$/.exec(t.name);
|
|
141
|
-
n && a.set(Number(n[1]), e);
|
|
142
|
-
let r = /^data-elur-a-(\d+)$/.exec(t.name);
|
|
143
|
-
r && i.set(Number(r[1]), e);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return {
|
|
147
|
-
nodes: n,
|
|
148
|
-
attributes: i,
|
|
149
|
-
events: a,
|
|
150
|
-
keyed: o,
|
|
151
|
-
arrayItems: s
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
function x(e, t) {
|
|
155
|
-
let n = document.createRange();
|
|
156
|
-
return n.setStartAfter(t.start), n.setEndBefore(t.end), n.intersectsNode(e);
|
|
157
|
-
}
|
|
158
|
-
function S(e, t, n, r) {
|
|
159
|
-
if (typeof r != "function") throw TypeError(`Event "${t}" requires a function`);
|
|
160
|
-
let i = r;
|
|
161
|
-
if (g(t) && !n.includes("capture") && !n.includes("once") && document.body.contains(e)) return h(e, t, n, i);
|
|
162
|
-
let a = {
|
|
163
|
-
once: n.includes("once"),
|
|
164
|
-
capture: n.includes("capture"),
|
|
165
|
-
passive: n.includes("passive")
|
|
166
|
-
}, o = (e) => {
|
|
167
|
-
n.includes("prevent") && e.preventDefault(), n.includes("stop") && e.stopPropagation(), !(n.includes("self") && e.target !== e.currentTarget) && i(e);
|
|
168
|
-
};
|
|
169
|
-
return e.addEventListener(t, o, a), () => e.removeEventListener(t, o, a);
|
|
170
|
-
}
|
|
171
|
-
function C(t, n, r, i) {
|
|
172
|
-
if (n === "ref") {
|
|
173
|
-
let e = i;
|
|
174
|
-
return e.el = t, () => {
|
|
175
|
-
e.el = null;
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
let a = (n === "value" || n === "checked" || n === "selected") && n in t, o = !0, s = !1, c = (e) => {
|
|
179
|
-
if (a) if (!o) t[n] = e ?? "";
|
|
180
|
-
else {
|
|
181
|
-
let r = t[n];
|
|
182
|
-
if (String(r) !== String(e ?? "") && !s) {
|
|
183
|
-
s = !0;
|
|
184
|
-
let e = n === "checked" || n === "selected" ? "change" : "input";
|
|
185
|
-
queueMicrotask(() => {
|
|
186
|
-
s = !1, t.dispatchEvent(new Event(e, { bubbles: !0 }));
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
else if (e == null || e === !1) t.removeAttribute(n);
|
|
191
|
-
else {
|
|
192
|
-
let i = r ? m(String(e)) : String(e);
|
|
193
|
-
t.setAttribute(n, i);
|
|
194
|
-
}
|
|
195
|
-
o = !1;
|
|
196
|
-
};
|
|
197
|
-
return typeof i == "function" ? e(() => c(i())) : (c(i), () => {});
|
|
198
|
-
}
|
|
199
|
-
function w(t, n, r, a, s) {
|
|
200
|
-
if (typeof n != "function") return T(t, n, r, a, s);
|
|
201
|
-
let c = !0, l, u = k(t), d = null, m = o(), h = f(m), g = (e) => {
|
|
202
|
-
console.warn(`[elur] repeat(): duplicate key "${e}". Keys must be unique; the previous entry leaks (orphaned nodes + live effects).`);
|
|
203
|
-
}, _ = e(() => {
|
|
204
|
-
let e = n();
|
|
205
|
-
if (i(e)) {
|
|
206
|
-
if (c && !d) {
|
|
207
|
-
let n = E(e, a, r);
|
|
208
|
-
d = {
|
|
209
|
-
state: n.state,
|
|
210
|
-
prevOrder: n.prevOrder
|
|
211
|
-
}, l = n.cleanup, p({
|
|
212
|
-
zoneStart: t.start,
|
|
213
|
-
anchor: t.end,
|
|
214
|
-
state: d.state,
|
|
215
|
-
prevOrder: d.prevOrder,
|
|
216
|
-
list: e,
|
|
217
|
-
mount: h,
|
|
218
|
-
ctxSnapshot: m,
|
|
219
|
-
onDuplicateKey: g
|
|
220
|
-
}), u = null, c = !1;
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
d || (l?.(), A(t), d = {
|
|
224
|
-
state: /* @__PURE__ */ new Map(),
|
|
225
|
-
prevOrder: []
|
|
226
|
-
}, l = () => {
|
|
227
|
-
for (let e of d.state.values()) e.cleanup();
|
|
228
|
-
}), p({
|
|
229
|
-
zoneStart: t.start,
|
|
230
|
-
anchor: t.end,
|
|
231
|
-
state: d.state,
|
|
232
|
-
prevOrder: d.prevOrder,
|
|
233
|
-
list: e,
|
|
234
|
-
mount: h,
|
|
235
|
-
ctxSnapshot: m,
|
|
236
|
-
onDuplicateKey: g
|
|
237
|
-
}), u = null, c = !1;
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
d && (l?.(), A(t), d = null, l = void 0), typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? u ? u.nodeValue !== String(e) && (u.nodeValue = String(e)) : (u = document.createTextNode(String(e)), t.end.parentNode.insertBefore(u, t.end)) : c ? l = T(t, e, r, a, s) : (l?.(), A(t), l = O(t, e), u = k(t)), c = !1;
|
|
241
|
-
});
|
|
242
|
-
return () => {
|
|
243
|
-
_(), l?.();
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
function T(e, l, u, d, m) {
|
|
247
|
-
if (i(l)) {
|
|
248
|
-
let t = o(), n = E(l, d, u);
|
|
249
|
-
return p({
|
|
250
|
-
zoneStart: e.start,
|
|
251
|
-
anchor: e.end,
|
|
252
|
-
state: n.state,
|
|
253
|
-
prevOrder: n.prevOrder,
|
|
254
|
-
list: l,
|
|
255
|
-
mount: f(t),
|
|
256
|
-
ctxSnapshot: t,
|
|
257
|
-
onDuplicateKey: (e) => {
|
|
258
|
-
console.warn(`[elur] repeat(): duplicate key "${e}". Keys must be unique; the previous entry leaks (orphaned nodes + live effects).`);
|
|
259
|
-
}
|
|
260
|
-
}), n.cleanup;
|
|
261
|
-
}
|
|
262
|
-
if (Array.isArray(l)) {
|
|
263
|
-
let t = [], n = m !== void 0 && m.length > 0;
|
|
264
|
-
for (let r = 0; r < l.length; r++) {
|
|
265
|
-
let i = l[r], a = m?.[r];
|
|
266
|
-
if (n && a) {
|
|
267
|
-
let e = T(a, i, u);
|
|
268
|
-
e && t.push(e);
|
|
269
|
-
} else if (n) {
|
|
270
|
-
let n = O(e, i);
|
|
271
|
-
n && t.push(n);
|
|
272
|
-
} else {
|
|
273
|
-
let n = T(e, i, u);
|
|
274
|
-
n && t.push(n);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
return t.length ? () => {
|
|
278
|
-
for (let e = t.length - 1; e >= 0; e--) t[e]();
|
|
279
|
-
} : void 0;
|
|
280
|
-
}
|
|
281
|
-
if (r(l)) {
|
|
282
|
-
let t = l[n];
|
|
283
|
-
return t || j(u, -1, "descriptor", "Nested template has no hydration descriptor"), y(t, e.start.parentNode, u, e);
|
|
284
|
-
}
|
|
285
|
-
if (a(l)) {
|
|
286
|
-
c();
|
|
287
|
-
let t;
|
|
288
|
-
try {
|
|
289
|
-
try {
|
|
290
|
-
l.onInit?.();
|
|
291
|
-
} catch (e) {
|
|
292
|
-
if (l.onError) l.onError(e);
|
|
293
|
-
else throw e;
|
|
294
|
-
}
|
|
295
|
-
let r = l.render()[n];
|
|
296
|
-
r || j(u, -1, "descriptor", "Nested component has no hydration descriptor");
|
|
297
|
-
let i = y(r, e.start.parentNode, u, e), a = l.onMount?.();
|
|
298
|
-
t = () => {
|
|
299
|
-
l.onUnmount?.(), typeof a == "function" && a(), i();
|
|
300
|
-
};
|
|
301
|
-
} finally {
|
|
302
|
-
s();
|
|
303
|
-
}
|
|
304
|
-
return t;
|
|
305
|
-
}
|
|
306
|
-
if (typeof l == "object" && l) {
|
|
307
|
-
let n = l[t];
|
|
308
|
-
if (n?.hydrateDom) return n.hydrateDom({
|
|
309
|
-
parent: e.start.parentNode,
|
|
310
|
-
bounds: e,
|
|
311
|
-
context: u.context,
|
|
312
|
-
render: (t) => T(e, t, u)
|
|
313
|
-
}) ?? void 0;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
function E(e, t, n) {
|
|
317
|
-
let r = /* @__PURE__ */ new Map(), i = [];
|
|
318
|
-
if (!t || t.length === 0) return {
|
|
319
|
-
state: r,
|
|
320
|
-
prevOrder: i,
|
|
321
|
-
cleanup: () => {}
|
|
322
|
-
};
|
|
323
|
-
let a = /* @__PURE__ */ new Map();
|
|
324
|
-
for (let t = 0; t < e.items.length; t++) {
|
|
325
|
-
let n = u(e.keyFn(e.items[t], t), t), r = d(n);
|
|
326
|
-
a.has(r) && console.warn(`[elur] repeat(): duplicate client key "${n}" during hydration. Keys must be unique; entries after the first leak.`), a.set(r, t);
|
|
327
|
-
}
|
|
328
|
-
for (let o of t) {
|
|
329
|
-
let t = a.get(o.serializedKey);
|
|
330
|
-
if (t === void 0) {
|
|
331
|
-
D(o);
|
|
332
|
-
continue;
|
|
333
|
-
}
|
|
334
|
-
let s = e.items[t], c = u(e.keyFn(s, t), t);
|
|
335
|
-
if (d(c) !== o.serializedKey && console.warn(`[elur] repeat(): hydration key mismatch at index ${t} (${l(o.serializedKey)} != ${c}). The SSR item is adopted by position.`), r.has(c)) {
|
|
336
|
-
console.warn(`[elur] repeat(): duplicate key "${c}" during hydration; removing duplicate SSR node.`), D(o);
|
|
337
|
-
continue;
|
|
338
|
-
}
|
|
339
|
-
let f = e.renderFn(s, t), p = T({
|
|
340
|
-
start: o.start,
|
|
341
|
-
end: o.end
|
|
342
|
-
}, f, n);
|
|
343
|
-
r.set(c, {
|
|
344
|
-
start: o.start,
|
|
345
|
-
end: o.end,
|
|
346
|
-
cleanup: p ?? (() => {})
|
|
347
|
-
}), i.push(c);
|
|
348
|
-
}
|
|
349
|
-
return {
|
|
350
|
-
state: r,
|
|
351
|
-
prevOrder: i,
|
|
352
|
-
cleanup: () => {
|
|
353
|
-
for (let e of r.values()) e.cleanup();
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
function D(e) {
|
|
358
|
-
let t = e.start.nextSibling;
|
|
359
|
-
for (; t && t !== e.end;) {
|
|
360
|
-
let e = t.nextSibling;
|
|
361
|
-
t.parentNode?.removeChild(t), t = e;
|
|
362
|
-
}
|
|
363
|
-
e.start.parentNode?.removeChild(e.start), e.end.parentNode?.removeChild(e.end);
|
|
364
|
-
}
|
|
365
|
-
function O(e, t) {
|
|
366
|
-
if (t == null || t === !1 || t === !0) return;
|
|
367
|
-
if (Array.isArray(t)) {
|
|
368
|
-
let n = [];
|
|
369
|
-
for (let r of t) {
|
|
370
|
-
let t = O(e, r);
|
|
371
|
-
t && n.push(t);
|
|
372
|
-
}
|
|
373
|
-
return n.length ? () => {
|
|
374
|
-
for (let e = n.length - 1; e >= 0; e--) n[e]();
|
|
375
|
-
} : void 0;
|
|
376
|
-
}
|
|
377
|
-
if (r(t)) return t._render(e.end.parentNode, e.end);
|
|
378
|
-
if (a(t)) return t.render()._render(e.end.parentNode, e.end);
|
|
379
|
-
let n = document.createTextNode(String(t));
|
|
380
|
-
return e.end.parentNode.insertBefore(n, e.end), () => n.parentNode?.removeChild(n);
|
|
381
|
-
}
|
|
382
|
-
function k(e) {
|
|
383
|
-
let t = e.start.nextSibling;
|
|
384
|
-
for (; t && t !== e.end;) {
|
|
385
|
-
if (t.nodeType === Node.TEXT_NODE) return t;
|
|
386
|
-
t = t.nextSibling;
|
|
387
|
-
}
|
|
388
|
-
return null;
|
|
389
|
-
}
|
|
390
|
-
function A(e) {
|
|
391
|
-
let t = e.start.nextSibling;
|
|
392
|
-
for (; t && t !== e.end;) {
|
|
393
|
-
let e = t.nextSibling;
|
|
394
|
-
t.parentNode?.removeChild(t), t = e;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
function j(e, t, n, r) {
|
|
398
|
-
let i = {
|
|
399
|
-
index: t,
|
|
400
|
-
kind: n,
|
|
401
|
-
message: r
|
|
402
|
-
};
|
|
403
|
-
e.onMismatch?.(i);
|
|
404
|
-
let a = /* @__PURE__ */ Error(`[elur] Hydration marker mismatch: ${r}`);
|
|
405
|
-
throw Object.assign(a, { mismatch: i }), a;
|
|
406
|
-
}
|
|
407
|
-
//#endregion
|
|
408
|
-
export { _ as hydrate };
|
|
409
|
-
|
|
410
|
-
//# sourceMappingURL=hydrate.js.map
|
|
1
|
+
import { _hydrateNodeRange as e, hydrate as t } from "./elur/next-2/hydrate.js";
|
|
2
|
+
export { e as _hydrateNodeRange, t as hydrate };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=class{__isElurComponent=!0;children;_debugName;_slots=new Map;setChildren(e){return this.children=e,this}setSlot(e,t){return this._slots.set(e,t),this}slot(e){return this._slots.get(e)}setDebugName(e){return this._debugName=e,this}};function t(e){return typeof e==`object`&&!!e&&e.__isElurComponent===!0}var n=Symbol.for(`@elurjs/core/reactivity-state`);function r(){let e=globalThis,t=e[n];return t||(t={},e[n]=t),t}function i(e){let t=e.componentDebugHookSet;if(!t||t.size===0){e.componentDebugHooks=null;return}if(t.size===1){e.componentDebugHooks=t.values().next().value??null;return}e.componentDebugHooks={onMountStart(e){for(let n of t)n.onMountStart?.(e)},onMountEnd(e){for(let n of t)n.onMountEnd?.(e)},onUnmount(e){for(let n of t)n.onUnmount?.(e)}}}function a(e){let t=r(),n=new Set;e&&n.add(e),t.componentDebugHookSet=n,i(t)}function o(e){let t=r(),n=t.componentDebugHookSet;return n||(n=new Set,t.componentDebugHooks&&n.add(t.componentDebugHooks),t.componentDebugHookSet=n),n.add(e),i(t),()=>{n.delete(e),i(t)}}function s(e){r().componentDebugHooks?.onMountStart?.(e)}function c(e){r().componentDebugHooks?.onMountEnd?.(e)}function l(e){r().componentDebugHooks?.onUnmount?.(e)}exports.ElurComponent=e,exports._addComponentDebugHooks=o,exports._debugComponentMountEnd=c,exports._debugComponentMountStart=s,exports._debugComponentUnmount=l,exports._setComponentDebugHooks=a,exports.isElurComponent=t;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=class{__isElurComponent=!0;children;_debugName;_slots=new Map;setChildren(e){return this.children=e,this}setSlot(e,t){return this._slots.set(e,t),this}slot(e){return this._slots.get(e)}_controllers;addController(e){(this._controllers??=[]).push(e)}setDebugName(e){return this._debugName=e,this}};function t(e){return typeof e==`object`&&!!e&&e.__isElurComponent===!0}var n=Symbol.for(`@elurjs/core/reactivity-state`);function r(){let e=globalThis,t=e[n];return t||(t={},e[n]=t),t}function i(e){let t=e.componentDebugHookSet;if(!t||t.size===0){e.componentDebugHooks=null;return}if(t.size===1){e.componentDebugHooks=t.values().next().value??null;return}e.componentDebugHooks={onMountStart(e){for(let n of t)n.onMountStart?.(e)},onMountEnd(e){for(let n of t)n.onMountEnd?.(e)},onUnmount(e){for(let n of t)n.onUnmount?.(e)}}}function a(e){let t=r(),n=new Set;e&&n.add(e),t.componentDebugHookSet=n,i(t)}function o(e){let t=r(),n=t.componentDebugHookSet;return n||(n=new Set,t.componentDebugHooks&&n.add(t.componentDebugHooks),t.componentDebugHookSet=n),n.add(e),i(t),()=>{n.delete(e),i(t)}}function s(e){r().componentDebugHooks?.onMountStart?.(e)}function c(e){r().componentDebugHooks?.onMountEnd?.(e)}function l(e){r().componentDebugHooks?.onUnmount?.(e)}exports.ElurComponent=e,exports._addComponentDebugHooks=o,exports._debugComponentMountEnd=c,exports._debugComponentMountStart=s,exports._debugComponentUnmount=l,exports._setComponentDebugHooks=a,exports.isElurComponent=t;
|
|
2
2
|
//# sourceMappingURL=lifecycle.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.cjs","names":[],"sources":["../../src/elur/lifecycle.ts"],"sourcesContent":["import type { ElurTemplate } from \"./template/index.js\";\n\n// --- ElurChildren ---\n\n/** Valid child content for components. */\nexport type ElurChildren =\n | ElurTemplate\n | ElurComponent\n | Array<ElurTemplate | ElurComponent>\n | null\n | undefined;\n\n// --- ElurComponent ---\n\n/** Base class for components with lifecycle hooks. */\nexport abstract class ElurComponent {\n /** @internal */\n readonly __isElurComponent = true as const;\n\n /** Default slot — child content injected by the parent. */\n children?: ElurChildren;\n\n /** Optional label used by devtools. Falls back to class name. */\n _debugName?: string;\n\n /** @internal */\n private _slots = new Map<string, ElurChildren>();\n\n /** Sets the default slot content. Returns `this` for chaining. */\n setChildren(content: ElurChildren): this {\n this.children = content;\n return this;\n }\n\n /** Sets a named slot. Returns `this` for chaining. */\n setSlot(name: string, content: ElurChildren): this {\n this._slots.set(name, content);\n return this;\n }\n\n /** Returns content for a named slot. */\n slot(name: string): ElurChildren {\n return this._slots.get(name);\n }\n\n /** Sets an explicit devtools display name. Returns `this` for chaining. */\n setDebugName(name: string): this {\n this._debugName = name;\n return this;\n }\n\n /** Returns the component template. Called once on mount; updates happen via signals. */\n abstract render(): ElurTemplate;\n\n /** Called before `render()` — no DOM yet. Errors are caught by `onError` if present. */\n onInit?(): void;\n\n /** Server-only lifecycle hook. Runs during SSR after `onInit()`; never on the client. */\n onServerRender?(): void;\n\n /** Called after DOM insertion. May return a cleanup function. */\n onMount?(): (() => void) | void;\n\n /** Called before DOM removal. */\n onUnmount?(): void;\n\n /** Catches errors thrown in `onInit` and `onMount`. */\n onError?(err: unknown): void;\n}\n\n// --- Type guard ---\n\n/** @internal */\nexport function isElurComponent(v: unknown): v is ElurComponent {\n return (\n v != null &&\n typeof v === \"object\" &&\n (v as Record<string, unknown>).__isElurComponent === true\n );\n}\n\n// --- Devtools component tracking (internal) ---\n\nexport interface _ComponentDebugHooks {\n onMountStart?: (inst: ElurComponent) => void;\n onMountEnd?: (inst: ElurComponent) => void;\n onUnmount?: (inst: ElurComponent) => void;\n}\n\n/**\n * The registry lives in the shared reactivity global state\n * (`Symbol.for(\"@elurjs/core/reactivity-state\")`) rather than in module-local\n * state, so hooks work even when the package ends up duplicated in a bundle.\n */\ninterface _ComponentHookState {\n componentDebugHooks?: _ComponentDebugHooks | null;\n componentDebugHookSet?: Set<_ComponentDebugHooks>;\n}\n\nconst _reactivityStateKey = Symbol.for(\"@elurjs/core/reactivity-state\");\n\nfunction _hookState(): _ComponentHookState {\n const g = globalThis as Record<PropertyKey, unknown>;\n let state = g[_reactivityStateKey] as _ComponentHookState | undefined;\n if (!state) {\n // reactivity.ts merges its defaults into this object when it loads.\n state = {};\n g[_reactivityStateKey] = state;\n }\n return state;\n}\n\n/** Single dispatcher on the hot path; the set is only for bookkeeping. */\nfunction _syncComponentDebugHooks(state: _ComponentHookState): void {\n const set = state.componentDebugHookSet;\n if (!set || set.size === 0) {\n state.componentDebugHooks = null;\n return;\n }\n if (set.size === 1) {\n state.componentDebugHooks = set.values().next().value ?? null;\n return;\n }\n state.componentDebugHooks = {\n onMountStart(inst) {\n for (const hooks of set) hooks.onMountStart?.(inst);\n },\n onMountEnd(inst) {\n for (const hooks of set) hooks.onMountEnd?.(inst);\n },\n onUnmount(inst) {\n for (const hooks of set) hooks.onUnmount?.(inst);\n },\n };\n}\n\nexport function _setComponentDebugHooks(hooks: _ComponentDebugHooks | null): void {\n const state = _hookState();\n const set = new Set<_ComponentDebugHooks>();\n if (hooks) set.add(hooks);\n state.componentDebugHookSet = set;\n _syncComponentDebugHooks(state);\n}\n\n/**\n * @internal — Adds a component debug hook subscriber WITHOUT replacing\n * existing ones (unlike `_setComponentDebugHooks`). Returns an unsubscribe\n * function. Zero cost when no subscribers are registered.\n */\nexport function _addComponentDebugHooks(hooks: _ComponentDebugHooks): () => void {\n const state = _hookState();\n let set = state.componentDebugHookSet;\n if (!set) {\n set = new Set<_ComponentDebugHooks>();\n if (state.componentDebugHooks) set.add(state.componentDebugHooks);\n state.componentDebugHookSet = set;\n }\n set.add(hooks);\n _syncComponentDebugHooks(state);\n return () => {\n set.delete(hooks);\n _syncComponentDebugHooks(state);\n };\n}\n\nexport function _debugComponentMountStart(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onMountStart?.(inst);\n}\n\nexport function _debugComponentMountEnd(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onMountEnd?.(inst);\n}\n\nexport function _debugComponentUnmount(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onUnmount?.(inst);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"lifecycle.cjs","names":[],"sources":["../../src/elur/lifecycle.ts"],"sourcesContent":["import type { ElurTemplate } from \"./template/index.js\";\n\n// --- ElurChildren ---\n\n/** Valid child content for components. */\nexport type ElurChildren =\n | ElurTemplate\n | ElurComponent\n | Array<ElurTemplate | ElurComponent>\n | null\n | undefined;\n\n// --- ElurComponent ---\n\n/** Base class for components with lifecycle hooks. */\n/**\n * A.21: controller de ciclo de vida (patrón Lit) — lógica reutilizable\n * enganchada a la instancia (ResizeObserver, focus, recursos, Ionic…).\n * Los hooks corren dentro del owner del componente.\n */\nexport interface ComponentController {\n /** Antes de render() — sin DOM. */\n hostInit?(): void;\n /** Tras el commit DOM. */\n hostMounted?(): void;\n /** attach() — la instancia vuelve al DOM. */\n hostActivate?(): void;\n /** detach() — la instancia sale del DOM sin disponerse. */\n hostDeactivate?(): void;\n /** Antes del disposal del owner. */\n hostUnmount?(): void;\n}\n\nexport abstract class ElurComponent {\n /** @internal */\n readonly __isElurComponent = true as const;\n\n /** Default slot — child content injected by the parent. */\n children?: ElurChildren;\n\n /** Optional label used by devtools. Falls back to class name. */\n _debugName?: string;\n\n /** @internal */\n private _slots = new Map<string, ElurChildren>();\n\n /** Sets the default slot content. Returns `this` for chaining. */\n setChildren(content: ElurChildren): this {\n this.children = content;\n return this;\n }\n\n /** Sets a named slot. Returns `this` for chaining. */\n setSlot(name: string, content: ElurChildren): this {\n this._slots.set(name, content);\n return this;\n }\n\n /** Returns content for a named slot. */\n slot(name: string): ElurChildren {\n return this._slots.get(name);\n }\n\n /**\n * A.21: controllers registrados — consumidos por el kernel en mount.\n * @internal\n */\n _controllers?: ComponentController[];\n\n /**\n * A.21: registra un controller (patrón Lit). Llamar en el constructor;\n * los hooks corren dentro del owner de la instancia.\n */\n addController(c: ComponentController): void {\n (this._controllers ??= []).push(c);\n }\n\n /** Sets an explicit devtools display name. Returns `this` for chaining. */\n setDebugName(name: string): this {\n this._debugName = name;\n return this;\n }\n\n /** Returns the component template. Called once on mount; updates happen via signals. */\n abstract render(): ElurTemplate;\n\n /** Called before `render()` — no DOM yet. Errors are caught by `onError` if present. */\n onInit?(): void;\n\n /** Server-only lifecycle hook. Runs during SSR after `onInit()`; never on the client. */\n onServerRender?(): void;\n\n /** Called after DOM insertion. May return a cleanup function. */\n onMount?(): (() => void) | void;\n\n /** Called before DOM removal. */\n onUnmount?(): void;\n\n /** Catches errors thrown in `onInit` and `onMount`. */\n onError?(err: unknown): void;\n}\n\n// --- Type guard ---\n\n/** @internal */\nexport function isElurComponent(v: unknown): v is ElurComponent {\n return (\n v != null &&\n typeof v === \"object\" &&\n (v as Record<string, unknown>).__isElurComponent === true\n );\n}\n\n// --- Devtools component tracking (internal) ---\n\nexport interface _ComponentDebugHooks {\n onMountStart?: (inst: ElurComponent) => void;\n onMountEnd?: (inst: ElurComponent) => void;\n onUnmount?: (inst: ElurComponent) => void;\n}\n\n/**\n * The registry lives in the shared reactivity global state\n * (`Symbol.for(\"@elurjs/core/reactivity-state\")`) rather than in module-local\n * state, so hooks work even when the package ends up duplicated in a bundle.\n */\ninterface _ComponentHookState {\n componentDebugHooks?: _ComponentDebugHooks | null;\n componentDebugHookSet?: Set<_ComponentDebugHooks>;\n}\n\nconst _reactivityStateKey = Symbol.for(\"@elurjs/core/reactivity-state\");\n\nfunction _hookState(): _ComponentHookState {\n const g = globalThis as Record<PropertyKey, unknown>;\n let state = g[_reactivityStateKey] as _ComponentHookState | undefined;\n if (!state) {\n // reactivity.ts merges its defaults into this object when it loads.\n state = {};\n g[_reactivityStateKey] = state;\n }\n return state;\n}\n\n/** Single dispatcher on the hot path; the set is only for bookkeeping. */\nfunction _syncComponentDebugHooks(state: _ComponentHookState): void {\n const set = state.componentDebugHookSet;\n if (!set || set.size === 0) {\n state.componentDebugHooks = null;\n return;\n }\n if (set.size === 1) {\n state.componentDebugHooks = set.values().next().value ?? null;\n return;\n }\n state.componentDebugHooks = {\n onMountStart(inst) {\n for (const hooks of set) hooks.onMountStart?.(inst);\n },\n onMountEnd(inst) {\n for (const hooks of set) hooks.onMountEnd?.(inst);\n },\n onUnmount(inst) {\n for (const hooks of set) hooks.onUnmount?.(inst);\n },\n };\n}\n\nexport function _setComponentDebugHooks(hooks: _ComponentDebugHooks | null): void {\n const state = _hookState();\n const set = new Set<_ComponentDebugHooks>();\n if (hooks) set.add(hooks);\n state.componentDebugHookSet = set;\n _syncComponentDebugHooks(state);\n}\n\n/**\n * @internal — Adds a component debug hook subscriber WITHOUT replacing\n * existing ones (unlike `_setComponentDebugHooks`). Returns an unsubscribe\n * function. Zero cost when no subscribers are registered.\n */\nexport function _addComponentDebugHooks(hooks: _ComponentDebugHooks): () => void {\n const state = _hookState();\n let set = state.componentDebugHookSet;\n if (!set) {\n set = new Set<_ComponentDebugHooks>();\n if (state.componentDebugHooks) set.add(state.componentDebugHooks);\n state.componentDebugHookSet = set;\n }\n set.add(hooks);\n _syncComponentDebugHooks(state);\n return () => {\n set.delete(hooks);\n _syncComponentDebugHooks(state);\n };\n}\n\nexport function _debugComponentMountStart(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onMountStart?.(inst);\n}\n\nexport function _debugComponentMountEnd(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onMountEnd?.(inst);\n}\n\nexport function _debugComponentUnmount(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onUnmount?.(inst);\n}\n"],"mappings":"mEAiCA,IAAsB,EAAtB,KAAoC,CAEhC,kBAA6B,GAG7B,SAGA,WAGA,OAAiB,IAAI,IAGrB,YAAY,EAA6B,CAErC,MADA,MAAK,SAAW,EACT,KAIX,QAAQ,EAAc,EAA6B,CAE/C,OADA,KAAK,OAAO,IAAI,EAAM,EAAQ,CACvB,KAIX,KAAK,EAA4B,CAC7B,OAAO,KAAK,OAAO,IAAI,EAAK,CAOhC,aAMA,cAAc,EAA8B,EACvC,KAAK,eAAiB,EAAE,EAAE,KAAK,EAAE,CAItC,aAAa,EAAoB,CAE7B,MADA,MAAK,WAAa,EACX,OAyBf,SAAgB,EAAgB,EAAgC,CAC5D,OAEI,OAAO,GAAM,YADb,GAEC,EAA8B,oBAAsB,GAsB7D,IAAM,EAAsB,OAAO,IAAI,gCAAgC,CAEvE,SAAS,GAAkC,CACvC,IAAM,EAAI,WACN,EAAQ,EAAE,GAMd,OALK,IAED,EAAQ,EAAE,CACV,EAAE,GAAuB,GAEtB,EAIX,SAAS,EAAyB,EAAkC,CAChE,IAAM,EAAM,EAAM,sBAClB,GAAI,CAAC,GAAO,EAAI,OAAS,EAAG,CACxB,EAAM,oBAAsB,KAC5B,OAEJ,GAAI,EAAI,OAAS,EAAG,CAChB,EAAM,oBAAsB,EAAI,QAAQ,CAAC,MAAM,CAAC,OAAS,KACzD,OAEJ,EAAM,oBAAsB,CACxB,aAAa,EAAM,CACf,IAAK,IAAM,KAAS,EAAK,EAAM,eAAe,EAAK,EAEvD,WAAW,EAAM,CACb,IAAK,IAAM,KAAS,EAAK,EAAM,aAAa,EAAK,EAErD,UAAU,EAAM,CACZ,IAAK,IAAM,KAAS,EAAK,EAAM,YAAY,EAAK,EAEvD,CAGL,SAAgB,EAAwB,EAA0C,CAC9E,IAAM,EAAQ,GAAY,CACpB,EAAM,IAAI,IACZ,GAAO,EAAI,IAAI,EAAM,CACzB,EAAM,sBAAwB,EAC9B,EAAyB,EAAM,CAQnC,SAAgB,EAAwB,EAAyC,CAC7E,IAAM,EAAQ,GAAY,CACtB,EAAM,EAAM,sBAQhB,OAPK,IACD,EAAM,IAAI,IACN,EAAM,qBAAqB,EAAI,IAAI,EAAM,oBAAoB,CACjE,EAAM,sBAAwB,GAElC,EAAI,IAAI,EAAM,CACd,EAAyB,EAAM,KAClB,CACT,EAAI,OAAO,EAAM,CACjB,EAAyB,EAAM,EAIvC,SAAgB,EAA0B,EAA2B,CACjE,GAAY,CAAC,qBAAqB,eAAe,EAAK,CAG1D,SAAgB,EAAwB,EAA2B,CAC/D,GAAY,CAAC,qBAAqB,aAAa,EAAK,CAGxD,SAAgB,EAAuB,EAA2B,CAC9D,GAAY,CAAC,qBAAqB,YAAY,EAAK"}
|
|
@@ -2,6 +2,23 @@ import type { ElurTemplate } from "./template/index.js";
|
|
|
2
2
|
/** Valid child content for components. */
|
|
3
3
|
export type ElurChildren = ElurTemplate | ElurComponent | Array<ElurTemplate | ElurComponent> | null | undefined;
|
|
4
4
|
/** Base class for components with lifecycle hooks. */
|
|
5
|
+
/**
|
|
6
|
+
* A.21: controller de ciclo de vida (patrón Lit) — lógica reutilizable
|
|
7
|
+
* enganchada a la instancia (ResizeObserver, focus, recursos, Ionic…).
|
|
8
|
+
* Los hooks corren dentro del owner del componente.
|
|
9
|
+
*/
|
|
10
|
+
export interface ComponentController {
|
|
11
|
+
/** Antes de render() — sin DOM. */
|
|
12
|
+
hostInit?(): void;
|
|
13
|
+
/** Tras el commit DOM. */
|
|
14
|
+
hostMounted?(): void;
|
|
15
|
+
/** attach() — la instancia vuelve al DOM. */
|
|
16
|
+
hostActivate?(): void;
|
|
17
|
+
/** detach() — la instancia sale del DOM sin disponerse. */
|
|
18
|
+
hostDeactivate?(): void;
|
|
19
|
+
/** Antes del disposal del owner. */
|
|
20
|
+
hostUnmount?(): void;
|
|
21
|
+
}
|
|
5
22
|
export declare abstract class ElurComponent {
|
|
6
23
|
/** @internal */
|
|
7
24
|
readonly __isElurComponent: true;
|
|
@@ -17,6 +34,16 @@ export declare abstract class ElurComponent {
|
|
|
17
34
|
setSlot(name: string, content: ElurChildren): this;
|
|
18
35
|
/** Returns content for a named slot. */
|
|
19
36
|
slot(name: string): ElurChildren;
|
|
37
|
+
/**
|
|
38
|
+
* A.21: controllers registrados — consumidos por el kernel en mount.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
_controllers?: ComponentController[];
|
|
42
|
+
/**
|
|
43
|
+
* A.21: registra un controller (patrón Lit). Llamar en el constructor;
|
|
44
|
+
* los hooks corren dentro del owner de la instancia.
|
|
45
|
+
*/
|
|
46
|
+
addController(c: ComponentController): void;
|
|
20
47
|
/** Sets an explicit devtools display name. Returns `this` for chaining. */
|
|
21
48
|
setDebugName(name: string): this;
|
|
22
49
|
/** Returns the component template. Called once on mount; updates happen via signals. */
|
|
@@ -2,6 +2,23 @@ import type { ElurTemplate } from "./template/index.js";
|
|
|
2
2
|
/** Valid child content for components. */
|
|
3
3
|
export type ElurChildren = ElurTemplate | ElurComponent | Array<ElurTemplate | ElurComponent> | null | undefined;
|
|
4
4
|
/** Base class for components with lifecycle hooks. */
|
|
5
|
+
/**
|
|
6
|
+
* A.21: controller de ciclo de vida (patrón Lit) — lógica reutilizable
|
|
7
|
+
* enganchada a la instancia (ResizeObserver, focus, recursos, Ionic…).
|
|
8
|
+
* Los hooks corren dentro del owner del componente.
|
|
9
|
+
*/
|
|
10
|
+
export interface ComponentController {
|
|
11
|
+
/** Antes de render() — sin DOM. */
|
|
12
|
+
hostInit?(): void;
|
|
13
|
+
/** Tras el commit DOM. */
|
|
14
|
+
hostMounted?(): void;
|
|
15
|
+
/** attach() — la instancia vuelve al DOM. */
|
|
16
|
+
hostActivate?(): void;
|
|
17
|
+
/** detach() — la instancia sale del DOM sin disponerse. */
|
|
18
|
+
hostDeactivate?(): void;
|
|
19
|
+
/** Antes del disposal del owner. */
|
|
20
|
+
hostUnmount?(): void;
|
|
21
|
+
}
|
|
5
22
|
export declare abstract class ElurComponent {
|
|
6
23
|
/** @internal */
|
|
7
24
|
readonly __isElurComponent: true;
|
|
@@ -17,6 +34,16 @@ export declare abstract class ElurComponent {
|
|
|
17
34
|
setSlot(name: string, content: ElurChildren): this;
|
|
18
35
|
/** Returns content for a named slot. */
|
|
19
36
|
slot(name: string): ElurChildren;
|
|
37
|
+
/**
|
|
38
|
+
* A.21: controllers registrados — consumidos por el kernel en mount.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
_controllers?: ComponentController[];
|
|
42
|
+
/**
|
|
43
|
+
* A.21: registra un controller (patrón Lit). Llamar en el constructor;
|
|
44
|
+
* los hooks corren dentro del owner de la instancia.
|
|
45
|
+
*/
|
|
46
|
+
addController(c: ComponentController): void;
|
|
20
47
|
/** Sets an explicit devtools display name. Returns `this` for chaining. */
|
|
21
48
|
setDebugName(name: string): this;
|
|
22
49
|
/** Returns the component template. Called once on mount; updates happen via signals. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.js","names":[],"sources":["../../src/elur/lifecycle.ts"],"sourcesContent":["import type { ElurTemplate } from \"./template/index.js\";\n\n// --- ElurChildren ---\n\n/** Valid child content for components. */\nexport type ElurChildren =\n | ElurTemplate\n | ElurComponent\n | Array<ElurTemplate | ElurComponent>\n | null\n | undefined;\n\n// --- ElurComponent ---\n\n/** Base class for components with lifecycle hooks. */\nexport abstract class ElurComponent {\n /** @internal */\n readonly __isElurComponent = true as const;\n\n /** Default slot — child content injected by the parent. */\n children?: ElurChildren;\n\n /** Optional label used by devtools. Falls back to class name. */\n _debugName?: string;\n\n /** @internal */\n private _slots = new Map<string, ElurChildren>();\n\n /** Sets the default slot content. Returns `this` for chaining. */\n setChildren(content: ElurChildren): this {\n this.children = content;\n return this;\n }\n\n /** Sets a named slot. Returns `this` for chaining. */\n setSlot(name: string, content: ElurChildren): this {\n this._slots.set(name, content);\n return this;\n }\n\n /** Returns content for a named slot. */\n slot(name: string): ElurChildren {\n return this._slots.get(name);\n }\n\n /** Sets an explicit devtools display name. Returns `this` for chaining. */\n setDebugName(name: string): this {\n this._debugName = name;\n return this;\n }\n\n /** Returns the component template. Called once on mount; updates happen via signals. */\n abstract render(): ElurTemplate;\n\n /** Called before `render()` — no DOM yet. Errors are caught by `onError` if present. */\n onInit?(): void;\n\n /** Server-only lifecycle hook. Runs during SSR after `onInit()`; never on the client. */\n onServerRender?(): void;\n\n /** Called after DOM insertion. May return a cleanup function. */\n onMount?(): (() => void) | void;\n\n /** Called before DOM removal. */\n onUnmount?(): void;\n\n /** Catches errors thrown in `onInit` and `onMount`. */\n onError?(err: unknown): void;\n}\n\n// --- Type guard ---\n\n/** @internal */\nexport function isElurComponent(v: unknown): v is ElurComponent {\n return (\n v != null &&\n typeof v === \"object\" &&\n (v as Record<string, unknown>).__isElurComponent === true\n );\n}\n\n// --- Devtools component tracking (internal) ---\n\nexport interface _ComponentDebugHooks {\n onMountStart?: (inst: ElurComponent) => void;\n onMountEnd?: (inst: ElurComponent) => void;\n onUnmount?: (inst: ElurComponent) => void;\n}\n\n/**\n * The registry lives in the shared reactivity global state\n * (`Symbol.for(\"@elurjs/core/reactivity-state\")`) rather than in module-local\n * state, so hooks work even when the package ends up duplicated in a bundle.\n */\ninterface _ComponentHookState {\n componentDebugHooks?: _ComponentDebugHooks | null;\n componentDebugHookSet?: Set<_ComponentDebugHooks>;\n}\n\nconst _reactivityStateKey = Symbol.for(\"@elurjs/core/reactivity-state\");\n\nfunction _hookState(): _ComponentHookState {\n const g = globalThis as Record<PropertyKey, unknown>;\n let state = g[_reactivityStateKey] as _ComponentHookState | undefined;\n if (!state) {\n // reactivity.ts merges its defaults into this object when it loads.\n state = {};\n g[_reactivityStateKey] = state;\n }\n return state;\n}\n\n/** Single dispatcher on the hot path; the set is only for bookkeeping. */\nfunction _syncComponentDebugHooks(state: _ComponentHookState): void {\n const set = state.componentDebugHookSet;\n if (!set || set.size === 0) {\n state.componentDebugHooks = null;\n return;\n }\n if (set.size === 1) {\n state.componentDebugHooks = set.values().next().value ?? null;\n return;\n }\n state.componentDebugHooks = {\n onMountStart(inst) {\n for (const hooks of set) hooks.onMountStart?.(inst);\n },\n onMountEnd(inst) {\n for (const hooks of set) hooks.onMountEnd?.(inst);\n },\n onUnmount(inst) {\n for (const hooks of set) hooks.onUnmount?.(inst);\n },\n };\n}\n\nexport function _setComponentDebugHooks(hooks: _ComponentDebugHooks | null): void {\n const state = _hookState();\n const set = new Set<_ComponentDebugHooks>();\n if (hooks) set.add(hooks);\n state.componentDebugHookSet = set;\n _syncComponentDebugHooks(state);\n}\n\n/**\n * @internal — Adds a component debug hook subscriber WITHOUT replacing\n * existing ones (unlike `_setComponentDebugHooks`). Returns an unsubscribe\n * function. Zero cost when no subscribers are registered.\n */\nexport function _addComponentDebugHooks(hooks: _ComponentDebugHooks): () => void {\n const state = _hookState();\n let set = state.componentDebugHookSet;\n if (!set) {\n set = new Set<_ComponentDebugHooks>();\n if (state.componentDebugHooks) set.add(state.componentDebugHooks);\n state.componentDebugHookSet = set;\n }\n set.add(hooks);\n _syncComponentDebugHooks(state);\n return () => {\n set.delete(hooks);\n _syncComponentDebugHooks(state);\n };\n}\n\nexport function _debugComponentMountStart(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onMountStart?.(inst);\n}\n\nexport function _debugComponentMountEnd(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onMountEnd?.(inst);\n}\n\nexport function _debugComponentUnmount(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onUnmount?.(inst);\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"lifecycle.js","names":[],"sources":["../../src/elur/lifecycle.ts"],"sourcesContent":["import type { ElurTemplate } from \"./template/index.js\";\n\n// --- ElurChildren ---\n\n/** Valid child content for components. */\nexport type ElurChildren =\n | ElurTemplate\n | ElurComponent\n | Array<ElurTemplate | ElurComponent>\n | null\n | undefined;\n\n// --- ElurComponent ---\n\n/** Base class for components with lifecycle hooks. */\n/**\n * A.21: controller de ciclo de vida (patrón Lit) — lógica reutilizable\n * enganchada a la instancia (ResizeObserver, focus, recursos, Ionic…).\n * Los hooks corren dentro del owner del componente.\n */\nexport interface ComponentController {\n /** Antes de render() — sin DOM. */\n hostInit?(): void;\n /** Tras el commit DOM. */\n hostMounted?(): void;\n /** attach() — la instancia vuelve al DOM. */\n hostActivate?(): void;\n /** detach() — la instancia sale del DOM sin disponerse. */\n hostDeactivate?(): void;\n /** Antes del disposal del owner. */\n hostUnmount?(): void;\n}\n\nexport abstract class ElurComponent {\n /** @internal */\n readonly __isElurComponent = true as const;\n\n /** Default slot — child content injected by the parent. */\n children?: ElurChildren;\n\n /** Optional label used by devtools. Falls back to class name. */\n _debugName?: string;\n\n /** @internal */\n private _slots = new Map<string, ElurChildren>();\n\n /** Sets the default slot content. Returns `this` for chaining. */\n setChildren(content: ElurChildren): this {\n this.children = content;\n return this;\n }\n\n /** Sets a named slot. Returns `this` for chaining. */\n setSlot(name: string, content: ElurChildren): this {\n this._slots.set(name, content);\n return this;\n }\n\n /** Returns content for a named slot. */\n slot(name: string): ElurChildren {\n return this._slots.get(name);\n }\n\n /**\n * A.21: controllers registrados — consumidos por el kernel en mount.\n * @internal\n */\n _controllers?: ComponentController[];\n\n /**\n * A.21: registra un controller (patrón Lit). Llamar en el constructor;\n * los hooks corren dentro del owner de la instancia.\n */\n addController(c: ComponentController): void {\n (this._controllers ??= []).push(c);\n }\n\n /** Sets an explicit devtools display name. Returns `this` for chaining. */\n setDebugName(name: string): this {\n this._debugName = name;\n return this;\n }\n\n /** Returns the component template. Called once on mount; updates happen via signals. */\n abstract render(): ElurTemplate;\n\n /** Called before `render()` — no DOM yet. Errors are caught by `onError` if present. */\n onInit?(): void;\n\n /** Server-only lifecycle hook. Runs during SSR after `onInit()`; never on the client. */\n onServerRender?(): void;\n\n /** Called after DOM insertion. May return a cleanup function. */\n onMount?(): (() => void) | void;\n\n /** Called before DOM removal. */\n onUnmount?(): void;\n\n /** Catches errors thrown in `onInit` and `onMount`. */\n onError?(err: unknown): void;\n}\n\n// --- Type guard ---\n\n/** @internal */\nexport function isElurComponent(v: unknown): v is ElurComponent {\n return (\n v != null &&\n typeof v === \"object\" &&\n (v as Record<string, unknown>).__isElurComponent === true\n );\n}\n\n// --- Devtools component tracking (internal) ---\n\nexport interface _ComponentDebugHooks {\n onMountStart?: (inst: ElurComponent) => void;\n onMountEnd?: (inst: ElurComponent) => void;\n onUnmount?: (inst: ElurComponent) => void;\n}\n\n/**\n * The registry lives in the shared reactivity global state\n * (`Symbol.for(\"@elurjs/core/reactivity-state\")`) rather than in module-local\n * state, so hooks work even when the package ends up duplicated in a bundle.\n */\ninterface _ComponentHookState {\n componentDebugHooks?: _ComponentDebugHooks | null;\n componentDebugHookSet?: Set<_ComponentDebugHooks>;\n}\n\nconst _reactivityStateKey = Symbol.for(\"@elurjs/core/reactivity-state\");\n\nfunction _hookState(): _ComponentHookState {\n const g = globalThis as Record<PropertyKey, unknown>;\n let state = g[_reactivityStateKey] as _ComponentHookState | undefined;\n if (!state) {\n // reactivity.ts merges its defaults into this object when it loads.\n state = {};\n g[_reactivityStateKey] = state;\n }\n return state;\n}\n\n/** Single dispatcher on the hot path; the set is only for bookkeeping. */\nfunction _syncComponentDebugHooks(state: _ComponentHookState): void {\n const set = state.componentDebugHookSet;\n if (!set || set.size === 0) {\n state.componentDebugHooks = null;\n return;\n }\n if (set.size === 1) {\n state.componentDebugHooks = set.values().next().value ?? null;\n return;\n }\n state.componentDebugHooks = {\n onMountStart(inst) {\n for (const hooks of set) hooks.onMountStart?.(inst);\n },\n onMountEnd(inst) {\n for (const hooks of set) hooks.onMountEnd?.(inst);\n },\n onUnmount(inst) {\n for (const hooks of set) hooks.onUnmount?.(inst);\n },\n };\n}\n\nexport function _setComponentDebugHooks(hooks: _ComponentDebugHooks | null): void {\n const state = _hookState();\n const set = new Set<_ComponentDebugHooks>();\n if (hooks) set.add(hooks);\n state.componentDebugHookSet = set;\n _syncComponentDebugHooks(state);\n}\n\n/**\n * @internal — Adds a component debug hook subscriber WITHOUT replacing\n * existing ones (unlike `_setComponentDebugHooks`). Returns an unsubscribe\n * function. Zero cost when no subscribers are registered.\n */\nexport function _addComponentDebugHooks(hooks: _ComponentDebugHooks): () => void {\n const state = _hookState();\n let set = state.componentDebugHookSet;\n if (!set) {\n set = new Set<_ComponentDebugHooks>();\n if (state.componentDebugHooks) set.add(state.componentDebugHooks);\n state.componentDebugHookSet = set;\n }\n set.add(hooks);\n _syncComponentDebugHooks(state);\n return () => {\n set.delete(hooks);\n _syncComponentDebugHooks(state);\n };\n}\n\nexport function _debugComponentMountStart(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onMountStart?.(inst);\n}\n\nexport function _debugComponentMountEnd(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onMountEnd?.(inst);\n}\n\nexport function _debugComponentUnmount(inst: ElurComponent): void {\n _hookState().componentDebugHooks?.onUnmount?.(inst);\n}\n"],"mappings":";AAiCA,IAAsB,IAAtB,MAAoC;CAEhC,oBAA6B;CAG7B;CAGA;CAGA,yBAAiB,IAAI,KAA2B;CAGhD,YAAY,GAA6B;AAErC,SADA,KAAK,WAAW,GACT;;CAIX,QAAQ,GAAc,GAA6B;AAE/C,SADA,KAAK,OAAO,IAAI,GAAM,EAAQ,EACvB;;CAIX,KAAK,GAA4B;AAC7B,SAAO,KAAK,OAAO,IAAI,EAAK;;CAOhC;CAMA,cAAc,GAA8B;AACxC,GAAC,KAAK,iBAAiB,EAAE,EAAE,KAAK,EAAE;;CAItC,aAAa,GAAoB;AAE7B,SADA,KAAK,aAAa,GACX;;;AAyBf,SAAgB,EAAgB,GAAgC;AAC5D,QAEI,OAAO,KAAM,cADb,KAEC,EAA8B,sBAAsB;;AAsB7D,IAAM,IAAsB,OAAO,IAAI,gCAAgC;AAEvE,SAAS,IAAkC;CACvC,IAAM,IAAI,YACN,IAAQ,EAAE;AAMd,QALK,MAED,IAAQ,EAAE,EACV,EAAE,KAAuB,IAEtB;;AAIX,SAAS,EAAyB,GAAkC;CAChE,IAAM,IAAM,EAAM;AAClB,KAAI,CAAC,KAAO,EAAI,SAAS,GAAG;AACxB,IAAM,sBAAsB;AAC5B;;AAEJ,KAAI,EAAI,SAAS,GAAG;AAChB,IAAM,sBAAsB,EAAI,QAAQ,CAAC,MAAM,CAAC,SAAS;AACzD;;AAEJ,GAAM,sBAAsB;EACxB,aAAa,GAAM;AACf,QAAK,IAAM,KAAS,EAAK,GAAM,eAAe,EAAK;;EAEvD,WAAW,GAAM;AACb,QAAK,IAAM,KAAS,EAAK,GAAM,aAAa,EAAK;;EAErD,UAAU,GAAM;AACZ,QAAK,IAAM,KAAS,EAAK,GAAM,YAAY,EAAK;;EAEvD;;AAGL,SAAgB,EAAwB,GAA0C;CAC9E,IAAM,IAAQ,GAAY,EACpB,oBAAM,IAAI,KAA2B;AAG3C,CAFI,KAAO,EAAI,IAAI,EAAM,EACzB,EAAM,wBAAwB,GAC9B,EAAyB,EAAM;;AAQnC,SAAgB,EAAwB,GAAyC;CAC7E,IAAM,IAAQ,GAAY,EACtB,IAAM,EAAM;AAQhB,QAPK,MACD,oBAAM,IAAI,KAA2B,EACjC,EAAM,uBAAqB,EAAI,IAAI,EAAM,oBAAoB,EACjE,EAAM,wBAAwB,IAElC,EAAI,IAAI,EAAM,EACd,EAAyB,EAAM,QAClB;AAET,EADA,EAAI,OAAO,EAAM,EACjB,EAAyB,EAAM;;;AAIvC,SAAgB,EAA0B,GAA2B;AACjE,IAAY,CAAC,qBAAqB,eAAe,EAAK;;AAG1D,SAAgB,EAAwB,GAA2B;AAC/D,IAAY,CAAC,qBAAqB,aAAa,EAAK;;AAGxD,SAAgB,EAAuB,GAA2B;AAC9D,IAAY,CAAC,qBAAqB,YAAY,EAAK"}
|