import { type ReactNode } from 'react'; import type { Editor } from '@tiptap/core'; export interface EditorTableControlsProps { /** The editor, with TableKit (`@tiptap/extension-table`) in its extensions. Not editable, or not there yet: no controls. */ editor: Editor | null; /** The `EditorContent`. */ children: ReactNode; className?: string; } /** * The cell's row, or the whole table when it is its only one: a table holds at * least one row (prosemirror-tables refuses to delete it). Deleting the header * row makes the next row the header, so the table still opens with one. */ export declare function deleteTableRow(editor: Editor, cell: HTMLTableCellElement): boolean; /** * The table's first row becomes its header row, or an ordinary row again: * whichever cell of the table `cell` is. A table with no header row has no * text spelling, so the agent keeps it as written (SPEC §13.3, "No spelling"). */ export declare function toggleTableHeaderRow(editor: Editor, cell: HTMLTableCellElement): boolean; /** The same for a column: the last one deletes the table. */ export declare function deleteTableColumn(editor: Editor, cell: HTMLTableCellElement): boolean; /** A row after the last one: the ➕ under the table. */ export declare function appendTableRow(editor: Editor, table: HTMLTableElement): boolean; /** A column after the last one: the ➕ right of the table. */ export declare function appendTableColumn(editor: Editor, table: HTMLTableElement): boolean; /** * A table's own controls in an editor, as in Notion: point at a cell and a * handle sits on its row's left edge and on its column's top edge; press one * for Insert above and below (left and right), Delete, and Delete table. The * first row's menu also turns the header row on and off (Header row, ticked * while it is on); with it off, the first row is an ordinary row. On * the last row a ➕ bar under the table adds a row, and on the last column one * right of it adds a column. Tab in * the last cell adds a row too — that is TableKit's own. * * Deleting a table's only row or only column deletes the table, which cannot * be left with none. * * Built on the editor library's own table commands; the controls are ours. * Wrap the `EditorContent` in it, inside an `EditorBlockHandle` if there is * one: the block handle stays the table's, in the gutter. */ export declare function EditorTableControls({ editor, children, className }: EditorTableControlsProps): import("react").JSX.Element; //# sourceMappingURL=EditorTableControls.d.ts.map