import { Editor } from '@tiptap/react';
import { IBEditorTableCellAddress } from '../core/types';
import { TBEditorDomEventTarget } from './dom';
import { IBEditorTableHitTestSnapshot } from './cell';
export interface IBEditorTableRowResizeTarget {
    edge: 'bottom' | 'top';
    row: HTMLTableRowElement;
    startHeight: number;
}
export interface IBEditorTableColumnResizeTarget {
    adjacentColumnIndex?: number;
    adjacentStartWidth?: number;
    cell: HTMLTableCellElement;
    columnIndex: number;
    edge: 'left' | 'right';
    startColumnWidths?: number[];
    startEdgeX: number;
    startWidth: number;
    table: HTMLTableElement;
}
export interface IBEditorTableResizeHoverState {
    isColumnResizePoint: boolean;
    isRowResizePoint: boolean;
}
interface IBEditorTableColumnResizeWidths {
    adjacentColumnIndex?: number;
    adjacentWidth?: number;
    columnIndex: number;
    columnWidths?: number[];
    tableWidthDelta?: number;
    width: number;
}
type TBEditorTableColumnResizeCommitTarget = Pick<IBEditorTableColumnResizeTarget, 'columnIndex' | 'table'>;
type TBEditorMaybeElement = Element | null | undefined;
type TBEditorMaybeTable = HTMLTableElement | null | undefined;
type TBEditorTableColumnResizeWidthKey = 'adjacentColumnIndex' | 'adjacentStartWidth' | 'columnIndex' | 'startColumnWidths' | 'startWidth';
type TBEditorTableColumnResizeWidthTarget = Pick<IBEditorTableColumnResizeTarget, TBEditorTableColumnResizeWidthKey>;
export declare function isBEditorTableResizeTargetInScope(table: TBEditorMaybeElement, targetTable: TBEditorMaybeTable): table is HTMLTableElement;
export declare function resolveBEditorColumnResizeSelectionAddresses(resizeSelectionAddresses: IBEditorTableCellAddress[], currentSelectionAddresses: IBEditorTableCellAddress[], resizeCellAddress: IBEditorTableCellAddress | null): IBEditorTableCellAddress[];
export declare function isBEditorTableColumnResizeHoverPoint(target: TBEditorDomEventTarget, root: HTMLElement | null | undefined, clientX: number, clientY?: number, threshold?: number, targetTable?: HTMLTableElement | null, hitTestSnapshot?: IBEditorTableHitTestSnapshot | null): boolean;
export declare function resolveBEditorTableColumnResizeTarget(target: TBEditorDomEventTarget, root: HTMLElement | null | undefined, clientX: number, clientY?: number, threshold?: number, targetTable?: HTMLTableElement | null, hitTestSnapshot?: IBEditorTableHitTestSnapshot | null): IBEditorTableColumnResizeTarget | null;
export declare function resolveBEditorTableResizeHoverState(target: TBEditorDomEventTarget, root: HTMLElement | null | undefined, clientX: number, clientY: number, threshold?: number, targetTable?: HTMLTableElement | null, hitTestSnapshot?: IBEditorTableHitTestSnapshot | null): IBEditorTableResizeHoverState;
export declare function isBEditorTableRowResizeHoverPoint(target: TBEditorDomEventTarget, root: HTMLElement | null | undefined, clientX: number, clientY: number, threshold?: number, targetTable?: HTMLTableElement | null, hitTestSnapshot?: IBEditorTableHitTestSnapshot | null): boolean;
export declare function resolveBEditorTableRowResizeTarget(target: TBEditorDomEventTarget, root: HTMLElement | null | undefined, clientX: number, clientY: number, threshold?: number, targetTable?: HTMLTableElement | null, hitTestSnapshot?: IBEditorTableHitTestSnapshot | null): IBEditorTableRowResizeTarget | null;
export declare function resolveBEditorTableRowResizeHeight(startHeight: number, deltaY: number, minHeight?: number): number;
export declare function resolveBEditorTableColumnResizeWidths(target: TBEditorTableColumnResizeWidthTarget, deltaX: number, minWidth?: number): IBEditorTableColumnResizeWidths;
export declare function applyBEditorDomTableRowHeight(row: HTMLTableRowElement, height: number): void;
export declare function applyBEditorDomTableColumnWidths(table: HTMLTableElement, widths: IBEditorTableColumnResizeWidths): void;
export declare function clearBEditorDomTableColumnResizeLock(table: HTMLTableElement): void;
export declare function commitBEditorTableColumnWidths(editor: Editor, target: TBEditorTableColumnResizeCommitTarget, widths: IBEditorTableColumnResizeWidths): boolean;
export declare function commitBEditorTableRowHeight(editor: Editor, row: HTMLTableRowElement, height: number): boolean;
export {};
