/** * HTML template rendering with reactive bindings. * * Uses tagged template literals to create reactive DOM: * - Text interpolation: ${value} or ${signal} * - Attribute binding: class="${signal}" (reactive) * - Event binding: @click=${handler} * - Property binding: .value=${signal} (sets DOM property, not attribute) * - Nested templates: ${html`...`} * - Arrays: ${items.map(i => html`
  • ${i}
  • `)} * * Extend with plugins via html.with(...plugins) for additional interpolation types. * * Templates are cached by their static string parts - the DOM structure is built * once and cloned for subsequent renders, significantly improving performance. */ /** * Plugin that handles custom interpolation types. * Return a bind function if this plugin handles the value, null otherwise. * First plugin to return non-null wins. */ export interface InterpolationPlugin { (value: unknown): ((marker: Comment, disposers: (() => void)[]) => void) | null; } /** * Html template tag function with plugin composition. */ export interface HtmlTag { (strings: TemplateStringsArray, ...values: unknown[]): Template; /** Create a new html tag with additional plugins */ with(...plugins: InterpolationPlugin[]): HtmlTag; } /** Result of rendering a template */ export interface RenderResult { fragment: DocumentFragment; dispose: () => void; } /** A parsed HTML template. Call render() to create live DOM. */ export declare class Template { #private; constructor(strings: TemplateStringsArray, values: unknown[], plugins?: InterpolationPlugin[]); /** * Parse template and create live DOM. * Returns the fragment and a dispose function to clean up subscriptions. * * Templates are cached by their static string parts - subsequent renders * clone the cached DOM structure instead of rebuilding it. */ render(): RenderResult; } export declare const html: HtmlTag; //# sourceMappingURL=template.d.ts.map