+import { getSceneVersion } from "@excalidraw/excalidraw";
+getSceneVersion(elements: ExcalidrawElement [])
+
+
+This function returns the current scene version.
+
+#### `getSyncableElements`
+
+**_Signature_**
+
++getSyncableElements(elements: ExcalidrawElement []):ExcalidrawElement [] ++ +**How to use** + +```js +import { getSyncableElements } from "@excalidraw/excalidraw"; +``` + +This function returns all the deleted elements of the scene. + +### `getElementMap` + +**_Signature_** + +
+getElementsMap(elements: ExcalidrawElement []): {[id: string]: ExcalidrawElement}
+
+
+**How to use**
+
+```js
+import { getElementsMap } from "@excalidraw/excalidraw";
+```
+
+This function returns an object where each element is mapped to its id.
+
#### `width`
This props defines the `width` of the Excalidraw component. Defaults to `window.innerWidth` if not passed.
diff --git a/src/packages/excalidraw/package-lock.json b/src/packages/excalidraw/package-lock.json
index 9e2c3df72..adf8c95a1 100644
--- a/src/packages/excalidraw/package-lock.json
+++ b/src/packages/excalidraw/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@excalidraw/excalidraw",
- "version": "0.1.1",
+ "version": "0.2.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1933,6 +1933,12 @@
"prr": "~1.0.1"
}
},
+ "es-module-lexer": {
+ "version": "0.3.26",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.3.26.tgz",
+ "integrity": "sha512-Va0Q/xqtrss45hWzP8CZJwzGSZJjDM5/MJRE3IXXnUCcVLElR9BRaE9F62BopysASyc4nM3uwhSW7FFB9nlWAA==",
+ "dev": true
+ },
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@@ -2456,9 +2462,9 @@
"dev": true
},
"mini-css-extract-plugin": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.3.tgz",
- "integrity": "sha512-7lvliDSMiuZc81kI+5/qxvn47SCM7BehXex3f2c6l/pR3Goj58IQxZh9nuPQ3AkGQgoETyXuIqLDaO5Oa0TyBw==",
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.4.tgz",
+ "integrity": "sha512-dNjqyeogUd8ucUgw5sxm1ahvSfSUgef7smbmATRSbDm4EmNx5kQA6VdUEhEeCKSjX6CTYjb5vxgMUvRjqP3uHg==",
"dev": true,
"requires": {
"loader-utils": "^2.0.0",
@@ -2841,9 +2847,9 @@
"dev": true
},
"sass-loader": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.1.0.tgz",
- "integrity": "sha512-ZCKAlczLBbFd3aGAhowpYEy69Te3Z68cg8bnHHl6WnSCvnKpbM6pQrz957HWMa8LKVuhnD9uMplmMAHwGQtHeg==",
+ "version": "10.1.1",
+ "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.1.1.tgz",
+ "integrity": "sha512-W6gVDXAd5hR/WHsPicvZdjAWHBcEJ44UahgxcIE196fW2ong0ZHMPO1kZuI5q0VlvMQZh32gpv69PLWQm70qrw==",
"dev": true,
"requires": {
"klona": "^2.0.4",
@@ -3251,9 +3257,9 @@
}
},
"webpack": {
- "version": "5.12.3",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.12.3.tgz",
- "integrity": "sha512-7tiQmcTnKhZwbf7X7sEfXe0pgkGjUZjT6JfYkZHvvIb4/ZsXl1rJu5PxsJoN7W3v5sNSP/8TgBoiOdDqVdvK5w==",
+ "version": "5.15.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.15.0.tgz",
+ "integrity": "sha512-y/xG+ONDz78yn3VvP6gAvGr1/gkxOgitvHSXBmquyN8KDtrGEyE3K9WkXOPB7QmfcOBCpO4ELXwNcCYQnEmexA==",
"dev": true,
"requires": {
"@types/eslint-scope": "^3.7.0",
@@ -3264,7 +3270,8 @@
"acorn": "^8.0.4",
"browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.3.1",
+ "enhanced-resolve": "^5.7.0",
+ "es-module-lexer": "^0.3.26",
"eslint-scope": "^5.1.1",
"events": "^3.2.0",
"glob-to-regexp": "^0.4.1",
@@ -3282,9 +3289,9 @@
},
"dependencies": {
"enhanced-resolve": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.5.0.tgz",
- "integrity": "sha512-b4a6BasBCoLzri4MdaeOlDMpls2oioI28CF17csMiav9dq46yvQaKPFNUrCHB6VqQokBDG2VIEEL81jMiQ6Wtw==",
+ "version": "5.7.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz",
+ "integrity": "sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.4",
@@ -3360,20 +3367,6 @@
"integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==",
"dev": true
},
- "terser-webpack-plugin": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.1.tgz",
- "integrity": "sha512-5XNNXZiR8YO6X6KhSGXfY0QrGrCRlSwAEjIIrlRQR4W8nP69TaJUlh3bkuac6zzgspiGPfKEHcY295MMVExl5Q==",
- "dev": true,
- "requires": {
- "jest-worker": "^26.6.2",
- "p-limit": "^3.1.0",
- "schema-utils": "^3.0.0",
- "serialize-javascript": "^5.0.1",
- "source-map": "^0.6.1",
- "terser": "^5.5.1"
- }
- },
"webpack-sources": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.2.0.tgz",
diff --git a/src/packages/excalidraw/package.json b/src/packages/excalidraw/package.json
index 62125fe9f..ac8e795a8 100644
--- a/src/packages/excalidraw/package.json
+++ b/src/packages/excalidraw/package.json
@@ -1,6 +1,6 @@
{
"name": "@excalidraw/excalidraw",
- "version": "0.1.1",
+ "version": "0.2.0",
"main": "dist/excalidraw.min.js",
"files": [
"dist/*"
@@ -54,11 +54,11 @@
"cross-env": "7.0.3",
"css-loader": "5.0.1",
"file-loader": "6.2.0",
- "mini-css-extract-plugin": "1.3.3",
- "sass-loader": "10.1.0",
+ "mini-css-extract-plugin": "1.3.4",
+ "sass-loader": "10.1.1",
"terser-webpack-plugin": "5.1.1",
"ts-loader": "8.0.14",
- "webpack": "5.12.3",
+ "webpack": "5.15.0",
"webpack-bundle-analyzer": "4.3.0",
"webpack-cli": "4.3.1"
},
diff --git a/src/packages/utils/package-lock.json b/src/packages/utils/package-lock.json
index ae614fd65..a870701b8 100644
--- a/src/packages/utils/package-lock.json
+++ b/src/packages/utils/package-lock.json
@@ -1109,9 +1109,9 @@
"dev": true
},
"@types/node": {
- "version": "14.14.20",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz",
- "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==",
+ "version": "14.14.21",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.21.tgz",
+ "integrity": "sha512-cHYfKsnwllYhjOzuC5q1VpguABBeecUp24yFluHpn/BQaVxB1CuQ1FSRZCzrPxrkIfWISXV2LbeoBthLWg0+0A==",
"dev": true
},
"@webassemblyjs/ast": {
@@ -1783,6 +1783,12 @@
"prr": "~1.0.1"
}
},
+ "es-module-lexer": {
+ "version": "0.3.26",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.3.26.tgz",
+ "integrity": "sha512-Va0Q/xqtrss45hWzP8CZJwzGSZJjDM5/MJRE3IXXnUCcVLElR9BRaE9F62BopysASyc4nM3uwhSW7FFB9nlWAA==",
+ "dev": true
+ },
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@@ -2918,9 +2924,9 @@
}
},
"webpack": {
- "version": "5.12.3",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.12.3.tgz",
- "integrity": "sha512-7tiQmcTnKhZwbf7X7sEfXe0pgkGjUZjT6JfYkZHvvIb4/ZsXl1rJu5PxsJoN7W3v5sNSP/8TgBoiOdDqVdvK5w==",
+ "version": "5.15.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.15.0.tgz",
+ "integrity": "sha512-y/xG+ONDz78yn3VvP6gAvGr1/gkxOgitvHSXBmquyN8KDtrGEyE3K9WkXOPB7QmfcOBCpO4ELXwNcCYQnEmexA==",
"dev": true,
"requires": {
"@types/eslint-scope": "^3.7.0",
@@ -2931,7 +2937,8 @@
"acorn": "^8.0.4",
"browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.3.1",
+ "enhanced-resolve": "^5.7.0",
+ "es-module-lexer": "^0.3.26",
"eslint-scope": "^5.1.1",
"events": "^3.2.0",
"glob-to-regexp": "^0.4.1",
@@ -2949,9 +2956,9 @@
},
"dependencies": {
"enhanced-resolve": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.5.0.tgz",
- "integrity": "sha512-b4a6BasBCoLzri4MdaeOlDMpls2oioI28CF17csMiav9dq46yvQaKPFNUrCHB6VqQokBDG2VIEEL81jMiQ6Wtw==",
+ "version": "5.7.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz",
+ "integrity": "sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.4",
diff --git a/src/packages/utils/package.json b/src/packages/utils/package.json
index 2c994c67a..6145e6bef 100644
--- a/src/packages/utils/package.json
+++ b/src/packages/utils/package.json
@@ -46,7 +46,7 @@
"cross-env": "7.0.3",
"file-loader": "6.2.0",
"ts-loader": "8.0.14",
- "webpack": "5.12.3",
+ "webpack": "5.15.0",
"webpack-bundle-analyzer": "4.3.0",
"webpack-cli": "4.3.1"
},
diff --git a/src/tests/__snapshots__/regressionTests.test.tsx.snap b/src/tests/__snapshots__/regressionTests.test.tsx.snap
index 12270bcb8..ce23cf2de 100644
--- a/src/tests/__snapshots__/regressionTests.test.tsx.snap
+++ b/src/tests/__snapshots__/regressionTests.test.tsx.snap
@@ -70,7 +70,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -536,7 +536,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -984,7 +984,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -1760,7 +1760,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -1967,7 +1967,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -2418,7 +2418,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -2666,7 +2666,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -2831,7 +2831,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -3303,7 +3303,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -3612,7 +3612,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -3816,7 +3816,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -4056,7 +4056,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -4307,7 +4307,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -4708,7 +4708,7 @@ Object {
},
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -4979,7 +4979,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -5304,7 +5304,7 @@ Object {
},
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -5488,7 +5488,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -5650,7 +5650,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -6108,7 +6108,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -6417,7 +6417,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -8454,7 +8454,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -8815,7 +8815,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -9066,7 +9066,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -9318,7 +9318,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -9626,7 +9626,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -9788,7 +9788,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -9950,7 +9950,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -10112,7 +10112,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -10304,7 +10304,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -10496,7 +10496,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -10688,7 +10688,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -10880,7 +10880,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -11042,7 +11042,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -11204,7 +11204,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -11396,7 +11396,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -11558,7 +11558,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -11761,7 +11761,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -12468,7 +12468,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -12715,7 +12715,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": true,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -12813,7 +12813,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -12913,7 +12913,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -13075,7 +13075,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -13381,7 +13381,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -13687,7 +13687,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -13847,7 +13847,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -14043,7 +14043,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -14296,7 +14296,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -14612,7 +14612,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -15449,7 +15449,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -15755,7 +15755,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -16065,7 +16065,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -16441,7 +16441,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -16612,7 +16612,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -16925,7 +16925,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -17165,7 +17165,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -17420,7 +17420,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -17735,7 +17735,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -17835,7 +17835,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -18008,7 +18008,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -18814,7 +18814,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -18916,7 +18916,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -19692,7 +19692,7 @@ Object {
},
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -20093,7 +20093,7 @@ Object {
},
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -20340,7 +20340,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": true,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -20440,7 +20440,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -20934,7 +20934,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
@@ -21032,7 +21032,7 @@ Object {
"selectionElement": null,
"shouldAddWatermark": false,
"shouldCacheIgnoreZoom": false,
- "showShortcutsDialog": false,
+ "showHelpDialog": false,
"showStats": false,
"startBoundElement": null,
"suggestedBindings": Array [],
diff --git a/src/tests/resize.test.tsx b/src/tests/resize.test.tsx
index 750af7ae8..f730fcd87 100644
--- a/src/tests/resize.test.tsx
+++ b/src/tests/resize.test.tsx
@@ -41,7 +41,7 @@ describe("resize rectangle ellipses and diamond elements", () => {
${"s"} | ${[_, 39]} | ${[100, 139]} | ${[elemData.x, elemData.x]}
${"e"} | ${[-20, _]} | ${[80, 100]} | ${[elemData.x, elemData.y]}
${"w"} | ${[-20, _]} | ${[120, 100]} | ${[-20, elemData.y]}
- ${"ne"} | ${[10, 55]} | ${[110, 45]} | ${[elemData.x, 55]}
+ ${"ne"} | ${[5, 55]} | ${[105, 45]} | ${[elemData.x, 55]}
${"se"} | ${[-30, -10]} | ${[70, 90]} | ${[elemData.x, elemData.y]}
${"nw"} | ${[-300, -200]} | ${[400, 300]} | ${[-300, -200]}
${"sw"} | ${[40, -20]} | ${[60, 80]} | ${[40, 0]}
diff --git a/src/types.ts b/src/types.ts
index 24b2e8151..b94872def 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -81,7 +81,7 @@ export type AppState = {
selectedElementIds: { [id: string]: boolean };
previousSelectedElementIds: { [id: string]: boolean };
shouldCacheIgnoreZoom: boolean;
- showShortcutsDialog: boolean;
+ showHelpDialog: boolean;
toastMessage: string | null;
zenModeEnabled: boolean;
appearance: "light" | "dark";