import type { DocumentViewNode } from './document_view.js'; import type { Footnote } from './footnotes.js'; /** * Tracks which footnote numbers were actually rendered as markers in the body, and how many * times each appeared. Used to (a) give repeated markers unique element ids and (b) emit a * back-link from a definition only when its marker was really rendered (no dangling `#fnref-n`). */ type FootnoteRefs = Map; export declare function isSafeHref(href: string): boolean; /** * Convert one TOON inline-tag string (a `DocumentViewNode.tagged_text` value) to inline HTML. * This is the HTML parallel of `inlineTagsToMarkdown` and the reusable core of the serializer. * * Tag mapping: * - ``/``/``/`` → passed through verbatim (already valid, attribute-escaped HTML) * - `` → `` * - `` → `` (values sanitized) * * Literal text spans are HTML-escaped; injected `[^n]` footnote markers become `` anchors. */ export declare function inlineTagsToHtml(text: string, refs?: FootnoteRefs): string; export interface SerializeHtmlOptions { /** Emit only the body-level elements (no ``/``/`` wrapper). */ readonly fragment?: boolean; /** Override the `` (full-document mode only). Defaults to the first heading's text. */ readonly title?: string; } /** * Serialize a structured document view to semantic HTML. * * @param nodes Block nodes from `buildDocumentView({ showFormatting: true }).nodes`. * @param footnotes Footnotes from `DocxDocument.getFootnotes()` (already sorted by * `displayNumber`); rendered as a footnotes `<section>` with back-links. */ export declare function serializeToHtml(nodes: DocumentViewNode[], footnotes?: Footnote[], opts?: SerializeHtmlOptions): string; export {}; //# sourceMappingURL=serialize_html.d.ts.map