modulo-editor
Version:
A flexible and extensible block-based editor for React applications
17 lines (16 loc) • 733 B
TypeScript
import { EditorContent } from "../types/block";
import { HistoryEntry, HistoryAction, HistoryState } from "../types/history";
interface HistoryStore extends HistoryState {
addEntry: (content: EditorContent, action: HistoryAction, metadata?: HistoryEntry["metadata"]) => void;
canUndo: () => boolean;
canRedo: () => boolean;
undo: () => HistoryEntry | null;
redo: () => HistoryEntry | null;
clear: () => void;
setUndoing: (isUndoing: boolean) => void;
setRedoing: (isRedoing: boolean) => void;
getCurrentEntry: () => HistoryEntry | null;
getHistorySize: () => number;
}
export declare const useHistoryStore: import("zustand").UseBoundStore<import("zustand").StoreApi<HistoryStore>>;
export {};