import * as _udecode_slate from '@udecode/slate'; import { SlateEditor, TTableCellElement, Descendant, TTableRowElement, TTableElement, TTableCellBorder, InsertNodesOptions, Path } from '@udecode/plate'; type CellIndices = { col: number; row: number; }; declare const getCellIndices: (editor: SlateEditor, element: TTableCellElement) => CellIndices; type BorderDirection = 'bottom' | 'left' | 'right' | 'top'; type CreateCellOptions = { children?: Descendant[]; header?: boolean; row?: TTableRowElement; }; type TableStoreSizeOverrides = Map; declare const getEmptyCellNode: (editor: SlateEditor, { children, header, row }?: CreateCellOptions) => { children: _udecode_slate.Descendant[]; type: string; }; interface GetEmptyRowNodeOptions extends CreateCellOptions { colCount?: number; } declare const getEmptyRowNode: (editor: SlateEditor, { colCount, ...cellOptions }?: GetEmptyRowNodeOptions) => { children: { children: _udecode_slate.Descendant[]; type: string; }[]; type: string; }; interface GetEmptyTableNodeOptions extends GetEmptyRowNodeOptions { rowCount?: number; } declare const getEmptyTableNode: (editor: SlateEditor, { colCount, header, rowCount, ...cellOptions }?: GetEmptyTableNodeOptions) => TTableElement; /** Merges multiple selected cells into one. */ declare const mergeTableCells: (editor: SlateEditor) => void; declare const splitTableCell: (editor: SlateEditor) => void; /** * Returns the colspan attribute of the table cell element. * * @default 1 if undefined. */ declare const getColSpan: (cellElem: TTableCellElement) => number; /** * Returns the rowspan attribute of the table cell element. * * @default 1 if undefined */ declare const getRowSpan: (cellElem: TTableCellElement) => number; interface BorderStylesDefault { bottom: TTableCellBorder; right: TTableCellBorder; left?: TTableCellBorder; top?: TTableCellBorder; } declare const getTableCellBorders: (editor: SlateEditor, { cellIndices, defaultBorder, element, }: { element: TTableCellElement; cellIndices?: CellIndices; defaultBorder?: TTableCellBorder; }) => BorderStylesDefault; /** Get the width of a cell with colSpan support. */ declare const getTableCellSize: (editor: SlateEditor, { cellIndices, colSizes, element, rowSize, }: { element: TTableCellElement; cellIndices?: CellIndices; colSizes?: number[]; rowSize?: number; }) => { minHeight: number | undefined; width: number; }; declare const deleteColumn: (editor: SlateEditor) => void; declare const deleteRow: (editor: SlateEditor) => void; declare const deleteTable: (editor: SlateEditor) => void; /** * Insert table. If selection in table and no 'at' specified, insert after * current table. Select start of new table. */ declare const insertTable: (editor: SlateEditor, { colCount, header, rowCount }?: GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: InsertNodesOptions) => void; declare const insertTableColumn: (editor: SlateEditor, options?: { /** Exact path of the cell to insert the column at. Will overrule `fromCell`. */ at?: Path; /** Insert the column before the current column instead of after */ before?: boolean; /** Path of the cell to insert the column from. */ fromCell?: Path; header?: boolean; select?: boolean; }) => void; declare const insertTableRow: (editor: SlateEditor, options?: { /** * Exact path of the row to insert the column at. Pass the table path to * insert at the end of the table. Will overrule `fromRow`. */ at?: Path; /** Insert the row before the current row instead of after */ before?: boolean; fromRow?: Path; header?: boolean; select?: boolean; }) => void; export { type BorderDirection as B, type CellIndices as C, type GetEmptyRowNodeOptions as G, type TableStoreSizeOverrides as T, getEmptyCellNode as a, getEmptyRowNode as b, getTableCellBorders as c, getTableCellSize as d, getColSpan as e, getRowSpan as f, getEmptyTableNode as g, insertTableColumn as h, insertTable as i, insertTableRow as j, deleteTable as k, deleteColumn as l, deleteRow as m, mergeTableCells as n, type CreateCellOptions as o, type GetEmptyTableNodeOptions as p, type BorderStylesDefault as q, getCellIndices as r, splitTableCell as s };