import type { BlockElement } from "doc-editor-delta"; import React from "react"; import type { TableSelection } from "../types/interface"; export type TableContext = { readonly ref: { widths: number[]; heights: number[]; element: BlockElement; trs: HTMLTableRowElement[]; size: { rows: number; cols: number; }; /** * NOTE: RowIndex ColIndex RowSpan ColSpan */ anchorCell: [number, number, number, number] | null; setSelection: (sel: TableSelection | null) => void; }; state: { selection: TableSelection | null; }; }; export declare const DEFAULT_TABLE_CONTEXT: TableContext; export declare const TableContext: React.Context; export declare const useTableProvider: (ref: Partial, state: TableContext["state"]) => { provider: TableContext; }; export declare const useTableContext: () => { ref: { widths: number[]; heights: number[]; element: BlockElement; trs: HTMLTableRowElement[]; size: { rows: number; cols: number; }; /** * NOTE: RowIndex ColIndex RowSpan ColSpan */ anchorCell: [number, number, number, number] | null; setSelection: (sel: TableSelection | null) => void; }; state: { selection: TableSelection | null; }; };