import type { YooEditor, YooptaPathIndex } from '@yoopta/editor'; import type { Span } from 'slate'; import { Path } from 'slate'; import type { InsertTableOptions, TableCellElement, TableElement } from '../types'; import type { ClearContentsOptions } from './clear-contents'; import type { MergeCellsOptions } from './merge-cells'; type Options = { path?: Location | Span; select?: boolean; insertMode?: 'before' | 'after'; }; type DeleteOptions = Omit; type MoveTableOptions = { from: Path; to: Path; }; type InsertOptions = Partial; type UpdateCellsOptions = { cells: [TableCellElement, Path][]; }; export type TableCommands = { buildTableElements: (editor: YooEditor, options?: InsertOptions) => TableElement; insertTable: (editor: YooEditor, options?: InsertOptions) => void; deleteTable: (editor: YooEditor, blockId: string) => void; insertTableRow: (editor: YooEditor, blockId: string, options?: Options) => void; deleteTableRow: (editor: YooEditor, blockId: string, options?: DeleteOptions) => void; moveTableRow: (editor: YooEditor, blockId: string, options: MoveTableOptions) => void; moveTableColumn: (editor: YooEditor, blockId: string, options: MoveTableOptions) => void; insertTableColumn: (editor: YooEditor, blockId: string, options?: Options) => void; deleteTableColumn: (editor: YooEditor, blockId: string, options?: DeleteOptions) => void; updateColumnWidth: (editor: YooEditor, blockId: string, columnIndex: number, width: number) => void; setColumnWidth: (editor: YooEditor, blockId: string, columnIndex: number, width: number) => void; toggleHeaderRow: (editor: YooEditor, blockId: string) => void; toggleHeaderColumn: (editor: YooEditor, blockId: string) => void; clearContents: (editor: YooEditor, blockId: string, options: ClearContentsOptions) => void; mergeCells: (editor: YooEditor, blockId: string, options: MergeCellsOptions) => void; setCellBackgroundColor: (editor: YooEditor, blockId: string, options: UpdateCellsOptions & { color: string; }) => void; setCellTextColor: (editor: YooEditor, blockId: string, options: UpdateCellsOptions & { color: string; }) => void; setCellHorizontalAlign: (editor: YooEditor, blockId: string, options: UpdateCellsOptions & { align: 'left' | 'center' | 'right' | 'justify'; }) => void; setCellVerticalAlign: (editor: YooEditor, blockId: string, options: UpdateCellsOptions & { align: 'top' | 'middle' | 'bottom'; }) => void; }; export declare const TableCommands: TableCommands; export {}; //# sourceMappingURL=table-commands.d.ts.map