/** * Built-in render templates. * * Each template is a complete HTML document with `{{slot}}` placeholders, sized * to its own canvas. They share the brand token sheet and bundled fonts from * `assets.ts`, so a rendered card looks like the rest of AryaCode without the * model inventing a theme each time. * * @module dsh-arya-image-gen/render/templates */ /** One template the tool and the Studio can render. */ export interface RenderTemplate { id: string; label: string; description: string; width: number; height: number; slots: readonly string[]; html: string; } /** Every built-in template, in picker order. */ export declare const RENDER_TEMPLATES: readonly RenderTemplate[]; /** * Look a template up by id. * * @param id - template id. * @returns the template, or undefined. */ export declare function findTemplate(id: string): RenderTemplate | undefined; /** * Fill a template's slots. * * `{{name}}` is replaced literally; an unknown name is an error because a typo * would otherwise silently render an empty card. Missing values render empty. * * @param id - template id. * @param data - slot values. * @returns the finished document. */ export declare function fillTemplate(id: string, data?: Record): { html: string; template: RenderTemplate; }; /** * Render one slot value. Every slot is escaped text except the comparison * table's `rows`, which is a line-per-row, cell-per-`|` list so the template can * build valid table markup without ever trusting caller HTML. * * @param templateId - template the slot belongs to. * @param name - slot name. * @param value - raw value. * @returns HTML for the slot. */ export declare function renderSlot(templateId: string, name: string, value: string): string; /** * Escape text for an HTML text node or attribute. * * @param value - raw text. * @returns escaped text. */ export declare function escapeHtml(value: string): string;