import { LayoutItem } from "pdf-codec"; //#region src/layout/lattice.d.ts interface LineSegment { readonly item: LayoutItem; readonly x1Pt: number; readonly y1Pt: number; readonly x2Pt: number; readonly y2Pt: number; } declare function extractLineCandidates(items: readonly LayoutItem[]): LineSegment[]; interface Range { readonly startPt: number; readonly endPt: number; } interface AxisLine { readonly position: number; readonly ranges: readonly Range[]; readonly items: readonly LayoutItem[]; } interface TableRegion { readonly rowStart: number; readonly rowEnd: number; readonly colStart: number; readonly colEnd: number; } declare function findCellRegions(rowLines: readonly AxisLine[], columnLines: readonly AxisLine[]): TableRegion[] | undefined; interface GridLattice { readonly rowBoundariesDescPt: readonly number[]; readonly columnBoundariesAscPt: readonly number[]; readonly regions: readonly TableRegion[]; readonly sourceItems: ReadonlySet; } declare function detectGridLattice(items: readonly LayoutItem[]): GridLattice | undefined; declare function findRowIndex(rowBoundariesDescPt: readonly number[], yPt: number): number | undefined; declare function findColumnIndex(columnBoundariesAscPt: readonly number[], xPt: number): number | undefined; //#endregion export { GridLattice, LineSegment, TableRegion, detectGridLattice, extractLineCandidates, findCellRegions, findColumnIndex, findRowIndex };