/** * Inline content emission for the DOCX → ODT converter: `tagged_text` TOON tokens → * `text:span` / `text:a` DOM, backed by a deduped automatic text-style registry. * * The token grammar is owned by docx-core (`tokenizeToonInline`, the same primitive the * markdown/HTML serializers consume) so this module never re-derives it. Supported wraps are * bold / italic / underline / highlight (with its full-mode source color) and the full-mode * `` tag, mapped to `fo:color` / `fo:font-size` / `style:font-name` * automatic styles (#406 phase 3). Unsafe hyperlink schemes degrade to plain text via the * shared `isSafeHref`. */ import type { LossinessCollector } from './types.js'; interface InlineFormats { bold: boolean; italic: boolean; underline: boolean; /** ODF `fo:background-color` hex (e.g. `#00ff00`), or null when unhighlighted. */ highlight: string | null; /** ODF `fo:color` hex (e.g. `#ff0000`), or null for the default color. */ fontColor: string | null; /** Font size in points as carried by the TOON tag (may be fractional), or null. */ fontSizePt: number | null; /** Font face name, or null for the default face. */ fontFace: string | null; } /** * Deduped `office:font-face-decls` registry: one `style:font-face` per distinct face name * used anywhere in the document (ODF resolves `style:font-name` against declared faces). */ export declare class FontFaceRegistry { private readonly doc; private readonly container; private declared; constructor(doc: Document, container: Element); ensure(face: string): void; } /** * Deduped `office:automatic-styles` registry for run formatting: one `T` text style per * distinct format combination, shared across the whole document. */ export declare class TextStyleRegistry { private readonly doc; private readonly container; private readonly fontFaces; private byKey; constructor(doc: Document, container: Element, fontFaces: FontFaceRegistry); styleFor(formats: InlineFormats): string; } /** * Append one `tagged_text` string's content to `parent` (a `text:p`/`text:h` or table-cell * paragraph), wrapping formatted runs in `text:span` and hyperlinks in `text:a`. */ export declare function appendInlineContent(doc: Document, parent: Element, taggedText: string, styles: TextStyleRegistry, lossiness: LossinessCollector): void; export {}; //# sourceMappingURL=inline.d.ts.map