@verajs/renderer 0.2.2 → 0.3.1
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 +757 -225
- package/dist/development/vera-renderer-elements.d.ts +39 -0
- package/dist/development/vera-renderer-elements.d.ts.map +1 -0
- package/dist/development/vera-renderer-elements.js +193 -0
- package/dist/development/vera-renderer-elements.js.map +1 -0
- package/dist/development/vera-renderer-hydrate-slots.d.ts +94 -0
- package/dist/development/vera-renderer-hydrate-slots.d.ts.map +1 -0
- package/dist/development/vera-renderer-hydrate-slots.js +325 -0
- package/dist/development/vera-renderer-hydrate-slots.js.map +1 -0
- package/dist/development/vera-renderer-hydration.d.ts +332 -0
- package/dist/development/vera-renderer-hydration.d.ts.map +1 -0
- package/dist/development/vera-renderer-hydration.js +902 -0
- package/dist/development/vera-renderer-hydration.js.map +1 -0
- package/dist/development/vera-renderer-keyed.d.ts +25 -8
- package/dist/development/vera-renderer-keyed.d.ts.map +1 -1
- package/dist/development/vera-renderer-keyed.js +843 -268
- package/dist/development/vera-renderer-keyed.js.map +1 -1
- package/dist/development/vera-renderer-multi-window.d.ts +5 -0
- package/dist/development/vera-renderer-multi-window.d.ts.map +1 -0
- package/dist/development/vera-renderer-multi-window.js +40 -0
- package/dist/development/vera-renderer-multi-window.js.map +1 -0
- package/dist/development/vera-renderer-namespaces.d.ts +64 -0
- package/dist/development/vera-renderer-namespaces.d.ts.map +1 -0
- package/dist/development/vera-renderer-namespaces.js +94 -0
- package/dist/development/vera-renderer-namespaces.js.map +1 -0
- package/dist/development/vera-renderer-native-elements.d.ts +13 -0
- package/dist/development/vera-renderer-native-elements.d.ts.map +1 -0
- package/dist/development/vera-renderer-native-elements.js +231 -0
- package/dist/development/vera-renderer-native-elements.js.map +1 -0
- package/dist/development/vera-renderer-portal.d.ts +29 -0
- package/dist/development/vera-renderer-portal.d.ts.map +1 -0
- package/dist/development/vera-renderer-portal.js +167 -0
- package/dist/development/vera-renderer-portal.js.map +1 -0
- package/dist/development/vera-renderer-profiler.d.ts +48 -96
- package/dist/development/vera-renderer-profiler.d.ts.map +1 -1
- package/dist/development/vera-renderer-profiler.js +2632 -2142
- package/dist/development/vera-renderer-profiler.js.map +1 -1
- package/dist/development/vera-renderer-slots.d.ts +88 -92
- package/dist/development/vera-renderer-slots.d.ts.map +1 -1
- package/dist/development/vera-renderer-slots.js +1834 -1237
- package/dist/development/vera-renderer-slots.js.map +1 -1
- package/dist/development/vera-renderer-spread.d.ts +7 -41
- package/dist/development/vera-renderer-spread.d.ts.map +1 -1
- package/dist/development/vera-renderer-spread.js +539 -477
- package/dist/development/vera-renderer-spread.js.map +1 -1
- package/dist/development/vera-renderer-tag.d.ts +12 -3
- package/dist/development/vera-renderer-tag.d.ts.map +1 -1
- package/dist/development/vera-renderer-tag.js +671 -513
- package/dist/development/vera-renderer-tag.js.map +1 -1
- package/dist/development/vera-renderer-until.d.ts +24 -0
- package/dist/development/vera-renderer-until.d.ts.map +1 -0
- package/dist/development/vera-renderer-until.js +83 -0
- package/dist/development/vera-renderer-until.js.map +1 -0
- package/dist/development/vera-renderer.d.ts +48 -96
- package/dist/development/vera-renderer.d.ts.map +1 -1
- package/dist/development/vera-renderer.js +2607 -2104
- package/dist/development/vera-renderer.js.map +1 -1
- package/dist/vera-renderer-elements.min.js +2 -0
- package/dist/vera-renderer-elements.min.js.map +1 -0
- package/dist/vera-renderer-hydrate-slots.min.js +2 -0
- package/dist/vera-renderer-hydrate-slots.min.js.map +1 -0
- package/dist/vera-renderer-hydration.min.js +3 -0
- package/dist/vera-renderer-hydration.min.js.map +1 -0
- package/dist/vera-renderer-keyed.min.js +1 -1
- package/dist/vera-renderer-keyed.min.js.map +1 -1
- package/dist/vera-renderer-multi-window.min.js +2 -0
- package/dist/vera-renderer-multi-window.min.js.map +1 -0
- package/dist/vera-renderer-namespaces.min.js +2 -0
- package/dist/vera-renderer-namespaces.min.js.map +1 -0
- package/dist/vera-renderer-native-elements.min.js +2 -0
- package/dist/vera-renderer-native-elements.min.js.map +1 -0
- package/dist/vera-renderer-portal.min.js +2 -0
- package/dist/vera-renderer-portal.min.js.map +1 -0
- package/dist/vera-renderer-slots.min.js +1 -1
- package/dist/vera-renderer-slots.min.js.map +1 -1
- package/dist/vera-renderer-spread.min.js +1 -1
- package/dist/vera-renderer-spread.min.js.map +1 -1
- package/dist/vera-renderer-tag.min.js +1 -1
- package/dist/vera-renderer-tag.min.js.map +1 -1
- package/dist/vera-renderer-until.min.js +2 -0
- package/dist/vera-renderer-until.min.js.map +1 -0
- package/dist/vera-renderer.min.js +1 -1
- package/dist/vera-renderer.min.js.map +1 -1
- package/package.json +52 -9
- package/dist/development/vera-renderer-hydrate.d.ts +0 -147
- package/dist/development/vera-renderer-hydrate.d.ts.map +0 -1
- package/dist/development/vera-renderer-hydrate.js +0 -3136
- package/dist/development/vera-renderer-hydrate.js.map +0 -1
- package/dist/vera-renderer-hydrate.min.js +0 -2
- package/dist/vera-renderer-hydrate.min.js.map +0 -1
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **The renderer's binding kinds and child-part modes** — numbers both `renderer.ts` and the separately bundled
|
|
3
|
+
* `hydration.ts` read, from ONE source (each bundle inlines them; they are literals in the output). A change here
|
|
4
|
+
* changes the hand-off's protocol: bump `$V` in `renderer.ts`.
|
|
5
|
+
*/
|
|
6
|
+
/** A binding's kind, resolved once per template. */
|
|
7
|
+
/**
|
|
8
|
+
* **The hydration hand-off's positions** — the renderer sets `$H` to an array at `connect`, and `hydration.ts` reads
|
|
9
|
+
* it by these. An array, not an object of named fields: the names cost every app bytes (−35 B gzipped measured,
|
|
10
|
+
* 2026-10-02), and these constants inline to literals in both bundles. The first two are FROZEN across protocols — a
|
|
11
|
+
* hydration from another release reads the protocol at 0 and, on a mismatch, can still install its clearing hook at 1.
|
|
12
|
+
* Any other change here is a protocol change: bump `PROTOCOL`.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* **The protocol of this package's first-party seams** — the renderer's hand-off (`$H`, at `HANDOFF_PROTOCOL`) and slots'
|
|
16
|
+
* capture (`_$capture$`), both read by hydration. One number for both: the three ship in one package, and a change to
|
|
17
|
+
* either seam bumps it. A hydration that meets another number declines (the page renders fresh) and says so.
|
|
18
|
+
*/
|
|
19
|
+
const PROTOCOL = 2;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* **Where every diagnostic code is explained.** The URL is permanent: a released bundle is immutable, so every version
|
|
23
|
+
* published points here for ever — the domain cannot lapse and `/e/` cannot be reorganized without breaking links in
|
|
24
|
+
* code nobody can edit; the docs site redirects instead. `scripts/sync-diagnostics.mjs` imports this constant, so the
|
|
25
|
+
* pages and the bundles can never disagree about where they are.
|
|
26
|
+
*/
|
|
27
|
+
const DOCS = 'https://verajs.dev/e/';
|
|
28
|
+
const diagnostic = (inArea, bySubject, withCode, andProse) =>
|
|
29
|
+
/** `true ` HERE as well as at the call: production folds this to the one-line form, branch and all. */
|
|
30
|
+
true && andProse
|
|
31
|
+
? `[vera] ${inArea}: ${bySubject} — ${andProse[0]}${andProse[1] ? ` ${andProse[1]}` : ''} (${withCode})`
|
|
32
|
+
: `[vera] ${inArea}: ${bySubject} — ${DOCS}${withCode}`;
|
|
33
|
+
|
|
34
|
+
const PROSE = {
|
|
35
|
+
'hydrate-slots-unwired': () => [
|
|
36
|
+
'reads the light-DOM statement through `slots`, which is not wired.',
|
|
37
|
+
'Wire `slots` beside it: `wire([renderer, hydration, slots, hydrateSlots])`.',
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* **`@verajs/renderer/hydrate-slots` — hydrating light-DOM slots.** `wire([renderer, hydration, slots, hydrateSlots])`.
|
|
43
|
+
*
|
|
44
|
+
* Everything only a page that HYDRATES LIGHT SLOTS runs, kept out of both modules so neither pays for the other (Brian,
|
|
45
|
+
* 2026-10-07): the server's format (`data-vm-light` — its number, the light order — and the carrier), each filled slot's
|
|
46
|
+
* range and detached copy, and the rescue. Hydration calls it through `_$hydrateSlots$`;
|
|
47
|
+
* it captures through slots' `_$capture$`. Slots' own distribution then recomputes every assignment from the nodes'
|
|
48
|
+
* names, so the server's placement decides at most WHETHER a node moves, never where it ends up.
|
|
49
|
+
*
|
|
50
|
+
* Without it, hydration refuses a served light host before touching anything (`hydration-slots`): the page stands as
|
|
51
|
+
* served, and a component boundary reports it once.
|
|
52
|
+
*/
|
|
53
|
+
/** What `@verajs/ssr` writes — a deliberate second address of its writer; `slots-ssr-client-parity` holds them together. */
|
|
54
|
+
const FORMAT = '1';
|
|
55
|
+
const LIGHT_ATTR = 'data-vm-light';
|
|
56
|
+
const UNASSIGNED = 'data-vm-unassigned';
|
|
57
|
+
const isMark = (node, data) => node.nodeType === 8 && node.data === data;
|
|
58
|
+
/** The slottable nodes from `from` up to `to` — comments are never light content. */
|
|
59
|
+
const pool = (from, to) => {
|
|
60
|
+
const out = [];
|
|
61
|
+
for (let node = from; node !== null && node !== to; node = node.nextSibling)
|
|
62
|
+
if (node.nodeType !== 8)
|
|
63
|
+
out.push(node);
|
|
64
|
+
return out;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The pools' nodes in light order, as the statement gives it — `null` unless it accounts for every one, exactly. The
|
|
68
|
+
* statement counts a run of adjacent TEXT as one light child, as the parser makes it; a walk may since have split it
|
|
69
|
+
* (an outer template's static text beside its value), so the pieces that follow one taken are taken with it.
|
|
70
|
+
*/
|
|
71
|
+
const ordered = (runs, pools) => {
|
|
72
|
+
const order = [];
|
|
73
|
+
for (const run of runs === '' ? [] : runs.split(',')) {
|
|
74
|
+
const [index, count = '1'] = run.split('*');
|
|
75
|
+
const nodes = pools[+index];
|
|
76
|
+
for (let k = +count; k > 0; k--) {
|
|
77
|
+
let node = nodes?.shift();
|
|
78
|
+
if (node === undefined)
|
|
79
|
+
return null;
|
|
80
|
+
order.push(node);
|
|
81
|
+
while (node.nodeType === 3 && nodes[0] !== undefined && nodes[0] === node.nextSibling && nodes[0].nodeType === 3)
|
|
82
|
+
order.push((node = nodes.shift()));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return pools.every((nodes) => nodes.length === 0) ? order : null;
|
|
86
|
+
};
|
|
87
|
+
/** The `]` that closes the range `start` opens — `null` if another `[` or the parent's end comes first: not well-formed. */
|
|
88
|
+
const endOf = (start) => {
|
|
89
|
+
let end = start.nextSibling;
|
|
90
|
+
while (end !== null && !isMark(end, ']') && !isMark(end, '['))
|
|
91
|
+
end = end.nextSibling;
|
|
92
|
+
return end !== null && isMark(end, ']') ? end : null;
|
|
93
|
+
};
|
|
94
|
+
const SERVED = new WeakSet();
|
|
95
|
+
/** Every well-formed range under `parent`, in document order — never entering a range, the carrier, or a served host. */
|
|
96
|
+
const scan = (parent, out, skip) => {
|
|
97
|
+
for (let node = parent.firstChild; node !== null; node = node.nextSibling) {
|
|
98
|
+
if (node === skip)
|
|
99
|
+
continue;
|
|
100
|
+
if (isMark(node, '[')) {
|
|
101
|
+
const end = endOf(node);
|
|
102
|
+
if (end !== null) {
|
|
103
|
+
out.push(pool(node.nextSibling, end));
|
|
104
|
+
node = end;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else if (node.nodeType === 1 && !node.hasAttribute(LIGHT_ATTR) && !SERVED.has(node))
|
|
108
|
+
scan(node, out, null);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
/** The server's carrier — the host's first child, when it is `<ins data-vm-unassigned>` — or `null`. */
|
|
112
|
+
const carrierOf = (host) => {
|
|
113
|
+
const first = host.firstChild;
|
|
114
|
+
return first !== null && first.nodeType === 1 && first.hasAttribute(UNASSIGNED) ? first : null;
|
|
115
|
+
};
|
|
116
|
+
/** The statement's runs (after its format number), or `null` for another format or none. */
|
|
117
|
+
const statementOf = (spec) => {
|
|
118
|
+
const colon = spec === null ? -1 : spec.indexOf(':');
|
|
119
|
+
return colon < 0 || spec.slice(0, colon) !== FORMAT ? null : spec.slice(colon + 1);
|
|
120
|
+
};
|
|
121
|
+
/** Every well-formed range's light nodes, then the carrier's — the pools a statement indexes, found by structure. */
|
|
122
|
+
const poolsOf = (host, carrier) => {
|
|
123
|
+
const pools = [];
|
|
124
|
+
scan(host, pools, carrier);
|
|
125
|
+
if (carrier !== null)
|
|
126
|
+
pools.push(pool(carrier.firstChild, null));
|
|
127
|
+
return pools;
|
|
128
|
+
};
|
|
129
|
+
/** A served host not yet adopted: its light children in light order, read fresh from its statement — or `null`. */
|
|
130
|
+
const stated = (host) => {
|
|
131
|
+
const runs = statementOf(host.getAttribute(LIGHT_ATTR));
|
|
132
|
+
return runs === null ? null : ordered(runs, poolsOf(host, carrierOf(host)));
|
|
133
|
+
};
|
|
134
|
+
let registry;
|
|
135
|
+
/** Hydration's mismatch, handed over at `open`. */
|
|
136
|
+
let fail;
|
|
137
|
+
/** A served host, read: its statement, its carrier. Slots must be wired, and of this release. */
|
|
138
|
+
const open = (host, failWith) => {
|
|
139
|
+
fail = failWith;
|
|
140
|
+
const seam = registry._$capture$;
|
|
141
|
+
/**
|
|
142
|
+
* A wiring state (the diagnostic shape). Production prints the code alone: the code-and-link shape measured +14 B, the
|
|
143
|
+
* bare code 0 B — Brian's byte rule (a production line carries its code where the bundle is not larger), 2026-10-09.
|
|
144
|
+
*/
|
|
145
|
+
if (seam === undefined)
|
|
146
|
+
throw new Error(true ? diagnostic('hydrate-slots', `<${host.localName}>`, 'hydrate-slots-unwired', true && PROSE['hydrate-slots-unwired']()) : '[vera] hydrate-slots-unwired');
|
|
147
|
+
const spec = host.getAttribute(LIGHT_ATTR);
|
|
148
|
+
host.removeAttribute(LIGHT_ATTR);
|
|
149
|
+
SERVED.add(host);
|
|
150
|
+
if (seam[0] !== PROTOCOL)
|
|
151
|
+
fail('protocol', host, true && (() => `slots protocol ${seam[0]}, expected ${PROTOCOL}`));
|
|
152
|
+
const runs = statementOf(spec);
|
|
153
|
+
const served = { _host: host, _runs: runs ?? '', carrier: carrierOf(host), _pools: [], _capture: seam[1] };
|
|
154
|
+
/** Another release's server: rescued HERE — hydration holds no state for this host until `open` returns. */
|
|
155
|
+
if (runs === null) {
|
|
156
|
+
rescue(served);
|
|
157
|
+
/** Named in every build (Brian, 2026-10-02): a deploy, not a developer, meets it. */
|
|
158
|
+
fail('format', host, () => `${true ? `server format ${JSON.stringify(spec.split(':')[0])}, expected ${FORMAT}: ` : ''}update @verajs/ssr and @verajs/renderer together`);
|
|
159
|
+
}
|
|
160
|
+
return served;
|
|
161
|
+
};
|
|
162
|
+
/** At a canonical `<slot>`: a range at the cursor is its region — the slot itself a detached copy, as the client keeps it. */
|
|
163
|
+
const slot = (canonical, cursor, served) => {
|
|
164
|
+
if (canonical.localName !== 'slot')
|
|
165
|
+
return null;
|
|
166
|
+
const rs = cursor.offset === 0 ? cursor.node : null;
|
|
167
|
+
if (rs === null || !isMark(rs, '['))
|
|
168
|
+
return null;
|
|
169
|
+
const re = endOf(rs);
|
|
170
|
+
if (re === null)
|
|
171
|
+
return fail('slot', rs, true && (() => `a filled slot's range here is not well-formed`));
|
|
172
|
+
served._pools.push(pool(rs.nextSibling, re));
|
|
173
|
+
const copy = cursor.parent.ownerDocument.importNode(canonical, true);
|
|
174
|
+
copy._$region$ = [rs, re];
|
|
175
|
+
cursor.node = re.nextSibling;
|
|
176
|
+
return copy;
|
|
177
|
+
};
|
|
178
|
+
/** Light hosts a template placed RUNS into, walked in this adoption: captured (or converted) at its close. */
|
|
179
|
+
let pending = [];
|
|
180
|
+
/**
|
|
181
|
+
* **A light host a template wrote runs into, seated** — whoever walks a light host's content first captures it. Its
|
|
182
|
+
* light children become units in light order: each node outside a run a static, each run `[start, nodes, end]` (its part's
|
|
183
|
+
* anchors, held by `insert`, and the light nodes between them). The statement's order: captured now, waiting for the
|
|
184
|
+
* host's own slots (`wait`). The live record's: each run made one unit of it (`runOf`). Anchors that do not pair up as
|
|
185
|
+
* the template's runs — a run whose items are not each one element — decline.
|
|
186
|
+
*/
|
|
187
|
+
const seat = (cursor) => {
|
|
188
|
+
const { parent, _marks: marks, _runs: runs, end } = cursor;
|
|
189
|
+
const host = parent;
|
|
190
|
+
if (marks.length !== runs * 4)
|
|
191
|
+
fail('run', host, true && (() => `a list or value this template writes into a light-slot component is not one element per item`));
|
|
192
|
+
const [, capture, lightNodes, records, standIn, placed, adopted] = registry._$capture$;
|
|
193
|
+
/**
|
|
194
|
+
* The light children NOW, not as the walk began: a text child the walk split is several light children, as a client
|
|
195
|
+
* render makes it — read as the walk began, its pieces were never captured and the next distribution dropped them.
|
|
196
|
+
*/
|
|
197
|
+
const nodes = (end === 0 ? lightNodes(host) : stated(host)) ?? fail('run', host, false);
|
|
198
|
+
const index = (node) => (node === null ? nodes.length : nodes.indexOf(node));
|
|
199
|
+
/** The statement's order: every light child captured as a static first, waiting for the host's own slots. */
|
|
200
|
+
if (end !== 0)
|
|
201
|
+
capture(host, null, nodes, carrierOf(host), true);
|
|
202
|
+
const record = records.get(host);
|
|
203
|
+
const { holding } = record;
|
|
204
|
+
const ref = holding.lastChild;
|
|
205
|
+
const doc = host.ownerDocument;
|
|
206
|
+
for (let m = 0; m < marks.length; m += 4) {
|
|
207
|
+
const k = index(marks[m + 1]);
|
|
208
|
+
const run = nodes.slice(k, index(marks[m + 3]));
|
|
209
|
+
/**
|
|
210
|
+
* **The run, as the client keeps one**, in place of the statics its nodes were: its unit's two comments in holding,
|
|
211
|
+
* its part's anchors inside them, and at each node's place a stand-in if a slot holds it (it stays there), or the
|
|
212
|
+
* node itself if it waits unassigned. Only holding and the record change; no slotted node moves.
|
|
213
|
+
*/
|
|
214
|
+
const at = record.units.findIndex((unit) => unit.a === nodes[k]);
|
|
215
|
+
record.units = record.units.filter((unit) => !run.includes(unit.a));
|
|
216
|
+
const unit = { a: doc.createComment(''), z: doc.createComment('') };
|
|
217
|
+
holding.insertBefore(unit.a, ref);
|
|
218
|
+
holding.insertBefore(marks[m], ref);
|
|
219
|
+
for (const node of run)
|
|
220
|
+
if (node.parentNode === holding) {
|
|
221
|
+
holding.insertBefore(node, ref);
|
|
222
|
+
placed.set(node, null);
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
standIn(node, holding, ref);
|
|
226
|
+
if (!placed.has(node))
|
|
227
|
+
placed.set(node, adopted);
|
|
228
|
+
}
|
|
229
|
+
holding.insertBefore(marks[m + 2], ref);
|
|
230
|
+
holding.insertBefore(unit.z, ref);
|
|
231
|
+
record.units.splice(at < 0 ? record.units.length : at, 0, unit);
|
|
232
|
+
}
|
|
233
|
+
/** Nothing to mark: holding is watched, so slots notes these writes as it notes any other. */
|
|
234
|
+
};
|
|
235
|
+
/** The walk matched: the light children, in light order, captured where they stand — before anything commits. */
|
|
236
|
+
const close = (adopted) => {
|
|
237
|
+
for (const cursor of pending)
|
|
238
|
+
seat(cursor);
|
|
239
|
+
pending = [];
|
|
240
|
+
if (adopted === null)
|
|
241
|
+
return;
|
|
242
|
+
const served = adopted;
|
|
243
|
+
const { _host: host, carrier, _pools: pools } = served;
|
|
244
|
+
if (carrier !== null)
|
|
245
|
+
pools.push(pool(carrier.firstChild, null));
|
|
246
|
+
served._capture(host, null, ordered(served._runs, pools) ?? fail('slots', host, true && (() => `its light-slot statement does not account for what its slots hold`)), carrier);
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* It did not: every well-formed range's nodes and the carrier's, captured where they stand before the clear. The clear
|
|
250
|
+
* detaches them with the old markup and the fresh render's end places each by identity, slotted or held — moving them
|
|
251
|
+
* into the carrier first only moved each light node twice more (measured: three disconnect/connect pairs for one).
|
|
252
|
+
*/
|
|
253
|
+
const rescue = (served) => {
|
|
254
|
+
pending = [];
|
|
255
|
+
if (served === null)
|
|
256
|
+
return;
|
|
257
|
+
const { _host: host, _runs: runs, _capture: capture, carrier } = served;
|
|
258
|
+
const pools = poolsOf(host, carrier);
|
|
259
|
+
/** Every node first: `ordered` consumes the pools, and one that fails partway has taken some. */
|
|
260
|
+
const all = pools.flat();
|
|
261
|
+
capture(host, null, ordered(runs, pools) ?? all, carrier);
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* **A light host a template places content into** (the outer walk's light cursor): its children in light order. Slots'
|
|
265
|
+
* live record is the one source once it exists — a node the page added since is in it, and the template need not
|
|
266
|
+
* account for it; before that (the host not yet adopted), the server's statement, read fresh and never cached, which the
|
|
267
|
+
* template must account for exactly. Neither: `null`, and the walk reads the host's DOM.
|
|
268
|
+
*/
|
|
269
|
+
const light = (host, canonical, plan, values) => {
|
|
270
|
+
/** Only a custom element the template places content into can be a light host. */
|
|
271
|
+
if (canonical.firstChild === null || !host.localName.includes('-'))
|
|
272
|
+
return null;
|
|
273
|
+
/** RUNS the template writes directly among those children: a value that is not text (a text value is claimed in place). */
|
|
274
|
+
let runs = 0;
|
|
275
|
+
for (let node = canonical.firstChild; node !== null; node = node.nextSibling)
|
|
276
|
+
if (node.nodeType === 3) {
|
|
277
|
+
const owned = plan.get(node);
|
|
278
|
+
if (owned !== undefined && values[owned[0]] != null && typeof values[owned[0]] === 'object')
|
|
279
|
+
runs++;
|
|
280
|
+
}
|
|
281
|
+
const seam = registry._$capture$;
|
|
282
|
+
const live = seam?.[0] === PROTOCOL ? seam[2](host) : null;
|
|
283
|
+
if (live !== null)
|
|
284
|
+
return walker(host, live, 0, runs);
|
|
285
|
+
const nodes = stated(host);
|
|
286
|
+
return nodes === null ? null : walker(host, nodes, nodes.length, runs);
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* A cursor over `nodes` — the walk must account for the first `end` of them (all of a statement's, none of a record's);
|
|
290
|
+
* with runs, held until the adoption's close seats it.
|
|
291
|
+
*/
|
|
292
|
+
const walker = (host, nodes, end, runs) => {
|
|
293
|
+
const cursor = { parent: host, node: nodes[0] ?? null, offset: 0, light: nodes, at: 0, end, _runs: runs, _marks: [] };
|
|
294
|
+
if (runs > 0)
|
|
295
|
+
pending.push(cursor);
|
|
296
|
+
return cursor;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* An insert on a light walk. A run's anchor is held, with the node it stands before, for the unit `seat` builds — split
|
|
300
|
+
* first if the walk stands inside a text child, as a plain insert would; text (an empty value's anchor) goes in place.
|
|
301
|
+
*/
|
|
302
|
+
const insert = (cursor, node) => {
|
|
303
|
+
if (cursor.offset > 0) {
|
|
304
|
+
cursor.node = cursor.node.splitText(cursor.offset);
|
|
305
|
+
cursor.offset = 0;
|
|
306
|
+
}
|
|
307
|
+
const at = cursor.node;
|
|
308
|
+
if (node.nodeType === 3)
|
|
309
|
+
(at === null ? cursor.parent : at.parentNode).insertBefore(node, at);
|
|
310
|
+
else
|
|
311
|
+
cursor._marks.push(node, at);
|
|
312
|
+
};
|
|
313
|
+
/** The walk's step, once this piece is wired: on a light cursor the next light child, else the next sibling. */
|
|
314
|
+
const next = (cursor, node) => {
|
|
315
|
+
const nodes = cursor.light;
|
|
316
|
+
return nodes === undefined ? node.nextSibling : (nodes[++cursor.at] ?? null);
|
|
317
|
+
};
|
|
318
|
+
/** `wire([renderer, hydration, slots, hydrateSlots])`. */
|
|
319
|
+
const hydrateSlots = (given) => {
|
|
320
|
+
registry = given;
|
|
321
|
+
given._$hydrateSlots$ = [PROTOCOL, open, slot, close, rescue, light, next, insert];
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
export { hydrateSlots };
|
|
325
|
+
//# sourceMappingURL=vera-renderer-hydrate-slots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vera-renderer-hydrate-slots.js","sources":["../../src/kinds.ts","../../../shared-utils/src/diagnostic.ts","../../src/hydrate-slots-diagnostics.ts","../../src/hydrate-slots.ts"],"sourcesContent":["/**\n * **The renderer's binding kinds and child-part modes** — numbers both `renderer.ts` and the separately bundled\n * `hydration.ts` read, from ONE source (each bundle inlines them; they are literals in the output). A change here\n * changes the hand-off's protocol: bump `$V` in `renderer.ts`.\n */\n/** A binding's kind, resolved once per template. */\nexport const IGNORED = 0; // consumed, nothing rendered: inside a comment, the later values of a multi-part attribute\nexport const CHILD = 1; // anchored on a primed empty text node the template carries\nexport const SOLE = 2; // its element's only content: no anchor in the template, the first commit writes `textContent`\nexport const ATTR = 3;\nexport const PROPERTY = 4;\nexport const BOOLEAN = 5;\n/** `EVENT` through `ADOPT` hold a `Slot` record in their node slot — one range test, in `instantiate` and `commit`. */\nexport const EVENT = 6;\n/** An element-position expression: a ref, or a value that applies itself (`_$apply$`). */\nexport const REF = 7;\n/** An element-position expression ON a `<select>`: a value applying itself there (a spread) waits for `flush`. */\nexport const SELECT_REF = 8;\n/** `.name` on a custom element — see `adoptProperty` in shared-utils. */\nexport const ADOPT = 9;\n/**\n * Kinds from here on re-assert on EVERY render, so the update loop never skips them as unchanged:\n * `!name` writes from the live DOM's point of view (a sibling radio's click unchecks this one with no\n * event on it), and a `<select>`'s selection is re-applied after its options exist — see `flush`.\n */\nexport const LIVE = 10;\n/** A `<select>`'s selection — `value` or `selectedIndex` (`isSelection`) — written when the pass ends: see `flush`. */\nexport const SELECT = 11;\n/** `!name` on a custom element: compared against the LIVE value — read through `untracked`, it is the component's getter. */\nexport const LIVE_CUSTOM = 12;\n/** A binding that must never write — and, from here on, the kinds `commit` handles before anything is computed. */\nexport const REFUSED = 13;\n/** A `<select>`'s `selectedIndex` — the rare spelling of its selection, queued as `SELECT` is (see `flush`). */\nexport const SELECT_INDEX = 14;\n/**\n * **An HTML `<style>`'s or JSON data block's whole text** — ONE binding (the element's first value; the others are\n * consumed, as a multi-part attribute's are) composes the statics and values and writes the element's text when it\n * changed. Its text is serialized VERBATIM (BROWSER-LEDGER), so it is written unable to end its element, as the server\n * writes it: in a style each `</style` as `<\\/style`, in a JSON block every `<` as `\\u003c` — on the COMPOSED text, since\n * a closer can form across a hole. Committed in `commit`'s cold branch: the hot text line is untouched.\n */\nexport const RAW_STYLE = 15;\nexport const RAW_JSON = 16;\n/**\n * **An element whose content is never shown** (`<iframe>`, `<noscript>`, `<xmp>`, `<noembed>`, `<noframes>`,\n * `<plaintext>`): its statics and its values composed as text, each VALUE fully encoded (every ASCII non-word character\n * as a character reference), so a page saved from the DOM and parsed again — with scripting on (raw text) or off\n * (markup) — holds no value that can end the element or add an attribute.\n */\nexport const RAW_ENCODED = 17;\n\n\n/** A child part's mode: what its range currently holds. */\nexport const EMPTY = 0;\nexport const TEXT = 1;\nexport const TEMPLATE = 2;\nexport const LIST = 3;\nexport const NODE = 4;\n\n/**\n * **The hydration hand-off's positions** — the renderer sets `$H` to an array at `connect`, and `hydration.ts` reads\n * it by these. An array, not an object of named fields: the names cost every app bytes (−35 B gzipped measured,\n * 2026-10-02), and these constants inline to literals in both bundles. The first two are FROZEN across protocols — a\n * hydration from another release reads the protocol at 0 and, on a mismatch, can still install its clearing hook at 1.\n * Any other change here is a protocol change: bump `PROTOCOL`.\n */\n/**\n * **The protocol of this package's first-party seams** — the renderer's hand-off (`$H`, at `HANDOFF_PROTOCOL`) and slots'\n * capture (`_$capture$`), both read by hydration. One number for both: the three ship in one package, and a change to\n * either seam bumps it. A hydration that meets another number declines (the page renders fresh) and says so.\n */\nexport const PROTOCOL = 2;\n/** The protocol number — FROZEN at 0. */\nexport const HANDOFF_PROTOCOL = 0;\n/** The first-render hook's setter — FROZEN at 1. */\nexport const HANDOFF_ADOPTER = 1;\nexport const HANDOFF_GET_TEMPLATE = 2;\nexport const HANDOFF_CHILD_PART = 3;\nexport const HANDOFF_INSTANCE = 4;\nexport const HANDOFF_SLOT = 5;\nexport const HANDOFF_UNSET = 6;\nexport const HANDOFF_UPGRADED = 7;\nexport const HANDOFF_COMMIT = 8;\nexport const HANDOFF_COMMIT_AS = 9;\nexport const HANDOFF_HOOK_UP = 10;\nexport const HANDOFF_RESOLVE = 11;\nexport const HANDOFF_ROOTS = 12;\nexport const HANDOFF_TO_TEXT = 13;\nexport const HANDOFF_REMOVAL_WORK = 14;\n","/**\n * **Where every diagnostic code is explained.** The URL is permanent: a released bundle is immutable, so every version\n * published points here for ever — the domain cannot lapse and `/e/` cannot be reorganized without breaking links in\n * code nobody can edit; the docs site redirects instead. `scripts/sync-diagnostics.mjs` imports this constant, so the\n * pages and the bundles can never disagree about where they are.\n */\nexport const DOCS = 'https://verajs.dev/e/';\n\n/**\n * **What this copy of the framework has already said** (Brian's ruling, 2026-11-12): the ONE memory behind `warnOnce`, `errorOnce`\n * and `hasWarned`, for DEVELOPMENT-ONLY warnings. It replaced the hand-written once-flags every package kept\n * (`saidLists`, `warnedDrop`, per-element WeakSets, per-key Sets: two naming styles, Brian: no names). **A warning that\n * ships to production keeps its memory at its site** (bytes, measured 2026-11-12: the shared memory costs +80–145 B gz\n * per bundle); development-only warnings use warnOnce. Module state by necessity, since \"once\" spans every call on the\n * page. One per BUNDLE COPY, exactly the scope each flag had, because this package is inlined into every bundle.\n * A code, or `code key` for a string key, in a Set. An object key (an element, a setup function) in a WeakMap, so its\n * entry goes with the object. Marked pure, so a bundle that never prints once drops both.\n */\nconst printed = /* @__PURE__ */ new Set<string>();\nconst printedOn = /* @__PURE__ */ new WeakMap<object, Map<string, Set<unknown>>>();\n/**\n * A once's KEY: none (once per page), a string (once per that string), an object (once per that object: an element, a\n * class, a setup function), or the PAIR `[object, value]`, a value key on that object (a store write: the object and its\n * property; a keyed list: the list and the duplicate key, compared as the list compares them, by value, so `1` and `'1'`\n * stay apart). A pair is the only array a key may be.\n */\ntype OnceKey = string | object | readonly [object, unknown];\n/** Where an object key's (code, value) lives: the value set for that code on that object, made on demand. */\nconst valuesOn = (on: object, code: string, make: boolean): Set<unknown> | undefined => {\n let codes = printedOn.get(on);\n if (codes === undefined) {\n if (!make) return undefined;\n printedOn.set(on, (codes = new Map()));\n }\n let values = codes.get(code);\n if (values === undefined && make) codes.set(code, (values = new Set()));\n return values;\n};\n/** The object and value of an object or pair key. */\nconst split = (key: object): readonly [object, unknown] => (Array.isArray(key) ? (key as unknown as readonly [object, unknown]) : [key, undefined]);\n/** Whether (code, key) is new, recording it if so. */\nconst firstTime = (code: string, key?: OnceKey): boolean => {\n if (key === undefined || typeof key === 'string') {\n const entry = key === undefined ? code : `${code} ${key}`;\n if (printed.has(entry)) return false;\n printed.add(entry);\n return true;\n }\n const [on, sub] = split(key);\n const values = valuesOn(on, code, true)!;\n if (values.has(sub)) return false;\n values.add(sub);\n return true;\n};\n\n/**\n * **One shape for every diagnostic the framework prints** — the short line production keeps, the whole sentence\n * development adds — so a package converting its messages writes a table and a call, never its own format.\n *\n * production `[vera] hydration: element: found <i> — https://verajs.dev/e/hydration-fallback`\n * development `[vera] hydration: element: found <i> — fell back to a client render: … (hydration-fallback)`\n *\n * `subject` is the free information — what the code already has at hand, naming the problem area — the same in both\n * builds. `prose` is development only: the package's table entry (`Prose`), called behind `__DEV__` at the call site so\n * the table goes unreferenced in production and rollup drops it whole. Production prints the code inside the link, so\n * the reader is one click from the explanation, which `scripts/sync-diagnostics.mjs` publishes from the same tables.\n *\n * **Every production message is coded** (Brian, 2026-11-11; this supersedes \"convert where smaller\", 2026-10-02):\n * consistency over a few bytes, so no package keeps a hand-written production line beside its table.\n */\n/*\n * The parameter names are deliberately unlike anything a caller holds: terser will not inline a function whose\n * parameter shadows a name at the call site (measured 2026-10-02 — directives passes its own `code`, and a parameter\n * called `code` left `((e,t,n)=>`…`)(0,t,n)` in its bundle, +8 B; renamed, the call folds to the bare template).\n */\n/**\n * **A misused API, named by its function** — the thrown-error twin of `diagnostic()`: `untrack: expected a function …\n * (untrack-not-function)`, function-first because a stack already names the source and the sweep reads that shape. The\n * prose comes from a package's table, behind `__DEV__`, so a development-only guard costs production nothing.\n */\nexport const misuse = (forName: string, withCode: string, andProse?: false | readonly [string, string?]) =>\n __DEV__ && andProse\n ? `${forName}: ${andProse[0]}${andProse[1] ? ` ${andProse[1]}` : ''} (${withCode})`\n : `${forName}: ${DOCS}${withCode}`;\n\n/**\n * **A misused API and what it was misused ABOUT** — `misuse()` with a subject, in `diagnostic()`'s ` — ` separator:\n * `parseFrontmatter: line 3 — https://verajs.dev/e/cms-frontmatter-unsupported`. The subject is the free information\n * (a line, a URL and its status) and prints in both builds. A sibling rather than an optional parameter on `misuse()`,\n * because `misuse()` is inlined into every bundle that throws and a conditional subject would tax all of them for a\n * shape few need; a sibling is tree-shaken where unused.\n */\nexport const misuseAbout = (forName: string, aboutSubject: string, withCode: string, andProse?: false | readonly [string, string?]) =>\n __DEV__ && andProse\n ? `${forName}: ${aboutSubject} — ${andProse[0]}${andProse[1] ? ` ${andProse[1]}` : ''} (${withCode})`\n : `${forName}: ${aboutSubject} — ${DOCS}${withCode}`;\n\nexport const diagnostic = (\n inArea: string,\n bySubject: string,\n withCode: string,\n andProse?: false | readonly [string, string?]\n) =>\n /** `__DEV__` HERE as well as at the call: production folds this to the one-line form, branch and all. */\n __DEV__ && andProse\n ? `[vera] ${inArea}: ${bySubject} — ${andProse[0]}${andProse[1] ? ` ${andProse[1]}` : ''} (${withCode})`\n : `[vera] ${inArea}: ${bySubject} — ${DOCS}${withCode}`;\n\n/**\n * **Text from outside — a file path, a YAML key, a URL, an error's message — quoted before it reaches a line.** A log is a\n * pipeline, and such text can be shaped by an author or a request: a newline in it forges a line, an ESC sequence hides\n * one (log injection). `JSON.stringify` escapes both; cut to 80 characters so one value cannot fill the log. @verajs/ssr\n * keeps a twin (it cannot import this), held equal by tests/ssr-coded-diagnostics.\n */\n/**\n * `max` caps the length (80 by default); `Infinity` keeps the whole text for a value worth reading in full — a site\n * owner's own path — which is still ESCAPED: truncation and escaping are separate jobs, and a path is not free of control\n * characters just because its owner wrote it (2026-10-09).\n */\nexport const quoted = (text: string, max = 80): string => JSON.stringify(text.length > max ? `${text.slice(0, max)}…` : text);\n\n/**\n * **The errors a package constructs, marked as its own** — so a wrapper that reports an inner refusal (cms's\n * `generateManifest` around a frontmatter line) carries it as it is: already formatted, its outside text already\n * quoted. Anything else is foreign, and quoted. Identity, never a shape test: a message can imitate ours, an identity\n * cannot. @verajs/ssr keeps a twin (it cannot import this).\n */\nconst ours = /* @__PURE__ */ new WeakSet<object>();\nexport const own = <E extends Error>(error: E): E => {\n ours.add(error);\n return error;\n};\nexport const isOwn = (error: unknown): boolean => typeof error === 'object' && error !== null && ours.has(error);\n\n/**\n * **Whether this copy has already said `code` (for `key`)**: for a GUARD only, where deciding to warn costs work worth\n * skipping once the warning is out (development's whole-tree walk for unwired directive attributes, an event-name\n * guess over every property of an element). A site that only prints calls `warnOnce`. Asks, never records.\n */\nexport const hasWarned = (code: string, key?: OnceKey): boolean => {\n if (key === undefined || typeof key === 'string') return printed.has(key === undefined ? code : `${code} ${key}`);\n const [on, sub] = split(key);\n return valuesOn(on, code, false)?.has(sub) === true;\n};\n\ntype Detail = false | readonly [string, string?] | (() => readonly [string, string?] | undefined);\n/**\n * The printer behind both, on one level. `andDetail` is `diagnostic()`'s prose, or a function returning it where building\n * the sentence costs something: it is called only the first time. `...andMore` rides beside the line behind '%s' (an\n * element, a thrown error), never inside it, so text from outside cannot forge a line. The console method is read at the\n * call, so a test that replaces `console.warn` sees it.\n */\nconst sayOnce =\n (level: 'warn' | 'error') =>\n (inArea: string, bySubject: string, withCode: string, andDetail?: Detail, forKey?: OnceKey, ...andMore: unknown[]): void => {\n if (!firstTime(withCode, forKey)) return;\n const line = diagnostic(inArea, bySubject, withCode, typeof andDetail === 'function' ? andDetail() : andDetail);\n if (andMore.length) console[level]('%s', line, ...andMore);\n else console[level](line);\n };\n/**\n * **A diagnostic said once per page** (per key, where one is given: a string, or an object such as the element it is\n * about): `diagnostic()`'s arguments, then the key, then what rides beside the line. Coded in production exactly as\n * `diagnostic()` is, because it IS `diagnostic()`. `errorOnce` is its twin on `console.error`, for a refusal a page should\n * not miss.\n */\nexport const warnOnce = /* @__PURE__ */ sayOnce('warn');\nexport const errorOnce = /* @__PURE__ */ sayOnce('error');\n","/** **`@verajs/renderer/hydrate-slots`' diagnostics — DEVELOPMENT ONLY.** Its bundle's own table, merged into the renderer's json. */\nimport type { Prose } from '@verajs/shared-utils';\n\nexport const PROSE: Record<string, Prose> = {\n 'hydrate-slots-unwired': () => [\n 'reads the light-DOM statement through `slots`, which is not wired.',\n 'Wire `slots` beside it: `wire([renderer, hydration, slots, hydrateSlots])`.',\n ],\n};\n","/**\n * **`@verajs/renderer/hydrate-slots` — hydrating light-DOM slots.** `wire([renderer, hydration, slots, hydrateSlots])`.\n *\n * Everything only a page that HYDRATES LIGHT SLOTS runs, kept out of both modules so neither pays for the other (Brian,\n * 2026-10-07): the server's format (`data-vm-light` — its number, the light order — and the carrier), each filled slot's\n * range and detached copy, and the rescue. Hydration calls it through `_$hydrateSlots$`;\n * it captures through slots' `_$capture$`. Slots' own distribution then recomputes every assignment from the nodes'\n * names, so the server's placement decides at most WHETHER a node moves, never where it ends up.\n *\n * Without it, hydration refuses a served light host before touching anything (`hydration-slots`): the page stands as\n * served, and a component boundary reports it once.\n */\nimport { PROTOCOL } from './kinds.js';\nimport { diagnostic } from '@verajs/shared-utils';\nimport { PROSE } from './hydrate-slots-diagnostics.js';\nimport type { CaptureSeam, HydrateSlots, HydrationCursor, HydrationFail, LightCapture, ServedHost } from './types.js';\n\n/** The registry as this module uses it — `get` named so `wire`'s registry is assignable (a type of optional members alone is \"weak\"). */\ntype Registry = { get(name: string): unknown[] | undefined; _$capture$?: CaptureSeam; _$hydrateSlots$?: HydrateSlots };\n/** A served host being adopted: what hydration sees (`ServedHost`), and what this module keeps beside it. */\n/** `_`-named where only this module reads them — the minifier shortens those; `carrier` is hydration's to read too. */\ntype Served = ServedHost & { _host: Element; _runs: string; carrier: HTMLElement | null; _pools: Node[][]; _capture: LightCapture };\n\n/** What `@verajs/ssr` writes — a deliberate second address of its writer; `slots-ssr-client-parity` holds them together. */\nconst FORMAT = '1';\nconst LIGHT_ATTR = 'data-vm-light';\nconst UNASSIGNED = 'data-vm-unassigned';\nconst isMark = (node: Node, data: string) => node.nodeType === 8 && (node as Comment).data === data;\n/** The slottable nodes from `from` up to `to` — comments are never light content. */\nconst pool = (from: Node | null, to: Node | null): Node[] => {\n const out: Node[] = [];\n for (let node = from; node !== null && node !== to; node = node.nextSibling) if (node.nodeType !== 8) out.push(node);\n return out;\n};\n/**\n * The pools' nodes in light order, as the statement gives it — `null` unless it accounts for every one, exactly. The\n * statement counts a run of adjacent TEXT as one light child, as the parser makes it; a walk may since have split it\n * (an outer template's static text beside its value), so the pieces that follow one taken are taken with it.\n */\nconst ordered = (runs: string, pools: Node[][]): Node[] | null => {\n const order: Node[] = [];\n for (const run of runs === '' ? [] : runs.split(',')) {\n const [index, count = '1'] = run.split('*');\n const nodes = pools[+index];\n for (let k = +count; k > 0; k--) {\n let node = nodes?.shift();\n if (node === undefined) return null;\n order.push(node);\n while (node.nodeType === 3 && nodes![0] !== undefined && nodes![0] === node.nextSibling && nodes![0].nodeType === 3) order.push((node = nodes!.shift()!));\n }\n }\n return pools.every((nodes) => nodes.length === 0) ? order : null;\n};\n/** The `]` that closes the range `start` opens — `null` if another `[` or the parent's end comes first: not well-formed. */\nconst endOf = (start: Node): ChildNode | null => {\n let end = start.nextSibling;\n while (end !== null && !isMark(end, ']') && !isMark(end, '[')) end = end.nextSibling;\n return end !== null && isMark(end, ']') ? end : null;\n};\nconst SERVED = new WeakSet<Node>();\n/** Every well-formed range under `parent`, in document order — never entering a range, the carrier, or a served host. */\nconst scan = (parent: Node, out: Node[][], skip: Node | null) => {\n for (let node = parent.firstChild; node !== null; node = node.nextSibling) {\n if (node === skip) continue;\n if (isMark(node, '[')) {\n const end = endOf(node);\n if (end !== null) {\n out.push(pool(node.nextSibling, end));\n node = end;\n }\n } else if (node.nodeType === 1 && !(node as Element).hasAttribute(LIGHT_ATTR) && !SERVED.has(node)) scan(node, out, null);\n }\n};\n\n/** The server's carrier — the host's first child, when it is `<ins data-vm-unassigned>` — or `null`. */\nconst carrierOf = (host: Element): HTMLElement | null => {\n const first = host.firstChild;\n return first !== null && first.nodeType === 1 && (first as Element).hasAttribute(UNASSIGNED) ? (first as HTMLElement) : null;\n};\n/** The statement's runs (after its format number), or `null` for another format or none. */\nconst statementOf = (spec: string | null): string | null => {\n const colon = spec === null ? -1 : spec.indexOf(':');\n return colon < 0 || spec!.slice(0, colon) !== FORMAT ? null : spec!.slice(colon + 1);\n};\n/** Every well-formed range's light nodes, then the carrier's — the pools a statement indexes, found by structure. */\nconst poolsOf = (host: Element, carrier: Node | null): Node[][] => {\n const pools: Node[][] = [];\n scan(host, pools, carrier);\n if (carrier !== null) pools.push(pool(carrier.firstChild, null));\n return pools;\n};\n/** A served host not yet adopted: its light children in light order, read fresh from its statement — or `null`. */\nconst stated = (host: Element): Node[] | null => {\n const runs = statementOf(host.getAttribute(LIGHT_ATTR));\n return runs === null ? null : ordered(runs, poolsOf(host, carrierOf(host)));\n};\n\nlet registry: Registry;\n/** Hydration's mismatch, handed over at `open`. */\nlet fail: HydrationFail;\n\n/** A served host, read: its statement, its carrier. Slots must be wired, and of this release. */\nconst open = (host: Element, failWith: HydrationFail): Served => {\n fail = failWith;\n const seam = registry._$capture$;\n /**\n * A wiring state (the diagnostic shape). Production prints the code alone: the code-and-link shape measured +14 B, the\n * bare code 0 B — Brian's byte rule (a production line carries its code where the bundle is not larger), 2026-10-09.\n */\n if (seam === undefined)\n throw new Error(\n __DEV__ ? diagnostic('hydrate-slots', `<${host.localName}>`, 'hydrate-slots-unwired', __DEV__ && PROSE['hydrate-slots-unwired']()) : '[vera] hydrate-slots-unwired'\n );\n const spec = host.getAttribute(LIGHT_ATTR)!;\n host.removeAttribute(LIGHT_ATTR);\n SERVED.add(host);\n if (seam[0] !== PROTOCOL) fail('protocol', host, __DEV__ && (() => `slots protocol ${seam[0]}, expected ${PROTOCOL}`));\n const runs = statementOf(spec);\n const served = { _host: host, _runs: runs ?? '', carrier: carrierOf(host), _pools: [], _capture: seam[1] };\n /** Another release's server: rescued HERE — hydration holds no state for this host until `open` returns. */\n if (runs === null) {\n rescue(served);\n /** Named in every build (Brian, 2026-10-02): a deploy, not a developer, meets it. */\n fail('format', host, () => `${__DEV__ ? `server format ${JSON.stringify(spec.split(':')[0])}, expected ${FORMAT}: ` : ''}update @verajs/ssr and @verajs/renderer together`);\n }\n return served;\n};\n\n/** At a canonical `<slot>`: a range at the cursor is its region — the slot itself a detached copy, as the client keeps it. */\nconst slot = (canonical: Element, cursor: HydrationCursor, served: ServedHost): Element | null => {\n if (canonical.localName !== 'slot') return null;\n const rs = cursor.offset === 0 ? cursor.node : null;\n if (rs === null || !isMark(rs, '[')) return null;\n const re = endOf(rs);\n if (re === null) return fail('slot', rs, __DEV__ && (() => `a filled slot's range here is not well-formed`));\n (served as Served)._pools.push(pool(rs.nextSibling, re));\n const copy = cursor.parent.ownerDocument!.importNode(canonical, true) as Element & { _$region$?: [Comment, Comment] };\n copy._$region$ = [rs as Comment, re as Comment];\n cursor.node = re.nextSibling;\n return copy;\n};\n\n/** Light hosts a template placed RUNS into, walked in this adoption: captured (or converted) at its close. */\nlet pending: HydrationCursor[] = [];\n\n/**\n * **A light host a template wrote runs into, seated** — whoever walks a light host's content first captures it. Its\n * light children become units in light order: each node outside a run a static, each run `[start, nodes, end]` (its part's\n * anchors, held by `insert`, and the light nodes between them). The statement's order: captured now, waiting for the\n * host's own slots (`wait`). The live record's: each run made one unit of it (`runOf`). Anchors that do not pair up as\n * the template's runs — a run whose items are not each one element — decline.\n */\nconst seat = (cursor: HydrationCursor) => {\n const { parent, _marks: marks, _runs: runs, end } = cursor as Required<HydrationCursor>;\n const host = parent as Element;\n if (marks.length !== runs * 4)\n fail('run', host, __DEV__ && (() => `a list or value this template writes into a light-slot component is not one element per item`));\n const [, capture, lightNodes, records, standIn, placed, adopted] = registry._$capture$!;\n /**\n * The light children NOW, not as the walk began: a text child the walk split is several light children, as a client\n * render makes it — read as the walk began, its pieces were never captured and the next distribution dropped them.\n */\n const nodes = (end === 0 ? lightNodes(host) : stated(host)) ?? fail('run', host, false);\n const index = (node: unknown) => (node === null ? nodes.length : nodes.indexOf(node as Node));\n /** The statement's order: every light child captured as a static first, waiting for the host's own slots. */\n if (end !== 0) capture(host, null, nodes, carrierOf(host), true);\n const record = records.get(host)!;\n const { holding } = record;\n const ref = holding.lastChild;\n const doc = host.ownerDocument;\n for (let m = 0; m < marks.length; m += 4) {\n const k = index(marks[m + 1]);\n const run = nodes.slice(k, index(marks[m + 3]));\n /**\n * **The run, as the client keeps one**, in place of the statics its nodes were: its unit's two comments in holding,\n * its part's anchors inside them, and at each node's place a stand-in if a slot holds it (it stays there), or the\n * node itself if it waits unassigned. Only holding and the record change; no slotted node moves.\n */\n const at = record.units.findIndex((unit) => unit.a === nodes[k]);\n record.units = record.units.filter((unit) => !run.includes(unit.a));\n const unit = { a: doc.createComment(''), z: doc.createComment('') };\n holding.insertBefore(unit.a, ref);\n holding.insertBefore(marks[m] as Node, ref);\n for (const node of run)\n if (node.parentNode === holding) {\n holding.insertBefore(node, ref);\n placed.set(node, null);\n } else {\n standIn(node, holding, ref);\n if (!placed.has(node)) placed.set(node, adopted);\n }\n holding.insertBefore(marks[m + 2] as Node, ref);\n holding.insertBefore(unit.z, ref);\n record.units.splice(at < 0 ? record.units.length : at, 0, unit);\n }\n /** Nothing to mark: holding is watched, so slots notes these writes as it notes any other. */\n};\n\n/** The walk matched: the light children, in light order, captured where they stand — before anything commits. */\nconst close = (adopted: ServedHost | null) => {\n for (const cursor of pending) seat(cursor);\n pending = [];\n if (adopted === null) return;\n const served = adopted as Served;\n const { _host: host, carrier, _pools: pools } = served;\n if (carrier !== null) pools.push(pool(carrier.firstChild, null));\n served._capture(host, null, ordered(served._runs, pools) ?? fail('slots', host, __DEV__ && (() => `its light-slot statement does not account for what its slots hold`)), carrier);\n};\n\n/**\n * It did not: every well-formed range's nodes and the carrier's, captured where they stand before the clear. The clear\n * detaches them with the old markup and the fresh render's end places each by identity, slotted or held — moving them\n * into the carrier first only moved each light node twice more (measured: three disconnect/connect pairs for one).\n */\nconst rescue = (served: ServedHost | null) => {\n pending = [];\n if (served === null) return;\n const { _host: host, _runs: runs, _capture: capture, carrier } = served as Served;\n const pools = poolsOf(host, carrier);\n /** Every node first: `ordered` consumes the pools, and one that fails partway has taken some. */\n const all = pools.flat();\n capture(host, null, ordered(runs, pools) ?? all, carrier);\n};\n\n/**\n * **A light host a template places content into** (the outer walk's light cursor): its children in light order. Slots'\n * live record is the one source once it exists — a node the page added since is in it, and the template need not\n * account for it; before that (the host not yet adopted), the server's statement, read fresh and never cached, which the\n * template must account for exactly. Neither: `null`, and the walk reads the host's DOM.\n */\nconst light = (host: Element, canonical: Element, plan: ReadonlyMap<Node, readonly number[]>, values: readonly unknown[]): HydrationCursor | null => {\n /** Only a custom element the template places content into can be a light host. */\n if (canonical.firstChild === null || !host.localName.includes('-')) return null;\n /** RUNS the template writes directly among those children: a value that is not text (a text value is claimed in place). */\n let runs = 0;\n for (let node: Node | null = canonical.firstChild; node !== null; node = node.nextSibling)\n if (node.nodeType === 3) {\n const owned = plan.get(node);\n if (owned !== undefined && values[owned[0]] != null && typeof values[owned[0]] === 'object') runs++;\n }\n const seam = registry._$capture$;\n const live = seam?.[0] === PROTOCOL ? seam[2](host) : null;\n if (live !== null) return walker(host, live, 0, runs);\n const nodes = stated(host);\n return nodes === null ? null : walker(host, nodes, nodes.length, runs);\n};\n/**\n * A cursor over `nodes` — the walk must account for the first `end` of them (all of a statement's, none of a record's);\n * with runs, held until the adoption's close seats it.\n */\nconst walker = (host: Element, nodes: Node[], end: number, runs: number): HydrationCursor => {\n const cursor = { parent: host, node: nodes[0] ?? null, offset: 0, light: nodes, at: 0, end, _runs: runs, _marks: [] };\n if (runs > 0) pending.push(cursor);\n return cursor;\n};\n\n/**\n * An insert on a light walk. A run's anchor is held, with the node it stands before, for the unit `seat` builds — split\n * first if the walk stands inside a text child, as a plain insert would; text (an empty value's anchor) goes in place.\n */\nconst insert = (cursor: HydrationCursor, node: Node) => {\n if (cursor.offset > 0) {\n cursor.node = (cursor.node as Text).splitText(cursor.offset);\n cursor.offset = 0;\n }\n const at = cursor.node;\n if (node.nodeType === 3) (at === null ? cursor.parent : at.parentNode!).insertBefore(node, at);\n else cursor._marks!.push(node, at);\n};\n\n/** The walk's step, once this piece is wired: on a light cursor the next light child, else the next sibling. */\nconst next = (cursor: HydrationCursor, node: Node): Node | null => {\n const nodes = cursor.light;\n return nodes === undefined ? node.nextSibling : (nodes[++cursor.at!] ?? null);\n};\n\n/** `wire([renderer, hydration, slots, hydrateSlots])`. */\nexport const hydrateSlots = (given: Registry) => {\n registry = given;\n given._$hydrateSlots$ = [PROTOCOL, open, slot, close, rescue, light, next, insert];\n};\n"],"names":[],"mappings":"AAAA;;;;AAIG;AACH;AAsDA;;;;;;AAMG;AACH;;;;AAIG;AACI,MAAM,QAAQ,GAAG,CAAC;;ACvEzB;;;;;AAKG;AACI,MAAM,IAAI,GAAG,uBAAuB;AA2FpC,MAAM,UAAU,GAAG,CACxB,MAAc,EACd,SAAiB,EACjB,QAAgB,EAChB,QAA6C;AAE7C;AACA,OAAO,IAAI;AACT,MAAE,CAAA,OAAA,EAAU,MAAM,CAAA,EAAA,EAAK,SAAS,CAAA,GAAA,EAAM,QAAQ,CAAC,CAAC,CAAC,CAAA,EAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAA,CAAA,EAAI,QAAQ,CAAC,CAAC,CAAC,CAAA,CAAE,GAAG,EAAE,CAAA,EAAA,EAAK,QAAQ,CAAA,CAAA;MACnG,CAAA,OAAA,EAAU,MAAM,CAAA,EAAA,EAAK,SAAS,MAAM,IAAI,CAAA,EAAG,QAAQ,CAAA,CAAE;;ACvGpD,MAAM,KAAK,GAA0B;IAC1C,uBAAuB,EAAE,MAAM;QAC7B,oEAAoE;QACpE,6EAA6E;AAC9E,KAAA;CACF;;ACRD;;;;;;;;;;;AAWG;AAYH;AACA,MAAM,MAAM,GAAG,GAAG;AAClB,MAAM,UAAU,GAAG,eAAe;AAClC,MAAM,UAAU,GAAG,oBAAoB;AACvC,MAAM,MAAM,GAAG,CAAC,IAAU,EAAE,IAAY,KAAK,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAK,IAAgB,CAAC,IAAI,KAAK,IAAI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