import { EditorState } from "prosemirror-state"; import { UxCommand } from "../constants"; import { CellAttrs, EditorSchema, NodeTypeName } from "../schema"; import { Bias, Command, Dispatch } from "../types"; /** * Command to add a column before the column with the selection. */ export declare function addColumnBefore(state: EditorState, dispatch?: Dispatch): boolean; /** * Command to add a column after the column with the selection. */ export declare function addColumnAfter(state: EditorState, dispatch?: Dispatch): boolean; /** * Command function that removes the selected columns from a table. */ export declare function deleteColumn(state: EditorState, dispatch?: Dispatch): boolean; /** * Add a table row before the selection. */ export declare function addRowBefore(state: EditorState, dispatch?: Dispatch): boolean; /** * Add a table row after the selection. */ export declare function addRowAfter(state: EditorState, dispatch?: Dispatch): boolean; /** * Remove the selected rows from a table. */ export declare function deleteRow(state: EditorState, dispatch?: Dispatch): boolean; /** * Merge the selected cells into a single cell. Only available when the selected cells' outline forms a rectangle. */ export declare function mergeCells(state: EditorState, dispatch?: Dispatch): boolean; /** * Split a selected cell, whose rowpan or colspan is greater than one, into smaller cells. */ export declare function splitCell(state: EditorState, dispatch?: Dispatch): boolean; /** * Returns a command that sets the given attribute to the given value, and is * only available when the currently selected cell doesn't already have that * attribute set to that value. */ export declare function setCellAttr(name: T, value: CellAttrs[T]): (state: EditorState>, dispatch?: Dispatch | undefined) => boolean; /** * Toggles whether the selected row contains header cells. */ export declare const toggleHeaderRow: Command; /** * Toggles whether the selected column contains header cells. */ export declare const toggleHeaderColumn: Command; /** * Toggles whether the selected cells are header cells. */ export declare const toggleHeaderCell: Command; /** * Returns a command for selecting the next or previous cell in a table. */ export declare function goToNextCell(bias: Bias): (state: EditorState>, dispatch?: Dispatch | undefined) => boolean; /** * Deletes the table around the selection, if any. */ export declare function deleteTable(state: EditorState, dispatch?: Dispatch): boolean; /** * Select all cells in the currently active table (if the table isn't already * covered by a total cell selection). * * When the entire table is selected, it's desirable to let the `SelectAll` * command bubble up and select the next-highest container. */ export declare const selectAll: Command; /** * Insert a 3x3 table. */ export declare const insertTable: Command; export declare const jumpCellBarrierUp: Command; export declare const jumpCellBarrierDown: Command; export declare const jumpCellBarrierLeft: Command; export declare const jumpCellBarrierRight: Command; export declare const selectCellWithUp: Command; export declare const selectCellWithDown: Command; export declare const selectCellWithLeft: Command; export declare const selectCellWithRight: Command; export declare const deleteCellSelection: Command; export declare const ux: { [UxCommand.ArrowUp]: Command; [UxCommand.ArrowDown]: Command; [UxCommand.ArrowLeft]: Command; [UxCommand.ArrowRight]: Command; [UxCommand.InsertTable]: Command; [UxCommand.SelectAll]: Command; [UxCommand.ShiftArrowUp]: Command; [UxCommand.ShiftArrowDown]: Command; [UxCommand.ShiftArrowLeft]: Command; [UxCommand.ShiftArrowRight]: Command; [UxCommand.ToggleTableHeaderCell]: Command; [UxCommand.DeleteBackward]: Command; [UxCommand.DeleteForward]: Command; };