Trevixal API
    Preparing search index...

    Interface TableUICommands

    The command bundle @trevixal/ui's createEditorUI expects, so the UI package can drive tables without importing this one:

    createEditorUI(editor, { container, tableCommands: tableUICommands() })
    
    interface TableUICommands {
        addColumnAfter: Command;
        addColumnBefore: Command;
        addRowAfter: Command;
        addRowBefore: Command;
        autoFitContents: Command;
        autoFitWindow: Command;
        clearSizing: Command;
        columnTypeAt: (state: EditorState) => ColumnType | null;
        convertTableToText: Command;
        convertTextToTable: Command;
        csvAtSelection: (state: EditorState) => string | null;
        deleteColumn: Command;
        deleteRow: Command;
        deleteTable: Command;
        distributeColumns: Command;
        distributeRows?: Command;
        filterRows: (filter: RowFilter) => Command;
        fixColumnWidths?: Command;
        formulaAt: (
            state: EditorState,
        ) => { expression: string; format: string | null };
        hiddenAt: (
            state: EditorState,
        ) => { columns: boolean; rows: boolean } | null;
        hideColumn: Command;
        insertChart: (kind: ChartKind) => Command;
        insertFormula: (expression: string, format: string | null) => Command;
        insertTable: (rows: number, cols: number) => Command;
        insertTableFromCSV: (csv: string) => Command;
        mergeCells: Command;
        moveColumnLeft: Command;
        moveColumnRight: Command;
        moveRowDown: Command;
        moveRowUp: Command;
        setCellAlign: (align: CellAlign | null) => Command;
        setCellBackground: (color: string | null) => Command;
        setCellPadding: (padding: string | null) => Command;
        setCellVerticalAlign: (align: CellVerticalAlign | null) => Command;
        setColumnType: (type: ColumnType) => Command;
        setColumnWidth: (width: string | null) => Command;
        setRowHeight: (height: string | null) => Command;
        setTableBorderColor: (color: string | null) => Command;
        setTableBorders: (borders: TableBorders | null) => Command;
        setTableBorderStyle: (style: TableBorderStyle | null) => Command;
        setTableBorderWidth: (width: TableBorderWidth | null) => Command;
        setTableStyle: (
            style: string | null,
            accentColor: string | null,
        ) => Command;
        setTableWidth: (width: string | null) => Command;
        showAllColumns: Command;
        showAllRows: Command;
        sortAscending: Command;
        sortDescending: Command;
        splitCell: Command;
        splitCellInto: (columns: number, rows?: number) => Command;
        swapCellDown: Command;
        swapCellLeft: Command;
        swapCellRight: Command;
        swapCellUp: Command;
        tableColumnLabels: (state: EditorState) => string[];
        tableDesignAt: (state: EditorState) => TableDesign | null;
        tableLayoutAt: (state: EditorState) => TableLayout | null;
        tableStyles: readonly TableStyleChoice[];
        toggleFreezeFirstColumn: Command;
        toggleFreezeHeaderRow: Command;
        toggleHeaderRow: Command;
        toggleStyleOption: (option: TableDesignOption) => Command;
    }
    Index
    addColumnAfter: Command
    addColumnBefore: Command
    addRowAfter: Command
    addRowBefore: Command
    autoFitContents: Command

    Word's AutoFit Contents and AutoFit Window.

    autoFitWindow: Command
    clearSizing: Command
    columnTypeAt: (state: EditorState) => ColumnType | null
    convertTableToText: Command
    convertTextToTable: Command
    csvAtSelection: (state: EditorState) => string | null

    CSV for the table at the selection, or null outside one, not a command, a reader.

    deleteColumn: Command
    deleteRow: Command
    deleteTable: Command
    distributeColumns: Command
    distributeRows?: Command
    filterRows: (filter: RowFilter) => Command

    Hide the body rows that do not pass a filter; Show all rows brings them back.

    fixColumnWidths?: Command

    Word's Fixed Column Width and Distribute Rows. Both size the table by how it looks, so they are here only when editor is given to read it from.

    formulaAt: (state: EditorState) => { expression: string; format: string | null }

    The formula at the caret, for the dialog to change, or the one Word would suggest; a reader.

    hiddenAt: (state: EditorState) => { columns: boolean; rows: boolean } | null

    What is hidden in the table at the selection; a reader.

    hideColumn: Command
    insertChart: (kind: ChartKind) => Command

    A chart of the table's data, as a Mermaid diagram after it.

    insertFormula: (expression: string, format: string | null) => Command

    Word's table formula, SUM(ABOVE) and the like, in an optional number format.

    insertTable: (rows: number, cols: number) => Command
    insertTableFromCSV: (csv: string) => Command
    mergeCells: Command
    moveColumnLeft: Command
    moveColumnRight: Command
    moveRowDown: Command
    moveRowUp: Command
    setCellAlign: (align: CellAlign | null) => Command
    setCellBackground: (color: string | null) => Command
    setCellPadding: (padding: string | null) => Command

    Word's cell margins for the whole table: a length, or null for the default.

    setCellVerticalAlign: (align: CellVerticalAlign | null) => Command
    setColumnType: (type: ColumnType) => Command

    What the selection's columns hold: text, numbers, money, percentages, dates or checkboxes.

    setColumnWidth: (width: string | null) => Command
    setRowHeight: (height: string | null) => Command
    setTableBorderColor: (color: string | null) => Command
    setTableBorders: (borders: TableBorders | null) => Command
    setTableBorderStyle: (style: TableBorderStyle | null) => Command

    The pen every line of the table is drawn with; its colour is setTableBorderColor.

    setTableBorderWidth: (width: TableBorderWidth | null) => Command
    setTableStyle: (style: string | null, accentColor: string | null) => Command

    Takes a style's name as the gallery gives it, so a UI can hand back what it was shown without knowing the names; one the table does not know declines.

    setTableWidth: (width: string | null) => Command
    showAllColumns: Command
    showAllRows: Command
    sortAscending: Command

    Sort the body rows by the caret's column.

    sortDescending: Command
    splitCell: Command
    splitCellInto: (columns: number, rows?: number) => Command

    Word's Split Cells: each selected cell into this many columns, and each of those this many rows.

    swapCellDown: Command
    swapCellLeft: Command
    swapCellRight: Command
    swapCellUp: Command
    tableColumnLabels: (state: EditorState) => string[]

    The table's columns by header, for a filter to be picked by; a reader.

    tableDesignAt: (state: EditorState) => TableDesign | null

    The design of the table at the selection, for the controls to show; a reader, not a command.

    tableLayoutAt: (state: EditorState) => TableLayout | null

    How the table at the selection is laid out, for the ticks; a reader.

    tableStyles: readonly TableStyleChoice[]

    Word's Table Design: the styles gallery, in order, and what it sets.

    toggleFreezeFirstColumn: Command

    The first column held in view while a wide table scrolls sideways.

    toggleFreezeHeaderRow: Command

    The header row held at the top of the window while a long table scrolls by.

    toggleHeaderRow: Command
    toggleStyleOption: (option: TableDesignOption) => Command

    Word's Table Style Options, the header row included.