/** * Table emission for the DOCX → ODT converter: a contiguous run of view nodes sharing one * `table_context.table_id` → a complete rectangular `table:table` grid. * * Lossy by design, mirroring the HTML serializer's `renderTable`: the view model discards * `gridSpan`/`vMerge`, so merged cells are indistinguishable from genuinely empty grid * positions — gaps are filled with empty cells (recorded as `table-grid-gaps-filled`). * Borders and column widths come from the raw source `w:tbl` (#406 phase 3): an explicit * `w:tblBorders` is honored uniformly per table (including explicitly borderless tables) and * `w:tblGrid` widths become `table:table-column` styles. Tables without explicit borders keep * the 0.5pt default (most Word tables are bordered via their table style, whose `w:tblPr` * the styles model does not carry). Per-cell `w:tcBorders` overrides are out of scope. */ import { type DocumentViewNode } from '@usejunior/docx-core'; import type { LossinessCollector } from './types.js'; /** * Resolve the uniform `fo:border` for a table from its explicit `w:tblBorders`, preferring * inside edges (what most cells show). Explicitly border-free tables return `'none'`; tables * without a `w:tblBorders` at all return the bordered default. */ export declare function resolveTableBorderSpec(tbl: Element | null): string; /** Column widths in points from `w:tblGrid/w:gridCol` (`w:w` is twips); empty when absent. */ export declare function readGridColWidthsPt(tbl: Element | null): number[]; /** * Deduped automatic styles for table emission: one `table-cell` style per distinct border * spec and one `table-column` style per distinct width, shared across tables. */ export declare class TableStyleRegistry { private readonly doc; private readonly container; private cellByBorder; private columnByWidth; constructor(doc: Document, container: Element); cellStyleFor(borderSpec: string): string; columnStyleFor(widthPt: number): string; } /** * Append the table built from `group` to `body`. Cell paragraph content is delegated to * `fillParagraph` (the orchestrator's inline emitter) and cell paragraph styles to * `paragraphStyleFor` so this module stays cycle-free. `sourceTbl` is the raw `w:tbl` this * group was derived from (null when unavailable — defaults apply). */ export declare function appendTable(doc: Document, body: Element, group: DocumentViewNode[], tableNumber: number, sourceTbl: Element | null, tableStyles: TableStyleRegistry, fillParagraph: (p: Element, node: DocumentViewNode) => void, paragraphStyleFor: (node: DocumentViewNode) => string, lossiness: LossinessCollector): void; //# sourceMappingURL=tables.d.ts.map