What problem does it solve?
Undo/redo systems are essential for complex interactions, but implementing reliable, mergeable undo stacks across diverse actions is error-prone and time-consuming.
Core Features & Use Cases
- Implements an UndoRedoService that exposes deterministic undo/redo stacks, reactive state (e.g., CanUndo, CanRedo), and event-driven notifications.
- Supports mergeable commands via IMergeableCommand to condense consecutive actions and optimize history.
- Includes built-in commands (CompositeCommand, MoveTransformCommand, SetSettingCommand<T>, SetVolumeCommand) and a ready-to-use installer to wire the service in projects.
- Event types include CommandExecutedEvent, UndoPerformedEvent, RedoPerformedEvent, and UndoStackClearedEvent for UI and analytics.
Quick Start
Install and wire up the UndoRedoService, implement a custom IUndoableCommand, and attach it to your action triggers via ExecuteAsync to enable undo/redo.