export type TemplateNode = ElementNode | TextNode | ExpressionNode | IfNode | EachNode; export interface ElementNode { kind: 'element'; tag: string; attrs: AttrNode[]; children: TemplateNode[]; } export interface TextNode { kind: 'text'; value: string; } export interface ExpressionNode { kind: 'expression'; expr: string; } export interface IfNode { kind: 'if'; condition: string; consequent: TemplateNode[]; alternate: TemplateNode[]; } export interface EachNode { kind: 'each'; /** Variable name for each item */ item: string; /** Optional index variable name */ index: string | null; /** Expression for the iterable */ iterable: string; /** key expression using item/index */ keyExpr: string | null; children: TemplateNode[]; } export interface AttrNode { name: string; /** String literal value, or JS expression if dynamic */ value: string | null; /** true if the value is a JS expression (e.g., {count()}) */ dynamic: boolean; /** true for on:click, on:input etc. (event binding) */ isEvent: boolean; /** true for bind:value etc. (two-way binding) */ isBinding: boolean; } /** * Parse an HTML-like Velox template into a TemplateNode AST. * Supports: {expr}, on:click, bind:value, , */ export declare function parseTemplate(html: string): TemplateNode[]; //# sourceMappingURL=compile-template.d.ts.map