diff --git a/.gitignore b/.gitignore index 8f96682fd..8e05f7b23 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,9 @@ /public/corelibs/wick-engine/ /engine/dist/ +# package-lock +package-lock.json + # misc .DS_Store .env.local diff --git a/README.md b/README.md index 0495097fa..bdccadeb5 100644 --- a/README.md +++ b/README.md @@ -81,12 +81,13 @@ Then create a production build of the project: ``` npm run build ``` -^ This command is not always needed while testing, you'll need it most prior to deploying your code +^ This command is not always needed while testing, you'll need it most prior to deploying your code because it's basically just an optimisation command you don't need to use much And lastly, to run your project in development: ``` npm start ``` +While working on the engine it's easier to test by running npm run engine-quickrun If it worked, you should see something like this in the terminal. ``` @@ -118,10 +119,10 @@ Wick Editor was created by Luca Damasco and Zach Rispoli. See more credits on th Candlestick was created and is maintained by [Hamzah Alani](https://forum.wickeditor.com/u/hamzah_alani/summary), [Baron](https://forum.wickeditor.com/u/baronawc/summary), and [Jovanny Rodriguez](https://forum.wickeditor.com/u/jovanny/summary). Active contributors: -- [StickmanRed](https://forum.wickeditor.com/u/stickmanred/summary) +- [StickmanRed](https://forum.wickeditor.com/u/stickmanred/summary) also found at (https://github.com/StickmanRed) Additional, indirect contributors: -- [pumpkinhead](https://forum.wickeditor.com/u/pumpkinhead/summary) +- [pumpkinhead](https://forum.wickeditor.com/u/pumpkinhead/summary) also found at [pkhead](https://github.com/pkhead) - [SomeoneElse](https://forum.wickeditor.com/u/someoneelse/summary) ___ diff --git a/package-lock.json b/package-lock.json index eaa284500..9014ba61c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "react-modal": "^3.16.3", "react-numeric-input": "^2.2.3", "react-reflex": "^3.0.6", - "react-resize-detector": "^12.3.0", + "react-resize-detector": "^9.0.0", "react-rnd": "^10.5.2", "react-scripts": "^5.0.1", "react-select": "^5.9.0", @@ -2498,6 +2498,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@emotion/babel-plugin/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/@emotion/cache": { "version": "10.0.29", "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-10.0.29.tgz", @@ -3085,6 +3094,18 @@ "node": ">=8.6" } }, + "node_modules/@jest/core/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@jest/core/node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3333,6 +3354,18 @@ "node": ">=8.6" } }, + "node_modules/@jest/transform/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@jest/transform/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3766,7 +3799,6 @@ "version": "2.5.6", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz", "integrity": "sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==", - "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -3806,7 +3838,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3827,7 +3858,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3848,7 +3878,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3869,7 +3898,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3890,7 +3918,6 @@ "cpu": [ "arm" ], - "dev": true, "libc": [ "glibc" ], @@ -3914,7 +3941,6 @@ "cpu": [ "arm" ], - "dev": true, "libc": [ "musl" ], @@ -3938,7 +3964,6 @@ "cpu": [ "arm64" ], - "dev": true, "libc": [ "glibc" ], @@ -3962,7 +3987,6 @@ "cpu": [ "arm64" ], - "dev": true, "libc": [ "musl" ], @@ -3986,7 +4010,6 @@ "cpu": [ "x64" ], - "dev": true, "libc": [ "glibc" ], @@ -4010,7 +4033,6 @@ "cpu": [ "x64" ], - "dev": true, "libc": [ "musl" ], @@ -4034,7 +4056,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -4055,7 +4076,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -4076,7 +4096,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -4094,7 +4113,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", - "dev": true, "license": "MIT", "optional": true, "engines": { @@ -4258,6 +4276,18 @@ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "license": "MIT" }, + "node_modules/@rollup/pluginutils/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@rtsao/scc": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", @@ -4467,6 +4497,15 @@ "node": ">=10" } }, + "node_modules/@svgr/core/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/@svgr/hast-util-to-babel-ast": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-5.5.0.tgz", @@ -4536,6 +4575,15 @@ "node": ">=10" } }, + "node_modules/@svgr/plugin-svgo/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/@svgr/webpack": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-5.5.0.tgz", @@ -5070,6 +5118,16 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "license": "MIT" }, + "node_modules/@types/react": { + "version": "19.2.18", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz", + "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==", + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, "node_modules/@types/react-transition-group": { "version": "4.4.12", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", @@ -5079,6 +5137,13 @@ "@types/react": "*" } }, + "node_modules/@types/react/node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT", + "peer": true + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -6822,6 +6887,15 @@ "node": ">=10" } }, + "node_modules/babel-preset-react-app/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/bach": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", @@ -7996,6 +8070,15 @@ "node": ">=8" } }, + "node_modules/cosmiconfig/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -8336,6 +8419,15 @@ "postcss": "^8.2.15" } }, + "node_modules/cssnano/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/csso": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", @@ -8715,7 +8807,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "dev": true, "license": "Apache-2.0", "optional": true, "engines": { @@ -9348,16 +9439,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-toolkit": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.49.0.tgz", - "integrity": "sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==", - "license": "MIT", - "workspaces": [ - "docs", - "benchmarks" - ] - }, "node_modules/es5-ext": { "version": "0.10.64", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", @@ -9954,6 +10035,18 @@ "node": ">=8.6" } }, + "node_modules/eslint-webpack-plugin/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/eslint-webpack-plugin/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -10593,6 +10686,18 @@ "node": ">=8.6" } }, + "node_modules/fast-glob/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/fast-glob/node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -11246,6 +11351,18 @@ "node": ">=0.12.0" } }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/fork-ts-checker-webpack-plugin/node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -12550,6 +12667,18 @@ "node": ">=8.6" } }, + "node_modules/http-proxy-middleware/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/http-proxy-middleware/node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -12649,7 +12778,7 @@ "version": "5.1.9", "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.9.tgz", "integrity": "sha512-m8nVez3rwrgmWxtLMt1ZYXB2Lv7OKYn/disyxAlSDYAlKSlFoPPfIAmAM/M5xqL4m4C/wAPw7S2/CNaUii1Hxg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/import-fresh": { @@ -13928,6 +14057,18 @@ "node": ">=8.6" } }, + "node_modules/jest-config/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/jest-config/node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -14126,6 +14267,18 @@ "node": ">=8.6" } }, + "node_modules/jest-haste-map/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/jest-haste-map/node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -14260,6 +14413,18 @@ "node": ">=8.6" } }, + "node_modules/jest-message-util/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/jest-message-util/node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -14486,6 +14651,18 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/jest-util/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/jest-validate": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", @@ -14760,6 +14937,18 @@ "node": ">=8.6" } }, + "node_modules/jest-watch-typeahead/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/jest-watch-typeahead/node_modules/pretty-format": { "version": "28.1.3", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", @@ -14913,6 +15102,13 @@ "jiti": "bin/jiti.js" } }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "license": "MIT", + "peer": true + }, "node_modules/js-binary-schema-parser": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/js-binary-schema-parser/-/js-binary-schema-parser-2.0.3.tgz", @@ -16208,7 +16404,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "dev": true, "license": "MIT", "optional": true }, @@ -17018,12 +17213,12 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "license": "MIT", "engines": { - "node": ">=8.6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" @@ -17822,6 +18017,15 @@ "node": ">=10" } }, + "node_modules/postcss-loader/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/postcss-logical": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/postcss-logical/-/postcss-logical-5.0.4.tgz", @@ -19278,15 +19482,16 @@ } }, "node_modules/react-resize-detector": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/react-resize-detector/-/react-resize-detector-12.3.0.tgz", - "integrity": "sha512-mIDOVrTHKGnKe6qEUWi8dFdfHM5CPyTOpqoHctdMQf89Ljm/0qqDIzkP3vTRZZJi9/raaMiRxDEOqO4you5x+A==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/react-resize-detector/-/react-resize-detector-9.1.1.tgz", + "integrity": "sha512-siLzop7i4xIvZIACE/PHTvRegA8QRCEt0TfmvJ/qCIFQJ4U+3NuYcF8tNDmDWxfIn+X1eNCyY2rauH4KRxge8w==", "license": "MIT", "dependencies": { - "es-toolkit": "^1.39.6" + "lodash": "^4.17.21" }, "peerDependencies": { - "react": "^18.0.0 || ^19.0.0" + "react": "^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" } }, "node_modules/react-rnd": { @@ -20514,7 +20719,7 @@ "version": "1.101.0", "resolved": "https://registry.npmjs.org/sass/-/sass-1.101.0.tgz", "integrity": "sha512-OL3GoQyoUdDt843DpVmDO6y2k1sc5IhUDSpu8XucEI+35neq5QivZ1iuegnpraEVTJXlQGK1gl27zKcTLEPbQw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "chokidar": "^5.0.0", @@ -20573,7 +20778,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "readdirp": "^5.0.0" @@ -20589,7 +20794,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 20.19.0" @@ -22462,6 +22667,18 @@ "node": ">=8.6" } }, + "node_modules/tailwindcss/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/tailwindcss/node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -22750,18 +22967,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -23163,6 +23368,20 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/ua-parser-js": { "version": "1.0.41", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.41.tgz", @@ -24056,6 +24275,18 @@ "node": ">=0.12.0" } }, + "node_modules/webpack-dev-server/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/webpack-dev-server/node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -24766,15 +24997,6 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "license": "ISC" }, - "node_modules/yaml": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", - "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, "node_modules/yargs": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", diff --git a/package.json b/package.json index 1ace2e00a..add9269bc 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "react-modal": "^3.16.3", "react-numeric-input": "^2.2.3", "react-reflex": "^3.0.6", - "react-resize-detector": "^12.3.0", + "react-resize-detector": "^9.0.0", "react-rnd": "^10.5.2", "react-scripts": "^5.0.1", "react-select": "^5.9.0", @@ -57,7 +57,7 @@ "build": "npm run copy-pdf-worker && npm run copy-ffmpeg-core && react-scripts build && echo 'candlestickers.app' > ./build/CNAME", "build:nocname": "npm run copy-pdf-worker && npm run copy-ffmpeg-core && react-scripts build", "build-engine": "cd engine && shx mkdir -p dist && gulp && shx cp -r dist/. ../public/corelibs/wick-engine/", - "build-engine-windows": "cd engine && shx mkdir -p dist && gulp && shx cp -r dist/. ../public/corelibs/wick-engine/", + "engine-quickrun": "npm run build-engine && npm start", "test": "react-scripts test", "engine-tests": "cd engine && npx http-server", "predeploy": "npm run build", diff --git a/src/Editor/Modals/ExportOptions/ExportOptions.jsx b/src/Editor/Modals/ExportOptions/ExportOptions.jsx index adecc28f6..f0b94bed7 100644 --- a/src/Editor/Modals/ExportOptions/ExportOptions.jsx +++ b/src/Editor/Modals/ExportOptions/ExportOptions.jsx @@ -407,7 +407,7 @@ class ExportOptions extends Component { icon: "cancel", }, { - text: "Not ineractive", + text: "Not interactive", icon: "cancel" }, ]} /> diff --git a/src/Editor/hotKeyMap.js b/src/Editor/hotKeyMap.js index 3930252ce..a6553c48e 100644 --- a/src/Editor/hotKeyMap.js +++ b/src/Editor/hotKeyMap.js @@ -19,11 +19,11 @@ // Use React Hotkeys style mappings class HotKeyInterface extends Object { - static get DEFAULT_REPEAT_START_MS () { + static get DEFAULT_REPEAT_START_MS() { return 500; } - static get DEFAULT_REPEAT_MS () { + static get DEFAULT_REPEAT_MS() { return 20; } @@ -40,6 +40,7 @@ class HotKeyInterface extends Object { // Initialize all hotkeys settings this.createDefaultKeyMap(); this.createDefaultHandlers(); + this.capslockify(this.keyMap) // Initialize custom hotkeys; this.customHotKeys = {}; @@ -95,7 +96,7 @@ class HotKeyInterface extends Object { }, 'deactivate-pan': { name: "Deactivate Pan", - sequences: [{sequence: "x", action: "keyup"}], + sequences: [{ sequence: "x", action: "keyup" }], }, 'activate-fillbucket': { name: "Activate Fill", @@ -107,12 +108,12 @@ class HotKeyInterface extends Object { }, 'deactivate-eyedropper': { name: "Deactivate Eyedropper", - sequences: [{sequence: "d", action: "keyup"}, {sequence: "i", action: "keyup"}], + sequences: [{ sequence: "d", action: "keyup" }, { sequence: "i", action: "keyup" }], }, 'swap-fill-stroke': { name: "Swap Fill & Stroke Color", - sequences: ["s", {sequence: "s", action: "keyup"}] - }, // adding new hotkey -H.A. + sequences: ["s", { sequence: "s", action: "keyup" }] + }, 'activate-zoom': { name: "Deactivate Zoom", sequences: ['z'], @@ -302,7 +303,7 @@ class HotKeyInterface extends Object { 'export-selection': { name: "Export Selected Clip", sequences: ['meta+e'], - }, + }, 'export-project-to-new-window': { name: "Export Project to New Window", sequences: ['alt+k'] @@ -310,22 +311,22 @@ class HotKeyInterface extends Object { 'toggle-onion-skinning': { name: "Toggle Onion Skinning", sequences: ['0'] - }, + }, 'leave-focus': { name: "Leave Focus", - sequences : ['alt+f'], + sequences: ['alt+f'], }, 'toggle-clip-borders': { name: "Toggle Clip Borders", - sequences : ['9'], - }, + sequences: ['9'], + }, 'shrink-active-frames': { name: "Shrink Active Frames", - sequences : ['shift+5'], - }, + sequences: ['shift+5'], + }, 'extend-active-frames': { name: "Extend Active Frames", - sequences : ['shift+4'], + sequences: ['shift+4'], } } @@ -335,9 +336,9 @@ class HotKeyInterface extends Object { sequences: [], } // Map all repeatable sequences to the custom handler that clears the repeat timers (see finishRepeating) - for(var name in this.keyMap) { + for (var name in this.keyMap) { var key = this.keyMap[name]; - if(key.repeatable) { + if (key.repeatable) { key.sequences.forEach(sequence => { this.keyMap['finish-repeating'].sequences.push({ sequence: sequence, @@ -363,7 +364,7 @@ class HotKeyInterface extends Object { "activate-rectangle", "activate-ellipse", "activate-line", - "activate-path-cursor", + "activate-path-cursor", "activate-text", "activate-fillbucket", "activate-eyedropper", @@ -375,9 +376,9 @@ class HotKeyInterface extends Object { "Edit Controls": [ "delete", "break-apart", - "undo", + "undo", "redo", - "copy", + "copy", "cut", "paste", "duplicate", @@ -385,15 +386,15 @@ class HotKeyInterface extends Object { ], "Windows and Modals": [ "toggle-script-editor", - ], + ], "Canvas Selection": [ "create-clip-from-selection", - "bring-to-front", - "send-to-back", + "bring-to-front", + "send-to-back", "move-forwards", "move-backwards", - "nudge-up", - "nudge-down", + "nudge-up", + "nudge-down", "nudge-left", "nudge-right", "nudge-up-more", @@ -444,17 +445,17 @@ class HotKeyInterface extends Object { if (selection.length > 0) { - if(window.EditorGradientColorSwapState){ + if (window.EditorGradientColorSwapState) { // If something is selected, try to swap its fill and stroke if it's a path selection.forEach(obj => { if (obj._classname === "Path") { - if(obj.fillColor._type === "gradient"){ + if (obj.fillColor._type === "gradient") { const temp_POS = obj.fillColor._components[1]; obj.fillColor._components[1] = obj.fillColor._components[2]; obj.fillColor._components[2] = temp_POS; - }else{ + } else { const temp_FC = obj._json[1].fillColor; obj.fillColor = obj._json[1].strokeColor; obj.strokeColor = temp_FC; @@ -463,17 +464,17 @@ class HotKeyInterface extends Object { }); } - this.editor.projectDidChange({ actionName: "Swapped fill & stroke colors"}); + this.editor.projectDidChange({ actionName: "Swapped fill & stroke colors" }); - } else if(window.EditorGradientColorSwapState){ + } else if (window.EditorGradientColorSwapState) { // Otherwise, swap the project’s tool settings const fill = this.editor.project.toolSettings.getSetting('fillColor'); const stroke = this.editor.project.toolSettings.getSetting('strokeColor'); - + this.editor.project.toolSettings.setSetting('fillColor', stroke); this.editor.project.toolSettings.setSetting('strokeColor', fill); - this.editor.projectDidChange({ actionName: "Swapped fill & stroke colors"}); + this.editor.projectDidChange({ actionName: "Swapped fill & stroke colors" }); } }, @@ -498,7 +499,7 @@ class HotKeyInterface extends Object { 'break-apart': this.editor.breakApartSelection, 'undo': this.editor.undoAction, 'redo': this.editor.redoAction, - 'leave-focus': this.editor.focusTimelineOfParentObject, + 'leave-focus': this.editor.focusTimelineOfParentClip, 'do-nothing': (() => console.log("donothing")), 'copy': this.editor.copySelectionToClipboard, 'paste': this.editor.pasteFromClipboard, @@ -545,7 +546,7 @@ class HotKeyInterface extends Object { } // Wrap each handler for some custom functionality (see wrapHotkeyFunction) - for(let name in this.handlers) { + for (let name in this.handlers) { let origHandler = this.handlers[name]; this.handlers[name] = ((e) => { this.wrapHotkeyFunction(e, name, origHandler); @@ -559,7 +560,7 @@ class HotKeyInterface extends Object { } wrapHotkeyFunction = (e, name, fn) => { - if(e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA') { + if (e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA') { // If we are not on a text input area, use the hotkey's function. // Don't prevent default for 'paste' — we need the browser to fire the paste // event so our listener can access clipboardData (files, real filenames, etc.) @@ -568,7 +569,7 @@ class HotKeyInterface extends Object { // Start the repeat timers if this hotkey is repeatable var options = this.keyMap[name]; - if(options.repeatable) { + if (options.repeatable) { clearInterval(this.repeatKeyInterval); clearTimeout(this.repeatKeyTimeout); this.repeatKeyTimeout = setTimeout(() => { @@ -584,7 +585,7 @@ class HotKeyInterface extends Object { } finishRepeating = () => { - if(this.repeatKeyInterval || this.repeatKeyTimeout) { + if (this.repeatKeyInterval || this.repeatKeyTimeout) { clearInterval(this.repeatKeyInterval); clearTimeout(this.repeatKeyTimeout); this.repeatKeyInterval = null; @@ -643,15 +644,15 @@ class HotKeyInterface extends Object { // Set default attributes... let oldSequences = keyMap[actionName].sequences.concat([]); - oldSequences.forEach((sequence,i) => { + oldSequences.forEach((sequence, i) => { let newSequence = sequence; if (typeof sequence === "string") { newSequence = sequence.replace("meta", replacement); } else if (typeof sequence === "object") { newSequence = { - sequence: sequence.sequence.replace("meta", replacement), - action: sequence.action, + sequence: sequence.sequence.replace("meta", replacement), + action: sequence.action, } } oldSequences[i] = newSequence; @@ -662,7 +663,7 @@ class HotKeyInterface extends Object { name: keyMap[actionName].name, sequences: oldSequences, // Ensure we get a deep copy of this array, avoid reference errors. } - + // Update keymap with new attributes. if (customKeys[actionName]) { let customSequences = customKeys[actionName]; @@ -684,10 +685,10 @@ class HotKeyInterface extends Object { let customSequence = customKeys[exception][key]; if ((customSequence || customSequence === "") && newKeyMap["de" + exception]) { if (typeof customSequence === "string") { - newKeyMap["de" + exception].sequences[i] = {sequence: customSequence, action: "keyup"}; + newKeyMap["de" + exception].sequences[i] = { sequence: customSequence, action: "keyup" }; } else if (typeof customSequence === "object") { - newKeyMap["de" + exception].sequences[i] = {...customSequence, action: "keyup"}; + newKeyMap["de" + exception].sequences[i] = { ...customSequence, action: "keyup" }; } } }); @@ -716,7 +717,7 @@ class HotKeyInterface extends Object { } // Replaces keys with symbols. - static replaceKeys (str) { + static replaceKeys(str) { const keys = [ ['shift', '⇪'], ['Shift', '⇪'], @@ -750,7 +751,7 @@ class HotKeyInterface extends Object { * @param {Object} keymap - Keymap object * @param {string} action - String representing an action in the editor. i.e. 'activate-zoom'. */ - static getHotKey (keymap, action) { + static getHotKey(keymap, action) { if (!keymap) return ''; if (!action) return ''; @@ -760,6 +761,51 @@ class HotKeyInterface extends Object { return option.sequences[0]; } + + /** + * Adds capslock support to the keyMap sequences. + * react-hotkeys matches key sequences case-sensitively, so with capslock on, + * a single-letter hotkey like 'x' no longer matches because the browser reports 'X'. + * This adds an uppercased-key variant of every sequence so both work. + * @param {Object} keyMap - Keymap object + */ + capslockify(keyMap = this.keyMap) { + Object.values(keyMap).forEach(hotkey => { + const extraSequences = []; + + hotkey.sequences.forEach(seq => { + if (typeof seq === "string") { + const upper = HotKeyInterface.uppercaseKeyLetter(seq); + if (upper !== seq) extraSequences.push(upper); + } else if (seq && typeof seq === "object") { + const upper = HotKeyInterface.uppercaseKeyLetter(seq.sequence); + if (upper !== seq.sequence) extraSequences.push({ ...seq, sequence: upper }); + } + }); + + hotkey.sequences.push(...extraSequences); + }); + } + + /** + * Uppercases the key portion (after the last '+') of a hotkey sequence string, + * but only if it's a single letter. Modifier names ('meta', 'shift', 'alt') and + * multi-character key names ('up', 'backspace', etc.) are left untouched. + * @param {string} sequence - the sequence string to modify, e.g. 'shift+t' or 'x' + */ + static uppercaseKeyLetter(sequence) { + if (typeof sequence !== "string") return sequence; + + const parts = sequence.split("+"); + const key = parts[parts.length - 1]; + + if (key.length === 1 && /[a-z]/i.test(key)) { + parts[parts.length - 1] = key.toUpperCase(); + return parts.join("+"); + } + + return sequence; + } } -export default HotKeyInterface; +export default HotKeyInterface; \ No newline at end of file