/** * Fresh-package scaffolding for the DOCX → ODT converter: XML part templates and the * whitespace writer that is the emit-side mirror of `shared/odf/text_segments.ts`. * * The `office:version="1.3"` attribute on every document root is required — LibreOffice * tolerates its absence, but strict ODF validators reject the package without it. */ import { type StyleRunFormatting, type StylesModel } from '@usejunior/docx-core'; /** Quote a font family for `svg:font-family` when it contains non-name characters (spaces). */ export declare function quoteFontFamily(face: string): string; /** The skeleton `content.xml` DOM plus the insertion points the converter fills. */ export interface ContentScaffold { doc: Document; fontFaceDecls: Element; automaticStyles: Element; body: Element; } /** Parse the empty content.xml skeleton and hand back its insertion points. */ export declare function createContentScaffold(): ContentScaffold; /** Source-derived named-style formatting feeding {@link buildStylesXml}. */ export interface SourceNamedStyles { /** Resolved run formatting per heading level 1..6 (absent levels keep template defaults). */ headings: Map; /** Resolved run formatting of the source `Normal` style, or null when undefined. */ normal: StyleRunFormatting | null; } /** * Resolve the source styles the converted `styles.xml` is seeded from: `Heading1..6` (matched * by styleId or by the canonical `heading N` style name) and `Normal`. Properties a chain * never specifies stay `null` so the template defaults survive. */ export declare function deriveSourceNamedStyles(styles: StylesModel): SourceNamedStyles; /** * Seed `styles.xml`: `Standard`, a bold `Heading` base, `Heading_20_1..6` (descending sizes, * `style:default-outline-level`), and `Text_20_body`. When `source` carries the document's * resolved style-chain formatting, heading sizes/weights/colors/fonts and the `Standard` body * font come from the source instead of the fixed template (#406 phase 3); properties the * source never specifies keep the template defaults. */ export declare function buildStylesXml(source?: SourceNamedStyles): string; /** Build `meta.xml` carrying the generator string and optional title. */ export declare function buildMetaXml(metadata?: { title?: string; generator?: string; }): string; /** * Append visible text to `parent`, encoding whitespace the way ODF readers decode it * (the writer mirror of `buildSegments`): a run of N≄2 spaces becomes one literal space + * ``, tabs become `text:tab`, newlines become `text:line-break`. * A leading space is encoded as `text:s` outright — ODF processors collapse literal * leading whitespace. */ export declare function appendTextWithWhitespace(doc: Document, parent: Element, text: string): void; //# sourceMappingURL=package.d.ts.map