diff --git a/.babelrc b/.babelrc
new file mode 100644
index 0000000..ec07443
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,4 @@
+{
+ "presets": ["@babel/preset-env"],
+ "plugins": [["@babel/plugin-transform-runtime"]]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..788514f
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,7 @@
+{
+ "workbench.colorCustomizations": {
+ "activityBar.background": "#60090E",
+ "titleBar.activeBackground": "#860C14",
+ "titleBar.activeForeground": "#FFFBFB"
+ }
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index ca24b52..7eefa7a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "Breaditor",
- "version": "2.0.1",
+ "version": "2.0.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -159,6 +159,203 @@
"lodash": "^4.17.13"
}
},
+ "@babel/helper-define-polyfill-provider": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz",
+ "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-compilation-targets": "^7.13.0",
+ "@babel/helper-module-imports": "^7.12.13",
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/traverse": "^7.13.0",
+ "debug": "^4.1.1",
+ "lodash.debounce": "^4.0.8",
+ "resolve": "^1.14.2",
+ "semver": "^6.1.2"
+ },
+ "dependencies": {
+ "@babel/code-frame": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz",
+ "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "^7.18.6"
+ }
+ },
+ "@babel/compat-data": {
+ "version": "7.18.8",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz",
+ "integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==",
+ "dev": true
+ },
+ "@babel/generator": {
+ "version": "7.18.7",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz",
+ "integrity": "sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.18.7",
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "jsesc": "^2.5.1"
+ }
+ },
+ "@babel/helper-compilation-targets": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz",
+ "integrity": "sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==",
+ "dev": true,
+ "requires": {
+ "@babel/compat-data": "^7.18.6",
+ "@babel/helper-validator-option": "^7.18.6",
+ "browserslist": "^4.20.2",
+ "semver": "^6.3.0"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz",
+ "integrity": "sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==",
+ "dev": true,
+ "requires": {
+ "@babel/template": "^7.18.6",
+ "@babel/types": "^7.18.6"
+ }
+ },
+ "@babel/helper-hoist-variables": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz",
+ "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.18.6"
+ }
+ },
+ "@babel/helper-module-imports": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz",
+ "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.18.6"
+ }
+ },
+ "@babel/helper-plugin-utils": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz",
+ "integrity": "sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==",
+ "dev": true
+ },
+ "@babel/helper-split-export-declaration": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz",
+ "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.18.6"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
+ "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.18.6",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ }
+ },
+ "@babel/parser": {
+ "version": "7.18.8",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.8.tgz",
+ "integrity": "sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA==",
+ "dev": true
+ },
+ "@babel/template": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz",
+ "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.18.6",
+ "@babel/parser": "^7.18.6",
+ "@babel/types": "^7.18.6"
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.18.8",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.8.tgz",
+ "integrity": "sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.18.6",
+ "@babel/generator": "^7.18.7",
+ "@babel/helper-environment-visitor": "^7.18.6",
+ "@babel/helper-function-name": "^7.18.6",
+ "@babel/helper-hoist-variables": "^7.18.6",
+ "@babel/helper-split-export-declaration": "^7.18.6",
+ "@babel/parser": "^7.18.8",
+ "@babel/types": "^7.18.8",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0"
+ }
+ },
+ "@babel/types": {
+ "version": "7.18.8",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.8.tgz",
+ "integrity": "sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.18.6",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "browserslist": {
+ "version": "4.21.2",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.2.tgz",
+ "integrity": "sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA==",
+ "dev": true,
+ "requires": {
+ "caniuse-lite": "^1.0.30001366",
+ "electron-to-chromium": "^1.4.188",
+ "node-releases": "^2.0.6",
+ "update-browserslist-db": "^1.0.4"
+ }
+ },
+ "caniuse-lite": {
+ "version": "1.0.30001367",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001367.tgz",
+ "integrity": "sha512-XDgbeOHfifWV3GEES2B8rtsrADx4Jf+juKX2SICJcaUhjYBO3bR96kvEIHa15VU6ohtOhBZuPGGYGbXMRn0NCw==",
+ "dev": true
+ },
+ "electron-to-chromium": {
+ "version": "1.4.192",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.192.tgz",
+ "integrity": "sha512-8nCXyIQY9An88NXAp+PuPy5h3/w5ZY7Iu2lag65Q0XREprcat5F8gKhoHsBUnQcFuCRnmevpR8yEBYRU3d2HDw==",
+ "dev": true
+ },
+ "node-releases": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
+ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==",
+ "dev": true
+ },
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-environment-visitor": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz",
+ "integrity": "sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==",
+ "dev": true
+ },
"@babel/helper-explode-assignable-expression": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz",
@@ -298,6 +495,18 @@
"@babel/types": "^7.8.3"
}
},
+ "@babel/helper-validator-identifier": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz",
+ "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==",
+ "dev": true
+ },
+ "@babel/helper-validator-option": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz",
+ "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==",
+ "dev": true
+ },
"@babel/helper-wrap-function": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz",
@@ -809,6 +1018,53 @@
"@babel/helper-plugin-utils": "^7.8.3"
}
},
+ "@babel/plugin-transform-runtime": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.6.tgz",
+ "integrity": "sha512-8uRHk9ZmRSnWqUgyae249EJZ94b0yAGLBIqzZzl+0iEdbno55Pmlt/32JZsHwXD9k/uZj18Aqqk35wBX4CBTXA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-imports": "^7.18.6",
+ "@babel/helper-plugin-utils": "^7.18.6",
+ "babel-plugin-polyfill-corejs2": "^0.3.1",
+ "babel-plugin-polyfill-corejs3": "^0.5.2",
+ "babel-plugin-polyfill-regenerator": "^0.3.1",
+ "semver": "^6.3.0"
+ },
+ "dependencies": {
+ "@babel/helper-module-imports": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz",
+ "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.18.6"
+ }
+ },
+ "@babel/helper-plugin-utils": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz",
+ "integrity": "sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==",
+ "dev": true
+ },
+ "@babel/types": {
+ "version": "7.18.8",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.8.tgz",
+ "integrity": "sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.18.6",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
+ }
+ }
+ },
"@babel/plugin-transform-shorthand-properties": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz",
@@ -976,11 +1232,18 @@
}
},
"@babel/runtime": {
- "version": "7.8.4",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz",
- "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==",
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz",
+ "integrity": "sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==",
"requires": {
- "regenerator-runtime": "^0.13.2"
+ "regenerator-runtime": "^0.13.4"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.13.9",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
+ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
+ }
}
},
"@babel/runtime-corejs3": {
@@ -1322,6 +1585,45 @@
"@types/yargs": "^13.0.0"
}
},
+ "@jridgewell/gen-mapping": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
+ "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/set-array": "^1.0.1",
+ "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ }
+ },
+ "@jridgewell/resolve-uri": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
+ "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
+ "dev": true
+ },
+ "@jridgewell/set-array": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+ "dev": true
+ },
+ "@jridgewell/sourcemap-codec": {
+ "version": "1.4.14",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
+ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
+ "dev": true
+ },
+ "@jridgewell/trace-mapping": {
+ "version": "0.3.14",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz",
+ "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
"@nodelib/fs.scandir": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
@@ -1549,12 +1851,24 @@
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
"dev": true
},
+ "@types/minimist": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz",
+ "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==",
+ "dev": true
+ },
"@types/node": {
"version": "13.7.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.0.tgz",
"integrity": "sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ==",
"dev": true
},
+ "@types/normalize-package-data": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz",
+ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==",
+ "dev": true
+ },
"@types/parse-json": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
@@ -2095,7 +2409,7 @@
"amdefine": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
- "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
+ "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==",
"dev": true
},
"ansi-align": {
@@ -2410,9 +2724,9 @@
}
},
"are-we-there-yet": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
- "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz",
+ "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==",
"dev": true,
"requires": {
"delegates": "^1.0.0",
@@ -2422,7 +2736,7 @@
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
"dev": true
},
"readable-stream": {
@@ -2548,6 +2862,12 @@
"es-abstract": "^1.17.0-next.1"
}
},
+ "arrify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
+ "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==",
+ "dev": true
+ },
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
@@ -2643,7 +2963,7 @@
"async-foreach": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz",
- "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=",
+ "integrity": "sha512-VUeSMD8nEGBWaZK4lizI1sf3yEC7pnAQ/mrI7pC2fBz2s/tq5jWWEngTwaf0Gruu/OoXRGLGg1XFqpYBiGTYJA==",
"dev": true
},
"async-limiter": {
@@ -2795,6 +3115,115 @@
"@types/babel__traverse": "^7.0.6"
}
},
+ "babel-plugin-polyfill-corejs2": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz",
+ "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==",
+ "dev": true,
+ "requires": {
+ "@babel/compat-data": "^7.13.11",
+ "@babel/helper-define-polyfill-provider": "^0.3.1",
+ "semver": "^6.1.1"
+ },
+ "dependencies": {
+ "@babel/compat-data": {
+ "version": "7.18.8",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz",
+ "integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==",
+ "dev": true
+ },
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
+ }
+ }
+ },
+ "babel-plugin-polyfill-corejs3": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz",
+ "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-define-polyfill-provider": "^0.3.1",
+ "core-js-compat": "^3.21.0"
+ },
+ "dependencies": {
+ "browserslist": {
+ "version": "4.21.2",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.2.tgz",
+ "integrity": "sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA==",
+ "dev": true,
+ "requires": {
+ "caniuse-lite": "^1.0.30001366",
+ "electron-to-chromium": "^1.4.188",
+ "node-releases": "^2.0.6",
+ "update-browserslist-db": "^1.0.4"
+ }
+ },
+ "caniuse-lite": {
+ "version": "1.0.30001367",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001367.tgz",
+ "integrity": "sha512-XDgbeOHfifWV3GEES2B8rtsrADx4Jf+juKX2SICJcaUhjYBO3bR96kvEIHa15VU6ohtOhBZuPGGYGbXMRn0NCw==",
+ "dev": true
+ },
+ "core-js-compat": {
+ "version": "3.23.4",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.4.tgz",
+ "integrity": "sha512-RkSRPe+JYEoflcsuxJWaiMPhnZoFS51FcIxm53k4KzhISCBTmaGlto9dTIrYuk0hnJc3G6pKufAKepHnBq6B6Q==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.1",
+ "semver": "7.0.0"
+ }
+ },
+ "electron-to-chromium": {
+ "version": "1.4.192",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.192.tgz",
+ "integrity": "sha512-8nCXyIQY9An88NXAp+PuPy5h3/w5ZY7Iu2lag65Q0XREprcat5F8gKhoHsBUnQcFuCRnmevpR8yEBYRU3d2HDw==",
+ "dev": true
+ },
+ "node-releases": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
+ "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==",
+ "dev": true
+ },
+ "semver": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
+ "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
+ "dev": true
+ }
+ }
+ },
+ "babel-plugin-polyfill-regenerator": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz",
+ "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-define-polyfill-provider": "^0.3.1"
+ }
+ },
+ "babel-polyfill": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
+ "integrity": "sha512-F2rZGQnAdaHWQ8YAoeRbukc7HS9QgdgeyJ0rQDd485v9opwuPvjpPFcOOT/WmkKTdgy9ESgSPXDcTNpzrGr6iQ==",
+ "requires": {
+ "babel-runtime": "^6.26.0",
+ "core-js": "^2.5.0",
+ "regenerator-runtime": "^0.10.5"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.10.5",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
+ "integrity": "sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w=="
+ }
+ }
+ },
"babel-preset-jest": {
"version": "24.9.0",
"resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz",
@@ -2809,7 +3238,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
- "dev": true,
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
@@ -2818,8 +3246,7 @@
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
- "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
- "dev": true
+ "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
}
}
},
@@ -3232,15 +3659,6 @@
}
}
},
- "block-stream": {
- "version": "0.0.9",
- "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
- "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
- "dev": true,
- "requires": {
- "inherits": "~2.0.0"
- }
- },
"bluebird": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
@@ -4234,6 +4652,12 @@
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
+ "color-support": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
+ "dev": true
+ },
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -4472,7 +4896,7 @@
"console-control-strings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
+ "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",
"dev": true
},
"console-stream": {
@@ -4860,8 +5284,7 @@
"core-js": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
- "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
- "dev": true
+ "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
},
"core-js-compat": {
"version": "3.6.4",
@@ -5284,6 +5707,16 @@
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true
},
+ "decamelize-keys": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz",
+ "integrity": "sha512-ocLWuYzRPoS9bfiSdDd3cxvrzovVMZnRDVEzAs+hWIVXGDbHxWMECij2OBuyB/An0FFW/nLuq6Kv1i/YC5Qfzg==",
+ "dev": true,
+ "requires": {
+ "decamelize": "^1.1.0",
+ "map-obj": "^1.0.0"
+ }
+ },
"decode-uri-component": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
@@ -5589,7 +6022,7 @@
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
+ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
"dev": true
},
"depd": {
@@ -6536,6 +6969,12 @@
"is-symbol": "^1.0.2"
}
},
+ "escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true
+ },
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
@@ -8626,18 +9065,6 @@
}
}
},
- "fstream": {
- "version": "1.0.12",
- "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
- "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "inherits": "~2.0.0",
- "mkdirp": ">=0.5 0",
- "rimraf": "2"
- }
- },
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -8653,7 +9080,7 @@
"gauge": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
- "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
+ "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==",
"dev": true,
"requires": {
"aproba": "^1.0.3",
@@ -8963,6 +9390,12 @@
"har-schema": "^2.0.0"
}
},
+ "hard-rejection": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz",
+ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==",
+ "dev": true
+ },
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@@ -9019,7 +9452,7 @@
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
+ "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
"dev": true
},
"has-value": {
@@ -9740,12 +10173,6 @@
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
"dev": true
},
- "in-publish": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz",
- "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=",
- "dev": true
- },
"indent-string": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
@@ -9914,12 +10341,6 @@
"loose-envify": "^1.0.0"
}
},
- "invert-kv": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
- "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
- "dev": true
- },
"ip": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
@@ -10009,6 +10430,15 @@
"ci-info": "^2.0.0"
}
},
+ "is-core-module": {
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
+ "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.3"
+ }
+ },
"is-cwebp-readable": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-cwebp-readable/-/is-cwebp-readable-2.0.1.tgz",
@@ -10957,9 +11387,9 @@
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
},
"js-base64": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz",
- "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==",
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+ "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
"dev": true
},
"js-tokens": {
@@ -11043,6 +11473,12 @@
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
"dev": true
},
+ "json-parse-even-better-errors": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
+ "dev": true
+ },
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
@@ -11196,15 +11632,6 @@
}
}
},
- "lcid": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
- "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
- "dev": true,
- "requires": {
- "invert-kv": "^1.0.0"
- }
- },
"left-pad": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
@@ -11665,6 +12092,12 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
+ "lodash.debounce": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
+ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==",
+ "dev": true
+ },
"lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
@@ -12132,6 +12565,12 @@
"dom-walk": "^0.1.0"
}
},
+ "min-indent": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
+ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
+ "dev": true
+ },
"minimalistic-assert": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
@@ -12158,6 +12597,17 @@
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true
},
+ "minimist-options": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz",
+ "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==",
+ "dev": true,
+ "requires": {
+ "arrify": "^1.0.1",
+ "is-plain-obj": "^1.1.0",
+ "kind-of": "^6.0.3"
+ }
+ },
"minipass": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz",
@@ -12439,29 +12889,125 @@
"dev": true
},
"node-gyp": {
- "version": "3.8.0",
- "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz",
- "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==",
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz",
+ "integrity": "sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ==",
"dev": true,
"requires": {
- "fstream": "^1.0.0",
- "glob": "^7.0.3",
- "graceful-fs": "^4.1.2",
- "mkdirp": "^0.5.0",
- "nopt": "2 || 3",
- "npmlog": "0 || 1 || 2 || 3 || 4",
- "osenv": "0",
- "request": "^2.87.0",
- "rimraf": "2",
- "semver": "~5.3.0",
- "tar": "^2.0.0",
- "which": "1"
+ "env-paths": "^2.2.0",
+ "glob": "^7.1.4",
+ "graceful-fs": "^4.2.3",
+ "nopt": "^5.0.0",
+ "npmlog": "^4.1.2",
+ "request": "^2.88.2",
+ "rimraf": "^3.0.2",
+ "semver": "^7.3.2",
+ "tar": "^6.0.2",
+ "which": "^2.0.2"
},
"dependencies": {
+ "env-paths": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
+ "dev": true
+ },
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "npmlog": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
+ "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
+ "dev": true,
+ "requires": {
+ "are-we-there-yet": "~1.1.2",
+ "console-control-strings": "~1.1.0",
+ "gauge": "~2.7.3",
+ "set-blocking": "~2.0.0"
+ }
+ },
+ "request": {
+ "version": "2.88.2",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
+ "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
+ "dev": true,
+ "requires": {
+ "aws-sign2": "~0.7.0",
+ "aws4": "^1.8.0",
+ "caseless": "~0.12.0",
+ "combined-stream": "~1.0.6",
+ "extend": "~3.0.2",
+ "forever-agent": "~0.6.1",
+ "form-data": "~2.3.2",
+ "har-validator": "~5.1.3",
+ "http-signature": "~1.2.0",
+ "is-typedarray": "~1.0.0",
+ "isstream": "~0.1.2",
+ "json-stringify-safe": "~5.0.1",
+ "mime-types": "~2.1.19",
+ "oauth-sign": "~0.9.0",
+ "performance-now": "^2.1.0",
+ "qs": "~6.5.2",
+ "safe-buffer": "^5.1.2",
+ "tough-cookie": "~2.5.0",
+ "tunnel-agent": "^0.6.0",
+ "uuid": "^3.3.2"
+ }
+ },
+ "rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
"semver": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
- "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
+ "version": "7.3.7",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
+ "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "tough-cookie": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
+ "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
+ "dev": true,
+ "requires": {
+ "psl": "^1.1.28",
+ "punycode": "^2.1.1"
+ }
+ },
+ "uuid": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+ "dev": true
+ },
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}
}
@@ -12608,71 +13154,358 @@
}
},
"node-sass": {
- "version": "4.13.1",
- "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz",
- "integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-7.0.0.tgz",
+ "integrity": "sha512-6yUnsD3L8fVbgMX6nKQqZkjRcG7a/PpmF0pEyeWf+BgbTj2ToJlCYrnUifL2KbjV5gIY22I3oppahBWA3B+jUg==",
"dev": true,
"requires": {
"async-foreach": "^0.1.3",
- "chalk": "^1.1.1",
- "cross-spawn": "^3.0.0",
+ "chalk": "^4.1.2",
+ "cross-spawn": "^7.0.3",
"gaze": "^1.0.0",
"get-stdin": "^4.0.1",
"glob": "^7.0.3",
- "in-publish": "^2.0.0",
"lodash": "^4.17.15",
- "meow": "^3.7.0",
- "mkdirp": "^0.5.1",
+ "meow": "^9.0.0",
"nan": "^2.13.2",
- "node-gyp": "^3.8.0",
- "npmlog": "^4.0.0",
+ "node-gyp": "^7.1.0",
+ "npmlog": "^5.0.0",
"request": "^2.88.0",
- "sass-graph": "^2.2.4",
+ "sass-graph": "2.2.5",
"stdout-stream": "^1.4.0",
"true-case-path": "^1.0.2"
},
"dependencies": {
"ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "dev": true
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "camelcase-keys": {
+ "version": "6.2.2",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz",
+ "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==",
+ "dev": true,
+ "requires": {
+ "camelcase": "^5.3.1",
+ "map-obj": "^4.0.0",
+ "quick-lru": "^4.0.1"
+ }
},
"chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
}
},
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
"cross-spawn": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz",
- "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=",
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"dev": true,
"requires": {
- "lru-cache": "^4.0.1",
- "which": "^1.2.9"
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
}
},
- "supports-color": {
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "hosted-git-info": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
+ "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "indent-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
+ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
+ "dev": true
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "map-obj": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz",
+ "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
+ "dev": true
+ },
+ "meow": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz",
+ "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==",
+ "dev": true,
+ "requires": {
+ "@types/minimist": "^1.2.0",
+ "camelcase-keys": "^6.2.2",
+ "decamelize": "^1.2.0",
+ "decamelize-keys": "^1.1.0",
+ "hard-rejection": "^2.1.0",
+ "minimist-options": "4.1.0",
+ "normalize-package-data": "^3.0.0",
+ "read-pkg-up": "^7.0.1",
+ "redent": "^3.0.0",
+ "trim-newlines": "^3.0.0",
+ "type-fest": "^0.18.0",
+ "yargs-parser": "^20.2.3"
+ }
+ },
+ "normalize-package-data": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
+ "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
+ "dev": true,
+ "requires": {
+ "hosted-git-info": "^4.0.1",
+ "is-core-module": "^2.5.0",
+ "semver": "^7.3.4",
+ "validate-npm-package-license": "^3.0.1"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "parse-json": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-even-better-errors": "^2.3.0",
+ "lines-and-columns": "^1.1.6"
+ }
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true
+ },
+ "read-pkg": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz",
+ "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==",
+ "dev": true,
+ "requires": {
+ "@types/normalize-package-data": "^2.4.0",
+ "normalize-package-data": "^2.5.0",
+ "parse-json": "^5.0.0",
+ "type-fest": "^0.6.0"
+ },
+ "dependencies": {
+ "hosted-git-info": {
+ "version": "2.8.9",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
+ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
+ "dev": true
+ },
+ "normalize-package-data": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+ "dev": true,
+ "requires": {
+ "hosted-git-info": "^2.1.4",
+ "resolve": "^1.10.0",
+ "semver": "2 || 3 || 4 || 5",
+ "validate-npm-package-license": "^3.0.1"
+ }
+ },
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ },
+ "type-fest": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",
+ "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==",
+ "dev": true
+ }
+ }
+ },
+ "read-pkg-up": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz",
+ "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==",
+ "dev": true,
+ "requires": {
+ "find-up": "^4.1.0",
+ "read-pkg": "^5.2.0",
+ "type-fest": "^0.8.1"
+ },
+ "dependencies": {
+ "type-fest": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
+ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
+ "dev": true
+ }
+ }
+ },
+ "redent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz",
+ "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==",
+ "dev": true,
+ "requires": {
+ "indent-string": "^4.0.0",
+ "strip-indent": "^3.0.0"
+ }
+ },
+ "semver": {
+ "version": "7.3.7",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
+ "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "shebang-command": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^3.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true
+ },
+ "strip-indent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
+ "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
+ "dev": true,
+ "requires": {
+ "min-indent": "^1.0.0"
+ }
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "trim-newlines": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz",
+ "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==",
+ "dev": true
+ },
+ "type-fest": {
+ "version": "0.18.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz",
+ "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==",
+ "dev": true
+ },
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "yargs-parser": {
+ "version": "20.2.9",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true
}
}
},
"nopt": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
- "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",
+ "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
"dev": true,
"requires": {
"abbrev": "1"
@@ -12736,15 +13569,108 @@
}
},
"npmlog": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
- "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",
+ "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
"dev": true,
"requires": {
- "are-we-there-yet": "~1.1.2",
- "console-control-strings": "~1.1.0",
- "gauge": "~2.7.3",
- "set-blocking": "~2.0.0"
+ "are-we-there-yet": "^2.0.0",
+ "console-control-strings": "^1.1.0",
+ "gauge": "^3.0.0",
+ "set-blocking": "^2.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "are-we-there-yet": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
+ "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",
+ "dev": true,
+ "requires": {
+ "delegates": "^1.0.0",
+ "readable-stream": "^3.6.0"
+ }
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "gauge": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",
+ "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",
+ "dev": true,
+ "requires": {
+ "aproba": "^1.0.3 || ^2.0.0",
+ "color-support": "^1.1.2",
+ "console-control-strings": "^1.0.0",
+ "has-unicode": "^2.0.1",
+ "object-assign": "^4.1.1",
+ "signal-exit": "^3.0.0",
+ "string-width": "^4.2.3",
+ "strip-ansi": "^6.0.1",
+ "wide-align": "^1.1.2"
+ }
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
}
},
"nth-check": {
@@ -13061,37 +13987,12 @@
"arch": "^2.1.0"
}
},
- "os-homedir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
- "dev": true
- },
- "os-locale": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
- "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
- "dev": true,
- "requires": {
- "lcid": "^1.0.0"
- }
- },
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
- "osenv": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
- "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
- "dev": true,
- "requires": {
- "os-homedir": "^1.0.0",
- "os-tmpdir": "^1.0.0"
- }
- },
"p-cancelable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
@@ -13429,6 +14330,12 @@
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true
},
+ "picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dev": true
+ },
"picomatch": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz",
@@ -13889,6 +14796,12 @@
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
"dev": true
},
+ "quick-lru": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz",
+ "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==",
+ "dev": true
+ },
"randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@@ -14211,7 +15124,8 @@
"regenerator-runtime": {
"version": "0.13.3",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz",
- "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw=="
+ "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==",
+ "dev": true
},
"regenerator-transform": {
"version": "0.14.1",
@@ -14683,96 +15597,59 @@
}
},
"sass-graph": {
- "version": "2.2.4",
- "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz",
- "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=",
+ "version": "2.2.5",
+ "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz",
+ "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==",
"dev": true,
"requires": {
"glob": "^7.0.0",
"lodash": "^4.0.0",
"scss-tokenizer": "^0.2.3",
- "yargs": "^7.0.0"
+ "yargs": "^13.3.2"
},
"dependencies": {
- "camelcase": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
- "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==",
"dev": true
},
- "cliui": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
- "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1",
- "wrap-ansi": "^2.0.0"
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
}
},
- "get-caller-file": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
- "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
- "dev": true
- },
- "require-main-filename": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
- "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
- "dev": true
- },
- "which-module": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
- "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
- "dev": true
- },
- "wrap-ansi": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
- "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1"
+ "ansi-regex": "^4.1.0"
}
},
- "y18n": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
- "dev": true
- },
"yargs": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz",
- "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=",
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
+ "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
"dev": true,
"requires": {
- "camelcase": "^3.0.0",
- "cliui": "^3.2.0",
- "decamelize": "^1.1.1",
- "get-caller-file": "^1.0.1",
- "os-locale": "^1.4.0",
- "read-pkg-up": "^1.0.1",
+ "cliui": "^5.0.0",
+ "find-up": "^3.0.0",
+ "get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
- "require-main-filename": "^1.0.1",
+ "require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
- "string-width": "^1.0.2",
- "which-module": "^1.0.0",
- "y18n": "^3.2.1",
- "yargs-parser": "^5.0.0"
- }
- },
- "yargs-parser": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz",
- "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=",
- "dev": true,
- "requires": {
- "camelcase": "^3.0.0"
+ "string-width": "^3.0.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^13.1.2"
}
}
}
@@ -14827,7 +15704,7 @@
"scss-tokenizer": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz",
- "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=",
+ "integrity": "sha512-dYE8LhncfBUar6POCxMTm0Ln+erjeczqEvCJib5/7XNkdw1FkUGgwMPY360FY0FgPWQxHWCx29Jl3oejyGLM9Q==",
"dev": true,
"requires": {
"js-base64": "^2.1.8",
@@ -14837,7 +15714,7 @@
"source-map": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
- "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
+ "integrity": "sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A==",
"dev": true,
"requires": {
"amdefine": ">=0.0.4"
@@ -15676,7 +16553,7 @@
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
"dev": true
},
"readable-stream": {
@@ -16146,14 +17023,37 @@
"dev": true
},
"tar": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
- "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
+ "version": "6.1.11",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
+ "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
"dev": true,
"requires": {
- "block-stream": "*",
- "fstream": "^1.0.12",
- "inherits": "2"
+ "chownr": "^2.0.0",
+ "fs-minipass": "^2.0.0",
+ "minipass": "^3.0.0",
+ "minizlib": "^2.1.1",
+ "mkdirp": "^1.0.3",
+ "yallist": "^4.0.0"
+ },
+ "dependencies": {
+ "chownr": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
}
},
"tar-stream": {
@@ -16894,6 +17794,16 @@
"integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
"dev": true
},
+ "update-browserslist-db": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz",
+ "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==",
+ "dev": true,
+ "requires": {
+ "escalade": "^3.1.1",
+ "picocolors": "^1.0.0"
+ }
+ },
"update-notifier": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.0.0.tgz",
@@ -17904,12 +18814,12 @@
"dev": true
},
"wide-align": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
- "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
+ "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
"dev": true,
"requires": {
- "string-width": "^1.0.2 || 2"
+ "string-width": "^1.0.2 || 2 || 3 || 4"
}
},
"widest-line": {
diff --git a/package.json b/package.json
index 5137780..53b1577 100644
--- a/package.json
+++ b/package.json
@@ -1,172 +1,175 @@
{
- "name": "Breaditor",
- "version": "2.0.1",
- "description": "",
- "main": "./dist/main.js",
- "scripts": {
- "build-main": "cross-env NODE_ENV=production webpack --config webpack.main.prod.config.js",
- "build-renderer": "cross-env NODE_ENV=production webpack --config webpack.renderer.prod.config.js",
- "build": "npm run build-main && npm run build-renderer",
- "start-renderer-dev": "webpack-dev-server --config webpack.renderer.dev.config.js",
- "start-main-dev": "webpack --config webpack.main.config.js && electron ./dist/main.js",
- "start-dev": "cross-env NODE_ENV=test START_HOT=1 npm run start-renderer-dev",
- "dev": "npm run start-dev",
- "prestart": "npm run build",
- "start": "electron .",
- "lint": "eslint --ext=jsx,js,tsx,ts src",
- "lint-fix": "eslint --fix --ext=jsx,js,tsx,ts src",
- "test": "jest --detectOpenHandles",
- "watch": "jest --detectOpenHandles --watchAll",
- "pretest:e2e": "npm run build",
- "test:e2e": "jest --testMatch '**/?(*.)+(e2etest).[tj]s?(x)'",
- "test-circle": "npm test && npm run test:e2e",
- "pack": "npm run build && electron-builder --dir",
- "dist": "npm run build && electron-builder",
- "postinstall": "electron-builder install-app-deps"
- },
- "husky": {
- "hooks": {
- "pre-commit": "lint-staged"
- }
- },
- "lint-staged": {
- "{src,test,mocks}/**/*.{json,css,scss,md}": [
- "prettier --config ./.prettierrc --write"
- ],
- "{src,test,mocks}/**/*.{js,ts,tsx}": [
- "prettier --config ./.prettierrc --write",
- "eslint --ext=jsx,js,ts,tsx --fix src"
- ]
- },
- "jest": {
- "transform": {
- "^.+\\.(j|t)sx?$": "ts-jest"
+ "name": "breaditor",
+ "version": "2.0.2",
+ "description": "",
+ "main": "./dist/main.js",
+ "scripts": {
+ "build-main": "cross-env NODE_ENV=production webpack --config webpack.main.prod.config.js",
+ "build-renderer": "cross-env NODE_ENV=production webpack --config webpack.renderer.prod.config.js",
+ "build": "npm run build-main && npm run build-renderer",
+ "start-renderer-dev": "webpack-dev-server --config webpack.renderer.dev.config.js",
+ "start-main-dev": "webpack --config webpack.main.config.js && electron ./dist/main.js",
+ "start-dev": "cross-env NODE_ENV=test START_HOT=1 npm run start-renderer-dev",
+ "dev": "npm run start-dev",
+ "prestart": "npm run build",
+ "start": "electron .",
+ "lint": "eslint --ext=jsx,js,tsx,ts src",
+ "lint-fix": "eslint --fix --ext=jsx,js,tsx,ts src",
+ "test": "jest --detectOpenHandles",
+ "watch": "jest --detectOpenHandles --watchAll",
+ "pretest:e2e": "npm run build",
+ "test:e2e": "jest --testMatch '**/?(*.)+(e2etest).[tj]s?(x)'",
+ "test-circle": "npm test && npm run test:e2e",
+ "pack": "npm run build && electron-builder --dir",
+ "dist": "npm run build && electron-builder",
+ "postinstall": "electron-builder install-app-deps"
+ },
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged"
+ }
+ },
+ "lint-staged": {
+ "{src,test,mocks}/**/*.{json,css,scss,md}": [
+ "prettier --config ./.prettierrc --write"
+ ],
+ "{src,test,mocks}/**/*.{js,ts,tsx}": [
+ "prettier --config ./.prettierrc --write",
+ "eslint --ext=jsx,js,ts,tsx --fix src"
+ ]
+ },
+ "jest": {
+ "transform": {
+ "^.+\\.(j|t)sx?$": "ts-jest"
+ },
+ "moduleFileExtensions": [
+ "ts",
+ "tsx",
+ "js",
+ "json",
+ "node"
+ ],
+ "moduleNameMapper": {
+ "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": " Last step: how big (in tiles) do you want the base layer of your new map to be? Nothing has yet been altered on your disk. However: pressing "CREATE ALL NEW FILES" will create and/or overwrite any files you've specified during this process. You selected: Copying means changes you make to it will not be refelected in other tilesets that used the original. Referencing means if you move your image around, it'll likely break things and you'll need to edit the json file to fix it. We will create a new tileset definition by copying an existing file: To a new copy of that file at:
`;
- } else if(existingImageFilename === null && newImageCopyFilename === true) {
- topPart = `
+ } else if (existingImageFilename === null && newImageCopyFilename === true) {
+ topPart = `
We will create a new tileset definition by creating a brand new image! Note: it's usually optimal to have your width and height be the same number (square) and a power of 2.
`;
-
- } else {
- const vspname = path.basename(existingImageFilename);
- topPart = `
+ } else {
+ const vspname = path.basename(existingImageFilename);
+ topPart = `
We will create a new tileset definition by referencing an existing file: ...and storing that as a relative path to the Tileset Definition you are about to save.
`;
- }
+ }
- dialoger(
- 'Step 2d: Define your Tileset',
- `
+ dialoger(
+ 'Step 2d: Define your Tileset',
+ `
${topPart}
tile width:
`,
- {
- 'Confirm': () => {
- listener();
- if( !verify() ){
- alert('Please fix any errors before continuing.');
- return;
- }
-
- const vw = parseInt($('#vsp-width').val(),10);
- const tw = parseInt($('#tile-width').val(),10);
- const th = parseInt($('#tile-height').val(),10);
- const tpr = parseInt(vw/tw,10);
- const imgName = $("#image-name").val();
- const vspName = $("#vsp-name").val();
-
- window.newMapData.default_vspfile = vspName;
- window.newVspData = {
- "tilesize": {
- "width": tw,
- "height": th
+ {
+ Confirm: () => {
+ listener();
+ if (!verify()) {
+ alert('Please fix any errors before continuing.');
+ return;
+ }
+
+ const vw = parseInt($('#vsp-width').val(), 10);
+ const tw = parseInt($('#tile-width').val(), 10);
+ const th = parseInt($('#tile-height').val(), 10);
+ const tpr = parseInt(vw / tw, 10);
+ const imgName = $('#image-name').val();
+ const vspName = $('#vsp-name').val();
+
+ window.newMapData.default_vspfile = vspName;
+ window.newVspData = {
+ tilesize: {
+ width: tw,
+ height: th
+ },
+ tiles_per_row: tpr,
+ source_image: {
+ existingImageFilename,
+ newImageCopyFilename,
+ imgName,
+ vspName
+ }
+ };
+
+ obsModeDialog();
+ }
},
- "tiles_per_row": tpr,
- "source_image": {
- existingImageFilename,
- newImageCopyFilename,
- imgName,
- vspName
+ false,
+ () => {
+ $('#modal-dialog input').on('keyup', listener);
+
+ let shittyMutex1 = false;
+ let shittyMutex2 = false;
+
+ $('#choose-vsp').click(() => {
+ if (shittyMutex1) return;
+ shittyMutex1 = true;
+ dialog.showSaveDialog(
+ {
+ title: 'Save new tileset definion',
+ filters: [{ name: 'text', extensions: ['vsp.json'] }]
+ },
+ filename => {
+ shittyMutex1 = false;
+ if (filename) {
+ $('#vsp-name').val(filename);
+ }
+ }
+ );
+ });
+
+ $('#choose-image').click(() => {
+ if (shittyMutex2) return;
+ shittyMutex2 = true;
+ dialog.showSaveDialog(
+ {
+ title: 'Save new tileset image',
+ filters: [{ name: 'img', extensions: ['png'] }]
+ },
+ filename => {
+ shittyMutex2 = false;
+ if (filename) {
+ $('#image-name').val(filename);
+ }
+ }
+ );
+ });
}
- };
+ );
+ };
- obsModeDialog();
- },
- }, false, () => {
-
- $("#modal-dialog input").on("keyup", listener);
-
- let shittyMutex1 = false;
- let shittyMutex2 = false;
-
- $("#choose-vsp").click( () => {
- if(shittyMutex1) return;
- shittyMutex1 = true;
- dialog.showSaveDialog(
+ const newVspDialog = () => {
+ let shittyMutex3 = false;
+
+ dialoger(
+ 'Step 2b: Tileset Image Asset',
+ `
+ Do you want to create a new tileset from an existing image, or a brand new image? Do you want to create a new tileset from an existing image, or a brand new image?
Obstruction tiles must be the same size as your default tilesize.`);
- } else {
- $tmp.find('.entity-index').text(i);
- }
+ $tmp.find('.entity-name').text(currentEntities[i].name);
+
+ if (myBaseData && myBaseData.regions && myBaseData.regions.Tall_Redraw) {
+ $tmp.find('.entity-index').html(
+ `${i}
`
+ );
+ } else {
+ $tmp.find('.entity-index').text(i);
+ }
- $tmp.click(singleclick_handler);
- $tmp.dblclick(doubleclick_handler);
+ $tmp.click(singleclick_handler);
+ $tmp.dblclick(doubleclick_handler);
- $list.append($tmp);
- }
+ $list.append($tmp);
+ }
- fixContainerSize();
+ fixContainerSize();
};
const fixContainerSize = () => {
- const palette = $('.entity-palette');
- const container = $('.entity-palette .window-container');
+ const palette = $('.entity-palette');
+ const container = $('.entity-palette .window-container');
- container.height(palette.height() - 290);
+ container.height(palette.height() - 290);
};
export const init = () => {
- $(function() {
- $.contextMenu({
- selector: '.entity-palette h3.ui-widget-header',
- callback(key, options) {
- switch(key) {
- default:
- console.log(`unknown key: ${ key}`);
- return;
- case 'generate_functions':
- generate_functions_from_names();
- return;
- case 'copy_scriptnames':
- copy_useful_entity_data_to_clipboard();
-
- }
- },
- items: {
- "copy_scriptnames": {name: "Copy useful entity data to clipboard", icon: "copy"},
- "generate_functions": {name: "Autogenerate activation scripts from name", icon: "gear"},
- },
- });
-
- $.contextMenu({
- selector: 'li.entity-row',
- callback(key, options) {
-
- switch(key) {
- default:
- console.log(`unknown key: ${ key}`);
- return;
- case 'code':
- copy_useful_single_entity_data_to_clipboard(currentEntities[$(this).data('index')]);
- return;
- case 'clone':
- options.$menu.trigger("contextmenu:hide");
- var entity_to_copy = $(this).data('index');
- clone_entity(entity_to_copy);
- return;
- case 'edit':
- $(this).dblclick();
- return;
- case 'delete':
- var entity_to_delete = $(this).data('index');
- if( confirm(`Are you sure you want to delete entity #${entity_to_delete}?`) ) {
- delete_entity(entity_to_delete);
+ $(function() {
+ $.contextMenu({
+ selector: '.entity-palette h3.ui-widget-header',
+ callback(key, options) {
+ switch (key) {
+ default:
+ console.log(`unknown key: ${key}`);
+ return;
+ case 'generate_functions':
+ generate_functions_from_names();
+ return;
+ case 'copy_scriptnames':
+ copy_useful_entity_data_to_clipboard();
+ }
+ },
+ items: {
+ copy_scriptnames: { name: 'Copy useful entity data to clipboard', icon: 'copy' },
+ generate_functions: {
+ name: 'Autogenerate activation scripts from name',
+ icon: 'gear'
+ }
}
-
- }
- },
- items: {
- "edit": {name: "Edit", icon: "edit"},
- "clone": {name: "Clone", icon: "copy"},
- "delete": {name: "Delete", icon: "delete"},
- "code": {name: "Copy useful entity data to clipboard", icon: "copy"},
- }
+ });
+
+ $.contextMenu({
+ selector: 'li.entity-row',
+ callback(key, options) {
+ switch (key) {
+ default:
+ console.log(`unknown key: ${key}`);
+ return;
+ case 'code':
+ copy_useful_single_entity_data_to_clipboard(
+ currentEntities[$(this).data('index')]
+ );
+ return;
+ case 'clone':
+ options.$menu.trigger('contextmenu:hide');
+ var entity_to_copy = $(this).data('index');
+ clone_entity(entity_to_copy);
+ return;
+ case 'edit':
+ $(this).dblclick();
+ return;
+ case 'delete':
+ var entity_to_delete = $(this).data('index');
+ if (
+ confirm(`Are you sure you want to delete entity #${entity_to_delete}?`)
+ ) {
+ delete_entity(entity_to_delete);
+ }
+ }
+ },
+ items: {
+ edit: { name: 'Edit', icon: 'edit' },
+ clone: { name: 'Clone', icon: 'copy' },
+ delete: { name: 'Delete', icon: 'delete' },
+ code: { name: 'Copy useful entity data to clipboard', icon: 'copy' }
+ }
+ });
});
- });
};
const template = `
@@ -380,833 +385,864 @@ let hasDirtyArt = false;
let oldData = null;
let oldEnt = null;
const setup_template = (ent, id) => {
- const $template = $(template);
-
- if (ent) {
- $('#modal-dialog').attr('title', `Edit Entity (id: ${ id })`);
- } else {
- $('#modal-dialog').attr('title', `Add New Entity (id: ${ currentEntities.length })`);
- }
-
- const entityFilenameClickFn = () => {
- const absPathToChrs = jetpack.path(window.$$$currentMap.dataPath, window.$$$currentMap.mapedConfigData.path_to_chrs);
- const curRelPath = $('#entity_filename').val();
-
- const whatDirToOpenFn = (curPath, absPath, prevRelPath) => {
-
- if( curPath ) { // "edit" mode
- const dir = getDirFromPath(curPath);
+ const $template = $(template);
- if(dir.startsWith(absPath)) {
- return dir;
- }
-
- return jetpack.path(absPath, dir);
- } // "new" mode
- if(prevRelPath) {
- return jetpack.path(absPath, prevRelPath);
- }
- return jetpack.path(absPath, curPath);
-
- ;
+ if (ent) {
+ $('#modal-dialog').attr('title', `Edit Entity (id: ${id})`);
+ } else {
+ $('#modal-dialog').attr('title', `Add New Entity (id: ${currentEntities.length})`);
}
- // This "could" have been nested trinaries... but NO.
- const whatDirToOpen = whatDirToOpenFn(curRelPath, absPathToChrs, previousEntityRelPath);
- previousEntityRelPath = whatDirToOpen;
-
- const { dialog } = require('electron').remote;
- dialog.showOpenDialog({
- title: 'Choose a new entity file',
- defaultPath: whatDirToOpen,
- filters: [{ name: 'text', extensions: ['json'] }],
- openFile: true,
- openDirectory: false,
- multiSelections: false
- }, function(filepath) {
-
- let path = '';
-
- if(!filepath) {
- console.log("No filepath to new entity!");
- return;
- }
+ const entityFilenameClickFn = () => {
+ const absPathToChrs = jetpack.path(
+ window.$$$currentMap.dataPath,
+ window.$$$currentMap.mapedConfigData.path_to_chrs
+ );
+ const curRelPath = $('#entity_filename').val();
- path = filepath[0];
+ const whatDirToOpenFn = (curPath, absPath, prevRelPath) => {
+ if (curPath) {
+ // "edit" mode
+ const dir = getDirFromPath(curPath);
- // if we're an absolute path, reletivize it!
- if( filepath[0].indexOf(absPathToChrs) === 0 ) {
- path = filepath[0].substring(absPathToChrs.length).replace(/\\/g, '/');
- if( path.indexOf('/') === 0 ) {
- path = path.substring(1);
- }
- }
+ if (dir.startsWith(absPath)) {
+ return dir;
+ }
- if( $('#entity_filename').val() !== path ) {
- hasDirtyArt = true;
- }
+ return jetpack.path(absPath, dir);
+ } // "new" mode
+ if (prevRelPath) {
+ return jetpack.path(absPath, prevRelPath);
+ }
+ return jetpack.path(absPath, curPath);
+ };
+
+ // This "could" have been nested trinaries... but NO.
+ const whatDirToOpen = whatDirToOpenFn(curRelPath, absPathToChrs, previousEntityRelPath);
+ previousEntityRelPath = whatDirToOpen;
+
+ const { dialog } = require('electron').remote;
+ dialog.showOpenDialog(
+ {
+ title: 'Choose a new entity file',
+ defaultPath: whatDirToOpen,
+ filters: [{ name: 'text', extensions: ['json'] }],
+ openFile: true,
+ openDirectory: false,
+ multiSelections: false
+ },
+ function(filepath) {
+ let path = '';
+
+ if (!filepath) {
+ console.log('No filepath to new entity!');
+ return;
+ }
+
+ path = filepath[0];
+
+ // if we're an absolute path, reletivize it!
+ if (filepath[0].indexOf(absPathToChrs) === 0) {
+ path = filepath[0].substring(absPathToChrs.length).replace(/\\/g, '/');
+ if (path.indexOf('/') === 0) {
+ path = path.substring(1);
+ }
+ }
+
+ if ($('#entity_filename').val() !== path) {
+ hasDirtyArt = true;
+ }
+
+ $('#entity_filename').val(path);
+
+ const anims = get_animations_by_filepath(path);
+ const animationKeyset = Object.keys(anims);
+
+ if (ent) {
+ set_animation_dropdown($template, animationKeyset, ent.animation);
+ } else {
+ set_animation_dropdown(
+ $template,
+ animationKeyset,
+ animationKeyset.length ? animationKeyset[0] : ''
+ );
+ }
+
+ const data = get_entity_data(path);
+ previousEntityRelPath = getDirFromPath(path);
+
+ if (ent) {
+ oldData = get_entity_data(ent.filename);
+ oldEnt = ent;
+ window.$$$currentMap.maybeAddEntityTexture(data, ent);
+ } else {
+ // TODO: is this used?
+ window.$$$currentMap.maybeAddEntityTextureFromFilename(data, path);
+ }
+ }
+ );
+ };
+ $template.find('#entity_filename').click(entityFilenameClickFn);
+
+ const $entFace = $template.find('#entity_facing');
+ const faceKeyset = ['Up', 'Down', 'Left', 'Right'];
+
+ // repopulate facing select
+ $entFace.empty();
+ $.each(faceKeyset, (key, value) => {
+ $entFace.append(
+ $('')
+ .attr('value', value)
+ .text(value)
+ );
+ });
- $('#entity_filename').val(path);
+ if (ent) {
+ console.log(`Editing: ${ent.name}`);
- const anims = get_animations_by_filepath(path);
- const animationKeyset = Object.keys(anims);
+ $template.find('#entity_name').val(ent.name);
+ $template.find('#entity_uuid').val(ent.uuid);
+ $template.find('#entity_filename').val(ent.filename);
- if(ent) {
- set_animation_dropdown($template, animationKeyset, ent.animation);
- } else {
- set_animation_dropdown($template, animationKeyset, animationKeyset.length ? animationKeyset[0] : '');
- }
+ $template.find('#entity_activation_script').val(ent.activation_script);
+ $template.find('#entity_speed').val(ent.speed);
- const data = get_entity_data(path);
- previousEntityRelPath = getDirFromPath(path);
+ $template.find('#entity_location_tx').val(ent.location.tx);
+ $template.find('#entity_location_ty').val(ent.location.ty);
- if(ent) {
- oldData = get_entity_data(ent.filename);
- oldEnt = ent;
- window.$$$currentMap.maybeAddEntityTexture(data, ent);
- } else {
- window.$$$currentMap.maybeAddEntityTextureFromFilename(data, path);
+ if (typeof ent.location.px === 'undefined') {
+ ent.location.px = ent.location.tx * 16; // TODO: should be based on tilesize
+ ent.location.py = ent.location.ty * 16; // TODO: should be based on tilesize
}
- }
- );
- };
- $template.find('#entity_filename').click(entityFilenameClickFn);
-
- const $entFace = $template.find('#entity_facing');
- const faceKeyset = ['Up', 'Down', 'Left', 'Right'];
-
- // repopulate facing select
- $entFace.empty();
- $.each(faceKeyset, (key, value) => {
- $entFace.append(
- $('')
- .attr('value', value)
- .text(value)
- );
- });
-
- if (ent) {
- console.log(`Editing: ${ ent.name}`);
-
- $template.find('#entity_name').val(ent.name);
- $template.find('#entity_uuid').val(ent.uuid);
- $template.find('#entity_filename').val(ent.filename);
-
- $template.find('#entity_activation_script').val(ent.activation_script);
- $template.find('#entity_speed').val(ent.speed);
-
- $template.find('#entity_location_tx').val(ent.location.tx);
- $template.find('#entity_location_ty').val(ent.location.ty);
-
- if (typeof ent.location.px === 'undefined') {
- ent.location.px = ent.location.tx * 16; // TODO: should be based on tilesize
- ent.location.py = ent.location.ty * 16; // TODO: should be based on tilesize
- }
- $template.find('#entity_location_px').val(ent.location.px);
- $template.find('#entity_location_py').val(ent.location.py);
+ $template.find('#entity_location_px').val(ent.location.px);
+ $template.find('#entity_location_py').val(ent.location.py);
+
+ // http://regex.info/blog/2006-09-15/247
+ $template.find('#entity_wander').val(
+ JSON.stringify(ent.wander)
+ .replace(/{/g, '{\n')
+ .replace(/}/g, '\n}')
+ .replace(/,/g, ',\n')
+ .replace(/":/g, '": ')
+ .replace(/^"/gm, '\t"')
+ );
- // http://regex.info/blog/2006-09-15/247
- $template.find('#entity_wander').val(JSON.stringify(ent.wander).replace(/{/g, '{\n').replace(/}/g, '\n}')
- .replace(/,/g, ',\n').replace(/":/g, '": ').replace(/^"/mg, '\t"'));
+ $template
+ .find('#entity_pays_attention_to_obstructions')
+ .prop('checked', ent.pays_attention_to_obstructions);
+ $template.find('#entity_is_an_obstruction').prop('checked', ent.is_an_obstruction);
+ $template.find('#entity_autofaces').prop('checked', ent.autofaces);
- $template.find('#entity_pays_attention_to_obstructions').prop('checked', ent.pays_attention_to_obstructions);
- $template.find('#entity_is_an_obstruction').prop('checked', ent.is_an_obstruction);
- $template.find('#entity_autofaces').prop('checked', ent.autofaces);
+ let entData;
+ if (window.$$$currentMap.entityData[ent.filename]) {
+ entData = window.$$$currentMap.entityData[ent.filename];
+ } else {
+ // TODO: load the new entitydata in!
+ console.warn(`I DO NOT KNOW HOW TO RENDER [${ent.filename}]`);
+ entData = window.$$$currentMap.entityData.__default__;
+ }
- let entData;
- if (window.$$$currentMap.entityData[ent.filename]) {
- entData = window.$$$currentMap.entityData[ent.filename];
- } else {
- // TODO: load the new entitydata in!
- console.warn(`I DO NOT KNOW HOW TO RENDER [${ ent.filename }]`);
- entData = window.$$$currentMap.entityData.__default__;
+ // = window.$$$currentMap.entityData[ent.filename] || window.$$$currentMap.entityData['__default__'];
+ const animationKeyset = Object.keys(entData.animations);
+ set_animation_dropdown($template, animationKeyset, ent.animation);
+
+ // set value.
+ $entFace.val(ent.facing);
+
+ const $entLocLay = $template.find('#entity_location_layer');
+ const locLayKeyset = LayersWidget.get_layernames_by_rstring_order();
+ $entLocLay.empty();
+ $.each(locLayKeyset, (key, value) => {
+ $entLocLay.append(
+ $('')
+ .attr('value', value)
+ .text(value)
+ );
+ });
+
+ $entLocLay.val(ent.location.layer);
}
- // = window.$$$currentMap.entityData[ent.filename] || window.$$$currentMap.entityData['__default__'];
- const animationKeyset = Object.keys(entData.animations);
- set_animation_dropdown($template, animationKeyset, ent.animation);
-
- // set value.
- $entFace.val(ent.facing);
-
- const $entLocLay = $template.find('#entity_location_layer');
- const locLayKeyset = LayersWidget.get_layernames_by_rstring_order();
- $entLocLay.empty();
- $.each(locLayKeyset, (key, value) => {
- $entLocLay.append(
- $('')
- .attr('value', value)
- .text(value)
- );
- });
-
- $entLocLay.val(ent.location.layer);
- }
-
- return $template;
+ return $template;
};
const SIMPLE_MATH_REGEX = /([-+]?[0-9]*\.?[0-9]+[\/\+\-\*])+([-+]?[0-9]*\.?[0-9]+)/;
function is_simple_math(str) {
- return str.match(SIMPLE_MATH_REGEX) !== null;
+ return str.match(SIMPLE_MATH_REGEX) !== null;
}
function do_simple_math(str) {
- if(is_simple_math(str)) {
- return parseInt(eval(str)); // I AM LITERALLY HITLER
- }
+ if (is_simple_math(str)) {
+ return parseInt(eval(str)); // I AM LITERALLY HITLER
+ }
- return null;
+ return null;
}
function _maf(selector) {
- if(is_simple_math($(selector).val())) {
- $(selector).val(do_simple_math($(selector).val()));
- }
+ if (is_simple_math($(selector).val())) {
+ $(selector).val(do_simple_math($(selector).val()));
+ }
}
function do_simple_math_if_present() {
- _maf('#entity_location_px');
- _maf('#entity_location_py');
- _maf('#entity_location_tx');
- _maf('#entity_location_ty');
+ _maf('#entity_location_px');
+ _maf('#entity_location_py');
+ _maf('#entity_location_tx');
+ _maf('#entity_location_ty');
}
function assert_pixel_versus_tile_in_editing() {
+ const loc_tx = parseInt($('#entity_location_tx').val());
+ const loc_ty = parseInt($('#entity_location_ty').val());
- const loc_tx = parseInt($('#entity_location_tx').val());
- const loc_ty = parseInt($('#entity_location_ty').val());
+ const loc_px = parseInt($('#entity_location_px').val());
+ const loc_py = parseInt($('#entity_location_py').val());
- const loc_px = parseInt($('#entity_location_px').val());
- const loc_py = parseInt($('#entity_location_py').val());
+ let pixels_on = false;
+ let tiles_on = false;
- let pixels_on = false;
- let tiles_on = false;
+ const tiles = $('div.tile_coordinates input');
+ const pixels = $('div.pixel_coordinates input');
- const tiles = $('div.tile_coordinates input');
- const pixels = $('div.pixel_coordinates input');
+ tiles.css('background-color', '#AAA');
+ pixels.css('background-color', '#AAA');
- tiles.css('background-color', '#AAA');
- pixels.css('background-color', '#AAA');
-
- if (!loc_px && !loc_py) {
- tiles_on = true;
- } else if (loc_tx * 16 === loc_px && loc_ty * 16 === loc_py) { // TODO: pi
- tiles_on = true;
+ if (!loc_px && !loc_py) {
+ tiles_on = true;
+ } else if (loc_tx * 16 === loc_px && loc_ty * 16 === loc_py) {
+ // TODO: pi
+ tiles_on = true;
} else {
- pixels_on = true;
+ pixels_on = true;
}
- if (tiles_on) {
- tiles.css('background-color', 'white');
- }
+ if (tiles_on) {
+ tiles.css('background-color', 'white');
+ }
- if (pixels_on) {
- pixels.css('background-color', 'white');
- }
+ if (pixels_on) {
+ pixels.css('background-color', 'white');
+ }
}
function new_entity_click(evt) {
- _entity_click(evt);
+ _entity_click(evt);
}
function edit_entity_click(evt, id) {
- _entity_click(evt, id);
+ _entity_click(evt, id);
}
-export const show_edit_entity_dialog = (id) => {
- const evt = { stopPropagation: () => {} };
- _entity_click(evt, id);
-}
+export const show_edit_entity_dialog = id => {
+ const evt = { stopPropagation: () => {} };
+ _entity_click(evt, id);
+};
let dialog;
function _entity_click(evt, id) {
- evt.stopPropagation();
+ evt.stopPropagation();
- const ent = currentEntities[id];
+ const ent = currentEntities[id];
- $(() => {
- const $template = setup_template(ent, id);
+ $(() => {
+ const $template = setup_template(ent, id);
- $('#modal-dialog').html('');
- $('#modal-dialog').append($template);
+ $('#modal-dialog').html('');
+ $('#modal-dialog').append($template);
+
+ $('#modal-dialog').show();
+
+ $('#entity_location_tx').on('change', () => {
+ $('#entity_location_px').val('');
+ $('#entity_location_py').val('');
+ });
+ $('#entity_location_ty').on('change', () => {
+ $('#entity_location_px').val('');
+ $('#entity_location_py').val('');
+ });
+ $('#entity_location_px').on('change', () => {
+ $('#entity_location_tx').val('');
+ $('#entity_location_ty').val('');
+ });
+ $('#entity_location_py').on('change', () => {
+ $('#entity_location_tx').val('');
+ $('#entity_location_ty').val('');
+ });
+
+ assert_pixel_versus_tile_in_editing();
+
+ dialog = $('#modal-dialog').dialog({
+ width: 500,
+ modal: true,
+ title: $('#modal-dialog').attr('title'),
+ buttons: {
+ Save: () => {
+ const _id = $.isNumeric(id) && ent ? id : currentEntities.length;
+
+ update_entity(_id);
+
+ hasDirtyArt = false;
+ },
+ Cancel: function() {
+ if (hasDirtyArt) {
+ // / put it back!
+ window.$$$currentMap.maybeAddEntityTexture(oldData, oldEnt);
+ oldData = null;
+ oldEnt = null;
+ hasDirtyArt = false;
+ }
+
+ dialog.dialog('close');
+ }
+ },
+ close() {
+ $('#modal-dialog').html('');
+ }
+ });
+ });
+}
- $('#modal-dialog').show();
+export const update_entity = ent_id => {
+ const entity_name = $('#entity_name').val();
+ const entity_filename = $('#entity_filename').val(); // TODO: validate existance
+ const entity_uuid = $('#entity_uuid').val();
+ const entity_activation_script = $('#entity_activation_script').val();
+ const entity_speed = parseInt($('#entity_speed').val());
- $('#entity_location_tx').on('change', () => {
- $('#entity_location_px').val('');
- $('#entity_location_py').val('');
- });
- $('#entity_location_ty').on('change', () => {
- $('#entity_location_px').val('');
- $('#entity_location_py').val('');
- });
- $('#entity_location_px').on('change', () => {
- $('#entity_location_tx').val('');
- $('#entity_location_ty').val('');
- });
- $('#entity_location_py').on('change', () => {
- $('#entity_location_tx').val('');
- $('#entity_location_ty').val('');
- });
+ const entity_pays_attention_to_obstructions = $('#entity_pays_attention_to_obstructions').is(
+ ':checked'
+ );
+ const entity_is_an_obstruction = $('#entity_is_an_obstruction').is(':checked');
+ const entity_autofaces = $('#entity_autofaces').is(':checked');
- assert_pixel_versus_tile_in_editing();
+ let entity_wander;
- dialog = $('#modal-dialog').dialog({
- width: 500,
- modal: true,
- title: $('#modal-dialog').attr('title'),
- buttons: {
- Save: () => {
- const _id = ($.isNumeric(id) && ent) ? id : currentEntities.length;
+ if (ent_id < currentEntities.length) {
+ entity_wander = currentEntities[ent_id].wander;
+ } else {
+ // add
+ entity_wander = { mode: 'Scripted', delay: 0, initial_movestring: '' };
+ }
- update_entity(_id);
+ const entity_animation = $('#entity_animation').val();
+ const entity_facing = $('#entity_facing').val();
- hasDirtyArt = false;
- },
- 'Cancel': function () {
+ do_simple_math_if_present();
- if( hasDirtyArt ) {
- // / put it back!
- window.$$$currentMap.maybeAddEntityTexture(oldData, oldEnt);
- oldData = null;
- oldEnt = null;
- hasDirtyArt = false;
- }
+ let loc_tx = parseInt($('#entity_location_tx').val());
+ let loc_ty = parseInt($('#entity_location_ty').val());
- dialog.dialog('close');
- }
- },
- close () {
- $('#modal-dialog').html('');
- }
- });
- });
-}
+ let loc_px = parseInt($('#entity_location_px').val());
+ let loc_py = parseInt($('#entity_location_py').val());
+
+ console.log('loc_tx, loc_ty, loc_px, loc_py:');
+ console.log(loc_tx, loc_ty, loc_px, loc_py);
+
+ const loc_l = $('#entity_location_layer').val();
+
+ if (!loc_tx && loc_tx !== 0) {
+ loc_tx = null;
+ }
+
+ if (!loc_ty && loc_ty !== 0) {
+ loc_ty = null;
+ }
+
+ if (!loc_px && loc_px !== 0) {
+ loc_px = null;
+ }
+
+ if (!loc_py && loc_py !== 0) {
+ loc_py = null;
+ }
+
+ const vals = {
+ loc_tx,
+ loc_ty,
+ loc_px,
+ loc_py,
+ loc_l,
+ entity_animation,
+ entity_facing,
+ entity_wander,
+ entity_name,
+ entity_uuid,
+ entity_filename,
+ entity_activation_script,
+ entity_speed,
+ entity_pays_attention_to_obstructions,
+ entity_is_an_obstruction,
+ entity_autofaces
+ };
-export const update_entity = (ent_id) => {
- const entity_name = $('#entity_name').val();
- const entity_filename = $('#entity_filename').val(); // TODO: validate existance
- const entity_uuid = $('#entity_uuid').val();
- const entity_activation_script = $('#entity_activation_script').val();
- const entity_speed = parseInt($('#entity_speed').val());
-
- const entity_pays_attention_to_obstructions = $('#entity_pays_attention_to_obstructions').is(':checked');
- const entity_is_an_obstruction = $('#entity_is_an_obstruction').is(':checked');
- const entity_autofaces = $('#entity_autofaces').is(':checked');
-
- let entity_wander;
-
- if (ent_id < currentEntities.length) {
- entity_wander = currentEntities[ent_id].wander;
- } else { // add
- entity_wander = {mode: 'Scripted', delay: 0, initial_movestring: ''};
- }
-
- const entity_animation = $('#entity_animation').val();
- const entity_facing = $('#entity_facing').val();
-
- do_simple_math_if_present();
-
- let loc_tx = parseInt($('#entity_location_tx').val());
- let loc_ty = parseInt($('#entity_location_ty').val());
-
- let loc_px = parseInt($('#entity_location_px').val());
- let loc_py = parseInt($('#entity_location_py').val());
-
- console.log('loc_tx, loc_ty, loc_px, loc_py:');
- console.log(loc_tx, loc_ty, loc_px, loc_py);
-
- const loc_l = $('#entity_location_layer').val();
-
- if(!loc_tx && loc_tx !== 0) {
- loc_tx = null;
- }
-
- if(!loc_ty && loc_ty !== 0) {
- loc_ty = null;
- }
-
- if(!loc_px && loc_px !== 0) {
- loc_px = null;
- }
-
- if(!loc_py && loc_py !== 0) {
- loc_py = null;
- }
-
- const vals = {
- loc_tx,
- loc_ty,
- loc_px,
- loc_py,
- loc_l,
- entity_animation,
- entity_facing,
- entity_wander,
- entity_name,
- entity_uuid,
- entity_filename,
- entity_activation_script,
- entity_speed,
- entity_pays_attention_to_obstructions,
- entity_is_an_obstruction,
- entity_autofaces
- };
-
- if (_update_entity_inner(ent_id, vals)) {
- dialog.dialog('close');
- selectEntityByIndex(ent_id);
- scrollEntityPalletteToEntity(ent_id);
- }
+ if (_update_entity_inner(ent_id, vals)) {
+ dialog.dialog('close');
+ selectEntityByIndex(ent_id);
+ scrollEntityPalletteToEntity(ent_id);
+ }
};
export const update_entity_location = (ent_id, valDict) => {
- if (!$.isNumeric(ent_id) || ent_id < 0) {
- modal_error(`Invalid input: ent_id (${ ent_id }) is invalid.`);
- return false;
- }
+ if (!$.isNumeric(ent_id) || ent_id < 0) {
+ modal_error(`Invalid input: ent_id (${ent_id}) is invalid.`);
+ return false;
+ }
- window.$$$currentMap.UndoRedo.change_one_entity_location(
- ent_id, valDict
- );
+ window.$$$currentMap.UndoRedo.change_one_entity_location(ent_id, valDict);
- do_the_no_things(null, redraw_palette);
+ do_the_no_things(null, redraw_palette);
};
-const get_entity_data = (chr_filepath) => {
- const fullpath = jetpack.path(window.$$$currentMap.dataPath, window.$$$currentMap.mapedConfigData.path_to_chrs, chr_filepath);
- console.log( `fullpath to entity for animation verificaiton: ${ fullpath}` );
+const get_entity_data = chr_filepath => {
+ const fullpath = jetpack.path(
+ window.$$$currentMap.dataPath,
+ window.$$$currentMap.mapedConfigData.path_to_chrs,
+ chr_filepath
+ );
+ console.log(`fullpath to entity for animation verificaiton: ${fullpath}`);
- const data = jetpack.read(fullpath, 'json');
+ const data = jetpack.read(fullpath, 'json');
- return data;
-}
+ return data;
+};
-const get_animations_by_filepath = (chr_filepath) => {
- const data = get_entity_data(chr_filepath);
+const get_animations_by_filepath = chr_filepath => {
+ const data = get_entity_data(chr_filepath);
- if(!data) {
- console.error(`Invalid entity filepath: ${ fullpath}`);
- return [];
- }
+ if (!data) {
+ console.error(`Invalid entity filepath: ${fullpath}`);
+ return [];
+ }
- if( !data.animations ) {
- console.error(`Entity has no animations: ${ fullpath}`);
- return [];
- }
+ if (!data.animations) {
+ console.error(`Entity has no animations: ${fullpath}`);
+ return [];
+ }
- return data.animations;
+ return data.animations;
};
const is_valid_animation = (chr_filepath, animation_name) => {
- const animations = get_animations_by_filepath(chr_filepath);
+ const animations = get_animations_by_filepath(chr_filepath);
- console.info(`data.animations[${animation_name}]: ${ animations[animation_name]}`);
- return !!animations[animation_name];
+ console.info(`data.animations[${animation_name}]: ${animations[animation_name]}`);
+ return !!animations[animation_name];
};
-const _loc_helper = (valDict) => {
-
- const loc = {};
+const _loc_helper = valDict => {
+ const loc = {};
- if( valDict.loc_l ) {
- loc.layer = valDict.loc_l;
- }
+ if (valDict.loc_l) {
+ loc.layer = valDict.loc_l;
+ }
- loc.tx = valDict.loc_tx;
- loc.ty = valDict.loc_ty;
- loc.px = valDict.loc_px;
- loc.py = valDict.loc_py;
+ loc.tx = valDict.loc_tx;
+ loc.ty = valDict.loc_ty;
+ loc.px = valDict.loc_px;
+ loc.py = valDict.loc_py;
- if( typeof loc.tx !== 'number' && typeof loc.px !== 'number') {
- loc.tx = 0;
- loc.px = 0;
- }
+ if (typeof loc.tx !== 'number' && typeof loc.px !== 'number') {
+ loc.tx = 0;
+ loc.px = 0;
+ }
- if( typeof loc.ty !== 'number' && typeof loc.py !== 'number') {
- loc.ty = 0;
- loc.tx = 0;
- }
+ if (typeof loc.ty !== 'number' && typeof loc.py !== 'number') {
+ loc.ty = 0;
+ loc.tx = 0;
+ }
- return loc;
+ return loc;
};
export const _update_entity_inner = (ent_id, valDict) => {
- const loc = _loc_helper(valDict);
+ const loc = _loc_helper(valDict);
- let ent = null;
+ let ent = null;
- if (!$.isNumeric(ent_id) || ent_id < 0) {
- modal_error(`Invalid input: ent_id (${ ent_id }) is invalid.`);
- return false;
- }
+ if (!$.isNumeric(ent_id) || ent_id < 0) {
+ modal_error(`Invalid input: ent_id (${ent_id}) is invalid.`);
+ return false;
+ }
- if (!$.isNumeric(valDict.entity_speed)) {
- modal_error(`Invalid input: speed not numeric (${ valDict.entity_speed }).`);
- return false;
- }
-
- if (!valDict.entity_facing) {
- valDict.entity_facing = 'Down';
- }
-
- // if old_value_dict's null, we should undo to deleting ent_id.
- let old_value_dict = null;
-
- // if old_value_dict's not null, we should restore ent_id's old state.
- if( currentEntities[ent_id] ) {
- // these two dicts should be kept in sync for undo/redo. Any abstraction patterns that could aid this?
- old_value_dict = {
- 'name': valDict.entity_name,
- 'uuid': valDict.entity_uuid,
- 'filename': valDict.entity_filename,
- 'facing': valDict.entity_facing,
- 'pays_attention_to_obstructions': valDict.entity_pays_attention_to_obstructions,
- 'is_an_obstruction': valDict.entity_is_an_obstruction,
- 'autofaces': valDict.entity_autofaces,
- 'speed': valDict.entity_speed,
- 'wander': valDict.entity_wander,
- 'activation_script': valDict.entity_activation_script,
- 'animation': valDict.entity_animation,
-
- 'location': loc
- };
- }
-
- ent = {
- 'name': valDict.entity_name,
- 'uuid': valDict.entity_uuid,
- 'filename': valDict.entity_filename,
- 'facing': valDict.entity_facing,
- 'pays_attention_to_obstructions': valDict.entity_pays_attention_to_obstructions,
- 'is_an_obstruction': valDict.entity_is_an_obstruction,
- 'autofaces': valDict.entity_autofaces,
- 'speed': valDict.entity_speed,
- 'wander': valDict.entity_wander,
- 'activation_script': valDict.entity_activation_script,
- 'animation': valDict.entity_animation,
-
- 'location': loc
- };
-
- let old_layer;
- let new_layer;
-
- if (!currentEntities[ent_id]) {
- currentEntities[ent_id] = {};
- }
-
- if( ent.animation != valDict.entity_animation ) {
- // todo lookahead in the new file to see if the new animation name is valid.
- if( !is_valid_animation(ent.filename, ent.animation) ) {
- alert(`${ent.filename } does not have animation ${ ent.animation}` );
- ent.animation = '';
+ if (!$.isNumeric(valDict.entity_speed)) {
+ modal_error(`Invalid input: speed not numeric (${valDict.entity_speed}).`);
+ return false;
+ }
+
+ if (!valDict.entity_facing) {
+ valDict.entity_facing = 'Down';
}
- }
+ // if old_value_dict's null, we should undo to deleting ent_id.
+ let old_value_dict = null;
+
+ // if old_value_dict's not null, we should restore ent_id's old state.
+ if (currentEntities[ent_id]) {
+ // these two dicts should be kept in sync for undo/redo. Any abstraction patterns that could aid this?
+ old_value_dict = {
+ name: valDict.entity_name,
+ uuid: valDict.entity_uuid,
+ filename: valDict.entity_filename,
+ facing: valDict.entity_facing,
+ pays_attention_to_obstructions: valDict.entity_pays_attention_to_obstructions,
+ is_an_obstruction: valDict.entity_is_an_obstruction,
+ autofaces: valDict.entity_autofaces,
+ speed: valDict.entity_speed,
+ wander: valDict.entity_wander,
+ activation_script: valDict.entity_activation_script,
+ animation: valDict.entity_animation,
+
+ location: loc
+ };
+ }
+
+ ent = {
+ name: valDict.entity_name,
+ uuid: valDict.entity_uuid,
+ filename: valDict.entity_filename,
+ facing: valDict.entity_facing,
+ pays_attention_to_obstructions: valDict.entity_pays_attention_to_obstructions,
+ is_an_obstruction: valDict.entity_is_an_obstruction,
+ autofaces: valDict.entity_autofaces,
+ speed: valDict.entity_speed,
+ wander: valDict.entity_wander,
+ activation_script: valDict.entity_activation_script,
+ animation: valDict.entity_animation,
+
+ location: loc
+ };
+
+ let old_layer;
+ let new_layer;
- let k;
- for (k in ent) {
- if (ent.hasOwnProperty(k)) {
- currentEntities[ent_id][k] = ent[k];
+ if (!currentEntities[ent_id]) {
+ currentEntities[ent_id] = {};
}
- }
- if (currentEntities[ent_id] && currentEntities[ent_id].location) {
- old_layer = currentEntities[ent_id].location.layer;
- } else {
- old_layer = new_layer;
- }
+ if (ent.animation != valDict.entity_animation) {
+ // todo lookahead in the new file to see if the new animation name is valid.
+ if (!is_valid_animation(ent.filename, ent.animation)) {
+ alert(`${ent.filename} does not have animation ${ent.animation}`);
+ ent.animation = '';
+ }
+ }
- if( !ent.uuid ) {
- currentEntities[ent_id].uuid = generate_unique_entity_uuid_for_this_map();
- }
+ let k;
+ for (k in ent) {
+ if (ent.hasOwnProperty(k)) {
+ currentEntities[ent_id][k] = ent[k];
+ }
+ }
+
+ if (currentEntities[ent_id] && currentEntities[ent_id].location) {
+ old_layer = currentEntities[ent_id].location.layer;
+ } else {
+ old_layer = new_layer;
+ }
- if (old_layer && new_layer && old_layer !== new_layer) {
- relocate_entity_for_map_rendering(currentEntities[ent_id].uuid, old_layer, new_layer);
- }
+ if (!ent.uuid) {
+ currentEntities[ent_id].uuid = generate_unique_entity_uuid_for_this_map();
+ }
+ if (old_layer && new_layer && old_layer !== new_layer) {
+ relocate_entity_for_map_rendering(currentEntities[ent_id].uuid, old_layer, new_layer);
+ }
- do_the_no_things(currentEntities[ent_id], redraw_palette); // these args seem dumb
+ do_the_no_things(currentEntities[ent_id], redraw_palette); // these args seem dumb
- if( window.$$$currentMap.mapedConfigData.autoSelectEntityAfterEdit ) {
- addEntityToHighlight(currentEntities[ent_id]);
+ if (window.$$$currentMap.mapedConfigData.autoSelectEntityAfterEdit) {
+ addEntityToHighlight(currentEntities[ent_id]);
- if(currentEntities[ent_id].location.layer === "Entity Layer (E)") {
- selectEntityLayer(false);
+ if (currentEntities[ent_id].location.layer === 'Entity Layer (E)') {
+ selectEntityLayer(false);
+ }
}
- }
- return true;
+ return true;
};
export const _does_uuid_already_exist = (uuid, map) => {
- let curEnts = null;
- if(!map) {
- curEnts = currentEntities;
- } else {
- curEnts = map.mapData.entities;
- }
-
- for (let i = curEnts.length - 1; i >= 0; i--) {
- if( curEnts[i].uuid && curEnts[i].uuid === uuid ) {
- return true;
+ let curEnts = null;
+ if (!map) {
+ curEnts = currentEntities;
+ } else {
+ curEnts = map.mapData.entities;
}
- }
- return false;
-}
+ for (let i = curEnts.length - 1; i >= 0; i--) {
+ if (curEnts[i].uuid && curEnts[i].uuid === uuid) {
+ return true;
+ }
+ }
-export const generate_unique_entity_uuid_for_this_map = (map) => {
- while(true) {
- const uuid = uuidv4();
+ return false;
+};
+
+export const generate_unique_entity_uuid_for_this_map = map => {
+ while (true) {
+ const uuid = uuidv4();
+
+ if (_does_uuid_already_exist(uuid, map)) {
+ continue;
+ }
- if( _does_uuid_already_exist(uuid, map) ) {
- continue;
+ return uuid;
+ }
+};
+
+export const delete_entity = ent_id => {
+ if (ent_id < 0 || ent_id >= currentEntities.length) {
+ console.warn(
+ `Attempted to delete out-of bounds entity: ${ent_id} (out of ${currentEntities.length}). `
+ );
+ return;
}
- return uuid;
- }
+ currentEntities.splice(ent_id, 1);
+ do_the_no_things(null, redraw_palette); // these args seem dumb
};
-export const delete_entity = ( ent_id ) => {
- if( ent_id < 0 || ent_id >= currentEntities.length ) {
- console.warn(`Attempted to delete out-of bounds entity: ${ ent_id } (out of ${currentEntities.length}). `);
- return;
- }
+const clone_entity = ent_index => {
+ const e = currentEntities[ent_index];
+
+ const vals = {
+ entity_name: `Copy of ${e.name}`,
+
+ loc_tx: e.location.tx,
+ loc_ty: e.location.ty,
+ loc_px: e.location.px,
+ loc_py: e.location.py,
+ loc_l: e.location.layer,
+ entity_animation: e.animation,
+ entity_facing: e.facing,
+ entity_wander: e.wander,
+ entity_filename: e.filename,
+ entity_activation_script: e.activation_script,
+ entity_speed: e.speed,
+ entity_pays_attention_to_obstructions: e.pays_attention_to_obstructions,
+ entity_is_an_obstruction: e.is_an_obstruction,
+ entity_autofaces: e.autofaces
+ };
- currentEntities.splice(ent_id, 1);
- do_the_no_things(null, redraw_palette); // these args seem dumb
-}
+ const new_id = currentEntities.length;
-const clone_entity = ( ent_index ) => {
- const e = currentEntities[ent_index];
-
- const vals = {
- entity_name: `Copy of ${e.name}`,
-
- loc_tx: e.location.tx,
- loc_ty: e.location.ty,
- loc_px: e.location.px,
- loc_py: e.location.py,
- loc_l: e.location.layer,
- entity_animation: e.animation,
- entity_facing: e.facing,
- entity_wander: e.wander,
- entity_filename: e.filename,
- entity_activation_script: e.activation_script,
- entity_speed: e.speed,
- entity_pays_attention_to_obstructions: e.pays_attention_to_obstructions,
- entity_is_an_obstruction: e.is_an_obstruction,
- entity_autofaces: e.autofaces
- };
-
- const new_id = currentEntities.length;
-
- _update_entity_inner(new_id, vals)
-
- redraw_palette();
-
- selectEntityByIndex(new_id);
- scrollEntityPalletteToEntity(new_id);
-};
+ _update_entity_inner(new_id, vals);
+ redraw_palette();
+
+ selectEntityByIndex(new_id);
+ scrollEntityPalletteToEntity(new_id);
+};
// TODO: ent_name should be a uuid
// TODO: until then, make sure ent_name is verified unique
const relocate_entity_for_map_rendering = (ent_uuid, old_layer, new_layer) => {
- let myboy = null;
- const ents = window.$$$currentMap.entities;
-
- for (let i = ents[old_layer].length - 1; i >= 0; i--) {
- if(!ents[old_layer][i].uuid) {
- alert("You are trying to move an entity without a UUID. Reload the map, save it, reload it, and try again.\n\nCancelling action.");
- return;
- }
+ let myboy = null;
+ const ents = window.$$$currentMap.entities;
+
+ for (let i = ents[old_layer].length - 1; i >= 0; i--) {
+ if (!ents[old_layer][i].uuid) {
+ alert(
+ 'You are trying to move an entity without a UUID. Reload the map, save it, reload it, and try again.\n\nCancelling action.'
+ );
+ return;
+ }
- if (ents[old_layer][i].uuid === ent_uuid) {
- if (!ents[new_layer]) {
- ents[new_layer] = [];
- }
+ if (ents[old_layer][i].uuid === ent_uuid) {
+ if (!ents[new_layer]) {
+ ents[new_layer] = [];
+ }
- myboy = ents[old_layer].splice(i, 1);
- ents[new_layer].push(myboy[0]); // remember to unbox. :(
+ myboy = ents[old_layer].splice(i, 1);
+ ents[new_layer].push(myboy[0]); // remember to unbox. :(
- return;
+ return;
+ }
}
- }
- window.alert(
- `FAILED TO MOVE entity '${ ent_name }' from layer '${ old_layer
- }' to layer '${ new_layer }'. FOR REASONS.`
- );
+ window.alert(
+ `FAILED TO MOVE entity '${ent_name}' from layer '${old_layer}' to layer '${new_layer}'. FOR REASONS.`
+ );
};
-export const scrollEntityPalletteToEntity = (entToFocus) => {
- const $container = $('.entity-palette .window-container');
- const $rowToScrollTo = $('.entity-row.highlighted');
- const entIdx = $rowToScrollTo.data('index');
- let msg = '';
+export const scrollEntityPalletteToEntity = entToFocus => {
+ const $container = $('.entity-palette .window-container');
+ const $rowToScrollTo = $('.entity-row.highlighted');
+ const entIdx = $rowToScrollTo.data('index');
+ let msg = '';
- if (!entToFocus) {
- entToFocus = 0;
- }
+ if (!entToFocus) {
+ entToFocus = 0;
+ }
- if (entIdx !== entToFocus) {
- msg = `unexpected entity index, expected ${ entToFocus }, got ${ entIdx}`;
- console.log(msg);
- throw msg;
- }
+ if (entIdx !== entToFocus) {
+ msg = `unexpected entity index, expected ${entToFocus}, got ${entIdx}`;
+ console.log(msg);
+ throw msg;
+ }
- const loc = parseInt($rowToScrollTo.offset().top - $container.offset().top);
+ const loc = parseInt($rowToScrollTo.offset().top - $container.offset().top);
- $('.entity-palette .window-container').scrollTop(loc);
+ $('.entity-palette .window-container').scrollTop(loc);
};
const setupEntityBoundsDrawing = () => {
- if(window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_BOUNDS_DRAWING_HEX) {
- $('#all_entity_bounds_color').val(window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_BOUNDS_DRAWING_HEX);
- }
-
- let startColor = $('#all_entity_bounds_color').val() ? $('#all_entity_bounds_color').val() : '#00000000';
-
- saveAllEntityBoundsColor(startColor);
- if(startColor === '#00000000') {
- $("#all_entity_bounds_draw_off").hide();
- } else {
- startColor = startColor.substr(0,7);
- }
-
- const allEntityBoundsColorpicker = $('#all_entity_bounds_draw_picker').spectrum({
- color: startColor,
- showInput: true,
- className: "full-spectrum",
- showInitial: true,
- showSelectionPalette: true,
- maxSelectionSize: 10,
- preferredFormat: "hex",
- change(color) {
- const _color = `${color.toHexString() }ff`;
- $('#all_entity_bounds_color').val(_color)
- allEntityBoundsColorpicker.spectrum("set", color.toHexString());
- if( _color !== '#00000000') {
- $("#all_entity_bounds_draw_off").show();
- }
- saveAllEntityBoundsColor(_color);
+ if (window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_BOUNDS_DRAWING_HEX) {
+ $('#all_entity_bounds_color').val(
+ window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_BOUNDS_DRAWING_HEX
+ );
}
- });
- $("#all_entity_bounds_draw_off").click( () => {
- $("#all_entity_bounds_draw_off").hide();
- allEntityBoundsColorpicker.spectrum("set", "#00000000");
- saveAllEntityBoundsColor("#00000000")
- } );
-}
+ let startColor = $('#all_entity_bounds_color').val()
+ ? $('#all_entity_bounds_color').val()
+ : '#00000000';
+
+ saveAllEntityBoundsColor(startColor);
+ if (startColor === '#00000000') {
+ $('#all_entity_bounds_draw_off').hide();
+ } else {
+ startColor = startColor.substr(0, 7);
+ }
+
+ const allEntityBoundsColorpicker = $('#all_entity_bounds_draw_picker').spectrum({
+ color: startColor,
+ showInput: true,
+ className: 'full-spectrum',
+ showInitial: true,
+ showSelectionPalette: true,
+ maxSelectionSize: 10,
+ preferredFormat: 'hex',
+ change(color) {
+ const _color = `${color.toHexString()}ff`;
+ $('#all_entity_bounds_color').val(_color);
+ allEntityBoundsColorpicker.spectrum('set', color.toHexString());
+ if (_color !== '#00000000') {
+ $('#all_entity_bounds_draw_off').show();
+ }
+ saveAllEntityBoundsColor(_color);
+ }
+ });
-const saveAllEntityBoundsColor = (hex) => {
- window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_BOUNDS_DRAWING_HEX = hex;
- window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_BOUNDS_DRAWING = hexToRgba(hex);
+ $('#all_entity_bounds_draw_off').click(() => {
+ $('#all_entity_bounds_draw_off').hide();
+ allEntityBoundsColorpicker.spectrum('set', '#00000000');
+ saveAllEntityBoundsColor('#00000000');
+ });
+};
+
+const saveAllEntityBoundsColor = hex => {
+ window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_BOUNDS_DRAWING_HEX = hex;
+ window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_BOUNDS_DRAWING = hexToRgba(hex);
};
const setupEntityHitboxDrawing = () => {
- if(window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_HITBOX_BOUNDS_DRAWING_HEX) {
- $('#all_entity_hitbox_bounds_color').val(window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_HITBOX_BOUNDS_DRAWING_HEX);
- }
- let hitboxStartColor = $('#all_entity_hitbox_bounds_color').val() ? $('#all_entity_hitbox_bounds_color').val() : '#00000000';
- saveAllEntityHitboxBoundsColor(hitboxStartColor);
-
- if(hitboxStartColor === '#00000000') {
- $("#all_entity_hitbox_bounds_draw_off").hide();
- } else {
- hitboxStartColor = hitboxStartColor.substr(0,7);
- }
-
- const allEntityHitboxBoundsColorpicker = $('#all_entity_hitbox_bounds_draw_picker').spectrum({
- color: hitboxStartColor,
- showInput: true,
- className: "full-spectrum",
- showInitial: true,
- showSelectionPalette: true,
- maxSelectionSize: 10,
- preferredFormat: "hex",
- change(color) {
- const _color = `${color.toHexString() }ff`;
- $('#all_entity_hitbox_bounds_color').val(_color)
- allEntityHitboxBoundsColorpicker.spectrum("set", color.toHexString());
- if( _color !== '#00000000') {
- $("#all_entity_hitbox_bounds_draw_off").show();
- }
- saveAllEntityHitboxBoundsColor(_color);
+ if (window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_HITBOX_BOUNDS_DRAWING_HEX) {
+ $('#all_entity_hitbox_bounds_color').val(
+ window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_HITBOX_BOUNDS_DRAWING_HEX
+ );
}
- });
+ let hitboxStartColor = $('#all_entity_hitbox_bounds_color').val()
+ ? $('#all_entity_hitbox_bounds_color').val()
+ : '#00000000';
+ saveAllEntityHitboxBoundsColor(hitboxStartColor);
- $("#all_entity_hitbox_bounds_draw_off").click( () => {
- $("#all_entity_hitbox_bounds_draw_off").hide();
- allEntityHitboxBoundsColorpicker.spectrum("set", "#00000000");
- saveAllEntityHitboxBoundsColor("#00000000")
- } );
-}
+ if (hitboxStartColor === '#00000000') {
+ $('#all_entity_hitbox_bounds_draw_off').hide();
+ } else {
+ hitboxStartColor = hitboxStartColor.substr(0, 7);
+ }
+
+ const allEntityHitboxBoundsColorpicker = $('#all_entity_hitbox_bounds_draw_picker').spectrum({
+ color: hitboxStartColor,
+ showInput: true,
+ className: 'full-spectrum',
+ showInitial: true,
+ showSelectionPalette: true,
+ maxSelectionSize: 10,
+ preferredFormat: 'hex',
+ change(color) {
+ const _color = `${color.toHexString()}ff`;
+ $('#all_entity_hitbox_bounds_color').val(_color);
+ allEntityHitboxBoundsColorpicker.spectrum('set', color.toHexString());
+ if (_color !== '#00000000') {
+ $('#all_entity_hitbox_bounds_draw_off').show();
+ }
+ saveAllEntityHitboxBoundsColor(_color);
+ }
+ });
+
+ $('#all_entity_hitbox_bounds_draw_off').click(() => {
+ $('#all_entity_hitbox_bounds_draw_off').hide();
+ allEntityHitboxBoundsColorpicker.spectrum('set', '#00000000');
+ saveAllEntityHitboxBoundsColor('#00000000');
+ });
+};
-const saveAllEntityHitboxBoundsColor = (hex) => {
- window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_HITBOX_BOUNDS_DRAWING_HEX = hex;
- window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_HITBOX_BOUNDS_DRAWING = hexToRgba(hex);
+const saveAllEntityHitboxBoundsColor = hex => {
+ window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_HITBOX_BOUNDS_DRAWING_HEX = hex;
+ window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_HITBOX_BOUNDS_DRAWING = hexToRgba(hex);
};
const setupEntityTallRedrawDrawing = () => {
- if(window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_TALLREDRAW_BOUNDS_DRAWING_HEX) {
- $('#all_entity_tallredraw_bounds_color').val(window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_TALLREDRAW_BOUNDS_DRAWING_HEX);
- }
- let tallRedrawStartColor = $('#all_entity_tallredraw_bounds_color').val() ? $('#all_entity_tallredraw_bounds_color').val() : '#00000000';
- saveAllEntityTallRedrawBoundsColor(tallRedrawStartColor);
-
- if(tallRedrawStartColor === '#00000000') {
- $("#all_entity_tallredraw_bounds_draw_off").hide();
- } else {
- tallRedrawStartColor = tallRedrawStartColor.substr(0,7);
- }
-
- const allEntityTallRedrawBoundsColorpicker = $('#all_entity_tallredraw_bounds_draw_picker').spectrum({
- color: tallRedrawStartColor,
- showInput: true,
- className: "full-spectrum",
- showInitial: true,
- showSelectionPalette: true,
- maxSelectionSize: 10,
- preferredFormat: "hex",
- change(color) {
- const _color = `${color.toHexString() }ff`;
- $('#all_entity_tallredraw_bounds_color').val(_color)
- allEntityTallRedrawBoundsColorpicker.spectrum("set", color.toHexString());
- if( _color !== '#00000000') {
- $("#all_entity_tallredraw_bounds_draw_off").show();
- }
- saveAllEntityTallRedrawBoundsColor(_color);
+ if (window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_TALLREDRAW_BOUNDS_DRAWING_HEX) {
+ $('#all_entity_tallredraw_bounds_color').val(
+ window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_TALLREDRAW_BOUNDS_DRAWING_HEX
+ );
}
- });
+ let tallRedrawStartColor = $('#all_entity_tallredraw_bounds_color').val()
+ ? $('#all_entity_tallredraw_bounds_color').val()
+ : '#00000000';
+ saveAllEntityTallRedrawBoundsColor(tallRedrawStartColor);
- $("#all_entity_tallredraw_bounds_draw_off").click( () => {
- $("#all_entity_tallredraw_bounds_draw_off").hide();
- allEntityTallRedrawBoundsColorpicker.spectrum("set", "#00000000");
- saveAllEntityTallRedrawBoundsColor("#00000000")
- } );
-}
+ if (tallRedrawStartColor === '#00000000') {
+ $('#all_entity_tallredraw_bounds_draw_off').hide();
+ } else {
+ tallRedrawStartColor = tallRedrawStartColor.substr(0, 7);
+ }
+
+ const allEntityTallRedrawBoundsColorpicker = $(
+ '#all_entity_tallredraw_bounds_draw_picker'
+ ).spectrum({
+ color: tallRedrawStartColor,
+ showInput: true,
+ className: 'full-spectrum',
+ showInitial: true,
+ showSelectionPalette: true,
+ maxSelectionSize: 10,
+ preferredFormat: 'hex',
+ change(color) {
+ const _color = `${color.toHexString()}ff`;
+ $('#all_entity_tallredraw_bounds_color').val(_color);
+ allEntityTallRedrawBoundsColorpicker.spectrum('set', color.toHexString());
+ if (_color !== '#00000000') {
+ $('#all_entity_tallredraw_bounds_draw_off').show();
+ }
+ saveAllEntityTallRedrawBoundsColor(_color);
+ }
+ });
+
+ $('#all_entity_tallredraw_bounds_draw_off').click(() => {
+ $('#all_entity_tallredraw_bounds_draw_off').hide();
+ allEntityTallRedrawBoundsColorpicker.spectrum('set', '#00000000');
+ saveAllEntityTallRedrawBoundsColor('#00000000');
+ });
+};
-const saveAllEntityTallRedrawBoundsColor = (hex) => {
- window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_TALLREDRAW_BOUNDS_DRAWING_HEX = hex;
- window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_TALLREDRAW_BOUNDS_DRAWING = hexToRgba(hex);
+const saveAllEntityTallRedrawBoundsColor = hex => {
+ window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_TALLREDRAW_BOUNDS_DRAWING_HEX = hex;
+ window.$$$currentMap.mapData.MAPED_GLOBAL_ENTITY_TALLREDRAW_BOUNDS_DRAWING = hexToRgba(hex);
};
const setupColorStuff = () => {
- setupEntityBoundsDrawing();
- setupEntityHitboxDrawing();
- setupEntityTallRedrawDrawing();
-}
+ setupEntityBoundsDrawing();
+ setupEntityHitboxDrawing();
+ setupEntityTallRedrawDrawing();
+};
export const EntitiesWidget = {
- initEntitiesWidget
+ initEntitiesWidget
};
-
diff --git a/src/main/BaseSetup.js b/src/main/BaseSetup.js
index f742c77..9e80b6d 100644
--- a/src/main/BaseSetup.js
+++ b/src/main/BaseSetup.js
@@ -1,12 +1,27 @@
-import { LOG, INFO } from '../Logging'
+import { LOG, INFO } from '../Logging';
import { TilesetSelectorWidget } from '../js/ui/TilesetSelectorPalette.js';
import { Map, verifyTileData, verifyMap, cleanEntities } from '../Map.js';
import { Palettes } from '../Palettes.js';
-import { LayersWidget, selectNumberedLayer, visibilityFix, getSelectedLayer, MAGICAL_ENT_LAYER_ID, MAGICAL_OBS_LAYER_ID, MAGICAL_ZONE_LAYER_ID } from '../js/ui/LayersPalette.js'; // , selectZoneLayer, selectObstructionLayer, selectNumberedLayer, newLayerOnNewMap
+import {
+ LayersWidget,
+ selectNumberedLayer,
+ visibilityFix,
+ getSelectedLayer,
+ MAGICAL_ENT_LAYER_ID,
+ MAGICAL_OBS_LAYER_ID,
+ MAGICAL_ZONE_LAYER_ID
+} from '../js/ui/LayersPalette.js'; // , selectZoneLayer, selectObstructionLayer, selectNumberedLayer, newLayerOnNewMap
import { ZonesWidget } from '../js/ui/ZonesPalette.js';
import { EntitiesWidget } from '../js/ui/EntityPalette.js';
import { updateMapAndVSPFileInfo } from '../js/ui/InfoPalette.js';
-import { getCurrentHoverTile, initTools, updateRstringInfo, updateLocationFunction, selectAll, updateInfoDims } from '../Tools.js';
+import {
+ getCurrentHoverTile,
+ initTools,
+ updateRstringInfo,
+ updateLocationFunction,
+ selectAll,
+ updateInfoDims
+} from '../Tools.js';
import { cut, copy, paste } from '../js/ui/CutCopyPaste';
import { handleUndo, handleRedo } from '../UndoRedo';
import { setupNotifications, notify } from '../Notification-Pane';
@@ -22,232 +37,238 @@ const path = require('path');
const { dialog } = require('electron').remote;
const fs = require('fs');
-const updateScreenview = (map) => {
- $('#screenview-indicator-switch').prop('checked', map.windowOverlay.on);
- $('#screenview-indicator-x').val(map.windowOverlay.viewport.x);
- $('#screenview-indicator-y').val(map.windowOverlay.viewport.y);
- $('#screenview-indicator-width').val(map.windowOverlay.viewport.width);
- $('#screenview-indicator-height').val(map.windowOverlay.viewport.height);
-}
+const updateScreenview = map => {
+ $('#screenview-indicator-switch').prop('checked', map.windowOverlay.on);
+ $('#screenview-indicator-x').val(map.windowOverlay.viewport.x);
+ $('#screenview-indicator-y').val(map.windowOverlay.viewport.y);
+ $('#screenview-indicator-width').val(map.windowOverlay.viewport.width);
+ $('#screenview-indicator-height').val(map.windowOverlay.viewport.height);
+};
// / TODO: why have both $$$_BREDITOR_MOST_RECENT.json and $$$_MAPED.json... 🤔
// / I guess one should be in the appdir to at least point to the project directory...
const loadMostRecentFileOption = () => {
- // / TODO: is there a reason for requiring these in-block like this, or is it just cargo cult copypasta?
- const jp = jetpack.cwd(APPDATA_DIR);
-
- const appConfigData = jp.read(BREADPATH.getMostRecentFilesJSONPath(), 'json');
- window.$$$_most_recent_options = appConfigData;
+ // / TODO: is there a reason for requiring these in-block like this, or is it just cargo cult copypasta?
+ const jp = jetpack.cwd(APPDATA_DIR);
- return appConfigData;
-}
+ const appConfigData = jp.read(BREADPATH.getMostRecentFilesJSONPath(), 'json');
+ window.$$$_most_recent_options = appConfigData;
-const initScreen = (map) => {
+ return appConfigData;
+};
- updateScreenview(map);
+const initScreen = map => {
+ updateScreenview(map);
- $('#screenview-indicator-switch').click( () => {
- map.windowOverlay.on = $('#screenview-indicator-switch').prop('checked');
- } );
+ $('#screenview-indicator-switch').click(() => {
+ map.windowOverlay.on = $('#screenview-indicator-switch').prop('checked');
+ });
- $('#screenview-indicator-x').on('change', (ev) => map.windowOverlay.viewport.x = parseInt($(ev.target).val(), 10));
- $('#screenview-indicator-y').on('change', (ev) => map.windowOverlay.viewport.y = parseInt($(ev.target).val(), 10));
- $('#screenview-indicator-width').on('change', (ev) => map.windowOverlay.viewport.width = parseInt($(ev.target).val(), 10));
- $('#screenview-indicator-height').on('change', (ev) => map.windowOverlay.viewport.height = parseInt($(ev.target).val(), 10));
-}
+ $('#screenview-indicator-x').on(
+ 'change',
+ ev => (map.windowOverlay.viewport.x = parseInt($(ev.target).val(), 10))
+ );
+ $('#screenview-indicator-y').on(
+ 'change',
+ ev => (map.windowOverlay.viewport.y = parseInt($(ev.target).val(), 10))
+ );
+ $('#screenview-indicator-width').on(
+ 'change',
+ ev => (map.windowOverlay.viewport.width = parseInt($(ev.target).val(), 10))
+ );
+ $('#screenview-indicator-height').on(
+ 'change',
+ ev => (map.windowOverlay.viewport.height = parseInt($(ev.target).val(), 10))
+ );
+};
-const initInfoWidget = (map) => {
- updateMapAndVSPFileInfo(map);
+const initInfoWidget = map => {
+ updateMapAndVSPFileInfo(map);
};
function killAllElementListeners($elem) {
- // first argument of function: "$._data ()" is: "Element" - not jQuery object
- $.each( $._data( $elem, "events" ), function(name) {
- LOG(`body had listener: ${ name}`);
- $elem.off( name ); // function off() removes an event handler
- } );
+ // first argument of function: "$._data ()" is: "Element" - not jQuery object
+ $.each($._data($elem, 'events'), function(name) {
+ LOG(`body had listener: ${name}`);
+ $elem.off(name); // function off() removes an event handler
+ });
}
function killAllDocumentListeners(doc) {
- // first argument of function: "$._data ()" is: "Element" - not jQuery object
- $.each( $._data( $elem, "events" ), function(name) {
- LOG(`body had listener: ${ name}`);
- $elem.off( name ); // function off() removes an event handler
- } );
+ // first argument of function: "$._data ()" is: "Element" - not jQuery object
+ $.each($._data($elem, 'events'), function(name) {
+ LOG(`body had listener: ${name}`);
+ $elem.off(name); // function off() removes an event handler
+ });
}
-
function setupShiftKeyPressed() {
- // TODO this are evil.
- window.isShiftKeyPressed = false;
- $(document).on('keyup keydown', function(e){
- window.isShiftKeyPressed = e.shiftKey;
- });
+ // TODO this are evil.
+ window.isShiftKeyPressed = false;
+ $(document).on('keyup keydown', function(e) {
+ window.isShiftKeyPressed = e.shiftKey;
+ });
}
let __setupChording_once = false;
// TODO: verify all this cannot be done with accelerators
function setupChording() {
- if(__setupChording_once) {
- return;
- }
+ if (__setupChording_once) {
+ return;
+ }
- // this is dumb.
- __setupChording_once = true;
+ // this is dumb.
+ __setupChording_once = true;
- $('body').on('keydown', (e) => {
- if (!(e.ctrlKey || e.cmdKey)) { // TODO verify this on mac, cmdKey is a guess.
- return;
- }
+ $('body').on('keydown', e => {
+ if (!(e.ctrlKey || e.cmdKey)) {
+ // TODO verify this on mac, cmdKey is a guess.
+ return;
+ }
- if (document.activeElement.type && document.activeElement.type === 'text') {
- INFO('in a textfield, ignoring the accelerator');
- return;
- }
+ if (document.activeElement.type && document.activeElement.type === 'text') {
+ INFO('in a textfield, ignoring the accelerator');
+ return;
+ }
- // if(e.key === 'c' && ) {
- // INFO('on the tools palette, ignoring the spacebar');
- // return;
- // }
-
- // TODO all of these commands should probably be passed in the map on the currently active map palette
- // (if there is one) so as to include the tileset map or any future ones
- if (e.key === 'c' || e.key === 'C') {
- LOG('edit-copy, but the one on the document. SIGH WINDOWS.');
-
- if (window.$$$currentMap.selection.tiles && window.$$$currentMap.selection.tiles.length) {
- copy(window.$$$currentMap);
- } else if (
- window.$$$currentTilsesetSelectorMap &&
- window.$$$currentTilsesetSelectorMap.selection.tiles &&
- window.$$$currentTilsesetSelectorMap.selection.tiles.length
- ) {
- copy(window.$$$currentTilsesetSelectorMap);
- } else {
- LOG('FALL THROUGH');
- }
-
- return;
- }
+ // if(e.key === 'c' && ) {
+ // INFO('on the tools palette, ignoring the spacebar');
+ // return;
+ // }
+
+ // TODO all of these commands should probably be passed in the map on the currently active map palette
+ // (if there is one) so as to include the tileset map or any future ones
+ if (e.key === 'c' || e.key === 'C') {
+ LOG('edit-copy, but the one on the document. SIGH WINDOWS.');
+
+ if (
+ window.$$$currentMap.selection.tiles &&
+ window.$$$currentMap.selection.tiles.length
+ ) {
+ copy(window.$$$currentMap);
+ } else if (
+ window.$$$currentTilsesetSelectorMap &&
+ window.$$$currentTilsesetSelectorMap.selection.tiles &&
+ window.$$$currentTilsesetSelectorMap.selection.tiles.length
+ ) {
+ copy(window.$$$currentTilsesetSelectorMap);
+ } else {
+ LOG('FALL THROUGH');
+ }
- if ((e.key === 'v' || e.key === 'V')) {
- if( e.shiftKey ) {
- LOG('super-paste, but the one on the document. SIGH WINDOWS.');
- window.$$$superpaste();
- return;
- }
- LOG('edit-paste, but the one on the document. SIGH WINDOWS.');
- paste(window.$$$currentMap);
- return;
-
- }
+ return;
+ }
- if ((e.key === 'x' || e.key === 'X')) {
- if(e.shiftKey) {
- LOG('super-cut, but the one on the document. SIGH WINDOWS.');
- window.$$$supercut();
- return;
- }
- LOG('edit-cut, but the one on the document. SIGH WINDOWS.');
- cut(window.$$$currentMap);
- return;
-
- }
+ if (e.key === 'v' || e.key === 'V') {
+ if (e.shiftKey) {
+ LOG('super-paste, but the one on the document. SIGH WINDOWS.');
+ window.$$$superpaste();
+ return;
+ }
+ LOG('edit-paste, but the one on the document. SIGH WINDOWS.');
+ paste(window.$$$currentMap);
+ return;
+ }
- if (e.key === 'a' || e.key === 'A') {
- LOG('edit-select-all but the one on the document. SIGH WINDOWS.');
- selectAll(window.$$$currentMap);
-
- }
- });
+ if (e.key === 'x' || e.key === 'X') {
+ if (e.shiftKey) {
+ LOG('super-cut, but the one on the document. SIGH WINDOWS.');
+ window.$$$supercut();
+ return;
+ }
+ LOG('edit-cut, but the one on the document. SIGH WINDOWS.');
+ cut(window.$$$currentMap);
+ return;
+ }
+
+ if (e.key === 'a' || e.key === 'A') {
+ LOG('edit-select-all but the one on the document. SIGH WINDOWS.');
+ selectAll(window.$$$currentMap);
+ }
+ });
}
// TODO: jesus pull this apart and clean it up.
-const tick = function (timestamp) {
- if (window.$$$currentMap && window.$$$currentMap.render) {
- window.$$$currentMap.render();
- TilesetSelectorWidget.renderTilesetSelectorWidget();
- }
+const tick = function(timestamp) {
+ if (window.$$$currentMap && window.$$$currentMap.render) {
+ window.$$$currentMap.render();
+ TilesetSelectorWidget.renderTilesetSelectorWidget();
+ }
- if (window.$$$SCREENSHOT) {
- window.$$$SCREENSHOT();
- window.$$$SCREENSHOT = null;
- }
+ if (window.$$$SCREENSHOT) {
+ window.$$$SCREENSHOT();
+ window.$$$SCREENSHOT = null;
+ }
- window.requestAnimationFrame(tick);
+ window.requestAnimationFrame(tick);
};
-
-
/**
* Setup the rest of the app ;D
*/
function setupTheRestOfTheApp() {
- Palettes.setupPaletteRegistry();
+ Palettes.setupPaletteRegistry();
+
+ if (window.$$$currentMap) {
+ window.$$$currentMap.selfDestruct();
+ }
+ window.$$$currentMap = null;
- if(window.$$$currentMap) {
- window.$$$currentMap.selfDestruct();
- }
- window.$$$currentMap = null;
+ if (!window.$$$RAF_INIT) {
+ window.$$$RAF_INIT = true;
+ window.requestAnimationFrame(tick);
+ }
- if(!window.$$$RAF_INIT) {
- window.$$$RAF_INIT = true;
- window.requestAnimationFrame(tick);
- }
-
- $('#btn-tool-undo').click(() => {
- handleUndo();
- });
- $('#btn-tool-redo').click(() => {
- handleRedo();
- });
+ $('#btn-tool-undo').click(() => {
+ handleUndo();
+ });
+ $('#btn-tool-redo').click(() => {
+ handleRedo();
+ });
}
export function autoloadMostRecentMapIfAvailable() {
- const fs = require('fs');
+ const fs = require('fs');
- const opts = loadMostRecentFileOption();
+ const opts = loadMostRecentFileOption();
- if(opts && opts.abs_path_to_maps && opts.most_recent_map) {
- const filepath = path.join(opts.abs_path_to_maps, opts.most_recent_map);
+ if (opts && opts.abs_path_to_maps && opts.most_recent_map) {
+ const filepath = path.join(opts.abs_path_to_maps, opts.most_recent_map);
- if( fs.existsSync(filepath) ) {
- INFO(`${filepath} specified to autoload...`);
- loadByFilename(filepath);
+ if (fs.existsSync(filepath)) {
+ INFO(`${filepath} specified to autoload...`);
+ loadByFilename(filepath);
+ } else {
+ INFO(`${filepath} specified to autoload... but it wasn't there.`);
+ }
} else {
- INFO(`${filepath} specified to autoload... but it wasn't there.`);
+ INFO('No map specified to autoload.');
}
-
- } else {
- INFO('No map specified to autoload.');
- }
}
/**
-* Necesary to setup a freshly loaded map.
-*/
+ * Necesary to setup a freshly loaded map.
+ */
export function setupFreshApp() {
+ killAllElementListeners($('#body'));
+ // killAllDocumentListeners(document);
- killAllElementListeners($( "#body" ));
- // killAllDocumentListeners(document);
+ setupShiftKeyPressed();
- setupShiftKeyPressed();
+ setupChording();
- setupChording();
+ setupTheRestOfTheApp();
- setupTheRestOfTheApp();
+ setupNotifications();
- setupNotifications();
-
- loadPlugins();
+ loadPlugins();
}
export function setupWindowFunctions() {
-
- const newMapDialog = () => {
- const $template = `
+ const newMapDialog = () => {
+ const $template = `
Height
@@ -255,71 +276,76 @@ export function setupWindowFunctions() {
@@ -331,99 +357,104 @@ export function setupWindowFunctions() {
@@ -475,175 +505,177 @@ export function setupWindowFunctions() {
Tileset Definition File:
(Note: currently only png is supported.)
(Note: currently only png is supported.)
@@ -659,113 +691,116 @@ export function setupWindowFunctions() {
Obstruction Tileset Definition File:
Breaditor presently only supports tile-based obstructions based on 1-bit pngs.
+We will be working on adding vector-based obstructions in the future.
`, { - title: 'Save new obstruction definition file', - filters: [{ name: 'text', extensions: ['.vsp.json'] }] - }, - (filename) => { - shittyMutex2 = false; - if( filename ) { - $("#obs-def-name").val(filename); - } + 'Choose Existing Obstruction Tileset': () => { + _chooseExistingDefaultObsVSP(); + }, + 'Create New Obstruction Tileset': () => { + newObsTilesetDialog(); + } } - )}); + ); + }; - } - ); - }; + window._newStep2_chooseObsVSP = function(res) { + newMapDialog(); + }; - const obsModeDialog = () => { + const _chooseExistingDefaultObsVSP = function(res) { + dialog.showOpenDialog( + { + title: 'Choose Obstruction VSP', + filters: [{ name: 'text', extensions: ['obsvsp.json'] }] + }, + res => { + if (res) { + window.newMapData.obs_vspfile = res[0]; + newMapDialog(); + } + } + ); + }; - dialoger( - 'Step 3: Default Obstruction Tileset Options', - `Breaditor presently only supports tile-based obstructions based on 1-bit pngs.
-We will be working on adding vector-based obstructions in the future.
`, - { - 'Choose Existing Obstruction Tileset': () => { - _chooseExistingDefaultObsVSP(); - }, - 'Create New Obstruction Tileset': () => { - newObsTilesetDialog(); - }, - } - ); - }; - - window._newStep2_chooseObsVSP = function (res) { - newMapDialog(); - }; - - const _chooseExistingDefaultObsVSP = function (res) { - dialog.showOpenDialog({ - title: 'Choose Obstruction VSP', - filters: [{ name: 'text', extensions: ['obsvsp.json'] }] - }, - (res) => { - if(res) { - window.newMapData.obs_vspfile = res[0]; - newMapDialog(); - } - } - ); - }; + window._newStep0_chooseSaveLocation = () => { + dialog.showSaveDialog( + { filters: [{ name: 'text', extensions: ['map.json'] }] }, + filename => { + if (filename) { + const jp = jetpack.cwd(APPDATA_DIR); - window._newStep0_chooseSaveLocation = () => { - dialog.showSaveDialog( - {filters: [{ name: 'text', extensions: ['map.json'] }]}, - (filename) => { - if (filename) { - const jp = jetpack.cwd(APPDATA_DIR); - - const warning = !jp.exists(filename) ? "" : `Warning, there is already a map of that name there, and we will overwrite it if you finish this New Map wizard.
`; + const warning = !jp.exists(filename) + ? '' + : `Warning, there is already a map of that name there, and we will overwrite it if you finish this New Map wizard.
`; - dialoger( - "Step 1: Verify Save Location", + dialoger( + 'Step 1: Verify Save Location', - `You want to create a new map file at
+ `You want to create a new map file at
${filename}
@@ -773,179 +808,184 @@ export function setupWindowFunctions() { Is that correct? ${warning} - `, - { - 'Yes': () => { - window.newMapFilename = filename; - vspModeDialog(); - } - }); - } - } - ); - }; + `, + { + Yes: () => { + window.newMapFilename = filename; + vspModeDialog(); + } + } + ); + } + } + ); + }; - window.$$$new = () => { - window.newMapFilename = ''; - window.newMapData = {}; + window.$$$new = () => { + window.newMapFilename = ''; + window.newMapData = {}; - window._newStep0_chooseSaveLocation(); - }; + window._newStep0_chooseSaveLocation(); + }; - window.$$$save = function (newName, isSaveAs, reloadAfterSave) { - if(window.$$$currentMap.compactifyZones) { - window.$$$currentMap.compactifyZones(); - } - window._save(newName, window.$$$currentMap, isSaveAs || reloadAfterSave); - }; + window.$$$save = function(newName, isSaveAs, reloadAfterSave) { + if (window.$$$currentMap.compactifyZones) { + window.$$$currentMap.compactifyZones(); + } + window._save(newName, window.$$$currentMap, isSaveAs || reloadAfterSave); + }; - window._save = function (newName, map, reloadAfterSave) { - const jp = jetpack.cwd(APPDATA_DIR); + window._save = function(newName, map, reloadAfterSave) { + const jp = jetpack.cwd(APPDATA_DIR); - let mapfile = null; - let datafile = null; - if (typeof newName !== 'undefined') { - mapfile = newName; - datafile = mapfile.replace('.map.json', '.map.data.json'); // todo this is shit. - } else { - mapfile = map.filenames.mapfile; - datafile = map.filenames.mapdatafile; - } + let mapfile = null; + let datafile = null; + if (typeof newName !== 'undefined') { + mapfile = newName; + datafile = mapfile.replace('.map.json', '.map.data.json'); // todo this is shit. + } else { + mapfile = map.filenames.mapfile; + datafile = map.filenames.mapdatafile; + } - const mapData = JSON.parse(JSON.stringify(map.mapData)); - const tileData = JSON.parse(JSON.stringify(map.mapRawTileData)); + const mapData = JSON.parse(JSON.stringify(map.mapData)); + const tileData = JSON.parse(JSON.stringify(map.mapRawTileData)); - cleanEntities(mapData); // TODO this should probably happen not-here? + cleanEntities(mapData); // TODO this should probably happen not-here? - INFO('saving', mapfile); - INFO('saving', datafile); + INFO('saving', mapfile); + INFO('saving', datafile); - jp.write(mapfile, mapData); - jp.write(datafile, tileData); + jp.write(mapfile, mapData); + jp.write(datafile, tileData); - saveMostRecentMapLocation(mapfile); + saveMostRecentMapLocation(mapfile); - notify("Saved map."); + notify('Saved map.'); - if(reloadAfterSave) { - INFO("Reloading map after saveas..."); - window.$$$show_all_windows(); - $('#modal-dialog').dialog( "close" ); + if (reloadAfterSave) { + INFO('Reloading map after saveas...'); + window.$$$show_all_windows(); + $('#modal-dialog').dialog('close'); - const doAfterNewMapCreate = () => { - selectNumberedLayer(1); - visibilityFix(); - window.$$$currentMap.resetCamera(); + const doAfterNewMapCreate = () => { + selectNumberedLayer(1); + visibilityFix(); + window.$$$currentMap.resetCamera(); - window.$$$showPallete('tileset-selector'); - window.$$$showPallete('map'); - window.$$$showPallete('tool'); - window.$$$showPallete('info'); - window.$$$showPallete('layers'); + window.$$$showPallete('tileset-selector'); + window.$$$showPallete('map'); + window.$$$showPallete('tool'); + window.$$$showPallete('info'); + window.$$$showPallete('layers'); - window.$$$hidePallete('zones'); - window.$$$hidePallete('entity'); - window.$$$hidePallete('screenview-indicator'); - - window.$$$collect_all_windows(); - }; + window.$$$hidePallete('zones'); + window.$$$hidePallete('entity'); + window.$$$hidePallete('screenview-indicator'); - loadByFilename(mapfile, doAfterNewMapCreate); - } -}; + window.$$$collect_all_windows(); + }; - window.$$$about_breaditor = () => { - window.alert( - 'Breaditor is a pile of junk made mostly by @bengrue and a little by Shamus Peveril.' + - 'TODO: make this better.' + - 'TODO: add the licenses jeez.' - ); - }; + loadByFilename(mapfile, doAfterNewMapCreate); + } + }; - window.$$$collect_all_windows = () => { - let x = 0; - let y = 0; - let z = 0; + window.$$$about_breaditor = () => { + window.alert( + 'Breaditor is a pile of junk made mostly by @bengrue and a little by Shamus Peveril.' + + 'TODO: make this better.' + + 'TODO: add the licenses jeez.' + ); + }; - window.$$$palette_registry.map((pal) => { - const node_selector = `.${ pal}`; - const $node = $(node_selector); - $node.css('top', `${y }px`); - $node.css('left', `${x }px`); - $node.css('z-index', z); + window.$$$collect_all_windows = () => { + let x = 0; + let y = 0; + let z = 0; - Palettes.correctResizeWidget($node); + window.$$$palette_registry.map(pal => { + const node_selector = `.${pal}`; + const $node = $(node_selector); + $node.css('top', `${y}px`); + $node.css('left', `${x}px`); + $node.css('z-index', z); - x += 30; - y += 30; - z += 2; - }); + Palettes.correctResizeWidget($node); - Palettes.savePalettePositions(); - }; + x += 30; + y += 30; + z += 2; + }); - window.$$$show_all_windows = () => { - window.$$$palette_registry.map((pal) => { - const node_selector = `.${ pal}`; - const $node = $(node_selector); - $node.show(); - }); + Palettes.savePalettePositions(); + }; - Palettes.savePalettePositions(); - }; + window.$$$show_all_windows = () => { + window.$$$palette_registry.map(pal => { + const node_selector = `.${pal}`; + const $node = $(node_selector); + $node.show(); + }); - window.$$$hide_all_windows = () => { - if(!window.$$$palette_registry) return; - window.$$$palette_registry.map((pal) => { - const node_selector = `.${ pal}`; - const $node = $(node_selector); - $node.hide(); - }); - }; + Palettes.savePalettePositions(); + }; - window.$$$load = () => { - const options = { - filters: [{ name: 'text', extensions: ['map.json'] }] + window.$$$hide_all_windows = () => { + if (!window.$$$palette_registry) return; + window.$$$palette_registry.map(pal => { + const node_selector = `.${pal}`; + const $node = $(node_selector); + $node.hide(); + }); }; - if( window.$$$_most_recent_options && window.$$$_most_recent_options.abs_path_to_maps ) { - options.defaultPath = window.$$$_most_recent_options.abs_path_to_maps; - } + window.$$$load = () => { + const options = { + filters: [{ name: 'text', extensions: ['map.json'] }] + }; - dialog.showOpenDialog( options, loadByFilename ); - }; + if (window.$$$_most_recent_options && window.$$$_most_recent_options.abs_path_to_maps) { + options.defaultPath = window.$$$_most_recent_options.abs_path_to_maps; + } - window.$$$superpaste = () => { - const hoverTile = getCurrentHoverTile(); - if (hoverTile === null) { - console.error('attempted to paste when hovertile was null. wtf.'); - return; - } - const map = window.$$$currentMap; - const tX = hoverTile[0]; - const tY = hoverTile[1]; + dialog.showOpenDialog(options, loadByFilename); + }; - superPaste(map, tX, tY); - } + window.$$$superpaste = () => { + const hoverTile = getCurrentHoverTile(); + if (hoverTile === null) { + console.error('attempted to paste when hovertile was null. wtf.'); + return; + } + const map = window.$$$currentMap; + const tX = hoverTile[0]; + const tY = hoverTile[1]; - window.$$$supercut = function() { - const map = window.$$$currentMap; + superPaste(map, tX, tY); + }; - if( getSelectedLayer() === null ) { - alert("Supercut: Please select a layer first."); - return; - } + window.$$$supercut = function() { + const map = window.$$$currentMap; - if (!map.selection.tiles || !map.selection.tiles.length) { - alert("Supercut: Please mark a selection on a layer first (hotkey 'm')."); - return; - } + if (getSelectedLayer() === null) { + alert('Supercut: Please select a layer first.'); + return; + } - const title = 'Supercut Setup'; + if (!map.selection.tiles || !map.selection.tiles.length) { + alert("Supercut: Please mark a selection on a layer first (hotkey 'm')."); + return; + } + + const title = 'Supercut Setup'; - let $template = ` -