import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model'; import type { Axis } from './types'; export declare class Rect { left: number; top: number; right: number; bottom: number; constructor(left: number, top: number, right: number, bottom: number); } export interface TableRect extends Rect { map: TableMap; table: PMNode; tableStart: number; } export type TableContext = { map: TableMap; table: PMNode; tableStart: number; }; export declare enum TableProblemTypes { COLLISION = "collision", OVERLONG_ROWSPAN = "overlong_rowspan", MISSING = "missing", COLWIDTH_MISMATCH = "colwidth mismatch" } export type TableProblemCollision = { n: number; pos: number; row: number; type: TableProblemTypes.COLLISION; }; export type TableProblemLongRowspan = { n: number; pos: number; type: TableProblemTypes.OVERLONG_ROWSPAN; }; export type TableProblemMissing = { n: number; row: number; type: TableProblemTypes.MISSING; }; export type TableProblemColWidthMismatch = { colwidth: number; pos: number; type: TableProblemTypes; }; export type TableProblem = TableProblemCollision | TableProblemLongRowspan | TableProblemMissing | TableProblemColWidthMismatch; export declare const tableNewColumnMinWidth = 140; export declare class TableMap { width: number; height: number; map: number[]; problems?: TableProblem[] | null; mapByColumn: number[][]; mapByRow: number[][]; constructor(width: number, height: number, map: number[], problems?: TableProblem[] | null, mapByColumn?: number[][], mapByRow?: number[][]); findCell(pos: number): Rect; colCount(pos: number): number; rowCount(pos: number): number; isPosMerged(pos: number): boolean; isCellMerged(row: number, col: number): boolean; isCellMergedTopLeft(row: number, col: number): boolean; isCellMergedBottomRight(row: number, col: number): boolean; nextCell(pos: number, axis: Axis, dir: number): number | null; rectBetween(a: number, b: number): Rect; cellsInRect(rect: Rect): number[]; positionAt(row: number, col: number, table: PMNode): number; getMaxColInRow(pos: ResolvedPos): number | undefined; hasMergedCells(): boolean; static get(table: PMNode): TableMap; }