/** * Theme to DOCX Converter * Converts theme configuration to DOCX styles */ import type { DOCXThemeStyles } from '../types/docx'; import type { ColorScheme } from '../types/index'; export type { DOCXThemeStyles }; /** * Heading style configuration (font-related properties only) */ interface HeadingConfig { fontFamily?: string; fontWeight?: string; } /** * Font scheme configuration (font-related properties only) * Layout properties (fontSize, lineHeight, spacing) are in LayoutScheme * Color properties are in ColorScheme */ interface FontScheme { body: { fontFamily: string; }; headings: { fontFamily: string; fontWeight?: string; [key: string]: string | HeadingConfig | undefined; }; code: { fontFamily: string; }; } /** * Theme configuration */ interface ThemeConfig { fontScheme: FontScheme; layoutScheme: string; tableStyle: string; codeTheme: string; } /** * Layout scheme heading configuration */ interface LayoutHeadingConfig { fontSize: string; spacingBefore: string; spacingAfter: string; alignment?: 'left' | 'center' | 'right'; } /** * Layout scheme block configuration */ interface LayoutBlockConfig { spacingBefore?: string; spacingAfter?: string; paddingVertical?: string; paddingHorizontal?: string; } /** * Layout scheme configuration (absolute pt values) */ interface LayoutScheme { id: string; name: string; name_en: string; description: string; description_en?: string; body: { fontSize: string; lineHeight: number; }; headings: { h1: LayoutHeadingConfig; h2: LayoutHeadingConfig; h3: LayoutHeadingConfig; h4: LayoutHeadingConfig; h5: LayoutHeadingConfig; h6: LayoutHeadingConfig; }; code: { fontSize: string; }; blocks: { paragraph: LayoutBlockConfig; list: LayoutBlockConfig; listItem: LayoutBlockConfig; blockquote: LayoutBlockConfig; codeBlock: LayoutBlockConfig; table: LayoutBlockConfig; horizontalRule: LayoutBlockConfig; }; } /** * Border configuration (layout properties only, color from ColorScheme) */ interface BorderConfig { style: string; width: string; } /** * Table style configuration (layout properties only, colors from ColorScheme) */ interface TableStyleConfig { border?: { all?: BorderConfig; headerTop?: BorderConfig; headerBottom?: BorderConfig; rowBottom?: BorderConfig; lastRowBottom?: BorderConfig; }; header: { fontWeight?: string; }; cell: { padding: string; }; zebra?: { enabled: boolean; }; } /** * Code theme configuration (from code theme JSON) */ interface CodeThemeConfig { colors: Record; foreground?: string; } /** * Convert theme configuration to DOCX styles object * @param theme - Theme configuration object * @param layoutScheme - Layout scheme configuration * @param colorScheme - Color scheme configuration * @param tableStyle - Table style configuration * @param codeTheme - Code highlighting theme * @returns DOCX styles configuration */ export declare function themeToDOCXStyles(theme: ThemeConfig, layoutScheme: LayoutScheme, colorScheme: ColorScheme, tableStyle: TableStyleConfig, codeTheme: CodeThemeConfig): DOCXThemeStyles; /** * Load and prepare complete theme configuration for DOCX export * @param themeId - Theme ID to load * @returns DOCX styles configuration */ export declare function loadThemeForDOCX(themeId: string): Promise;