import type { CommandProps } from '@tiptap/core'; export type DocumentTableBorderStyle = 'solid' | 'dashed' | 'dotted' | 'double' | 'none'; export type DocumentTableBorderEdge = 'top' | 'right' | 'bottom' | 'left'; export type DocumentTableBorderTarget = 'all' | 'outside' | 'inside' | 'top' | 'right' | 'bottom' | 'left' | 'insideHorizontal' | 'insideVertical'; export interface DocumentTableBorder { color: string; style: DocumentTableBorderStyle; width: number; } export type DocumentTableCellBorders = Record; export declare function uniformDocumentTableBorders(border: DocumentTableBorder): DocumentTableCellBorders; export declare function documentTableBordersFromAttributes(attributes: Record, fallback: DocumentTableBorder): DocumentTableCellBorders; export declare function documentTableBordersFromElement(element: HTMLElement, fallback: DocumentTableBorder): DocumentTableCellBorders; export declare function renderDocumentTableBorders(borders: DocumentTableCellBorders): Record; export declare function uniformDocumentTableBorder(borders: DocumentTableCellBorders): DocumentTableBorder | null; /** * Word-style shared-edge conflict: thicker width wins, then style weight, then * the first argument for stability. `none` always loses to a painted edge. * Storage stays independent; callers project winners for CSS paint only. */ export declare function resolveDocumentTableSharedBorder(first: DocumentTableBorder, second: DocumentTableBorder): DocumentTableBorder; /** * Projects independent per-cell borders into a paint grid where each shared * edge uses the Word-style winner on both abutting sides. */ export declare function projectDocumentTableBordersForPaint(grid: ReadonlyArray>): DocumentTableCellBorders[][]; /** * Applies shared-edge winners to CSS paint on an HTML table (including * colspan/rowspan occupancy) without mutating `data-office-cell-border-*` * storage used for DOCX export. Irregular grids fail soft. */ export declare function applyDocumentTableSharedBorderPaint(table: HTMLTableElement): void; export declare function normalizeDocumentTableBorder(value: unknown): DocumentTableBorder | null; export declare function normalizeTableColor(value: string | null | undefined): string | null; export declare function normalizeDocumentTableBorderStyle(value: string | null | undefined): DocumentTableBorderStyle | null; export declare function normalizeDocumentTableBorderWidth(value: unknown): number | null; export declare function setSelectedDocumentTableBorders({ dispatch, state }: CommandProps, target: DocumentTableBorderTarget, requestedBorder: DocumentTableBorder): boolean;