import { Table } from "docx"; import type { Element } from "domhandler"; import { type ParsedCss } from "./css.js"; import type { StyleResolver } from "./style-resolver.js"; import type { BlockLayout, DocxBlock, FlexLayout } from "./types.js"; export declare function borderlessTableBorders(): { top: { style: "none"; size: number; color: string; }; bottom: { style: "none"; size: number; color: string; }; left: { style: "none"; size: number; color: string; }; right: { style: "none"; size: number; color: string; }; insideHorizontal: { style: "none"; size: number; color: string; }; insideVertical: { style: "none"; size: number; color: string; }; }; export interface FlexItemContent { layout: BlockLayout; blocks: DocxBlock[]; /** Shrink-wrapped column width when flex items have no flex-grow. */ intrinsicWidthTwips?: number; /** * Estimated content height (twips) for text card-style items with block children — * used as an AT_LEAST floor on the row so LibreOffice doesn't collapse/inflate tight * cards (it sizes rows by natural font metrics). The row still grows past this to fit * wrapping/nested content. For raster `` / `` items, includes the mount * div height (direct block child) so the bordered card matches the browser box. */ contentHeightTwips?: number; /** CSS `min-height` (twips) — a floor applied to the flex row as AT_LEAST height. */ minHeightTwips?: number; /** Item has stacked block children (a "card"): content flows from the top, not centered. */ stackedContent?: boolean; } export declare function elementPlainText(element: Element): string; export declare function estimateFlexItemWidthTwips(element: Element, layout: BlockLayout, styleResolver?: StyleResolver): number; export declare function parseFlexLayoutFromCss(css: ParsedCss): FlexLayout | null; export declare function parseFlexLayout(css: ParsedCss): FlexLayout | null; export declare function isFlexContainer(element: Element, styleResolver?: StyleResolver): boolean; export declare function flexItemElements(element: Element, styleResolver?: StyleResolver): Element[]; /** Horizontal flex → single-row borderless table with explicit gap columns. */ export declare function makeFlexRowTable(items: FlexItemContent[], gap: number | undefined, containerLayout: BlockLayout): Table; /** Vertical flex → multi-row borderless table; gap via unshaded exact-height spacer rows. */ export declare function makeFlexColumnTable(items: FlexItemContent[], gap: number | undefined, containerLayout: BlockLayout): Table; //# sourceMappingURL=flex.d.ts.map