open-agreements
Version:
Open-source legal template filling CLI and library
19 lines • 727 B
TypeScript
import type { TableContext } from './document_view-types.js';
export type TableMeta = {
tableIndex: number;
tableId: string;
rows: Element[];
headers: string[];
totalCols: number;
};
/**
* Build metadata map for body-level tables.
* Only indexes direct w:tbl children of w:body (consistent with extractTables).
*/
export declare function buildTableMetaMap(body: Element): Map<Element, TableMeta>;
/**
* Derive table context for a paragraph by walking up the DOM.
* Returns undefined if the paragraph is not inside a body-level table.
*/
export declare function deriveTableContext(p: Element, tableMetaMap: Map<Element, TableMeta>): TableContext | undefined;
//# sourceMappingURL=table_context.d.ts.map