/** * Border utilities for consistent border styling across modules */ /** * OOXML border styles, by name. * * The literal values rather than a backend's enum: `w:val` on a border is a * plain OOXML token, and this module is read by the compiler, which imports no * renderer. */ export type BorderStyleName = 'none' | 'single' | 'double' | 'dashed' | 'dotted' | 'thick'; import { ThemeConfig } from '../index'; /** * Standard "no borders" configuration for tables * Used when borders should be invisible/disabled */ export declare const NONE_BORDERS: { readonly top: { readonly style: "none"; readonly size: 0; readonly color: "000000"; }; readonly right: { readonly style: "none"; readonly size: 0; readonly color: "000000"; }; readonly bottom: { readonly style: "none"; readonly size: 0; readonly color: "000000"; }; readonly left: { readonly style: "none"; readonly size: 0; readonly color: "000000"; }; readonly insideHorizontal: { readonly style: "none"; readonly size: 0; readonly color: "000000"; }; readonly insideVertical: { readonly style: "none"; readonly size: 0; readonly color: "000000"; }; }; /** * Maps a theme border style name to its OOXML token * @param s - Border style string ('dashed', 'dotted', 'double', 'none', 'single') * @returns The `w:val` OOXML writes for it */ export declare function mapBorderStyle(s?: string): BorderStyleName; /** * Border configuration object */ export interface BorderConfig { style?: string; width?: number; color?: string; } /** * Converts border configuration to docx border format * @param b - Border configuration object * @param theme - Theme configuration for color resolution * @returns Docx border object or undefined if no border */ export declare function convertBorder(b: BorderConfig | undefined, theme: ThemeConfig): { style: BorderStyleName; size: number; color: string; } | undefined; /** * Borders configuration for all four sides */ export interface BordersConfig { top?: BorderConfig; right?: BorderConfig; bottom?: BorderConfig; left?: BorderConfig; } /** * Converts borders configuration object to docx borders format * Returns undefined if no borders are defined * @param bordersConfig - Configuration for all four borders * @param theme - Theme configuration for color resolution * @returns Docx borders object or undefined */ export declare function convertBorders(bordersConfig: BordersConfig | undefined, theme: ThemeConfig): Record | undefined; //# sourceMappingURL=borderUtils.d.ts.map