-
Notifications
You must be signed in to change notification settings - Fork 183
Bump to 9.31.0 #3083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump to 9.31.0 #3083
Conversation
* draft * temp * update ff * update * test * update
* fix: avoid "undefined" before paragraphs content * fix: set "image" as the default alt value instead of "undefined" --------- Co-authored-by: Francois Dursus <fdursus@veson.com>
* Enhance splitParagraph function to allow preservation of implicit paragraphs after split * Fix preserveImplicitParagraph flag in handleEnterOnParagraph to false * Update packages/roosterjs-content-model-plugins/lib/edit/utils/splitParagraph.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add beforeLogicalRootChanged event handling and related tests * Rename event type from 'beforeLogicalRootChanged' to 'beforeLogicalRootChange' across relevant files * Update packages/roosterjs-content-model-types/lib/event/LogicalRootChangedEvent.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* dsiable isComposing check for Android * add test --------- Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>
* Allow plugins to store custom state in undo snapshots * Type fixes * Move to using object instead array
…u/bvalverde/bumpRooster630
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR bumps Rooster to version 9.31.0 and adds a new plugin hook for supplying extra snapshot state during undo/redo operations.
- Introduce
additionalStateonSnapshotand related event interfaces - Add
BeforeAddUndoSnapshotEventand emit it inaddUndoSnapshot - Update snapshot manager, core API, tests, and demo UI to handle
additionalState
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| versions.json | Bump "main" from 9.30.0 to 9.31.0 |
| packages/roosterjs-content-model-types/lib/parameter/Snapshot.ts | Add additionalState to Snapshot interface |
| packages/roosterjs-content-model-types/lib/index.ts | Export new BeforeAddUndoSnapshotEvent |
| packages/roosterjs-content-model-types/lib/event/PluginEventType.ts | Add 'beforeAddUndoSnapshot' to event type union |
| packages/roosterjs-content-model-types/lib/event/PluginEvent.ts | Include BeforeAddUndoSnapshotEvent in PluginEvent union |
| packages/roosterjs-content-model-types/lib/event/ContentChangedEvent.ts | Add additionalState to ContentChangedEvent |
| packages/roosterjs-content-model-types/lib/event/BeforeAddUndoSnapshotEvent.ts | New event interface for before-add snapshot |
| packages/roosterjs-content-model-core/test/.../SnapshotsManagerImplTest.ts | Tests for additionalState behavior in snapshot manager |
| packages/roosterjs-content-model-core/test/.../restoreUndoSnapshotTest.ts | Tests for restoring snapshots with additionalState |
| packages/roosterjs-content-model-core/test/.../addUndoSnapshotTest.ts | Tests for emitting and applying additionalState |
| packages/roosterjs-content-model-core/lib/corePlugin/undo/SnapshotsManagerImpl.ts | Extend comparison logic to include additionalState |
| packages/roosterjs-content-model-core/lib/coreApi/addUndoSnapshot/addUndoSnapshot.ts | Trigger new beforeAddUndoSnapshot event before snapshot |
| packages/roosterjs-content-model-core/lib/coreApi/restoreUndoSnapshot/restoreUndoSnapshot.ts | Include additionalState when triggering contentChanged |
| demo/scripts/.../SnapshotPane.tsx | Update UI to show and edit additionalState |
Comments suppressed due to low confidence (1)
packages/roosterjs-content-model-types/lib/parameter/Snapshot.ts:77
- [nitpick] Consider broadening the type of
additionalStatefrom mapping to only string values to allow plugins to store richer data (e.g.Record<string, any>orunknown), improving flexibility of the plugin API.
additionalState?: { [key: string]: string };
Bump Rooster to 9.31.0