@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 @@
|
|
|
1
|
+
{"version":3,"file":"vera-renderer-hydration.js","sources":["../../../shared-utils/src/diagnostic.ts","../../../shared-utils/src/markup-grammar.ts","../../src/hydration-diagnostics.ts","../../src/kinds.ts","../../src/hydration.ts"],"sourcesContent":["/**\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","import { misuse } from './diagnostic.js';\nimport * as SHARED from './diagnostics.js';\n/**\n * HTML's own element grammar — the facts about tags that every package emitting or reading markup\n * has to agree on.\n *\n * These are not this framework's rules; they are the parser's, and a package that guesses at them\n * produces markup whose *parse* differs from what its author wrote. That failure is silent by\n * nature: nothing throws, the page renders, and the DOM simply has a different shape than the\n * source said. See `VOID_ELEMENTS` below for the two measured instances.\n *\n * **Never `exec` a shared `/g` regex in a loop whose body can re-enter it** (a nested render, a recursive compose or\n * serialize, a callback): the inner use resets `lastIndex`, and the outer loop restarts or skips. Setting `lastIndex`\n * before every `exec` is not enough. Measured 2026-11-17: the static tier's composer re-entered its marker regex through\n * a nested template and composed forever; split once, or use a fresh regex per walk.\n *\n * **Why here.** These sets had grown copies in `@verajs/ssr`, `@verajs/cms` and (as a regex) the\n * renderer, all agreeing by luck rather than by construction. This file is the one source for\n * every package that can take a build-time import — `@verajs/shared-utils` is private and inlined,\n * so importing it costs a consumer nothing at runtime and adds no published dependency.\n *\n * **`@verajs/ssr` cannot import it** and keeps its own copies: that package publishes its `src`\n * with no dependencies at all, so an import of a package that is never published would break the\n * published tarball. The same constraint already forced a twin of `escapeStyleText` there. A copy\n * is acceptable; a copy nothing checks is not, so `tests/markup-grammar-homes.test.mjs` drives\n * every copy against this file source-to-source rather than trusting they get edited together.\n *\n * **A consumer may keep a different SHAPE for the same fact** where a hot path needs one — the\n * renderer matches raw-text tags with a case-insensitive regex rather than lowercasing a string to\n * probe a `Set`. The rule is agreement, not representation, and the homes test asserts agreement\n * across whatever shape each home uses.\n */\n\n/**\n * Elements with no end tag, and therefore no children.\n *\n * Both directions of getting this wrong are silent, and both were live in this repo until the\n * audit of 2026-09-12 measured them:\n *\n * - **A non-void element written self-closing swallows what follows it.** HTML has no\n * self-closing syntax outside foreign content, so `<div/><span>after</span>` parses as\n * `<div><span>after</span></div>` — the sibling becomes a child. Every JSX toolchain treats\n * `<div/>` as an empty element, which is exactly why authors write it.\n * - **A void element written with an end tag is duplicated.** A parser reads `</br>` as *another*\n * `<br>`, so `<br></br>` renders two line breaks where the author wrote one.\n *\n * Inside `<svg>` and `<math>` the parser switches to foreign content, where XML self-closing *is*\n * honored — so neither rule applies there, and a consumer that checks must know where it is.\n */\nexport const VOID_ELEMENTS = new Set([\n 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input',\n 'link', 'meta', 'param', 'source', 'track', 'wbr',\n]);\n\n/**\n * Elements a parser reads the children of as text rather than as markup.\n *\n * Two pieces of measured lore travel with this list and are the reason it is not read off a spec:\n *\n * - `iframe` and `noscript` were once absent from the SSR copy, which built a tree no browser\n * builds — `<noscript><img src=\"x\"></noscript>` produced an element, so\n * `querySelectorAll('noscript img')` answered 1 where every engine answers 0.\n * - `noscript` is raw text only when scripting is ENABLED. Fragment parsing disables it, and\n * Chromium and WebKit then parse the content as markup while Firefox parses it as text — so a\n * binding inside `<noscript>` worked in two engines and painted the renderer's internal marker\n * onto the page in the third. Listing it is safe in both parses.\n *\n * jsdom is not the oracle for either: it parses with scripting disabled and agrees with the old,\n * wrong list.\n */\nexport const RAW_TEXT_ELEMENTS = new Set(['style', 'script', 'textarea', 'title', 'iframe', 'noscript']);\n\n/**\n * The hyphenated names SVG and MathML already define, which the custom-elements spec reserves — so a\n * dash in one of these does NOT make it a custom element.\n *\n * Measured, the one that matters: JSX treats a dash-named tag as a custom element and compiles its\n * attributes to PROPERTIES, which turned `<annotation-xml encoding=\"text/html\">` into\n * `.encoding=${…}`. The HTML parser decides that element is an integration point from the\n * ATTRIBUTE on its start tag, so HTML content inside was moved out of the `<math>` entirely, and a\n * custom element there was built MathML-namespaced and never upgraded — silent on the server and\n * the client alike. That is also the exact spelling the renderer's own warning recommends.\n */\nexport const RESERVED_ELEMENT_NAMES = new Set([\n 'annotation-xml', 'color-profile', 'font-face', 'font-face-src',\n 'font-face-uri', 'font-face-format', 'font-face-name', 'missing-glyph',\n]);\n\n/**\n * **A custom element, by its name:** a dash, except the eight names SVG and MathML already own (above). One\n * definition for every package that asks — `@verajs/jsx` compiles such a tag's attributes to properties, and\n * `@verajs/renderer/slots` captures such a host's children. (The renderer's own property paths ask a narrower\n * question, the bare dash, on its hot path; a reserved name never carries a property binding.)\n */\nexport const isCustomElementName = (tag: string): boolean =>\n tag.includes('-') && !RESERVED_ELEMENT_NAMES.has(tag.toLowerCase());\n\n/**\n * A URL whose scheme a browser reads as `javascript:` — navigating to one runs it, so a BOUND value\n * that parses this way is code arriving as data, never a link.\n *\n * Matched the way the URL Standard's parser reads a scheme, because that is the only reading that\n * matters: leading C0 controls and spaces are stripped, ASCII tab, LF and CR are removed anywhere, and\n * the scheme is case-insensitive. A check that only lowercases is bypassed by `\" jAvA\\tscript:\"`,\n * which every engine navigates to. React's blocking pattern is the same rule.\n *\n * `@verajs/ssr` keeps a twin (it cannot import this package), held to this one by\n * `tests/url-sinks.test.mjs`, so a server never emits a link the client refuses.\n */\n// eslint-disable-next-line no-control-regex\nexport const SCRIPT_URL = /^[\\u0000- ]*j[\\t\\n\\r]*a[\\t\\n\\r]*v[\\t\\n\\r]*a[\\t\\n\\r]*s[\\t\\n\\r]*c[\\t\\n\\r]*r[\\t\\n\\r]*i[\\t\\n\\r]*p[\\t\\n\\r]*t[\\t\\n\\r]*:/i;\n\n/**\n * **Every bound name whose value is checked for a `javascript:` URL — and how.** One test answers both.\n *\n * Captured, checked from the start: the attributes (and their reflecting properties) whose value a browser\n * NAVIGATES to or loads as a document — links and areas (`href`, SVG's `xlink:href`), forms (`action`,\n * `formaction`), frames (`src`), and `<object data>`. `src` is matched on every element — refusing one on an `<img>`\n * costs nothing, since an image never runs it. Resource-only attributes (`poster`, `srcset`) are fetched, never run,\n * so they are not listed.\n *\n * Not captured, checked ITEM BY ITEM (`SCRIPT_URL_ITEM`): an SVG animation's values — `to`, `from`, `by`, `values`.\n * `<animate attributeName=\"href\" to=\"javascript:…\">` (or `<set>`, or `values`) writes its value onto the link it\n * animates, and clicking the link then RUNS it: measured 2026-09-30 in Chromium, Firefox and WebKit, through `href`\n * and `xlink:href` alike. Refused on EVERY element and whatever `attributeName` says, because `attributeName` can\n * itself be bound or spread, a server spread has no element to ask, and no legitimate value of any attribute by these\n * names starts with `javascript:` (a component's `to`, a router link's, is a URL too). **Only these names are checked\n * item by item**: an unanchored test scans the whole value for `;`, which on a bound `src` holding a data URI costs\n * ~0.45 ms per MB per update in Chromium and Firefox (measured 2026-09-30), where the anchored `SCRIPT_URL` stops at\n * the first character.\n *\n * Case-insensitive, because property spellings (`formAction`) and attribute spellings meet here. `@verajs/ssr` keeps\n * a twin, held to this one by `tests/url-sinks.test.mjs`.\n */\nexport const URL_SINK = /^(?:(href|src|action|formaction|xlink:href|data)|to|from|by|values)$/i;\n\n/**\n * `SCRIPT_URL` at the start of the value OR of any `;`-separated item of it — an animation's `values` list\n * (`\"#a;javascript:…\"`) applies every item in turn. Only for an animation's values (`URL_SINK`'s uncaptured names): a `;` inside an `href` is a path\n * character, and `/p;javascript:x` is a working link, never a script. Written out rather than derived from\n * `SCRIPT_URL`: the repeated text costs less gzipped than the code that would build it.\n */\n// eslint-disable-next-line no-control-regex\nexport const SCRIPT_URL_ITEM = /(?:^|;)[\\u0000- ]*j[\\t\\n\\r]*a[\\t\\n\\r]*v[\\t\\n\\r]*a[\\t\\n\\r]*s[\\t\\n\\r]*c[\\t\\n\\r]*r[\\t\\n\\r]*i[\\t\\n\\r]*p[\\t\\n\\r]*t[\\t\\n\\r]*:/i;\n\n/**\n * **An inline event-handler attribute** — `on` and a letter, any case (`onclick`, `onLoad`, `onbeforeinput`): its\n * value is run as CODE, so a BOUND one is code arriving as data, refused by the template scanner, `spread` and the\n * server alike (a static `onclick=\"save()\"` is the author's own and untouched). Broad on purpose — it also refuses a\n * bound `once=`/`online=` attribute; the precise rule would need the platform's list of handler names. `@verajs/ssr`\n * keeps a twin, held to this one by `tests/inline-handlers.test.mjs`.\n */\nexport const INLINE_HANDLER = /^on./i;\n\n/**\n * **A `<script>` that is a JSON data block, by its `type`** (Brian, 2026-11-17): the only script a value may enter (state\n * handoff, JSON-LD); every other script hole is refused (`script-hole`), since a value there is code — run on a page the\n * server rendered. \"The type ends in `json`\" never names a script that runs — measured on Chromium, Firefox and WebKit,\n * parameters included (`text/javascript; x=json` is inert), as the spec reads a type (a JavaScript MIME essence match on\n * the whole string); `type=\"\"` and a `language` attribute alone do run, and end in no `json`.\n */\nexport const JSON_BLOCK = /json\\s*$/i;\n\n/**\n * Whether a script START TAG, as written, opens a JSON data block: its attributes read IN ORDER (so a `type=` inside\n * another attribute's quoted value is never taken for the type), the first `type` as the parser keeps it, and that value\n * holding no `&` (a character reference is refused rather than decoded — a decoder slightly off would make the server\n * and the client disagree) and ending in `json` (`JSON_BLOCK`). Every side applies it to the start tag that OPENED the\n * script a hole sits in — recorded where the scanner enters raw text, never found by searching back (a `<script…>`\n * inside a script's own text is no start tag). `@verajs/ssr` holds a twin, held equal by a test.\n */\nexport const dataBlock = (openTag: string) => {\n for (const [, name, double, single, bare] of openTag.slice(7).matchAll(/[\\s/]*([^\\s\"'>/=]+)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s>]*)))?/g))\n if (name!.toLowerCase() === 'type') {\n const type = double ?? single ?? bare ?? '';\n return !type.includes('&') && JSON_BLOCK.test(type);\n }\n return false;\n};\n\n/**\n * **A raw-text element's composed text, unable to end its element** — the rule every side writes, byte for byte (the\n * server's `styleHole` and JSON rule, the renderer, hydration's comparison, lite, static): in a style each `</style`\n * (any case) as `<\\/style` (the same CSS), in a JSON data block every `<` as `\\u003c` (the same JSON). A style's or a\n * JSON block's text is serialized VERBATIM (BROWSER-LEDGER), so written as composed, a value became markup once the page\n * was saved from the DOM and parsed again. Applied to the COMPOSED text: a closer can form across a hole. Idempotent —\n * neither form leaves what it replaces.\n */\nexport const closedRawText = (text: string, json: boolean) =>\n json ? text.replace(/</g, '\\\\u003c') : text.replace(/<\\/(style)/gi, '<\\\\/$1');\n\n/**\n * **A value as inert text in ANY position** — every ASCII non-word character as a character reference (`<` `<`,\n * a space ` `, `=` `=`), everything else as it is: the encoding `@verajs/static` writes every value with, and the\n * renderer writes a never-shown element's values with. Read as raw text it holds no `<`; read as markup it decodes to\n * the same characters and cannot end a tag, a quoted or unquoted attribute value, or the element.\n */\nexport const encodeText = (text: string) => text.replace(/[^\\w\\u0080-\\uffff]/g, (c) => `&#${c.charCodeAt(0)};`);\n\n/**\n * **The properties that replace an element's whole content** — a binding to one owns the element's children, so it\n * cannot share the element with content of its own (markup, or a child binding the write would strand: a later commit\n * into it then throws on a missing parent). Development refuses the pair in the template scanner and in `spread` alike.\n */\nexport const CONTENT_PROPERTY = /^(?:textContent|innerHTML|innerText|outerHTML|outerText)$/;\n/**\n * Whether an element has content of its own that a content-replacing write would strand or lose: a child that is not\n * whitespace-only text (formatting whitespace loses nothing), or — `$content`, set in development by the renderer — a\n * child binding that owns the element whole and leaves no node behind until it commits. The element-specific `.text`\n * setters (`<a>`, `<option>`, `<title>`, `<script>`) are deliberately not in the list: a custom element's own `text`\n * prop is common, and would be refused for nothing.\n */\nexport const ownsContent = (element: Element): boolean => {\n if ((element as Element & { $content?: boolean }).$content === true) return true;\n for (let node = element.firstChild; node !== null; node = node.nextSibling)\n /**\n * An EMPTY text node is a child binding's anchor, not formatting: formatting whitespace is never empty. And\n * formatting is HTML's whitespace, `[ \\t\\n\\f\\r]` — not JS's `trim()`, which would let an ` ` be overwritten.\n */\n if (node.nodeType !== 3 || (node as Text).data === '' || /[^ \\t\\n\\f\\r]/.test((node as Text).data)) return true;\n return false;\n};\n/** `side` is the module the user wired — `renderer` for a template, `spread` for a spread. */\nexport const contentClash = (side: string, tag: string, name: string): never => {\n throw new Error(misuse(side, 'content-clash', __DEV__ && SHARED.contentClash(tag, name, side === 'spread' ? `<${tag} \\${spread({ '.${name}': … })}></${tag}>` : `<${tag} .${name}=\\${…}></${tag}>`)));\n};\n\n/**\n * **An expression in TAG-name position** (`<${x}>`, `</${x}>`, `<my-${x}>`) without `@verajs/renderer/tag`: no\n * element can be made from it — the parser reads a tag name before any value exists. Refused by the client in\n * development and by the server in every build, with one message. The tag entry splices a tag VALUE into the\n * statics before the renderer sees it, so only a non-tag ever reaches here.\n */\nexport const TAG_NAME_HOLE = /<\\/?[^\\s>]*$/;\nexport const tagHole = (side: string): never => {\n throw new Error(misuse(side, 'tag-hole', __DEV__ && SHARED.tagHole()));\n};\n","/**\n * **Hydration's diagnostics, keyed by code — DEVELOPMENT ONLY.** Referenced only behind `__DEV__` in `hydration.ts`, so\n * production drops this module whole and prints the shared short line instead (`diagnostic`, shared-utils): the\n * subject, and the link to `verajs.dev/e/<code>`. `scripts/sync-diagnostics.mjs` publishes this table as\n * `packages/renderer/diagnostics.json` — the docs pages — and `tests/diagnostics-tables.test.mjs` holds the codes\n * raised and the entries together.\n */\nimport type { Prose } from '@verajs/shared-utils';\n\nexport const PROSE: Record<string, Prose> = {\n 'hydration-fallback': (template) => [\n `fell back to a client render. This container's server markup was discarded and rebuilt (its template begins ` +\n `${template}; its SSR <style> is kept), so the page is correct but the server's work on it was wasted.`,\n `Its children are taken as server output of this template — if they were a client-side placeholder instead, empty ` +\n `the container first (\\`container.replaceChildren()\\`) or render the placeholder with vera. Otherwise the two ` +\n `renders have to agree exactly: check for markup the template does not describe, or state settled after the ` +\n `server render. Other containers on the page hydrate independently and are unaffected.`,\n ],\n 'hydration-protocol': () => [\n `this @verajs/renderer and this hydration are from different releases. Pages render fresh (correct, without ` +\n `adopting the server's markup).`,\n 'Update both together.',\n ],\n 'hydration-slots': () => [\n 'this page was server-rendered with light-DOM slots, which hydration reads through `hydrateSlots`. The server markup is left as served.',\n 'Wire it: `wire([renderer, hydration, slots, hydrateSlots])`.',\n ],\n 'hydration-no-renderer': () => ['there is no renderer to hydrate.', 'Wire it after the renderer: `wire([renderer, hydration])`.'],\n};\n","/**\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 * **`@verajs/renderer/hydration` — adopt server-rendered DOM.** `wire([renderer, hydration])`.\n *\n * One renderer: this module plugs into it through the hand-off the renderer sets at `connect` (`$H` — a separately\n * bundled module cannot import the renderer's internals, and production mangles their names), and asks to be told of\n * every container's FIRST render that finds children already there. It adopts them as the server's output of the same\n * template: node identity kept, listeners attached, updates mutating the adopted nodes. Server HTML carries no framework\n * comments; the client puts in the anchors it needs.\n *\n * **Queue, then run.** ONE walk matches the container — statics byte for byte, element names, text boundaries, nested\n * templates and lists — doing only what runs no user code as it goes: splitting text and putting in the renderer's\n * comment anchors. Everything that runs user code — a binding's commit (a setter, a listener, an attribute write a\n * component observes), an instance hook, an applier, a `'value'` handler, a node placed into the page — is QUEUED, in\n * walk order, which is client order. Only when the whole container matches does the queue run. So a container that does\n * not match is rendered fresh with NOTHING of the client's run against the server's nodes: no setter, no `create`, no\n * ref, no listener, no applier. Two notes: each text value is converted once, during the walk, as a client render\n * converts it (an object's `toString` is the one user code that runs before the decision); and a user's own\n * MutationObserver on a container that then mismatches sees text splits and comments put in, then the clear. (The one\n * exception is the platform's: a server custom element already defined upgrades on parse and runs its own setup before\n * any hydration starts — `tests/hydration-walk.test.mjs` pins it.)\n *\n * User code that THROWS while the queue runs leaves the container partly committed — exactly as a client render that\n * throws midway does; it is the render's error, not a hydration one.\n *\n * **The renderer's commit never asks \"am I hydrating?\".** Where the server's attribute already says what the client\n * would write, the walk SEEDS the binding's committed value and calls the base commit — which runs every sink check as\n * always (a `javascript:` URL is refused and removed exactly as on a fresh render) and then skips the write on its own\n * `value === committed` fast path. Form state is recorded, never written: the server's default, and anything the user\n * typed before the script arrived, stand.\n *\n * A mismatch — or a renderer speaking another hand-off protocol — never breaks the page: the container renders fresh,\n * and the console says so once per cause.\n */\nimport { CONTENT_PROPERTY, closedRawText, diagnostic } from '@verajs/shared-utils';\n/** Development only — behind `__DEV__` at every use, so production drops the table whole. */\nimport { PROSE } from './hydration-diagnostics.js';\nimport {\n ADOPT,\n ATTR,\n BOOLEAN,\n EVENT,\n IGNORED,\n LIST,\n LIVE,\n NODE,\n PROPERTY,\n RAW_ENCODED,\n RAW_JSON,\n RAW_STYLE,\n REF,\n SELECT,\n SELECT_INDEX,\n SELECT_REF,\n SOLE,\n TEMPLATE,\n TEXT,\n HANDOFF_ADOPTER,\n HANDOFF_CHILD_PART,\n HANDOFF_COMMIT,\n HANDOFF_COMMIT_AS,\n HANDOFF_GET_TEMPLATE,\n HANDOFF_HOOK_UP,\n HANDOFF_INSTANCE,\n HANDOFF_PROTOCOL,\n HANDOFF_REMOVAL_WORK,\n PROTOCOL,\n HANDOFF_RESOLVE,\n HANDOFF_ROOTS,\n HANDOFF_SLOT,\n HANDOFF_TO_TEXT,\n HANDOFF_UNSET,\n HANDOFF_UPGRADED,\n} from './kinds.js';\nimport type { ChildPart, Instance, Item, KeyedResult, Slot, Template } from './renderer.js';\nimport type { HydrateSlots, HydrationCursor, ServedHost, TemplateResult } from './types.js';\n\n/** What the renderer hands over (`renderer.ts`, `connect`), by the `HANDOFF_*` positions in `kinds.ts`. */\ntype Handoff = [\n protocol: number,\n adopter: (adopt: (result: unknown, container: Node) => boolean) => void,\n getTemplate: (result: TemplateResult) => Template,\n ChildPart: new (start: Comment | null, end: Node | null) => ChildPart,\n Instance: new (template: Template, strings: TemplateStringsArray, root: Node, bindings: unknown[]) => Instance,\n Slot: new (element: Element) => Slot,\n unset: object,\n upgraded: object,\n commit: (template: Template, bindings: unknown[], i: number, kind: number, values: unknown[]) => void,\n commitAs: (root: Node | null, part: ChildPart, value: unknown, home?: Node | null) => void,\n hookUp: (instance: Instance, root: Node | readonly Element[], adopted: boolean) => void,\n resolve: (template: Template, parent: Node) => Template,\n roots: { set(node: Node, part: ChildPart): void },\n toText: (value: unknown) => string,\n removalWork: () => void,\n];\n/**\n * **Light-DOM slots' seam** (`@verajs/renderer/slots` installs it, off-chain like `_$done$`): its own `capture`, stamped\n * with this package's seam protocol — a served host's light children, in light order, captured where the server put\n * them, the server's carrier as their holding. Everything about the SERVER's format is read here; slots knows none of it.\n */\ntype Registry = {\n get(name: string): unknown[] | undefined;\n $H?: Handoff;\n $t?: Untracked;\n _$hydrateSlots$?: HydrateSlots;\n _$hydrating$?: boolean;\n /** Slots' seam: present when slots is wired — read here only to know that. */\n _$capture$?: unknown;\n};\ntype Untracked = <A extends unknown[], R>(fn: (...args: A) => R, ...args: A) => R;\ntype Applies = { _$apply$: (element: Element, key: object, run: Untracked, adopting?: boolean) => void };\n/**\n * A `'value'` handler: `true` claims the value (it commits into the emptied part; the server span goes). During hydration\n * a THIRD argument is passed — the part as the base adopted it — and a handler may return `ADOPTED` (2) to keep those\n * nodes, taking ownership of what was adopted. **The third argument is OPTIONAL and absent = build** (2026-10-22): an\n * older handler ignores it and claims as before; a newer handler under an older base, which passes two, builds.\n */\ntype ValueHandler = (part: object, value: unknown, adopted?: object) => boolean | number | void;\n/** What a handler returns to keep the adopted nodes instead of claiming (`claimed`). */\nconst ADOPTED = 2;\n\nlet H: Handoff;\nlet registry: Registry;\n/** The piece, read per adoption (it may be wired after this module); the served host being adopted, else `null`. */\nlet piece: HydrateSlots | undefined;\nlet served: ServedHost | null = null;\n/**\n * Walking a FILLED slot's element: a detached copy of the canonical one, as the client keeps it — the server never wrote\n * it, so its fallback's values are committed fresh into the copy rather than claimed (see `fresh*`).\n */\nlet fresh = false;\nlet untracked: Untracked;\n\n/* ── the warning: the only signal a fallback gives, once per cause ───────────────────────────────── */\n\n/**\n * Said once per KIND of cause per hydration pass, in every build — keyed by the kind (`text`, `element`…), not the\n * detail: a page of 500 containers that each differ in their text says it once, naming the first. The record clears at\n * the next microtask, so a later pass that meets the kind again says it. Not `warnOnce` (Brian's ruling, 2026-11-12): that memory\n * is once per page and never forgets, and this one is once per PASS.\n */\nconst causesThisPass = new Set<string>();\nconst warn = (cause: string, message: string, container?: Node) => {\n if (causesThisPass.has(cause)) return;\n if (causesThisPass.size === 0) queueMicrotask(() => causesThisPass.clear());\n causesThisPass.add(cause);\n /** The container itself rides along: a live element in devtools — hover to highlight it, click to reveal it. */\n if (container === undefined) console.warn(message);\n else console.warn('%s', message, container);\n};\n\n/* ── the walk's state, per hydration ─────────────────────────────────────────────────────────────── */\n\n/**\n * **The work that runs user code, held until the whole container matches** — flat tuples of six, in walk order (client\n * order): `[op, a, b, c, d, e]`. ONE array for every adoption, reused — allocating one per adoption cost a measured\n * share of hydration in collection alone. Each adoption owns the range from where the queue stood when it began, and\n * truncates back to that when it ends: a nested adoption (a queued setter rendering into its own element) pushes past\n * the outer's range and is gone again before the outer goes on.\n */\nconst queue: unknown[] = [];\nconst COMMIT = 0;\nconst APPLY = 1;\nconst HOOK = 2;\nconst CHILD = 3;\nconst HANDLE = 4;\nconst INSERT = 5;\nconst later = (op: number, a: unknown, b?: unknown, c?: unknown, d?: unknown, e?: unknown) => {\n queue.push(op, a, b, c, d, e);\n};\n/** The first place the two renders disagreed — for the warning. */\nlet why = '';\n\n/** Why adoption stops: thrown, caught at the container, never escapes. */\nconst MISMATCH = {};\n/** The KIND of the first disagreement — what the warning is said once per: `text`, `value`, `element`, `extra`. */\nlet kind = '';\nconst mismatch = (cause: string, at: Node | null, reason: false | (() => string)): never => {\n kind = cause;\n why = reason ? reason() : `${cause}: found ${describe(at)}`;\n throw MISMATCH;\n};\n\n/** A live node as a person would name it. */\nconst describe = (node: Node | null) =>\n node === null\n ? 'nothing'\n : node.nodeType === 1\n ? `<${(node as Element).localName}>`\n : node.nodeType === 3\n ? `the text ${JSON.stringify((node as Text).data.slice(0, 30))}`\n : node.nodeType === 8\n ? 'a comment'\n : `a ${node.nodeName} node`;\n\n/** A value's text — the base's own conversion, once, as a client render converts it. */\nconst textOf = (value: unknown) => H[HANDOFF_TO_TEXT](value);\n\nconst isTemplateResult = (value: object): value is TemplateResult => (value as TemplateResult).strings !== undefined;\n\n/** A template's opening markup, as its author wrote it — something to search the code for (development only). */\nconst opening = (result: TemplateResult) => {\n const text = result.strings.join('${…}').replace(/\\s+/g, ' ').trim();\n return `\\`${text.length > 60 ? `${text.slice(0, 60)}…` : text}\\``;\n};\n\n/* ── where the walk stands ───────────────────────────────────────────────────────────────────────── */\n\n/**\n * **Which bindings each canonical node carries**, built once per template the first time one is adopted: every\n * binding's node located through its path on the pristine canonical content, as `instantiate` locates it on a clone.\n */\nconst plans = new WeakMap<Template, Map<Node, number[]>>();\nconst planOf = (template: Template) => {\n let plan = plans.get(template);\n if (plan === undefined) {\n plans.set(template, (plan = new Map()));\n const kinds = template.$K;\n for (let i = 0; i < kinds.length; i++) {\n if (kinds[i] === IGNORED) continue;\n let node = template.$R;\n for (const step of template.$P[i]) {\n node = node.firstChild!;\n for (let hops = step; hops > 0; hops--) node = node.nextSibling!;\n }\n const owned = plan.get(node);\n if (owned === undefined) plan.set(node, [i]);\n else owned.push(i);\n }\n }\n return plan;\n};\n\n/** Where the walk stands (`types.ts`: `hydrate-slots` moves it too). */\ntype Cursor = HydrationCursor;\n\n/** A comment carries no content: adoption neither matches nor requires one, at a node boundary. */\n/**\n * **The node after `node` on this walk** — its next sibling, until `hydrate-slots` is wired: then the piece's own step,\n * which on a light host's walk gives the next light child. Only then can a light cursor exist, so a page without the\n * piece walks exactly as before it (a light check on every step cost Chrome's hydrate phase ~2%, measured 2026-10-07,\n * on pages with no light hosts at all) and carries none of its code.\n */\nlet next = (_cursor: Cursor, node: Node): Node | null => node.nextSibling;\n\nconst passComments = (cursor: Cursor) => {\n while (cursor.offset === 0 && cursor.node !== null && cursor.node.nodeType === 8) cursor.node = next(cursor, cursor.node);\n};\n\n/** Puts the cursor on a node boundary (splitting the text it stands in) and returns the node there. */\nconst boundary = (cursor: Cursor) => {\n if (cursor.offset > 0) {\n cursor.node = (cursor.node as Text).splitText(cursor.offset);\n cursor.offset = 0;\n }\n return cursor.node;\n};\n\n/** Inserts at the cursor — the walk inserts only text and the renderer's comment anchors, which run no user code. */\nconst plainInsert = (cursor: Cursor, node: Node) => cursor.parent.insertBefore(node, boundary(cursor));\n/** Like `next`: the plain insert until `hydrate-slots` is wired, then light-aware — a run's anchors go to the piece. */\nlet insertHere: (cursor: Cursor, node: Node) => unknown = plainInsert;\nconst lightInsert = (cursor: Cursor, node: Node) => (cursor.light === undefined ? plainInsert(cursor, node) : piece);\n\n/** Consumes exactly `text`, a static; anything else is a mismatch. Reads only. */\nconst expectText = (cursor: Cursor, text: string) => {\n while (text !== '') {\n passComments(cursor);\n const node = cursor.node;\n if (node === null || node.nodeType !== 3) return mismatch('text', node, __DEV__ && (() => `expected the text ${JSON.stringify(text)} and found ${describe(node)}`));\n const data = (node as Text).data;\n const take = Math.min(data.length - cursor.offset, text.length);\n if (data.slice(cursor.offset, cursor.offset + take) !== text.slice(0, take))\n return mismatch('text', node, __DEV__ && (() => `expected the text ${JSON.stringify(text)} and found ${JSON.stringify(data.slice(cursor.offset, cursor.offset + 30))}`));\n text = text.slice(take);\n cursor.offset += take;\n if (cursor.offset === data.length) {\n cursor.node = next(cursor, node);\n cursor.offset = 0;\n }\n }\n};\n\n/**\n * Claims a text node holding exactly `text`, a value — split out of the run it arrived in. `''` has no server\n * counterpart: a fresh empty text node is put in as its anchor.\n */\nconst claimText = (cursor: Cursor, text: string): Text => {\n if (text === '') {\n const anchor = cursor.parent.ownerDocument!.createTextNode('');\n insertHere(cursor, anchor);\n return anchor;\n }\n passComments(cursor);\n /** Split first: a text split runs no user code, so the walk may make it before the container is decided. */\n const node = boundary(cursor);\n if (node === null || node.nodeType !== 3)\n return mismatch('value', node, __DEV__ && (() => `expected a text node holding an interpolated value and found ${describe(node)}`));\n const data = (node as Text).data;\n if (!data.startsWith(text))\n return mismatch(\n 'value',\n node,\n __DEV__ && (() =>\n `an interpolated value reads ${JSON.stringify(text)} here and the markup says ${JSON.stringify(data.slice(0, text.length))} ` +\n `— a value that stringifies differently on the server (a Date? locale formatting?) disagrees here`\n ));\n /** The rest of a split run is the same light child's, so it stands next; otherwise the walk moves on. */\n cursor.node = data.length > text.length ? (node as Text).splitText(text.length) : next(cursor, node);\n return node as Text;\n};\n\n/** Claims the element named `name` at the cursor. Reads only. */\nconst claimElement = (cursor: Cursor, name: string): Element => {\n passComments(cursor);\n const node = cursor.offset > 0 ? null : cursor.node;\n if (node === null || node.nodeType !== 1 || (node as Element).localName !== name)\n return mismatch('element', cursor.offset > 0 ? cursor.node : node, __DEV__ && (() => `expected <${name}> and found ${cursor.offset > 0 ? describe(cursor.node) : describe(node)}`));\n cursor.node = next(cursor, node);\n return node as Element;\n};\n\n/** The walk has consumed everything the template describes here: whatever is left is a mismatch. */\nconst finish = (cursor: Cursor, top = false) => {\n passComments(cursor);\n if (cursor.offset > 0 || (cursor.node !== null && (cursor.light === undefined || cursor.at! < cursor.end!)))\n mismatch('extra', cursor.node, __DEV__ && (() =>\n !top && cursor.parent.nodeType === 1\n ? `<${(cursor.parent as Element).localName}> contains ${describe(cursor.node)}, which the template does not describe`\n : `${describe(cursor.node)} follows everything the template describes`\n ));\n};\n\n/* ── the walk ────────────────────────────────────────────────────────────────────────────────────── */\n\n/** One instance being adopted. */\n/**\n * One instance being adopted. `found`: for a template with an instance hook, its live elements in TEMPLATE pre-order —\n * the walk pairs each canonical element with its live one, the only place that knows both orders.\n */\ntype Adoption = { template: Template; bindings: unknown[]; values: unknown[]; plan: Map<Node, number[]>; found: Element[] | null };\n\n/** A filled slot's detached copy, from the piece — or `null`, and the element is claimed live. */\nconst copyAt = (canonical: Element, cursor: Cursor) => (served === null || fresh ? null : piece);\n\n/** A filled slot's copy, adopted: everything inside it is committed fresh, as the client renders a slot it keeps. */\nconst adoptCopy = (canonical: Element, copy: Element, into: Adoption, owned: number[] | undefined) => {\n fresh = true;\n try {\n adoptElement(canonical, copy, into, owned);\n } finally {\n fresh = false;\n }\n};\n\n/**\n * **A binding the server never wrote** (inside a filled slot's detached copy): set up exactly as a client render's clone\n * sets it — its node, and `''` for a child position (the empty text the template parsed it as) or UNSET — and queued, so\n * the renderer's own first commit does the rest, text or template alike.\n */\nconst freshCommit = (into: Adoption, i: number, node: Node) => {\n into.bindings[i * 2] = node;\n into.bindings[i * 2 + 1] = into.template.$K[i] === SOLE ? H[HANDOFF_UNSET] : '';\n later(COMMIT, into.template, into.bindings, i, into.template.$K[i], into.values);\n};\n\n/** Adopts the canonical siblings from `canonical` on, against the live cursor. */\nconst walk = (canonical: Node | null, cursor: Cursor, into: Adoption) => {\n for (let node = canonical; node !== null; node = node.nextSibling) {\n const type = node.nodeType;\n if (type === 8) continue;\n const owned = into.plan.get(node);\n if (type === 3) {\n if (owned !== undefined) adoptChild(into, owned[0], cursor);\n else expectText(cursor, (node as Text).data);\n } else {\n const copy = copyAt(node as Element, cursor);\n if (copy === null) adoptElement(node as Element, claimElement(cursor, (node as Element).localName), into, owned);\n else adoptCopy(node as Element, copy, into, owned);\n }\n }\n};\n\n/**\n * A control's state the user may have changed before the script arrived: recorded, never written — through `.name` or\n * `!name` alike. Only this: any other `!name` on a plain element is the client's to write (`!indeterminate` has no\n * markup at all), and on a COMPONENT `!name` is never recorded — it is delivered (the commit's `adoptProperty`). No\n * first-party component holds such state before its script runs (`vera-select`'s value lives in its internals and its\n * template has no native control); a choice made between a child's hydration and its parent's commit is overruled by\n * the parent's `!name`, which is what `!` means on every client render.\n */\nconst FORM_STATE = /^(?:value|checked|selected|open)$/;\n/** A value whose conversion to text runs no user code. */\nconst primitive = (value: unknown) => value === null || (typeof value !== 'object' && typeof value !== 'function');\n\n/**\n * **One element binding, adopted** — seeded now (DOM reads only), its commit QUEUED. The seedable kinds are ATTR and BOOLEAN — ONLY those: their server DOM can\n * be compared to the client value without running user code, and seeding anything else (an EVENT's handler, a\n * setter) would skip work the client must do. Seeded with the CLIENT value, and only on exact equality.\n */\nconst commitBinding = (into: Adoption, i: number, kind: number, live: Element) => {\n const { template, bindings, values } = into;\n const slot = i * 2;\n const name = template.$N[i];\n bindings[slot] = kind >= EVENT && kind <= ADOPT ? new H[HANDOFF_SLOT](live) : live;\n bindings[slot + 1] = H[HANDOFF_UNSET];\n const raw = values[i];\n /** Recorded, never written: a selection, a `!name`, a form control's value. */\n if (kind === SELECT || kind === SELECT_INDEX || ((kind === LIVE || kind === PROPERTY) && FORM_STATE.test(name))) {\n bindings[slot + 1] = raw;\n return;\n }\n /** An element-position value applying itself is told it is adopting — a form control the user typed in stands. */\n if ((kind === REF || kind === SELECT_REF) && raw != null && typeof (raw as Applies)._$apply$ === 'function') {\n bindings[slot + 1] = raw;\n later(APPLY, raw, live, bindings[slot]);\n return;\n }\n if (kind === ATTR || kind >= RAW_STYLE) {\n const parts = template.$J[i];\n let text: string | null;\n if (parts === null) text = primitive(raw) ? (raw == null ? null : H[HANDOFF_TO_TEXT](raw)) : undefined!;\n else {\n text = parts[0];\n for (let p = 1; p < parts.length; p++) {\n const v = values[i + p - 1];\n if (!primitive(v)) {\n text = undefined!;\n break;\n }\n text += H[HANDOFF_TO_TEXT](v) + parts[p];\n }\n }\n /**\n * A style's or JSON block's whole text (a lone value, or statics and values composed): ADOPTED when the served text is the\n * composed text as the client writes it (`closedRawText`, the server's bytes) — seeded with the composed text, as the\n * base's commit stores it — and otherwise left to the base's commit, which rewrites it.\n */\n if (kind !== ATTR) {\n if (text !== undefined && kind !== RAW_ENCODED && live.textContent === /*@__NOINLINE__*/ closedRawText(text ?? '', kind === RAW_JSON)) {\n /** As the base's commit stores it: a lone value itself, a composed text otherwise. */\n bindings[slot + 1] = parts === null ? raw : text;\n return;\n }\n } else if (text !== undefined) {\n const server = live.getAttribute(name);\n /**\n * Equal — both texts, or both absent: the client value itself is seeded, exactly what the base's commit would\n * have stored. A binding naming no URL then has NOTHING to commit (its commit would return at `value ===\n * committed`), so nothing is queued; a URL-bearing one always commits, so a `javascript:` value the server wrote\n * is refused through the base, as on a fresh render.\n */\n if (server === text) {\n bindings[slot + 1] = parts === null ? raw : text;\n if (template.$L[i] === 0) return;\n } else if (text === null) bindings[slot + 1] = server;\n /** ↑ The client writes nothing and the server wrote something: a non-UNSET seed so the base REMOVES it. */\n }\n } else if (kind === BOOLEAN && live.hasAttribute(name) === !!raw) {\n bindings[slot + 1] = raw;\n if (template.$L[i] === 0) return;\n }\n later(COMMIT, template, bindings, i, kind, values);\n};\n\n/**\n * An element's own bindings commit when the walk reaches it — before its content, in document pre-order, as a client\n * render commits them (queued) — then its content is adopted: as one SOLE value, or as canonical children.\n */\nconst adoptElement = (canonical: Element, live: Element, into: Adoption, owned: number[] | undefined) => {\n if (into.found !== null) into.found.push(live);\n let sole = -1;\n /** A content property (`.innerHTML`, `.textContent`…) writes this element's children itself — see below. */\n let content = false;\n if (owned !== undefined)\n for (const i of owned) {\n const kind = into.template.$K[i];\n if (kind === SOLE) sole = i;\n else {\n /** …and a style's or JSON block's text binding writes its element's text: no children to walk. */\n if (((kind === PROPERTY || kind === LIVE) && CONTENT_PROPERTY.test(into.template.$N[i])) || kind >= RAW_STYLE) content = true;\n commitBinding(into, i, kind, live);\n }\n }\n /**\n * A light host the template places content into: walked in light order (`hydrate-slots`), not as its DOM stands —\n * unless a binding writes a RUN directly among those children (a value that is not text): its anchors would have to\n * span the host's slots, so that host falls back as before until runs are adopted in the client's own shape.\n */\n const inner: Cursor = piece?.[5](live, canonical, into.plan, into.values) ?? { parent: live, node: live.firstChild, offset: 0 };\n if (sole >= 0) adoptSole(into, sole, live, inner);\n /**\n * Content the template does not describe that is not the template's to describe: a `<textarea>`'s server content is\n * its default value, a custom element's children — when the template writes none — are that component's OWN render,\n * which it adopts itself, and a content property's element holds what that binding writes.\n */ else if (\n canonical.firstChild === null &&\n (content || live.localName === 'textarea' || live.localName.includes('-') || live.hasAttribute('is'))\n )\n return;\n else walk(canonical.firstChild, inner, into);\n finish(inner);\n};\n\n/** A value is TEXT at a child position when the base would write it as text. */\nconst isText = (value: unknown) => value != null && typeof value !== 'object';\n\n\n/** A CHILD binding: text split to the value, or a part between two markers put in around what it adopts. */\nconst adoptChild = (into: Adoption, i: number, cursor: Cursor) => {\n if (fresh) {\n const placeholder = cursor.node!;\n cursor.node = placeholder.nextSibling;\n return freshCommit(into, i, placeholder);\n }\n const value = into.values[i];\n if (isText(value)) {\n into.bindings[i * 2] = claimText(cursor, textOf(value));\n into.bindings[i * 2 + 1] = value;\n return;\n }\n const part = new H[HANDOFF_CHILD_PART](cursor.parent.ownerDocument!.createComment(''), cursor.parent.ownerDocument!.createComment(''));\n insertHere(cursor, part.$s!);\n adoptValue(part, value, cursor);\n if (part.$e!.parentNode === null) insertHere(cursor, part.$e!);\n into.bindings[i * 2] = part;\n into.bindings[i * 2 + 1] = H[HANDOFF_UPGRADED];\n};\n\n/** A SOLE binding: its element's one text node, or a part that owns the element (no markers). */\nconst adoptSole = (into: Adoption, i: number, live: Element, inner: Cursor) => {\n const value = into.values[i];\n if (fresh) return freshCommit(into, i, live);\n if (isText(value)) {\n into.bindings[i * 2] = claimText(inner, textOf(value));\n into.bindings[i * 2 + 1] = value;\n return;\n }\n const part = new H[HANDOFF_CHILD_PART](null, null);\n part.$w = live;\n adoptValue(part, value, inner);\n into.bindings[i * 2] = part;\n into.bindings[i * 2 + 1] = H[HANDOFF_UPGRADED];\n};\n\n/** Adopts a template's instance at the cursor. */\nconst adoptInstance = (result: TemplateResult, cursor: Cursor): Instance => {\n let template = H[HANDOFF_GET_TEMPLATE](result);\n /** Adoption is in place: an extension resolving the template (namespaces) is asked with the LIVE parent. */\n if (template.$X) template = H[HANDOFF_RESOLVE](template, cursor.parent);\n const into: Adoption = {\n template,\n bindings: new Array(template.$K.length * 2 + (template.$X ? 1 : 0)),\n values: result.values,\n plan: planOf(template),\n found: template._$inst$ === undefined ? null : [],\n };\n const root = template.$R;\n const single = root.nodeType === 1;\n /** A single root is claimed here, not by the walk — so a `<slot>` at a template's root is asked here too. */\n const copy = single ? copyAt(root as Element, cursor) : null;\n const adopted = copy ?? (single ? claimElement(cursor, (root as Element).localName) : cursor.parent.ownerDocument!.createDocumentFragment());\n const instance = new H[HANDOFF_INSTANCE](template, result.strings, adopted, into.bindings);\n /**\n * **Its instance hook meets it before its bindings commit**, as a client instance does — told it was adopted, and\n * handed its elements in template order rather than a root to count from: an adopted root already holds what its\n * nested parts rendered, so counting would land on the wrong element (or, for a fragment, on none). Queued first;\n * the list is complete by the time the queue runs.\n */\n if (into.found !== null) later(HOOK, instance, into.found);\n if (copy !== null) adoptCopy(root as Element, copy, into, into.plan.get(root));\n else if (single) adoptElement(root as Element, adopted as Element, into, into.plan.get(root));\n else walk(root.firstChild, cursor, into);\n return instance;\n};\n\n\n/**\n * Adopts `value` into `part` — the same decisions, in the same order, as the server's serializer made them (templates,\n * lists, appliers, nodes, and every other object as its text), so a position adopts as exactly what was written.\n */\nconst adoptValue = (part: ChildPart, value: unknown, cursor: Cursor): void => {\n if (value == null) return;\n if (typeof value !== 'object') {\n part.$l = claimText(cursor, textOf(value));\n part.$v = value;\n part.$o = TEXT;\n return;\n }\n const held = (value as { $h?: TemplateResult }).$h;\n if (held !== undefined || isTemplateResult(value)) {\n part.$n = adoptInstance(held ?? (value as TemplateResult), cursor);\n part.$o = TEMPLATE;\n return;\n }\n /**\n * **A `'value'` handler is asked when the queue runs, with base precedence** (templates first, then the handlers).\n * The server never asks handlers — it wrote the value as the renderer's own types, or as its text — so the walk adopts\n * it as written; a handler that then claims it commits over the part, which clears what was adopted, and everything\n * queued for that content is skipped (`end`). Nothing claims: it stays adopted.\n */\n const handlers = registry.get('value') as ValueHandler[] | undefined;\n const at = handlers === undefined ? -1 : queue.length;\n if (handlers !== undefined) later(HANDLE, part, value, handlers, 0);\n adoptObject(part, value, cursor);\n if (at >= 0) queue[at + 4] = queue.length;\n};\n\n/** An object value that is not a template: a list, an applier, a node, or its text. */\nconst adoptObject = (part: ChildPart, value: object, cursor: Cursor) => {\n /** What a LIST is, as the renderer's `$p` decides it: `tests/renderer-list-twins.test.mjs` keeps the two equal. */\n if (Array.isArray(value) || (typeof (value as Iterable<unknown>)[Symbol.iterator] === 'function' && (value as Node).nodeType === undefined)) {\n /** Read once: a generator iterates once. */\n const list = Array.isArray(value) ? value : [...(value as Iterable<unknown>)];\n const items: Item[] = [];\n for (let i = 0; i < list.length; i++) items.push(adoptItem(list[i], cursor));\n part.$i = items;\n part.$o = LIST;\n return;\n }\n const applyChild = (value as { _$child$?: (part: ChildPart, previous: unknown, adopting: boolean) => unknown })._$child$;\n if (applyChild !== undefined) {\n /** What the server wrote for an applier cannot be delimited except as a SOLE element's whole content. */\n if (part.$w != null && cursor.node !== null) {\n part.$o = NODE;\n cursor.node = null;\n cursor.offset = 0;\n }\n if (part.$e !== null && part.$e.parentNode === null) insertHere(cursor, part.$e);\n part.$a = applyChild;\n part.$R = cursor.parent;\n later(CHILD, applyChild, value, part);\n return;\n }\n /**\n * A node the server could not have rendered: it goes where it belongs — QUEUED, since placing an element runs its\n * connected callback. A comment holds its place until then: inserted later at a captured `null`, it would land after\n * the anchors the walk appends meanwhile.\n */\n if ((value as Node).nodeType !== undefined) {\n const place = cursor.parent.ownerDocument!.createComment('');\n insertHere(cursor, place);\n later(INSERT, cursor.parent, value, place);\n part.$v = value;\n part.$o = NODE;\n return;\n }\n /** Every other object, as the server wrote it: its text, converted once. */\n part.$l = claimText(cursor, textOf(value));\n part.$v = value;\n part.$o = TEXT;\n};\n\n/** The root the template at this position will build — after an extension resolves it, as the base asks. */\nconst rootOf = (result: TemplateResult, cursor: Cursor) => {\n const template = H[HANDOFF_GET_TEMPLATE](result);\n return (template.$X ? H[HANDOFF_RESOLVE](template, cursor.parent) : template).$R;\n};\n\n/** Adopts one list item — the same shapes the base builds. */\nconst adoptItem = (value: unknown, cursor: Cursor): Item => {\n if (value !== null && typeof value === 'object' && isTemplateResult(value) && rootOf(value, cursor).nodeType === 1) {\n const instance = adoptInstance(value, cursor);\n instance.$k = (value as KeyedResult).key;\n return instance;\n }\n const part = new H[HANDOFF_CHILD_PART](cursor.parent.ownerDocument!.createComment(''), cursor.parent.ownerDocument!.createComment(''));\n insertHere(cursor, part.$s!);\n adoptValue(part, value, cursor);\n if (part.$e!.parentNode === null) insertHere(cursor, part.$e!);\n part.$k = (value as TemplateResult | null)?.key;\n return part;\n};\n\n/**\n * **A handler is asked with the part as a client render would hand it over — empty** — and the server's span stays\n * where it is meanwhile: a claim commits into the empty part and the span is removed after; no claim puts the adopted\n * state back. Copied whole (`{ ...part }`), so no field of the renderer's needs naming here — and so a handler that\n * declines must not write to the part (a field it ADDED would stay).\n */\nconst claimed = (part: ChildPart, value: unknown, handlers: ValueHandler[]) => {\n const was = { ...part };\n const span: Node[] = [];\n for (let node = part.$s === null ? part.$w!.firstChild : part.$s.nextSibling; node !== null && node !== part.$e; node = node.nextSibling)\n span.push(node);\n Object.assign(part, new H[HANDOFF_CHILD_PART](part.$s, part.$e), { $w: was.$w, $k: was.$k });\n for (let i = 0; i < handlers.length; i++) {\n const claim = handlers[i](part, value, was);\n /** Kept: the handler took ownership of what the base adopted — the adopted state comes back, its queue still runs. */\n if (claim === ADOPTED) break;\n if (claim) {\n for (const node of span) node.parentNode?.removeChild(node);\n return true;\n }\n }\n Object.assign(part, was);\n return false;\n};\n\n/**\n * **The queue runs** — once the whole container matched, inside the renderer's render bracket, in walk order. A handler\n * that claims its value skips everything queued for the content it replaced.\n */\nconst run = (from: number, to: number) => {\n const q = queue;\n for (let k = from; k < to; k += 6) {\n const op = q[k];\n if (op === COMMIT) H[HANDOFF_COMMIT](q[k + 1] as Template, q[k + 2] as unknown[], q[k + 3] as number, q[k + 4] as number, q[k + 5] as unknown[]);\n else if (op === APPLY) {\n H[HANDOFF_REMOVAL_WORK]();\n (q[k + 1] as Applies)._$apply$(q[k + 2] as Element, q[k + 3] as Slot, untracked, true);\n } else if (op === HOOK) H[HANDOFF_HOOK_UP](q[k + 1] as Instance, q[k + 2] as Element[], true);\n else if (op === CHILD) {\n const applyChild = q[k + 1] as (part: ChildPart, previous: unknown, adopting: boolean) => unknown;\n const part = q[k + 3] as ChildPart;\n if ((applyChild as { _$detach$?: unknown })._$detach$ !== undefined) H[HANDOFF_REMOVAL_WORK]();\n part.$z = applyChild.call(q[k + 2], part, undefined, true);\n } else if (op === HANDLE) {\n if (claimed(q[k + 1] as ChildPart, q[k + 2], q[k + 3] as ValueHandler[])) k = (q[k + 4] as number) - 6;\n } else {\n (q[k + 1] as Node).insertBefore(q[k + 2] as Node, q[k + 3] as Node);\n (q[k + 3] as ChildNode).remove();\n }\n }\n};\n\n/** A served light host — the piece reads the rest. */\nconst LIGHT_ATTR = 'data-vm-light';\n\n/* ── the container ───────────────────────────────────────────────────────────────────────────────── */\n\n/** A container's own SSR stylesheets lead its content and are not part of any template. */\nconst isSheet = (node: Node | null) => node !== null && node.nodeType === 1 && (node as Element).hasAttribute('data-vm-sheet');\n\n/** Clears a container after a mismatch — every child but its SSR stylesheets. */\nconst clearPreservingStyles = (container: Node) => {\n for (let node = container.firstChild; node !== null; ) {\n const next: ChildNode | null = node.nextSibling;\n if (!isSheet(node)) container.removeChild(node);\n node = next;\n }\n};\n\n/**\n * **A container's first render, with children already there** — the renderer asks (the hook set at `HANDOFF_ADOPTER`). Adopts them and answers\n * true, or answers false having cleared them, and the renderer renders fresh.\n */\nconst adopt = (result: unknown, container: Node): boolean => {\n if (result === null || typeof result !== 'object' || !isTemplateResult(result as object)) return false;\n /**\n * **One walk's state per adoption.** The queue runs user code — a setter that renders into its own element, a component\n * set up synchronously — and that can adopt ANOTHER container in the middle of this one: its walk gets its own state,\n * and this one's is restored when it returns. Shared, a nested walk reset this one's state underneath it.\n */\n const from = queue.length;\n const saved = [why, kind, served] as const;\n piece = registry._$hydrateSlots$;\n if (piece !== undefined) {\n next = piece[6];\n insertHere = lightInsert;\n }\n try {\n return adoptContainer(result as TemplateResult, container, from);\n } finally {\n /** Run or dropped, this adoption's range goes — a throw included. */\n queue.length = from;\n [why, kind, served] = saved;\n }\n};\n\nconst adoptContainer = (result: TemplateResult, container: Node, from: number): boolean => {\n const doc = container.ownerDocument ?? (container as Document);\n served = null;\n /** The root range is bounded before the walk: an insert at the root during it (a client-only node) needs the end. */\n let start: Comment | null = null;\n let end: Comment | null = null;\n let part: ChildPart;\n const host = container.nodeType === 1 ? (container as Element) : null;\n const spec = host === null ? null : host.getAttribute(LIGHT_ATTR);\n /**\n * **A light component the server did not render is rendered, not hydrated** — and keeps its children. With slots\n * wired, the server states the light tree on EVERY component host it renders, so a custom element without that\n * statement is client-made (by a template, or `createElement`): its children are light content, not server output, so\n * the walk declines without clearing them, and slots distributes them. (So slots must be wired on both sides: a host a\n * server rendered without it carries no statement, and is rendered on the client.)\n */\n if (spec === null && registry._$capture$ !== undefined && host?.localName.includes('-')) return false;\n try {\n /** A statement with runs needs the piece; one with none (`N:`) states no light content — its slots walk as elements. */\n if (spec?.endsWith(':') && piece === undefined) host!.removeAttribute(LIGHT_ATTR);\n else if (spec !== null) {\n /** No piece to read it: thrown before anything is touched, so the server's markup stands exactly as served. */\n if (piece === undefined) throw new Error(diagnostic('hydration', 'no hydrateSlots', 'hydration-slots', __DEV__ && PROSE['hydration-slots']()));\n if (piece[0] !== PROTOCOL) mismatch('protocol', container, () => `hydrateSlots protocol ${piece![0]}, expected ${PROTOCOL}`);\n served = piece[1](container as Element, mismatch);\n }\n let first: Node | null = container.firstChild;\n while (isSheet(first) || (first !== null && first === served?.carrier)) first = first!.nextSibling;\n /**\n * **Stylesheets alone are not server output** — a client-made shadow root holds one before its first render whenever\n * `styles` writes a `<style>` (string styles, or no `adoptedStyleSheets`). Nothing to adopt: rendered fresh after\n * them, without a fallback warning that would blame the server for a page it never rendered.\n */\n if (first === null && served === null) return false;\n start = doc.createComment('');\n container.insertBefore(start, first);\n end = container.appendChild(doc.createComment(''));\n part = new H[HANDOFF_CHILD_PART](start, end);\n const cursor: Cursor = { parent: container, node: first, offset: 0 };\n adoptValue(part, result, cursor);\n finish(cursor, true);\n piece?.[3](served);\n } catch (error) {\n start?.remove();\n end?.remove();\n if (error !== MISMATCH) throw error;\n /** A served host keeps its light content: captured into holding before the clear, distributed by the fresh render. */\n piece?.[4](served);\n /** Every build names the kind and the first node that disagreed; development adds the whole story, production the link. */\n warn(kind, diagnostic('hydration', why, 'hydration-fallback', __DEV__ && PROSE['hydration-fallback'](opening(result))), container);\n /** The queue is dropped unrun; the clear takes the walk's text splits and comments with the server's nodes. */\n clearPreservingStyles(container);\n return false;\n }\n /** Matched: the queue runs, inside the renderer's own render bracket (a stand-in part) — refs at its end, as always. */\n const to = queue.length;\n H[HANDOFF_COMMIT_AS](container, { $p: () => run(from, to) } as unknown as ChildPart, undefined, container);\n H[HANDOFF_ROOTS].set(container, part);\n return true;\n};\n\n/** `wire([renderer, hydration])` — after the renderer, whose `connect` sets the hand-off. */\nexport const hydration = (given: Registry) => {\n const handoff = given.$H;\n if (handoff === undefined) {\n console.warn(diagnostic('hydration', 'no renderer', 'hydration-no-renderer', __DEV__ && PROSE['hydration-no-renderer']()));\n return;\n }\n /**\n * **Another release's renderer: the page still works, rendered fresh** (Brian, 2026-10-02). The protocol and adopter\n * positions are the hand-off's FROZEN pair — the same in every protocol — so even a mismatched renderer can be asked to clear a\n * container's server markup before its first render; nothing else of the hand-off is read. Without that, the base\n * renderer keeps what a container holds and the server's markup would stand beside the client's.\n */\n if (handoff[HANDOFF_PROTOCOL] !== PROTOCOL) {\n const subject = `protocol ${handoff[HANDOFF_PROTOCOL]}, expected ${PROTOCOL}`;\n warn('protocol', diagnostic('hydration', subject, 'hydration-protocol', __DEV__ && PROSE['hydration-protocol']()));\n handoff[HANDOFF_ADOPTER]((_result, container) => {\n clearPreservingStyles(container);\n return false;\n });\n return;\n }\n H = handoff;\n registry = given;\n /** Slots, wired after or before this module, defers a served host's capture to the adoption (`_$capture$`). */\n given._$hydrating$ = true;\n untracked = given.$t ?? (((fn: (...args: unknown[]) => unknown, ...args: unknown[]) => fn(...args)) as Untracked);\n handoff[HANDOFF_ADOPTER](adopt);\n};\n"],"names":[],"mappings":"AAAA;;;;;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;;AC0E3D;;;;;;;AAOG;AACI,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,IAAa,KACvD,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,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AAK,QAAQ,EAAE;QAC1C,MAAM,OAAO,GAAG,CAAA,SAAA,EAAY,OAAO,CAAC,gBAAgB,CAAC,CAAA,WAAA,EAAc,QAAQ,CAAA,CAAE;QAC7E,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,WAAW,EAAE,OAAO,EAAE,oBAAoB,EAAE,OAAO,IAAI,KAAK,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;QAClH,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,KAAI;YAC9C,qBAAqB,CAAC,SAAS,CAAC;AAChC,YAAA,OAAO,KAAK;AACd,QAAA,CAAC,CAAC;QACF;IACF;IACA,CAAC,GAAG,OAAO;IACX,QAAQ,GAAG,KAAK;;AAEhB,IAAA,KAAK,CAAC,YAAY,GAAG,IAAI;IACzB,SAAS,GAAG,KAAK,CAAC,EAAE,KAAM,CAAC,EAAmC,EAAE,GAAG,IAAe,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAe;AACjH,IAAA,OAAO,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC;AACjC;;;;"}
|
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Marks a template result with a stable key so list reconciliation moves it instead of rewriting
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* **Undefined means the list is arbitrary, not that the render fails.** With a repeated key, which
|
|
6
|
-
* item keeps the existing node is unspecified; the render still completes and the DOM still holds
|
|
7
|
-
* what the list holds. Development warns, once per render.
|
|
2
|
+
* Marks a template result with a stable key, so list reconciliation moves it instead of rewriting it.
|
|
3
|
+
* Key all items in a list or none. A repeated key is undefined behavior: which item keeps the existing
|
|
4
|
+
* node is unspecified, but the render completes and the DOM holds what the list holds.
|
|
8
5
|
*
|
|
9
6
|
* ```js
|
|
10
7
|
* import { keyed } from '@verajs/renderer/keyed';
|
|
11
|
-
* rows.map((r) => keyed(r.id, html`<tr
|
|
8
|
+
* rows.map((r) => keyed(r.id, html`<tr>…</tr>`))
|
|
12
9
|
* ```
|
|
13
10
|
*/
|
|
14
11
|
declare const keyed: <T>(key: unknown, result: T) => T;
|
|
12
|
+
declare const createSelector: <K>(source: () => K) => ((key: K) => boolean);
|
|
13
|
+
/**
|
|
14
|
+
* Wire it: `wire([renderer, lists])`. A CONNECTOR (a function `wire` hands the registry): core's registry carries the
|
|
15
|
+
* hook machinery (`$q`, `$z`) and the raw walk (`$w`); automatic `.map` results are recognized on the renderer's `'value'` insert.
|
|
16
|
+
*/
|
|
17
|
+
declare const lists: (registry: {
|
|
18
|
+
$q?: unknown;
|
|
19
|
+
$qb?: unknown;
|
|
20
|
+
$zh?: unknown;
|
|
21
|
+
$ow?: unknown;
|
|
22
|
+
$own?: unknown;
|
|
23
|
+
$so?: unknown;
|
|
24
|
+
$z?: unknown;
|
|
25
|
+
$w?: unknown;
|
|
26
|
+
$wr?: unknown;
|
|
27
|
+
$M?: unknown;
|
|
28
|
+
$t?: unknown;
|
|
29
|
+
$k?: unknown;
|
|
30
|
+
$s?: unknown;
|
|
31
|
+
}, w: (item: unknown) => void) => void;
|
|
15
32
|
|
|
16
|
-
export { keyed };
|
|
33
|
+
export { createSelector, keyed, lists };
|
|
17
34
|
//# sourceMappingURL=vera-renderer-keyed.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vera-renderer-keyed.d.ts","sources":["../../src/keyed.ts"],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"vera-renderer-keyed.d.ts","sources":["../../src/keyed.ts"],"mappings":"AAAA;AACA;AAaA;AACE;;AAEA;;AAEA;AACA;AAEA;;;;AAIG;;;AAGD,cAAM,KAAK;;AACiE;AAC5E;;;AAGA;;AAC6E;AAC7E;AACA;;AAEF;;;;;;","names":[]}
|