/** * Type definitions for extracted DOCX document data */ export interface ExtractedDocument { paragraphs: ExtractedParagraph[]; tables: ExtractedTable[]; body: Array<{ type: 'paragraph'; data: ExtractedParagraph; } | { type: 'table'; data: ExtractedTable; }>; styles: Map; defaults?: RunFormatting; paragraphDefaults?: ParagraphDefaults; numbering?: Map; mediaFiles?: Map; } export interface ExtractedParagraph { runs: ExtractedRun[]; spacing?: SpacingInfo; alignment?: 'left' | 'center' | 'right' | 'justify'; indentation?: IndentationInfo; styleName?: string; numbering?: NumberingInfo; isEmpty: boolean; } export interface ExtractedRun { text?: string; formatting?: RunFormatting; image?: ExtractedImage; } export interface ExtractedImage { src: string; mediaPath?: string; data?: string; contentType?: string; width?: number; height?: number; drawingXml?: string; } export interface RunFormatting { bold?: boolean; italic?: boolean; underline?: boolean; strike?: boolean; fontSize?: number; fontFamily?: string; color?: string; colorTheme?: string; colorThemeShade?: string; fontThemeAscii?: string; fontThemeEastAsia?: string; fontThemeHAnsi?: string; fontThemeCs?: string; highlight?: string; verticalAlign?: 'superscript' | 'subscript'; lang?: string; langEastAsia?: string; langBidi?: string; } export interface SpacingInfo { before?: number; after?: number; line?: number; lineRule?: 'atLeast' | 'exactly' | 'auto'; } export interface IndentationInfo { left?: number; right?: number; firstLine?: number; hanging?: number; } export interface NumberingInfo { id: string; level?: number; } export interface ExtractedTable { rows: ExtractedTableRow[]; columnWidths?: number[]; tableStyle?: string; } export interface ExtractedTableRow { cells: ExtractedTableCell[]; } export interface ExtractedTableCell { content: ExtractedParagraph[]; colSpan?: number; rowSpan?: number; width?: number; backgroundColor?: string; borders?: CellBorders; verticalAlign?: 'top' | 'center' | 'bottom'; margins?: CellMargins; } export interface CellBorders { top?: BorderInfo; bottom?: BorderInfo; left?: BorderInfo; right?: BorderInfo; } export interface BorderInfo { style?: string; size?: number; color?: string; } export interface CellMargins { top?: number; bottom?: number; left?: number; right?: number; } export interface StyleInfo { name: string; type?: 'paragraph' | 'character' | 'table' | 'numbering'; basedOn?: string; next?: string; link?: string; runFormatting?: RunFormatting; spacing?: SpacingInfo; alignment?: 'left' | 'center' | 'right' | 'justify'; indentation?: IndentationInfo; numbering?: NumberingInfo; contextualSpacing?: boolean; isDefault?: boolean; keepNext?: boolean; keepLines?: boolean; outlineLevel?: number; uiPriority?: number; qFormat?: boolean; unhideWhenUsed?: boolean; tablePropertiesXml?: string; } export interface NumberingDefinition { numId: string; abstractNumId: string; nsid?: string; multiLevelType?: string; tmpl?: string; levels: NumberingLevel[]; } export interface NumberingLevel { level: number; start?: number; format: string; text: string; paragraphStyleName?: string; alignment?: 'left' | 'center' | 'right'; indentation?: IndentationInfo; tabs?: TabStop[]; fontFamily?: string; fontHint?: string; } export interface TabStop { val: 'num' | 'left' | 'center' | 'right' | 'decimal' | 'bar' | 'clear'; pos: number; } export interface ParagraphDefaults { spacing?: SpacingInfo; alignment?: 'left' | 'center' | 'right' | 'justify'; indentation?: IndentationInfo; } //# sourceMappingURL=types.d.ts.map