aboutsummaryrefslogtreecommitdiffstats
path: root/packages/excalidraw/tests/__snapshots__
diff options
context:
space:
mode:
authorkj_sh6042026-03-15 16:19:35 -0400
committerkj_sh6042026-03-15 16:19:35 -0400
commit6ec259a0e71174651bae95d4628138bf6fd68742 (patch)
tree5e33c6a5ec091ecabfcb257fdc7b6a88ed8754ac /packages/excalidraw/tests/__snapshots__
parent16c8578b15c727f22921f8a80a56ee4d4e7f2272 (diff)
refactor: packages/
Diffstat (limited to 'packages/excalidraw/tests/__snapshots__')
-rw-r--r--packages/excalidraw/tests/__snapshots__/App.test.tsx.snap50
-rw-r--r--packages/excalidraw/tests/__snapshots__/MermaidToExcalidraw.test.tsx.snap19
-rw-r--r--packages/excalidraw/tests/__snapshots__/MobileMenu.test.tsx.snap257
-rw-r--r--packages/excalidraw/tests/__snapshots__/charts.test.tsx.snap20
-rw-r--r--packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap9977
-rw-r--r--packages/excalidraw/tests/__snapshots__/dragCreate.test.tsx.snap210
-rw-r--r--packages/excalidraw/tests/__snapshots__/excalidraw.test.tsx.snap654
-rw-r--r--packages/excalidraw/tests/__snapshots__/export.test.tsx.snap11
-rw-r--r--packages/excalidraw/tests/__snapshots__/history.test.tsx.snap20131
-rw-r--r--packages/excalidraw/tests/__snapshots__/linearElementEditor.test.tsx.snap57
-rw-r--r--packages/excalidraw/tests/__snapshots__/move.test.tsx.snap239
-rw-r--r--packages/excalidraw/tests/__snapshots__/multiPointCreate.test.tsx.snap114
-rw-r--r--packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap14782
-rw-r--r--packages/excalidraw/tests/__snapshots__/selection.test.tsx.snap202
14 files changed, 46723 insertions, 0 deletions
diff --git a/packages/excalidraw/tests/__snapshots__/App.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/App.test.tsx.snap
new file mode 100644
index 0000000..49c2fd0
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/App.test.tsx.snap
@@ -0,0 +1,50 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`Test <App/> > should show error modal when using brave and measureText API is not working 1`] = `
+<div
+ data-testid="brave-measure-text-error"
+>
+ <p>
+ Looks like you are using Brave browser with the
+ <span
+ style="font-weight: 600;"
+ >
+ Aggressively Block Fingerprinting
+ </span>
+ setting enabled.
+ </p>
+ <p>
+ This could result in breaking the
+ <span
+ style="font-weight: 600;"
+ >
+ Text Elements
+ </span>
+ in your drawings.
+ </p>
+ <p>
+ We strongly recommend disabling this setting. You can follow
+ <a
+ href="http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser"
+ >
+ these steps
+ </a>
+ on how to do so.
+ </p>
+ <p>
+ If disabling this setting doesn't fix the display of text elements, please open an
+ <a
+ href="https://github.com/excalidraw/excalidraw/issues/new"
+ >
+ issue
+ </a>
+ on our GitHub, or write us on
+ <a
+ href="https://discord.gg/UexuTaE"
+ >
+ Discord
+ .
+ </a>
+ </p>
+</div>
+`;
diff --git a/packages/excalidraw/tests/__snapshots__/MermaidToExcalidraw.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/MermaidToExcalidraw.test.tsx.snap
new file mode 100644
index 0000000..2943aee
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/MermaidToExcalidraw.test.tsx.snap
@@ -0,0 +1,19 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`Test <MermaidToExcalidraw/> > should open mermaid popup when active tool is mermaid 1`] = `
+"<div class="Modal Dialog ttd-dialog" role="dialog" aria-modal="true" aria-labelledby="dialog-title" data-prevent-outside-click="true"><div class="Modal__background"></div><div class="Modal__content" style="--max-width: 1200px;" tabindex="0"><div class="Island"><div class="Dialog__content"><div dir="ltr" data-orientation="horizontal" class="ttd-dialog-tabs-root"><p class="dialog-mermaid-title">Mermaid to Excalidraw</p><div data-state="active" data-orientation="horizontal" role="tabpanel" aria-labelledby="radix-:r0:-trigger-mermaid" id="radix-:r0:-content-mermaid" tabindex="0" class="ttd-dialog-content" style=""><div class="ttd-dialog-desc">Currently only <a href="https://mermaid.js.org/syntax/flowchart.html">Flowchart</a>,<a href="https://mermaid.js.org/syntax/sequenceDiagram.html"> Sequence, </a> and <a href="https://mermaid.js.org/syntax/classDiagram.html">Class </a>Diagrams are supported. The other types will be rendered as image in Excalidraw.</div><div class="ttd-dialog-panels"><div class="ttd-dialog-panel"><div class="ttd-dialog-panel__header"><label>Mermaid Syntax</label></div><textarea class="ttd-dialog-input" placeholder="Write Mermaid diagram defintion here...">flowchart TD
+ A[Christmas] --&gt;|Get money| B(Go shopping)
+ B --&gt; C{Let me think}
+ C --&gt;|One| D[Laptop]
+ C --&gt;|Two| E[iPhone]
+ C --&gt;|Three| F[Car]</textarea><div class="ttd-dialog-panel-button-container invisible" style="display: flex; align-items: center;"><button type="button" class="excalidraw-button ttd-dialog-panel-button"><div class=""></div></button></div></div><div class="ttd-dialog-panel"><div class="ttd-dialog-panel__header"><label>Preview</label></div><div class="ttd-dialog-output-wrapper"><div style="opacity: 1;" class="ttd-dialog-output-canvas-container"><canvas width="89" height="158" dir="ltr"></canvas></div></div><div class="ttd-dialog-panel-button-container" style="display: flex; align-items: center;"><button type="button" class="excalidraw-button ttd-dialog-panel-button"><div class="">Insert<span><svg aria-hidden="true" focusable="false" role="img" viewBox="0 0 20 20" class="" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><g stroke-width="1.25"><path d="M4.16602 10H15.8327"></path><path d="M12.5 13.3333L15.8333 10"></path><path d="M12.5 6.66666L15.8333 9.99999"></path></g></svg></span></div></button><div class="ttd-dialog-submit-shortcut"><div class="ttd-dialog-submit-shortcut__key">Ctrl</div><div class="ttd-dialog-submit-shortcut__key">Enter</div></div></div></div></div></div></div></div></div></div></div>"
+`;
+
+exports[`Test <MermaidToExcalidraw/> > should show error in preview when mermaid library throws error 1`] = `
+"flowchart TD
+ A[Christmas] -->|Get money| B(Go shopping)
+ B --> C{Let me think}
+ C -->|One| D[Laptop]
+ C -->|Two| E[iPhone]
+ C -->|Three| F[Car]"
+`;
diff --git a/packages/excalidraw/tests/__snapshots__/MobileMenu.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/MobileMenu.test.tsx.snap
new file mode 100644
index 0000000..ad0c9f0
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/MobileMenu.test.tsx.snap
@@ -0,0 +1,257 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`Test MobileMenu > should initialize with welcome screen and hide once user interacts 1`] = `
+<div
+ class="welcome-screen-center"
+>
+ <div
+ class="welcome-screen-center__logo virgil welcome-screen-decor"
+ >
+ <div
+ class="ExcalidrawLogo is-small"
+ >
+ <svg
+ class="ExcalidrawLogo-icon"
+ fill="none"
+ viewBox="0 0 40 40"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <path
+ d="M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z"
+ fill="currentColor"
+ />
+ </svg>
+ <svg
+ class="ExcalidrawLogo-text"
+ fill="none"
+ viewBox="0 0 450 55"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <path
+ d="M429.27 96.74c2.47-1.39 4.78-3.02 6.83-4.95 1.43-1.35 2.73-2.86 3.81-4.51-.66.9-1.4 1.77-2.23 2.59-2.91 2.84-5.72 5.09-8.42 6.87h.01ZM343.6 69.36c.33 3.13.58 6.27.79 9.4.09 1.37.18 2.75.25 4.12-.12-4.46-.27-8.93-.5-13.39-.11-2.08-.24-4.16-.4-6.24-.06 1.79-.11 3.85-.13 6.11h-.01ZM378.47 98.34c.01-.37.07-1.13.01-6.51-.11 1.9-.22 3.81-.31 5.71-.07 1.42-.22 2.91-.16 4.35.39.03.78.07 1.17.1-.92-.85-.76-2.01-.72-3.66l.01.01ZM344.09 86.12c-.09-2.41-.22-4.83-.39-7.24v12.21c.15-.05.32-.09.47-.14.05-1.61-.03-3.23-.09-4.83h.01ZM440.69 66.79c-.22-.34-.45-.67-.69-.99-3.71-4.87-9.91-7.14-15.65-8.55-1.05-.26-2.12-.49-3.18-.71 2.29.59 4.48 1.26 6.64 2.02 7.19 2.54 10.57 5.41 12.88 8.23ZM305.09 72.46l1.2 3.6c.84 2.53 1.67 5.06 2.46 7.61.24.78.5 1.57.73 2.36.22-.04.44-.08.67-.12a776.9 776.9 0 0 1-5.01-13.57c-.02.04-.03.09-.05.13v-.01ZM345.49 90.25v.31c1.48-.42 3.05-.83 4.66-1.2-1.56.25-3.12.52-4.66.89ZM371.02 90.22c0-.57-.04-1.14-.11-1.71-.06-.02-.12-.04-.19-.05-.21-.05-.43-.08-.65-.11.42.16.74.88.95 1.87ZM398.93 54.23c-.13 0-.27-.01-.4-.02l.03.4c.11-.15.23-.27.37-.38ZM401.57 62.28v-.15c-1.22-.24-2.86-.61-3.23-1.25-.09-.15-.18-.51-.27-.98-.09.37-.2.73-.33 1.09 1.24.56 2.52.98 3.83 1.29ZM421.73 88.68c-2.97 1.65-6.28 3.12-9.69 3.68v.18c4.72-.14 11.63-3.85 16.33-8.38-2.04 1.75-4.33 3.24-6.63 4.53l-.01-.01ZM411.28 80.92c-.05-1.2-.09-2.4-.15-3.6-.21 5.66-.46 11.38-.47 14.51.24-.02.48-.04.71-.07.15-3.61.05-7.23-.09-10.83v-.01Z"
+ transform="translate(-144.023 -51.76)"
+ />
+ <path
+ d="M425.38 67.41c-3.5-1.45-7.19-2.57-14.06-3.62.09 1.97.06 4.88-.03 8.12.03.04.06.09.06.15.19 1.36.28 2.73.37 4.1.25 3.77.39 7.55.41 11.33 0 1.38-.01 2.76-.07 4.13 1.4-.25 2.78-.65 4.12-1.15 4.07-1.5 7.94-3.78 11.28-6.54 2.33-1.92 5.13-4.49 5.88-7.58.63-3.53-2.45-6.68-7.97-8.96l.01.02ZM411.35 92.53v-.06l-.34.03c.11.01.22.03.34.03ZM314.26 64.06c-.23-.59-.47-1.17-.7-1.75.57 1.62 1.11 3.25 1.6 4.9l.15.54 2.35 6.05c.32.82.66 1.64.98 2.46-1.38-4.1-2.83-8.17-4.39-12.2h.01ZM156.82 103.07c-.18.13-.38.23-.58.33 1.32-.03 2.66-.2 3.93-.34.86-.09 1.72-.22 2.58-.33-2.12.1-4.12.17-5.94.34h.01ZM210.14 68.88s.03.04.05.07c.18-.31.39-.64.58-.96-.21.3-.42.6-.64.89h.01ZM201.65 82.8c-.5.77-1.02 1.56-1.49 2.37 1.11-1.55 2.21-3.1 3.2-4.59-.23.23-.49.51-.75.79-.32.47-.65.95-.96 1.43ZM194.03 98.66c-.33-.4-.65-.84-1.05-1.17-.24-.2-.07-.49.17-.56-.23-.26-.42-.5-.63-.75 1.51-2.55 3.93-5.87 6.4-9.28-.17-.08-.29-.28-.2-.49.04-.09.09-.17.13-.26-1.21 1.78-2.42 3.55-3.61 5.33-.87 1.31-1.74 2.64-2.54 4-.29.5-.63 1.04-.87 1.61.81.65 1.63 1.27 2.47 1.88-.09-.11-.18-.21-.27-.32v.01ZM307.79 82.93c-1-3.17-2.05-6.32-3.1-9.48-1.62 4.08-3.69 9.17-6.16 15.19 3.32-1.04 6.77-1.87 10.27-2.5-.32-1.08-.67-2.15-1.01-3.21ZM149.5 80.7c.05-1.71.04-3.43 0-5.14-.1 2.26-.16 4.51-.22 6.77-.02.73-.03 1.46-.04 2.19.14-1.27.2-2.55.24-3.82h.02ZM228.98 98.3c.39 1.25.91 3.03.94 3.91.06-.03.12-.07.17-.1.08-1.29-.55-2.65-1.11-3.81ZM307.72 53.36c.81.5 1.53 1.04 2.07 1.49-.38-.8-.78-1.58-1.21-2.35-.17.03-.34.06-.51.11-.43.12-.86.26-1.29.41.35-.01.53.1.94.34ZM283.69 96.14c3.91-7.25 6.89-13.35 8.88-18.15l1.1-2.66c-1.27 2.64-2.56 5.27-3.83 7.9-1.53 3.15-3.06 6.31-4.58 9.47-.87 1.81-1.76 3.62-2.54 5.47.04.02.07.04.11.07.05.05.1.09.15.14.05-.73.27-1.48.71-2.24ZM289.92 103.23s-.04.01-.05.03c0-.02.04-.03.05-.04.05-.05.11-.1.16-.15l.21-.21c-.55 0-1.5-.27-2.55-.72.4.26.8.51 1.22.74.24.13.48.26.73.37.05.02.1.03.14.05a.27.27 0 0 1 .08-.07h.01ZM269.23 68.49c-.39-.19-.82-.48-1.33-.87-3.06-1.56-6.31-2.78-9.36-2.35-3.5.49-5.7 1.11-7.74 2.44 5.71-2.6 12.82-2.07 18.44.79l-.01-.01ZM177.87 53.69l1.06.03c-.96-.22-2-.25-2.89-.3-4.95-.26-9.99.33-14.86 1.19-2.44.43-4.88.95-7.28 1.59 9.09-1.76 15.69-2.77 23.97-2.51ZM219.85 55.51c-.18.12-.36.27-.56.45-.45.53-.86 1.11-1.26 1.66-1.91 2.61-3.71 5.31-5.57 7.95l-.12.18 8.05-10.11c-.18-.05-.36-.1-.55-.13h.01ZM510.71 54.1c.12-.15.29-.3.53-.45.69-.4 3.72-.63 5.87-.74-.36-.02-.73-.04-1.09-.05-1.84-.03-3.67.09-5.49.35.05.3.12.59.18.88v.01ZM510.76 86.02c1.37-3.07 2.49-6.27 3.57-9.46.55-1.64 1.12-3.3 1.6-4.97-1.59 4.01-3.67 9.14-6.2 15.3.24-.08.5-.14.74-.22.1-.22.19-.44.29-.65ZM566.95 75.76c.11-.02.23.03.31.11-.05-.13-.09-.26-.14-.39-.05.09-.11.18-.17.28ZM511.33 86.41c3.08-.89 6.24-1.62 9.46-2.14-1.51-3.98-2.98-7.96-4.39-11.87-.05.15-.09.31-.14.46-1.02 3.32-2.15 6.61-3.39 9.85-.48 1.25-.98 2.49-1.53 3.7h-.01ZM578.24 74.45c.11-.44.23-.87.35-1.31-.31.7-.64 1.39-.97 2.08.09.21.19.4.28.61.12-.46.23-.92.35-1.38h-.01ZM520.62 53.11c-.09 0-.18-.01-.28-.02.38.34.29 1.08.93 2.53l6.65 17.15c2.2 5.68 4.69 11.36 7.41 16.87l1.06 2.17c-2.95-7.05-5.92-14.08-8.87-21.13-1.58-3.79-3.16-7.59-4.7-11.4-.78-1.92-1.73-3.89-2.25-5.91-.03-.1 0-.19.04-.26h.01ZM578.78 77.87c1.45-5.77 3.07-10.43 3.58-13.36.05-.34.16-.88.31-1.55-.67 1.79-1.37 3.56-2.08 5.33-.12.43-.23.86-.35 1.29-.65 2.43-1.29 4.86-1.9 7.3.14.33.29.65.43 1l.01-.01ZM545.3 94.66c.02-.44.03-.83.05-1.12.02-1.01.05-2.02.11-3.02.03-6.66-.46-14.33-1.46-22.8-.13-.42-.27-1.24-.56-2.89 0-.02 0-.04-.01-.06.62 6.61.95 13.25 1.32 19.87.17 3.08.33 6.16.52 9.23.02.25.03.52.04.78l-.01.01ZM580.77 102.81c.13.2.27.38.37.49.27-.11.53-.22.8-.32-.43.09-.82.05-1.17-.16v-.01ZM530.48 104.07h.33c-.36-.13-.71-.32-1.04-.56.14.24.3.47.45.7.06-.08.14-.13.26-.13v-.01ZM542.63 58.82c.06.23.11.47.15.71.14-.33.36-.62.7-.86-.28.05-.57.11-.85.15ZM583.81 57.87c.15-.7.29-1.41.42-2.11-.14.45-.28.9-.42 1.34-.46 1.44-.89 2.89-1.31 4.34.44-1.19.88-2.37 1.31-3.57ZM523.62 91.48c-4.66 1.17-9.05 2.89-14.02 5.27 4.65-1.84 9.48-3.29 14.28-4.63-.09-.22-.17-.41-.26-.64ZM460.64 78.3c-.04-2.9-.11-5.81-.28-8.71-.1-1.68-.17-3.43-.5-5.09-.07.02-.14.03-.2.05.3 6.54.45 12.17.51 17.12.17-.07.34-.14.51-.2 0-1.06-.01-2.11-.03-3.17h-.01ZM470.63 63.24c-3.38-.26-6.81.32-10.1 1.1.41 2.01.47 4.14.57 6.18.18 3.55.25 7.11.27 10.67 3.31-1.38 6.5-3.12 9.3-5.35 1.96-1.56 3.86-3.41 5.02-5.66.73-1.41 1.19-3.22.26-4.65-1.09-1.7-3.46-2.14-5.32-2.29ZM460.29 63.68c1-.24 2.01-.46 3.04-.65-1.15.16-2.37.38-3.71.69v.13c.07-.02.15-.04.22-.05.11-.13.3-.18.45-.11v-.01ZM457.24 100.96c.43-.03.86-.07 1.29-.11.14-.49.27-.99.38-1.49-.44.7-1 1.23-1.67 1.6ZM482.88 104.98c-.18.23-.36.38-.55.47.14.09.27.19.4.28a70.76 70.76 0 0 0 4.37-4.63c.76-.89 1.52-1.81 2.19-2.77-.3-.27-.61-.53-.92-.79-.07 1.94-4.62 6.32-5.49 7.45v-.01Z"
+ transform="translate(-144.023 -51.76)"
+ />
+ <path
+ d="M474.36 63.31c-.4-.16-.84-.27-1.29-.37 1.56.42 3.08 1.22 3.76 2.74.62 1.4.32 2.95-.28 4.32.7-1.22.94-2.34.74-3.47-.24-1.33-1.19-2.54-2.93-3.21v-.01ZM477.34 89.18c-1.2-.81-2.4-1.62-3.6-2.42-.14.1-.26.19-.4.29 1.4.67 2.73 1.39 4 2.13ZM465.88 93.85c.37.25.74.5 1.1.75.46.32.92.65 1.38.97-1.57-1.2-2.01-1.61-2.49-1.72h.01ZM574.92 90.06c-2.28-5.21-4.93-11.13-5.67-12.26-.1-.15-1.57-3.01-1.63-3.08 0 0-.01.02-.02.02.4 1.37 1.09 2.69 1.65 3.99 2.14 4.95 4.36 9.86 6.67 14.73.6 1.26 1.21 2.52 1.83 3.78-.75-2.01-1.64-4.45-2.83-7.18ZM448.73 65.29c.1.2.22.38.34.57.22-.02.43-.06.65-.08v-.08c-.14-.05-.25 0-.99-.41ZM460.16 94.81c-.02.31-.06.59-.1.89-.03 1.71-.33 3.43-.79 5.07.15-.02.3-.03.45-.05.01-.04.02-.08.03-.11.09-.34.15-.69.2-1.03.17-1.07.25-2.16.33-3.24.05-.69.08-1.39.12-2.08-.27.1-.27.26-.24.57v-.02Z"
+ transform="translate(-144.023 -51.76)"
+ />
+ <path
+ d="m328.67 98.12-3.22-6.58c-1.29-2.63-2.53-5.29-3.72-7.97-.25-.85-.52-1.69-.79-2.53-.81-2.57-1.67-5.12-2.55-7.67-1.92-5.53-3.9-11.08-6.32-16.41-.72-1.58-1.46-3.44-2.63-4.79-.03-.17-.16-.29-.34-.36a.282.282 0 0 0-.23-.04c-.06-.01-.12 0-.18.01-.74.06-1.5.38-2.19.61-2.22.77-4.4 1.64-6.63 2.38-.03-.08-.06-.16-.09-.25-.15-.42-.82-.24-.67.19.03.09.07.19.1.28l-.18.06c-.36.11-.28.6 0 .68.18 1.18.63 2.36.98 3.49.03.09.06.17.08.26-.08.23-.17.46-.24.64-.37.98-.79 1.94-1.21 2.9-1.27 2.89-2.62 5.75-3.98 8.6-3.18 6.67-6.44 13.31-9.64 19.97-1.08 2.25-2.2 4.5-3.15 6.81-.13.32.24.5.5.37 1.34 1.33 2.84 2.5 4.4 3.57.65.44 1.31.87 2.01 1.24.4.22.86.48 1.33.5.24.01.35-.19.33-.37.11-.1.21-.21.28-.28.41-.41.81-.84 1.2-1.26.85-.92 1.69-1.87 2.5-2.84 6.31-2.34 12.6-4.31 18.71-5.84 2.14 5.3 3.43 8.43 3.97 9.58.55 1.05 1.15 1.88 1.82 2.52 1.32.56 6.96-.03 9.23-1.96.87-1.28 1.19-2.67.93-4.15-.09-.5-.22-.95-.4-1.33l-.01-.03Zm-20.09-45.61c.43.77.83 1.56 1.21 2.35-.54-.45-1.27-.99-2.07-1.49-.42-.24-.6-.35-.94-.34.43-.15.85-.29 1.29-.41.17-.05.34-.08.51-.11Zm-25.86 45.66c.78-1.85 1.67-3.66 2.54-5.47 1.51-3.16 3.05-6.31 4.58-9.47 1.28-2.63 2.56-5.26 3.83-7.9l-1.1 2.66c-1.99 4.79-4.97 10.9-8.88 18.15-.43.76-.66 1.51-.71 2.24-.05-.05-.1-.09-.15-.14a.259.259 0 0 0-.11-.07Zm6.24 4.71c-.42-.23-.82-.48-1.22-.74 1.05.45 2 .72 2.55.72l-.21.21c-.05.05-.11.1-.16.15-.01.01-.04.03-.05.04 0-.02.03-.02.05-.03a.27.27 0 0 0-.08.07c-.05-.02-.1-.03-.14-.05-.25-.1-.49-.24-.73-.37h-.01Zm15.73-29.43c1.05 3.15 2.1 6.31 3.1 9.48.34 1.06.69 2.13 1.01 3.21-3.5.63-6.95 1.46-10.27 2.5 2.48-6.03 4.54-11.11 6.16-15.19Zm4.79 12.57c-.23-.79-.49-1.58-.73-2.36-.79-2.54-1.63-5.08-2.46-7.61l-1.2-3.6c.02-.04.04-.09.05-.13 1.6 4.45 3.28 9 5.01 13.57l-.67.12v.01Zm5.83-18.27-.15-.54c-.49-1.64-1.03-3.28-1.6-4.9.23.58.47 1.17.7 1.75 1.56 4.03 3.01 8.1 4.39 12.2-.33-.82-.67-1.64-.98-2.46l-2.35-6.05h-.01ZM390.43 79.37c-.13-10.43-.22-17.5-.24-19.97-.24-1.6.21-2.88-.65-3.65-.14-.13-.32-.23-.52-.32h.03c.45 0 .45-.69 0-.7-1.75-.03-3.5-.04-5.25-.14-1.38-.08-2.76-.21-4.15-.31-.07 0-.12.01-.17.04-.21-.07-.47.03-.45.31l.03.45c-.11.14-.19.3-.22.5-.21 1.26-.32 13.67-.36 23.59-.32 5.79-.67 11.57-.97 17.36-.09 1.73-.29 3.54-.21 5.3-.39.02-.38.64.04.69v.12c.05.44.74.45.7 0v-.06c1.1.09 2.2.21 3.3.3 1.14.19 2.44.2 3.29.17 1.73-.05 2.92-.05 3.8-.37.45-.05.9-.11 1.35-.17.44-.06.25-.73-.19-.67h-.01c.24-.32.45-.72.62-1.25.66-1.84.41-6.36.34-11.33l-.13-9.9.02.01Zm-12.26 18.17c.09-1.91.2-3.81.31-5.71.06 5.38 0 6.14-.01 6.51-.05 1.65-.21 2.81.72 3.66-.39-.04-.78-.07-1.17-.1-.06-1.44.09-2.93.16-4.35l-.01-.01ZM588.97 53.85c-2.06-.25-3.17-.51-3.76-.6a.3.3 0 0 1 .04-.08c.22-.39-.39-.75-.6-.35-.56 1.02-.9 2.19-1.26 3.29-.61 1.88-1.17 3.78-1.72 5.68-.63 2.19-1.24 4.39-1.83 6.59-.81 2.03-1.67 4.05-2.61 6.03-1.7-3.64-3.11-6.04-4.03-7.57-2.26-3.74-2.85-5.48-3.57-6.08l.31-.09c.43-.12.25-.8-.19-.67-1.06.3-2.12.6-3.17.95-.93.32-1.85.69-2.76 1.07-.13.05-.19.16-.22.27-.04.02-.08.05-.11.07-.04-.06-.07-.12-.11-.18a.354.354 0 0 0-.48-.12c-.16.09-.22.32-.13.48l.33.54c0 .09.02.18.06.28.51 1.16.78 1.38.72 1.47-2.42 3.44-5.41 7.86-6.2 9.1-1.27 1.97-2.01 3.14-2.45 3.84l-.91-6.56-.43-4.1c-.19-1.85-.37-3.23-.53-4.13-.19-1.1-.3-2.15-.45-3.16-.2-1.36-.29-2.06-.47-2.42h.04c.45.02.45-.68 0-.7-3.43-.16-6.81.94-10.17 1.48-.24-.22-.73-.04-.58.32.24.59.33 1.25.43 1.87.17 1.06.29 2.13.4 3.2.32 3.09.53 6.2.74 9.3.44 6.75.77 13.51 1.17 20.26.11 1.95.13 3.96.46 5.89.05.3.37.31.55.14.74 1.71 2.87 1.27 6.13 1.27 1.34 0 2.39.04 2.99-.11.02.32.48.53.63.18 3.61-8.26 7.41-16.46 12.05-24.2.03-.05.04-.1.05-.15.3.73.64 1.45.94 2.16.97 2.26 1.97 4.52 2.98 6.76 2.26 5.03 4.54 10.07 7.09 14.96.47.9.94 1.79 1.47 2.65.2.32.4.67.66.96-.18.25 0 .68.34.54.91-.38 1.82-.75 2.76-1.07 1.04-.35 2.11-.65 3.17-.95.39-.11.28-.66-.07-.68.62-.4.95-.96.87-1.91-.3-3.34.72-7.47.86-8.52l2.14-11.43c1.75-10.74 3.13-17.51 3.23-20.86.02-.49.08-2.84.13-3.24.17-1.25.48-1-4.96-1.65l.03-.02Zm-46.19 5.67c-.04-.24-.09-.48-.15-.71l.85-.15c-.34.24-.56.53-.7.86Zm1.95 25.12c-.36-6.63-.7-13.26-1.32-19.87 0 .02 0 .04.01.06.29 1.65.44 2.47.56 2.89 1 8.46 1.5 16.14 1.46 22.8-.06.99-.1 2-.11 3.02-.01.29-.03.68-.05 1.12-.01-.26-.03-.53-.04-.78-.19-3.08-.35-6.16-.52-9.23l.01-.01Zm36.4 18.66c-.11-.11-.24-.29-.37-.49.35.21.74.26 1.17.16-.27.11-.53.22-.8.32v.01Zm-.89-33.72c.12-.43.23-.86.35-1.29.71-1.77 1.41-3.55 2.08-5.33-.15.68-.26 1.22-.31 1.55-.5 2.94-2.13 7.59-3.58 13.36-.15-.35-.29-.66-.43-1 .61-2.44 1.25-4.87 1.9-7.3l-.01.01Zm3.56-12.48c.14-.44.28-.89.42-1.34-.13.7-.27 1.41-.42 2.11-.43 1.19-.86 2.38-1.31 3.57.42-1.45.85-2.9 1.31-4.34Zm-5.22 16.05c-.11.44-.23.87-.35 1.31-.12.46-.23.92-.35 1.38-.1-.22-.19-.4-.28-.61.34-.69.66-1.38.97-2.08h.01Zm-11.64 2.62c.06-.1.12-.19.17-.28.05.13.09.26.14.39a.398.398 0 0 0-.31-.11Zm2.3 2.98c-.56-1.3-1.25-2.63-1.65-3.99 0 0 .01-.02.02-.02.06.08 1.52 2.93 1.63 3.08.73 1.13 3.38 7.04 5.67 12.26 1.2 2.73 2.08 5.17 2.83 7.18-.62-1.25-1.23-2.51-1.83-3.78-2.31-4.87-4.53-9.78-6.67-14.73ZM275.92 87.03c-1.06-2.18-1.13-3.45-2.44-2.93-1.52.57-2.94 1.3-4.5 2.1-1.4.72-2.68 1.44-3.92 2.12.01-.25-.24-.5-.51-.34-4.8 2.93-12.41 4.7-17.28 1.31-1.98-1.77-3.32-4.15-3.97-5.78-.29-.95-.49-1.94-.63-2.93-.14-3.34 1.58-6.53 3.9-9.12.8-.79 1.68-1.51 2.66-2.12 3.7-2.3 8.22-3.07 12.51-2.51 2.71.35 5.32 1.24 7.71 2.55.39.22.75-.39.35-.6-.18-.1-.37-.18-.55-.27.56.27 1.03.33 1.51.19l-.48.39c-.15.11-.23.3-.13.48.09.15.33.24.48.13 1.3-.97 2.46-2.09 3.45-3.37.37-.29.64-.6.65-.97v-.02c.08-.33-.03-.7-.21-1.08-.31-.87-.98-2.01-2.19-3.26-2.43-2.52-3.79-3.45-5.68-4.26-1.14-.49-3.12-1.06-4.42-1.23-3.28-.42-10.64-1.21-18.18 4.11-7.74 5.46-11.94 12.3-12.23 20.61-.08 2.06.04 3.98.34 5.71.74 4.18 2.57 8 5.44 11.34 4.26 4.99 9.76 7.52 16.34 7.52 4.85 0 9.69-1.77 14.89-4.62.23-.12.45-.23.68-.35 2.19-1.1 4.37-2.23 6.46-3.5.49-.3 1.03-.61 1.5-.98 1.47-.87 1.11-1.12.49-2.95-.39-1.14-.76-2.7-2.06-5.36l.02-.01Zm-17.38-21.76c3.05-.42 6.31.79 9.36 2.35.51.39.94.68 1.33.87-5.61-2.86-12.72-3.39-18.44-.79 2.05-1.33 4.24-1.95 7.74-2.44l.01.01ZM443.67 72.67c-.4-2.2-1.15-4.33-2.37-6.22-1.49-2.32-3.58-4.19-5.91-5.64-6.17-3.81-13.75-5.11-20.83-6.01-3.23-.41-6.47-.69-9.72-.92l-1.39-.12c-.85-.07-1.52-.1-2.05-.1-1.08-.06-2.17-.12-3.25-.17-.08 0-.14.02-.19.05-.1.05-.18.14-.16.3.27 2.55-.01 5.12-.92 7.52-.15.38.4.56.62.28 1.32.59 2.68 1.05 4.08 1.37 0 2.78-.14 7.58-.33 12.91 0 0 0 .02-.01.03-.61 3.66-.79 7.42-1 11.12-.23 4.01-.43 8.03-.44 12.05 0 .64 0 1.28.03 1.93.02.31 0 .68.15.96.06.11.14.16.24.17-.2.17-.21.54.11.59 3.83.67 7.78.71 11.68.25 2.3-.19 4.87-.65 7.65-1.56 1.85-.54 3.67-1.18 5.43-1.91 7.2-3.02 14.31-8.07 17.35-15.53.76-1.86 1.17-3.8 1.31-5.75.3-1.93.28-3.82-.09-5.58l.01-.02Zm-19.32-15.42c5.74 1.41 11.94 3.68 15.65 8.55.25.32.47.65.69.99-2.3-2.82-5.68-5.69-12.88-8.23-2.16-.76-4.35-1.43-6.64-2.02 1.06.21 2.13.45 3.18.71Zm-25.82-3.04c.13 0 .27.01.4.02-.14.1-.26.23-.37.38 0-.13-.02-.26-.03-.4Zm34.82 22.17c-.75 3.09-3.55 5.66-5.88 7.58-3.35 2.76-7.21 5.03-11.28 6.54-1.33.49-2.71.9-4.12 1.15.06-1.38.08-2.76.07-4.13-.02-3.78-.16-7.56-.41-11.33-.09-1.37-.18-2.74-.37-4.1 0-.06-.03-.11-.06-.15.09-3.25.12-6.16.03-8.12 6.86 1.05 10.56 2.17 14.06 3.62 5.52 2.28 8.59 5.44 7.97 8.96l-.01-.02Zm-22 16.15c-.12 0-.23-.02-.34-.03l.34-.03v.06Zm-.69-.7c0-3.13.26-8.84.47-14.51.06 1.2.11 2.41.15 3.6.15 3.6.25 7.23.09 10.83-.24.03-.48.05-.71.07v.01Zm-12.33-30.94c.37.63 2.01 1.01 3.23 1.25v.15c-1.31-.31-2.59-.73-3.83-1.29.12-.36.23-.72.33-1.09.08.48.18.84.27.98Zm13.7 31.65v-.18c3.41-.56 6.71-2.02 9.69-3.68 2.31-1.28 4.59-2.78 6.63-4.53-4.69 4.53-11.61 8.24-16.33 8.38l.01.01Zm24.07-.75c-2.05 1.93-4.37 3.56-6.83 4.95 2.7-1.78 5.52-4.03 8.42-6.87.82-.82 1.56-1.69 2.23-2.59-1.08 1.65-2.38 3.16-3.81 4.51h-.01ZM187.16 92.14c-.79-2.47-2.1-7.12-3.1-6.87-.19-.01-2.09.77-4.08 1.54-3.06 1.18-5.91 2.13-10.09 2.82-2.74.42-5.87 1.01-10.61 1.06.04-3.34.05-6.01.05-7.99 7.97-.65 12.33-2.11 16.37-3.55 1.11-.39 2.69-1.01 2.63-1.8-.08-.35-.55-1.39-1.17-2.61-.47-1.16-.98-2.31-1.61-3.38-.42-.71-1.04-1.69-1.86-2.06-.11-.08-.22-.13-.29-.12-.02 0-.04 0-.07.01-.19-.04-.39-.05-.6-.01-.17.03-.24.15-.25.28-.04.02-.09.04-.14.05-4.33 1.48-8.85 2.33-13.24 3.61a499.1 499.1 0 0 0-.31-8.19c4.51-.99 8.88-1.38 13.11-1.82 3.68-.38 6.28.12 7.47.34.59.11.9.16 1.16.18h.1c-.1.37.44.66.62.28.02-.04.03-.08.05-.13.15.2.53.22.62-.1.17-.58.19-1.21.21-1.81v-.36c.03-.15.05-.3.07-.45.52-2.47.33-5.09-.64-7.44-.11-.27-.44-.28-.6-.14-.08-.21-.15-.42-.24-.62-.19-.41-.79-.05-.6.35.03.07.05.15.09.22-.98-.42-2.15-.54-3.17-.63-2.17-.19-4.37-.14-6.54 0-5.7.35-11.4 1.3-16.91 2.79-2.08.56-4.13 1.22-6.14 2-4.54 1.05-3.79 1.51-2.17 6.07.18.51.46 1.68.54 1.94.82 2.47 1.08 2.13 3.1 2.13s0 .05 0 .08h.52c-.48 2.66-.51 5.45-.62 8.13-.15 3.48-.22 6.96-.28 10.45 0 .41-.01.82-.02 1.23-.16.29-.33.57-.51.85-.05.38-.09.77-.14 1.18-.42 3.52-.59 6.48-.52 8.8v.34c.02.47.05.76.06.87.16 1.57-.26 3.47 1.35 3.79 1.61.32 3.5.55 4.85.55.11 0 .22-.02.33-.02 1.79.24 3.67.05 5.45-.12 2.85-.28 5.69-.7 8.51-1.19 3.03-.53 6.05-1.14 9.04-1.86 2.4-.58 4.82-1.19 7.13-2.06.51-.19 1.73-.57 2.46-1.14 1.81-.68 2.18-1 1.57-2.67-.23-.62-.48-1.49-.91-2.78l-.03-.02Zm-11.12-38.71c.89.05 1.93.08 2.89.3-.33 0-.68-.02-1.06-.03-8.28-.26-14.88.75-23.97 2.51 2.41-.64 4.85-1.16 7.28-1.59 4.87-.86 9.91-1.45 14.86-1.19Zm-26.53 22.13c.03 1.71.04 3.43 0 5.14-.04 1.27-.11 2.55-.24 3.82 0-.73.02-1.46.04-2.19.05-2.26.12-4.51.22-6.77h-.02Zm6.73 27.85c.2-.1.4-.21.58-.33 1.82-.17 3.82-.24 5.94-.34-.86.11-1.72.24-2.58.33-1.27.14-2.61.31-3.93.34h-.01ZM534.48 85.44c-3.52-8.38-7.07-16.75-10.5-25.17-.63-1.54-1.25-3.09-1.86-4.65-.31-.8-.65-1.6-.87-2.43-.04-.17-.17-.24-.31-.25.1-.2 0-.51-.29-.53-1.59-.08-3.18-.22-4.78-.25-1.96-.03-3.91.13-5.84.42-.31.05-.31.38-.13.56-.03.06-.05.14-.04.22.23 1.54.63 3.06 1.16 4.53.13.35.27.7.41 1.06l-2.68 6.18c-.11.03-.2.09-.25.22-.67 1.9-1.52 3.73-2.34 5.56a536.85 536.85 0 0 1-3.9 8.45c-2.64 5.64-5.34 11.25-7.91 16.93-.44.97-.88 1.94-1.29 2.93-.2.48-.47 1-.55 1.52v.05c-.02.12.02.26.16.34 1.19.73 2.41 1.41 3.66 2.05 1.2.62 2.45 1.25 3.76 1.61.43.12.62-.55.19-.67-1.13-.31-2.2-.83-3.24-1.36 1.09.36 2.1.69 2.75.93 2.82 1.01 2.38 1.1 4.3-3.75 2.1-1.09 4.34-1.96 6.53-2.79 4.35-1.64 8.8-3.03 13.27-4.29.82 2.01 1.77 3.97 2.72 5.92.35.83.62 1.45.79 1.82.22.42.45.8.69 1.15.17.33.33.67.5 1 .42.8.84 1.63 1.4 2.35.23.29.6 0 .55-.31 1.53-.02 3.06-.07 4.58-.27.92-.12 1.82-.32 2.71-.54 1.39-.27 3.85-1.11 3.74-1.42-.67-1.96-1.55-3.87-2.34-5.78-1.57-3.78-3.16-7.56-4.75-11.33v-.01Zm-11.65-26.16c1.54 3.81 3.12 7.6 4.7 11.4 2.94 7.05 5.91 14.09 8.87 21.13l-1.06-2.17c-2.71-5.51-5.2-11.19-7.41-16.87l-6.65-17.15c-.65-1.45-.55-2.19-.93-2.53.09 0 .18.01.28.02a.29.29 0 0 0-.04.26c.52 2.02 1.47 3.98 2.25 5.91h-.01Zm-6.58 13.58c.05-.15.09-.31.14-.46 1.41 3.92 2.88 7.9 4.39 11.87-3.22.52-6.38 1.25-9.46 2.14.55-1.22 1.05-2.46 1.53-3.7 1.24-3.24 2.37-6.53 3.39-9.85h.01Zm-.23-20c.36 0 .73.03 1.09.05-2.15.1-5.18.33-5.87.74-.24.15-.41.3-.53.45-.06-.29-.13-.58-.18-.88 1.82-.26 3.65-.39 5.49-.35v-.01Zm-.09 18.72c-.49 1.67-1.05 3.33-1.6 4.97-1.07 3.19-2.19 6.38-3.57 9.46-.09.21-.19.43-.29.65-.25.07-.5.14-.74.22 2.53-6.16 4.61-11.29 6.2-15.3Zm-6.34 25.16c4.97-2.38 9.37-4.1 14.02-5.27l.26.64c-4.8 1.35-9.63 2.8-14.28 4.63Zm20.17 6.76c.33.23.68.42 1.04.56h-.33c-.12 0-.21.06-.26.13-.15-.23-.31-.45-.45-.7v.01ZM226.57 91.75c-3.55-4.74-6.68-9.11-9.31-12.99 9.2-15.25 10.05-17.81 10.35-18.38.17-.34 1.09-2.27.64-2.53-1.13-.65-1.03-.65-2.97-1.71-1.19-.65-3.04-1.61-4.53-2.12-1.71-.59-1.24-.36-3 2.77-.06.1-.11.2-.17.3-.75 1.02-1.48 2.05-2.2 3.09-1.88 2.71-3.73 5.45-5.69 8.1-3.68-4.91-6.88-8.76-9.51-11.43-.15-.15-.3-.29-.46-.42-1.27-1.28-7.24 3.53-7.93 5.58-.09.09-.19.16-.28.25-.27.26.03.64.33.58.19.65.5 1.29.94 1.91 3.85 5.06 7.19 9.76 9.94 14-1.23 2.61-3.06 5-4.67 7.38l-2.28 3.33c-.5.66-.93 1.23-1.29 1.69-.67.93-2.09 2.61-2.3 3.87-.51.85-1.16 1.84-1.29 2.83-.06.44.61.63.67.19.01-.08.04-.15.06-.22 1.36 1.08 2.76 2.11 4.19 3.11 1.3.91 2.62 1.85 4.04 2.56.21.1.4 0 .48-.17.24.07.48.14.72.2.44.1.62-.57.19-.67-2.02-.48-3.77-1.57-5.23-3.02-.47-.46-.9-.96-1.32-1.46 1.74 1.35 4.2 2.89 5.89 4.14 1.39 1.03 2.85-2.27 4.22-4.2 1.86-2.64 3.96-5.86 5.52-8.29l10.39 14.51c.67.81 1.14 1.21 1.57 1.36-.05.24.12.51.41.4 1.53-.58 3.05-1.19 4.54-1.87 1.52-.69 3.06-1.45 4.36-2.5a.28.28 0 0 0 .12-.23c1.66-1.1.81-1.74-1.41-4.91-1.13-1.58-1.71-2.36-3.7-5.01l-.03-.02Zm2.41 6.54c.56 1.15 1.19 2.52 1.11 3.81-.06.04-.12.07-.17.1-.03-.88-.55-2.66-.94-3.91Zm-16.51-32.73c1.86-2.65 3.65-5.35 5.57-7.95.4-.55.81-1.13 1.26-1.66.19-.18.38-.33.56-.45.18.03.36.08.55.13l-8.05 10.11.12-.18h-.01ZM192.7 95.48c.79-1.37 1.66-2.69 2.54-4 1.19-1.79 2.4-3.56 3.61-5.33-.04.09-.09.17-.13.26-.1.22.03.41.2.49-2.47 3.42-4.89 6.73-6.4 9.28.21.24.4.48.63.75-.24.07-.4.36-.17.56.4.33.72.77 1.05 1.17.09.11.18.21.27.32-.84-.61-1.66-1.24-2.47-1.88.24-.57.58-1.11.87-1.61v-.01Zm7.46-10.32c.47-.81.98-1.59 1.49-2.37.31-.48.64-.95.96-1.43.26-.29.52-.56.75-.79-.99 1.48-2.09 3.03-3.2 4.59Zm10.03-16.22s-.03-.05-.05-.07c.22-.29.43-.59.64-.89-.2.32-.4.65-.58.96h-.01ZM371.54 87.96c-.01-.08-.01-.16-.03-.23-.06-.38-.58-.29-.66.03-.3-.05-.6-.08-.81-.11-1.14-.15-2.29-.19-3.44-.2 1.04-.09 2.09-.18 3.14-.23.45-.02.45-.72 0-.7-6.57.35-13.14 1.23-19.65 2.11-1.53.21-3.05.42-4.57.68-.01 0-.02.01-.04.01-.04-3.33-.13-6.66-.24-9.99-.19-5.7-.4-11.41-.88-17.1-.13-1.51-.23-3.07-.49-4.58 0-.25 0-.48-.02-.68-.06-1.19-.04-2.61-.68-2.78-.16-.07-.72-.16-1.5-.24.22-.17.16-.62-.2-.63-1.19-.04-2.39.09-3.57.23-1.2.14-2.41.32-3.59.6-.16-.1-.41-.06-.5.12-.06.02-.13.03-.19.05-.35.1-.29.55-.03.66-.26.6-.19 2.27-.21 3-.02.66-.66 33.73-.9 40.3-.03.65.06 1.12.04 1.45-.16 3.05.87 4.96 6.34 3.93 1.09-.08 2.75-.77 5.36-1.43 4.13-1.04 5.78-1.52 6.2-1.65 6.43-1.69 6.78-1.97 11.72-2.43.55-.05 4.8-.38 6.03-.3.64.04 1.19.07 1.65.1.09 0 .16-.03.24-.05.1.27.56.33.66-.02.39-1.32.61-2.71.78-4.08.2-1.61.29-3.24.15-4.86.24.03.52-.23.38-.53-.09-.2-.27-.33-.49-.43v-.02Zm-.63.56c.07.57.11 1.14.11 1.71-.21-.99-.53-1.71-.95-1.87.22.03.44.06.65.11.06.01.12.04.19.05Zm-25.41 1.73c1.54-.36 3.1-.64 4.66-.89-1.61.37-3.18.77-4.66 1.2v-.31Zm-.86-7.37c-.07-1.37-.16-2.75-.25-4.12-.21-3.13-.45-6.27-.79-9.4.02-2.25.08-4.31.13-6.11.16 2.08.29 4.16.4 6.24.23 4.46.38 8.93.5 13.39h.01Zm-.94-4c.16 2.41.29 4.83.39 7.24.06 1.6.14 3.22.09 4.83-.15.05-.32.09-.47.14V78.88h-.01ZM483.72 92.83c-3.05-2.28-6.22-4.4-9.38-6.51 8.86-6.49 13.49-12.95 13.73-19.23.04-.76 0-1.5-.13-2.2-.67-3.82-3.5-6.68-8.39-8.48.13.04.27.08.4.13 3.92 1.39 7.74 4.23 8.5 8.56.34 1.95-.05 3.96-.98 5.69-.21.4.39.75.6.35 1.86-3.46 1.46-7.55-.97-10.63-3.53-4.47-9.76-5.88-15.16-6.16-2.32-.12-4.64-.04-6.95.19-6 .32-12.71 1.68-17.63 3.21-.37.11-.67.23-.92.35-.2-.17-.62.02-.57.37v.03c-.64.68-.18 1.64.48 3.21.38.91.67 1.89 1.15 2.58.32.76.68 1.51 1.13 2.19.14.21.38.19.53.07.19-.02.38-.05.57-.08v1.57c-.06.06-.1.13-.11.23-.27 4.18-.34 8.38-.48 12.57l-.3 9.03c-.24 3.91-.44 6.77-.46 7.26-.05.88-.11 1.95.07 2.81-.01.22-.02.43-.04.65 0 .11-.02.23-.03.35 0 .05-.03.27-.01.16-.05.4.5.59.64.28.05.04.12.08.2.08 1.75.13 3.5.28 5.25.3 1.69.02 3.38-.12 5.06-.32.08.23.36.39.55.15.06-.08.11-.17.16-.26.18-.09.24-.32.18-.48.05-.2.1-.4.13-.6.16-.86.25-1.74.33-2.62.11-1.17.17-2.34.23-3.51.15-.01.32-.03.52-.04.36-.03 1.73-.15 2.06-.15.39 0 .7-.02.95-.04 1.76 1.11 3.45 2.35 5.14 3.55 2.83 2.01 5.64 4.04 8.47 6.04 1.42 1 2.85 2 4.29 2.97.1.06.19.07.27.04.08 0 .17-.02.25-.1 1.61-1.56 3.15-3.18 4.6-4.88.75-.88 1.49-1.78 2.15-2.73.01.01.03.02.04.03.34.3.83-.2.49-.49-2.16-1.9-4.34-3.76-6.64-5.48l.03-.01Zm-6.38-3.65a55.72 55.72 0 0 0-4-2.13c.14-.1.26-.19.4-.29 1.2.81 2.4 1.61 3.6 2.42Zm-20.1 11.78c.67-.37 1.23-.91 1.67-1.6-.11.5-.24 1-.38 1.49-.43.04-.86.08-1.29.11Zm2.38-37.24c1.34-.31 2.56-.52 3.71-.69-1.03.19-2.04.41-3.04.65-.14-.07-.34-.02-.45.11-.07.02-.15.04-.22.05v-.13.01Zm.04.84c.07-.02.14-.03.2-.05.34 1.66.41 3.41.5 5.09.17 2.9.24 5.81.28 8.71l.03 3.17c-.17.07-.34.14-.51.2-.06-4.96-.21-10.58-.51-17.12h.01Zm16.04 5.62c-1.16 2.25-3.06 4.1-5.02 5.66-2.8 2.23-5.99 3.97-9.3 5.35-.01-3.56-.09-7.12-.27-10.67-.1-2.04-.16-4.16-.57-6.18 3.3-.78 6.72-1.36 10.1-1.1 1.85.14 4.23.59 5.32 2.29.92 1.43.46 3.24-.26 4.65Zm.85-.18c.6-1.37.9-2.92.28-4.32-.67-1.52-2.2-2.32-3.76-2.74.46.1.89.21 1.29.37 1.74.67 2.69 1.88 2.93 3.21.2 1.13-.05 2.25-.74 3.47V70Zm-27.47-4.14c-.12-.19-.23-.38-.34-.57.74.42.85.36.99.41v.08c-.22.03-.43.06-.65.08Zm11.21 30.46c-.08 1.08-.16 2.17-.33 3.24-.05.35-.11.69-.2 1.03 0 .04-.02.07-.03.11-.15.02-.3.04-.45.05.45-1.64.76-3.36.79-5.07.03-.29.08-.57.1-.89-.03-.31-.03-.47.24-.57-.04.69-.07 1.39-.12 2.08v.02Zm5.6-2.47c.48.11.92.52 2.49 1.72-.46-.32-.92-.65-1.38-.97-.37-.25-.73-.5-1.1-.75h-.01Zm21.23 7.24a70.76 70.76 0 0 1-4.37 4.63c-.14-.09-.27-.19-.4-.28.19-.09.37-.24.55-.47.87-1.14 5.43-5.51 5.49-7.45.31.26.62.53.92.79-.67.97-1.42 1.88-2.19 2.77v.01Z"
+ fill="currentColor"
+ transform="translate(-144.023 -51.76)"
+ />
+ </svg>
+ </div>
+ </div>
+ <div
+ class="welcome-screen-center__heading welcome-screen-decor virgil"
+ >
+ All your data is saved locally in your browser.
+ </div>
+ <div
+ class="welcome-screen-menu"
+ >
+ <button
+ class="welcome-screen-menu-item "
+ type="button"
+ >
+ <div
+ class="welcome-screen-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ d="m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z"
+ stroke-width="1.25"
+ />
+ </svg>
+ </div>
+ <div
+ class="welcome-screen-menu-item__text"
+ >
+ Open
+ </div>
+ <div
+ class="welcome-screen-menu-item__shortcut"
+ >
+ Ctrl+O
+ </div>
+ </button>
+ <button
+ class="welcome-screen-menu-item "
+ type="button"
+ >
+ <div
+ class="welcome-screen-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ viewBox="0 0 24 24"
+ >
+ <g
+ stroke-width="1.5"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <circle
+ cx="12"
+ cy="12"
+ r="9"
+ />
+ <line
+ x1="12"
+ x2="12"
+ y1="17"
+ y2="17.01"
+ />
+ <path
+ d="M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"
+ />
+ </g>
+ </svg>
+ </div>
+ <div
+ class="welcome-screen-menu-item__text"
+ >
+ Help
+ </div>
+ <div
+ class="welcome-screen-menu-item__shortcut"
+ >
+ ?
+ </div>
+ </button>
+ <button
+ class="welcome-screen-menu-item "
+ type="button"
+ >
+ <div
+ class="welcome-screen-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ viewBox="0 0 24 24"
+ >
+ <g
+ stroke-width="1.5"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <circle
+ cx="9"
+ cy="7"
+ r="4"
+ />
+ <path
+ d="M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"
+ />
+ <path
+ d="M16 3.13a4 4 0 0 1 0 7.75"
+ />
+ <path
+ d="M21 21v-2a4 4 0 0 0 -3 -3.85"
+ />
+ </g>
+ </svg>
+ </div>
+ <div
+ class="welcome-screen-menu-item__text"
+ >
+ Live collaboration...
+ </div>
+ </button>
+ <a
+ class="welcome-screen-menu-item "
+ href="undefined/plus?utm_source=excalidraw&utm_medium=app&utm_content=welcomeScreenGuest"
+ rel="noreferrer"
+ target="_blank"
+ >
+ <div
+ class="welcome-screen-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ viewBox="0 0 24 24"
+ >
+ <g
+ stroke-width="1.5"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <rect
+ height="4"
+ rx="1"
+ width="18"
+ x="3"
+ y="8"
+ />
+ <line
+ x1="12"
+ x2="12"
+ y1="8"
+ y2="21"
+ />
+ <path
+ d="M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"
+ />
+ <path
+ d="M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"
+ />
+ </g>
+ </svg>
+ </div>
+ <div
+ class="welcome-screen-menu-item__text"
+ >
+ Try Excalidraw Plus!
+ </div>
+ </a>
+ </div>
+</div>
+`;
diff --git a/packages/excalidraw/tests/__snapshots__/charts.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/charts.test.tsx.snap
new file mode 100644
index 0000000..868e27e
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/charts.test.tsx.snap
@@ -0,0 +1,20 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`tryParseSpreadsheet > works for numbers with comma in them 1`] = `
+{
+ "spreadsheet": {
+ "labels": [
+ "Week 1",
+ "Week 2",
+ "Week 3",
+ ],
+ "title": "Users",
+ "values": [
+ 814,
+ 10301,
+ 4264,
+ ],
+ },
+ "type": "VALID_SPREADSHEET",
+}
+`;
diff --git a/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap
new file mode 100644
index 0000000..f77eb8d
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap
@@ -0,0 +1,9977 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`contextMenu element > right-clicking on a group should select whole group > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": {
+ "items": [
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"
+ />
+ <path
+ d="M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"
+ />
+ <path
+ d="M9.15 14.85l8.85 -10.85"
+ />
+ <path
+ d="M6 4l8.85 10.85"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.cut",
+ "name": "cut",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"
+ />
+ <path
+ clipRule="evenodd"
+ d="M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"
+ />
+ </g>
+ </svg>,
+ "keyTest": undefined,
+ "label": "labels.copy",
+ "name": "copy",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keyTest": undefined,
+ "label": "labels.paste",
+ "name": "paste",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "label": "labels.selectAllElementsInFrame",
+ "name": "selectAllElementsInFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ },
+ },
+ {
+ "label": "labels.removeAllElementsFromFrame",
+ "name": "removeAllElementsFromFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "history",
+ },
+ },
+ {
+ "label": "labels.wrapSelectionInFrame",
+ "name": "wrapSelectionInFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 5v10a1 1 0 0 0 1 1h10"
+ />
+ <path
+ d="M5 8h10a1 1 0 0 1 1 1v10"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "image",
+ "crop",
+ ],
+ "label": "helpDialog.cropStart",
+ "name": "cropEditor",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "menu",
+ },
+ "viewMode": true,
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ <path
+ d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
+ />
+ <path
+ d="M11 21v-6l3 6v-6"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "png",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsPng",
+ "name": "copyAsPng",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"
+ />
+ <path
+ d="M10 15l2 6l2 -6"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "svg",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsSvg",
+ "name": "copyAsSvg",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keywords": [
+ "text",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyText",
+ "name": "copyText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"
+ />
+ <path
+ d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.copyStyles",
+ "name": "copyStyles",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"
+ />
+ <path
+ d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.pasteStyles",
+ "name": "pasteStyles",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": "labels.group",
+ "name": "group",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": null,
+ "label": "labels.autoResize",
+ "name": "autoResize",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.unbindText",
+ "name": "unbindText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.bindText",
+ "name": "bindText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.createContainerFromText",
+ "name": "wrapTextInContainer",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": "labels.ungroup",
+ "name": "ungroup",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "label": "labels.addToLibrary",
+ "name": "addToLibrary",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ style={
+ {
+ "transform": "rotate(180deg)",
+ }
+ }
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 5l0 14"
+ />
+ <path
+ d="M16 9l-4 -4"
+ />
+ <path
+ d="M8 9l4 -4"
+ />
+ </g>
+ </svg>,
+ "keyPriority": 40,
+ "keyTest": [Function],
+ "keywords": [
+ "move down",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.sendBackward",
+ "name": "sendBackward",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 5l0 14"
+ />
+ <path
+ d="M16 9l-4 -4"
+ />
+ <path
+ d="M8 9l4 -4"
+ />
+ </g>
+ </svg>,
+ "keyPriority": 40,
+ "keyTest": [Function],
+ "keywords": [
+ "move up",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.bringForward",
+ "name": "bringForward",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ style={
+ {
+ "transform": "rotate(180deg)",
+ }
+ }
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 10l0 10"
+ />
+ <path
+ d="M12 10l4 4"
+ />
+ <path
+ d="M12 10l-4 4"
+ />
+ <path
+ d="M4 4l16 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "move down",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.sendToBack",
+ "name": "sendToBack",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 10l0 10"
+ />
+ <path
+ d="M12 10l4 4"
+ />
+ <path
+ d="M12 10l-4 4"
+ />
+ <path
+ d="M4 4l16 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "move up",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.bringToFront",
+ "name": "bringToFront",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 3l0 18"
+ />
+ <path
+ d="M16 7l0 10l5 0l-5 -10"
+ />
+ <path
+ d="M8 7l0 10l-5 0l5 -10"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.flipHorizontal",
+ "name": "flipHorizontal",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M3 12l18 0"
+ />
+ <path
+ d="M7 16l10 0l-10 5l0 -5"
+ />
+ <path
+ d="M7 8l10 0l-10 -5l0 5"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.flipVertical",
+ "name": "flipVertical",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "category": "Elements",
+ "keywords": [
+ "line",
+ ],
+ "label": [Function],
+ "name": "toggleLinearEditor",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"
+ />
+ <path
+ d="M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": [Function],
+ "name": "hyperlink",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "action": "click",
+ "category": "hyperlink",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <React.Fragment>
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"
+ />
+ </React.Fragment>
+ </svg>,
+ "label": "labels.copyElementLink",
+ "name": "copyElementLink",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"
+ />
+ <path
+ clipRule="evenodd"
+ d="M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.duplicateSelection",
+ "name": "duplicateSelection",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": [Function],
+ "name": "toggleElementLock",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ d="M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"
+ strokeWidth="1.25"
+ />
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.delete",
+ "name": "deleteSelectedElements",
+ "perform": [Function],
+ "trackEvent": {
+ "action": "delete",
+ "category": "element",
+ },
+ },
+ ],
+ "left": 30,
+ "top": 40,
+ },
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "g1": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > right-clicking on a group should select whole group > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "g1",
+ ],
+ "height": 100,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "versionNonce": 1278240551,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > right-clicking on a group should select whole group > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "g1",
+ ],
+ "height": 100,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "versionNonce": 449462985,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > right-clicking on a group should select whole group > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`contextMenu element > right-clicking on a group should select whole group > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > right-clicking on a group should select whole group > [end of test] number of renders 1`] = `5`;
+
+exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": {
+ "message": "Added to library",
+ },
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 1150084233,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] number of elements 1`] = `1`;
+
+exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] number of renders 1`] = `5`;
+
+exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1014066025,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 1604849351,
+ "width": 20,
+ "x": 20,
+ "y": 30,
+}
+`;
+
+exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 23633383,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 20,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "index": "a2",
+ },
+ "inserted": {
+ "index": "a0",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] number of renders 1`] = `10`;
+
+exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1014066025,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 1604849351,
+ "width": 20,
+ "x": 20,
+ "y": 30,
+}
+`;
+
+exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 23633383,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 20,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "index": "a2",
+ },
+ "inserted": {
+ "index": "a0",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] number of renders 1`] = `10`;
+
+exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": {
+ "message": "Copied styles.",
+ },
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 1150084233,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] number of elements 1`] = `1`;
+
+exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] number of renders 1`] = `5`;
+
+exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 1014066025,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id0" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "isDeleted": false,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] number of elements 1`] = `1`;
+
+exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] number of renders 1`] = `6`;
+
+exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 1150084233,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1014066025,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 238820263,
+ "width": 20,
+ "x": 0,
+ "y": 10,
+}
+`;
+
+exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 0,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] number of renders 1`] = `6`;
+
+exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id3",
+ ],
+ "height": 20,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 493213705,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id3",
+ ],
+ "height": 20,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1014066025,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 915032327,
+ "width": 20,
+ "x": 20,
+ "y": 30,
+}
+`;
+
+exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 20,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] number of renders 1`] = `10`;
+
+exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#a5d8ff",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "cross-hatch",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 60,
+ "currentItemRoughness": 2,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#e03131",
+ "currentItemStrokeStyle": "dotted",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": {
+ "message": "Copied styles.",
+ },
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "#a5d8ff",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "cross-hatch",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 60,
+ "roughness": 2,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#e03131",
+ "strokeStyle": "dotted",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 941653321,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "#a5d8ff",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "cross-hatch",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 60,
+ "roughness": 2,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 289600103,
+ "strokeColor": "#e03131",
+ "strokeStyle": "dotted",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 9,
+ "versionNonce": 640725609,
+ "width": 20,
+ "x": 20,
+ "y": 30,
+}
+`;
+
+exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 20,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id1" => Delta {
+ "deleted": {
+ "strokeColor": "#e03131",
+ },
+ "inserted": {
+ "strokeColor": "#1e1e1e",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id1" => Delta {
+ "deleted": {
+ "backgroundColor": "#a5d8ff",
+ },
+ "inserted": {
+ "backgroundColor": "transparent",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id1" => Delta {
+ "deleted": {
+ "fillStyle": "cross-hatch",
+ },
+ "inserted": {
+ "fillStyle": "solid",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id1" => Delta {
+ "deleted": {
+ "strokeStyle": "dotted",
+ },
+ "inserted": {
+ "strokeStyle": "solid",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id1" => Delta {
+ "deleted": {
+ "roughness": 2,
+ },
+ "inserted": {
+ "roughness": 1,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id1" => Delta {
+ "deleted": {
+ "opacity": 60,
+ },
+ "inserted": {
+ "opacity": 100,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "backgroundColor": "#a5d8ff",
+ "fillStyle": "cross-hatch",
+ "opacity": 60,
+ "roughness": 2,
+ "strokeColor": "#e03131",
+ "strokeStyle": "dotted",
+ },
+ "inserted": {
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "opacity": 100,
+ "roughness": 1,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] number of renders 1`] = `16`;
+
+exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id1",
+ "index": "Zz",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1014066025,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 23633383,
+ "width": 20,
+ "x": 20,
+ "y": 30,
+}
+`;
+
+exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 1150084233,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 20,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id1" => Delta {
+ "deleted": {
+ "index": "Zz",
+ },
+ "inserted": {
+ "index": "a1",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] number of renders 1`] = `9`;
+
+exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id1",
+ "index": "Zz",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1014066025,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 23633383,
+ "width": 20,
+ "x": 20,
+ "y": 30,
+}
+`;
+
+exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 1150084233,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 20,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id1" => Delta {
+ "deleted": {
+ "index": "Zz",
+ },
+ "inserted": {
+ "index": "a1",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] number of renders 1`] = `9`;
+
+exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "versionNonce": 1723083209,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 238820263,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "versionNonce": 760410951,
+ "width": 20,
+ "x": 20,
+ "y": 30,
+}
+`;
+
+exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 20,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [],
+ },
+ "inserted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [],
+ },
+ "inserted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] number of renders 1`] = `11`;
+
+exports[`contextMenu element > shows 'Group selection' in context menu for multiple selected elements > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": {
+ "items": [
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"
+ />
+ <path
+ d="M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"
+ />
+ <path
+ d="M9.15 14.85l8.85 -10.85"
+ />
+ <path
+ d="M6 4l8.85 10.85"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.cut",
+ "name": "cut",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"
+ />
+ <path
+ clipRule="evenodd"
+ d="M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"
+ />
+ </g>
+ </svg>,
+ "keyTest": undefined,
+ "label": "labels.copy",
+ "name": "copy",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keyTest": undefined,
+ "label": "labels.paste",
+ "name": "paste",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "label": "labels.selectAllElementsInFrame",
+ "name": "selectAllElementsInFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ },
+ },
+ {
+ "label": "labels.removeAllElementsFromFrame",
+ "name": "removeAllElementsFromFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "history",
+ },
+ },
+ {
+ "label": "labels.wrapSelectionInFrame",
+ "name": "wrapSelectionInFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 5v10a1 1 0 0 0 1 1h10"
+ />
+ <path
+ d="M5 8h10a1 1 0 0 1 1 1v10"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "image",
+ "crop",
+ ],
+ "label": "helpDialog.cropStart",
+ "name": "cropEditor",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "menu",
+ },
+ "viewMode": true,
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ <path
+ d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
+ />
+ <path
+ d="M11 21v-6l3 6v-6"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "png",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsPng",
+ "name": "copyAsPng",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"
+ />
+ <path
+ d="M10 15l2 6l2 -6"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "svg",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsSvg",
+ "name": "copyAsSvg",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keywords": [
+ "text",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyText",
+ "name": "copyText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"
+ />
+ <path
+ d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.copyStyles",
+ "name": "copyStyles",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"
+ />
+ <path
+ d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.pasteStyles",
+ "name": "pasteStyles",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": "labels.group",
+ "name": "group",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": null,
+ "label": "labels.autoResize",
+ "name": "autoResize",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.unbindText",
+ "name": "unbindText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.bindText",
+ "name": "bindText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.createContainerFromText",
+ "name": "wrapTextInContainer",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": "labels.ungroup",
+ "name": "ungroup",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "label": "labels.addToLibrary",
+ "name": "addToLibrary",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ style={
+ {
+ "transform": "rotate(180deg)",
+ }
+ }
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 5l0 14"
+ />
+ <path
+ d="M16 9l-4 -4"
+ />
+ <path
+ d="M8 9l4 -4"
+ />
+ </g>
+ </svg>,
+ "keyPriority": 40,
+ "keyTest": [Function],
+ "keywords": [
+ "move down",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.sendBackward",
+ "name": "sendBackward",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 5l0 14"
+ />
+ <path
+ d="M16 9l-4 -4"
+ />
+ <path
+ d="M8 9l4 -4"
+ />
+ </g>
+ </svg>,
+ "keyPriority": 40,
+ "keyTest": [Function],
+ "keywords": [
+ "move up",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.bringForward",
+ "name": "bringForward",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ style={
+ {
+ "transform": "rotate(180deg)",
+ }
+ }
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 10l0 10"
+ />
+ <path
+ d="M12 10l4 4"
+ />
+ <path
+ d="M12 10l-4 4"
+ />
+ <path
+ d="M4 4l16 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "move down",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.sendToBack",
+ "name": "sendToBack",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 10l0 10"
+ />
+ <path
+ d="M12 10l4 4"
+ />
+ <path
+ d="M12 10l-4 4"
+ />
+ <path
+ d="M4 4l16 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "move up",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.bringToFront",
+ "name": "bringToFront",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 3l0 18"
+ />
+ <path
+ d="M16 7l0 10l5 0l-5 -10"
+ />
+ <path
+ d="M8 7l0 10l-5 0l5 -10"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.flipHorizontal",
+ "name": "flipHorizontal",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M3 12l18 0"
+ />
+ <path
+ d="M7 16l10 0l-10 5l0 -5"
+ />
+ <path
+ d="M7 8l10 0l-10 -5l0 5"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.flipVertical",
+ "name": "flipVertical",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "category": "Elements",
+ "keywords": [
+ "line",
+ ],
+ "label": [Function],
+ "name": "toggleLinearEditor",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"
+ />
+ <path
+ d="M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": [Function],
+ "name": "hyperlink",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "action": "click",
+ "category": "hyperlink",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <React.Fragment>
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"
+ />
+ </React.Fragment>
+ </svg>,
+ "label": "labels.copyElementLink",
+ "name": "copyElementLink",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"
+ />
+ <path
+ clipRule="evenodd"
+ d="M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.duplicateSelection",
+ "name": "duplicateSelection",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": [Function],
+ "name": "toggleElementLock",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ d="M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"
+ strokeWidth="1.25"
+ />
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.delete",
+ "name": "deleteSelectedElements",
+ "perform": [Function],
+ "trackEvent": {
+ "action": "delete",
+ "category": "element",
+ },
+ },
+ ],
+ "left": -17,
+ "top": -7,
+ },
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > shows 'Group selection' in context menu for multiple selected elements > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 453191,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 1014066025,
+ "width": 10,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > shows 'Group selection' in context menu for multiple selected elements > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 400692809,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 23633383,
+ "width": 10,
+ "x": 12,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > shows 'Group selection' in context menu for multiple selected elements > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 12,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > shows 'Group selection' in context menu for multiple selected elements > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > shows 'Group selection' in context menu for multiple selected elements > [end of test] number of renders 1`] = `10`;
+
+exports[`contextMenu element > shows 'Ungroup selection' in context menu for group inside selected elements > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": {
+ "items": [
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"
+ />
+ <path
+ d="M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"
+ />
+ <path
+ d="M9.15 14.85l8.85 -10.85"
+ />
+ <path
+ d="M6 4l8.85 10.85"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.cut",
+ "name": "cut",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"
+ />
+ <path
+ clipRule="evenodd"
+ d="M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"
+ />
+ </g>
+ </svg>,
+ "keyTest": undefined,
+ "label": "labels.copy",
+ "name": "copy",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keyTest": undefined,
+ "label": "labels.paste",
+ "name": "paste",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "label": "labels.selectAllElementsInFrame",
+ "name": "selectAllElementsInFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ },
+ },
+ {
+ "label": "labels.removeAllElementsFromFrame",
+ "name": "removeAllElementsFromFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "history",
+ },
+ },
+ {
+ "label": "labels.wrapSelectionInFrame",
+ "name": "wrapSelectionInFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 5v10a1 1 0 0 0 1 1h10"
+ />
+ <path
+ d="M5 8h10a1 1 0 0 1 1 1v10"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "image",
+ "crop",
+ ],
+ "label": "helpDialog.cropStart",
+ "name": "cropEditor",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "menu",
+ },
+ "viewMode": true,
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ <path
+ d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
+ />
+ <path
+ d="M11 21v-6l3 6v-6"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "png",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsPng",
+ "name": "copyAsPng",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"
+ />
+ <path
+ d="M10 15l2 6l2 -6"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "svg",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsSvg",
+ "name": "copyAsSvg",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keywords": [
+ "text",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyText",
+ "name": "copyText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"
+ />
+ <path
+ d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.copyStyles",
+ "name": "copyStyles",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"
+ />
+ <path
+ d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.pasteStyles",
+ "name": "pasteStyles",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": "labels.group",
+ "name": "group",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": null,
+ "label": "labels.autoResize",
+ "name": "autoResize",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.unbindText",
+ "name": "unbindText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.bindText",
+ "name": "bindText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.createContainerFromText",
+ "name": "wrapTextInContainer",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": "labels.ungroup",
+ "name": "ungroup",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "label": "labels.addToLibrary",
+ "name": "addToLibrary",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ style={
+ {
+ "transform": "rotate(180deg)",
+ }
+ }
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 5l0 14"
+ />
+ <path
+ d="M16 9l-4 -4"
+ />
+ <path
+ d="M8 9l4 -4"
+ />
+ </g>
+ </svg>,
+ "keyPriority": 40,
+ "keyTest": [Function],
+ "keywords": [
+ "move down",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.sendBackward",
+ "name": "sendBackward",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 5l0 14"
+ />
+ <path
+ d="M16 9l-4 -4"
+ />
+ <path
+ d="M8 9l4 -4"
+ />
+ </g>
+ </svg>,
+ "keyPriority": 40,
+ "keyTest": [Function],
+ "keywords": [
+ "move up",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.bringForward",
+ "name": "bringForward",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ style={
+ {
+ "transform": "rotate(180deg)",
+ }
+ }
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 10l0 10"
+ />
+ <path
+ d="M12 10l4 4"
+ />
+ <path
+ d="M12 10l-4 4"
+ />
+ <path
+ d="M4 4l16 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "move down",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.sendToBack",
+ "name": "sendToBack",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 10l0 10"
+ />
+ <path
+ d="M12 10l4 4"
+ />
+ <path
+ d="M12 10l-4 4"
+ />
+ <path
+ d="M4 4l16 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "move up",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.bringToFront",
+ "name": "bringToFront",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 3l0 18"
+ />
+ <path
+ d="M16 7l0 10l5 0l-5 -10"
+ />
+ <path
+ d="M8 7l0 10l-5 0l5 -10"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.flipHorizontal",
+ "name": "flipHorizontal",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M3 12l18 0"
+ />
+ <path
+ d="M7 16l10 0l-10 5l0 -5"
+ />
+ <path
+ d="M7 8l10 0l-10 -5l0 5"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.flipVertical",
+ "name": "flipVertical",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "category": "Elements",
+ "keywords": [
+ "line",
+ ],
+ "label": [Function],
+ "name": "toggleLinearEditor",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"
+ />
+ <path
+ d="M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": [Function],
+ "name": "hyperlink",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "action": "click",
+ "category": "hyperlink",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <React.Fragment>
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"
+ />
+ </React.Fragment>
+ </svg>,
+ "label": "labels.copyElementLink",
+ "name": "copyElementLink",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"
+ />
+ <path
+ clipRule="evenodd"
+ d="M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.duplicateSelection",
+ "name": "duplicateSelection",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": [Function],
+ "name": "toggleElementLock",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ d="M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"
+ strokeWidth="1.25"
+ />
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.delete",
+ "name": "deleteSelectedElements",
+ "perform": [Function],
+ "trackEvent": {
+ "action": "delete",
+ "category": "element",
+ },
+ },
+ ],
+ "left": -17,
+ "top": -7,
+ },
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > shows 'Ungroup selection' in context menu for group inside selected elements > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id4",
+ ],
+ "height": 10,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 81784553,
+ "width": 10,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > shows 'Ungroup selection' in context menu for group inside selected elements > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id4",
+ ],
+ "height": 10,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 238820263,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 747212839,
+ "width": 10,
+ "x": 12,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > shows 'Ungroup selection' in context menu for group inside selected elements > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 12,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > shows 'Ungroup selection' in context menu for group inside selected elements > [end of test] number of elements 1`] = `2`;
+
+exports[`contextMenu element > shows 'Ungroup selection' in context menu for group inside selected elements > [end of test] number of renders 1`] = `11`;
+
+exports[`contextMenu element > shows context menu for canvas > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": {
+ "items": [
+ {
+ "keyTest": undefined,
+ "label": "labels.paste",
+ "name": "paste",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ <path
+ d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
+ />
+ <path
+ d="M11 21v-6l3 6v-6"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "png",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsPng",
+ "name": "copyAsPng",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"
+ />
+ <path
+ d="M10 15l2 6l2 -6"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "svg",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsSvg",
+ "name": "copyAsSvg",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keywords": [
+ "text",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyText",
+ "name": "copyText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g>
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"
+ />
+ <path
+ d="M12 20v.01"
+ />
+ <path
+ d="M16 20v.01"
+ />
+ <path
+ d="M8 20v.01"
+ />
+ <path
+ d="M4 20v.01"
+ />
+ <path
+ d="M4 16v.01"
+ />
+ <path
+ d="M4 12v.01"
+ />
+ <path
+ d="M4 8v.01"
+ />
+ <path
+ d="M4 4v.01"
+ />
+ <path
+ d="M8 4v.01"
+ />
+ <path
+ d="M12 4v.01"
+ />
+ <path
+ d="M16 4v.01"
+ />
+ <path
+ d="M20 4v.01"
+ />
+ <path
+ d="M20 8v.01"
+ />
+ <path
+ d="M20 12v.01"
+ />
+ <path
+ d="M20 16v.01"
+ />
+ <path
+ d="M20 20v.01"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.selectAll",
+ "name": "selectAll",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ },
+ "viewMode": false,
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g>
+ <path
+ d="M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"
+ stroke="currentColor"
+ strokeWidth="1.25"
+ />
+ <path
+ d="M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"
+ stroke="currentColor"
+ strokeWidth="1.25"
+ />
+ <mask
+ height={9}
+ id="UnlockedIcon"
+ maskUnits="userSpaceOnUse"
+ style={
+ {
+ "maskType": "alpha",
+ }
+ }
+ width={9}
+ x={6}
+ y={1}
+ >
+ <path
+ d="M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481"
+ fill="#fff"
+ stroke="none"
+ />
+ </mask>
+ <g
+ mask="url(#UnlockedIcon)"
+ >
+ <path
+ d="M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z"
+ fill="currentColor"
+ stroke="none"
+ />
+ </g>
+ </g>
+ </svg>,
+ "label": "labels.elementLock.unlockAll",
+ "name": "unlockAllElements",
+ "paletteName": "Unlock all elements",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ },
+ "viewMode": false,
+ },
+ "separator",
+ {
+ "checked": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M3 6h18"
+ />
+ <path
+ d="M3 12h18"
+ />
+ <path
+ d="M3 18h18"
+ />
+ <path
+ d="M6 3v18"
+ />
+ <path
+ d="M12 3v18"
+ />
+ <path
+ d="M18 3v18"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "snap",
+ ],
+ "label": "labels.toggleGrid",
+ "name": "gridMode",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ "predicate": [Function],
+ },
+ "viewMode": true,
+ },
+ {
+ "checked": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"
+ />
+ <path
+ d="M4 8l5 0"
+ />
+ <path
+ d="M15 8l4 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "buttons.objectsSnapMode",
+ "name": "objectsSnapMode",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ "predicate": [Function],
+ },
+ "viewMode": false,
+ },
+ {
+ "checked": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"
+ />
+ <path
+ d="M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"
+ />
+ <path
+ d="M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"
+ />
+ <path
+ d="M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"
+ />
+ <path
+ d="M16.746 16.726a3 3 0 1 0 .252 -5.555"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "buttons.zenMode",
+ "name": "zenMode",
+ "paletteName": "Toggle zen mode",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ "predicate": [Function],
+ },
+ "viewMode": true,
+ },
+ {
+ "checked": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"
+ />
+ <path
+ d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.viewMode",
+ "name": "viewMode",
+ "paletteName": "Toggle view mode",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ "predicate": [Function],
+ },
+ "viewMode": true,
+ },
+ {
+ "checked": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3v18"
+ />
+ <path
+ d="M19 21v-18"
+ />
+ <path
+ d="M5 7h14"
+ />
+ <path
+ d="M5 15h14"
+ />
+ <path
+ d="M8 13v4"
+ />
+ <path
+ d="M11 13v4"
+ />
+ <path
+ d="M16 13v4"
+ />
+ <path
+ d="M14 5v4"
+ />
+ <path
+ d="M11 5v4"
+ />
+ <path
+ d="M8 5v4"
+ />
+ <path
+ d="M3 21h18"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "edit",
+ "attributes",
+ "customize",
+ ],
+ "label": "stats.fullTitle",
+ "name": "stats",
+ "paletteName": "Toggle stats",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "menu",
+ },
+ "viewMode": true,
+ },
+ ],
+ "left": -19,
+ "top": -9,
+ },
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > shows context menu for canvas > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`contextMenu element > shows context menu for canvas > [end of test] number of elements 1`] = `0`;
+
+exports[`contextMenu element > shows context menu for canvas > [end of test] number of renders 1`] = `3`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": {
+ "items": [
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"
+ />
+ <path
+ d="M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"
+ />
+ <path
+ d="M9.15 14.85l8.85 -10.85"
+ />
+ <path
+ d="M6 4l8.85 10.85"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.cut",
+ "name": "cut",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"
+ />
+ <path
+ clipRule="evenodd"
+ d="M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"
+ />
+ </g>
+ </svg>,
+ "keyTest": undefined,
+ "label": "labels.copy",
+ "name": "copy",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keyTest": undefined,
+ "label": "labels.paste",
+ "name": "paste",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "label": "labels.selectAllElementsInFrame",
+ "name": "selectAllElementsInFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ },
+ },
+ {
+ "label": "labels.removeAllElementsFromFrame",
+ "name": "removeAllElementsFromFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "history",
+ },
+ },
+ {
+ "label": "labels.wrapSelectionInFrame",
+ "name": "wrapSelectionInFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 5v10a1 1 0 0 0 1 1h10"
+ />
+ <path
+ d="M5 8h10a1 1 0 0 1 1 1v10"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "image",
+ "crop",
+ ],
+ "label": "helpDialog.cropStart",
+ "name": "cropEditor",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "menu",
+ },
+ "viewMode": true,
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ <path
+ d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
+ />
+ <path
+ d="M11 21v-6l3 6v-6"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "png",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsPng",
+ "name": "copyAsPng",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"
+ />
+ <path
+ d="M10 15l2 6l2 -6"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "svg",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsSvg",
+ "name": "copyAsSvg",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keywords": [
+ "text",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyText",
+ "name": "copyText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"
+ />
+ <path
+ d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.copyStyles",
+ "name": "copyStyles",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"
+ />
+ <path
+ d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.pasteStyles",
+ "name": "pasteStyles",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": "labels.group",
+ "name": "group",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": null,
+ "label": "labels.autoResize",
+ "name": "autoResize",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.unbindText",
+ "name": "unbindText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.bindText",
+ "name": "bindText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.createContainerFromText",
+ "name": "wrapTextInContainer",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": "labels.ungroup",
+ "name": "ungroup",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "label": "labels.addToLibrary",
+ "name": "addToLibrary",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ style={
+ {
+ "transform": "rotate(180deg)",
+ }
+ }
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 5l0 14"
+ />
+ <path
+ d="M16 9l-4 -4"
+ />
+ <path
+ d="M8 9l4 -4"
+ />
+ </g>
+ </svg>,
+ "keyPriority": 40,
+ "keyTest": [Function],
+ "keywords": [
+ "move down",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.sendBackward",
+ "name": "sendBackward",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 5l0 14"
+ />
+ <path
+ d="M16 9l-4 -4"
+ />
+ <path
+ d="M8 9l4 -4"
+ />
+ </g>
+ </svg>,
+ "keyPriority": 40,
+ "keyTest": [Function],
+ "keywords": [
+ "move up",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.bringForward",
+ "name": "bringForward",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ style={
+ {
+ "transform": "rotate(180deg)",
+ }
+ }
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 10l0 10"
+ />
+ <path
+ d="M12 10l4 4"
+ />
+ <path
+ d="M12 10l-4 4"
+ />
+ <path
+ d="M4 4l16 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "move down",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.sendToBack",
+ "name": "sendToBack",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 10l0 10"
+ />
+ <path
+ d="M12 10l4 4"
+ />
+ <path
+ d="M12 10l-4 4"
+ />
+ <path
+ d="M4 4l16 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "move up",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.bringToFront",
+ "name": "bringToFront",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 3l0 18"
+ />
+ <path
+ d="M16 7l0 10l5 0l-5 -10"
+ />
+ <path
+ d="M8 7l0 10l-5 0l5 -10"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.flipHorizontal",
+ "name": "flipHorizontal",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M3 12l18 0"
+ />
+ <path
+ d="M7 16l10 0l-10 5l0 -5"
+ />
+ <path
+ d="M7 8l10 0l-10 -5l0 5"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.flipVertical",
+ "name": "flipVertical",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "category": "Elements",
+ "keywords": [
+ "line",
+ ],
+ "label": [Function],
+ "name": "toggleLinearEditor",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"
+ />
+ <path
+ d="M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": [Function],
+ "name": "hyperlink",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "action": "click",
+ "category": "hyperlink",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <React.Fragment>
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"
+ />
+ </React.Fragment>
+ </svg>,
+ "label": "labels.copyElementLink",
+ "name": "copyElementLink",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"
+ />
+ <path
+ clipRule="evenodd"
+ d="M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.duplicateSelection",
+ "name": "duplicateSelection",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": [Function],
+ "name": "toggleElementLock",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ d="M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"
+ strokeWidth="1.25"
+ />
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.delete",
+ "name": "deleteSelectedElements",
+ "perform": [Function],
+ "trackEvent": {
+ "action": "delete",
+ "category": "element",
+ },
+ },
+ ],
+ "left": -17,
+ "top": -7,
+ },
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] appState 2`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": {
+ "items": [
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"
+ />
+ <path
+ d="M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"
+ />
+ <path
+ d="M9.15 14.85l8.85 -10.85"
+ />
+ <path
+ d="M6 4l8.85 10.85"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.cut",
+ "name": "cut",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"
+ />
+ <path
+ clipRule="evenodd"
+ d="M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"
+ />
+ </g>
+ </svg>,
+ "keyTest": undefined,
+ "label": "labels.copy",
+ "name": "copy",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keyTest": undefined,
+ "label": "labels.paste",
+ "name": "paste",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "label": "labels.selectAllElementsInFrame",
+ "name": "selectAllElementsInFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "canvas",
+ },
+ },
+ {
+ "label": "labels.removeAllElementsFromFrame",
+ "name": "removeAllElementsFromFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "history",
+ },
+ },
+ {
+ "label": "labels.wrapSelectionInFrame",
+ "name": "wrapSelectionInFrame",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 5v10a1 1 0 0 0 1 1h10"
+ />
+ <path
+ d="M5 8h10a1 1 0 0 1 1 1v10"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "image",
+ "crop",
+ ],
+ "label": "helpDialog.cropStart",
+ "name": "cropEditor",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "menu",
+ },
+ "viewMode": true,
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ <path
+ d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
+ />
+ <path
+ d="M11 21v-6l3 6v-6"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "png",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsPng",
+ "name": "copyAsPng",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M14 3v4a1 1 0 0 0 1 1h4"
+ />
+ <path
+ d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
+ />
+ <path
+ d="M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"
+ />
+ <path
+ d="M10 15l2 6l2 -6"
+ />
+ <path
+ d="M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"
+ />
+ </g>
+ </svg>,
+ "keywords": [
+ "svg",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyAsSvg",
+ "name": "copyAsSvg",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "keywords": [
+ "text",
+ "clipboard",
+ "copy",
+ ],
+ "label": "labels.copyText",
+ "name": "copyText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"
+ />
+ <path
+ d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.copyStyles",
+ "name": "copyStyles",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"
+ />
+ <path
+ d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.pasteStyles",
+ "name": "pasteStyles",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": "labels.group",
+ "name": "group",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": null,
+ "label": "labels.autoResize",
+ "name": "autoResize",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.unbindText",
+ "name": "unbindText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.bindText",
+ "name": "bindText",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "label": "labels.createContainerFromText",
+ "name": "wrapTextInContainer",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": "labels.ungroup",
+ "name": "ungroup",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "label": "labels.addToLibrary",
+ "name": "addToLibrary",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ style={
+ {
+ "transform": "rotate(180deg)",
+ }
+ }
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 5l0 14"
+ />
+ <path
+ d="M16 9l-4 -4"
+ />
+ <path
+ d="M8 9l4 -4"
+ />
+ </g>
+ </svg>,
+ "keyPriority": 40,
+ "keyTest": [Function],
+ "keywords": [
+ "move down",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.sendBackward",
+ "name": "sendBackward",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 5l0 14"
+ />
+ <path
+ d="M16 9l-4 -4"
+ />
+ <path
+ d="M8 9l4 -4"
+ />
+ </g>
+ </svg>,
+ "keyPriority": 40,
+ "keyTest": [Function],
+ "keywords": [
+ "move up",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.bringForward",
+ "name": "bringForward",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ style={
+ {
+ "transform": "rotate(180deg)",
+ }
+ }
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 10l0 10"
+ />
+ <path
+ d="M12 10l4 4"
+ />
+ <path
+ d="M12 10l-4 4"
+ />
+ <path
+ d="M4 4l16 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "move down",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.sendToBack",
+ "name": "sendToBack",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.50000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 10l0 10"
+ />
+ <path
+ d="M12 10l4 4"
+ />
+ <path
+ d="M12 10l-4 4"
+ />
+ <path
+ d="M4 4l16 0"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "keywords": [
+ "move up",
+ "zindex",
+ "layer",
+ ],
+ "label": "labels.bringToFront",
+ "name": "bringToFront",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M12 3l0 18"
+ />
+ <path
+ d="M16 7l0 10l5 0l-5 -10"
+ />
+ <path
+ d="M8 7l0 10l-5 0l5 -10"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.flipHorizontal",
+ "name": "flipHorizontal",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <g
+ strokeWidth={"1.25000"}
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M3 12l18 0"
+ />
+ <path
+ d="M7 16l10 0l-10 5l0 -5"
+ />
+ <path
+ d="M7 8l10 0l-10 -5l0 5"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.flipVertical",
+ "name": "flipVertical",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "category": "Elements",
+ "keywords": [
+ "line",
+ ],
+ "label": [Function],
+ "name": "toggleLinearEditor",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"
+ />
+ <path
+ d="M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": [Function],
+ "name": "hyperlink",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "action": "click",
+ "category": "hyperlink",
+ },
+ },
+ {
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth={2}
+ viewBox="0 0 24 24"
+ >
+ <React.Fragment>
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"
+ />
+ <path
+ d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"
+ />
+ </React.Fragment>
+ </svg>,
+ "label": "labels.copyElementLink",
+ "name": "copyElementLink",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ strokeWidth="1.25"
+ >
+ <path
+ d="M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"
+ />
+ <path
+ clipRule="evenodd"
+ d="M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"
+ />
+ </g>
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.duplicateSelection",
+ "name": "duplicateSelection",
+ "perform": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ {
+ "icon": [Function],
+ "keyTest": [Function],
+ "label": [Function],
+ "name": "toggleElementLock",
+ "perform": [Function],
+ "predicate": [Function],
+ "trackEvent": {
+ "category": "element",
+ },
+ },
+ "separator",
+ {
+ "PanelComponent": [Function],
+ "icon": <svg
+ aria-hidden="true"
+ className=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ d="M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"
+ strokeWidth="1.25"
+ />
+ </svg>,
+ "keyTest": [Function],
+ "label": "labels.delete",
+ "name": "deleteSelectedElements",
+ "perform": [Function],
+ "trackEvent": {
+ "action": "delete",
+ "category": "element",
+ },
+ },
+ ],
+ "left": 80,
+ "top": 90,
+ },
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 100,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 20,
+ "offsetTop": 10,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 200,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 449462985,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 1150084233,
+ "width": 20,
+ "x": -10,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] element 0 2`] = `
+{
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 200,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "versionNonce": 1278240551,
+ "width": 200,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 200,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "versionNonce": 449462985,
+ "width": 200,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": -10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] history 2`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] number of elements 1`] = `1`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] number of elements 2`] = `2`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] number of renders 1`] = `5`;
+
+exports[`contextMenu element > shows context menu for element > [end of test] number of renders 2`] = `6`;
diff --git a/packages/excalidraw/tests/__snapshots__/dragCreate.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/dragCreate.test.tsx.snap
new file mode 100644
index 0000000..acc9b79
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/dragCreate.test.tsx.snap
@@ -0,0 +1,210 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`Test dragCreate > add element to the scene when pointer dragging long enough > arrow 3`] = `1`;
+
+exports[`Test dragCreate > add element to the scene when pointer dragging long enough > arrow 4`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 30,
+ 50,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1278240551,
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 2019559783,
+ "width": 30,
+ "x": 30,
+ "y": 20,
+}
+`;
+
+exports[`Test dragCreate > add element to the scene when pointer dragging long enough > diamond 3`] = `1`;
+
+exports[`Test dragCreate > add element to the scene when pointer dragging long enough > diamond 4`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 401146281,
+ "width": 30,
+ "x": 30,
+ "y": 20,
+}
+`;
+
+exports[`Test dragCreate > add element to the scene when pointer dragging long enough > ellipse 3`] = `1`;
+
+exports[`Test dragCreate > add element to the scene when pointer dragging long enough > ellipse 4`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 401146281,
+ "width": 30,
+ "x": 30,
+ "y": 20,
+}
+`;
+
+exports[`Test dragCreate > add element to the scene when pointer dragging long enough > line 3`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 30,
+ 50,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1278240551,
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 2019559783,
+ "width": 30,
+ "x": 30,
+ "y": 20,
+}
+`;
+
+exports[`Test dragCreate > add element to the scene when pointer dragging long enough > rectangle 3`] = `1`;
+
+exports[`Test dragCreate > add element to the scene when pointer dragging long enough > rectangle 4`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 401146281,
+ "width": 30,
+ "x": 30,
+ "y": 20,
+}
+`;
diff --git a/packages/excalidraw/tests/__snapshots__/excalidraw.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/excalidraw.test.tsx.snap
new file mode 100644
index 0000000..e5e431d
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/excalidraw.test.tsx.snap
@@ -0,0 +1,654 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`<Excalidraw/> > <MainMenu/> > should render main menu with host menu items if passed from host 1`] = `
+<div
+ class="dropdown-menu"
+ data-testid="dropdown-menu"
+>
+ <div
+ class="Island dropdown-menu-container"
+ style="--padding: 2; z-index: 2;"
+ >
+ <button
+ class="dropdown-menu-item dropdown-menu-item-base"
+ >
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Click me
+ </div>
+ </button>
+ <a
+ class="dropdown-menu-item dropdown-menu-item-base"
+ href="blog.excalidaw.com"
+ rel="noreferrer"
+ target="_blank"
+ >
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Excalidraw blog
+ </div>
+ </a>
+ <div
+ class="dropdown-menu-item-base dropdown-menu-item-custom"
+ >
+ <button
+ style="height: 2rem;"
+ >
+ custom menu item
+ </button>
+ </div>
+ <button
+ aria-label="Help"
+ class="dropdown-menu-item dropdown-menu-item-base"
+ data-testid="help-menu-item"
+ title="Help"
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ viewBox="0 0 24 24"
+ >
+ <g
+ stroke-width="1.5"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <circle
+ cx="12"
+ cy="12"
+ r="9"
+ />
+ <line
+ x1="12"
+ x2="12"
+ y1="17"
+ y2="17.01"
+ />
+ <path
+ d="M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"
+ />
+ </g>
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Help
+ </div>
+ <div
+ class="dropdown-menu-item__shortcut"
+ >
+ ?
+ </div>
+ </button>
+ </div>
+</div>
+`;
+
+exports[`<Excalidraw/> > Test UIOptions prop > Test canvasActions > should render menu with default items when "UIOPtions" is "undefined" 1`] = `
+<div
+ class="dropdown-menu"
+ data-testid="dropdown-menu"
+>
+ <div
+ class="Island dropdown-menu-container"
+ style="--padding: 2; z-index: 2;"
+ >
+ <button
+ aria-label="Open"
+ class="dropdown-menu-item dropdown-menu-item-base"
+ data-testid="load-button"
+ title="Open"
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ d="m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z"
+ stroke-width="1.25"
+ />
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Open
+ </div>
+ <div
+ class="dropdown-menu-item__shortcut"
+ >
+ Ctrl+O
+ </div>
+ </button>
+ <button
+ aria-label="Save to..."
+ class="dropdown-menu-item dropdown-menu-item-base"
+ data-testid="json-export-button"
+ title="Save to..."
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ d="M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"
+ stroke-width="1.25"
+ />
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Save to...
+ </div>
+ </button>
+ <button
+ aria-label="Export image..."
+ class="dropdown-menu-item dropdown-menu-item-base"
+ data-testid="image-export-button"
+ title="Export image..."
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ viewBox="0 0 24 24"
+ >
+ <g
+ stroke-width="1.25"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M15 8h.01"
+ />
+ <path
+ d="M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"
+ />
+ <path
+ d="M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"
+ />
+ <path
+ d="M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"
+ />
+ <path
+ d="M19 16v6"
+ />
+ <path
+ d="M22 19l-3 3l-3 -3"
+ />
+ </g>
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Export image...
+ </div>
+ <div
+ class="dropdown-menu-item__shortcut"
+ >
+ Ctrl+Shift+E
+ </div>
+ </button>
+ <button
+ aria-label="Find on canvas"
+ class="dropdown-menu-item dropdown-menu-item-base"
+ data-testid="search-menu-button"
+ title="Find on canvas"
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ viewBox="0 0 24 24"
+ >
+ <g
+ stroke-width="1.5"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"
+ />
+ <path
+ d="M21 21l-6 -6"
+ />
+ </g>
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Find on canvas
+ </div>
+ <div
+ class="dropdown-menu-item__shortcut"
+ >
+ Ctrl+F
+ </div>
+ </button>
+ <button
+ aria-label="Help"
+ class="dropdown-menu-item dropdown-menu-item-base"
+ data-testid="help-menu-item"
+ title="Help"
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ viewBox="0 0 24 24"
+ >
+ <g
+ stroke-width="1.5"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <circle
+ cx="12"
+ cy="12"
+ r="9"
+ />
+ <line
+ x1="12"
+ x2="12"
+ y1="17"
+ y2="17.01"
+ />
+ <path
+ d="M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"
+ />
+ </g>
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Help
+ </div>
+ <div
+ class="dropdown-menu-item__shortcut"
+ >
+ ?
+ </div>
+ </button>
+ <button
+ aria-label="Reset the canvas"
+ class="dropdown-menu-item dropdown-menu-item-base"
+ data-testid="clear-canvas-button"
+ title="Reset the canvas"
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ d="M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"
+ stroke-width="1.25"
+ />
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Reset the canvas
+ </div>
+ </button>
+ <div
+ style="height: 1px; margin: .5rem 0px;"
+ />
+ <div
+ class="dropdown-menu-group "
+ >
+ <p
+ class="dropdown-menu-group-title"
+ >
+ Excalidraw links
+ </p>
+ <a
+ aria-label="GitHub"
+ class="dropdown-menu-item dropdown-menu-item-base"
+ href="https://github.com/excalidraw/excalidraw"
+ rel="noreferrer"
+ target="_blank"
+ title="GitHub"
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ d="M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5"
+ stroke-width="1.25"
+ />
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ GitHub
+ </div>
+ </a>
+ <a
+ aria-label="X"
+ class="dropdown-menu-item dropdown-menu-item-base"
+ href="https://x.com/excalidraw"
+ rel="noreferrer"
+ target="_blank"
+ title="X"
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ viewBox="0 0 24 24"
+ >
+ <g
+ stroke-width="1.25"
+ >
+ <path
+ d="M0 0h24v24H0z"
+ fill="none"
+ stroke="none"
+ />
+ <path
+ d="M4 4l11.733 16h4.267l-11.733 -16z"
+ />
+ <path
+ d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"
+ />
+ </g>
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Follow us
+ </div>
+ </a>
+ <a
+ aria-label="Discord"
+ class="dropdown-menu-item dropdown-menu-item-base"
+ href="https://discord.gg/UexuTaE"
+ rel="noreferrer"
+ target="_blank"
+ title="Discord"
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <g
+ stroke-width="1.25"
+ >
+ <path
+ d="M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"
+ />
+ <path
+ d="M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"
+ />
+ </g>
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Discord chat
+ </div>
+ </a>
+ </div>
+ <div
+ style="height: 1px; margin: .5rem 0px;"
+ />
+ <button
+ aria-label="Dark mode"
+ class="dropdown-menu-item dropdown-menu-item-base"
+ data-testid="toggle-dark-mode"
+ title="Dark mode"
+ >
+ <div
+ class="dropdown-menu-item__icon"
+ >
+ <svg
+ aria-hidden="true"
+ class=""
+ fill="none"
+ focusable="false"
+ role="img"
+ stroke="currentColor"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ viewBox="0 0 20 20"
+ >
+ <path
+ clip-rule="evenodd"
+ d="M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z"
+ stroke="currentColor"
+ />
+ </svg>
+ </div>
+ <div
+ class="dropdown-menu-item__text"
+ >
+ Dark mode
+ </div>
+ <div
+ class="dropdown-menu-item__shortcut"
+ >
+ Shift+Alt+D
+ </div>
+ </button>
+ <div
+ style="margin-top: 0.5rem;"
+ >
+ <div
+ data-testid="canvas-background-label"
+ style="font-size: .75rem; margin-bottom: .5rem;"
+ >
+ Canvas background
+ </div>
+ <div
+ style="padding: 0px 0.625rem;"
+ >
+ <div>
+ <div
+ aria-modal="true"
+ class="color-picker-container"
+ role="dialog"
+ >
+ <div
+ class="color-picker__top-picks"
+ >
+ <button
+ class="color-picker__button active"
+ data-testid="color-top-pick-#ffffff"
+ style="--swatch-color: #ffffff;"
+ title="#ffffff"
+ type="button"
+ >
+ <div
+ class="color-picker__button-outline"
+ />
+ </button>
+ <button
+ class="color-picker__button"
+ data-testid="color-top-pick-#f8f9fa"
+ style="--swatch-color: #f8f9fa;"
+ title="#f8f9fa"
+ type="button"
+ >
+ <div
+ class="color-picker__button-outline"
+ />
+ </button>
+ <button
+ class="color-picker__button"
+ data-testid="color-top-pick-#f5faff"
+ style="--swatch-color: #f5faff;"
+ title="#f5faff"
+ type="button"
+ >
+ <div
+ class="color-picker__button-outline"
+ />
+ </button>
+ <button
+ class="color-picker__button"
+ data-testid="color-top-pick-#fffce8"
+ style="--swatch-color: #fffce8;"
+ title="#fffce8"
+ type="button"
+ >
+ <div
+ class="color-picker__button-outline"
+ />
+ </button>
+ <button
+ class="color-picker__button"
+ data-testid="color-top-pick-#fdf8f6"
+ style="--swatch-color: #fdf8f6;"
+ title="#fdf8f6"
+ type="button"
+ >
+ <div
+ class="color-picker__button-outline"
+ />
+ </button>
+ </div>
+ <div
+ style="width: 1px; height: 1rem; margin: 0px auto;"
+ />
+ <button
+ aria-controls="radix-:r0:"
+ aria-expanded="false"
+ aria-haspopup="dialog"
+ aria-label="Canvas background"
+ class="color-picker__button active-color properties-trigger"
+ data-state="closed"
+ style="--swatch-color: #ffffff;"
+ title="Show background color picker"
+ type="button"
+ >
+ <div
+ class="color-picker__button-outline"
+ />
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+`;
diff --git a/packages/excalidraw/tests/__snapshots__/export.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/export.test.tsx.snap
new file mode 100644
index 0000000..7f766e1
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/export.test.tsx.snap
@@ -0,0 +1,11 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`export > export svg-embedded scene > svg-embdedded scene export output 1`] = `
+"<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" width="36" height="36"><!-- svg-source:excalidraw --><metadata><!-- payload-type:application/vnd.excalidraw+json --><!-- payload-version:2 --><!-- payload-start -->eyJ2ZXJzaW9uIjoiMSIsImVuY29kaW5nIjoiYnN0cmluZyIsImNvbXByZXNzZWQiOnRydWUsImVuY29kZWQiOiJ4nHVTTU/jMFx1MDAxML33V0TmulrSXCL20Fx1MDAxYrtcdTAwMGKCw+5hi8RcdTAwMDFxMPE0XHUwMDE51bUte0JbUCV+xt72L/JcdTAwMTNcdTAwMTi7JW5SNpFcIvnN15vnl5dRUVxi2jhcdTAwMTDTQsC6klx1MDAxYZWXK/El4k/gXHUwMDAzWsOhSTpcdTAwMDfb+iplNkRuenqqLVx1MDAxNzQ20PSsLMtdXHUwMDExaFiCocBp93wuipf05Vxiqlh6kdJcdTAwMTLwMZdgTVx1MDAxOV0zVHanTe+0QkVcciPjb1x1MDAxZNRcdTAwMDDWXHL1MWlqXHK9wkDeLuCH1dbHiSdjiG9cdTAwMWX6KKtF7W1rVJdDXprgpOdlct5cdTAwMWO1ntEmdWc9WC0xmHG3pzhcdTAwMTng/6vioXVjIETBxlx1MDAxZGqdrJDi8uMyb1x1MDAxMVx1MDAxObpcdTAwMWKVtH3InLxcXMJNXHUwMDE017RadzBcdTAwMWFcdTAwMDXrIZhW3E/7uJh8XHUwMDEzZ3tkm7lcdTAwMDOoXHUwMDFlseyJI+y3NVVfdVxmP9lcdTAwMGWUWsylXHUwMDBlkPWOPC6zVXokW6ckXHLmajSLYVx1MDAxZdtv8UnvZCdcdTAwMTb67d/f14Obs4Zm+Fx1MDAxY1x0TspcdTAwMWV6JZeoo9TnvVx1MDAxNlx1MDAxN1x1MDAxYeu4p9AwP3BcdTAwMDAvS8i278JkXY5W3E+iXHUwMDAxf3xcdTAwMWbWY41G6ttP6cmW7Fx1MDAxZlxiO4LkWzjcXHUwMDFjrjuTf52cp8CWv8lcdTAwMDJCOjcj1qu7UbZcdKrBqjuMwOU1XHUwMDEz9MsquDTyUVx1MDAwZnVcdTAwMTRPXGKr78d/xck8PWK0d0n8IyC5aTvavlx1MDAwM9lcdTAwMDIhXHUwMDFjIn0=<!-- payload-end --></metadata><defs><style class="style-fonts">
+ </style></defs><rect x="0" y="0" width="36" height="36" fill="#ffffff"></rect><g transform="translate(10 10) rotate(0 8 8)" data-id="A"><text x="0" y="17.619999999999997" font-family="Excalifont, Xiaolai, Segoe UI Emoji" font-size="20px" fill="#1e1e1e" text-anchor="start" style="white-space: pre;" direction="ltr" dominant-baseline="alphabetic">😀</text></g></svg>"
+`;
+
+exports[`export > exporting svg containing transformed images > svg export output 1`] = `
+"<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201.06601717798213 261.4213562373095" width="201.06601717798213" height="261.4213562373095"><!-- svg-source:excalidraw --><metadata></metadata><defs><symbol id="image-file_A"><image href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAT4AAAFPCAYAAADURqJUAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnXeYFUXWxl9yzpIkOOSgJF1UEFFEUQHzmhUVEyZEV7/dNQAiuooBMWBARcREEjAgriJZFBMgeWDIMOSBIcfvOcO96wxzQ3dV9b1dt996Hh74o86pU79T96W6q7qqAFhIgARIIGAECgSsv+wuCZAACYDCx0FAAiQQOAIUvsClnB0mARKg8HEMkAAJBI4AhS9wKWeHSYAEKHwcAyRAAoEjQOELXMrZYRIgAQofxwAJkEDgCFD4ApdydpgESIDCxzFAAiQQOAIUvsClnB0mARKg8HEMkAAJBI4AhS9wKWeHSYAEKHwcAyRAAoEjQOELXMrZYRIgAQofxwAJkEDgCFD4ApdydpgESIDCxzFAAiQQOAIUvsClnB0mARKg8HEMkAAJBI4AhS9wKWeHSYAEKHwcAyRAAoEjQOELXMrZYRIgAQofxwAJkEDgCFD4ApdydpgESIDCxzFAAiQQOAIUvsClnB0mARKg8HEMkAAJBI4AhS9wKWeHSYAEKHwcAyRAAoEjQOELXMrZYRIgAQofxwAJkEDgCFD4ApdydpgESIDCxzFAAiQQOAIUvsClnB0mARKg8HEMkAAJBI4AhS9wKWeHSYAEKHwcAyRAAoEjQOELXMrZYRIgAQofxwAJkEDgCFD4ApdydpgESIDCxzFAAiQQOAIUvsClnB0mARKg8HEMkAAJBI4AhS9wKWeHSYAEKHzJHQNNAbQF0A5AIwCVAVQCUB7AFgCbAawHMAvAD6G/9zkMuQuAZgBOBlAXQNWQ/7Ihn+J7OYCpAKYAmOfQb3UA54X8iu9aIb81AewFkAVgeyh2iXtiqA2H7lmNBLwnQOHznnGkFv4OoHdImNxEsBvAOwBeDInX8bYimvcBuDckdG58pwN4BcDgKEatADwE4GY3TkN19wAYAaAPgDUK9jQhAaMEKHxGccZ1djaAQQBERHSLCODjoZmh+LoHwAAApTUdy0zzWQADQ35KAXgVQHdNv2FzEdd+oVmhIZd0QwLuCFD43PFSrV0CwPMAHlB1EMVuB4CnAXQEcLFh3wtDgvcYgNqGfWcCuNDF47Xh5uku6AQofN6PAHn3Je/nGnjflFUtZAO4PMTGqsAZrP0EKHze5lBEbzqANG+bsdr7FQDGWd0DBm8dAQqfdymj6Dljux9AGwB/OKvOWiSgT4DCp88wkgfh+puhRQxvIvSX1w0AWoS2wPgrMkaTkgQofN6ktVeuVVFvWkg9r2MBXJl63WKP/EiAwmc+KxUBrDKwrcR8ZP73eA6Aaf4PkxHaToDCZz6DskftSfNuA+FRttCcAuBoIHrLTiaNAIXPLHrZPCxfJsgnZyxqBLoBGK5mSisScEaAwueMk9NatwF432ll1otI4BsAncmGBLwkQOEzS3ckgKvNugyctwMAKgCQ73tZSMATAhQ+c1gLAdgKoJw5l4H1dBWAzwPbe3bccwIUPmeIOwG4LnSaisxG5I+s3sr+swwAawHsBHCnM3eRa13eFnjwciCtKrByI/DUR8AUp4dFxWm4z03Auc2P+Z6TAdz2EpC1SyfaY7blSwMD7z7mO2v3sXglbk3fzwH4t3509EACkQlQ+KKPDDkb758A5GW7/NvT0vdmQMTp+HLFU8C4H/WaHtsHEFHNXUSY6tyiJ1AieiuGHRO/3GXOcqCVHIylXj5SPP5KvUVaBooAhS9/uuUYpv8D8A8A8m/PiwjH9jGRmxGBqiAPfopFZmKTX4hsPOw74FY52U+xfPAIcMsFkY0fegt4RbYkqxU5GLWDmimtSCA+AQpfXkZyvNOniZjh5W42ljhJPZk9ySxKpUSbSYov3ZnZH4OBlvU8EdUlABqr9Jc2JOCEAIXvL0qPAvgPAFmkSGiJJ3wdHlV/1xdL+KSTBeRUPMVy9NvohpqzSTmw4FTFsGhGAnEJUPiOIfowme+UUlH4ZIGjr/o25K8BdI07elmBBBQJUPiOnWD8hCI/I2Y2Cl+8mDWF713dFXIjiaGTlCUQdOGTZYPRyc5uPBHx46PuKz2AB+UI0ShFJ+bQnRxyMRELCXhCIMjCJ1tUVgIo6QlZF05tEz5Zhf7jDSCtWvROykq0xl6+HgDedoGQVUnAFYEgC588Tt3uipZHlW0TvngLJlPnAefKUpF6uRTAl+rmtCSB2ASCKnxykfd8WdT0wwCxSfhk+8rkAfk3LefmqLmHT1y1BvCrH3LDGFKTgC9++ElAO8GD6xiVu2GL8Dl5xN2xG0jrpvWYK5em694NrJwLGgaDQBCFr0zoMuuE79eLNqRsED6Z6Y3tHfu9nvRPczVXXMgJN9cG4+fHXiaLQBCFT769HZYs4JHa9bvwycEJ8l7v+G9yj++LgdmeuLwGwCg/5YexpB6BIAqfHHcUYyNG4pPsR+GTU1wuawP0uiL+LC9MzMCBCnsBVAIgf7OQgGcEgih8qwHUUiUqsx6ZAYlYyfFO8mmW6ne04Rh0hO+c5sdikSKPo+WPO1ZBBCzWtpMpc/OTOFcuenRZBo0Fer3l0ih/dflPSeNIBu326SAgBIImfNJfOeG3sEp+RUTkw/zjH/nkbLsP/qvi8ZiNW+GTE1HkmKnjj5pSj0DP0sD2lXAAN4QOidALiNYkEIdA0ITvBJ1Lq2UbR6TZkGzUlRNU5PBQleJU+ETw+t7k/NFTJRa3NiJ6lz+ltYobbnI9gLoA9ruNgfVJwC2BoAlfMwDKZxrHOo1EZ9YXT/jE9y3nRxZdtwk3Wd/Q4204JN6uZjI59BWTQNCErxWA31XHRCzh09nGEU/4VOP1yk5Wb+V9ns7j/XGxyX26J3sVL/2SwPEEgiZ8cmzmMtVhEEv4dGY/tgifCJ6cqix/NL7DjYT/XABTVfNCOxJwSyBowicHE2xyCylcP+tzoFyUw+h1TjP2u/DJezy59+OD74wLnqCVr2i6qOaEdiSgQiBowlcMwD4VUGIz5QVAto9EK3W6qS1wmBK+uRlmhCl8s5ss1ojgGZ7d5cZ3FEBDnVm4ai5pF2wCQRM+ybbcfStXQ7ou8c6gU33Ppyp88ugp79lkJqa7l9A1DDMGjwN41owreiEB5wSCKHzfA5BLhVyXeAKlemVjPL+RApWN07LA4OFszDUflwbj/PYFjcv4Wd1iAkEUvoEAeqnmLNZ7PvEpMzDZfuKmuBU+na0zbuLysK4cCXY6P03zkDBdxyQQROHrDuA91XER6y7ZsE+359G5ET4D38Oqdt2U3Q4Asp9yjSmH9EMCbgkEUfjqAMhwCypcXz5XW/lh9NXdcD25YUze+TkpToXPraA6aTvBdY4A6ARgUoLbZXMkkIdAEIVPACwG0Eh1LMQ7ej3sV1ZERazifcrmRPhkxbblPaoR+8JODhiVAwhi3MbrizgZRAAIBFX4BgBQvhXC6awvPH5kw2+sU1ycCJ/mrWXJHsqrAMjV5UuSHQjbJwEhEFThOxvANJ0hIEdAyb6+aBuaI/mWFdhI205ESMVftLJq47Hj3C0t0wHI5UFZlsbPsFOQQFCFT/otn67JaSDK5dZOwNB/KJs7NtT5HM5xI95UHAygJ4DD3rinVxJQIxBU4RNaDwB4VQ3bX1aJED8LFzXmhLYM8ftb3QFGe08IBFn45CLxTABy+ZBWkQNBZZuLm8deNw1a9H5PVsufDB0mKp+jsZCALwkEWfgkIS8AeMREZuQd3bg+wElVTXjL68MC4dsCoD8AebQ9aJ4APZKAWQJBF76nAPQ2iVQefeWbXpOzPx8Lnxy4L/dkfAIg2yRH+iIBLwkEWfjuB/CaF3BllfbWCwARwRZayyfHovOR8Im4yTFS4wF8CWCXF/zokwS8JhBU4fNM9I5PmFxQJPd0tKz715YVeSx2MyNMoPDJe7kNAFaE/sg7u/C/5e+1AOTrCxYSsJpAEIXvYQAujxFwl+MyJYuhZYMT0ah2FdStUQllSxZD8WJFULxoYZQI/V20SGHs3X8w50/Z4utwUfMfojbisfDJpuJzACheleSOTYrX/gzAtRp9lCPT5KDczbn+ls3f8krhDw2/ND2OQNCETxYyZEHDeClWpDDOb90AHU6rjxb1T3Tlv0LJ9Tittjw5Ri7PjGyAF0euRVa2Z/dsy8yuLcXPVdoiVR4B4BptL5EdyH3Q8opB/sg2oUMetRMIt0ESvn8CeM50VmUWd03HFriifTOULikHPLsv8YTvt9WXYPueEzH592UYN3U+Fsb7+Nd9CGLBmZ8at9xWujM+pxHIu9ahAPqFDtZ1asd6IQJBET5PZnod/9YAd112JiqWlS2B6sWp8IVb+HzKPLw5dpZ6g9EtOfPTo+rljC9SZHLEl5xgLRvxla9U0OuyndZBED7jole4UEH84/pzcH5ruS5Cv7gVPmlxdeZ2PP3B91i5YZt+AHk9UPzUiSZa+MKRymPwY6FtRdw47iB/qS58xkWvfOni6HfnRWgiy7WGiorwhZse8sVPGDlprqFI/ueG4qdGNFnCF472q9Diyh618INjlcrCZ1z0qlcqixfu74qqFbW/csszwnSETxx9OWMBXh01w/Sopfi5J5ps4ZOI54UOe+UqfYz8parwGRe9BjVPwPP3dYVsVYlVdu3Zj3nLNyBzWzaa16uO+jVPiPvzKVEkG9XLRT+qbsOORth7MLbYfjF9AV4b7Yn4tQewLm4nWEEI+EH4JA7JV+eQCDIzEQikovAZFz0Rrxfv74pSJWKL3tz09ej73rfYtffA/1Cf1SwNfe+QMzi9Lx7N/GQf2VkUP0f584vwSbDyuHslT7yOnLdUE76kiZ7M9G7u90ke0Qsjv/mi09Dt4r85+uXoVqL46RLUsveT8ElH5BzEcwEYfxTQouQD41QSvqSJnuTx25+X4MVPpkRMabWKZTC8zw0JSzfFL2Goj2/Ib8In8cmyf2udC7aSRtPDhlNF+IyLXlr1injlwUvjPt6Gc/PhN79i+MTfoqbqu0F3e5jG/K4pfgnFHW7Mj8InsckLZHnk4KESoUylgvB5InovPXAJypYq7vjX4zfhk8Apfo7TZ6qiX4VP+vcNgC4AuM8vBS4b8oXoyajyo/BR/EzpmWM/fhY+6cQzAJ5w3JsUrmjzjM83oudn4aP4JfTX63fhk9neaTzpxd7rJY2LXr0alTDgvq6uHm9z/6T8OuMLxzh+2ny8PmamaRWQrS5ypJX8zaKxj+/aji1zDrvI2rUXW7J246cFq3MOpfDgRB45Bkiu+wx0sXHG5zvR8/uMz2Pxk82yss+P4qchfNed3xK3X3JGPjGaOW8F3h73EzZs3WlSqE4N+qzPNuEzLnp1TqyIF+93t5ARaQT6fcYXjnns1D8x+PMfTf6IxBfF7xhR5UfdaMIXTtSISXMw/JvfsP+gkWP45GDTxOyqNz3SDPmzSfgeD93kZajrgGxZcbt6G61xW4TPw3d+cix9u4DP/JTP47v+glbo3vX0mGNbTuJ5/O1vsGm7kV0pMks3/j+gsR+nx45sEb4+APqaZFFXZnoPXBr321unbcY6I69UiaIY99xtTl0lpJ5HZ/oFfebn2YwvPCh2792PJ96ZiPkZciW0VnkPwB1aHiw2tkH4jN19G86TyZle2Gfm1uycT9YilU6nN8SjN3bw3TCh+BlPibLwOZnxhaPN3rMf974wJucgDI0i93tUDuq+Pr8LnxWiFx58kYSkasXSeOvRvysfS68xsB2ZUvwcYXJaKSHCJ8Gs3ZSFe14Yg30HtN75yXe8cn9H4Iqfhc8q0QuPHDmhZeafK7FxWzZa1K+OTqc38q3oxRJsA7+EID72Jkz4JD+jfpiLd8b/pJMqObL+QR0Httr6VfiMi16tKuXxSq/LlPfp2Zpgp3Fz5ueUVMx6CRW+/QcO4brewyOeCOSwN3KHsrsrAR069ns1vwqf0e8J06pVwIsPXIJypUv4PR9JjW/M5Hl4a5zxS4xk5ieHmcqJzqlelIUv3naWaODe/2o2Pv1O68rdmkE8azHlhU9mei8/eCnKU/QciY5HMz95kX4FgOmOgrC3krLwuVncyI0nY91W3D1gtA4xuU/Z+P92OgElwjalhY+ipzaEPBI/eQv/EIDX1aKywirhwidUbnrqY2zcpry377rQxmsrAJsKMmWFj6KnN0Q8Ej8JSj4Y7gXgV70IfWmdFOF7bvgPmPRruiqQ/wMg79QDVVJS+Ch6Zsawh+InAY4FIBvT/zQTrS+8ePrlRrQeDv16Nj75r/J7vtcA9PQFvQQGkXLCR9EzO3o8Fj8JVn6xwwB8DGCL2egT7i0pM74JsxZh4GfTVDv7BYDLVI1ttUs54Wt/RkvUqBr/SsdICbuoVXWcWLGkrbn0LG4D+8WcxrYjJH5yJ+xBp0Y+qtc09DWE65BUV3WloZ/mr8KTQya6bjNk8AuA2B8Jq3r2sZ1fhU+OOKqtwq1hw4aoWLGiiimevr6Fkl0QjBIw8wsCxqh9VF3VFYe/LFqDx96aoMpPLopJzBWAqhF6YOdX4ZPt6PkPJ3MAoGbNmpA/bku18sVx38WN3JoFqj7Fz7t0U/i8YxvJs1+Fb5zqe4dq1aohLS3NNcUOp1TFec2qubYLmkECH3sDhVbnUXf2wtU5x1UpFs74FMF5YfYmgB4qjkuWLInmzZu7MuVszxUucObnjpeT2pzxOaFkro5fZ3xa5+81bdoUZcuWdUSpWJGC6H5ePS5qOKL1VyXO/FwCi1NdZ8b388LVeIIzPlcJ8avwdZVrYV31JFflypUro169enHN06qUwg3t0lCiWOG4dVkhPwHZNDvgo8k4ctTop9WBRM0ZX2LT7lfhKwpATlmUv5VK2zPPwBHk756IXbXyJVC9QgmcWldt9VcpoBQ1+n3JWvQe8q2puyBSlFL8blH44jMyWcOvwid9HK9zDV7Xs5riwWvONsmKvqIQWJ25Hb2HTMS6LUZvAgsUbwpfYtPtZ+GT+wCG6OB46Lr26NymiY4L2joksHf/QQwaOV3nm1GHLaVmNb7jS2xe/Sx88vnFZh0chQoWxMAHL0WTtKo6bmjrgsCvi9fkfD5l6CYwFy3bXZUzvsTmz8/CJyR+1v2cpkSxIuh5dTuc37phYskGuLUDBw9hxKS5GD9tPnbs3hdgEs67rjPj4z4+55zDNf0ufDcC+Mh9t/JbtG9ZFw9f1x6lShQz4Y4+HBL44bd0fDljoYnrEB22aGc1HeHT3M4i5yReEzotx054ClH7XfikS/MANFPoWz6TE8qVwtUdW+DC0xtSAE0AdeFj647dmDlvJabPzcCc9PUuLINRNYnCJ4APA7g6SOJng/B1AvCtyeFftEghdDi1fs4NaI1qV0axotzHZ5JvPF9yL+ys+StzhHDZ2i18HwggycIXFr+bAMiZgilfbBA+ScL3ADp6lY2TqlVAvRqVUKNyORTwiEj32+9Elcpqx2VF6veujSuwY8Myr5Ak1O++AwexemMWtu7Ygx279mJ79l4cOiyTkOCUU+pWR6uGNZQ6rPmom7vNIwA6m55oKHXKYyOPfubGo5ZHXXnktbY83e8pPNhLrpwwU/Zsz8Sf414y44xerCageSzV8X2XyzvkZKSFVkOJE7wtwifdeBbAv21NRo0aNbBgwQIULFjQWBcWfPUadm1ebcwfHdlJwLDwCYQ1AORwyu12EokftU3CJ4oh7/rOj98tf9b47LPP0LmzPEmYKVuW/Ybl0wPxSsYMsBT14oHwCSm5FKqDpSdhx820TcInnSkXeuRVOp05Lg2PK3Ts2BFjx8odO2bKkcOH8PunfXH44H4zDunFSgKrMrej1yvjsGvvAdPxvwjgUdNO/eDPNuETZvK+T05otvJyjDlz5qBu3brGcr9q9pfIXKB80YyxOOgouQS279yDFz6ZknMMvcEix+6cCWC2QZ++cGWj8Ak42XM00hcEXQZxzz334Pnnn3dpFb36vp1bMHeMOX/GAqOjpBD47+wleGP0TOzZb+yupiUAGielMx42aqvwCRJ51zcGgLMTRz2E6MZ1mTJlkJ6eDjkp2lRZ/O072LFe+UJpU2HQj08IrNu8A4++/iU2Z+02FdFzNi8sRoJgs/BJf+oDkMsG5G9ryqBBg3DbbbcZi3fbynlInzzcmD86sp+AfCnz6OtfYc2mLBOdkc/a5GTflNlCYLvwSVJlxiczP2tWexs1aoRffpHrTM2Uo0cO44+Rz+DgXjm7lYUEjhHYuXsf7n9pLDZsNXJO4lAA3VOFbSoIn+RC+iFTKNnrZ8UZVBMnTkTbtm2NjaO1v3+LdXPlAxcWEviLwKbt2bjvpbHIyt6ri0VmfXK4ZUp8LpQqwhdOaikATwCQTyR8fQzLVVddhaFD5T9RM+XAnp34Y0R/ALz/wgzR1PGyYsM29Hx5LPYdEO3SKvI+pZuWB58Yp5rwhbHKxbqy1CnH7fiyFCpUCIsXL0bVquYmqEu+H4qsNSn9pZEvc2lDUN/+vAQvfjLFRKh1AKw04SiZPlJV+MJM/yYHX4S2v/hu0/Njjz2Gf/3rX8byn7V2MZZ8954xf3SUWgQefnU8/lyeqdupfgDk+lerS6oLX+7kNAVwWejP6aH3gklNXpUqVbB06VJj3+8ePXoUc0Y9iwO7jazkJZUNGzdPIHNrNm7/zwgcOKh18o0cpljT9ncqQRK+40eSJK/ycX/Kuxxuwq+3S5s81YcNG4YrrrhCx0Ue2/XzfsCa32SHDwsJ5CcwevI8vD1uli6ai2w/uirIwqeb/LC9nBJwraqzdu3aYcKECarm+ewO7tuN3z/rBxyVo9VYSCAvgcOHj6Db05/qHv46ys/vz53knMLnhFLsOu0BTNVxM3v2bDRubO6roGVTPsLWFXN1QqJtChP4+seFeGXEdJ0eyg1SZQBoLxPrBKFjS+HTofeX7XwAJ6u6uv322zFw4EBV83x2Ozcsx6KJbxnzR0epRcDQrO88AJNtJUPhM5O5ewAMVnVVokQJrFixwuj3u3NGP4f92VtVQ6JdihMYMWkO3v1Cbm9VLs+E9swqO0imIYXPDH05cUAuP1c+eWDAgAHo0aOHmWgAZC6cgVU/jzfmj45Si4Bc+H5j3491OiVHw7XRcZBMWwqfOfpvALhX1V2dOnUwd66593KHDuzLOaRUvuNlIYFIBDT39cnAkq+jrBxgFD5zvwl5xyfv+pTL+PHj0aGDnPZtpmTMGIHN6b+acUYvKUfgq5kLMWik1iKHfLu72EYwFD6zWZNvgs5RddmlSxd8+umnqub57HZmLseib7jIYQxoijmSU1u69dMab1cB+NxGLBQ+s1mTb4NHqLosUKBAzk1sNWvK3mr9Io+5v3z0BI4etnbXgT4EeohJ4PJ/DcVu9bs6ngQgJ2NYVyh8ZlNWOHQ1XzVVt4888gh699b6GCRP07KtRba3sJBAJAL/HPwVfl+yThWOTBdvUDVOph2Fzzz9p3Q+Y6tQoQKWL1+OwoVFQ/VLxoxR2JyecnfF6IOhhxwCsqVFtrYoFnlBKBv4rSsUPvMpk9me/BeqfHP4kCFDcO21yl/B5emR3Lsr9++ykEAkApoLHKKYrWwkS+HzJmtyFP6Vqq5bt26NSZMmqZrnseNFREYwpqyTyb8vw7PDlMeavEOx6r6bcCIpfN4MafmcR3k0SUjTpk1Dy5YttaI7euQIfvukNy8c16KY2sazF67G428rn+Yjm/ar2EiIwudd1mR/UyNV9zfffDPeeEP2RKsXfrOrzi4olvMzMvHQIOUvfOQiD+WvlZLJmMLnHf2eAAapui9evDiWLFkCWexQLRkzRmJzurnb3FTjoJ1/CSxdsxn3vai8FU++2jCzCpdgRBQ+74DLtZcbdP5H7N+/P3r2FP10X/bu2Ix5n79g+0G57jtOC1cEKHyucLGyQwJvA7jLYd181dLS0jBv3jwl80XfvImdmRlKtjQKDgEKX3Bynciean+/O3r0aHTq1MlVzKt+/gKZC7W+wXTVHivbS4DCZ2/u/B75DABnqQZ5wQUXYMwY2R3jrKz941usm8OLxZ3RYi0KH8eAVwTkkx6tg8/kuCo5tipWObg3G6tmf4GtGcq78L3qP/36mACFz8fJsTw0WfWSy0wrqfajZ88H0L+/HHibv+zZnpmzcpu5YJqqe9oFmACFL8DJT0DXnwXwb9V2TqhYHuNe+yeKFCmUx8XBPdnYu2OTqlvakQAofBwEXhKoDWCFzve7Pa9uh0vaKd9n5GXf6NtiAhQ+i5NnSeiyPf5S1VirVyqLD3tfr2pOOxKISIDCx4HhNYELAUzUaeS5e7rgtMZmDinViYO2qUOAwpc6ufRrT+QrmaU6p1k0q1cNL/e8zK/9Y1wWEqDwWZg0C0N+GMBLOnFz1qdDj7bHE6DwcUwkgoB8vyvLsHItn1JpVLsyXv+H8lF/Sm3SKHUJUPhSN7d+69l7ALrrBNWneye0axF7Q7OOf9oGhwCFLzi5TnZPTwWgdRZ8pXIlMfTx61CiWJFk9yVq+xVqNUXD82/zbXwqgR05fAhLvn8fO9enq5j70obC58u0pGxQPwM4Xad3Xdo2Qa9r/XvPSyoKn+TryJHDWPLdeykjfhQ+nV8hbd0SkA15n7g1Or7+Sw9ciub1q+u68cQ+VYUvLH7pkz5A1lo5ZNvuoil80nkrz/S0Mmi7h1pO9HID2wIAjXX6UrFsSQx+5EpUKldKx40ntqksfAJMLmtfmgLipyl8PIHZk19Pajv9O4BRul1sUOsEDH7kKl03xu1TXfhSRfwofMaHPh06ICBnSLVwUC9mlfYt6+LJ2y7QdWPUPgjCFxa/9MnDsX21TODtKxQ++3KWChF3BfCliY6c26oe/t2tIwoW9Mfbi6AI3zHxO4L0yR9aKX4UPhO/PvpQIaC9whtu9IyTa6N3904oWjjv8VUqQenaBEn4wuK3bNon2LZiri66hNpT+BKKm43lItARgLGz4k+uUxXP9uiMksWLJhVy0IQvR/yOHsWyqR9bJX4UvqT+TALf+DAA3Uz3H/FWAAAQYklEQVRRkCOs+tzeCfVqKB/6rB1KEIXPRvGj8GkPdTrQIFA89DVHUw0feUwLFyqIW7u0xjXntUCBAol/7xdU4QuLX8b0EdiyXOsDHVNDIaYfCl9CMLORGATqA/gdQBmTlGpVKY8bLzwV555aD4UKyvbBxJQgC59N4kfhS8zvga3EJiCH7Y3zAlK1SmVwY6dTcU6regn5xjfowhcWvxU/jsbmpbO9SKkRnxQ+IxjpxACBQQB6GvAT0YU8AjerVx1tTjkJbU5JgwiiF4XC9xfVjJmjfCt+FD4vRj99qhKYCaCtqrFTu/JlSmBUf2NrKnmaLV29EU6+6A6noaR8vSU/fIysVf6781hT+CRviX+BbGC0WBm0gX773YUcWCpbXFp7GaiXwjdr/ir0HqJ1xYiXXffEd7c2tdGyVvmovk+sWweVqlfzpG1Vp5rCx291VcHTLiqB0gC+BuDZ2VMUPrOjL57wSWt+Ez9N4ZMuye1X68yS9N4bZ3zeM9ZpQY6ol0/aPPkQl8Knk5r8tk6Ez2/iZ0D4VgE4B4D8bU2h8Pk/VXLM8lgAXUyHSuEzS9Sp8EmrNerXQ8WqVcwGoODNgPBJqzLjO8sm8aPwKQyWJJgUBjASwBUm26bwmaQJuBE+v4ifIeGzTvwofGbHvpfeZPdxLwD9AZQw0RCFzwTFv3y4FT4/iJ9B4QuLn7yTzjBL1rw3Cp95pl57lC88PgJwhm5DFD5dgnntVYQv2eJnWPikOxtDW7F8LX4UPrNjP1HejMz+ypcujlHP3OJJzLP+XIne737riW+/OlUVvmSK36rM7bjjP/IWxWgR8ZMFjyVGvRp0RuEzCDMJrrRmf5zxmc2YjvBJJLUa1kf5ypXNBuXA2/hp8/H6GNkzb7RsAdDOr+JH4TOa66Q4OxnAfJWWKXwq1KLb6ApfCorfGwDuN0vZjDcKnxmOyfRC4Usm/VxtmxC+ZIrfhB8XYeCIaSZpUvhM0qSvPAQofD4ZEKaET7pTu1FDlDsh8QfJGhY/Cp9PxmYqhkHh80lWTQpfMsXvu9lLMeDjySaoUvhMUKSPiAQofD4ZGKaFLwXEj8Lnk7GZimFQ+HySVS+Ez3Lxo/D5ZGymYhhNACxU6ZiP9/FtAnCtSp8M2HwoO0tU/Nx8Zm20qh39WCoVn2Jz8NAR7Cl/Itq1qKPqQtnuueE/YNKv6ar2FD5VcrSLSyAVZ3xr5P1+3J57U0E23TZUce3VjG/msi0YO2cD+nbvhDbN0lRCU7Z5+bOp+GbWYlV7Cp8qOdrFJUDhi4vIVQXfCV//rxdj2+4DKFiwQMLFj8LnauywcgIJUPjMwvaV8C3JzMbb01b8r4eJFj8Kn9nBRW/mCFD4zLEUT74Svnenr8DCDdl5eiji1/+ui9G6idKrSFe0KHyucLFyAglQ+MzC9o3wbd21H89MiPydv9yW1+/OizwXPwqf2cFFb+YIUPjMsfTVjG/cH+sxLV2+9Y9cEiF+FD6zg4vezBFQFz4Pj6Wa+sdy9P9ALopTKoFf1T1w6Aj6fLEQ+w8diQuw/90X44ym3iyCU/ji4meFJBFQFz6P7tXN3JqNngPHYnv2XlUkgRe+Gelb8Pkf6x3xk5nfsz06o1XDGo7qu6lE4XNDi3UTScBXwiei99Cg8diyY7cOg0AL39GjR3Pe7ckWFqelSOFCeObui42LH4XPaQZYL9EEfCN8m7N2oefL43RFT/gFWvgWb8jGO9P/2sLidEB5IX4UPqf0WS/RBHwhfCJ6MtPbuG2Xif4HWviGTFuBRZl5t7A4hWpa/Ch8TsmzXqIJNAWwQKVRUycwb9u5J+edniHRS/aMbwOAaio8TXyyFmsLi9OYRPwG3NcFp9St7tQkaj0KnzZCOvCIQFJnfFm79uLBgeOwfstOk91L1oxPLsiZotoRE8I39vd1mL5sq2oI/7MrVqQwnru3s7b4Ufi0U0EHHhFQP51Fc1VXRO/hQV9gzaYs0117G0AP004d+JNrO290UC9iFV3h23fwcM4WloOHj6qGkMfOhPhR+Iykgk48IJC0GZ/M9BaulJsEjRY5FupWAGZ+/c5DKwdgM4Aizk3y1rzj7DQ0rV5W1RzTlm7BuDnOtrA4baR40cJ477FrUaVCaacmeepR+JSw0SgBBJImfNf1Ho6tO/aY7GKyRE/68BCAl1U7U7JoITx1aVMUKqh2f5fKFhansb7xyJVoWEvt2koKn1PKrJdoAqkifEMA3J2EmV44X0sBNFBN3nmNKqNrC/XFhIXrd+LdGStVm49pR+HLj0ftvydP0kOnigRSQfhE9O5S7L8Js/YApuo4erJLY1QoVVTZxdtTM7Bko5GtQPlioPBR+JQHpo8NbRe+1wE8kGS+WosaDauWRo9z6ip3wcQWlliNU/gofMqD08eGNgufH0RPFjVkhaaYao5vaVMbLWqp37Ux5rd1mLlcfwtLtPgpfBQ+1bHtZ7ukbWfRXNzwg+hJXh8E8IpqgnUXNUxvYYnUDwofhU91fPvZztYZXxcAE3wAVmtRo2PjyujSXH1RY+rSzRg/Rz4W8a5Q+Ch83o2u5Hmm8KmzPxvANHVzQGdRQ7aw9PtqMXbsPagTQlxbCh+FL+4gsbAChU89acMB3KRq3qhaadzdXn1RY8H6nXjPoy0suftE4aPwqY5xP9tR+NSyo72ocVvbk9CsprhRK29NzcBSj7awUPhi54T7+NTGrJ+sKHxq2dBa1ChTvDD6XNIEBQuo/YQ27tyH5yfK60XvC2d8nPF5P8oS3wKFT4251qLGBU2q4OJmSqdX5UQ7+re1+HH5NrXIXVpR+Ch8LoeMFdUpfO7T1A7AdPdmf1n0vaQJypZQO88gEVtY+KjLR12d8W2DLYXPfZbkMISb3Zsds2hSvQzuPLuOqjmmLNmML+Z6u4WFwkfhUx6glhhS+NwlSntRo/tZJ+GUGmqLGkeOHsXTCdjCQuGj8Ln7WdhXm8LnLmdJXdSYv24H3p+5yl3EmrX5jo/v+DSHkC/NKXzu0qK1qHHhyVUhf1TLm1MykL7Jm1NYosVE4aPwqY5XP9tR+Jxn5ywAM5xXz1tTNq7IFhbVRY1EbmHhoy4fdVXHuS12FD7nmRoGoJvz6nlrnnxiWdzeLk3VHKN+XYtZGYnZwkLho/ApD1RLDCl8zhKlvahxR7s0ND1R7U4N2cLy5PiFOHwk0VeJAHzU5aOus5+IXbUofM7y1RPAIGdV89eSLzVk714BxS81Ji/ehC/nZao2r2VH4aPwaQ0gnxpT+JwlRmtR46JTqqJTU7VFjWRsYeGjLh91nf0s7K1l60GknQF8kyDsbQHMVG1Ld1Hjz7U7MPTHxG5hofBR+FTHuy12nPHFz9TQ0F298WtGqHFKjbLofpb6osbgycuxbPNupbZDRnMAVABwkoqTJD7q+uWU7XzY1I6WUKFPG68IUPhik5VFjSwd+HedXQeNq5dRcmFoC4usRPcHUFsliCQK3xsA7leJ2WsbCp/XhL33T+GLzVhucHtVNQ3lSxbJOWVZdVFj5C9r8dMKrS0sYiwvF5dT+FSzmN+OwmeOZbI8Ufhik9da1OjcrBrOb1JFKbd79h9Cny8X6W5hkZnekwDkJSFnfEqZoPAZwuYrNxS+6OloA+BH1WwVLAA8dWlTlCpWWMnFpEWb8PWfWltYDgGoGbr+ksKnlIXIRpzxGYSZJFcUvujgtRY1mtcsh1vbKq0nwNAWls8AXB/qHoXP4A+MwmcQZpJcUfgig9f+UuPu9nXQqJraosbcNVkYNmu17pCQbTizKHy6GPmoa55g8j1S+CLnQFYTX1NNj+6ixus/LEfGFu0tLK1yxc8Zn2oyI9hxxmcQZpJcUfgig58HoJlqTro0r4aOjdUWNQxuYZHrL8OFwqeaTAqfQXL+cUXhy5+LM3M9IrrOlO6ixmez12D2yu2u281lEN7CIosbFD4dklFsOePzAGqCXVL48gN/H8BtqnloWascurVRW9QwtIXlaQC9j4ufMz7VhHLGZ5Ccf1xR+PLmQntR455z6qJB1dJKGf5+0SZMMLeFJXcMFD6ljEQ24ozPIMwkuaLw5QV/HwD5RlSpnFC6KB7r3FjJVraw9P1iEXbtz/2E6trVpwBuiGBF4XONMroBhc8gzCS5ovDlBa+1qHFJi+ro0KiyUirnrMnCh/pbWGTT9U8UPqUUODai8DlG5duKysInPWpR/0Tljs1dtl7ZFkAXABN0HESwPSOKaDhupmaFEiheuKDj+rkrbsrej537tGZ7cgpL7i0sRh51G9Q6ASWLFVXq05pNWdi2c4+SLQAeUqBKjnZxCWgJX1zv3lXwQvjeA9Ddu5A99yyXnH8UpRXlR13Po47eAIUvifBTvWkK37EMlwKwFUAxSxMeaQuLkRlfEnlQ+JIIP9WbpvAdy/C9oUcrW/PdT26vjBE8Z3wGM8t3fAZhJskVhe8YeK1FjSTlLtxs7lNYooVC4TOYJAqfQZhJckXhA04H8HOS+Jto9hMAN8ZxROEzQTrkg8JnEGaSXFH4gHcB3J4k/iaalU/s4gk3hc8EaQqfQYrJdRV04bN9USPWFpbcI4vCZ/B3xhmfQZhJchV04bsHwOAksTfR7E0APnbgiMLnAJLTKhQ+p6T8Wy/owmfzosbG0NHyTnY9U/gM/gYpfAZhJslVkIWvNYDZSeJuotmnAPR16IjC5xCUk2oUPieU/F0nyMI3BMAd/k5P1OicbGHhOz6Pkkvh8whsAt0GVfhkUUMeFeVvG4u815P3e04LZ3xOSTmoR+FzAMnnVYIqfD0AvOnz3MQKTw4jkBVdp4XC55SUg3oUPgeQfF4lqMJn86KG7NmTvXtuCoXPDa04dSl8BmEmyZUcHieHb9pW5FEvXTFoufPxH4q2fjD7DsBMl4H0AlDepU2yq8vCk+mjx4z0icJnBCOdkAAJ2ESAwmdTthgrCZCAEQIUPiMY6YQESMAmAhQ+m7LFWEmABIwQoPAZwUgnJEACNhGg8NmULcZKAiRghACFzwhGOiEBErCJAIXPpmwxVhIgASMEKHxGMNIJCZCATQQofDZli7GSAAkYIUDhM4KRTkiABGwiQOGzKVuMlQRIwAgBCp8RjHRCAiRgEwEKn03ZYqwkQAJGCFD4jGCkExIgAZsIUPhsyhZjJQESMEKAwmcEI52QAAnYRIDCZ1O2GCsJkIARAhQ+IxjphARIwCYCFD6bssVYSYAEjBCg8BnBSCckQAI2EaDw2ZQtxkoCJGCEAIXPCEY6IQESsIkAhc+mbDFWEiABIwQofEYw0gkJkIBNBCh8NmWLsZIACRghQOEzgpFOSIAEbCJA4bMpW4yVBEjACAEKnxGMdEICJGATAQqfTdlirCRAAkYIUPiMYKQTEiABmwhQ+GzKFmMlARIwQoDCZwQjnZAACdhEgMJnU7YYKwmQgBECFD4jGOmEBEjAJgIUPpuyxVhJgASMEKDwGcFIJyRAAjYRoPDZlC3GSgIkYIQAhc8IRjohARKwiQCFz6ZsMVYSIAEjBCh8RjDSCQmQgE0EKHw2ZYuxkgAJGCFA4TOCkU5IgARsIkDhsylbjJUESMAIAQqfEYx0QgIkYBMBCp9N2WKsJEACRgj8P/9qkjFpAoX4AAAAAElFTkSuQmCC" preserveAspectRatio="none" width="100%" height="100%"></image></symbol><style class="style-fonts">
+ </style></defs><clipPath id="image-clipPath-id1" data-id="id1"><rect width="100" height="100" rx="25" ry="25"></rect></clipPath><g transform="translate(30.710678118654755 30.710678118654755) rotate(315 50 50)" clip-path="url(#image-clipPath-id1)" data-id="id1"><use href="#image-file_A" width="100" height="100" opacity="1"></use></g><clipPath id="image-clipPath-id2" data-id="id2"><rect width="50" height="50" rx="12.5" ry="12.5"></rect></clipPath><g transform="translate(130.71067811865476 30.710678118654755) rotate(45 25 25)" clip-path="url(#image-clipPath-id2)" data-id="id2"><use href="#image-file_A" width="50" height="50" opacity="1" transform="translate(25 25) scale(-1 1) translate(-25 -25)"></use></g><clipPath id="image-clipPath-id3" data-id="id3"><rect width="100" height="100" rx="25" ry="25"></rect></clipPath><g transform="translate(30.710678118654755 130.71067811865476) rotate(45 50 50)" clip-path="url(#image-clipPath-id3)" data-id="id3"><use href="#image-file_A" width="100" height="100" opacity="1" transform="translate(50 50) scale(1 -1) translate(-50 -50)"></use></g><clipPath id="image-clipPath-id4" data-id="id4"><rect width="50" height="50" rx="12.5" ry="12.5"></rect></clipPath><g transform="translate(130.71067811865476 130.71067811865476) rotate(315 25 25)" clip-path="url(#image-clipPath-id4)" data-id="id4"><use href="#image-file_A" width="50" height="50" opacity="1" transform="translate(25 25) scale(-1 -1) translate(-25 -25)"></use></g></svg>"
+`;
diff --git a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap
new file mode 100644
index 0000000..165c135
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap
@@ -0,0 +1,20131 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id172": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id172": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id170",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 18,
+ "width": 100,
+ "x": -100,
+ "y": -50,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id171",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 19,
+ "width": 100,
+ "x": 100,
+ "y": -50,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id175",
+ "fixedPoint": [
+ "0.50000",
+ 1,
+ ],
+ "focus": 0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": "102.35417",
+ "id": "id172",
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "101.77517",
+ "102.35417",
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 40,
+ "width": "101.77517",
+ "x": "0.70711",
+ "y": 0,
+}
+`;
+
+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] element 3 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id172",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id175",
+ "index": "a3",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 6,
+ "width": 50,
+ "x": 100,
+ "y": 100,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id172" => Delta {
+ "deleted": {
+ "endBinding": {
+ "elementId": "id171",
+ "focus": "0.00990",
+ "gap": 1,
+ },
+ "height": "0.98586",
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ "-0.98586",
+ ],
+ ],
+ "startBinding": {
+ "elementId": "id170",
+ "focus": "0.02970",
+ "gap": 1,
+ },
+ },
+ "inserted": {
+ "endBinding": {
+ "elementId": "id171",
+ "focus": "-0.02000",
+ "gap": 1,
+ },
+ "height": "0.00000",
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ "0.00000",
+ ],
+ ],
+ "startBinding": {
+ "elementId": "id170",
+ "focus": "0.02000",
+ "gap": 1,
+ },
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id170" => Delta {
+ "deleted": {
+ "boundElements": [],
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "id172",
+ "type": "arrow",
+ },
+ ],
+ },
+ },
+ "id171" => Delta {
+ "deleted": {
+ "boundElements": [],
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "id172",
+ "type": "arrow",
+ },
+ ],
+ },
+ },
+ "id172" => Delta {
+ "deleted": {
+ "endBinding": {
+ "elementId": "id175",
+ "fixedPoint": [
+ "0.50000",
+ 1,
+ ],
+ "focus": 0,
+ "gap": 1,
+ },
+ "height": "102.35417",
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "101.77517",
+ "102.35417",
+ ],
+ ],
+ "startBinding": null,
+ "y": 0,
+ },
+ "inserted": {
+ "endBinding": {
+ "elementId": "id171",
+ "focus": "0.00990",
+ "gap": 1,
+ },
+ "height": "0.98586",
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ "-0.98586",
+ ],
+ ],
+ "startBinding": {
+ "elementId": "id170",
+ "focus": "0.02970",
+ "gap": 1,
+ },
+ "y": "0.99364",
+ },
+ },
+ "id175" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id172",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id170" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": -100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id171" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id172": true,
+ },
+ "selectedLinearElementId": "id172",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id172" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `4`;
+
+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] number of renders 1`] = `21`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id167": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id167": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id165",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 9,
+ "width": 100,
+ "x": 150,
+ "y": -50,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id166",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 9,
+ "width": 100,
+ "x": 150,
+ "y": -50,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id167",
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 30,
+ "width": 50,
+ "x": 200,
+ "y": 0,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id167" => Delta {
+ "deleted": {
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 0,
+ ],
+ ],
+ },
+ "inserted": {
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id165" => Delta {
+ "deleted": {
+ "boundElements": [],
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "id167",
+ "type": "arrow",
+ },
+ ],
+ },
+ },
+ "id166" => Delta {
+ "deleted": {
+ "boundElements": [],
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "id167",
+ "type": "arrow",
+ },
+ ],
+ },
+ },
+ "id167" => Delta {
+ "deleted": {
+ "endBinding": null,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "startBinding": null,
+ },
+ "inserted": {
+ "endBinding": {
+ "elementId": "id166",
+ "focus": -0,
+ "gap": 1,
+ },
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 0,
+ ],
+ ],
+ "startBinding": {
+ "elementId": "id165",
+ "focus": 0,
+ "gap": 1,
+ },
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id165" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": -100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id166" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id167": true,
+ },
+ "selectedLinearElementId": "id167",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id167" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `3`;
+
+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] number of renders 1`] = `23`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": null,
+ "endBinding": {
+ "elementId": "id177",
+ "fixedPoint": [
+ "0.50000",
+ 1,
+ ],
+ "focus": 0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": "1.30038",
+ "id": "id178",
+ "index": "Zz",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ "1.30038",
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id176",
+ "fixedPoint": [
+ 1,
+ "0.50000",
+ ],
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 11,
+ "width": "98.58579",
+ "x": "0.70711",
+ "y": 0,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id178",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id176",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 100,
+ "x": -100,
+ "y": -50,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id178",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id177",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 100,
+ "x": 100,
+ "y": -50,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id176" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": -100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id177" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id178" => Delta {
+ "deleted": {
+ "endBinding": {
+ "elementId": "id177",
+ "fixedPoint": [
+ "0.50000",
+ 1,
+ ],
+ "focus": 0,
+ "gap": 1,
+ },
+ "startBinding": {
+ "elementId": "id176",
+ "fixedPoint": [
+ 1,
+ "0.50000",
+ ],
+ "focus": 0,
+ "gap": 1,
+ },
+ },
+ "inserted": {
+ "endBinding": null,
+ "startBinding": null,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `3`;
+
+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] number of renders 1`] = `9`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": null,
+ "endBinding": {
+ "elementId": "id180",
+ "fixedPoint": [
+ 1,
+ "0.50000",
+ ],
+ "focus": 0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": "1.30038",
+ "id": "id181",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ "1.30038",
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id179",
+ "fixedPoint": [
+ "0.50000",
+ 1,
+ ],
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 11,
+ "width": "98.58579",
+ "x": "0.70711",
+ "y": 0,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id181",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id179",
+ "index": "a0V",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 12,
+ "width": 100,
+ "x": -100,
+ "y": -50,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id181",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id180",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 11,
+ "width": 100,
+ "x": 100,
+ "y": -50,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id181" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": null,
+ "endBinding": {
+ "elementId": "id180",
+ "fixedPoint": [
+ 1,
+ "0.50000",
+ ],
+ "focus": 0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": "11.27227",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ "11.27227",
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id179",
+ "fixedPoint": [
+ "0.50000",
+ 1,
+ ],
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": "98.58579",
+ "x": "0.70711",
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id179" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id181",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id180" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id181",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `3`;
+
+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] number of renders 1`] = `11`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id182",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": -100,
+ "y": -50,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id183",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 100,
+ "y": -50,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id182" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": -100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id183" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `2`;
+
+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] number of renders 1`] = `4`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id186": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id186",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id184",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 100,
+ "x": -100,
+ "y": -50,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id186",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id185",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 100,
+ "x": 500,
+ "y": -500,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id185",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": "374.05754",
+ "id": "id186",
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "502.78936",
+ "-374.05754",
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id184",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 10,
+ "width": "502.78936",
+ "x": "-0.83465",
+ "y": "-36.58211",
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id184" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": -100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id185" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id186": true,
+ },
+ "selectedLinearElementId": "id186",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id186" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id185",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id184",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id184" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id186",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id185" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id186",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `3`;
+
+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] number of renders 1`] = `9`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id153",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id151",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id152",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 6,
+ "verticalAlign": "top",
+ "width": 100,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id151",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id153",
+ "index": "a2",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 11,
+ "verticalAlign": "top",
+ "width": 30,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id151" => Delta {
+ "deleted": {
+ "isDeleted": false,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 10,
+ "y": 10,
+ },
+ },
+ "id152" => Delta {
+ "deleted": {
+ "containerId": null,
+ },
+ "inserted": {
+ "containerId": null,
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+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] number of elements 1`] = `3`;
+
+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] number of renders 1`] = `11`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id156",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id154",
+ "index": "Zz",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 11,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id154",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id155",
+ "index": "a0",
+ "isDeleted": true,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 9,
+ "verticalAlign": "top",
+ "width": 100,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id154",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id156",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 11,
+ "verticalAlign": "top",
+ "width": 30,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id155" => Delta {
+ "deleted": {
+ "containerId": "id154",
+ "isDeleted": true,
+ },
+ "inserted": {
+ "containerId": null,
+ "isDeleted": false,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {
+ "id154" => Delta {
+ "deleted": {
+ "boundElements": [],
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "id155",
+ "type": "text",
+ },
+ ],
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+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] number of elements 1`] = `3`;
+
+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] number of renders 1`] = `11`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id143",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id141",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 10,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id141",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id143",
+ "index": "a0V",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 7,
+ "verticalAlign": "top",
+ "width": 30,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id142",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 9,
+ "verticalAlign": "top",
+ "width": 80,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id141" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id143",
+ "type": "text",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "id142",
+ "type": "text",
+ },
+ ],
+ },
+ },
+ "id142" => Delta {
+ "deleted": {
+ "containerId": null,
+ },
+ "inserted": {
+ "containerId": "id141",
+ },
+ },
+ "id143" => Delta {
+ "deleted": {
+ "containerId": "id141",
+ },
+ "inserted": {
+ "containerId": null,
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+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] number of elements 1`] = `3`;
+
+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] number of renders 1`] = `11`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id144",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id145",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 60,
+ "id": "id146",
+ "index": "a0V",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 50,
+ "x": 100,
+ "y": 100,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id146",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id145",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que
+pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 13,
+ "verticalAlign": "top",
+ "width": 40,
+ "x": 105,
+ "y": 105,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id144" => Delta {
+ "deleted": {
+ "boundElements": [],
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "id145",
+ "type": "text",
+ },
+ ],
+ },
+ },
+ "id145" => Delta {
+ "deleted": {
+ "containerId": "id146",
+ },
+ "inserted": {
+ "containerId": "id144",
+ },
+ },
+ "id146" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id145",
+ "type": "text",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+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] number of elements 1`] = `3`;
+
+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] number of renders 1`] = `11`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id139",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 9,
+ "width": 100,
+ "x": 35,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id140",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 10,
+ "verticalAlign": "top",
+ "width": 80,
+ "x": 40,
+ "y": 15,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id139" => Delta {
+ "deleted": {
+ "boundElements": [],
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "id140",
+ "type": "text",
+ },
+ ],
+ },
+ },
+ "id140" => Delta {
+ "deleted": {
+ "containerId": null,
+ },
+ "inserted": {
+ "containerId": "id139",
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+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] number of elements 1`] = `2`;
+
+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] number of renders 1`] = `11`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id148",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id147",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id147",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id148",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 12,
+ "verticalAlign": "top",
+ "width": 80,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id147" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id148" => Delta {
+ "deleted": {
+ "containerId": "id147",
+ },
+ "inserted": {
+ "containerId": null,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `2`;
+
+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] number of renders 1`] = `9`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id150",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id149",
+ "index": "Zz",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 11,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id149",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id150",
+ "index": "a0",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 8,
+ "verticalAlign": "top",
+ "width": 80,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id150" => Delta {
+ "deleted": {
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id149",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "index": "a0",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "verticalAlign": "top",
+ "width": 80,
+ "x": 15,
+ "y": 15,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id149" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id150",
+ "type": "text",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `2`;
+
+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] number of renders 1`] = `9`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id164",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id163",
+ "index": "Zz",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id163",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id164",
+ "index": "a0",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 7,
+ "verticalAlign": "top",
+ "width": 80,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id164" => Delta {
+ "deleted": {
+ "angle": 0,
+ "x": 15,
+ "y": 15,
+ },
+ "inserted": {
+ "angle": 0,
+ "x": 15,
+ "y": 15,
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+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] number of elements 1`] = `2`;
+
+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] number of renders 1`] = `9`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 90,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id162",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id161",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 100,
+ "x": 200,
+ "y": 200,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 90,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id161",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id162",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 6,
+ "verticalAlign": "top",
+ "width": 80,
+ "x": 205,
+ "y": 205,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id161" => Delta {
+ "deleted": {
+ "angle": 90,
+ "x": 200,
+ "y": 200,
+ },
+ "inserted": {
+ "angle": 0,
+ "x": 10,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `2`;
+
+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] number of renders 1`] = `10`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id157",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id157",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id158",
+ "index": "a1",
+ "isDeleted": true,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 3,
+ "verticalAlign": "top",
+ "width": 100,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id157" => Delta {
+ "deleted": {
+ "boundElements": [],
+ "isDeleted": false,
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "id158",
+ "type": "text",
+ },
+ ],
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `2`;
+
+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] number of renders 1`] = `9`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id160",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id159",
+ "index": "Zz",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id160",
+ "index": "a0",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "que pasa",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "que pasa",
+ "textAlign": "left",
+ "type": "text",
+ "updated": 1,
+ "version": 8,
+ "verticalAlign": "top",
+ "width": 100,
+ "x": 15,
+ "y": 15,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id160" => Delta {
+ "deleted": {
+ "containerId": null,
+ "isDeleted": false,
+ },
+ "inserted": {
+ "containerId": "id159",
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `2`;
+
+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] number of renders 1`] = `9`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id188",
+ "index": "Zz",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 10,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 500,
+ "id": "id187",
+ "index": "a0",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "name": null,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "frame",
+ "updated": 1,
+ "version": 3,
+ "width": 500,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id188" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "Zz",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id188" => Delta {
+ "deleted": {
+ "frameId": "id187",
+ },
+ "inserted": {
+ "frameId": null,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `2`;
+
+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] number of renders 1`] = `13`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id116": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "id": "id115",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "id": "id116",
+ "index": "a1",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 100,
+ "x": 100,
+ "y": 100,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id115": true,
+ "id116": true,
+ },
+ "selectedGroupIds": {
+ "A": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id115" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id116" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": 100,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "A",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id115": true,
+ },
+ "selectedGroupIds": {
+ "A": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": null,
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "editingGroupId": "A",
+ "selectedElementIds": {
+ "id116": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] number of elements 1`] = `2`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] number of renders 1`] = `13`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#ffc9c9",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementBackground",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id103": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id101",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "#ffc9c9",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id102",
+ "index": "a1",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 10,
+ "x": 20,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "#ffc9c9",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id103",
+ "index": "a2",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 10,
+ "x": 50,
+ "y": 50,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id101": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id101" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id102": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id101": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id102" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "#ffc9c9",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 20,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id102" => Delta {
+ "deleted": {
+ "backgroundColor": "#ffc9c9",
+ },
+ "inserted": {
+ "backgroundColor": "transparent",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id103": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id102": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id103" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "#ffc9c9",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id103" => Delta {
+ "deleted": {
+ "x": 50,
+ "y": 50,
+ },
+ "inserted": {
+ "x": 30,
+ "y": 30,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] number of elements 1`] = `3`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] number of renders 1`] = `17`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id106": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id106": true,
+ "id107": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id105",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id106",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 100,
+ "x": 20,
+ "y": 20,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id107",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 100,
+ "x": 30,
+ "y": 30,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id105": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id105" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id106" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id107" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 30,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id106": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id105": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id107": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] number of elements 1`] = `3`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] number of renders 1`] = `15`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id111": true,
+ "id112": true,
+ "id113": true,
+ "id114": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "A": true,
+ "B": true,
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "id": "id111",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "id": "id112",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "B",
+ ],
+ "height": 100,
+ "id": "id113",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] element 3 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "B",
+ ],
+ "height": 100,
+ "id": "id114",
+ "index": "a3",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id111": true,
+ "id112": true,
+ },
+ "selectedGroupIds": {
+ "A": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id113": true,
+ "id114": true,
+ },
+ "selectedGroupIds": {
+ "B": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] number of elements 1`] = `4`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] number of renders 1`] = `15`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id119": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id119",
+ "index": "a0",
+ "isDeleted": true,
+ "lastCommittedPoint": [
+ 10,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 7,
+ "width": 10,
+ "x": -10,
+ "y": -10,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id119": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id119" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 10,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 10,
+ "x": -10,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": "id119",
+ },
+ "inserted": {
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingLinearElementId": "id119",
+ },
+ "inserted": {
+ "editingLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingLinearElementId": null,
+ },
+ "inserted": {
+ "editingLinearElementId": "id119",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] number of elements 1`] = `1`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] number of renders 1`] = `10`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#ffc9c9",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementBackground",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "#ffec99",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id100",
+ "index": "a0",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id100": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id100" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "#ffec99",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id100" => Delta {
+ "deleted": {
+ "backgroundColor": "#ffec99",
+ },
+ "inserted": {
+ "backgroundColor": "transparent",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] number of elements 1`] = `1`;
+
+exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] number of renders 1`] = `9`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id125",
+ "index": "a1",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 100,
+ "x": 20,
+ "y": 20,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id126",
+ "index": "a3V",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 100,
+ "x": 30,
+ "y": 30,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id124",
+ "index": "a4",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id125" => Delta {
+ "deleted": {
+ "index": "a1",
+ },
+ "inserted": {
+ "index": "a3",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id125": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id124" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a4",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 10,
+ "y": 10,
+ },
+ },
+ "id125" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a3",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 20,
+ "y": 20,
+ },
+ },
+ "id126" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a3V",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 30,
+ "y": 30,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+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] number of elements 1`] = `3`;
+
+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] number of renders 1`] = `11`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id120",
+ "index": "Zx",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id122",
+ "index": "Zy",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 100,
+ "x": 30,
+ "y": 30,
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id121",
+ "index": "a1",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 100,
+ "x": 20,
+ "y": 20,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id121" => Delta {
+ "deleted": {
+ "index": "a1",
+ },
+ "inserted": {
+ "index": "Zz",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id121": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id120" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "Zx",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 10,
+ "y": 10,
+ },
+ },
+ "id121" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "Zz",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 20,
+ "y": 20,
+ },
+ },
+ "id122" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "Zy",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 30,
+ "y": 30,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+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] number of elements 1`] = `3`;
+
+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] number of renders 1`] = `11`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id133": true,
+ "id134": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id133": true,
+ "id134": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id133",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 9,
+ "width": 10,
+ "x": 90,
+ "y": 90,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id134",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 9,
+ "width": 10,
+ "x": 110,
+ "y": 110,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id138",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#a5d8ff",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id133": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id133" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id134": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id133": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id134" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id133": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id134": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id134": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id133" => Delta {
+ "deleted": {
+ "x": 90,
+ "y": 90,
+ },
+ "inserted": {
+ "x": 10,
+ "y": 10,
+ },
+ },
+ "id134" => Delta {
+ "deleted": {
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "x": 30,
+ "y": 30,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] number of elements 1`] = `3`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] number of renders 1`] = `25`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "freedraw",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id128",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 50,
+ 50,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 20,
+ 20,
+ ],
+ [
+ 50,
+ 50,
+ ],
+ [
+ 50,
+ 50,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "updated": 1,
+ "version": 7,
+ "width": 50,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id129",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#a5d8ff",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id128" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 50,
+ 50,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 20,
+ 20,
+ ],
+ [
+ 50,
+ 50,
+ ],
+ [
+ 50,
+ 50,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "width": 50,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] number of elements 1`] = `2`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] number of renders 1`] = `8`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id130": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 90,
+ "id": "id130",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 9,
+ "width": 90,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id132",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#a5d8ff",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id130": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id130" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id130" => Delta {
+ "deleted": {
+ "height": 90,
+ "width": 90,
+ },
+ "inserted": {
+ "height": 10,
+ "width": 10,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] number of elements 1`] = `2`;
+
+exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] number of renders 1`] = `13`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#ffc9c9",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementBackground",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id87": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id87",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "#ffc9c9",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id88",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#a5d8ff",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id87" => Delta {
+ "deleted": {
+ "backgroundColor": "transparent",
+ },
+ "inserted": {
+ "backgroundColor": "#ffc9c9",
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id87": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id87" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] number of elements 1`] = `2`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] number of renders 1`] = `10`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#ffc9c9",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementBackground",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id89": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "#ffc9c9",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id89",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#ffec99",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id89": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id89" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id89" => Delta {
+ "deleted": {
+ "backgroundColor": "#ffc9c9",
+ },
+ "inserted": {
+ "backgroundColor": "transparent",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] number of elements 1`] = `1`;
+
+exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] number of renders 1`] = `9`;
+
+exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ "B",
+ ],
+ "height": 100,
+ "id": "id94",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 6,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ "B",
+ ],
+ "height": 100,
+ "id": "id95",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 6,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "B",
+ ],
+ "height": 100,
+ "id": "id96",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] element 3 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "B",
+ ],
+ "height": 100,
+ "id": "id97",
+ "index": "a3",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id94" => Delta {
+ "deleted": {
+ "groupIds": [
+ "A",
+ "B",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id95" => Delta {
+ "deleted": {
+ "groupIds": [
+ "A",
+ "B",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] number of elements 1`] = `4`;
+
+exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] number of renders 1`] = `8`;
+
+exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id98": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 30,
+ "id": "id98",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 30,
+ 30,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 5,
+ 5,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ [
+ 15,
+ 15,
+ ],
+ [
+ 20,
+ 20,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 13,
+ "width": 30,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id98": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id98" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 10,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id98" => Delta {
+ "deleted": {
+ "height": 30,
+ "lastCommittedPoint": [
+ 30,
+ 30,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 5,
+ 5,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ [
+ 15,
+ 15,
+ ],
+ [
+ 20,
+ 20,
+ ],
+ ],
+ "width": 30,
+ },
+ "inserted": {
+ "height": 10,
+ "lastCommittedPoint": [
+ 10,
+ 10,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "width": 10,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": "id98",
+ },
+ "inserted": {
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] number of elements 1`] = `1`;
+
+exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] number of renders 1`] = `15`;
+
+exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "#ffec99",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id99",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id99": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id99" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "#ffec99",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id99": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id99" => Delta {
+ "deleted": {
+ "isDeleted": false,
+ },
+ "inserted": {
+ "isDeleted": false,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] number of elements 1`] = `1`;
+
+exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] number of renders 1`] = `11`;
+
+exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 126,
+ "id": "KPrBI4g_v9qUB1XxYLgSz",
+ "index": "a0",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 157,
+ "x": 600,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 129,
+ "id": "u2JGnnmoJ0VATV4vCNJE5",
+ "index": "a1",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "updated": 1,
+ "version": 4,
+ "width": 124,
+ "x": 1152,
+ "y": 516,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": true,
+ "endArrowhead": null,
+ "endBinding": {
+ "elementId": "u2JGnnmoJ0VATV4vCNJE5",
+ "fixedPoint": [
+ "0.49919",
+ "-0.03875",
+ ],
+ "focus": "-0.00161",
+ "gap": "3.53708",
+ },
+ "endIsSpecial": false,
+ "fillStyle": "solid",
+ "fixedSegments": [],
+ "frameId": null,
+ "groupIds": [],
+ "height": "236.10000",
+ "id": "6Rm4g567UQM4WjLwej2Vc",
+ "index": "a2",
+ "isDeleted": true,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "178.90000",
+ 0,
+ ],
+ [
+ "178.90000",
+ "236.10000",
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "KPrBI4g_v9qUB1XxYLgSz",
+ "fixedPoint": [
+ "1.03185",
+ "0.49921",
+ ],
+ "focus": "-0.00159",
+ "gap": 5,
+ },
+ "startIsSpecial": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 3,
+ "width": "178.90000",
+ "x": 1035,
+ "y": "274.90000",
+}
+`;
+
+exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "6Rm4g567UQM4WjLwej2Vc" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": true,
+ "endArrowhead": null,
+ "endBinding": {
+ "elementId": "u2JGnnmoJ0VATV4vCNJE5",
+ "fixedPoint": [
+ "0.49919",
+ "-0.03875",
+ ],
+ "focus": "-0.00161",
+ "gap": "3.53708",
+ },
+ "endIsSpecial": false,
+ "fillStyle": "solid",
+ "fixedSegments": [],
+ "frameId": null,
+ "groupIds": [],
+ "height": "236.10000",
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "178.90000",
+ 0,
+ ],
+ [
+ "178.90000",
+ "236.10000",
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "KPrBI4g_v9qUB1XxYLgSz",
+ "fixedPoint": [
+ "1.03185",
+ "0.49921",
+ ],
+ "focus": "-0.00159",
+ "gap": 5,
+ },
+ "startIsSpecial": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": "178.90000",
+ "x": 1035,
+ "y": "274.90000",
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {
+ "KPrBI4g_v9qUB1XxYLgSz" => Delta {
+ "deleted": {
+ "boundElements": [],
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "6Rm4g567UQM4WjLwej2Vc",
+ "type": "arrow",
+ },
+ ],
+ },
+ },
+ "u2JGnnmoJ0VATV4vCNJE5" => Delta {
+ "deleted": {
+ "boundElements": [],
+ },
+ "inserted": {
+ "boundElements": [
+ {
+ "id": "6Rm4g567UQM4WjLwej2Vc",
+ "type": "arrow",
+ },
+ ],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "KPrBI4g_v9qUB1XxYLgSz" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 126,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 157,
+ "x": 600,
+ "y": 0,
+ },
+ },
+ "u2JGnnmoJ0VATV4vCNJE5" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 129,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 124,
+ "x": 1152,
+ "y": 516,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] number of elements 1`] = `3`;
+
+exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] number of renders 1`] = `8`;
+
+exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#a5d8ff",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementBackground",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id90": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id90",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 13,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id90" => Delta {
+ "deleted": {
+ "backgroundColor": "#d0bfff",
+ },
+ "inserted": {
+ "backgroundColor": "#ffec99",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id90" => Delta {
+ "deleted": {
+ "backgroundColor": "transparent",
+ },
+ "inserted": {
+ "backgroundColor": "#d0bfff",
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id90": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id90" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] number of elements 1`] = `1`;
+
+exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] number of renders 1`] = `15`;
+
+exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": false,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "A",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id86",
+ "index": "a1",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 10,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id86": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id86" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] number of elements 1`] = `2`;
+
+exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] number of renders 1`] = `11`;
+
+exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id14": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id13",
+ "index": "a0",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id14",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "width": 10,
+ "x": 20,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id14": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id14" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 20,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] number of elements 1`] = `2`;
+
+exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] number of renders 1`] = `8`;
+
+exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "freedraw",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#e03131",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementStroke",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id32",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "width": 10,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id33",
+ "index": "a1",
+ "isDeleted": true,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "updated": 1,
+ "version": 5,
+ "width": 50,
+ "x": 60,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id34",
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#e03131",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "updated": 1,
+ "version": 4,
+ "width": 50,
+ "x": 150,
+ "y": -10,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id32": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id32" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id32": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id34" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#e03131",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "width": 50,
+ "x": 150,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] number of elements 1`] = `3`;
+
+exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] number of renders 1`] = `12`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": -50,
+ "scrollY": -50,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": false,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#000",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "A",
+ "index": "a0",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "B",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "viewBackgroundColor": "#000",
+ },
+ "inserted": {
+ "viewBackgroundColor": "#FFF",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "A" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "isDeleted": false,
+ },
+ },
+ },
+ "removed": Map {
+ "B" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] number of elements 1`] = `2`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] number of renders 1`] = `6`;
+
+exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id84": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": false,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "A",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id84",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 10,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id84": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id84" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] number of elements 1`] = `2`;
+
+exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] number of renders 1`] = `7`;
+
+exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id19": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": false,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": true,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "A",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id19",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 10,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id19": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id19" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] number of elements 1`] = `2`;
+
+exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] number of renders 1`] = `7`;
+
+exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id15": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id15",
+ "index": "a0",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id15": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id15": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id15": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id15" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+ "undoStack": [],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] number of elements 1`] = `1`;
+
+exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] number of renders 1`] = `13`;
+
+exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id8": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id7",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id8",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 10,
+ "x": 20,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id7": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id7" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id7": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id7": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id8": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id7": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id8" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 20,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] number of elements 1`] = `2`;
+
+exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] number of renders 1`] = `12`;
+
+exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] number of elements 1`] = `1`;
+
+exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] number of renders 1`] = `4`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "A": true,
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "id": "id1",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "id": "id2",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ "id2": true,
+ },
+ "selectedGroupIds": {
+ "A": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] number of elements 1`] = `2`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] number of renders 1`] = `7`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id5",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id6",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id5" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id6" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] number of elements 1`] = `2`;
+
+exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] number of renders 1`] = `5`;
+
+exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#a5d8ff",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementBackground",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id11": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id11": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id11",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 11,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id11" => Delta {
+ "deleted": {
+ "backgroundColor": "#ffc9c9",
+ },
+ "inserted": {
+ "backgroundColor": "#a5d8ff",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id11" => Delta {
+ "deleted": {
+ "backgroundColor": "transparent",
+ },
+ "inserted": {
+ "backgroundColor": "#ffc9c9",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id11": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id11": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id11" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] number of elements 1`] = `1`;
+
+exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] number of renders 1`] = `15`;
+
+exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#000",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "name": "New name",
+ },
+ "inserted": {
+ "name": "Old name",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "viewBackgroundColor": "#000",
+ },
+ "inserted": {
+ "viewBackgroundColor": "#FFF",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] number of elements 1`] = `0`;
+
+exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] number of renders 1`] = `8`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id56": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id61": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id57",
+ "type": "text",
+ },
+ {
+ "id": "id61",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id56",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 100,
+ "x": -100,
+ "y": -50,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id56",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id57",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "center",
+ "type": "text",
+ "updated": 1,
+ "version": 6,
+ "verticalAlign": "middle",
+ "width": 30,
+ "x": -65,
+ "y": "-12.50000",
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id61",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id58",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 100,
+ "x": 100,
+ "y": -50,
+}
+`;
+
+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] element 3 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id58",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id61",
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id56",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 10,
+ "width": "98.58579",
+ "x": "0.70711",
+ "y": 0,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id61": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id61" => Delta {
+ "deleted": {
+ "isDeleted": false,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ },
+ "inserted": {
+ "isDeleted": true,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ },
+ },
+ },
+ "updated": Map {
+ "id56" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id61",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id58" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id61",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id56" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": -100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id57" => Delta {
+ "deleted": {
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "left",
+ "type": "text",
+ "verticalAlign": "top",
+ "width": 100,
+ "x": -200,
+ "y": -200,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id58" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id56": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id57": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id57": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id56" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id57",
+ "type": "text",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id57" => Delta {
+ "deleted": {
+ "containerId": "id56",
+ "height": 25,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "width": 30,
+ "x": -65,
+ "y": "-12.50000",
+ },
+ "inserted": {
+ "containerId": null,
+ "height": 100,
+ "textAlign": "left",
+ "verticalAlign": "top",
+ "width": 100,
+ "x": -200,
+ "y": -200,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id61": true,
+ },
+ "selectedLinearElementId": "id61",
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id56": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id61" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id58",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id56",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id56" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id61",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id58" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id61",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `4`;
+
+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] number of renders 1`] = `12`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id50": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id55": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id51",
+ "type": "text",
+ },
+ {
+ "id": "id55",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id50",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 100,
+ "x": -100,
+ "y": -50,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id50",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id51",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "center",
+ "type": "text",
+ "updated": 1,
+ "version": 8,
+ "verticalAlign": "middle",
+ "width": 30,
+ "x": -65,
+ "y": "-12.50000",
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id55",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id52",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 100,
+ "x": 100,
+ "y": -50,
+}
+`;
+
+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] element 3 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id52",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id55",
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id50",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 10,
+ "width": "98.58579",
+ "x": "0.70711",
+ "y": 0,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id50" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": -100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id51" => Delta {
+ "deleted": {
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "left",
+ "type": "text",
+ "verticalAlign": "top",
+ "width": 100,
+ "x": -200,
+ "y": -200,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id52" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id50": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id51": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id51": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id50" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id51",
+ "type": "text",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id51" => Delta {
+ "deleted": {
+ "containerId": "id50",
+ "height": 25,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "width": 30,
+ "x": -65,
+ "y": "-12.50000",
+ },
+ "inserted": {
+ "containerId": null,
+ "height": 100,
+ "textAlign": "left",
+ "verticalAlign": "top",
+ "width": 100,
+ "x": -200,
+ "y": -200,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id55": true,
+ },
+ "selectedLinearElementId": "id55",
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id50": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id55" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id52",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id50",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id50" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id55",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id52" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id55",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `4`;
+
+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] number of renders 1`] = `12`;
+
+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] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id62": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id67": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+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] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id63",
+ "type": "text",
+ },
+ {
+ "id": "id67",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id62",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 12,
+ "width": 100,
+ "x": -100,
+ "y": -50,
+}
+`;
+
+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] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id62",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id63",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "center",
+ "type": "text",
+ "updated": 1,
+ "version": 12,
+ "verticalAlign": "middle",
+ "width": 30,
+ "x": -65,
+ "y": "-12.50000",
+}
+`;
+
+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] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id67",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id64",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 9,
+ "width": 100,
+ "x": 100,
+ "y": -50,
+}
+`;
+
+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] element 3 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id64",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id67",
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id62",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 10,
+ "width": "98.58579",
+ "x": "0.70711",
+ "y": 0,
+}
+`;
+
+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] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id62" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": -100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id63" => Delta {
+ "deleted": {
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "left",
+ "type": "text",
+ "verticalAlign": "top",
+ "width": 100,
+ "x": -200,
+ "y": -200,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id64" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id62": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id63": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id63": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id62" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id63",
+ "type": "text",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id63" => Delta {
+ "deleted": {
+ "containerId": "id62",
+ "height": 25,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "width": 30,
+ "x": -65,
+ "y": "-12.50000",
+ },
+ "inserted": {
+ "containerId": null,
+ "height": 100,
+ "textAlign": "left",
+ "verticalAlign": "top",
+ "width": 100,
+ "x": -200,
+ "y": -200,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id67": true,
+ },
+ "selectedLinearElementId": "id67",
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id62": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id67" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id64",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id62",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id62" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id67",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id64" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id67",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+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] number of elements 1`] = `4`;
+
+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] number of renders 1`] = `20`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id68": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id73",
+ "type": "arrow",
+ },
+ {
+ "id": "id69",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id68",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 100,
+ "x": -100,
+ "y": -50,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id68",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id69",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "center",
+ "type": "text",
+ "updated": 1,
+ "version": 8,
+ "verticalAlign": "middle",
+ "width": 30,
+ "x": -65,
+ "y": "-12.50000",
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id73",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id70",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 100,
+ "x": 100,
+ "y": -50,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] element 3 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id70",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id73",
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id68",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 10,
+ "width": "98.58579",
+ "x": "0.70711",
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id68": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id68" => Delta {
+ "deleted": {
+ "isDeleted": false,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id69" => Delta {
+ "deleted": {
+ "isDeleted": false,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id73" => Delta {
+ "deleted": {
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "startBinding": {
+ "elementId": "id68",
+ "focus": 0,
+ "gap": 1,
+ },
+ },
+ "inserted": {
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "startBinding": null,
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id68" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": -100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id69" => Delta {
+ "deleted": {
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "left",
+ "type": "text",
+ "verticalAlign": "top",
+ "width": 100,
+ "x": -200,
+ "y": -200,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id70" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id68": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id69": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id69": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id68" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id69",
+ "type": "text",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id69" => Delta {
+ "deleted": {
+ "containerId": "id68",
+ "height": 25,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "width": 30,
+ "x": -65,
+ "y": "-12.50000",
+ },
+ "inserted": {
+ "containerId": null,
+ "height": 100,
+ "textAlign": "left",
+ "verticalAlign": "top",
+ "width": 100,
+ "x": -200,
+ "y": -200,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id73": true,
+ },
+ "selectedLinearElementId": "id73",
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id68": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id73" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id70",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id68",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id68" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id73",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id70" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id73",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id68": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id73": true,
+ },
+ "selectedLinearElementId": "id73",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] number of elements 1`] = `4`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] number of renders 1`] = `14`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id75": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id75": true,
+ "id77": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id80",
+ "type": "arrow",
+ },
+ {
+ "id": "id76",
+ "type": "text",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id75",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 100,
+ "x": -100,
+ "y": -50,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": "id75",
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 25,
+ "id": "id76",
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "center",
+ "type": "text",
+ "updated": 1,
+ "version": 8,
+ "verticalAlign": "middle",
+ "width": 30,
+ "x": -65,
+ "y": "-12.50000",
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id80",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id77",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 100,
+ "x": 100,
+ "y": -50,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] element 3 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id77",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id80",
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "98.58579",
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id75",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 11,
+ "width": "98.58579",
+ "x": "0.70711",
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id75": true,
+ "id77": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id75" => Delta {
+ "deleted": {
+ "isDeleted": false,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id76" => Delta {
+ "deleted": {
+ "isDeleted": false,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id77" => Delta {
+ "deleted": {
+ "isDeleted": false,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id80" => Delta {
+ "deleted": {
+ "endBinding": {
+ "elementId": "id77",
+ "focus": -0,
+ "gap": 1,
+ },
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "startBinding": {
+ "elementId": "id75",
+ "focus": 0,
+ "gap": 1,
+ },
+ },
+ "inserted": {
+ "endBinding": null,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "startBinding": null,
+ },
+ },
+ },
+ },
+ },
+ ],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id75" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": -100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id76" => Delta {
+ "deleted": {
+ "angle": 0,
+ "autoResize": true,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "containerId": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "fontFamily": 5,
+ "fontSize": 20,
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "lineHeight": "1.25000",
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "originalText": "ola",
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "text": "ola",
+ "textAlign": "left",
+ "type": "text",
+ "verticalAlign": "top",
+ "width": 100,
+ "x": -200,
+ "y": -200,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id77" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": -50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id75": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id76": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id76": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id75" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id76",
+ "type": "text",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id76" => Delta {
+ "deleted": {
+ "containerId": "id75",
+ "height": 25,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "width": 30,
+ "x": -65,
+ "y": "-12.50000",
+ },
+ "inserted": {
+ "containerId": null,
+ "height": 100,
+ "textAlign": "left",
+ "verticalAlign": "top",
+ "width": 100,
+ "x": -200,
+ "y": -200,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id80": true,
+ },
+ "selectedLinearElementId": "id80",
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id75": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id80" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id77",
+ "focus": -0,
+ "gap": 1,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 100,
+ 0,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id75",
+ "focus": 0,
+ "gap": 1,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id75" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id80",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ "id77" => Delta {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id80",
+ "type": "arrow",
+ },
+ ],
+ },
+ "inserted": {
+ "boundElements": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id75": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id80": true,
+ },
+ "selectedLinearElementId": "id80",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id77": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] number of elements 1`] = `4`;
+
+exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] number of renders 1`] = `15`;
+
+exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id45": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id45": true,
+ "id47": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id46",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "width": 10,
+ "x": 20,
+ "y": 20,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id45",
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id47",
+ "index": "a3",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 10,
+ "width": 10,
+ "x": 40,
+ "y": 40,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id45": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id45" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id46": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id45": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id46" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id47": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id46": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id47" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 40,
+ "y": 40,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id47" => Delta {
+ "deleted": {
+ "index": "a0V",
+ },
+ "inserted": {
+ "index": "a2",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id45": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id47": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id47": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id45" => Delta {
+ "deleted": {
+ "index": "a2",
+ },
+ "inserted": {
+ "index": "Zz",
+ },
+ },
+ "id47" => Delta {
+ "deleted": {
+ "index": "a3",
+ },
+ "inserted": {
+ "index": "a0",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] number of elements 1`] = `3`;
+
+exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] number of renders 1`] = `20`;
+
+exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id36": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id42": true,
+ "id44": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id43": true,
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "id": "id35",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "id": "id36",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 100,
+ "y": 100,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id43",
+ ],
+ "height": 100,
+ "id": "id42",
+ "index": "a1G",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 3 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id43",
+ ],
+ "height": 100,
+ "id": "id44",
+ "index": "a1V",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "width": 100,
+ "x": 110,
+ "y": 110,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 4 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id40",
+ ],
+ "height": 100,
+ "id": "id39",
+ "index": "a2",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 6,
+ "width": 100,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 5 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id40",
+ ],
+ "height": 100,
+ "id": "id41",
+ "index": "a3",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 6,
+ "width": 100,
+ "x": 110,
+ "y": 110,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id35": true,
+ "id36": true,
+ },
+ "selectedGroupIds": {
+ "A": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id35" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id36" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "A",
+ ],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 100,
+ "y": 100,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id42": true,
+ "id44": true,
+ },
+ "selectedGroupIds": {
+ "id43": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id35": true,
+ "id36": true,
+ },
+ "selectedGroupIds": {
+ "A": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id42" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id43",
+ ],
+ "height": 100,
+ "index": "a1G",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id44" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id43",
+ ],
+ "height": 100,
+ "index": "a1V",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] number of elements 1`] = `6`;
+
+exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] number of renders 1`] = `18`;
+
+exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id23": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id22",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 10,
+ "x": 10,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id23",
+ "index": "a1",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 10,
+ "x": 20,
+ "y": 20,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] element 2 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id24",
+ "index": "a2",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 8,
+ "width": 10,
+ "x": 40,
+ "y": 40,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id22": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id22" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id23": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id22": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id23" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id24": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id23": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id24" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 40,
+ "y": 40,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id23": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id24": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id24": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id23": true,
+ "id24": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id23" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "isDeleted": false,
+ },
+ },
+ "id24" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "isDeleted": false,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] number of elements 1`] = `3`;
+
+exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] number of renders 1`] = `27`;
+
+exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id27": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id27": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "id": "id27",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 20,
+ 0,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ [
+ 20,
+ 20,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 15,
+ "width": 20,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id27": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id27" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 10,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id27" => Delta {
+ "deleted": {
+ "lastCommittedPoint": [
+ 20,
+ 0,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ [
+ 20,
+ 0,
+ ],
+ ],
+ "width": 20,
+ },
+ "inserted": {
+ "lastCommittedPoint": [
+ 10,
+ 10,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "width": 10,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": "id27",
+ },
+ "inserted": {
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingLinearElementId": "id27",
+ },
+ "inserted": {
+ "editingLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id27" => Delta {
+ "deleted": {
+ "height": 20,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ [
+ 20,
+ 20,
+ ],
+ ],
+ },
+ "inserted": {
+ "height": 10,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ [
+ 20,
+ 0,
+ ],
+ ],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingLinearElementId": null,
+ },
+ "inserted": {
+ "editingLinearElementId": "id27",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] number of elements 1`] = `1`;
+
+exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] number of renders 1`] = `21`;
diff --git a/packages/excalidraw/tests/__snapshots__/linearElementEditor.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/linearElementEditor.test.tsx.snap
new file mode 100644
index 0000000..0085798
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/linearElementEditor.test.tsx.snap
@@ -0,0 +1,57 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`Test Linear Elements > Test bound text element > should bind text to arrow when clicked on arrow and enter pressed 1`] = `
+"Online whiteboard
+collaboration made
+easy"
+`;
+
+exports[`Test Linear Elements > Test bound text element > should bind text to arrow when double clicked 1`] = `
+"Online whiteboard
+collaboration made
+easy"
+`;
+
+exports[`Test Linear Elements > Test bound text element > should match styles for text editor 1`] = `
+<textarea
+ class="excalidraw-wysiwyg"
+ data-type="wysiwyg"
+ dir="auto"
+ style="position: absolute; display: inline-block; min-height: 1em; backface-visibility: hidden; margin: 0px; padding: 0px; border: 0px; outline: 0; resize: none; background: transparent; overflow: hidden; z-index: var(--zIndex-wysiwyg); word-break: break-word; white-space: pre-wrap; overflow-wrap: break-word; box-sizing: content-box; width: 10.5px; height: 26.25px; left: 35px; top: 7.5px; transform: translate(0px, 0px) scale(1) rotate(0deg); text-align: center; vertical-align: middle; color: rgb(30, 30, 30); opacity: 1; filter: var(--theme-filter); max-height: 992.5px; font: Emoji 20px 20px; line-height: 1.25; font-family: Excalifont, Xiaolai, Segoe UI Emoji;"
+ tabindex="0"
+ wrap="off"
+/>
+`;
+
+exports[`Test Linear Elements > Test bound text element > should resize and position the bound text and bounding box correctly when 3 pointer arrow element resized 2`] = `
+"Online whiteboard
+collaboration made
+easy"
+`;
+
+exports[`Test Linear Elements > Test bound text element > should resize and position the bound text and bounding box correctly when 3 pointer arrow element resized 6`] = `
+"Online whiteboard
+collaboration made easy"
+`;
+
+exports[`Test Linear Elements > Test bound text element > should resize and position the bound text correctly when 2 pointer linear element resized 2`] = `
+"Online whiteboard
+collaboration made
+easy"
+`;
+
+exports[`Test Linear Elements > Test bound text element > should resize and position the bound text correctly when 2 pointer linear element resized 5`] = `
+"Online whiteboard
+collaboration made easy"
+`;
+
+exports[`Test Linear Elements > Test bound text element > should wrap the bound text when arrow bound container moves 1`] = `
+"Online whiteboard
+collaboration made easy"
+`;
+
+exports[`Test Linear Elements > Test bound text element > should wrap the bound text when arrow bound container moves 2`] = `
+"Online whiteboard
+collaboration made
+easy"
+`;
diff --git a/packages/excalidraw/tests/__snapshots__/move.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/move.test.tsx.snap
new file mode 100644
index 0000000..90236a4
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/move.test.tsx.snap
@@ -0,0 +1,239 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`duplicate element on move when ALT is clicked > rectangle 5`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id2",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 238820263,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "versionNonce": 400692809,
+ "width": 30,
+ "x": 30,
+ "y": 20,
+}
+`;
+
+exports[`duplicate element on move when ALT is clicked > rectangle 6`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 6,
+ "versionNonce": 23633383,
+ "width": 30,
+ "x": -10,
+ "y": 60,
+}
+`;
+
+exports[`move element > rectangle 5`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 1116226695,
+ "width": 30,
+ "x": 0,
+ "y": 40,
+}
+`;
+
+exports[`move element > rectangles with binding arrow 5`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id2",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 1723083209,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`move element > rectangles with binding arrow 6`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [
+ {
+ "id": "id2",
+ "type": "arrow",
+ },
+ ],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 300,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1150084233,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 7,
+ "versionNonce": 745419401,
+ "width": 300,
+ "x": 201,
+ "y": 2,
+}
+`;
+
+exports[`move element > rectangles with binding arrow 7`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": {
+ "elementId": "id1",
+ "focus": "-0.46667",
+ "gap": 10,
+ },
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": "87.29887",
+ "id": "id2",
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ "86.85786",
+ "87.29887",
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1604849351,
+ "startArrowhead": null,
+ "startBinding": {
+ "elementId": "id0",
+ "focus": "-0.60000",
+ "gap": 10,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 11,
+ "versionNonce": 1051383431,
+ "width": "86.85786",
+ "x": "107.07107",
+ "y": "47.07107",
+}
+`;
diff --git a/packages/excalidraw/tests/__snapshots__/multiPointCreate.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/multiPointCreate.test.tsx.snap
new file mode 100644
index 0000000..1b312a5
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/multiPointCreate.test.tsx.snap
@@ -0,0 +1,114 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`multi point mode in linear elements > arrow 3`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 110,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 70,
+ 110,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 20,
+ 30,
+ ],
+ [
+ 70,
+ 110,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1278240551,
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 8,
+ "versionNonce": 1604849351,
+ "width": 70,
+ "x": 30,
+ "y": 30,
+}
+`;
+
+exports[`multi point mode in linear elements > line 3`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 110,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 70,
+ 110,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 20,
+ 30,
+ ],
+ [
+ 70,
+ 110,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1278240551,
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "updated": 1,
+ "version": 8,
+ "versionNonce": 1604849351,
+ "width": 70,
+ "x": 30,
+ "y": 30,
+}
+`;
diff --git a/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap
new file mode 100644
index 0000000..5d48ead
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap
@@ -0,0 +1,14782 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`given element A and group of elements B and given both are selected when user clicks on B, on pointer up only elements from B should be selected > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`given element A and group of elements B and given both are selected when user clicks on B, on pointer up only elements from B should be selected > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 60,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ ],
+ "index": "a2",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a0",
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ ],
+ "index": "a3",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a2",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`given element A and group of elements B and given both are selected when user clicks on B, on pointer up only elements from B should be selected > [end of test] number of elements 1`] = `0`;
+
+exports[`given element A and group of elements B and given both are selected when user clicks on B, on pointer up only elements from B should be selected > [end of test] number of renders 1`] = `18`;
+
+exports[`given element A and group of elements B and given both are selected when user shift-clicks on B, on pointer up only element A should be selected > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ "id4": false,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`given element A and group of elements B and given both are selected when user shift-clicks on B, on pointer up only element A should be selected > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 220,
+ "y": 220,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ "index": "a2",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a0",
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ "index": "a3",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a2",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ "id4": false,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`given element A and group of elements B and given both are selected when user shift-clicks on B, on pointer up only element A should be selected > [end of test] number of elements 1`] = `0`;
+
+exports[`given element A and group of elements B and given both are selected when user shift-clicks on B, on pointer up only element A should be selected > [end of test] number of renders 1`] = `16`;
+
+exports[`regression tests > Cmd/Ctrl-click exclusively select element under pointer > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": "id10",
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": false,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id7": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > Cmd/Ctrl-click exclusively select element under pointer > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id7": true,
+ },
+ },
+ "inserted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id7" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 60,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id7": true,
+ },
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id7": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id10": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id7" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ "id7": true,
+ },
+ "selectedGroupIds": {
+ "id10": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id10",
+ "selectedElementIds": {
+ "id7": true,
+ },
+ },
+ "inserted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > Cmd/Ctrl-click exclusively select element under pointer > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > Cmd/Ctrl-click exclusively select element under pointer > [end of test] number of renders 1`] = `26`;
+
+exports[`regression tests > Drags selected element when hitting only bounding box and keeps element selected > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > Drags selected element when hitting only bounding box and keeps element selected > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 25,
+ "y": 25,
+ },
+ "inserted": {
+ "x": 0,
+ "y": 0,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > Drags selected element when hitting only bounding box and keeps element selected > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > Drags selected element when hitting only bounding box and keeps element selected > [end of test] number of renders 1`] = `10`;
+
+exports[`regression tests > adjusts z order when grouping > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > adjusts z order when grouping > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ ],
+ "index": "a2",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a0",
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ ],
+ "index": "a3",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a2",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > adjusts z order when grouping > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > adjusts z order when grouping > [end of test] number of renders 1`] = `15`;
+
+exports[`regression tests > alt-drag duplicates an element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > alt-drag duplicates an element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "index": "a1",
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "index": "a0",
+ "x": 10,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > alt-drag duplicates an element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > alt-drag duplicates an element > [end of test] number of renders 1`] = `8`;
+
+exports[`regression tests > arrow keys > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > arrow keys > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > arrow keys > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > arrow keys > [end of test] number of renders 1`] = `12`;
+
+exports[`regression tests > can drag element that covers another element, while another elem is selected > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > can drag element that covers another element, while another elem is selected > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 200,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 200,
+ "x": 100,
+ "y": 100,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 200,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 200,
+ "x": 100,
+ "y": 100,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 350,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 350,
+ "x": 300,
+ "y": 300,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id1" => Delta {
+ "deleted": {
+ "x": 300,
+ "y": 300,
+ },
+ "inserted": {
+ "x": 100,
+ "y": 100,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > can drag element that covers another element, while another elem is selected > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > can drag element that covers another element, while another elem is selected > [end of test] number of renders 1`] = `15`;
+
+exports[`regression tests > change the properties of a shape > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#ffc9c9",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1971c2",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementStroke",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > change the properties of a shape > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "backgroundColor": "#ffec99",
+ },
+ "inserted": {
+ "backgroundColor": "transparent",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "backgroundColor": "#ffc9c9",
+ },
+ "inserted": {
+ "backgroundColor": "#ffec99",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "strokeColor": "#1971c2",
+ },
+ "inserted": {
+ "strokeColor": "#1e1e1e",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > change the properties of a shape > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > change the properties of a shape > [end of test] number of renders 1`] = `9`;
+
+exports[`regression tests > click on an element and drag it > [dragged] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > click on an element and drag it > [dragged] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 1116226695,
+ "width": 10,
+ "x": 20,
+ "y": 20,
+}
+`;
+
+exports[`regression tests > click on an element and drag it > [dragged] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "x": 10,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > click on an element and drag it > [dragged] number of elements 1`] = `1`;
+
+exports[`regression tests > click on an element and drag it > [dragged] number of renders 1`] = `8`;
+
+exports[`regression tests > click on an element and drag it > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > click on an element and drag it > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "x": 10,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "x": 20,
+ "y": 20,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > click on an element and drag it > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > click on an element and drag it > [end of test] number of renders 1`] = `10`;
+
+exports[`regression tests > click to select a shape > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > click to select a shape > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > click to select a shape > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > click to select a shape > [end of test] number of renders 1`] = `10`;
+
+exports[`regression tests > click-drag to select a group > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > click-drag to select a group > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > click-drag to select a group > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > click-drag to select a group > [end of test] number of renders 1`] = `14`;
+
+exports[`regression tests > deleting last but one element in editing group should unselect the group > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id4": false,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > deleting last but one element in editing group should unselect the group > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": false,
+ },
+ },
+ "inserted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id0" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "isDeleted": false,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": false,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": false,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > deleting last but one element in editing group should unselect the group > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > deleting last but one element in editing group should unselect the group > [end of test] number of renders 1`] = `17`;
+
+exports[`regression tests > deselects group of selected elements on pointer down when pointer doesn't hit any element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id3",
+ "index": null,
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1505387817,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "selection",
+ "updated": 1,
+ "version": 1,
+ "versionNonce": 0,
+ "width": 0,
+ "x": 500,
+ "y": 500,
+ },
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > deselects group of selected elements on pointer down when pointer doesn't hit any element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > deselects group of selected elements on pointer down when pointer doesn't hit any element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > deselects group of selected elements on pointer down when pointer doesn't hit any element > [end of test] number of renders 1`] = `11`;
+
+exports[`regression tests > deselects group of selected elements on pointer up when pointer hits common bounding box without hitting any element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > deselects group of selected elements on pointer up when pointer hits common bounding box without hitting any element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > deselects group of selected elements on pointer up when pointer hits common bounding box without hitting any element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > deselects group of selected elements on pointer up when pointer hits common bounding box without hitting any element > [end of test] number of renders 1`] = `11`;
+
+exports[`regression tests > deselects selected element on pointer down when pointer doesn't hit any element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id1",
+ "index": null,
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1150084233,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "selection",
+ "updated": 1,
+ "version": 1,
+ "versionNonce": 0,
+ "width": 0,
+ "x": 110,
+ "y": 110,
+ },
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > deselects selected element on pointer down when pointer doesn't hit any element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > deselects selected element on pointer down when pointer doesn't hit any element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > deselects selected element on pointer down when pointer doesn't hit any element > [end of test] number of renders 1`] = `7`;
+
+exports[`regression tests > deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element > [end of test] number of renders 1`] = `7`;
+
+exports[`regression tests > double click to edit a group > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": "id3",
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > double click to edit a group > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > double click to edit a group > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > double click to edit a group > [end of test] number of renders 1`] = `15`;
+
+exports[`regression tests > drags selected elements from point inside common bounding box that doesn't hit any element and keeps elements selected after dragging > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > drags selected elements from point inside common bounding box that doesn't hit any element and keeps elements selected after dragging > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 25,
+ "y": 25,
+ },
+ "inserted": {
+ "x": 0,
+ "y": 0,
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "x": 135,
+ "y": 135,
+ },
+ "inserted": {
+ "x": 110,
+ "y": 110,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > drags selected elements from point inside common bounding box that doesn't hit any element and keeps elements selected after dragging > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > drags selected elements from point inside common bounding box that doesn't hit any element and keeps elements selected after dragging > [end of test] number of renders 1`] = `12`;
+
+exports[`regression tests > draw every type of shape > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "freedraw",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > draw every type of shape > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 10,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 20,
+ "x": 40,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 20,
+ "x": 70,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id3": true,
+ },
+ "selectedLinearElementId": "id3",
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id3" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 50,
+ "x": 130,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id4": true,
+ },
+ "selectedLinearElementId": "id4",
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id3": true,
+ },
+ "selectedLinearElementId": "id3",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id4" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a4",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "width": 50,
+ "x": 220,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id5": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id4": true,
+ },
+ "selectedLinearElementId": "id4",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id5" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a5",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 50,
+ "x": 310,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id5" => Delta {
+ "deleted": {
+ "height": 20,
+ "lastCommittedPoint": [
+ 80,
+ 20,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ [
+ 80,
+ 20,
+ ],
+ ],
+ "width": 80,
+ },
+ "inserted": {
+ "height": 10,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "width": 50,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": "id5",
+ },
+ "inserted": {
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id6": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id5": true,
+ },
+ "selectedLinearElementId": "id5",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id6" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a6",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "width": 50,
+ "x": 430,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id6" => Delta {
+ "deleted": {
+ "height": 20,
+ "lastCommittedPoint": [
+ 80,
+ 20,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ [
+ 80,
+ 20,
+ ],
+ ],
+ "width": 80,
+ },
+ "inserted": {
+ "height": 10,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "width": 50,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": "id6",
+ },
+ "inserted": {
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id6": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": null,
+ },
+ "inserted": {
+ "selectedLinearElementId": "id6",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id7" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a7",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "width": 50,
+ "x": 550,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > draw every type of shape > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > draw every type of shape > [end of test] number of renders 1`] = `33`;
+
+exports[`regression tests > given a group of selected elements with an element that is not selected inside the group common bounding box when element that is not selected is clicked should switch selection to not selected element on pointer up > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > given a group of selected elements with an element that is not selected inside the group common bounding box when element that is not selected is clicked should switch selection to not selected element on pointer up > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 100,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 100,
+ "x": 310,
+ "y": 310,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > given a group of selected elements with an element that is not selected inside the group common bounding box when element that is not selected is clicked should switch selection to not selected element on pointer up > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > given a group of selected elements with an element that is not selected inside the group common bounding box when element that is not selected is clicked should switch selection to not selected element on pointer up > [end of test] number of renders 1`] = `14`;
+
+exports[`regression tests > given a selected element A and a not selected element B with higher z-index than A and given B partially overlaps A when there's a shift-click on the overlapped section B is added to the selection > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#ffc9c9",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementBackground",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > given a selected element A and a not selected element B with higher z-index than A and given B partially overlaps A when there's a shift-click on the overlapped section B is added to the selection > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "#ffc9c9",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 1000,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 1000,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "#ffc9c9",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 1000,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 1000,
+ "x": 500,
+ "y": 500,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > given a selected element A and a not selected element B with higher z-index than A and given B partially overlaps A when there's a shift-click on the overlapped section B is added to the selection > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > given a selected element A and a not selected element B with higher z-index than A and given B partially overlaps A when there's a shift-click on the overlapped section B is added to the selection > [end of test] number of renders 1`] = `12`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when clicking intersection between A and B B should be selected on pointer up > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when clicking intersection between A and B B should be selected on pointer up > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 1000,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 1000,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 500,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 500,
+ "x": 500,
+ "y": 500,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when clicking intersection between A and B B should be selected on pointer up > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when clicking intersection between A and B B should be selected on pointer up > [end of test] number of renders 1`] = `7`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when dragging on intersection between A and B A should be dragged and keep being selected > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when dragging on intersection between A and B A should be dragged and keep being selected > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 1000,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 1000,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 500,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 500,
+ "x": 500,
+ "y": 500,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 100,
+ "y": 100,
+ },
+ "inserted": {
+ "x": 0,
+ "y": 0,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when dragging on intersection between A and B A should be dragged and keep being selected > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when dragging on intersection between A and B A should be dragged and keep being selected > [end of test] number of renders 1`] = `8`;
+
+exports[`regression tests > key 2 selects rectangle tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 2 selects rectangle tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 2 selects rectangle tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 2 selects rectangle tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key 3 selects diamond tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 3 selects diamond tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 3 selects diamond tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 3 selects diamond tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key 4 selects ellipse tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 4 selects ellipse tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 4 selects ellipse tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 4 selects ellipse tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": LinearElementEditor {
+ "elbowed": false,
+ "elementId": "id0",
+ "endBindingElement": "keep",
+ "hoverPointIndex": -1,
+ "isDragging": false,
+ "lastUncommittedPoint": null,
+ "pointerDownState": {
+ "lastClickedIsEndPoint": false,
+ "lastClickedPoint": -1,
+ "origin": null,
+ "prevSelectedPointsIndices": null,
+ "segmentMidpoint": {
+ "added": false,
+ "index": null,
+ "value": null,
+ },
+ },
+ "pointerOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "segmentMidPointHoveredCoords": null,
+ "selectedPointsIndices": null,
+ "startBindingElement": "keep",
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 5 selects arrow tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedLinearElementId": "id0",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 5 selects arrow tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 5 selects arrow tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key 6 selects line tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": LinearElementEditor {
+ "elbowed": false,
+ "elementId": "id0",
+ "endBindingElement": "keep",
+ "hoverPointIndex": -1,
+ "isDragging": false,
+ "lastUncommittedPoint": null,
+ "pointerDownState": {
+ "lastClickedIsEndPoint": false,
+ "lastClickedPoint": -1,
+ "origin": null,
+ "prevSelectedPointsIndices": null,
+ "segmentMidpoint": {
+ "added": false,
+ "index": null,
+ "value": null,
+ },
+ },
+ "pointerOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "segmentMidPointHoveredCoords": null,
+ "selectedPointsIndices": null,
+ "startBindingElement": "keep",
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 6 selects line tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedLinearElementId": "id0",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 6 selects line tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 6 selects line tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key 7 selects freedraw tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "freedraw",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 7 selects freedraw tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 10,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 7 selects freedraw tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 7 selects freedraw tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key a selects arrow tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": LinearElementEditor {
+ "elbowed": false,
+ "elementId": "id0",
+ "endBindingElement": "keep",
+ "hoverPointIndex": -1,
+ "isDragging": false,
+ "lastUncommittedPoint": null,
+ "pointerDownState": {
+ "lastClickedIsEndPoint": false,
+ "lastClickedPoint": -1,
+ "origin": null,
+ "prevSelectedPointsIndices": null,
+ "segmentMidpoint": {
+ "added": false,
+ "index": null,
+ "value": null,
+ },
+ },
+ "pointerOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "segmentMidPointHoveredCoords": null,
+ "selectedPointsIndices": null,
+ "startBindingElement": "keep",
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key a selects arrow tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedLinearElementId": "id0",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key a selects arrow tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key a selects arrow tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key d selects diamond tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key d selects diamond tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key d selects diamond tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key d selects diamond tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key l selects line tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": LinearElementEditor {
+ "elbowed": false,
+ "elementId": "id0",
+ "endBindingElement": "keep",
+ "hoverPointIndex": -1,
+ "isDragging": false,
+ "lastUncommittedPoint": null,
+ "pointerDownState": {
+ "lastClickedIsEndPoint": false,
+ "lastClickedPoint": -1,
+ "origin": null,
+ "prevSelectedPointsIndices": null,
+ "segmentMidpoint": {
+ "added": false,
+ "index": null,
+ "value": null,
+ },
+ },
+ "pointerOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "segmentMidPointHoveredCoords": null,
+ "selectedPointsIndices": null,
+ "startBindingElement": "keep",
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key l selects line tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedLinearElementId": "id0",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key l selects line tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key l selects line tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key o selects ellipse tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key o selects ellipse tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key o selects ellipse tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key o selects ellipse tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key p selects freedraw tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "freedraw",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key p selects freedraw tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 10,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key p selects freedraw tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key p selects freedraw tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key r selects rectangle tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key r selects rectangle tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key r selects rectangle tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key r selects rectangle tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > make a group and duplicate it > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > make a group and duplicate it > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id6" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id7",
+ ],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id8" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id7",
+ ],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id9" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id7",
+ ],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "index": "a3",
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "index": "a0",
+ "x": 10,
+ "y": 10,
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "index": "a4",
+ "x": 40,
+ "y": 20,
+ },
+ "inserted": {
+ "index": "a1",
+ "x": 30,
+ "y": 10,
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "index": "a5",
+ "x": 60,
+ "y": 20,
+ },
+ "inserted": {
+ "index": "a2",
+ "x": 50,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > make a group and duplicate it > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > make a group and duplicate it > [end of test] number of renders 1`] = `17`;
+
+exports[`regression tests > noop interaction after undo shouldn't create history entry > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > noop interaction after undo shouldn't create history entry > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > noop interaction after undo shouldn't create history entry > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > noop interaction after undo shouldn't create history entry > [end of test] number of renders 1`] = `14`;
+
+exports[`regression tests > pinch-to-zoom works > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "touch",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": "-6.25000",
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": true,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > pinch-to-zoom works > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`regression tests > pinch-to-zoom works > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > pinch-to-zoom works > [end of test] number of renders 1`] = `7`;
+
+exports[`regression tests > shift click on selected element should deselect it on pointer up > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > shift click on selected element should deselect it on pointer up > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > shift click on selected element should deselect it on pointer up > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > shift click on selected element should deselect it on pointer up > [end of test] number of renders 1`] = `7`;
+
+exports[`regression tests > shift-click to multiselect, then drag > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > shift-click to multiselect, then drag > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "x": 10,
+ "y": 10,
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "x": 40,
+ "y": 20,
+ },
+ "inserted": {
+ "x": 30,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > shift-click to multiselect, then drag > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > shift-click to multiselect, then drag > [end of test] number of renders 1`] = `13`;
+
+exports[`regression tests > should group elements and ungroup them > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > should group elements and ungroup them > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > should group elements and ungroup them > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > should group elements and ungroup them > [end of test] number of renders 1`] = `18`;
+
+exports[`regression tests > single-clicking on a subgroup of a selected group should not alter selection > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id5": true,
+ "id6": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id5": true,
+ "id6": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id10": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > single-clicking on a subgroup of a selected group should not alter selection > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id5": true,
+ },
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id5" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id6": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id5": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id6" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a3",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id5": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id6": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id6": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id9": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id5" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id9",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id6" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id9",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id10": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {
+ "id4": true,
+ "id9": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id5" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id9",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id9",
+ ],
+ },
+ },
+ "id6" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id9",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id9",
+ ],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > single-clicking on a subgroup of a selected group should not alter selection > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > single-clicking on a subgroup of a selected group should not alter selection > [end of test] number of renders 1`] = `25`;
+
+exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 60,
+ "scrollY": 60,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] number of renders 1`] = `5`;
+
+exports[`regression tests > supports nested groups > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": "id3",
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > supports nested groups > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 50,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 50,
+ "x": 100,
+ "y": 100,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 50,
+ "x": 200,
+ "y": 200,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ "id3",
+ ],
+ "index": "a2",
+ },
+ "inserted": {
+ "groupIds": [
+ "id3",
+ ],
+ "index": "a0",
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ "id3",
+ ],
+ "index": "a3",
+ },
+ "inserted": {
+ "groupIds": [
+ "id3",
+ ],
+ "index": "a2",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ "inserted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {},
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {},
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id5",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {
+ "id2": true,
+ },
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ "id2": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ "inserted": {
+ "editingGroupId": "id5",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > supports nested groups > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > supports nested groups > [end of test] number of renders 1`] = `23`;
+
+exports[`regression tests > switches from group of selected elements to another element on pointer down > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id1": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id4",
+ "index": null,
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1723083209,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "selection",
+ "updated": 1,
+ "version": 1,
+ "versionNonce": 0,
+ "width": 0,
+ "x": 0,
+ "y": 0,
+ },
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > switches from group of selected elements to another element on pointer down > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 100,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 100,
+ "x": 310,
+ "y": 310,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > switches from group of selected elements to another element on pointer down > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > switches from group of selected elements to another element on pointer down > [end of test] number of renders 1`] = `14`;
+
+exports[`regression tests > switches selected element on pointer down > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id2",
+ "index": null,
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1604849351,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "selection",
+ "updated": 1,
+ "version": 1,
+ "versionNonce": 0,
+ "width": 0,
+ "x": 0,
+ "y": 0,
+ },
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > switches selected element on pointer down > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > switches selected element on pointer down > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > switches selected element on pointer down > [end of test] number of renders 1`] = `10`;
+
+exports[`regression tests > two-finger scroll works > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "touch",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 20,
+ "scrollY": "-18.53553",
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": true,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > two-finger scroll works > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`regression tests > two-finger scroll works > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > two-finger scroll works > [end of test] number of renders 1`] = `8`;
+
+exports[`regression tests > undo/redo drawing an element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > undo/redo drawing an element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": null,
+ },
+ "inserted": {
+ "selectedLinearElementId": "id2",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id2" => Delta {
+ "deleted": {
+ "height": 10,
+ "lastCommittedPoint": [
+ 60,
+ 10,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 60,
+ 10,
+ ],
+ ],
+ "width": 60,
+ },
+ "inserted": {
+ "height": 20,
+ "lastCommittedPoint": [
+ 100,
+ 20,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 60,
+ 10,
+ ],
+ [
+ 100,
+ 20,
+ ],
+ ],
+ "width": 100,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id2" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 60,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 60,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 60,
+ "x": 130,
+ "y": 10,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 10,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 30,
+ "x": 40,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > undo/redo drawing an element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > undo/redo drawing an element > [end of test] number of renders 1`] = `20`;
+
+exports[`regression tests > updates fontSize & fontFamily appState > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "text",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 8,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > updates fontSize & fontFamily appState > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`regression tests > updates fontSize & fontFamily appState > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > updates fontSize & fontFamily appState > [end of test] number of renders 1`] = `5`;
+
+exports[`regression tests > zoom hotkeys > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > zoom hotkeys > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`regression tests > zoom hotkeys > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > zoom hotkeys > [end of test] number of renders 1`] = `6`;
diff --git a/packages/excalidraw/tests/__snapshots__/selection.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/selection.test.tsx.snap
new file mode 100644
index 0000000..2eea908
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/selection.test.tsx.snap
@@ -0,0 +1,202 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`select single element on the scene > arrow 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 30,
+ 50,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1278240551,
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 2019559783,
+ "width": 30,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+exports[`select single element on the scene > arrow escape 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 30,
+ 50,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1278240551,
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 2019559783,
+ "width": 30,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+exports[`select single element on the scene > diamond 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 401146281,
+ "width": 30,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+exports[`select single element on the scene > ellipse 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 401146281,
+ "width": 30,
+ "x": 10,
+ "y": 10,
+}
+`;
+
+exports[`select single element on the scene > rectangle 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 3,
+ "versionNonce": 401146281,
+ "width": 30,
+ "x": 10,
+ "y": 10,
+}
+`;