import type { Editor } from "@tiptap/core"; import { type DocxExportControllerOptions, type DocxExportReport } from "@pixerate/editor/export"; /** * "Export to Word": downloads the editor's document as a `.docx` with its * comments (from the `Comments` store), tracked changes and paragraph styles, * with reactive `isExporting` / `error` / `lastReport` state (`lastReport` * lists anything the export had to leave out). * * `getEditor` is read on every export, so pass `() => editor` for a * `bind:editor` value. */ export declare function createDocxExport(getEditor: () => Editor | null | undefined, options?: DocxExportControllerOptions): { readonly isExporting: boolean; readonly error: Error | null; readonly lastReport: DocxExportReport | null; /** Exports and downloads the `.docx`; resolves with the report (or `null`). */ download: (fileName?: string) => Promise; /** Builds the `.docx` without downloading it. */ exportBlob: () => Promise<{ blob: Blob; report: DocxExportReport; } | null>; setOptions: (next: DocxExportControllerOptions) => void; }; export type DocxExportHandle = ReturnType;