import type { TextMeasurer } from './measure.js'; import type { LayoutParagraph, LayoutTableRow } from './input.js'; import type { LayoutCellGeometry, LayoutParagraphBox } from './result.js'; export interface RowLayout { heightPx: number; cells: LayoutParagraphBox[][]; geometry: LayoutCellGeometry[]; } /** Lays out paragraphs stacked top to bottom (a table cell's or a footnote's content). */ export declare function stackParagraphs(paragraphs: LayoutParagraph[], widthPx: number, measurer: TextMeasurer, note: (message: string) => void, topPx?: number, startTokens?: ReadonlyMap): { heightPx: number; boxes: LayoutParagraphBox[]; }; /** * Lays out one table row. Cells take their grid position and width when the table has a grid, * otherwise the table width split evenly, and their content is inset by the cell margins. */ export declare function layoutRow(row: LayoutTableRow, tableWidthPx: number, measurer: TextMeasurer, note: (message: string) => void, remaining?: LayoutParagraphBox[][]): RowLayout; export interface RowSplit { before: RowLayout; after: RowLayout | null; } /** * Splits a row that does not fit in `cutHeightPx` of remaining page/column * space. Every cell is clipped at the same shared line boundary (never * mid-line); a cell shorter than the cut simply has nothing in `after`. * Returns `after: null` when every cell fit (nothing left to continue). */ export declare function splitRowAtHeight(row: RowLayout, cutHeightPx: number): RowSplit; //# sourceMappingURL=table-layout.d.ts.map