@verajs/renderer 0.3.0 → 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 +52 -6
- package/dist/development/vera-renderer-elements.js.map +1 -1
- package/dist/development/vera-renderer-hydrate-slots.js +1 -1
- package/dist/development/vera-renderer-hydrate-slots.js.map +1 -1
- package/dist/development/vera-renderer-hydration.d.ts.map +1 -1
- package/dist/development/vera-renderer-hydration.js +42 -4
- package/dist/development/vera-renderer-hydration.js.map +1 -1
- package/dist/development/vera-renderer-portal.js +1 -1
- package/dist/development/vera-renderer-portal.js.map +1 -1
- package/dist/development/vera-renderer-profiler.d.ts.map +1 -1
- package/dist/development/vera-renderer-profiler.js +304 -97
- package/dist/development/vera-renderer-profiler.js.map +1 -1
- package/dist/development/vera-renderer-slots.js +1 -1
- package/dist/development/vera-renderer-slots.js.map +1 -1
- package/dist/development/vera-renderer-spread.js.map +1 -1
- package/dist/development/vera-renderer-tag.js.map +1 -1
- package/dist/development/vera-renderer.d.ts.map +1 -1
- package/dist/development/vera-renderer.js +304 -97
- package/dist/development/vera-renderer.js.map +1 -1
- package/dist/vera-renderer-elements.min.js.map +1 -1
- package/dist/vera-renderer-hydrate-slots.min.js +1 -1
- package/dist/vera-renderer-hydrate-slots.min.js.map +1 -1
- package/dist/vera-renderer-hydration.min.js +1 -1
- package/dist/vera-renderer-hydration.min.js.map +1 -1
- package/dist/vera-renderer-portal.min.js +1 -1
- package/dist/vera-renderer-portal.min.js.map +1 -1
- 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.map +1 -1
- package/dist/vera-renderer-tag.min.js.map +1 -1
- package/dist/vera-renderer.min.js +1 -1
- package/dist/vera-renderer.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vera-renderer-tag.js","sources":["../../../shared-utils/src/diagnostic.ts","../../../shared-utils/src/diagnostics.ts","../../../shared-utils/src/adopt-property.ts","../../../shared-utils/src/markup-grammar.ts","../../../shared-utils/src/utils.ts","../../src/dev-values.ts","../../src/spread-diagnostics.ts","../../src/spread.ts","../../src/tag-diagnostics.ts","../../src/tag.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","/**\n * **The codes more than one package prints — DEVELOPMENT ONLY, except to the jsx compiler** (2026-10-09). A\n * fact said by two emitters has\n * ONE docs page and ONE text, so its prose lives here, in the lowest dependency every emitter shares, and each raises\n * it as `SHARED['code']` — never a second sentence in a second table (the dev line would stop being the docs page's\n * text). Referenced only behind `__DEV__`, so production drops it whole — but the jsx COMPILER raises `voidChildren`\n * and `styleObject` in every build: a compile error is a build tool's only output, and Vite loads the production one. `scripts/sync-diagnostics.mjs` publishes it\n * as `packages/shared-utils/diagnostics.json`; the uniqueness check sees each code here once.\n *\n * Also the home of messages shared-utils' OWN code prints on a renderer's behalf (adopt-property, markup-grammar,\n * isSelection) — the same rule: the emitter is shared, so the text is.\n *\n * **One named export per code, never one object** (measured 2026-10-09): rollup cannot drop an unused KEY of\n * an object literal, so a shared `PROSE` object put every shared message into every importer's development bundle.\n * A named export is dropped per function. **The export's name IS the code** — `tagCalled` is `tag-called` — so the\n * map sync and the tests read is derived (`proseOf`, scripts/diagnostic-tables.mjs), never kept by hand, and a call\n * `SHARED.tagCalled(…)` names its code exactly once.\n */\nimport type { Prose } from './types.js';\n\n/**\n * core's `html`/`svg`/`mathml` and the renderer's `tag` — a tagged template called as a function. The FACT is shared;\n * the EXAMPLE is each emitter's: `html` writes markup, `tag` an element name — so the emitter passes it.\n */\nexport const tagCalled: Prose = (tag, received, example) => [\n `expected a template literal and received ${received}.`,\n `It is a tagged template — write ${tag}\\`${example}\\`, not ${tag}('${example}').`,\n];\n/** core's props adoption on an `init()` element, and the renderer's on any other element. */\nexport const getterOnlyProp: Prose = (key) => [\n `received a bound property \\`.${key}\\` (or \\`!${key}\\`), but its class declares \\`${key}\\` as a getter with no setter — the value cannot be delivered and the binding is ignored.`,\n 'Add a setter, or stop binding it.',\n];\n/** shared-utils' `adoptProperty` (renderer, spread): an element that never drains the record loses it at upgrade. */\nexport const upgradeClobber: Prose = (name) => [\n `the value bound to \\`${name}\\` was replaced while the element upgraded. A class field is the usual cause: at ES2022 \\`${name}?: …\\` emits \\`${name};\\`, which runs during upgrade and overwrites whatever was set beforehand.`,\n `Write it \\`declare ${name}?: …\\` instead. A component that calls init() adopts bound properties automatically and never sees this; this element did not. Ignore this if the component replaced the value on purpose.`,\n];\n/** shared-utils' `isSelection` (renderer, spread). */\nexport const selectMultiple: Prose = (name) => [\n `\\`${name}\\` controls only ONE selection here, and a selection the user adds is kept — it is not controlled.`,\n 'Bind `?selected=${…}` on each <option> to control every selection.',\n];\n/** shared-utils' `contentClash` (renderer, spread): a content-replacing property beside content of the element's own. */\nexport const contentClash: Prose = (tag, name, alone) => [\n `<${tag}> binds \\`.${name}\\`, which replaces the element's content, and also has content of its own — markup or a child binding, which the write would strand.`,\n `Bind one or the other: the property alone (\\`${alone}\\`), or the content alone.`,\n];\n/** shared-utils' `tagHole` (renderer; @verajs/ssr keeps a twin). */\nexport const tagHole: Prose = () => [\n 'an expression in tag position (`<${…}>`) cannot be a tag name — a tag name must be a tag value.',\n \"Use `tag`h1`` from @verajs/renderer/tag, with that entry's `html`.\",\n];\n/** core's `wire` (at wire time) and the renderer (a template built before slots was wired, at render). */\nexport const lateTemplateModule: Prose = () => [\n \"a 'template' or 'element' module (namespaces, elements, slots) was wired after the renderer had already built templates — those never ask it, and keep rendering without it.\",\n 'Wire it beside the renderer, before the first render.',\n];\n/** The renderer and spread (two bundles); @verajs/ssr refuses the same URLs silently today. */\nexport const scriptUrl: Prose = (name) => [\n `\\`${name}\\` was given a javascript: URL — refused, and the attribute removed.`,\n 'A bound URL is data, and data must never become code.',\n];\n/**\n * The renderer and spread: `kind` is what the value was (dev-values' `attributeValueKind`); `property` is the\n * emitter's own spelling of a property binding — a template's `.name=${value}`, a spread's `'.name': value`.\n */\nexport const attributeValue: Prose = (name, kind, property) => [\n `the attribute \\`${name}\\` was given ${kind}. An attribute value is a string and nothing else.`,\n `If the element is meant to RECEIVE this value, bind a property instead — \\`${property}\\` — which is how a custom element takes anything that is not text. If it is meant to be read as text, convert it where you know what it means: \\`date.toISOString()\\`, \\`list.join(' ')\\`. A Date in particular serializes with the SERVER's timezone on one side and the browser's on the other, so it will not survive hydration.`,\n];\n/** The renderer and spread: `type` is the value's `typeof`. */\nexport const notAListener: Prose = (name, type) => [\n `@${name} was given ${type === 'object' ? 'an object with no handleEvent method' : `a ${type}`}, which cannot listen — the event will do nothing.`,\n 'Pass a function, or an object with a handleEvent method. A missing handler is `undefined` or `false`, both of which are fine; this is neither.',\n];\n/** The renderer (and @verajs/ssr's twin): an expression inside an attribute NAME. */\nexport const nameExpression: Prose = (written, given) => [\n `an attribute name cannot be an expression — \\`${written}\\` is read by the parser before any value exists.`,\n `A name known only at runtime is a spread: \\`\\${spread({ [\\`${written}\\`]: ${given} })}\\` (from @verajs/renderer/spread).`,\n];\n/** The renderer (and, ruled 2026-10-09, @verajs/ssr): data shaped like a template, not made by `html`. */\nexport const forgedTemplate: Prose = () => [\n 'is shaped like a template but was not made by html`` — rendered as text.',\n 'A template from data (JSON, or html([markup])) is never markup; for trusted markup, bind it: <div .innerHTML=${markup}>.',\n];\n/** The renderer and spread (two bundles; @verajs/ssr refuses the same): binding `__proto__`. */\nexport const protoBinding: Prose = (written) => [\n `binds \\`${written}\\`, which would replace the element's own prototype and destroy it — no property write does this, and no use of it is legitimate.`,\n 'The binding is ignored.',\n];\n/** The renderer and spread: a bound `srcdoc` ATTRIBUTE. `property` is the emitter's spelling of the property binding. */\nexport const srcdocAttribute: Prose = (property) => [\n 'binds the `srcdoc` attribute, which renders its value as an HTML document — refused.',\n `If the markup is trusted and sanitized, bind the property: \\`${property}\\`.`,\n];\n/** The renderer and spread: a bound inline-handler attribute (`onclick`). `event` is the emitter's event spelling(s). */\nexport const handlerAttribute: Prose = (name, event) => [\n `binds the \\`${name}\\` attribute, which runs its value as code — refused.`,\n `Bind a function as an event instead: ${event}.`,\n];\n/**\n * The jsx compiler and the renderer's `tag` — children given to a void element. Both refuse; the FATE the refusal\n * prevents is each emitter's: compiled, they would land after the element; through `tag`, vanish.\n */\nexport const voidChildren: Prose = (tag, fate) => [\n `<${tag}> is a void element — it has no end tag and takes no children, so ${fate}; refused.`,\n 'Move the children out, or use an element that takes content.',\n];\n/** The jsx compiler and the renderer's `tag` — an object `style`. The EXAMPLE is each emitter's spelling. */\nexport const styleObject: Prose = (example) => [\n 'style expects a STRING, not an object.',\n `Build the string: ${example}.`,\n];\n/**\n * An option a module or loader does not have — autoloader(), directiveLoader(), router(), and the directives packs\n * remote(), sensors(), motion(). One fact and one fix; the module is the line's SUBJECT and the list is its own.\n */\nexport const unknownOption: Prose = (key, list) => [\n `\\`${key}\\` is not an option, so it was ignored.`,\n `The options are ${list}.`,\n];\n","import type { PropertyHost } from './types.js';\nimport { diagnostic } from './diagnostic.js';\nimport * as SHARED from './diagnostics.js';\n\n/**\n * **Delivering a bound property to a custom element that may not receive it yet** — the one home of the\n * rule `@verajs/renderer` (a `.prop` template binding) and `@verajs/renderer/spread` (a `.prop` bag key)\n * both apply. They ship as separate bundles that cannot import each other, so this package, inlined into\n * each, is where the rule lives once; before, each carried a full copy and a fix had to visit both.\n *\n * Returns where the binding stands after this write:\n * - `0` — still adopting: nothing received the value, so it was recorded in the element-carried\n * `_$props$`, which core's `init()` drains over whatever the class's field initializers wrote at\n * upgrade. Call again on the next write.\n * - `1` — received (a setter anywhere on the chain, an initialized component's `_$adopt$`, or an element\n * that is already upgraded): later writes are plain property writes.\n * - `2` — refused: a getter with no setter, where the plain write would throw. Later writes do nothing.\n *\n * `_$props$` and `_$adopt$` are `$`-named because they cross bundle boundaries (renderer, spread, core)\n * and must survive property mangling.\n *\n * **`_$adopt$` is a BRAND, not just a slot:** present means \"core has initialized this component\", which is what routes\n * a delivery to the live accessor (`1`) instead of the `_$props$` record. Do not move it to a class's PROTOTYPE\n * (2026-10-10): every instance would carry it BEFORE `init`, and a delivery to an upgraded-but-uninitialized element\n * would be adopted into a store that does not exist yet. It is ONE shared function written onto each element at `init`,\n * called with the element as `this` (`adopt.call(element, …)`) — 2026-10-11: the closure it replaced was free in\n * optimized code (measured) but cost Chrome's interpreted first render one allocation per component.\n */\n\n/** Development only: getter-only names already reported, per element — a `!name` re-asserts on every render. */\nlet refused: WeakMap<PropertyHost, Set<string>> | undefined;\n\nexport const adoptProperty = (element: PropertyHost, name: string, value: unknown): 0 | 1 | 2 => {\n /**\n * **`__proto__` is refused HERE, at the receiver** (2026-11-10): `element.__proto__ = v` replaces the element's\n * prototype, and an own `__proto__` key reaches a bag through `JSON.parse`. This is the choke point every delivery\n * passes; the renderer's template binding and spread's bag key refuse it first, with a development warning naming\n * where it was written (their second addresses: renderer.ts `proto-binding`, spread.ts refusal 3).\n */\n if (name === '__proto__') return 2;\n const adopt = element._$adopt$ as ((key: string, value: unknown) => void) | undefined;\n /** The walk comes first: what it finds decides whether writing is even legal. */\n for (let carrier: object | null = element; carrier !== null; carrier = Object.getPrototypeOf(carrier)) {\n const desc = Object.getOwnPropertyDescriptor(carrier, name);\n if (desc === undefined) continue;\n if (desc.set !== undefined) {\n element[name] = value;\n return 1;\n }\n if (desc.get !== undefined) {\n if (adopt !== undefined) adopt.call(element, name, value);\n else if (__DEV__) {\n const names = (refused ??= new WeakMap()).get(element) ?? new Set<string>();\n refused.set(element, names);\n if (!names.has(name)) {\n names.add(name);\n console.warn(diagnostic('renderer', `<${element.localName}>`, 'getter-only-prop', __DEV__ && SHARED.getterOnlyProp(name)));\n }\n }\n return 2;\n }\n break; // a data property: an own field, or an inherited default — nothing receives it\n }\n element[name] = value;\n if (adopt !== undefined) {\n adopt.call(element, name, value);\n return 1;\n }\n const record = (element._$props$ ??= {}) as Record<string, unknown>;\n const first = __DEV__ && !Object.hasOwn(record, name);\n record[name] = value;\n /** Upgrade is read off the PROTOTYPE — a bag key named `constructor` can shadow `el.constructor`. The realm is the element's. */\n const view = element.ownerDocument.defaultView as unknown as {\n HTMLElement: { prototype: object };\n customElements: CustomElementRegistry;\n } | null;\n const upgraded = view === null || Object.getPrototypeOf(element) !== view.HTMLElement.prototype;\n /** Development only: an element that never drains still loses the value at upgrade — told apart by ownership. */\n if (__DEV__ && view !== null && !upgraded && first) {\n const tag = element.localName;\n view.customElements.whenDefined(tag).then(() => {\n let owned = false;\n for (let carrier: object | null = element; carrier !== null; carrier = Object.getPrototypeOf(carrier)) {\n const desc = Object.getOwnPropertyDescriptor(carrier, name);\n if (desc === undefined) continue;\n owned = desc.get !== undefined || desc.set !== undefined;\n break;\n }\n if (!owned && element[name] !== record[name])\n console.warn(diagnostic('renderer', `<${tag}>`, 'upgrade-clobber', __DEV__ && SHARED.upgradeClobber(name)));\n });\n }\n return upgraded ? 1 : 0;\n};\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 * **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 * **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","import type { HandlerHolder, Untracked } from './types.js';\nimport { diagnostic } from './diagnostic.js';\nimport * as SHARED from './diagnostics.js';\n\n/**\n * Get an object's type.\n *\n * @param obj The object\n * @return The type\n */\nexport const getType = (obj: unknown) => Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();\n\n/**\n * Weak collections need their per-key dependencies stored weakly, or tracking `weakMap.get(obj)`\n * holds `obj` and defeats the whole point of the type. Checked by type string rather than\n * `instanceof`, which fails across realms (iframes, `vm`).\n */\n/**\n * A WeakMap or WeakSet (or WeakRef) — read from `Symbol.toStringTag`, the tag `Object.prototype.toString` itself reads, so\n * the answer is the same (another realm's collections included) without building and lower-casing a string on every first\n * tracked read of every object.\n */\nexport const isWeakCollection = (item: unknown) => {\n const tag = (item as { [Symbol.toStringTag]?: unknown } | null)?.[Symbol.toStringTag];\n return typeof tag === 'string' && (tag[0] === 'W' || tag[0] === 'w');\n};\n\n/**\n * Remove a trailing slash from an url if its not root url (`/`).\n *\n * @param str String to remove trailing slash from\n */\nexport const stripTrailingSlash = (str: string) => (str !== '/' && str.endsWith('/') ? str.slice(0, -1) : str);\n\n/**\n * **Reports an error nothing else handled, the way the platform reports one.** `reportError` fires\n * the window's `error` event — what `window.onerror`, error trackers and test runners listen for —\n * without unwinding the caller, so one failing hook or ref never stops its siblings. A bare\n * `console.error` reached none of those: a component could stop updating while every page-error\n * listener stayed silent. Off-browser (Node has no `reportError`) the console is all there is.\n * `line` is the framework's own line, printed beside the error — a CODED one (2026-10-09):\n * each caller passes `'[vera] <code>'` in production and its table's `diagnostic()` sentence in development, both\n * literal codes at the call site, so the static checks read them. The subject is fixed wording too (`a hook`, `an\n * element ref`), never a tag name: this line is the console's FORMAT (no `'%s'`, which measured +2–3 B on the renderer\n * bundles), so nothing from outside may reach it — the element goes to the `'error'` handlers instead. Production prints it only where the platform has no\n * `reportError` (Node); in a browser, `reportError` alone reports.\n *\n * Shared by core (a hook threw) and the renderer (a ref threw) so the fallback is one rule.\n */\nexport const reportUncaught = (error: unknown, line: string) => {\n if (typeof reportError !== 'function') console.error(line, error);\n else {\n if (__DEV__) console.error(line, error);\n reportError(error);\n }\n};\n\n/**\n * **Reports what user code a render called threw — to the app's `'error'` chain, else as uncaught.** One rule for\n * every callback the framework runs on the user's behalf and survives: a hook (core), an element ref, and an element\n * claim's `create`/`mount`/`unmount` (the renderer). The caller catches at the call site and carries on, so one\n * failing callback never stops its siblings or leaves a commit half applied. `element` is the component the error\n * belongs to, handed to each handler. Every throw is reported — nothing is deduped, as a hook's never was.\n * **Core keeps a deliberate twin** (`reportHookError`, the same rule as a `forEach`): routed through here it measured\n * +11 B gzip on `vera.min.js` (2026-10-09). A change to the rule changes both.\n */\nexport const reportTo = (handlers: readonly unknown[] | undefined, error: unknown, element: Element | undefined, line: string) => {\n if (handlers?.length) for (const handler of handlers) (handler as (error: unknown, element?: Element) => void)(error, element);\n else reportUncaught(error, line);\n};\n\n/** The component a render root belongs to: a shadow root's host, or a light root itself. */\nexport const hostOf = (root: Node | null | undefined): Element | undefined =>\n root == null ? undefined : root.nodeType === 11 ? (root as ShadowRoot).host : (root as Element);\n\n/** `fn(a, b, c)`, tracked as the caller is — the stand-in for core's `untracked` when no core was wired. */\nexport const call: Untracked = (fn, a, b, c) => fn(a!, b!, c!);\n\n/**\n * **Runs a bound handler, and its callers run it UNTRACKED**: the renderer's template `@event` and spread's event key,\n * each through `untracked(dispatch, holder, event)` (2026-10-09). An effect that fires an event synchronously\n * (`el.click()`, `focus()`, `dispatchEvent`) runs the handler INSIDE itself, and the handler's reads subscribed the\n * effect: a handler doing `state.n++` made the effect re-run on every click, a self-feeding loop held to one round per\n * frame, forever (measured). A handler's reads are event-time decisions, never a hook's inputs. The directives engine's\n * delegated `listen` makes the same choice its own way. A function is called with the element as `this`; an object\n * through its `handleEvent`. One function for both callers (Brian's size-audit ruling, 2026-11-13): it was two\n * identical copies, so a fix had two addresses; each bundle still inlines its own.\n */\nexport const dispatch = (holder: HandlerHolder, event: Event) => {\n const handler = holder._handler as EventListener | EventListenerObject | null;\n if (typeof handler === 'function') handler.call(holder._element as never, event);\n else if (typeof handler?.handleEvent === 'function') handler.handleEvent(event);\n};\n\n/**\n * **Whether a property binding is a `<select>`'s SELECTION** — `value` or `selectedIndex` — which the renderer and\n * `spread` both treat as live: re-asserted every render and compared against the live value (as `!value` is), because\n * a select's options can be replaced under an unchanged value, which drops the selection. One rule, asked once per\n * binding by both, so a template and a spread key cannot disagree about it.\n *\n * In development it names the one shape it cannot serve: on a `<select multiple>` both properties read and set a\n * SINGLE selection, so a selection the user adds is kept rather than controlled. Always writing there was measured\n * 2–3% slower on every table with a select per row, to serve an API that does not fit — hence a warning, not a cost.\n */\nexport const isSelection = (element: Element, name: unknown) => {\n if ((name !== 'value' && name !== 'selectedIndex') || element.localName !== 'select') return false;\n return true;\n};\n\n/**\n * Development: the one shape a selection binding cannot serve, named by the module the user wired (`side`). Called only\n * behind `__DEV__` at each call site, so production keeps `isSelection` exactly as small as it was (a `side` argument on\n * it measured +1 B, a default +9 B on vera-renderer.min.js — 2026-10-09).\n */\nexport const saySelectMultiple = (element: Element, name: unknown, side: string) => {\n if (element.hasAttribute('multiple'))\n console.warn(diagnostic(side, '<select multiple>', 'select-multiple', __DEV__ && SHARED.selectMultiple(String(name))));\n};\n\n/**\n * `target[key]`, as a function — how a component's GETTER is read through `untracked`. Not `Reflect.get`: `untracked`\n * passes three arguments, and `Reflect.get`'s third is the RECEIVER — `undefined` there runs the getter with no `this`.\n */\nexport const read = (target: object, key: string) => (target as Record<string, unknown>)[key];\n\n/**\n * **What a thrown value says, whatever was thrown — and it never throws itself.** A caught value comes from author\n * code (a `resolve` option, a motion tick or vocabulary function), and JavaScript can throw anything: `null`, an object\n * with no prototype (`String()` finds no `toString`), one whose `toString` or `message` getter throws, a Proxy whose\n * traps throw. Formatting it naively replaced the real failure with an unrelated TypeError from inside the framework.\n * Anything unreadable becomes a fixed phrase; `Object.prototype.toString` is no fallback, since it reads\n * `Symbol.toStringTag` through a Proxy's trap too.\n *\n * **A deliberate duplicate of `thrownMessage` in `packages/ssr/src/vera/escaping.ts` — fix both copies.** `@verajs/ssr`\n * is compiled per file with no bundling, so it cannot import this private, unpublished package at run time;\n * `tests/thrown-message-copies.test.mjs` runs one table of thrown values against both, so they cannot drift.\n */\nexport const thrownMessage = (error: unknown): string => {\n try {\n if (error instanceof Error) return String(error.message);\n const message = (error as { message?: unknown } | null)?.message;\n return typeof message === 'string' ? message : String(error);\n } catch {\n return '[unprintable value thrown]';\n }\n};\n","/**\n * `__DEV__` only: the one home for *\"is this value something an attribute can carry?\"*\n *\n * **Why it is a closed vocabulary and not a predicate.** The first design asked whether a value\n * stringifies meaningfully — `String(v) === '[object Object]'` means it lost its data. Driven\n * through 16 value shapes rather than reasoned about, that broke four ways, and the first is\n * disqualifying: `String()` THROWS on `Object.create(null)`, on `{ toString: null }`, and on any\n * object whose `toString` throws — so a diagnostic would have killed the page for an author using\n * the recommended dictionary idiom. It also passed `[\"a\",\"b\"]` as `\"a,b\"` (one junk class, if that\n * was a `class` binding) and `new Date()` as a timezone-bearing string, which is an SSR/CSR\n * divergence manufactured out of correct-looking code. And it passed `Symbol('s')` while\n * `` `${sym}` `` throws — a guard and its sink disagreeing about a single expression.\n *\n * \"Does it stringify meaningfully\" is an OPEN predicate over an unbounded, environment-dependent\n * space, and open predicates cannot be audited. So the test is inverted and closed: **primitives\n * pass; everything else is reported; anything else that should pass is a named row added on\n * evidence.** The list has exactly one member so far.\n *\n * Credit where it is due: the four breaks were found by the omni engine's session, which drove the\n * shapes rather than arguing about them, and the closed-vocabulary form is theirs.\n */\n\nimport { hasWarned } from '@verajs/shared-utils';\n\n/**\n * Blessed non-primitives — types whose `toString` IS the value the author means.\n *\n * Tested by brand rather than `instanceof`, which is false across realms: a `URL` built in an\n * iframe is not `instanceof` the parent's `URL`, and a diagnostic that fires on a correct value in\n * one frame and not another is worse than none.\n */\nconst brand = (value: object) => Object.prototype.toString.call(value);\n\n/** One message per element+name+kind, so a value rebuilt every render does not flood the console. */\nlet reported: Set<string> | undefined;\n\n/**\n * Returns the complaint, or `null` when the value is fine. Never throws — the shapes that break a\n * naive guard are exactly the ones worth reporting, so they reach the `object` arm and are named.\n */\nexport const attributeValueKind = (tag: string, name: string, value: unknown): string | null => {\n const type = typeof value;\n if (type === 'string' || type === 'number' || type === 'boolean' || type === 'bigint') return null;\n if (type === 'object' && brand(value as object) === '[object URL]') return null;\n\n /**\n * Keyed by BRAND, not by `typeof` — `Date`, `Array` and a plain object are all `'object'`, so a\n * coarser key reported whichever arrived first and silently swallowed the rest. An author who\n * fixed the Date would never have been told about the array.\n */\n const key = `${tag}|${name}|${type === 'object' ? brand(value as object) : type}`;\n reported ??= new Set();\n if (reported.has(key)) return null;\n reported.add(key);\n\n /**\n * A function into an attribute is never what the author meant, but the REASON matters: on a\n * custom element the Lit-era convention is that complex values are set as properties, so\n * `<my-chart formatter={fn}>` is a coherent intention that this sink simply cannot express. The\n * message names the binding that can, rather than blaming the author.\n */\n const kind = type === 'function'\n ? `a function, which becomes its own SOURCE TEXT`\n : type === 'symbol'\n ? `a symbol, which every DOM conversion refuses`\n : Array.isArray(value)\n ? `an array, which becomes its members joined by commas`\n : brand(value as object) === '[object Date]'\n ? `a Date, whose text carries the TIMEZONE of whichever side rendered it`\n : `an ${type}, which cannot survive as text`;\n\n /** The KIND only: the sentence is the shared `attribute-value` entry, printed by each call site with its area. */\n return kind;\n};\n\n/**\n * `__DEV__` only: **an event name one or two keystrokes from a real one** — `@clik`, or `onClik` in\n * JSX, which compiles to it — is almost certainly a typo, and a listener for an event that never\n * fires is a button that silently does nothing. TypeScript cannot catch it beside a permissive prop\n * surface (an index signature cannot exclude names), and nothing at runtime ever fails.\n *\n * Deliberately narrow, because custom events are legitimate on every element: a name the element\n * knows (`'on' + name in element`) is never questioned; one that EXTENDS a real event (`changed`,\n * `loaded`, `closed`) is a custom event by its shape and is left alone; and only a name within two\n * edits of an event this element really has — transpositions counting as one — is named. Each\n * `(tag, name)` pair is said once: the caller's `warnOnce(…, 'event-name-typo', …, key)`, keyed by `eventKey`, and\n * the scan below is skipped for a pair already said (`hasWarned`).\n */\nexport const eventKey = (element: Element, name: string): string => element.localName + ' ' + name;\nexport const eventNameGuess = (element: Element, name: string): string | null => {\n if ('on' + name in element) return null;\n if (hasWarned('event-name-typo', eventKey(element, name))) return null;\n let best: string | null = null;\n let bestDistance = 3;\n for (const key in element) {\n if (!key.startsWith('on')) continue;\n const known = key.slice(2);\n if (name.startsWith(known)) return null;\n const distance = editDistance(name, known, bestDistance);\n if (distance < bestDistance) {\n bestDistance = distance;\n best = known;\n }\n }\n if (best === null) return null;\n /** The GUESS only: the sentence is the renderer table's `event-name-typo`. */\n return best;\n};\n\n/** Optimal-string-alignment distance, stopping early once it cannot come in under `limit`. */\nconst editDistance = (a: string, b: string, limit: number): number => {\n if (Math.abs(a.length - b.length) >= limit) return limit;\n let before: number[] = [];\n let previous = Array.from({ length: b.length + 1 }, (_, j) => j);\n for (let i = 1; i <= a.length; i++) {\n const current = [i];\n let rowBest = i;\n for (let j = 1; j <= b.length; j++) {\n const cost = a[i - 1] === b[j - 1] ? 0 : 1;\n let value = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + cost);\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) value = Math.min(value, before[j - 2] + 1);\n current.push(value);\n if (value < rowBest) rowBest = value;\n }\n if (rowBest >= limit) return limit;\n before = previous;\n previous = current;\n }\n return previous[b.length];\n};\n","/**\n * **`@verajs/renderer/spread`'s own diagnostics — DEVELOPMENT ONLY.** A spread key refused for the same reason a template\n * binding is (`__proto__`, a bound `srcdoc`, an inline handler) raises the shared code from shared-utils' table; these\n * are the refusals only a spread can meet — its names arrive at runtime.\n */\nimport type { Prose } from '@verajs/shared-utils';\n\nexport const PROSE: Record<string, Prose> = {\n 'spread-unsafe-name': (key) => [\n `refusing ${key} — an attribute name cannot contain whitespace, a quote, \\`<\\`, \\`>\\`, \\`/\\`, \\`=\\` or a control character, and one that cannot be written into markup would not survive server rendering.`,\n 'Spread names arrive at runtime; check where this key came from.',\n ],\n 'spread-inner-html': (key) => [\n `refusing ${key} — spread names arrive at runtime, which is exactly the property that makes an HTML sink unreviewable.`,\n 'Write it in the template — html`<div .innerHTML=${trusted}>` — sanitized first (renderer README, security note).',\n ],\n 'spread-not-object': (received) => [\n `ignoring a props bag that is not a plain object — received ${received}. A string is iterated by character index, so \\`spread('text')\\` would set attributes named 0, 1, 2 and 3; anything else applies nothing at all.`,\n 'This is usually an import or a property that resolved to something unexpected.',\n ],\n};\n","/**\n * `<div ${spread(props)}>` — bindings whose NAMES are not known when the template is parsed.\n *\n * Ships separately: the renderer holds one property read (a value at element position carrying\n * `_$apply$` applies itself), so an app that never spreads pays only that. This entry imports nothing\n * from the renderer and reaches it only through that protocol, so it works beside any renderer entry.\n *\n * **One key, one rule, decided once.** A key's kind and name follow the renderer's template sigils\n * exactly (`.prop`, `?bool`, `@event`, `&ref`, `!live`, `onClick`), and its verdict — including every\n * refusal — is decided when its binding is first created, never again per render. The rules are\n * repeated rather than imported from the renderer (the bundles cannot share state);\n * `tests/spread-written-parity.test.mjs` drives both spellings against each other.\n *\n * **Security: spread is where the template security model would break**, because its names arrive at\n * runtime, often from data, and are neither greppable nor reviewable. So it refuses, on the client and\n * in the server half (`_$attrs$`) alike: `.innerHTML`/`.outerHTML` (and `!`), `.__proto__`, the `srcdoc`\n * attribute, inline-handler attributes (`onclick` in any casing — `on` + Capital is the event spelling\n * and still works), names that cannot survive markup, and — as the renderer does — a `javascript:` URL\n * where a browser navigates.\n */\nimport { adoptProperty, call, CONTENT_PROPERTY, dispatch, contentClash, INLINE_HANDLER, ownsContent, isSelection, read, saySelectMultiple, SCRIPT_URL, SCRIPT_URL_ITEM, URL_SINK, diagnostic, SHARED } from '@verajs/shared-utils';\nimport type { Untracked } from '@verajs/shared-utils';\nimport { attributeValueKind } from './dev-values.js';\nimport { PROSE } from './spread-diagnostics.js';\n\nconst ATTR = 0;\nconst PROPERTY = 1;\nconst BOOLEAN = 2;\n/** `!name` — a property compared against the live DOM rather than against what this last wrote. */\nconst LIVE = 3;\nconst EVENT = 4;\nconst REF = 5;\nconst REFUSED = 6;\n\n/**\n * A name that cannot be written into a tag: the HTML attribute-name restriction (control characters,\n * whitespace, `\"`, `'`, `>`, `/`, `=`) plus `<` and a backtick — refused identically on both sides, so a\n * key cannot work here and vanish server-side. Skipped, never thrown: one bad key must not cost a render.\n */\n// eslint-disable-next-line no-control-regex\nconst UNSAFE_NAME = /^$|[\\s\"'>/=<`]|[\\u0000-\\u001f\\u007f]/;\n\n/** Development only: why a key was refused, by refusal code. */\n\n/**\n * A key's kind and name, and — for a refused key — why (`[REFUSED, code]`). The twin of the renderer's\n * template construction; a refused key's verdict never changes, so it is decided once per binding.\n */\nconst resolve = (key: string): [number, string | number] => {\n const first = key[0];\n let kind = first === '.' ? PROPERTY : first === '?' ? BOOLEAN : first === '@' ? EVENT : first === '&' ? REF : first === '!' ? LIVE : ATTR;\n let name = kind === ATTR ? key : key.slice(1);\n if (kind === ATTR && /^on[A-Z]/.test(key)) {\n kind = EVENT;\n name = key.slice(2).toLowerCase();\n }\n const property = kind === PROPERTY || kind === LIVE;\n const refusal = UNSAFE_NAME.test(name)\n ? 1\n : property && (name === 'innerHTML' || name === 'outerHTML')\n ? 2\n : property && name === '__proto__'\n ? 3\n : kind === ATTR && name.toLowerCase() === 'srcdoc'\n ? 4\n : kind === ATTR && INLINE_HANDLER.test(name)\n ? 5\n : 0;\n return refusal ? [REFUSED, refusal] : [kind, name];\n};\n\n/**\n * How a key names a URL a browser navigates to — the renderer's rule, by the same numbers: 0 not one; 1 a custom\n * element's property — often an object (`.data=${rows}`), so only a string is checked and nothing is converted; 2\n * converted ONCE, and that string checked and written (so a `toString` that answers differently each time cannot pass\n * the check as one URL and be written as another); 3 an animation's value (`to`, `values`…), converted once and\n * checked item by item. A refused key needs no case: its name is a refusal code, which no URL\n * attribute name matches.\n */\nconst urlRule = (kind: number, name: string, custom: boolean) => {\n const sink = URL_SINK.exec(name);\n return kind === BOOLEAN || kind === EVENT || kind === REF || sink === null ? 0 : kind !== ATTR && custom ? 1 : sink[1] ? 2 : 3;\n};\n\n/** What `checked` answers for a `javascript:` URL where the rule looks. */\nconst REFUSE = {};\n\n/** `value` as it is checked AND written under `rule` — converted once, or left as it is — or `REFUSE`. */\nconst checked = (rule: number, value: unknown) => {\n if (rule > 1 && value != null && typeof value !== 'string') value = `${value}`;\n return rule !== 0 && typeof value === 'string' && (rule === 3 ? SCRIPT_URL_ITEM : SCRIPT_URL).test(value) ? REFUSE : value;\n};\n\nconst UNSET = {};\n\n/** One key's binding on one element. It is also the `@event` listener — a stable object, so the platform dedupes re-adds. */\nclass Binding {\n _kind: number;\n _name: string;\n _element: Element;\n /** What the element held before the bag first wrote this key — restored when the key leaves the bag. */\n _initial: unknown = null;\n _committed: unknown = UNSET;\n _handler: unknown = null;\n /** For `.prop`: where adoption stands (`adoptProperty`: 0 still adopting, 1 received, 2 refused). */\n _state = 1;\n /** How this key is checked as a URL (`urlRule`) — decided once, with the element in hand. */\n _url: number;\n /**\n * On a custom element, a property read is the component's GETTER, so it goes through the `untracked` this binding was\n * created with; `null` on a built-in element, whose getters read no state. Decided once.\n */\n _read: Untracked | null;\n constructor(element: Element, key: string, untracked: Untracked) {\n const [resolved, name] = resolve(key);\n /** A `<select>`'s selection is live, as in a template — the same rule, asked of the same function. */\n const kind = (resolved === PROPERTY || resolved === LIVE) && isSelection(element, name) ? LIVE : resolved;\n if (__DEV__ && (resolved === PROPERTY || resolved === LIVE) && isSelection(element, name)) saySelectMultiple(element, name, 'spread');\n this._kind = kind;\n this._name = name as string;\n this._element = element;\n const custom = element.localName.includes('-');\n /** Core's `untracked` for a custom element's getter reads, and for an event key's handler (`dispatch`). */\n this._read = custom || kind === EVENT ? untracked : null;\n this._url = urlRule(kind, name as string, custom);\n /** A content-replacing property beside content of the element's own: development refuses it, as a template does. */\n if (__DEV__ && (kind === PROPERTY || kind === LIVE) && CONTENT_PROPERTY.test(name as string) && ownsContent(element))\n contentClash('spread', element.localName, name as string);\n if (kind === REFUSED) {\n if (__DEV__) {\n /** Each refusal written out, so the manifest (`diagnostics-tables`) reads every raise from the source. */\n const at = `<${element.localName}>`;\n const written = JSON.stringify(key);\n const why = name as number;\n if (why === 1) console.warn(diagnostic('spread', at, 'spread-unsafe-name', __DEV__ && PROSE['spread-unsafe-name'](written)));\n else if (why === 2) console.warn(diagnostic('spread', at, 'spread-inner-html', __DEV__ && PROSE['spread-inner-html'](written)));\n else if (why === 3) console.warn(diagnostic('spread', at, 'proto-binding', __DEV__ && SHARED.protoBinding(written)));\n else if (why === 4) console.warn(diagnostic('spread', at, 'srcdoc-attribute', __DEV__ && SHARED.srcdocAttribute(\"'.srcdoc': trusted\")));\n else\n console.warn(\n diagnostic('spread', at, 'handler-attribute',\n __DEV__ && SHARED.handlerAttribute(key, `\\`'@${key.slice(2).toLowerCase()}': fn\\` (or \\`on${key.slice(2, 3).toUpperCase()}${key.slice(3)}\\`)`))\n );\n }\n return;\n }\n if (kind === ATTR) this._initial = element.getAttribute(name as string);\n else if (kind === BOOLEAN) this._initial = element.hasAttribute(name as string);\n /** On a custom element this is the component's getter, run on the parent's behalf: read through `untracked`. */\n else if (kind === PROPERTY || kind === LIVE)\n this._initial = custom ? untracked(read, element, name as string) : (element as unknown as Record<string, unknown>)[name as string];\n if (kind === PROPERTY && custom) this._state = 0;\n }\n /** Runs the handler UNTRACKED (shared-utils' `dispatch`): `_read` holds core's `untracked` for an event key too. */\n handleEvent(event: Event) {\n (this._read ?? call)(dispatch, this, event);\n }\n}\n\nconst write = (binding: Binding, given: unknown, adopting?: boolean) => {\n const kind = binding._kind;\n const value = checked(binding._url, given);\n const name = binding._name;\n /** One variable, typed for both uses: a cast alias survives minification as a second variable. */\n const element = binding._element as Element & Record<string, unknown>;\n if (kind === REFUSED) return;\n /**\n * **Adopting server markup** (hydration hands this in): a built-in control's state — `value`, `checked`, `selected`,\n * `open`, by `.name` or `!name` — is RECORDED, not written: the server's default, and anything the user changed before\n * the script arrived, stand, exactly as for a written binding (hydration's `FORM_STATE`, the same list — keep them\n * equal). Any other name is written, and a component's property is always delivered.\n */\n if (adopting && binding._read === null && (kind === LIVE || kind === PROPERTY) && /^(?:value|checked|selected|open)$/.test(name as string)) {\n binding._committed = value;\n return;\n }\n if (value === REFUSE) {\n if (__DEV__ && given !== binding._committed)\n console.warn(diagnostic('spread', `<${element.localName}>`, 'script-url', __DEV__ && SHARED.scriptUrl(name)));\n binding._committed = given;\n element.removeAttribute(name);\n return;\n }\n if (kind === LIVE) {\n binding._committed = value;\n /**\n * A built-in is compared against its live property. A COMPONENT is compared against its current value — the raw one\n * its store holds (`_$raw$`) for a name it received, else read through `untracked` — and receives a difference\n * through `adoptProperty`. Inline, as the renderer's `commit` reads a template's `!name`: keep the two equal.\n */\n if (binding._read === null) {\n if (element[name] !== value) element[name] = value;\n } else {\n const raw = element._$raw$ as Record<string, unknown> | undefined;\n if ((raw !== undefined && name in raw ? raw[name] : binding._read(read, element, name)) !== value) adoptProperty(element, name, value);\n }\n return;\n }\n if (value === binding._committed) return;\n binding._committed = value;\n if (kind === ATTR) {\n if (value == null) element.removeAttribute(name);\n else {\n if (__DEV__) {\n const kind = attributeValueKind(element.localName, name, value);\n if (kind !== null) console.warn(diagnostic('spread', `<${element.localName}>`, 'attribute-value', __DEV__ && SHARED.attributeValue(name, kind, `'.${name}': value`)));\n }\n element.setAttribute(name, `${value}`);\n }\n } else if (kind === PROPERTY) {\n if (binding._state === 1) element[name] = value;\n else if (binding._state === 0) binding._state = adoptProperty(element, name, value);\n } else if (kind === BOOLEAN) element.toggleAttribute(name, !!value);\n else if (kind === REF) {\n if (typeof value === 'function') (value as (element: Element) => void)(element);\n else if (value !== null && typeof value === 'object') (value as { value: unknown }).value = element;\n } else {\n if (__DEV__ && value != null && value !== false && typeof value !== 'function' &&\n typeof (value as EventListenerObject)?.handleEvent !== 'function')\n console.warn(diagnostic('spread', `<${element.localName}>`, 'not-a-listener', __DEV__ && SHARED.notAListener(name, typeof value)));\n if (binding._handler === null && value != null) element.addEventListener(name, binding);\n binding._handler = value ?? null;\n }\n};\n\n/**\n * Each binding is owned by the renderer's binding record it arrived through (the `key`), so one element can\n * carry several spreads. A key that leaves the bag is written back to what the element held before.\n */\nconst owned = new WeakMap<object, Map<string, Binding>>();\n/**\n * `untracked` is `_$apply$`'s third argument — core's, through the renderer; `call` when a renderer leaves it out.\n * Each binding keeps the one it was CREATED with, so nothing about it is paid per render, and an apply nested inside\n * another (a component setter rendering a spread) can never change what the outer's bindings use.\n */\nfunction apply(this: SpreadResult, element: Element, key: object, untracked: Untracked = call, adopting = false) {\n const props = this._props;\n let bindings = owned.get(key);\n if (bindings === undefined) owned.set(key, (bindings = new Map()));\n let count = 0;\n for (const name in props) {\n count++;\n let binding = bindings.get(name);\n if (binding === undefined) bindings.set(name, (binding = new Binding(element, name, untracked)));\n write(binding, props[name], adopting);\n }\n if (bindings.size !== count)\n for (const [name, binding] of bindings)\n if (!(name in props)) {\n bindings.delete(name);\n write(binding, binding._initial);\n }\n}\n\n/**\n * The server half of the protocol: `[kind, name, value]` for each key `@verajs/ssr` should serialize —\n * `a`ttribute, `b`oolean, `p`roperty, `e`vent, `r`ef — with every refusal and every refused URL already\n * applied, by the same `resolve` the client uses, so the two cannot disagree.\n */\nfunction attributes(this: SpreadResult): [string, string, unknown][] {\n const out: [string, string, unknown][] = [];\n for (const key in this._props) {\n const [kind, name] = resolve(key);\n /** No element here: a property key is judged as a custom element's — the server only ever delivers one to a component. */\n const rule = urlRule(kind, name as string, true);\n const value = checked(rule, this._props[key]);\n if (kind === REFUSED || value === REFUSE) continue;\n out.push([kind === ATTR ? 'a' : kind === BOOLEAN ? 'b' : kind === EVENT ? 'e' : kind === REF ? 'r' : 'p', name as string, value]);\n }\n return out;\n}\n\n/** The branded, self-applying result — what the renderer's element position recognizes. */\ntype SpreadResult = {\n _props: Record<string, unknown>;\n _$apply$: unknown;\n _$attrs$: unknown;\n};\n\n/**\n * Binds every key of `props` to the element it is placed on. Keys follow the template sigils — `.prop`,\n * `?bool`, `@event` (or `onClick`), `&ref`, `!live` — and a plain key is an attribute.\n *\n * Already-branded input is returned as-is (JSX compiles `{...spread(x)}` to a spread of a spread). A\n * value that is not a plain object is refused in BOTH builds — a string would otherwise be iterated by\n * character index into attributes named `0`, `1`, `2` — and development says so.\n */\nexport const spread = (props: object | null | undefined): SpreadResult => {\n if (props !== null && typeof props === 'object' && typeof (props as SpreadResult)._$apply$ === 'function')\n return props as SpreadResult;\n if (props === null || typeof props !== 'object' || Array.isArray(props)) {\n if (__DEV__)\n console.warn(\n diagnostic('spread', 'spread()', 'spread-not-object',\n __DEV__ && PROSE['spread-not-object'](Array.isArray(props) ? 'an array' : typeof props === 'object' ? 'null' : `a ${typeof props}`))\n );\n props = {};\n }\n return { _props: props as Record<string, unknown>, _$apply$: apply, _$attrs$: attributes };\n};\n\n/** Every key as a property: `props({ items })` is `spread({ '.items': items })` — how a component receives data. */\nexport const props = <T extends object = Record<string, unknown>>(values: Partial<T>): SpreadResult => {\n const sigiled: Record<string, unknown> = {};\n for (const key of Object.keys(values)) sigiled[`.${key}`] = (values as Record<string, unknown>)[key];\n return spread(sigiled);\n};\n","/**\n * **`@verajs/renderer/tag`'s diagnostics, keyed by code — DEVELOPMENT ONLY** (referenced behind `__DEV__`, so a\n * production bundle drops it). One table per bundle entry, so the tag entry's development bundle carries only its own\n * prose; `scripts/sync-diagnostics.mjs` merges the renderer's tables into `packages/renderer/diagnostics.json`. A tagged\n * template called as a function is core's `tag-called`, and an object `style` and a void element's children are the\n * jsx compiler's facts too (`style-object`, `void-children`) — all three raised from shared-utils' table.\n */\nimport type { Prose } from '@verajs/shared-utils';\n\nexport const PROSE: Record<string, Prose> = {\n 'tag-position': (tag) => [\n `a tag (\\`${tag}\\`) may only stand in tag position — \\`<\\${T}>…</\\${T}>\\`.`,\n 'Spliced anywhere else it would become text or part of an attribute, which a tag never means.',\n ],\n 'tag-interpolation': () => [\n 'only another tag may be interpolated — a string cannot become markup.',\n 'Interpolate a tag: tag`${Base}-card`, where Base is itself a tag.',\n ],\n 'tag-name': (text) => [\n `${text} is not an element name. A tag names ONE element — letters, then letters, digits, '.', '_' or '-' — and nothing else becomes markup here.`,\n 'Attributes and content belong in the template: html`<${heading} class=\"title\">…</${heading}>`.',\n ],\n 'tag-key': () => [\n '`key` does nothing on a tag component and has been dropped — a key marks a template for list reconciliation, and this call returns one rather than being one.',\n 'In JSX, write it and the compiler handles it: `<Row key=${id}>` becomes `keyed(id, Row({…}))`. Calling by hand, wrap it yourself: `keyed(id, Row({…}))`.',\n ],\n 'tag-inner-html': () => [\n '`dangerouslySetInnerHTML` is not available on a tag component and has been dropped. A tag binds through `spread`, whose names are only known at runtime — so it refuses `.innerHTML` outright rather than open an unreviewable HTML sink.',\n \"Write the element directly, with the value sanitized first: html`<${Tag} .innerHTML=${trusted}>` (see the renderer README's security note).\",\n ],\n};\n","import { spread } from './spread.js';\nimport { diagnostic, misuse, SHARED } from '@verajs/shared-utils';\nimport { PROSE } from './tag-diagnostics.js';\n\n/**\n * `@verajs/renderer/tag` — an element whose **tag name** is decided at runtime.\n *\n * A template renderer bakes tag names into its statics; that is what makes template identity work\n * and what every fast path in this renderer depends on. So a runtime tag cannot be a binding — it\n * has to become part of the statics *before* the renderer sees the template, which is what this\n * entry does. Downstream nothing changes: the renderer, `@verajs/ssr` and hydration all receive an\n * ordinary template and are unaware this exists.\n *\n * ```js\n * import { html, tag } from '@verajs/renderer/tag';\n *\n * const HEADING = { 1: tag`h1`, 2: tag`h2`, 3: tag`h3` };\n * const H = HEADING[state.level];\n * html`<${H} class=\"title\">${state.text}</${H}>`;\n * ```\n *\n * **A tag is also a JSX component**, so the same value works in both notations with no compiler\n * change — `<H className=\"title\">{state.text}</H>` compiles to `H({…})`, which is exactly what a\n * capitalized JSX tag already compiles to.\n *\n * Additive, like `@verajs/renderer/spread` and unlike the other entries: it inlines no renderer\n * internals, so it is safe alongside any of them.\n */\n\n/** The brand a tag carries. `_$…$` is exempt from this package's `/^_[a-z]/` property mangling. */\nconst STATIC = '_$static$';\n\n/** The 14 void elements — the renderer's development tag-shape pass reads the same list. */\nconst VOID_TAGS = /^(?:area|base|br|col|embed|hr|img|input|link|meta|source|track|wbr|param)$/i;\n\ntype Tag = ((props?: Record<string, unknown>) => unknown) & { [STATIC]: string };\n\n/**\n * Spliced statics, keyed by the call site's own `strings` array and then by the tags in it.\n *\n * The cache is the whole reason this works. `_shape === value.strings` is the renderer's identity\n * check, so a fresh array per render would never match and every render would rebuild the subtree.\n * A `WeakMap` on the call site's array means the entries die with the module that holds them, and\n * the inner keys are bounded by the tags in the source — which is exactly what `tag` refusing a\n * string guarantees.\n */\nconst caches = new WeakMap<TemplateStringsArray, Map<string, string[]>>();\n\n/**\n * The `html` to use in a template containing a runtime tag. With no tags in it, this is the\n * ordinary template shape and costs one loop.\n *\n * It builds `{ _$litType$: 1, strings, values }` directly rather than calling core's `html`, so this\n * entry keeps the renderer's independence from core.\n */\nexport const html = (strings: TemplateStringsArray, ...values: unknown[]) => {\n let key = '';\n for (let i = 0; i < values.length; i++) {\n const value = values[i] as Tag | undefined;\n if (value && value[STATIC] !== undefined) {\n /**\n * A tag belongs in TAG position only. Spliced anywhere else it became text, an attribute value, or an attribute\n * NAME (`<p ${T}=${v}>`) — a route around the renderer's refusal of a name expression. Development only: the\n * name text is fixed by source either way, so this is consistency, not safety.\n */\n if (__DEV__ && !(strings[i].endsWith('<') || strings[i].endsWith('</')))\n throw new Error(misuse('tag', 'tag-position', __DEV__ && PROSE['tag-position'](value[STATIC])));\n key += `${i}:${value[STATIC]};`;\n }\n }\n if (key === '') return { ['_$litType$']: 1, strings, values };\n\n let byTags = caches.get(strings);\n if (byTags === undefined) caches.set(strings, (byTags = new Map()));\n let spliced = byTags.get(key);\n if (spliced === undefined) {\n spliced = [];\n let run = strings[0];\n for (let i = 0; i < values.length; i++) {\n const value = values[i] as Tag | undefined;\n if (value && value[STATIC] !== undefined) run += value[STATIC] + strings[i + 1];\n else {\n spliced.push(run);\n run = strings[i + 1];\n }\n }\n spliced.push(run);\n /**\n * A spliced array is a template's strings, so it carries `raw` as a tagged literal's does: that own property is\n * how a renderer tells a template from data shaped like one (parsed JSON cannot give an array a `raw`).\n */\n (spliced as string[] & { raw?: string[] }).raw = spliced;\n byTags.set(key, spliced);\n }\n\n const bindings: unknown[] = [];\n for (let i = 0; i < values.length; i++) {\n const value = values[i] as Tag | undefined;\n if (!(value && value[STATIC] !== undefined)) bindings.push(value);\n }\n return { ['_$litType$']: 1, strings: spliced, values: bindings };\n};\n\n/**\n * React's names, mapped the way `@verajs/jsx` maps them on a written element — so `<H1\n * className=\"t\" disabled={d}>` and `<h1 className=\"t\" disabled={d}>` mean the same thing.\n *\n * Not cosmetic. Passed through raw, `disabled={false}` becomes the attribute `disabled=\"false\"`,\n * and any value at all disables the control; `className` lands as `classname` and never applies.\n *\n * Deliberately duplicated from the transform rather than shared through a package: the two are\n * build-time and runtime, and `tests/jsx-name-mapping.test.mjs` asserts they agree on every key —\n * which is the drift protection a shared module would have bought, without the dependency.\n */\nexport const BOOLEAN_ATTRIBUTES = new Set([\n 'disabled', 'hidden', 'readonly', 'required', 'open', 'selected', 'multiple',\n 'autofocus', 'autoplay', 'controls', 'loop', 'muted', 'playsinline', 'inert', 'reversed',\n]);\n/**\n * ONE table, with no prototype: React's names (`className`, `htmlFor`), the form controls' properties and defaults,\n * the booleans (`?disabled`), and `ref` — the prop that names a BINDING rather than an attribute. The compiler must\n * not rewrite `ref` on a component (`<Card ref={r}>` hands it to `Card`), but a tag's component forwards to a real\n * element, so at THIS boundary it has a binding to become; before 2026-09-12 it fell through to the attribute sink\n * and wrote the function's SOURCE TEXT into the DOM.\n *\n * No prototype, because four plain object literals answered for `constructor`, `toString` and the rest of\n * `Object.prototype` — those props were mapped to a function, refused as a name, and silently dropped.\n */\nconst NAMES = {\n __proto__: null,\n className: 'class',\n htmlFor: 'for',\n /** Controlled, compared with the control's LIVE state — the compiler's twin (`@verajs/jsx`) maps them the same. */\n value: '!value',\n checked: '!checked',\n defaultValue: 'value',\n defaultChecked: '?checked',\n ref: '&ref',\n} as unknown as Record<string, string>;\nfor (const name of BOOLEAN_ATTRIBUTES) NAMES[name] = `?${name}`;\n\nexport const jsxName = (key: string): string => NAMES[key] ?? key;\n\n/**\n * **On a CUSTOM element a bare prop is a PROP** — exactly the rule `@verajs/jsx` compiles `<my-el foo={x}>` by: React's\n * renames first (`className` → `class`, `htmlFor` → `for`), `ref` its binding, a sigil or `on…` passed through, and any\n * other name that could be a JS property becomes `.name` — the HTML-control guesses (`?disabled`, `.value`) never reach\n * a component, whose `disabled` is its own prop. A name that cannot be a property (`data-x`, `aria-label`) and the two\n * names the DOM itself renamed (`class`, `for`) stay attributes.\n */\nconst componentName = (key: string): string =>\n key === 'className'\n ? 'class'\n : key === 'htmlFor'\n ? 'for'\n : key === 'ref'\n ? '&ref'\n : /^[.?@&!]|^on[A-Z]/.test(key) || !/^[A-Za-z_$][\\w$]*$/.test(key) || key === 'class' || key === 'for'\n ? key\n : `.${key}`;\n\n\n/**\n * Declares a tag name.\n *\n * **A string can never become one.** Only another tag may be interpolated, so the set of tags an\n * app can produce is fixed by its source — which is what keeps a tag out of reach of a request, and\n * incidentally what bounds the template cache. There is no `unsafeStatic` here for the same reason\n * there is no `unsafeHTML`: a sanctioned opt-out reads as blessed in tutorials and in review.\n */\nexport const tag = (strings: TemplateStringsArray, ...values: unknown[]): Tag => {\n /**\n * A *template tag*, so it is written `` tag`h1` `` and not `tag('h1')`. The call form is the\n * likelier mistake of the two and failed with `Cannot read properties of undefined (reading '0')`,\n * which says nothing about either.\n */\n /**\n * In EVERY build: in production `tag('h1')` read the STRING's first character as the template's first static and\n * named an `<h>`, silently — a wrong element only production renders. The explanation is development's.\n */\n if (!(strings as { raw?: unknown } | null)?.raw)\n throw new TypeError(misuse('tag', 'tag-called', __DEV__ && SHARED.tagCalled('tag', typeof strings === 'string' ? JSON.stringify(strings) : String(strings), typeof strings === 'string' ? strings : 'h1')));\n let text = strings[0];\n for (let i = 0; i < values.length; i++) {\n const value = values[i] as Tag | undefined;\n if (!value || value[STATIC] === undefined)\n throw new Error(misuse('tag', 'tag-interpolation', __DEV__ && PROSE['tag-interpolation']()));\n text += value[STATIC] + strings[i + 1];\n }\n\n /**\n * **A tag's text must be an element NAME.** Until this, it was an unconstrained string spliced\n * straight into the statics — so `` tag`div onclick=x` `` produced markup rather than a tag, and\n * the name of this export was a description of intent rather than of behavior.\n *\n * The concrete failure it closes is a cache collision. Spliced statics key on\n * `` `${i}:${text};` `` per tag, joined with separators the text was free to contain, so two\n * DIFFERENT tag assignments at one call site could derive the same key and reuse each other's\n * markup. Measured: at a two-tag call site, `(a, \"b;1:c\")` and `(\"a;1:b\", c)` both derive\n * `\"0:a;1:b;1:c;\"`, and the second render came back as the FIRST one's markup.\n *\n * Escaping the separators would have fixed that one collision. Constraining the name fixes the\n * class — no name can contain a separator, so no key can be ambiguous, and the export delivers\n * what it is called. A closed grammar beats a wider escape, which is the same ruling this audit\n * reached for the attribute-value sink.\n *\n * Unconditional, like the interpolation refusal above and unlike the shape check: both are about\n * what may become markup, and a production build is where that matters most.\n */\n if (!/^[a-zA-Z][a-zA-Z0-9._-]*$/.test(text))\n throw new Error(\n /**\n * The THROW is unconditional; its EXPLANATION is not. Carrying the full sentence cost 178 B\n * gzipped here — most of a 1.9 KB entry — for text an author reads once and a production\n * page never reaches. Core's static-render refusal is shaped the same way for the same\n * measurement.\n */\n misuse('tag', 'tag-name', __DEV__ && PROSE['tag-name'](JSON.stringify(text)))\n );\n\n /**\n * The tag is a function, which is what makes it a JSX component: the compiler emits `H({…})` for\n * a capitalized tag, and this is what receives that call. `children` is JSX's own key; everything\n * else goes through `spread`, since the names are not known when this template is written.\n */\n const self = ((\n { children, key, dangerouslySetInnerHTML: rawHtml, ...props }: Record<string, unknown> = {}\n ) => {\n /**\n * **`key` and `dangerouslySetInnerHTML` come out of the bag by name**, because neither is an\n * attribute and the sink they fell into accepts anything. `key` became the literal attribute\n * `key=\"7\"` on the element AND cost the list its identity — rows then reconciled positionally,\n * so focus, scroll and input state followed the index rather than the item.\n *\n * `@verajs/jsx` consumes `key` into `keyed(…)` before this is ever called, so the compiled path\n * never reaches here. This is the HAND-CALL backstop — `H({ key: id })` — where no compiler is\n * looking, and dropping it silently would be a refusal with no channel, hence the warning.\n */\n if (__DEV__ && key !== undefined)\n console.warn(diagnostic('tag', `<${text}>`, 'tag-key', __DEV__ && PROSE['tag-key']()));\n /**\n * **`dangerouslySetInnerHTML` cannot work here, and that is a security property rather than a\n * gap.** A tag reaches its element through `spread`, and `spread` REFUSES `.innerHTML` on\n * purpose: its names arrive at runtime, which is what makes that sink unreviewable. Mapping the\n * prop was tried and measured — 37 B for a value `spread` then declined, so the bytes bought a\n * console message. Refused here instead, where the reason can be said.\n */\n if (__DEV__ && rawHtml !== undefined)\n console.warn(diagnostic('tag', `<${text}>`, 'tag-inner-html', __DEV__ && PROSE['tag-inner-html']()));\n /** No prototype, and `__proto__` is no prop: a bag key by that name would otherwise reach `spread` as one. */\n const mapped = { __proto__: null } as unknown as Record<string, unknown>;\n for (const name in props)\n if (name !== '__proto__') {\n /** The compiler refuses an object `style` at build time; written into the attribute it reads \"[object Object]\". */\n if (__DEV__ && name === 'style' && props[name] !== null && typeof props[name] === 'object')\n throw new TypeError(misuse('tag', 'style-object', __DEV__ && SHARED.styleObject('style: `color:${c}`')));\n mapped[(custom ? componentName : jsxName)(name)] = props[name];\n }\n /**\n * A void element has no content and no end tag: `</br>` is read as a SECOND `<br>`, and a child anchor strays. So\n * children given to one would vanish silently — development says so (an empty list is no content).\n */\n if (__DEV__ && empty && children != null && !(Array.isArray(children) && children.length === 0))\n throw new Error(misuse('tag', 'void-children', __DEV__ && SHARED.voidChildren(text, 'children given to it would vanish')));\n return empty ? html`<${self} ${spread(mapped)}>` : html`<${self} ${spread(mapped)}>${children}</${self}>`;\n }) as Tag;\n const empty = VOID_TAGS.test(text);\n /**\n * A custom element's props map by the compiler's component rule — never by the HTML-control guesses. A dash name is\n * enough here: the compiler also excludes eight reserved SVG/MathML names (`font-face`, `annotation-xml`…), which\n * cost 77 B to carry and which a tag essentially never names (Brian, 2026-10-01).\n */\n const custom = text.includes('-');\n self[STATIC] = text;\n return self;\n};\n"],"names":["contentClash","SHARED.getterOnlyProp","SHARED.upgradeClobber","SHARED.contentClash","SHARED.selectMultiple","PROSE","SHARED.protoBinding","SHARED.srcdocAttribute","SHARED.handlerAttribute","SHARED.scriptUrl","SHARED.attributeValue","SHARED.notAListener","SHARED.tagCalled","SHARED.styleObject","SHARED.voidChildren"],"mappings":"AAAA;;;;;AAKG;AACI,MAAM,IAAI,GAAG,uBAAuB;AAiD3C;;;;;;;;;;;;;;AAcG;AACH;;;;AAIG;AACH;;;;AAIG;AACI,MAAM,MAAM,GAAG,CAAC,OAAe,EAAE,QAAgB,EAAE,QAA6C,KACrG,OAAO,IAAI;AACT,MAAE,CAAA,EAAG,OAAO,CAAA,EAAA,EAAK,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;MAC9E,GAAG,OAAO,CAAA,EAAA,EAAK,IAAI,CAAA,EAAG,QAAQ,EAAE;AAc/B,MAAM,UAAU,GAA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AO,EAAE,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;YAChE;AACF;;;AAGG;QACH,IAAI,OAAO,IAAI,KAAK,IAAI,QAAQ,IAAI,IAAI,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC;YAC7F,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,IAAIC,YAAmB,CAAC,IAAI,EAAE,mCAAmC,CAAC,CAAC,CAAC;AAC5H,QAAA,OAAO,KAAK,GAAG,IAAI,CAAA,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA,EAAI,MAAM,CAAC,MAAM,CAAC,CAAA,CAAA,CAAG,GAAG,IAAI,CAAA,CAAA,CAAA,EAAI,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA,CAAA,EAAI,QAAQ,CAAA,EAAA,EAAK,IAAI,GAAG;AAC3G,IAAA,CAAC,CAAQ;IACT,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;AAClC;;;;AAIG;IACH,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;AACjC,IAAA,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI;AACnB,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
1
|
+
{"version":3,"file":"vera-renderer-tag.js","sources":["../../../shared-utils/src/diagnostic.ts","../../../shared-utils/src/diagnostics.ts","../../../shared-utils/src/adopt-property.ts","../../../shared-utils/src/markup-grammar.ts","../../../shared-utils/src/utils.ts","../../src/dev-values.ts","../../src/spread-diagnostics.ts","../../src/spread.ts","../../src/tag-diagnostics.ts","../../src/tag.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","/**\n * **The codes more than one package prints — DEVELOPMENT ONLY, except to the jsx compiler** (2026-10-09). A\n * fact said by two emitters has\n * ONE docs page and ONE text, so its prose lives here, in the lowest dependency every emitter shares, and each raises\n * it as `SHARED['code']` — never a second sentence in a second table (the dev line would stop being the docs page's\n * text). Referenced only behind `__DEV__`, so production drops it whole — but the jsx COMPILER raises `voidChildren`\n * and `styleObject` in every build: a compile error is a build tool's only output, and Vite loads the production one. `scripts/sync-diagnostics.mjs` publishes it\n * as `packages/shared-utils/diagnostics.json`; the uniqueness check sees each code here once.\n *\n * Also the home of messages shared-utils' OWN code prints on a renderer's behalf (adopt-property, markup-grammar,\n * isSelection) — the same rule: the emitter is shared, so the text is.\n *\n * **One named export per code, never one object** (measured 2026-10-09): rollup cannot drop an unused KEY of\n * an object literal, so a shared `PROSE` object put every shared message into every importer's development bundle.\n * A named export is dropped per function. **The export's name IS the code** — `tagCalled` is `tag-called` — so the\n * map sync and the tests read is derived (`proseOf`, scripts/diagnostic-tables.mjs), never kept by hand, and a call\n * `SHARED.tagCalled(…)` names its code exactly once.\n */\nimport type { Prose } from './types.js';\n\n/**\n * core's `html`/`svg`/`mathml` and the renderer's `tag` — a tagged template called as a function. The FACT is shared;\n * the EXAMPLE is each emitter's: `html` writes markup, `tag` an element name — so the emitter passes it.\n */\nexport const tagCalled: Prose = (tag, received, example) => [\n `expected a template literal and received ${received}.`,\n `It is a tagged template — write ${tag}\\`${example}\\`, not ${tag}('${example}').`,\n];\n/**\n * A template in a text-only element (`<style>`, a JSON data block, `<title>`, `<textarea>`): its content is text. Lite\n * refuses it, and so does the renderer in a style or JSON block (the server: `ssr-template-in-text`); in a `<title>` or\n * `<textarea>` the renderer places it, as it always has, and says so in development only. A list there is joined.\n */\nexport const templateInText: Prose = () => [\n 'a template inside a text-only element (`<style>`, a JSON `<script>`, `<title>`, `<textarea>`, or never-shown content: `<noscript>`, `<iframe>`) is never shown as markup — its content is text.',\n 'Render a string there; a list of strings is joined.',\n];\n/** A template that ends inside a tag: the renderer refuses it in development, the lite tier in every build. */\nexport const unfinishedTag: Prose = () => [\n 'a template cannot end inside a tag — the parser drops an unfinished tag.',\n 'Close the tag inside the template.',\n];\n/** core's props adoption on an `init()` element, and the renderer's on any other element. */\nexport const getterOnlyProp: Prose = (key) => [\n `received a bound property \\`.${key}\\` (or \\`!${key}\\`), but its class declares \\`${key}\\` as a getter with no setter — the value cannot be delivered and the binding is ignored.`,\n 'Add a setter, or stop binding it.',\n];\n/** shared-utils' `adoptProperty` (renderer, spread): an element that never drains the record loses it at upgrade. */\nexport const upgradeClobber: Prose = (name) => [\n `the value bound to \\`${name}\\` was replaced while the element upgraded. A class field is the usual cause: at ES2022 \\`${name}?: …\\` emits \\`${name};\\`, which runs during upgrade and overwrites whatever was set beforehand.`,\n `Write it \\`declare ${name}?: …\\` instead. A component that calls init() adopts bound properties automatically and never sees this; this element did not. Ignore this if the component replaced the value on purpose.`,\n];\n/** shared-utils' `isSelection` (renderer, spread). */\nexport const selectMultiple: Prose = (name) => [\n `\\`${name}\\` controls only ONE selection here, and a selection the user adds is kept — it is not controlled.`,\n 'Bind `?selected=${…}` on each <option> to control every selection.',\n];\n/** shared-utils' `contentClash` (renderer, spread): a content-replacing property beside content of the element's own. */\nexport const contentClash: Prose = (tag, name, alone) => [\n `<${tag}> binds \\`.${name}\\`, which replaces the element's content, and also has content of its own — markup or a child binding, which the write would strand.`,\n `Bind one or the other: the property alone (\\`${alone}\\`), or the content alone.`,\n];\n/** shared-utils' `tagHole` (renderer; @verajs/ssr keeps a twin). */\nexport const tagHole: Prose = () => [\n 'an expression in tag position (`<${…}>`) cannot be a tag name — a tag name must be a tag value.',\n \"Use `tag`h1`` from @verajs/renderer/tag, with that entry's `html`.\",\n];\n/** core's `wire` (at wire time) and the renderer (a template built before slots was wired, at render). */\nexport const lateTemplateModule: Prose = () => [\n \"a 'template' or 'element' module (namespaces, elements, slots) was wired after the renderer had already built templates — those never ask it, and keep rendering without it.\",\n 'Wire it beside the renderer, before the first render.',\n];\n/** The renderer and spread (two bundles); @verajs/ssr refuses the same URLs silently today. */\nexport const scriptUrl: Prose = (name) => [\n `\\`${name}\\` was given a javascript: URL — refused, and the attribute removed.`,\n 'A bound URL is data, and data must never become code.',\n];\n/**\n * The renderer and spread: `kind` is what the value was (dev-values' `attributeValueKind`); `property` is the\n * emitter's own spelling of a property binding — a template's `.name=${value}`, a spread's `'.name': value`.\n */\nexport const attributeValue: Prose = (name, kind, property) => [\n `the attribute \\`${name}\\` was given ${kind}. An attribute value is a string and nothing else.`,\n `If the element is meant to RECEIVE this value, bind a property instead — \\`${property}\\` — which is how a custom element takes anything that is not text. If it is meant to be read as text, convert it where you know what it means: \\`date.toISOString()\\`, \\`list.join(' ')\\`. A Date in particular serializes with the SERVER's timezone on one side and the browser's on the other, so it will not survive hydration.`,\n];\n/** The renderer and spread: `type` is the value's `typeof`. */\nexport const notAListener: Prose = (name, type) => [\n `@${name} was given ${type === 'object' ? 'an object with no handleEvent method' : `a ${type}`}, which cannot listen — the event will do nothing.`,\n 'Pass a function, or an object with a handleEvent method. A missing handler is `undefined` or `false`, both of which are fine; this is neither.',\n];\n/** The renderer (and @verajs/ssr's twin): an expression inside an attribute NAME. */\nexport const nameExpression: Prose = (written, given) => [\n `an attribute name cannot be an expression — \\`${written}\\` is read by the parser before any value exists.`,\n `A name known only at runtime is a spread: \\`\\${spread({ [\\`${written}\\`]: ${given} })}\\` (from @verajs/renderer/spread).`,\n];\n/** The renderer and lite (`namespaces.ts`): an element placed where its namespace does not render. `advice` is built there. */\nexport const wrongNamespace: Prose = (tag, built, host, advice) => [\n `<${tag}> was built as ${built} and placed inside <${host}>, where it will not render.`,\n advice,\n];\n/** The renderer (and, ruled 2026-10-09, @verajs/ssr): data shaped like a template, not made by `html`. */\nexport const forgedTemplate: Prose = () => [\n 'is shaped like a template but was not made by html`` — rendered as text.',\n 'A template from data (JSON, or html([markup])) is never markup; for trusted markup, bind it: <div .innerHTML=${markup}>.',\n];\n/** The renderer and spread (two bundles; @verajs/ssr refuses the same): binding `__proto__`. */\nexport const protoBinding: Prose = (written) => [\n `binds \\`${written}\\`, which would replace the element's own prototype and destroy it — no property write does this, and no use of it is legitimate.`,\n 'The binding is ignored.',\n];\n/** The renderer and spread: a bound `srcdoc` ATTRIBUTE. `property` is the emitter's spelling of the property binding. */\nexport const srcdocAttribute: Prose = (property) => [\n 'binds the `srcdoc` attribute, which renders its value as an HTML document — refused.',\n `If the markup is trusted and sanitized, bind the property: \\`${property}\\`.`,\n];\n/** The renderer and spread: a bound inline-handler attribute (`onclick`). `event` is the emitter's event spelling(s). */\nexport const handlerAttribute: Prose = (name, event) => [\n `binds the \\`${name}\\` attribute, which runs its value as code — refused.`,\n `Bind a function as an event instead: ${event}.`,\n];\n/**\n * The jsx compiler and the renderer's `tag` — children given to a void element. Both refuse; the FATE the refusal\n * prevents is each emitter's: compiled, they would land after the element; through `tag`, vanish.\n */\nexport const voidChildren: Prose = (tag, fate) => [\n `<${tag}> is a void element — it has no end tag and takes no children, so ${fate}; refused.`,\n 'Move the children out, or use an element that takes content.',\n];\n/** The jsx compiler and the renderer's `tag` — an object `style`. The EXAMPLE is each emitter's spelling. */\nexport const styleObject: Prose = (example) => [\n 'style expects a STRING, not an object.',\n `Build the string: ${example}.`,\n];\n/**\n * An option a module or loader does not have — autoloader(), directiveLoader(), router(), and the directives packs\n * remote(), sensors(), motion(). One fact and one fix; the module is the line's SUBJECT and the list is its own.\n */\nexport const unknownOption: Prose = (key, list) => [\n `\\`${key}\\` is not an option, so it was ignored.`,\n `The options are ${list}.`,\n];\n\n/* ── `define`'s checks (define-checks.ts) and the setup's result: said by `@verajs/core` and `@verajs/lite` (moved from core's table, 2026-11-17) ── */\nexport const defineAttributeReflected: Prose = (prop) => [\n `observes an attribute whose prop, \\`${prop}\\`, is one the platform's element already REFLECTS — this tag's accessor replaces it, so setting \\`el.${prop}\\` no longer does what the platform's does (it no longer writes the attribute).`,\n 'Observe it only if the component owns that attribute; otherwise read it in the render with `host.getAttribute(…)`.',\n];\nexport const defineAttributeType: Prose = (prop, type) => [\n `shares the prop \\`${prop}\\`, whose default is a ${type} — and the attribute arrives as a STRING, so the prop changes type the moment it appears.`,\n 'Give the prop a string (or null) default, and convert in the render; or keep the attribute and the prop under different names.',\n];\nexport const defineAttributes: Prose = (received) => [\n `expected an array of attribute names and received ${received}.`,\n \"List them: `attributes: ['label', 'data-count']` — each arrives as a prop (`label`, `dataCount`).\",\n];\nexport const defineMethodAdopted: Prose = () => [\n 'an `adoptedCallback` costs every element of this tag its creation (measured +7.4% on create10k), and it is installed.',\n 'Keep it only if moving elements between documents needs it.',\n];\nexport const defineMethodIgnored: Prose = (name) => [\n `\\`${name}\\` is core's own on a define-made class, so this one is never installed (in any build).`,\n name === 'constructor'\n ? 'A setup is where per-instance work goes: `define(tag, (host) => { … })`.'\n : 'Put connect-time work in the setup; for work on removal, a `disconnectedCallback` in methods runs as the teardown hook.',\n];\nexport const defineMethodNotFunction: Prose = () => [\n 'is not a function, so it is installed as a plain value shared by every instance — and a getter ran ONCE, here.',\n 'Methods are functions; a value that changes per element is a prop (`props: { name: default }`).',\n];\nexport const defineMethodUnobserved: Prose = () => [\n 'never fires: the class observes no attributes, and it is installed anyway.',\n \"Declare them: `define({ tag, attributes: ['label'] }, …)` — each then arrives as a prop.\",\n];\nexport const definePropMethod: Prose = (name) => [\n `\\`${name}\\` is also a method, and the prop wins (it is installed after the methods), in every build.`,\n 'Give the method or the prop another name.',\n];\nexport const definePropSharedDefault: Prose = () => [\n 'this default is an object that cannot be copied per element (a Set, a Map, a class instance), so EVERY element of the tag shares this one — a change through one shows in all.',\n 'Declare it `null` and create it in the setup (`props: { selected: null }`, then `host.selected = new Set()`), or pass it in; arrays and plain objects are copied per element.',\n];\nexport const definePropsNotObject: Prose = (received) => [\n `expected an object of names and their defaults and received ${received}, so no prop is declared.`,\n \"Name each prop with its default: `props: { heading: '', items: [] }`.\",\n];\nexport const defineProtoKey: Prose = (kind) => [\n `is skipped, in every build: written onto the ${kind === 'prop' ? 'props record' : 'class prototype'} it would replace a prototype instead of adding a ${kind}.`,\n 'Rename the key. An own `__proto__` comes from `JSON.parse` or `Object.defineProperty`, never from an object literal.',\n];\nexport const defineSetup: Prose = (received) => [\n `the second argument is the SETUP, a function, and received ${received}.`,\n 'Pass the setup after the tag or the options: `define(\\'x-card\\', (host) => () => html`…`)`.',\n];\nexport const defineShadows: Prose = (name) => [\n `replaces the platform's \\`${name}\\` for every user of these elements — scripts, libraries and the browser's own callers — and it is installed.`,\n 'Give it a name of its own, unless replacing the platform member is the point.',\n];\nexport const defineTag: Prose = (received) => [\n `expected a custom element name — a string with a hyphen, not at the start — and received ${received}.`,\n \"Name it the way the platform requires: `define('x-card', setup)` or `define({ tag: 'x-card' }, setup)`.\",\n];\nexport const defineTwice: Prose = (tag) => [\n `<${tag}> is already defined; the platform refuses a second definition of a tag and throws next.`,\n 'Define each tag once, at module level. A live swap of a component while developing needs the development swap module, wired before the first define.',\n];\nexport const setupReturnedValue: Prose = (kind) => [\n `its setup returned ${kind}, not a render function, so it rendered once and will never update.`,\n 'Return a render function — `return () => html`…`;` — the setup runs once, the render on every change.',\n];\n","import type { PropertyHost } from './types.js';\nimport { diagnostic } from './diagnostic.js';\nimport * as SHARED from './diagnostics.js';\n\n/**\n * **Delivering a bound property to a custom element that may not receive it yet** — the one home of the\n * rule `@verajs/renderer` (a `.prop` template binding) and `@verajs/renderer/spread` (a `.prop` bag key)\n * both apply. They ship as separate bundles that cannot import each other, so this package, inlined into\n * each, is where the rule lives once; before, each carried a full copy and a fix had to visit both.\n *\n * Returns where the binding stands after this write:\n * - `0` — still adopting: nothing received the value, so it was recorded in the element-carried\n * `_$props$`, which core's `init()` drains over whatever the class's field initializers wrote at\n * upgrade. Call again on the next write.\n * - `1` — received (a setter anywhere on the chain, an initialized component's `_$adopt$`, or an element\n * that is already upgraded): later writes are plain property writes.\n * - `2` — refused: a getter with no setter, where the plain write would throw. Later writes do nothing.\n *\n * `_$props$` and `_$adopt$` are `$`-named because they cross bundle boundaries (renderer, spread, core)\n * and must survive property mangling.\n *\n * **`_$adopt$` is a BRAND, not just a slot:** present means \"core has initialized this component\", which is what routes\n * a delivery to the live accessor (`1`) instead of the `_$props$` record. Do not move it to a class's PROTOTYPE\n * (2026-10-10): every instance would carry it BEFORE `init`, and a delivery to an upgraded-but-uninitialized element\n * would be adopted into a store that does not exist yet. It is ONE shared function written onto each element at `init`,\n * called with the element as `this` (`adopt.call(element, …)`) — 2026-10-11: the closure it replaced was free in\n * optimized code (measured) but cost Chrome's interpreted first render one allocation per component.\n */\n\n/** Development only: getter-only names already reported, per element — a `!name` re-asserts on every render. */\nlet refused: WeakMap<PropertyHost, Set<string>> | undefined;\n\nexport const adoptProperty = (element: PropertyHost, name: string, value: unknown): 0 | 1 | 2 => {\n /**\n * **`__proto__` is refused HERE, at the receiver** (2026-11-10): `element.__proto__ = v` replaces the element's\n * prototype, and an own `__proto__` key reaches a bag through `JSON.parse`. This is the choke point every delivery\n * passes; the renderer's template binding and spread's bag key refuse it first, with a development warning naming\n * where it was written (their second addresses: renderer.ts `proto-binding`, spread.ts refusal 3).\n */\n if (name === '__proto__') return 2;\n const adopt = element._$adopt$ as ((key: string, value: unknown) => void) | undefined;\n /** The walk comes first: what it finds decides whether writing is even legal. */\n for (let carrier: object | null = element; carrier !== null; carrier = Object.getPrototypeOf(carrier)) {\n const desc = Object.getOwnPropertyDescriptor(carrier, name);\n if (desc === undefined) continue;\n if (desc.set !== undefined) {\n element[name] = value;\n return 1;\n }\n if (desc.get !== undefined) {\n if (adopt !== undefined) adopt.call(element, name, value);\n else if (__DEV__) {\n const names = (refused ??= new WeakMap()).get(element) ?? new Set<string>();\n refused.set(element, names);\n if (!names.has(name)) {\n names.add(name);\n console.warn(diagnostic('renderer', `<${element.localName}>`, 'getter-only-prop', __DEV__ && SHARED.getterOnlyProp(name)));\n }\n }\n return 2;\n }\n break; // a data property: an own field, or an inherited default — nothing receives it\n }\n element[name] = value;\n if (adopt !== undefined) {\n adopt.call(element, name, value);\n return 1;\n }\n const record = (element._$props$ ??= {}) as Record<string, unknown>;\n const first = __DEV__ && !Object.hasOwn(record, name);\n record[name] = value;\n /** Upgrade is read off the PROTOTYPE — a bag key named `constructor` can shadow `el.constructor`. The realm is the element's. */\n const view = element.ownerDocument.defaultView as unknown as {\n HTMLElement: { prototype: object };\n customElements: CustomElementRegistry;\n } | null;\n const upgraded = view === null || Object.getPrototypeOf(element) !== view.HTMLElement.prototype;\n /** Development only: an element that never drains still loses the value at upgrade — told apart by ownership. */\n if (__DEV__ && view !== null && !upgraded && first) {\n const tag = element.localName;\n view.customElements.whenDefined(tag).then(() => {\n let owned = false;\n for (let carrier: object | null = element; carrier !== null; carrier = Object.getPrototypeOf(carrier)) {\n const desc = Object.getOwnPropertyDescriptor(carrier, name);\n if (desc === undefined) continue;\n owned = desc.get !== undefined || desc.set !== undefined;\n break;\n }\n if (!owned && element[name] !== record[name])\n console.warn(diagnostic('renderer', `<${tag}>`, 'upgrade-clobber', __DEV__ && SHARED.upgradeClobber(name)));\n });\n }\n return upgraded ? 1 : 0;\n};\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","import type { HandlerHolder, Untracked } from './types.js';\nimport { diagnostic } from './diagnostic.js';\nimport * as SHARED from './diagnostics.js';\n\n/**\n * Get an object's type.\n *\n * @param obj The object\n * @return The type\n */\nexport const getType = (obj: unknown) => Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();\n\n/**\n * Weak collections need their per-key dependencies stored weakly, or tracking `weakMap.get(obj)`\n * holds `obj` and defeats the whole point of the type. Checked by type string rather than\n * `instanceof`, which fails across realms (iframes, `vm`).\n */\n/**\n * A WeakMap or WeakSet (or WeakRef) — read from `Symbol.toStringTag`, the tag `Object.prototype.toString` itself reads, so\n * the answer is the same (another realm's collections included) without building and lower-casing a string on every first\n * tracked read of every object.\n */\nexport const isWeakCollection = (item: unknown) => {\n const tag = (item as { [Symbol.toStringTag]?: unknown } | null)?.[Symbol.toStringTag];\n return typeof tag === 'string' && (tag[0] === 'W' || tag[0] === 'w');\n};\n\n/**\n * Remove a trailing slash from an url if its not root url (`/`).\n *\n * @param str String to remove trailing slash from\n */\nexport const stripTrailingSlash = (str: string) => (str !== '/' && str.endsWith('/') ? str.slice(0, -1) : str);\n\n/**\n * **Reports an error nothing else handled, the way the platform reports one.** `reportError` fires\n * the window's `error` event — what `window.onerror`, error trackers and test runners listen for —\n * without unwinding the caller, so one failing hook or ref never stops its siblings. A bare\n * `console.error` reached none of those: a component could stop updating while every page-error\n * listener stayed silent. Off-browser (Node has no `reportError`) the console is all there is.\n * `line` is the framework's own line, printed beside the error — a CODED one (2026-10-09):\n * each caller passes `'[vera] <code>'` in production and its table's `diagnostic()` sentence in development, both\n * literal codes at the call site, so the static checks read them. The subject is fixed wording too (`a hook`, `an\n * element ref`), never a tag name: this line is the console's FORMAT (no `'%s'`, which measured +2–3 B on the renderer\n * bundles), so nothing from outside may reach it — the element goes to the `'error'` handlers instead. Production prints it only where the platform has no\n * `reportError` (Node); in a browser, `reportError` alone reports.\n *\n * Shared by core (a hook threw) and the renderer (a ref threw) so the fallback is one rule.\n */\nexport const reportUncaught = (error: unknown, line: string) => {\n if (typeof reportError !== 'function') console.error(line, error);\n else {\n if (__DEV__) console.error(line, error);\n reportError(error);\n }\n};\n\n/**\n * **Reports what user code a render called threw — to the app's `'error'` chain, else as uncaught.** One rule for\n * every callback the framework runs on the user's behalf and survives: a hook (core), an element ref, and an element\n * claim's `create`/`mount`/`unmount` (the renderer). The caller catches at the call site and carries on, so one\n * failing callback never stops its siblings or leaves a commit half applied. `element` is the component the error\n * belongs to, handed to each handler. Every throw is reported — nothing is deduped, as a hook's never was.\n * **Core keeps a deliberate twin** (`reportHookError`, the same rule as a `forEach`): routed through here it measured\n * +11 B gzip on `vera.min.js` (2026-10-09). A change to the rule changes both.\n */\nexport const reportTo = (handlers: readonly unknown[] | undefined, error: unknown, element: Element | undefined, line: string) => {\n if (handlers?.length) for (const handler of handlers) (handler as (error: unknown, element?: Element) => void)(error, element);\n else reportUncaught(error, line);\n};\n\n/** The component a render root belongs to: a shadow root's host, or a light root itself. */\nexport const hostOf = (root: Node | null | undefined): Element | undefined =>\n root == null ? undefined : root.nodeType === 11 ? (root as ShadowRoot).host : (root as Element);\n\n/** `fn(a, b, c)`, tracked as the caller is — the stand-in for core's `untracked` when no core was wired. */\nexport const call: Untracked = (fn, a, b, c) => fn(a!, b!, c!);\n\n/**\n * **Runs a bound handler, and its callers run it UNTRACKED**: the renderer's template `@event` and spread's event key,\n * each through `untracked(dispatch, holder, event)` (2026-10-09). An effect that fires an event synchronously\n * (`el.click()`, `focus()`, `dispatchEvent`) runs the handler INSIDE itself, and the handler's reads subscribed the\n * effect: a handler doing `state.n++` made the effect re-run on every click, a self-feeding loop held to one round per\n * frame, forever (measured). A handler's reads are event-time decisions, never a hook's inputs. The directives engine's\n * delegated `listen` makes the same choice its own way. A function is called with the element as `this`; an object\n * through its `handleEvent`. One function for both callers (Brian's size-audit ruling, 2026-11-13): it was two\n * identical copies, so a fix had two addresses; each bundle still inlines its own.\n */\nexport const dispatch = (holder: HandlerHolder, event: Event) => {\n const handler = holder._handler as EventListener | EventListenerObject | null;\n if (typeof handler === 'function') handler.call(holder._element as never, event);\n else if (typeof handler?.handleEvent === 'function') handler.handleEvent(event);\n};\n\n/**\n * **Whether a property binding is a `<select>`'s SELECTION** — `value` or `selectedIndex` — which the renderer and\n * `spread` both treat as live: re-asserted every render and compared against the live value (as `!value` is), because\n * a select's options can be replaced under an unchanged value, which drops the selection. One rule, asked once per\n * binding by both, so a template and a spread key cannot disagree about it.\n *\n * In development it names the one shape it cannot serve: on a `<select multiple>` both properties read and set a\n * SINGLE selection, so a selection the user adds is kept rather than controlled. Always writing there was measured\n * 2–3% slower on every table with a select per row, to serve an API that does not fit — hence a warning, not a cost.\n */\nexport const isSelection = (element: Element, name: unknown) => {\n if ((name !== 'value' && name !== 'selectedIndex') || element.localName !== 'select') return false;\n return true;\n};\n\n/**\n * Development: the one shape a selection binding cannot serve, named by the module the user wired (`side`). Called only\n * behind `__DEV__` at each call site, so production keeps `isSelection` exactly as small as it was (a `side` argument on\n * it measured +1 B, a default +9 B on vera-renderer.min.js — 2026-10-09).\n */\nexport const saySelectMultiple = (element: Element, name: unknown, side: string) => {\n if (element.hasAttribute('multiple'))\n console.warn(diagnostic(side, '<select multiple>', 'select-multiple', __DEV__ && SHARED.selectMultiple(String(name))));\n};\n\n/**\n * `target[key]`, as a function — how a component's GETTER is read through `untracked`. Not `Reflect.get`: `untracked`\n * passes three arguments, and `Reflect.get`'s third is the RECEIVER — `undefined` there runs the getter with no `this`.\n */\nexport const read = (target: object, key: string) => (target as Record<string, unknown>)[key];\n\n/**\n * **What a thrown value says, whatever was thrown — and it never throws itself.** A caught value comes from author\n * code (a `resolve` option, a motion tick or vocabulary function), and JavaScript can throw anything: `null`, an object\n * with no prototype (`String()` finds no `toString`), one whose `toString` or `message` getter throws, a Proxy whose\n * traps throw. Formatting it naively replaced the real failure with an unrelated TypeError from inside the framework.\n * Anything unreadable becomes a fixed phrase; `Object.prototype.toString` is no fallback, since it reads\n * `Symbol.toStringTag` through a Proxy's trap too.\n *\n * **A deliberate duplicate of `thrownMessage` in `packages/ssr/src/vera/escaping.ts` — fix both copies.** `@verajs/ssr`\n * is compiled per file with no bundling, so it cannot import this private, unpublished package at run time;\n * `tests/thrown-message-copies.test.mjs` runs one table of thrown values against both, so they cannot drift.\n */\nexport const thrownMessage = (error: unknown): string => {\n try {\n if (error instanceof Error) return String(error.message);\n const message = (error as { message?: unknown } | null)?.message;\n return typeof message === 'string' ? message : String(error);\n } catch {\n return '[unprintable value thrown]';\n }\n};\n\n/** `data-tone` → `dataTone`: the prop an observed attribute arrives as, in every package that defines components (`@verajs/core`'s `define`, its checks, `@verajs/lite`). */\nexport const camel = (name: string) => name.replace(/-([a-z])/g, (_, c: string) => c.toUpperCase());\n","/**\n * `__DEV__` only: the one home for *\"is this value something an attribute can carry?\"*\n *\n * **Why it is a closed vocabulary and not a predicate.** The first design asked whether a value\n * stringifies meaningfully — `String(v) === '[object Object]'` means it lost its data. Driven\n * through 16 value shapes rather than reasoned about, that broke four ways, and the first is\n * disqualifying: `String()` THROWS on `Object.create(null)`, on `{ toString: null }`, and on any\n * object whose `toString` throws — so a diagnostic would have killed the page for an author using\n * the recommended dictionary idiom. It also passed `[\"a\",\"b\"]` as `\"a,b\"` (one junk class, if that\n * was a `class` binding) and `new Date()` as a timezone-bearing string, which is an SSR/CSR\n * divergence manufactured out of correct-looking code. And it passed `Symbol('s')` while\n * `` `${sym}` `` throws — a guard and its sink disagreeing about a single expression.\n *\n * \"Does it stringify meaningfully\" is an OPEN predicate over an unbounded, environment-dependent\n * space, and open predicates cannot be audited. So the test is inverted and closed: **primitives\n * pass; everything else is reported; anything else that should pass is a named row added on\n * evidence.** The list has exactly one member so far.\n *\n * Credit where it is due: the four breaks were found by the omni engine's session, which drove the\n * shapes rather than arguing about them, and the closed-vocabulary form is theirs.\n */\n\nimport { hasWarned } from '@verajs/shared-utils';\n\n/**\n * Blessed non-primitives — types whose `toString` IS the value the author means.\n *\n * Tested by brand rather than `instanceof`, which is false across realms: a `URL` built in an\n * iframe is not `instanceof` the parent's `URL`, and a diagnostic that fires on a correct value in\n * one frame and not another is worse than none.\n */\nconst brand = (value: object) => Object.prototype.toString.call(value);\n\n/** One message per element+name+kind, so a value rebuilt every render does not flood the console. */\nlet reported: Set<string> | undefined;\n\n/**\n * Returns the complaint, or `null` when the value is fine. Never throws — the shapes that break a\n * naive guard are exactly the ones worth reporting, so they reach the `object` arm and are named.\n */\nexport const attributeValueKind = (tag: string, name: string, value: unknown): string | null => {\n const type = typeof value;\n if (type === 'string' || type === 'number' || type === 'boolean' || type === 'bigint') return null;\n if (type === 'object' && brand(value as object) === '[object URL]') return null;\n\n /**\n * Keyed by BRAND, not by `typeof` — `Date`, `Array` and a plain object are all `'object'`, so a\n * coarser key reported whichever arrived first and silently swallowed the rest. An author who\n * fixed the Date would never have been told about the array.\n */\n const key = `${tag}|${name}|${type === 'object' ? brand(value as object) : type}`;\n reported ??= new Set();\n if (reported.has(key)) return null;\n reported.add(key);\n\n /**\n * A function into an attribute is never what the author meant, but the REASON matters: on a\n * custom element the Lit-era convention is that complex values are set as properties, so\n * `<my-chart formatter={fn}>` is a coherent intention that this sink simply cannot express. The\n * message names the binding that can, rather than blaming the author.\n */\n const kind = type === 'function'\n ? `a function, which becomes its own SOURCE TEXT`\n : type === 'symbol'\n ? `a symbol, which every DOM conversion refuses`\n : Array.isArray(value)\n ? `an array, which becomes its members joined by commas`\n : brand(value as object) === '[object Date]'\n ? `a Date, whose text carries the TIMEZONE of whichever side rendered it`\n : `an ${type}, which cannot survive as text`;\n\n /** The KIND only: the sentence is the shared `attribute-value` entry, printed by each call site with its area. */\n return kind;\n};\n\n/**\n * `__DEV__` only: **an event name one or two keystrokes from a real one** — `@clik`, or `onClik` in\n * JSX, which compiles to it — is almost certainly a typo, and a listener for an event that never\n * fires is a button that silently does nothing. TypeScript cannot catch it beside a permissive prop\n * surface (an index signature cannot exclude names), and nothing at runtime ever fails.\n *\n * Deliberately narrow, because custom events are legitimate on every element: a name the element\n * knows (`'on' + name in element`) is never questioned; one that EXTENDS a real event (`changed`,\n * `loaded`, `closed`) is a custom event by its shape and is left alone; and only a name within two\n * edits of an event this element really has — transpositions counting as one — is named. Each\n * `(tag, name)` pair is said once: the caller's `warnOnce(…, 'event-name-typo', …, key)`, keyed by `eventKey`, and\n * the scan below is skipped for a pair already said (`hasWarned`).\n */\nexport const eventKey = (element: Element, name: string): string => element.localName + ' ' + name;\nexport const eventNameGuess = (element: Element, name: string): string | null => {\n if ('on' + name in element) return null;\n if (hasWarned('event-name-typo', eventKey(element, name))) return null;\n let best: string | null = null;\n let bestDistance = 3;\n for (const key in element) {\n if (!key.startsWith('on')) continue;\n const known = key.slice(2);\n if (name.startsWith(known)) return null;\n const distance = editDistance(name, known, bestDistance);\n if (distance < bestDistance) {\n bestDistance = distance;\n best = known;\n }\n }\n if (best === null) return null;\n /** The GUESS only: the sentence is the renderer table's `event-name-typo`. */\n return best;\n};\n\n/** Optimal-string-alignment distance, stopping early once it cannot come in under `limit`. */\nconst editDistance = (a: string, b: string, limit: number): number => {\n if (Math.abs(a.length - b.length) >= limit) return limit;\n let before: number[] = [];\n let previous = Array.from({ length: b.length + 1 }, (_, j) => j);\n for (let i = 1; i <= a.length; i++) {\n const current = [i];\n let rowBest = i;\n for (let j = 1; j <= b.length; j++) {\n const cost = a[i - 1] === b[j - 1] ? 0 : 1;\n let value = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + cost);\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) value = Math.min(value, before[j - 2] + 1);\n current.push(value);\n if (value < rowBest) rowBest = value;\n }\n if (rowBest >= limit) return limit;\n before = previous;\n previous = current;\n }\n return previous[b.length];\n};\n","/**\n * **`@verajs/renderer/spread`'s own diagnostics — DEVELOPMENT ONLY.** A spread key refused for the same reason a template\n * binding is (`__proto__`, a bound `srcdoc`, an inline handler) raises the shared code from shared-utils' table; these\n * are the refusals only a spread can meet — its names arrive at runtime.\n */\nimport type { Prose } from '@verajs/shared-utils';\n\nexport const PROSE: Record<string, Prose> = {\n 'spread-unsafe-name': (key) => [\n `refusing ${key} — an attribute name cannot contain whitespace, a quote, \\`<\\`, \\`>\\`, \\`/\\`, \\`=\\` or a control character, and one that cannot be written into markup would not survive server rendering.`,\n 'Spread names arrive at runtime; check where this key came from.',\n ],\n 'spread-inner-html': (key) => [\n `refusing ${key} — spread names arrive at runtime, which is exactly the property that makes an HTML sink unreviewable.`,\n 'Write it in the template — html`<div .innerHTML=${trusted}>` — sanitized first (renderer README, security note).',\n ],\n 'spread-not-object': (received) => [\n `ignoring a props bag that is not a plain object — received ${received}. A string is iterated by character index, so \\`spread('text')\\` would set attributes named 0, 1, 2 and 3; anything else applies nothing at all.`,\n 'This is usually an import or a property that resolved to something unexpected.',\n ],\n};\n","/**\n * `<div ${spread(props)}>` — bindings whose NAMES are not known when the template is parsed.\n *\n * Ships separately: the renderer holds one property read (a value at element position carrying\n * `_$apply$` applies itself), so an app that never spreads pays only that. This entry imports nothing\n * from the renderer and reaches it only through that protocol, so it works beside any renderer entry.\n *\n * **One key, one rule, decided once.** A key's kind and name follow the renderer's template sigils\n * exactly (`.prop`, `?bool`, `@event`, `&ref`, `!live`, `onClick`), and its verdict — including every\n * refusal — is decided when its binding is first created, never again per render. The rules are\n * repeated rather than imported from the renderer (the bundles cannot share state);\n * `tests/spread-written-parity.test.mjs` drives both spellings against each other.\n *\n * **Security: spread is where the template security model would break**, because its names arrive at\n * runtime, often from data, and are neither greppable nor reviewable. So it refuses, on the client and\n * in the server half (`_$attrs$`) alike: `.innerHTML`/`.outerHTML` (and `!`), `.__proto__`, the `srcdoc`\n * attribute, inline-handler attributes (`onclick` in any casing — `on` + Capital is the event spelling\n * and still works), names that cannot survive markup, and — as the renderer does — a `javascript:` URL\n * where a browser navigates.\n */\nimport { adoptProperty, call, CONTENT_PROPERTY, dispatch, contentClash, INLINE_HANDLER, ownsContent, isSelection, read, saySelectMultiple, SCRIPT_URL, SCRIPT_URL_ITEM, URL_SINK, diagnostic, SHARED } from '@verajs/shared-utils';\nimport type { Untracked } from '@verajs/shared-utils';\nimport { attributeValueKind } from './dev-values.js';\nimport { PROSE } from './spread-diagnostics.js';\n\nconst ATTR = 0;\nconst PROPERTY = 1;\nconst BOOLEAN = 2;\n/** `!name` — a property compared against the live DOM rather than against what this last wrote. */\nconst LIVE = 3;\nconst EVENT = 4;\nconst REF = 5;\nconst REFUSED = 6;\n\n/**\n * A name that cannot be written into a tag: the HTML attribute-name restriction (control characters,\n * whitespace, `\"`, `'`, `>`, `/`, `=`) plus `<` and a backtick — refused identically on both sides, so a\n * key cannot work here and vanish server-side. Skipped, never thrown: one bad key must not cost a render.\n */\n// eslint-disable-next-line no-control-regex\nconst UNSAFE_NAME = /^$|[\\s\"'>/=<`]|[\\u0000-\\u001f\\u007f]/;\n\n/** Development only: why a key was refused, by refusal code. */\n\n/**\n * A key's kind and name, and — for a refused key — why (`[REFUSED, code]`). The twin of the renderer's\n * template construction; a refused key's verdict never changes, so it is decided once per binding.\n */\nconst resolve = (key: string): [number, string | number] => {\n const first = key[0];\n let kind = first === '.' ? PROPERTY : first === '?' ? BOOLEAN : first === '@' ? EVENT : first === '&' ? REF : first === '!' ? LIVE : ATTR;\n let name = kind === ATTR ? key : key.slice(1);\n if (kind === ATTR && /^on[A-Z]/.test(key)) {\n kind = EVENT;\n name = key.slice(2).toLowerCase();\n }\n const property = kind === PROPERTY || kind === LIVE;\n const refusal = UNSAFE_NAME.test(name)\n ? 1\n : property && (name === 'innerHTML' || name === 'outerHTML')\n ? 2\n : property && name === '__proto__'\n ? 3\n : kind === ATTR && name.toLowerCase() === 'srcdoc'\n ? 4\n : kind === ATTR && INLINE_HANDLER.test(name)\n ? 5\n : 0;\n return refusal ? [REFUSED, refusal] : [kind, name];\n};\n\n/**\n * How a key names a URL a browser navigates to — the renderer's rule, by the same numbers: 0 not one; 1 a custom\n * element's property — often an object (`.data=${rows}`), so only a string is checked and nothing is converted; 2\n * converted ONCE, and that string checked and written (so a `toString` that answers differently each time cannot pass\n * the check as one URL and be written as another); 3 an animation's value (`to`, `values`…), converted once and\n * checked item by item. A refused key needs no case: its name is a refusal code, which no URL\n * attribute name matches.\n */\nconst urlRule = (kind: number, name: string, custom: boolean) => {\n const sink = URL_SINK.exec(name);\n return kind === BOOLEAN || kind === EVENT || kind === REF || sink === null ? 0 : kind !== ATTR && custom ? 1 : sink[1] ? 2 : 3;\n};\n\n/** What `checked` answers for a `javascript:` URL where the rule looks. */\nconst REFUSE = {};\n\n/** `value` as it is checked AND written under `rule` — converted once, or left as it is — or `REFUSE`. */\nconst checked = (rule: number, value: unknown) => {\n if (rule > 1 && value != null && typeof value !== 'string') value = `${value}`;\n return rule !== 0 && typeof value === 'string' && (rule === 3 ? SCRIPT_URL_ITEM : SCRIPT_URL).test(value) ? REFUSE : value;\n};\n\nconst UNSET = {};\n\n/** One key's binding on one element. It is also the `@event` listener — a stable object, so the platform dedupes re-adds. */\nclass Binding {\n _kind: number;\n _name: string;\n _element: Element;\n /** What the element held before the bag first wrote this key — restored when the key leaves the bag. */\n _initial: unknown = null;\n _committed: unknown = UNSET;\n _handler: unknown = null;\n /** For `.prop`: where adoption stands (`adoptProperty`: 0 still adopting, 1 received, 2 refused). */\n _state = 1;\n /** How this key is checked as a URL (`urlRule`) — decided once, with the element in hand. */\n _url: number;\n /**\n * On a custom element, a property read is the component's GETTER, so it goes through the `untracked` this binding was\n * created with; `null` on a built-in element, whose getters read no state. Decided once.\n */\n _read: Untracked | null;\n constructor(element: Element, key: string, untracked: Untracked) {\n const [resolved, name] = resolve(key);\n /** A `<select>`'s selection is live, as in a template — the same rule, asked of the same function. */\n const kind = (resolved === PROPERTY || resolved === LIVE) && isSelection(element, name) ? LIVE : resolved;\n if (__DEV__ && (resolved === PROPERTY || resolved === LIVE) && isSelection(element, name)) saySelectMultiple(element, name, 'spread');\n this._kind = kind;\n this._name = name as string;\n this._element = element;\n const custom = element.localName.includes('-');\n /** Core's `untracked` for a custom element's getter reads, and for an event key's handler (`dispatch`). */\n this._read = custom || kind === EVENT ? untracked : null;\n this._url = urlRule(kind, name as string, custom);\n /** A content-replacing property beside content of the element's own: development refuses it, as a template does. */\n if (__DEV__ && (kind === PROPERTY || kind === LIVE) && CONTENT_PROPERTY.test(name as string) && ownsContent(element))\n contentClash('spread', element.localName, name as string);\n if (kind === REFUSED) {\n if (__DEV__) {\n /** Each refusal written out, so the manifest (`diagnostics-tables`) reads every raise from the source. */\n const at = `<${element.localName}>`;\n const written = JSON.stringify(key);\n const why = name as number;\n if (why === 1) console.warn(diagnostic('spread', at, 'spread-unsafe-name', __DEV__ && PROSE['spread-unsafe-name'](written)));\n else if (why === 2) console.warn(diagnostic('spread', at, 'spread-inner-html', __DEV__ && PROSE['spread-inner-html'](written)));\n else if (why === 3) console.warn(diagnostic('spread', at, 'proto-binding', __DEV__ && SHARED.protoBinding(written)));\n else if (why === 4) console.warn(diagnostic('spread', at, 'srcdoc-attribute', __DEV__ && SHARED.srcdocAttribute(\"'.srcdoc': trusted\")));\n else\n console.warn(\n diagnostic('spread', at, 'handler-attribute',\n __DEV__ && SHARED.handlerAttribute(key, `\\`'@${key.slice(2).toLowerCase()}': fn\\` (or \\`on${key.slice(2, 3).toUpperCase()}${key.slice(3)}\\`)`))\n );\n }\n return;\n }\n if (kind === ATTR) this._initial = element.getAttribute(name as string);\n else if (kind === BOOLEAN) this._initial = element.hasAttribute(name as string);\n /** On a custom element this is the component's getter, run on the parent's behalf: read through `untracked`. */\n else if (kind === PROPERTY || kind === LIVE)\n this._initial = custom ? untracked(read, element, name as string) : (element as unknown as Record<string, unknown>)[name as string];\n if (kind === PROPERTY && custom) this._state = 0;\n }\n /** Runs the handler UNTRACKED (shared-utils' `dispatch`): `_read` holds core's `untracked` for an event key too. */\n handleEvent(event: Event) {\n (this._read ?? call)(dispatch, this, event);\n }\n}\n\nconst write = (binding: Binding, given: unknown, adopting?: boolean) => {\n const kind = binding._kind;\n const value = checked(binding._url, given);\n const name = binding._name;\n /** One variable, typed for both uses: a cast alias survives minification as a second variable. */\n const element = binding._element as Element & Record<string, unknown>;\n if (kind === REFUSED) return;\n /**\n * **Adopting server markup** (hydration hands this in): a built-in control's state — `value`, `checked`, `selected`,\n * `open`, by `.name` or `!name` — is RECORDED, not written: the server's default, and anything the user changed before\n * the script arrived, stand, exactly as for a written binding (hydration's `FORM_STATE`, the same list — keep them\n * equal). Any other name is written, and a component's property is always delivered.\n */\n if (adopting && binding._read === null && (kind === LIVE || kind === PROPERTY) && /^(?:value|checked|selected|open)$/.test(name as string)) {\n binding._committed = value;\n return;\n }\n if (value === REFUSE) {\n if (__DEV__ && given !== binding._committed)\n console.warn(diagnostic('spread', `<${element.localName}>`, 'script-url', __DEV__ && SHARED.scriptUrl(name)));\n binding._committed = given;\n element.removeAttribute(name);\n return;\n }\n if (kind === LIVE) {\n binding._committed = value;\n /**\n * A built-in is compared against its live property. A COMPONENT is compared against its current value — the raw one\n * its store holds (`_$raw$`) for a name it received, else read through `untracked` — and receives a difference\n * through `adoptProperty`. Inline, as the renderer's `commit` reads a template's `!name`: keep the two equal.\n */\n if (binding._read === null) {\n if (element[name] !== value) element[name] = value;\n } else {\n const raw = element._$raw$ as Record<string, unknown> | undefined;\n if ((raw !== undefined && name in raw ? raw[name] : binding._read(read, element, name)) !== value) adoptProperty(element, name, value);\n }\n return;\n }\n if (value === binding._committed) return;\n binding._committed = value;\n if (kind === ATTR) {\n if (value == null) element.removeAttribute(name);\n else {\n if (__DEV__) {\n const kind = attributeValueKind(element.localName, name, value);\n if (kind !== null) console.warn(diagnostic('spread', `<${element.localName}>`, 'attribute-value', __DEV__ && SHARED.attributeValue(name, kind, `'.${name}': value`)));\n }\n element.setAttribute(name, `${value}`);\n }\n } else if (kind === PROPERTY) {\n if (binding._state === 1) element[name] = value;\n else if (binding._state === 0) binding._state = adoptProperty(element, name, value);\n } else if (kind === BOOLEAN) element.toggleAttribute(name, !!value);\n else if (kind === REF) {\n if (typeof value === 'function') (value as (element: Element) => void)(element);\n else if (value !== null && typeof value === 'object') (value as { value: unknown }).value = element;\n } else {\n if (__DEV__ && value != null && value !== false && typeof value !== 'function' &&\n typeof (value as EventListenerObject)?.handleEvent !== 'function')\n console.warn(diagnostic('spread', `<${element.localName}>`, 'not-a-listener', __DEV__ && SHARED.notAListener(name, typeof value)));\n if (binding._handler === null && value != null) element.addEventListener(name, binding);\n binding._handler = value ?? null;\n }\n};\n\n/**\n * Each binding is owned by the renderer's binding record it arrived through (the `key`), so one element can\n * carry several spreads. A key that leaves the bag is written back to what the element held before.\n */\nconst owned = new WeakMap<object, Map<string, Binding>>();\n/**\n * `untracked` is `_$apply$`'s third argument — core's, through the renderer; `call` when a renderer leaves it out.\n * Each binding keeps the one it was CREATED with, so nothing about it is paid per render, and an apply nested inside\n * another (a component setter rendering a spread) can never change what the outer's bindings use.\n */\nfunction apply(this: SpreadResult, element: Element, key: object, untracked: Untracked = call, adopting = false) {\n const props = this._props;\n let bindings = owned.get(key);\n if (bindings === undefined) owned.set(key, (bindings = new Map()));\n let count = 0;\n for (const name in props) {\n count++;\n let binding = bindings.get(name);\n if (binding === undefined) bindings.set(name, (binding = new Binding(element, name, untracked)));\n write(binding, props[name], adopting);\n }\n if (bindings.size !== count)\n for (const [name, binding] of bindings)\n if (!(name in props)) {\n bindings.delete(name);\n write(binding, binding._initial);\n }\n}\n\n/**\n * The server half of the protocol: `[kind, name, value]` for each key `@verajs/ssr` should serialize —\n * `a`ttribute, `b`oolean, `p`roperty, `e`vent, `r`ef — with every refusal and every refused URL already\n * applied, by the same `resolve` the client uses, so the two cannot disagree.\n */\nfunction attributes(this: SpreadResult): [string, string, unknown][] {\n const out: [string, string, unknown][] = [];\n for (const key in this._props) {\n const [kind, name] = resolve(key);\n /** No element here: a property key is judged as a custom element's — the server only ever delivers one to a component. */\n const rule = urlRule(kind, name as string, true);\n const value = checked(rule, this._props[key]);\n if (kind === REFUSED || value === REFUSE) continue;\n out.push([kind === ATTR ? 'a' : kind === BOOLEAN ? 'b' : kind === EVENT ? 'e' : kind === REF ? 'r' : 'p', name as string, value]);\n }\n return out;\n}\n\n/** The branded, self-applying result — what the renderer's element position recognizes. */\ntype SpreadResult = {\n _props: Record<string, unknown>;\n _$apply$: unknown;\n _$attrs$: unknown;\n};\n\n/**\n * Binds every key of `props` to the element it is placed on. Keys follow the template sigils — `.prop`,\n * `?bool`, `@event` (or `onClick`), `&ref`, `!live` — and a plain key is an attribute.\n *\n * Already-branded input is returned as-is (JSX compiles `{...spread(x)}` to a spread of a spread). A\n * value that is not a plain object is refused in BOTH builds — a string would otherwise be iterated by\n * character index into attributes named `0`, `1`, `2` — and development says so.\n */\nexport const spread = (props: object | null | undefined): SpreadResult => {\n if (props !== null && typeof props === 'object' && typeof (props as SpreadResult)._$apply$ === 'function')\n return props as SpreadResult;\n if (props === null || typeof props !== 'object' || Array.isArray(props)) {\n if (__DEV__)\n console.warn(\n diagnostic('spread', 'spread()', 'spread-not-object',\n __DEV__ && PROSE['spread-not-object'](Array.isArray(props) ? 'an array' : typeof props === 'object' ? 'null' : `a ${typeof props}`))\n );\n props = {};\n }\n return { _props: props as Record<string, unknown>, _$apply$: apply, _$attrs$: attributes };\n};\n\n/** Every key as a property: `props({ items })` is `spread({ '.items': items })` — how a component receives data. */\nexport const props = <T extends object = Record<string, unknown>>(values: Partial<T>): SpreadResult => {\n const sigiled: Record<string, unknown> = {};\n for (const key of Object.keys(values)) sigiled[`.${key}`] = (values as Record<string, unknown>)[key];\n return spread(sigiled);\n};\n","/**\n * **`@verajs/renderer/tag`'s diagnostics, keyed by code — DEVELOPMENT ONLY** (referenced behind `__DEV__`, so a\n * production bundle drops it). One table per bundle entry, so the tag entry's development bundle carries only its own\n * prose; `scripts/sync-diagnostics.mjs` merges the renderer's tables into `packages/renderer/diagnostics.json`. A tagged\n * template called as a function is core's `tag-called`, and an object `style` and a void element's children are the\n * jsx compiler's facts too (`style-object`, `void-children`) — all three raised from shared-utils' table.\n */\nimport type { Prose } from '@verajs/shared-utils';\n\nexport const PROSE: Record<string, Prose> = {\n 'tag-position': (tag) => [\n `a tag (\\`${tag}\\`) may only stand in tag position — \\`<\\${T}>…</\\${T}>\\`.`,\n 'Spliced anywhere else it would become text or part of an attribute, which a tag never means.',\n ],\n 'tag-interpolation': () => [\n 'only another tag may be interpolated — a string cannot become markup.',\n 'Interpolate a tag: tag`${Base}-card`, where Base is itself a tag.',\n ],\n 'tag-name': (text) => [\n `${text} is not an element name. A tag names ONE element — letters, then letters, digits, '.', '_' or '-' — and nothing else becomes markup here.`,\n 'Attributes and content belong in the template: html`<${heading} class=\"title\">…</${heading}>`.',\n ],\n 'tag-key': () => [\n '`key` does nothing on a tag component and has been dropped — a key marks a template for list reconciliation, and this call returns one rather than being one.',\n 'In JSX, write it and the compiler handles it: `<Row key=${id}>` becomes `keyed(id, Row({…}))`. Calling by hand, wrap it yourself: `keyed(id, Row({…}))`.',\n ],\n 'tag-inner-html': () => [\n '`dangerouslySetInnerHTML` is not available on a tag component and has been dropped. A tag binds through `spread`, whose names are only known at runtime — so it refuses `.innerHTML` outright rather than open an unreviewable HTML sink.',\n \"Write the element directly, with the value sanitized first: html`<${Tag} .innerHTML=${trusted}>` (see the renderer README's security note).\",\n ],\n};\n","import { spread } from './spread.js';\nimport { diagnostic, misuse, SHARED } from '@verajs/shared-utils';\nimport { PROSE } from './tag-diagnostics.js';\n\n/**\n * `@verajs/renderer/tag` — an element whose **tag name** is decided at runtime.\n *\n * A template renderer bakes tag names into its statics; that is what makes template identity work\n * and what every fast path in this renderer depends on. So a runtime tag cannot be a binding — it\n * has to become part of the statics *before* the renderer sees the template, which is what this\n * entry does. Downstream nothing changes: the renderer, `@verajs/ssr` and hydration all receive an\n * ordinary template and are unaware this exists.\n *\n * ```js\n * import { html, tag } from '@verajs/renderer/tag';\n *\n * const HEADING = { 1: tag`h1`, 2: tag`h2`, 3: tag`h3` };\n * const H = HEADING[state.level];\n * html`<${H} class=\"title\">${state.text}</${H}>`;\n * ```\n *\n * **A tag is also a JSX component**, so the same value works in both notations with no compiler\n * change — `<H className=\"title\">{state.text}</H>` compiles to `H({…})`, which is exactly what a\n * capitalized JSX tag already compiles to.\n *\n * Additive, like `@verajs/renderer/spread` and unlike the other entries: it inlines no renderer\n * internals, so it is safe alongside any of them.\n */\n\n/** The brand a tag carries. `_$…$` is exempt from this package's `/^_[a-z]/` property mangling. */\nconst STATIC = '_$static$';\n\n/** The 14 void elements — the renderer's development tag-shape pass reads the same list. */\nconst VOID_TAGS = /^(?:area|base|br|col|embed|hr|img|input|link|meta|source|track|wbr|param)$/i;\n\ntype Tag = ((props?: Record<string, unknown>) => unknown) & { [STATIC]: string };\n\n/**\n * Spliced statics, keyed by the call site's own `strings` array and then by the tags in it.\n *\n * The cache is the whole reason this works. `_shape === value.strings` is the renderer's identity\n * check, so a fresh array per render would never match and every render would rebuild the subtree.\n * A `WeakMap` on the call site's array means the entries die with the module that holds them, and\n * the inner keys are bounded by the tags in the source — which is exactly what `tag` refusing a\n * string guarantees.\n */\nconst caches = new WeakMap<TemplateStringsArray, Map<string, string[]>>();\n\n/**\n * The `html` to use in a template containing a runtime tag. With no tags in it, this is the\n * ordinary template shape and costs one loop.\n *\n * It builds `{ _$litType$: 1, strings, values }` directly rather than calling core's `html`, so this\n * entry keeps the renderer's independence from core.\n */\nexport const html = (strings: TemplateStringsArray, ...values: unknown[]) => {\n let key = '';\n for (let i = 0; i < values.length; i++) {\n const value = values[i] as Tag | undefined;\n if (value && value[STATIC] !== undefined) {\n /**\n * A tag belongs in TAG position only. Spliced anywhere else it became text, an attribute value, or an attribute\n * NAME (`<p ${T}=${v}>`) — a route around the renderer's refusal of a name expression. Development only: the\n * name text is fixed by source either way, so this is consistency, not safety.\n */\n if (__DEV__ && !(strings[i].endsWith('<') || strings[i].endsWith('</')))\n throw new Error(misuse('tag', 'tag-position', __DEV__ && PROSE['tag-position'](value[STATIC])));\n key += `${i}:${value[STATIC]};`;\n }\n }\n if (key === '') return { ['_$litType$']: 1, strings, values };\n\n let byTags = caches.get(strings);\n if (byTags === undefined) caches.set(strings, (byTags = new Map()));\n let spliced = byTags.get(key);\n if (spliced === undefined) {\n spliced = [];\n let run = strings[0];\n for (let i = 0; i < values.length; i++) {\n const value = values[i] as Tag | undefined;\n if (value && value[STATIC] !== undefined) run += value[STATIC] + strings[i + 1];\n else {\n spliced.push(run);\n run = strings[i + 1];\n }\n }\n spliced.push(run);\n /**\n * A spliced array is a template's strings, so it carries `raw` as a tagged literal's does: that own property is\n * how a renderer tells a template from data shaped like one (parsed JSON cannot give an array a `raw`).\n */\n (spliced as string[] & { raw?: string[] }).raw = spliced;\n byTags.set(key, spliced);\n }\n\n const bindings: unknown[] = [];\n for (let i = 0; i < values.length; i++) {\n const value = values[i] as Tag | undefined;\n if (!(value && value[STATIC] !== undefined)) bindings.push(value);\n }\n return { ['_$litType$']: 1, strings: spliced, values: bindings };\n};\n\n/**\n * React's names, mapped the way `@verajs/jsx` maps them on a written element — so `<H1\n * className=\"t\" disabled={d}>` and `<h1 className=\"t\" disabled={d}>` mean the same thing.\n *\n * Not cosmetic. Passed through raw, `disabled={false}` becomes the attribute `disabled=\"false\"`,\n * and any value at all disables the control; `className` lands as `classname` and never applies.\n *\n * Deliberately duplicated from the transform rather than shared through a package: the two are\n * build-time and runtime, and `tests/jsx-name-mapping.test.mjs` asserts they agree on every key —\n * which is the drift protection a shared module would have bought, without the dependency.\n */\nexport const BOOLEAN_ATTRIBUTES = new Set([\n 'disabled', 'hidden', 'readonly', 'required', 'open', 'selected', 'multiple',\n 'autofocus', 'autoplay', 'controls', 'loop', 'muted', 'playsinline', 'inert', 'reversed',\n]);\n/**\n * ONE table, with no prototype: React's names (`className`, `htmlFor`), the form controls' properties and defaults,\n * the booleans (`?disabled`), and `ref` — the prop that names a BINDING rather than an attribute. The compiler must\n * not rewrite `ref` on a component (`<Card ref={r}>` hands it to `Card`), but a tag's component forwards to a real\n * element, so at THIS boundary it has a binding to become; before 2026-09-12 it fell through to the attribute sink\n * and wrote the function's SOURCE TEXT into the DOM.\n *\n * No prototype, because four plain object literals answered for `constructor`, `toString` and the rest of\n * `Object.prototype` — those props were mapped to a function, refused as a name, and silently dropped.\n */\nconst NAMES = {\n __proto__: null,\n className: 'class',\n htmlFor: 'for',\n /** Controlled, compared with the control's LIVE state — the compiler's twin (`@verajs/jsx`) maps them the same. */\n value: '!value',\n checked: '!checked',\n defaultValue: 'value',\n defaultChecked: '?checked',\n ref: '&ref',\n} as unknown as Record<string, string>;\nfor (const name of BOOLEAN_ATTRIBUTES) NAMES[name] = `?${name}`;\n\nexport const jsxName = (key: string): string => NAMES[key] ?? key;\n\n/**\n * **On a CUSTOM element a bare prop is a PROP** — exactly the rule `@verajs/jsx` compiles `<my-el foo={x}>` by: React's\n * renames first (`className` → `class`, `htmlFor` → `for`), `ref` its binding, a sigil or `on…` passed through, and any\n * other name that could be a JS property becomes `.name` — the HTML-control guesses (`?disabled`, `.value`) never reach\n * a component, whose `disabled` is its own prop. A name that cannot be a property (`data-x`, `aria-label`) and the two\n * names the DOM itself renamed (`class`, `for`) stay attributes.\n */\nconst componentName = (key: string): string =>\n key === 'className'\n ? 'class'\n : key === 'htmlFor'\n ? 'for'\n : key === 'ref'\n ? '&ref'\n : /^[.?@&!]|^on[A-Z]/.test(key) || !/^[A-Za-z_$][\\w$]*$/.test(key) || key === 'class' || key === 'for'\n ? key\n : `.${key}`;\n\n\n/**\n * Declares a tag name.\n *\n * **A string can never become one.** Only another tag may be interpolated, so the set of tags an\n * app can produce is fixed by its source — which is what keeps a tag out of reach of a request, and\n * incidentally what bounds the template cache. There is no `unsafeStatic` here for the same reason\n * there is no `unsafeHTML`: a sanctioned opt-out reads as blessed in tutorials and in review.\n */\nexport const tag = (strings: TemplateStringsArray, ...values: unknown[]): Tag => {\n /**\n * A *template tag*, so it is written `` tag`h1` `` and not `tag('h1')`. The call form is the\n * likelier mistake of the two and failed with `Cannot read properties of undefined (reading '0')`,\n * which says nothing about either.\n */\n /**\n * In EVERY build: in production `tag('h1')` read the STRING's first character as the template's first static and\n * named an `<h>`, silently — a wrong element only production renders. The explanation is development's.\n */\n if (!(strings as { raw?: unknown } | null)?.raw)\n throw new TypeError(misuse('tag', 'tag-called', __DEV__ && SHARED.tagCalled('tag', typeof strings === 'string' ? JSON.stringify(strings) : String(strings), typeof strings === 'string' ? strings : 'h1')));\n let text = strings[0];\n for (let i = 0; i < values.length; i++) {\n const value = values[i] as Tag | undefined;\n if (!value || value[STATIC] === undefined)\n throw new Error(misuse('tag', 'tag-interpolation', __DEV__ && PROSE['tag-interpolation']()));\n text += value[STATIC] + strings[i + 1];\n }\n\n /**\n * **A tag's text must be an element NAME.** Until this, it was an unconstrained string spliced\n * straight into the statics — so `` tag`div onclick=x` `` produced markup rather than a tag, and\n * the name of this export was a description of intent rather than of behavior.\n *\n * The concrete failure it closes is a cache collision. Spliced statics key on\n * `` `${i}:${text};` `` per tag, joined with separators the text was free to contain, so two\n * DIFFERENT tag assignments at one call site could derive the same key and reuse each other's\n * markup. Measured: at a two-tag call site, `(a, \"b;1:c\")` and `(\"a;1:b\", c)` both derive\n * `\"0:a;1:b;1:c;\"`, and the second render came back as the FIRST one's markup.\n *\n * Escaping the separators would have fixed that one collision. Constraining the name fixes the\n * class — no name can contain a separator, so no key can be ambiguous, and the export delivers\n * what it is called. A closed grammar beats a wider escape, which is the same ruling this audit\n * reached for the attribute-value sink.\n *\n * Unconditional, like the interpolation refusal above and unlike the shape check: both are about\n * what may become markup, and a production build is where that matters most.\n */\n if (!/^[a-zA-Z][a-zA-Z0-9._-]*$/.test(text))\n throw new Error(\n /**\n * The THROW is unconditional; its EXPLANATION is not. Carrying the full sentence cost 178 B\n * gzipped here — most of a 1.9 KB entry — for text an author reads once and a production\n * page never reaches. Core's static-render refusal is shaped the same way for the same\n * measurement.\n */\n misuse('tag', 'tag-name', __DEV__ && PROSE['tag-name'](JSON.stringify(text)))\n );\n\n /**\n * The tag is a function, which is what makes it a JSX component: the compiler emits `H({…})` for\n * a capitalized tag, and this is what receives that call. `children` is JSX's own key; everything\n * else goes through `spread`, since the names are not known when this template is written.\n */\n const self = ((\n { children, key, dangerouslySetInnerHTML: rawHtml, ...props }: Record<string, unknown> = {}\n ) => {\n /**\n * **`key` and `dangerouslySetInnerHTML` come out of the bag by name**, because neither is an\n * attribute and the sink they fell into accepts anything. `key` became the literal attribute\n * `key=\"7\"` on the element AND cost the list its identity — rows then reconciled positionally,\n * so focus, scroll and input state followed the index rather than the item.\n *\n * `@verajs/jsx` consumes `key` into `keyed(…)` before this is ever called, so the compiled path\n * never reaches here. This is the HAND-CALL backstop — `H({ key: id })` — where no compiler is\n * looking, and dropping it silently would be a refusal with no channel, hence the warning.\n */\n if (__DEV__ && key !== undefined)\n console.warn(diagnostic('tag', `<${text}>`, 'tag-key', __DEV__ && PROSE['tag-key']()));\n /**\n * **`dangerouslySetInnerHTML` cannot work here, and that is a security property rather than a\n * gap.** A tag reaches its element through `spread`, and `spread` REFUSES `.innerHTML` on\n * purpose: its names arrive at runtime, which is what makes that sink unreviewable. Mapping the\n * prop was tried and measured — 37 B for a value `spread` then declined, so the bytes bought a\n * console message. Refused here instead, where the reason can be said.\n */\n if (__DEV__ && rawHtml !== undefined)\n console.warn(diagnostic('tag', `<${text}>`, 'tag-inner-html', __DEV__ && PROSE['tag-inner-html']()));\n /** No prototype, and `__proto__` is no prop: a bag key by that name would otherwise reach `spread` as one. */\n const mapped = { __proto__: null } as unknown as Record<string, unknown>;\n for (const name in props)\n if (name !== '__proto__') {\n /** The compiler refuses an object `style` at build time; written into the attribute it reads \"[object Object]\". */\n if (__DEV__ && name === 'style' && props[name] !== null && typeof props[name] === 'object')\n throw new TypeError(misuse('tag', 'style-object', __DEV__ && SHARED.styleObject('style: `color:${c}`')));\n mapped[(custom ? componentName : jsxName)(name)] = props[name];\n }\n /**\n * A void element has no content and no end tag: `</br>` is read as a SECOND `<br>`, and a child anchor strays. So\n * children given to one would vanish silently — development says so (an empty list is no content).\n */\n if (__DEV__ && empty && children != null && !(Array.isArray(children) && children.length === 0))\n throw new Error(misuse('tag', 'void-children', __DEV__ && SHARED.voidChildren(text, 'children given to it would vanish')));\n return empty ? html`<${self} ${spread(mapped)}>` : html`<${self} ${spread(mapped)}>${children}</${self}>`;\n }) as Tag;\n const empty = VOID_TAGS.test(text);\n /**\n * A custom element's props map by the compiler's component rule — never by the HTML-control guesses. A dash name is\n * enough here: the compiler also excludes eight reserved SVG/MathML names (`font-face`, `annotation-xml`…), which\n * cost 77 B to carry and which a tag essentially never names (Brian, 2026-10-01).\n */\n const custom = text.includes('-');\n self[STATIC] = text;\n return self;\n};\n"],"names":["contentClash","SHARED.getterOnlyProp","SHARED.upgradeClobber","SHARED.contentClash","SHARED.selectMultiple","PROSE","SHARED.protoBinding","SHARED.srcdocAttribute","SHARED.handlerAttribute","SHARED.scriptUrl","SHARED.attributeValue","SHARED.notAListener","SHARED.tagCalled","SHARED.styleObject","SHARED.voidChildren"],"mappings":"AAAA;;;;;AAKG;AACI,MAAM,IAAI,GAAG,uBAAuB;AAiD3C;;;;;;;;;;;;;;AAcG;AACH;;;;AAIG;AACH;;;;AAIG;AACI,MAAM,MAAM,GAAG,CAAC,OAAe,EAAE,QAAgB,EAAE,QAA6C,KACrG,OAAO,IAAI;AACT,MAAE,CAAA,EAAG,OAAO,CAAA,EAAA,EAAK,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;MAC9E,GAAG,OAAO,CAAA,EAAA,EAAK,IAAI,CAAA,EAAG,QAAQ,EAAE;AAc/B,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;;ACtF3D;;;AAGG;AACI,MAAM,SAAS,GAAU,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,KAAK;AAC1D,IAAA,CAAA,yCAAA,EAA4C,QAAQ,CAAA,CAAA,CAAG;AACvD,IAAA,CAAA,gCAA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AA,EAAK,IAAI,GAAG;AAC3G,IAAA,CAAC,CAAQ;IACT,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;AAClC;;;;AAIG;IACH,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;AACjC,IAAA,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI;AACnB,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vera-renderer.d.ts","sources":["../../src/types.ts","../../src/renderer.ts"],"mappings":"AAAA;;;;;;;;;;;;;;;;;AAiBG;;;;;;;;;;;;;;;;;;;ACjBH;;;;;;;;;;;;;;;;AAgBG;;
|
|
1
|
+
{"version":3,"file":"vera-renderer.d.ts","sources":["../../src/types.ts","../../src/renderer.ts"],"mappings":"AAAA;;;;;;;;;;;;;;;;;AAiBG;;;;;;;;;;;;;;;;;;;ACjBH;;;;;;;;;;;;;;;;AAgBG;;AA2PC;;;;AAIG;AACH;AACA;AACA;;cAEE,IAAI;sBACM;AACV;AAYC,cAAA,UAAA,+BAAA,IAAA;AACH,KAAA;;;;;;;AAOE;AACA;;;AAEA;mBACI;yCACU,cAAA;;AAEd,gBAAI,cAA8B,aAAA,QAAA;AAClC;AACE;;qBACsC,QAAM;AAC5C;AACA;AACE;;AACK;;;AAEH;AACE;;;;AAIG;AACH;;;sCAGE;;;;","names":[]}
|