import type { TemplateBinding } from '../processor/parser'; /** Runtime ref slot stored in the generated refs array */ interface RefSlot { /** For Node bindings: the start comment node */ startComment?: Comment; /** For Node bindings: the end comment node */ endComment?: Comment; /** For attribute / element bindings: the host element */ el?: Element; /** Previous value — used to skip no-op updates */ prev?: unknown; /** Bound event listener (for cleanup) */ listener?: EventListener; /** Utility classes/styles applied by % bindings */ utilityState?: unknown; /** Track active style keys for object-style updates */ styleKeys?: Set | null; } /** * CodeFactory — generates optimised render/update JavaScript from a parsed * miura template. * * The generated functions use a `refs` array whose slots are populated once * (by `collectRefs()`) and then reused on every subsequent update call, * avoiding repeated DOM tree walks. */ export declare class CodeFactory { private readonly _html; constructor(html: string); /** * Generate the render function for the template. * The returned function creates the DOM, collects refs, applies initial * values, and returns `{ fragment, refs }`. */ generateRenderFunction(bindings: TemplateBinding[], count: number): CompiledRenderFn; /** * Generate the update function for the template. * Requires the `refs` array produced by the render function. */ generateUpdateFunction(bindings: TemplateBinding[]): CompiledUpdateFn; get html(): string; } export type CompiledRenderFn = (html: string, values: unknown[], applyUtilityValue: (...args: any[]) => any, clearAppliedUtilities: (...args: any[]) => any, createDOMFragment: (html: string) => DocumentFragment) => { fragment: DocumentFragment; refs: RefSlot[]; }; export type CompiledUpdateFn = (refs: RefSlot[], values: unknown[], applyUtilityValue: (...args: any[]) => any, clearAppliedUtilities: (...args: any[]) => any) => void; export {}; //# sourceMappingURL=code-factory.d.ts.map