import type { DocxHistoryArchive, DocxHistoryClient, HistoryStorage } from './history.js'; import type { RibbonEditor } from './ribbon.js'; export interface RibbonHistoryOptions { /** Browser database shared by this app's editors. No document bytes are stored until Save version. */ storageName?: string; /** Stable host-owned workspace key. Reopens its last saved document across reloads. */ workspaceId?: string; author?: string; } /** Low-level hosts supply their initialized history and preview services. createRibbonEditor wires these automatically. */ export interface RibbonHistoryBinding extends RibbonHistoryOptions { openHistory(storage: HistoryStorage): DocxHistoryClient; openArchive(bytes: Uint8Array): Promise; preview(container: HTMLElement, bytes: Uint8Array): Promise<{ destroy(): void; }>; } /** Shared ribbon lifecycle, browser persistence and separate previews. No autosave or network sync. */ export declare class RibbonHistory { private readonly ribbon; private readonly options; private readonly dialog; private readonly previewDialog; private readonly body; private readonly status; private readonly source; private readonly recent; private readonly back; private readonly resumeButton; private readonly events; private readonly prefix; private readonly lastKey; private store?; private client?; private draft?; private identity; private archive?; private panel?; private preview?; private active?; private destroyed; private installing; private dirty; private generation; private captured; private savedVersion; private observedVersion; private capturedVersion; private capturedBytes?; private readonly panelObserver; constructor(ribbon: RibbonEditor, options: RibbonHistoryBinding); get busy(): boolean; private get hasUnsavedChanges(); /** Called by the ribbon before a programmatic replacement. */ beforeOpen(): void; /** A new DOCX is a new document identity, even if its filename matches another document. */ documentOpened(name: string): void; edited(): void; /** Restores a saved workspace only when requested by the host, before exposing the editor. */ resume(): Promise; show(): Promise; openFile(file: File): Promise; newDocument(): Promise; destroy(): Promise; private ensureStorage; private ensureDraft; private loadSaved; private install; private mountPanel; private showPreview; private importArchive; private closeArchive; private remember; private readIdentity; private updateRecent; private confirm; private captureState; private confirmReplace; private explain; private command; private syncBusy; private run; private button; } //# sourceMappingURL=ribbon-history.d.ts.map