import type { ActionRegistry, EditAction } from "./types.js"; export interface UseImageHistoryResult { currentImageUrl: string; currentBlob: Blob | null; /** Synchronous read of the current image URL — valid immediately after `applyActions`. */ getCurrentImageUrl: () => string; /** Synchronous read of the current blob — valid immediately after `applyActions`. */ getCurrentBlob: () => Blob | null; canUndo: boolean; canRedo: boolean; /** True while an async replay (undo/redo) is in progress. */ replaying: boolean; /** Applies a new blob to the current state and records it in history. Returns the new object URL. */ applyActions: (blob: Blob, actions: EditAction[]) => string; undo: () => void; redo: () => void; reset: () => void; } /** * Manages undo/redo history for the image editor using action replay. * * Only action lists are stored — no intermediate blobs. Undo/redo replays * all remaining actions from the source image, keeping memory usage minimal * regardless of history depth. Only one blob is in memory at a time. */ export declare function useImageHistory(sourceUrl: string, registry: ActionRegistry): UseImageHistoryResult;