import { DOMApi } from './types'; import { DestructorFn } from './glimmer/destroyable'; export interface StaticBlockSlot { /** * Child-index walk from the block root, resolved with * firstChild/nextSibling hops. `[]` = the root element itself; * `[1, 0]` = root's 2nd child → its 1st child. Indices count ALL child * nodes the compiler baked into the html chunk (it controls the markup, * so the indices are exact by construction). */ readonly p: readonly number[]; readonly k: 'text' | 'attr' | 'prop' | 'class' | 'event'; /** attribute / property / event name; unset for 'text' and 'class'. */ readonly n?: string; } export interface StaticBlockDef { /** The static slot table (frame mode reads kinds/names/paths from here). */ readonly slots: readonly StaticBlockSlot[]; /** * Clone the block and wire the positional `values` (matching the slot * table) into the slot nodes. Binding destructors are pushed into the * caller-owned `destructors` array — the caller registers them against * the row owner ctx exactly like `_DOM` does. Returns the root Node. */ create(api: DOMApi, values: readonly unknown[], destructors: DestructorFn[]): Node; /** * Frame-mode clone (src/core/control-flow/list-frames.ts): clone the block * and resolve every slot node ONCE, WITHOUT wiring any bindings. The frame * runtime applies/updates slot values itself (no per-binding formulas). */ cloneFrame(api: DOMApi): { root: Node; nodes: Node[]; }; } /** * Create a static-block definition from compiler-emitted html + slot table. * Cheap to call repeatedly (per `$_each` site execution): the html parse is * memoized module-wide per (html, document). */ export declare function $_blk(html: string, slots: readonly StaticBlockSlot[]): StaticBlockDef;