import { Editor } from '../../core/Editor.js'; export interface WordStatistics { /** Word count — matches NUMWORDS / ap:Words semantics. */ words: number; /** Character count excluding spaces — matches ap:Characters / NUMCHARS semantics. */ characters: number; /** Character count including spaces — matches ap:CharactersWithSpaces. */ charactersWithSpaces: number; /** Page count from the layout engine (undefined when pagination is inactive). */ pages: number | undefined; } /** * Computes Word-compatible document statistics. * * @param editor - The editor to compute stats from. For header/footer * sub-editors this should be the **main body editor**, not the sub-editor, * because stat fields always display document-level counts. */ export declare function getWordStatistics(editor: Editor): WordStatistics; /** * Resolves the live display value for a document-statistic field. * * Word's NUMCHARS field reads from the `Characters` metric (excluding * spaces), not from `CharactersWithSpaces`. */ export declare function resolveDocumentStatFieldValue(fieldType: string, stats: WordStatistics): string | null; /** * Resolves the correct editor for computing document-level statistics. * * If the given editor is a header/footer sub-editor, returns the parent * (main body) editor. Otherwise returns the editor itself. */ export declare function resolveMainBodyEditor(editor: Editor): Editor; //# sourceMappingURL=word-statistics.d.ts.map