import type { Node } from 'prosemirror-model';
export type TableCellRealDesc = {
    type: 'real';
    offset: number;
    node: Node;
    colspan?: number;
    rowspan?: number;
};
export type TableCellVirtualDesc = {
    type: 'virtual';
    /** Index of real cell, that prodeced this virtual cell */
    colspan?: [number, number];
    /** Index of real cell, that prodeced this virtual cell */
    rowspan?: [number, number];
};
type Pos = {
    from: number;
    to: number;
};
export type CellPos = RealCellPos | VirtualCellPos;
export type RealCellPos = {
    type: 'real';
} & Pos;
export type VirtualCellPos = {
    type: 'virtual';
    closestPos: number;
};
export type TableCellDesc = TableCellRealDesc | TableCellVirtualDesc;
export type TableRowRange = {
    startIdx: number;
    endIdx: number;
    rowsCount: number;
    safeTopBoundary: boolean;
    safeBottomBoundary: boolean;
};
export type TableColumnRange = {
    startIdx: number;
    endIdx: number;
    columnsCount: number;
    safeLeftBoundary: boolean;
    safeRightBoundary: boolean;
};
type TableRowDesc = {
    node: Node;
    cells: TableCellDesc[];
    offset: number;
    colspan?: boolean;
    rowspan?: boolean;
};
export declare class TableDesc {
    readonly rows: number;
    readonly cols: number;
    readonly rowsDesc: readonly TableRowDesc[];
    readonly baseOffset: number;
    private static __cache;
    static create(table: Node): TableDesc | null;
    private _rowRanges?;
    private _columnRanges?;
    private constructor();
    bind(pos: number): TableDescBinded;
    rowHasVirtualCells(rowIndex: number): boolean;
    columnHasVirtualCells(columnIndex: number): boolean;
    isSafeColumn(columnIndex: number): boolean;
    isSafeRow(rowIndex: number): boolean;
    getOffsetForRow(rowIndex: number): number;
    getRelativePosForRow(rowIndex: number): Pos;
    getRelativePosForCell(rowIndex: number, columnIndex: number): CellPos;
    getRelativePosForRowCells(rowIndex: number): CellPos[];
    getRelativePosForColumn(columnIndex: number): CellPos[];
    getCellNodeType(): import("prosemirror-model").NodeType;
    getRowNodeType(): import("prosemirror-model").NodeType;
    getCellInfo(node: Node): {
        node: Node;
        offset: number;
        row: number;
        column: number;
    } | null;
    getRowRanges(): readonly Readonly<TableRowRange>[];
    getRowRangeByRowIdx(rowIdx: number): Readonly<TableRowRange>;
    getRowRangeIdxByRowIdx(rowIdx: number): number;
    getColumnRanges(): readonly Readonly<TableColumnRange>[];
    getColumnRangeByColumnIdx(columnIdx: number): Readonly<TableColumnRange>;
    getColumnRangeIdxByColumnIdx(columnIdx: number): number;
}
declare class TableDescBinded {
    readonly pos: number;
    readonly base: TableDesc;
    get rows(): number;
    get cols(): number;
    constructor(pos: number, desc: TableDesc);
    getRowIndexByPos(pos: number): number | null;
    getPosForRow(rowIndex: number): Pos;
    getPosForCell(rowIndex: number, columnIndex: number): CellPos;
    getPosForRowCells(rowIndex: number): CellPos[];
    getPosForColumn(columnIndex: number): CellPos[];
}
export type { TableDescBinded };
