import { Translator } from '../../i18n/translator'; import { ExportController } from './export-controller.svelte'; import { PrintOptions } from './export-print'; /** * ExportUiState: reactive state behind the toolbar `ExportMenu` and the * `ExportProgressModal`. Svelte port of Vue's `useExportProgress` composable: * it owns the modal state (open / title / progress / status), the * `AbortController` the export loops check between slides, and wraps each * multi-slide export (PDF / GIF / WebM) in a `begin -> run -> end` envelope. * All percentage maths + status labels come from `pptx-viewer-shared` * (`export-progress.ts`) so every binding shows identical progress. * * PNG (single slide, fast) and print (opens its own surface) run without the * modal; the menu trigger still disables via {@link exporting} while they run. */ export interface ExportUiDeps { controller: ExportController; getTranslator(): Translator; /** * Fired after an export completes successfully (Options > Accessibility * "feedback with sound" hook); not called on abort or failure. */ onComplete?(): void; } export declare class ExportUiState { #private; /** Whether the progress modal is visible. */ open: boolean; /** Modal heading (e.g. "Export as PDF"). */ title: string; /** Current progress, 0-100. */ progress: number; /** Status line under the bar (e.g. "Rendering slide 3 of 10..."). */ status: string; constructor(deps: ExportUiDeps); /** True while any export runs (disables the menu trigger). */ get exporting(): boolean; /** Export the current slide as PNG (no modal; quick single capture). */ runPng(): void; /** * Export the deck as a `pptx-viewer-json` download (no modal; a pure, * synchronous serialization with no capture pipeline). */ runJson(): void; /** Copy the current slide to the system image clipboard. */ runCopyImage(): void; /** Run the PDF export with the progress modal wired. */ runPdf(): Promise; /** Run the animated-GIF export with the progress modal wired. */ runGif(): Promise; /** Run the WebM video export with the progress modal wired. */ runVideo(): Promise; /** Run the print flow (no modal; the print surface takes over). */ runPrint(options?: PrintOptions): void; /** Cancel the in-flight export (aborts the loop, closes the modal). */ cancel(): void; } //# sourceMappingURL=export-ui.svelte.d.ts.map