import { HistoryManager, HistoryState, HistoryEntry, HistoryMark, MergedExecutionOptions, Command, HistoryManagerOptions } from "@pixerate/editor/history"; export interface SvelteHistory extends HistoryState { readonly manager: HistoryManager; /** History panel rows (undo steps, then redo steps). */ readonly entries: HistoryEntry[]; undo(): boolean; redo(): boolean; clear(): void; execute(command: Command): void; executeMerged(command: Command, options?: MergedExecutionOptions): void; batch(name: string, fn: () => void): void; /** Undoes / redoes until the entry at `index` is current (`-1` = before all). */ goTo(index: number): number; /** Captures the current point, e.g. when a drag starts. */ mark(): HistoryMark; /** Takes back every step since `mark` without leaving redo (Escape-cancel). */ revertTo(mark: HistoryMark): number; /** Removes the steps `match` picks without running them (stale steps). */ dropSteps(match: (step: HistoryEntry) => boolean): number; /** Joins every merged execute into one step until `endGesture`. */ beginGesture(key: string): void; endGesture(): void; subscribe(run: (value: HistoryState) => void): () => void; } /** * Creates a reactive Svelte 5 rune-based and Svelte store-compatible history adapter. */ export declare function createHistory(managerOrOptions?: HistoryManager | HistoryManagerOptions): SvelteHistory;