import { TableCellInnerFormat } from 'quill-table-up';
export interface ITableCellIdentity {
    colId: string;
    rowId: string;
}
export interface IDomTablePlacement {
    cell: HTMLTableCellElement;
    colIndex: number;
    colspan: number;
    rowIndex: number;
    rowspan: number;
}
export interface IDomTableGrid {
    colIds: string[];
    matrix: Array<Array<HTMLTableCellElement | null>>;
    placements: Map<HTMLTableCellElement, IDomTablePlacement>;
    rows: HTMLTableRowElement[];
    table: HTMLTableElement;
}
export interface IDomTableMergePlan {
    baseCell: HTMLTableCellElement;
    cells: HTMLTableCellElement[];
    colEndIndex: number;
    colStartIndex: number;
    rowEndIndex: number;
    rowStartIndex: number;
}
export interface IDomTableBounds {
    colEndIndex: number;
    colStartIndex: number;
    rowEndIndex: number;
    rowStartIndex: number;
}
export interface IDomTableRectSelection extends IDomTableBounds {
    cells: HTMLTableCellElement[];
}
export interface IDomTableViewportRect {
    bottom: number;
    left: number;
    right: number;
    top: number;
}
export interface IDomTableGridGeometry {
    cellRects: Map<HTMLTableCellElement, IDomTableViewportRect>;
    colEdges: number[];
    rowEdges: number[];
    tableRect: IDomTableViewportRect;
}
export declare function resolveColumnCount(table: HTMLTableElement): number;
export declare function resolveTableCellNode(cell: TableCellInnerFormat): HTMLTableCellElement | null;
export declare function buildDomTableGrid(table: HTMLTableElement): IDomTableGrid | null;
export declare function buildDomTableGeometry(tableGrid: IDomTableGrid): IDomTableGridGeometry | null;
export declare function resolveViewportRectBounds(rects: IDomTableViewportRect[]): IDomTableViewportRect | null;
export declare function normalizeSelectedCells(cells: Array<HTMLTableCellElement | null>): HTMLTableCellElement[];
export declare function resolveRectangularSelection(tableGrid: IDomTableGrid, selectedCells: HTMLTableCellElement[]): IDomTableRectSelection | null;
export declare function resolveMergePlan(tableGrid: IDomTableGrid, selectedCells: HTMLTableCellElement[]): IDomTableMergePlan | null;
export declare function mergeTableHtml(html: string, selectedIdentities: ITableCellIdentity[]): {
    anchorIdentity: ITableCellIdentity;
    html: string;
} | null;
export declare function splitTableHtml(html: string, targetIdentity: ITableCellIdentity): {
    anchorIdentity: ITableCellIdentity;
    html: string;
} | null;
export declare function findTableCellByIdentity(root: ParentNode, identity: ITableCellIdentity): HTMLElement | null;
