export interface HistoryOptions { /** The renderer-owned subtree — mutations inside are never manifest changes. */ excludeContainer?: () => Node | null; /** Fired whenever canUndo/canRedo may have changed (om-map notifies `history`-watching widgets). */ onChange?: () => void; limit?: number; } export declare class ManifestHistory { private readonly root; private readonly opts; private readonly undoStack; private readonly redoStack; private readonly observer; private applying; private suppressDepth; private readonly limit; constructor(root: Element, opts?: HistoryOptions); get canUndo(): boolean; get canRedo(): boolean; get depth(): number; /** * Push a non-DOM inverse pair onto the same stack (the draw store's * committed-sketch snapshots). Ignored while a replay is applying — a * custom op's own side effects must not re-record — or while suppressed. */ record(entry: { undo(): void; redo(): void; }): void; /** * Run `fn` with recording off — story playback/scrub, hover-driven * transients. Pending records from BEFORE the call are ingested first * (they were recordable); records produced BY the call are discarded * synchronously via takeRecords, so suppression needs no async handshake. */ suppress(fn: () => T): T; undo(): void; redo(): void; destroy(): void; /** Observer callbacks are microtasks — force pending records through NOW so undo()/canUndo see a current stack. */ private settle; private apply; private applyOp; private ingest; private push; private isExcludedNode; private isRecordableAttr; } export declare function createHistory(mapEl: Element, opts?: HistoryOptions): ManifestHistory; export declare function peekHistory(mapEl: Element): ManifestHistory | undefined; export declare function destroyHistory(mapEl: Element): void; /** Run `fn` with this map's recording suppressed — a no-op passthrough when no history exists (headless React path, early boot). */ export declare function suppressHistory(mapEl: Element | null, fn: () => T): T;