import type { LogLevel } from '@remotion/renderer'; import type { RedoResponse, SequenceNodePathRemapping, UndoRedoNavigation, UndoResponse } from '@remotion/studio-shared'; export interface UndoEntryDescription { undoMessage: string; redoMessage: string; } export type UndoEntryType = 'visual-control' | 'default-props' | 'sequence-props' | 'effect-props' | 'keyframe-add' | 'keyframe-delete' | 'add-effect' | 'delete-effect' | 'duplicate-effect' | 'paste-effects' | 'reorder-effect' | 'reorder-sequence' | 'delete-nodes' | 'duplicate-nodes' | 'wrap-node' | 'unwrap-node' | 'precompose-jsx-nodes' | 'split-sequences' | 'split-video-from-audio' | 'insert-basic-captions' | 'replace-video-source' | 'prerender' | 'restore-prerendered-scene' | 'insert-composition-element' | 'delete-composition' | 'rename-composition' | 'update-composition-metadata' | 'new-composition' | 'duplicate-composition' | 'move-composition-or-folder' | 'new-folder' | 'delete-folder' | 'rename-folder'; type UndoEntrySnapshot = { filePath: string; oldContents: string | null; newContents: string | null; /** 1-based source line for terminal/IDE file links (e.g. path:line). */ logLine: number; nodePathRemappings: SequenceNodePathRemapping[] | null; }; type UndoEntry = { filePath: string; /** 1-based source line for terminal/IDE file links (e.g. path:line). */ logLine: number; snapshots: UndoEntrySnapshot[]; description: UndoEntryDescription; /** When true, undo/redo file restores call `suppressBundlerUpdateForFile` (skip HMR refresh). */ suppressHmrOnFileRestore: boolean; entryType: UndoEntryType; undoRedoNavigation: UndoRedoNavigation | null; }; export declare function pushToUndoStack({ filePath, oldContents, newContents, logLevel, remotionRoot, logLine, description, entryType, suppressHmrOnFileRestore, nodePathRemappings, }: { filePath: string; oldContents: string; newContents: string | null; logLevel: LogLevel; remotionRoot: string; logLine: number; description: UndoEntryDescription; entryType: UndoEntryType; suppressHmrOnFileRestore: boolean; nodePathRemappings: SequenceNodePathRemapping[] | null; }): void; export declare function pushTransactionToUndoStack({ snapshots, logLevel, remotionRoot, description, entryType, suppressHmrOnFileRestore, undoRedoNavigation, }: { snapshots: Array<{ filePath: string; oldContents: string | null; newContents: string | null; logLine: number; nodePathRemappings: SequenceNodePathRemapping[] | null; }>; logLevel: LogLevel; remotionRoot: string; description: UndoEntryDescription; entryType: UndoEntryType; suppressHmrOnFileRestore: boolean; undoRedoNavigation: UndoRedoNavigation | null; }): void; export declare function printUndoHint(logLevel: LogLevel): void; export declare function pushToRedoStack({ filePath, oldContents, newContents, logLine, description, entryType, suppressHmrOnFileRestore, }: { filePath: string; oldContents: string; newContents: string | null; logLine: number; description: UndoEntryDescription; entryType: UndoEntryType; suppressHmrOnFileRestore: boolean; }): void; export declare function suppressUndoStackInvalidation(filePath: string): void; export declare function popUndo(): UndoResponse; export declare function popRedo(): RedoResponse; export declare function getUndoStack(): readonly UndoEntry[]; export declare function getRedoStack(): readonly UndoEntry[]; export declare function discardLastUndoEntryAfterFailedCommit(): void; export declare function clearUndoStackForTests(): void; export {};