import { Node as PmNode } from 'prosemirror-model'; import { TableCellContent } from './doc'; export declare const setCellAttrs: (node: PmNode, cell?: HTMLElement | undefined) => { colspan?: number | undefined; rowspan?: number | undefined; style?: string | undefined; }; export declare const tableBackgroundColorPalette: Map; /** New borders for colors in the color picker */ export declare const tableBackgroundBorderColors: { blue: string; teal: string; red: string; gray: string; purple: string; green: string; yellow: string; white: string; }; export declare const tableBackgroundColorNames: Map; export declare function calcTableColumnWidths(node: PmNode): number[]; export declare type Layout = 'default' | 'full-width' | 'wide'; export interface TableAttributes { isNumberColumnEnabled?: boolean; layout?: Layout; __autoSize?: boolean; className?: string; } /** * @name table_node */ export interface TableDefinition { type: 'table'; attrs?: TableAttributes; /** * @minItems 1 */ content: Array; } /** * @name table_row_node */ export interface TableRow { type: 'tableRow'; /** * @minItems 1 */ content: Array | Array; attrs?: { className?: string; }; } /** * @name table_cell_node */ export interface TableCell { type: 'tableCell'; attrs?: CellAttributes; content: TableCellContent; } /** * @name table_header_node */ export interface TableHeader { type: 'tableHeader'; attrs?: CellAttributes; content: TableCellContent; } export interface CellAttributes { colspan?: number; rowspan?: number; colwidth?: number[]; background?: string; className?: string; } export declare const table: any; export declare const tableToJSON: (node: PmNode) => { attrs: {}; }; export declare const tableRow: { content: string; tableRole: string; parseDOM: { tag: string; }[]; toDOM(): (string | number)[]; }; export declare const tableCell: { content: string; attrs: { colspan: { default: number; }; rowspan: { default: number; }; colwidth: { default: null; }; background: { default: null; }; }; tableRole: string; marks: string; isolating: boolean; parseDOM: { tag: string; getAttrs: (dom: HTMLElement) => { colspan: number; rowspan: number; colwidth: number[] | null; background: string | null; }; }[]; toDOM(node: PmNode): (string | number | { colspan?: number | undefined; rowspan?: number | undefined; style?: string | undefined; })[]; }; export declare const toJSONTableCell: (node: PmNode) => { attrs: {}; }; export declare const tableHeader: { content: string; attrs: { colspan: { default: number; }; rowspan: { default: number; }; colwidth: { default: null; }; background: { default: null; }; }; tableRole: string; isolating: boolean; marks: string; parseDOM: { tag: string; getAttrs: (dom: HTMLElement) => { colspan: number; rowspan: number; colwidth: number[] | null; background: string | null; }; }[]; toDOM(node: PmNode): (string | number | { colspan?: number | undefined; rowspan?: number | undefined; style?: string | undefined; })[]; }; export declare const toJSONTableHeader: (node: PmNode) => { attrs: {}; };