export declare function renderTemplate(template: string, context?: Record): string; /** * Return a render context where the named `html`-typed custom user properties * (`context.user.`) are wrapped in `Handlebars.SafeString`, so a plain * `{{user.field}}` renders the stored markup unescaped (parity with the disclosure * HTML the field type is for) without authors needing triple-mustache. * * - Non-mutating: shallow-clones `context` and `context.user` only when a wrap happens, * so the persisted `canvas.context` is never touched (a `SafeString` would corrupt it * on save / JSON-serialize). The wrapped values live only in the transient render context. * - Sanitized here before wrapping (defense-in-depth): values are also sanitized on input * (admin UI + CSV), but server-side write paths (SSO sync, direct API PATCH) bypass that, * and marking a value `SafeString` makes it render as trusted HTML — so re-sanitize at the * point we declare it safe. Idempotent on already-clean markup. */ type RenderContext = { user?: Record; } & Record; export declare function withSafeHtmlUserProps(context?: RenderContext, htmlFieldNames?: string[]): RenderContext; export interface CustomHandlebarsHelper { name: string; code: string; description?: string; } /** * Register a single custom Handlebars helper from code string * @param helper - The helper definition with name and code * @returns true if registration succeeded, false otherwise */ export declare function registerCustomHelper(helper: CustomHandlebarsHelper): boolean; /** * Register multiple custom Handlebars helpers * @param helpers - Array of helper definitions * @returns Object with counts of successful and failed registrations */ export declare function registerCustomHelpers(helpers: CustomHandlebarsHelper[]): { registered: number; failed: number; }; /** * Load and register custom Handlebars helpers from installed apps * Looks for the "handlebars-helpers" app and registers helpers from its metadata * @param installedApps - Array of installed app files * @returns Object with counts of successful and failed registrations */ export declare function loadCustomHelpersFromApps(installedApps: Array<{ app_metadata?: { name?: string; }; metadata?: Record; }>): { registered: number; failed: number; }; export {};