refactor(editor): history as a store extension (#12214)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Refactor**
  - Improved history and undo/redo management across the app by introducing a dedicated history extension. Undo/redo operations now use a more focused undo manager, resulting in clearer and more consistent behavior.
- **Documentation**
  - Updated API documentation to reflect changes in history management, including revised method signatures and removal of outdated event references.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Saul-Mirone
2025-05-12 01:50:57 +00:00
parent e91e0e1812
commit 6fb7f51ea2
16 changed files with 124 additions and 78 deletions
@@ -94,8 +94,14 @@ export class StoreSelectionExtension extends StoreExtension {
}
);
this.store.history.on('stack-item-added', this._itemAdded);
this.store.history.on('stack-item-popped', this._itemPopped);
this.store.history.undoManager.on('stack-item-added', this._itemAdded);
this.store.history.undoManager.on('stack-item-popped', this._itemPopped);
}
override disposed() {
super.disposed();
this.store.history.undoManager.off('stack-item-added', this._itemAdded);
this.store.history.undoManager.off('stack-item-popped', this._itemPopped);
}
get value() {