import { Extension } from '@tiptap/core'; import { type EditorState } from '@tiptap/pm/state'; import { type DocumentTableBorder, type DocumentTableBorderStyle, type DocumentTableBorderTarget, type DocumentTableCellBorders } from './work-document-table-borders'; import { type DocumentTableCellMarginOverrides } from './work-document-table-geometry'; export { documentTableBordersFromElement, normalizeDocumentTableBorder, normalizeDocumentTableBorderStyle, normalizeDocumentTableBorderWidth, normalizeTableColor, renderDocumentTableBorders, uniformDocumentTableBorder, uniformDocumentTableBorders, } from './work-document-table-borders'; export type { DocumentTableBorder, DocumentTableBorderEdge, DocumentTableBorderStyle, DocumentTableBorderTarget, DocumentTableCellBorders, } from './work-document-table-borders'; export type DocumentTableVerticalAlign = 'top' | 'middle' | 'bottom'; export type DocumentTableHorizontalAlign = 'left' | 'center' | 'right'; export type DocumentTableCellTextDirection = 'lrTb' | 'tbRl' | 'btLr' | 'lrTbV' | 'tbRlV' | 'tbLrV'; export type DocumentTableCellHMerge = 'restart' | 'continue'; export type DocumentTableCellVMerge = 'restart' | 'continue'; export interface DocumentTableCellFormat { backgroundColor: string; verticalAlign: DocumentTableVerticalAlign; borderColor: string; borderStyle: DocumentTableBorderStyle; borderWidth: number; borders: DocumentTableCellBorders; margins: DocumentTableCellMarginOverrides | null; } export type DocumentTableCellFormatPatch = Partial>; export type DocumentTableStyleId = 'grid' | 'blueStripe' | 'greenStripe' | 'grayStripe' | 'clean'; export interface DocumentTableStyleOption { id: DocumentTableStyleId; label: string; headerColor: string; bodyColor: string; alternateColor: string; borderColor: string; borderStyle: DocumentTableBorderStyle; borderWidth: number; } export declare const DOCUMENT_TABLE_STYLE_OPTIONS: readonly DocumentTableStyleOption[]; export declare const DEFAULT_DOCUMENT_TABLE_CELL_FORMAT: DocumentTableCellFormat; export declare const DEFAULT_DOCUMENT_TABLE_HEADER_FORMAT: DocumentTableCellFormat; declare module '@tiptap/core' { interface Commands { documentTableFormatting: { setDocumentTableCellFormat: (format: DocumentTableCellFormatPatch) => ReturnType; setDocumentTableHorizontalAlignment: (alignment: DocumentTableHorizontalAlign) => ReturnType; applyDocumentTableStyle: (style: DocumentTableStyleId) => ReturnType; setDocumentTableBorders: (target: DocumentTableBorderTarget, border: DocumentTableBorder) => ReturnType; }; } } export declare const DocumentTableCell: import("@tiptap/core").Node; export declare const DocumentTableHeader: import("@tiptap/core").Node; export declare const DocumentTableFormatting: Extension; export declare function documentTableCellFormat(state: EditorState): DocumentTableCellFormat | null; export declare function documentTableHorizontalAlignment(state: EditorState): DocumentTableHorizontalAlign; export declare function activeDocumentTableStyle(state: EditorState): DocumentTableStyleId | null; export declare function normalizeDocumentTableVerticalAlign(value: string | null | undefined): DocumentTableVerticalAlign | null; export declare function normalizeDocumentTableCellTextDirection(value: unknown): DocumentTableCellTextDirection | null; export declare function normalizeDocumentTableCellHMerge(value: unknown): DocumentTableCellHMerge | null; /** Parse w:hMerge: omitted/empty val means continue; unknown vals fail closed. */ export declare function parseDocxHMergeValue(value: string | null | undefined): DocumentTableCellHMerge | null; export declare function normalizeDocumentTableCellVMerge(value: unknown): DocumentTableCellVMerge | null; /** Parse w:vMerge: omitted/empty val means continue; unknown vals fail closed. */ export declare function parseDocxVMergeValue(value: string | null | undefined): DocumentTableCellVMerge | null; /** Positive integer column span for w:gridSpan / data-office-cell-grid-span. */ export declare function normalizeDocumentTableCellGridSpan(value: unknown): number | null; /** Parse w:gridSpan: missing/non-positive/non-integer/malformed fail closed. */ export declare function parseDocxGridSpanValue(value: string | null | undefined): number | null;