From e72d83541aa8a31903863a9180804404e5783c14 Mon Sep 17 00:00:00 2001 From: Marcel Mraz Date: Mon, 30 Dec 2024 21:30:34 +0100 Subject: [PATCH] Don't strip seed --- packages/excalidraw/change.ts | 9 +- .../tests/__snapshots__/history.test.tsx.snap | 1962 ++++++++--------- packages/excalidraw/tests/history.test.tsx | 41 +- 3 files changed, 1023 insertions(+), 989 deletions(-) diff --git a/packages/excalidraw/change.ts b/packages/excalidraw/change.ts index e2ed09aea..be26468d3 100644 --- a/packages/excalidraw/change.ts +++ b/packages/excalidraw/change.ts @@ -804,10 +804,8 @@ export class AppStateChange implements Change { } // CFDO: consider adding here (nonnullable) version & versionNonce & updated & seed (so that we have correct versions when recunstructing from remote) -type ElementPartial = Omit< - ElementUpdate>, - "seed" ->; +type ElementPartial = + ElementUpdate>; type ElementsChangeOptions = { shouldRedistribute: boolean; @@ -1605,8 +1603,7 @@ export class ElementsChange implements Change { private static stripIrrelevantProps( partial: Partial, ): ElementPartial { - const { id, updated, version, versionNonce, seed, ...strippedPartial } = - partial; + const { id, updated, version, versionNonce, ...strippedPartial } = partial; return strippedPartial; } diff --git a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap index 57248622a..65a57c768 100644 --- a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap @@ -276,18 +276,17 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id683": Delta { + "removed": { + "id683": { "deleted": { "endBinding": { "elementId": "id680", @@ -340,21 +339,21 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, + "updated": {}, }, "id": "id701", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id679": Delta { + "removed": { + "id679": { "deleted": { "boundElements": [], }, @@ -367,7 +366,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], }, }, - "id680": Delta { + "id680": { "deleted": { "boundElements": [], }, @@ -380,7 +379,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], }, }, - "id683": Delta { + "id683": { "deleted": { "endBinding": { "elementId": "id694", @@ -432,7 +431,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "y": "0.99245", }, }, - "id694": Delta { + "id694": { "deleted": { "boundElements": [ { @@ -446,6 +445,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, + "updated": {}, }, "id": "id702", }, @@ -454,17 +454,18 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id679": Delta { + "removed": {}, + "updated": { + "id679": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -495,7 +496,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "isDeleted": true, }, }, - "id680": Delta { + "id680": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -527,11 +528,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "updated": {}, }, "id": "id682", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -546,10 +546,11 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id683": Delta { + "removed": {}, + "updated": { + "id683": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -597,7 +598,6 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "updated": {}, }, "id": "id685", }, @@ -835,18 +835,17 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id660": Delta { + "removed": { + "id660": { "deleted": { "points": [ [ @@ -873,21 +872,21 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, + "updated": {}, }, "id": "id677", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id656": Delta { + "removed": { + "id656": { "deleted": { "boundElements": [], }, @@ -900,7 +899,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], }, }, - "id657": Delta { + "id657": { "deleted": { "boundElements": [], }, @@ -913,7 +912,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], }, }, - "id660": Delta { + "id660": { "deleted": { "endBinding": null, "points": [ @@ -954,6 +953,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, + "updated": {}, }, "id": "id678", }, @@ -962,17 +962,18 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id656": Delta { + "removed": {}, + "updated": { + "id656": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1003,7 +1004,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "isDeleted": true, }, }, - "id657": Delta { + "id657": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1035,11 +1036,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "updated": {}, }, "id": "id659", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -1054,10 +1054,11 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id660": Delta { + "removed": {}, + "updated": { + "id660": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1105,7 +1106,6 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "updated": {}, }, "id": "id662", }, @@ -1370,17 +1370,45 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id703": Delta { + "id707": { + "deleted": { + "endBinding": { + "elementId": "id704", + "fixedPoint": [ + "0.50000", + 1, + ], + "focus": 0, + "gap": 1, + }, + "startBinding": { + "elementId": "id703", + "fixedPoint": [ + 1, + "0.50000", + ], + "focus": 0, + "gap": 1, + }, + }, + "inserted": { + "endBinding": null, + "startBinding": null, + }, + }, + }, + "updated": { + "id703": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1411,7 +1439,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "isDeleted": true, }, }, - "id704": Delta { + "id704": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1443,34 +1471,6 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "updated": { - "id707": Delta { - "deleted": { - "endBinding": { - "elementId": "id704", - "fixedPoint": [ - "0.50000", - 1, - ], - "focus": 0, - "gap": 1, - }, - "startBinding": { - "elementId": "id703", - "fixedPoint": [ - 1, - "0.50000", - ], - "focus": 0, - "gap": 1, - }, - }, - "inserted": { - "endBinding": null, - "startBinding": null, - }, - }, - }, }, "id": "id711", }, @@ -1735,17 +1735,45 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id717": Delta { + "id712": { + "deleted": { + "boundElements": [ + { + "id": "id717", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id713": { + "deleted": { + "boundElements": [ + { + "id": "id717", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + "updated": { + "id717": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1809,34 +1837,6 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "updated": { - "id712": Delta { - "deleted": { - "boundElements": [ - { - "id": "id717", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - "id713": Delta { - "deleted": { - "boundElements": [ - { - "id": "id717", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - }, }, "id": "id723", }, @@ -2027,17 +2027,18 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should unbind remotely deleted bindable elements from arrow when the arrow is added through the history > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id724": Delta { + "removed": {}, + "updated": { + "id724": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -2068,7 +2069,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "isDeleted": true, }, }, - "id725": Delta { + "id725": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -2100,7 +2101,6 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "updated": {}, }, "id": "id727", }, @@ -2358,17 +2358,18 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id728": Delta { + "removed": {}, + "updated": { + "id728": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -2399,7 +2400,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "isDeleted": true, }, }, - "id729": Delta { + "id729": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -2431,11 +2432,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "updated": {}, }, "id": "id731", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -2450,10 +2450,38 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id732": Delta { + "id728": { + "deleted": { + "boundElements": [ + { + "id": "id732", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id729": { + "deleted": { + "boundElements": [ + { + "id": "id732", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + "updated": { + "id732": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -2511,34 +2539,6 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, }, - "updated": { - "id728": Delta { - "deleted": { - "boundElements": [ - { - "id": "id732", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - "id729": Delta { - "deleted": { - "boundElements": [ - { - "id": "id732", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - }, }, "id": "id736", }, @@ -2782,18 +2782,17 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the container is added through the history > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id605": Delta { + "removed": { + "id605": { "deleted": { "isDeleted": false, }, @@ -2824,7 +2823,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "y": 10, }, }, - "id606": Delta { + "id606": { "deleted": { "containerId": null, }, @@ -2833,6 +2832,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, + "updated": {}, }, "id": "id614", }, @@ -3078,16 +3078,16 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the text is added through history > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": { - "id616": Delta { + "id616": { "deleted": { "containerId": "id615", "isDeleted": true, @@ -3098,9 +3098,8 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, - "removed": {}, - "updated": { - "id615": Delta { + "removed": { + "id615": { "deleted": { "boundElements": [], }, @@ -3114,6 +3113,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, + "updated": {}, }, "id": "id624", }, @@ -3359,18 +3359,17 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the container got bound to a different text in the meantime > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id569": Delta { + "removed": { + "id569": { "deleted": { "boundElements": [ { @@ -3388,7 +3387,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and ], }, }, - "id570": Delta { + "id570": { "deleted": { "containerId": null, }, @@ -3396,7 +3395,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "containerId": "id569", }, }, - "id574": Delta { + "id574": { "deleted": { "containerId": "id569", }, @@ -3405,6 +3404,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, + "updated": {}, }, "id": "id578", }, @@ -3642,18 +3642,17 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the text got bound to a different container in the meantime > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id579": Delta { + "removed": { + "id579": { "deleted": { "boundElements": [], }, @@ -3666,7 +3665,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and ], }, }, - "id580": Delta { + "id580": { "deleted": { "containerId": "id584", }, @@ -3674,7 +3673,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "containerId": "id579", }, }, - "id584": Delta { + "id584": { "deleted": { "boundElements": [ { @@ -3688,6 +3687,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, + "updated": {}, }, "id": "id588", }, @@ -3887,18 +3887,17 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and there no conflicting updates in the meantime > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id560": Delta { + "removed": { + "id560": { "deleted": { "boundElements": [], }, @@ -3911,7 +3910,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and ], }, }, - "id561": Delta { + "id561": { "deleted": { "containerId": null, }, @@ -3920,6 +3919,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, + "updated": {}, }, "id": "id568", }, @@ -4126,17 +4126,27 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added bound text when it's container is added through the history > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id589": Delta { + "id590": { + "deleted": { + "containerId": "id589", + }, + "inserted": { + "containerId": null, + }, + }, + }, + "updated": { + "id589": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -4168,16 +4178,6 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, - "updated": { - "id590": Delta { - "deleted": { - "containerId": "id589", - }, - "inserted": { - "containerId": null, - }, - }, - }, }, "id": "id596", }, @@ -4382,17 +4382,32 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added container when it's bound text is added through the history > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id598": Delta { + "id597": { + "deleted": { + "boundElements": [ + { + "id": "id598", + "type": "text", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + "updated": { + "id598": { "deleted": { "angle": 0, "autoResize": true, @@ -4433,21 +4448,6 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, - "updated": { - "id597": Delta { - "deleted": { - "boundElements": [ - { - "id": "id598", - "type": "text", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - }, }, "id": "id604", }, @@ -4650,18 +4650,17 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw bound text to match container dimensions when the bound text is updated through the history > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id650": Delta { + "removed": { + "id650": { "deleted": { "angle": 0, "x": 15, @@ -4674,6 +4673,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, + "updated": {}, }, "id": "id655", }, @@ -4880,18 +4880,17 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw remotely added bound text when it's container is updated through the history > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id641": Delta { + "removed": { + "id641": { "deleted": { "angle": 90, "x": 200, @@ -4904,6 +4903,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, + "updated": {}, }, "id": "id648", }, @@ -5103,17 +5103,18 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted bound text from container when the container is added through the history > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id625": Delta { + "removed": {}, + "updated": { + "id625": { "deleted": { "boundElements": [], "isDeleted": false, @@ -5129,7 +5130,6 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, - "updated": {}, }, "id": "id632", }, @@ -5334,17 +5334,18 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted container from bound text when the text is added through the history > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id634": Delta { + "removed": {}, + "updated": { + "id634": { "deleted": { "containerId": null, "isDeleted": false, @@ -5355,7 +5356,6 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, }, }, - "updated": {}, }, "id": "id640", }, @@ -5547,17 +5547,18 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre exports[`history > multiplayer undo/redo > conflicts in frames and their children > should not rebind frame child with frame when frame was remotely deleted and frame child is added back through the history > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id738": Delta { + "removed": {}, + "updated": { + "id738": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -5589,22 +5590,20 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre }, }, }, - "updated": {}, }, "id": "id747", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id738": Delta { + "removed": { + "id738": { "deleted": { "frameId": "id737", }, @@ -5613,6 +5612,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre }, }, }, + "updated": {}, }, "id": "id748", }, @@ -5806,7 +5806,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -5824,11 +5824,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id460": Delta { + "removed": { + "id460": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -5861,7 +5860,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "isDeleted": true, }, }, - "id461": Delta { + "id461": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -5895,10 +5894,11 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, + "updated": {}, }, "id": "id473", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -5917,14 +5917,14 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id474", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -5939,7 +5939,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, @@ -6164,7 +6164,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -6177,10 +6177,11 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id402": Delta { + "removed": {}, + "updated": { + "id402": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -6212,11 +6213,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "updated": {}, }, "id": "id404", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -6231,11 +6231,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id405": Delta { + "removed": { + "id405": { "deleted": { "angle": 0, "backgroundColor": "#ffc9c9", @@ -6267,21 +6266,21 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, + "updated": {}, }, "id": "id420", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id405": Delta { + "removed": { + "id405": { "deleted": { "backgroundColor": "#ffc9c9", }, @@ -6290,10 +6289,11 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, + "updated": {}, }, "id": "id421", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -6308,11 +6308,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id410": Delta { + "removed": { + "id410": { "deleted": { "angle": 0, "backgroundColor": "#ffc9c9", @@ -6344,21 +6343,21 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, + "updated": {}, }, "id": "id422", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id410": Delta { + "removed": { + "id410": { "deleted": { "x": 50, "y": 50, @@ -6369,6 +6368,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, + "updated": {}, }, "id": "id423", }, @@ -6593,7 +6593,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -6606,10 +6606,11 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id424": Delta { + "removed": {}, + "updated": { + "id424": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -6640,7 +6641,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "isDeleted": true, }, }, - "id425": Delta { + "id425": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -6671,7 +6672,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "isDeleted": true, }, }, - "id426": Delta { + "id426": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -6703,11 +6704,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "updated": {}, }, "id": "id429", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -6722,14 +6722,14 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id442", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -6742,7 +6742,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, @@ -7016,7 +7016,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -7034,14 +7034,14 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id458", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -7059,7 +7059,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, @@ -7239,7 +7239,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -7252,10 +7252,11 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id478": Delta { + "removed": {}, + "updated": { + "id478": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -7306,11 +7307,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "updated": {}, }, "id": "id480", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -7321,14 +7321,14 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id490", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -7339,14 +7339,14 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id491", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -7357,7 +7357,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, @@ -7516,7 +7516,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -7529,11 +7529,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id393": Delta { + "removed": { + "id393": { "deleted": { "angle": 0, "backgroundColor": "#ffec99", @@ -7565,21 +7564,21 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, + "updated": {}, }, "id": "id400", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id393": Delta { + "removed": { + "id393": { "deleted": { "backgroundColor": "#ffec99", }, @@ -7588,6 +7587,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, + "updated": {}, }, "id": "id401", }, @@ -7805,18 +7805,17 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced all indices > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id506": Delta { + "removed": { + "id506": { "deleted": { "index": "a1", }, @@ -7825,10 +7824,11 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, + "updated": {}, }, "id": "id515", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -7841,9 +7841,9 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": { - "id505": Delta { + "id505": { "deleted": { "isDeleted": true, }, @@ -7874,7 +7874,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "y": 10, }, }, - "id506": Delta { + "id506": { "deleted": { "isDeleted": true, }, @@ -7905,7 +7905,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "y": 20, }, }, - "id507": Delta { + "id507": { "deleted": { "isDeleted": true, }, @@ -8158,18 +8158,17 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced changed indices > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id494": Delta { + "removed": { + "id494": { "deleted": { "index": "a1", }, @@ -8178,10 +8177,11 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, + "updated": {}, }, "id": "id503", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -8194,9 +8194,9 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": { - "id493": Delta { + "id493": { "deleted": { "isDeleted": true, }, @@ -8227,7 +8227,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "y": 10, }, }, - "id494": Delta { + "id494": { "deleted": { "isDeleted": true, }, @@ -8258,7 +8258,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "y": 20, }, }, - "id495": Delta { + "id495": { "deleted": { "isDeleted": true, }, @@ -8519,7 +8519,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -8532,10 +8532,11 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id534": Delta { + "removed": {}, + "updated": { + "id534": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -8567,11 +8568,10 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, - "updated": {}, }, "id": "id555", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -8586,10 +8586,11 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id537": Delta { + "removed": {}, + "updated": { + "id537": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -8621,11 +8622,10 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, - "updated": {}, }, "id": "id556", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -8640,14 +8640,14 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id557", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -8660,25 +8660,24 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id558", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id534": Delta { + "removed": { + "id534": { "deleted": { "x": 90, "y": 90, @@ -8688,7 +8687,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "y": 10, }, }, - "id537": Delta { + "id537": { "deleted": { "x": 110, "y": 110, @@ -8699,6 +8698,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, + "updated": {}, }, "id": "id559", }, @@ -8913,17 +8913,18 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id517": Delta { + "removed": {}, + "updated": { + "id517": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -8982,7 +8983,6 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, - "updated": {}, }, "id": "id522", }, @@ -9172,7 +9172,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -9185,10 +9185,11 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id523": Delta { + "removed": {}, + "updated": { + "id523": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -9220,22 +9221,20 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, - "updated": {}, }, "id": "id532", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id523": Delta { + "removed": { + "id523": { "deleted": { "height": 90, "width": 90, @@ -9246,6 +9245,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, }, }, + "updated": {}, }, "id": "id533", }, @@ -9433,18 +9433,17 @@ exports[`history > multiplayer undo/redo > should not override remote changes on exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id325": Delta { + "removed": { + "id325": { "deleted": { "backgroundColor": "transparent", }, @@ -9453,6 +9452,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on }, }, }, + "updated": {}, }, "id": "id333", }, @@ -9461,7 +9461,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -9474,10 +9474,11 @@ exports[`history > multiplayer undo/redo > should not override remote changes on }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id325": Delta { + "removed": {}, + "updated": { + "id325": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -9509,7 +9510,6 @@ exports[`history > multiplayer undo/redo > should not override remote changes on }, }, }, - "updated": {}, }, "id": "id327", }, @@ -9667,7 +9667,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -9680,10 +9680,11 @@ exports[`history > multiplayer undo/redo > should not override remote changes on }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id334": Delta { + "removed": {}, + "updated": { + "id334": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -9715,22 +9716,20 @@ exports[`history > multiplayer undo/redo > should not override remote changes on }, }, }, - "updated": {}, }, "id": "id336", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id334": Delta { + "removed": { + "id334": { "deleted": { "backgroundColor": "#ffc9c9", }, @@ -9739,6 +9738,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on }, }, }, + "updated": {}, }, "id": "id340", }, @@ -10003,18 +10003,17 @@ exports[`history > multiplayer undo/redo > should override remotely added groups exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id363": Delta { + "removed": { + "id363": { "deleted": { "groupIds": [ "A", @@ -10025,7 +10024,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups "groupIds": [], }, }, - "id364": Delta { + "id364": { "deleted": { "groupIds": [ "A", @@ -10037,6 +10036,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups }, }, }, + "updated": {}, }, "id": "id370", }, @@ -10225,7 +10225,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -10238,10 +10238,11 @@ exports[`history > multiplayer undo/redo > should override remotely added points }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id371": Delta { + "removed": {}, + "updated": { + "id371": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -10292,22 +10293,20 @@ exports[`history > multiplayer undo/redo > should override remotely added points }, }, }, - "updated": {}, }, "id": "id381", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id371": Delta { + "removed": { + "id371": { "deleted": { "height": 30, "lastCommittedPoint": [ @@ -10358,10 +10357,11 @@ exports[`history > multiplayer undo/redo > should override remotely added points }, }, }, + "updated": {}, }, "id": "id382", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -10372,7 +10372,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, @@ -10531,7 +10531,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -10544,10 +10544,11 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id384": Delta { + "removed": {}, + "updated": { + "id384": { "deleted": { "angle": 0, "backgroundColor": "#ffec99", @@ -10579,11 +10580,10 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme }, }, }, - "updated": {}, }, "id": "id391", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -10596,11 +10596,10 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id384": Delta { + "removed": { + "id384": { "deleted": { "isDeleted": false, }, @@ -10609,6 +10608,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme }, }, }, + "updated": {}, }, "id": "id392", }, @@ -11071,17 +11071,18 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "KPrBI4g_v9qUB1XxYLgSz": Delta { + "removed": {}, + "updated": { + "KPrBI4g_v9qUB1XxYLgSz": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -11112,7 +11113,7 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o "isDeleted": true, }, }, - "u2JGnnmoJ0VATV4vCNJE5": Delta { + "u2JGnnmoJ0VATV4vCNJE5": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -11144,21 +11145,48 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o }, }, }, - "updated": {}, }, "id": "id358", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "6Rm4g567UQM4WjLwej2Vc": Delta { + "KPrBI4g_v9qUB1XxYLgSz": { + "deleted": { + "boundElements": [ + { + "id": "6Rm4g567UQM4WjLwej2Vc", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "u2JGnnmoJ0VATV4vCNJE5": { + "deleted": { + "boundElements": [ + { + "id": "6Rm4g567UQM4WjLwej2Vc", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + "updated": { + "6Rm4g567UQM4WjLwej2Vc": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -11226,34 +11254,6 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o }, }, }, - "updated": { - "KPrBI4g_v9qUB1XxYLgSz": Delta { - "deleted": { - "boundElements": [ - { - "id": "6Rm4g567UQM4WjLwej2Vc", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - "u2JGnnmoJ0VATV4vCNJE5": Delta { - "deleted": { - "boundElements": [ - { - "id": "6Rm4g567UQM4WjLwej2Vc", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - }, }, "id": "id362", }, @@ -11409,18 +11409,17 @@ exports[`history > multiplayer undo/redo > should update history entries after r exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id341": Delta { + "removed": { + "id341": { "deleted": { "backgroundColor": "#d0bfff", }, @@ -11429,21 +11428,21 @@ exports[`history > multiplayer undo/redo > should update history entries after r }, }, }, + "updated": {}, }, "id": "id352", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id341": Delta { + "removed": { + "id341": { "deleted": { "backgroundColor": "transparent", }, @@ -11452,6 +11451,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r }, }, }, + "updated": {}, }, "id": "id353", }, @@ -11460,7 +11460,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -11473,10 +11473,11 @@ exports[`history > multiplayer undo/redo > should update history entries after r }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id341": Delta { + "removed": {}, + "updated": { + "id341": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -11508,7 +11509,6 @@ exports[`history > multiplayer undo/redo > should update history entries after r }, }, }, - "updated": {}, }, "id": "id343", }, @@ -11694,7 +11694,7 @@ exports[`history > singleplayer undo/redo > remounting undo/redo buttons should exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -11707,9 +11707,9 @@ exports[`history > singleplayer undo/redo > remounting undo/redo buttons should }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": { - "id321": Delta { + "id321": { "deleted": { "isDeleted": true, }, @@ -11934,7 +11934,7 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -11947,10 +11947,11 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id49": Delta { + "removed": {}, + "updated": { + "id49": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -11982,7 +11983,6 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme }, }, }, - "updated": {}, }, "id": "id51", }, @@ -12246,7 +12246,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -12259,10 +12259,11 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id146": Delta { + "removed": {}, + "updated": { + "id146": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -12294,11 +12295,10 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f }, }, }, - "updated": {}, }, "id": "id148", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -12311,24 +12311,25 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id150", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id155": Delta { + "removed": {}, + "updated": { + "id155": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -12382,7 +12383,6 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f }, }, }, - "updated": {}, }, "id": "id157", }, @@ -12572,7 +12572,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on s exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -12583,9 +12583,9 @@ exports[`history > singleplayer undo/redo > should create new history entry on s }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": { - "A": Delta { + "A": { "deleted": { "isDeleted": true, }, @@ -12594,8 +12594,9 @@ exports[`history > singleplayer undo/redo > should create new history entry on s }, }, }, - "removed": { - "B": Delta { + "removed": {}, + "updated": { + "B": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -12626,7 +12627,6 @@ exports[`history > singleplayer undo/redo > should create new history entry on s }, }, }, - "updated": {}, }, "id": "id79", }, @@ -12816,7 +12816,7 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -12829,10 +12829,11 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id315": Delta { + "removed": {}, + "updated": { + "id315": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -12864,7 +12865,6 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe }, }, }, - "updated": {}, }, "id": "id319", }, @@ -13054,7 +13054,7 @@ exports[`history > singleplayer undo/redo > should end up with no history entry exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -13067,10 +13067,11 @@ exports[`history > singleplayer undo/redo > should end up with no history entry }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id69": Delta { + "removed": {}, + "updated": { + "id69": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -13102,7 +13103,6 @@ exports[`history > singleplayer undo/redo > should end up with no history entry }, }, }, - "updated": {}, }, "id": "id73", }, @@ -13258,7 +13258,7 @@ exports[`history > singleplayer undo/redo > should iterate through the history w exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -13271,14 +13271,14 @@ exports[`history > singleplayer undo/redo > should iterate through the history w }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id65", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -13291,14 +13291,14 @@ exports[`history > singleplayer undo/redo > should iterate through the history w }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id66", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -13311,9 +13311,9 @@ exports[`history > singleplayer undo/redo > should iterate through the history w }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": { - "id52": Delta { + "id52": { "deleted": { "isDeleted": true, }, @@ -13538,7 +13538,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -13551,10 +13551,11 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id14": Delta { + "removed": {}, + "updated": { + "id14": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -13586,11 +13587,10 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s }, }, }, - "updated": {}, }, "id": "id16", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -13603,14 +13603,14 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id23", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -13623,14 +13623,14 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id26", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -13645,10 +13645,11 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id17": Delta { + "removed": {}, + "updated": { + "id17": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -13680,7 +13681,6 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s }, }, }, - "updated": {}, }, "id": "id27", }, @@ -13839,14 +13839,14 @@ exports[`history > singleplayer undo/redo > should not collapse when applying co exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, @@ -14046,7 +14046,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -14064,10 +14064,11 @@ exports[`history > singleplayer undo/redo > should not end up with history entry }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id4": Delta { + "removed": {}, + "updated": { + "id4": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -14100,7 +14101,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry "isDeleted": true, }, }, - "id5": Delta { + "id5": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -14134,7 +14135,6 @@ exports[`history > singleplayer undo/redo > should not end up with history entry }, }, }, - "updated": {}, }, "id": "id8", }, @@ -14325,17 +14325,18 @@ exports[`history > singleplayer undo/redo > should not end up with history entry exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id10": Delta { + "removed": {}, + "updated": { + "id10": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -14366,7 +14367,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry "isDeleted": true, }, }, - "id11": Delta { + "id11": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -14398,7 +14399,6 @@ exports[`history > singleplayer undo/redo > should not end up with history entry }, }, }, - "updated": {}, }, "id": "id13", }, @@ -14556,18 +14556,17 @@ exports[`history > singleplayer undo/redo > should not override appstate changes exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id28": Delta { + "removed": { + "id28": { "deleted": { "backgroundColor": "#ffc9c9", }, @@ -14576,21 +14575,21 @@ exports[`history > singleplayer undo/redo > should not override appstate changes }, }, }, + "updated": {}, }, "id": "id42", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id28": Delta { + "removed": { + "id28": { "deleted": { "backgroundColor": "transparent", }, @@ -14599,10 +14598,11 @@ exports[`history > singleplayer undo/redo > should not override appstate changes }, }, }, + "updated": {}, }, "id": "id43", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -14615,7 +14615,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, @@ -14627,7 +14627,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -14640,10 +14640,11 @@ exports[`history > singleplayer undo/redo > should not override appstate changes }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id28": Delta { + "removed": {}, + "updated": { + "id28": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -14675,7 +14676,6 @@ exports[`history > singleplayer undo/redo > should not override appstate changes }, }, }, - "updated": {}, }, "id": "id30", }, @@ -14802,7 +14802,7 @@ exports[`history > singleplayer undo/redo > should support appstate name or view exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -14813,14 +14813,14 @@ exports[`history > singleplayer undo/redo > should support appstate name or view }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id86", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -14831,7 +14831,7 @@ exports[`history > singleplayer undo/redo > should support appstate name or view }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, @@ -15137,7 +15137,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -15150,10 +15150,38 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id235": Delta { + "id222": { + "deleted": { + "boundElements": [ + { + "id": "id235", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id224": { + "deleted": { + "boundElements": [ + { + "id": "id235", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + "updated": { + "id235": { "deleted": { "isDeleted": false, "points": [ @@ -15182,34 +15210,6 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": { - "id222": Delta { - "deleted": { - "boundElements": [ - { - "id": "id235", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - "id224": Delta { - "deleted": { - "boundElements": [ - { - "id": "id235", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - }, }, "id": "id240", }, @@ -15218,17 +15218,18 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id222": Delta { + "removed": {}, + "updated": { + "id222": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -15259,7 +15260,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "isDeleted": true, }, }, - "id223": Delta { + "id223": { "deleted": { "angle": 0, "autoResize": true, @@ -15299,7 +15300,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "isDeleted": true, }, }, - "id224": Delta { + "id224": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -15331,11 +15332,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": {}, }, "id": "id226", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -15348,14 +15348,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id229", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -15368,14 +15368,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id232", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -15388,11 +15388,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id222": Delta { + "removed": { + "id222": { "deleted": { "boundElements": [ { @@ -15405,7 +15404,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "boundElements": [], }, }, - "id223": Delta { + "id223": { "deleted": { "containerId": "id222", "height": 25, @@ -15426,10 +15425,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, + "updated": {}, }, "id": "id234", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -15446,10 +15446,38 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id235": Delta { + "id222": { + "deleted": { + "boundElements": [ + { + "id": "id235", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id224": { + "deleted": { + "boundElements": [ + { + "id": "id235", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + "updated": { + "id235": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -15507,34 +15535,6 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": { - "id222": Delta { - "deleted": { - "boundElements": [ - { - "id": "id235", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - "id224": Delta { - "deleted": { - "boundElements": [ - { - "id": "id235", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - }, }, "id": "id237", }, @@ -15839,17 +15839,18 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id204": Delta { + "removed": {}, + "updated": { + "id204": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -15880,7 +15881,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "isDeleted": true, }, }, - "id205": Delta { + "id205": { "deleted": { "angle": 0, "autoResize": true, @@ -15920,7 +15921,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "isDeleted": true, }, }, - "id206": Delta { + "id206": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -15952,11 +15953,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": {}, }, "id": "id208", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -15969,14 +15969,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id211", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -15989,14 +15989,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id214", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -16009,11 +16009,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id204": Delta { + "removed": { + "id204": { "deleted": { "boundElements": [ { @@ -16026,7 +16025,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "boundElements": [], }, }, - "id205": Delta { + "id205": { "deleted": { "containerId": "id204", "height": 25, @@ -16047,10 +16046,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, + "updated": {}, }, "id": "id216", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -16067,10 +16067,38 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id217": Delta { + "id204": { + "deleted": { + "boundElements": [ + { + "id": "id217", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id206": { + "deleted": { + "boundElements": [ + { + "id": "id217", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + "updated": { + "id217": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -16128,34 +16156,6 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": { - "id204": Delta { - "deleted": { - "boundElements": [ - { - "id": "id217", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - "id206": Delta { - "deleted": { - "boundElements": [ - { - "id": "id217", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - }, }, "id": "id221", }, @@ -16460,17 +16460,18 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id241": Delta { + "removed": {}, + "updated": { + "id241": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -16501,7 +16502,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "isDeleted": true, }, }, - "id242": Delta { + "id242": { "deleted": { "angle": 0, "autoResize": true, @@ -16541,7 +16542,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "isDeleted": true, }, }, - "id243": Delta { + "id243": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -16573,11 +16574,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": {}, }, "id": "id262", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -16590,14 +16590,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id263", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -16610,14 +16610,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id264", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -16630,11 +16630,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id241": Delta { + "removed": { + "id241": { "deleted": { "boundElements": [ { @@ -16647,7 +16646,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "boundElements": [], }, }, - "id242": Delta { + "id242": { "deleted": { "containerId": "id241", "height": 25, @@ -16668,10 +16667,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, + "updated": {}, }, "id": "id265", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -16688,10 +16688,38 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id254": Delta { + "id241": { + "deleted": { + "boundElements": [ + { + "id": "id254", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id243": { + "deleted": { + "boundElements": [ + { + "id": "id254", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + "updated": { + "id254": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -16749,34 +16777,6 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": { - "id241": Delta { - "deleted": { - "boundElements": [ - { - "id": "id254", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - "id243": Delta { - "deleted": { - "boundElements": [ - { - "id": "id254", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - }, }, "id": "id266", }, @@ -17077,7 +17077,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -17090,28 +17090,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id267": Delta { - "deleted": { - "isDeleted": false, - }, - "inserted": { - "isDeleted": true, - }, - }, - "id268": Delta { - "deleted": { - "isDeleted": false, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": { - "id280": Delta { + "id280": { "deleted": { "points": [ [ @@ -17145,6 +17127,24 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, + "updated": { + "id267": { + "deleted": { + "isDeleted": false, + }, + "inserted": { + "isDeleted": true, + }, + }, + "id268": { + "deleted": { + "isDeleted": false, + }, + "inserted": { + "isDeleted": true, + }, + }, + }, }, "id": "id288", }, @@ -17153,17 +17153,18 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id267": Delta { + "removed": {}, + "updated": { + "id267": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -17194,7 +17195,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "isDeleted": true, }, }, - "id268": Delta { + "id268": { "deleted": { "angle": 0, "autoResize": true, @@ -17234,7 +17235,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "isDeleted": true, }, }, - "id269": Delta { + "id269": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -17266,11 +17267,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": {}, }, "id": "id271", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -17283,14 +17283,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id274", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -17303,14 +17303,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id277", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -17323,11 +17323,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id267": Delta { + "removed": { + "id267": { "deleted": { "boundElements": [ { @@ -17340,7 +17339,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "boundElements": [], }, }, - "id268": Delta { + "id268": { "deleted": { "containerId": "id267", "height": 25, @@ -17361,10 +17360,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, + "updated": {}, }, "id": "id279", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -17377,14 +17377,42 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "selectedElementIds": { "id267": true, }, - "selectedLinearElementId": null, + "selectedLinearElementId": null, + }, + }, + }, + "elementsChange": { + "added": {}, + "removed": { + "id267": { + "deleted": { + "boundElements": [ + { + "id": "id280", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id269": { + "deleted": { + "boundElements": [ + { + "id": "id280", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, }, }, - }, - "elementsChange": ElementsChange { - "added": {}, - "removed": { - "id280": Delta { + "updated": { + "id280": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -17442,38 +17470,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": { - "id267": Delta { - "deleted": { - "boundElements": [ - { - "id": "id280", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - "id269": Delta { - "deleted": { - "boundElements": [ - { - "id": "id280", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - }, }, "id": "id282", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -17490,7 +17490,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, @@ -17797,7 +17797,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] redo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -17811,36 +17811,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id289": Delta { - "deleted": { - "isDeleted": false, - }, - "inserted": { - "isDeleted": true, - }, - }, - "id290": Delta { - "deleted": { - "isDeleted": false, - }, - "inserted": { - "isDeleted": true, - }, - }, - "id291": Delta { - "deleted": { - "isDeleted": false, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": { - "id302": Delta { + "id302": { "deleted": { "endBinding": { "elementId": "id291", @@ -17881,6 +17855,32 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, + "updated": { + "id289": { + "deleted": { + "isDeleted": false, + }, + "inserted": { + "isDeleted": true, + }, + }, + "id290": { + "deleted": { + "isDeleted": false, + }, + "inserted": { + "isDeleted": true, + }, + }, + "id291": { + "deleted": { + "isDeleted": false, + }, + "inserted": { + "isDeleted": true, + }, + }, + }, }, "id": "id313", }, @@ -17889,17 +17889,18 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id289": Delta { + "removed": {}, + "updated": { + "id289": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -17930,7 +17931,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "isDeleted": true, }, }, - "id290": Delta { + "id290": { "deleted": { "angle": 0, "autoResize": true, @@ -17970,7 +17971,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "isDeleted": true, }, }, - "id291": Delta { + "id291": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -18002,11 +18003,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": {}, }, "id": "id293", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18019,14 +18019,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id296", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18039,14 +18039,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id299", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18059,11 +18059,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id289": Delta { + "removed": { + "id289": { "deleted": { "boundElements": [ { @@ -18076,7 +18075,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "boundElements": [], }, }, - "id290": Delta { + "id290": { "deleted": { "containerId": "id289", "height": 25, @@ -18097,10 +18096,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, + "updated": {}, }, "id": "id301", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18117,10 +18117,38 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": { - "id302": Delta { + "id289": { + "deleted": { + "boundElements": [ + { + "id": "id302", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id291": { + "deleted": { + "boundElements": [ + { + "id": "id302", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + "updated": { + "id302": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -18178,38 +18206,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "updated": { - "id289": Delta { - "deleted": { - "boundElements": [ - { - "id": "id302", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - "id291": Delta { - "deleted": { - "boundElements": [ - { - "id": "id302", - "type": "arrow", - }, - ], - }, - "inserted": { - "boundElements": [], - }, - }, - }, }, "id": "id304", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18226,14 +18226,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id307", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18246,7 +18246,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, @@ -18474,7 +18474,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements' exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18487,10 +18487,11 @@ exports[`history > singleplayer undo/redo > should support changes in elements' }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id181": Delta { + "removed": {}, + "updated": { + "id181": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -18522,11 +18523,10 @@ exports[`history > singleplayer undo/redo > should support changes in elements' }, }, }, - "updated": {}, }, "id": "id183", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18541,10 +18541,11 @@ exports[`history > singleplayer undo/redo > should support changes in elements' }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id184": Delta { + "removed": {}, + "updated": { + "id184": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -18576,11 +18577,10 @@ exports[`history > singleplayer undo/redo > should support changes in elements' }, }, }, - "updated": {}, }, "id": "id186", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18595,10 +18595,11 @@ exports[`history > singleplayer undo/redo > should support changes in elements' }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id187": Delta { + "removed": {}, + "updated": { + "id187": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -18630,22 +18631,20 @@ exports[`history > singleplayer undo/redo > should support changes in elements' }, }, }, - "updated": {}, }, "id": "id189", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id187": Delta { + "removed": { + "id187": { "deleted": { "index": "a0V", }, @@ -18654,10 +18653,11 @@ exports[`history > singleplayer undo/redo > should support changes in elements' }, }, }, + "updated": {}, }, "id": "id193", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18672,14 +18672,14 @@ exports[`history > singleplayer undo/redo > should support changes in elements' }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id196", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -18692,25 +18692,24 @@ exports[`history > singleplayer undo/redo > should support changes in elements' }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id199", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id181": Delta { + "removed": { + "id181": { "deleted": { "index": "a2", }, @@ -18718,7 +18717,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements' "index": "Zz", }, }, - "id187": Delta { + "id187": { "deleted": { "index": "a3", }, @@ -18727,6 +18726,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements' }, }, }, + "updated": {}, }, "id": "id203", }, @@ -19061,7 +19061,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -19079,10 +19079,11 @@ exports[`history > singleplayer undo/redo > should support duplication of groups }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id158": Delta { + "removed": {}, + "updated": { + "id158": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -19115,7 +19116,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups "isDeleted": true, }, }, - "id159": Delta { + "id159": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -19149,11 +19150,10 @@ exports[`history > singleplayer undo/redo > should support duplication of groups }, }, }, - "updated": {}, }, "id": "id162", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -19176,10 +19176,11 @@ exports[`history > singleplayer undo/redo > should support duplication of groups }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id158_copy_copy": Delta { + "removed": {}, + "updated": { + "id158_copy_copy": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -19212,7 +19213,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups "isDeleted": true, }, }, - "id159_copy_copy": Delta { + "id159_copy_copy": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -19246,7 +19247,6 @@ exports[`history > singleplayer undo/redo > should support duplication of groups }, }, }, - "updated": {}, }, "id": "id180", }, @@ -19468,7 +19468,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -19481,10 +19481,11 @@ exports[`history > singleplayer undo/redo > should support element creation, del }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id88": Delta { + "removed": {}, + "updated": { + "id88": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -19516,11 +19517,10 @@ exports[`history > singleplayer undo/redo > should support element creation, del }, }, }, - "updated": {}, }, "id": "id111", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -19535,10 +19535,11 @@ exports[`history > singleplayer undo/redo > should support element creation, del }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id91": Delta { + "removed": {}, + "updated": { + "id91": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -19570,11 +19571,10 @@ exports[`history > singleplayer undo/redo > should support element creation, del }, }, }, - "updated": {}, }, "id": "id112", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -19589,10 +19589,11 @@ exports[`history > singleplayer undo/redo > should support element creation, del }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id94": Delta { + "removed": {}, + "updated": { + "id94": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -19624,11 +19625,10 @@ exports[`history > singleplayer undo/redo > should support element creation, del }, }, }, - "updated": {}, }, "id": "id113", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -19643,14 +19643,14 @@ exports[`history > singleplayer undo/redo > should support element creation, del }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id114", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -19663,14 +19663,14 @@ exports[`history > singleplayer undo/redo > should support element creation, del }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id115", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -19684,9 +19684,9 @@ exports[`history > singleplayer undo/redo > should support element creation, del }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": { - "id91": Delta { + "id91": { "deleted": { "isDeleted": true, }, @@ -19694,7 +19694,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del "isDeleted": false, }, }, - "id94": Delta { + "id94": { "deleted": { "isDeleted": true, }, @@ -20344,7 +20344,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] undo stack 1`] = ` [ - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -20357,10 +20357,11 @@ exports[`history > singleplayer undo/redo > should support linear element creati }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": { - "id117": Delta { + "removed": {}, + "updated": { + "id117": { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -20411,22 +20412,20 @@ exports[`history > singleplayer undo/redo > should support linear element creati }, }, }, - "updated": {}, }, "id": "id140", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id117": Delta { + "removed": { + "id117": { "deleted": { "lastCommittedPoint": [ 20, @@ -20467,10 +20466,11 @@ exports[`history > singleplayer undo/redo > should support linear element creati }, }, }, + "updated": {}, }, "id": "id141", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -20481,14 +20481,14 @@ exports[`history > singleplayer undo/redo > should support linear element creati }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id142", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -20499,25 +20499,24 @@ exports[`history > singleplayer undo/redo > should support linear element creati }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, }, "id": "id143", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": {}, "inserted": {}, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, - "removed": {}, - "updated": { - "id117": Delta { + "removed": { + "id117": { "deleted": { "height": 20, "points": [ @@ -20554,10 +20553,11 @@ exports[`history > singleplayer undo/redo > should support linear element creati }, }, }, + "updated": {}, }, "id": "id144", }, - StoreIncrement { + { "appStateChange": AppStateChange { "delta": Delta { "deleted": { @@ -20568,7 +20568,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati }, }, }, - "elementsChange": ElementsChange { + "elementsChange": { "added": {}, "removed": {}, "updated": {}, diff --git a/packages/excalidraw/tests/history.test.tsx b/packages/excalidraw/tests/history.test.tsx index 3074abaf2..f8957766c 100644 --- a/packages/excalidraw/tests/history.test.tsx +++ b/packages/excalidraw/tests/history.test.tsx @@ -64,8 +64,45 @@ const checkpoint = (name: string) => { ...strippedAppState } = h.state; expect(strippedAppState).toMatchSnapshot(`[${name}] appState`); - expect(h.history.undoStack).toMatchSnapshot(`[${name}] undo stack`); - expect(h.history.redoStack).toMatchSnapshot(`[${name}] redo stack`); + + const stripSeed = (deltas: Record) => + Object.entries(deltas).reduce((acc, curr) => { + const { inserted, deleted, ...rest } = curr[1]; + + delete inserted.seed; + delete deleted.seed; + + acc[curr[0]] = { + inserted, + deleted, + ...rest, + }; + + return acc; + }, {} as Record); + + expect( + h.history.undoStack.map((x) => ({ + ...x, + elementsChange: { + ...x.elementsChange, + added: stripSeed(x.elementsChange.added), + removed: stripSeed(x.elementsChange.updated), + updated: stripSeed(x.elementsChange.removed), + }, + })), + ).toMatchSnapshot(`[${name}] undo stack`); + expect( + h.history.redoStack.map((x) => ({ + ...x, + elementsChange: { + ...x.elementsChange, + added: stripSeed(x.elementsChange.added), + removed: stripSeed(x.elementsChange.updated), + updated: stripSeed(x.elementsChange.removed), + }, + })), + ).toMatchSnapshot(`[${name}] redo stack`); expect(h.elements.length).toMatchSnapshot(`[${name}] number of elements`); h.elements .map(({ seed, versionNonce, ...strippedElement }) => strippedElement)