/** * Undo/Redo system for Bench3D * Core undo functionality without UI dependencies */ export interface UndoAspects { elements?: any[]; groups?: any[]; textures?: any[]; animations?: any[]; selection?: boolean | object; [key: string]: any; } export interface UndoEntry { before: UndoSave; post: UndoSave; action: string; type: 'edit' | 'selection'; time: number; selection_before?: UndoSelectionSave; selection_post?: UndoSelectionSave; } export interface UndoSave { aspects: UndoAspects; data: Record; } export interface UndoSelectionSave { aspects: UndoAspects; data: Record; } /** * Core undo system for tracking changes */ export declare class UndoSystem { private history; private index; private currentSave; private currentSelectionSave; private maxHistorySize; constructor(maxHistorySize?: number); /** * Initialize an edit operation */ initEdit(aspects: UndoAspects, amended?: boolean): UndoSave; /** * Finish an edit operation and add to history */ finishEdit(message: string, aspects?: UndoAspects): UndoEntry | null; /** * Initialize a selection change */ initSelection(aspects: UndoAspects): UndoSelectionSave | null; /** * Finish a selection change */ finishSelection(message: string, aspects?: UndoAspects): UndoEntry | null; /** * Cancel current edit */ cancelEdit(revertChanges?: boolean): void; /** * Cancel current selection change */ cancelSelection(revertChanges?: boolean): void; /** * Undo last operation */ undo(): boolean; /** * Redo last undone operation */ redo(): boolean; /** * Check if undo is available */ canUndo(): boolean; /** * Check if redo is available */ canRedo(): boolean; /** * Clear undo history */ clear(): void; /** * Get undo history */ getHistory(): readonly UndoEntry[]; /** * Get current history index */ getIndex(): number; /** * Create a save point from aspects */ private createSave; /** * Create a selection save point */ private createSelectionSave; /** * Load a save point (restore state) */ private loadSave; } //# sourceMappingURL=undo_system.d.ts.map