@verajs/lite 0.0.0-stage → 0.1.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vera-lite.js","sources":["../../../shared-utils/src/diagnostic.ts","../../../shared-utils/src/diagnostics.ts","../../../shared-utils/src/markup-grammar.ts","../../../shared-utils/src/namespaces.ts","../../../shared-utils/src/utils.ts","../../../shared-utils/src/define-checks.ts","../../../shared-utils/src/dev-values.ts","../../src/diagnostics.ts","../../src/markup.ts","../../src/patch.ts","../../src/schedule.ts","../../src/define.ts","../../src/isServer.ts","../../src/signal.ts","../../src/tags.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/lite` and `@verajs/static`; @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, `@verajs/lite` and `@verajs/static`: `kind` is what the value was (dev-values'\n * `attributeValueKind`); `property` is the emitter's own spelling of a property binding — a template's\n * `.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 tagDefinedAgain: 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];\n/**\n * **A second copy of a component package stands down** — said in development by every `@vera-components/*` package's\n * `register` when its tag is already defined (by another copy or version of the same package): the first definition is\n * kept. One text for every component (2026-11-20; codes are one namespace). The tag is the diagnostic's subject, printed\n * before the message; `pkg` is the package's name and `entry` its element entry (`element` or `elements`).\n */\nexport const definedTwice: Prose = (pkg, entry) => [\n `is already defined by another copy or version of ${pkg}, so the first is kept.`,\n `Align the versions, or import ${pkg}/${entry} and define it under your own tag.`,\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/**\n * **A boolean at a child position renders as the WORD** — said in development by `@verajs/renderer`, `@verajs/lite` and\n * `@verajs/static` (moved from the renderer's table, 2026-11-19: the small tiers say core's development diagnostics too).\n */\nexport const booleanChild: Prose = (value) => [\n `a child position was given \\`${value}\\`, which renders as the word \"${value}\" — the usual cause is \\`\\${cond && …}\\` with a false \\`cond\\`.`,\n 'Write `${cond ? … : null}`, or `${(cond && …) || null}`; `null` and `undefined` are the values that render nothing. If you meant to display the boolean, say so with `${String(value)}` and this goes quiet.',\n];\n/** **A misspelled event name** (`@clik`) — said in development by `@verajs/renderer` and `@verajs/lite` (moved 2026-11-19). */\nexport const eventNameTypo: Prose = (name, tag, best) => [\n `@${name} is not an event <${tag}> fires — did you mean @${best}? (In JSX, on${name.slice(0, 1).toUpperCase()}${name.slice(1)} compiles to @${name}.)`,\n 'A custom event by this name is fine, and this is said only in development.',\n];\n/**\n * **A wrapper around a real template literal's strings is no template in the small tiers** — `{ strings, values }` without\n * `_$litType$`, which only `@verajs/core`'s `hold` or `tag` build: a template to core, the text `[object Object]` in\n * `@verajs/lite` and `@verajs/static` (Brian, 2026-11-19: a recorded difference, said in development by both).\n */\nexport const templateWrapper: Prose = () => [\n \"an object holding a real template literal's `strings` but no `_$litType$` — a wrapper only `@verajs/core`'s `hold` or `tag` builds — is no template here: it renders as the text any object renders as, `[object Object]`.\",\n 'Render the `html` result itself; `@verajs/core` renders such a wrapper as its template.',\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 (`<` `&#60;`,\n * a space `&#32;`, `=` `&#61;`), 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 `&nbsp;` be overwritten.\n */\n if (node.nodeType !== 3 || (node as Text).data === '' || /[^ \\t\\n\\f\\r]/.test((node as Text).data)) return true;\n return false;\n};\n/** `side` is the module the user wired — `renderer` for a template, `spread` for a spread. */\nexport const contentClash = (side: string, tag: string, name: string): never => {\n throw new Error(misuse(side, 'content-clash', __DEV__ && SHARED.contentClash(tag, name, side === 'spread' ? `<${tag} \\${spread({ '.${name}': … })}></${tag}>` : `<${tag} .${name}=\\${…}></${tag}>`)));\n};\n\n/**\n * **An expression in TAG-name position** (`<${x}>`, `</${x}>`, `<my-${x}>`) without `@verajs/renderer/tag`: no\n * element can be made from it — the parser reads a tag name before any value exists. Refused by the client in\n * development and by the server in every build, with one message. The tag entry splices a tag VALUE into the\n * statics before the renderer sees it, so only a non-tag ever reaches here.\n */\nexport const TAG_NAME_HOLE = /<\\/?[^\\s>]*$/;\nexport const tagHole = (side: string): never => {\n throw new Error(misuse(side, 'tag-hole', __DEV__ && SHARED.tagHole()));\n};\n","/**\n * **Content in the wrong namespace does not render — DEVELOPMENT ONLY, said by two renderers** (2026-11-18):\n * `` html`<path/>` `` handed into an `<svg>` builds an HTML `<path>`, which draws nothing and says nothing.\n * `@verajs/renderer` and `@verajs/lite` both say it, so the decision and its words live here, once (the shared-emitter\n * rule, `diagnostics.ts`); each renderer passes its own area and the one sentence that differs between them (`retag`:\n * how else a template could get the right namespace). Every call site is behind `__DEV__`, so production drops it whole.\n *\n * The host is read from where the content LANDS, and a mismatch is named once per host and content (a toggled subtree\n * would otherwise warn every frame). Silent where HTML is correct — integration points (`<foreignObject>`, `<desc>`,\n * `<title>`, MathML's token elements, an HTML-encoded `<annotation-xml>`) and `<style>`/`<script>`, which never draw.\n */\nimport { hasWarned, warnOnce } from './diagnostic.js';\nimport * as SHARED from './diagnostics.js';\n\nconst SVG_NS = 'http://www.w3.org/2000/svg';\nconst MATHML_NS = 'http://www.w3.org/1998/Math/MathML';\n\n/** The name of a foreign host where HTML does not render, or `null` (not SVG/MathML, or an integration point). */\nconst foreignHost = (parent: Node): string | null => {\n const element = parent as Element;\n const namespace = element.namespaceURI;\n const svg = namespace === SVG_NS;\n if (!svg && namespace !== MATHML_NS) return null;\n const name = element.localName;\n if (svg) return name === 'foreignObject' || name === 'desc' || name === 'title' ? null : name;\n if (name === 'mi' || name === 'mo' || name === 'mn' || name === 'ms' || name === 'mtext') return null;\n if (name === 'annotation-xml') {\n /** The ATTRIBUTE — what the parser reads; `image/svg+xml` is MathML's own spelling for an SVG annotation. */\n const encoding = element.getAttribute('encoding')?.toLowerCase();\n return encoding === 'text/html' || encoding === 'application/xhtml+xml' || encoding === 'image/svg+xml' ? null : name;\n }\n return name;\n};\n\n/** The nodes an insert is about to place — a fragment empties as it is inserted, so they are read first. */\nexport const landing = (node: Node): Node[] => (node.nodeType === 11 ? [...node.childNodes] : [node]);\n\n/**\n * **Development: each element of `nodes`, placed in `parent`, that will not render there, named once.** `area` is the\n * emitter's label; `retag` is its sentence on another way to the right namespace, read only for HTML content, between\n * \"needs the svg`…` or mathml`…` tag at the call site\" and the advice for content that is genuinely HTML.\n */\nexport const checkForeign = (area: string, parent: Node, nodes: Node[], retag: string) => {\n const host = foreignHost(parent);\n if (host === null) return;\n const hostNamespace = (parent as Element).namespaceURI;\n for (const node of nodes) {\n if (node.nodeType !== 1) continue;\n const element = node as Element;\n if (element.namespaceURI === hostNamespace) continue;\n const tag = element.localName;\n if (tag === 'style' || tag === 'script') continue;\n /** The parser itself opens SVG content for an `<svg>` inside `<annotation-xml>`, whatever the encoding. */\n if (host === 'annotation-xml' && tag === 'svg' && element.namespaceURI === SVG_NS) continue;\n const built = element.namespaceURI === MATHML_NS ? 'MathML' : element.namespaceURI === SVG_NS ? 'SVG' : 'HTML';\n /** The island and its placement are chosen by the HOST's namespace; the encoding follows the CONTENT. */\n const island =\n hostNamespace === MATHML_NS\n ? `<mtext>, or <annotation-xml encoding=\"${built === 'SVG' ? 'image/svg+xml' : 'text/html'}\">, ` +\n 'inside a MathML container such as <mrow> or <math> rather than inside a token element'\n : 'a <foreignObject>, which has to sit in an element whose content model accepts one — a container such as ' +\n '<g> or <svg>, not a text, clipping, gradient or filter element';\n /** Keyed by host namespace AND content namespace: `<a>` is a real element in all three. */\n const seen = `${hostNamespace}${host}>${element.namespaceURI}${tag}`;\n /** `hasWarned` first: the advice below is built only for a case not yet said. */\n if (hasWarned('wrong-namespace', seen)) continue;\n const advice =\n built === 'HTML'\n ? `If it is meant to be an SVG or MathML element, the template holding it needs the svg\\`…\\` or mathml\\`…\\` tag ` +\n `at the call site${retag}. If it is ` +\n `genuinely HTML (a <div>, a custom element), it belongs in ${island}: tagging it will not help, and a custom ` +\n `element only upgrades in the HTML namespace.`\n : `The template's tag is already right — these two namespaces cannot nest directly. Put the ` +\n `${built === 'SVG' ? '<svg>' : '<math>'} root inside ${island}.`;\n warnOnce(area, `<${tag}>`, 'wrong-namespace', __DEV__ && (() => SHARED.wrongNamespace(tag, built, host, advice)), seen);\n }\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 * **What a misused `define` is told, in every package that defines components — DEVELOPMENT ONLY** (`@verajs/core`'s `define`\n * and `@verajs/lite`'s both call it behind `__DEV__`, so production carries none of it; `area` is the caller's label). One module, so both tiers check a definition\n * identically and say so in the same words. It reads no registry: `swapping` (a development swap module is wired, so a\n * redefine is a swap) is the caller's to say — core reads its registry, a small tier has none.\n */\nimport { diagnostic, misuse } from './diagnostic.js';\nimport * as SHARED from './diagnostics.js';\nimport { camel } from './utils.js';\n\n/**\n * Development: the declared attributes, said by code. Not an array of names → refused, by code (production throws the\n * platform's own error further on, so both builds refuse). A shared prop whose default is not a string or `null` FLIPS\n * type when the attribute arrives (the platform hands strings); a camel name the platform's element already has\n * (`hidden`, `title`, `ariaLabel`) replaces that REFLECTING property — `el.hidden = true` no longer hides it.\n */\nconst checkAttributes = (area: string, tag: string, attributes: unknown, props: Record<string, unknown> | undefined) => {\n if (!Array.isArray(attributes) || attributes.some((name) => typeof name !== 'string'))\n throw new TypeError(misuse('define', 'define-attributes', __DEV__ && SHARED.defineAttributes(String(attributes))));\n for (const name of attributes as string[]) {\n const prop = camel(name);\n const subject = `define('${tag}') attributes '${name}'`;\n const shared = props && Object.hasOwn(props, prop) ? props[prop] : null;\n if (shared !== null && typeof shared !== 'string')\n console.warn(diagnostic(area, subject, 'define-attribute-type', __DEV__ && SHARED.defineAttributeType(prop, typeof shared)));\n if (prop in HTMLElement.prototype) console.warn(diagnostic(area, subject, 'define-attribute-reflected', __DEV__ && SHARED.defineAttributeReflected(prop)));\n }\n};\n\n/**\n * Development: an own `__proto__` key of `props` or `methods` (`JSON.parse` makes one; an object literal never does),\n * which both builds skip, said by code. True when `name` is that key, so the caller moves on to the next.\n */\nconst protoKey = (area: string, subject: string, name: string, kind: 'prop' | 'method') => {\n if (name !== '__proto__') return false;\n console.error(diagnostic(area, subject, 'define-proto-key', __DEV__ && SHARED.defineProtoKey(kind)));\n return true;\n};\n\n/**\n * Development: the declared props, said by code — installed identically in both builds. A name a method also has (the\n * prop wins), a platform member's name, an object default that cannot be copied per element (a `Set`, a `Map`, a class\n * instance: SHARED by every instance — set it in the setup, or pass it in).\n */\nconst checkProps = (area: string, tag: string, props: unknown, methods: object | undefined) => {\n if (props === null || typeof props !== 'object') {\n console.warn(diagnostic(area, `define('${tag}') props`, 'define-props-not-object', __DEV__ && SHARED.definePropsNotObject(String(props))));\n return;\n }\n for (const name of Object.keys(props)) {\n const subject = `define('${tag}') props.${name}`;\n if (protoKey(area, subject, name, 'prop')) continue;\n const value = (props as Record<string, unknown>)[name];\n if (methods && Object.hasOwn(methods, name)) console.warn(diagnostic(area, subject, 'define-prop-method', __DEV__ && SHARED.definePropMethod(name)));\n else if (name in HTMLElement.prototype) console.warn(diagnostic(area, subject, 'define-shadows', __DEV__ && SHARED.defineShadows(name)));\n if (value !== null && typeof value === 'object' && !Array.isArray(value) && (value as object).constructor !== Object)\n console.warn(diagnostic(area, subject, 'define-prop-shared-default', __DEV__ && SHARED.definePropSharedDefault()));\n }\n};\n\n/**\n * Development: each key of `methods`, said by code — never refused, so both builds INSTALL the same thing (Brian's rule:\n * one behavior, the words in development only). Read by descriptor, so a getter is reported, not run.\n */\nconst checkMethods = (area: string, tag: string, methods: object, attributes: readonly string[] | undefined) => {\n for (const name of Object.keys(methods)) {\n const subject = `define('${tag}') methods.${name}`;\n if (protoKey(area, subject, name, 'method')) continue;\n const value = Object.getOwnPropertyDescriptor(methods, name)?.value as unknown;\n /** The two names core re-asserts. A comparison, not a module-level `Set`: a top-level `new Set` SURVIVES production\n * (terser cannot prove the call free of effects — it cost +33 B gz here, 2026-10-21). */\n if (name === 'constructor' || name === 'connectedCallback' || (name === 'attributeChangedCallback' && attributes?.length)) console.warn(diagnostic(area, subject, 'define-method-ignored', __DEV__ && SHARED.defineMethodIgnored(name)));\n else if (typeof value !== 'function') console.warn(diagnostic(area, subject, 'define-method-not-function', __DEV__ && SHARED.defineMethodNotFunction()));\n else if (name === 'adoptedCallback') console.warn(diagnostic(area, subject, 'define-method-adopted', __DEV__ && SHARED.defineMethodAdopted()));\n else if (name === 'attributeChangedCallback')\n console.warn(diagnostic(area, subject, 'define-method-unobserved', __DEV__ && SHARED.defineMethodUnobserved()));\n else if (name in HTMLElement.prototype) console.warn(diagnostic(area, subject, 'define-shadows', __DEV__ && SHARED.defineShadows(name)));\n }\n};\n\n/** Development: what a misused `define` received, by code, before the platform's own refusal (which throws in both builds). */\nconst checkDefine = (area: string, tag: unknown, setup: unknown, swapping: boolean) => {\n if (typeof tag !== 'string' || tag.indexOf('-') < 1)\n throw new TypeError(misuse('define', 'define-tag', __DEV__ && SHARED.defineTag(typeof tag === 'string' ? `'${tag}'` : String(tag))));\n if (typeof setup !== 'function') throw new TypeError(misuse('define', 'define-setup', __DEV__ && SHARED.defineSetup(String(setup))));\n /** Silent while `@verajs/hot` is wired (`swapping`: it sets `$hot` on core's registry): a redefine is then a swap. */\n if (customElements.get(tag) !== undefined && !swapping) console.warn(diagnostic(area, `define('${tag}')`, 'tag-defined-again', __DEV__ && SHARED.tagDefinedAgain(tag)));\n};\n\n/** Development: every check of one `define` call, in order — the tag and setup first, as the platform would throw next. */\nexport const checkDefinition = (\n area: string,\n tag: unknown,\n setup: unknown,\n methods: object | undefined,\n props: Record<string, unknown> | object | undefined,\n attributes: readonly string[] | undefined,\n swapping: boolean\n) => {\n checkDefine(area, tag, setup, swapping);\n if (methods) checkMethods(area, tag as string, methods, attributes);\n if (props !== undefined) checkProps(area, tag as string, props, methods);\n if (attributes !== undefined) checkAttributes(area, tag as string, attributes, props as Record<string, unknown> | undefined);\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 './diagnostic.js';\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/lite`'s own diagnostics — DEVELOPMENT ONLY** (production keeps the code and its link). The codes only lite\n * raises; the ones it shares with `@verajs/core` (`define`'s checks, `setup-returned-value`, `unfinished-tag`,\n * `forged-template`…) are shared-utils' (`SHARED`). Published as `packages/lite/diagnostics.json` by\n * `scripts/sync-diagnostics.mjs`.\n */\nimport type { Prose } from '@verajs/shared-utils';\n\n/** Lite's own codes and their development sentences, keyed by code (`misuse` / `warnOnce` raise them). */\nexport const PROSE: Record<string, Prose> = {\n 'tier-needs-core': (what) => [\n `${what} needs \\`@verajs/core\\`: \\`@verajs/lite\\` does not have it, so it does not work here (development says so; production is silent).`,\n 'Import from `@verajs/core` and wire a renderer to use it: every component written for `@verajs/lite` runs there unchanged.',\n ],\n 'tier-hole-position': () => [\n 'a hole sits where the HTML parser does not keep it as a value (inside a comment, a `<script>` that is not a JSON data block, an element that is never shown such as `<noscript>`, `<iframe>` or `<template>`, a tag position such as `<p ${…}>`, a duplicate attribute, a binding name with a non-ASCII capital letter (the parser lowercases only ASCII), an element its parent cannot hold such as `<div>` in `<select>`), or a value is bound under an element whose content `.innerHTML` or `.textContent` replaces: a value would land where the template does not show it, so the template is refused, in every build. ON THE SERVER, one more cause: an HTML element written inside SVG or MathML content (`<div>` in an `<svg>`), which a browser moves out of it and `@verajs/ssr`\\'s DOM does not reproduce, so a hole in that subtree is never found there.',\n \"Keep holes in text, attribute values and the text of `<title>`, `<textarea>`, `<style>` or a JSON data block; a binding in a tag position (a ref, a spread) is core's. Put HTML inside SVG in a `<foreignObject>`, and inside MathML in an `<mtext>`. An `<iframe>` is set through its attributes (`src`, `title`, `allow`): its content is fallback no browser shows. A `<noscript>` shows only with scripting off, when this tier never runs, so write it in the served page or render it with `@verajs/ssr`; one with no value inside renders here. (`@verajs/core` writes a value there as text.)\",\n ],\n};\n","/**\n * **What the lite tier reads in a template's static text, and what it refuses to write.** Where a hole is, the HTML\n * PARSER says: a rough scan only picks each hole's MARKER form (a comment in text, a value mark inside a start tag), the\n * template is parsed once in a `<template>`, and each hole must land EXACTLY ONCE where its form can be filled\n * (`patch.ts`'s `prepare`). A marker the rough scan misplaces lands in raw text, a comment, a name, a template's content\n * or nowhere — missing — and the template is refused: a scan error can only refuse, never misplace a value. (This\n * replaced a verbatim twin of core's scanner grammar and a separate parser check, 2026-11-17: the static sketch's design,\n * when static was retired into lite.) The refusals are the full tier's (`@verajs/core` with its renderer), from\n * shared-utils' one grammar: a bound inline handler or `srcdoc` is never written, and a script URL on a URL-bearing name\n * is removed.\n */\nimport { INLINE_HANDLER, SCRIPT_URL, SCRIPT_URL_ITEM, SHARED, URL_SINK, attributeValueKind, diagnostic, eventKey, eventNameGuess, warnOnce } from '@verajs/shared-utils';\nimport { PROSE } from './diagnostics.js';\n\n/**\n * The rough scan: a hole is in a tag when the source before it ends inside a start tag — a `<` and a letter, then no\n * `>` outside quotes (so `<a title=\"Next >\" href=${url}>` stays in the tag). Wrong only toward a marker that is then\n * missing, so the template is refused, never misrendered. Its group is the open quote's text when the hole is inside\n * a quoted value (`undefined` when it is not).\n */\nexport const IN_TAG = /<[a-zA-Z](?:[^>\"']|\"[^\"]*\"|'[^']*')*(\"[^\"]*|'[^']*)?$/;\n\n/** The name of the attribute a hole's value starts in, AS WRITTEN (case kept: the parser lowercases), from the source before it. */\nexport const WRITTEN_NAME = /([^\\s\"'>/=]+)\\s*=\\s*(?:\"[^\"]*|'[^']*|[^\\s\"'>]*)$/;\n\n/** A text hole's marker is a comment holding `\\u0001` and its index; a value hole's is its index between two `\\u0002`s. */\n// eslint-disable-next-line no-control-regex -- the markers ARE control characters: ones no template's own text holds\nexport const TEXT_MARK = /^\\u0001(\\d+)$/;\n/** A value hole's marker, inside an attribute value: its index between two `\\u0002`s. */\n// eslint-disable-next-line no-control-regex -- the same\nexport const VALUE_MARK = /\\u0002(\\d+)\\u0002/g;\n/** A text marker as it reads inside HTML's RCDATA or raw text, where the parser leaves the comment as text. */\n// eslint-disable-next-line no-control-regex -- the same\nexport const TEXT_MARKS = /<!--\\u0001(\\d+)-->/g;\n\n/**\n * Elements a value never enters, by name in ANY namespace (Brian, 2026-11-17): `script` (its text is code, unless a JSON\n * data block), and those whose content is never shown — `iframe`, `noscript`, a `template`'s inert content, the obsolete\n * raw-text four. Never walked, so a hole anywhere inside one is missing, and refused. Their own attributes bind.\n */\nexport const RAW = /^(?:script|iframe|noscript|xmp|noembed|noframes|plaintext|template)$/i;\n\n/**\n * Elements whose content is TEXT, in any namespace (Brian, 2026-11-17): `title` (HTML's and SVG's accessible name),\n * `textarea`, and `style` — an author writing `<style>:host{--accent:${c}}</style>` means CSS. Their holes fill the\n * element's text, composed with its statics, never parsed.\n */\nexport const TEXT_ONLY = /^(?:title|textarea|style)$/i;\n\n/** A script start tag, whole and quote-aware (a `>` inside a quoted value does not end it). */\nexport const SCRIPT_START = /<script\\b(?:[^>\"']|\"[^\"]*\"|'[^']*')*>?/gi;\n\n/**\n * The strings every FORGED template renders as: the text any object renders as (`[object Object]`), one shared literal.\n * Module state, immutable: shared so every forgery reuses one preparation. A REAL tagged literal, so it is frozen and\n * owns `raw` by the language's own rule — the forged-template rule holds for it by construction (and it is 31 B gz\n * smaller than building that shape by hand, 2026-11-17).\n */\nconst FORGED = ((strings: TemplateStringsArray) => strings)`[object Object]`;\n\n/** A tagged template literal's strings: an array owning `raw` (core's check, identical). */\nconst literal = (strings: unknown) => Array.isArray(strings) && Object.hasOwn(strings, 'raw');\n\n/**\n * **Only a tagged template literal is a template** — core's rule, identical (`@verajs/renderer`'s `getTemplate`, the check\n * Lit makes): its strings array OWNS `raw`, which `JSON.parse` cannot give an array. A value from JSON shaped like a\n * template result (an API field an attacker can turn into an object) otherwise rendered as MARKUP in the small tiers\n * (found 2026-11-17; unreleased). Asked on a call site's cache MISS, which a forged array always is, so a cached\n * template pays nothing. A forgery renders as `FORGED`'s text, never a throw (the value is attacker-controlled);\n * development says so (`forged-template`, core's words).\n */\nexport const genuine = (strings: TemplateStringsArray): TemplateStringsArray => {\n if (literal(strings)) return strings;\n if (__DEV__) console.warn(diagnostic('lite', 'a child value', 'forged-template', __DEV__ && SHARED.forgedTemplate()));\n return FORGED;\n};\n\n/**\n * **Development: a binding refused, said as core's renderer says it** (its codes and `SHARED`'s words; lite's own label,\n * as its other diagnostics) — a refusal nobody is told about reads as a bug (CODE-PRINCIPLES §11: `onclick=${fn}` doing\n * nothing). Said at preparation, once per call site and name, as core decides it when it prepares a template: `bound`\n * is the binding as `check` reads it (a sigil name as written, else the parser's attribute name).\n */\nexport const sayRefused = (element: Element, bound: string) => {\n const where = `<${element.localName}>`;\n if (/^[.!]__proto__$/.test(bound)) console.warn(diagnostic('lite', where, 'proto-binding', __DEV__ && SHARED.protoBinding(bound)));\n else if (/^[@.!?]/.test(bound)) return;\n else if (bound === 'srcdoc') console.warn(diagnostic('lite', where, 'srcdoc-attribute', __DEV__ && SHARED.srcdocAttribute('.srcdoc=${…}')));\n else if (INLINE_HANDLER.test(bound))\n console.warn(\n diagnostic('lite', where, 'handler-attribute',\n __DEV__ && SHARED.handlerAttribute(bound, `\\`@${bound.slice(2)}=\\${…}\\` (or \\`on${bound[2]!.toUpperCase()}${bound.slice(3)}=\\${…}\\`)`))\n );\n};\n\n/** Development: a script URL refused at commit, said as core's renderer says it (`script-url`), each time the refused value changes. */\nexport const sayScriptUrl = (element: Element, name: string) =>\n console.warn(diagnostic('lite', `<${element.localName}>`, 'script-url', __DEV__ && SHARED.scriptUrl(name)));\n\n/** A name whose bound value would run or render as code, never written (an inline handler, `srcdoc`), as core refuses it. */\nexport const refusedName = (name: string) => INLINE_HANDLER.test(name) || name.toLowerCase() === 'srcdoc';\n\n/**\n * The pattern a URL-bearing name's value is checked against, or `null` for any other name: a whole URL (`href`, `src`,\n * `action`, `formaction`, `xlink:href`, `data`) is checked whole, an animation value list (`to`, `from`, `by`,\n * `values`) item by item.\n */\nexport const urlCheck = (name: string) => {\n const sink = URL_SINK.exec(name);\n return sink === null ? null : sink[1] ? SCRIPT_URL : SCRIPT_URL_ITEM;\n};\n\n/**\n * **Development: core's value diagnostics, in core's words** (Brian, 2026-11-19: lite says them too — the same checks\n * and prose, shared from `@verajs/shared-utils`; production carries none of it). A boolean at a child position renders\n * as the word, said on each change to one (core's rule).\n */\nexport const sayBooleanChild = (value: unknown) => {\n if (typeof value === 'boolean') console.warn(diagnostic('lite', 'a child position', 'boolean-child', __DEV__ && SHARED.booleanChild(String(value))));\n};\n/** Development: a whole attribute value that is not text (a function, an array, a Date…), once per element, name and kind. */\nexport const sayAttributeValue = (element: Element, name: string, value: unknown) => {\n const kind = value == null ? null : attributeValueKind(element.localName, name, value);\n if (kind !== null) console.warn(diagnostic('lite', `<${element.localName}>`, 'attribute-value', __DEV__ && SHARED.attributeValue(name, kind, `.${name}=\\${value}`)));\n};\n/**\n * Development: a handler that cannot listen (`@click=${'alert(1)'}` — `false`/`undefined` are the deliberate \"none\"), and\n * at a binding's FIRST handler a misspelled event name (`@clik`), once per tag and name — core's two checks.\n */\nexport const sayListener = (element: Element, name: string, value: unknown, first: boolean) => {\n if (value == null || value === false) return;\n if (typeof value !== 'function' && typeof (value as EventListenerObject).handleEvent !== 'function')\n console.warn(diagnostic('lite', `<${element.localName}>`, 'not-a-listener', __DEV__ && SHARED.notAListener(name, typeof value)));\n const best = first ? eventNameGuess(element, name) : null;\n if (best !== null) warnOnce('lite', `<${element.localName}>`, 'event-name-typo', __DEV__ && (() => SHARED.eventNameTypo(name, element.localName, best)), eventKey(element, name));\n};\n\n/**\n * Development: a value only core renders, in a text position — an object that is not a template or a list (a `keyed` or\n * `spread` result, a DOM node: rendered as its text here). Said once.\n */\nexport const onlyCore = (value: unknown) => {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return;\n /**\n * Template-SHAPED (it holds `strings`) but no template: a forgery (`JSON.parse`), said in core's words\n * (`forged-template`), or a wrapper around a real literal's strings, which only core's `hold`/`tag` build — a template\n * to core, text here (2026-11-19, Brian: a recorded difference, said in development).\n */\n const strings = (value as { strings?: unknown }).strings;\n if (strings !== undefined) {\n if (Array.isArray(strings) && Object.hasOwn(strings, 'raw'))\n warnOnce('lite', 'html', 'template-wrapper', __DEV__ && (() => SHARED.templateWrapper()), 'template-wrapper');\n else warnOnce('lite', 'html', 'forged-template', __DEV__ && (() => SHARED.forgedTemplate()), 'forged-template');\n return;\n }\n const what = 'an object value (a `keyed` or `spread` result, a DOM node)';\n warnOnce('lite', 'html', 'tier-needs-core', __DEV__ && (() => PROSE['tier-needs-core'](what)), what);\n};\n","/**\n * **The lite tier's renderer: values patched in place.** A template is prepared once per call site (its `strings`\n * array): its HTML with a marker per hole, parsed into a `<template>`, walked once for where each hole is. Each instance\n * clones it and binds one part per hole; a render writes only what changed. Holes: text, attribute (whole or partial),\n * `?bool`, `.prop`, `!live`, `@event`, a nested template, an array (unkeyed, reused by index). The full tier's (`@verajs/core` + `@verajs/renderer`) template semantics,\n * with core's refusals (`markup.ts`); keyed lists, spread, refs and hydration are core's alone.\n */\nimport { JSON_BLOCK, SHARED, checkForeign, closedRawText, landing, misuse } from '@verajs/shared-utils';\nimport { PROSE } from './diagnostics.js';\nimport { IN_TAG, RAW, SCRIPT_START, TEXT_MARK, TEXT_MARKS, TEXT_ONLY, VALUE_MARK, WRITTEN_NAME, genuine, onlyCore, refusedName, sayAttributeValue, sayBooleanChild, sayListener, sayRefused, sayScriptUrl, urlCheck } from './markup.js';\nimport type { TemplateResult, LiteRoot } from './types.js';\n\n/**\n * Development: lite's sentence in the wrong-namespace advice (`checkForeign`), on another way to the right namespace —\n * there is none here but the tag (core's renderer can parse a template where it lands).\n */\nconst RETAG = ' (lite parses a template by its tag alone)';\n/** A hole's name for a hole that is its element's only child (`solePart`). */\nconst SOLE = '';\n/** A hole's name for a text-only element's content (`textPart`): `title`, `textarea`, `style`, a JSON data block. */\nconst TEXT = '\\u0003';\n\n/** A part: commits the value(s) starting at `at`. */\ntype Part = (values: readonly unknown[], at: number) => void;\n/**\n * A hole: the PATH to its node from the template's root (per level, how many `nextSibling` hops after `firstChild`), its\n * attribute name as written (`null` for a range, `SOLE` for an only child), its statics, the index of its first value.\n */\ntype Hole = [path: number[], name: string | null, statics: string[] | null, at: number];\n/**\n * A prepared template: the root every instance clones, its holes, whether it holds no custom element (`plain`), and\n * whether the root is the `<template>` element itself (`wrapped`: the server's DOM, which has no template content).\n */\ntype Prepared = [root: Node, holes: Hole[], plain: boolean, wrapped: boolean];\n/**\n * A list item: its first and last nodes, which stay for its life, and what it shows — a template instance (its strings,\n * parts and holes), a text node (neither; `_value` is the value it last wrote), or a nested list (a range between two\n * comments of its own).\n */\ntype Item = { _first: Node; _last: Node; _strings?: TemplateStringsArray; _parts?: Part[]; _holes?: Hole[]; _range?: Part; _value?: unknown };\n\n/**\n * Module state: each call site's prepared template, by its `strings` array, built once. Shared because every component\n * rendering a call site reuses its preparation; weak, so a call site's module unloading frees it.\n */\nconst prepared = new WeakMap<TemplateStringsArray, Prepared>();\n\n/** The path from `root` to `node`: per level down, the hops from the parent's first child. */\nconst pathTo = (node: Node, root: Node) => {\n const path: number[] = [];\n for (; node !== root; node = node.parentNode!) {\n let hops = 0;\n for (let sibling = node.previousSibling; sibling !== null; sibling = sibling.previousSibling) hops++;\n path.unshift(hops);\n }\n return path;\n};\n\nconst refuse = () => {\n throw new TypeError(misuse('html', 'tier-hole-position', __DEV__ && PROSE['tier-hole-position']()));\n};\n\n/**\n * Lands hole `at`: once, and of its kind (`text`, a text hole's marker; else a value hole's), or the template is refused —\n * an author's marker-shaped text standing in for a hole the parser lost is a duplicate, out of range, or the wrong kind.\n * `written[at]` is `null` exactly for a text hole (`prepare`).\n */\nconst land = (at: number, seen: boolean[], written: (string | null)[], text: boolean) => {\n if (seen[at] !== false || (written[at] === null) !== text) refuse();\n seen[at] = true;\n return at;\n};\n\n/**\n * `data` split by its markers (`marks` captures each hole's index), in one pass: every hole landed (`land`), and the\n * statics around them with the first hole's index (-1: none).\n */\nconst mark = (data: string, marks: RegExp, seen: boolean[], written: (string | null)[]): [statics: string[], first: number] => {\n const pieces = data.split(marks);\n const statics: string[] = [];\n let first = -1;\n for (let i = 0; i < pieces.length; i++)\n if (i % 2 === 0) statics.push(pieces[i]!);\n else {\n const at = land(+pieces[i]!, seen, written, marks === TEXT_MARKS);\n if (first === -1) first = at;\n }\n return [statics, first];\n};\n\n/** A hole found while checking: its node, its name (`null` a range, `SOLE`, `TEXT`, or an attribute's), its statics, its first value. */\ntype Found = [node: Node, name: string | null, statics: string[] | null, at: number];\n\n/**\n * **Checks every hole under `parent`, the template's first parse only** — each must land EXACTLY ONCE where it can be\n * filled (a comment holding exactly its marker; an attribute's value; a text-only element's text), or it is left unseen\n * and the template refused. A sigil binding (`@`, `.`, `!`, `?`) keeps its name AS WRITTEN (the parser lowercases), and\n * that name, lowercased, must be the parser's: a rough-scan naming error refuses the template rather than binding the\n * wrong property or event (the name backstop). Answers whether it met a custom element (a template holding one is\n * imported, not cloned: `instantiate`).\n */\nconst check = (parent: Node, seen: boolean[], found: Found[], written: (string | null)[], data: boolean): boolean => {\n let custom = false;\n for (let node = parent.firstChild; node !== null; node = node.nextSibling) {\n if (node.nodeType === 1) {\n const element = node as Element;\n if (element.localName.includes('-') || element.hasAttribute('is')) custom = true;\n /** False once `.innerHTML` or `.textContent` makes the content the author's value: a hole inside would be lost. */\n let walk = true;\n /** A script's type as the parser read it — the element that OPENED it, never a search of the text. */\n const type = element.localName === 'script' ? (element.getAttribute('type') ?? '') : '';\n /** Whether a value is bound on this element itself (a JSON block carrying one is refused, below). */\n let carries = false;\n for (const { name, value } of [...element.attributes]) {\n const [statics, at] = mark(value, VALUE_MARK, seen, written);\n if (at === -1) continue;\n carries = true;\n let bound = name;\n /**\n * A sigil binding, or `on` + a capital (`onClick=${fn}`, React muscle memory): core's rule, the renderer's own test\n * on the WRITTEN name, an event named by the rest, lowercased (Brian, 2026-11-17; parity rows in tests/lite.test.mjs).\n */\n if (/^[@.!?]/.test(name) || /^on[A-Z]/.test(written[at]!)) {\n bound = written[at]!;\n if (bound.toLowerCase() !== name) refuse();\n if (bound[0] === 'o') bound = `@${name.slice(2)}`;\n if (bound === '.innerHTML' || bound === '.textContent') walk = false;\n }\n element.removeAttribute(name);\n if (__DEV__) sayRefused(element, bound);\n found.push([node, bound, statics, at]);\n }\n if (!walk) continue;\n /**\n * A JSON block carrying a binding of its own is refused (2026-11-18): `?type=${false}`, `.type`, `!type` change the\n * type after it was judged here, and a page saved from the DOM then runs the value. Left unseen, so refused.\n */\n if (TEXT_ONLY.test(element.localName) || (element.localName === 'script' && data && !carries && JSON_BLOCK.test(type))) {\n /**\n * Its content as one string (in HTML RCDATA a marker is literal text, in SVG a comment); an element child stops it,\n * and so does the END marker (the template ends with the element open: a `<style/>` slip): left unseen.\n */\n let content = '';\n let textual = true;\n for (let child = element.firstChild; child !== null; child = child.nextSibling)\n if (child.nodeType === 3) content += (child as Text).data;\n else if (child.nodeType === 8) content += TEXT_MARK.test((child as Comment).data) ? `<!--${(child as Comment).data}-->` : '';\n else textual = false;\n if (textual && !content.includes(`<!--\\u0001${seen.length - 1}-->`)) {\n const [statics, at] = mark(content, TEXT_MARKS, seen, written);\n if (at !== -1) {\n element.textContent = '';\n found.push([node, TEXT, statics, at]);\n }\n }\n } else if (!RAW.test(element.localName) && check(node, seen, found, written, data)) custom = true;\n } else if (node.nodeType === 8) {\n const hole = TEXT_MARK.exec((node as Comment).data);\n if (hole !== null) found.push([node, null, null, land(+hole[1]!, seen, written, true)]);\n }\n }\n return custom;\n};\n\n/**\n * **A call site prepared, once:** its static text written with a marker per hole (the rough scan, `IN_TAG`, picks each\n * marker's form), one more after the end, parsed in a `<template>` (the server's DOM parses into the template itself) —\n * inside an `<svg>` or `<math>` root for an `svg` or `mathml` template (`type`) — every hole checked (`check`), then the\n * shape every instance clones.\n */\nconst prepare = (strings: TemplateStringsArray, doc: Document, type: number): Prepared => {\n let source = strings[0]!;\n /** Per hole, its attribute name as written (`''` in a tag where none reads), or `null` for a text hole; the end marker's too. */\n const written: (string | null)[] = [];\n for (let i = 1; i < strings.length; i++) {\n const tag = IN_TAG.exec(source);\n written.push(tag ? (WRITTEN_NAME.exec(source)?.[1] ?? '') : null);\n /**\n * An unquoted value followed by `/>` would absorb the slash (`<circle r=${r}/>` gives `r=\"5/\"` to the parser): a\n * space keeps it out, as core's renderer writes one — for every such hole (core's own scan, for an attribute's first).\n */\n source += (tag ? `\\u0002${i - 1}\\u0002${tag[1] || !strings[i]!.startsWith('/>') ? '' : ' '}` : `<!--\\u0001${i - 1}-->`) + strings[i];\n }\n written.push(null);\n const template = doc.createElement('template');\n /**\n * An `svg` or `mathml` template parses inside its root element, as core's renderer parses it; one more marker after\n * the end (inside that root): a template ending inside a tag, a comment or raw text swallows it.\n */\n const wrap = ['', '', 'svg', 'math'][type];\n const endMark = `<!--\\u0001${strings.length - 1}-->`;\n template.innerHTML = wrap ? `<${wrap}>${source}${endMark}</${wrap}>` : source + endMark;\n /** The server's DOM has no template content: its parse lands in the template itself (`instantiate` unwraps it). */\n const content: DocumentFragment | HTMLTemplateElement = template.content ?? template;\n /**\n * The root removed and EVERYTHING the parser made kept, in place: an HTML element written in foreign content breaks\n * out of it, and lands after it (core's rule — the template shows what the parser made, never less).\n */\n if (wrap) (content.firstChild as Element).replaceWith(...content.firstChild!.childNodes);\n /**\n * No script is a data block when any script start tag in the statics holds an `&` (matched whole, quote-aware): the\n * server reads the RAW type and refuses a character reference there (`dataBlock`), so the client refuses it too.\n */\n let data = true;\n for (const [tag] of strings.join('').matchAll(SCRIPT_START)) if (tag.includes('&')) data = false;\n const seen: boolean[] = new Array(strings.length).fill(false);\n const found: Found[] = [];\n const custom = check(content, seen, found, written, data);\n /** A hole missing; else the END marker swallowed: the template ends inside a tag, a comment or raw text. */\n const missing = seen.indexOf(false);\n if (missing !== -1) {\n if (missing < strings.length - 1) refuse();\n throw new TypeError(misuse('html', 'unfinished-tag', __DEV__ && SHARED.unfinishedTag()));\n }\n /**\n * The end marker has done its work: removed, so no instance carries it. It is the LAST hole found — the last text in\n * the source, and holes are found in document order — and anything else in that place refuses the template, so a\n * broken assumption can only refuse, never remove a node that is not the marker.\n */\n const [marker, , , last] = found.pop()!;\n if (last !== strings.length - 1) refuse();\n (marker as Comment).remove();\n /** An empty template still has a first node, so an instance of it can be a list item (bounded by its own nodes). */\n if (content.firstChild === null) content.append(doc.createTextNode(''));\n /**\n * A range is \"after its boundary\": a template that STARTS with a hole gets an empty comment as that boundary, since an\n * instance's first node has no stable node before it once inserted.\n */\n const first = content.firstChild!;\n if (first.nodeType === 8 && TEXT_MARK.test((first as Comment).data)) content.prepend(doc.createComment(''));\n /**\n * A hole that is its ELEMENT's only child needs no range: its marker becomes an empty text node IN THE TEMPLATE, so\n * every instance is cloned holding it and a render only sets its data (`solePart`).\n */\n for (let i = 0; i < found.length; i++) {\n const [node, name, , at] = found[i]!;\n if (name === null && node.parentNode !== content && node.parentNode!.childNodes.length === 1) {\n const parent = node.parentNode!;\n (node as Comment).replaceWith(doc.createTextNode(''));\n found[i] = [parent, SOLE, null, at];\n }\n }\n /** A template that is ONE element clones that element: one node to clone and to insert, no fragment (core's root). */\n const root = content.childNodes.length === 1 && content.firstChild!.nodeType === 1 ? content.firstChild! : content;\n return [root, found.map(([node, name, statics, at]) => [pathTo(node, root), name, statics, at]), !custom, root === template];\n};\n\n/**\n * **One instance: the template's root cloned, and a part per hole, located by its path BEFORE anything commits** (a\n * committed value inserts nodes, which would shift the siblings a later path counts). A plain template is cloned in its\n * own inert document and adopted on insertion — creating an element in a document with a custom-element registry costs\n * a definition lookup each; one holding a custom element is imported into the page's document, which upgrades it at\n * clone time, so a `.prop` commit reaches its setter (core's rule, `@verajs/renderer`'s instantiate).\n */\nconst instantiate = (strings: TemplateStringsArray, doc: Document, type: number): [Node, Part[], Hole[]] => {\n let entry = prepared.get(strings);\n if (entry === undefined) {\n /**\n * A forged template (JSON-shaped, `genuine`) renders as the forgery's text, as HTML: its own values are never read,\n * and its kind never chooses a namespace.\n */\n const real = genuine(strings);\n if (real !== strings) return instantiate(real, doc, 1);\n prepared.set(strings, (entry = prepare(strings, doc, type)));\n }\n const [root, holes, plain, wrapped] = entry;\n let clone = plain ? root.cloneNode(true) : doc.importNode(root, true);\n /**\n * A plain loop: a `map` arrow here would capture `clone`, a closure made on every instance (the hot-path rule).\n * **`parts` is a copy of `holes`, overwritten in place, so its storage is EXACTLY one slot per hole** (2026-11-17):\n * `parts` lives as long as the instance, and `[]` grown by `push` makes V8 reserve 17 slots for 3 entries (shown by\n * `%DebugPrint` on the built bundle). In Chrome, after rows were created and cleared on the page, appending 1 000 rows\n * was ~9% slower with `push` on every page: not its own script, which was within 0.15 ms, but the page's collection\n * schedule and the layout that followed it. A copy of `holes` has the right length and is already PACKED_ELEMENTS\n * (holes are tuples), so storing a part never changes its kind. The trade, accepted by Brian: on the first append in\n * a fresh page, exact-size arrays read slow on ~6 of 10 page loads (~+5%), where `push` did not.\n */\n const parts = holes.slice() as unknown as Part[];\n for (let i = 0; i < holes.length; i++) {\n const [path, name, statics] = holes[i]!;\n let node = clone;\n for (let step = 0; step < path.length; step++) {\n node = node.firstChild!;\n for (let hops = path[step]!; hops > 0; hops--) node = node.nextSibling!;\n }\n parts[i] = (\n name === null ? childPart(node.previousSibling, node as Comment)\n : name === SOLE ? solePart(node.firstChild as Text)\n : name === TEXT ? textPart(node as Element, statics!)\n : attrPart(node as Element, name, statics!)\n );\n }\n /** On the server the root is the parse's `<template>` element: its children, located above, are the instance. */\n if (wrapped) {\n const fragment = doc.createDocumentFragment();\n fragment.append(...clone.childNodes);\n clone = fragment;\n }\n return [clone, parts, holes];\n};\n\nconst commit = (parts: Part[], holes: Hole[], values: readonly unknown[]) => {\n for (let i = 0; i < parts.length; i++) parts[i]!(values, holes[i]![3]);\n};\n\n/** Removes `first` and every node after it, up to and with `last`. */\nconst removeRun = (first: Node, last: Node) => {\n /** Every node here is a child node (an element, text or a comment), so it has `remove`. */\n for (let node = first as ChildNode; ; ) {\n const next = node.nextSibling!;\n node.remove();\n if (node === last) return;\n node = next;\n }\n};\n\n/**\n * **Core's child rule for a list** (2026-11-19, the tier suites: a `Set` rendered `[object Set]`): an array, or any other\n * iterable OBJECT that is not a node — a `Set`, a `Map`'s entries, a generator — renders its items; a string (iterable\n * too, but a primitive) is one text, and a `<select>` or `<form>` (iterable nodes) is placed, never listed. Asked after\n * the template check, so a template or an array pays nothing for it.\n */\nconst isList = (value: unknown): boolean =>\n Array.isArray(value) ||\n (value !== null && typeof value === 'object' && typeof (value as Iterable<unknown>)[Symbol.iterator] === 'function' && (value as Node).nodeType === undefined);\n\n/**\n * A value's text at a child position. An object holding `strings` is template-SHAPED — a forgery (`JSON.parse`) or a\n * wrapper only core's `hold`/`tag` build — and never a template here: it renders as the constant text any object renders\n * as, NEVER converted (its own `toString` may be data, and a string there throws), as core renders a forgery.\n */\nconst childText = (value: unknown): string =>\n value == null ? '' : typeof value === 'object' && (value as { strings?: unknown }).strings !== undefined ? FORGED : `${value}`;\nconst FORGED = `${{}}`;\n\n/** Never a value: what an attribute part last wrote before its first write (core's `UNSET`). */\nconst UNSET = {};\n\n/**\n * **A new list item from `list[i]`, inserted into `parent` before `before`** — no comment of its own unless it needs one:\n * a template instance is bounded by its own first and last nodes (a one-element template is that element; one that\n * starts with a hole has a boundary comment; one that ends with a hole ends at that hole's comment), and a text value is\n * its text node. Anything else (a nested list) is a range between two comments, since nothing else bounds it.\n */\nconst makeItem = (source: readonly unknown[], at: number, parent: Node, before: Node | null): Item => {\n const value = source[at];\n const doc = parent.ownerDocument!;\n if ((value as TemplateResult | null)?._$litType$) {\n const { strings, values, _$litType$: type } = value as TemplateResult;\n const [clone, parts, holes] = /*@__NOINLINE__*/ instantiate(strings, doc, type);\n commit(parts, holes, values);\n const fragment = clone.nodeType === 11;\n const item: Item = { _first: fragment ? clone.firstChild! : clone, _last: fragment ? clone.lastChild! : clone, _strings: strings, _parts: parts, _holes: holes };\n /** Development: an element placed where its namespace does not render (a list's batch is checked where it lands). */\n if (__DEV__ && parent.nodeType !== 11) checkForeign('lite', parent, landing(clone), RETAG);\n parent.insertBefore(clone, before);\n return item;\n }\n if (isList(value)) {\n const first = doc.createComment('');\n const last = doc.createComment('');\n parent.insertBefore(first, before);\n parent.insertBefore(last, before);\n const range = childPart(first, last);\n range(source, at);\n return { _first: first, _last: last, _range: range };\n }\n if (__DEV__) onlyCore(value);\n if (__DEV__) sayBooleanChild(value);\n const text = doc.createTextNode(childText(value));\n parent.insertBefore(text, before);\n return { _first: text, _last: text, _value: value };\n};\n\n/** Renders `source[at]` into `items[i]`: in place when it is the same kind, or a new item takes its place. */\nconst updateItem = (items: Item[], i: number, source: readonly unknown[], at: number) => {\n const item = items[i]!;\n const value = source[at];\n if ((value as TemplateResult | null)?._$litType$) {\n if (item._strings === (value as TemplateResult).strings) return commit(item._parts!, item._holes!, (value as TemplateResult).values);\n } else if (isList(value)) {\n if (item._range !== undefined) return item._range(source, at);\n } else if (item._strings === undefined && item._range === undefined) {\n /** Compared with the value it last WROTE, never read back from the DOM (a read is a call into the engine per item). */\n if (value !== item._value) {\n if (__DEV__) sayBooleanChild(value);\n (item._first as Text).data = childText((item._value = value));\n }\n return;\n }\n items[i] = makeItem(source, at, item._last.parentNode!, item._last.nextSibling);\n removeRun(item._first, item._last);\n};\n\n/**\n * **A range: the nodes after `start` (from its parent's first child when `start` is `null`) up to `end`**, a comment kept\n * while the part lives. Everything the part shows, and everything its nested parts show, however they changed since,\n * lies inside it — so clearing removes exactly the range, and a range that is its parent's whole content clears in one\n * call. A single value is ONE item and a list is one item per element (`makeItem`, `updateItem`), so a template instance\n * (filled BEFORE it is inserted: one insertion) and text are made the same way in both; new list items are rendered into\n * one fragment and inserted once.\n */\nconst childPart = (start: Node | null, end: Comment): Part => {\n /** What the range shows: one item for a single value, one per element for a list (`list`), nothing when `undefined`. */\n let items: Item[] | undefined;\n let list = false;\n const clear = () => {\n if (items === undefined) return;\n if (start === null && end.nextSibling === null) end.parentNode!.replaceChildren(end);\n else\n for (let node = start === null ? end.parentNode!.firstChild! : start.nextSibling!; node !== end; ) {\n const next = node.nextSibling!;\n node.remove();\n node = next;\n }\n items = undefined;\n };\n return (values, at) => {\n let value = values[at];\n /** A non-array list (core's rule, `isList`) renders as the array of its items, read once per render. */\n if (!Array.isArray(value) && !(value as TemplateResult | null)?._$litType$ && isList(value)) value = [...(value as Iterable<unknown>)];\n if (Array.isArray(value)) {\n if (!list || items === undefined || value.length === 0) {\n clear();\n items = [];\n list = true;\n }\n const had = items.length;\n if (had > value.length) {\n /** The dropped items are one run of nodes: the first dropped item's first to the last item's last. */\n removeRun(items[value.length]!._first, items[had - 1]!._last);\n items.length = value.length;\n }\n for (let i = 0; i < Math.min(had, value.length); i++) updateItem(items, i, value, i);\n if (had < value.length) {\n /** New items are built in one fragment and inserted once. */\n const batch = end.ownerDocument.createDocumentFragment();\n for (let i = had; i < value.length; i++) items.push(makeItem(value, i, batch, null));\n if (__DEV__) checkForeign('lite', end.parentNode!, landing(batch), RETAG);\n end.before(batch);\n }\n } else if (value == null) clear();\n else if (list || items === undefined) {\n clear();\n list = false;\n items = [makeItem(values, at, end.parentNode!, end)];\n } else updateItem(items, 0, values, at);\n };\n};\n\n/**\n * **A hole that is its element's only child** (`<td>${id}</td>`, every cell of a table): it sets the data of the text node\n * the template already holds there — no comment, no insertion — until a value that is not text arrives (a template, a\n * list), when a comment takes the text's place as the end of a range that takes over for good.\n */\nconst solePart = (text: Text): Part => {\n let range: Part | undefined;\n /** The value last written, compared instead of reading the DOM back; `undefined` matches the template's empty text. */\n let last: unknown;\n return (values, at) => {\n const value = values[at];\n if (range === undefined && (value == null || typeof value !== 'object')) {\n if (value !== last) {\n if (__DEV__) sayBooleanChild(value);\n text.data = (last = value) == null ? '' : `${value}`;\n }\n } else {\n if (range === undefined) {\n const end = text.ownerDocument.createComment('');\n text.replaceWith(end);\n range = childPart(null, end);\n }\n range(values, at);\n }\n };\n};\n\n/**\n * A value as text, for a text-only element's content — the rule every tier and the server follow: `null`/`undefined`\n * none, a list its items' text (nested lists flattened by the same rule), a TEMPLATE refused (`template-in-text`, as\n * `@verajs/ssr` refuses it), otherwise the value as a string. A forged template (strings not owning `raw`) is no\n * template: its string.\n */\nconst textOf = (value: unknown): string => {\n if (value == null) return '';\n if (Array.isArray(value)) {\n let text = '';\n for (const item of value) text += textOf(item);\n return text;\n }\n const strings = (value as TemplateResult)._$litType$ ? (value as TemplateResult).strings : undefined;\n if (Array.isArray(strings) && Object.hasOwn(strings, 'raw'))\n throw new TypeError(misuse('html', 'template-in-text', __DEV__ && SHARED.templateInText()));\n return `${value}`;\n};\n\n/**\n * **A text-only element's content** (`title`, `textarea`, `style`, a JSON data block): its statics and its holes' values\n * as text, written as `textContent` (never parsed) when they changed — compared with the text last written.\n */\nconst textPart = (element: Element, statics: string[]): Part => {\n let last: string | undefined;\n /**\n * An HTML `<style>`'s or JSON block's text is serialized VERBATIM by the browser, so written as it is, a value would\n * become markup the moment the page is saved through `innerHTML`/`outerHTML` and parsed again (2026-11-18, measured on\n * three engines). So the COMPOSED text — statics and values together, since a closer can form across a hole (a static\n * `<` before a value `/style>`) — is written closed (`closedRawText`), as the renderer and `@verajs/ssr` write it, byte\n * for byte. HTML elements only — the upper-case `tagName` of an HTML document: an SVG `<style>` or `<script>` is\n * serialized escaped like any text, as core and the server leave it. Title and textarea are RCDATA, which\n * serialization escapes already.\n */\n const raw = element.tagName === 'STYLE' ? 1 : element.tagName === 'SCRIPT' ? 2 : 0;\n return (values, at) => {\n let text = statics[0]!;\n for (let i = 1; i < statics.length; i++) text += textOf(values[at + i - 1]) + statics[i]!;\n if (text !== last) element.textContent = raw ? /*@__NOINLINE__*/ closedRawText((last = text), raw > 1) : (last = text);\n };\n};\n\n/** One attribute hole: `@event`, `.prop`, `!live`, `?bool`, or an attribute, whole or with statics around its holes. */\nconst attrPart = (element: Element, name: string, statics: string[]): Part => {\n const prefix = name[0];\n const real = name.slice(1);\n const target = element as unknown as Record<string, unknown>;\n /** The value last written; a sentinel at first, so a first `undefined` is WRITTEN as core writes it (2026-11-19). */\n let last: unknown = UNSET;\n if (prefix === '@') {\n let handler: unknown;\n /** One listener per hole, registered once; a new handler only replaces what it calls. `this` is the element (core's). */\n element.addEventListener(real, {\n handleEvent(event: Event) {\n if (typeof handler === 'function') handler.call(element, event);\n else (handler as EventListenerObject | null)?.handleEvent?.(event);\n },\n });\n return (values, at) => {\n if (__DEV__) sayListener(element, real, values[at], handler == null);\n handler = values[at];\n };\n }\n if (prefix === '?')\n return (values, at) => {\n if (!!values[at] !== last) element.toggleAttribute(real, (last = !!values[at]));\n };\n /** `.prop` and `!live` write a property; anything else an attribute, by its parser name. */\n const property = prefix === '.' || prefix === '!';\n const key = property ? real : name;\n /**\n * Refused, as core refuses them: `.__proto__` would replace the element's prototype; a bound inline handler or `srcdoc`\n * attribute would run its value as code or markup. Kept a CALL, never pasted in (CLAUDE.md, the one-caller rule): as\n * this function's only caller, the minifier would substitute it here as an arrow made and invoked on every call —\n * every attribute hole created (both checks).\n */\n if (property ? real === '__proto__' : /*@__NOINLINE__*/ refusedName(name)) return () => {};\n const check = /*@__NOINLINE__*/ urlCheck(key);\n /** A component's URL-named property is its own business (often an object): only a string is checked there (core's). */\n const custom = property && element.localName.includes('-');\n const whole = statics.length === 2 && !statics[0] && !statics[1];\n /** Development: the script URL last refused, so a refusal is said each time the value changes (core's rule). */\n let refused: unknown;\n return (values, at) => {\n /** The statics and values joined by a plain loop: a `reduce` arrow here would capture `values` and `at` on every commit. */\n let value: unknown = values[at];\n if (!whole) {\n let joined = statics[0]!;\n for (let i = 1; i < statics.length; i++) joined += `${values[at + i - 1] ?? ''}${statics[i]}`;\n value = joined;\n }\n /**\n * A script URL is refused on the JOINED value and its attribute removed, as core does, for an attribute and a property\n * alike. Converted ONCE, so the string checked is the string written: an object whose `toString` answers differently\n * each time cannot pass as `https:` and be written as `javascript:`.\n */\n if (check !== null && value != null && (!custom || typeof value === 'string')) {\n value = `${value}`;\n if (check.test(value as string)) {\n if (__DEV__ && value !== refused) sayScriptUrl(element, key);\n if (__DEV__) refused = value;\n element.removeAttribute(key);\n last = UNSET;\n return;\n }\n }\n /** A LIVE property is compared against the element's current value (what was typed), as core's `!name`. */\n if (prefix === '!') {\n if (target[key] !== value) target[key] = value;\n } else if (value !== last) {\n last = value;\n if (property) target[key] = value;\n else if (value == null) element.removeAttribute(key);\n else {\n if (__DEV__ && whole) sayAttributeValue(element, key, values[at]);\n element.setAttribute(key, value as string);\n }\n }\n };\n};\n\n/** Paints `result` into `root`: the first paint clears what was there (served markup included) and anchors one range. */\nexport const patch = (result: unknown, root: LiteRoot) => {\n if (root._$t$ === undefined) {\n const end = root.ownerDocument.createComment('');\n root.replaceChildren(end);\n root._$t$ = childPart(null, end);\n }\n root._$t$([result], 0);\n};\n","/**\n * **When a small-tier component renders: a write queues it, and one microtask renders every queued component**, however\n * many writes landed first. No scheduler, no priorities, no tracking graph: a declared prop's setter and a signal's setter both end here.\n */\nimport { patch } from './patch.js';\nimport type { LiteElement } from './types.js';\n\n/**\n * Module state: the component whose render function is running, so a signal read during it subscribes that component.\n * Module-level because a signal is created anywhere (a module, a setup) and must find the render reading it. An object,\n * not an exported `let`: a hot read of an exported binding is slower (CLAUDE.md).\n */\nexport const reading: { element: LiteElement | undefined } = { element: undefined };\n\n/**\n * Module state: the components waiting to render, in the order they were queued. ONE microtask renders them all, and a\n * render queued DURING that flush (a parent's commit handing a child new props) joins it, so a parent and its children\n * are drawn before anything that awaited the write runs (the full tier's flush, `@verajs/core`'s, does the same). Module-level because every write,\n * from any component or signal, queues here.\n */\nconst pending: LiteElement[] = [];\n\n/** Lets go of every signal `element` read: before each render (which reads afresh), and when it is retired. */\nexport const unlink = (element: LiteElement) => {\n if (element._$l$ !== undefined) for (const readers of element._$l$) readers.delete(element);\n element._$l$ = undefined;\n};\n\n/**\n * Renders `element` now: its render function's result, patched into its root (`patch`). Nothing for an\n * element that is not connected, or whose setup returned no render function.\n * - It is no longer queued from the moment it starts, so a write DURING its own render queues it again (and a queued\n * entry for a render that already happened, on connect, is skipped by the flush).\n * - It subscribes only to what THIS render reads: it leaves every signal the last one read first, so a component never\n * holds a signal it no longer reads (a long-lived shell reading a churning list's rows would otherwise grow).\n * - `reading` is restored in a `finally`, so a render that throws never leaves later reads subscribing the wrong component.\n */\nexport const render = (element: LiteElement) => {\n element._$u$ = false;\n const draw = element._$f$;\n if (typeof draw === 'function' && element.isConnected) {\n unlink(element);\n const outer = reading.element;\n reading.element = element;\n let result: unknown;\n try {\n result = draw();\n } finally {\n reading.element = outer;\n }\n /** Kept a CALL, never pasted in (CLAUDE.md, the one-caller rule): as this function's only caller, the minifier would substitute it here as an arrow made and invoked on every render. */\n /*@__NOINLINE__*/ patch(result, element._$r$!);\n }\n};\n\n/**\n * Renders every component still queued, walking the queue by index. One that throws is reported as its error escapes:\n * it and everything before it are consumed, and whatever remains is rendered by a fresh flush, so one failure never\n * strands the rest or renders anything twice.\n */\nconst flush = () => {\n let i = 0;\n try {\n for (; i < pending.length; i++) if (pending[i]!._$u$) render(pending[i]!);\n } finally {\n pending.splice(0, i + 1);\n if (pending.length !== 0) queueMicrotask(flush);\n }\n};\n\n/** Queues one render of `element`; a second write before it runs adds nothing. */\nexport const queue = (element: LiteElement) => {\n if (!element._$u$) {\n element._$u$ = true;\n if (pending.push(element) === 1) queueMicrotask(flush);\n }\n};\n","import { SHARED, camel, checkDefinition, errorOnce, warnOnce } from '@verajs/shared-utils';\nimport { PROSE } from './diagnostics.js';\nimport { queue, render, unlink } from './schedule.js';\nimport type { Methods, DefinedClass, DefineOptions, LiteElement, WithAttributes } from './types.js';\n\n/** An array or plain-object default is copied per element, as core copies it; nested values stay shared. */\nconst own = (value: unknown) =>\n Array.isArray(value) ? [...value] : (value as object | null)?.constructor === Object ? { ...(value as object) } : value;\n\n/** Lets go of a component for good: its signals stop queuing it, and a later connect runs its setup again (as core). */\nconst retire = (element: LiteElement) => {\n unlink(element);\n element._$f$ = undefined;\n};\n\n/** Development: an option only core has (`foreignNodes`, `persist`, a module's key, a `ShadowRootInit`), said once per tag and key. */\nconst checkOptions = (tag: string, options: object) => {\n for (const [key, value] of Object.entries(options))\n if (!['tag', 'props', 'attributes', 'methods', 'shadow'].includes(key) || (key === 'shadow' && ![undefined, false, 'open', 'closed'].includes(value)))\n warnOnce('lite', `define('${tag}')`, 'tier-needs-core', __DEV__ && (() => PROSE['tier-needs-core'](`\\`${key}: ${typeof value === 'object' ? 'an object' : String(value)}\\``)), `${tag} ${key}`);\n};\n\n/**\n * Development: what a setup returned, when it is not a render function — core's words: a value is drawn once (in both\n * packages), a promise is an async setup, which is core's.\n */\nconst checkSetupResult = (element: LiteElement, out: unknown) => {\n if (typeof (out as PromiseLike<unknown> | null)?.then === 'function')\n warnOnce('lite', `<${element.localName}>`, 'tier-needs-core', __DEV__ && (() => PROSE['tier-needs-core']('an async setup')), element.constructor);\n else if (out !== undefined && typeof out !== 'function') {\n const kind = Array.isArray(out) ? 'an array' : typeof out === 'object' ? 'a template or object' : `a ${typeof out}`;\n errorOnce('lite', `<${element.localName}>`, 'setup-returned-value', __DEV__ && (() => SHARED.setupReturnedValue(kind)), element.constructor);\n }\n};\n\n/**\n * **`@verajs/lite`'s `define`**, rendering through its one renderer (`patch.ts`, called by `render` in `schedule.ts`).\n * `@verajs/core`'s call shape — `define(tag, setup)` or `define({ tag, props, attributes, methods, shadow }, setup)` — with the\n * reactivity reduced to a setter: a declared prop is an accessor on the generated prototype over the element's ONE values\n * record (`_$v$`, core's name and meaning), and a write that differs by `Object.is` queues one render. An observed\n * attribute arrives as its camel-cased prop, one way, as in core.\n *\n * - **Setup runs once per life, as core's:** a component removed and re-added in the same task (a move) keeps it; one\n * still out a microtask later is retired, and its next connect sets it up again. Props survive, as core's do.\n * - **A value set before the tag was defined** is an own property hiding the accessor: handed over through it at connect.\n * - **An own `__proto__` key** (`JSON.parse` makes one) is skipped in props and methods, as core skips it.\n * - **A setup that returns a value, not a render function, draws it once** (core's behavior and core's development error);\n * one that returns nothing, or a promise (an async setup, core's alone), draws nothing.\n * - An author's `methods.disconnectedCallback` runs first on removal, as core chains it.\n * - Development checks the definition in core's words (`checkDefinition`) and names every option only core has.\n */\nexport const define = <M extends Methods = Record<never, never>, P extends object = Record<never, never>, A extends readonly string[] = []>(\n target: string | (DefineOptions & { props?: P; attributes?: A; methods?: M & ThisType<HTMLElement & WithAttributes<P, A> & M> }),\n setup: (host: HTMLElement & WithAttributes<P, A> & M) => (() => unknown) | void\n): DefinedClass<WithAttributes<P, A> & M> => {\n let tag = target as string;\n let props: object | undefined;\n let attributes: readonly string[] = [];\n let methods: M | undefined;\n let shadow: DefineOptions['shadow'];\n if (typeof target !== 'string') ({ tag, props, attributes = [], methods, shadow } = target);\n if (__DEV__) {\n checkDefinition('lite', tag, setup, methods, props, typeof target === 'string' ? undefined : target.attributes, false);\n if (typeof target !== 'string') checkOptions(tag, target);\n }\n /** Each declared attribute is a prop under its camel name, default `null` unless a declared prop shares it. */\n const camels: Record<string, string> = {};\n const declared: Record<string, unknown> = {};\n for (const name of attributes) declared[(camels[name] = camel(name))] = null;\n const defaults: Record<string, unknown> = { ...declared, ...props };\n const keys = Object.keys(defaults).filter((key) => key !== '__proto__');\n const fill = () => {\n const record: Record<string, unknown> = {};\n for (const key of keys) record[key] = own(defaults[key]);\n return record;\n };\n const write = (element: LiteElement, key: string, value: unknown) => {\n const record = (element._$v$ ??= fill());\n if (!Object.is(record[key], value)) {\n record[key] = value;\n queue(element);\n }\n };\n const Class = class extends HTMLElement {};\n const installed: Record<string, unknown> = { ...methods };\n delete installed.__proto__;\n /** Methods first, so a method named like a callback never replaces one (core's order). */\n Object.assign(Class.prototype, installed, {\n constructor: Class,\n connectedCallback(this: LiteElement) {\n if (this._$f$ === undefined) {\n for (const key of keys)\n if (Object.hasOwn(this, key)) {\n const value = (this as unknown as Record<string, unknown>)[key];\n delete (this as unknown as Record<string, unknown>)[key];\n (this as unknown as Record<string, unknown>)[key] = value;\n }\n /** `shadowRoot` first: a declarative shadow root the server sent is the one to render into. */\n this._$r$ ??= shadow ? (this.shadowRoot ?? this.attachShadow({ mode: shadow })) : this;\n const out: unknown = setup(this as never);\n if (__DEV__) checkSetupResult(this, out);\n /** A promise is an async setup, which is core's: it draws nothing here (development says so). */\n this._$f$ =\n typeof out === 'function'\n ? (out as () => unknown)\n : out === undefined || typeof (out as PromiseLike<unknown>).then === 'function'\n ? null\n : () => out;\n }\n render(this);\n },\n disconnectedCallback(this: LiteElement) {\n (installed.disconnectedCallback as (() => void) | undefined)?.call(this);\n queueMicrotask(() => {\n /** Kept a CALL, never pasted in (CLAUDE.md, the one-caller rule): as this function's only caller, the minifier would substitute it here as an arrow made and invoked on every call — every removal. */\n if (!this.isConnected) /*@__NOINLINE__*/ retire(this);\n });\n },\n });\n /** Observed attributes only on a tag that declares some: every callback a class defines is creation work. */\n if (attributes.length) {\n (Class as unknown as { observedAttributes: readonly string[] }).observedAttributes = attributes;\n (Class.prototype as unknown as { attributeChangedCallback: unknown }).attributeChangedCallback = function (\n this: LiteElement,\n name: string,\n _old: string | null,\n value: string | null\n ) {\n write(this, camels[name]!, value);\n };\n }\n for (const key of keys)\n Object.defineProperty(Class.prototype, key, {\n get(this: LiteElement) {\n return (this._$v$ ??= fill())[key];\n },\n set(this: LiteElement, value: unknown) {\n write(this, key, value);\n },\n configurable: true,\n enumerable: true,\n });\n customElements.define(tag, Class);\n return customElements.get(tag) as unknown as DefinedClass<WithAttributes<P, A> & M>;\n};\n","/**\n * **Whether this code is running on the server** — `true` while `@verajs/ssr` renders, `false` in a browser: the same\n * function as `@verajs/core`'s, so a component that guards per-user state with `if (!isServer()) …` runs unchanged on\n * either tier. Its own copy, because lite imports nothing; both read the flag `@verajs/ssr` sets on the global, when called.\n */\nexport const isServer = (): boolean => !!(globalThis as { _$ssr$?: boolean })._$ssr$;\n","import { warnOnce } from '@verajs/shared-utils';\nimport { PROSE } from './diagnostics.js';\nimport { reading, queue } from './schedule.js';\nimport type { Signal, LiteElement } from './types.js';\n\n/** Where a signal keeps its value and its readers: symbols private to this copy, so no key, spread or JSON shows them. */\nconst HELD = Symbol();\nconst READERS = Symbol();\ntype Held = { [HELD]: unknown; [READERS]?: Set<LiteElement> };\n\n/**\n * **What every small-tier signal shares: one accessor pair on one frozen prototype — the full tier's (`@verajs/core`'s) shape** (`modules/signal.ts`),\n * so a signal reads, writes, stringifies and enumerates the same in every tier: `Object.keys` and `for…in` list nothing,\n * `JSON.stringify` writes the value, its tag is `[object Signal]`. Reading `.value` during a render subscribes that\n * component (`reading`); a write that differs by `Object.is` queues every subscriber. The component, not a graph, is\n * the unit: no computed, no effect, nothing to unlink but the components, which let go when they are retired.\n */\nconst SIGNAL = Object.freeze(\n Object.defineProperties(\n {},\n {\n [Symbol.toStringTag]: { value: 'Signal' },\n value: {\n get(this: Held) {\n const element = reading.element;\n if (element !== undefined) {\n const readers = (this[READERS] ??= new Set());\n readers.add(element);\n (element._$l$ ??= new Set()).add(readers);\n }\n return this[HELD];\n },\n set(this: Held, next: unknown) {\n if (Object.is(this[HELD], next)) return;\n this[HELD] = next;\n const readers = this[READERS];\n if (readers !== undefined) for (const element of readers) queue(element);\n },\n },\n toJSON: {\n value(this: Held) {\n return this[HELD];\n },\n },\n },\n ),\n);\n\n/** The empty call first so a no-argument call matches it, the valued one last so `ReturnType` means the common case (as core). */\ntype SignalFactory = {\n <T = undefined>(): Signal<T | undefined>;\n <T>(initialValue: T): Signal<T>;\n};\n\n/**\n * **A reactive box for one value, read and written as `.value`; shallow, as core's default.** Replacing `.value` re-renders\n * every component that read it; mutating inside it does not. Core's `{ deep: true }` is core's alone.\n */\nexport const signal: SignalFactory = <T,>(initialValue?: T, options?: unknown) => {\n if (__DEV__ && options !== undefined)\n warnOnce('lite', 'signal', 'tier-needs-core', __DEV__ && (() => PROSE['tier-needs-core'](\"`signal`'s options (`{ deep: true }`)\")));\n const box = Object.create(SIGNAL) as Held;\n box[HELD] = initialValue;\n return box as unknown as Signal<T>;\n};\n","/**\n * **`@verajs/lite`'s template tags, `html`, `svg` and `mathml`**: the same tags as `@verajs/core`'s\n * (`packages/core/src/store/store.ts`), a second copy on purpose (2026-11-18). When both packages took the tags from one\n * shared-utils module, they moved within core's production bundle, and core's create1k measured +3.5% slower in Chrome\n * (20 sessions, A/A valid); with its own copy, core's bundle is byte-identical to the one raced at release.\n * `tests/lite.test.mjs` holds the two copies to one shape — never fold them back into one. Each tag is written out, as\n * core's are (one function per kind: no tag built by a factory, so each stays a plain function the engine inlines).\n *\n * Called with a string instead of tagged, development names it, in core's words (`tag-called`): `html('<p>x</p>')` puts a\n * string where the strings array goes and fails much later, naming nothing. Production folds the check away.\n */\nimport { misuse, SHARED } from '@verajs/shared-utils';\nimport type { ResultType, TemplateResult } from './types.js';\n\nconst tagCalled = (type: ResultType, strings: unknown): void => {\n if (!Array.isArray(strings)) {\n const name = ['html', 'svg', 'mathml'][type - 1]!;\n throw new TypeError(misuse(name, 'tag-called', __DEV__ && SHARED.tagCalled(name, typeof strings === 'string' ? JSON.stringify(strings) : String(strings), '<p>hi</p>')));\n }\n};\n\n/** The `html` tagged template. */\nexport const html = (strings: TemplateStringsArray, ...values: unknown[]): TemplateResult<1> => {\n if (__DEV__) tagCalled(1, strings);\n return { ['_$litType$']: 1, strings, values };\n};\n/** The `svg` tagged template — markup parsed as SVG, for a fragment that is not inside an `<svg>` element. */\nexport const svg = (strings: TemplateStringsArray, ...values: unknown[]): TemplateResult<2> => {\n if (__DEV__) tagCalled(2, strings);\n return { ['_$litType$']: 2, strings, values };\n};\n/** The `mathml` tagged template — markup parsed as MathML, for a fragment that is not inside a `<math>` element. */\nexport const mathml = (strings: TemplateStringsArray, ...values: unknown[]): TemplateResult<3> => {\n if (__DEV__) tagCalled(3, strings);\n return { ['_$litType$']: 3, strings, values };\n};\n"],"names":["tagCalled","SHARED.wrongNamespace","SHARED.defineAttributes","SHARED.defineAttributeType","SHARED.defineAttributeReflected","SHARED.defineProtoKey","SHARED.definePropsNotObject","SHARED.definePropMethod","SHARED.defineShadows","SHARED.definePropSharedDefault","SHARED.defineMethodIgnored","SHARED.defineMethodNotFunction","SHARED.defineMethodAdopted","SHARED.defineMethodUnobserved","SHARED.defineTag","SHARED.defineSetup","SHARED.tagDefinedAgain","FORGED","SHARED.forgedTemplate","SHARED.protoBinding","SHARED.srcdocAttribute","SHARED.handlerAttribute","SHARED.scriptUrl","SHARED.booleanChild","SHARED.attributeValue","SHARED.notAListener","SHARED.eventNameTypo","SHARED.templateWrapper","SHAR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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,r=/^on./i,l=/json\s*$/i,s=(t,e)=>e?t.replace(/</g,"\\u003c"):t.replace(/<\/(style)/gi,"<\\/$1"),i=t=>t.replace(/-([a-z])/g,((t,e)=>e.toUpperCase())),c=/<[a-zA-Z](?:[^>"']|"[^"]*"|'[^']*')*("[^"]*|'[^']*)?$/,f=/([^\s"'>/=]+)\s*=\s*(?:"[^"]*|'[^']*|[^\s"'>]*)$/,u=/^\u0001(\d+)$/,a=/\u0002(\d+)\u0002/g,d=/<!--\u0001(\d+)-->/g,h=/^(?:script|iframe|noscript|xmp|noembed|noframes|plaintext|template)$/i,v=/^(?:title|textarea|style)$/i,p=/<script\b(?:[^>"']|"[^"]*"|'[^']*')*>?/gi,y=(t=>t)`[object Object]`,$=t=>r.test(t)||"srcdoc"===t.toLowerCase(),b=t=>{const r=n.exec(t);return null===r?null:r[1]?e:o},m=new WeakMap,_=(t,e)=>{const n=[];for(;t!==e;t=t.parentNode){let e=0;for(let n=t.previousSibling;null!==n;n=n.previousSibling)e++;n.unshift(e)}return n},g=()=>{throw new TypeError(t("html","tier-hole-position"))},j=(t,e,n,o)=>(!1===e[t]&&null===n[t]===o||g(),e[t]=!0,t),x=(t,e,n,o)=>{const r=t.split(e),l=[];let s=-1;for(let t=0;t<r.length;t++)if(t%2==0)l.push(r[t]);else{const l=j(+r[t],n,o,e===d);-1===s&&(s=l)}return[l,s]},O=(t,e,n,o,r)=>{let s=!1;for(let i=t.firstChild;null!==i;i=i.nextSibling)if(1===i.nodeType){const t=i;(t.localName.includes("-")||t.hasAttribute("is"))&&(s=!0);let c=!0;const f="script"===t.localName?t.getAttribute("type")??"":"";let p=!1;for(const{name:r,value:l}of[...t.attributes]){const[s,f]=x(l,a,e,o);if(-1===f)continue;p=!0;let u=r;(/^[@.!?]/.test(r)||/^on[A-Z]/.test(o[f]))&&(u=o[f],u.toLowerCase()!==r&&g(),"o"===u[0]&&(u=`@${r.slice(2)}`),".innerHTML"!==u&&".textContent"!==u||(c=!1)),t.removeAttribute(r),n.push([i,u,s,f])}if(!c)continue;if(v.test(t.localName)||"script"===t.localName&&r&&!p&&l.test(f)){let r="",l=!0;for(let e=t.firstChild;null!==e;e=e.nextSibling)3===e.nodeType?r+=e.data:8===e.nodeType?r+=u.test(e.data)?`\x3c!--${e.data}--\x3e`:"":l=!1;if(l&&!r.includes(`\x3c!--${e.length-1}--\x3e`)){const[l,s]=x(r,d,e,o);-1!==s&&(t.textContent="",n.push([i,"",l,s]))}}else!h.test(t.localName)&&O(i,e,n,o,r)&&(s=!0)}else if(8===i.nodeType){const t=u.exec(i.data);null!==t&&n.push([i,null,null,j(+t[1],e,o,!0)])}return s},w=(e,n,o)=>{let r=m.get(e);if(void 0===r){const l=(t=>(t=>Array.isArray(t)&&Object.hasOwn(t,"raw"))(t)?t:y)(e);if(l!==e)return w(l,n,1);m.set(e,r=((e,n,o)=>{let r=e[0];const l=[];for(let t=1;t<e.length;t++){const n=c.exec(r);l.push(n?f.exec(r)?.[1]??"":null),r+=(n?`${t-1}${n[1]||!e[t].startsWith("/>")?"":" "}`:`\x3c!--${t-1}--\x3e`)+e[t]}l.push(null);const s=n.createElement("template"),i=["","","svg","math"][o],a=`\x3c!--${e.length-1}--\x3e`;s.innerHTML=i?`<${i}>${r}${a}</${i}>`:r+a;const d=s.content??s;i&&d.firstChild.replaceWith(...d.firstChild.childNodes);let h=!0;for(const[t]of e.join("").matchAll(p))t.includes("&")&&(h=!1);const v=new Array(e.length).fill(!1),y=[],$=O(d,v,y,l,h),b=v.indexOf(!1);if(-1!==b)throw b<e.length-1&&g(),new TypeError(t("html","unfinished-tag"));const[m,,,j]=y.pop();j!==e.length-1&&g(),m.remove(),null===d.firstChild&&d.append(n.createTextNode(""));const x=d.firstChild;8===x.nodeType&&u.test(x.data)&&d.prepend(n.createComment(""));for(let t=0;t<y.length;t++){const[e,o,,r]=y[t];if(null===o&&e.parentNode!==d&&1===e.parentNode.childNodes.length){const o=e.parentNode;e.replaceWith(n.createTextNode("")),y[t]=[o,"",null,r]}}const w=1===d.childNodes.length&&1===d.firstChild.nodeType?d.firstChild:d;return[w,y.map((([t,e,n,o])=>[_(t,w),e,n,o])),!$,w===s]})(e,n,o))}const[l,s,i,a]=r;let d=i?l.cloneNode(!0):n.importNode(l,!0);const h=s.slice();for(let t=0;t<s.length;t++){const[e,n,o]=s[t];let r=d;for(let t=0;t<e.length;t++){r=r.firstChild;for(let n=e[t];n>0;n--)r=r.nextSibling}h[t]=null===n?L(r.previousSibling,r):""===n?z(r.firstChild):""===n?Z(r,o):I(r,n,o)}if(a){const t=n.createDocumentFragment();t.append(...d.childNodes),d=t}return[d,h,s]},T=(t,e,n)=>{for(let o=0;o<t.length;o++)t[o](n,e[o][3])},A=(t,e)=>{for(let n=t;;){const t=n.nextSibling;if(n.remove(),n===e)return;n=t}},S=t=>Array.isArray(t)||null!==t&&"object"==typeof t&&"function"==typeof t[Symbol.iterator]&&void 0===t.nodeType,E=t=>null==t?"":"object"==typeof t&&void 0!==t.strings?k:`${t}`,k=`${{}}`,M={},C=(t,e,n,o)=>{const r=t[e],l=n.ownerDocument;if(r?._$litType$){const{strings:t,values:e,_$litType$:s}=r,[i,c,f]=/*@__NOINLINE__*/w(t,l,s);T(c,f,e);const u=11===i.nodeType,a={t:u?i.firstChild:i,o:u?i.lastChild:i,l:t,i:c,u:f};return n.insertBefore(i,o),a}if(S(r)){const r=l.createComment(""),s=l.createComment("");n.insertBefore(r,o),n.insertBefore(s,o);const i=L(r,s);return i(t,e),{t:r,o:s,h:i}}const s=l.createTextNode(E(r));return n.insertBefore(s,o),{t:s,o:s,v:r}},q=(t,e,n,o)=>{const r=t[e],l=n[o];if(l?._$litType$){if(r.l===l.strings)return T(r.i,r.u,l.values)}else if(S(l)){if(void 0!==r.h)return r.h(n,o)}else if(void 0===r.l&&void 0===r.h)return void(l!==r.v&&(r.t.data=E(r.v=l)));t[e]=C(n,o,r.o.parentNode,r.o.nextSibling),A(r.t,r.o)},L=(t,e)=>{let n,o=!1;const r=()=>{if(void 0!==n){if(null===t&&null===e.nextSibling)e.parentNode.replaceChildren(e);else for(let n=null===t?e.parentNode.firstChild:t.nextSibling;n!==e;){const t=n.nextSibling;n.remove(),n=t}n=void 0}};return(t,l)=>{let s=t[l];if(Array.isArray(s)||s?._$litType$||!S(s)||(s=[...s]),Array.isArray(s)){o&&void 0!==n&&0!==s.length||(r(),n=[],o=!0);const t=n.length;t>s.length&&(A(n[s.length].t,n[t-1].o),n.length=s.length);for(let e=0;e<Math.min(t,s.length);e++)q(n,e,s,e);if(t<s.length){const o=e.ownerDocument.createDocumentFragment();for(let e=t;e<s.length;e++)n.push(C(s,e,o,null));e.before(o)}}else null==s?r():o||void 0===n?(r(),o=!1,n=[C(t,l,e.parentNode,e)]):q(n,0,t,l)}},z=t=>{let e,n;return(o,r)=>{const l=o[r];if(void 0!==e||null!=l&&"object"==typeof l){if(void 0===e){const n=t.ownerDocument.createComment("");t.replaceWith(n),e=L(null,n)}e(o,r)}else l!==n&&(t.data=null==(n=l)?"":`${l}`)}},H=e=>{if(null==e)return"";if(Array.isArray(e)){let t="";for(const n of e)t+=H(n);return t}const n=e._$litType$?e.strings:void 0;if(Array.isArray(n)&&Object.hasOwn(n,"raw"))throw new TypeError(t("html","template-in-text"));return`${e}`},Z=(t,e)=>{let n;const o="STYLE"===t.tagName?1:"SCRIPT"===t.tagName?2:0;return(r,l)=>{let i=e[0];for(let t=1;t<e.length;t++)i+=H(r[l+t-1])+e[t];i!==n&&(t.textContent=o?/*@__NOINLINE__*/s(n=i,o>1):n=i)}},I=(t,e,n)=>{const o=e[0],r=e.slice(1),l=t;let s=M;if("@"===o){let e;return t.addEventListener(r,{handleEvent(n){"function"==typeof e?e.call(t,n):e?.handleEvent?.(n)}}),(t,n)=>{e=t[n]}}if("?"===o)return(e,n)=>{!!e[n]!==s&&t.toggleAttribute(r,s=!!e[n])};const i="."===o||"!"===o,c=i?r:e;if(i?"__proto__"===r:/*@__NOINLINE__*/$(e))return()=>{};const f=/*@__NOINLINE__*/b(c),u=i&&t.localName.includes("-"),a=2===n.length&&!n[0]&&!n[1];return(e,r)=>{let d=e[r];if(!a){let t=n[0];for(let o=1;o<n.length;o++)t+=`${e[r+o-1]??""}${n[o]}`;d=t}if(null!==f&&null!=d&&(!u||"string"==typeof d)&&(d=`${d}`,f.test(d)))return t.removeAttribute(c),void(s=M);"!"===o?l[c]!==d&&(l[c]=d):d!==s&&(s=d,i?l[c]=d:null==d?t.removeAttribute(c):t.setAttribute(c,d))}},J=(t,e)=>{if(void 0===e._$t$){const t=e.ownerDocument.createComment("");e.replaceChildren(t),e._$t$=L(null,t)}e._$t$([t],0)},N={element:void 0},P=[],R=t=>{if(void 0!==t._$l$)for(const e of t._$l$)e.delete(t);t._$l$=void 0},W=t=>{t._$u$=!1;const e=t._$f$;if("function"==typeof e&&t.isConnected){R(t);const n=N.element;let o;N.element=t;try{o=e()}finally{N.element=n}
2
+ /*@__NOINLINE__*/J(o,t._$r$)}},Y=()=>{let t=0;try{for(;t<P.length;t++)P[t]._$u$&&W(P[t])}finally{P.splice(0,t+1),0!==P.length&&queueMicrotask(Y)}},B=t=>{t._$u$||(t._$u$=!0,1===P.push(t)&&queueMicrotask(Y))},D=t=>{R(t),t._$f$=void 0},F=(t,e)=>{let n,o,r,l=t,s=[];"string"!=typeof t&&({tag:l,props:n,attributes:s=[],methods:o,shadow:r}=t);const c={},f={};for(const t of s)f[c[t]=i(t)]=null;const u={...f,...n},a=Object.keys(u).filter((t=>"__proto__"!==t)),d=()=>{const t={};for(const n of a)t[n]=(e=u[n],Array.isArray(e)?[...e]:e?.constructor===Object?{...e}:e);var e;return t},h=(t,e,n)=>{const o=t._$v$??=d();Object.is(o[e],n)||(o[e]=n,B(t))},v=class extends HTMLElement{},p={...o};delete p.__proto__,Object.assign(v.prototype,p,{constructor:v,connectedCallback(){if(void 0===this._$f$){for(const t of a)if(Object.hasOwn(this,t)){const e=this[t];delete this[t],this[t]=e}this._$r$??=r?this.shadowRoot??this.attachShadow({mode:r}):this;const t=e(this);this._$f$="function"==typeof t?t:void 0===t||"function"==typeof t.then?null:()=>t}W(this)},disconnectedCallback(){p.disconnectedCallback?.call(this),queueMicrotask((()=>{this.isConnected||/*@__NOINLINE__*/
3
+ D(this)}))}}),s.length&&(v.observedAttributes=s,v.prototype.attributeChangedCallback=function(t,e,n){h(this,c[t],n)});for(const t of a)Object.defineProperty(v.prototype,t,{get(){return(this._$v$??=d())[t]},set(e){h(this,t,e)},configurable:!0,enumerable:!0});return customElements.define(l,v),customElements.get(l)},G=()=>!!globalThis._$ssr$,K=Symbol(),Q=Symbol(),U=Object.freeze(Object.defineProperties({},{[Symbol.toStringTag]:{value:"Signal"},value:{get(){const t=N.element;if(void 0!==t){const e=this[Q]??=new Set;e.add(t),(t._$l$??=new Set).add(e)}return this[K]},set(t){if(Object.is(this[K],t))return;this[K]=t;const e=this[Q];if(void 0!==e)for(const t of e)B(t)}},toJSON:{value(){return this[K]}}})),V=(t,e)=>{const n=Object.create(U);return n[K]=t,n},X=(t,...e)=>({_$litType$:1,strings:t,values:e}),tt=(t,...e)=>({_$litType$:2,strings:t,values:e}),et=(t,...e)=>({_$litType$:3,strings:t,values:e});export{F as define,X as html,G as isServer,et as mathml,V as signal,tt as svg};
4
+ //# sourceMappingURL=vera-lite.min.js.map