/** * F5 CLI - Word Document Processor * Extract content from .docx files * * @module @f5/cli/core/word-processor * @version 1.0.0 */ export interface WordProcessorOptions { extractImages?: boolean; imagesOutputDir?: string; preserveStyles?: boolean; extractComments?: boolean; extractTrackChanges?: boolean; } export interface WordSection { type: 'heading' | 'paragraph' | 'table' | 'list' | 'image'; level?: number; content: string; rawHtml?: string; metadata?: { style?: string; comment?: string; trackChange?: { type: 'insert' | 'delete'; author?: string; date?: string; }; }; } export interface WordTable { headers: string[]; rows: string[][]; rawHtml: string; } export interface ExtractedImage { id: string; originalName: string; savedPath: string; relativePath: string; } export interface WordParseResult { fileName: string; title: string | null; sections: WordSection[]; tables: WordTable[]; images: ExtractedImage[]; comments: Array<{ id: string; author: string; text: string; reference: string; }>; trackChanges: Array<{ type: 'insert' | 'delete'; author: string; text: string; }>; metadata: { wordCount: number; paragraphCount: number; tableCount: number; imageCount: number; }; } export declare class WordProcessor { private options; private imageIndex; private extractedImages; constructor(options?: WordProcessorOptions); /** * Parse Word document */ parseFile(filePath: string): Promise; /** * Parse HTML to structured sections */ private parseHtmlToSections; /** * Extract tables from HTML */ private extractTables; /** * Extract title from sections */ private extractTitle; /** * Strip HTML tags */ private stripHtml; /** * Convert to Markdown */ toMarkdown(result: WordParseResult): string; }