docstring_tokens
stringlengths
18
16.9k
code_tokens
stringlengths
75
1.81M
html_url
stringlengths
74
116
file_name
stringlengths
3
311
keep keep keep keep replace replace keep keep keep keep keep
<mask> "or": "or", <mask> "preventBinding": "Prevent arrow binding", <mask> "shapes": "Shapes", <mask> "shortcuts": "Keyboard shortcuts", <mask> "textFinish": "Finish editing (text)", <mask> "textNewLine": "Add new line (text)", <mask> "title": "Help", <mask> "view": "View", <mask> "zoomToFit": "Zoom to fit all elements", <mask> "zoomToSelection": "Zoom to selection" <mask> }, </s> feat: add hint around text editing (#3708) </s> add "editSelectedShape": "Edit selected shape (text/arrow/line)", </s> add "text_selected": "Double-click or press ENTER to edit text", "text_editing": "Press Escape or CtrlOrCmd+ENTER to finish editing", </s> add "doubleClick": "double-click", </s> add if (selectedElements.length === 1 && isTextElement(selectedElements[0])) { return t("hints.text_selected"); } if (appState.editingElement && isTextElement(appState.editingElement)) { return t("hints.text_editing"); } </s> remove import { isLinearElement } from "../element/typeChecks"; </s> add import { isLinearElement, isTextElement } from "../element/typeChecks"; </s> add <Shortcut label={t("helpDialog.editSelectedShape")} shortcuts={[ getShortcutKey("Enter"), t("helpDialog.doubleClick"), ]} />
https://github.com/excalidraw/excalidraw/commit/fd4460be3787088a5a46daecedc52aabb00cc9b9
src/locales/en.json
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", <mask> "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==" <mask> }, <mask> "points-on-path": { <mask> "version": "0.2.0", <mask> "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.0.tgz", <mask> "integrity": "sha512-X+uusxIDk/DZBC1w6gYCThB9GiSI7wlatxPYmme4wmcWnHFGanxdFBtuZQj1YeYhxXESJ5/Ym/h7DWDMw4A9mA==", <mask> "requires": { <mask> "path-data-parser": "0.1.0", <mask> "points-on-curve": "0.2.0" <mask> } <mask> }, </s> Bump roughjs from 4.2.3 to 4.3.0 (#1574) Bumps [roughjs](https://github.com/pshihn/rough) from 4.2.3 to 4.3.0. - [Release notes](https://github.com/pshihn/rough/releases) - [Changelog](https://github.com/pshihn/rough/blob/master/CHANGELOG.md) - [Commits](https://github.com/pshihn/rough/commits) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "4.2.3", "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.2.3.tgz", "integrity": "sha512-391svwoRClxOBiCcTU/d3C54TjrxyRlDjU2lkZdkjQg5PAG9xR3bf8Uv1oRzkK+DXA+MWwp1d5/Mdo07Z2fFhA==", </s> add "version": "4.3.0", "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.3.0.tgz", "integrity": "sha512-aHEBK0dn50v9HP5hMghQmjpkvPD3He9+pm6UbbcmniFJlIbnvWhw72xFVYR44TorhmwpwtKZj6USniiT0Mq98w==", </s> remove "points-on-path": "^0.2.0" </s> add "points-on-path": "^0.2.1" </s> remove "roughjs": "4.2.3", </s> add "roughjs": "4.3.0",
https://github.com/excalidraw/excalidraw/commit/fd47bd237cb01c5ff1b5e9ec89c7b1e00691323a
package-lock.json
keep keep keep keep replace replace replace keep keep keep replace keep keep
<mask> "inherits": "^2.0.1" <mask> } <mask> }, <mask> "roughjs": { <mask> "version": "4.2.3", <mask> "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.2.3.tgz", <mask> "integrity": "sha512-391svwoRClxOBiCcTU/d3C54TjrxyRlDjU2lkZdkjQg5PAG9xR3bf8Uv1oRzkK+DXA+MWwp1d5/Mdo07Z2fFhA==", <mask> "requires": { <mask> "path-data-parser": "^0.1.0", <mask> "points-on-curve": "^0.2.0", <mask> "points-on-path": "^0.2.0" <mask> } <mask> }, </s> Bump roughjs from 4.2.3 to 4.3.0 (#1574) Bumps [roughjs](https://github.com/pshihn/rough) from 4.2.3 to 4.3.0. - [Release notes](https://github.com/pshihn/rough/releases) - [Changelog](https://github.com/pshihn/rough/blob/master/CHANGELOG.md) - [Commits](https://github.com/pshihn/rough/commits) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "0.2.0", "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.0.tgz", "integrity": "sha512-X+uusxIDk/DZBC1w6gYCThB9GiSI7wlatxPYmme4wmcWnHFGanxdFBtuZQj1YeYhxXESJ5/Ym/h7DWDMw4A9mA==", </s> add "version": "0.2.1", "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz", "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==", </s> remove "roughjs": "4.2.3", </s> add "roughjs": "4.3.0",
https://github.com/excalidraw/excalidraw/commit/fd47bd237cb01c5ff1b5e9ec89c7b1e00691323a
package-lock.json
keep keep keep keep replace keep keep keep keep keep
<mask> "pwacompat": "2.0.11", <mask> "react": "16.13.1", <mask> "react-dom": "16.13.1", <mask> "react-scripts": "3.4.1", <mask> "roughjs": "4.2.3", <mask> "socket.io-client": "2.3.0", <mask> "typescript": "3.8.3" <mask> }, <mask> "devDependencies": { <mask> "@types/lodash.throttle": "4.1.6", </s> Bump roughjs from 4.2.3 to 4.3.0 (#1574) Bumps [roughjs](https://github.com/pshihn/rough) from 4.2.3 to 4.3.0. - [Release notes](https://github.com/pshihn/rough/releases) - [Changelog](https://github.com/pshihn/rough/blob/master/CHANGELOG.md) - [Commits](https://github.com/pshihn/rough/commits) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "0.2.0", "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.0.tgz", "integrity": "sha512-X+uusxIDk/DZBC1w6gYCThB9GiSI7wlatxPYmme4wmcWnHFGanxdFBtuZQj1YeYhxXESJ5/Ym/h7DWDMw4A9mA==", </s> add "version": "0.2.1", "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz", "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==", </s> remove "points-on-path": "^0.2.0" </s> add "points-on-path": "^0.2.1" </s> remove "version": "4.2.3", "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.2.3.tgz", "integrity": "sha512-391svwoRClxOBiCcTU/d3C54TjrxyRlDjU2lkZdkjQg5PAG9xR3bf8Uv1oRzkK+DXA+MWwp1d5/Mdo07Z2fFhA==", </s> add "version": "4.3.0", "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.3.0.tgz", "integrity": "sha512-aHEBK0dn50v9HP5hMghQmjpkvPD3He9+pm6UbbcmniFJlIbnvWhw72xFVYR44TorhmwpwtKZj6USniiT0Mq98w==",
https://github.com/excalidraw/excalidraw/commit/fd47bd237cb01c5ff1b5e9ec89c7b1e00691323a
package.json
keep keep keep keep replace keep
<mask> - name: Update description with coverage <mask> uses: kt3k/[email protected] <mask> with: <mask> pr_body: ${{ steps.getCommentBody.outputs.body }} <mask> pr_title: "chore: New Crowdin updates" <mask> github_token: ${{ secrets.PUSH_TRANSLATIONS_COVERAGE_PAT }} </s> chore: Update translations from Crowdin (#2742) Co-authored-by: Kostas Bariotis <[email protected]> </s> remove "ja-JP": 85, </s> add "ja-JP": 90, </s> remove "pasteCharts": "Lim inn diagrammer", </s> add "pasteCharts": "Lim inn diagram",
https://github.com/excalidraw/excalidraw/commit/fd699c044766a1c03e34aca2f6bc794a25a7c5c6
.github/workflows/locales-coverage.yml
keep keep keep replace keep keep keep keep keep
<mask> { <mask> "labels": { <mask> "paste": "Lim inn", <mask> "pasteCharts": "Lim inn diagrammer", <mask> "selectAll": "Vel alt", <mask> "multiSelect": "Legg til element i utval", <mask> "moveCanvas": "Flytt lerretet", <mask> "cut": "Klipp ut", <mask> "copy": "Kopier", </s> chore: Update translations from Crowdin (#2742) Co-authored-by: Kostas Bariotis <[email protected]> </s> remove "ja-JP": 85, </s> add "ja-JP": 90, </s> remove pr_title: "chore: New Crowdin updates" </s> add pr_title: "chore: Update translations from Crowdin"
https://github.com/excalidraw/excalidraw/commit/fd699c044766a1c03e34aca2f6bc794a25a7c5c6
src/locales/nn-NO.json
keep keep keep keep replace keep keep keep keep keep
<mask> "hi-IN": 100, <mask> "hu-HU": 100, <mask> "id-ID": 100, <mask> "it-IT": 100, <mask> "ja-JP": 85, <mask> "ko-KR": 100, <mask> "my-MM": 93, <mask> "nb-NO": 100, <mask> "nl-NL": 100, <mask> "nn-NO": 100, </s> chore: Update translations from Crowdin (#2742) Co-authored-by: Kostas Bariotis <[email protected]> </s> remove "pasteCharts": "Lim inn diagrammer", </s> add "pasteCharts": "Lim inn diagram", </s> remove pr_title: "chore: New Crowdin updates" </s> add pr_title: "chore: Update translations from Crowdin"
https://github.com/excalidraw/excalidraw/commit/fd699c044766a1c03e34aca2f6bc794a25a7c5c6
src/locales/percentages.json
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> "defer-to-connect": "^1.0.1" <mask> } <mask> }, <mask> "@testing-library/dom": { <mask> "version": "7.24.2", <mask> "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.24.2.tgz", <mask> "integrity": "sha512-ERxcZSoHx0EcN4HfshySEWmEf5Kkmgi+J7O79yCJ3xggzVlBJ2w/QjJUC+EBkJJ2OeSw48i3IoePN4w8JlVUIA==", <mask> "requires": { <mask> "@babel/code-frame": "^7.10.4", <mask> "@babel/runtime": "^7.10.3", <mask> "@types/aria-query": "^4.2.0", <mask> "aria-query": "^4.2.2", </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> add "lz-string": "^1.4.4", </s> remove "@testing-library/dom": "^7.24.2" </s> add "@testing-library/dom": "^7.26.0" </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "15.0.5", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", </s> add "version": "15.0.9", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep keep keep add keep keep keep keep keep keep
<mask> "@types/aria-query": "^4.2.0", <mask> "aria-query": "^4.2.2", <mask> "chalk": "^4.1.0", <mask> "dom-accessibility-api": "^0.5.1", <mask> "pretty-format": "^26.4.2" <mask> }, <mask> "dependencies": { <mask> "@babel/code-frame": { <mask> "version": "7.10.4", <mask> "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "7.24.2", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.24.2.tgz", "integrity": "sha512-ERxcZSoHx0EcN4HfshySEWmEf5Kkmgi+J7O79yCJ3xggzVlBJ2w/QjJUC+EBkJJ2OeSw48i3IoePN4w8JlVUIA==", </s> add "version": "7.26.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.26.0.tgz", "integrity": "sha512-fyKFrBbS1IigaE3FV21LyeC7kSGF84lqTlSYdKmGaHuK2eYQ/bXVPM5vAa2wx/AU1iPD6oQHsxy2QQ17q9AMCg==", </s> remove "version": "0.5.2", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.2.tgz", "integrity": "sha512-k7hRNKAiPJXD2aBqfahSo4/01cTsKWXf+LqJgglnkN2Nz8TsxXKQBXHhKe0Ye9fEfHEZY49uSA5Sr3AqP/sWKA==" </s> add "version": "0.5.4", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.4.tgz", "integrity": "sha512-TvrjBckDy2c6v6RLxPv5QXOnU+SmF9nBII5621Ve5fu6Z/BDrENurBEvlC1f44lKEUVqOpK4w9E5Idc5/EgkLQ==" </s> remove "version": "15.0.5", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", </s> add "version": "15.0.9", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", </s> remove "version": "26.4.2", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.4.2.tgz", "integrity": "sha512-zK6Gd8zDsEiVydOCGLkoBoZuqv8VTiHyAbKznXe/gaph/DAeZOmit9yMfgIz5adIgAMMs5XfoYSwAX3jcCO1tA==", </s> add "version": "26.5.2", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz", "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> add "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" },
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> } <mask> } <mask> }, <mask> "@babel/runtime": { <mask> "version": "7.11.2", <mask> "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", <mask> "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", <mask> "requires": { <mask> "regenerator-runtime": "^0.13.4" <mask> } <mask> }, <mask> "@jest/types": { </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "26.3.0", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.3.0.tgz", "integrity": "sha512-BDPG23U0qDeAvU4f99haztXwdAg3hz4El95LkAM+tHAqqhiVzRpEGHHU8EDxT/AnxOrA65YjLBwDahdJ9pTLJQ==", </s> add "version": "26.5.2", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz", "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==", </s> remove "@testing-library/dom": "^7.24.2" </s> add "@testing-library/dom": "^7.26.0" </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==", </s> remove "version": "15.0.5", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", </s> add "version": "15.0.9", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", </s> add "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" },
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> "regenerator-runtime": "^0.13.4" <mask> } <mask> }, <mask> "@jest/types": { <mask> "version": "26.3.0", <mask> "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.3.0.tgz", <mask> "integrity": "sha512-BDPG23U0qDeAvU4f99haztXwdAg3hz4El95LkAM+tHAqqhiVzRpEGHHU8EDxT/AnxOrA65YjLBwDahdJ9pTLJQ==", <mask> "requires": { <mask> "@types/istanbul-lib-coverage": "^2.0.0", <mask> "@types/istanbul-reports": "^3.0.0", <mask> "@types/node": "*", <mask> "@types/yargs": "^15.0.0", </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "15.0.5", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", </s> add "version": "15.0.9", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", </s> remove "@jest/types": "^26.3.0", </s> add "@jest/types": "^26.5.2", </s> add "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" }, </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==",
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> "@types/istanbul-lib-report": "*" <mask> } <mask> }, <mask> "@types/yargs": { <mask> "version": "15.0.5", <mask> "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", <mask> "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", <mask> "requires": { <mask> "@types/yargs-parser": "*" <mask> } <mask> }, <mask> "aria-query": { </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "26.3.0", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.3.0.tgz", "integrity": "sha512-BDPG23U0qDeAvU4f99haztXwdAg3hz4El95LkAM+tHAqqhiVzRpEGHHU8EDxT/AnxOrA65YjLBwDahdJ9pTLJQ==", </s> add "version": "26.5.2", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz", "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "7.24.2", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.24.2.tgz", "integrity": "sha512-ERxcZSoHx0EcN4HfshySEWmEf5Kkmgi+J7O79yCJ3xggzVlBJ2w/QjJUC+EBkJJ2OeSw48i3IoePN4w8JlVUIA==", </s> add "version": "7.26.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.26.0.tgz", "integrity": "sha512-fyKFrBbS1IigaE3FV21LyeC7kSGF84lqTlSYdKmGaHuK2eYQ/bXVPM5vAa2wx/AU1iPD6oQHsxy2QQ17q9AMCg==", </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==", </s> add "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" }, </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep keep keep replace replace replace keep replace keep keep
<mask> }, <mask> "dependencies": { <mask> "ansi-styles": { <mask> "version": "4.2.1", <mask> "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", <mask> "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", <mask> "requires": { <mask> "@types/color-name": "^1.1.1", <mask> "color-convert": "^2.0.1" <mask> } </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "@types/color-name": "^1.1.1", </s> add </s> remove "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", </s> add "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep keep keep keep replace replace replace keep replace keep
<mask> "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", <mask> "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" <mask> }, <mask> "pretty-format": { <mask> "version": "26.4.2", <mask> "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.4.2.tgz", <mask> "integrity": "sha512-zK6Gd8zDsEiVydOCGLkoBoZuqv8VTiHyAbKznXe/gaph/DAeZOmit9yMfgIz5adIgAMMs5XfoYSwAX3jcCO1tA==", <mask> "requires": { <mask> "@jest/types": "^26.3.0", <mask> "ansi-regex": "^5.0.0", </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "26.3.0", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.3.0.tgz", "integrity": "sha512-BDPG23U0qDeAvU4f99haztXwdAg3hz4El95LkAM+tHAqqhiVzRpEGHHU8EDxT/AnxOrA65YjLBwDahdJ9pTLJQ==", </s> add "version": "26.5.2", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz", "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==", </s> add "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" }, </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==",
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep replace replace replace keep replace keep keep keep keep
<mask> "ansi-styles": { <mask> "version": "4.2.1", <mask> "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", <mask> "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", <mask> "requires": { <mask> "@types/color-name": "^1.1.1", <mask> "color-convert": "^2.0.1" <mask> } <mask> } <mask> } </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "@types/color-name": "^1.1.1", </s> add </s> remove "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", </s> add "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==", </s> remove "version": "15.0.5", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", </s> add "version": "15.0.9", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==",
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep replace replace replace keep keep replace keep keep
<mask> "@testing-library/react": { <mask> "version": "11.0.4", <mask> "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", <mask> "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", <mask> "requires": { <mask> "@babel/runtime": "^7.11.2", <mask> "@testing-library/dom": "^7.24.2" <mask> }, <mask> "dependencies": { </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "7.24.2", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.24.2.tgz", "integrity": "sha512-ERxcZSoHx0EcN4HfshySEWmEf5Kkmgi+J7O79yCJ3xggzVlBJ2w/QjJUC+EBkJJ2OeSw48i3IoePN4w8JlVUIA==", </s> add "version": "7.26.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.26.0.tgz", "integrity": "sha512-fyKFrBbS1IigaE3FV21LyeC7kSGF84lqTlSYdKmGaHuK2eYQ/bXVPM5vAa2wx/AU1iPD6oQHsxy2QQ17q9AMCg==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "@testing-library/react": "11.0.4", </s> add "@testing-library/react": "11.1.0", </s> add "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" },
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> "@testing-library/dom": "^7.24.2" <mask> }, <mask> "dependencies": { <mask> "@babel/runtime": { <mask> "version": "7.11.2", <mask> "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", <mask> "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", <mask> "requires": { <mask> "regenerator-runtime": "^0.13.4" <mask> } <mask> }, <mask> "regenerator-runtime": { </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "@testing-library/dom": "^7.24.2" </s> add "@testing-library/dom": "^7.26.0" </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==", </s> remove "version": "26.3.0", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.3.0.tgz", "integrity": "sha512-BDPG23U0qDeAvU4f99haztXwdAg3hz4El95LkAM+tHAqqhiVzRpEGHHU8EDxT/AnxOrA65YjLBwDahdJ9pTLJQ==", </s> add "version": "26.5.2", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz", "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==", </s> remove "version": "7.24.2", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.24.2.tgz", "integrity": "sha512-ERxcZSoHx0EcN4HfshySEWmEf5Kkmgi+J7O79yCJ3xggzVlBJ2w/QjJUC+EBkJJ2OeSw48i3IoePN4w8JlVUIA==", </s> add "version": "7.26.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.26.0.tgz", "integrity": "sha512-fyKFrBbS1IigaE3FV21LyeC7kSGF84lqTlSYdKmGaHuK2eYQ/bXVPM5vAa2wx/AU1iPD6oQHsxy2QQ17q9AMCg==", </s> add "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" },
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> "esutils": "^2.0.2" <mask> } <mask> }, <mask> "dom-accessibility-api": { <mask> "version": "0.5.2", <mask> "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.2.tgz", <mask> "integrity": "sha512-k7hRNKAiPJXD2aBqfahSo4/01cTsKWXf+LqJgglnkN2Nz8TsxXKQBXHhKe0Ye9fEfHEZY49uSA5Sr3AqP/sWKA==" <mask> }, <mask> "dom-converter": { <mask> "version": "0.2.0", <mask> "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", <mask> "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> add "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" }, </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==", </s> remove "version": "15.0.5", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", </s> add "version": "15.0.9", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", </s> add "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep keep add keep keep keep keep keep
<mask> "es5-ext": "~0.10.2" <mask> } <mask> }, <mask> "make-dir": { <mask> "version": "2.1.0", <mask> "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", <mask> "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", <mask> "requires": { </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==", </s> remove "version": "15.0.5", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", </s> add "version": "15.0.9", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", </s> add "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", </s> remove "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", </s> add "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package-lock.json
keep keep keep keep replace keep keep keep keep keep
<mask> "dependencies": { <mask> "@sentry/browser": "5.25.0", <mask> "@sentry/integrations": "5.26.0", <mask> "@testing-library/jest-dom": "5.11.4", <mask> "@testing-library/react": "11.0.4", <mask> "@types/jest": "26.0.14", <mask> "@types/nanoid": "2.1.0", <mask> "@types/react": "16.9.52", <mask> "@types/react-dom": "16.9.8", <mask> "@types/socket.io-client": "1.4.34", </s> Bump @testing-library/react from 11.0.4 to 11.1.0 (#2256) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.0.4 to 11.1.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.0.4...v11.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> </s> remove "version": "11.0.4", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", </s> add "version": "11.1.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.1.0.tgz", "integrity": "sha512-Nfz58jGzW0tgg3irmTB7sa02JLkLnCk+QN3XG6WiaGQYb0Qc4Ok00aujgjdxlIQWZHbb4Zj5ZOIeE9yKFSs4sA==", </s> add "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" }, </s> remove "version": "7.11.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", </s> add "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", </s> remove "@testing-library/dom": "^7.24.2" </s> add "@testing-library/dom": "^7.26.0" </s> remove "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", </s> add "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", </s> remove "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", </s> add "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
https://github.com/excalidraw/excalidraw/commit/fdae50cecee11e079fcd4a351a48e4f487754245
package.json
keep keep add keep keep keep keep
<mask> "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", <mask> "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" <mask> }, <mask> "q": { <mask> "version": "1.5.1", <mask> "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", <mask> "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" </s> Add PWACompat (#1433) * Add PWACompat (attempt) Fixes #1425 * Fix CSS, use custom splash screen font * Respect bottom safe area </s> add "pwacompat": "2.0.11", </s> remove bottom: 80px; bottom: calc(80px + var(--sab)); </s> add bottom: calc(80px + var(--sab, 0px)); </s> add .FixedSideContainer { padding-top: var(--sat, 0px); padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); } </s> add // On Apple mobile devices add the proprietary app icon and splashscreen markup. // No one should have to do this manually, and eventually this annoyance will // go away once https://bugs.webkit.org/show_bug.cgi?id=183937 is fixed. if (/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)) { import("pwacompat"); } </s> add width: 100vw; height: 100vh; </s> remove --ui-font: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> add --ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
https://github.com/excalidraw/excalidraw/commit/fe5e71a4e50e0602907489da8c11e6965b0fb3b4
package-lock.json
keep keep keep add keep keep keep keep keep keep
<mask> "browser-nativefs": "0.6.0", <mask> "i18next-browser-languagedetector": "4.0.2", <mask> "nanoid": "2.1.11", <mask> "open-color": "1.7.0", <mask> "react": "16.13.1", <mask> "react-dom": "16.13.1", <mask> "react-scripts": "3.4.1", <mask> "roughjs": "4.1.4", <mask> "socket.io-client": "2.3.0" <mask> }, </s> Add PWACompat (#1433) * Add PWACompat (attempt) Fixes #1425 * Fix CSS, use custom splash screen font * Respect bottom safe area </s> add "pwacompat": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/pwacompat/-/pwacompat-2.0.11.tgz", "integrity": "sha512-fKm/aQg6P+aw0X7JQQOJqCK37wUJYAXrRuGD1jpRfbBWlofg5npkM22kEPPxjw4K10T031BJRgO2+ZwRETy1dQ==" }, </s> add // On Apple mobile devices add the proprietary app icon and splashscreen markup. // No one should have to do this manually, and eventually this annoyance will // go away once https://bugs.webkit.org/show_bug.cgi?id=183937 is fixed. if (/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)) { import("pwacompat"); } </s> remove bottom: 80px; bottom: calc(80px + var(--sab)); </s> add bottom: calc(80px + var(--sab, 0px)); </s> remove padding-top: #{"max(var(--bar-padding), var(--sat))"}; padding-left: var(--sal); padding-right: var(--sar); padding-bottom: var(--sab); </s> add padding-top: #{"max(var(--bar-padding), var(--sat, 0px))"}; padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); </s> add .FixedSideContainer { padding-top: var(--sat, 0px); padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); } </s> add width: 100vw; height: 100vh;
https://github.com/excalidraw/excalidraw/commit/fe5e71a4e50e0602907489da8c11e6965b0fb3b4
package.json
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> <mask> body { <mask> margin: 0; <mask> --ui-font: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, <mask> Arial, sans-serif; <mask> font-family: var(--ui-font); <mask> color: var(--text-color-primary); <mask> -webkit-text-size-adjust: 100%; <mask> user-select: none; <mask> } </s> Add PWACompat (#1433) * Add PWACompat (attempt) Fixes #1425 * Fix CSS, use custom splash screen font * Respect bottom safe area </s> add width: 100vw; height: 100vh; </s> remove bottom: 80px; bottom: calc(80px + var(--sab)); </s> add bottom: calc(80px + var(--sab, 0px)); </s> add .FixedSideContainer { padding-top: var(--sat, 0px); padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); } </s> remove padding-top: #{"max(var(--bar-padding), var(--sat))"}; padding-left: var(--sal); padding-right: var(--sar); padding-bottom: var(--sab); </s> add padding-top: #{"max(var(--bar-padding), var(--sat, 0px))"}; padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); </s> add // On Apple mobile devices add the proprietary app icon and splashscreen markup. // No one should have to do this manually, and eventually this annoyance will // go away once https://bugs.webkit.org/show_bug.cgi?id=183937 is fixed. if (/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)) { import("pwacompat"); } </s> add "pwacompat": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/pwacompat/-/pwacompat-2.0.11.tgz", "integrity": "sha512-fKm/aQg6P+aw0X7JQQOJqCK37wUJYAXrRuGD1jpRfbBWlofg5npkM22kEPPxjw4K10T031BJRgO2+ZwRETy1dQ==" },
https://github.com/excalidraw/excalidraw/commit/fe5e71a4e50e0602907489da8c11e6965b0fb3b4
src/css/styles.scss
keep add keep keep keep keep keep
<mask> -webkit-text-size-adjust: 100%; <mask> user-select: none; <mask> } <mask> [contenteditable] { <mask> user-select: auto; <mask> cursor: text; <mask> } </s> Add PWACompat (#1433) * Add PWACompat (attempt) Fixes #1425 * Fix CSS, use custom splash screen font * Respect bottom safe area </s> remove --ui-font: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> add --ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> remove bottom: 80px; bottom: calc(80px + var(--sab)); </s> add bottom: calc(80px + var(--sab, 0px)); </s> add .FixedSideContainer { padding-top: var(--sat, 0px); padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); } </s> add // On Apple mobile devices add the proprietary app icon and splashscreen markup. // No one should have to do this manually, and eventually this annoyance will // go away once https://bugs.webkit.org/show_bug.cgi?id=183937 is fixed. if (/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)) { import("pwacompat"); } </s> add "pwacompat": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/pwacompat/-/pwacompat-2.0.11.tgz", "integrity": "sha512-fKm/aQg6P+aw0X7JQQOJqCK37wUJYAXrRuGD1jpRfbBWlofg5npkM22kEPPxjw4K10T031BJRgO2+ZwRETy1dQ==" }, </s> remove padding-top: #{"max(var(--bar-padding), var(--sat))"}; padding-left: var(--sal); padding-right: var(--sar); padding-bottom: var(--sab); </s> add padding-top: #{"max(var(--bar-padding), var(--sat, 0px))"}; padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px);
https://github.com/excalidraw/excalidraw/commit/fe5e71a4e50e0602907489da8c11e6965b0fb3b4
src/css/styles.scss
keep add keep keep keep keep keep
<mask> } <mask> <mask> .panelRow { <mask> display: flex; <mask> justify-content: space-between; <mask> } <mask> </s> Add PWACompat (#1433) * Add PWACompat (attempt) Fixes #1425 * Fix CSS, use custom splash screen font * Respect bottom safe area </s> remove bottom: 80px; bottom: calc(80px + var(--sab)); </s> add bottom: calc(80px + var(--sab, 0px)); </s> add width: 100vw; height: 100vh; </s> remove --ui-font: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> add --ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> add // On Apple mobile devices add the proprietary app icon and splashscreen markup. // No one should have to do this manually, and eventually this annoyance will // go away once https://bugs.webkit.org/show_bug.cgi?id=183937 is fixed. if (/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)) { import("pwacompat"); } </s> remove padding-top: #{"max(var(--bar-padding), var(--sat))"}; padding-left: var(--sal); padding-right: var(--sar); padding-bottom: var(--sab); </s> add padding-top: #{"max(var(--bar-padding), var(--sat, 0px))"}; padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); </s> add "pwacompat": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/pwacompat/-/pwacompat-2.0.11.tgz", "integrity": "sha512-fKm/aQg6P+aw0X7JQQOJqCK37wUJYAXrRuGD1jpRfbBWlofg5npkM22kEPPxjw4K10T031BJRgO2+ZwRETy1dQ==" },
https://github.com/excalidraw/excalidraw/commit/fe5e71a4e50e0602907489da8c11e6965b0fb3b4
src/css/styles.scss
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> bottom: 0; <mask> left: 0; <mask> right: 0; <mask> --bar-padding: calc(4 * var(--space-factor)); <mask> padding-top: #{"max(var(--bar-padding), var(--sat))"}; <mask> padding-left: var(--sal); <mask> padding-right: var(--sar); <mask> padding-bottom: var(--sab); <mask> z-index: 4; <mask> display: flex; <mask> align-items: flex-end; <mask> pointer-events: none; <mask> </s> Add PWACompat (#1433) * Add PWACompat (attempt) Fixes #1425 * Fix CSS, use custom splash screen font * Respect bottom safe area </s> add .FixedSideContainer { padding-top: var(--sat, 0px); padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); } </s> remove bottom: 80px; bottom: calc(80px + var(--sab)); </s> add bottom: calc(80px + var(--sab, 0px)); </s> remove --ui-font: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> add --ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> add // On Apple mobile devices add the proprietary app icon and splashscreen markup. // No one should have to do this manually, and eventually this annoyance will // go away once https://bugs.webkit.org/show_bug.cgi?id=183937 is fixed. if (/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)) { import("pwacompat"); } </s> add width: 100vw; height: 100vh; </s> add "pwacompat": "2.0.11",
https://github.com/excalidraw/excalidraw/commit/fe5e71a4e50e0602907489da8c11e6965b0fb3b4
src/css/styles.scss
keep keep keep keep replace replace keep keep keep keep keep
<mask> aside { <mask> display: none; <mask> } <mask> .scroll-back-to-content { <mask> bottom: 80px; <mask> bottom: calc(80px + var(--sab)); <mask> z-index: -1; <mask> } <mask> } <mask> <mask> .rtl-mirror { </s> Add PWACompat (#1433) * Add PWACompat (attempt) Fixes #1425 * Fix CSS, use custom splash screen font * Respect bottom safe area </s> add .FixedSideContainer { padding-top: var(--sat, 0px); padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); } </s> add width: 100vw; height: 100vh; </s> remove padding-top: #{"max(var(--bar-padding), var(--sat))"}; padding-left: var(--sal); padding-right: var(--sar); padding-bottom: var(--sab); </s> add padding-top: #{"max(var(--bar-padding), var(--sat, 0px))"}; padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); </s> add // On Apple mobile devices add the proprietary app icon and splashscreen markup. // No one should have to do this manually, and eventually this annoyance will // go away once https://bugs.webkit.org/show_bug.cgi?id=183937 is fixed. if (/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)) { import("pwacompat"); } </s> remove --ui-font: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> add --ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> add "pwacompat": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/pwacompat/-/pwacompat-2.0.11.tgz", "integrity": "sha512-fKm/aQg6P+aw0X7JQQOJqCK37wUJYAXrRuGD1jpRfbBWlofg5npkM22kEPPxjw4K10T031BJRgO2+ZwRETy1dQ==" },
https://github.com/excalidraw/excalidraw/commit/fe5e71a4e50e0602907489da8c11e6965b0fb3b4
src/css/styles.scss
keep add keep keep keep keep keep keep
<mask> import "./css/styles.scss"; <mask> <mask> const SentryEnvHostnameMap: { [key: string]: string } = { <mask> "excalidraw.com": "production", <mask> "now.sh": "staging", <mask> }; <mask> <mask> const onlineEnv = Object.keys(SentryEnvHostnameMap).find( </s> Add PWACompat (#1433) * Add PWACompat (attempt) Fixes #1425 * Fix CSS, use custom splash screen font * Respect bottom safe area </s> remove bottom: 80px; bottom: calc(80px + var(--sab)); </s> add bottom: calc(80px + var(--sab, 0px)); </s> add .FixedSideContainer { padding-top: var(--sat, 0px); padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px); } </s> add width: 100vw; height: 100vh; </s> remove --ui-font: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> add --ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; </s> add "pwacompat": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/pwacompat/-/pwacompat-2.0.11.tgz", "integrity": "sha512-fKm/aQg6P+aw0X7JQQOJqCK37wUJYAXrRuGD1jpRfbBWlofg5npkM22kEPPxjw4K10T031BJRgO2+ZwRETy1dQ==" }, </s> remove padding-top: #{"max(var(--bar-padding), var(--sat))"}; padding-left: var(--sal); padding-right: var(--sar); padding-bottom: var(--sab); </s> add padding-top: #{"max(var(--bar-padding), var(--sat, 0px))"}; padding-right: var(--sar, 0px); padding-bottom: var(--sab, 0px); padding-left: var(--sal, 0px);
https://github.com/excalidraw/excalidraw/commit/fe5e71a4e50e0602907489da8c11e6965b0fb3b4
src/index.tsx
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
<mask> "@sentry/integrations": "6.2.5", <mask> "@testing-library/jest-dom": "5.16.2", <mask> "@testing-library/react": "12.1.5", <mask> "@tldraw/vec": "1.7.1", <mask> "@types/jest": "27.4.0", <mask> "@types/pica": "5.1.3", <mask> "@types/react": "18.0.15", <mask> "@types/react-dom": "18.0.6", <mask> "@types/socket.io-client": "1.4.36", <mask> "browser-fs-access": "0.29.1", <mask> "clsx": "1.1.1", <mask> "cross-env": "7.0.3", <mask> "fake-indexeddb": "3.1.7", <mask> "firebase": "8.3.3", </s> build: move TS and types to devDependencies (#6346) </s> add "@types/socket.io-client": "1.4.36", </s> add "@types/jest": "27.4.0", </s> add "@types/pica": "5.1.3", "@types/react": "18.0.15", "@types/react-dom": "18.0.6", </s> remove "rewire": "6.0.0" </s> add "rewire": "6.0.0", "typescript": "4.9.4" </s> remove "typescript": "4.9.4", </s> add
https://github.com/excalidraw/excalidraw/commit/fe83e2922ddca078bc4b63d491a846b3a824813d
package.json
keep keep keep keep replace keep keep keep keep keep
<mask> "roughjs": "4.5.2", <mask> "sass": "1.51.0", <mask> "socket.io-client": "2.3.1", <mask> "tunnel-rat": "0.1.0", <mask> "typescript": "4.9.4", <mask> "workbox-background-sync": "^6.5.4", <mask> "workbox-broadcast-update": "^6.5.4", <mask> "workbox-cacheable-response": "^6.5.4", <mask> "workbox-core": "^6.5.4", <mask> "workbox-expiration": "^6.5.4", </s> build: move TS and types to devDependencies (#6346) </s> remove "rewire": "6.0.0" </s> add "rewire": "6.0.0", "typescript": "4.9.4" </s> add "@types/socket.io-client": "1.4.36", </s> add "@types/pica": "5.1.3", "@types/react": "18.0.15", "@types/react-dom": "18.0.6", </s> add "@types/jest": "27.4.0", </s> remove "@types/jest": "27.4.0", "@types/pica": "5.1.3", "@types/react": "18.0.15", "@types/react-dom": "18.0.6", "@types/socket.io-client": "1.4.36", </s> add
https://github.com/excalidraw/excalidraw/commit/fe83e2922ddca078bc4b63d491a846b3a824813d
package.json
keep keep add keep keep keep keep keep
<mask> "@excalidraw/eslint-config": "1.0.0", <mask> "@excalidraw/prettier-config": "1.0.2", <mask> "@types/chai": "4.3.0", <mask> "@types/lodash.throttle": "4.1.7", <mask> "@types/pako": "1.0.3", <mask> "@types/pica": "5.1.3", <mask> "@types/react": "18.0.15", <mask> "@types/react-dom": "18.0.6", </s> build: move TS and types to devDependencies (#6346) </s> add "@types/pica": "5.1.3", "@types/react": "18.0.15", "@types/react-dom": "18.0.6", </s> add "@types/socket.io-client": "1.4.36", </s> remove "@types/jest": "27.4.0", "@types/pica": "5.1.3", "@types/react": "18.0.15", "@types/react-dom": "18.0.6", "@types/socket.io-client": "1.4.36", </s> add </s> remove "rewire": "6.0.0" </s> add "rewire": "6.0.0", "typescript": "4.9.4" </s> remove "typescript": "4.9.4", </s> add
https://github.com/excalidraw/excalidraw/commit/fe83e2922ddca078bc4b63d491a846b3a824813d
package.json
keep keep keep add keep keep keep keep keep keep
<mask> "@types/chai": "4.3.0", <mask> "@types/jest": "27.4.0", <mask> "@types/lodash.throttle": "4.1.7", <mask> "@types/pako": "1.0.3", <mask> "@types/resize-observer-browser": "0.1.7", <mask> "@types/socket.io-client": "1.4.36", <mask> "chai": "4.3.6", <mask> "dotenv": "16.0.1", <mask> "eslint-config-prettier": "8.5.0", <mask> "eslint-plugin-prettier": "3.3.1", </s> build: move TS and types to devDependencies (#6346) </s> add "@types/socket.io-client": "1.4.36", </s> add "@types/jest": "27.4.0", </s> remove "rewire": "6.0.0" </s> add "rewire": "6.0.0", "typescript": "4.9.4" </s> remove "typescript": "4.9.4", </s> add </s> remove "@types/jest": "27.4.0", "@types/pica": "5.1.3", "@types/react": "18.0.15", "@types/react-dom": "18.0.6", "@types/socket.io-client": "1.4.36", </s> add
https://github.com/excalidraw/excalidraw/commit/fe83e2922ddca078bc4b63d491a846b3a824813d
package.json
keep add keep keep keep keep keep keep
<mask> "@types/react-dom": "18.0.6", <mask> "@types/resize-observer-browser": "0.1.7", <mask> "chai": "4.3.6", <mask> "dotenv": "16.0.1", <mask> "eslint-config-prettier": "8.5.0", <mask> "eslint-plugin-prettier": "3.3.1", <mask> "http-server": "14.1.1", <mask> "husky": "7.0.4", </s> build: move TS and types to devDependencies (#6346) </s> add "@types/pica": "5.1.3", "@types/react": "18.0.15", "@types/react-dom": "18.0.6", </s> add "@types/jest": "27.4.0", </s> remove "@types/jest": "27.4.0", "@types/pica": "5.1.3", "@types/react": "18.0.15", "@types/react-dom": "18.0.6", "@types/socket.io-client": "1.4.36", </s> add </s> remove "rewire": "6.0.0" </s> add "rewire": "6.0.0", "typescript": "4.9.4" </s> remove "typescript": "4.9.4", </s> add
https://github.com/excalidraw/excalidraw/commit/fe83e2922ddca078bc4b63d491a846b3a824813d
package.json
keep keep keep keep replace keep keep keep keep keep
<mask> "jest-canvas-mock": "2.4.0", <mask> "lint-staged": "12.3.7", <mask> "pepjs": "0.5.3", <mask> "prettier": "2.6.2", <mask> "rewire": "6.0.0" <mask> }, <mask> "engines": { <mask> "node": ">=14.0.0" <mask> }, <mask> "homepage": ".", </s> build: move TS and types to devDependencies (#6346) </s> add "@types/socket.io-client": "1.4.36", </s> add "@types/pica": "5.1.3", "@types/react": "18.0.15", "@types/react-dom": "18.0.6", </s> add "@types/jest": "27.4.0", </s> remove "typescript": "4.9.4", </s> add </s> remove "@types/jest": "27.4.0", "@types/pica": "5.1.3", "@types/react": "18.0.15", "@types/react-dom": "18.0.6", "@types/socket.io-client": "1.4.36", </s> add
https://github.com/excalidraw/excalidraw/commit/fe83e2922ddca078bc4b63d491a846b3a824813d
package.json
keep keep add keep keep keep keep
<mask> minY: number; <mask> maxX: number; <mask> maxY: number; <mask> } <mask> <mask> export interface Distribution { <mask> space: "between"; </s> Improves distribute algorithm (#2415) * Update disitrubte.ts * Update disitrubte.ts * Simplifies operations * Combines algorithms </s> remove const getCommonBoundingBox = ( elements: ExcalidrawElement[], ): Box & { width: number; height: number } => { </s> add const getCommonBoundingBox = (elements: ExcalidrawElement[]): Box => { </s> remove return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY }; </s> add return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY, midX: (minX + maxX) / 2, midY: (minY + maxY) / 2, }; </s> remove const start = distribution.axis === "x" ? "minX" : "minY"; const extent = distribution.axis === "x" ? "width" : "height"; const selectionBoundingBox = getCommonBoundingBox(selectedElements); </s> add const [start, mid, end, extent] = distribution.axis === "x" ? (["minX", "midX", "maxX", "width"] as const) : (["minY", "midY", "maxY", "height"] as const); </s> remove pos += box[extent]; </s> add </s> remove const step = (selectionBoundingBox[extent] - span) / (groups.length - 1); let pos = selectionBoundingBox[start]; </s> add const step = (bounds[extent] - span) / (groups.length - 1); if (step < 0) { // If we have a negative step, we'll need to distribute from centers // rather than from gaps. Buckle up, this is a weird one. // Get indices of boxes that define start and end of our bounding box const i0 = groups.findIndex((g) => g[1][start] === bounds[start]); const i1 = groups.findIndex((g) => g[1][end] === bounds[end]); // Get our step, based on the distance between the center points of our // start and end boxes const step = (groups[i1][1][mid] - groups[i0][1][mid]) / (groups.length - 1); let pos = groups[i0][1][mid]; return groups.flatMap(([group, box], i) => { const translation = { x: 0, y: 0, }; // Don't move our start and end boxes if (i !== i0 && i !== i1) { pos += step; translation[distribution.axis] = pos - box[mid]; } return group.map((element) => newElementWith(element, { x: element.x + translation.x, y: element.y + translation.y, }), ); }); } // Distribute from gaps let pos = bounds[start]; </s> remove if (Math.abs(pos - box[start]) >= 1e-6) { translation[distribution.axis] = pos - box[start]; } </s> add translation[distribution.axis] = pos - box[start];
https://github.com/excalidraw/excalidraw/commit/fec48060f7682ebaba8a84d367fbaeaebbec6ee1
src/disitrubte.ts
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> export const distributeElements = ( <mask> selectedElements: ExcalidrawElement[], <mask> distribution: Distribution, <mask> ): ExcalidrawElement[] => { <mask> const start = distribution.axis === "x" ? "minX" : "minY"; <mask> const extent = distribution.axis === "x" ? "width" : "height"; <mask> <mask> const selectionBoundingBox = getCommonBoundingBox(selectedElements); <mask> <mask> const groups = getMaximumGroups(selectedElements) <mask> .map((group) => [group, getCommonBoundingBox(group)] as const) <mask> .sort((a, b) => a[1][start] - b[1][start]); <mask> </s> Improves distribute algorithm (#2415) * Update disitrubte.ts * Update disitrubte.ts * Simplifies operations * Combines algorithms </s> add const bounds = getCommonBoundingBox(selectedElements); </s> remove .sort((a, b) => a[1][start] - b[1][start]); </s> add .sort((a, b) => a[1][mid] - b[1][mid]); </s> remove const step = (selectionBoundingBox[extent] - span) / (groups.length - 1); let pos = selectionBoundingBox[start]; </s> add const step = (bounds[extent] - span) / (groups.length - 1); if (step < 0) { // If we have a negative step, we'll need to distribute from centers // rather than from gaps. Buckle up, this is a weird one. // Get indices of boxes that define start and end of our bounding box const i0 = groups.findIndex((g) => g[1][start] === bounds[start]); const i1 = groups.findIndex((g) => g[1][end] === bounds[end]); // Get our step, based on the distance between the center points of our // start and end boxes const step = (groups[i1][1][mid] - groups[i0][1][mid]) / (groups.length - 1); let pos = groups[i0][1][mid]; return groups.flatMap(([group, box], i) => { const translation = { x: 0, y: 0, }; // Don't move our start and end boxes if (i !== i0 && i !== i1) { pos += step; translation[distribution.axis] = pos - box[mid]; } return group.map((element) => newElementWith(element, { x: element.x + translation.x, y: element.y + translation.y, }), ); }); } // Distribute from gaps let pos = bounds[start]; </s> remove const getCommonBoundingBox = ( elements: ExcalidrawElement[], ): Box & { width: number; height: number } => { </s> add const getCommonBoundingBox = (elements: ExcalidrawElement[]): Box => { </s> remove return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY }; </s> add return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY, midX: (minX + maxX) / 2, midY: (minY + maxY) / 2, }; </s> remove if (Math.abs(pos - box[start]) >= 1e-6) { translation[distribution.axis] = pos - box[start]; } </s> add translation[distribution.axis] = pos - box[start];
https://github.com/excalidraw/excalidraw/commit/fec48060f7682ebaba8a84d367fbaeaebbec6ee1
src/disitrubte.ts
keep keep add keep keep keep keep keep
<mask> ? (["minX", "midX", "maxX", "width"] as const) <mask> : (["minY", "midY", "maxY", "height"] as const); <mask> <mask> const groups = getMaximumGroups(selectedElements) <mask> .map((group) => [group, getCommonBoundingBox(group)] as const) <mask> .sort((a, b) => a[1][mid] - b[1][mid]); <mask> <mask> let span = 0; </s> Improves distribute algorithm (#2415) * Update disitrubte.ts * Update disitrubte.ts * Simplifies operations * Combines algorithms </s> remove const start = distribution.axis === "x" ? "minX" : "minY"; const extent = distribution.axis === "x" ? "width" : "height"; const selectionBoundingBox = getCommonBoundingBox(selectedElements); </s> add const [start, mid, end, extent] = distribution.axis === "x" ? (["minX", "midX", "maxX", "width"] as const) : (["minY", "midY", "maxY", "height"] as const); </s> remove .sort((a, b) => a[1][start] - b[1][start]); </s> add .sort((a, b) => a[1][mid] - b[1][mid]); </s> remove const step = (selectionBoundingBox[extent] - span) / (groups.length - 1); let pos = selectionBoundingBox[start]; </s> add const step = (bounds[extent] - span) / (groups.length - 1); if (step < 0) { // If we have a negative step, we'll need to distribute from centers // rather than from gaps. Buckle up, this is a weird one. // Get indices of boxes that define start and end of our bounding box const i0 = groups.findIndex((g) => g[1][start] === bounds[start]); const i1 = groups.findIndex((g) => g[1][end] === bounds[end]); // Get our step, based on the distance between the center points of our // start and end boxes const step = (groups[i1][1][mid] - groups[i0][1][mid]) / (groups.length - 1); let pos = groups[i0][1][mid]; return groups.flatMap(([group, box], i) => { const translation = { x: 0, y: 0, }; // Don't move our start and end boxes if (i !== i0 && i !== i1) { pos += step; translation[distribution.axis] = pos - box[mid]; } return group.map((element) => newElementWith(element, { x: element.x + translation.x, y: element.y + translation.y, }), ); }); } // Distribute from gaps let pos = bounds[start]; </s> remove const getCommonBoundingBox = ( elements: ExcalidrawElement[], ): Box & { width: number; height: number } => { </s> add const getCommonBoundingBox = (elements: ExcalidrawElement[]): Box => { </s> remove if (Math.abs(pos - box[start]) >= 1e-6) { translation[distribution.axis] = pos - box[start]; } </s> add translation[distribution.axis] = pos - box[start]; </s> remove return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY }; </s> add return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY, midX: (minX + maxX) / 2, midY: (minY + maxY) / 2, };
https://github.com/excalidraw/excalidraw/commit/fec48060f7682ebaba8a84d367fbaeaebbec6ee1
src/disitrubte.ts
keep keep keep keep replace keep keep keep keep keep
<mask> const selectionBoundingBox = getCommonBoundingBox(selectedElements); <mask> <mask> const groups = getMaximumGroups(selectedElements) <mask> .map((group) => [group, getCommonBoundingBox(group)] as const) <mask> .sort((a, b) => a[1][start] - b[1][start]); <mask> <mask> let span = 0; <mask> for (const group of groups) { <mask> span += group[1][extent]; <mask> } </s> Improves distribute algorithm (#2415) * Update disitrubte.ts * Update disitrubte.ts * Simplifies operations * Combines algorithms </s> add const bounds = getCommonBoundingBox(selectedElements); </s> remove const start = distribution.axis === "x" ? "minX" : "minY"; const extent = distribution.axis === "x" ? "width" : "height"; const selectionBoundingBox = getCommonBoundingBox(selectedElements); </s> add const [start, mid, end, extent] = distribution.axis === "x" ? (["minX", "midX", "maxX", "width"] as const) : (["minY", "midY", "maxY", "height"] as const); </s> remove const step = (selectionBoundingBox[extent] - span) / (groups.length - 1); let pos = selectionBoundingBox[start]; </s> add const step = (bounds[extent] - span) / (groups.length - 1); if (step < 0) { // If we have a negative step, we'll need to distribute from centers // rather than from gaps. Buckle up, this is a weird one. // Get indices of boxes that define start and end of our bounding box const i0 = groups.findIndex((g) => g[1][start] === bounds[start]); const i1 = groups.findIndex((g) => g[1][end] === bounds[end]); // Get our step, based on the distance between the center points of our // start and end boxes const step = (groups[i1][1][mid] - groups[i0][1][mid]) / (groups.length - 1); let pos = groups[i0][1][mid]; return groups.flatMap(([group, box], i) => { const translation = { x: 0, y: 0, }; // Don't move our start and end boxes if (i !== i0 && i !== i1) { pos += step; translation[distribution.axis] = pos - box[mid]; } return group.map((element) => newElementWith(element, { x: element.x + translation.x, y: element.y + translation.y, }), ); }); } // Distribute from gaps let pos = bounds[start]; </s> remove const getCommonBoundingBox = ( elements: ExcalidrawElement[], ): Box & { width: number; height: number } => { </s> add const getCommonBoundingBox = (elements: ExcalidrawElement[]): Box => { </s> remove if (Math.abs(pos - box[start]) >= 1e-6) { translation[distribution.axis] = pos - box[start]; } </s> add translation[distribution.axis] = pos - box[start]; </s> remove return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY }; </s> add return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY, midX: (minX + maxX) / 2, midY: (minY + maxY) / 2, };
https://github.com/excalidraw/excalidraw/commit/fec48060f7682ebaba8a84d367fbaeaebbec6ee1
src/disitrubte.ts
keep keep keep keep replace replace keep keep keep keep keep
<mask> for (const group of groups) { <mask> span += group[1][extent]; <mask> } <mask> <mask> const step = (selectionBoundingBox[extent] - span) / (groups.length - 1); <mask> let pos = selectionBoundingBox[start]; <mask> <mask> return groups.flatMap(([group, box]) => { <mask> const translation = { <mask> x: 0, <mask> y: 0, </s> Improves distribute algorithm (#2415) * Update disitrubte.ts * Update disitrubte.ts * Simplifies operations * Combines algorithms </s> remove .sort((a, b) => a[1][start] - b[1][start]); </s> add .sort((a, b) => a[1][mid] - b[1][mid]); </s> remove if (Math.abs(pos - box[start]) >= 1e-6) { translation[distribution.axis] = pos - box[start]; } </s> add translation[distribution.axis] = pos - box[start]; </s> remove return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY }; </s> add return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY, midX: (minX + maxX) / 2, midY: (minY + maxY) / 2, }; </s> remove const getCommonBoundingBox = ( elements: ExcalidrawElement[], ): Box & { width: number; height: number } => { </s> add const getCommonBoundingBox = (elements: ExcalidrawElement[]): Box => { </s> remove pos += box[extent]; </s> add </s> add pos += box[extent];
https://github.com/excalidraw/excalidraw/commit/fec48060f7682ebaba8a84d367fbaeaebbec6ee1
src/disitrubte.ts
keep replace replace replace keep replace keep keep keep
<mask> <mask> if (Math.abs(pos - box[start]) >= 1e-6) { <mask> translation[distribution.axis] = pos - box[start]; <mask> } <mask> <mask> pos += box[extent]; <mask> pos += step; <mask> <mask> return group.map((element) => </s> Improves distribute algorithm (#2415) * Update disitrubte.ts * Update disitrubte.ts * Simplifies operations * Combines algorithms </s> add pos += box[extent]; </s> remove const step = (selectionBoundingBox[extent] - span) / (groups.length - 1); let pos = selectionBoundingBox[start]; </s> add const step = (bounds[extent] - span) / (groups.length - 1); if (step < 0) { // If we have a negative step, we'll need to distribute from centers // rather than from gaps. Buckle up, this is a weird one. // Get indices of boxes that define start and end of our bounding box const i0 = groups.findIndex((g) => g[1][start] === bounds[start]); const i1 = groups.findIndex((g) => g[1][end] === bounds[end]); // Get our step, based on the distance between the center points of our // start and end boxes const step = (groups[i1][1][mid] - groups[i0][1][mid]) / (groups.length - 1); let pos = groups[i0][1][mid]; return groups.flatMap(([group, box], i) => { const translation = { x: 0, y: 0, }; // Don't move our start and end boxes if (i !== i0 && i !== i1) { pos += step; translation[distribution.axis] = pos - box[mid]; } return group.map((element) => newElementWith(element, { x: element.x + translation.x, y: element.y + translation.y, }), ); }); } // Distribute from gaps let pos = bounds[start]; </s> remove .sort((a, b) => a[1][start] - b[1][start]); </s> add .sort((a, b) => a[1][mid] - b[1][mid]); </s> remove const getCommonBoundingBox = ( elements: ExcalidrawElement[], ): Box & { width: number; height: number } => { </s> add const getCommonBoundingBox = (elements: ExcalidrawElement[]): Box => { </s> remove return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY }; </s> add return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY, midX: (minX + maxX) / 2, midY: (minY + maxY) / 2, };
https://github.com/excalidraw/excalidraw/commit/fec48060f7682ebaba8a84d367fbaeaebbec6ee1
src/disitrubte.ts
keep keep keep add keep keep keep keep keep keep
<mask> <mask> translation[distribution.axis] = pos - box[start]; <mask> <mask> pos += step; <mask> <mask> return group.map((element) => <mask> newElementWith(element, { <mask> x: element.x + translation.x, <mask> y: element.y + translation.y, <mask> }), </s> Improves distribute algorithm (#2415) * Update disitrubte.ts * Update disitrubte.ts * Simplifies operations * Combines algorithms </s> remove x: Math.round(element.x + translation.x), y: Math.round(element.y + translation.y), </s> add x: element.x + translation.x, y: element.y + translation.y, </s> remove if (Math.abs(pos - box[start]) >= 1e-6) { translation[distribution.axis] = pos - box[start]; } </s> add translation[distribution.axis] = pos - box[start]; </s> remove pos += box[extent]; </s> add </s> remove const step = (selectionBoundingBox[extent] - span) / (groups.length - 1); let pos = selectionBoundingBox[start]; </s> add const step = (bounds[extent] - span) / (groups.length - 1); if (step < 0) { // If we have a negative step, we'll need to distribute from centers // rather than from gaps. Buckle up, this is a weird one. // Get indices of boxes that define start and end of our bounding box const i0 = groups.findIndex((g) => g[1][start] === bounds[start]); const i1 = groups.findIndex((g) => g[1][end] === bounds[end]); // Get our step, based on the distance between the center points of our // start and end boxes const step = (groups[i1][1][mid] - groups[i0][1][mid]) / (groups.length - 1); let pos = groups[i0][1][mid]; return groups.flatMap(([group, box], i) => { const translation = { x: 0, y: 0, }; // Don't move our start and end boxes if (i !== i0 && i !== i1) { pos += step; translation[distribution.axis] = pos - box[mid]; } return group.map((element) => newElementWith(element, { x: element.x + translation.x, y: element.y + translation.y, }), ); }); } // Distribute from gaps let pos = bounds[start]; </s> remove return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY }; </s> add return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY, midX: (minX + maxX) / 2, midY: (minY + maxY) / 2, }; </s> remove const getCommonBoundingBox = ( elements: ExcalidrawElement[], ): Box & { width: number; height: number } => { </s> add const getCommonBoundingBox = (elements: ExcalidrawElement[]): Box => {
https://github.com/excalidraw/excalidraw/commit/fec48060f7682ebaba8a84d367fbaeaebbec6ee1
src/disitrubte.ts
keep keep keep keep replace replace keep keep keep keep keep
<mask> pos += step; <mask> <mask> return group.map((element) => <mask> newElementWith(element, { <mask> x: Math.round(element.x + translation.x), <mask> y: Math.round(element.y + translation.y), <mask> }), <mask> ); <mask> }); <mask> }; <mask> </s> Improves distribute algorithm (#2415) * Update disitrubte.ts * Update disitrubte.ts * Simplifies operations * Combines algorithms </s> remove pos += box[extent]; </s> add </s> add pos += box[extent]; </s> remove const step = (selectionBoundingBox[extent] - span) / (groups.length - 1); let pos = selectionBoundingBox[start]; </s> add const step = (bounds[extent] - span) / (groups.length - 1); if (step < 0) { // If we have a negative step, we'll need to distribute from centers // rather than from gaps. Buckle up, this is a weird one. // Get indices of boxes that define start and end of our bounding box const i0 = groups.findIndex((g) => g[1][start] === bounds[start]); const i1 = groups.findIndex((g) => g[1][end] === bounds[end]); // Get our step, based on the distance between the center points of our // start and end boxes const step = (groups[i1][1][mid] - groups[i0][1][mid]) / (groups.length - 1); let pos = groups[i0][1][mid]; return groups.flatMap(([group, box], i) => { const translation = { x: 0, y: 0, }; // Don't move our start and end boxes if (i !== i0 && i !== i1) { pos += step; translation[distribution.axis] = pos - box[mid]; } return group.map((element) => newElementWith(element, { x: element.x + translation.x, y: element.y + translation.y, }), ); }); } // Distribute from gaps let pos = bounds[start]; </s> remove if (Math.abs(pos - box[start]) >= 1e-6) { translation[distribution.axis] = pos - box[start]; } </s> add translation[distribution.axis] = pos - box[start]; </s> remove return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY }; </s> add return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY, midX: (minX + maxX) / 2, midY: (minY + maxY) / 2, }; </s> remove const getCommonBoundingBox = ( elements: ExcalidrawElement[], ): Box & { width: number; height: number } => { </s> add const getCommonBoundingBox = (elements: ExcalidrawElement[]): Box => {
https://github.com/excalidraw/excalidraw/commit/fec48060f7682ebaba8a84d367fbaeaebbec6ee1
src/disitrubte.ts
keep replace replace replace keep replace
<mask> <mask> const getCommonBoundingBox = ( <mask> elements: ExcalidrawElement[], <mask> ): Box & { width: number; height: number } => { <mask> const [minX, minY, maxX, maxY] = getCommonBounds(elements); <mask> return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY }; </s> Improves distribute algorithm (#2415) * Update disitrubte.ts * Update disitrubte.ts * Simplifies operations * Combines algorithms </s> add midX: number; midY: number; width: number; height: number; </s> remove const start = distribution.axis === "x" ? "minX" : "minY"; const extent = distribution.axis === "x" ? "width" : "height"; const selectionBoundingBox = getCommonBoundingBox(selectedElements); </s> add const [start, mid, end, extent] = distribution.axis === "x" ? (["minX", "midX", "maxX", "width"] as const) : (["minY", "midY", "maxY", "height"] as const); </s> remove const step = (selectionBoundingBox[extent] - span) / (groups.length - 1); let pos = selectionBoundingBox[start]; </s> add const step = (bounds[extent] - span) / (groups.length - 1); if (step < 0) { // If we have a negative step, we'll need to distribute from centers // rather than from gaps. Buckle up, this is a weird one. // Get indices of boxes that define start and end of our bounding box const i0 = groups.findIndex((g) => g[1][start] === bounds[start]); const i1 = groups.findIndex((g) => g[1][end] === bounds[end]); // Get our step, based on the distance between the center points of our // start and end boxes const step = (groups[i1][1][mid] - groups[i0][1][mid]) / (groups.length - 1); let pos = groups[i0][1][mid]; return groups.flatMap(([group, box], i) => { const translation = { x: 0, y: 0, }; // Don't move our start and end boxes if (i !== i0 && i !== i1) { pos += step; translation[distribution.axis] = pos - box[mid]; } return group.map((element) => newElementWith(element, { x: element.x + translation.x, y: element.y + translation.y, }), ); }); } // Distribute from gaps let pos = bounds[start]; </s> remove .sort((a, b) => a[1][start] - b[1][start]); </s> add .sort((a, b) => a[1][mid] - b[1][mid]); </s> remove if (Math.abs(pos - box[start]) >= 1e-6) { translation[distribution.axis] = pos - box[start]; } </s> add translation[distribution.axis] = pos - box[start];
https://github.com/excalidraw/excalidraw/commit/fec48060f7682ebaba8a84d367fbaeaebbec6ee1
src/disitrubte.ts
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> const shape = getShapeForElement(element) as Drawable[]; <mask> <mask> const [x1, y1, x2, y2] = getLinearElementAbsoluteBounds(element); <mask> if (x < x1 || y < y1 - 10 || x > x2 || y > y2 + 10) { <mask> return false; <mask> } <mask> <mask> const relX = x - element.x; <mask> const relY = y - element.y; </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> remove return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); </s> add return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY, lineThreshold), ); </s> remove if (diff < epsilon) { </s> add if (diff < lineThreshold) { </s> remove const hitTestRoughShape = (opSet: OpSet[], x: number, y: number) => { </s> add const hitTestRoughShape = ( opSet: OpSet[], x: number, y: number, lineThreshold: number, ) => { </s> remove const epsilon = 20; </s> add </s> remove it("arrow", () => { </s> add it("arrow escape", () => { </s> add /* 1 2 3 4 5 6 7 8 9 1 2 x 3 4 . 5 6 7 x 8 9 */
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/element/collision.ts
keep keep keep keep replace keep keep keep keep keep
<mask> const relX = x - element.x; <mask> const relY = y - element.y; <mask> <mask> // hit thest all "subshapes" of the linear element <mask> return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); <mask> } else if (element.type === "text") { <mask> const [x1, y1, x2, y2] = getElementAbsoluteCoords(element); <mask> <mask> return x >= x1 && x <= x2 && y >= y1 && y <= y2; <mask> } else if (element.type === "selection") { </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> remove if (x < x1 || y < y1 - 10 || x > x2 || y > y2 + 10) { </s> add if ( x < x1 - lineThreshold || y < y1 - lineThreshold || x > x2 + lineThreshold || y > y2 + lineThreshold ) { </s> remove it("arrow", () => { </s> add it("arrow escape", () => { </s> remove if (diff < epsilon) { </s> add if (diff < lineThreshold) { </s> remove const epsilon = 20; </s> add </s> add /* 1 2 3 4 5 6 7 8 9 1 2 x 3 4 . 5 6 7 x 8 9 */ </s> add /* 1 2 3 4 5 6 7 8 9 1 2 x 3 4 . 5 6 7 x 8 9 */
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/element/collision.ts
keep keep keep add keep keep keep keep keep keep
<mask> p1: Point, <mask> p2: Point, <mask> p3: Point, <mask> [mx, my]: Point, <mask> ) => { <mask> // B(t) = p0 * (1-t)^3 + 3p1 * t * (1-t)^2 + 3p2 * t^2 * (1-t) + p3 * t^3 <mask> const equation = (t: number, idx: number) => <mask> Math.pow(1 - t, 3) * p3[idx] + <mask> 3 * t * Math.pow(1 - t, 2) * p2[idx] + <mask> 3 * Math.pow(t, 2) * (1 - t) * p1[idx] + </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> remove const epsilon = 20; </s> add </s> remove if (diff < epsilon) { </s> add if (diff < lineThreshold) { </s> remove if (x < x1 || y < y1 - 10 || x > x2 || y > y2 + 10) { </s> add if ( x < x1 - lineThreshold || y < y1 - lineThreshold || x > x2 + lineThreshold || y > y2 + lineThreshold ) { </s> remove const hitTestRoughShape = (opSet: OpSet[], x: number, y: number) => { </s> add const hitTestRoughShape = ( opSet: OpSet[], x: number, y: number, lineThreshold: number, ) => { </s> remove it("arrow", () => { </s> add it("arrow escape", () => { </s> remove return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); </s> add return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY, lineThreshold), );
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/element/collision.ts
keep keep keep keep replace keep keep keep keep keep
<mask> 3 * t * Math.pow(1 - t, 2) * p2[idx] + <mask> 3 * Math.pow(t, 2) * (1 - t) * p1[idx] + <mask> p0[idx] * Math.pow(t, 3); <mask> <mask> const epsilon = 20; <mask> // go through t in increments of 0.01 <mask> let t = 0; <mask> while (t <= 1.0) { <mask> const tx = equation(t, 0); <mask> const ty = equation(t, 1); </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> add lineThreshold: number, </s> remove if (diff < epsilon) { </s> add if (diff < lineThreshold) { </s> remove return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); </s> add return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY, lineThreshold), ); </s> remove if (x < x1 || y < y1 - 10 || x > x2 || y > y2 + 10) { </s> add if ( x < x1 - lineThreshold || y < y1 - lineThreshold || x > x2 + lineThreshold || y > y2 + lineThreshold ) { </s> remove const hitTestRoughShape = (opSet: OpSet[], x: number, y: number) => { </s> add const hitTestRoughShape = ( opSet: OpSet[], x: number, y: number, lineThreshold: number, ) => { </s> remove it("arrow", () => { </s> add it("arrow escape", () => {
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/element/collision.ts
keep keep keep keep replace keep keep keep keep keep
<mask> const ty = equation(t, 1); <mask> <mask> const diff = Math.sqrt(Math.pow(tx - mx, 2) + Math.pow(ty - my, 2)); <mask> <mask> if (diff < epsilon) { <mask> return true; <mask> } <mask> <mask> t += 0.01; <mask> } </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> remove const epsilon = 20; </s> add </s> remove if (x < x1 || y < y1 - 10 || x > x2 || y > y2 + 10) { </s> add if ( x < x1 - lineThreshold || y < y1 - lineThreshold || x > x2 + lineThreshold || y > y2 + lineThreshold ) { </s> add lineThreshold: number, </s> remove return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); </s> add return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY, lineThreshold), ); </s> remove it("arrow", () => { </s> add it("arrow escape", () => { </s> remove const hitTestRoughShape = (opSet: OpSet[], x: number, y: number) => { </s> add const hitTestRoughShape = ( opSet: OpSet[], x: number, y: number, lineThreshold: number, ) => {
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/element/collision.ts
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> return false; <mask> }; <mask> <mask> const hitTestRoughShape = (opSet: OpSet[], x: number, y: number) => { <mask> // read operations from first opSet <mask> const ops = opSet[0].ops; <mask> <mask> // set start position as (0,0) just in case <mask> // move operation does not exist (unlikely but it is worth safekeeping it) </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> remove const retVal = pointInBezierEquation(p0, p1, p2, p3, [x, y]); </s> add const retVal = pointInBezierEquation( p0, p1, p2, p3, [x, y], lineThreshold, ); </s> add lineThreshold: number, </s> remove it("arrow", () => { </s> add it("arrow escape", () => { </s> remove const epsilon = 20; </s> add </s> remove if (x < x1 || y < y1 - 10 || x > x2 || y > y2 + 10) { </s> add if ( x < x1 - lineThreshold || y < y1 - lineThreshold || x > x2 + lineThreshold || y > y2 + lineThreshold ) { </s> remove return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); </s> add return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY, lineThreshold), );
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/element/collision.ts
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> // check if points are on the curve <mask> // cubic bezier curves require four parameters <mask> // the first parameter is the last stored position (p0) <mask> const retVal = pointInBezierEquation(p0, p1, p2, p3, [x, y]); <mask> <mask> // set end point of bezier curve as the new starting point for <mask> // upcoming operations as each operation is based on the last drawn <mask> // position of the previous operation <mask> return retVal; </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> remove const hitTestRoughShape = (opSet: OpSet[], x: number, y: number) => { </s> add const hitTestRoughShape = ( opSet: OpSet[], x: number, y: number, lineThreshold: number, ) => { </s> remove return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); </s> add return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY, lineThreshold), ); </s> remove // click on a line on the rectangle fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); </s> add // click on a line on the arrow fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> remove // click on a line on the rectangle fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); </s> add // click on a line on the arrow fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> remove const epsilon = 20; </s> add </s> remove it("arrow", () => { </s> add it("arrow escape", () => {
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/element/collision.ts
keep add keep keep keep keep
<mask> } <mask> <mask> const tool = getByToolName("selection"); <mask> fireEvent.click(tool); <mask> // click on a line on the arrow <mask> fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> remove // click on a line on the rectangle fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); </s> add // click on a line on the arrow fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> remove // click on a line on the rectangle fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); </s> add // click on a line on the arrow fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> add /* 1 2 3 4 5 6 7 8 9 1 2 x 3 4 . 5 6 7 x 8 9 */ </s> remove it("arrow", () => { </s> add it("arrow escape", () => { </s> remove return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); </s> add return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY, lineThreshold), ); </s> remove if (diff < epsilon) { </s> add if (diff < lineThreshold) {
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/tests/selection.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> <mask> const tool = getByToolName("selection"); <mask> fireEvent.click(tool); <mask> // click on a line on the rectangle <mask> fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(7); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> remove // click on a line on the rectangle fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); </s> add // click on a line on the arrow fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> add /* 1 2 3 4 5 6 7 8 9 1 2 x 3 4 . 5 6 7 x 8 9 */ </s> add /* 1 2 3 4 5 6 7 8 9 1 2 x 3 4 . 5 6 7 x 8 9 */ </s> remove it("arrow", () => { </s> add it("arrow escape", () => { </s> remove return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); </s> add return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY, lineThreshold), ); </s> remove if (diff < epsilon) { </s> add if (diff < lineThreshold) {
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/tests/selection.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> expect(h.elements.length).toEqual(1); <mask> expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); <mask> }); <mask> <mask> it("arrow", () => { <mask> const { getByToolName, container } = render(<App />); <mask> const canvas = container.querySelector("canvas")!; <mask> { <mask> // create element <mask> const tool = getByToolName("line"); </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> remove return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); </s> add return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY, lineThreshold), ); </s> remove // click on a line on the rectangle fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); </s> add // click on a line on the arrow fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> remove // click on a line on the rectangle fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); </s> add // click on a line on the arrow fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> remove const hitTestRoughShape = (opSet: OpSet[], x: number, y: number) => { </s> add const hitTestRoughShape = ( opSet: OpSet[], x: number, y: number, lineThreshold: number, ) => { </s> remove if (diff < epsilon) { </s> add if (diff < lineThreshold) { </s> remove if (x < x1 || y < y1 - 10 || x > x2 || y > y2 + 10) { </s> add if ( x < x1 - lineThreshold || y < y1 - lineThreshold || x > x2 + lineThreshold || y > y2 + lineThreshold ) {
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/tests/selection.test.tsx
keep keep keep add keep keep keep keep
<mask> fireEvent.pointerUp(canvas); <mask> fireEvent.keyDown(document, { key: KEYS.ESCAPE }); <mask> } <mask> <mask> const tool = getByToolName("selection"); <mask> fireEvent.click(tool); <mask> // click on a line on the arrow <mask> fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests </s> remove // click on a line on the rectangle fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); </s> add // click on a line on the arrow fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> remove // click on a line on the rectangle fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); </s> add // click on a line on the arrow fireEvent.pointerDown(canvas, { clientX: 40, clientY: 40 }); </s> add /* 1 2 3 4 5 6 7 8 9 1 2 x 3 4 . 5 6 7 x 8 9 */ </s> remove it("arrow", () => { </s> add it("arrow escape", () => { </s> remove if (diff < epsilon) { </s> add if (diff < lineThreshold) { </s> remove return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY)); </s> add return shape.some(subshape => hitTestRoughShape(subshape.sets, relX, relY, lineThreshold), );
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/tests/selection.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> <mask> const tool = getByToolName("selection"); <mask> fireEvent.click(tool); <mask> // click on a line on the rectangle <mask> fireEvent.pointerDown(canvas, { clientX: 45, clientY: 20 }); <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(7); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); </s> Fix hit testing threshold (#969) * Fix hit testing threshold - The bounding box was not correctly extended to take into account the threshold. It was only for y axis but not x. - The bezier threshold was using 20 instead of 10 and not taking into account zoom level. Both those issues are fixed and now the behavior looks good on all the shapes I can test. * fix_tests
https://github.com/excalidraw/excalidraw/commit/fed705411455a7b68124840a7548153d955e4593
src/tests/selection.test.tsx
keep keep keep add keep keep keep keep keep
<mask> ELEMENT_TRANSLATE_AMOUNT, <mask> ENV, <mask> EVENT, <mask> GRID_SIZE, <mask> IMAGE_RENDER_TIMEOUT, <mask> isAndroid, <mask> isBrave, <mask> LINE_CONFIRM_THRESHOLD, <mask> MAX_ALLOWED_FILE_BYTES, </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> remove type FILE_EXTENSION = | "gif" | "jpg" | "png" | "excalidraw.png" | "svg" | "excalidraw.svg" | "json" | "excalidraw" | "excalidrawlib"; </s> add type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">; </s> remove mimeType: typeof ALLOWED_IMAGE_MIME_TYPES[number]; </s> add mimeType: ValueOf<typeof IMAGE_MIME_TYPES>; </s> remove | typeof ALLOWED_IMAGE_MIME_TYPES[number] </s> add | ValueOf<typeof IMAGE_MIME_TYPES> </s> remove import { Merge, ForwardRef } from "./utility-types"; </s> add import { Merge, ForwardRef, ValueOf } from "./utility-types"; </s> remove import type { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; </s> add import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; </s> remove return ( !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) ); </s> add return !!type && (Object.values(IMAGE_MIME_TYPES) as string[]).includes(type);
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/components/App.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> ); <mask> <mask> const imageFile = await fileOpen({ <mask> description: "Image", <mask> extensions: ["jpg", "png", "svg", "gif"], <mask> }); <mask> <mask> const imageElement = this.createImageElement({ <mask> sceneX: x, <mask> sceneY: y, </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> remove return ( !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) ); </s> add return !!type && (Object.values(IMAGE_MIME_TYPES) as string[]).includes(type); </s> remove ): blob is Blob & { type: typeof ALLOWED_IMAGE_MIME_TYPES[number] } => { </s> add ): blob is Blob & { type: ValueOf<typeof IMAGE_MIME_TYPES> } => { </s> remove export const ALLOWED_IMAGE_MIME_TYPES = [ MIME_TYPES.png, MIME_TYPES.jpg, MIME_TYPES.svg, MIME_TYPES.gif, MIME_TYPES.webp, MIME_TYPES.bmp, MIME_TYPES.ico, ] as const; </s> add </s> remove export const MIME_TYPES = { excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", json: "application/json", </s> add export const IMAGE_MIME_TYPES = { </s> remove type FILE_EXTENSION = | "gif" | "jpg" | "png" | "excalidraw.png" | "svg" | "excalidraw.svg" | "json" | "excalidraw" | "excalidrawlib"; </s> add type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">; </s> remove | typeof ALLOWED_IMAGE_MIME_TYPES[number] </s> add | ValueOf<typeof IMAGE_MIME_TYPES>
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/components/App.tsx
keep keep keep replace replace replace replace keep replace keep keep keep keep
<mask> <mask> export const GRID_SIZE = 20; // TODO make it configurable? <mask> <mask> export const MIME_TYPES = { <mask> excalidraw: "application/vnd.excalidraw+json", <mask> excalidrawlib: "application/vnd.excalidrawlib+json", <mask> json: "application/json", <mask> svg: "image/svg+xml", <mask> "excalidraw.svg": "image/svg+xml", <mask> png: "image/png", <mask> "excalidraw.png": "image/png", <mask> jpg: "image/jpeg", <mask> gif: "image/gif", </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> remove "excalidraw.png": "image/png", </s> add </s> add avif: "image/avif", jfif: "image/jfif", } as const; export const MIME_TYPES = { json: "application/json", // excalidraw data excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", // image-encoded excalidraw data "excalidraw.svg": "image/svg+xml", "excalidraw.png": "image/png", // binary </s> add // image ...IMAGE_MIME_TYPES, </s> remove export const ALLOWED_IMAGE_MIME_TYPES = [ MIME_TYPES.png, MIME_TYPES.jpg, MIME_TYPES.svg, MIME_TYPES.gif, MIME_TYPES.webp, MIME_TYPES.bmp, MIME_TYPES.ico, ] as const; </s> add </s> remove | typeof ALLOWED_IMAGE_MIME_TYPES[number] </s> add | ValueOf<typeof IMAGE_MIME_TYPES>
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/constants.ts
keep keep keep keep replace keep keep keep keep keep
<mask> json: "application/json", <mask> svg: "image/svg+xml", <mask> "excalidraw.svg": "image/svg+xml", <mask> png: "image/png", <mask> "excalidraw.png": "image/png", <mask> jpg: "image/jpeg", <mask> gif: "image/gif", <mask> webp: "image/webp", <mask> bmp: "image/bmp", <mask> ico: "image/x-icon", </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> remove "excalidraw.svg": "image/svg+xml", </s> add </s> remove export const MIME_TYPES = { excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", json: "application/json", </s> add export const IMAGE_MIME_TYPES = { </s> add avif: "image/avif", jfif: "image/jfif", } as const; export const MIME_TYPES = { json: "application/json", // excalidraw data excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", // image-encoded excalidraw data "excalidraw.svg": "image/svg+xml", "excalidraw.png": "image/png", // binary </s> remove mimeType: typeof ALLOWED_IMAGE_MIME_TYPES[number]; </s> add mimeType: ValueOf<typeof IMAGE_MIME_TYPES>; </s> remove | typeof ALLOWED_IMAGE_MIME_TYPES[number] </s> add | ValueOf<typeof IMAGE_MIME_TYPES> </s> remove import { Merge, ForwardRef } from "./utility-types"; </s> add import { Merge, ForwardRef, ValueOf } from "./utility-types";
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/constants.ts
keep add keep keep keep keep keep keep
<mask> bmp: "image/bmp", <mask> ico: "image/x-icon", <mask> binary: "application/octet-stream", <mask> // image <mask> ...IMAGE_MIME_TYPES, <mask> } as const; <mask> <mask> export const EXPORT_DATA_TYPES = { </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> add // image ...IMAGE_MIME_TYPES, </s> remove "excalidraw.png": "image/png", </s> add </s> remove export const ALLOWED_IMAGE_MIME_TYPES = [ MIME_TYPES.png, MIME_TYPES.jpg, MIME_TYPES.svg, MIME_TYPES.gif, MIME_TYPES.webp, MIME_TYPES.bmp, MIME_TYPES.ico, ] as const; </s> add </s> remove return ( !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) ); </s> add return !!type && (Object.values(IMAGE_MIME_TYPES) as string[]).includes(type); </s> remove export const MIME_TYPES = { excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", json: "application/json", </s> add export const IMAGE_MIME_TYPES = { </s> remove ): blob is Blob & { type: typeof ALLOWED_IMAGE_MIME_TYPES[number] } => { </s> add ): blob is Blob & { type: ValueOf<typeof IMAGE_MIME_TYPES> } => {
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/constants.ts
keep add keep keep keep keep keep keep
<mask> // binary <mask> binary: "application/octet-stream", <mask> } as const; <mask> <mask> export const EXPORT_DATA_TYPES = { <mask> excalidraw: "excalidraw", <mask> excalidrawClipboard: "excalidraw/clipboard", <mask> excalidrawLibrary: "excalidrawlib", </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> add avif: "image/avif", jfif: "image/jfif", } as const; export const MIME_TYPES = { json: "application/json", // excalidraw data excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", // image-encoded excalidraw data "excalidraw.svg": "image/svg+xml", "excalidraw.png": "image/png", // binary </s> remove export const ALLOWED_IMAGE_MIME_TYPES = [ MIME_TYPES.png, MIME_TYPES.jpg, MIME_TYPES.svg, MIME_TYPES.gif, MIME_TYPES.webp, MIME_TYPES.bmp, MIME_TYPES.ico, ] as const; </s> add </s> remove export const MIME_TYPES = { excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", json: "application/json", </s> add export const IMAGE_MIME_TYPES = { </s> remove return ( !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) ); </s> add return !!type && (Object.values(IMAGE_MIME_TYPES) as string[]).includes(type); </s> remove ): blob is Blob & { type: typeof ALLOWED_IMAGE_MIME_TYPES[number] } => { </s> add ): blob is Blob & { type: ValueOf<typeof IMAGE_MIME_TYPES> } => { </s> remove import { Merge, ForwardRef } from "./utility-types"; </s> add import { Merge, ForwardRef, ValueOf } from "./utility-types";
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/constants.ts
keep keep keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> export const DEFAULT_EXPORT_PADDING = 10; // px <mask> <mask> export const DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT = 1440; <mask> <mask> export const ALLOWED_IMAGE_MIME_TYPES = [ <mask> MIME_TYPES.png, <mask> MIME_TYPES.jpg, <mask> MIME_TYPES.svg, <mask> MIME_TYPES.gif, <mask> MIME_TYPES.webp, <mask> MIME_TYPES.bmp, <mask> MIME_TYPES.ico, <mask> ] as const; <mask> <mask> export const MAX_ALLOWED_FILE_BYTES = 2 * 1024 * 1024; <mask> <mask> export const SVG_NS = "http://www.w3.org/2000/svg"; <mask> <mask> export const ENCRYPTION_KEY_BITS = 128; </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> add avif: "image/avif", jfif: "image/jfif", } as const; export const MIME_TYPES = { json: "application/json", // excalidraw data excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", // image-encoded excalidraw data "excalidraw.svg": "image/svg+xml", "excalidraw.png": "image/png", // binary </s> remove export const MIME_TYPES = { excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", json: "application/json", </s> add export const IMAGE_MIME_TYPES = { </s> add // image ...IMAGE_MIME_TYPES, </s> remove | typeof ALLOWED_IMAGE_MIME_TYPES[number] </s> add | ValueOf<typeof IMAGE_MIME_TYPES> </s> remove return ( !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) ); </s> add return !!type && (Object.values(IMAGE_MIME_TYPES) as string[]).includes(type); </s> remove import { Merge, ForwardRef } from "./utility-types"; </s> add import { Merge, ForwardRef, ValueOf } from "./utility-types";
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/constants.ts
keep keep replace keep keep keep keep keep
<mask> import { nanoid } from "nanoid"; <mask> import { cleanAppStateForExport } from "../appState"; <mask> import { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "../constants"; <mask> import { clearElementsForExport } from "../element"; <mask> import { ExcalidrawElement, FileId } from "../element/types"; <mask> import { CanvasError } from "../errors"; <mask> import { t } from "../i18n"; <mask> import { calculateScrollCenter } from "../scene"; </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> remove import type { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; </s> add import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; </s> remove import { Merge, ForwardRef } from "./utility-types"; </s> add import { Merge, ForwardRef, ValueOf } from "./utility-types"; </s> remove type FILE_EXTENSION = | "gif" | "jpg" | "png" | "excalidraw.png" | "svg" | "excalidraw.svg" | "json" | "excalidraw" | "excalidrawlib"; </s> add type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">; </s> remove ): blob is Blob & { type: typeof ALLOWED_IMAGE_MIME_TYPES[number] } => { </s> add ): blob is Blob & { type: ValueOf<typeof IMAGE_MIME_TYPES> } => { </s> add avif: "image/avif", jfif: "image/jfif", } as const; export const MIME_TYPES = { json: "application/json", // excalidraw data excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", // image-encoded excalidraw data "excalidraw.svg": "image/svg+xml", "excalidraw.png": "image/png", // binary </s> remove return ( !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) ); </s> add return !!type && (Object.values(IMAGE_MIME_TYPES) as string[]).includes(type);
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/data/blob.ts
keep keep keep replace keep replace replace replace keep
<mask> <mask> export const isSupportedImageFile = ( <mask> blob: Blob | null | undefined, <mask> ): blob is Blob & { type: typeof ALLOWED_IMAGE_MIME_TYPES[number] } => { <mask> const { type } = blob || {}; <mask> return ( <mask> !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) <mask> ); <mask> }; </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> remove | typeof ALLOWED_IMAGE_MIME_TYPES[number] </s> add | ValueOf<typeof IMAGE_MIME_TYPES> </s> remove type FILE_EXTENSION = | "gif" | "jpg" | "png" | "excalidraw.png" | "svg" | "excalidraw.svg" | "json" | "excalidraw" | "excalidrawlib"; </s> add type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">; </s> remove import { Merge, ForwardRef } from "./utility-types"; </s> add import { Merge, ForwardRef, ValueOf } from "./utility-types"; </s> remove import type { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; </s> add import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; </s> add avif: "image/avif", jfif: "image/jfif", } as const; export const MIME_TYPES = { json: "application/json", // excalidraw data excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", // image-encoded excalidraw data "excalidraw.svg": "image/svg+xml", "excalidraw.png": "image/png", // binary
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/data/blob.ts
keep keep keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> import { EVENT, MIME_TYPES } from "../constants"; <mask> import { AbortError } from "../errors"; <mask> import { debounce } from "../utils"; <mask> <mask> type FILE_EXTENSION = <mask> | "gif" <mask> | "jpg" <mask> | "png" <mask> | "excalidraw.png" <mask> | "svg" <mask> | "excalidraw.svg" <mask> | "json" <mask> | "excalidraw" <mask> | "excalidrawlib"; <mask> <mask> const INPUT_CHANGE_INTERVAL_MS = 500; <mask> <mask> export const fileOpen = <M extends boolean | undefined = false>(opts: { <mask> extensions?: FILE_EXTENSION[]; </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> remove import { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "../constants"; </s> add import { IMAGE_MIME_TYPES, MIME_TYPES } from "../constants"; </s> remove import { Merge, ForwardRef } from "./utility-types"; </s> add import { Merge, ForwardRef, ValueOf } from "./utility-types"; </s> remove import type { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; </s> add import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; </s> remove | typeof ALLOWED_IMAGE_MIME_TYPES[number] </s> add | ValueOf<typeof IMAGE_MIME_TYPES> </s> remove return ( !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) ); </s> add return !!type && (Object.values(IMAGE_MIME_TYPES) as string[]).includes(type); </s> remove ): blob is Blob & { type: typeof ALLOWED_IMAGE_MIME_TYPES[number] } => { </s> add ): blob is Blob & { type: ValueOf<typeof IMAGE_MIME_TYPES> } => {
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/data/filesystem.ts
keep keep replace keep replace keep keep keep
<mask> import Library from "./data/library"; <mask> import type { FileSystemHandle } from "./data/filesystem"; <mask> import type { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; <mask> import { ContextMenuItems } from "./components/ContextMenu"; <mask> import { Merge, ForwardRef } from "./utility-types"; <mask> import React from "react"; <mask> <mask> export type Point = Readonly<RoughPoint>; </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> remove import { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "../constants"; </s> add import { IMAGE_MIME_TYPES, MIME_TYPES } from "../constants"; </s> remove type FILE_EXTENSION = | "gif" | "jpg" | "png" | "excalidraw.png" | "svg" | "excalidraw.svg" | "json" | "excalidraw" | "excalidrawlib"; </s> add type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">; </s> remove ): blob is Blob & { type: typeof ALLOWED_IMAGE_MIME_TYPES[number] } => { </s> add ): blob is Blob & { type: ValueOf<typeof IMAGE_MIME_TYPES> } => { </s> remove return ( !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) ); </s> add return !!type && (Object.values(IMAGE_MIME_TYPES) as string[]).includes(type); </s> add avif: "image/avif", jfif: "image/jfif", } as const; export const MIME_TYPES = { json: "application/json", // excalidraw data excalidraw: "application/vnd.excalidraw+json", excalidrawlib: "application/vnd.excalidrawlib+json", // image-encoded excalidraw data "excalidraw.svg": "image/svg+xml", "excalidraw.png": "image/png", // binary
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/types.ts
keep keep keep keep replace keep keep keep keep keep
<mask> export type DataURL = string & { _brand: "DataURL" }; <mask> <mask> export type BinaryFileData = { <mask> mimeType: <mask> | typeof ALLOWED_IMAGE_MIME_TYPES[number] <mask> // future user or unknown file type <mask> | typeof MIME_TYPES.binary; <mask> id: FileId; <mask> dataURL: DataURL; <mask> /** </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> remove return ( !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) ); </s> add return !!type && (Object.values(IMAGE_MIME_TYPES) as string[]).includes(type); </s> remove ): blob is Blob & { type: typeof ALLOWED_IMAGE_MIME_TYPES[number] } => { </s> add ): blob is Blob & { type: ValueOf<typeof IMAGE_MIME_TYPES> } => { </s> remove type FILE_EXTENSION = | "gif" | "jpg" | "png" | "excalidraw.png" | "svg" | "excalidraw.svg" | "json" | "excalidraw" | "excalidrawlib"; </s> add type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">; </s> remove mimeType: typeof ALLOWED_IMAGE_MIME_TYPES[number]; </s> add mimeType: ValueOf<typeof IMAGE_MIME_TYPES>; </s> remove import { Merge, ForwardRef } from "./utility-types"; </s> add import { Merge, ForwardRef, ValueOf } from "./utility-types"; </s> remove import type { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; </s> add import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants";
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/types.ts
keep keep keep keep replace keep keep keep keep keep
<mask> imageCache: Map< <mask> FileId, <mask> { <mask> image: HTMLImageElement | Promise<HTMLImageElement>; <mask> mimeType: typeof ALLOWED_IMAGE_MIME_TYPES[number]; <mask> } <mask> >; <mask> files: BinaryFiles; <mask> device: App["device"]; <mask> scene: App["scene"]; </s> feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types (#6500 * feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types * dedupe for SSOT * more SSOT </s> remove | typeof ALLOWED_IMAGE_MIME_TYPES[number] </s> add | ValueOf<typeof IMAGE_MIME_TYPES> </s> remove type FILE_EXTENSION = | "gif" | "jpg" | "png" | "excalidraw.png" | "svg" | "excalidraw.svg" | "json" | "excalidraw" | "excalidrawlib"; </s> add type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">; </s> remove ): blob is Blob & { type: typeof ALLOWED_IMAGE_MIME_TYPES[number] } => { </s> add ): blob is Blob & { type: ValueOf<typeof IMAGE_MIME_TYPES> } => { </s> remove return ( !!type && (ALLOWED_IMAGE_MIME_TYPES as readonly string[]).includes(type) ); </s> add return !!type && (Object.values(IMAGE_MIME_TYPES) as string[]).includes(type); </s> remove import { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "../constants"; </s> add import { IMAGE_MIME_TYPES, MIME_TYPES } from "../constants"; </s> remove import type { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "./constants"; </s> add import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants";
https://github.com/excalidraw/excalidraw/commit/fee760d38c18c4d90c053b98d7cfa355707fc427
src/types.ts
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> }); <mask> document.documentElement.style.cursor = `${resizeHandle}-resize`; <mask> isResizingElements = true; <mask> } else { <mask> let hitElement = null; <mask> // We need to to hit testing from front (end of the array) to back (beginning of the array) <mask> for (let i = elements.length - 1; i >= 0; --i) { <mask> if (hitTest(elements[i], x, y)) { <mask> hitElement = elements[i]; <mask> break; <mask> } <mask> } <mask> <mask> // If we click on something <mask> if (hitElement) { <mask> if (hitElement.isSelected) { <mask> // If that element is not already selected, do nothing, </s> Double click to add text (#184) * Double click to add text * Remove duplicate code * Add text improvements * Cast element to text element </s> remove resetCursor(); const text = prompt("What text do you want?"); if (text === null) { </s> add if (!addTextElement(element)) { </s> remove const fontSize = 20; element.text = text; element.font = `${fontSize}px Virgil`; const font = context.font; context.font = element.font; const textMeasure = context.measureText(element.text); const width = textMeasure.width; const actualBoundingBoxAscent = textMeasure.actualBoundingBoxAscent || fontSize; const actualBoundingBoxDescent = textMeasure.actualBoundingBoxDescent || 0; element.actualBoundingBoxAscent = actualBoundingBoxAscent; context.font = font; const height = actualBoundingBoxAscent + actualBoundingBoxDescent; // Center the text element.x -= width / 2; element.y -= actualBoundingBoxAscent; element.width = width; element.height = height; </s> add
https://github.com/excalidraw/excalidraw/commit/feefb14bf565dd24f7032e5d240aa950676e3269
src/index.tsx
keep replace replace replace keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace
<mask> if (isTextElement(element)) { <mask> resetCursor(); <mask> const text = prompt("What text do you want?"); <mask> if (text === null) { <mask> return; <mask> } <mask> const fontSize = 20; <mask> element.text = text; <mask> element.font = `${fontSize}px Virgil`; <mask> const font = context.font; <mask> context.font = element.font; <mask> const textMeasure = context.measureText(element.text); <mask> const width = textMeasure.width; <mask> const actualBoundingBoxAscent = <mask> textMeasure.actualBoundingBoxAscent || fontSize; <mask> const actualBoundingBoxDescent = <mask> textMeasure.actualBoundingBoxDescent || 0; <mask> element.actualBoundingBoxAscent = actualBoundingBoxAscent; <mask> context.font = font; <mask> const height = actualBoundingBoxAscent + actualBoundingBoxDescent; <mask> // Center the text <mask> element.x -= width / 2; <mask> element.y -= actualBoundingBoxAscent; <mask> element.width = width; <mask> element.height = height; </s> Double click to add text (#184) * Double click to add text * Remove duplicate code * Add text improvements * Cast element to text element </s> remove let hitElement = null; // We need to to hit testing from front (end of the array) to back (beginning of the array) for (let i = elements.length - 1; i >= 0; --i) { if (hitTest(elements[i], x, y)) { hitElement = elements[i]; break; } } </s> add const hitElement = getElementAtPosition(x, y);
https://github.com/excalidraw/excalidraw/commit/feefb14bf565dd24f7032e5d240aa950676e3269
src/index.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> } from "../utils"; <mask> import { KEYS, isArrowKey } from "../keys"; <mask> <mask> import { findShapeByKey, shapesShortcutKeys } from "../shapes"; <mask> import { createHistory } from "../history"; <mask> <mask> import ContextMenu from "./ContextMenu"; <mask> <mask> import { getElementWithResizeHandler } from "../element/resizeTest"; <mask> import { ActionManager } from "../actions/manager"; </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove // ----------------------------------------------------------------------------- // TEST HOOKS // ----------------------------------------------------------------------------- declare global { interface Window { __TEST__: { elements: readonly ExcalidrawElement[]; appState: AppState; }; } } if (process.env.NODE_ENV === "test") { window.__TEST__ = {} as Window["__TEST__"]; } // ----------------------------------------------------------------------------- if (process.env.NODE_ENV === "test") { Object.defineProperty(window.__TEST__, "elements", { get() { return globalSceneState.getAllElements(); }, }); } </s> add </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window;
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/components/App.tsx
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> unstable_batchedUpdates(func, event); <mask> }) as TFunction; <mask> } <mask> <mask> // ----------------------------------------------------------------------------- <mask> // TEST HOOKS <mask> // ----------------------------------------------------------------------------- <mask> <mask> declare global { <mask> interface Window { <mask> __TEST__: { <mask> elements: readonly ExcalidrawElement[]; <mask> appState: AppState; <mask> }; <mask> } <mask> } <mask> <mask> if (process.env.NODE_ENV === "test") { <mask> window.__TEST__ = {} as Window["__TEST__"]; <mask> } <mask> <mask> // ----------------------------------------------------------------------------- <mask> <mask> if (process.env.NODE_ENV === "test") { <mask> Object.defineProperty(window.__TEST__, "elements", { <mask> get() { <mask> return globalSceneState.getAllElements(); <mask> }, <mask> }); <mask> } <mask> <mask> const { history } = createHistory(); <mask> <mask> let cursorX = 0; <mask> let cursorY = 0; <mask> let isHoldingSpace: boolean = false; </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove if (process.env.NODE_ENV === "test") { Object.defineProperty(window.__TEST__, "appState", { configurable: true, get: () => { return this.state; </s> add if ( process.env.NODE_ENV === "test" || process.env.NODE_ENV === "development" ) { const setState = this.setState.bind(this); Object.defineProperties(window.h, { state: { configurable: true, get: () => { return this.state; }, }, setState: { configurable: true, value: (...args: Parameters<typeof setState>) => { return this.setState(...args); }, </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window;
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/components/App.tsx
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
<mask> }; <mask> <mask> private unmounted = false; <mask> public async componentDidMount() { <mask> if (process.env.NODE_ENV === "test") { <mask> Object.defineProperty(window.__TEST__, "appState", { <mask> configurable: true, <mask> get: () => { <mask> return this.state; <mask> }, <mask> }); <mask> } <mask> <mask> this.removeSceneCallback = globalSceneState.addCallback( </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove // ----------------------------------------------------------------------------- // TEST HOOKS // ----------------------------------------------------------------------------- declare global { interface Window { __TEST__: { elements: readonly ExcalidrawElement[]; appState: AppState; }; } } if (process.env.NODE_ENV === "test") { window.__TEST__ = {} as Window["__TEST__"]; } // ----------------------------------------------------------------------------- if (process.env.NODE_ENV === "test") { Object.defineProperty(window.__TEST__, "elements", { get() { return globalSceneState.getAllElements(); }, }); } </s> add </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window;
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/components/App.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> localStorage.clear(); <mask> renderScene.mockClear(); <mask> }); <mask> <mask> const { __TEST__: h } = window; <mask> <mask> describe("add element to the scene when pointer dragging long enough", () => { <mask> it("rectangle", () => { <mask> const { getByToolName, container } = render(<App />); <mask> // select tool </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> // finish (position does not matter) <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> <mask> expect(h.elements.length).toEqual(1); <mask> expect(h.elements[0].type).toEqual("rectangle"); <mask> expect(h.elements[0].x).toEqual(30); <mask> expect(h.elements[0].y).toEqual(20); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> // finish (position does not matter) <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> <mask> expect(h.elements.length).toEqual(1); <mask> expect(h.elements[0].type).toEqual("ellipse"); <mask> expect(h.elements[0].x).toEqual(30); <mask> expect(h.elements[0].y).toEqual(20); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> // finish (position does not matter) <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> <mask> expect(h.elements.length).toEqual(1); <mask> expect(h.elements[0].type).toEqual("diamond"); <mask> expect(h.elements[0].x).toEqual(30); <mask> expect(h.elements[0].y).toEqual(20); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> // finish (position does not matter) <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> <mask> expect(h.elements.length).toEqual(1); <mask> <mask> const element = h.elements[0] as ExcalidrawLinearElement; <mask> </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> // finish (position does not matter) <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> <mask> expect(h.elements.length).toEqual(1); <mask> <mask> const element = h.elements[0] as ExcalidrawLinearElement; <mask> </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> // finish (position does not matter) <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(3); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(0); <mask> }); <mask> <mask> it("ellipse", () => { <mask> const { getByToolName, container } = render(<App />); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> // finish (position does not matter) <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(3); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(0); <mask> }); <mask> <mask> it("diamond", () => { <mask> const { getByToolName, container } = render(<App />); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> // finish (position does not matter) <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(3); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(0); <mask> }); <mask> <mask> it("arrow", () => { <mask> const { getByToolName, container } = render(<App />); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> // we need to finalize it because arrows and lines enter multi-mode <mask> fireEvent.keyDown(document, { key: KEYS.ENTER }); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(0); <mask> }); <mask> <mask> it("line", () => { <mask> const { getByToolName, container } = render(<App />); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep
<mask> // we need to finalize it because arrows and lines enter multi-mode <mask> fireEvent.keyDown(document, { key: KEYS.ENTER }); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(0); <mask> }); <mask> }); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/dragCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> localStorage.clear(); <mask> renderScene.mockClear(); <mask> }); <mask> <mask> const { __TEST__: h } = window; <mask> <mask> describe("move element", () => { <mask> it("rectangle", () => { <mask> const { getByToolName, container } = render(<App />); <mask> const canvas = container.querySelector("canvas")!; </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/move.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> fireEvent.pointerMove(canvas, { clientX: 60, clientY: 70 }); <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); <mask> expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([30, 20]); <mask> <mask> renderScene.mockClear(); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/move.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); <mask> expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([30, 20]); <mask> <mask> renderScene.mockClear(); <mask> } <mask> </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/move.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> fireEvent.pointerMove(canvas, { clientX: 20, clientY: 40 }); <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(3); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([0, 40]); <mask> }); <mask> }); <mask> </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/move.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> fireEvent.pointerMove(canvas, { clientX: 60, clientY: 70 }); <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); <mask> expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([30, 20]); <mask> <mask> renderScene.mockClear(); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/move.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); <mask> expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([30, 20]); <mask> <mask> renderScene.mockClear(); <mask> } <mask> </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/move.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> fireEvent.pointerMove(canvas, { clientX: 20, clientY: 40 }); <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(3); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(2); <mask> <mask> // previous element should stay intact <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([30, 20]); <mask> expect([h.elements[1].x, h.elements[1].y]).toEqual([0, 40]); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/move.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> localStorage.clear(); <mask> renderScene.mockClear(); <mask> }); <mask> <mask> const { __TEST__: h } = window; <mask> <mask> describe("remove shape in non linear elements", () => { <mask> it("rectangle", () => { <mask> const { getByToolName, container } = render(<App />); <mask> // select tool </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/multiPointCreate.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> localStorage.clear(); <mask> renderScene.mockClear(); <mask> }); <mask> <mask> const { __TEST__: h } = window; <mask> <mask> describe("resize element", () => { <mask> it("rectangle", () => { <mask> const { getByToolName, container } = render(<App />); <mask> const canvas = container.querySelector("canvas")!; </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/resize.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> fireEvent.pointerMove(canvas, { clientX: 60, clientY: 70 }); <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); <mask> expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([30, 20]); <mask> <mask> expect([h.elements[0].width, h.elements[0].height]).toEqual([30, 50]); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/resize.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); <mask> expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([30, 20]); <mask> <mask> expect([h.elements[0].width, h.elements[0].height]).toEqual([30, 50]); <mask> <mask> renderScene.mockClear(); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/resize.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> fireEvent.pointerMove(canvas, { clientX: 20, clientY: 40 }); <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(5); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([29, 47]); <mask> expect([h.elements[0].width, h.elements[0].height]).toEqual([30, 50]); <mask> }); <mask> }); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/resize.test.tsx
keep keep keep keep replace keep replace keep keep
<mask> fireEvent.pointerMove(canvas, { clientX: 60, clientY: 70 }); <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(4); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); <mask> expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([30, 20]); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([30, 20]); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/resize.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> fireEvent.pointerMove(canvas, { clientX: 20, clientY: 40, shiftKey: true }); <mask> fireEvent.pointerUp(canvas); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(5); <mask> expect(h.appState.selectionElement).toBeNull(); <mask> expect(h.elements.length).toEqual(1); <mask> expect([h.elements[0].x, h.elements[0].y]).toEqual([29, 47]); <mask> expect([h.elements[0].width, h.elements[0].height]).toEqual([30, 50]); <mask> }); <mask> }); </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/resize.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> localStorage.clear(); <mask> renderScene.mockClear(); <mask> }); <mask> <mask> const { __TEST__: h } = window; <mask> <mask> describe("selection element", () => { <mask> it("create selection element on pointer down", () => { <mask> const { getByToolName, container } = render(<App />); <mask> // select tool </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove const { __TEST__: h } = window; </s> add const { h } = window; </s> remove expect(h.appState.selectionElement).toBeNull(); </s> add expect(h.state.selectionElement).toBeNull(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy();
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/selection.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> const canvas = container.querySelector("canvas")!; <mask> fireEvent.pointerDown(canvas, { clientX: 60, clientY: 100 }); <mask> <mask> expect(renderScene).toHaveBeenCalledTimes(1); <mask> const selectionElement = h.appState.selectionElement!; <mask> expect(selectionElement).not.toBeNull(); <mask> expect(selectionElement.type).toEqual("selection"); <mask> expect([selectionElement.x, selectionElement.y]).toEqual([60, 100]); <mask> expect([selectionElement.width, selectionElement.height]).toEqual([0, 0]); <mask> </s> expose a few state props for debugging (#1008) * expose a few state props for debugging * rename h.appState & add h.setState * support setting elements </s> remove const selectionElement = h.appState.selectionElement!; </s> add const selectionElement = h.state.selectionElement!; </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove expect(h.appState.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> add expect(h.state.selectedElementIds[h.elements[0].id]).toBeTruthy(); </s> remove const { __TEST__: h } = window; </s> add const { h } = window;
https://github.com/excalidraw/excalidraw/commit/ff033640e47d2002faf5500076ff4c8ae74d8b6d
src/tests/selection.test.tsx