/** * DOM-free SSR renderer. * * Operates on the virtual node tree produced by `html-parser.ts` and * evaluates `bq-*` directives without depending on any browser DOM API. * Runs unmodified on Bun, Deno and Node and is the default backend used by * `renderToString()` whenever the global `DOMParser` is not configured to * take precedence. * * @module bquery/ssr * @internal */ import type { BindingContext } from '../view/types'; import { type SSRDirectiveMode, type UnsupportedDirectiveStrategy } from './directive-support'; /** * Allowlist-sanitize a raw HTML string for safe server-side embedding. * * Parses `raw`, drops dangerous and non-allowlisted tags, strips disallowed * attributes (including unsafe `id`/`name` and `javascript:`-style `href`/`src` * URLs), and forces `rel="noopener noreferrer"` on `target="_blank"`/external * links. Returns the serialized, sanitized HTML. */ export declare const sanitizeHtmlForSSR: (raw: string) => string; /** * Renders a template through the DOM-free pipeline. * * @internal */ export declare const renderTemplatePure: (template: string, data: BindingContext, options?: { prefix?: string; stripDirectives?: boolean; annotateHydration?: boolean; mode?: SSRDirectiveMode; onUnsupported?: UnsupportedDirectiveStrategy; }) => string; //# sourceMappingURL=renderer.d.ts.map