import { fabric } from "fabric"; import type { UseHistoryReturn } from "../types"; interface UseHistoryOptions { /** Maximum number of history states to keep (default: 50) */ maxHistorySize?: number; /** Throttle delay between saves in ms (default: 300) */ throttleMs?: number; /** Callback after state is loaded from history */ onAfterStateLoad?: () => void; /** Custom properties to include in serialization */ customProperties?: string[]; } /** * Hook for managing canvas undo/redo history * * @example * ```tsx * const history = useHistory(canvasRef, { * maxHistorySize: 50, * onAfterStateLoad: () => updateImageReference() * }); * * // Save state after changes * history.saveState(); * * // Undo/redo * history.undo(); * history.redo(); * ``` */ export declare function useHistory(canvasRef: React.MutableRefObject, options?: UseHistoryOptions): UseHistoryReturn; export default useHistory;