From e30ad9109cc835a1866d63c8239dd10b751ebcd8 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Wed, 28 Jun 2023 16:28:46 -0400 Subject: [PATCH 01/13] wip --- styles/.eslintrc.js | 33 + styles/package-lock.json | 2961 ++++++++++++++++++++++++-- styles/package.json | 7 +- styles/src/styleTree/sharedScreen.ts | 3 +- styles/src/styleTree/terminal.ts | 63 +- styles/src/types/element.ts | 4 + styles/src/types/index.ts | 5 + styles/src/types/property.ts | 9 + styles/src/types/styleTree.ts | 29 + styles/src/types/util.ts | 15 + 10 files changed, 2974 insertions(+), 155 deletions(-) create mode 100644 styles/.eslintrc.js create mode 100644 styles/src/types/element.ts create mode 100644 styles/src/types/index.ts create mode 100644 styles/src/types/property.ts create mode 100644 styles/src/types/styleTree.ts create mode 100644 styles/src/types/util.ts diff --git a/styles/.eslintrc.js b/styles/.eslintrc.js new file mode 100644 index 0000000000000000000000000000000000000000..40800d315cb0d7968593d502984c8086e878222d --- /dev/null +++ b/styles/.eslintrc.js @@ -0,0 +1,33 @@ +module.exports = { + plugins: ["import"], + parser: "@typescript-eslint/parser", + parserOptions: { + sourceType: "module" + }, + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [".ts"] + }, + "import/resolver": { + "typescript": { + "alwaysTryTypes": true, + } + } + }, + rules: { + "import/no-restricted-paths": [ + warn, + { + zones: [ + { + "target": "./src/types/*", + "from": "./src", + "except": [ + "./src/types/index.ts" + ] + } + ] + } + ] + } +} diff --git a/styles/package-lock.json b/styles/package-lock.json index 236e5711485b559ab7d2fc9f7c87017f68af5402..e5a761b2a2087e6ec22793a18168e4f0bebea640 100644 --- a/styles/package-lock.json +++ b/styles/package-lock.json @@ -25,7 +25,21 @@ "vitest": "^0.32.0" }, "devDependencies": { - "@vitest/coverage-v8": "^0.32.0" + "@typescript-eslint/parser": "^5.60.1", + "@vitest/coverage-v8": "^0.32.0", + "eslint": "^8.43.0", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-plugin-import": "^2.27.5", + "typescript": "^5.1.5" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, "node_modules/@ampproject/remapping": { @@ -90,6 +104,95 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.5.2", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", + "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -149,6 +252,67 @@ "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgr/utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.1.tgz", + "integrity": "sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.2.12", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@pkgr/utils/node_modules/tslib": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", + "dev": true + }, "node_modules/@tokens-studio/types": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@tokens-studio/types/-/types-0.2.3.tgz", @@ -212,6 +376,12 @@ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==" }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "node_modules/@types/lodash": { "version": "4.14.195", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", @@ -232,6 +402,107 @@ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==" }, + "node_modules/@typescript-eslint/parser": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.1.tgz", + "integrity": "sha512-pHWlc3alg2oSMGwsU/Is8hbm3XFbcrb6P5wIxcQW9NsYBfnrubl/GhVVD/Jm/t8HXhA2WncoIRfBtnCgRGV96Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.60.1", + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/typescript-estree": "5.60.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.1.tgz", + "integrity": "sha512-Dn/LnN7fEoRD+KspEOV0xDMynEmR3iSHdgNsarlXNLGGtcUok8L4N71dxUgt3YvlO8si7E+BJ5Fe3wb5yUw7DQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/visitor-keys": "5.60.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.1.tgz", + "integrity": "sha512-zDcDx5fccU8BA0IDZc71bAtYIcG9PowaOwaD8rjYbqwK7dpe/UMQl3inJ4UtUK42nOCT41jTSCwg76E62JpMcg==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.1.tgz", + "integrity": "sha512-hkX70J9+2M2ZT6fhti5Q2FoU9zb+GeZK2SLP1WZlvUDqdMbEKhexZODD1WodNRyO8eS+4nScvT0dts8IdaBzfw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/visitor-keys": "5.60.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.1.tgz", + "integrity": "sha512-xEYIxKcultP6E/RMKqube11pGjXH1DCo60mQoWhVYyKfLkwbIVVjYxmOenNMxILx0TjCujPTjjnTIVzm09TXIw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.60.1", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@vitest/coverage-v8": { "version": "0.32.0", "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-0.32.0.tgz", @@ -332,6 +603,15 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/acorn-walk": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", @@ -340,6 +620,22 @@ "node": ">=0.4.0" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -374,6 +670,83 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -382,6 +755,18 @@ "node": "*" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ayu": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/ayu/-/ayu-8.0.1.tgz", @@ -402,11 +787,32 @@ "resolved": "https://registry.npmjs.org/bezier-easing/-/bezier-easing-2.1.0.tgz", "integrity": "sha512-gbIqZ/eslnUFC1tjEvtz0sgx+xTK20wDnYMIA27VA04R7w6xxXQPZDbibjA9DTWZRA2CXtwHykkVzlCaAJAZig==" }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/blueimp-md5": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==" }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -416,6 +822,33 @@ "concat-map": "0.0.1" } }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -424,11 +857,33 @@ "node": ">=8" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/call-me-maybe": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==" }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/case-anything": { "version": "2.1.10", "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.10.tgz", @@ -457,6 +912,37 @@ "node": ">=4" } }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -485,14 +971,32 @@ "node": ">=0.10" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/concordance": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz", + "node_modules/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, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/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 + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/concordance": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz", "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==", "dependencies": { "date-time": "^3.1.0", @@ -519,6 +1023,20 @@ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/d": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", @@ -566,6 +1084,12 @@ "node": ">=6" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, "node_modules/deepmerge": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", @@ -574,6 +1098,68 @@ "node": ">=0.10.0" } }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -582,6 +1168,131 @@ "node": ">=0.3.1" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/es-abstract": { + "version": "1.21.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", + "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.0", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es5-ext": { "version": "0.10.62", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", @@ -662,143 +1373,996 @@ "@esbuild/win32-x64": "0.17.19" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "node_modules/eslint": { + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", + "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", + "dev": true, "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.43.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "node_modules/eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "dev": true, "dependencies": { - "type": "^2.7.2" + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" } }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==" - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], + "node_modules/eslint-import-resolver-typescript": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz", + "integrity": "sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==", + "dev": true, + "dependencies": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "get-tsconfig": "^4.5.0", + "globby": "^13.1.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "synckit": "^0.8.5" + }, "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" } }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "node_modules/eslint-import-resolver-typescript/node_modules/globby": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.0.tgz", + "integrity": "sha512-jWsQfayf13NvqKUIL3Ta+CIqMnvlaIDFveWE/dpOZ9+3AMEJozsxDvKA02zync9UuvOM8rOXzsD5GqKP4OnWPQ==", + "dev": true, + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.11", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, "engines": { - "node": "*" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "node_modules/eslint-import-resolver-typescript/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "debug": "^3.2.7" }, "engines": { - "node": "*" + "node": ">=4" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, - "node_modules/glob-promise": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-4.2.2.tgz", - "integrity": "sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==", + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, "dependencies": { - "@types/glob": "^7.1.3" + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" }, "engines": { - "node": ">=12" - }, - "funding": { - "type": "individual", - "url": "https://github.com/sponsors/ahmadnassri" + "node": ">=4" }, "peerDependencies": { - "glob": "^7.1.6" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/html-escaper": { - "version": "2.0.2", + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/execa": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", + "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==" + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.6.2.tgz", + "integrity": "sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob-promise": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-4.2.2.tgz", + "integrity": "sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==", + "dependencies": { + "@types/glob": "^7.1.3" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/ahmadnassri" + }, + "peerDependencies": { + "glob": "^7.1.6" + } + }, + "node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/is-extglob": { "version": "2.1.1", @@ -819,11 +2383,208 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl/node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", @@ -920,11 +2681,48 @@ "node": ">=12.0.0" } }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/local-pkg": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", @@ -936,11 +2734,32 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "node_modules/loupe": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", @@ -1034,6 +2853,46 @@ "timers-ext": "^0.1.7" } }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1107,6 +2966,12 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, "node_modules/next-tick": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", @@ -1117,6 +2982,33 @@ "resolved": "https://registry.npmjs.org/nonenumerable/-/nonenumerable-1.1.1.tgz", "integrity": "sha512-ptUD9w9D8WqW6fuJJkZNCImkf+0vdbgUTbRK3i7jsy3olqtH96hYE6Q/S3Tx9NWbcB/ocAjYshXCAUP0lZ9B4Q==" }, + "node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -1125,6 +3017,59 @@ "node": ">=0.10.0" } }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1133,6 +3078,56 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/p-limit": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", @@ -1147,6 +3142,69 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/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, + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1155,6 +3213,30 @@ "node": ">=0.10.0" } }, + "node_modules/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/pathe": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", @@ -1173,6 +3255,18 @@ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/pkg-types": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", @@ -1210,6 +3304,15 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/prettier": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", @@ -1234,27 +3337,274 @@ "react-is": "^17.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dev": true, + "dependencies": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.1.tgz", + "integrity": "sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/run-applescript/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/run-applescript/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/run-applescript/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" - }, - "node_modules/rollup": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.1.tgz", - "integrity": "sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==", - "bin": { - "rollup": "dist/bin/rollup" - }, + "node_modules/run-applescript/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" + "node": ">=6" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/semver": { @@ -1271,11 +3621,61 @@ "node": ">=10" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==" }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -1303,6 +3703,96 @@ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.3.tgz", "integrity": "sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==" }, + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/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, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/strip-literal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.0.1.tgz", @@ -1326,6 +3816,49 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "dependencies": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/synckit/node_modules/tslib": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", + "dev": true + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -1340,6 +3873,12 @@ "node": ">=8" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -1397,6 +3936,30 @@ "node": ">=14.0.0" } }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/toml": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", @@ -1452,11 +4015,56 @@ } } }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, "node_modules/type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -1465,17 +4073,42 @@ "node": ">=4" } }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "peer": true, + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.5.tgz", + "integrity": "sha512-FOH+WN/DQjUvN6WgW+c4Ml3yi0PH+a/8q+kNIfRehv1wLhWONedw85iu+vQ39Wp49IzTJEsZ2lyLXpBF7mkF1g==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/ufo": { @@ -1483,6 +4116,39 @@ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.2.tgz", "integrity": "sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==" }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/utility-types": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz", @@ -1674,6 +4340,57 @@ "node": ">=6" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/why-is-node-running": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", diff --git a/styles/package.json b/styles/package.json index b14fb5f527ee53ffcf37b68ae97f65abc2b72faa..19a77d4dbf8c6441e00e9d0198d7e3bac4602a5e 100644 --- a/styles/package.json +++ b/styles/package.json @@ -35,6 +35,11 @@ "tabWidth": 4 }, "devDependencies": { - "@vitest/coverage-v8": "^0.32.0" + "@typescript-eslint/parser": "^5.60.1", + "@vitest/coverage-v8": "^0.32.0", + "eslint": "^8.43.0", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-plugin-import": "^2.27.5", + "typescript": "^5.1.5" } } diff --git a/styles/src/styleTree/sharedScreen.ts b/styles/src/styleTree/sharedScreen.ts index 2563e718ff2a6d3013f4bc235901aa06cb32b4ba..a58e7e022290ec9bc0f3b79aea1d17f50fd9fd62 100644 --- a/styles/src/styleTree/sharedScreen.ts +++ b/styles/src/styleTree/sharedScreen.ts @@ -1,7 +1,8 @@ import { ColorScheme } from "../theme/colorScheme" +import { StyleTree } from "../types" import { background } from "./components" -export default function sharedScreen(colorScheme: ColorScheme) { +export default function sharedScreen(colorScheme: ColorScheme): StyleTree.SharedScreen { let layer = colorScheme.highest return { background: background(layer), diff --git a/styles/src/styleTree/terminal.ts b/styles/src/styleTree/terminal.ts index 8a7eb7a549a18acbb17b115c8306e245e7a8dec3..5198cb195dd30b78130c917e09798392ca56a393 100644 --- a/styles/src/styleTree/terminal.ts +++ b/styles/src/styleTree/terminal.ts @@ -1,6 +1,7 @@ import { ColorScheme } from "../theme/colorScheme" +import { StyleTree } from "../types" -export default function terminal(colorScheme: ColorScheme) { +export default function terminal(theme: ColorScheme): StyleTree.TerminalStyle { /** * Colors are controlled per-cell in the terminal grid. * Cells can be set to any of these more 'theme-capable' colors @@ -9,44 +10,44 @@ export default function terminal(colorScheme: ColorScheme) { * https://en.wikipedia.org/wiki/ANSI_escape_code#Colors */ return { - black: colorScheme.ramps.neutral(0).hex(), - red: colorScheme.ramps.red(0.5).hex(), - green: colorScheme.ramps.green(0.5).hex(), - yellow: colorScheme.ramps.yellow(0.5).hex(), - blue: colorScheme.ramps.blue(0.5).hex(), - magenta: colorScheme.ramps.magenta(0.5).hex(), - cyan: colorScheme.ramps.cyan(0.5).hex(), - white: colorScheme.ramps.neutral(1).hex(), - brightBlack: colorScheme.ramps.neutral(0.4).hex(), - brightRed: colorScheme.ramps.red(0.25).hex(), - brightGreen: colorScheme.ramps.green(0.25).hex(), - brightYellow: colorScheme.ramps.yellow(0.25).hex(), - brightBlue: colorScheme.ramps.blue(0.25).hex(), - brightMagenta: colorScheme.ramps.magenta(0.25).hex(), - brightCyan: colorScheme.ramps.cyan(0.25).hex(), - brightWhite: colorScheme.ramps.neutral(1).hex(), + black: theme.ramps.neutral(0).hex(), + red: theme.ramps.red(0.5).hex(), + green: theme.ramps.green(0.5).hex(), + yellow: theme.ramps.yellow(0.5).hex(), + blue: theme.ramps.blue(0.5).hex(), + magenta: theme.ramps.magenta(0.5).hex(), + cyan: theme.ramps.cyan(0.5).hex(), + white: theme.ramps.neutral(1).hex(), + bright_black: theme.ramps.neutral(0.4).hex(), + bright_red: theme.ramps.red(0.25).hex(), + bright_green: theme.ramps.green(0.25).hex(), + bright_yellow: theme.ramps.yellow(0.25).hex(), + bright_blue: theme.ramps.blue(0.25).hex(), + bright_magenta: theme.ramps.magenta(0.25).hex(), + bright_cyan: theme.ramps.cyan(0.25).hex(), + bright_white: theme.ramps.neutral(1).hex(), /** * Default color for characters */ - foreground: colorScheme.ramps.neutral(1).hex(), + foreground: theme.ramps.neutral(1).hex(), /** * Default color for the rectangle background of a cell */ - background: colorScheme.ramps.neutral(0).hex(), - modalBackground: colorScheme.ramps.neutral(0.1).hex(), + background: theme.ramps.neutral(0).hex(), + modal_background: theme.ramps.neutral(0.1).hex(), /** * Default color for the cursor */ - cursor: colorScheme.players[0].cursor, - dimBlack: colorScheme.ramps.neutral(1).hex(), - dimRed: colorScheme.ramps.red(0.75).hex(), - dimGreen: colorScheme.ramps.green(0.75).hex(), - dimYellow: colorScheme.ramps.yellow(0.75).hex(), - dimBlue: colorScheme.ramps.blue(0.75).hex(), - dimMagenta: colorScheme.ramps.magenta(0.75).hex(), - dimCyan: colorScheme.ramps.cyan(0.75).hex(), - dimWhite: colorScheme.ramps.neutral(0.6).hex(), - brightForeground: colorScheme.ramps.neutral(1).hex(), - dimForeground: colorScheme.ramps.neutral(0).hex(), + cursor: theme.players[0].cursor, + dim_black: theme.ramps.neutral(1).hex(), + dim_red: theme.ramps.red(0.75).hex(), + dim_green: theme.ramps.green(0.75).hex(), + dim_yellow: theme.ramps.yellow(0.75).hex(), + dim_blue: theme.ramps.blue(0.75).hex(), + dim_magenta: theme.ramps.magenta(0.75).hex(), + dim_cyan: theme.ramps.cyan(0.75).hex(), + dim_white: theme.ramps.neutral(0.6).hex(), + bright_foreground: theme.ramps.neutral(1).hex(), + dim_foreground: theme.ramps.neutral(0).hex(), } } diff --git a/styles/src/types/element.ts b/styles/src/types/element.ts new file mode 100644 index 0000000000000000000000000000000000000000..719fe38203623dbf3d0e936d4fc9f5b474b1ac1b --- /dev/null +++ b/styles/src/types/element.ts @@ -0,0 +1,4 @@ +import { Clean } from "./util"; +import * as zed from './zed' + +export type Text = Clean diff --git a/styles/src/types/index.ts b/styles/src/types/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..e1f55a97e2228acb5e8eaa5e02a32f50beec905c --- /dev/null +++ b/styles/src/types/index.ts @@ -0,0 +1,5 @@ +import * as StyleTree from './styleTree' +import * as Property from './property' +import * as Element from './element' + +export { StyleTree, Property, Element } diff --git a/styles/src/types/property.ts b/styles/src/types/property.ts new file mode 100644 index 0000000000000000000000000000000000000000..97867c9858774b0672d23e3afca9523f84b691c5 --- /dev/null +++ b/styles/src/types/property.ts @@ -0,0 +1,9 @@ +import { Clean } from './util' +import * as zed from './zed' + +export type Color = zed.Color +export type CursorStyle = zed.CursorStyle +export type FontStyle = zed.Style +export type Border = Clean +export type Margin = Clean +export type Padding = Clean diff --git a/styles/src/types/styleTree.ts b/styles/src/types/styleTree.ts new file mode 100644 index 0000000000000000000000000000000000000000..c4194ca12d2ff33dec391db443f5bcdc33be577e --- /dev/null +++ b/styles/src/types/styleTree.ts @@ -0,0 +1,29 @@ +import { Clean } from './util' +import * as zed from './zed' + +export type AssistantStyle = Readonly>; +export type CommandPalette = Readonly>; +export type ContactFinder = Readonly>; +export type ContactList = Readonly>; +export type ContactNotification = Readonly>; +export type ContactsPopover = Readonly>; +export type ContextMenu = Readonly>; +export type Copilot = Readonly>; +export type Editor = Readonly>; +export type FeedbackStyle = Readonly>; +export type IncomingCallNotification = Readonly>; +export type ThemeMeta = Readonly>; +export type Picker = Readonly>; +export type ProjectDiagnostics = Readonly>; +export type ProjectPanel = Readonly>; +export type ProjectSharedNotification = Readonly>; +export type Search = Readonly>; +export type SharedScreen = Readonly>; +export type MessageNotification = Readonly>; +export type TerminalStyle = Readonly>; +export type UserMenu = Readonly>; +export type DropdownMenu = Readonly>; +export type TooltipStyle = Readonly>; +export type UpdateNotification = Readonly>; +export type WelcomeStyle = Readonly>; +export type Workspace = Readonly>; diff --git a/styles/src/types/util.ts b/styles/src/types/util.ts new file mode 100644 index 0000000000000000000000000000000000000000..3fa2f0eb25637fcaa796ad91436adb9802427863 --- /dev/null +++ b/styles/src/types/util.ts @@ -0,0 +1,15 @@ +export type Prettify = { + [K in keyof T]: T[K]; +} & {}; + +/** +* Clean removes the [k: string]: unknown property from an object, +* and Prettifies it, providing better hover information for the type +*/ +export type Clean = { + [K in keyof T as string extends K ? never : K]: T[K]; +} + +export type DeepClean = { + [K in keyof T as string extends K ? never : K]: T[K] extends object ? DeepClean : T[K]; +} From 11779801728074a514b3150c091ced8028779a74 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Wed, 28 Jun 2023 16:44:18 -0400 Subject: [PATCH 02/13] Fix basic eslint errors --- styles/.eslintrc.js | 39 ++++++++-- styles/package-lock.json | 128 ++++++++++++++++++++++++++++++++ styles/package.json | 1 + styles/src/buildThemes.ts | 10 +-- styles/src/styleTree/search.ts | 4 +- styles/src/styleTree/welcome.ts | 6 +- styles/src/types/element.ts | 2 +- styles/src/types/util.ts | 2 +- 8 files changed, 173 insertions(+), 19 deletions(-) diff --git a/styles/.eslintrc.js b/styles/.eslintrc.js index 40800d315cb0d7968593d502984c8086e878222d..4cb655c9daa2d2b800ab0b91318e599d240bbf4c 100644 --- a/styles/.eslintrc.js +++ b/styles/.eslintrc.js @@ -1,8 +1,21 @@ module.exports = { - plugins: ["import"], - parser: "@typescript-eslint/parser", - parserOptions: { - sourceType: "module" + 'env': { + "node": true + }, + 'extends': [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended' + ], + 'parser': '@typescript-eslint/parser', + 'parserOptions': { + 'ecmaVersion': 'latest', + 'sourceType': 'module' + }, + 'plugins': [ + '@typescript-eslint', 'import' + ], + globals: { + module: true }, "settings": { "import/parsers": { @@ -14,11 +27,23 @@ module.exports = { } } }, - rules: { + 'rules': { + 'indent': [ + 'error', + 4 + ], + 'linebreak-style': [ + 'error', + 'unix' + ], + 'semi': [ + 'error', + 'never' + ], "import/no-restricted-paths": [ - warn, + 'error', { - zones: [ + 'zones': [ { "target": "./src/types/*", "from": "./src", diff --git a/styles/package-lock.json b/styles/package-lock.json index e5a761b2a2087e6ec22793a18168e4f0bebea640..b6f14480f53188e0db903f0792b41617be6642be 100644 --- a/styles/package-lock.json +++ b/styles/package-lock.json @@ -25,6 +25,7 @@ "vitest": "^0.32.0" }, "devDependencies": { + "@typescript-eslint/eslint-plugin": "^5.60.1", "@typescript-eslint/parser": "^5.60.1", "@vitest/coverage-v8": "^0.32.0", "eslint": "^8.43.0", @@ -402,6 +403,46 @@ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==" }, + "node_modules/@types/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.1.tgz", + "integrity": "sha512-KSWsVvsJsLJv3c4e73y/Bzt7OpqMCADUO846bHcuWYSYM19bldbAeDv7dYyV0jwkbMfJ2XdlzwjhXtuD7OY6bw==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.60.1", + "@typescript-eslint/type-utils": "5.60.1", + "@typescript-eslint/utils": "5.60.1", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/parser": { "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.1.tgz", @@ -446,6 +487,33 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.1.tgz", + "integrity": "sha512-vN6UztYqIu05nu7JqwQGzQKUJctzs3/Hg7E2Yx8rz9J+4LgtIDFWjjl1gm3pycH0P3mHAcEUBd23LVgfrsTR8A==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "5.60.1", + "@typescript-eslint/utils": "5.60.1", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/types": { "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.1.tgz", @@ -486,6 +554,54 @@ } } }, + "node_modules/@typescript-eslint/utils": { + "version": "5.60.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.1.tgz", + "integrity": "sha512-tiJ7FFdFQOWssFa3gqb94Ilexyw0JVxj6vBzaSpfN/8IhoKkDuSAenUKvsSHw2A/TMpJb26izIszTXaqygkvpQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.60.1", + "@typescript-eslint/types": "5.60.1", + "@typescript-eslint/typescript-estree": "5.60.1", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.1.tgz", @@ -2104,6 +2220,12 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -2972,6 +3094,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/next-tick": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", diff --git a/styles/package.json b/styles/package.json index 19a77d4dbf8c6441e00e9d0198d7e3bac4602a5e..e21840e613c6769be51a46ba9381d6460df9fe56 100644 --- a/styles/package.json +++ b/styles/package.json @@ -35,6 +35,7 @@ "tabWidth": 4 }, "devDependencies": { + "@typescript-eslint/eslint-plugin": "^5.60.1", "@typescript-eslint/parser": "^5.60.1", "@vitest/coverage-v8": "^0.32.0", "eslint": "^8.43.0", diff --git a/styles/src/buildThemes.ts b/styles/src/buildThemes.ts index 8d807d62f3f597457cbff1e0544390d4ef37bb71..7d831ee42ed74f7e6754cba41ab4801fa51f206f 100644 --- a/styles/src/buildThemes.ts +++ b/styles/src/buildThemes.ts @@ -24,11 +24,11 @@ function clearThemes(themeDirectory: string) { function writeThemes(colorSchemes: ColorScheme[], outputDirectory: string) { clearThemes(outputDirectory) - for (let colorScheme of colorSchemes) { - let styleTree = snakeCase(app(colorScheme)) - let styleTreeJSON = JSON.stringify(styleTree, null, 2) - let tempPath = path.join(tempDirectory, `${colorScheme.name}.json`) - let outPath = path.join(outputDirectory, `${colorScheme.name}.json`) + for (const colorScheme of colorSchemes) { + const styleTree = snakeCase(app(colorScheme)) + const styleTreeJSON = JSON.stringify(styleTree, null, 2) + const tempPath = path.join(tempDirectory, `${colorScheme.name}.json`) + const outPath = path.join(outputDirectory, `${colorScheme.name}.json`) fs.writeFileSync(tempPath, styleTreeJSON) fs.renameSync(tempPath, outPath) console.log(`- ${outPath} created`) diff --git a/styles/src/styleTree/search.ts b/styles/src/styleTree/search.ts index b471e6cbdab31249acd93bd13fda824f4343fa13..9a86d1d558db1c6a7d54e86e693c4bac8f076aea 100644 --- a/styles/src/styleTree/search.ts +++ b/styles/src/styleTree/search.ts @@ -3,8 +3,8 @@ import { withOpacity } from "../theme/color" import { background, border, foreground, text } from "./components" import { interactive, toggleable } from "../element" -export default function search(colorScheme: ColorScheme) { - let layer = colorScheme.highest +export default function search(colorScheme: ColorScheme): unknown { + const layer = colorScheme.highest // Search input const editor = { diff --git a/styles/src/styleTree/welcome.ts b/styles/src/styleTree/welcome.ts index 311ff6daffa5ce468652ef0eb53dfa3d74c32eb2..3b3eeba53ad273862d09427b88ac999ee994f8c1 100644 --- a/styles/src/styleTree/welcome.ts +++ b/styles/src/styleTree/welcome.ts @@ -11,9 +11,9 @@ import { import { interactive } from "../element" export default function welcome(colorScheme: ColorScheme) { - let layer = colorScheme.highest + const layer = colorScheme.highest - let checkboxBase = { + const checkboxBase = { cornerRadius: 4, padding: { left: 3, @@ -30,7 +30,7 @@ export default function welcome(colorScheme: ColorScheme) { }, } - let interactive_text_size: TextProperties = { size: "sm" } + const interactive_text_size: TextProperties = { size: "sm" } return { pageWidth: 320, diff --git a/styles/src/types/element.ts b/styles/src/types/element.ts index 719fe38203623dbf3d0e936d4fc9f5b474b1ac1b..6f6bb91e58df016b0a46266ac73ac7b0d84743f5 100644 --- a/styles/src/types/element.ts +++ b/styles/src/types/element.ts @@ -1,4 +1,4 @@ -import { Clean } from "./util"; +import { Clean } from "./util" import * as zed from './zed' export type Text = Clean diff --git a/styles/src/types/util.ts b/styles/src/types/util.ts index 3fa2f0eb25637fcaa796ad91436adb9802427863..851acd4b180217a7b7da5fb1102b528d4440c73d 100644 --- a/styles/src/types/util.ts +++ b/styles/src/types/util.ts @@ -1,6 +1,6 @@ export type Prettify = { [K in keyof T]: T[K]; -} & {}; +} & unknown; /** * Clean removes the [k: string]: unknown property from an object, From bfdd0824e210654e8bbc909eb98db0b477fbe0c1 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Wed, 28 Jun 2023 17:54:36 -0400 Subject: [PATCH 03/13] Resolve TS errors and warnings TODO: Use StyleTree types to remove `any`s from styleTrees. --- styles/.eslintrc.js | 87 ++-- styles/src/buildLicenses.ts | 4 +- styles/src/buildTypes.ts | 27 +- styles/src/element/interactive.ts | 4 +- styles/src/styleTree/app.ts | 2 +- styles/src/styleTree/assistant.ts | 2 +- styles/src/styleTree/commandPalette.ts | 4 +- styles/src/styleTree/components.ts | 14 +- styles/src/styleTree/contactFinder.ts | 2 +- styles/src/styleTree/contactList.ts | 4 +- styles/src/styleTree/contactNotification.ts | 4 +- styles/src/styleTree/contactsPopover.ts | 7 +- styles/src/styleTree/contextMenu.ts | 4 +- styles/src/styleTree/copilot.ts | 8 +- styles/src/styleTree/editor.ts | 4 +- styles/src/styleTree/feedback.ts | 4 +- styles/src/styleTree/hoverPopover.ts | 6 +- .../src/styleTree/incomingCallNotification.ts | 4 +- styles/src/styleTree/picker.ts | 2 +- styles/src/styleTree/projectDiagnostics.ts | 4 +- styles/src/styleTree/projectPanel.ts | 4 +- .../styleTree/projectSharedNotification.ts | 4 +- styles/src/styleTree/search.ts | 2 +- styles/src/styleTree/sharedScreen.ts | 6 +- .../styleTree/simpleMessageNotification.ts | 4 +- styles/src/styleTree/statusBar.ts | 4 +- styles/src/styleTree/tabBar.ts | 6 +- styles/src/styleTree/titlebar.ts | 2 +- styles/src/styleTree/toggle.ts | 47 -- styles/src/styleTree/toolbarDropdownMenu.ts | 4 +- styles/src/styleTree/tooltip.ts | 4 +- styles/src/styleTree/updateNotification.ts | 4 +- styles/src/styleTree/welcome.ts | 2 +- styles/src/styleTree/workspace.ts | 2 +- styles/src/system/lib/convert.ts | 11 - styles/src/system/lib/curve.ts | 26 - styles/src/system/lib/generate.ts | 159 ------- styles/src/system/ref/color.ts | 445 ------------------ styles/src/system/ref/curves.ts | 25 - styles/src/system/system.ts | 32 -- styles/src/system/types.ts | 66 --- styles/src/theme/colorScheme.ts | 6 +- styles/src/theme/ramps.ts | 12 +- styles/src/theme/syntax.ts | 2 +- styles/src/themes/gruvbox/gruvbox-common.ts | 23 +- styles/src/types/element.ts | 2 +- styles/src/types/index.ts | 6 +- styles/src/types/property.ts | 4 +- styles/src/types/styleTree.ts | 60 +-- styles/src/types/util.ts | 16 +- styles/src/utils/slugify.ts | 4 +- styles/src/utils/snakeCase.ts | 7 +- styles/tsconfig.json | 36 +- 53 files changed, 224 insertions(+), 1010 deletions(-) delete mode 100644 styles/src/styleTree/toggle.ts delete mode 100644 styles/src/system/lib/convert.ts delete mode 100644 styles/src/system/lib/curve.ts delete mode 100644 styles/src/system/lib/generate.ts delete mode 100644 styles/src/system/ref/color.ts delete mode 100644 styles/src/system/ref/curves.ts delete mode 100644 styles/src/system/system.ts delete mode 100644 styles/src/system/types.ts diff --git a/styles/.eslintrc.js b/styles/.eslintrc.js index 4cb655c9daa2d2b800ab0b91318e599d240bbf4c..c131089e141419914f41bb5c1f623d554ddf95c1 100644 --- a/styles/.eslintrc.js +++ b/styles/.eslintrc.js @@ -1,58 +1,57 @@ module.exports = { - 'env': { - "node": true + env: { + node: true, }, - 'extends': [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended' + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:import/typescript", ], - 'parser': '@typescript-eslint/parser', - 'parserOptions': { - 'ecmaVersion': 'latest', - 'sourceType': 'module' + parser: "@typescript-eslint/parser", + parserOptions: { + ecmaVersion: "latest", + sourceType: "module", }, - 'plugins': [ - '@typescript-eslint', 'import' - ], + plugins: ["@typescript-eslint", "import"], globals: { - module: true + module: true, }, - "settings": { + settings: { "import/parsers": { - "@typescript-eslint/parser": [".ts"] + "@typescript-eslint/parser": [".ts"], }, "import/resolver": { - "typescript": { - "alwaysTryTypes": true, - } - } + typescript: true, + node: true, + }, + "import/extensions": [".ts"], }, - 'rules': { - 'indent': [ - 'error', - 4 - ], - 'linebreak-style': [ - 'error', - 'unix' - ], - 'semi': [ - 'error', - 'never' - ], + rules: { + "linebreak-style": ["error", "unix"], + semi: ["error", "never"], "import/no-restricted-paths": [ - 'error', + "error", { - 'zones': [ + zones: [ { - "target": "./src/types/*", - "from": "./src", - "except": [ - "./src/types/index.ts" - ] - } - ] - } - ] - } + target: [ + "./src/component/*", + "./src/element/*", + "./src/styleTree/*", + "./src/system/*", + "./src/theme/*", + "./src/themes/*", + "./src/utils/*", + ], + from: [ + "./src/types/styleTree.ts", + "./src/types/element.ts", + "./src/types/property.ts", + ], + message: "Import from `@types` instead", + }, + ], + }, + ], + }, } diff --git a/styles/src/buildLicenses.ts b/styles/src/buildLicenses.ts index 13a6951a8288bfd2349dc466364bb4df517f08cf..93a2bd302aa1d88cbd2050b681c8fe110a3bef1f 100644 --- a/styles/src/buildLicenses.ts +++ b/styles/src/buildLicenses.ts @@ -7,9 +7,9 @@ const ACCEPTED_LICENSES_FILE = `${__dirname}/../../script/licenses/zed-licenses. // Use the cargo-about configuration file as the source of truth for supported licenses. function parseAcceptedToml(file: string): string[] { - let buffer = fs.readFileSync(file).toString() + const buffer = fs.readFileSync(file).toString() - let obj = toml.parse(buffer) + const obj = toml.parse(buffer) if (!Array.isArray(obj.accepted)) { throw Error("Accepted license source is malformed") diff --git a/styles/src/buildTypes.ts b/styles/src/buildTypes.ts index 8c1981cf97c147803bc3d01f9d359bba714ecf51..cd788c540ed0172cce7fb07ac538919fc8431187 100644 --- a/styles/src/buildTypes.ts +++ b/styles/src/buildTypes.ts @@ -9,22 +9,22 @@ const BANNER = `/* const dirname = __dirname async function main() { - let schemasPath = path.join(dirname, "../../", "crates/theme/schemas") - let schemaFiles = (await fs.readdir(schemasPath)).filter((x) => + const schemasPath = path.join(dirname, "../../", "crates/theme/schemas") + const schemaFiles = (await fs.readdir(schemasPath)).filter((x) => x.endsWith(".json") ) - let compiledTypes = new Set() + const compiledTypes = new Set() - for (let filename of schemaFiles) { - let filePath = path.join(schemasPath, filename) + for (const filename of schemaFiles) { + const filePath = path.join(schemasPath, filename) const fileContents = await fs.readFile(filePath) - let schema = JSON.parse(fileContents.toString()) - let compiled = await compile(schema, schema.title, { + const schema = JSON.parse(fileContents.toString()) + const compiled = await compile(schema, schema.title, { bannerComment: "", }) - let eachType = compiled.split("export") - for (let type of eachType) { + const eachType = compiled.split("export") + for (const type of eachType) { if (!type) { continue } @@ -32,19 +32,18 @@ async function main() { } } - let output = BANNER + Array.from(compiledTypes).join("\n\n") - let outputPath = path.join(dirname, "../../styles/src/types/zed.ts") + const output = BANNER + Array.from(compiledTypes).join("\n\n") + const outputPath = path.join(dirname, "../../styles/src/types/zed.ts") try { - let existing = await fs.readFile(outputPath) + const existing = await fs.readFile(outputPath) if (existing.toString() == output) { // Skip writing if it hasn't changed console.log("Schemas are up to date") return } } catch (e) { - // It's fine if there's no output from a previous run. - // @ts-ignore + // @ts-expect-error - It's fine if there's no output from a previous run. if (e.code !== "ENOENT") { throw e } diff --git a/styles/src/element/interactive.ts b/styles/src/element/interactive.ts index 03a1f7f5ce0e9bf914b6e8671fd14a83278595dc..99b8996aefd7521398880bc7ebeb375a3cb123e3 100644 --- a/styles/src/element/interactive.ts +++ b/styles/src/element/interactive.ts @@ -37,7 +37,7 @@ interface InteractiveProps { * @param state Object containing optional modified fields to be included in the resulting object for each state. * @returns Interactive object with fields from `base` and `state`. */ -export function interactive({ +export function interactive({ base, state, }: InteractiveProps): Interactive { @@ -51,7 +51,7 @@ export function interactive({ defaultState = base ? base : (state.default as T) } - let interactiveObj: Interactive = { + const interactiveObj: Interactive = { default: defaultState, } diff --git a/styles/src/styleTree/app.ts b/styles/src/styleTree/app.ts index d98e00383fe019c3fbf5f16168df519140b1c964..a84300283189468dce3de49b430bbf5e848c872c 100644 --- a/styles/src/styleTree/app.ts +++ b/styles/src/styleTree/app.ts @@ -25,7 +25,7 @@ import copilot from "./copilot" import assistant from "./assistant" import { titlebar } from "./titlebar" -export default function app(colorScheme: ColorScheme): Object { +export default function app(colorScheme: ColorScheme): any { return { meta: { name: colorScheme.name, diff --git a/styles/src/styleTree/assistant.ts b/styles/src/styleTree/assistant.ts index 30e109df1a8e092cc71d1af2e8b762ab68dc8e43..f233f0278647b3e143c973f18e1d69eba31e6c0e 100644 --- a/styles/src/styleTree/assistant.ts +++ b/styles/src/styleTree/assistant.ts @@ -3,7 +3,7 @@ import { text, border, background, foreground } from "./components" import editor from "./editor" import { interactive } from "../element" -export default function assistant(colorScheme: ColorScheme) { +export default function assistant(colorScheme: ColorScheme): any { const layer = colorScheme.highest return { container: { diff --git a/styles/src/styleTree/commandPalette.ts b/styles/src/styleTree/commandPalette.ts index 5d4b7373c36169de47219f357a27046acf59d8b1..101f4d437e9a9c478ffbf71e36dea40d5f85c527 100644 --- a/styles/src/styleTree/commandPalette.ts +++ b/styles/src/styleTree/commandPalette.ts @@ -3,8 +3,8 @@ import { withOpacity } from "../theme/color" import { text, background } from "./components" import { toggleable } from "../element" -export default function commandPalette(colorScheme: ColorScheme) { - let layer = colorScheme.highest +export default function commandPalette(colorScheme: ColorScheme): any { + const layer = colorScheme.highest const key = toggleable({ base: { diff --git a/styles/src/styleTree/components.ts b/styles/src/styleTree/components.ts index 3b6f26066bffc26d2d4451adaecd985ef41560ff..8db1fa4b2ef5916f6b871bb1b3f1184b15bc7ee5 100644 --- a/styles/src/styleTree/components.ts +++ b/styles/src/styleTree/components.ts @@ -211,7 +211,7 @@ export function text( styleOrProperties?: Styles | TextProperties, properties?: TextProperties ) { - let style = getStyle(layer, styleSetStyleOrProperties, styleOrProperties) + const style = getStyle(layer, styleSetStyleOrProperties, styleOrProperties) if (typeof styleSetStyleOrProperties === "object") { properties = styleSetStyleOrProperties @@ -220,8 +220,8 @@ export function text( properties = styleOrProperties } - let size = fontSizes[properties?.size || "sm"] - let color = properties?.color || style.foreground + const size = fontSizes[properties?.size || "sm"] + const color = properties?.color || style.foreground return { family: fontFamilies[fontFamily], @@ -273,7 +273,7 @@ export function border( styleOrProperties?: Styles | BorderProperties, properties?: BorderProperties ): Border { - let style = getStyle(layer, styleSetStyleOrProperties, styleOrProperties) + const style = getStyle(layer, styleSetStyleOrProperties, styleOrProperties) if (typeof styleSetStyleOrProperties === "object") { properties = styleSetStyleOrProperties @@ -291,9 +291,9 @@ export function border( export function svg( color: string, - asset: String, - width: Number, - height: Number + asset: string, + width: number, + height: number ) { return { color, diff --git a/styles/src/styleTree/contactFinder.ts b/styles/src/styleTree/contactFinder.ts index e45647c3d62576f9a2db9644bf635f0562b74cef..f0720d05888127c203b800b72199dbcb5829e718 100644 --- a/styles/src/styleTree/contactFinder.ts +++ b/styles/src/styleTree/contactFinder.ts @@ -3,7 +3,7 @@ import { ColorScheme } from "../theme/colorScheme" import { background, border, foreground, text } from "./components" export default function contactFinder(colorScheme: ColorScheme): any { - let layer = colorScheme.middle + const layer = colorScheme.middle const sideMargin = 6 const contactButton = { diff --git a/styles/src/styleTree/contactList.ts b/styles/src/styleTree/contactList.ts index 88ae04277eea5e0b8417da48f38495d513a8a03e..9194e809ee3c24148ed3113a6f5b16fe842019c2 100644 --- a/styles/src/styleTree/contactList.ts +++ b/styles/src/styleTree/contactList.ts @@ -1,11 +1,11 @@ import { ColorScheme } from "../theme/colorScheme" import { background, border, borderColor, foreground, text } from "./components" import { interactive, toggleable } from "../element" -export default function contactsPanel(colorScheme: ColorScheme) { +export default function contactsPanel(colorScheme: ColorScheme): any { const nameMargin = 8 const sidePadding = 12 - let layer = colorScheme.middle + const layer = colorScheme.middle const contactButton = { background: background(layer, "on"), diff --git a/styles/src/styleTree/contactNotification.ts b/styles/src/styleTree/contactNotification.ts index 825c5a389acf7bfd522e45557d4b775a3116ba60..450f927535ecf7a8ee596e1c32e03acf4d2d9bf4 100644 --- a/styles/src/styleTree/contactNotification.ts +++ b/styles/src/styleTree/contactNotification.ts @@ -4,8 +4,8 @@ import { interactive } from "../element" const avatarSize = 12 const headerPadding = 8 -export default function contactNotification(colorScheme: ColorScheme): Object { - let layer = colorScheme.lowest +export default function contactNotification(colorScheme: ColorScheme): any { + const layer = colorScheme.lowest return { headerAvatar: { height: avatarSize, diff --git a/styles/src/styleTree/contactsPopover.ts b/styles/src/styleTree/contactsPopover.ts index 5946bfb82cf01712d19453a8b3f57018f8eac2b8..6d9f84322d6fe75982d7970e86035f81e2d5c386 100644 --- a/styles/src/styleTree/contactsPopover.ts +++ b/styles/src/styleTree/contactsPopover.ts @@ -1,9 +1,8 @@ import { ColorScheme } from "../theme/colorScheme" -import { background, border, text } from "./components" +import { background, border } from "./components" -export default function contactsPopover(colorScheme: ColorScheme) { - let layer = colorScheme.middle - const sidePadding = 12 +export default function contactsPopover(colorScheme: ColorScheme): any { + const layer = colorScheme.middle return { background: background(layer), cornerRadius: 6, diff --git a/styles/src/styleTree/contextMenu.ts b/styles/src/styleTree/contextMenu.ts index a59284c43a4a096e0cd7a739dc5b76ab0158ded5..1064eedd0dc79615aede6fa3faed1387ab04e140 100644 --- a/styles/src/styleTree/contextMenu.ts +++ b/styles/src/styleTree/contextMenu.ts @@ -2,8 +2,8 @@ import { ColorScheme } from "../theme/colorScheme" import { background, border, borderColor, text } from "./components" import { interactive, toggleable } from "../element" -export default function contextMenu(colorScheme: ColorScheme) { - let layer = colorScheme.middle +export default function contextMenu(colorScheme: ColorScheme): any { + const layer = colorScheme.middle return { background: background(layer), cornerRadius: 10, diff --git a/styles/src/styleTree/copilot.ts b/styles/src/styleTree/copilot.ts index 1e09f4ff6b5f9c4c6a8ab9818cd16ede7d58a5e1..2f82e94c43923740b66e5512022d00d1a2f9d585 100644 --- a/styles/src/styleTree/copilot.ts +++ b/styles/src/styleTree/copilot.ts @@ -1,12 +1,12 @@ import { ColorScheme } from "../theme/colorScheme" import { background, border, foreground, svg, text } from "./components" import { interactive } from "../element" -export default function copilot(colorScheme: ColorScheme) { - let layer = colorScheme.middle +export default function copilot(colorScheme: ColorScheme): any { + const layer = colorScheme.middle - let content_width = 264 + const content_width = 264 - let ctaButton = + const ctaButton = // Copied from welcome screen. FIXME: Move this into a ZDS component interactive({ base: { diff --git a/styles/src/styleTree/editor.ts b/styles/src/styleTree/editor.ts index c53f3ba2ff54d7ec2c48547f4bd77236cad85b77..71c34207eb91705f5a6d48b67549c8987a6d154d 100644 --- a/styles/src/styleTree/editor.ts +++ b/styles/src/styleTree/editor.ts @@ -6,10 +6,10 @@ import hoverPopover from "./hoverPopover" import { buildSyntax } from "../theme/syntax" import { interactive, toggleable } from "../element" -export default function editor(colorScheme: ColorScheme) { +export default function editor(colorScheme: ColorScheme): any { const { isLight } = colorScheme - let layer = colorScheme.highest + const layer = colorScheme.highest const autocompleteItem = { cornerRadius: 6, diff --git a/styles/src/styleTree/feedback.ts b/styles/src/styleTree/feedback.ts index c98cbe768faa2495e5fde6099b685ce4103d0ecb..9b66015dc64ee1aa8c42dd005479643100b62ad4 100644 --- a/styles/src/styleTree/feedback.ts +++ b/styles/src/styleTree/feedback.ts @@ -2,8 +2,8 @@ import { ColorScheme } from "../theme/colorScheme" import { background, border, text } from "./components" import { interactive } from "../element" -export default function feedback(colorScheme: ColorScheme) { - let layer = colorScheme.highest +export default function feedback(colorScheme: ColorScheme): any { + const layer = colorScheme.highest return { submit_button: interactive({ diff --git a/styles/src/styleTree/hoverPopover.ts b/styles/src/styleTree/hoverPopover.ts index f8988f1f3a42a2791ad70f2128f4454283dc744c..9e2f8d0a785f1d27744a4e97254e3246aad4a9c6 100644 --- a/styles/src/styleTree/hoverPopover.ts +++ b/styles/src/styleTree/hoverPopover.ts @@ -1,9 +1,9 @@ import { ColorScheme } from "../theme/colorScheme" import { background, border, foreground, text } from "./components" -export default function HoverPopover(colorScheme: ColorScheme) { - let layer = colorScheme.middle - let baseContainer = { +export default function HoverPopover(colorScheme: ColorScheme): any { + const layer = colorScheme.middle + const baseContainer = { background: background(layer), cornerRadius: 8, padding: { diff --git a/styles/src/styleTree/incomingCallNotification.ts b/styles/src/styleTree/incomingCallNotification.ts index c42558059c7b74be4e384c169049cf0c0155a956..6249bfb6934ae1c074743b61bd95f3fdc0d99f0f 100644 --- a/styles/src/styleTree/incomingCallNotification.ts +++ b/styles/src/styleTree/incomingCallNotification.ts @@ -3,8 +3,8 @@ import { background, border, text } from "./components" export default function incomingCallNotification( colorScheme: ColorScheme -): Object { - let layer = colorScheme.middle +): unknown { + const layer = colorScheme.middle const avatarSize = 48 return { windowHeight: 74, diff --git a/styles/src/styleTree/picker.ts b/styles/src/styleTree/picker.ts index 5501bd4df2f5cd0cd21bcf53f5aa5d307e6ed0e6..aaf2740a6e0419aa51b4c61d51bd034edbff210e 100644 --- a/styles/src/styleTree/picker.ts +++ b/styles/src/styleTree/picker.ts @@ -4,7 +4,7 @@ import { background, border, text } from "./components" import { interactive, toggleable } from "../element" export default function picker(colorScheme: ColorScheme): any { - let layer = colorScheme.lowest + const layer = colorScheme.lowest const container = { background: background(layer), border: border(layer), diff --git a/styles/src/styleTree/projectDiagnostics.ts b/styles/src/styleTree/projectDiagnostics.ts index cf0f07dd8c519d6c8476dabc71fb57bc1e21971f..d2c2152ab416a976ce7ca8098c04b1cf8600af8b 100644 --- a/styles/src/styleTree/projectDiagnostics.ts +++ b/styles/src/styleTree/projectDiagnostics.ts @@ -1,8 +1,8 @@ import { ColorScheme } from "../theme/colorScheme" import { background, text } from "./components" -export default function projectDiagnostics(colorScheme: ColorScheme) { - let layer = colorScheme.highest +export default function projectDiagnostics(colorScheme: ColorScheme): any { + const layer = colorScheme.highest return { background: background(layer), tabIconSpacing: 4, diff --git a/styles/src/styleTree/projectPanel.ts b/styles/src/styleTree/projectPanel.ts index 3727c1916cb9cd1929de316a6c81f000468b56c5..de4a98df53fd1b038e370365d392b8432d72329b 100644 --- a/styles/src/styleTree/projectPanel.ts +++ b/styles/src/styleTree/projectPanel.ts @@ -10,10 +10,10 @@ import { } from "./components" import { interactive, toggleable } from "../element" import merge from "ts-deepmerge" -export default function projectPanel(colorScheme: ColorScheme) { +export default function projectPanel(colorScheme: ColorScheme): any { const { isLight } = colorScheme - let layer = colorScheme.middle + const layer = colorScheme.middle type EntryStateProps = { background?: string diff --git a/styles/src/styleTree/projectSharedNotification.ts b/styles/src/styleTree/projectSharedNotification.ts index d05eb1b0c51953b34ac7b08727c81447a66bc047..c114e17176a20cd524552e155df923e2e6c37cc6 100644 --- a/styles/src/styleTree/projectSharedNotification.ts +++ b/styles/src/styleTree/projectSharedNotification.ts @@ -3,8 +3,8 @@ import { background, border, text } from "./components" export default function projectSharedNotification( colorScheme: ColorScheme -): Object { - let layer = colorScheme.middle +): unknown { + const layer = colorScheme.middle const avatarSize = 48 return { diff --git a/styles/src/styleTree/search.ts b/styles/src/styleTree/search.ts index 9a86d1d558db1c6a7d54e86e693c4bac8f076aea..9ecad3ab1973f61c11439f9c50c1f4093c022fe4 100644 --- a/styles/src/styleTree/search.ts +++ b/styles/src/styleTree/search.ts @@ -3,7 +3,7 @@ import { withOpacity } from "../theme/color" import { background, border, foreground, text } from "./components" import { interactive, toggleable } from "../element" -export default function search(colorScheme: ColorScheme): unknown { +export default function search(colorScheme: ColorScheme): any { const layer = colorScheme.highest // Search input diff --git a/styles/src/styleTree/sharedScreen.ts b/styles/src/styleTree/sharedScreen.ts index a58e7e022290ec9bc0f3b79aea1d17f50fd9fd62..59968d59499c10cf03904bebb7270e47036dab11 100644 --- a/styles/src/styleTree/sharedScreen.ts +++ b/styles/src/styleTree/sharedScreen.ts @@ -2,8 +2,10 @@ import { ColorScheme } from "../theme/colorScheme" import { StyleTree } from "../types" import { background } from "./components" -export default function sharedScreen(colorScheme: ColorScheme): StyleTree.SharedScreen { - let layer = colorScheme.highest +export default function sharedScreen( + colorScheme: ColorScheme +): StyleTree.SharedScreen { + const layer = colorScheme.highest return { background: background(layer), } diff --git a/styles/src/styleTree/simpleMessageNotification.ts b/styles/src/styleTree/simpleMessageNotification.ts index e894db3514ad19f70f24a0458c303b397f426f8a..99dc878a79a4b44c54c5e9a90a3647c4a922523c 100644 --- a/styles/src/styleTree/simpleMessageNotification.ts +++ b/styles/src/styleTree/simpleMessageNotification.ts @@ -6,8 +6,8 @@ const headerPadding = 8 export default function simpleMessageNotification( colorScheme: ColorScheme -): Object { - let layer = colorScheme.middle +): unknown { + const layer = colorScheme.middle return { message: { ...text(layer, "sans", { size: "xs" }), diff --git a/styles/src/styleTree/statusBar.ts b/styles/src/styleTree/statusBar.ts index 339e2e40cf25535ac5e682b059bbe8e504e61bbf..6ca53afb187b866e4a3a5bfa561db992845538c0 100644 --- a/styles/src/styleTree/statusBar.ts +++ b/styles/src/styleTree/statusBar.ts @@ -1,8 +1,8 @@ import { ColorScheme } from "../theme/colorScheme" import { background, border, foreground, text } from "./components" import { interactive, toggleable } from "../element" -export default function statusBar(colorScheme: ColorScheme) { - let layer = colorScheme.lowest +export default function statusBar(colorScheme: ColorScheme): any { + const layer = colorScheme.lowest const statusContainer = { cornerRadius: 6, diff --git a/styles/src/styleTree/tabBar.ts b/styles/src/styleTree/tabBar.ts index af35a8fef4c379471f172950f96520626045a14c..ae9512d8ce57a50482892c22d860bcb7a5db7084 100644 --- a/styles/src/styleTree/tabBar.ts +++ b/styles/src/styleTree/tabBar.ts @@ -3,11 +3,11 @@ import { withOpacity } from "../theme/color" import { text, border, background, foreground } from "./components" import { interactive, toggleable } from "../element" -export default function tabBar(colorScheme: ColorScheme) { +export default function tabBar(colorScheme: ColorScheme): any { const height = 32 - let activeLayer = colorScheme.highest - let layer = colorScheme.middle + const activeLayer = colorScheme.highest + const layer = colorScheme.middle const tab = { height, diff --git a/styles/src/styleTree/titlebar.ts b/styles/src/styleTree/titlebar.ts index 3c7318a56e5015ce4f4a9e5b3fb00cd94e2b4ca5..a5bcdc9492d38a20f0e2863884f0ac9b2c447f44 100644 --- a/styles/src/styleTree/titlebar.ts +++ b/styles/src/styleTree/titlebar.ts @@ -155,7 +155,7 @@ function user_menu(theme: ColorScheme) { } } -export function titlebar(theme: ColorScheme) { +export function titlebar(theme: ColorScheme): any { const avatarWidth = 15 const avatarOuterWidth = avatarWidth + 4 const followerAvatarWidth = 14 diff --git a/styles/src/styleTree/toggle.ts b/styles/src/styleTree/toggle.ts deleted file mode 100644 index 2b6858e15be6c3db85232371ba38e0bc9127ea33..0000000000000000000000000000000000000000 --- a/styles/src/styleTree/toggle.ts +++ /dev/null @@ -1,47 +0,0 @@ -import merge from "ts-deepmerge" - -type ToggleState = "inactive" | "active" - -type Toggleable = Record - -const NO_INACTIVE_OR_BASE_ERROR = - "A toggleable object must have an inactive state, or a base property." -const NO_ACTIVE_ERROR = "A toggleable object must have an active state." - -interface ToggleableProps { - base?: T - state: Partial> -} - -/** - * Helper function for creating Toggleable objects. - * @template T The type of the object being toggled. - * @param props Object containing the base (inactive) state and state modifications to create the active state. - * @returns A Toggleable object containing both the inactive and active states. - * @example - * ``` - * toggleable({ - * base: { background: "#000000", text: "#CCCCCC" }, - * state: { active: { text: "#CCCCCC" } }, - * }) - * ``` - */ -export function toggleable( - props: ToggleableProps -): Toggleable { - const { base, state } = props - - if (!base && !state.inactive) throw new Error(NO_INACTIVE_OR_BASE_ERROR) - if (!state.active) throw new Error(NO_ACTIVE_ERROR) - - const inactiveState = base - ? ((state.inactive ? merge(base, state.inactive) : base) as T) - : (state.inactive as T) - - const toggleObj: Toggleable = { - inactive: inactiveState, - active: merge(base ?? {}, state.active) as T, - } - - return toggleObj -} diff --git a/styles/src/styleTree/toolbarDropdownMenu.ts b/styles/src/styleTree/toolbarDropdownMenu.ts index d82e5f1cde6ed4543dc3bbf4b9f3d224952da33e..4eff06026b0551e3671578ca644481eaf2135f46 100644 --- a/styles/src/styleTree/toolbarDropdownMenu.ts +++ b/styles/src/styleTree/toolbarDropdownMenu.ts @@ -1,8 +1,8 @@ import { ColorScheme } from "../theme/colorScheme" import { background, border, text } from "./components" import { interactive, toggleable } from "../element" -export default function dropdownMenu(colorScheme: ColorScheme) { - let layer = colorScheme.middle +export default function dropdownMenu(colorScheme: ColorScheme): any { + const layer = colorScheme.middle return { rowHeight: 30, diff --git a/styles/src/styleTree/tooltip.ts b/styles/src/styleTree/tooltip.ts index 1666ce5658776bd8c3072ee98a3233bcb8cf5a68..fb896112a9990059c90e2785ee475999f478b11a 100644 --- a/styles/src/styleTree/tooltip.ts +++ b/styles/src/styleTree/tooltip.ts @@ -1,8 +1,8 @@ import { ColorScheme } from "../theme/colorScheme" import { background, border, text } from "./components" -export default function tooltip(colorScheme: ColorScheme) { - let layer = colorScheme.middle +export default function tooltip(colorScheme: ColorScheme): any { + const layer = colorScheme.middle return { background: background(layer), border: border(layer), diff --git a/styles/src/styleTree/updateNotification.ts b/styles/src/styleTree/updateNotification.ts index c6ef81c667c77a3235aece08e1f8f7256b012e6c..bf792ffc7b5bfa04b948b8fa4d66264d33b53b51 100644 --- a/styles/src/styleTree/updateNotification.ts +++ b/styles/src/styleTree/updateNotification.ts @@ -4,8 +4,8 @@ import { interactive } from "../element" const headerPadding = 8 -export default function updateNotification(colorScheme: ColorScheme): Object { - let layer = colorScheme.middle +export default function updateNotification(colorScheme: ColorScheme): any { + const layer = colorScheme.middle return { message: { ...text(layer, "sans", { size: "xs" }), diff --git a/styles/src/styleTree/welcome.ts b/styles/src/styleTree/welcome.ts index 3b3eeba53ad273862d09427b88ac999ee994f8c1..c64a17b5f60ec194ac167710cd845aafb8da2296 100644 --- a/styles/src/styleTree/welcome.ts +++ b/styles/src/styleTree/welcome.ts @@ -10,7 +10,7 @@ import { } from "./components" import { interactive } from "../element" -export default function welcome(colorScheme: ColorScheme) { +export default function welcome(colorScheme: ColorScheme): any { const layer = colorScheme.highest const checkboxBase = { diff --git a/styles/src/styleTree/workspace.ts b/styles/src/styleTree/workspace.ts index afc2ea4d9869f0ade31bdac1840f80ba131215d6..5f5da7e47ea5ccadfa41189f155813a83b9adc3f 100644 --- a/styles/src/styleTree/workspace.ts +++ b/styles/src/styleTree/workspace.ts @@ -13,7 +13,7 @@ import tabBar from "./tabBar" import { interactive } from "../element" import { titlebar } from "./titlebar" -export default function workspace(colorScheme: ColorScheme) { +export default function workspace(colorScheme: ColorScheme): any { const layer = colorScheme.lowest const isLight = colorScheme.isLight diff --git a/styles/src/system/lib/convert.ts b/styles/src/system/lib/convert.ts deleted file mode 100644 index 998f95a636383d9e2c622133f2e2c09a17336672..0000000000000000000000000000000000000000 --- a/styles/src/system/lib/convert.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** Converts a percentage scale value (0-100) to normalized scale (0-1) value. */ -export function percentageToNormalized(value: number) { - const normalized = value / 100 - return normalized -} - -/** Converts a normalized scale (0-1) value to a percentage scale (0-100) value. */ -export function normalizedToPercetage(value: number) { - const percentage = value * 100 - return percentage -} diff --git a/styles/src/system/lib/curve.ts b/styles/src/system/lib/curve.ts deleted file mode 100644 index b24f2948cf3f2b6e4c47ee36d4dd5ed9934fa28b..0000000000000000000000000000000000000000 --- a/styles/src/system/lib/curve.ts +++ /dev/null @@ -1,26 +0,0 @@ -import bezier from "bezier-easing" -import { Curve } from "../ref/curves" - -/** - * Formats our Curve data structure into a bezier easing function. - * @param {Curve} curve - The curve to format. - * @param {Boolean} inverted - Whether or not to invert the curve. - * @returns {EasingFunction} The formatted easing function. - */ -export function curve(curve: Curve, inverted?: Boolean) { - if (inverted) { - return bezier( - curve.value[3], - curve.value[2], - curve.value[1], - curve.value[0] - ) - } - - return bezier( - curve.value[0], - curve.value[1], - curve.value[2], - curve.value[3] - ) -} diff --git a/styles/src/system/lib/generate.ts b/styles/src/system/lib/generate.ts deleted file mode 100644 index 40f7a9154c18d7b7a6cabba474eb2befb56af492..0000000000000000000000000000000000000000 --- a/styles/src/system/lib/generate.ts +++ /dev/null @@ -1,159 +0,0 @@ -import bezier from "bezier-easing" -import chroma from "chroma-js" -import { Color, ColorFamily, ColorFamilyConfig, ColorScale } from "../types" -import { percentageToNormalized } from "./convert" -import { curve } from "./curve" - -// Re-export interface in a more standard format -export type EasingFunction = bezier.EasingFunction - -/** - * Generates a color, outputs it in multiple formats, and returns a variety of useful metadata. - * - * @param {EasingFunction} hueEasing - An easing function for the hue component of the color. - * @param {EasingFunction} saturationEasing - An easing function for the saturation component of the color. - * @param {EasingFunction} lightnessEasing - An easing function for the lightness component of the color. - * @param {ColorFamilyConfig} family - Configuration for the color family. - * @param {number} step - The current step. - * @param {number} steps - The total number of steps in the color scale. - * - * @returns {Color} The generated color, with its calculated contrast against black and white, as well as its LCH values, RGBA array, hexadecimal representation, and a flag indicating if it is light or dark. - */ -function generateColor( - hueEasing: EasingFunction, - saturationEasing: EasingFunction, - lightnessEasing: EasingFunction, - family: ColorFamilyConfig, - step: number, - steps: number -) { - const { hue, saturation, lightness } = family.color - - const stepHue = hueEasing(step / steps) * (hue.end - hue.start) + hue.start - const stepSaturation = - saturationEasing(step / steps) * (saturation.end - saturation.start) + - saturation.start - const stepLightness = - lightnessEasing(step / steps) * (lightness.end - lightness.start) + - lightness.start - - const color = chroma.hsl( - stepHue, - percentageToNormalized(stepSaturation), - percentageToNormalized(stepLightness) - ) - - const contrast = { - black: { - value: chroma.contrast(color, "black"), - aaPass: chroma.contrast(color, "black") >= 4.5, - aaaPass: chroma.contrast(color, "black") >= 7, - }, - white: { - value: chroma.contrast(color, "white"), - aaPass: chroma.contrast(color, "white") >= 4.5, - aaaPass: chroma.contrast(color, "white") >= 7, - }, - } - - const lch = color.lch() - const rgba = color.rgba() - const hex = color.hex() - - // 55 is a magic number. It's the lightness value at which we consider a color to be "light". - // It was picked by eye with some testing. We might want to use a more scientific approach in the future. - const isLight = lch[0] > 55 - - const result: Color = { - step, - lch, - hex, - rgba, - contrast, - isLight, - } - - return result -} - -/** - * Generates a color scale based on a color family configuration. - * - * @param {ColorFamilyConfig} config - The configuration for the color family. - * @param {Boolean} inverted - Specifies whether the color scale should be inverted or not. - * - * @returns {ColorScale} The generated color scale. - * - * @example - * ```ts - * const colorScale = generateColorScale({ - * name: "blue", - * color: { - * hue: { - * start: 210, - * end: 240, - * curve: "easeInOut" - * }, - * saturation: { - * start: 100, - * end: 100, - * curve: "easeInOut" - * }, - * lightness: { - * start: 50, - * end: 50, - * curve: "easeInOut" - * } - * } - * }); - * ``` - */ - -export function generateColorScale( - config: ColorFamilyConfig, - inverted: Boolean = false -) { - const { hue, saturation, lightness } = config.color - - // 101 steps means we get values from 0-100 - const NUM_STEPS = 101 - - const hueEasing = curve(hue.curve, inverted) - const saturationEasing = curve(saturation.curve, inverted) - const lightnessEasing = curve(lightness.curve, inverted) - - let scale: ColorScale = { - colors: [], - values: [], - } - - for (let i = 0; i < NUM_STEPS; i++) { - const color = generateColor( - hueEasing, - saturationEasing, - lightnessEasing, - config, - i, - NUM_STEPS - ) - - scale.colors.push(color) - scale.values.push(color.hex) - } - - return scale -} - -/** Generates a color family with a scale and an inverted scale. */ -export function generateColorFamily(config: ColorFamilyConfig) { - const scale = generateColorScale(config, false) - const invertedScale = generateColorScale(config, true) - - const family: ColorFamily = { - name: config.name, - scale, - invertedScale, - } - - return family -} diff --git a/styles/src/system/ref/color.ts b/styles/src/system/ref/color.ts deleted file mode 100644 index 6c0b53c35b08284643d316bbb0f49161c8ab25f8..0000000000000000000000000000000000000000 --- a/styles/src/system/ref/color.ts +++ /dev/null @@ -1,445 +0,0 @@ -import { generateColorFamily } from "../lib/generate" -import { curve } from "./curves" - -// These are the source colors for the color scales in the system. -// These should never directly be used directly in components or themes as they generate thousands of lines of code. -// Instead, use the outputs from the reference palette which exports a smaller subset of colors. - -// Token or user-facing colors should use short, clear names and a 100-900 scale to match the font weight scale. - -// Light Gray ======================================== // - -export const lightgray = generateColorFamily({ - name: "lightgray", - color: { - hue: { - start: 210, - end: 210, - curve: curve.linear, - }, - saturation: { - start: 10, - end: 15, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 50, - curve: curve.linear, - }, - }, -}) - -// Light Dark ======================================== // - -export const darkgray = generateColorFamily({ - name: "darkgray", - color: { - hue: { - start: 210, - end: 210, - curve: curve.linear, - }, - saturation: { - start: 15, - end: 20, - curve: curve.saturation, - }, - lightness: { - start: 55, - end: 8, - curve: curve.linear, - }, - }, -}) - -// Red ======================================== // - -export const red = generateColorFamily({ - name: "red", - color: { - hue: { - start: 0, - end: 0, - curve: curve.linear, - }, - saturation: { - start: 95, - end: 75, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 25, - curve: curve.lightness, - }, - }, -}) - -// Sunset ======================================== // - -export const sunset = generateColorFamily({ - name: "sunset", - color: { - hue: { - start: 15, - end: 15, - curve: curve.linear, - }, - saturation: { - start: 100, - end: 90, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 25, - curve: curve.lightness, - }, - }, -}) - -// Orange ======================================== // - -export const orange = generateColorFamily({ - name: "orange", - color: { - hue: { - start: 25, - end: 25, - curve: curve.linear, - }, - saturation: { - start: 100, - end: 95, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 20, - curve: curve.lightness, - }, - }, -}) - -// Amber ======================================== // - -export const amber = generateColorFamily({ - name: "amber", - color: { - hue: { - start: 38, - end: 38, - curve: curve.linear, - }, - saturation: { - start: 100, - end: 100, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 18, - curve: curve.lightness, - }, - }, -}) - -// Yellow ======================================== // - -export const yellow = generateColorFamily({ - name: "yellow", - color: { - hue: { - start: 48, - end: 48, - curve: curve.linear, - }, - saturation: { - start: 90, - end: 100, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 15, - curve: curve.lightness, - }, - }, -}) - -// Lemon ======================================== // - -export const lemon = generateColorFamily({ - name: "lemon", - color: { - hue: { - start: 55, - end: 55, - curve: curve.linear, - }, - saturation: { - start: 85, - end: 95, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 15, - curve: curve.lightness, - }, - }, -}) - -// Citron ======================================== // - -export const citron = generateColorFamily({ - name: "citron", - color: { - hue: { - start: 70, - end: 70, - curve: curve.linear, - }, - saturation: { - start: 85, - end: 90, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 15, - curve: curve.lightness, - }, - }, -}) - -// Lime ======================================== // - -export const lime = generateColorFamily({ - name: "lime", - color: { - hue: { - start: 85, - end: 85, - curve: curve.linear, - }, - saturation: { - start: 85, - end: 80, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 18, - curve: curve.lightness, - }, - }, -}) - -// Green ======================================== // - -export const green = generateColorFamily({ - name: "green", - color: { - hue: { - start: 108, - end: 108, - curve: curve.linear, - }, - saturation: { - start: 60, - end: 70, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 18, - curve: curve.lightness, - }, - }, -}) - -// Mint ======================================== // - -export const mint = generateColorFamily({ - name: "mint", - color: { - hue: { - start: 142, - end: 142, - curve: curve.linear, - }, - saturation: { - start: 60, - end: 75, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 20, - curve: curve.lightness, - }, - }, -}) - -// Cyan ======================================== // - -export const cyan = generateColorFamily({ - name: "cyan", - color: { - hue: { - start: 179, - end: 179, - curve: curve.linear, - }, - saturation: { - start: 70, - end: 80, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 20, - curve: curve.lightness, - }, - }, -}) - -// Sky ======================================== // - -export const sky = generateColorFamily({ - name: "sky", - color: { - hue: { - start: 195, - end: 205, - curve: curve.linear, - }, - saturation: { - start: 85, - end: 90, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 15, - curve: curve.lightness, - }, - }, -}) - -// Blue ======================================== // - -export const blue = generateColorFamily({ - name: "blue", - color: { - hue: { - start: 218, - end: 218, - curve: curve.linear, - }, - saturation: { - start: 85, - end: 70, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 15, - curve: curve.lightness, - }, - }, -}) - -// Indigo ======================================== // - -export const indigo = generateColorFamily({ - name: "indigo", - color: { - hue: { - start: 245, - end: 245, - curve: curve.linear, - }, - saturation: { - start: 60, - end: 50, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 22, - curve: curve.lightness, - }, - }, -}) - -// Purple ======================================== // - -export const purple = generateColorFamily({ - name: "purple", - color: { - hue: { - start: 260, - end: 270, - curve: curve.linear, - }, - saturation: { - start: 65, - end: 55, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 20, - curve: curve.lightness, - }, - }, -}) - -// Pink ======================================== // - -export const pink = generateColorFamily({ - name: "pink", - color: { - hue: { - start: 320, - end: 330, - curve: curve.linear, - }, - saturation: { - start: 70, - end: 65, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 32, - curve: curve.lightness, - }, - }, -}) - -// Rose ======================================== // - -export const rose = generateColorFamily({ - name: "rose", - color: { - hue: { - start: 345, - end: 345, - curve: curve.linear, - }, - saturation: { - start: 90, - end: 70, - curve: curve.saturation, - }, - lightness: { - start: 97, - end: 32, - curve: curve.lightness, - }, - }, -}) diff --git a/styles/src/system/ref/curves.ts b/styles/src/system/ref/curves.ts deleted file mode 100644 index 02002dbe9befd605b3a57400684b2f37bf7b642b..0000000000000000000000000000000000000000 --- a/styles/src/system/ref/curves.ts +++ /dev/null @@ -1,25 +0,0 @@ -export interface Curve { - name: string - value: number[] -} - -export interface Curves { - lightness: Curve - saturation: Curve - linear: Curve -} - -export const curve: Curves = { - lightness: { - name: "lightnessCurve", - value: [0.2, 0, 0.75, 1.0], - }, - saturation: { - name: "saturationCurve", - value: [0.67, 0.6, 0.55, 1.0], - }, - linear: { - name: "linear", - value: [0.5, 0.5, 0.5, 0.5], - }, -} diff --git a/styles/src/system/system.ts b/styles/src/system/system.ts deleted file mode 100644 index 619b0795c89770920b886c20a508da23d9b6eed9..0000000000000000000000000000000000000000 --- a/styles/src/system/system.ts +++ /dev/null @@ -1,32 +0,0 @@ -import chroma from "chroma-js" -import * as colorFamily from "./ref/color" - -const color = { - lightgray: chroma - .scale(colorFamily.lightgray.scale.values) - .mode("lch") - .colors(9), - darkgray: chroma - .scale(colorFamily.darkgray.scale.values) - .mode("lch") - .colors(9), - red: chroma.scale(colorFamily.red.scale.values).mode("lch").colors(9), - sunset: chroma.scale(colorFamily.sunset.scale.values).mode("lch").colors(9), - orange: chroma.scale(colorFamily.orange.scale.values).mode("lch").colors(9), - amber: chroma.scale(colorFamily.amber.scale.values).mode("lch").colors(9), - yellow: chroma.scale(colorFamily.yellow.scale.values).mode("lch").colors(9), - lemon: chroma.scale(colorFamily.lemon.scale.values).mode("lch").colors(9), - citron: chroma.scale(colorFamily.citron.scale.values).mode("lch").colors(9), - lime: chroma.scale(colorFamily.lime.scale.values).mode("lch").colors(9), - green: chroma.scale(colorFamily.green.scale.values).mode("lch").colors(9), - mint: chroma.scale(colorFamily.mint.scale.values).mode("lch").colors(9), - cyan: chroma.scale(colorFamily.cyan.scale.values).mode("lch").colors(9), - sky: chroma.scale(colorFamily.sky.scale.values).mode("lch").colors(9), - blue: chroma.scale(colorFamily.blue.scale.values).mode("lch").colors(9), - indigo: chroma.scale(colorFamily.indigo.scale.values).mode("lch").colors(9), - purple: chroma.scale(colorFamily.purple.scale.values).mode("lch").colors(9), - pink: chroma.scale(colorFamily.pink.scale.values).mode("lch").colors(9), - rose: chroma.scale(colorFamily.rose.scale.values).mode("lch").colors(9), -} - -export { color } diff --git a/styles/src/system/types.ts b/styles/src/system/types.ts deleted file mode 100644 index 8de65a37eb131ba412fe269529106d58070669ee..0000000000000000000000000000000000000000 --- a/styles/src/system/types.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Curve } from "./ref/curves" - -export interface ColorAccessibilityValue { - value: number - aaPass: boolean - aaaPass: boolean -} - -/** - * Calculates the color contrast between a specified color and its corresponding background and foreground colors. - * - * @note This implementation is currently basic – Currently we only calculate contrasts against black and white, in the future will allow for dynamic color contrast calculation based on the colors present in a given palette. - * @note The goal is to align with WCAG3 accessibility standards as they become stabilized. See the [WCAG 3 Introduction](https://www.w3.org/WAI/standards-guidelines/wcag/wcag3-intro/) for more information. - */ -export interface ColorAccessibility { - black: ColorAccessibilityValue - white: ColorAccessibilityValue -} - -export type Color = { - step: number - contrast: ColorAccessibility - hex: string - lch: number[] - rgba: number[] - isLight: boolean -} - -export interface ColorScale { - colors: Color[] - // An array of hex values for each color in the scale - values: string[] -} - -export type ColorFamily = { - name: string - scale: ColorScale - invertedScale: ColorScale -} - -export interface ColorFamilyHue { - start: number - end: number - curve: Curve -} - -export interface ColorFamilySaturation { - start: number - end: number - curve: Curve -} - -export interface ColorFamilyLightness { - start: number - end: number - curve: Curve -} - -export interface ColorFamilyConfig { - name: string - color: { - hue: ColorFamilyHue - saturation: ColorFamilySaturation - lightness: ColorFamilyLightness - } -} diff --git a/styles/src/theme/colorScheme.ts b/styles/src/theme/colorScheme.ts index 9a810730867ad82fa57265a8232ab397a51d84f4..ea3b1b9b2980be2651258f4f064658b28f13efca 100644 --- a/styles/src/theme/colorScheme.ts +++ b/styles/src/theme/colorScheme.ts @@ -218,9 +218,9 @@ function buildStyleSet( ramp: Scale, backgroundBase: number, foregroundBase: number, - step: number = 0.08 + step = 0.08 ): StyleSet { - let styleDefinitions = buildStyleDefinition( + const styleDefinitions = buildStyleDefinition( backgroundBase, foregroundBase, step @@ -255,7 +255,7 @@ function buildStyleSet( function buildStyleDefinition( bgBase: number, fgBase: number, - step: number = 0.08 + step = 0.08 ) { return { background: { diff --git a/styles/src/theme/ramps.ts b/styles/src/theme/ramps.ts index f8c44ba3f97e5c24814d5df68ce58a8a97aafb72..de1f8ee0d4ca6bb33853ef65fa67eb16f715a9ce 100644 --- a/styles/src/theme/ramps.ts +++ b/styles/src/theme/ramps.ts @@ -6,8 +6,8 @@ import { } from "./themeConfig" export function colorRamp(color: Color): Scale { - let endColor = color.desaturate(1).brighten(5) - let startColor = color.desaturate(1).darken(4) + const endColor = color.desaturate(1).brighten(5) + const startColor = color.desaturate(1).darken(4) return chroma.scale([startColor, color, endColor]).mode("lab") } @@ -18,15 +18,15 @@ export function colorRamp(color: Color): Scale { theme so that we don't modify the passed in ramps. This combined with an error in the type definitions for chroma js means we have to cast the colors function to any in order to get the colors back out from the original ramps. - * @param isLight - * @param colorRamps - * @returns + * @param isLight + * @param colorRamps + * @returns */ export function getRamps( isLight: boolean, colorRamps: ThemeConfigInputColors ): RampSet { - const ramps: RampSet = {} as any + const ramps: RampSet = {} as any // eslint-disable-line @typescript-eslint/no-explicit-any const colorsKeys = Object.keys(colorRamps) as ThemeConfigInputColorsKeys[] if (isLight) { diff --git a/styles/src/theme/syntax.ts b/styles/src/theme/syntax.ts index 369fceb070ea906178b1dc5b7ee37ff2d737df60..a35013c1e9a941cd07cefa7c8d990213e8df1b8c 100644 --- a/styles/src/theme/syntax.ts +++ b/styles/src/theme/syntax.ts @@ -56,7 +56,7 @@ export interface Syntax { // == Types ====== / // We allow Function here because all JS objects literals have this property - constructor: SyntaxHighlightStyle | Function + constructor: SyntaxHighlightStyle | Function // eslint-disable-line @typescript-eslint/ban-types variant: SyntaxHighlightStyle type: SyntaxHighlightStyle // js: predefined_type diff --git a/styles/src/themes/gruvbox/gruvbox-common.ts b/styles/src/themes/gruvbox/gruvbox-common.ts index 18e8c5b97e5e75f050f83ff9605f3a68ca0bf110..37850fe019c1bc186b21de6a59a2bc930a139eec 100644 --- a/styles/src/themes/gruvbox/gruvbox-common.ts +++ b/styles/src/themes/gruvbox/gruvbox-common.ts @@ -177,30 +177,29 @@ const buildVariant = (variant: Variant): ThemeConfig => { let neutral: string[] = [] switch (variant.name) { - case "Dark Hard": { + case "Dark Hard": neutral = darkHardNeutral break - } - case "Dark": { + + case "Dark": neutral = darkNeutral break - } - case "Dark Soft": { + + case "Dark Soft": neutral = darkSoftNeutral break - } - case "Light Hard": { + + case "Light Hard": neutral = lightHardNeutral break - } - case "Light": { + + case "Light": neutral = lightNeutral break - } - case "Light Soft": { + + case "Light Soft": neutral = lightSoftNeutral break - } } const ramps = { diff --git a/styles/src/types/element.ts b/styles/src/types/element.ts index 6f6bb91e58df016b0a46266ac73ac7b0d84743f5..d6da5f9b714d05db89181d41702c6db1d9273569 100644 --- a/styles/src/types/element.ts +++ b/styles/src/types/element.ts @@ -1,4 +1,4 @@ import { Clean } from "./util" -import * as zed from './zed' +import * as zed from "./zed" export type Text = Clean diff --git a/styles/src/types/index.ts b/styles/src/types/index.ts index e1f55a97e2228acb5e8eaa5e02a32f50beec905c..3a017feb280589b65ea35966bb8bc1368b29c72e 100644 --- a/styles/src/types/index.ts +++ b/styles/src/types/index.ts @@ -1,5 +1,5 @@ -import * as StyleTree from './styleTree' -import * as Property from './property' -import * as Element from './element' +import * as StyleTree from "./styleTree" +import * as Property from "./property" +import * as Element from "./element" export { StyleTree, Property, Element } diff --git a/styles/src/types/property.ts b/styles/src/types/property.ts index 97867c9858774b0672d23e3afca9523f84b691c5..6205b725ef02782478f583c36d700788643488eb 100644 --- a/styles/src/types/property.ts +++ b/styles/src/types/property.ts @@ -1,5 +1,5 @@ -import { Clean } from './util' -import * as zed from './zed' +import { Clean } from "./util" +import * as zed from "./zed" export type Color = zed.Color export type CursorStyle = zed.CursorStyle diff --git a/styles/src/types/styleTree.ts b/styles/src/types/styleTree.ts index c4194ca12d2ff33dec391db443f5bcdc33be577e..08ae6833497367cbb6a90943072cc78f43a37ff5 100644 --- a/styles/src/types/styleTree.ts +++ b/styles/src/types/styleTree.ts @@ -1,29 +1,33 @@ -import { Clean } from './util' -import * as zed from './zed' +import { Clean } from "./util" +import * as zed from "./zed" -export type AssistantStyle = Readonly>; -export type CommandPalette = Readonly>; -export type ContactFinder = Readonly>; -export type ContactList = Readonly>; -export type ContactNotification = Readonly>; -export type ContactsPopover = Readonly>; -export type ContextMenu = Readonly>; -export type Copilot = Readonly>; -export type Editor = Readonly>; -export type FeedbackStyle = Readonly>; -export type IncomingCallNotification = Readonly>; -export type ThemeMeta = Readonly>; -export type Picker = Readonly>; -export type ProjectDiagnostics = Readonly>; -export type ProjectPanel = Readonly>; -export type ProjectSharedNotification = Readonly>; -export type Search = Readonly>; -export type SharedScreen = Readonly>; -export type MessageNotification = Readonly>; -export type TerminalStyle = Readonly>; -export type UserMenu = Readonly>; -export type DropdownMenu = Readonly>; -export type TooltipStyle = Readonly>; -export type UpdateNotification = Readonly>; -export type WelcomeStyle = Readonly>; -export type Workspace = Readonly>; +export type AssistantStyle = Readonly> +export type CommandPalette = Readonly> +export type ContactFinder = Readonly> +export type ContactList = Readonly> +export type ContactNotification = Readonly> +export type ContactsPopover = Readonly> +export type ContextMenu = Readonly> +export type Copilot = Readonly> +export type Editor = Readonly> +export type FeedbackStyle = Readonly> +export type IncomingCallNotification = Readonly< + Clean +> +export type ThemeMeta = Readonly> +export type Picker = Readonly> +export type ProjectDiagnostics = Readonly> +export type ProjectPanel = Readonly> +export type ProjectSharedNotification = Readonly< + Clean +> +export type Search = Readonly> +export type SharedScreen = Readonly> +export type MessageNotification = Readonly> +export type TerminalStyle = Readonly> +export type UserMenu = Readonly> +export type DropdownMenu = Readonly> +export type TooltipStyle = Readonly> +export type UpdateNotification = Readonly> +export type WelcomeStyle = Readonly> +export type Workspace = Readonly> diff --git a/styles/src/types/util.ts b/styles/src/types/util.ts index 851acd4b180217a7b7da5fb1102b528d4440c73d..99a742124a378855ed73125a5d573dee756df455 100644 --- a/styles/src/types/util.ts +++ b/styles/src/types/util.ts @@ -1,15 +1,17 @@ export type Prettify = { - [K in keyof T]: T[K]; -} & unknown; + [K in keyof T]: T[K] +} & unknown /** -* Clean removes the [k: string]: unknown property from an object, -* and Prettifies it, providing better hover information for the type -*/ + * Clean removes the [k: string]: unknown property from an object, + * and Prettifies it, providing better hover information for the type + */ export type Clean = { - [K in keyof T as string extends K ? never : K]: T[K]; + [K in keyof T as string extends K ? never : K]: T[K] } export type DeepClean = { - [K in keyof T as string extends K ? never : K]: T[K] extends object ? DeepClean : T[K]; + [K in keyof T as string extends K ? never : K]: T[K] extends object + ? DeepClean + : T[K] } diff --git a/styles/src/utils/slugify.ts b/styles/src/utils/slugify.ts index b5c3b3c5196f51b29319a826b5e76785455be8b4..04fd4d53bba14be9b7c5e7d2c89231a0066aaf49 100644 --- a/styles/src/utils/slugify.ts +++ b/styles/src/utils/slugify.ts @@ -3,8 +3,8 @@ export function slugify(t: string): string { .toString() .toLowerCase() .replace(/\s+/g, "-") - .replace(/[^\w\-]+/g, "") - .replace(/\-\-+/g, "-") + .replace(/[^\w-]+/g, "") + .replace(/--+/g, "-") .replace(/^-+/, "") .replace(/-+$/, "") } diff --git a/styles/src/utils/snakeCase.ts b/styles/src/utils/snakeCase.ts index 519106470783da85ebee364752a7a4e86eb879e7..38c8a90a9e864177dcea255fa5b87a87da5a9607 100644 --- a/styles/src/utils/snakeCase.ts +++ b/styles/src/utils/snakeCase.ts @@ -5,8 +5,8 @@ import { snakeCase } from "case-anything" // Typescript magic to convert any string from camelCase to snake_case at compile time type SnakeCase = S extends string ? S extends `${infer T}${infer U}` - ? `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` - : S + ? `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` + : S : S type SnakeCased = { @@ -14,7 +14,7 @@ type SnakeCased = { } export default function snakeCaseTree(object: T): SnakeCased { - const snakeObject: any = {} + const snakeObject: any = {} // eslint-disable-line @typescript-eslint/no-explicit-any for (const key in object) { snakeObject[snakeCase(key, { keepSpecialCharacters: true })] = snakeCaseValue(object[key]) @@ -22,6 +22,7 @@ export default function snakeCaseTree(object: T): SnakeCased { return snakeObject } +// eslint-disable-next-line @typescript-eslint/no-explicit-any function snakeCaseValue(value: any): any { if (typeof value === "object") { if (Array.isArray(value)) { diff --git a/styles/tsconfig.json b/styles/tsconfig.json index 7a8ec69927c92bc0a50981c75434336e393fa6d0..cf68509748e64500cdc75f2e64ebecee06265814 100644 --- a/styles/tsconfig.json +++ b/styles/tsconfig.json @@ -21,16 +21,36 @@ "experimentalDecorators": true, "strictPropertyInitialization": false, "skipLibCheck": true, + "useUnknownInCatchVariables": false, "baseUrl": ".", "paths": { - "@/*": ["./*"], - "@element/*": ["./src/element/*"], - "@component/*": ["./src/component/*"], - "@styleTree/*": ["./src/styleTree/*"], - "@theme/*": ["./src/theme/*"], - "@themes/*": ["./src/themes/*"], - "@util/*": ["./src/util/*"] + "@/*": [ + "./*" + ], + "@element/*": [ + "./src/element/*" + ], + "@component/*": [ + "./src/component/*" + ], + "@styleTree/*": [ + "./src/styleTree/*" + ], + "@theme/*": [ + "./src/theme/*" + ], + "@types/*": [ + "./src/util/*" + ], + "@themes/*": [ + "./src/themes/*" + ], + "@util/*": [ + "./src/util/*" + ] } }, - "exclude": ["node_modules"] + "exclude": [ + "node_modules" + ] } From 2e162f8af7e561b504f98b4c47186689044277ff Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Wed, 28 Jun 2023 18:20:43 -0400 Subject: [PATCH 04/13] WIP convert to `snake_case` --- styles/mod.py | 42 +++++++++++ styles/package.json | 8 +- .../{buildLicenses.ts => build_licenses.ts} | 0 .../src/{buildThemes.ts => build_themes.ts} | 6 +- .../src/{buildTokens.ts => build_tokens.ts} | 6 +- styles/src/{buildTypes.ts => build_types.ts} | 1 - styles/src/component/icon_button.ts | 10 +-- styles/src/component/text_button.ts | 10 +-- styles/src/styleTree/app.ts | 75 ------------------- styles/src/style_tree/app.ts | 75 +++++++++++++++++++ .../{styleTree => style_tree}/assistant.ts | 2 +- .../command_palette.ts} | 4 +- .../{styleTree => style_tree}/components.ts | 2 +- .../contact_finder.ts} | 4 +- .../contact_list.ts} | 4 +- .../contact_notification.ts} | 4 +- .../contacts_popover.ts} | 4 +- .../context_menu.ts} | 4 +- .../src/{styleTree => style_tree}/copilot.ts | 2 +- .../src/{styleTree => style_tree}/editor.ts | 18 ++--- .../src/{styleTree => style_tree}/feedback.ts | 2 +- .../hover_popover.ts} | 4 +- .../incoming_call_notification.ts} | 4 +- .../src/{styleTree => style_tree}/picker.ts | 2 +- .../project_diagnostics.ts} | 4 +- .../project_panel.ts} | 28 +++---- .../project_shared_notification.ts} | 4 +- .../src/{styleTree => style_tree}/search.ts | 2 +- .../shared_screen.ts} | 2 +- .../simple_message_notification.ts} | 4 +- .../statusBar.ts => style_tree/status_bar.ts} | 4 +- .../tabBar.ts => style_tree/tab_bar.ts} | 4 +- .../src/{styleTree => style_tree}/terminal.ts | 2 +- .../src/{styleTree => style_tree}/titlebar.ts | 0 .../toolbar_dropdown_menu.ts} | 4 +- .../src/{styleTree => style_tree}/tooltip.ts | 2 +- .../update_notification.ts} | 4 +- .../src/{styleTree => style_tree}/welcome.ts | 2 +- .../{styleTree => style_tree}/workspace.ts | 16 ++-- .../theme/{colorScheme.ts => color_scheme.ts} | 6 +- styles/src/theme/index.ts | 4 +- styles/src/theme/ramps.ts | 4 +- styles/src/theme/syntax.ts | 2 +- .../theme/{themeConfig.ts => theme_config.ts} | 0 .../{colorScheme.ts => color_scheme.ts} | 6 +- styles/src/theme/tokens/layer.ts | 2 +- styles/src/theme/tokens/players.ts | 2 +- .../src/types/{styleTree.ts => style_tree.ts} | 0 .../src/utils/{snakeCase.ts => snake_case.ts} | 0 49 files changed, 221 insertions(+), 180 deletions(-) create mode 100644 styles/mod.py rename styles/src/{buildLicenses.ts => build_licenses.ts} (100%) rename styles/src/{buildThemes.ts => build_themes.ts} (90%) rename styles/src/{buildTokens.ts => build_tokens.ts} (92%) rename styles/src/{buildTypes.ts => build_types.ts} (95%) delete mode 100644 styles/src/styleTree/app.ts create mode 100644 styles/src/style_tree/app.ts rename styles/src/{styleTree => style_tree}/assistant.ts (99%) rename styles/src/{styleTree/commandPalette.ts => style_tree/command_palette.ts} (89%) rename styles/src/{styleTree => style_tree}/components.ts (99%) rename styles/src/{styleTree/contactFinder.ts => style_tree/contact_finder.ts} (93%) rename styles/src/{styleTree/contactList.ts => style_tree/contact_list.ts} (98%) rename styles/src/{styleTree/contactNotification.ts => style_tree/contact_notification.ts} (91%) rename styles/src/{styleTree/contactsPopover.ts => style_tree/contacts_popover.ts} (72%) rename styles/src/{styleTree/contextMenu.ts => style_tree/context_menu.ts} (94%) rename styles/src/{styleTree => style_tree}/copilot.ts (99%) rename styles/src/{styleTree => style_tree}/editor.ts (96%) rename styles/src/{styleTree => style_tree}/feedback.ts (96%) rename styles/src/{styleTree/hoverPopover.ts => style_tree/hover_popover.ts} (91%) rename styles/src/{styleTree/incomingCallNotification.ts => style_tree/incoming_call_notification.ts} (93%) rename styles/src/{styleTree => style_tree}/picker.ts (98%) rename styles/src/{styleTree/projectDiagnostics.ts => style_tree/project_diagnostics.ts} (70%) rename styles/src/{styleTree/projectPanel.ts => style_tree/project_panel.ts} (88%) rename styles/src/{styleTree/projectSharedNotification.ts => style_tree/project_shared_notification.ts} (93%) rename styles/src/{styleTree => style_tree}/search.ts (98%) rename styles/src/{styleTree/sharedScreen.ts => style_tree/shared_screen.ts} (84%) rename styles/src/{styleTree/simpleMessageNotification.ts => style_tree/simple_message_notification.ts} (93%) rename styles/src/{styleTree/statusBar.ts => style_tree/status_bar.ts} (97%) rename styles/src/{styleTree/tabBar.ts => style_tree/tab_bar.ts} (96%) rename styles/src/{styleTree => style_tree}/terminal.ts (97%) rename styles/src/{styleTree => style_tree}/titlebar.ts (100%) rename styles/src/{styleTree/toolbarDropdownMenu.ts => style_tree/toolbar_dropdown_menu.ts} (94%) rename styles/src/{styleTree => style_tree}/tooltip.ts (93%) rename styles/src/{styleTree/updateNotification.ts => style_tree/update_notification.ts} (89%) rename styles/src/{styleTree => style_tree}/welcome.ts (98%) rename styles/src/{styleTree => style_tree}/workspace.ts (94%) rename styles/src/theme/{colorScheme.ts => color_scheme.ts} (98%) rename styles/src/theme/{themeConfig.ts => theme_config.ts} (100%) rename styles/src/theme/tokens/{colorScheme.ts => color_scheme.ts} (95%) rename styles/src/types/{styleTree.ts => style_tree.ts} (100%) rename styles/src/utils/{snakeCase.ts => snake_case.ts} (100%) diff --git a/styles/mod.py b/styles/mod.py new file mode 100644 index 0000000000000000000000000000000000000000..77238e5b45428beab2100f6ea2f7be707ae52acd --- /dev/null +++ b/styles/mod.py @@ -0,0 +1,42 @@ +import os, sys, re + + +def camel_to_snake(inputstring): + REG = r'(? { - const id = `${scheme.isLight ? "light" : "dark"}_${scheme.name + const id = `${scheme.is_light ? "light" : "dark"}_${scheme.name .toLowerCase() .replace(/\s+/g, "_")}_${index}` const selectedTokenSets: { [key: string]: "enabled" } = {} @@ -47,7 +47,7 @@ function buildThemesIndex(colorSchemes: ColorScheme[]): TokenSet[] { return { id, - name: `${scheme.name} - ${scheme.isLight ? "Light" : "Dark"}`, + name: `${scheme.name} - ${scheme.is_light ? "Light" : "Dark"}`, selectedTokenSets, } }) diff --git a/styles/src/buildTypes.ts b/styles/src/build_types.ts similarity index 95% rename from styles/src/buildTypes.ts rename to styles/src/build_types.ts index cd788c540ed0172cce7fb07ac538919fc8431187..5957ae5076a08fd62c84822edb946a0ab9a56f0a 100644 --- a/styles/src/buildTypes.ts +++ b/styles/src/build_types.ts @@ -43,7 +43,6 @@ async function main() { return } } catch (e) { - // @ts-expect-error - It's fine if there's no output from a previous run. if (e.code !== "ENOENT") { throw e } diff --git a/styles/src/component/icon_button.ts b/styles/src/component/icon_button.ts index 39c1adb5e506065207f52d82e919e1aaf55a9bd9..4664928d555dce2a07b2e2d1afb1ed7f3f4fcc6b 100644 --- a/styles/src/component/icon_button.ts +++ b/styles/src/component/icon_button.ts @@ -1,6 +1,6 @@ -import { ColorScheme } from "../common" import { interactive, toggleable } from "../element" -import { background, foreground } from "../styleTree/components" +import { background, foreground } from "../style_tree/components" +import { ColorScheme } from "../theme/color_scheme" export type Margin = { top: number @@ -11,9 +11,9 @@ export type Margin = { interface IconButtonOptions { layer?: - | ColorScheme["lowest"] - | ColorScheme["middle"] - | ColorScheme["highest"] + | ColorScheme["lowest"] + | ColorScheme["middle"] + | ColorScheme["highest"] color?: keyof ColorScheme["lowest"] margin?: Partial } diff --git a/styles/src/component/text_button.ts b/styles/src/component/text_button.ts index b8a2272cd340c7785ce172600900e8b2889bc787..64a91de7b0424945e153563d36a012380796add1 100644 --- a/styles/src/component/text_button.ts +++ b/styles/src/component/text_button.ts @@ -1,18 +1,18 @@ -import { ColorScheme } from "../common" import { interactive, toggleable } from "../element" import { TextProperties, background, foreground, text, -} from "../styleTree/components" +} from "../style_tree/components" +import { ColorScheme } from "../theme/color_scheme" import { Margin } from "./icon_button" interface TextButtonOptions { layer?: - | ColorScheme["lowest"] - | ColorScheme["middle"] - | ColorScheme["highest"] + | ColorScheme["lowest"] + | ColorScheme["middle"] + | ColorScheme["highest"] color?: keyof ColorScheme["lowest"] margin?: Partial text_properties?: TextProperties diff --git a/styles/src/styleTree/app.ts b/styles/src/styleTree/app.ts deleted file mode 100644 index a84300283189468dce3de49b430bbf5e848c872c..0000000000000000000000000000000000000000 --- a/styles/src/styleTree/app.ts +++ /dev/null @@ -1,75 +0,0 @@ -import contactFinder from "./contactFinder" -import contactsPopover from "./contactsPopover" -import commandPalette from "./commandPalette" -import editor from "./editor" -import projectPanel from "./projectPanel" -import search from "./search" -import picker from "./picker" -import workspace from "./workspace" -import contextMenu from "./contextMenu" -import sharedScreen from "./sharedScreen" -import projectDiagnostics from "./projectDiagnostics" -import contactNotification from "./contactNotification" -import updateNotification from "./updateNotification" -import simpleMessageNotification from "./simpleMessageNotification" -import projectSharedNotification from "./projectSharedNotification" -import tooltip from "./tooltip" -import terminal from "./terminal" -import contactList from "./contactList" -import toolbarDropdownMenu from "./toolbarDropdownMenu" -import incomingCallNotification from "./incomingCallNotification" -import { ColorScheme } from "../theme/colorScheme" -import feedback from "./feedback" -import welcome from "./welcome" -import copilot from "./copilot" -import assistant from "./assistant" -import { titlebar } from "./titlebar" - -export default function app(colorScheme: ColorScheme): any { - return { - meta: { - name: colorScheme.name, - isLight: colorScheme.isLight, - }, - commandPalette: commandPalette(colorScheme), - contactNotification: contactNotification(colorScheme), - projectSharedNotification: projectSharedNotification(colorScheme), - incomingCallNotification: incomingCallNotification(colorScheme), - picker: picker(colorScheme), - workspace: workspace(colorScheme), - titlebar: titlebar(colorScheme), - copilot: copilot(colorScheme), - welcome: welcome(colorScheme), - contextMenu: contextMenu(colorScheme), - editor: editor(colorScheme), - projectDiagnostics: projectDiagnostics(colorScheme), - projectPanel: projectPanel(colorScheme), - contactsPopover: contactsPopover(colorScheme), - contactFinder: contactFinder(colorScheme), - contactList: contactList(colorScheme), - toolbarDropdownMenu: toolbarDropdownMenu(colorScheme), - search: search(colorScheme), - sharedScreen: sharedScreen(colorScheme), - updateNotification: updateNotification(colorScheme), - simpleMessageNotification: simpleMessageNotification(colorScheme), - tooltip: tooltip(colorScheme), - terminal: terminal(colorScheme), - assistant: assistant(colorScheme), - feedback: feedback(colorScheme), - colorScheme: { - ...colorScheme, - players: Object.values(colorScheme.players), - ramps: { - neutral: colorScheme.ramps.neutral.colors(100, "hex"), - red: colorScheme.ramps.red.colors(100, "hex"), - orange: colorScheme.ramps.orange.colors(100, "hex"), - yellow: colorScheme.ramps.yellow.colors(100, "hex"), - green: colorScheme.ramps.green.colors(100, "hex"), - cyan: colorScheme.ramps.cyan.colors(100, "hex"), - blue: colorScheme.ramps.blue.colors(100, "hex"), - violet: colorScheme.ramps.violet.colors(100, "hex"), - magenta: colorScheme.ramps.magenta.colors(100, "hex"), - }, - }, - } -} diff --git a/styles/src/style_tree/app.ts b/styles/src/style_tree/app.ts new file mode 100644 index 0000000000000000000000000000000000000000..684614d073b495870b1fc06418623587cc69b768 --- /dev/null +++ b/styles/src/style_tree/app.ts @@ -0,0 +1,75 @@ +import contact_finder from "./contact_finder" +import contacts_popover from "./contacts_popover" +import command_palette from "./command_palette" +import project_panel from "./project_panel" +import search from "./search" +import picker from "./picker" +import workspace from "./workspace" +import context_menu from "./context_menu" +import shared_screen from "./shared_screen" +import project_diagnostics from "./project_diagnostics" +import contact_notification from "./contact_notification" +import update_notification from "./update_notification" +import simple_message_notification from "./simple_message_notification" +import project_shared_notification from "./project_shared_notification" +import tooltip from "./tooltip" +import terminal from "./terminal" +import contact_list from "./contact_list" +import toolbar_dropdown_menu from "./toolbar_dropdown_menu" +import incoming_call_notification from "./incoming_call_notification" +import { ColorScheme } from "../theme/color_scheme" +import welcome from "./welcome" +import copilot from "./copilot" +import assistant from "./assistant" +import { titlebar } from "./titlebar" +import editor from "./editor" +import feedback from "./feedback" + +export default function app(theme: ColorScheme): any { + return { + meta: { + name: theme.name, + is_light: theme.is_light, + }, + command_palette: command_palette(theme), + contact_notification: contact_notification(theme), + project_shared_notification: project_shared_notification(theme), + incoming_call_notification: incoming_call_notification(theme), + picker: picker(theme), + workspace: workspace(theme), + titlebar: titlebar(theme), + copilot: copilot(theme), + welcome: welcome(theme), + context_menu: context_menu(theme), + editor: editor(theme), + project_diagnostics: project_diagnostics(theme), + project_panel: project_panel(theme), + contacts_popover: contacts_popover(theme), + contact_finder: contact_finder(theme), + contact_list: contact_list(theme), + toolbar_dropdown_menu: toolbar_dropdown_menu(theme), + search: search(theme), + shared_screen: shared_screen(theme), + update_notification: update_notification(theme), + simple_message_notification: simple_message_notification(theme), + tooltip: tooltip(theme), + terminal: terminal(theme), + assistant: assistant(theme), + feedback: feedback(theme), + color_scheme: { + ...theme, + players: Object.values(theme.players), + ramps: { + neutral: theme.ramps.neutral.colors(100, "hex"), + red: theme.ramps.red.colors(100, "hex"), + orange: theme.ramps.orange.colors(100, "hex"), + yellow: theme.ramps.yellow.colors(100, "hex"), + green: theme.ramps.green.colors(100, "hex"), + cyan: theme.ramps.cyan.colors(100, "hex"), + blue: theme.ramps.blue.colors(100, "hex"), + violet: theme.ramps.violet.colors(100, "hex"), + magenta: theme.ramps.magenta.colors(100, "hex"), + }, + }, + } +} diff --git a/styles/src/styleTree/assistant.ts b/styles/src/style_tree/assistant.ts similarity index 99% rename from styles/src/styleTree/assistant.ts rename to styles/src/style_tree/assistant.ts index f233f0278647b3e143c973f18e1d69eba31e6c0e..7003e0765ce7b72e6766dbbecb8b56ddf3ca8ffc 100644 --- a/styles/src/styleTree/assistant.ts +++ b/styles/src/style_tree/assistant.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { text, border, background, foreground } from "./components" import editor from "./editor" import { interactive } from "../element" diff --git a/styles/src/styleTree/commandPalette.ts b/styles/src/style_tree/command_palette.ts similarity index 89% rename from styles/src/styleTree/commandPalette.ts rename to styles/src/style_tree/command_palette.ts index 101f4d437e9a9c478ffbf71e36dea40d5f85c527..988a1c949bc468c5df53272b053a8ef72c6739ed 100644 --- a/styles/src/styleTree/commandPalette.ts +++ b/styles/src/style_tree/command_palette.ts @@ -1,9 +1,9 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { withOpacity } from "../theme/color" import { text, background } from "./components" import { toggleable } from "../element" -export default function commandPalette(colorScheme: ColorScheme): any { +export default function command_palette(colorScheme: ColorScheme): any { const layer = colorScheme.highest const key = toggleable({ diff --git a/styles/src/styleTree/components.ts b/styles/src/style_tree/components.ts similarity index 99% rename from styles/src/styleTree/components.ts rename to styles/src/style_tree/components.ts index 8db1fa4b2ef5916f6b871bb1b3f1184b15bc7ee5..6f69023d1292c5721e6145f9b3067122c57144c6 100644 --- a/styles/src/styleTree/components.ts +++ b/styles/src/style_tree/components.ts @@ -1,5 +1,5 @@ import { fontFamilies, fontSizes, FontWeight } from "../common" -import { Layer, Styles, StyleSets, Style } from "../theme/colorScheme" +import { Layer, Styles, StyleSets, Style } from "../theme/color_scheme" function isStyleSet(key: any): key is StyleSets { return [ diff --git a/styles/src/styleTree/contactFinder.ts b/styles/src/style_tree/contact_finder.ts similarity index 93% rename from styles/src/styleTree/contactFinder.ts rename to styles/src/style_tree/contact_finder.ts index f0720d05888127c203b800b72199dbcb5829e718..239b4b5004e1a0b0871448f38fb75640f36dad1e 100644 --- a/styles/src/styleTree/contactFinder.ts +++ b/styles/src/style_tree/contact_finder.ts @@ -1,8 +1,8 @@ import picker from "./picker" -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, text } from "./components" -export default function contactFinder(colorScheme: ColorScheme): any { +export default function contact_finder(colorScheme: ColorScheme): any { const layer = colorScheme.middle const sideMargin = 6 diff --git a/styles/src/styleTree/contactList.ts b/styles/src/style_tree/contact_list.ts similarity index 98% rename from styles/src/styleTree/contactList.ts rename to styles/src/style_tree/contact_list.ts index 9194e809ee3c24148ed3113a6f5b16fe842019c2..fb6b665a143c65a938111ee6366d775587f04b95 100644 --- a/styles/src/styleTree/contactList.ts +++ b/styles/src/style_tree/contact_list.ts @@ -1,7 +1,7 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, borderColor, foreground, text } from "./components" import { interactive, toggleable } from "../element" -export default function contactsPanel(colorScheme: ColorScheme): any { +export default function contacts_panel(colorScheme: ColorScheme): any { const nameMargin = 8 const sidePadding = 12 diff --git a/styles/src/styleTree/contactNotification.ts b/styles/src/style_tree/contact_notification.ts similarity index 91% rename from styles/src/styleTree/contactNotification.ts rename to styles/src/style_tree/contact_notification.ts index 450f927535ecf7a8ee596e1c32e03acf4d2d9bf4..6ae2dc5d2037f1d1cea868ab6517000d22e8b52e 100644 --- a/styles/src/styleTree/contactNotification.ts +++ b/styles/src/style_tree/contact_notification.ts @@ -1,10 +1,10 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, foreground, text } from "./components" import { interactive } from "../element" const avatarSize = 12 const headerPadding = 8 -export default function contactNotification(colorScheme: ColorScheme): any { +export default function contact_notification(colorScheme: ColorScheme): any { const layer = colorScheme.lowest return { headerAvatar: { diff --git a/styles/src/styleTree/contactsPopover.ts b/styles/src/style_tree/contacts_popover.ts similarity index 72% rename from styles/src/styleTree/contactsPopover.ts rename to styles/src/style_tree/contacts_popover.ts index 6d9f84322d6fe75982d7970e86035f81e2d5c386..0c9d1a47eb4d2d48d6ffc51124b5eea0b2a1d5db 100644 --- a/styles/src/styleTree/contactsPopover.ts +++ b/styles/src/style_tree/contacts_popover.ts @@ -1,7 +1,7 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border } from "./components" -export default function contactsPopover(colorScheme: ColorScheme): any { +export default function contacts_popover(colorScheme: ColorScheme): any { const layer = colorScheme.middle return { background: background(layer), diff --git a/styles/src/styleTree/contextMenu.ts b/styles/src/style_tree/context_menu.ts similarity index 94% rename from styles/src/styleTree/contextMenu.ts rename to styles/src/style_tree/context_menu.ts index 1064eedd0dc79615aede6fa3faed1387ab04e140..52795be79684202c0381ccc4daeb1d868289d31f 100644 --- a/styles/src/styleTree/contextMenu.ts +++ b/styles/src/style_tree/context_menu.ts @@ -1,8 +1,8 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, borderColor, text } from "./components" import { interactive, toggleable } from "../element" -export default function contextMenu(colorScheme: ColorScheme): any { +export default function context_menu(colorScheme: ColorScheme): any { const layer = colorScheme.middle return { background: background(layer), diff --git a/styles/src/styleTree/copilot.ts b/styles/src/style_tree/copilot.ts similarity index 99% rename from styles/src/styleTree/copilot.ts rename to styles/src/style_tree/copilot.ts index 2f82e94c43923740b66e5512022d00d1a2f9d585..cd2bbe0584fd145e3b24270a911e53fae8e7bc89 100644 --- a/styles/src/styleTree/copilot.ts +++ b/styles/src/style_tree/copilot.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, svg, text } from "./components" import { interactive } from "../element" export default function copilot(colorScheme: ColorScheme): any { diff --git a/styles/src/styleTree/editor.ts b/styles/src/style_tree/editor.ts similarity index 96% rename from styles/src/styleTree/editor.ts rename to styles/src/style_tree/editor.ts index 71c34207eb91705f5a6d48b67549c8987a6d154d..9bf46055808c75a0da66180066fce46094504db7 100644 --- a/styles/src/styleTree/editor.ts +++ b/styles/src/style_tree/editor.ts @@ -1,13 +1,13 @@ import { withOpacity } from "../theme/color" -import { ColorScheme, Layer, StyleSets } from "../theme/colorScheme" +import { ColorScheme, Layer, StyleSets } from "../theme/color_scheme" import { background, border, borderColor, foreground, text } from "./components" -import hoverPopover from "./hoverPopover" +import hoverPopover from "./hover_popover" import { buildSyntax } from "../theme/syntax" import { interactive, toggleable } from "../element" export default function editor(colorScheme: ColorScheme): any { - const { isLight } = colorScheme + const { is_light } = colorScheme const layer = colorScheme.highest @@ -130,13 +130,13 @@ export default function editor(colorScheme: ColorScheme): any { foldBackground: foreground(layer, "variant"), }, diff: { - deleted: isLight + deleted: is_light ? colorScheme.ramps.red(0.5).hex() : colorScheme.ramps.red(0.4).hex(), - modified: isLight + modified: is_light ? colorScheme.ramps.yellow(0.5).hex() : colorScheme.ramps.yellow(0.5).hex(), - inserted: isLight + inserted: is_light ? colorScheme.ramps.green(0.4).hex() : colorScheme.ramps.green(0.5).hex(), removedWidthEm: 0.275, @@ -292,13 +292,13 @@ export default function editor(colorScheme: ColorScheme): any { }, }, git: { - deleted: isLight + deleted: is_light ? withOpacity(colorScheme.ramps.red(0.5).hex(), 0.8) : withOpacity(colorScheme.ramps.red(0.4).hex(), 0.8), - modified: isLight + modified: is_light ? withOpacity(colorScheme.ramps.yellow(0.5).hex(), 0.8) : withOpacity(colorScheme.ramps.yellow(0.4).hex(), 0.8), - inserted: isLight + inserted: is_light ? withOpacity(colorScheme.ramps.green(0.5).hex(), 0.8) : withOpacity(colorScheme.ramps.green(0.4).hex(), 0.8), }, diff --git a/styles/src/styleTree/feedback.ts b/styles/src/style_tree/feedback.ts similarity index 96% rename from styles/src/styleTree/feedback.ts rename to styles/src/style_tree/feedback.ts index 9b66015dc64ee1aa8c42dd005479643100b62ad4..88f3cebc37e7da2ebd5bf33799ee1a392edfd6cd 100644 --- a/styles/src/styleTree/feedback.ts +++ b/styles/src/style_tree/feedback.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, text } from "./components" import { interactive } from "../element" diff --git a/styles/src/styleTree/hoverPopover.ts b/styles/src/style_tree/hover_popover.ts similarity index 91% rename from styles/src/styleTree/hoverPopover.ts rename to styles/src/style_tree/hover_popover.ts index 9e2f8d0a785f1d27744a4e97254e3246aad4a9c6..68eba194948b7217b9db0f7681c5a3dbf90722a9 100644 --- a/styles/src/styleTree/hoverPopover.ts +++ b/styles/src/style_tree/hover_popover.ts @@ -1,7 +1,7 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, text } from "./components" -export default function HoverPopover(colorScheme: ColorScheme): any { +export default function hover_popover(colorScheme: ColorScheme): any { const layer = colorScheme.middle const baseContainer = { background: background(layer), diff --git a/styles/src/styleTree/incomingCallNotification.ts b/styles/src/style_tree/incoming_call_notification.ts similarity index 93% rename from styles/src/styleTree/incomingCallNotification.ts rename to styles/src/style_tree/incoming_call_notification.ts index 6249bfb6934ae1c074743b61bd95f3fdc0d99f0f..9a6d400017f734ba5e7bd2a3a35ccf000a466b53 100644 --- a/styles/src/styleTree/incomingCallNotification.ts +++ b/styles/src/style_tree/incoming_call_notification.ts @@ -1,7 +1,7 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, text } from "./components" -export default function incomingCallNotification( +export default function incoming_call_notification( colorScheme: ColorScheme ): unknown { const layer = colorScheme.middle diff --git a/styles/src/styleTree/picker.ts b/styles/src/style_tree/picker.ts similarity index 98% rename from styles/src/styleTree/picker.ts rename to styles/src/style_tree/picker.ts index aaf2740a6e0419aa51b4c61d51bd034edbff210e..417c1faea4c429315a5c439065a77f0672a06eef 100644 --- a/styles/src/styleTree/picker.ts +++ b/styles/src/style_tree/picker.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { withOpacity } from "../theme/color" import { background, border, text } from "./components" import { interactive, toggleable } from "../element" diff --git a/styles/src/styleTree/projectDiagnostics.ts b/styles/src/style_tree/project_diagnostics.ts similarity index 70% rename from styles/src/styleTree/projectDiagnostics.ts rename to styles/src/style_tree/project_diagnostics.ts index d2c2152ab416a976ce7ca8098c04b1cf8600af8b..f3f5a5a144653f3573057e19e8c462c553c5f3b7 100644 --- a/styles/src/styleTree/projectDiagnostics.ts +++ b/styles/src/style_tree/project_diagnostics.ts @@ -1,7 +1,7 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, text } from "./components" -export default function projectDiagnostics(colorScheme: ColorScheme): any { +export default function project_diagnostics(colorScheme: ColorScheme): any { const layer = colorScheme.highest return { background: background(layer), diff --git a/styles/src/styleTree/projectPanel.ts b/styles/src/style_tree/project_panel.ts similarity index 88% rename from styles/src/styleTree/projectPanel.ts rename to styles/src/style_tree/project_panel.ts index de4a98df53fd1b038e370365d392b8432d72329b..c38c689f4fe3e02801c07d931228bf7c689dbbb4 100644 --- a/styles/src/styleTree/projectPanel.ts +++ b/styles/src/style_tree/project_panel.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { withOpacity } from "../theme/color" import { Border, @@ -10,10 +10,10 @@ import { } from "./components" import { interactive, toggleable } from "../element" import merge from "ts-deepmerge" -export default function projectPanel(colorScheme: ColorScheme): any { - const { isLight } = colorScheme +export default function project_panel(theme: ColorScheme): any { + const { is_light } = theme - const layer = colorScheme.middle + const layer = theme.middle type EntryStateProps = { background?: string @@ -31,15 +31,15 @@ export default function projectPanel(colorScheme: ColorScheme): any { const entry = (unselected?: EntryState, selected?: EntryState) => { const git_status = { git: { - modified: isLight - ? colorScheme.ramps.yellow(0.6).hex() - : colorScheme.ramps.yellow(0.5).hex(), - inserted: isLight - ? colorScheme.ramps.green(0.45).hex() - : colorScheme.ramps.green(0.5).hex(), - conflict: isLight - ? colorScheme.ramps.red(0.6).hex() - : colorScheme.ramps.red(0.5).hex(), + modified: is_light + ? theme.ramps.yellow(0.6).hex() + : theme.ramps.yellow(0.5).hex(), + inserted: is_light + ? theme.ramps.green(0.45).hex() + : theme.ramps.green(0.5).hex(), + conflict: is_light + ? theme.ramps.red(0.6).hex() + : theme.ramps.red(0.5).hex(), }, } @@ -182,7 +182,7 @@ export default function projectPanel(colorScheme: ColorScheme): any { filenameEditor: { background: background(layer, "on"), text: text(layer, "mono", "on", { size: "sm" }), - selection: colorScheme.players[0], + selection: theme.players[0], }, } } diff --git a/styles/src/styleTree/projectSharedNotification.ts b/styles/src/style_tree/project_shared_notification.ts similarity index 93% rename from styles/src/styleTree/projectSharedNotification.ts rename to styles/src/style_tree/project_shared_notification.ts index c114e17176a20cd524552e155df923e2e6c37cc6..f8b103e2e497859445ee82b914b88f80a56a6945 100644 --- a/styles/src/styleTree/projectSharedNotification.ts +++ b/styles/src/style_tree/project_shared_notification.ts @@ -1,7 +1,7 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, text } from "./components" -export default function projectSharedNotification( +export default function project_shared_notification( colorScheme: ColorScheme ): unknown { const layer = colorScheme.middle diff --git a/styles/src/styleTree/search.ts b/styles/src/style_tree/search.ts similarity index 98% rename from styles/src/styleTree/search.ts rename to styles/src/style_tree/search.ts index 9ecad3ab1973f61c11439f9c50c1f4093c022fe4..c236284fa06ed1f7839ea7cefcaf5a842aac7468 100644 --- a/styles/src/styleTree/search.ts +++ b/styles/src/style_tree/search.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { withOpacity } from "../theme/color" import { background, border, foreground, text } from "./components" import { interactive, toggleable } from "../element" diff --git a/styles/src/styleTree/sharedScreen.ts b/styles/src/style_tree/shared_screen.ts similarity index 84% rename from styles/src/styleTree/sharedScreen.ts rename to styles/src/style_tree/shared_screen.ts index 59968d59499c10cf03904bebb7270e47036dab11..718ea20642dd401f14d1f35c80c87921b3349b44 100644 --- a/styles/src/styleTree/sharedScreen.ts +++ b/styles/src/style_tree/shared_screen.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { StyleTree } from "../types" import { background } from "./components" diff --git a/styles/src/styleTree/simpleMessageNotification.ts b/styles/src/style_tree/simple_message_notification.ts similarity index 93% rename from styles/src/styleTree/simpleMessageNotification.ts rename to styles/src/style_tree/simple_message_notification.ts index 99dc878a79a4b44c54c5e9a90a3647c4a922523c..207924a99fbafddec7b4b3e78e03ea60d1e8a58d 100644 --- a/styles/src/styleTree/simpleMessageNotification.ts +++ b/styles/src/style_tree/simple_message_notification.ts @@ -1,10 +1,10 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, text } from "./components" import { interactive } from "../element" const headerPadding = 8 -export default function simpleMessageNotification( +export default function simple_message_notification( colorScheme: ColorScheme ): unknown { const layer = colorScheme.middle diff --git a/styles/src/styleTree/statusBar.ts b/styles/src/style_tree/status_bar.ts similarity index 97% rename from styles/src/styleTree/statusBar.ts rename to styles/src/style_tree/status_bar.ts index 6ca53afb187b866e4a3a5bfa561db992845538c0..e86afb1c0da2acd81d8a4f6635bcb3555e78b48e 100644 --- a/styles/src/styleTree/statusBar.ts +++ b/styles/src/style_tree/status_bar.ts @@ -1,7 +1,7 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, text } from "./components" import { interactive, toggleable } from "../element" -export default function statusBar(colorScheme: ColorScheme): any { +export default function status_bar(colorScheme: ColorScheme): any { const layer = colorScheme.lowest const statusContainer = { diff --git a/styles/src/styleTree/tabBar.ts b/styles/src/style_tree/tab_bar.ts similarity index 96% rename from styles/src/styleTree/tabBar.ts rename to styles/src/style_tree/tab_bar.ts index ae9512d8ce57a50482892c22d860bcb7a5db7084..fe43934f79fa4a491009355f95249f5d6ad71ec7 100644 --- a/styles/src/styleTree/tabBar.ts +++ b/styles/src/style_tree/tab_bar.ts @@ -1,9 +1,9 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { withOpacity } from "../theme/color" import { text, border, background, foreground } from "./components" import { interactive, toggleable } from "../element" -export default function tabBar(colorScheme: ColorScheme): any { +export default function tab_bar(colorScheme: ColorScheme): any { const height = 32 const activeLayer = colorScheme.highest diff --git a/styles/src/styleTree/terminal.ts b/styles/src/style_tree/terminal.ts similarity index 97% rename from styles/src/styleTree/terminal.ts rename to styles/src/style_tree/terminal.ts index 5198cb195dd30b78130c917e09798392ca56a393..4e3dc18627c3262b78acc402e67352100e7aa2dc 100644 --- a/styles/src/styleTree/terminal.ts +++ b/styles/src/style_tree/terminal.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { StyleTree } from "../types" export default function terminal(theme: ColorScheme): StyleTree.TerminalStyle { diff --git a/styles/src/styleTree/titlebar.ts b/styles/src/style_tree/titlebar.ts similarity index 100% rename from styles/src/styleTree/titlebar.ts rename to styles/src/style_tree/titlebar.ts diff --git a/styles/src/styleTree/toolbarDropdownMenu.ts b/styles/src/style_tree/toolbar_dropdown_menu.ts similarity index 94% rename from styles/src/styleTree/toolbarDropdownMenu.ts rename to styles/src/style_tree/toolbar_dropdown_menu.ts index 4eff06026b0551e3671578ca644481eaf2135f46..992631e0363eb668695d3ebaa2633e0c5a2bd077 100644 --- a/styles/src/styleTree/toolbarDropdownMenu.ts +++ b/styles/src/style_tree/toolbar_dropdown_menu.ts @@ -1,7 +1,7 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, text } from "./components" import { interactive, toggleable } from "../element" -export default function dropdownMenu(colorScheme: ColorScheme): any { +export default function dropdown_menu(colorScheme: ColorScheme): any { const layer = colorScheme.middle return { diff --git a/styles/src/styleTree/tooltip.ts b/styles/src/style_tree/tooltip.ts similarity index 93% rename from styles/src/styleTree/tooltip.ts rename to styles/src/style_tree/tooltip.ts index fb896112a9990059c90e2785ee475999f478b11a..54daae529e55782cc11f659a943461ca92ab3b9c 100644 --- a/styles/src/styleTree/tooltip.ts +++ b/styles/src/style_tree/tooltip.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { background, border, text } from "./components" export default function tooltip(colorScheme: ColorScheme): any { diff --git a/styles/src/styleTree/updateNotification.ts b/styles/src/style_tree/update_notification.ts similarity index 89% rename from styles/src/styleTree/updateNotification.ts rename to styles/src/style_tree/update_notification.ts index bf792ffc7b5bfa04b948b8fa4d66264d33b53b51..c6e6130f540c1b7fc448dce99ff7048bdd2d71f5 100644 --- a/styles/src/styleTree/updateNotification.ts +++ b/styles/src/style_tree/update_notification.ts @@ -1,10 +1,10 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { foreground, text } from "./components" import { interactive } from "../element" const headerPadding = 8 -export default function updateNotification(colorScheme: ColorScheme): any { +export default function update_notification(colorScheme: ColorScheme): any { const layer = colorScheme.middle return { message: { diff --git a/styles/src/styleTree/welcome.ts b/styles/src/style_tree/welcome.ts similarity index 98% rename from styles/src/styleTree/welcome.ts rename to styles/src/style_tree/welcome.ts index c64a17b5f60ec194ac167710cd845aafb8da2296..93f18267401da2a5abc9b39defbc505824b634ab 100644 --- a/styles/src/styleTree/welcome.ts +++ b/styles/src/style_tree/welcome.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { withOpacity } from "../theme/color" import { border, diff --git a/styles/src/styleTree/workspace.ts b/styles/src/style_tree/workspace.ts similarity index 94% rename from styles/src/styleTree/workspace.ts rename to styles/src/style_tree/workspace.ts index 5f5da7e47ea5ccadfa41189f155813a83b9adc3f..48217e89c74234f324c9788142e8721e57004b46 100644 --- a/styles/src/styleTree/workspace.ts +++ b/styles/src/style_tree/workspace.ts @@ -1,4 +1,4 @@ -import { ColorScheme } from "../theme/colorScheme" +import { ColorScheme } from "../theme/color_scheme" import { withOpacity } from "../theme/color" import { background, @@ -8,14 +8,14 @@ import { svg, text, } from "./components" -import statusBar from "./statusBar" -import tabBar from "./tabBar" +import statusBar from "./status_bar" +import tabBar from "./tab_bar" import { interactive } from "../element" import { titlebar } from "./titlebar" export default function workspace(colorScheme: ColorScheme): any { const layer = colorScheme.lowest - const isLight = colorScheme.isLight + const is_light = colorScheme.is_light return { background: background(colorScheme.lowest), @@ -25,7 +25,7 @@ export default function workspace(colorScheme: ColorScheme): any { height: 256, }, logo: svg( - withOpacity("#000000", colorScheme.isLight ? 0.6 : 0.8), + withOpacity("#000000", colorScheme.is_light ? 0.6 : 0.8), "icons/logo_96.svg", 256, 256 @@ -33,10 +33,10 @@ export default function workspace(colorScheme: ColorScheme): any { logoShadow: svg( withOpacity( - colorScheme.isLight + colorScheme.is_light ? "#FFFFFF" : colorScheme.lowest.base.default.background, - colorScheme.isLight ? 1 : 0.6 + colorScheme.is_light ? 1 : 0.6 ), "icons/logo_96.svg", 256, @@ -96,7 +96,7 @@ export default function workspace(colorScheme: ColorScheme): any { }, zoomedBackground: { cursor: "Arrow", - background: isLight + background: is_light ? withOpacity(background(colorScheme.lowest), 0.8) : withOpacity(background(colorScheme.highest), 0.6), }, diff --git a/styles/src/theme/colorScheme.ts b/styles/src/theme/color_scheme.ts similarity index 98% rename from styles/src/theme/colorScheme.ts rename to styles/src/theme/color_scheme.ts index ea3b1b9b2980be2651258f4f064658b28f13efca..61b459911b96aec679ae58b57bfc477470344483 100644 --- a/styles/src/theme/colorScheme.ts +++ b/styles/src/theme/color_scheme.ts @@ -5,12 +5,12 @@ import { ThemeConfig, ThemeAppearance, ThemeConfigInputColors, -} from "./themeConfig" +} from "./theme_config" import { getRamps } from "./ramps" export interface ColorScheme { name: string - isLight: boolean + is_light: boolean lowest: Layer middle: Layer @@ -155,7 +155,7 @@ export function createColorScheme(theme: ThemeConfig): ColorScheme { return { name, - isLight, + is_light: isLight, ramps, diff --git a/styles/src/theme/index.ts b/styles/src/theme/index.ts index 2bf625521c19711178278d28feb88e0bba86f773..22287bf6699a7f690b1b6b29b0689adc47dea757 100644 --- a/styles/src/theme/index.ts +++ b/styles/src/theme/index.ts @@ -1,4 +1,4 @@ -export * from "./colorScheme" +export * from "./color_scheme" export * from "./ramps" export * from "./syntax" -export * from "./themeConfig" +export * from "./theme_config" diff --git a/styles/src/theme/ramps.ts b/styles/src/theme/ramps.ts index de1f8ee0d4ca6bb33853ef65fa67eb16f715a9ce..98a73ef5bf0c768b08159ad9bca44ea19510a6b6 100644 --- a/styles/src/theme/ramps.ts +++ b/styles/src/theme/ramps.ts @@ -1,9 +1,9 @@ import chroma, { Color, Scale } from "chroma-js" -import { RampSet } from "./colorScheme" +import { RampSet } from "./color_scheme" import { ThemeConfigInputColors, ThemeConfigInputColorsKeys, -} from "./themeConfig" +} from "./theme_config" export function colorRamp(color: Color): Scale { const endColor = color.desaturate(1).brighten(5) diff --git a/styles/src/theme/syntax.ts b/styles/src/theme/syntax.ts index a35013c1e9a941cd07cefa7c8d990213e8df1b8c..5d214abdebe5a93cdf1d25e7b0ff31168fe5cdd2 100644 --- a/styles/src/theme/syntax.ts +++ b/styles/src/theme/syntax.ts @@ -1,6 +1,6 @@ import deepmerge from "deepmerge" import { FontWeight, fontWeights } from "../common" -import { ColorScheme } from "./colorScheme" +import { ColorScheme } from "./color_scheme" import chroma from "chroma-js" export interface SyntaxHighlightStyle { diff --git a/styles/src/theme/themeConfig.ts b/styles/src/theme/theme_config.ts similarity index 100% rename from styles/src/theme/themeConfig.ts rename to styles/src/theme/theme_config.ts diff --git a/styles/src/theme/tokens/colorScheme.ts b/styles/src/theme/tokens/color_scheme.ts similarity index 95% rename from styles/src/theme/tokens/colorScheme.ts rename to styles/src/theme/tokens/color_scheme.ts index bc53ca802a9a4f5cf39dd3345734674558170494..84e456a6e7f223d728fe6cee3e73b0bfa3b155bc 100644 --- a/styles/src/theme/tokens/colorScheme.ts +++ b/styles/src/theme/tokens/color_scheme.ts @@ -9,12 +9,12 @@ import { Shadow, SyntaxHighlightStyle, ThemeSyntax, -} from "../colorScheme" +} from "../color_scheme" import { LayerToken, layerToken } from "./layer" import { PlayersToken, playersToken } from "./players" import { colorToken } from "./token" import { Syntax } from "../syntax" -import editor from "../../styleTree/editor" +import editor from "../../style_tree/editor" interface ColorSchemeTokens { name: SingleOtherToken @@ -85,7 +85,7 @@ export function colorSchemeTokens(colorScheme: ColorScheme): ColorSchemeTokens { }, appearance: { name: "themeAppearance", - value: colorScheme.isLight ? "light" : "dark", + value: colorScheme.is_light ? "light" : "dark", type: TokenTypes.OTHER, }, lowest: layerToken(colorScheme.lowest, "lowest"), diff --git a/styles/src/theme/tokens/layer.ts b/styles/src/theme/tokens/layer.ts index 42a69b5a528161fac21fbb88f6778933772a32a4..10309e0d2e2bdda2f3c938ee20b1aa43d9aee4e0 100644 --- a/styles/src/theme/tokens/layer.ts +++ b/styles/src/theme/tokens/layer.ts @@ -1,5 +1,5 @@ import { SingleColorToken } from "@tokens-studio/types" -import { Layer, Style, StyleSet } from "../colorScheme" +import { Layer, Style, StyleSet } from "../color_scheme" import { colorToken } from "./token" interface StyleToken { diff --git a/styles/src/theme/tokens/players.ts b/styles/src/theme/tokens/players.ts index 94d05cd827dbf8443d3f57e9008aa49da1333c8a..12f16343e9d08e670cb58ebe24c847a5c10786cf 100644 --- a/styles/src/theme/tokens/players.ts +++ b/styles/src/theme/tokens/players.ts @@ -1,6 +1,6 @@ import { SingleColorToken } from "@tokens-studio/types" -import { ColorScheme, Players } from "../../common" import { colorToken } from "./token" +import { ColorScheme, Players } from "../color_scheme" export type PlayerToken = Record<"selection" | "cursor", SingleColorToken> diff --git a/styles/src/types/styleTree.ts b/styles/src/types/style_tree.ts similarity index 100% rename from styles/src/types/styleTree.ts rename to styles/src/types/style_tree.ts diff --git a/styles/src/utils/snakeCase.ts b/styles/src/utils/snake_case.ts similarity index 100% rename from styles/src/utils/snakeCase.ts rename to styles/src/utils/snake_case.ts From b015f506da9a2c684f453c43ccbb92144162db5f Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Wed, 28 Jun 2023 22:42:57 -0400 Subject: [PATCH 05/13] WIP snake_case 1/? through `contact_notification` --- styles/src/component/icon_button.ts | 6 +- styles/src/component/text_button.ts | 6 +- styles/src/element/interactive.ts | 40 +++--- styles/src/element/toggle.ts | 8 +- styles/src/style_tree/assistant.ts | 44 +++--- styles/src/style_tree/command_palette.ts | 4 +- styles/src/style_tree/components.ts | 130 +++++++++--------- styles/src/style_tree/contact_finder.ts | 56 ++++---- styles/src/style_tree/contact_list.ts | 85 ++++++------ styles/src/style_tree/contact_notification.ts | 35 +++-- styles/src/style_tree/contacts_popover.ts | 2 +- styles/src/style_tree/context_menu.ts | 10 +- styles/src/style_tree/copilot.ts | 8 +- styles/src/style_tree/editor.ts | 28 ++-- styles/src/style_tree/feedback.ts | 2 +- styles/src/style_tree/hover_popover.ts | 2 +- .../style_tree/incoming_call_notification.ts | 4 +- styles/src/style_tree/picker.ts | 4 +- styles/src/style_tree/project_diagnostics.ts | 2 +- styles/src/style_tree/project_panel.ts | 2 +- .../style_tree/project_shared_notification.ts | 4 +- styles/src/style_tree/search.ts | 8 +- styles/src/style_tree/shared_screen.ts | 5 +- .../style_tree/simple_message_notification.ts | 6 +- styles/src/style_tree/status_bar.ts | 12 +- styles/src/style_tree/tab_bar.ts | 8 +- styles/src/style_tree/terminal.ts | 3 +- styles/src/style_tree/titlebar.ts | 12 +- .../src/style_tree/toolbar_dropdown_menu.ts | 2 +- styles/src/style_tree/tooltip.ts | 4 +- styles/src/style_tree/update_notification.ts | 4 +- styles/src/style_tree/welcome.ts | 6 +- styles/src/style_tree/workspace.ts | 22 +-- styles/src/theme/color_scheme.ts | 6 +- styles/src/types/element.ts | 4 - styles/src/types/index.ts | 5 - styles/src/types/property.ts | 9 -- styles/src/types/style_tree.ts | 33 ----- styles/src/types/util.ts | 17 --- styles/src/utils/snake_case.ts | 4 +- styles/tsconfig.json | 36 ++--- 41 files changed, 302 insertions(+), 386 deletions(-) delete mode 100644 styles/src/types/element.ts delete mode 100644 styles/src/types/index.ts delete mode 100644 styles/src/types/property.ts delete mode 100644 styles/src/types/style_tree.ts delete mode 100644 styles/src/types/util.ts diff --git a/styles/src/component/icon_button.ts b/styles/src/component/icon_button.ts index 4664928d555dce2a07b2e2d1afb1ed7f3f4fcc6b..79891c2477809a1312c968241ee833b62f0922cd 100644 --- a/styles/src/component/icon_button.ts +++ b/styles/src/component/icon_button.ts @@ -11,9 +11,9 @@ export type Margin = { interface IconButtonOptions { layer?: - | ColorScheme["lowest"] - | ColorScheme["middle"] - | ColorScheme["highest"] + | ColorScheme["lowest"] + | ColorScheme["middle"] + | ColorScheme["highest"] color?: keyof ColorScheme["lowest"] margin?: Partial } diff --git a/styles/src/component/text_button.ts b/styles/src/component/text_button.ts index 64a91de7b0424945e153563d36a012380796add1..477c2515e320d5e1d4ac2b2cdaf7f8dd587cdde8 100644 --- a/styles/src/component/text_button.ts +++ b/styles/src/component/text_button.ts @@ -10,9 +10,9 @@ import { Margin } from "./icon_button" interface TextButtonOptions { layer?: - | ColorScheme["lowest"] - | ColorScheme["middle"] - | ColorScheme["highest"] + | ColorScheme["lowest"] + | ColorScheme["middle"] + | ColorScheme["highest"] color?: keyof ColorScheme["lowest"] margin?: Partial text_properties?: TextProperties diff --git a/styles/src/element/interactive.ts b/styles/src/element/interactive.ts index 99b8996aefd7521398880bc7ebeb375a3cb123e3..59ccff40f7c71d0997eb4c112c89d1e316096f32 100644 --- a/styles/src/element/interactive.ts +++ b/styles/src/element/interactive.ts @@ -43,55 +43,55 @@ export function interactive({ }: InteractiveProps): Interactive { if (!base && !state.default) throw new Error(NO_DEFAULT_OR_BASE_ERROR) - let defaultState: T + let default_state: T if (state.default && base) { - defaultState = merge(base, state.default) as T + default_state = merge(base, state.default) as T } else { - defaultState = base ? base : (state.default as T) + default_state = base ? base : (state.default as T) } - const interactiveObj: Interactive = { - default: defaultState, + const interactive_obj: Interactive = { + default: default_state, } - let stateCount = 0 + let state_count = 0 if (state.hovered !== undefined) { - interactiveObj.hovered = merge( - interactiveObj.default, + interactive_obj.hovered = merge( + interactive_obj.default, state.hovered ) as T - stateCount++ + state_count++ } if (state.clicked !== undefined) { - interactiveObj.clicked = merge( - interactiveObj.default, + interactive_obj.clicked = merge( + interactive_obj.default, state.clicked ) as T - stateCount++ + state_count++ } if (state.selected !== undefined) { - interactiveObj.selected = merge( - interactiveObj.default, + interactive_obj.selected = merge( + interactive_obj.default, state.selected ) as T - stateCount++ + state_count++ } if (state.disabled !== undefined) { - interactiveObj.disabled = merge( - interactiveObj.default, + interactive_obj.disabled = merge( + interactive_obj.default, state.disabled ) as T - stateCount++ + state_count++ } - if (stateCount < 1) { + if (state_count < 1) { throw new Error(NOT_ENOUGH_STATES_ERROR) } - return interactiveObj + return interactive_obj } diff --git a/styles/src/element/toggle.ts b/styles/src/element/toggle.ts index ead8f1e8248d16241706d2098067a913d8737917..c3cde46d65962e90e966435c9bc07d5d4d023d93 100644 --- a/styles/src/element/toggle.ts +++ b/styles/src/element/toggle.ts @@ -35,13 +35,13 @@ export function toggleable( if (!base && !state.inactive) throw new Error(NO_INACTIVE_OR_BASE_ERROR) if (!state.active) throw new Error(NO_ACTIVE_ERROR) - const inactiveState = base + const inactive_state = base ? ((state.inactive ? merge(base, state.inactive) : base) as T) : (state.inactive as T) - const toggleObj: Toggleable = { - inactive: inactiveState, + const toggle_obj: Toggleable = { + inactive: inactive_state, active: merge(base ?? {}, state.active) as T, } - return toggleObj + return toggle_obj } diff --git a/styles/src/style_tree/assistant.ts b/styles/src/style_tree/assistant.ts index 7003e0765ce7b72e6766dbbecb8b56ddf3ca8ffc..fbbfbc4cf1cb5f0a487830247294b692dbe96434 100644 --- a/styles/src/style_tree/assistant.ts +++ b/styles/src/style_tree/assistant.ts @@ -10,11 +10,11 @@ export default function assistant(colorScheme: ColorScheme): any { background: editor(colorScheme).background, padding: { left: 12 }, }, - messageHeader: { + message_header: { margin: { bottom: 6, top: 6 }, background: editor(colorScheme).background, }, - hamburgerButton: interactive({ + hamburger_button: interactive({ base: { icon: { color: foreground(layer, "variant"), @@ -36,7 +36,7 @@ export default function assistant(colorScheme: ColorScheme): any { }, }, }), - splitButton: interactive({ + split_button: interactive({ base: { icon: { color: foreground(layer, "variant"), @@ -58,7 +58,7 @@ export default function assistant(colorScheme: ColorScheme): any { }, }, }), - quoteButton: interactive({ + quote_button: interactive({ base: { icon: { color: foreground(layer, "variant"), @@ -80,7 +80,7 @@ export default function assistant(colorScheme: ColorScheme): any { }, }, }), - assistButton: interactive({ + assist_button: interactive({ base: { icon: { color: foreground(layer, "variant"), @@ -102,7 +102,7 @@ export default function assistant(colorScheme: ColorScheme): any { }, }, }), - zoomInButton: interactive({ + zoom_in_button: interactive({ base: { icon: { color: foreground(layer, "variant"), @@ -124,7 +124,7 @@ export default function assistant(colorScheme: ColorScheme): any { }, }, }), - zoomOutButton: interactive({ + zoom_out_button: interactive({ base: { icon: { color: foreground(layer, "variant"), @@ -146,7 +146,7 @@ export default function assistant(colorScheme: ColorScheme): any { }, }, }), - plusButton: interactive({ + plus_button: interactive({ base: { icon: { color: foreground(layer, "variant"), @@ -171,7 +171,7 @@ export default function assistant(colorScheme: ColorScheme): any { title: { ...text(layer, "sans", "default", { size: "sm" }), }, - savedConversation: { + saved_conversation: { container: interactive({ base: { background: background(layer, "on"), @@ -195,7 +195,7 @@ export default function assistant(colorScheme: ColorScheme): any { }), }, }, - userSender: { + user_sender: { default: { ...text(layer, "sans", "default", { size: "sm", @@ -203,7 +203,7 @@ export default function assistant(colorScheme: ColorScheme): any { }), }, }, - assistantSender: { + assistant_sender: { default: { ...text(layer, "sans", "accent", { size: "sm", @@ -211,7 +211,7 @@ export default function assistant(colorScheme: ColorScheme): any { }), }, }, - systemSender: { + system_sender: { default: { ...text(layer, "sans", "variant", { size: "sm", @@ -219,7 +219,7 @@ export default function assistant(colorScheme: ColorScheme): any { }), }, }, - sentAt: { + sent_at: { margin: { top: 2, left: 8 }, ...text(layer, "sans", "default", { size: "2xs" }), }, @@ -228,7 +228,7 @@ export default function assistant(colorScheme: ColorScheme): any { background: background(layer, "on"), margin: { left: 12, right: 12, top: 12 }, padding: 4, - cornerRadius: 4, + corner_radius: 4, ...text(layer, "sans", "default", { size: "xs" }), }, state: { @@ -238,28 +238,28 @@ export default function assistant(colorScheme: ColorScheme): any { }, }, }), - remainingTokens: { + remaining_tokens: { background: background(layer, "on"), margin: { top: 12, right: 24 }, padding: 4, - cornerRadius: 4, + corner_radius: 4, ...text(layer, "sans", "positive", { size: "xs" }), }, - noRemainingTokens: { + no_remaining_tokens: { background: background(layer, "on"), margin: { top: 12, right: 24 }, padding: 4, - cornerRadius: 4, + corner_radius: 4, ...text(layer, "sans", "negative", { size: "xs" }), }, - errorIcon: { + error_icon: { margin: { left: 8 }, color: foreground(layer, "negative"), width: 12, }, - apiKeyEditor: { + api_key_editor: { background: background(layer, "on"), - cornerRadius: 6, + corner_radius: 6, text: text(layer, "mono", "on"), placeholderText: text(layer, "mono", "on", "disabled", { size: "xs", @@ -273,7 +273,7 @@ export default function assistant(colorScheme: ColorScheme): any { top: 4, }, }, - apiKeyPrompt: { + api_key_prompt: { padding: 10, ...text(layer, "sans", "default", { size: "xs" }), }, diff --git a/styles/src/style_tree/command_palette.ts b/styles/src/style_tree/command_palette.ts index 988a1c949bc468c5df53272b053a8ef72c6739ed..9198f87299dcd7deab443556416296e667175683 100644 --- a/styles/src/style_tree/command_palette.ts +++ b/styles/src/style_tree/command_palette.ts @@ -9,7 +9,7 @@ export default function command_palette(colorScheme: ColorScheme): any { const key = toggleable({ base: { text: text(layer, "mono", "variant", "default", { size: "xs" }), - cornerRadius: 2, + corner_radius: 2, background: background(layer, "on"), padding: { top: 1, @@ -32,7 +32,7 @@ export default function command_palette(colorScheme: ColorScheme): any { }) return { - keystrokeSpacing: 8, + keystroke_spacing: 8, // TODO: This should be a Toggle on the rust side so we don't have to do this key: { inactive: { ...key.inactive }, diff --git a/styles/src/style_tree/components.ts b/styles/src/style_tree/components.ts index 6f69023d1292c5721e6145f9b3067122c57144c6..c0b8e9462fb71c69c77f14a16139564efb79dd94 100644 --- a/styles/src/style_tree/components.ts +++ b/styles/src/style_tree/components.ts @@ -1,7 +1,11 @@ -import { fontFamilies, fontSizes, FontWeight } from "../common" +import { + fontFamilies as font_families, + fontSizes as font_sizes, + FontWeight, +} from "../common" import { Layer, Styles, StyleSets, Style } from "../theme/color_scheme" -function isStyleSet(key: any): key is StyleSets { +function is_style_set(key: any): key is StyleSets { return [ "base", "variant", @@ -13,7 +17,7 @@ function isStyleSet(key: any): key is StyleSets { ].includes(key) } -function isStyle(key: any): key is Styles { +function is_style(key: any): key is Styles { return [ "default", "active", @@ -23,78 +27,70 @@ function isStyle(key: any): key is Styles { "inverted", ].includes(key) } -function getStyle( +function get_style( layer: Layer, - possibleStyleSetOrStyle?: any, - possibleStyle?: any + possible_style_set_or_style?: any, + possible_style?: any ): Style { - let styleSet: StyleSets = "base" + let style_set: StyleSets = "base" let style: Styles = "default" - if (isStyleSet(possibleStyleSetOrStyle)) { - styleSet = possibleStyleSetOrStyle - } else if (isStyle(possibleStyleSetOrStyle)) { - style = possibleStyleSetOrStyle + if (is_style_set(possible_style_set_or_style)) { + style_set = possible_style_set_or_style + } else if (is_style(possible_style_set_or_style)) { + style = possible_style_set_or_style } - if (isStyle(possibleStyle)) { - style = possibleStyle + if (is_style(possible_style)) { + style = possible_style } - return layer[styleSet][style] + return layer[style_set][style] } export function background(layer: Layer, style?: Styles): string export function background( layer: Layer, - styleSet?: StyleSets, + style_set?: StyleSets, style?: Styles ): string export function background( layer: Layer, - styleSetOrStyles?: StyleSets | Styles, + style_set_or_styles?: StyleSets | Styles, style?: Styles ): string { - return getStyle(layer, styleSetOrStyles, style).background + return get_style(layer, style_set_or_styles, style).background } -export function borderColor(layer: Layer, style?: Styles): string -export function borderColor( +export function border_color(layer: Layer, style?: Styles): string +export function border_color( layer: Layer, - styleSet?: StyleSets, + style_set?: StyleSets, style?: Styles ): string -export function borderColor( +export function border_color( layer: Layer, - styleSetOrStyles?: StyleSets | Styles, + style_set_or_styles?: StyleSets | Styles, style?: Styles ): string { - return getStyle(layer, styleSetOrStyles, style).border + return get_style(layer, style_set_or_styles, style).border } export function foreground(layer: Layer, style?: Styles): string export function foreground( layer: Layer, - styleSet?: StyleSets, + style_set?: StyleSets, style?: Styles ): string export function foreground( layer: Layer, - styleSetOrStyles?: StyleSets | Styles, + style_set_or_styles?: StyleSets | Styles, style?: Styles ): string { - return getStyle(layer, styleSetOrStyles, style).foreground -} - -interface Text extends Object { - family: keyof typeof fontFamilies - color: string - size: number - weight?: FontWeight - underline?: boolean + return get_style(layer, style_set_or_styles, style).foreground } export interface TextStyle extends Object { - family: keyof typeof fontFamilies + family: keyof typeof font_families color: string size: number weight?: FontWeight @@ -102,7 +98,7 @@ export interface TextStyle extends Object { } export interface TextProperties { - size?: keyof typeof fontSizes + size?: keyof typeof font_sizes weight?: FontWeight underline?: boolean color?: string @@ -182,49 +178,53 @@ interface FontFeatures { export function text( layer: Layer, - fontFamily: keyof typeof fontFamilies, - styleSet: StyleSets, + font_family: keyof typeof font_families, + style_set: StyleSets, style: Styles, properties?: TextProperties -): Text +): TextStyle export function text( layer: Layer, - fontFamily: keyof typeof fontFamilies, - styleSet: StyleSets, + font_family: keyof typeof font_families, + style_set: StyleSets, properties?: TextProperties -): Text +): TextStyle export function text( layer: Layer, - fontFamily: keyof typeof fontFamilies, + font_family: keyof typeof font_families, style: Styles, properties?: TextProperties -): Text +): TextStyle export function text( layer: Layer, - fontFamily: keyof typeof fontFamilies, + font_family: keyof typeof font_families, properties?: TextProperties -): Text +): TextStyle export function text( layer: Layer, - fontFamily: keyof typeof fontFamilies, - styleSetStyleOrProperties?: StyleSets | Styles | TextProperties, - styleOrProperties?: Styles | TextProperties, + font_family: keyof typeof font_families, + style_set_style_or_properties?: StyleSets | Styles | TextProperties, + style_or_properties?: Styles | TextProperties, properties?: TextProperties ) { - const style = getStyle(layer, styleSetStyleOrProperties, styleOrProperties) + const style = get_style( + layer, + style_set_style_or_properties, + style_or_properties + ) - if (typeof styleSetStyleOrProperties === "object") { - properties = styleSetStyleOrProperties + if (typeof style_set_style_or_properties === "object") { + properties = style_set_style_or_properties } - if (typeof styleOrProperties === "object") { - properties = styleOrProperties + if (typeof style_or_properties === "object") { + properties = style_or_properties } - const size = fontSizes[properties?.size || "sm"] + const size = font_sizes[properties?.size || "sm"] const color = properties?.color || style.foreground return { - family: fontFamilies[fontFamily], + family: font_families[font_family], ...properties, color, size, @@ -252,13 +252,13 @@ export interface BorderProperties { export function border( layer: Layer, - styleSet: StyleSets, + style_set: StyleSets, style: Styles, properties?: BorderProperties ): Border export function border( layer: Layer, - styleSet: StyleSets, + style_set: StyleSets, properties?: BorderProperties ): Border export function border( @@ -269,17 +269,17 @@ export function border( export function border(layer: Layer, properties?: BorderProperties): Border export function border( layer: Layer, - styleSetStyleOrProperties?: StyleSets | Styles | BorderProperties, - styleOrProperties?: Styles | BorderProperties, + style_set_or_properties?: StyleSets | Styles | BorderProperties, + style_or_properties?: Styles | BorderProperties, properties?: BorderProperties ): Border { - const style = getStyle(layer, styleSetStyleOrProperties, styleOrProperties) + const style = get_style(layer, style_set_or_properties, style_or_properties) - if (typeof styleSetStyleOrProperties === "object") { - properties = styleSetStyleOrProperties + if (typeof style_set_or_properties === "object") { + properties = style_set_or_properties } - if (typeof styleOrProperties === "object") { - properties = styleOrProperties + if (typeof style_or_properties === "object") { + properties = style_or_properties } return { diff --git a/styles/src/style_tree/contact_finder.ts b/styles/src/style_tree/contact_finder.ts index 239b4b5004e1a0b0871448f38fb75640f36dad1e..f68ce06d3546112bf8979365ac5a72e6843aa5c1 100644 --- a/styles/src/style_tree/contact_finder.ts +++ b/styles/src/style_tree/contact_finder.ts @@ -2,25 +2,25 @@ import picker from "./picker" import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, text } from "./components" -export default function contact_finder(colorScheme: ColorScheme): any { - const layer = colorScheme.middle +export default function contact_finder(theme: ColorScheme): any { + const layer = theme.middle - const sideMargin = 6 - const contactButton = { + const side_margin = 6 + const contact_button = { background: background(layer, "variant"), color: foreground(layer, "variant"), - iconWidth: 8, - buttonWidth: 16, - cornerRadius: 8, + icon_width: 8, + button_width: 16, + corner_radius: 8, } - const pickerStyle = picker(colorScheme) - const pickerInput = { + const picker_style = picker(theme) + const picker_input = { background: background(layer, "on"), - cornerRadius: 6, + corner_radius: 6, text: text(layer, "mono"), - placeholderText: text(layer, "mono", "on", "disabled", { size: "xs" }), - selection: colorScheme.players[0], + placeholder_text: text(layer, "mono", "on", "disabled", { size: "xs" }), + selection: theme.players[0], border: border(layer), padding: { bottom: 4, @@ -29,40 +29,40 @@ export default function contact_finder(colorScheme: ColorScheme): any { top: 4, }, margin: { - left: sideMargin, - right: sideMargin, + left: side_margin, + right: side_margin, }, } return { picker: { - emptyContainer: {}, + empty_container: {}, item: { - ...pickerStyle.item, - margin: { left: sideMargin, right: sideMargin }, + ...picker_style.item, + margin: { left: side_margin, right: side_margin }, }, - noMatches: pickerStyle.noMatches, - inputEditor: pickerInput, - emptyInputEditor: pickerInput, + no_matches: picker_style.noMatches, + input_editor: picker_input, + empty_input_editor: picker_input, }, - rowHeight: 28, - contactAvatar: { - cornerRadius: 10, + row_height: 28, + contact_avatar: { + corner_radius: 10, width: 18, }, - contactUsername: { + contact_username: { padding: { left: 8, }, }, - contactButton: { - ...contactButton, + contact_button: { + ...contact_button, hover: { background: background(layer, "variant", "hovered"), }, }, - disabledContactButton: { - ...contactButton, + disabled_contact_button: { + ...contact_button, background: background(layer, "disabled"), color: foreground(layer, "disabled"), }, diff --git a/styles/src/style_tree/contact_list.ts b/styles/src/style_tree/contact_list.ts index fb6b665a143c65a938111ee6366d775587f04b95..b3b89b7e428ac51be854d263e142dcb6c2191986 100644 --- a/styles/src/style_tree/contact_list.ts +++ b/styles/src/style_tree/contact_list.ts @@ -1,24 +1,30 @@ import { ColorScheme } from "../theme/color_scheme" -import { background, border, borderColor, foreground, text } from "./components" +import { + background, + border, + border_color, + foreground, + text, +} from "./components" import { interactive, toggleable } from "../element" -export default function contacts_panel(colorScheme: ColorScheme): any { +export default function contacts_panel(theme: ColorScheme): any { const nameMargin = 8 const sidePadding = 12 - const layer = colorScheme.middle + const layer = theme.middle const contactButton = { background: background(layer, "on"), color: foreground(layer, "on"), - iconWidth: 8, - buttonWidth: 16, - cornerRadius: 8, + icon_width: 8, + button_width: 16, + corner_radius: 8, } const projectRow = { - guestAvatarSpacing: 4, + guest_avatar_spacing: 4, height: 24, - guestAvatar: { - cornerRadius: 8, + guest_avatar: { + corner_radius: 8, width: 14, }, name: { @@ -43,14 +49,14 @@ export default function contacts_panel(colorScheme: ColorScheme): any { return { background: background(layer), padding: { top: 12 }, - userQueryEditor: { + user_query_editor: { background: background(layer, "on"), - cornerRadius: 6, + corner_radius: 6, text: text(layer, "mono", "on"), - placeholderText: text(layer, "mono", "on", "disabled", { + placeholder_text: text(layer, "mono", "on", "disabled", { size: "xs", }), - selection: colorScheme.players[0], + selection: theme.players[0], border: border(layer, "on"), padding: { bottom: 4, @@ -62,16 +68,16 @@ export default function contacts_panel(colorScheme: ColorScheme): any { left: 6, }, }, - userQueryEditorHeight: 33, - addContactButton: { + user_query_editor_height: 33, + add_contact_button: { margin: { left: 6, right: 12 }, color: foreground(layer, "on"), - buttonWidth: 28, - iconWidth: 16, + button_width: 28, + icon_width: 16, }, - rowHeight: 28, - sectionIconSize: 8, - headerRow: toggleable({ + row_height: 28, + section_icon_size: 8, + header_row: toggleable({ base: interactive({ base: { ...text(layer, "mono", { size: "sm" }), @@ -106,11 +112,11 @@ export default function contacts_panel(colorScheme: ColorScheme): any { }, }, }), - leaveCall: interactive({ + leave_call: interactive({ base: { background: background(layer), border: border(layer), - cornerRadius: 6, + corner_radius: 6, margin: { top: 1, }, @@ -130,7 +136,7 @@ export default function contacts_panel(colorScheme: ColorScheme): any { }, }, }), - contactRow: { + contact_row: { inactive: { default: { padding: { @@ -149,31 +155,30 @@ export default function contacts_panel(colorScheme: ColorScheme): any { }, }, }, - - contactAvatar: { - cornerRadius: 10, + contact_avatar: { + corner_radius: 10, width: 18, }, - contactStatusFree: { - cornerRadius: 4, + contact_status_free: { + corner_radius: 4, padding: 4, margin: { top: 12, left: 12 }, background: foreground(layer, "positive"), }, - contactStatusBusy: { - cornerRadius: 4, + contact_status_busy: { + corner_radius: 4, padding: 4, margin: { top: 12, left: 12 }, background: foreground(layer, "negative"), }, - contactUsername: { + contact_username: { ...text(layer, "mono", { size: "sm" }), margin: { left: nameMargin, }, }, - contactButtonSpacing: nameMargin, - contactButton: interactive({ + contact_button_spacing: nameMargin, + contact_button: interactive({ base: { ...contactButton }, state: { hovered: { @@ -181,35 +186,35 @@ export default function contacts_panel(colorScheme: ColorScheme): any { }, }, }), - disabledButton: { + disabled_button: { ...contactButton, background: background(layer, "on"), color: foreground(layer, "on"), }, - callingIndicator: { + calling_indicator: { ...text(layer, "mono", "variant", { size: "xs" }), }, - treeBranch: toggleable({ + tree_branch: toggleable({ base: interactive({ base: { - color: borderColor(layer), + color: border_color(layer), width: 1, }, state: { hovered: { - color: borderColor(layer), + color: border_color(layer), }, }, }), state: { active: { default: { - color: borderColor(layer), + color: border_color(layer), }, }, }, }), - projectRow: toggleable({ + project_row: toggleable({ base: interactive({ base: { ...projectRow, diff --git a/styles/src/style_tree/contact_notification.ts b/styles/src/style_tree/contact_notification.ts index 6ae2dc5d2037f1d1cea868ab6517000d22e8b52e..71467f6584493a44bea86e68cd5880dc7bcd692e 100644 --- a/styles/src/style_tree/contact_notification.ts +++ b/styles/src/style_tree/contact_notification.ts @@ -4,48 +4,47 @@ import { interactive } from "../element" const avatarSize = 12 const headerPadding = 8 -export default function contact_notification(colorScheme: ColorScheme): any { - const layer = colorScheme.lowest +export default function contact_notification(theme: ColorScheme): any { return { - headerAvatar: { + header_avatar: { height: avatarSize, width: avatarSize, - cornerRadius: 6, + corner_radius: 6, }, - headerMessage: { - ...text(layer, "sans", { size: "xs" }), + header_message: { + ...text(theme.lowest, "sans", { size: "xs" }), margin: { left: headerPadding, right: headerPadding }, }, - headerHeight: 18, - bodyMessage: { - ...text(layer, "sans", { size: "xs" }), + header_height: 18, + body_message: { + ...text(theme.lowest, "sans", { size: "xs" }), margin: { left: avatarSize + headerPadding, top: 6, bottom: 6 }, }, button: interactive({ base: { - ...text(layer, "sans", "on", { size: "xs" }), - background: background(layer, "on"), + ...text(theme.lowest, "sans", "on", { size: "xs" }), + background: background(theme.lowest, "on"), padding: 4, - cornerRadius: 6, + corner_radius: 6, margin: { left: 6 }, }, state: { hovered: { - background: background(layer, "on", "hovered"), + background: background(theme.lowest, "on", "hovered"), }, }, }), - dismissButton: { + dismiss_button: { default: { - color: foreground(layer, "variant"), - iconWidth: 8, + color: foreground(theme.lowest, "variant"), + icon_width: 8, iconHeight: 8, - buttonWidth: 8, + button_width: 8, buttonHeight: 8, hover: { - color: foreground(layer, "hovered"), + color: foreground(theme.lowest, "hovered"), }, }, }, diff --git a/styles/src/style_tree/contacts_popover.ts b/styles/src/style_tree/contacts_popover.ts index 0c9d1a47eb4d2d48d6ffc51124b5eea0b2a1d5db..85c7e7d9f5d0ca6bbb88c4f94d4948fdeb21adeb 100644 --- a/styles/src/style_tree/contacts_popover.ts +++ b/styles/src/style_tree/contacts_popover.ts @@ -5,7 +5,7 @@ export default function contacts_popover(colorScheme: ColorScheme): any { const layer = colorScheme.middle return { background: background(layer), - cornerRadius: 6, + corner_radius: 6, padding: { top: 6, bottom: 6 }, shadow: colorScheme.popoverShadow, border: border(layer), diff --git a/styles/src/style_tree/context_menu.ts b/styles/src/style_tree/context_menu.ts index 52795be79684202c0381ccc4daeb1d868289d31f..69ab7de4968ec8d96233069d934a7ed2e14d971d 100644 --- a/styles/src/style_tree/context_menu.ts +++ b/styles/src/style_tree/context_menu.ts @@ -1,12 +1,12 @@ import { ColorScheme } from "../theme/color_scheme" -import { background, border, borderColor, text } from "./components" +import { background, border, border_color, text } from "./components" import { interactive, toggleable } from "../element" export default function context_menu(colorScheme: ColorScheme): any { const layer = colorScheme.middle return { background: background(layer), - cornerRadius: 10, + corner_radius: 10, padding: 4, shadow: colorScheme.popoverShadow, border: border(layer), @@ -15,9 +15,9 @@ export default function context_menu(colorScheme: ColorScheme): any { base: interactive({ base: { iconSpacing: 8, - iconWidth: 14, + icon_width: 14, padding: { left: 6, right: 6, top: 2, bottom: 2 }, - cornerRadius: 6, + corner_radius: 6, label: text(layer, "sans", { size: "sm" }), keystroke: { ...text(layer, "sans", "variant", { @@ -60,7 +60,7 @@ export default function context_menu(colorScheme: ColorScheme): any { }), separator: { - background: borderColor(layer), + background: border_color(layer), margin: { top: 2, bottom: 2 }, }, } diff --git a/styles/src/style_tree/copilot.ts b/styles/src/style_tree/copilot.ts index cd2bbe0584fd145e3b24270a911e53fae8e7bc89..9f80f6f34c7caa6b9c7c6b0187311e23269c8b88 100644 --- a/styles/src/style_tree/copilot.ts +++ b/styles/src/style_tree/copilot.ts @@ -12,7 +12,7 @@ export default function copilot(colorScheme: ColorScheme): any { base: { background: background(layer), border: border(layer, "default"), - cornerRadius: 4, + corner_radius: 4, margin: { top: 4, bottom: 4, @@ -46,7 +46,7 @@ export default function copilot(colorScheme: ColorScheme): any { 12 ), container: { - cornerRadius: 6, + corner_radius: 6, padding: { left: 6 }, }, }, @@ -93,7 +93,7 @@ export default function copilot(colorScheme: ColorScheme): any { 8 ), container: { - cornerRadius: 2, + corner_radius: 2, padding: { top: 4, bottom: 4, @@ -246,7 +246,7 @@ export default function copilot(colorScheme: ColorScheme): any { }), border: border(layer, "warning"), background: background(layer, "warning"), - cornerRadius: 2, + corner_radius: 2, padding: { top: 4, left: 4, diff --git a/styles/src/style_tree/editor.ts b/styles/src/style_tree/editor.ts index 9bf46055808c75a0da66180066fce46094504db7..14df1b0bb3953cc5bbd559175bc0d8cc30ffe76b 100644 --- a/styles/src/style_tree/editor.ts +++ b/styles/src/style_tree/editor.ts @@ -1,6 +1,12 @@ import { withOpacity } from "../theme/color" import { ColorScheme, Layer, StyleSets } from "../theme/color_scheme" -import { background, border, borderColor, foreground, text } from "./components" +import { + background, + border, + border_color, + foreground, + text, +} from "./components" import hoverPopover from "./hover_popover" import { buildSyntax } from "../theme/syntax" @@ -12,7 +18,7 @@ export default function editor(colorScheme: ColorScheme): any { const layer = colorScheme.highest const autocompleteItem = { - cornerRadius: 6, + corner_radius: 6, padding: { bottom: 2, left: 6, @@ -111,7 +117,7 @@ export default function editor(colorScheme: ColorScheme): any { }), ellipses: { textColor: colorScheme.ramps.neutral(0.71).hex(), - cornerRadiusFactor: 0.15, + corner_radiusFactor: 0.15, background: { // Copied from hover_popover highlight default: { @@ -141,7 +147,7 @@ export default function editor(colorScheme: ColorScheme): any { : colorScheme.ramps.green(0.5).hex(), removedWidthEm: 0.275, widthEm: 0.15, - cornerRadius: 0.05, + corner_radius: 0.05, }, /** Highlights matching occurrences of what is under the cursor * as well as matched brackets @@ -174,7 +180,7 @@ export default function editor(colorScheme: ColorScheme): any { ], autocomplete: { background: background(colorScheme.middle), - cornerRadius: 8, + corner_radius: 8, padding: 4, margin: { left: -14, @@ -204,7 +210,7 @@ export default function editor(colorScheme: ColorScheme): any { }, diagnosticHeader: { background: background(colorScheme.middle), - iconWidthFactor: 1.5, + icon_widthFactor: 1.5, textScaleFactor: 0.857, border: border(colorScheme.middle, { bottom: true, @@ -257,9 +263,9 @@ export default function editor(colorScheme: ColorScheme): any { jumpIcon: interactive({ base: { color: foreground(layer, "on"), - iconWidth: 20, - buttonWidth: 20, - cornerRadius: 6, + icon_width: 20, + button_width: 20, + corner_radius: 6, padding: { top: 6, bottom: 6, @@ -284,7 +290,7 @@ export default function editor(colorScheme: ColorScheme): any { background: withOpacity(background(layer, "inverted"), 0.3), border: { width: 1, - color: borderColor(layer, "variant"), + color: border_color(layer, "variant"), top: false, right: true, left: true, @@ -306,7 +312,7 @@ export default function editor(colorScheme: ColorScheme): any { compositionMark: { underline: { thickness: 1.0, - color: borderColor(layer), + color: border_color(layer), }, }, syntax, diff --git a/styles/src/style_tree/feedback.ts b/styles/src/style_tree/feedback.ts index 88f3cebc37e7da2ebd5bf33799ee1a392edfd6cd..040c8994be10b05395c668adb09e63600122be22 100644 --- a/styles/src/style_tree/feedback.ts +++ b/styles/src/style_tree/feedback.ts @@ -10,7 +10,7 @@ export default function feedback(colorScheme: ColorScheme): any { base: { ...text(layer, "mono", "on"), background: background(layer, "on"), - cornerRadius: 6, + corner_radius: 6, border: border(layer, "on"), margin: { right: 4, diff --git a/styles/src/style_tree/hover_popover.ts b/styles/src/style_tree/hover_popover.ts index 68eba194948b7217b9db0f7681c5a3dbf90722a9..42c4f72a263469369fd98ea0ae8f65270767a9ed 100644 --- a/styles/src/style_tree/hover_popover.ts +++ b/styles/src/style_tree/hover_popover.ts @@ -5,7 +5,7 @@ export default function hover_popover(colorScheme: ColorScheme): any { const layer = colorScheme.middle const baseContainer = { background: background(layer), - cornerRadius: 8, + corner_radius: 8, padding: { left: 8, right: 8, diff --git a/styles/src/style_tree/incoming_call_notification.ts b/styles/src/style_tree/incoming_call_notification.ts index 9a6d400017f734ba5e7bd2a3a35ccf000a466b53..2d76da7de82eef92a158fb5d2fa2870c085f547b 100644 --- a/styles/src/style_tree/incoming_call_notification.ts +++ b/styles/src/style_tree/incoming_call_notification.ts @@ -16,7 +16,7 @@ export default function incoming_call_notification( callerAvatar: { height: avatarSize, width: avatarSize, - cornerRadius: avatarSize / 2, + corner_radius: avatarSize / 2, }, callerMetadata: { margin: { left: 10 }, @@ -33,7 +33,7 @@ export default function incoming_call_notification( ...text(layer, "sans", "variant", { size: "xs", weight: "bold" }), margin: { top: -3 }, }, - buttonWidth: 96, + button_width: 96, acceptButton: { background: background(layer, "accent"), border: border(layer, { left: true, bottom: true }), diff --git a/styles/src/style_tree/picker.ts b/styles/src/style_tree/picker.ts index 417c1faea4c429315a5c439065a77f0672a06eef..99bd716c16133be1e17b07dff16a1b9788c8da8f 100644 --- a/styles/src/style_tree/picker.ts +++ b/styles/src/style_tree/picker.ts @@ -9,7 +9,7 @@ export default function picker(colorScheme: ColorScheme): any { background: background(layer), border: border(layer), shadow: colorScheme.modalShadow, - cornerRadius: 12, + corner_radius: 12, padding: { bottom: 4, }, @@ -53,7 +53,7 @@ export default function picker(colorScheme: ColorScheme): any { left: 4, right: 4, }, - cornerRadius: 8, + corner_radius: 8, text: text(layer, "sans", "variant"), highlightText: text(layer, "sans", "accent", { weight: "bold", diff --git a/styles/src/style_tree/project_diagnostics.ts b/styles/src/style_tree/project_diagnostics.ts index f3f5a5a144653f3573057e19e8c462c553c5f3b7..10f556d12150332a79a506370096651bae217d1e 100644 --- a/styles/src/style_tree/project_diagnostics.ts +++ b/styles/src/style_tree/project_diagnostics.ts @@ -6,7 +6,7 @@ export default function project_diagnostics(colorScheme: ColorScheme): any { return { background: background(layer), tabIconSpacing: 4, - tabIconWidth: 13, + tab_icon_width: 13, tabSummarySpacing: 10, emptyMessage: text(layer, "sans", "variant", { size: "md" }), } diff --git a/styles/src/style_tree/project_panel.ts b/styles/src/style_tree/project_panel.ts index c38c689f4fe3e02801c07d931228bf7c689dbbb4..ac5c577e2114e4bad8aa2d3513c896aeec24fcc0 100644 --- a/styles/src/style_tree/project_panel.ts +++ b/styles/src/style_tree/project_panel.ts @@ -117,7 +117,7 @@ export default function project_panel(theme: ColorScheme): any { base: { background: background(layer), border: border(layer, "active"), - cornerRadius: 4, + corner_radius: 4, margin: { top: 16, left: 16, diff --git a/styles/src/style_tree/project_shared_notification.ts b/styles/src/style_tree/project_shared_notification.ts index f8b103e2e497859445ee82b914b88f80a56a6945..8437ab6c1bb628206bd9367691ea448f189a7873 100644 --- a/styles/src/style_tree/project_shared_notification.ts +++ b/styles/src/style_tree/project_shared_notification.ts @@ -17,7 +17,7 @@ export default function project_shared_notification( ownerAvatar: { height: avatarSize, width: avatarSize, - cornerRadius: avatarSize / 2, + corner_radius: avatarSize / 2, }, ownerMetadata: { margin: { left: 10 }, @@ -34,7 +34,7 @@ export default function project_shared_notification( ...text(layer, "sans", "variant", { size: "xs", weight: "bold" }), margin: { top: -3 }, }, - buttonWidth: 96, + button_width: 96, openButton: { background: background(layer, "accent"), border: border(layer, { left: true, bottom: true }), diff --git a/styles/src/style_tree/search.ts b/styles/src/style_tree/search.ts index c236284fa06ed1f7839ea7cefcaf5a842aac7468..37040613b303bee0a032756e7359f24a32ae1170 100644 --- a/styles/src/style_tree/search.ts +++ b/styles/src/style_tree/search.ts @@ -9,7 +9,7 @@ export default function search(colorScheme: ColorScheme): any { // Search input const editor = { background: background(layer), - cornerRadius: 8, + corner_radius: 8, minWidth: 200, maxWidth: 500, placeholderText: text(layer, "mono", "disabled"), @@ -41,7 +41,7 @@ export default function search(colorScheme: ColorScheme): any { base: { ...text(layer, "mono", "on"), background: background(layer, "on"), - cornerRadius: 6, + corner_radius: 6, border: border(layer, "on"), margin: { right: 4, @@ -115,8 +115,8 @@ export default function search(colorScheme: ColorScheme): any { dismissButton: interactive({ base: { color: foreground(layer, "variant"), - iconWidth: 12, - buttonWidth: 14, + icon_width: 12, + button_width: 14, padding: { left: 10, right: 10, diff --git a/styles/src/style_tree/shared_screen.ts b/styles/src/style_tree/shared_screen.ts index 718ea20642dd401f14d1f35c80c87921b3349b44..bc4ac0b5d705cca2d2f25597ba26681bbfc6feaf 100644 --- a/styles/src/style_tree/shared_screen.ts +++ b/styles/src/style_tree/shared_screen.ts @@ -1,10 +1,7 @@ import { ColorScheme } from "../theme/color_scheme" -import { StyleTree } from "../types" import { background } from "./components" -export default function sharedScreen( - colorScheme: ColorScheme -): StyleTree.SharedScreen { +export default function sharedScreen(colorScheme: ColorScheme) { const layer = colorScheme.highest return { background: background(layer), diff --git a/styles/src/style_tree/simple_message_notification.ts b/styles/src/style_tree/simple_message_notification.ts index 207924a99fbafddec7b4b3e78e03ea60d1e8a58d..621bf21232a15bb665bdab91b0a5b738fd251730 100644 --- a/styles/src/style_tree/simple_message_notification.ts +++ b/styles/src/style_tree/simple_message_notification.ts @@ -17,7 +17,7 @@ export default function simple_message_notification( base: { ...text(layer, "sans", { size: "xs" }), border: border(layer, "active"), - cornerRadius: 4, + corner_radius: 4, padding: { top: 3, bottom: 3, @@ -38,9 +38,9 @@ export default function simple_message_notification( dismissButton: interactive({ base: { color: foreground(layer), - iconWidth: 8, + icon_width: 8, iconHeight: 8, - buttonWidth: 8, + button_width: 8, buttonHeight: 8, }, state: { diff --git a/styles/src/style_tree/status_bar.ts b/styles/src/style_tree/status_bar.ts index e86afb1c0da2acd81d8a4f6635bcb3555e78b48e..fb1c572615152159c63b3739324ed97f1c585103 100644 --- a/styles/src/style_tree/status_bar.ts +++ b/styles/src/style_tree/status_bar.ts @@ -5,12 +5,12 @@ export default function status_bar(colorScheme: ColorScheme): any { const layer = colorScheme.lowest const statusContainer = { - cornerRadius: 6, + corner_radius: 6, padding: { top: 3, bottom: 3, left: 6, right: 6 }, } const diagnosticStatusContainer = { - cornerRadius: 6, + corner_radius: 6, padding: { top: 1, bottom: 1, left: 6, right: 6 }, } @@ -42,7 +42,7 @@ export default function status_bar(colorScheme: ColorScheme): any { base: { ...diagnosticStatusContainer, iconSpacing: 4, - iconWidth: 14, + icon_width: 14, height: 18, message: text(layer, "sans"), iconColor: foreground(layer), @@ -64,7 +64,7 @@ export default function status_bar(colorScheme: ColorScheme): any { diagnosticSummary: interactive({ base: { height: 20, - iconWidth: 16, + icon_width: 16, iconSpacing: 2, summarySpacing: 6, text: text(layer, "sans", { size: "sm" }), @@ -72,7 +72,7 @@ export default function status_bar(colorScheme: ColorScheme): any { iconColorWarning: foreground(layer, "warning"), iconColorError: foreground(layer, "negative"), containerOk: { - cornerRadius: 6, + corner_radius: 6, padding: { top: 3, bottom: 3, left: 7, right: 7 }, }, containerWarning: { @@ -143,7 +143,7 @@ export default function status_bar(colorScheme: ColorScheme): any { }, }), badge: { - cornerRadius: 3, + corner_radius: 3, padding: 2, margin: { bottom: -1, right: -1 }, border: border(layer), diff --git a/styles/src/style_tree/tab_bar.ts b/styles/src/style_tree/tab_bar.ts index fe43934f79fa4a491009355f95249f5d6ad71ec7..d8323809edd2118876484cfa8f1f77f5b3674335 100644 --- a/styles/src/style_tree/tab_bar.ts +++ b/styles/src/style_tree/tab_bar.ts @@ -25,10 +25,10 @@ export default function tab_bar(colorScheme: ColorScheme): any { spacing: 8, // Tab type icons (e.g. Project Search) - typeIconWidth: 14, + type_icon_width: 14, // Close icons - closeIconWidth: 8, + close_icon_width: 8, iconClose: foreground(layer, "variant"), iconCloseActive: foreground(layer, "hovered"), @@ -92,8 +92,8 @@ export default function tab_bar(colorScheme: ColorScheme): any { base: interactive({ base: { color: foreground(layer, "variant"), - iconWidth: 12, - buttonWidth: activePaneActiveTab.height, + icon_width: 12, + button_width: activePaneActiveTab.height, }, state: { hovered: { diff --git a/styles/src/style_tree/terminal.ts b/styles/src/style_tree/terminal.ts index 4e3dc18627c3262b78acc402e67352100e7aa2dc..e902aa42647a56b1de3642a0c89673863a62754f 100644 --- a/styles/src/style_tree/terminal.ts +++ b/styles/src/style_tree/terminal.ts @@ -1,7 +1,6 @@ import { ColorScheme } from "../theme/color_scheme" -import { StyleTree } from "../types" -export default function terminal(theme: ColorScheme): StyleTree.TerminalStyle { +export default function terminal(theme: ColorScheme) { /** * Colors are controlled per-cell in the terminal grid. * Cells can be set to any of these more 'theme-capable' colors diff --git a/styles/src/style_tree/titlebar.ts b/styles/src/style_tree/titlebar.ts index a5bcdc9492d38a20f0e2863884f0ac9b2c447f44..dc1d098a3c3369aeb061764f2c2f38e7f21038a1 100644 --- a/styles/src/style_tree/titlebar.ts +++ b/styles/src/style_tree/titlebar.ts @@ -78,7 +78,7 @@ function user_menu(theme: ColorScheme) { const button = toggleable({ base: interactive({ base: { - cornerRadius: 6, + corner_radius: 6, height: button_height, width: online ? 37 : 24, padding: { @@ -180,13 +180,13 @@ export function titlebar(theme: ColorScheme): any { leaderAvatar: { width: avatarWidth, outerWidth: avatarOuterWidth, - cornerRadius: avatarWidth / 2, + corner_radius: avatarWidth / 2, outerCornerRadius: avatarOuterWidth / 2, }, followerAvatar: { width: followerAvatarWidth, outerWidth: followerAvatarOuterWidth, - cornerRadius: followerAvatarWidth / 2, + corner_radius: followerAvatarWidth / 2, outerCornerRadius: followerAvatarOuterWidth / 2, }, inactiveAvatarGrayscale: true, @@ -202,7 +202,7 @@ export function titlebar(theme: ColorScheme): any { top: 2, bottom: 2, }, - cornerRadius: 6, + corner_radius: 6, }, avatarRibbon: { height: 3, @@ -234,7 +234,7 @@ export function titlebar(theme: ColorScheme): any { left: 8, right: 8, }, - cornerRadius: 6, + corner_radius: 6, }, leave_call_button: icon_button(theme, { @@ -254,7 +254,7 @@ export function titlebar(theme: ColorScheme): any { // Jewel that notifies you that there are new contact requests toggleContactsBadge: { - cornerRadius: 3, + corner_radius: 3, padding: 2, margin: { top: 3, left: 3 }, border: border(theme.lowest), diff --git a/styles/src/style_tree/toolbar_dropdown_menu.ts b/styles/src/style_tree/toolbar_dropdown_menu.ts index 992631e0363eb668695d3ebaa2633e0c5a2bd077..5d0bf89d93eb27f82b5f94e7b9450129ea15eee5 100644 --- a/styles/src/style_tree/toolbar_dropdown_menu.ts +++ b/styles/src/style_tree/toolbar_dropdown_menu.ts @@ -18,7 +18,7 @@ export default function dropdown_menu(colorScheme: ColorScheme): any { }), secondaryTextSpacing: 10, padding: { left: 8, right: 8, top: 2, bottom: 2 }, - cornerRadius: 6, + corner_radius: 6, background: background(layer, "on"), }, state: { diff --git a/styles/src/style_tree/tooltip.ts b/styles/src/style_tree/tooltip.ts index 54daae529e55782cc11f659a943461ca92ab3b9c..a872477f4987680207b75cbe2bed6f6329e300af 100644 --- a/styles/src/style_tree/tooltip.ts +++ b/styles/src/style_tree/tooltip.ts @@ -9,11 +9,11 @@ export default function tooltip(colorScheme: ColorScheme): any { padding: { top: 4, bottom: 4, left: 8, right: 8 }, margin: { top: 6, left: 6 }, shadow: colorScheme.popoverShadow, - cornerRadius: 6, + corner_radius: 6, text: text(layer, "sans", { size: "xs" }), keystroke: { background: background(layer, "on"), - cornerRadius: 4, + corner_radius: 4, margin: { left: 6 }, padding: { left: 4, right: 4 }, ...text(layer, "mono", "on", { size: "xs", weight: "bold" }), diff --git a/styles/src/style_tree/update_notification.ts b/styles/src/style_tree/update_notification.ts index c6e6130f540c1b7fc448dce99ff7048bdd2d71f5..e3cf833ce85e0e83ac655b6285485af1c882be13 100644 --- a/styles/src/style_tree/update_notification.ts +++ b/styles/src/style_tree/update_notification.ts @@ -25,9 +25,9 @@ export default function update_notification(colorScheme: ColorScheme): any { dismissButton: interactive({ base: { color: foreground(layer), - iconWidth: 8, + icon_width: 8, iconHeight: 8, - buttonWidth: 8, + button_width: 8, buttonHeight: 8, }, state: { diff --git a/styles/src/style_tree/welcome.ts b/styles/src/style_tree/welcome.ts index 93f18267401da2a5abc9b39defbc505824b634ab..5d0bc90a00d1e4be6d7c7cfb4f2553cf2b8739cd 100644 --- a/styles/src/style_tree/welcome.ts +++ b/styles/src/style_tree/welcome.ts @@ -14,7 +14,7 @@ export default function welcome(colorScheme: ColorScheme): any { const layer = colorScheme.highest const checkboxBase = { - cornerRadius: 4, + corner_radius: 4, padding: { left: 3, right: 3, @@ -57,7 +57,7 @@ export default function welcome(colorScheme: ColorScheme): any { checkboxGroup: { border: border(layer, "variant"), background: withOpacity(background(layer, "hovered"), 0.25), - cornerRadius: 4, + corner_radius: 4, padding: { left: 12, top: 2, @@ -68,7 +68,7 @@ export default function welcome(colorScheme: ColorScheme): any { base: { background: background(layer), border: border(layer, "active"), - cornerRadius: 4, + corner_radius: 4, margin: { top: 4, bottom: 4, diff --git a/styles/src/style_tree/workspace.ts b/styles/src/style_tree/workspace.ts index 48217e89c74234f324c9788142e8721e57004b46..2ba0281b17ef6ae9976a88d77842245512b75252 100644 --- a/styles/src/style_tree/workspace.ts +++ b/styles/src/style_tree/workspace.ts @@ -3,7 +3,7 @@ import { withOpacity } from "../theme/color" import { background, border, - borderColor, + border_color, foreground, svg, text, @@ -46,7 +46,7 @@ export default function workspace(colorScheme: ColorScheme): any { margin: { top: 96, }, - cornerRadius: 4, + corner_radius: 4, }, keyboardHint: interactive({ base: { @@ -57,7 +57,7 @@ export default function workspace(colorScheme: ColorScheme): any { right: 8, bottom: 3, }, - cornerRadius: 8, + corner_radius: 8, }, state: { hovered: { @@ -69,7 +69,7 @@ export default function workspace(colorScheme: ColorScheme): any { keyboardHintWidth: 320, }, joiningProjectAvatar: { - cornerRadius: 40, + corner_radius: 40, width: 80, }, joiningProjectMessage: { @@ -79,7 +79,7 @@ export default function workspace(colorScheme: ColorScheme): any { externalLocationMessage: { background: background(colorScheme.middle, "accent"), border: border(colorScheme.middle, "accent"), - cornerRadius: 6, + corner_radius: 6, padding: 12, margin: { bottom: 8, right: 8 }, ...text(colorScheme.middle, "sans", "accent", { size: "xs" }), @@ -121,7 +121,7 @@ export default function workspace(colorScheme: ColorScheme): any { }, }, paneDivider: { - color: borderColor(layer), + color: border_color(layer), width: 1, }, statusBar: statusBar(colorScheme), @@ -134,9 +134,9 @@ export default function workspace(colorScheme: ColorScheme): any { navButton: interactive({ base: { color: foreground(colorScheme.highest, "on"), - iconWidth: 12, - buttonWidth: 24, - cornerRadius: 6, + icon_width: 12, + button_width: 24, + corner_radius: 6, }, state: { hovered: { @@ -162,7 +162,7 @@ export default function workspace(colorScheme: ColorScheme): any { breadcrumbs: interactive({ base: { ...text(colorScheme.highest, "sans", "variant"), - cornerRadius: 6, + corner_radius: 6, padding: { left: 6, right: 6, @@ -186,7 +186,7 @@ export default function workspace(colorScheme: ColorScheme): any { notification: { margin: { top: 10 }, background: background(colorScheme.middle), - cornerRadius: 6, + corner_radius: 6, padding: 12, border: border(colorScheme.middle), shadow: colorScheme.popoverShadow, diff --git a/styles/src/theme/color_scheme.ts b/styles/src/theme/color_scheme.ts index 61b459911b96aec679ae58b57bfc477470344483..5d62bcffdbfe7eebd27b37995153df508437a2e4 100644 --- a/styles/src/theme/color_scheme.ts +++ b/styles/src/theme/color_scheme.ts @@ -252,11 +252,7 @@ function buildStyleSet( } } -function buildStyleDefinition( - bgBase: number, - fgBase: number, - step = 0.08 -) { +function buildStyleDefinition(bgBase: number, fgBase: number, step = 0.08) { return { background: { default: bgBase, diff --git a/styles/src/types/element.ts b/styles/src/types/element.ts deleted file mode 100644 index d6da5f9b714d05db89181d41702c6db1d9273569..0000000000000000000000000000000000000000 --- a/styles/src/types/element.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Clean } from "./util" -import * as zed from "./zed" - -export type Text = Clean diff --git a/styles/src/types/index.ts b/styles/src/types/index.ts deleted file mode 100644 index 3a017feb280589b65ea35966bb8bc1368b29c72e..0000000000000000000000000000000000000000 --- a/styles/src/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as StyleTree from "./styleTree" -import * as Property from "./property" -import * as Element from "./element" - -export { StyleTree, Property, Element } diff --git a/styles/src/types/property.ts b/styles/src/types/property.ts deleted file mode 100644 index 6205b725ef02782478f583c36d700788643488eb..0000000000000000000000000000000000000000 --- a/styles/src/types/property.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Clean } from "./util" -import * as zed from "./zed" - -export type Color = zed.Color -export type CursorStyle = zed.CursorStyle -export type FontStyle = zed.Style -export type Border = Clean -export type Margin = Clean -export type Padding = Clean diff --git a/styles/src/types/style_tree.ts b/styles/src/types/style_tree.ts deleted file mode 100644 index 08ae6833497367cbb6a90943072cc78f43a37ff5..0000000000000000000000000000000000000000 --- a/styles/src/types/style_tree.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Clean } from "./util" -import * as zed from "./zed" - -export type AssistantStyle = Readonly> -export type CommandPalette = Readonly> -export type ContactFinder = Readonly> -export type ContactList = Readonly> -export type ContactNotification = Readonly> -export type ContactsPopover = Readonly> -export type ContextMenu = Readonly> -export type Copilot = Readonly> -export type Editor = Readonly> -export type FeedbackStyle = Readonly> -export type IncomingCallNotification = Readonly< - Clean -> -export type ThemeMeta = Readonly> -export type Picker = Readonly> -export type ProjectDiagnostics = Readonly> -export type ProjectPanel = Readonly> -export type ProjectSharedNotification = Readonly< - Clean -> -export type Search = Readonly> -export type SharedScreen = Readonly> -export type MessageNotification = Readonly> -export type TerminalStyle = Readonly> -export type UserMenu = Readonly> -export type DropdownMenu = Readonly> -export type TooltipStyle = Readonly> -export type UpdateNotification = Readonly> -export type WelcomeStyle = Readonly> -export type Workspace = Readonly> diff --git a/styles/src/types/util.ts b/styles/src/types/util.ts deleted file mode 100644 index 99a742124a378855ed73125a5d573dee756df455..0000000000000000000000000000000000000000 --- a/styles/src/types/util.ts +++ /dev/null @@ -1,17 +0,0 @@ -export type Prettify = { - [K in keyof T]: T[K] -} & unknown - -/** - * Clean removes the [k: string]: unknown property from an object, - * and Prettifies it, providing better hover information for the type - */ -export type Clean = { - [K in keyof T as string extends K ? never : K]: T[K] -} - -export type DeepClean = { - [K in keyof T as string extends K ? never : K]: T[K] extends object - ? DeepClean - : T[K] -} diff --git a/styles/src/utils/snake_case.ts b/styles/src/utils/snake_case.ts index 38c8a90a9e864177dcea255fa5b87a87da5a9607..cdd9684752826c5606b0e0273b5286bca57c85e0 100644 --- a/styles/src/utils/snake_case.ts +++ b/styles/src/utils/snake_case.ts @@ -5,8 +5,8 @@ import { snakeCase } from "case-anything" // Typescript magic to convert any string from camelCase to snake_case at compile time type SnakeCase = S extends string ? S extends `${infer T}${infer U}` - ? `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` - : S + ? `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` + : S : S type SnakeCased = { diff --git a/styles/tsconfig.json b/styles/tsconfig.json index cf68509748e64500cdc75f2e64ebecee06265814..925935ebb5f2f1335f838f89465a6c8ad65ce312 100644 --- a/styles/tsconfig.json +++ b/styles/tsconfig.json @@ -24,33 +24,15 @@ "useUnknownInCatchVariables": false, "baseUrl": ".", "paths": { - "@/*": [ - "./*" - ], - "@element/*": [ - "./src/element/*" - ], - "@component/*": [ - "./src/component/*" - ], - "@styleTree/*": [ - "./src/styleTree/*" - ], - "@theme/*": [ - "./src/theme/*" - ], - "@types/*": [ - "./src/util/*" - ], - "@themes/*": [ - "./src/themes/*" - ], - "@util/*": [ - "./src/util/*" - ] + "@/*": ["./*"], + "@element/*": ["./src/element/*"], + "@component/*": ["./src/component/*"], + "@styleTree/*": ["./src/styleTree/*"], + "@theme/*": ["./src/theme/*"], + "@types/*": ["./src/util/*"], + "@themes/*": ["./src/themes/*"], + "@util/*": ["./src/util/*"] } }, - "exclude": [ - "node_modules" - ] + "exclude": ["node_modules"] } From ba17fae8d9d62f11b42d13073bdd02842c10dbb7 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 29 Jun 2023 01:48:40 -0400 Subject: [PATCH 06/13] WIP snake_case 2/? --- styles/.eslintrc.js | 11 ++ styles/mod.py | 42 ----- styles/package-lock.json | 10 ++ styles/package.json | 1 + styles/src/build_licenses.ts | 30 ++-- styles/src/build_themes.ts | 38 ++--- styles/src/build_tokens.ts | 70 ++++---- styles/src/build_types.ts | 36 ++--- styles/src/common.ts | 24 +-- styles/src/style_tree/components.ts | 4 +- styles/src/style_tree/contacts_popover.ts | 9 +- styles/src/style_tree/context_menu.ts | 33 ++-- styles/src/style_tree/copilot.ts | 83 +++++----- styles/src/style_tree/editor.ts | 150 +++++++++--------- .../style_tree/incoming_call_notification.ts | 4 +- styles/src/style_tree/project_panel.ts | 2 +- .../style_tree/project_shared_notification.ts | 4 +- styles/src/style_tree/status_bar.ts | 4 +- styles/src/theme/syntax.ts | 94 +++++------ styles/src/themes/gruvbox/gruvbox-common.ts | 4 +- styles/src/themes/one/one-dark.ts | 8 +- styles/src/themes/one/one-light.ts | 8 +- styles/src/themes/rose-pine/common.ts | 4 +- 23 files changed, 317 insertions(+), 356 deletions(-) delete mode 100644 styles/mod.py diff --git a/styles/.eslintrc.js b/styles/.eslintrc.js index c131089e141419914f41bb5c1f623d554ddf95c1..0b4af9dcbc29895d3e83589972106da88d401c8a 100644 --- a/styles/.eslintrc.js +++ b/styles/.eslintrc.js @@ -29,6 +29,17 @@ module.exports = { rules: { "linebreak-style": ["error", "unix"], semi: ["error", "never"], + "@typescript-eslint/naming-convention": [ + "warn", + { + selector: ["property", "variableLike", "memberLike", "method"], + format: ["snake_case"], + }, + { + selector: ["typeLike"], + format: ["PascalCase"], + }, + ], "import/no-restricted-paths": [ "error", { diff --git a/styles/mod.py b/styles/mod.py deleted file mode 100644 index 77238e5b45428beab2100f6ea2f7be707ae52acd..0000000000000000000000000000000000000000 --- a/styles/mod.py +++ /dev/null @@ -1,42 +0,0 @@ -import os, sys, re - - -def camel_to_snake(inputstring): - REG = r'(?=10.0.0" + } + }, "node_modules/eslint-scope": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", diff --git a/styles/package.json b/styles/package.json index 06621e8cc1a6ec4e5f2fc854237f8cb202333b78..1b90b81048faf590625091b92089d7b40c4adc9f 100644 --- a/styles/package.json +++ b/styles/package.json @@ -41,6 +41,7 @@ "eslint": "^8.43.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "^2.27.5", + "eslint-plugin-snakecasejs": "^2.2.0", "typescript": "^5.1.5" } } diff --git a/styles/src/build_licenses.ts b/styles/src/build_licenses.ts index 93a2bd302aa1d88cbd2050b681c8fe110a3bef1f..88cefe15c7beaa913b5721a0c1064ff7d5ceb8e8 100644 --- a/styles/src/build_licenses.ts +++ b/styles/src/build_licenses.ts @@ -6,7 +6,7 @@ import { ThemeConfig } from "./common" const ACCEPTED_LICENSES_FILE = `${__dirname}/../../script/licenses/zed-licenses.toml` // Use the cargo-about configuration file as the source of truth for supported licenses. -function parseAcceptedToml(file: string): string[] { +function parse_accepted_toml(file: string): string[] { const buffer = fs.readFileSync(file).toString() const obj = toml.parse(buffer) @@ -18,7 +18,7 @@ function parseAcceptedToml(file: string): string[] { return obj.accepted } -function checkLicenses(themes: ThemeConfig[]) { +function check_licenses(themes: ThemeConfig[]) { for (const theme of themes) { if (!theme.licenseFile) { throw Error(`Theme ${theme.name} should have a LICENSE file`) @@ -26,25 +26,25 @@ function checkLicenses(themes: ThemeConfig[]) { } } -function generateLicenseFile(themes: ThemeConfig[]) { - checkLicenses(themes) +function generate_license_file(themes: ThemeConfig[]) { + check_licenses(themes) for (const theme of themes) { - const licenseText = fs.readFileSync(theme.licenseFile).toString() - writeLicense(theme.name, licenseText, theme.licenseUrl) + const license_text = fs.readFileSync(theme.licenseFile).toString() + write_license(theme.name, license_text, theme.licenseUrl) } } -function writeLicense( - themeName: string, - licenseText: string, - licenseUrl?: string +function write_license( + theme_name: string, + license_text: string, + license_url?: string ) { process.stdout.write( - licenseUrl - ? `## [${themeName}](${licenseUrl})\n\n${licenseText}\n********************************************************************************\n\n` - : `## ${themeName}\n\n${licenseText}\n********************************************************************************\n\n` + license_url + ? `## [${theme_name}](${license_url})\n\n${license_text}\n********************************************************************************\n\n` + : `## ${theme_name}\n\n${license_text}\n********************************************************************************\n\n` ) } -const acceptedLicenses = parseAcceptedToml(ACCEPTED_LICENSES_FILE) -generateLicenseFile(themes) +const accepted_licenses = parse_accepted_toml(ACCEPTED_LICENSES_FILE) +generate_license_file(themes) diff --git a/styles/src/build_themes.ts b/styles/src/build_themes.ts index 3ce1688152b7e939725ab5f9278bfe91117b1078..132b91e5826043b2d221abb95376ad0ccb8c0230 100644 --- a/styles/src/build_themes.ts +++ b/styles/src/build_themes.ts @@ -6,38 +6,38 @@ import { ColorScheme, createColorScheme } from "./theme/color_scheme" import snakeCase from "./utils/snake_case" import { themes } from "./themes" -const assetsDirectory = `${__dirname}/../../assets` -const tempDirectory = fs.mkdtempSync(path.join(tmpdir(), "build-themes")) +const assets_directory = `${__dirname}/../../assets` +const temp_directory = fs.mkdtempSync(path.join(tmpdir(), "build-themes")) // Clear existing themes -function clearThemes(themeDirectory: string) { - if (!fs.existsSync(themeDirectory)) { - fs.mkdirSync(themeDirectory, { recursive: true }) +function clear_themes(theme_directory: string) { + if (!fs.existsSync(theme_directory)) { + fs.mkdirSync(theme_directory, { recursive: true }) } else { - for (const file of fs.readdirSync(themeDirectory)) { + for (const file of fs.readdirSync(theme_directory)) { if (file.endsWith(".json")) { - fs.unlinkSync(path.join(themeDirectory, file)) + fs.unlinkSync(path.join(theme_directory, file)) } } } } -function writeThemes(colorSchemes: ColorScheme[], outputDirectory: string) { - clearThemes(outputDirectory) - for (const colorScheme of colorSchemes) { - const styleTree = snakeCase(app(colorScheme)) - const styleTreeJSON = JSON.stringify(styleTree, null, 2) - const tempPath = path.join(tempDirectory, `${colorScheme.name}.json`) - const outPath = path.join(outputDirectory, `${colorScheme.name}.json`) - fs.writeFileSync(tempPath, styleTreeJSON) - fs.renameSync(tempPath, outPath) - console.log(`- ${outPath} created`) +function write_themes(color_schemes: ColorScheme[], output_directory: string) { + clear_themes(output_directory) + for (const color_scheme of color_schemes) { + const style_tree = snakeCase(app(color_scheme)) + const style_tree_json = JSON.stringify(style_tree, null, 2) + const temp_path = path.join(temp_directory, `${color_scheme.name}.json`) + const out_path = path.join(output_directory, `${color_scheme.name}.json`) + fs.writeFileSync(temp_path, style_tree_json) + fs.renameSync(temp_path, out_path) + console.log(`- ${out_path} created`) } } -const colorSchemes: ColorScheme[] = themes.map((theme) => +const color_schemes: ColorScheme[] = themes.map((theme) => createColorScheme(theme) ) // Write new themes to theme directory -writeThemes(colorSchemes, `${assetsDirectory}/themes`) +write_themes(color_schemes, `${assets_directory}/themes`) diff --git a/styles/src/build_tokens.ts b/styles/src/build_tokens.ts index e1878efed7297f96184f81b6075b4e02eb5f78a3..4e420d679a0cd317ad4224f1af1fd363a05f900b 100644 --- a/styles/src/build_tokens.ts +++ b/styles/src/build_tokens.ts @@ -3,19 +3,19 @@ import * as path from "path" import { ColorScheme, createColorScheme } from "./common" import { themes } from "./themes" import { slugify } from "./utils/slugify" -import { colorSchemeTokens } from "./theme/tokens/color_scheme" +import { colorSchemeTokens as color_scheme_tokens } from "./theme/tokens/color_scheme" const TOKENS_DIRECTORY = path.join(__dirname, "..", "target", "tokens") const TOKENS_FILE = path.join(TOKENS_DIRECTORY, "$themes.json") const METADATA_FILE = path.join(TOKENS_DIRECTORY, "$metadata.json") -function clearTokens(tokensDirectory: string) { - if (!fs.existsSync(tokensDirectory)) { - fs.mkdirSync(tokensDirectory, { recursive: true }) +function clear_tokens(tokens_directory: string) { + if (!fs.existsSync(tokens_directory)) { + fs.mkdirSync(tokens_directory, { recursive: true }) } else { - for (const file of fs.readdirSync(tokensDirectory)) { + for (const file of fs.readdirSync(tokens_directory)) { if (file.endsWith(".json")) { - fs.unlinkSync(path.join(tokensDirectory, file)) + fs.unlinkSync(path.join(tokens_directory, file)) } } } @@ -24,64 +24,64 @@ function clearTokens(tokensDirectory: string) { type TokenSet = { id: string name: string - selectedTokenSets: { [key: string]: "enabled" } + selected_token_sets: { [key: string]: "enabled" } } -function buildTokenSetOrder(colorSchemes: ColorScheme[]): { - tokenSetOrder: string[] +function build_token_set_order(theme: ColorScheme[]): { + token_set_order: string[] } { - const tokenSetOrder: string[] = colorSchemes.map((scheme) => + const token_set_order: string[] = theme.map((scheme) => scheme.name.toLowerCase().replace(/\s+/g, "_") ) - return { tokenSetOrder } + return { token_set_order } } -function buildThemesIndex(colorSchemes: ColorScheme[]): TokenSet[] { - const themesIndex: TokenSet[] = colorSchemes.map((scheme, index) => { +function build_themes_index(theme: ColorScheme[]): TokenSet[] { + const themes_index: TokenSet[] = theme.map((scheme, index) => { const id = `${scheme.is_light ? "light" : "dark"}_${scheme.name .toLowerCase() .replace(/\s+/g, "_")}_${index}` - const selectedTokenSets: { [key: string]: "enabled" } = {} - const tokenSet = scheme.name.toLowerCase().replace(/\s+/g, "_") - selectedTokenSets[tokenSet] = "enabled" + const selected_token_sets: { [key: string]: "enabled" } = {} + const token_set = scheme.name.toLowerCase().replace(/\s+/g, "_") + selected_token_sets[token_set] = "enabled" return { id, name: `${scheme.name} - ${scheme.is_light ? "Light" : "Dark"}`, - selectedTokenSets, + selected_token_sets, } }) - return themesIndex + return themes_index } -function writeTokens(colorSchemes: ColorScheme[], tokensDirectory: string) { - clearTokens(tokensDirectory) +function write_tokens(themes: ColorScheme[], tokens_directory: string) { + clear_tokens(tokens_directory) - for (const colorScheme of colorSchemes) { - const fileName = slugify(colorScheme.name) + ".json" - const tokens = colorSchemeTokens(colorScheme) - const tokensJSON = JSON.stringify(tokens, null, 2) - const outPath = path.join(tokensDirectory, fileName) - fs.writeFileSync(outPath, tokensJSON, { mode: 0o644 }) - console.log(`- ${outPath} created`) + for (const theme of themes) { + const file_name = slugify(theme.name) + ".json" + const tokens = color_scheme_tokens(theme) + const tokens_json = JSON.stringify(tokens, null, 2) + const out_path = path.join(tokens_directory, file_name) + fs.writeFileSync(out_path, tokens_json, { mode: 0o644 }) + console.log(`- ${out_path} created`) } - const themeIndexData = buildThemesIndex(colorSchemes) + const theme_index_data = build_themes_index(themes) - const themesJSON = JSON.stringify(themeIndexData, null, 2) - fs.writeFileSync(TOKENS_FILE, themesJSON, { mode: 0o644 }) + const themes_json = JSON.stringify(theme_index_data, null, 2) + fs.writeFileSync(TOKENS_FILE, themes_json, { mode: 0o644 }) console.log(`- ${TOKENS_FILE} created`) - const tokenSetOrderData = buildTokenSetOrder(colorSchemes) + const token_set_order_data = build_token_set_order(themes) - const metadataJSON = JSON.stringify(tokenSetOrderData, null, 2) - fs.writeFileSync(METADATA_FILE, metadataJSON, { mode: 0o644 }) + const metadata_json = JSON.stringify(token_set_order_data, null, 2) + fs.writeFileSync(METADATA_FILE, metadata_json, { mode: 0o644 }) console.log(`- ${METADATA_FILE} created`) } -const colorSchemes: ColorScheme[] = themes.map((theme) => +const all_themes: ColorScheme[] = themes.map((theme) => createColorScheme(theme) ) -writeTokens(colorSchemes, TOKENS_DIRECTORY) +write_tokens(all_themes, TOKENS_DIRECTORY) diff --git a/styles/src/build_types.ts b/styles/src/build_types.ts index 5957ae5076a08fd62c84822edb946a0ab9a56f0a..5d7aa6e0ad259e62b60494f55436c70388017e14 100644 --- a/styles/src/build_types.ts +++ b/styles/src/build_types.ts @@ -9,34 +9,34 @@ const BANNER = `/* const dirname = __dirname async function main() { - const schemasPath = path.join(dirname, "../../", "crates/theme/schemas") - const schemaFiles = (await fs.readdir(schemasPath)).filter((x) => + const schemas_path = path.join(dirname, "../../", "crates/theme/schemas") + const schema_files = (await fs.readdir(schemas_path)).filter((x) => x.endsWith(".json") ) - const compiledTypes = new Set() + const compiled_types = new Set() - for (const filename of schemaFiles) { - const filePath = path.join(schemasPath, filename) - const fileContents = await fs.readFile(filePath) - const schema = JSON.parse(fileContents.toString()) + for (const filename of schema_files) { + const file_path = path.join(schemas_path, filename) + const file_contents = await fs.readFile(file_path) + const schema = JSON.parse(file_contents.toString()) const compiled = await compile(schema, schema.title, { bannerComment: "", }) - const eachType = compiled.split("export") - for (const type of eachType) { + const each_type = compiled.split("export") + for (const type of each_type) { if (!type) { continue } - compiledTypes.add("export " + type.trim()) + compiled_types.add("export " + type.trim()) } } - const output = BANNER + Array.from(compiledTypes).join("\n\n") - const outputPath = path.join(dirname, "../../styles/src/types/zed.ts") + const output = BANNER + Array.from(compiled_types).join("\n\n") + const output_path = path.join(dirname, "../../styles/src/types/zed.ts") try { - const existing = await fs.readFile(outputPath) + const existing = await fs.readFile(output_path) if (existing.toString() == output) { // Skip writing if it hasn't changed console.log("Schemas are up to date") @@ -48,12 +48,12 @@ async function main() { } } - const typesDic = path.dirname(outputPath) - if (!fsSync.existsSync(typesDic)) { - await fs.mkdir(typesDic) + const types_dic = path.dirname(output_path) + if (!fsSync.existsSync(types_dic)) { + await fs.mkdir(types_dic) } - await fs.writeFile(outputPath, output) - console.log(`Wrote Typescript types to ${outputPath}`) + await fs.writeFile(output_path, output) + console.log(`Wrote Typescript types to ${output_path}`) } main().catch((e) => { diff --git a/styles/src/common.ts b/styles/src/common.ts index ee47bcc6bdc01a0f64557374bcc66febd9a97873..6c90de40942c6975d218b2843b62030086257008 100644 --- a/styles/src/common.ts +++ b/styles/src/common.ts @@ -2,42 +2,26 @@ import chroma from "chroma-js" export * from "./theme" export { chroma } -export const fontFamilies = { +export const font_families = { sans: "Zed Sans", mono: "Zed Mono", } -export const fontSizes = { - "3xs": 8, +export const font_sizes = { "2xs": 10, xs: 12, sm: 14, md: 16, - lg: 18, - xl: 20, + lg: 18 } export type FontWeight = - | "thin" - | "extra_light" - | "light" | "normal" - | "medium" - | "semibold" | "bold" - | "extra_bold" - | "black" -export const fontWeights: { [key: string]: FontWeight } = { - thin: "thin", - extra_light: "extra_light", - light: "light", +export const font_weights: { [key: string]: FontWeight } = { normal: "normal", - medium: "medium", - semibold: "semibold", bold: "bold", - extra_bold: "extra_bold", - black: "black", } export const sizes = { diff --git a/styles/src/style_tree/components.ts b/styles/src/style_tree/components.ts index c0b8e9462fb71c69c77f14a16139564efb79dd94..6e20486631ab4dabd7b62a765f62ba7292a0b47e 100644 --- a/styles/src/style_tree/components.ts +++ b/styles/src/style_tree/components.ts @@ -1,6 +1,6 @@ import { - fontFamilies as font_families, - fontSizes as font_sizes, + font_families, + font_sizes, FontWeight, } from "../common" import { Layer, Styles, StyleSets, Style } from "../theme/color_scheme" diff --git a/styles/src/style_tree/contacts_popover.ts b/styles/src/style_tree/contacts_popover.ts index 85c7e7d9f5d0ca6bbb88c4f94d4948fdeb21adeb..2018da6b845d29dfc147c7a346d52161c8d08065 100644 --- a/styles/src/style_tree/contacts_popover.ts +++ b/styles/src/style_tree/contacts_popover.ts @@ -1,14 +1,13 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border } from "./components" -export default function contacts_popover(colorScheme: ColorScheme): any { - const layer = colorScheme.middle +export default function contacts_popover(theme: ColorScheme): any { return { - background: background(layer), + background: background(theme.middle), corner_radius: 6, padding: { top: 6, bottom: 6 }, - shadow: colorScheme.popoverShadow, - border: border(layer), + shadow: theme.popoverShadow, + border: border(theme.middle), width: 300, height: 400, } diff --git a/styles/src/style_tree/context_menu.ts b/styles/src/style_tree/context_menu.ts index 69ab7de4968ec8d96233069d934a7ed2e14d971d..df765e0a4a9daabd2f8074815da7ad71a3fb2f35 100644 --- a/styles/src/style_tree/context_menu.ts +++ b/styles/src/style_tree/context_menu.ts @@ -2,25 +2,24 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, border_color, text } from "./components" import { interactive, toggleable } from "../element" -export default function context_menu(colorScheme: ColorScheme): any { - const layer = colorScheme.middle +export default function context_menu(theme: ColorScheme): any { return { - background: background(layer), + background: background(theme.middle), corner_radius: 10, padding: 4, - shadow: colorScheme.popoverShadow, - border: border(layer), - keystrokeMargin: 30, + shadow: theme.popoverShadow, + border: border(theme.middle), + keystroke_margin: 30, item: toggleable({ base: interactive({ base: { - iconSpacing: 8, + icon_spacing: 8, icon_width: 14, padding: { left: 6, right: 6, top: 2, bottom: 2 }, corner_radius: 6, - label: text(layer, "sans", { size: "sm" }), + label: text(theme.middle, "sans", { size: "sm" }), keystroke: { - ...text(layer, "sans", "variant", { + ...text(theme.middle, "sans", "variant", { size: "sm", weight: "bold", }), @@ -29,10 +28,10 @@ export default function context_menu(colorScheme: ColorScheme): any { }, state: { hovered: { - background: background(layer, "hovered"), - label: text(layer, "sans", "hovered", { size: "sm" }), + background: background(theme.middle, "hovered"), + label: text(theme.middle, "sans", "hovered", { size: "sm" }), keystroke: { - ...text(layer, "sans", "hovered", { + ...text(theme.middle, "sans", "hovered", { size: "sm", weight: "bold", }), @@ -40,27 +39,27 @@ export default function context_menu(colorScheme: ColorScheme): any { }, }, clicked: { - background: background(layer, "pressed"), + background: background(theme.middle, "pressed"), }, }, }), state: { active: { default: { - background: background(layer, "active"), + background: background(theme.middle, "active"), }, hovered: { - background: background(layer, "hovered"), + background: background(theme.middle, "hovered"), }, clicked: { - background: background(layer, "pressed"), + background: background(theme.middle, "pressed"), }, }, }, }), separator: { - background: border_color(layer), + background: border_color(theme.middle), margin: { top: 2, bottom: 2 }, }, } diff --git a/styles/src/style_tree/copilot.ts b/styles/src/style_tree/copilot.ts index 9f80f6f34c7caa6b9c7c6b0187311e23269c8b88..7b0fc5e4ea69ee26f4c750e8a0884d5e418b6799 100644 --- a/styles/src/style_tree/copilot.ts +++ b/styles/src/style_tree/copilot.ts @@ -1,17 +1,16 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, svg, text } from "./components" import { interactive } from "../element" -export default function copilot(colorScheme: ColorScheme): any { - const layer = colorScheme.middle +export default function copilot(theme: ColorScheme): any { const content_width = 264 - const ctaButton = + const cta_button = // Copied from welcome screen. FIXME: Move this into a ZDS component interactive({ base: { - background: background(layer), - border: border(layer, "default"), + background: background(theme.middle), + border: border(theme.middle, "default"), corner_radius: 4, margin: { top: 4, @@ -25,22 +24,22 @@ export default function copilot(colorScheme: ColorScheme): any { left: 7, right: 7, }, - ...text(layer, "sans", "default", { size: "sm" }), + ...text(theme.middle, "sans", "default", { size: "sm" }), }, state: { hovered: { - ...text(layer, "sans", "default", { size: "sm" }), - background: background(layer, "hovered"), - border: border(layer, "active"), + ...text(theme.middle, "sans", "default", { size: "sm" }), + background: background(theme.middle, "hovered"), + border: border(theme.middle, "active"), }, }, }) return { - outLinkIcon: interactive({ + out_link_icon: interactive({ base: { icon: svg( - foreground(layer, "variant"), + foreground(theme.middle, "variant"), "icons/link_out_12.svg", 12, 12 @@ -53,21 +52,21 @@ export default function copilot(colorScheme: ColorScheme): any { state: { hovered: { icon: { - color: foreground(layer, "hovered"), + color: foreground(theme.middle, "hovered"), }, }, }, }), modal: { - titleText: { + title_text: { default: { - ...text(layer, "sans", { size: "xs", weight: "bold" }), + ...text(theme.middle, "sans", { size: "xs", weight: "bold" }), }, }, titlebar: { - background: background(colorScheme.lowest), - border: border(layer, "active"), + background: background(theme.lowest), + border: border(theme.middle, "active"), padding: { top: 4, bottom: 4, @@ -76,7 +75,7 @@ export default function copilot(colorScheme: ColorScheme): any { }, }, container: { - background: background(colorScheme.lowest), + background: background(theme.lowest), padding: { top: 0, left: 0, @@ -84,10 +83,10 @@ export default function copilot(colorScheme: ColorScheme): any { bottom: 8, }, }, - closeIcon: interactive({ + close_icon: interactive({ base: { icon: svg( - foreground(layer, "variant"), + foreground(theme.middle, "variant"), "icons/x_mark_8.svg", 8, 8 @@ -108,7 +107,7 @@ export default function copilot(colorScheme: ColorScheme): any { state: { hovered: { icon: svg( - foreground(layer, "on"), + foreground(theme.middle, "on"), "icons/x_mark_8.svg", 8, 8 @@ -116,7 +115,7 @@ export default function copilot(colorScheme: ColorScheme): any { }, clicked: { icon: svg( - foreground(layer, "base"), + foreground(theme.middle, "base"), "icons/x_mark_8.svg", 8, 8 @@ -133,11 +132,11 @@ export default function copilot(colorScheme: ColorScheme): any { auth: { content_width, - ctaButton, + cta_button, header: { icon: svg( - foreground(layer, "default"), + foreground(theme.middle, "default"), "icons/zed_plus_copilot_32.svg", 92, 32 @@ -154,7 +153,7 @@ export default function copilot(colorScheme: ColorScheme): any { prompting: { subheading: { - ...text(layer, "sans", { size: "xs" }), + ...text(theme.middle, "sans", { size: "xs" }), margin: { top: 6, bottom: 12, @@ -164,19 +163,19 @@ export default function copilot(colorScheme: ColorScheme): any { }, hint: { - ...text(layer, "sans", { size: "xs", color: "#838994" }), + ...text(theme.middle, "sans", { size: "xs", color: "#838994" }), margin: { top: 6, bottom: 2, }, }, - deviceCode: { - text: text(layer, "mono", { size: "sm" }), + device_code: { + text: text(theme.middle, "mono", { size: "sm" }), cta: { - ...ctaButton, - background: background(colorScheme.lowest), - border: border(colorScheme.lowest, "inverted"), + ...cta_button, + background: background(theme.lowest), + border: border(theme.lowest, "inverted"), padding: { top: 0, bottom: 0, @@ -189,7 +188,7 @@ export default function copilot(colorScheme: ColorScheme): any { }, }, left: content_width / 2, - leftContainer: { + left_container: { padding: { top: 3, bottom: 3, @@ -198,9 +197,9 @@ export default function copilot(colorScheme: ColorScheme): any { }, }, right: (content_width * 1) / 3, - rightContainer: interactive({ + right_container: interactive({ base: { - border: border(colorScheme.lowest, "inverted", { + border: border(theme.lowest, "inverted", { bottom: false, right: false, top: false, @@ -215,7 +214,7 @@ export default function copilot(colorScheme: ColorScheme): any { }, state: { hovered: { - border: border(layer, "active", { + border: border(theme.middle, "active", { bottom: false, right: false, top: false, @@ -227,9 +226,9 @@ export default function copilot(colorScheme: ColorScheme): any { }, }, - notAuthorized: { + not_authorized: { subheading: { - ...text(layer, "sans", { size: "xs" }), + ...text(theme.middle, "sans", { size: "xs" }), margin: { top: 16, @@ -240,12 +239,12 @@ export default function copilot(colorScheme: ColorScheme): any { }, warning: { - ...text(layer, "sans", { + ...text(theme.middle, "sans", { size: "xs", - color: foreground(layer, "warning"), + color: foreground(theme.middle, "warning"), }), - border: border(layer, "warning"), - background: background(layer, "warning"), + border: border(theme.middle, "warning"), + background: background(theme.middle, "warning"), corner_radius: 2, padding: { top: 4, @@ -263,7 +262,7 @@ export default function copilot(colorScheme: ColorScheme): any { authorized: { subheading: { - ...text(layer, "sans", { size: "xs" }), + ...text(theme.middle, "sans", { size: "xs" }), margin: { top: 16, @@ -272,7 +271,7 @@ export default function copilot(colorScheme: ColorScheme): any { }, hint: { - ...text(layer, "sans", { size: "xs", color: "#838994" }), + ...text(theme.middle, "sans", { size: "xs", color: "#838994" }), margin: { top: 24, bottom: 4, diff --git a/styles/src/style_tree/editor.ts b/styles/src/style_tree/editor.ts index 14df1b0bb3953cc5bbd559175bc0d8cc30ffe76b..4e138260131d1f7a7bedff845b811044d35918a2 100644 --- a/styles/src/style_tree/editor.ts +++ b/styles/src/style_tree/editor.ts @@ -7,17 +7,17 @@ import { foreground, text, } from "./components" -import hoverPopover from "./hover_popover" +import hover_popover from "./hover_popover" -import { buildSyntax } from "../theme/syntax" +import { build_syntax } from "../theme/syntax" import { interactive, toggleable } from "../element" -export default function editor(colorScheme: ColorScheme): any { - const { is_light } = colorScheme +export default function editor(theme: ColorScheme): any { + const { is_light } = theme - const layer = colorScheme.highest + const layer = theme.highest - const autocompleteItem = { + const autocomplete_item = { corner_radius: 6, padding: { bottom: 2, @@ -29,7 +29,7 @@ export default function editor(colorScheme: ColorScheme): any { function diagnostic(layer: Layer, styleSet: StyleSets) { return { - textScaleFactor: 0.857, + text_scale_factor: 0.857, header: { border: border(layer, { top: true, @@ -37,7 +37,7 @@ export default function editor(colorScheme: ColorScheme): any { }, message: { text: text(layer, "sans", styleSet, "default", { size: "sm" }), - highlightText: text(layer, "sans", styleSet, "default", { + highlight_text: text(layer, "sans", styleSet, "default", { size: "sm", weight: "bold", }), @@ -45,16 +45,16 @@ export default function editor(colorScheme: ColorScheme): any { } } - const syntax = buildSyntax(colorScheme) + const syntax = build_syntax(theme) return { - textColor: syntax.primary.color, + text_color: syntax.primary.color, background: background(layer), - activeLineBackground: withOpacity(background(layer, "on"), 0.75), - highlightedLineBackground: background(layer, "on"), + active_line_background: withOpacity(background(layer, "on"), 0.75), + highlighted_line_background: background(layer, "on"), // Inline autocomplete suggestions, Co-pilot suggestions, etc. suggestion: syntax.predictive, - codeActions: { + code_actions: { indicator: toggleable({ base: interactive({ base: { @@ -84,12 +84,12 @@ export default function editor(colorScheme: ColorScheme): any { }, }), - verticalScale: 0.55, + vertical_scale: 0.55, }, folds: { - iconMarginScale: 2.5, - foldedIcon: "icons/chevron_right_8.svg", - foldableIcon: "icons/chevron_down_8.svg", + icon_margin_scale: 2.5, + folded_icon: "icons/chevron_right_8.svg", + foldable_icon: "icons/chevron_down_8.svg", indicator: toggleable({ base: interactive({ base: { @@ -116,20 +116,20 @@ export default function editor(colorScheme: ColorScheme): any { }, }), ellipses: { - textColor: colorScheme.ramps.neutral(0.71).hex(), - corner_radiusFactor: 0.15, + text_color: theme.ramps.neutral(0.71).hex(), + corner_radius_factor: 0.15, background: { // Copied from hover_popover highlight default: { - color: colorScheme.ramps.neutral(0.5).alpha(0.0).hex(), + color: theme.ramps.neutral(0.5).alpha(0.0).hex(), }, hovered: { - color: colorScheme.ramps.neutral(0.5).alpha(0.5).hex(), + color: theme.ramps.neutral(0.5).alpha(0.5).hex(), }, clicked: { - color: colorScheme.ramps.neutral(0.5).alpha(0.7).hex(), + color: theme.ramps.neutral(0.5).alpha(0.7).hex(), }, }, }, @@ -137,14 +137,14 @@ export default function editor(colorScheme: ColorScheme): any { }, diff: { deleted: is_light - ? colorScheme.ramps.red(0.5).hex() - : colorScheme.ramps.red(0.4).hex(), + ? theme.ramps.red(0.5).hex() + : theme.ramps.red(0.4).hex(), modified: is_light - ? colorScheme.ramps.yellow(0.5).hex() - : colorScheme.ramps.yellow(0.5).hex(), + ? theme.ramps.yellow(0.5).hex() + : theme.ramps.yellow(0.5).hex(), inserted: is_light - ? colorScheme.ramps.green(0.4).hex() - : colorScheme.ramps.green(0.5).hex(), + ? theme.ramps.green(0.4).hex() + : theme.ramps.green(0.5).hex(), removedWidthEm: 0.275, widthEm: 0.15, corner_radius: 0.05, @@ -156,7 +156,7 @@ export default function editor(colorScheme: ColorScheme): any { foreground(layer, "accent"), 0.1 ), - documentHighlightWriteBackground: colorScheme.ramps + documentHighlightWriteBackground: theme.ramps .neutral(0.5) .alpha(0.4) .hex(), // TODO: This was blend * 2 @@ -167,98 +167,98 @@ export default function editor(colorScheme: ColorScheme): any { lineNumberActive: foreground(layer), renameFade: 0.6, unnecessaryCodeFade: 0.5, - selection: colorScheme.players[0], - whitespace: colorScheme.ramps.neutral(0.5).hex(), + selection: theme.players[0], + whitespace: theme.ramps.neutral(0.5).hex(), guestSelections: [ - colorScheme.players[1], - colorScheme.players[2], - colorScheme.players[3], - colorScheme.players[4], - colorScheme.players[5], - colorScheme.players[6], - colorScheme.players[7], + theme.players[1], + theme.players[2], + theme.players[3], + theme.players[4], + theme.players[5], + theme.players[6], + theme.players[7], ], autocomplete: { - background: background(colorScheme.middle), + background: background(theme.middle), corner_radius: 8, padding: 4, margin: { left: -14, }, - border: border(colorScheme.middle), - shadow: colorScheme.popoverShadow, - matchHighlight: foreground(colorScheme.middle, "accent"), - item: autocompleteItem, + border: border(theme.middle), + shadow: theme.popoverShadow, + matchHighlight: foreground(theme.middle, "accent"), + item: autocomplete_item, hoveredItem: { - ...autocompleteItem, + ...autocomplete_item, matchHighlight: foreground( - colorScheme.middle, + theme.middle, "accent", "hovered" ), - background: background(colorScheme.middle, "hovered"), + background: background(theme.middle, "hovered"), }, selectedItem: { - ...autocompleteItem, + ...autocomplete_item, matchHighlight: foreground( - colorScheme.middle, + theme.middle, "accent", "active" ), - background: background(colorScheme.middle, "active"), + background: background(theme.middle, "active"), }, }, diagnosticHeader: { - background: background(colorScheme.middle), + background: background(theme.middle), icon_widthFactor: 1.5, textScaleFactor: 0.857, - border: border(colorScheme.middle, { + border: border(theme.middle, { bottom: true, top: true, }), code: { - ...text(colorScheme.middle, "mono", { size: "sm" }), + ...text(theme.middle, "mono", { size: "sm" }), margin: { left: 10, }, }, source: { - text: text(colorScheme.middle, "sans", { + text: text(theme.middle, "sans", { size: "sm", weight: "bold", }), }, message: { - highlightText: text(colorScheme.middle, "sans", { + highlightText: text(theme.middle, "sans", { size: "sm", weight: "bold", }), - text: text(colorScheme.middle, "sans", { size: "sm" }), + text: text(theme.middle, "sans", { size: "sm" }), }, }, diagnosticPathHeader: { - background: background(colorScheme.middle), + background: background(theme.middle), textScaleFactor: 0.857, - filename: text(colorScheme.middle, "mono", { size: "sm" }), + filename: text(theme.middle, "mono", { size: "sm" }), path: { - ...text(colorScheme.middle, "mono", { size: "sm" }), + ...text(theme.middle, "mono", { size: "sm" }), margin: { left: 12, }, }, }, - errorDiagnostic: diagnostic(colorScheme.middle, "negative"), - warningDiagnostic: diagnostic(colorScheme.middle, "warning"), - informationDiagnostic: diagnostic(colorScheme.middle, "accent"), - hintDiagnostic: diagnostic(colorScheme.middle, "warning"), - invalidErrorDiagnostic: diagnostic(colorScheme.middle, "base"), - invalidHintDiagnostic: diagnostic(colorScheme.middle, "base"), - invalidInformationDiagnostic: diagnostic(colorScheme.middle, "base"), - invalidWarningDiagnostic: diagnostic(colorScheme.middle, "base"), - hoverPopover: hoverPopover(colorScheme), + errorDiagnostic: diagnostic(theme.middle, "negative"), + warningDiagnostic: diagnostic(theme.middle, "warning"), + informationDiagnostic: diagnostic(theme.middle, "accent"), + hintDiagnostic: diagnostic(theme.middle, "warning"), + invalidErrorDiagnostic: diagnostic(theme.middle, "base"), + invalidHintDiagnostic: diagnostic(theme.middle, "base"), + invalidInformationDiagnostic: diagnostic(theme.middle, "base"), + invalidWarningDiagnostic: diagnostic(theme.middle, "base"), + hover_popover: hover_popover(theme), linkDefinition: { - color: syntax.linkUri.color, - underline: syntax.linkUri.underline, + color: syntax.link_uri.color, + underline: syntax.link_uri.underline, }, jumpIcon: interactive({ base: { @@ -299,14 +299,14 @@ export default function editor(colorScheme: ColorScheme): any { }, git: { deleted: is_light - ? withOpacity(colorScheme.ramps.red(0.5).hex(), 0.8) - : withOpacity(colorScheme.ramps.red(0.4).hex(), 0.8), + ? withOpacity(theme.ramps.red(0.5).hex(), 0.8) + : withOpacity(theme.ramps.red(0.4).hex(), 0.8), modified: is_light - ? withOpacity(colorScheme.ramps.yellow(0.5).hex(), 0.8) - : withOpacity(colorScheme.ramps.yellow(0.4).hex(), 0.8), + ? withOpacity(theme.ramps.yellow(0.5).hex(), 0.8) + : withOpacity(theme.ramps.yellow(0.4).hex(), 0.8), inserted: is_light - ? withOpacity(colorScheme.ramps.green(0.5).hex(), 0.8) - : withOpacity(colorScheme.ramps.green(0.4).hex(), 0.8), + ? withOpacity(theme.ramps.green(0.5).hex(), 0.8) + : withOpacity(theme.ramps.green(0.4).hex(), 0.8), }, }, compositionMark: { diff --git a/styles/src/style_tree/incoming_call_notification.ts b/styles/src/style_tree/incoming_call_notification.ts index 2d76da7de82eef92a158fb5d2fa2870c085f547b..2c4fa21867e9cfe34da0044eaa5d1bdc855cf1f4 100644 --- a/styles/src/style_tree/incoming_call_notification.ts +++ b/styles/src/style_tree/incoming_call_notification.ts @@ -39,14 +39,14 @@ export default function incoming_call_notification( border: border(layer, { left: true, bottom: true }), ...text(layer, "sans", "positive", { size: "xs", - weight: "extra_bold", + weight: "bold", }), }, declineButton: { border: border(layer, { left: true }), ...text(layer, "sans", "negative", { size: "xs", - weight: "extra_bold", + weight: "bold", }), }, } diff --git a/styles/src/style_tree/project_panel.ts b/styles/src/style_tree/project_panel.ts index ac5c577e2114e4bad8aa2d3513c896aeec24fcc0..589e120e381075fe2b12303a0c5a9b798212cf5a 100644 --- a/styles/src/style_tree/project_panel.ts +++ b/styles/src/style_tree/project_panel.ts @@ -48,7 +48,7 @@ export default function project_panel(theme: ColorScheme): any { background: background(layer), iconColor: foreground(layer, "variant"), iconSize: 7, - iconSpacing: 5, + icon_spacing: 5, text: text(layer, "mono", "variant", { size: "sm" }), status: { ...git_status, diff --git a/styles/src/style_tree/project_shared_notification.ts b/styles/src/style_tree/project_shared_notification.ts index 8437ab6c1bb628206bd9367691ea448f189a7873..6fe8170a3ce3815c8eb6118c1309a671cfe0f2c4 100644 --- a/styles/src/style_tree/project_shared_notification.ts +++ b/styles/src/style_tree/project_shared_notification.ts @@ -40,14 +40,14 @@ export default function project_shared_notification( border: border(layer, { left: true, bottom: true }), ...text(layer, "sans", "accent", { size: "xs", - weight: "extra_bold", + weight: "bold", }), }, dismissButton: { border: border(layer, { left: true }), ...text(layer, "sans", "variant", { size: "xs", - weight: "extra_bold", + weight: "bold", }), }, } diff --git a/styles/src/style_tree/status_bar.ts b/styles/src/style_tree/status_bar.ts index fb1c572615152159c63b3739324ed97f1c585103..d67634d5a80436cd4e452619ef971032fb1bbf8c 100644 --- a/styles/src/style_tree/status_bar.ts +++ b/styles/src/style_tree/status_bar.ts @@ -41,7 +41,7 @@ export default function status_bar(colorScheme: ColorScheme): any { lspStatus: interactive({ base: { ...diagnosticStatusContainer, - iconSpacing: 4, + icon_spacing: 4, icon_width: 14, height: 18, message: text(layer, "sans"), @@ -65,7 +65,7 @@ export default function status_bar(colorScheme: ColorScheme): any { base: { height: 20, icon_width: 16, - iconSpacing: 2, + icon_spacing: 2, summarySpacing: 6, text: text(layer, "sans", { size: "sm" }), iconColorOk: foreground(layer, "variant"), diff --git a/styles/src/theme/syntax.ts b/styles/src/theme/syntax.ts index 5d214abdebe5a93cdf1d25e7b0ff31168fe5cdd2..1b61849d50d168d2ba0a3fcfabec0069578e098b 100644 --- a/styles/src/theme/syntax.ts +++ b/styles/src/theme/syntax.ts @@ -1,5 +1,5 @@ import deepmerge from "deepmerge" -import { FontWeight, fontWeights } from "../common" +import { FontWeight, font_weights } from "../common" import { ColorScheme } from "./color_scheme" import chroma from "chroma-js" @@ -22,8 +22,8 @@ export interface Syntax { emphasis: SyntaxHighlightStyle "emphasis.strong": SyntaxHighlightStyle title: SyntaxHighlightStyle - linkUri: SyntaxHighlightStyle - linkText: SyntaxHighlightStyle + link_uri: SyntaxHighlightStyle + link_text: SyntaxHighlightStyle /** md: indented_code_block, fenced_code_block, code_span */ "text.literal": SyntaxHighlightStyle @@ -116,13 +116,13 @@ export interface Syntax { export type ThemeSyntax = Partial -const defaultSyntaxHighlightStyle: Omit = { +const default_syntaxHighlightStyle: Omit = { weight: "normal", underline: false, italic: false, } -function buildDefaultSyntax(colorScheme: ColorScheme): Syntax { +function build_default_syntax(color_scheme: ColorScheme): Syntax { // Make a temporary object that is allowed to be missing // the "color" property for each style const syntax: { @@ -132,7 +132,7 @@ function buildDefaultSyntax(colorScheme: ColorScheme): Syntax { // then spread the default to each style for (const key of Object.keys({} as Syntax)) { syntax[key as keyof Syntax] = { - ...defaultSyntaxHighlightStyle, + ...default_syntaxHighlightStyle, } } @@ -140,35 +140,35 @@ function buildDefaultSyntax(colorScheme: ColorScheme): Syntax { // predictive color distinct from any other color in the theme const predictive = chroma .mix( - colorScheme.ramps.neutral(0.4).hex(), - colorScheme.ramps.blue(0.4).hex(), + color_scheme.ramps.neutral(0.4).hex(), + color_scheme.ramps.blue(0.4).hex(), 0.45, "lch" ) .hex() const color = { - primary: colorScheme.ramps.neutral(1).hex(), - comment: colorScheme.ramps.neutral(0.71).hex(), - punctuation: colorScheme.ramps.neutral(0.86).hex(), + primary: color_scheme.ramps.neutral(1).hex(), + comment: color_scheme.ramps.neutral(0.71).hex(), + punctuation: color_scheme.ramps.neutral(0.86).hex(), predictive: predictive, - emphasis: colorScheme.ramps.blue(0.5).hex(), - string: colorScheme.ramps.orange(0.5).hex(), - function: colorScheme.ramps.yellow(0.5).hex(), - type: colorScheme.ramps.cyan(0.5).hex(), - constructor: colorScheme.ramps.blue(0.5).hex(), - variant: colorScheme.ramps.blue(0.5).hex(), - property: colorScheme.ramps.blue(0.5).hex(), - enum: colorScheme.ramps.orange(0.5).hex(), - operator: colorScheme.ramps.orange(0.5).hex(), - number: colorScheme.ramps.green(0.5).hex(), - boolean: colorScheme.ramps.green(0.5).hex(), - constant: colorScheme.ramps.green(0.5).hex(), - keyword: colorScheme.ramps.blue(0.5).hex(), + emphasis: color_scheme.ramps.blue(0.5).hex(), + string: color_scheme.ramps.orange(0.5).hex(), + function: color_scheme.ramps.yellow(0.5).hex(), + type: color_scheme.ramps.cyan(0.5).hex(), + constructor: color_scheme.ramps.blue(0.5).hex(), + variant: color_scheme.ramps.blue(0.5).hex(), + property: color_scheme.ramps.blue(0.5).hex(), + enum: color_scheme.ramps.orange(0.5).hex(), + operator: color_scheme.ramps.orange(0.5).hex(), + number: color_scheme.ramps.green(0.5).hex(), + boolean: color_scheme.ramps.green(0.5).hex(), + constant: color_scheme.ramps.green(0.5).hex(), + keyword: color_scheme.ramps.blue(0.5).hex(), } // Then assign colors and use Syntax to enforce each style getting it's own color - const defaultSyntax: Syntax = { + const default_syntax: Syntax = { ...syntax, comment: { color: color.comment, @@ -188,18 +188,18 @@ function buildDefaultSyntax(colorScheme: ColorScheme): Syntax { }, "emphasis.strong": { color: color.emphasis, - weight: fontWeights.bold, + weight: font_weights.bold, }, title: { color: color.primary, - weight: fontWeights.bold, + weight: font_weights.bold, }, - linkUri: { - color: colorScheme.ramps.green(0.5).hex(), + link_uri: { + color: color_scheme.ramps.green(0.5).hex(), underline: true, }, - linkText: { - color: colorScheme.ramps.orange(0.5).hex(), + link_text: { + color: color_scheme.ramps.orange(0.5).hex(), italic: true, }, "text.literal": { @@ -215,7 +215,7 @@ function buildDefaultSyntax(colorScheme: ColorScheme): Syntax { color: color.punctuation, }, "punctuation.special": { - color: colorScheme.ramps.neutral(0.86).hex(), + color: color_scheme.ramps.neutral(0.86).hex(), }, "punctuation.list_marker": { color: color.punctuation, @@ -236,10 +236,10 @@ function buildDefaultSyntax(colorScheme: ColorScheme): Syntax { color: color.string, }, constructor: { - color: colorScheme.ramps.blue(0.5).hex(), + color: color_scheme.ramps.blue(0.5).hex(), }, variant: { - color: colorScheme.ramps.blue(0.5).hex(), + color: color_scheme.ramps.blue(0.5).hex(), }, type: { color: color.type, @@ -248,16 +248,16 @@ function buildDefaultSyntax(colorScheme: ColorScheme): Syntax { color: color.primary, }, label: { - color: colorScheme.ramps.blue(0.5).hex(), + color: color_scheme.ramps.blue(0.5).hex(), }, tag: { - color: colorScheme.ramps.blue(0.5).hex(), + color: color_scheme.ramps.blue(0.5).hex(), }, attribute: { - color: colorScheme.ramps.blue(0.5).hex(), + color: color_scheme.ramps.blue(0.5).hex(), }, property: { - color: colorScheme.ramps.blue(0.5).hex(), + color: color_scheme.ramps.blue(0.5).hex(), }, constant: { color: color.constant, @@ -288,17 +288,17 @@ function buildDefaultSyntax(colorScheme: ColorScheme): Syntax { }, } - return defaultSyntax + return default_syntax } -function mergeSyntax(defaultSyntax: Syntax, colorScheme: ColorScheme): Syntax { - if (!colorScheme.syntax) { - return defaultSyntax +function merge_syntax(default_syntax: Syntax, color_scheme: ColorScheme): Syntax { + if (!color_scheme.syntax) { + return default_syntax } return deepmerge>( - defaultSyntax, - colorScheme.syntax, + default_syntax, + color_scheme.syntax, { arrayMerge: (destinationArray, sourceArray) => [ ...destinationArray, @@ -308,10 +308,10 @@ function mergeSyntax(defaultSyntax: Syntax, colorScheme: ColorScheme): Syntax { ) } -export function buildSyntax(colorScheme: ColorScheme): Syntax { - const defaultSyntax: Syntax = buildDefaultSyntax(colorScheme) +export function build_syntax(color_scheme: ColorScheme): Syntax { + const default_syntax: Syntax = build_default_syntax(color_scheme) - const syntax = mergeSyntax(defaultSyntax, colorScheme) + const syntax = merge_syntax(default_syntax, color_scheme) return syntax } diff --git a/styles/src/themes/gruvbox/gruvbox-common.ts b/styles/src/themes/gruvbox/gruvbox-common.ts index 37850fe019c1bc186b21de6a59a2bc930a139eec..6a911ce731d781d5ea614618928d5bc131ffe38e 100644 --- a/styles/src/themes/gruvbox/gruvbox-common.ts +++ b/styles/src/themes/gruvbox/gruvbox-common.ts @@ -238,8 +238,8 @@ const buildVariant = (variant: Variant): ThemeConfig => { variable: { color: colors.blue }, property: { color: neutral[isLight ? 0 : 8] }, embedded: { color: colors.aqua }, - linkText: { color: colors.aqua }, - linkUri: { color: colors.purple }, + link_text: { color: colors.aqua }, + link_uri: { color: colors.purple }, title: { color: colors.green }, } diff --git a/styles/src/themes/one/one-dark.ts b/styles/src/themes/one/one-dark.ts index 69a5bd55755a55cce1fd6128a5a8922d3ce7cf31..b8456603ce6e5c02c2a476e7861eb9a2fd43713b 100644 --- a/styles/src/themes/one/one-dark.ts +++ b/styles/src/themes/one/one-dark.ts @@ -1,6 +1,6 @@ import { chroma, - fontWeights, + font_weights, colorRamp, ThemeAppearance, ThemeLicenseType, @@ -57,8 +57,8 @@ export const theme: ThemeConfig = { "emphasis.strong": { color: color.orange }, function: { color: color.blue }, keyword: { color: color.purple }, - linkText: { color: color.blue, italic: false }, - linkUri: { color: color.teal }, + link_text: { color: color.blue, italic: false }, + link_uri: { color: color.teal }, number: { color: color.orange }, constant: { color: color.yellow }, operator: { color: color.teal }, @@ -68,7 +68,7 @@ export const theme: ThemeConfig = { "punctuation.list_marker": { color: color.red }, "punctuation.special": { color: color.darkRed }, string: { color: color.green }, - title: { color: color.red, weight: fontWeights.normal }, + title: { color: color.red, weight: font_weights.normal }, "text.literal": { color: color.green }, type: { color: color.teal }, "variable.special": { color: color.orange }, diff --git a/styles/src/themes/one/one-light.ts b/styles/src/themes/one/one-light.ts index 9123c8879d1bcc11f9258fc538aa4b377c2a3ec5..e14862f423b67ece038fbd09fd3f651761b0bad6 100644 --- a/styles/src/themes/one/one-light.ts +++ b/styles/src/themes/one/one-light.ts @@ -1,6 +1,6 @@ import { chroma, - fontWeights, + font_weights, colorRamp, ThemeAppearance, ThemeLicenseType, @@ -59,8 +59,8 @@ export const theme: ThemeConfig = { "emphasis.strong": { color: color.orange }, function: { color: color.blue }, keyword: { color: color.purple }, - linkText: { color: color.blue }, - linkUri: { color: color.teal }, + link_text: { color: color.blue }, + link_uri: { color: color.teal }, number: { color: color.orange }, operator: { color: color.teal }, primary: { color: color.black }, @@ -69,7 +69,7 @@ export const theme: ThemeConfig = { "punctuation.list_marker": { color: color.red }, "punctuation.special": { color: color.darkRed }, string: { color: color.green }, - title: { color: color.red, weight: fontWeights.normal }, + title: { color: color.red, weight: font_weights.normal }, "text.literal": { color: color.green }, type: { color: color.teal }, "variable.special": { color: color.orange }, diff --git a/styles/src/themes/rose-pine/common.ts b/styles/src/themes/rose-pine/common.ts index 146305890b98e136acbfd04955b28c7f233a898e..30906078ee1f8632099d8bd10f2f6aa5f0d639d2 100644 --- a/styles/src/themes/rose-pine/common.ts +++ b/styles/src/themes/rose-pine/common.ts @@ -69,7 +69,7 @@ export const syntax = (c: typeof color.default): Partial => { tag: { color: c.foam }, "function.method": { color: c.rose }, title: { color: c.gold }, - linkText: { color: c.foam, italic: false }, - linkUri: { color: c.rose }, + link_text: { color: c.foam, italic: false }, + link_uri: { color: c.rose }, } } From 17f2fed3c8362d9b2290a22da83a812d41a43536 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 29 Jun 2023 02:16:21 -0400 Subject: [PATCH 07/13] WIP snake_case 3/? --- styles/src/build_licenses.ts | 2 +- styles/src/build_themes.ts | 4 +- styles/src/build_tokens.ts | 4 +- styles/src/style_tree/contacts_popover.ts | 2 +- styles/src/style_tree/context_menu.ts | 2 +- styles/src/style_tree/editor.ts | 2 +- styles/src/style_tree/hover_popover.ts | 2 +- styles/src/style_tree/picker.ts | 2 +- styles/src/style_tree/tab_bar.ts | 2 +- .../src/style_tree/toolbar_dropdown_menu.ts | 2 +- styles/src/style_tree/tooltip.ts | 2 +- styles/src/style_tree/welcome.ts | 2 +- styles/src/style_tree/workspace.ts | 4 +- styles/src/theme/color_scheme.ts | 164 +++++++++--------- styles/src/theme/ramps.ts | 36 ++-- styles/src/theme/syntax.ts | 4 +- styles/src/theme/theme_config.ts | 12 +- styles/src/theme/tokens/color_scheme.ts | 48 ++--- styles/src/themes/andromeda/andromeda.ts | 26 +-- .../src/themes/atelier/atelier-cave-dark.ts | 34 ++-- .../src/themes/atelier/atelier-cave-light.ts | 34 ++-- .../src/themes/atelier/atelier-dune-dark.ts | 34 ++-- .../src/themes/atelier/atelier-dune-light.ts | 34 ++-- .../themes/atelier/atelier-estuary-dark.ts | 34 ++-- .../themes/atelier/atelier-estuary-light.ts | 34 ++-- .../src/themes/atelier/atelier-forest-dark.ts | 34 ++-- .../themes/atelier/atelier-forest-light.ts | 34 ++-- .../src/themes/atelier/atelier-heath-dark.ts | 34 ++-- .../src/themes/atelier/atelier-heath-light.ts | 34 ++-- .../themes/atelier/atelier-lakeside-dark.ts | 34 ++-- .../themes/atelier/atelier-lakeside-light.ts | 34 ++-- .../themes/atelier/atelier-plateau-dark.ts | 34 ++-- .../themes/atelier/atelier-plateau-light.ts | 34 ++-- .../themes/atelier/atelier-savanna-dark.ts | 34 ++-- .../themes/atelier/atelier-savanna-light.ts | 34 ++-- .../themes/atelier/atelier-seaside-dark.ts | 34 ++-- .../themes/atelier/atelier-seaside-light.ts | 34 ++-- .../atelier/atelier-sulphurpool-dark.ts | 34 ++-- .../atelier/atelier-sulphurpool-light.ts | 34 ++-- styles/src/themes/atelier/common.ts | 6 +- styles/src/themes/ayu/ayu-dark.ts | 12 +- styles/src/themes/ayu/ayu-light.ts | 12 +- styles/src/themes/ayu/ayu-mirage.ts | 12 +- styles/src/themes/ayu/common.ts | 26 +-- styles/src/themes/gruvbox/gruvbox-common.ts | 90 +++++----- .../src/themes/gruvbox/gruvbox-dark-hard.ts | 2 +- .../src/themes/gruvbox/gruvbox-dark-soft.ts | 2 +- styles/src/themes/gruvbox/gruvbox-dark.ts | 2 +- .../src/themes/gruvbox/gruvbox-light-hard.ts | 2 +- .../src/themes/gruvbox/gruvbox-light-soft.ts | 2 +- styles/src/themes/gruvbox/gruvbox-light.ts | 2 +- styles/src/themes/index.ts | 148 ++++++++-------- styles/src/themes/one/one-dark.ts | 30 ++-- styles/src/themes/one/one-light.ts | 30 ++-- styles/src/themes/rose-pine/common.ts | 18 +- styles/src/themes/rose-pine/rose-pine-dawn.ts | 28 +-- styles/src/themes/rose-pine/rose-pine-moon.ts | 28 +-- styles/src/themes/rose-pine/rose-pine.ts | 28 +-- styles/src/themes/sandcastle/sandcastle.ts | 26 +-- styles/src/themes/solarized/solarized.ts | 34 ++-- styles/src/themes/summercamp/summercamp.ts | 26 +-- styles/src/utils/snake_case.ts | 4 +- 62 files changed, 786 insertions(+), 786 deletions(-) diff --git a/styles/src/build_licenses.ts b/styles/src/build_licenses.ts index 88cefe15c7beaa913b5721a0c1064ff7d5ceb8e8..9cfaafdb750ce42207b2cfab5b2048c4ed72a50d 100644 --- a/styles/src/build_licenses.ts +++ b/styles/src/build_licenses.ts @@ -30,7 +30,7 @@ function generate_license_file(themes: ThemeConfig[]) { check_licenses(themes) for (const theme of themes) { const license_text = fs.readFileSync(theme.licenseFile).toString() - write_license(theme.name, license_text, theme.licenseUrl) + write_license(theme.name, license_text, theme.license_url) } } diff --git a/styles/src/build_themes.ts b/styles/src/build_themes.ts index 132b91e5826043b2d221abb95376ad0ccb8c0230..98ab8d27081dd0c0d7d58c758b343cb0f031c425 100644 --- a/styles/src/build_themes.ts +++ b/styles/src/build_themes.ts @@ -2,7 +2,7 @@ import * as fs from "fs" import { tmpdir } from "os" import * as path from "path" import app from "./style_tree/app" -import { ColorScheme, createColorScheme } from "./theme/color_scheme" +import { ColorScheme, create_color_scheme } from "./theme/color_scheme" import snakeCase from "./utils/snake_case" import { themes } from "./themes" @@ -36,7 +36,7 @@ function write_themes(color_schemes: ColorScheme[], output_directory: string) { } const color_schemes: ColorScheme[] = themes.map((theme) => - createColorScheme(theme) + create_color_scheme(theme) ) // Write new themes to theme directory diff --git a/styles/src/build_tokens.ts b/styles/src/build_tokens.ts index 4e420d679a0cd317ad4224f1af1fd363a05f900b..09eed6a7b956e0f2e53865bbcf6bd470a529b72b 100644 --- a/styles/src/build_tokens.ts +++ b/styles/src/build_tokens.ts @@ -1,6 +1,6 @@ import * as fs from "fs" import * as path from "path" -import { ColorScheme, createColorScheme } from "./common" +import { ColorScheme, create_color_scheme } from "./common" import { themes } from "./themes" import { slugify } from "./utils/slugify" import { colorSchemeTokens as color_scheme_tokens } from "./theme/tokens/color_scheme" @@ -81,7 +81,7 @@ function write_tokens(themes: ColorScheme[], tokens_directory: string) { } const all_themes: ColorScheme[] = themes.map((theme) => - createColorScheme(theme) + create_color_scheme(theme) ) write_tokens(all_themes, TOKENS_DIRECTORY) diff --git a/styles/src/style_tree/contacts_popover.ts b/styles/src/style_tree/contacts_popover.ts index 2018da6b845d29dfc147c7a346d52161c8d08065..4e3f8899e046bc27ddcc394c42e845278b73a51d 100644 --- a/styles/src/style_tree/contacts_popover.ts +++ b/styles/src/style_tree/contacts_popover.ts @@ -6,7 +6,7 @@ export default function contacts_popover(theme: ColorScheme): any { background: background(theme.middle), corner_radius: 6, padding: { top: 6, bottom: 6 }, - shadow: theme.popoverShadow, + shadow: theme.popover_shadow, border: border(theme.middle), width: 300, height: 400, diff --git a/styles/src/style_tree/context_menu.ts b/styles/src/style_tree/context_menu.ts index df765e0a4a9daabd2f8074815da7ad71a3fb2f35..f111225c947af39b7fb25234de3196b61fca5735 100644 --- a/styles/src/style_tree/context_menu.ts +++ b/styles/src/style_tree/context_menu.ts @@ -7,7 +7,7 @@ export default function context_menu(theme: ColorScheme): any { background: background(theme.middle), corner_radius: 10, padding: 4, - shadow: theme.popoverShadow, + shadow: theme.popover_shadow, border: border(theme.middle), keystroke_margin: 30, item: toggleable({ diff --git a/styles/src/style_tree/editor.ts b/styles/src/style_tree/editor.ts index 4e138260131d1f7a7bedff845b811044d35918a2..95760ce1d0228c28e93cd7fc0c6993d75de1d8c9 100644 --- a/styles/src/style_tree/editor.ts +++ b/styles/src/style_tree/editor.ts @@ -186,7 +186,7 @@ export default function editor(theme: ColorScheme): any { left: -14, }, border: border(theme.middle), - shadow: theme.popoverShadow, + shadow: theme.popover_shadow, matchHighlight: foreground(theme.middle, "accent"), item: autocomplete_item, hoveredItem: { diff --git a/styles/src/style_tree/hover_popover.ts b/styles/src/style_tree/hover_popover.ts index 42c4f72a263469369fd98ea0ae8f65270767a9ed..28f5b1740018e162ba0741e400e76cbc554b1fc8 100644 --- a/styles/src/style_tree/hover_popover.ts +++ b/styles/src/style_tree/hover_popover.ts @@ -12,7 +12,7 @@ export default function hover_popover(colorScheme: ColorScheme): any { top: 4, bottom: 4, }, - shadow: colorScheme.popoverShadow, + shadow: colorScheme.popover_shadow, border: border(layer), margin: { left: -8, diff --git a/styles/src/style_tree/picker.ts b/styles/src/style_tree/picker.ts index 99bd716c16133be1e17b07dff16a1b9788c8da8f..22b526f1831c4486cc9251e4a827807b6cbe7d19 100644 --- a/styles/src/style_tree/picker.ts +++ b/styles/src/style_tree/picker.ts @@ -8,7 +8,7 @@ export default function picker(colorScheme: ColorScheme): any { const container = { background: background(layer), border: border(layer), - shadow: colorScheme.modalShadow, + shadow: colorScheme.modal_shadow, corner_radius: 12, padding: { bottom: 4, diff --git a/styles/src/style_tree/tab_bar.ts b/styles/src/style_tree/tab_bar.ts index d8323809edd2118876484cfa8f1f77f5b3674335..63f0b213a6c44307bcc2509401c3af60bc850541 100644 --- a/styles/src/style_tree/tab_bar.ts +++ b/styles/src/style_tree/tab_bar.ts @@ -73,7 +73,7 @@ export default function tab_bar(colorScheme: ColorScheme): any { ...activePaneActiveTab, background: withOpacity(tab.background, 0.9), border: undefined as any, - shadow: colorScheme.popoverShadow, + shadow: colorScheme.popover_shadow, } return { diff --git a/styles/src/style_tree/toolbar_dropdown_menu.ts b/styles/src/style_tree/toolbar_dropdown_menu.ts index 5d0bf89d93eb27f82b5f94e7b9450129ea15eee5..51e62db822edc8d0da82378ee25b5f3e03f17287 100644 --- a/styles/src/style_tree/toolbar_dropdown_menu.ts +++ b/styles/src/style_tree/toolbar_dropdown_menu.ts @@ -8,7 +8,7 @@ export default function dropdown_menu(colorScheme: ColorScheme): any { rowHeight: 30, background: background(layer), border: border(layer), - shadow: colorScheme.popoverShadow, + shadow: colorScheme.popover_shadow, header: interactive({ base: { ...text(layer, "sans", { size: "sm" }), diff --git a/styles/src/style_tree/tooltip.ts b/styles/src/style_tree/tooltip.ts index a872477f4987680207b75cbe2bed6f6329e300af..ea890232b5d45938cc0411e5cf087674deff5468 100644 --- a/styles/src/style_tree/tooltip.ts +++ b/styles/src/style_tree/tooltip.ts @@ -8,7 +8,7 @@ export default function tooltip(colorScheme: ColorScheme): any { border: border(layer), padding: { top: 4, bottom: 4, left: 8, right: 8 }, margin: { top: 6, left: 6 }, - shadow: colorScheme.popoverShadow, + shadow: colorScheme.popover_shadow, corner_radius: 6, text: text(layer, "sans", { size: "xs" }), keystroke: { diff --git a/styles/src/style_tree/welcome.ts b/styles/src/style_tree/welcome.ts index 5d0bc90a00d1e4be6d7c7cfb4f2553cf2b8739cd..9ae9716f66b1d72cb9aab33c830b207ba53f352f 100644 --- a/styles/src/style_tree/welcome.ts +++ b/styles/src/style_tree/welcome.ts @@ -21,7 +21,7 @@ export default function welcome(colorScheme: ColorScheme): any { top: 3, bottom: 3, }, - // shadow: colorScheme.popoverShadow, + // shadow: colorScheme.popover_shadow, border: border(layer), margin: { right: 8, diff --git a/styles/src/style_tree/workspace.ts b/styles/src/style_tree/workspace.ts index 2ba0281b17ef6ae9976a88d77842245512b75252..8c60c9d402fe9000745b14f7b31bc0daf6246b25 100644 --- a/styles/src/style_tree/workspace.ts +++ b/styles/src/style_tree/workspace.ts @@ -102,7 +102,7 @@ export default function workspace(colorScheme: ColorScheme): any { }, zoomedPaneForeground: { margin: 16, - shadow: colorScheme.modalShadow, + shadow: colorScheme.modal_shadow, border: border(colorScheme.lowest, { overlay: true }), }, zoomedPanelForeground: { @@ -189,7 +189,7 @@ export default function workspace(colorScheme: ColorScheme): any { corner_radius: 6, padding: 12, border: border(colorScheme.middle), - shadow: colorScheme.popoverShadow, + shadow: colorScheme.popover_shadow, }, notifications: { width: 400, diff --git a/styles/src/theme/color_scheme.ts b/styles/src/theme/color_scheme.ts index 5d62bcffdbfe7eebd27b37995153df508437a2e4..933c6160535386dea3f7b3b517c3d95b234cbcbe 100644 --- a/styles/src/theme/color_scheme.ts +++ b/styles/src/theme/color_scheme.ts @@ -6,7 +6,7 @@ import { ThemeAppearance, ThemeConfigInputColors, } from "./theme_config" -import { getRamps } from "./ramps" +import { get_ramps } from "./ramps" export interface ColorScheme { name: string @@ -18,8 +18,8 @@ export interface ColorScheme { ramps: RampSet - popoverShadow: Shadow - modalShadow: Shadow + popover_shadow: Shadow + modal_shadow: Shadow players: Players syntax?: Partial @@ -105,37 +105,37 @@ export interface Style { foreground: string } -export function createColorScheme(theme: ThemeConfig): ColorScheme { +export function create_color_scheme(theme: ThemeConfig): ColorScheme { const { name, appearance, - inputColor, + input_color, override: { syntax }, } = theme - const isLight = appearance === ThemeAppearance.Light - const colorRamps: ThemeConfigInputColors = inputColor + const is_light = appearance === ThemeAppearance.Light + const color_ramps: ThemeConfigInputColors = input_color - // Chromajs scales from 0 to 1 flipped if isLight is true - const ramps = getRamps(isLight, colorRamps) - const lowest = lowestLayer(ramps) - const middle = middleLayer(ramps) - const highest = highestLayer(ramps) + // Chromajs scales from 0 to 1 flipped if is_light is true + const ramps = get_ramps(is_light, color_ramps) + const lowest = lowest_layer(ramps) + const middle = middle_layer(ramps) + const highest = highest_layer(ramps) - const popoverShadow = { + const popover_shadow = { blur: 4, color: ramps - .neutral(isLight ? 7 : 0) + .neutral(is_light ? 7 : 0) .darken() .alpha(0.2) .hex(), // TODO used blend previously. Replace with something else offset: [1, 2], } - const modalShadow = { + const modal_shadow = { blur: 16, color: ramps - .neutral(isLight ? 7 : 0) + .neutral(is_light ? 7 : 0) .darken() .alpha(0.2) .hex(), // TODO used blend previously. Replace with something else @@ -155,7 +155,7 @@ export function createColorScheme(theme: ThemeConfig): ColorScheme { return { name, - is_light: isLight, + is_light, ramps, @@ -163,8 +163,8 @@ export function createColorScheme(theme: ThemeConfig): ColorScheme { middle, highest, - popoverShadow, - modalShadow, + popover_shadow, + modal_shadow, players, syntax, @@ -178,105 +178,105 @@ function player(ramp: Scale): Player { } } -function lowestLayer(ramps: RampSet): Layer { +function lowest_layer(ramps: RampSet): Layer { return { - base: buildStyleSet(ramps.neutral, 0.2, 1), - variant: buildStyleSet(ramps.neutral, 0.2, 0.7), - on: buildStyleSet(ramps.neutral, 0.1, 1), - accent: buildStyleSet(ramps.blue, 0.1, 0.5), - positive: buildStyleSet(ramps.green, 0.1, 0.5), - warning: buildStyleSet(ramps.yellow, 0.1, 0.5), - negative: buildStyleSet(ramps.red, 0.1, 0.5), + base: build_style_set(ramps.neutral, 0.2, 1), + variant: build_style_set(ramps.neutral, 0.2, 0.7), + on: build_style_set(ramps.neutral, 0.1, 1), + accent: build_style_set(ramps.blue, 0.1, 0.5), + positive: build_style_set(ramps.green, 0.1, 0.5), + warning: build_style_set(ramps.yellow, 0.1, 0.5), + negative: build_style_set(ramps.red, 0.1, 0.5), } } -function middleLayer(ramps: RampSet): Layer { +function middle_layer(ramps: RampSet): Layer { return { - base: buildStyleSet(ramps.neutral, 0.1, 1), - variant: buildStyleSet(ramps.neutral, 0.1, 0.7), - on: buildStyleSet(ramps.neutral, 0, 1), - accent: buildStyleSet(ramps.blue, 0.1, 0.5), - positive: buildStyleSet(ramps.green, 0.1, 0.5), - warning: buildStyleSet(ramps.yellow, 0.1, 0.5), - negative: buildStyleSet(ramps.red, 0.1, 0.5), + base: build_style_set(ramps.neutral, 0.1, 1), + variant: build_style_set(ramps.neutral, 0.1, 0.7), + on: build_style_set(ramps.neutral, 0, 1), + accent: build_style_set(ramps.blue, 0.1, 0.5), + positive: build_style_set(ramps.green, 0.1, 0.5), + warning: build_style_set(ramps.yellow, 0.1, 0.5), + negative: build_style_set(ramps.red, 0.1, 0.5), } } -function highestLayer(ramps: RampSet): Layer { +function highest_layer(ramps: RampSet): Layer { return { - base: buildStyleSet(ramps.neutral, 0, 1), - variant: buildStyleSet(ramps.neutral, 0, 0.7), - on: buildStyleSet(ramps.neutral, 0.1, 1), - accent: buildStyleSet(ramps.blue, 0.1, 0.5), - positive: buildStyleSet(ramps.green, 0.1, 0.5), - warning: buildStyleSet(ramps.yellow, 0.1, 0.5), - negative: buildStyleSet(ramps.red, 0.1, 0.5), + base: build_style_set(ramps.neutral, 0, 1), + variant: build_style_set(ramps.neutral, 0, 0.7), + on: build_style_set(ramps.neutral, 0.1, 1), + accent: build_style_set(ramps.blue, 0.1, 0.5), + positive: build_style_set(ramps.green, 0.1, 0.5), + warning: build_style_set(ramps.yellow, 0.1, 0.5), + negative: build_style_set(ramps.red, 0.1, 0.5), } } -function buildStyleSet( +function build_style_set( ramp: Scale, - backgroundBase: number, - foregroundBase: number, + background_base: number, + foreground_base: number, step = 0.08 ): StyleSet { - const styleDefinitions = buildStyleDefinition( - backgroundBase, - foregroundBase, + const style_definitions = build_style_definition( + background_base, + foreground_base, step ) - function colorString(indexOrColor: number | Color): string { - if (typeof indexOrColor === "number") { - return ramp(indexOrColor).hex() + function color_string(index_or_color: number | Color): string { + if (typeof index_or_color === "number") { + return ramp(index_or_color).hex() } else { - return indexOrColor.hex() + return index_or_color.hex() } } - function buildStyle(style: Styles): Style { + function build_style(style: Styles): Style { return { - background: colorString(styleDefinitions.background[style]), - border: colorString(styleDefinitions.border[style]), - foreground: colorString(styleDefinitions.foreground[style]), + background: color_string(style_definitions.background[style]), + border: color_string(style_definitions.border[style]), + foreground: color_string(style_definitions.foreground[style]), } } return { - default: buildStyle("default"), - hovered: buildStyle("hovered"), - pressed: buildStyle("pressed"), - active: buildStyle("active"), - disabled: buildStyle("disabled"), - inverted: buildStyle("inverted"), + default: build_style("default"), + hovered: build_style("hovered"), + pressed: build_style("pressed"), + active: build_style("active"), + disabled: build_style("disabled"), + inverted: build_style("inverted"), } } -function buildStyleDefinition(bgBase: number, fgBase: number, step = 0.08) { +function build_style_definition(bg_base: number, fg_base: number, step = 0.08) { return { background: { - default: bgBase, - hovered: bgBase + step, - pressed: bgBase + step * 1.5, - active: bgBase + step * 2.2, - disabled: bgBase, - inverted: fgBase + step * 6, + default: bg_base, + hovered: bg_base + step, + pressed: bg_base + step * 1.5, + active: bg_base + step * 2.2, + disabled: bg_base, + inverted: fg_base + step * 6, }, border: { - default: bgBase + step * 1, - hovered: bgBase + step, - pressed: bgBase + step, - active: bgBase + step * 3, - disabled: bgBase + step * 0.5, - inverted: bgBase - step * 3, + default: bg_base + step * 1, + hovered: bg_base + step, + pressed: bg_base + step, + active: bg_base + step * 3, + disabled: bg_base + step * 0.5, + inverted: bg_base - step * 3, }, foreground: { - default: fgBase, - hovered: fgBase, - pressed: fgBase, - active: fgBase + step * 6, - disabled: bgBase + step * 4, - inverted: bgBase + step * 2, + default: fg_base, + hovered: fg_base, + pressed: fg_base, + active: fg_base + step * 6, + disabled: bg_base + step * 4, + inverted: bg_base + step * 2, }, } } diff --git a/styles/src/theme/ramps.ts b/styles/src/theme/ramps.ts index 98a73ef5bf0c768b08159ad9bca44ea19510a6b6..118d0c727456f5369abbd1ca3bb2cbd016921fac 100644 --- a/styles/src/theme/ramps.ts +++ b/styles/src/theme/ramps.ts @@ -5,10 +5,10 @@ import { ThemeConfigInputColorsKeys, } from "./theme_config" -export function colorRamp(color: Color): Scale { - const endColor = color.desaturate(1).brighten(5) - const startColor = color.desaturate(1).darken(4) - return chroma.scale([startColor, color, endColor]).mode("lab") +export function color_ramp(color: Color): Scale { + const end_color = color.desaturate(1).brighten(5) + const start_color = color.desaturate(1).darken(4) + return chroma.scale([start_color, color, end_color]).mode("lab") } /** @@ -18,29 +18,29 @@ export function colorRamp(color: Color): Scale { theme so that we don't modify the passed in ramps. This combined with an error in the type definitions for chroma js means we have to cast the colors function to any in order to get the colors back out from the original ramps. - * @param isLight - * @param colorRamps + * @param is_light + * @param color_ramps * @returns */ -export function getRamps( - isLight: boolean, - colorRamps: ThemeConfigInputColors +export function get_ramps( + is_light: boolean, + color_ramps: ThemeConfigInputColors ): RampSet { const ramps: RampSet = {} as any // eslint-disable-line @typescript-eslint/no-explicit-any - const colorsKeys = Object.keys(colorRamps) as ThemeConfigInputColorsKeys[] + const color_keys = Object.keys(color_ramps) as ThemeConfigInputColorsKeys[] - if (isLight) { - for (const rampName of colorsKeys) { - ramps[rampName] = chroma.scale( - colorRamps[rampName].colors(100).reverse() + if (is_light) { + for (const ramp_name of color_keys) { + ramps[ramp_name] = chroma.scale( + color_ramps[ramp_name].colors(100).reverse() ) } - ramps.neutral = chroma.scale(colorRamps.neutral.colors(100).reverse()) + ramps.neutral = chroma.scale(color_ramps.neutral.colors(100).reverse()) } else { - for (const rampName of colorsKeys) { - ramps[rampName] = chroma.scale(colorRamps[rampName].colors(100)) + for (const ramp_name of color_keys) { + ramps[ramp_name] = chroma.scale(color_ramps[ramp_name].colors(100)) } - ramps.neutral = chroma.scale(colorRamps.neutral.colors(100)) + ramps.neutral = chroma.scale(color_ramps.neutral.colors(100)) } return ramps diff --git a/styles/src/theme/syntax.ts b/styles/src/theme/syntax.ts index 1b61849d50d168d2ba0a3fcfabec0069578e098b..a8bf807ee0a4a533eabc971e2505e3de42e5a854 100644 --- a/styles/src/theme/syntax.ts +++ b/styles/src/theme/syntax.ts @@ -116,7 +116,7 @@ export interface Syntax { export type ThemeSyntax = Partial -const default_syntaxHighlightStyle: Omit = { +const default_syntax_highlight_style: Omit = { weight: "normal", underline: false, italic: false, @@ -132,7 +132,7 @@ function build_default_syntax(color_scheme: ColorScheme): Syntax { // then spread the default to each style for (const key of Object.keys({} as Syntax)) { syntax[key as keyof Syntax] = { - ...default_syntaxHighlightStyle, + ...default_syntax_highlight_style, } } diff --git a/styles/src/theme/theme_config.ts b/styles/src/theme/theme_config.ts index 176ae83bb769f4bdc38f83a64c5963084c56de11..26462bee6d43970c1db61e470fcab48aed20c1d0 100644 --- a/styles/src/theme/theme_config.ts +++ b/styles/src/theme/theme_config.ts @@ -17,15 +17,15 @@ interface ThemeMeta { * * Example: `MIT` */ - licenseType?: string | ThemeLicenseType - licenseUrl?: string - licenseFile: string - themeUrl?: string + license_type?: string | ThemeLicenseType + license_url?: string + license_file: string + theme_url?: string } export type ThemeFamilyMeta = Pick< ThemeMeta, - "name" | "author" | "licenseType" | "licenseUrl" + "name" | "author" | "license_type" | "license_url" > export interface ThemeConfigInputColors { @@ -62,7 +62,7 @@ interface ThemeConfigOverrides { } type ThemeConfigProperties = ThemeMeta & { - inputColor: ThemeConfigInputColors + input_color: ThemeConfigInputColors override: ThemeConfigOverrides } diff --git a/styles/src/theme/tokens/color_scheme.ts b/styles/src/theme/tokens/color_scheme.ts index 84e456a6e7f223d728fe6cee3e73b0bfa3b155bc..21334fb199a19f3e1dfae2b514b80679418bca54 100644 --- a/styles/src/theme/tokens/color_scheme.ts +++ b/styles/src/theme/tokens/color_scheme.ts @@ -23,30 +23,30 @@ interface ColorSchemeTokens { middle: LayerToken highest: LayerToken players: PlayersToken - popoverShadow: SingleBoxShadowToken - modalShadow: SingleBoxShadowToken + popover_shadow: SingleBoxShadowToken + modal_shadow: SingleBoxShadowToken syntax?: Partial } -const createShadowToken = ( +const create_shadow_token = ( shadow: Shadow, - tokenName: string + token_name: string ): SingleBoxShadowToken => { return { - name: tokenName, + name: token_name, type: TokenTypes.BOX_SHADOW, value: `${shadow.offset[0]}px ${shadow.offset[1]}px ${shadow.blur}px 0px ${shadow.color}`, } } -const popoverShadowToken = (colorScheme: ColorScheme): SingleBoxShadowToken => { - const shadow = colorScheme.popoverShadow - return createShadowToken(shadow, "popoverShadow") +const popover_shadow_token = (theme: ColorScheme): SingleBoxShadowToken => { + const shadow = theme.popover_shadow + return create_shadow_token(shadow, "popover_shadow") } -const modalShadowToken = (colorScheme: ColorScheme): SingleBoxShadowToken => { - const shadow = colorScheme.modalShadow - return createShadowToken(shadow, "modalShadow") +const modal_shadow_token = (theme: ColorScheme): SingleBoxShadowToken => { + const shadow = theme.modal_shadow + return create_shadow_token(shadow, "modal_shadow") } type ThemeSyntaxColorTokens = Record @@ -68,32 +68,32 @@ function syntaxHighlightStyleColorTokens( }, {} as ThemeSyntaxColorTokens) } -const syntaxTokens = ( - colorScheme: ColorScheme +const syntax_Tokens = ( + theme: ColorScheme ): ColorSchemeTokens["syntax"] => { - const syntax = editor(colorScheme).syntax + const syntax = editor(theme).syntax return syntaxHighlightStyleColorTokens(syntax) } -export function colorSchemeTokens(colorScheme: ColorScheme): ColorSchemeTokens { +export function theme_tokens(theme: ColorScheme): ColorSchemeTokens { return { name: { name: "themeName", - value: colorScheme.name, + value: theme.name, type: TokenTypes.OTHER, }, appearance: { name: "themeAppearance", - value: colorScheme.is_light ? "light" : "dark", + value: theme.is_light ? "light" : "dark", type: TokenTypes.OTHER, }, - lowest: layerToken(colorScheme.lowest, "lowest"), - middle: layerToken(colorScheme.middle, "middle"), - highest: layerToken(colorScheme.highest, "highest"), - popoverShadow: popoverShadowToken(colorScheme), - modalShadow: modalShadowToken(colorScheme), - players: playersToken(colorScheme), - syntax: syntaxTokens(colorScheme), + lowest: layerToken(theme.lowest, "lowest"), + middle: layerToken(theme.middle, "middle"), + highest: layerToken(theme.highest, "highest"), + popover_shadow: popover_shadow_token(theme), + modal_shadow: modal_shadow_token(theme), + players: playersToken(theme), + syntax: syntax_Tokens(theme), } } diff --git a/styles/src/themes/andromeda/andromeda.ts b/styles/src/themes/andromeda/andromeda.ts index 52c29bb2ec2071670c2c0b7f4f6dfd990d834381..18699d21cd9b8118ec18358e8a6cc515c268d002 100644 --- a/styles/src/themes/andromeda/andromeda.ts +++ b/styles/src/themes/andromeda/andromeda.ts @@ -1,6 +1,6 @@ import { chroma, - colorRamp, + color_ramp, ThemeAppearance, ThemeLicenseType, ThemeConfig, @@ -10,10 +10,10 @@ export const dark: ThemeConfig = { name: "Andromeda", author: "EliverLara", appearance: ThemeAppearance.Dark, - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/EliverLara/Andromeda", - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/EliverLara/Andromeda", + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma .scale([ "#1E2025", @@ -26,14 +26,14 @@ export const dark: ThemeConfig = { "#F7F7F8", ]) .domain([0, 0.15, 0.25, 0.35, 0.7, 0.8, 0.9, 1]), - red: colorRamp(chroma("#F92672")), - orange: colorRamp(chroma("#F39C12")), - yellow: colorRamp(chroma("#FFE66D")), - green: colorRamp(chroma("#96E072")), - cyan: colorRamp(chroma("#00E8C6")), - blue: colorRamp(chroma("#0CA793")), - violet: colorRamp(chroma("#8A3FA6")), - magenta: colorRamp(chroma("#C74DED")), + red: color_ramp(chroma("#F92672")), + orange: color_ramp(chroma("#F39C12")), + yellow: color_ramp(chroma("#FFE66D")), + green: color_ramp(chroma("#96E072")), + cyan: color_ramp(chroma("#00E8C6")), + blue: color_ramp(chroma("#0CA793")), + violet: color_ramp(chroma("#8A3FA6")), + magenta: color_ramp(chroma("#C74DED")), }, override: { syntax: {} }, } diff --git a/styles/src/themes/atelier/atelier-cave-dark.ts b/styles/src/themes/atelier/atelier-cave-dark.ts index ebec67b4c276639f22427182bd21dc72e8acbcfb..faf957b6423c04f5997eef566c60e3a72e853af9 100644 --- a/styles/src/themes/atelier/atelier-cave-dark.ts +++ b/styles/src/themes/atelier/atelier-cave-dark.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Cave Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ colors.base00, colors.base01, @@ -45,17 +45,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base06, colors.base07, ]), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-cave-light.ts b/styles/src/themes/atelier/atelier-cave-light.ts index c1b7a05d4718171a81e4f8c45e0a70ee62e73625..856cd300436de7baa50e81de6e57f03a93a00e11 100644 --- a/styles/src/themes/atelier/atelier-cave-light.ts +++ b/styles/src/themes/atelier/atelier-cave-light.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Cave Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale( [ colors.base00, @@ -47,17 +47,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base07, ].reverse() ), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-dune-dark.ts b/styles/src/themes/atelier/atelier-dune-dark.ts index c2ebc424e77c6b30ad693c86e0c932f204f91a20..fb67fd2471a113dfed33847836276cb7cbac7044 100644 --- a/styles/src/themes/atelier/atelier-dune-dark.ts +++ b/styles/src/themes/atelier/atelier-dune-dark.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Dune Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ colors.base00, colors.base01, @@ -45,17 +45,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base06, colors.base07, ]), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-dune-light.ts b/styles/src/themes/atelier/atelier-dune-light.ts index 01cb1d67cba048c2437c44c495a769eeab71d68e..5e9e5b69276562fb8ee5d945282c1ebe44b3e5fc 100644 --- a/styles/src/themes/atelier/atelier-dune-light.ts +++ b/styles/src/themes/atelier/atelier-dune-light.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Dune Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale( [ colors.base00, @@ -47,17 +47,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base07, ].reverse() ), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-estuary-dark.ts b/styles/src/themes/atelier/atelier-estuary-dark.ts index 8e32c1f68f5d78d115c7bf4aec999c442d882a67..0badf4371e5a629030765d76f60f1ee7d7078e0f 100644 --- a/styles/src/themes/atelier/atelier-estuary-dark.ts +++ b/styles/src/themes/atelier/atelier-estuary-dark.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Estuary Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ colors.base00, colors.base01, @@ -45,17 +45,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base06, colors.base07, ]), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-estuary-light.ts b/styles/src/themes/atelier/atelier-estuary-light.ts index 75fcb8e8302d26ab747bb42b3c07cda630fa1c7f..adc77e760715b63c5955b36ab31db141c44e6e89 100644 --- a/styles/src/themes/atelier/atelier-estuary-light.ts +++ b/styles/src/themes/atelier/atelier-estuary-light.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Estuary Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale( [ colors.base00, @@ -47,17 +47,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base07, ].reverse() ), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-forest-dark.ts b/styles/src/themes/atelier/atelier-forest-dark.ts index 7ee7ae4ab13681a5413dc4cc97f3166c5dbed1a2..3e89518c0bb04095fabd86296853c31a66c0615e 100644 --- a/styles/src/themes/atelier/atelier-forest-dark.ts +++ b/styles/src/themes/atelier/atelier-forest-dark.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Forest Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ colors.base00, colors.base01, @@ -45,17 +45,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base06, colors.base07, ]), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-forest-light.ts b/styles/src/themes/atelier/atelier-forest-light.ts index e12baf9904ef7a7e8c1fc6d2acdc67e6ea0be7e5..68d2c50876df452145dc0e5cd6a674370ecf37f5 100644 --- a/styles/src/themes/atelier/atelier-forest-light.ts +++ b/styles/src/themes/atelier/atelier-forest-light.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Forest Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale( [ colors.base00, @@ -47,17 +47,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base07, ].reverse() ), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-heath-dark.ts b/styles/src/themes/atelier/atelier-heath-dark.ts index 11751367a3f9d01d490d8ec9961e3f0cc092464d..c185d69e43737c420dd1a6809e2cd187bd3c7c60 100644 --- a/styles/src/themes/atelier/atelier-heath-dark.ts +++ b/styles/src/themes/atelier/atelier-heath-dark.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Heath Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ colors.base00, colors.base01, @@ -45,17 +45,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base06, colors.base07, ]), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-heath-light.ts b/styles/src/themes/atelier/atelier-heath-light.ts index 07f4a9b3cb3194abda570408f1642355815a66f6..4414987e229a1d1dccff657c3f5d4de227cb51ba 100644 --- a/styles/src/themes/atelier/atelier-heath-light.ts +++ b/styles/src/themes/atelier/atelier-heath-light.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Heath Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale( [ colors.base00, @@ -47,17 +47,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base07, ].reverse() ), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-lakeside-dark.ts b/styles/src/themes/atelier/atelier-lakeside-dark.ts index b1c98ddfdf20aa45b614392436e4b764482b3288..7fdc3b4eba363d74614db2f49b0bf512388acacc 100644 --- a/styles/src/themes/atelier/atelier-lakeside-dark.ts +++ b/styles/src/themes/atelier/atelier-lakeside-dark.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Lakeside Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ colors.base00, colors.base01, @@ -45,17 +45,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base06, colors.base07, ]), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-lakeside-light.ts b/styles/src/themes/atelier/atelier-lakeside-light.ts index d960444defa0ef3615c480d7e2d82e5573435089..bdda48f6c732f1b830c32be42002198d205a3699 100644 --- a/styles/src/themes/atelier/atelier-lakeside-light.ts +++ b/styles/src/themes/atelier/atelier-lakeside-light.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Lakeside Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale( [ colors.base00, @@ -47,17 +47,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base07, ].reverse() ), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-plateau-dark.ts b/styles/src/themes/atelier/atelier-plateau-dark.ts index 74693b24fd35e7f705ecbd71feb1360aa38e3133..ff287bc80dd6c033f65b086a571321915b2fb0cb 100644 --- a/styles/src/themes/atelier/atelier-plateau-dark.ts +++ b/styles/src/themes/atelier/atelier-plateau-dark.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Plateau Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ colors.base00, colors.base01, @@ -45,17 +45,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base06, colors.base07, ]), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-plateau-light.ts b/styles/src/themes/atelier/atelier-plateau-light.ts index dd3130cea0d191966e0c6d4cb4d11fdfa41047b1..8a9fb989ad2105b8f6f594b713b6115904eae141 100644 --- a/styles/src/themes/atelier/atelier-plateau-light.ts +++ b/styles/src/themes/atelier/atelier-plateau-light.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Plateau Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale( [ colors.base00, @@ -47,17 +47,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base07, ].reverse() ), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-savanna-dark.ts b/styles/src/themes/atelier/atelier-savanna-dark.ts index c387ac5ae989ee75fcb5bd8eddfc7fd41840a53f..d94af30334ca378116ae79469e0181b9201c8744 100644 --- a/styles/src/themes/atelier/atelier-savanna-dark.ts +++ b/styles/src/themes/atelier/atelier-savanna-dark.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Savanna Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ colors.base00, colors.base01, @@ -45,17 +45,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base06, colors.base07, ]), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-savanna-light.ts b/styles/src/themes/atelier/atelier-savanna-light.ts index 64edd406a8982abe6f6b76e043931a0ff4b20c3c..2426b05400a77472264e9e76333d5e4585313da6 100644 --- a/styles/src/themes/atelier/atelier-savanna-light.ts +++ b/styles/src/themes/atelier/atelier-savanna-light.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Savanna Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale( [ colors.base00, @@ -47,17 +47,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base07, ].reverse() ), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-seaside-dark.ts b/styles/src/themes/atelier/atelier-seaside-dark.ts index dbccb96013c8a06cadc05224d9857dbd3637bdd1..abb267f5a4078774ef4efbbd9e0ecf122bc074c3 100644 --- a/styles/src/themes/atelier/atelier-seaside-dark.ts +++ b/styles/src/themes/atelier/atelier-seaside-dark.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Seaside Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ colors.base00, colors.base01, @@ -45,17 +45,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base06, colors.base07, ]), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-seaside-light.ts b/styles/src/themes/atelier/atelier-seaside-light.ts index a9c034ed4406c449baeac12a10644704b2d3dc4d..455e7795e145dcca3c84a719671253a55aef26be 100644 --- a/styles/src/themes/atelier/atelier-seaside-light.ts +++ b/styles/src/themes/atelier/atelier-seaside-light.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Seaside Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale( [ colors.base00, @@ -47,17 +47,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base07, ].reverse() ), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-sulphurpool-dark.ts b/styles/src/themes/atelier/atelier-sulphurpool-dark.ts index edfc518b8e9d4972bdc5132f6e2e4811ad2166b4..3f33647daa9414b6619005b7d0e6931e718d17c8 100644 --- a/styles/src/themes/atelier/atelier-sulphurpool-dark.ts +++ b/styles/src/themes/atelier/atelier-sulphurpool-dark.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Sulphurpool Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ colors.base00, colors.base01, @@ -45,17 +45,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base06, colors.base07, ]), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/atelier-sulphurpool-light.ts b/styles/src/themes/atelier/atelier-sulphurpool-light.ts index fbef6683bf99d83a9ba1c125c4a0790d7ce23981..2cb4d0453952135265adf349da176fe772c98811 100644 --- a/styles/src/themes/atelier/atelier-sulphurpool-light.ts +++ b/styles/src/themes/atelier/atelier-sulphurpool-light.ts @@ -1,5 +1,5 @@ -import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common" -import { meta, buildSyntax, Variant } from "./common" +import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common" +import { meta, build_syntax, Variant } from "./common" const variant: Variant = { colors: { @@ -22,19 +22,19 @@ const variant: Variant = { }, } -const syntax = buildSyntax(variant) +const syntax = build_syntax(variant) -const getTheme = (variant: Variant): ThemeConfig => { +const get_theme = (variant: Variant): ThemeConfig => { const { colors } = variant return { name: `${meta.name} Sulphurpool Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale( [ colors.base00, @@ -47,17 +47,17 @@ const getTheme = (variant: Variant): ThemeConfig => { colors.base07, ].reverse() ), - red: colorRamp(chroma(colors.base08)), - orange: colorRamp(chroma(colors.base09)), - yellow: colorRamp(chroma(colors.base0A)), - green: colorRamp(chroma(colors.base0B)), - cyan: colorRamp(chroma(colors.base0C)), - blue: colorRamp(chroma(colors.base0D)), - violet: colorRamp(chroma(colors.base0E)), - magenta: colorRamp(chroma(colors.base0F)), + red: color_ramp(chroma(colors.base08)), + orange: color_ramp(chroma(colors.base09)), + yellow: color_ramp(chroma(colors.base0A)), + green: color_ramp(chroma(colors.base0B)), + cyan: color_ramp(chroma(colors.base0C)), + blue: color_ramp(chroma(colors.base0D)), + violet: color_ramp(chroma(colors.base0E)), + magenta: color_ramp(chroma(colors.base0F)), }, override: { syntax }, } } -export const theme = getTheme(variant) +export const theme = get_theme(variant) diff --git a/styles/src/themes/atelier/common.ts b/styles/src/themes/atelier/common.ts index 2e5be61f52d92d32a58edb6d82517cabd6a0957d..b76ccc5b607a2f149a35114a519ddaaf2d1b254d 100644 --- a/styles/src/themes/atelier/common.ts +++ b/styles/src/themes/atelier/common.ts @@ -24,12 +24,12 @@ export interface Variant { export const meta: ThemeFamilyMeta = { name: "Atelier", author: "Bram de Haan (http://atelierbramdehaan.nl)", - licenseType: ThemeLicenseType.MIT, - licenseUrl: + license_type: ThemeLicenseType.MIT, + license_url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/", } -export const buildSyntax = (variant: Variant): ThemeSyntax => { +export const build_syntax = (variant: Variant): ThemeSyntax => { const { colors } = variant return { primary: { color: colors.base06 }, diff --git a/styles/src/themes/ayu/ayu-dark.ts b/styles/src/themes/ayu/ayu-dark.ts index 7feddacd2b1543ecebba174709d3c8d59f12a278..a12ce08e29e1d905ade51c12803f324c0c5f7678 100644 --- a/styles/src/themes/ayu/ayu-dark.ts +++ b/styles/src/themes/ayu/ayu-dark.ts @@ -1,16 +1,16 @@ import { ThemeAppearance, ThemeConfig } from "../../common" -import { ayu, meta, buildTheme } from "./common" +import { ayu, meta, build_theme } from "./common" const variant = ayu.dark -const { ramps, syntax } = buildTheme(variant, false) +const { ramps, syntax } = build_theme(variant, false) export const theme: ThemeConfig = { name: `${meta.name} Dark`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: ramps, + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: ramps, override: { syntax }, } diff --git a/styles/src/themes/ayu/ayu-light.ts b/styles/src/themes/ayu/ayu-light.ts index bf023852471bdcbfe109127ce679c60695fdccaa..aceda0d01751ec69253278c983531f2f3435c614 100644 --- a/styles/src/themes/ayu/ayu-light.ts +++ b/styles/src/themes/ayu/ayu-light.ts @@ -1,16 +1,16 @@ import { ThemeAppearance, ThemeConfig } from "../../common" -import { ayu, meta, buildTheme } from "./common" +import { ayu, meta, build_theme } from "./common" const variant = ayu.light -const { ramps, syntax } = buildTheme(variant, true) +const { ramps, syntax } = build_theme(variant, true) export const theme: ThemeConfig = { name: `${meta.name} Light`, author: meta.author, appearance: ThemeAppearance.Light, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: ramps, + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: ramps, override: { syntax }, } diff --git a/styles/src/themes/ayu/ayu-mirage.ts b/styles/src/themes/ayu/ayu-mirage.ts index d2a69e7ab6a52fb8664516e4d3ee85b36fe19551..9dd3ea7a6133e875faa7727cc54b11d45e94b6fd 100644 --- a/styles/src/themes/ayu/ayu-mirage.ts +++ b/styles/src/themes/ayu/ayu-mirage.ts @@ -1,16 +1,16 @@ import { ThemeAppearance, ThemeConfig } from "../../common" -import { ayu, meta, buildTheme } from "./common" +import { ayu, meta, build_theme } from "./common" const variant = ayu.mirage -const { ramps, syntax } = buildTheme(variant, false) +const { ramps, syntax } = build_theme(variant, false) export const theme: ThemeConfig = { name: `${meta.name} Mirage`, author: meta.author, appearance: ThemeAppearance.Dark, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: ramps, + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: ramps, override: { syntax }, } diff --git a/styles/src/themes/ayu/common.ts b/styles/src/themes/ayu/common.ts index 1eb2c91916d3e374508cf4d0365046583c844e01..9caaee8e346d6a1706fba5d85f9140624394c1ed 100644 --- a/styles/src/themes/ayu/common.ts +++ b/styles/src/themes/ayu/common.ts @@ -1,7 +1,7 @@ import { dark, light, mirage } from "ayu" import { chroma, - colorRamp, + color_ramp, ThemeLicenseType, ThemeSyntax, ThemeFamilyMeta, @@ -13,7 +13,7 @@ export const ayu = { mirage, } -export const buildTheme = (t: typeof dark, light: boolean) => { +export const build_theme = (t: typeof dark, light: boolean) => { const color = { lightBlue: t.syntax.tag.hex(), yellow: t.syntax.func.hex(), @@ -48,20 +48,20 @@ export const buildTheme = (t: typeof dark, light: boolean) => { light ? t.editor.fg.hex() : t.editor.bg.hex(), light ? t.editor.bg.hex() : t.editor.fg.hex(), ]), - red: colorRamp(chroma(color.red)), - orange: colorRamp(chroma(color.orange)), - yellow: colorRamp(chroma(color.yellow)), - green: colorRamp(chroma(color.green)), - cyan: colorRamp(chroma(color.teal)), - blue: colorRamp(chroma(color.blue)), - violet: colorRamp(chroma(color.purple)), - magenta: colorRamp(chroma(color.lightBlue)), + red: color_ramp(chroma(color.red)), + orange: color_ramp(chroma(color.orange)), + yellow: color_ramp(chroma(color.yellow)), + green: color_ramp(chroma(color.green)), + cyan: color_ramp(chroma(color.teal)), + blue: color_ramp(chroma(color.blue)), + violet: color_ramp(chroma(color.purple)), + magenta: color_ramp(chroma(color.lightBlue)), }, syntax, } } -export const buildSyntax = (t: typeof dark): ThemeSyntax => { +export const build_syntax = (t: typeof dark): ThemeSyntax => { return { constant: { color: t.syntax.constant.hex() }, "string.regex": { color: t.syntax.regexp.hex() }, @@ -80,6 +80,6 @@ export const buildSyntax = (t: typeof dark): ThemeSyntax => { export const meta: ThemeFamilyMeta = { name: "Ayu", author: "dempfi", - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/dempfi/ayu", + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/dempfi/ayu", } diff --git a/styles/src/themes/gruvbox/gruvbox-common.ts b/styles/src/themes/gruvbox/gruvbox-common.ts index 6a911ce731d781d5ea614618928d5bc131ffe38e..2fa6b58faadb91b5689c5eac93baf706f6faa391 100644 --- a/styles/src/themes/gruvbox/gruvbox-common.ts +++ b/styles/src/themes/gruvbox/gruvbox-common.ts @@ -1,6 +1,6 @@ import { chroma, - colorRamp, + color_ramp, ThemeAppearance, ThemeLicenseType, ThemeConfig, @@ -11,8 +11,8 @@ import { const meta: ThemeFamilyMeta = { name: "Gruvbox", author: "morhetz ", - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/morhetz/gruvbox", + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/morhetz/gruvbox", } const color = { @@ -73,7 +73,7 @@ interface ThemeColors { gray: string } -const darkNeutrals = [ +const dark_neutrals = [ color.dark1, color.dark2, color.dark3, @@ -96,7 +96,7 @@ const dark: ThemeColors = { gray: color.light4, } -const lightNeutrals = [ +const light_neutrals = [ color.light1, color.light2, color.light3, @@ -119,14 +119,6 @@ const light: ThemeColors = { gray: color.dark4, } -const darkHardNeutral = [color.dark0_hard, ...darkNeutrals] -const darkNeutral = [color.dark0, ...darkNeutrals] -const darkSoftNeutral = [color.dark0_soft, ...darkNeutrals] - -const lightHardNeutral = [color.light0_hard, ...lightNeutrals] -const lightNeutral = [color.light0, ...lightNeutrals] -const lightSoftNeutral = [color.light0_soft, ...lightNeutrals] - interface Variant { name: string appearance: "light" | "dark" @@ -167,60 +159,68 @@ const variant: Variant[] = [ }, ] -const buildVariant = (variant: Variant): ThemeConfig => { +const dark_hard_neutral = [color.dark0_hard, ...dark_neutrals] +const dark_neutral = [color.dark0, ...dark_neutrals] +const dark_soft_neutral = [color.dark0_soft, ...dark_neutrals] + +const light_hard_neutral = [color.light0_hard, ...light_neutrals] +const light_neutral = [color.light0, ...light_neutrals] +const light_soft_neutral = [color.light0_soft, ...light_neutrals] + +const build_variant = (variant: Variant): ThemeConfig => { const { colors } = variant const name = `Gruvbox ${variant.name}` - const isLight = variant.appearance === "light" + const is_light = variant.appearance === "light" let neutral: string[] = [] switch (variant.name) { case "Dark Hard": - neutral = darkHardNeutral + neutral = dark_hard_neutral break case "Dark": - neutral = darkNeutral + neutral = dark_neutral break case "Dark Soft": - neutral = darkSoftNeutral + neutral = dark_soft_neutral break case "Light Hard": - neutral = lightHardNeutral + neutral = light_hard_neutral break case "Light": - neutral = lightNeutral + neutral = light_neutral break case "Light Soft": - neutral = lightSoftNeutral + neutral = light_soft_neutral break } const ramps = { - neutral: chroma.scale(isLight ? neutral.reverse() : neutral), - red: colorRamp(chroma(variant.colors.red)), - orange: colorRamp(chroma(variant.colors.orange)), - yellow: colorRamp(chroma(variant.colors.yellow)), - green: colorRamp(chroma(variant.colors.green)), - cyan: colorRamp(chroma(variant.colors.aqua)), - blue: colorRamp(chroma(variant.colors.blue)), - violet: colorRamp(chroma(variant.colors.purple)), - magenta: colorRamp(chroma(variant.colors.gray)), + neutral: chroma.scale(is_light ? neutral.reverse() : neutral), + red: color_ramp(chroma(variant.colors.red)), + orange: color_ramp(chroma(variant.colors.orange)), + yellow: color_ramp(chroma(variant.colors.yellow)), + green: color_ramp(chroma(variant.colors.green)), + cyan: color_ramp(chroma(variant.colors.aqua)), + blue: color_ramp(chroma(variant.colors.blue)), + violet: color_ramp(chroma(variant.colors.purple)), + magenta: color_ramp(chroma(variant.colors.gray)), } const syntax: ThemeSyntax = { - primary: { color: neutral[isLight ? 0 : 8] }, + primary: { color: neutral[is_light ? 0 : 8] }, "text.literal": { color: colors.blue }, comment: { color: colors.gray }, - punctuation: { color: neutral[isLight ? 1 : 7] }, - "punctuation.bracket": { color: neutral[isLight ? 3 : 5] }, - "punctuation.list_marker": { color: neutral[isLight ? 0 : 8] }, + punctuation: { color: neutral[is_light ? 1 : 7] }, + "punctuation.bracket": { color: neutral[is_light ? 3 : 5] }, + "punctuation.list_marker": { color: neutral[is_light ? 0 : 8] }, operator: { color: colors.aqua }, boolean: { color: colors.purple }, number: { color: colors.purple }, @@ -236,7 +236,7 @@ const buildVariant = (variant: Variant): ThemeConfig => { function: { color: colors.green }, "function.builtin": { color: colors.red }, variable: { color: colors.blue }, - property: { color: neutral[isLight ? 0 : 8] }, + property: { color: neutral[is_light ? 0 : 8] }, embedded: { color: colors.aqua }, link_text: { color: colors.aqua }, link_uri: { color: colors.purple }, @@ -247,18 +247,18 @@ const buildVariant = (variant: Variant): ThemeConfig => { name, author: meta.author, appearance: variant.appearance as ThemeAppearance, - licenseType: meta.licenseType, - licenseUrl: meta.licenseUrl, - licenseFile: `${__dirname}/LICENSE`, - inputColor: ramps, + license_type: meta.license_type, + license_url: meta.license_url, + license_file: `${__dirname}/LICENSE`, + input_color: ramps, override: { syntax }, } } // Variants -export const darkHard = buildVariant(variant[0]) -export const darkDefault = buildVariant(variant[1]) -export const darkSoft = buildVariant(variant[2]) -export const lightHard = buildVariant(variant[3]) -export const lightDefault = buildVariant(variant[4]) -export const lightSoft = buildVariant(variant[5]) +export const dark_hard = build_variant(variant[0]) +export const dark_default = build_variant(variant[1]) +export const dark_soft = build_variant(variant[2]) +export const light_hard = build_variant(variant[3]) +export const light_default = build_variant(variant[4]) +export const light_soft = build_variant(variant[5]) diff --git a/styles/src/themes/gruvbox/gruvbox-dark-hard.ts b/styles/src/themes/gruvbox/gruvbox-dark-hard.ts index 4102671189e856bbd0c508fc1d6be88ee55e8c0c..72757c99f2425cb0fab24c5be23d5b888bcd5816 100644 --- a/styles/src/themes/gruvbox/gruvbox-dark-hard.ts +++ b/styles/src/themes/gruvbox/gruvbox-dark-hard.ts @@ -1 +1 @@ -export { darkHard } from "./gruvbox-common" +export { dark_hard } from "./gruvbox-common" diff --git a/styles/src/themes/gruvbox/gruvbox-dark-soft.ts b/styles/src/themes/gruvbox/gruvbox-dark-soft.ts index d550d63768d40aa97295c9a85922b3788cbf2f96..d8f63ed3311ea2eb6e7b50d9d6c9e2e5f84d788c 100644 --- a/styles/src/themes/gruvbox/gruvbox-dark-soft.ts +++ b/styles/src/themes/gruvbox/gruvbox-dark-soft.ts @@ -1 +1 @@ -export { darkSoft } from "./gruvbox-common" +export { dark_soft } from "./gruvbox-common" diff --git a/styles/src/themes/gruvbox/gruvbox-dark.ts b/styles/src/themes/gruvbox/gruvbox-dark.ts index 05850028a40cb583d8a3beb7b706c52e0523e81c..0582baa0d8b8779c5e595efdf7d127a93c8113e8 100644 --- a/styles/src/themes/gruvbox/gruvbox-dark.ts +++ b/styles/src/themes/gruvbox/gruvbox-dark.ts @@ -1 +1 @@ -export { darkDefault } from "./gruvbox-common" +export { dark_default } from "./gruvbox-common" diff --git a/styles/src/themes/gruvbox/gruvbox-light-hard.ts b/styles/src/themes/gruvbox/gruvbox-light-hard.ts index ec3cddec758379f6bf84b165d04eed31373e34a4..bcaea06a4116ceaae9f88436aa1ef811c2c12895 100644 --- a/styles/src/themes/gruvbox/gruvbox-light-hard.ts +++ b/styles/src/themes/gruvbox/gruvbox-light-hard.ts @@ -1 +1 @@ -export { lightHard } from "./gruvbox-common" +export { light_hard } from "./gruvbox-common" diff --git a/styles/src/themes/gruvbox/gruvbox-light-soft.ts b/styles/src/themes/gruvbox/gruvbox-light-soft.ts index 0888e847aca9ffdfb8a7147d058cd44f35e4562c..5eb79f647be57db20886bb22aff821d29a9dc4da 100644 --- a/styles/src/themes/gruvbox/gruvbox-light-soft.ts +++ b/styles/src/themes/gruvbox/gruvbox-light-soft.ts @@ -1 +1 @@ -export { lightSoft } from "./gruvbox-common" +export { light_soft } from "./gruvbox-common" diff --git a/styles/src/themes/gruvbox/gruvbox-light.ts b/styles/src/themes/gruvbox/gruvbox-light.ts index 6f53ce529965a65a7cb0901ea2703f10b4502922..dc54a33f2644469878773193bb0cb67ba37c5cc5 100644 --- a/styles/src/themes/gruvbox/gruvbox-light.ts +++ b/styles/src/themes/gruvbox/gruvbox-light.ts @@ -1 +1 @@ -export { lightDefault } from "./gruvbox-common" +export { light_default } from "./gruvbox-common" diff --git a/styles/src/themes/index.ts b/styles/src/themes/index.ts index 75853bc042747ac9138a6e3fb47c3ac5e98a2e6c..72bb100e7b823e6d37aea5f7d8d8c84fa8e5b362 100644 --- a/styles/src/themes/index.ts +++ b/styles/src/themes/index.ts @@ -1,82 +1,82 @@ import { ThemeConfig } from "../theme" -import { darkDefault as gruvboxDark } from "./gruvbox/gruvbox-dark" -import { darkHard as gruvboxDarkHard } from "./gruvbox/gruvbox-dark-hard" -import { darkSoft as gruvboxDarkSoft } from "./gruvbox/gruvbox-dark-soft" -import { lightDefault as gruvboxLight } from "./gruvbox/gruvbox-light" -import { lightHard as gruvboxLightHard } from "./gruvbox/gruvbox-light-hard" -import { lightSoft as gruvboxLightSoft } from "./gruvbox/gruvbox-light-soft" -import { dark as solarizedDark } from "./solarized/solarized" -import { light as solarizedLight } from "./solarized/solarized" -import { dark as andromedaDark } from "./andromeda/andromeda" -import { theme as oneDark } from "./one/one-dark" -import { theme as oneLight } from "./one/one-light" -import { theme as ayuLight } from "./ayu/ayu-light" -import { theme as ayuDark } from "./ayu/ayu-dark" -import { theme as ayuMirage } from "./ayu/ayu-mirage" -import { theme as rosePine } from "./rose-pine/rose-pine" -import { theme as rosePineDawn } from "./rose-pine/rose-pine-dawn" -import { theme as rosePineMoon } from "./rose-pine/rose-pine-moon" +import { dark_default as gruvbox_dark } from "./gruvbox/gruvbox-dark" +import { dark_hard as gruvbox_dark_hard } from "./gruvbox/gruvbox-dark-hard" +import { dark_soft as gruvbox_dark_soft } from "./gruvbox/gruvbox-dark-soft" +import { light_default as gruvbox_light } from "./gruvbox/gruvbox-light" +import { light_hard as gruvbox_light_hard } from "./gruvbox/gruvbox-light-hard" +import { light_soft as gruvbox_light_soft } from "./gruvbox/gruvbox-light-soft" +import { dark as solarized_dark } from "./solarized/solarized" +import { light as solarized_light } from "./solarized/solarized" +import { dark as andromeda_dark } from "./andromeda/andromeda" +import { theme as one_dark } from "./one/one-dark" +import { theme as one_light } from "./one/one-light" +import { theme as ayu_light } from "./ayu/ayu-light" +import { theme as ayu_dark } from "./ayu/ayu-dark" +import { theme as ayu_mirage } from "./ayu/ayu-mirage" +import { theme as rose_pine } from "./rose-pine/rose-pine" +import { theme as rose_pine_dawn } from "./rose-pine/rose-pine-dawn" +import { theme as rose_pine_moon } from "./rose-pine/rose-pine-moon" import { theme as sandcastle } from "./sandcastle/sandcastle" import { theme as summercamp } from "./summercamp/summercamp" -import { theme as atelierCaveDark } from "./atelier/atelier-cave-dark" -import { theme as atelierCaveLight } from "./atelier/atelier-cave-light" -import { theme as atelierDuneDark } from "./atelier/atelier-dune-dark" -import { theme as atelierDuneLight } from "./atelier/atelier-dune-light" -import { theme as atelierEstuaryDark } from "./atelier/atelier-estuary-dark" -import { theme as atelierEstuaryLight } from "./atelier/atelier-estuary-light" -import { theme as atelierForestDark } from "./atelier/atelier-forest-dark" -import { theme as atelierForestLight } from "./atelier/atelier-forest-light" -import { theme as atelierHeathDark } from "./atelier/atelier-heath-dark" -import { theme as atelierHeathLight } from "./atelier/atelier-heath-light" -import { theme as atelierLakesideDark } from "./atelier/atelier-lakeside-dark" -import { theme as atelierLakesideLight } from "./atelier/atelier-lakeside-light" -import { theme as atelierPlateauDark } from "./atelier/atelier-plateau-dark" -import { theme as atelierPlateauLight } from "./atelier/atelier-plateau-light" -import { theme as atelierSavannaDark } from "./atelier/atelier-savanna-dark" -import { theme as atelierSavannaLight } from "./atelier/atelier-savanna-light" -import { theme as atelierSeasideDark } from "./atelier/atelier-seaside-dark" -import { theme as atelierSeasideLight } from "./atelier/atelier-seaside-light" -import { theme as atelierSulphurpoolDark } from "./atelier/atelier-sulphurpool-dark" -import { theme as atelierSulphurpoolLight } from "./atelier/atelier-sulphurpool-light" +import { theme as atelier_cave_dark } from "./atelier/atelier-cave-dark" +import { theme as atelier_cave_light } from "./atelier/atelier-cave-light" +import { theme as atelier_dune_dark } from "./atelier/atelier-dune-dark" +import { theme as atelier_dune_light } from "./atelier/atelier-dune-light" +import { theme as atelier_estuary_dark } from "./atelier/atelier-estuary-dark" +import { theme as atelier_estuary_light } from "./atelier/atelier-estuary-light" +import { theme as atelier_forest_dark } from "./atelier/atelier-forest-dark" +import { theme as atelier_forest_light } from "./atelier/atelier-forest-light" +import { theme as atelier_heath_dark } from "./atelier/atelier-heath-dark" +import { theme as atelier_heath_light } from "./atelier/atelier-heath-light" +import { theme as atelier_lakeside_dark } from "./atelier/atelier-lakeside-dark" +import { theme as atelier_lakeside_light } from "./atelier/atelier-lakeside-light" +import { theme as atelier_plateau_dark } from "./atelier/atelier-plateau-dark" +import { theme as atelier_plateau_light } from "./atelier/atelier-plateau-light" +import { theme as atelier_savanna_dark } from "./atelier/atelier-savanna-dark" +import { theme as atelier_savanna_light } from "./atelier/atelier-savanna-light" +import { theme as atelier_seaside_dark } from "./atelier/atelier-seaside-dark" +import { theme as atelier_seaside_light } from "./atelier/atelier-seaside-light" +import { theme as atelier_sulphurpool_dark } from "./atelier/atelier-sulphurpool-dark" +import { theme as atelier_sulphurpool_light } from "./atelier/atelier-sulphurpool-light" export const themes: ThemeConfig[] = [ - oneDark, - oneLight, - ayuLight, - ayuDark, - ayuMirage, - gruvboxDark, - gruvboxDarkHard, - gruvboxDarkSoft, - gruvboxLight, - gruvboxLightHard, - gruvboxLightSoft, - rosePine, - rosePineDawn, - rosePineMoon, + one_dark, + one_light, + ayu_light, + ayu_dark, + ayu_mirage, + gruvbox_dark, + gruvbox_dark_hard, + gruvbox_dark_soft, + gruvbox_light, + gruvbox_light_hard, + gruvbox_light_soft, + rose_pine, + rose_pine_dawn, + rose_pine_moon, sandcastle, - solarizedDark, - solarizedLight, - andromedaDark, + solarized_dark, + solarized_light, + andromeda_dark, summercamp, - atelierCaveDark, - atelierCaveLight, - atelierDuneDark, - atelierDuneLight, - atelierEstuaryDark, - atelierEstuaryLight, - atelierForestDark, - atelierForestLight, - atelierHeathDark, - atelierHeathLight, - atelierLakesideDark, - atelierLakesideLight, - atelierPlateauDark, - atelierPlateauLight, - atelierSavannaDark, - atelierSavannaLight, - atelierSeasideDark, - atelierSeasideLight, - atelierSulphurpoolDark, - atelierSulphurpoolLight, + atelier_cave_dark, + atelier_cave_light, + atelier_dune_dark, + atelier_dune_light, + atelier_estuary_dark, + atelier_estuary_light, + atelier_forest_dark, + atelier_forest_light, + atelier_heath_dark, + atelier_heath_light, + atelier_lakeside_dark, + atelier_lakeside_light, + atelier_plateau_dark, + atelier_plateau_light, + atelier_savanna_dark, + atelier_savanna_light, + atelier_seaside_dark, + atelier_seaside_light, + atelier_sulphurpool_dark, + atelier_sulphurpool_light, ] diff --git a/styles/src/themes/one/one-dark.ts b/styles/src/themes/one/one-dark.ts index b8456603ce6e5c02c2a476e7861eb9a2fd43713b..1241668cc2a2434e3c5d6971e6eddf189a11a6f6 100644 --- a/styles/src/themes/one/one-dark.ts +++ b/styles/src/themes/one/one-dark.ts @@ -1,7 +1,7 @@ import { chroma, font_weights, - colorRamp, + color_ramp, ThemeAppearance, ThemeLicenseType, ThemeConfig, @@ -11,7 +11,7 @@ const color = { white: "#ACB2BE", grey: "#5D636F", red: "#D07277", - darkRed: "#B1574B", + dark_red: "#B1574B", orange: "#C0966B", yellow: "#DFC184", green: "#A1C181", @@ -24,10 +24,10 @@ export const theme: ThemeConfig = { name: "One Dark", author: "simurai", appearance: ThemeAppearance.Dark, - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/atom/atom/tree/master/packages/one-dark-ui", - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/atom/atom/tree/master/packages/one-dark-ui", + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma .scale([ "#282c34", @@ -40,14 +40,14 @@ export const theme: ThemeConfig = { "#c8ccd4", ]) .domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]), - red: colorRamp(chroma(color.red)), - orange: colorRamp(chroma(color.orange)), - yellow: colorRamp(chroma(color.yellow)), - green: colorRamp(chroma(color.green)), - cyan: colorRamp(chroma(color.teal)), - blue: colorRamp(chroma(color.blue)), - violet: colorRamp(chroma(color.purple)), - magenta: colorRamp(chroma("#be5046")), + red: color_ramp(chroma(color.red)), + orange: color_ramp(chroma(color.orange)), + yellow: color_ramp(chroma(color.yellow)), + green: color_ramp(chroma(color.green)), + cyan: color_ramp(chroma(color.teal)), + blue: color_ramp(chroma(color.blue)), + violet: color_ramp(chroma(color.purple)), + magenta: color_ramp(chroma("#be5046")), }, override: { syntax: { @@ -66,7 +66,7 @@ export const theme: ThemeConfig = { property: { color: color.red }, punctuation: { color: color.white }, "punctuation.list_marker": { color: color.red }, - "punctuation.special": { color: color.darkRed }, + "punctuation.special": { color: color.dark_red }, string: { color: color.green }, title: { color: color.red, weight: font_weights.normal }, "text.literal": { color: color.green }, diff --git a/styles/src/themes/one/one-light.ts b/styles/src/themes/one/one-light.ts index e14862f423b67ece038fbd09fd3f651761b0bad6..c3de7826c96679fb1c1f2b1a9d81324687d919b9 100644 --- a/styles/src/themes/one/one-light.ts +++ b/styles/src/themes/one/one-light.ts @@ -1,7 +1,7 @@ import { chroma, font_weights, - colorRamp, + color_ramp, ThemeAppearance, ThemeLicenseType, ThemeConfig, @@ -11,7 +11,7 @@ const color = { black: "#383A41", grey: "#A2A3A7", red: "#D36050", - darkRed: "#B92C46", + dark_red: "#B92C46", orange: "#AD6F26", yellow: "#DFC184", green: "#659F58", @@ -25,11 +25,11 @@ export const theme: ThemeConfig = { name: "One Light", author: "simurai", appearance: ThemeAppearance.Light, - licenseType: ThemeLicenseType.MIT, - licenseUrl: + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/atom/atom/tree/master/packages/one-light-ui", - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma .scale([ "#383A41", @@ -42,14 +42,14 @@ export const theme: ThemeConfig = { "#FAFAFA", ]) .domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]), - red: colorRamp(chroma(color.red)), - orange: colorRamp(chroma(color.orange)), - yellow: colorRamp(chroma(color.yellow)), - green: colorRamp(chroma(color.green)), - cyan: colorRamp(chroma(color.teal)), - blue: colorRamp(chroma(color.blue)), - violet: colorRamp(chroma(color.purple)), - magenta: colorRamp(chroma(color.magenta)), + red: color_ramp(chroma(color.red)), + orange: color_ramp(chroma(color.orange)), + yellow: color_ramp(chroma(color.yellow)), + green: color_ramp(chroma(color.green)), + cyan: color_ramp(chroma(color.teal)), + blue: color_ramp(chroma(color.blue)), + violet: color_ramp(chroma(color.purple)), + magenta: color_ramp(chroma(color.magenta)), }, override: { syntax: { @@ -67,7 +67,7 @@ export const theme: ThemeConfig = { property: { color: color.red }, punctuation: { color: color.black }, "punctuation.list_marker": { color: color.red }, - "punctuation.special": { color: color.darkRed }, + "punctuation.special": { color: color.dark_red }, string: { color: color.green }, title: { color: color.red, weight: font_weights.normal }, "text.literal": { color: color.green }, diff --git a/styles/src/themes/rose-pine/common.ts b/styles/src/themes/rose-pine/common.ts index 30906078ee1f8632099d8bd10f2f6aa5f0d639d2..5c5482a754a634bd2338af2613327554ec36d13c 100644 --- a/styles/src/themes/rose-pine/common.ts +++ b/styles/src/themes/rose-pine/common.ts @@ -14,9 +14,9 @@ export const color = { pine: "#31748f", foam: "#9ccfd8", iris: "#c4a7e7", - highlightLow: "#21202e", - highlightMed: "#403d52", - highlightHigh: "#524f67", + highlight_low: "#21202e", + highlight_med: "#403d52", + highlight_high: "#524f67", }, moon: { base: "#232136", @@ -31,9 +31,9 @@ export const color = { pine: "#3e8fb0", foam: "#9ccfd8", iris: "#c4a7e7", - highlightLow: "#2a283e", - highlightMed: "#44415a", - highlightHigh: "#56526e", + highlight_low: "#2a283e", + highlight_med: "#44415a", + highlight_high: "#56526e", }, dawn: { base: "#faf4ed", @@ -48,9 +48,9 @@ export const color = { pine: "#286983", foam: "#56949f", iris: "#907aa9", - highlightLow: "#f4ede8", - highlightMed: "#dfdad9", - highlightHigh: "#cecacd", + highlight_low: "#f4ede8", + highlight_med: "#dfdad9", + highlight_high: "#cecacd", }, } diff --git a/styles/src/themes/rose-pine/rose-pine-dawn.ts b/styles/src/themes/rose-pine/rose-pine-dawn.ts index 15d7b5de2d3084e43a62dc46dca32951ac027397..c78f1132dd34c2acc339a2f974a3d2087d2da7d6 100644 --- a/styles/src/themes/rose-pine/rose-pine-dawn.ts +++ b/styles/src/themes/rose-pine/rose-pine-dawn.ts @@ -1,6 +1,6 @@ import { chroma, - colorRamp, + color_ramp, ThemeAppearance, ThemeLicenseType, ThemeConfig, @@ -17,16 +17,16 @@ export const theme: ThemeConfig = { name: "Rosé Pine Dawn", author: "edunfelt", appearance: ThemeAppearance.Light, - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/edunfelt/base16-rose-pine-scheme", - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/edunfelt/base16-rose-pine-scheme", + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma .scale( [ color.base, color.surface, - color.highlightHigh, + color.highlight_high, color.overlay, color.muted, color.subtle, @@ -34,14 +34,14 @@ export const theme: ThemeConfig = { ].reverse() ) .domain([0, 0.35, 0.45, 0.65, 0.7, 0.8, 0.9, 1]), - red: colorRamp(chroma(color.love)), - orange: colorRamp(chroma(color.iris)), - yellow: colorRamp(chroma(color.gold)), - green: colorRamp(chroma(green)), - cyan: colorRamp(chroma(color.pine)), - blue: colorRamp(chroma(color.foam)), - violet: colorRamp(chroma(color.iris)), - magenta: colorRamp(chroma(magenta)), + red: color_ramp(chroma(color.love)), + orange: color_ramp(chroma(color.iris)), + yellow: color_ramp(chroma(color.gold)), + green: color_ramp(chroma(green)), + cyan: color_ramp(chroma(color.pine)), + blue: color_ramp(chroma(color.foam)), + violet: color_ramp(chroma(color.iris)), + magenta: color_ramp(chroma(magenta)), }, override: { syntax: syntax(color), diff --git a/styles/src/themes/rose-pine/rose-pine-moon.ts b/styles/src/themes/rose-pine/rose-pine-moon.ts index c5ef0c997f51605273007abc34d1fe4adf37a368..450d6865e7e8ddb193cb97efaae504ea157ade97 100644 --- a/styles/src/themes/rose-pine/rose-pine-moon.ts +++ b/styles/src/themes/rose-pine/rose-pine-moon.ts @@ -1,6 +1,6 @@ import { chroma, - colorRamp, + color_ramp, ThemeAppearance, ThemeLicenseType, ThemeConfig, @@ -17,29 +17,29 @@ export const theme: ThemeConfig = { name: "Rosé Pine Moon", author: "edunfelt", appearance: ThemeAppearance.Dark, - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/edunfelt/base16-rose-pine-scheme", - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/edunfelt/base16-rose-pine-scheme", + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma .scale([ color.base, color.surface, - color.highlightHigh, + color.highlight_high, color.overlay, color.muted, color.subtle, color.text, ]) .domain([0, 0.3, 0.55, 1]), - red: colorRamp(chroma(color.love)), - orange: colorRamp(chroma(color.iris)), - yellow: colorRamp(chroma(color.gold)), - green: colorRamp(chroma(green)), - cyan: colorRamp(chroma(color.pine)), - blue: colorRamp(chroma(color.foam)), - violet: colorRamp(chroma(color.iris)), - magenta: colorRamp(chroma(magenta)), + red: color_ramp(chroma(color.love)), + orange: color_ramp(chroma(color.iris)), + yellow: color_ramp(chroma(color.gold)), + green: color_ramp(chroma(green)), + cyan: color_ramp(chroma(color.pine)), + blue: color_ramp(chroma(color.foam)), + violet: color_ramp(chroma(color.iris)), + magenta: color_ramp(chroma(magenta)), }, override: { syntax: syntax(color), diff --git a/styles/src/themes/rose-pine/rose-pine.ts b/styles/src/themes/rose-pine/rose-pine.ts index 0f3b439338764d6e62df9d4a4a91b9ffc832532f..b305b5b5775fa3a58fb3fabdb8f7add00ab3de83 100644 --- a/styles/src/themes/rose-pine/rose-pine.ts +++ b/styles/src/themes/rose-pine/rose-pine.ts @@ -1,6 +1,6 @@ import { chroma, - colorRamp, + color_ramp, ThemeAppearance, ThemeLicenseType, ThemeConfig, @@ -16,27 +16,27 @@ export const theme: ThemeConfig = { name: "Rosé Pine", author: "edunfelt", appearance: ThemeAppearance.Dark, - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/edunfelt/base16-rose-pine-scheme", - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/edunfelt/base16-rose-pine-scheme", + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ color.base, color.surface, - color.highlightHigh, + color.highlight_high, color.overlay, color.muted, color.subtle, color.text, ]), - red: colorRamp(chroma(color.love)), - orange: colorRamp(chroma(color.iris)), - yellow: colorRamp(chroma(color.gold)), - green: colorRamp(chroma(green)), - cyan: colorRamp(chroma(color.pine)), - blue: colorRamp(chroma(color.foam)), - violet: colorRamp(chroma(color.iris)), - magenta: colorRamp(chroma(magenta)), + red: color_ramp(chroma(color.love)), + orange: color_ramp(chroma(color.iris)), + yellow: color_ramp(chroma(color.gold)), + green: color_ramp(chroma(green)), + cyan: color_ramp(chroma(color.pine)), + blue: color_ramp(chroma(color.foam)), + violet: color_ramp(chroma(color.iris)), + magenta: color_ramp(chroma(magenta)), }, override: { syntax: syntax(color), diff --git a/styles/src/themes/sandcastle/sandcastle.ts b/styles/src/themes/sandcastle/sandcastle.ts index 753828c66579e48d958066defb3a95aa1431d71c..b54c402e475aba8190b48425e1fac370dde2ce45 100644 --- a/styles/src/themes/sandcastle/sandcastle.ts +++ b/styles/src/themes/sandcastle/sandcastle.ts @@ -1,6 +1,6 @@ import { chroma, - colorRamp, + color_ramp, ThemeAppearance, ThemeLicenseType, ThemeConfig, @@ -10,10 +10,10 @@ export const theme: ThemeConfig = { name: "Sandcastle", author: "gessig", appearance: ThemeAppearance.Dark, - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/gessig/base16-sandcastle-scheme", - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/gessig/base16-sandcastle-scheme", + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma.scale([ "#282c34", "#2c323b", @@ -24,14 +24,14 @@ export const theme: ThemeConfig = { "#d5c4a1", "#fdf4c1", ]), - red: colorRamp(chroma("#B4637A")), - orange: colorRamp(chroma("#a07e3b")), - yellow: colorRamp(chroma("#a07e3b")), - green: colorRamp(chroma("#83a598")), - cyan: colorRamp(chroma("#83a598")), - blue: colorRamp(chroma("#528b8b")), - violet: colorRamp(chroma("#d75f5f")), - magenta: colorRamp(chroma("#a87322")), + red: color_ramp(chroma("#B4637A")), + orange: color_ramp(chroma("#a07e3b")), + yellow: color_ramp(chroma("#a07e3b")), + green: color_ramp(chroma("#83a598")), + cyan: color_ramp(chroma("#83a598")), + blue: color_ramp(chroma("#528b8b")), + violet: color_ramp(chroma("#d75f5f")), + magenta: color_ramp(chroma("#a87322")), }, override: { syntax: {} }, } diff --git a/styles/src/themes/solarized/solarized.ts b/styles/src/themes/solarized/solarized.ts index 4084757525cd131933bd6ae874f5cfc1415990fb..05e6f018ab7ac66da4e3eb114d26d82238001488 100644 --- a/styles/src/themes/solarized/solarized.ts +++ b/styles/src/themes/solarized/solarized.ts @@ -1,6 +1,6 @@ import { chroma, - colorRamp, + color_ramp, ThemeAppearance, ThemeLicenseType, ThemeConfig, @@ -19,24 +19,24 @@ const ramps = { "#fdf6e3", ]) .domain([0, 0.2, 0.38, 0.45, 0.65, 0.7, 0.85, 1]), - red: colorRamp(chroma("#dc322f")), - orange: colorRamp(chroma("#cb4b16")), - yellow: colorRamp(chroma("#b58900")), - green: colorRamp(chroma("#859900")), - cyan: colorRamp(chroma("#2aa198")), - blue: colorRamp(chroma("#268bd2")), - violet: colorRamp(chroma("#6c71c4")), - magenta: colorRamp(chroma("#d33682")), + red: color_ramp(chroma("#dc322f")), + orange: color_ramp(chroma("#cb4b16")), + yellow: color_ramp(chroma("#b58900")), + green: color_ramp(chroma("#859900")), + cyan: color_ramp(chroma("#2aa198")), + blue: color_ramp(chroma("#268bd2")), + violet: color_ramp(chroma("#6c71c4")), + magenta: color_ramp(chroma("#d33682")), } export const dark: ThemeConfig = { name: "Solarized Dark", author: "Ethan Schoonover", appearance: ThemeAppearance.Dark, - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/altercation/solarized", - licenseFile: `${__dirname}/LICENSE`, - inputColor: ramps, + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/altercation/solarized", + license_file: `${__dirname}/LICENSE`, + input_color: ramps, override: { syntax: {} }, } @@ -44,9 +44,9 @@ export const light: ThemeConfig = { name: "Solarized Light", author: "Ethan Schoonover", appearance: ThemeAppearance.Light, - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/altercation/solarized", - licenseFile: `${__dirname}/LICENSE`, - inputColor: ramps, + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/altercation/solarized", + license_file: `${__dirname}/LICENSE`, + input_color: ramps, override: { syntax: {} }, } diff --git a/styles/src/themes/summercamp/summercamp.ts b/styles/src/themes/summercamp/summercamp.ts index 08098d2e2fd009e8858d8967d6714800dd8d656a..f9037feae49aaee1007f2694ea8620139d414a59 100644 --- a/styles/src/themes/summercamp/summercamp.ts +++ b/styles/src/themes/summercamp/summercamp.ts @@ -1,6 +1,6 @@ import { chroma, - colorRamp, + color_ramp, ThemeAppearance, ThemeLicenseType, ThemeConfig, @@ -10,10 +10,10 @@ export const theme: ThemeConfig = { name: "Summercamp", author: "zoefiri", appearance: ThemeAppearance.Dark, - licenseType: ThemeLicenseType.MIT, - licenseUrl: "https://github.com/zoefiri/base16-sc", - licenseFile: `${__dirname}/LICENSE`, - inputColor: { + license_type: ThemeLicenseType.MIT, + license_url: "https://github.com/zoefiri/base16-sc", + license_file: `${__dirname}/LICENSE`, + input_color: { neutral: chroma .scale([ "#1c1810", @@ -26,14 +26,14 @@ export const theme: ThemeConfig = { "#f8f5de", ]) .domain([0, 0.2, 0.38, 0.4, 0.65, 0.7, 0.85, 1]), - red: colorRamp(chroma("#e35142")), - orange: colorRamp(chroma("#fba11b")), - yellow: colorRamp(chroma("#f2ff27")), - green: colorRamp(chroma("#5ceb5a")), - cyan: colorRamp(chroma("#5aebbc")), - blue: colorRamp(chroma("#489bf0")), - violet: colorRamp(chroma("#FF8080")), - magenta: colorRamp(chroma("#F69BE7")), + red: color_ramp(chroma("#e35142")), + orange: color_ramp(chroma("#fba11b")), + yellow: color_ramp(chroma("#f2ff27")), + green: color_ramp(chroma("#5ceb5a")), + cyan: color_ramp(chroma("#5aebbc")), + blue: color_ramp(chroma("#489bf0")), + violet: color_ramp(chroma("#FF8080")), + magenta: color_ramp(chroma("#F69BE7")), }, override: { syntax: {} }, } diff --git a/styles/src/utils/snake_case.ts b/styles/src/utils/snake_case.ts index cdd9684752826c5606b0e0273b5286bca57c85e0..38c8a90a9e864177dcea255fa5b87a87da5a9607 100644 --- a/styles/src/utils/snake_case.ts +++ b/styles/src/utils/snake_case.ts @@ -5,8 +5,8 @@ import { snakeCase } from "case-anything" // Typescript magic to convert any string from camelCase to snake_case at compile time type SnakeCase = S extends string ? S extends `${infer T}${infer U}` - ? `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` - : S + ? `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` + : S : S type SnakeCased = { From 0627c198fd26e3862ff6dc64f8ff86f7dc735689 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 29 Jun 2023 10:57:19 -0400 Subject: [PATCH 08/13] WIP snake_case 4/? --- styles/src/component/icon_button.ts | 6 +- styles/src/component/text_button.ts | 6 +- styles/src/element/interactive.test.ts | 18 ++-- styles/src/style_tree/assistant.ts | 84 ++++++++-------- styles/src/style_tree/command_palette.ts | 14 ++- styles/src/style_tree/contact_finder.ts | 22 ++--- styles/src/style_tree/contact_list.ts | 44 ++++----- styles/src/style_tree/contact_notification.ts | 17 ++-- styles/src/style_tree/editor.ts | 96 +++++++++---------- styles/src/style_tree/feedback.ts | 28 +++--- styles/src/style_tree/hover_popover.ts | 45 +++++---- .../style_tree/incoming_call_notification.ts | 49 +++++----- styles/src/style_tree/picker.ts | 61 ++++++------ styles/src/style_tree/project_diagnostics.ts | 11 +-- styles/src/style_tree/project_panel.ts | 90 +++++++++-------- .../style_tree/project_shared_notification.ts | 48 +++++----- styles/src/style_tree/search.ts | 88 +++++++++-------- styles/src/style_tree/shared_screen.ts | 5 +- .../style_tree/simple_message_notification.ts | 37 ++++--- styles/src/style_tree/status_bar.ts | 78 +++++++-------- styles/src/style_tree/tab_bar.ts | 4 +- styles/src/style_tree/titlebar.ts | 4 +- styles/src/style_tree/welcome.ts | 4 +- styles/src/style_tree/workspace.ts | 14 +-- styles/src/theme/color.ts | 2 +- 25 files changed, 428 insertions(+), 447 deletions(-) diff --git a/styles/src/component/icon_button.ts b/styles/src/component/icon_button.ts index 79891c2477809a1312c968241ee833b62f0922cd..4664928d555dce2a07b2e2d1afb1ed7f3f4fcc6b 100644 --- a/styles/src/component/icon_button.ts +++ b/styles/src/component/icon_button.ts @@ -11,9 +11,9 @@ export type Margin = { interface IconButtonOptions { layer?: - | ColorScheme["lowest"] - | ColorScheme["middle"] - | ColorScheme["highest"] + | ColorScheme["lowest"] + | ColorScheme["middle"] + | ColorScheme["highest"] color?: keyof ColorScheme["lowest"] margin?: Partial } diff --git a/styles/src/component/text_button.ts b/styles/src/component/text_button.ts index 477c2515e320d5e1d4ac2b2cdaf7f8dd587cdde8..64a91de7b0424945e153563d36a012380796add1 100644 --- a/styles/src/component/text_button.ts +++ b/styles/src/component/text_button.ts @@ -10,9 +10,9 @@ import { Margin } from "./icon_button" interface TextButtonOptions { layer?: - | ColorScheme["lowest"] - | ColorScheme["middle"] - | ColorScheme["highest"] + | ColorScheme["lowest"] + | ColorScheme["middle"] + | ColorScheme["highest"] color?: keyof ColorScheme["lowest"] margin?: Partial text_properties?: TextProperties diff --git a/styles/src/element/interactive.test.ts b/styles/src/element/interactive.test.ts index b0cc57875f4249e0700cc4f28c7e93a34cec49dc..0e0013fc071ae36e8c80513b56b9cb7d12764ee8 100644 --- a/styles/src/element/interactive.test.ts +++ b/styles/src/element/interactive.test.ts @@ -8,7 +8,7 @@ import { describe, it, expect } from "vitest" describe("interactive", () => { it("creates an Interactive with base properties and states", () => { const result = interactive({ - base: { fontSize: 10, color: "#FFFFFF" }, + base: { font_size: 10, color: "#FFFFFF" }, state: { hovered: { color: "#EEEEEE" }, clicked: { color: "#CCCCCC" }, @@ -16,25 +16,25 @@ describe("interactive", () => { }) expect(result).toEqual({ - default: { color: "#FFFFFF", fontSize: 10 }, - hovered: { color: "#EEEEEE", fontSize: 10 }, - clicked: { color: "#CCCCCC", fontSize: 10 }, + default: { color: "#FFFFFF", font_size: 10 }, + hovered: { color: "#EEEEEE", font_size: 10 }, + clicked: { color: "#CCCCCC", font_size: 10 }, }) }) it("creates an Interactive with no base properties", () => { const result = interactive({ state: { - default: { color: "#FFFFFF", fontSize: 10 }, + default: { color: "#FFFFFF", font_size: 10 }, hovered: { color: "#EEEEEE" }, clicked: { color: "#CCCCCC" }, }, }) expect(result).toEqual({ - default: { color: "#FFFFFF", fontSize: 10 }, - hovered: { color: "#EEEEEE", fontSize: 10 }, - clicked: { color: "#CCCCCC", fontSize: 10 }, + default: { color: "#FFFFFF", font_size: 10 }, + hovered: { color: "#EEEEEE", font_size: 10 }, + clicked: { color: "#CCCCCC", font_size: 10 }, }) }) @@ -48,7 +48,7 @@ describe("interactive", () => { it("throws error when no other state besides default is present", () => { const state = { - default: { fontSize: 10 }, + default: { font_size: 10 }, } expect(() => interactive({ state })).toThrow(NOT_ENOUGH_STATES_ERROR) diff --git a/styles/src/style_tree/assistant.ts b/styles/src/style_tree/assistant.ts index fbbfbc4cf1cb5f0a487830247294b692dbe96434..1f14d65c8ece43db23b17fa6fec11b5987acb775 100644 --- a/styles/src/style_tree/assistant.ts +++ b/styles/src/style_tree/assistant.ts @@ -1,23 +1,21 @@ import { ColorScheme } from "../theme/color_scheme" import { text, border, background, foreground } from "./components" -import editor from "./editor" import { interactive } from "../element" -export default function assistant(colorScheme: ColorScheme): any { - const layer = colorScheme.highest +export default function assistant(theme: ColorScheme): any { return { container: { - background: editor(colorScheme).background, + background: background(theme.highest), padding: { left: 12 }, }, message_header: { margin: { bottom: 6, top: 6 }, - background: editor(colorScheme).background, + background: background(theme.highest), }, hamburger_button: interactive({ base: { icon: { - color: foreground(layer, "variant"), + color: foreground(theme.highest, "variant"), asset: "icons/hamburger_15.svg", dimensions: { width: 15, @@ -31,7 +29,7 @@ export default function assistant(colorScheme: ColorScheme): any { state: { hovered: { icon: { - color: foreground(layer, "hovered"), + color: foreground(theme.highest, "hovered"), }, }, }, @@ -39,7 +37,7 @@ export default function assistant(colorScheme: ColorScheme): any { split_button: interactive({ base: { icon: { - color: foreground(layer, "variant"), + color: foreground(theme.highest, "variant"), asset: "icons/split_message_15.svg", dimensions: { width: 15, @@ -53,7 +51,7 @@ export default function assistant(colorScheme: ColorScheme): any { state: { hovered: { icon: { - color: foreground(layer, "hovered"), + color: foreground(theme.highest, "hovered"), }, }, }, @@ -61,7 +59,7 @@ export default function assistant(colorScheme: ColorScheme): any { quote_button: interactive({ base: { icon: { - color: foreground(layer, "variant"), + color: foreground(theme.highest, "variant"), asset: "icons/quote_15.svg", dimensions: { width: 15, @@ -75,7 +73,7 @@ export default function assistant(colorScheme: ColorScheme): any { state: { hovered: { icon: { - color: foreground(layer, "hovered"), + color: foreground(theme.highest, "hovered"), }, }, }, @@ -83,7 +81,7 @@ export default function assistant(colorScheme: ColorScheme): any { assist_button: interactive({ base: { icon: { - color: foreground(layer, "variant"), + color: foreground(theme.highest, "variant"), asset: "icons/assist_15.svg", dimensions: { width: 15, @@ -97,7 +95,7 @@ export default function assistant(colorScheme: ColorScheme): any { state: { hovered: { icon: { - color: foreground(layer, "hovered"), + color: foreground(theme.highest, "hovered"), }, }, }, @@ -105,7 +103,7 @@ export default function assistant(colorScheme: ColorScheme): any { zoom_in_button: interactive({ base: { icon: { - color: foreground(layer, "variant"), + color: foreground(theme.highest, "variant"), asset: "icons/maximize_8.svg", dimensions: { width: 12, @@ -119,7 +117,7 @@ export default function assistant(colorScheme: ColorScheme): any { state: { hovered: { icon: { - color: foreground(layer, "hovered"), + color: foreground(theme.highest, "hovered"), }, }, }, @@ -127,7 +125,7 @@ export default function assistant(colorScheme: ColorScheme): any { zoom_out_button: interactive({ base: { icon: { - color: foreground(layer, "variant"), + color: foreground(theme.highest, "variant"), asset: "icons/minimize_8.svg", dimensions: { width: 12, @@ -141,7 +139,7 @@ export default function assistant(colorScheme: ColorScheme): any { state: { hovered: { icon: { - color: foreground(layer, "hovered"), + color: foreground(theme.highest, "hovered"), }, }, }, @@ -149,7 +147,7 @@ export default function assistant(colorScheme: ColorScheme): any { plus_button: interactive({ base: { icon: { - color: foreground(layer, "variant"), + color: foreground(theme.highest, "variant"), asset: "icons/plus_12.svg", dimensions: { width: 12, @@ -163,33 +161,33 @@ export default function assistant(colorScheme: ColorScheme): any { state: { hovered: { icon: { - color: foreground(layer, "hovered"), + color: foreground(theme.highest, "hovered"), }, }, }, }), title: { - ...text(layer, "sans", "default", { size: "sm" }), + ...text(theme.highest, "sans", "default", { size: "sm" }), }, saved_conversation: { container: interactive({ base: { - background: background(layer, "on"), + background: background(theme.highest, "on"), padding: { top: 4, bottom: 4 }, }, state: { hovered: { - background: background(layer, "on", "hovered"), + background: background(theme.highest, "on", "hovered"), }, }, }), savedAt: { margin: { left: 8 }, - ...text(layer, "sans", "default", { size: "xs" }), + ...text(theme.highest, "sans", "default", { size: "xs" }), }, title: { margin: { left: 16 }, - ...text(layer, "sans", "default", { + ...text(theme.highest, "sans", "default", { size: "sm", weight: "bold", }), @@ -197,7 +195,7 @@ export default function assistant(colorScheme: ColorScheme): any { }, user_sender: { default: { - ...text(layer, "sans", "default", { + ...text(theme.highest, "sans", "default", { size: "sm", weight: "bold", }), @@ -205,7 +203,7 @@ export default function assistant(colorScheme: ColorScheme): any { }, assistant_sender: { default: { - ...text(layer, "sans", "accent", { + ...text(theme.highest, "sans", "accent", { size: "sm", weight: "bold", }), @@ -213,7 +211,7 @@ export default function assistant(colorScheme: ColorScheme): any { }, system_sender: { default: { - ...text(layer, "sans", "variant", { + ...text(theme.highest, "sans", "variant", { size: "sm", weight: "bold", }), @@ -221,51 +219,51 @@ export default function assistant(colorScheme: ColorScheme): any { }, sent_at: { margin: { top: 2, left: 8 }, - ...text(layer, "sans", "default", { size: "2xs" }), + ...text(theme.highest, "sans", "default", { size: "2xs" }), }, model: interactive({ base: { - background: background(layer, "on"), + background: background(theme.highest, "on"), margin: { left: 12, right: 12, top: 12 }, padding: 4, corner_radius: 4, - ...text(layer, "sans", "default", { size: "xs" }), + ...text(theme.highest, "sans", "default", { size: "xs" }), }, state: { hovered: { - background: background(layer, "on", "hovered"), - border: border(layer, "on", { overlay: true }), + background: background(theme.highest, "on", "hovered"), + border: border(theme.highest, "on", { overlay: true }), }, }, }), remaining_tokens: { - background: background(layer, "on"), + background: background(theme.highest, "on"), margin: { top: 12, right: 24 }, padding: 4, corner_radius: 4, - ...text(layer, "sans", "positive", { size: "xs" }), + ...text(theme.highest, "sans", "positive", { size: "xs" }), }, no_remaining_tokens: { - background: background(layer, "on"), + background: background(theme.highest, "on"), margin: { top: 12, right: 24 }, padding: 4, corner_radius: 4, - ...text(layer, "sans", "negative", { size: "xs" }), + ...text(theme.highest, "sans", "negative", { size: "xs" }), }, error_icon: { margin: { left: 8 }, - color: foreground(layer, "negative"), + color: foreground(theme.highest, "negative"), width: 12, }, api_key_editor: { - background: background(layer, "on"), + background: background(theme.highest, "on"), corner_radius: 6, - text: text(layer, "mono", "on"), - placeholderText: text(layer, "mono", "on", "disabled", { + text: text(theme.highest, "mono", "on"), + placeholder_text: text(theme.highest, "mono", "on", "disabled", { size: "xs", }), - selection: colorScheme.players[0], - border: border(layer, "on"), + selection: theme.players[0], + border: border(theme.highest, "on"), padding: { bottom: 4, left: 8, @@ -275,7 +273,7 @@ export default function assistant(colorScheme: ColorScheme): any { }, api_key_prompt: { padding: 10, - ...text(layer, "sans", "default", { size: "xs" }), + ...text(theme.highest, "sans", "default", { size: "xs" }), }, } } diff --git a/styles/src/style_tree/command_palette.ts b/styles/src/style_tree/command_palette.ts index 9198f87299dcd7deab443556416296e667175683..ca9daad95b1d43b829d006a10f9e3899329adabc 100644 --- a/styles/src/style_tree/command_palette.ts +++ b/styles/src/style_tree/command_palette.ts @@ -1,16 +1,14 @@ import { ColorScheme } from "../theme/color_scheme" -import { withOpacity } from "../theme/color" +import { with_opacity } from "../theme/color" import { text, background } from "./components" import { toggleable } from "../element" -export default function command_palette(colorScheme: ColorScheme): any { - const layer = colorScheme.highest - +export default function command_palette(theme: ColorScheme): any { const key = toggleable({ base: { - text: text(layer, "mono", "variant", "default", { size: "xs" }), + text: text(theme.highest, "mono", "variant", "default", { size: "xs" }), corner_radius: 2, - background: background(layer, "on"), + background: background(theme.highest, "on"), padding: { top: 1, bottom: 1, @@ -25,8 +23,8 @@ export default function command_palette(colorScheme: ColorScheme): any { }, state: { active: { - text: text(layer, "mono", "on", "default", { size: "xs" }), - background: withOpacity(background(layer, "on"), 0.2), + text: text(theme.highest, "mono", "on", "default", { size: "xs" }), + background: with_opacity(background(theme.highest, "on"), 0.2), }, }, }) diff --git a/styles/src/style_tree/contact_finder.ts b/styles/src/style_tree/contact_finder.ts index f68ce06d3546112bf8979365ac5a72e6843aa5c1..9f02d450d93d7bc2e8bd9d86535ef82b602a7384 100644 --- a/styles/src/style_tree/contact_finder.ts +++ b/styles/src/style_tree/contact_finder.ts @@ -3,12 +3,10 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, text } from "./components" export default function contact_finder(theme: ColorScheme): any { - const layer = theme.middle - const side_margin = 6 const contact_button = { - background: background(layer, "variant"), - color: foreground(layer, "variant"), + background: background(theme.middle, "variant"), + color: foreground(theme.middle, "variant"), icon_width: 8, button_width: 16, corner_radius: 8, @@ -16,12 +14,12 @@ export default function contact_finder(theme: ColorScheme): any { const picker_style = picker(theme) const picker_input = { - background: background(layer, "on"), + background: background(theme.middle, "on"), corner_radius: 6, - text: text(layer, "mono"), - placeholder_text: text(layer, "mono", "on", "disabled", { size: "xs" }), + text: text(theme.middle, "mono"), + placeholder_text: text(theme.middle, "mono", "on", "disabled", { size: "xs" }), selection: theme.players[0], - border: border(layer), + border: border(theme.middle), padding: { bottom: 4, left: 8, @@ -41,7 +39,7 @@ export default function contact_finder(theme: ColorScheme): any { ...picker_style.item, margin: { left: side_margin, right: side_margin }, }, - no_matches: picker_style.noMatches, + no_matches: picker_style.no_matches, input_editor: picker_input, empty_input_editor: picker_input, }, @@ -58,13 +56,13 @@ export default function contact_finder(theme: ColorScheme): any { contact_button: { ...contact_button, hover: { - background: background(layer, "variant", "hovered"), + background: background(theme.middle, "variant", "hovered"), }, }, disabled_contact_button: { ...contact_button, - background: background(layer, "disabled"), - color: foreground(layer, "disabled"), + background: background(theme.middle, "disabled"), + color: foreground(theme.middle, "disabled"), }, } } diff --git a/styles/src/style_tree/contact_list.ts b/styles/src/style_tree/contact_list.ts index b3b89b7e428ac51be854d263e142dcb6c2191986..93f88e2d4afe4df10a943b5d8e04b42d15160e69 100644 --- a/styles/src/style_tree/contact_list.ts +++ b/styles/src/style_tree/contact_list.ts @@ -8,19 +8,19 @@ import { } from "./components" import { interactive, toggleable } from "../element" export default function contacts_panel(theme: ColorScheme): any { - const nameMargin = 8 - const sidePadding = 12 + const name_margin = 8 + const side_padding = 12 const layer = theme.middle - const contactButton = { + const contact_button = { background: background(layer, "on"), color: foreground(layer, "on"), icon_width: 8, button_width: 16, corner_radius: 8, } - const projectRow = { + const project_row = { guest_avatar_spacing: 4, height: 24, guest_avatar: { @@ -30,19 +30,19 @@ export default function contacts_panel(theme: ColorScheme): any { name: { ...text(layer, "mono", { size: "sm" }), margin: { - left: nameMargin, + left: name_margin, right: 6, }, }, guests: { margin: { - left: nameMargin, - right: nameMargin, + left: name_margin, + right: name_margin, }, }, padding: { - left: sidePadding, - right: sidePadding, + left: side_padding, + right: side_padding, }, } @@ -83,8 +83,8 @@ export default function contacts_panel(theme: ColorScheme): any { ...text(layer, "mono", { size: "sm" }), margin: { top: 14 }, padding: { - left: sidePadding, - right: sidePadding, + left: side_padding, + right: side_padding, }, background: background(layer, "default"), // posiewic: breaking change }, @@ -140,8 +140,8 @@ export default function contacts_panel(theme: ColorScheme): any { inactive: { default: { padding: { - left: sidePadding, - right: sidePadding, + left: side_padding, + right: side_padding, }, }, }, @@ -149,8 +149,8 @@ export default function contacts_panel(theme: ColorScheme): any { default: { background: background(layer, "active"), padding: { - left: sidePadding, - right: sidePadding, + left: side_padding, + right: side_padding, }, }, }, @@ -174,12 +174,12 @@ export default function contacts_panel(theme: ColorScheme): any { contact_username: { ...text(layer, "mono", { size: "sm" }), margin: { - left: nameMargin, + left: name_margin, }, }, - contact_button_spacing: nameMargin, + contact_button_spacing: name_margin, contact_button: interactive({ - base: { ...contactButton }, + base: { ...contact_button }, state: { hovered: { background: background(layer, "hovered"), @@ -187,7 +187,7 @@ export default function contacts_panel(theme: ColorScheme): any { }, }), disabled_button: { - ...contactButton, + ...contact_button, background: background(layer, "on"), color: foreground(layer, "on"), }, @@ -217,15 +217,15 @@ export default function contacts_panel(theme: ColorScheme): any { project_row: toggleable({ base: interactive({ base: { - ...projectRow, + ...project_row, background: background(layer), icon: { - margin: { left: nameMargin }, + margin: { left: name_margin }, color: foreground(layer, "variant"), width: 12, }, name: { - ...projectRow.name, + ...project_row.name, ...text(layer, "mono", { size: "sm" }), }, }, diff --git a/styles/src/style_tree/contact_notification.ts b/styles/src/style_tree/contact_notification.ts index 71467f6584493a44bea86e68cd5880dc7bcd692e..8de5496d91e41d054e5f2eee29f08cc7e0c31054 100644 --- a/styles/src/style_tree/contact_notification.ts +++ b/styles/src/style_tree/contact_notification.ts @@ -1,24 +1,25 @@ import { ColorScheme } from "../theme/color_scheme" import { background, foreground, text } from "./components" import { interactive } from "../element" -const avatarSize = 12 -const headerPadding = 8 export default function contact_notification(theme: ColorScheme): any { + const avatar_size = 12 + const header_padding = 8 + return { header_avatar: { - height: avatarSize, - width: avatarSize, + height: avatar_size, + width: avatar_size, corner_radius: 6, }, header_message: { ...text(theme.lowest, "sans", { size: "xs" }), - margin: { left: headerPadding, right: headerPadding }, + margin: { left: header_padding, right: header_padding }, }, header_height: 18, body_message: { ...text(theme.lowest, "sans", { size: "xs" }), - margin: { left: avatarSize + headerPadding, top: 6, bottom: 6 }, + margin: { left: avatar_size + header_padding, top: 6, bottom: 6 }, }, button: interactive({ base: { @@ -40,9 +41,9 @@ export default function contact_notification(theme: ColorScheme): any { default: { color: foreground(theme.lowest, "variant"), icon_width: 8, - iconHeight: 8, + icon_height: 8, button_width: 8, - buttonHeight: 8, + button_height: 8, hover: { color: foreground(theme.lowest, "hovered"), }, diff --git a/styles/src/style_tree/editor.ts b/styles/src/style_tree/editor.ts index 95760ce1d0228c28e93cd7fc0c6993d75de1d8c9..67e67e0cf0a3c7cea7454df486acd1c159669ac5 100644 --- a/styles/src/style_tree/editor.ts +++ b/styles/src/style_tree/editor.ts @@ -1,4 +1,4 @@ -import { withOpacity } from "../theme/color" +import { with_opacity } from "../theme/color" import { ColorScheme, Layer, StyleSets } from "../theme/color_scheme" import { background, @@ -27,7 +27,7 @@ export default function editor(theme: ColorScheme): any { }, } - function diagnostic(layer: Layer, styleSet: StyleSets) { + function diagnostic(layer: Layer, style_set: StyleSets) { return { text_scale_factor: 0.857, header: { @@ -36,8 +36,8 @@ export default function editor(theme: ColorScheme): any { }), }, message: { - text: text(layer, "sans", styleSet, "default", { size: "sm" }), - highlight_text: text(layer, "sans", styleSet, "default", { + text: text(layer, "sans", style_set, "default", { size: "sm" }), + highlight_text: text(layer, "sans", style_set, "default", { size: "sm", weight: "bold", }), @@ -50,7 +50,7 @@ export default function editor(theme: ColorScheme): any { return { text_color: syntax.primary.color, background: background(layer), - active_line_background: withOpacity(background(layer, "on"), 0.75), + active_line_background: with_opacity(background(layer, "on"), 0.75), highlighted_line_background: background(layer, "on"), // Inline autocomplete suggestions, Co-pilot suggestions, etc. suggestion: syntax.predictive, @@ -133,7 +133,7 @@ export default function editor(theme: ColorScheme): any { }, }, }, - foldBackground: foreground(layer, "variant"), + fold_background: foreground(layer, "variant"), }, diff: { deleted: is_light @@ -145,31 +145,31 @@ export default function editor(theme: ColorScheme): any { inserted: is_light ? theme.ramps.green(0.4).hex() : theme.ramps.green(0.5).hex(), - removedWidthEm: 0.275, - widthEm: 0.15, + removed_width_em: 0.275, + width_em: 0.15, corner_radius: 0.05, }, /** Highlights matching occurrences of what is under the cursor * as well as matched brackets */ - documentHighlightReadBackground: withOpacity( + document_highlight_read_background: with_opacity( foreground(layer, "accent"), 0.1 ), - documentHighlightWriteBackground: theme.ramps + document_highlight_write_background: theme.ramps .neutral(0.5) .alpha(0.4) .hex(), // TODO: This was blend * 2 - errorColor: background(layer, "negative"), - gutterBackground: background(layer), - gutterPaddingFactor: 3.5, - lineNumber: withOpacity(foreground(layer), 0.35), - lineNumberActive: foreground(layer), - renameFade: 0.6, - unnecessaryCodeFade: 0.5, + error_color: background(layer, "negative"), + gutter_background: background(layer), + gutter_padding_factor: 3.5, + line_number: with_opacity(foreground(layer), 0.35), + line_number_active: foreground(layer), + rename_fade: 0.6, + unnecessary_code_fade: 0.5, selection: theme.players[0], whitespace: theme.ramps.neutral(0.5).hex(), - guestSelections: [ + guest_selections: [ theme.players[1], theme.players[2], theme.players[3], @@ -187,20 +187,20 @@ export default function editor(theme: ColorScheme): any { }, border: border(theme.middle), shadow: theme.popover_shadow, - matchHighlight: foreground(theme.middle, "accent"), + match_highlight: foreground(theme.middle, "accent"), item: autocomplete_item, - hoveredItem: { + hovered_item: { ...autocomplete_item, - matchHighlight: foreground( + match_highlight: foreground( theme.middle, "accent", "hovered" ), background: background(theme.middle, "hovered"), }, - selectedItem: { + selected_item: { ...autocomplete_item, - matchHighlight: foreground( + match_highlight: foreground( theme.middle, "accent", "active" @@ -208,10 +208,10 @@ export default function editor(theme: ColorScheme): any { background: background(theme.middle, "active"), }, }, - diagnosticHeader: { + diagnostic_header: { background: background(theme.middle), - icon_widthFactor: 1.5, - textScaleFactor: 0.857, + icon_width_factor: 1.5, + text_scale_factor: 0.857, border: border(theme.middle, { bottom: true, top: true, @@ -229,16 +229,16 @@ export default function editor(theme: ColorScheme): any { }), }, message: { - highlightText: text(theme.middle, "sans", { + highlight_text: text(theme.middle, "sans", { size: "sm", weight: "bold", }), text: text(theme.middle, "sans", { size: "sm" }), }, }, - diagnosticPathHeader: { + diagnostic_path_header: { background: background(theme.middle), - textScaleFactor: 0.857, + text_scale_factor: 0.857, filename: text(theme.middle, "mono", { size: "sm" }), path: { ...text(theme.middle, "mono", { size: "sm" }), @@ -247,20 +247,20 @@ export default function editor(theme: ColorScheme): any { }, }, }, - errorDiagnostic: diagnostic(theme.middle, "negative"), - warningDiagnostic: diagnostic(theme.middle, "warning"), - informationDiagnostic: diagnostic(theme.middle, "accent"), - hintDiagnostic: diagnostic(theme.middle, "warning"), - invalidErrorDiagnostic: diagnostic(theme.middle, "base"), - invalidHintDiagnostic: diagnostic(theme.middle, "base"), - invalidInformationDiagnostic: diagnostic(theme.middle, "base"), - invalidWarningDiagnostic: diagnostic(theme.middle, "base"), + error_diagnostic: diagnostic(theme.middle, "negative"), + warning_diagnostic: diagnostic(theme.middle, "warning"), + information_diagnostic: diagnostic(theme.middle, "accent"), + hint_diagnostic: diagnostic(theme.middle, "warning"), + invalid_error_diagnostic: diagnostic(theme.middle, "base"), + invalid_hint_diagnostic: diagnostic(theme.middle, "base"), + invalid_information_diagnostic: diagnostic(theme.middle, "base"), + invalid_warning_diagnostic: diagnostic(theme.middle, "base"), hover_popover: hover_popover(theme), - linkDefinition: { + link_definition: { color: syntax.link_uri.color, underline: syntax.link_uri.underline, }, - jumpIcon: interactive({ + jump_icon: interactive({ base: { color: foreground(layer, "on"), icon_width: 20, @@ -282,12 +282,12 @@ export default function editor(theme: ColorScheme): any { scrollbar: { width: 12, - minHeightFactor: 1.0, + min_height_factor: 1.0, track: { border: border(layer, "variant", { left: true }), }, thumb: { - background: withOpacity(background(layer, "inverted"), 0.3), + background: with_opacity(background(layer, "inverted"), 0.3), border: { width: 1, color: border_color(layer, "variant"), @@ -299,17 +299,17 @@ export default function editor(theme: ColorScheme): any { }, git: { deleted: is_light - ? withOpacity(theme.ramps.red(0.5).hex(), 0.8) - : withOpacity(theme.ramps.red(0.4).hex(), 0.8), + ? with_opacity(theme.ramps.red(0.5).hex(), 0.8) + : with_opacity(theme.ramps.red(0.4).hex(), 0.8), modified: is_light - ? withOpacity(theme.ramps.yellow(0.5).hex(), 0.8) - : withOpacity(theme.ramps.yellow(0.4).hex(), 0.8), + ? with_opacity(theme.ramps.yellow(0.5).hex(), 0.8) + : with_opacity(theme.ramps.yellow(0.4).hex(), 0.8), inserted: is_light - ? withOpacity(theme.ramps.green(0.5).hex(), 0.8) - : withOpacity(theme.ramps.green(0.4).hex(), 0.8), + ? with_opacity(theme.ramps.green(0.5).hex(), 0.8) + : with_opacity(theme.ramps.green(0.4).hex(), 0.8), }, }, - compositionMark: { + composition_mark: { underline: { thickness: 1.0, color: border_color(layer), diff --git a/styles/src/style_tree/feedback.ts b/styles/src/style_tree/feedback.ts index 040c8994be10b05395c668adb09e63600122be22..ab3a40c148b54a1fd7a0a672df258707cd7f3aab 100644 --- a/styles/src/style_tree/feedback.ts +++ b/styles/src/style_tree/feedback.ts @@ -2,16 +2,14 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, text } from "./components" import { interactive } from "../element" -export default function feedback(colorScheme: ColorScheme): any { - const layer = colorScheme.highest - +export default function feedback(theme: ColorScheme): any { return { submit_button: interactive({ base: { - ...text(layer, "mono", "on"), - background: background(layer, "on"), + ...text(theme.highest, "mono", "on"), + background: background(theme.highest, "on"), corner_radius: 6, - border: border(layer, "on"), + border: border(theme.highest, "on"), margin: { right: 4, }, @@ -24,24 +22,24 @@ export default function feedback(colorScheme: ColorScheme): any { }, state: { clicked: { - ...text(layer, "mono", "on", "pressed"), - background: background(layer, "on", "pressed"), - border: border(layer, "on", "pressed"), + ...text(theme.highest, "mono", "on", "pressed"), + background: background(theme.highest, "on", "pressed"), + border: border(theme.highest, "on", "pressed"), }, hovered: { - ...text(layer, "mono", "on", "hovered"), - background: background(layer, "on", "hovered"), - border: border(layer, "on", "hovered"), + ...text(theme.highest, "mono", "on", "hovered"), + background: background(theme.highest, "on", "hovered"), + border: border(theme.highest, "on", "hovered"), }, }, }), button_margin: 8, - info_text_default: text(layer, "sans", "default", { size: "xs" }), - link_text_default: text(layer, "sans", "default", { + info_text_default: text(theme.highest, "sans", "default", { size: "xs" }), + link_text_default: text(theme.highest, "sans", "default", { size: "xs", underline: true, }), - link_text_hover: text(layer, "sans", "hovered", { + link_text_hover: text(theme.highest, "sans", "hovered", { size: "xs", underline: true, }), diff --git a/styles/src/style_tree/hover_popover.ts b/styles/src/style_tree/hover_popover.ts index 28f5b1740018e162ba0741e400e76cbc554b1fc8..e9a008b3c61426aaeb79beea37872cf56ed8388e 100644 --- a/styles/src/style_tree/hover_popover.ts +++ b/styles/src/style_tree/hover_popover.ts @@ -1,10 +1,9 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, text } from "./components" -export default function hover_popover(colorScheme: ColorScheme): any { - const layer = colorScheme.middle - const baseContainer = { - background: background(layer), +export default function hover_popover(theme: ColorScheme): any { + const base_container = { + background: background(theme.middle), corner_radius: 8, padding: { left: 8, @@ -12,35 +11,35 @@ export default function hover_popover(colorScheme: ColorScheme): any { top: 4, bottom: 4, }, - shadow: colorScheme.popover_shadow, - border: border(layer), + shadow: theme.popover_shadow, + border: border(theme.middle), margin: { left: -8, }, } return { - container: baseContainer, - infoContainer: { - ...baseContainer, - background: background(layer, "accent"), - border: border(layer, "accent"), + container: base_container, + info_container: { + ...base_container, + background: background(theme.middle, "accent"), + border: border(theme.middle, "accent"), }, - warningContainer: { - ...baseContainer, - background: background(layer, "warning"), - border: border(layer, "warning"), + warning_container: { + ...base_container, + background: background(theme.middle, "warning"), + border: border(theme.middle, "warning"), }, - errorContainer: { - ...baseContainer, - background: background(layer, "negative"), - border: border(layer, "negative"), + error_container: { + ...base_container, + background: background(theme.middle, "negative"), + border: border(theme.middle, "negative"), }, - blockStyle: { + block_style: { padding: { top: 4 }, }, - prose: text(layer, "sans", { size: "sm" }), - diagnosticSourceHighlight: { color: foreground(layer, "accent") }, - highlight: colorScheme.ramps.neutral(0.5).alpha(0.2).hex(), // TODO: blend was used here. Replace with something better + prose: text(theme.middle, "sans", { size: "sm" }), + diagnostic_source_highlight: { color: foreground(theme.middle, "accent") }, + highlight: theme.ramps.neutral(0.5).alpha(0.2).hex(), // TODO: blend was used here. Replace with something better } } diff --git a/styles/src/style_tree/incoming_call_notification.ts b/styles/src/style_tree/incoming_call_notification.ts index 2c4fa21867e9cfe34da0044eaa5d1bdc855cf1f4..91947b9da5cfca5a7eefb1a1ac571fe6a24c4ea9 100644 --- a/styles/src/style_tree/incoming_call_notification.ts +++ b/styles/src/style_tree/incoming_call_notification.ts @@ -2,49 +2,48 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, text } from "./components" export default function incoming_call_notification( - colorScheme: ColorScheme + theme: ColorScheme ): unknown { - const layer = colorScheme.middle - const avatarSize = 48 + const avatar_size = 48 return { - windowHeight: 74, - windowWidth: 380, - background: background(layer), - callerContainer: { + window_height: 74, + window_width: 380, + background: background(theme.middle), + caller_container: { padding: 12, }, - callerAvatar: { - height: avatarSize, - width: avatarSize, - corner_radius: avatarSize / 2, + caller_avatar: { + height: avatar_size, + width: avatar_size, + corner_radius: avatar_size / 2, }, - callerMetadata: { + caller_metadata: { margin: { left: 10 }, }, - callerUsername: { - ...text(layer, "sans", { size: "sm", weight: "bold" }), + caller_username: { + ...text(theme.middle, "sans", { size: "sm", weight: "bold" }), margin: { top: -3 }, }, - callerMessage: { - ...text(layer, "sans", "variant", { size: "xs" }), + caller_message: { + ...text(theme.middle, "sans", "variant", { size: "xs" }), margin: { top: -3 }, }, - worktreeRoots: { - ...text(layer, "sans", "variant", { size: "xs", weight: "bold" }), + worktree_roots: { + ...text(theme.middle, "sans", "variant", { size: "xs", weight: "bold" }), margin: { top: -3 }, }, button_width: 96, - acceptButton: { - background: background(layer, "accent"), - border: border(layer, { left: true, bottom: true }), - ...text(layer, "sans", "positive", { + accept_button: { + background: background(theme.middle, "accent"), + border: border(theme.middle, { left: true, bottom: true }), + ...text(theme.middle, "sans", "positive", { size: "xs", weight: "bold", }), }, - declineButton: { - border: border(layer, { left: true }), - ...text(layer, "sans", "negative", { + decline_button: { + border: border(theme.middle, { left: true }), + ...text(theme.middle, "sans", "negative", { size: "xs", weight: "bold", }), diff --git a/styles/src/style_tree/picker.ts b/styles/src/style_tree/picker.ts index 22b526f1831c4486cc9251e4a827807b6cbe7d19..7ca76cd85f324d9cc640dd3845a1ca1d3e89a751 100644 --- a/styles/src/style_tree/picker.ts +++ b/styles/src/style_tree/picker.ts @@ -1,24 +1,23 @@ import { ColorScheme } from "../theme/color_scheme" -import { withOpacity } from "../theme/color" +import { with_opacity } from "../theme/color" import { background, border, text } from "./components" import { interactive, toggleable } from "../element" -export default function picker(colorScheme: ColorScheme): any { - const layer = colorScheme.lowest +export default function picker(theme: ColorScheme): any { const container = { - background: background(layer), - border: border(layer), - shadow: colorScheme.modal_shadow, + background: background(theme.lowest), + border: border(theme.lowest), + shadow: theme.modal_shadow, corner_radius: 12, padding: { bottom: 4, }, } - const inputEditor = { - placeholderText: text(layer, "sans", "on", "disabled"), - selection: colorScheme.players[0], - text: text(layer, "mono", "on"), - border: border(layer, { bottom: true }), + const input_editor = { + placeholder_text: text(theme.lowest, "sans", "on", "disabled"), + selection: theme.players[0], + text: text(theme.lowest, "mono", "on"), + border: border(theme.lowest, { bottom: true }), padding: { bottom: 8, left: 16, @@ -29,13 +28,13 @@ export default function picker(colorScheme: ColorScheme): any { bottom: 4, }, } - const emptyInputEditor: any = { ...inputEditor } - delete emptyInputEditor.border - delete emptyInputEditor.margin + const empty_input_editor: any = { ...input_editor } + delete empty_input_editor.border + delete empty_input_editor.margin return { ...container, - emptyContainer: { + empty_container: { ...container, padding: {}, }, @@ -54,21 +53,21 @@ export default function picker(colorScheme: ColorScheme): any { right: 4, }, corner_radius: 8, - text: text(layer, "sans", "variant"), - highlightText: text(layer, "sans", "accent", { + text: text(theme.lowest, "sans", "variant"), + highlight_text: text(theme.lowest, "sans", "accent", { weight: "bold", }), }, state: { hovered: { - background: withOpacity( - background(layer, "hovered"), + background: with_opacity( + background(theme.lowest, "hovered"), 0.5 ), }, clicked: { - background: withOpacity( - background(layer, "pressed"), + background: with_opacity( + background(theme.lowest, "pressed"), 0.5 ), }, @@ -77,20 +76,20 @@ export default function picker(colorScheme: ColorScheme): any { state: { active: { default: { - background: withOpacity( - background(layer, "base", "active"), + background: with_opacity( + background(theme.lowest, "base", "active"), 0.5 ), }, hovered: { - background: withOpacity( - background(layer, "hovered"), + background: with_opacity( + background(theme.lowest, "hovered"), 0.5 ), }, clicked: { - background: withOpacity( - background(layer, "pressed"), + background: with_opacity( + background(theme.lowest, "pressed"), 0.5 ), }, @@ -98,10 +97,10 @@ export default function picker(colorScheme: ColorScheme): any { }, }), - inputEditor, - emptyInputEditor, - noMatches: { - text: text(layer, "sans", "variant"), + input_editor, + empty_input_editor, + no_matches: { + text: text(theme.lowest, "sans", "variant"), padding: { bottom: 8, left: 16, diff --git a/styles/src/style_tree/project_diagnostics.ts b/styles/src/style_tree/project_diagnostics.ts index 10f556d12150332a79a506370096651bae217d1e..5962b98a26ce20ebe2c8c06245cb0d134c3397e9 100644 --- a/styles/src/style_tree/project_diagnostics.ts +++ b/styles/src/style_tree/project_diagnostics.ts @@ -1,13 +1,12 @@ import { ColorScheme } from "../theme/color_scheme" import { background, text } from "./components" -export default function project_diagnostics(colorScheme: ColorScheme): any { - const layer = colorScheme.highest +export default function project_diagnostics(theme: ColorScheme): any { return { - background: background(layer), - tabIconSpacing: 4, + background: background(theme.highest), + tab_icon_spacing: 4, tab_icon_width: 13, - tabSummarySpacing: 10, - emptyMessage: text(layer, "sans", "variant", { size: "md" }), + tab_summary_spacing: 10, + empty_message: text(theme.highest, "sans", "variant", { size: "md" }), } } diff --git a/styles/src/style_tree/project_panel.ts b/styles/src/style_tree/project_panel.ts index 589e120e381075fe2b12303a0c5a9b798212cf5a..346ffb7641e8c891cd567046f9716e94db9380fc 100644 --- a/styles/src/style_tree/project_panel.ts +++ b/styles/src/style_tree/project_panel.ts @@ -1,5 +1,5 @@ import { ColorScheme } from "../theme/color_scheme" -import { withOpacity } from "../theme/color" +import { with_opacity } from "../theme/color" import { Border, TextStyle, @@ -13,13 +13,11 @@ import merge from "ts-deepmerge" export default function project_panel(theme: ColorScheme): any { const { is_light } = theme - const layer = theme.middle - type EntryStateProps = { background?: string border?: Border text?: TextStyle - iconColor?: string + icon_color?: string } type EntryState = { @@ -45,17 +43,17 @@ export default function project_panel(theme: ColorScheme): any { const base_properties = { height: 22, - background: background(layer), - iconColor: foreground(layer, "variant"), - iconSize: 7, + background: background(theme.middle), + icon_color: foreground(theme.middle, "variant"), + icon_size: 7, icon_spacing: 5, - text: text(layer, "mono", "variant", { size: "sm" }), + text: text(theme.middle, "mono", "variant", { size: "sm" }), status: { ...git_status, }, } - const selectedStyle: EntryState | undefined = selected + const selected_style: EntryState | undefined = selected ? selected : unselected @@ -67,27 +65,27 @@ export default function project_panel(theme: ColorScheme): any { const unselected_hovered_style = merge( base_properties, unselected?.hovered ?? {}, - { background: background(layer, "variant", "hovered") } + { background: background(theme.middle, "variant", "hovered") } ) const unselected_clicked_style = merge( base_properties, unselected?.clicked ?? {}, - { background: background(layer, "variant", "pressed") } + { background: background(theme.middle, "variant", "pressed") } ) const selected_default_style = merge( base_properties, - selectedStyle?.default ?? {}, - { background: background(layer) } + selected_style?.default ?? {}, + { background: background(theme.middle) } ) const selected_hovered_style = merge( base_properties, - selectedStyle?.hovered ?? {}, - { background: background(layer, "variant", "hovered") } + selected_style?.hovered ?? {}, + { background: background(theme.middle, "variant", "hovered") } ) const selected_clicked_style = merge( base_properties, - selectedStyle?.clicked ?? {}, - { background: background(layer, "variant", "pressed") } + selected_style?.clicked ?? {}, + { background: background(theme.middle, "variant", "pressed") } ) return toggleable({ @@ -110,13 +108,13 @@ export default function project_panel(theme: ColorScheme): any { }) } - const defaultEntry = entry() + const default_entry = entry() return { - openProjectButton: interactive({ + open_project_button: interactive({ base: { - background: background(layer), - border: border(layer, "active"), + background: background(theme.middle), + border: border(theme.middle, "active"), corner_radius: 4, margin: { top: 16, @@ -129,59 +127,59 @@ export default function project_panel(theme: ColorScheme): any { left: 7, right: 7, }, - ...text(layer, "sans", "default", { size: "sm" }), + ...text(theme.middle, "sans", "default", { size: "sm" }), }, state: { hovered: { - ...text(layer, "sans", "default", { size: "sm" }), - background: background(layer, "hovered"), - border: border(layer, "active"), + ...text(theme.middle, "sans", "default", { size: "sm" }), + background: background(theme.middle, "hovered"), + border: border(theme.middle, "active"), }, clicked: { - ...text(layer, "sans", "default", { size: "sm" }), - background: background(layer, "pressed"), - border: border(layer, "active"), + ...text(theme.middle, "sans", "default", { size: "sm" }), + background: background(theme.middle, "pressed"), + border: border(theme.middle, "active"), }, }, }), - background: background(layer), + background: background(theme.middle), padding: { left: 6, right: 6, top: 0, bottom: 6 }, - indentWidth: 12, - entry: defaultEntry, - draggedEntry: { - ...defaultEntry.inactive.default, - text: text(layer, "mono", "on", { size: "sm" }), - background: withOpacity(background(layer, "on"), 0.9), - border: border(layer), + indent_width: 12, + entry: default_entry, + dragged_entry: { + ...default_entry.inactive.default, + text: text(theme.middle, "mono", "on", { size: "sm" }), + background: with_opacity(background(theme.middle, "on"), 0.9), + border: border(theme.middle), }, - ignoredEntry: entry( + ignored_entry: entry( { default: { - text: text(layer, "mono", "disabled"), + text: text(theme.middle, "mono", "disabled"), }, }, { default: { - iconColor: foreground(layer, "variant"), + icon_color: foreground(theme.middle, "variant"), }, } ), - cutEntry: entry( + cut_entry: entry( { default: { - text: text(layer, "mono", "disabled"), + text: text(theme.middle, "mono", "disabled"), }, }, { default: { - background: background(layer, "active"), - text: text(layer, "mono", "disabled", { size: "sm" }), + background: background(theme.middle, "active"), + text: text(theme.middle, "mono", "disabled", { size: "sm" }), }, } ), - filenameEditor: { - background: background(layer, "on"), - text: text(layer, "mono", "on", { size: "sm" }), + filename_editor: { + background: background(theme.middle, "on"), + text: text(theme.middle, "mono", "on", { size: "sm" }), selection: theme.players[0], }, } diff --git a/styles/src/style_tree/project_shared_notification.ts b/styles/src/style_tree/project_shared_notification.ts index 6fe8170a3ce3815c8eb6118c1309a671cfe0f2c4..d93c1d65d50f1f8cc85ca1e3d051b875efa37941 100644 --- a/styles/src/style_tree/project_shared_notification.ts +++ b/styles/src/style_tree/project_shared_notification.ts @@ -2,50 +2,48 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, text } from "./components" export default function project_shared_notification( - colorScheme: ColorScheme + theme: ColorScheme ): unknown { - const layer = colorScheme.middle - - const avatarSize = 48 + const avatar_size = 48 return { - windowHeight: 74, - windowWidth: 380, - background: background(layer), - ownerContainer: { + window_height: 74, + window_width: 380, + background: background(theme.middle), + owner_container: { padding: 12, }, - ownerAvatar: { - height: avatarSize, - width: avatarSize, - corner_radius: avatarSize / 2, + owner_avatar: { + height: avatar_size, + width: avatar_size, + corner_radius: avatar_size / 2, }, - ownerMetadata: { + owner_metadata: { margin: { left: 10 }, }, - ownerUsername: { - ...text(layer, "sans", { size: "sm", weight: "bold" }), + owner_username: { + ...text(theme.middle, "sans", { size: "sm", weight: "bold" }), margin: { top: -3 }, }, message: { - ...text(layer, "sans", "variant", { size: "xs" }), + ...text(theme.middle, "sans", "variant", { size: "xs" }), margin: { top: -3 }, }, - worktreeRoots: { - ...text(layer, "sans", "variant", { size: "xs", weight: "bold" }), + worktree_roots: { + ...text(theme.middle, "sans", "variant", { size: "xs", weight: "bold" }), margin: { top: -3 }, }, button_width: 96, - openButton: { - background: background(layer, "accent"), - border: border(layer, { left: true, bottom: true }), - ...text(layer, "sans", "accent", { + open_button: { + background: background(theme.middle, "accent"), + border: border(theme.middle, { left: true, bottom: true }), + ...text(theme.middle, "sans", "accent", { size: "xs", weight: "bold", }), }, - dismissButton: { - border: border(layer, { left: true }), - ...text(layer, "sans", "variant", { + dismiss_button: { + border: border(theme.middle, { left: true }), + ...text(theme.middle, "sans", "variant", { size: "xs", weight: "bold", }), diff --git a/styles/src/style_tree/search.ts b/styles/src/style_tree/search.ts index 37040613b303bee0a032756e7359f24a32ae1170..da515114e7e33f4e4bd4e110176ed1918ccc4068 100644 --- a/styles/src/style_tree/search.ts +++ b/styles/src/style_tree/search.ts @@ -1,21 +1,19 @@ import { ColorScheme } from "../theme/color_scheme" -import { withOpacity } from "../theme/color" +import { with_opacity } from "../theme/color" import { background, border, foreground, text } from "./components" import { interactive, toggleable } from "../element" -export default function search(colorScheme: ColorScheme): any { - const layer = colorScheme.highest - +export default function search(theme: ColorScheme): any { // Search input const editor = { - background: background(layer), + background: background(theme.highest), corner_radius: 8, - minWidth: 200, - maxWidth: 500, - placeholderText: text(layer, "mono", "disabled"), - selection: colorScheme.players[0], - text: text(layer, "mono", "default"), - border: border(layer), + min_width: 200, + max_width: 500, + placeholder_text: text(theme.highest, "mono", "disabled"), + selection: theme.players[0], + text: text(theme.highest, "mono", "default"), + border: border(theme.highest), margin: { right: 12, }, @@ -27,22 +25,22 @@ export default function search(colorScheme: ColorScheme): any { }, } - const includeExcludeEditor = { + const include_exclude_editor = { ...editor, - minWidth: 100, - maxWidth: 250, + min_width: 100, + max_width: 250, } return { // TODO: Add an activeMatchBackground on the rust side to differentiate between active and inactive - matchBackground: withOpacity(foreground(layer, "accent"), 0.4), - optionButton: toggleable({ + match_background: with_opacity(foreground(theme.highest, "accent"), 0.4), + option_button: toggleable({ base: interactive({ base: { - ...text(layer, "mono", "on"), - background: background(layer, "on"), + ...text(theme.highest, "mono", "on"), + background: background(theme.highest, "on"), corner_radius: 6, - border: border(layer, "on"), + border: border(theme.highest, "on"), margin: { right: 4, }, @@ -55,66 +53,66 @@ export default function search(colorScheme: ColorScheme): any { }, state: { hovered: { - ...text(layer, "mono", "on", "hovered"), - background: background(layer, "on", "hovered"), - border: border(layer, "on", "hovered"), + ...text(theme.highest, "mono", "on", "hovered"), + background: background(theme.highest, "on", "hovered"), + border: border(theme.highest, "on", "hovered"), }, clicked: { - ...text(layer, "mono", "on", "pressed"), - background: background(layer, "on", "pressed"), - border: border(layer, "on", "pressed"), + ...text(theme.highest, "mono", "on", "pressed"), + background: background(theme.highest, "on", "pressed"), + border: border(theme.highest, "on", "pressed"), }, }, }), state: { active: { default: { - ...text(layer, "mono", "accent"), + ...text(theme.highest, "mono", "accent"), }, hovered: { - ...text(layer, "mono", "accent", "hovered"), + ...text(theme.highest, "mono", "accent", "hovered"), }, clicked: { - ...text(layer, "mono", "accent", "pressed"), + ...text(theme.highest, "mono", "accent", "pressed"), }, }, }, }), editor, - invalidEditor: { + invalid_editor: { ...editor, - border: border(layer, "negative"), + border: border(theme.highest, "negative"), }, - includeExcludeEditor, - invalidIncludeExcludeEditor: { - ...includeExcludeEditor, - border: border(layer, "negative"), + include_exclude_editor, + invalid_include_exclude_editor: { + ...include_exclude_editor, + border: border(theme.highest, "negative"), }, - matchIndex: { - ...text(layer, "mono", "variant"), + match_index: { + ...text(theme.highest, "mono", "variant"), padding: { left: 6, }, }, - optionButtonGroup: { + option_button_group: { padding: { left: 12, right: 12, }, }, - includeExcludeInputs: { - ...text(layer, "mono", "variant"), + include_exclude_inputs: { + ...text(theme.highest, "mono", "variant"), padding: { right: 6, }, }, - resultsStatus: { - ...text(layer, "mono", "on"), + results_status: { + ...text(theme.highest, "mono", "on"), size: 18, }, - dismissButton: interactive({ + dismiss_button: interactive({ base: { - color: foreground(layer, "variant"), + color: foreground(theme.highest, "variant"), icon_width: 12, button_width: 14, padding: { @@ -124,10 +122,10 @@ export default function search(colorScheme: ColorScheme): any { }, state: { hovered: { - color: foreground(layer, "hovered"), + color: foreground(theme.highest, "hovered"), }, clicked: { - color: foreground(layer, "pressed"), + color: foreground(theme.highest, "pressed"), }, }, }), diff --git a/styles/src/style_tree/shared_screen.ts b/styles/src/style_tree/shared_screen.ts index bc4ac0b5d705cca2d2f25597ba26681bbfc6feaf..b57c483f1c27b106e44f6a482dc9d8c64cdacacb 100644 --- a/styles/src/style_tree/shared_screen.ts +++ b/styles/src/style_tree/shared_screen.ts @@ -1,9 +1,8 @@ import { ColorScheme } from "../theme/color_scheme" import { background } from "./components" -export default function sharedScreen(colorScheme: ColorScheme) { - const layer = colorScheme.highest +export default function sharedScreen(theme: ColorScheme) { return { - background: background(layer), + background: background(theme.highest), } } diff --git a/styles/src/style_tree/simple_message_notification.ts b/styles/src/style_tree/simple_message_notification.ts index 621bf21232a15bb665bdab91b0a5b738fd251730..896f90a51b7095b64596b8d9560bdd0d9eaf554d 100644 --- a/styles/src/style_tree/simple_message_notification.ts +++ b/styles/src/style_tree/simple_message_notification.ts @@ -2,21 +2,20 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, text } from "./components" import { interactive } from "../element" -const headerPadding = 8 - export default function simple_message_notification( - colorScheme: ColorScheme -): unknown { - const layer = colorScheme.middle + theme: ColorScheme +): any { + const header_padding = 8 + return { message: { - ...text(layer, "sans", { size: "xs" }), - margin: { left: headerPadding, right: headerPadding }, + ...text(theme.middle, "sans", { size: "xs" }), + margin: { left: header_padding, right: header_padding }, }, - actionMessage: interactive({ + action_nessage: interactive({ base: { - ...text(layer, "sans", { size: "xs" }), - border: border(layer, "active"), + ...text(theme.middle, "sans", { size: "xs" }), + border: border(theme.middle, "active"), corner_radius: 4, padding: { top: 3, @@ -25,27 +24,27 @@ export default function simple_message_notification( right: 7, }, - margin: { left: headerPadding, top: 6, bottom: 6 }, + margin: { left: header_padding, top: 6, bottom: 6 }, }, state: { hovered: { - ...text(layer, "sans", "default", { size: "xs" }), - background: background(layer, "hovered"), - border: border(layer, "active"), + ...text(theme.middle, "sans", "default", { size: "xs" }), + background: background(theme.middle, "hovered"), + border: border(theme.middle, "active"), }, }, }), - dismissButton: interactive({ + dismiss_button: interactive({ base: { - color: foreground(layer), + color: foreground(theme.middle), icon_width: 8, - iconHeight: 8, + icon_height: 8, button_width: 8, - buttonHeight: 8, + button_height: 8, }, state: { hovered: { - color: foreground(layer, "hovered"), + color: foreground(theme.middle, "hovered"), }, }, }), diff --git a/styles/src/style_tree/status_bar.ts b/styles/src/style_tree/status_bar.ts index d67634d5a80436cd4e452619ef971032fb1bbf8c..652c8bf05c636f74ed03377cbed445263c26465d 100644 --- a/styles/src/style_tree/status_bar.ts +++ b/styles/src/style_tree/status_bar.ts @@ -1,22 +1,22 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, text } from "./components" import { interactive, toggleable } from "../element" -export default function status_bar(colorScheme: ColorScheme): any { - const layer = colorScheme.lowest +export default function status_bar(theme: ColorScheme): any { + const layer = theme.lowest - const statusContainer = { + const status_container = { corner_radius: 6, padding: { top: 3, bottom: 3, left: 6, right: 6 }, } - const diagnosticStatusContainer = { + const diagnostic_status_container = { corner_radius: 6, padding: { top: 1, bottom: 1, left: 6, right: 6 }, } return { height: 30, - itemSpacing: 8, + item_spacing: 8, padding: { top: 1, bottom: 1, @@ -24,8 +24,8 @@ export default function status_bar(colorScheme: ColorScheme): any { right: 6, }, border: border(layer, { top: true, overlay: true }), - cursorPosition: text(layer, "sans", "variant"), - activeLanguage: interactive({ + cursor_position: text(layer, "sans", "variant"), + active_language: interactive({ base: { padding: { left: 6, right: 6 }, ...text(layer, "sans", "variant"), @@ -36,83 +36,83 @@ export default function status_bar(colorScheme: ColorScheme): any { }, }, }), - autoUpdateProgressMessage: text(layer, "sans", "variant"), - autoUpdateDoneMessage: text(layer, "sans", "variant"), - lspStatus: interactive({ + auto_updat_progress_message: text(layer, "sans", "variant"), + auto_update_done_message: text(layer, "sans", "variant"), + lsp_status: interactive({ base: { - ...diagnosticStatusContainer, + ...diagnostic_status_container, icon_spacing: 4, icon_width: 14, height: 18, message: text(layer, "sans"), - iconColor: foreground(layer), + icon_color: foreground(layer), }, state: { hovered: { message: text(layer, "sans"), - iconColor: foreground(layer), + icon_color: foreground(layer), background: background(layer, "hovered"), }, }, }), - diagnosticMessage: interactive({ + diagnostic_message: interactive({ base: { ...text(layer, "sans"), }, state: { hovered: text(layer, "sans", "hovered") }, }), - diagnosticSummary: interactive({ + diagnostic_summary: interactive({ base: { height: 20, icon_width: 16, icon_spacing: 2, - summarySpacing: 6, + summary_spacing: 6, text: text(layer, "sans", { size: "sm" }), - iconColorOk: foreground(layer, "variant"), - iconColorWarning: foreground(layer, "warning"), - iconColorError: foreground(layer, "negative"), - containerOk: { + icon_color_ok: foreground(layer, "variant"), + icon_color_warning: foreground(layer, "warning"), + icon_color_error: foreground(layer, "negative"), + container_ok: { corner_radius: 6, padding: { top: 3, bottom: 3, left: 7, right: 7 }, }, - containerWarning: { - ...diagnosticStatusContainer, + container_warning: { + ...diagnostic_status_container, background: background(layer, "warning"), border: border(layer, "warning"), }, - containerError: { - ...diagnosticStatusContainer, + container_error: { + ...diagnostic_status_container, background: background(layer, "negative"), border: border(layer, "negative"), }, }, state: { hovered: { - iconColorOk: foreground(layer, "on"), - containerOk: { + icon_color_ok: foreground(layer, "on"), + container_ok: { background: background(layer, "on", "hovered"), }, - containerWarning: { + container_warning: { background: background(layer, "warning", "hovered"), border: border(layer, "warning", "hovered"), }, - containerError: { + container_error: { background: background(layer, "negative", "hovered"), border: border(layer, "negative", "hovered"), }, }, }, }), - panelButtons: { - groupLeft: {}, - groupBottom: {}, - groupRight: {}, + panel_buttons: { + group_left: {}, + group_bottom: {}, + group_right: {}, button: toggleable({ base: interactive({ base: { - ...statusContainer, - iconSize: 16, - iconColor: foreground(layer, "variant"), + ...status_container, + icon_size: 16, + icon_color: foreground(layer, "variant"), label: { margin: { left: 6 }, ...text(layer, "sans", { size: "sm" }), @@ -120,7 +120,7 @@ export default function status_bar(colorScheme: ColorScheme): any { }, state: { hovered: { - iconColor: foreground(layer, "hovered"), + icon_color: foreground(layer, "hovered"), background: background(layer, "variant"), }, }, @@ -128,15 +128,15 @@ export default function status_bar(colorScheme: ColorScheme): any { state: { active: { default: { - iconColor: foreground(layer, "active"), + icon_color: foreground(layer, "active"), background: background(layer, "active"), }, hovered: { - iconColor: foreground(layer, "hovered"), + icon_color: foreground(layer, "hovered"), background: background(layer, "hovered"), }, clicked: { - iconColor: foreground(layer, "pressed"), + icon_color: foreground(layer, "pressed"), background: background(layer, "pressed"), }, }, diff --git a/styles/src/style_tree/tab_bar.ts b/styles/src/style_tree/tab_bar.ts index 63f0b213a6c44307bcc2509401c3af60bc850541..dc869024bcf0b72ef57dba6e94d16ec77ef28858 100644 --- a/styles/src/style_tree/tab_bar.ts +++ b/styles/src/style_tree/tab_bar.ts @@ -1,5 +1,5 @@ import { ColorScheme } from "../theme/color_scheme" -import { withOpacity } from "../theme/color" +import { with_opacity } from "../theme/color" import { text, border, background, foreground } from "./components" import { interactive, toggleable } from "../element" @@ -71,7 +71,7 @@ export default function tab_bar(colorScheme: ColorScheme): any { const draggedTab = { ...activePaneActiveTab, - background: withOpacity(tab.background, 0.9), + background: with_opacity(tab.background, 0.9), border: undefined as any, shadow: colorScheme.popover_shadow, } diff --git a/styles/src/style_tree/titlebar.ts b/styles/src/style_tree/titlebar.ts index dc1d098a3c3369aeb061764f2c2f38e7f21038a1..5972ba4bdd90c6a49237f1c58d0add7ab95bc8fd 100644 --- a/styles/src/style_tree/titlebar.ts +++ b/styles/src/style_tree/titlebar.ts @@ -2,7 +2,7 @@ import { ColorScheme } from "../common" import { icon_button, toggleable_icon_button } from "../component/icon_button" import { toggleable_text_button } from "../component/text_button" import { interactive, toggleable } from "../element" -import { withOpacity } from "../theme/color" +import { with_opacity } from "../theme/color" import { background, border, foreground, text } from "./components" const ITEM_SPACING = 8 @@ -225,7 +225,7 @@ export function titlebar(theme: ColorScheme): any { // When the collaboration server is out of date, show a warning outdatedWarning: { ...text(theme.lowest, "sans", "warning", { size: "xs" }), - background: withOpacity(background(theme.lowest, "warning"), 0.3), + background: with_opacity(background(theme.lowest, "warning"), 0.3), border: border(theme.lowest, "warning"), margin: { left: ITEM_SPACING, diff --git a/styles/src/style_tree/welcome.ts b/styles/src/style_tree/welcome.ts index 9ae9716f66b1d72cb9aab33c830b207ba53f352f..2e21e331707c098953c0447ccbe1cd23dc197f4b 100644 --- a/styles/src/style_tree/welcome.ts +++ b/styles/src/style_tree/welcome.ts @@ -1,5 +1,5 @@ import { ColorScheme } from "../theme/color_scheme" -import { withOpacity } from "../theme/color" +import { with_opacity } from "../theme/color" import { border, background, @@ -56,7 +56,7 @@ export default function welcome(colorScheme: ColorScheme): any { }, checkboxGroup: { border: border(layer, "variant"), - background: withOpacity(background(layer, "hovered"), 0.25), + background: with_opacity(background(layer, "hovered"), 0.25), corner_radius: 4, padding: { left: 12, diff --git a/styles/src/style_tree/workspace.ts b/styles/src/style_tree/workspace.ts index 8c60c9d402fe9000745b14f7b31bc0daf6246b25..02b6c80fa989a19ba0e694edc69e644bc70c5595 100644 --- a/styles/src/style_tree/workspace.ts +++ b/styles/src/style_tree/workspace.ts @@ -1,5 +1,5 @@ import { ColorScheme } from "../theme/color_scheme" -import { withOpacity } from "../theme/color" +import { with_opacity } from "../theme/color" import { background, border, @@ -25,14 +25,14 @@ export default function workspace(colorScheme: ColorScheme): any { height: 256, }, logo: svg( - withOpacity("#000000", colorScheme.is_light ? 0.6 : 0.8), + with_opacity("#000000", colorScheme.is_light ? 0.6 : 0.8), "icons/logo_96.svg", 256, 256 ), logoShadow: svg( - withOpacity( + with_opacity( colorScheme.is_light ? "#FFFFFF" : colorScheme.lowest.base.default.background, @@ -97,8 +97,8 @@ export default function workspace(colorScheme: ColorScheme): any { zoomedBackground: { cursor: "Arrow", background: is_light - ? withOpacity(background(colorScheme.lowest), 0.8) - : withOpacity(background(colorScheme.highest), 0.6), + ? with_opacity(background(colorScheme.lowest), 0.8) + : with_opacity(background(colorScheme.highest), 0.6), }, zoomedPaneForeground: { margin: 16, @@ -181,7 +181,7 @@ export default function workspace(colorScheme: ColorScheme): any { }), disconnectedOverlay: { ...text(layer, "sans"), - background: withOpacity(background(layer), 0.8), + background: with_opacity(background(layer), 0.8), }, notification: { margin: { top: 10 }, @@ -195,6 +195,6 @@ export default function workspace(colorScheme: ColorScheme): any { width: 400, margin: { right: 10, bottom: 10 }, }, - dropTargetOverlayColor: withOpacity(foreground(layer, "variant"), 0.5), + dropTargetOverlayColor: with_opacity(foreground(layer, "variant"), 0.5), } } diff --git a/styles/src/theme/color.ts b/styles/src/theme/color.ts index 58ee4ccc7c236f4312b3dd5658c0cb5acff7030c..83c2107483664986819a1f0e7c2eb42ac2c4b2d7 100644 --- a/styles/src/theme/color.ts +++ b/styles/src/theme/color.ts @@ -1,5 +1,5 @@ import chroma from "chroma-js" -export function withOpacity(color: string, opacity: number): string { +export function with_opacity(color: string, opacity: number): string { return chroma(color).alpha(opacity).hex() } From 97dc7b77f43a70a550f015068e12f4032e033ad0 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 29 Jun 2023 11:31:23 -0400 Subject: [PATCH 09/13] WIP snake_case 5/? --- .../style_tree/simple_message_notification.ts | 2 +- styles/src/style_tree/status_bar.ts | 2 +- styles/src/style_tree/tab_bar.ts | 52 ++++---- styles/src/style_tree/titlebar.ts | 66 +++++----- .../src/style_tree/toolbar_dropdown_menu.ts | 42 +++---- styles/src/style_tree/tooltip.ts | 17 ++- styles/src/style_tree/update_notification.ts | 28 ++--- styles/src/style_tree/welcome.ts | 74 ++++++----- styles/src/style_tree/workspace.ts | 119 +++++++++--------- styles/src/theme/tokens/color_scheme.ts | 18 +-- styles/src/theme/tokens/layer.ts | 26 ++-- styles/src/theme/tokens/players.ts | 34 ++--- styles/src/theme/tokens/token.ts | 2 +- styles/src/themes/andromeda/LICENSE | 2 +- styles/src/themes/atelier/LICENSE | 2 +- styles/src/themes/ayu/LICENSE | 2 +- styles/src/themes/ayu/common.ts | 6 +- styles/src/themes/gruvbox/LICENSE | 2 +- styles/src/themes/one/LICENSE | 2 +- styles/src/themes/rose-pine/LICENSE | 2 +- styles/src/themes/sandcastle/LICENSE | 2 +- styles/src/themes/solarized/LICENSE | 2 +- styles/src/themes/summercamp/LICENSE | 2 +- 23 files changed, 250 insertions(+), 256 deletions(-) diff --git a/styles/src/style_tree/simple_message_notification.ts b/styles/src/style_tree/simple_message_notification.ts index 896f90a51b7095b64596b8d9560bdd0d9eaf554d..e9567e235a4bb7dbfbc56f8cb49e5df3e5391ee8 100644 --- a/styles/src/style_tree/simple_message_notification.ts +++ b/styles/src/style_tree/simple_message_notification.ts @@ -12,7 +12,7 @@ export default function simple_message_notification( ...text(theme.middle, "sans", { size: "xs" }), margin: { left: header_padding, right: header_padding }, }, - action_nessage: interactive({ + action_message: interactive({ base: { ...text(theme.middle, "sans", { size: "xs" }), border: border(theme.middle, "active"), diff --git a/styles/src/style_tree/status_bar.ts b/styles/src/style_tree/status_bar.ts index 652c8bf05c636f74ed03377cbed445263c26465d..bde40d570c5c2bc8b42af00a52eca9ccb7b8e26b 100644 --- a/styles/src/style_tree/status_bar.ts +++ b/styles/src/style_tree/status_bar.ts @@ -36,7 +36,7 @@ export default function status_bar(theme: ColorScheme): any { }, }, }), - auto_updat_progress_message: text(layer, "sans", "variant"), + auto_update_progress_message: text(layer, "sans", "variant"), auto_update_done_message: text(layer, "sans", "variant"), lsp_status: interactive({ base: { diff --git a/styles/src/style_tree/tab_bar.ts b/styles/src/style_tree/tab_bar.ts index dc869024bcf0b72ef57dba6e94d16ec77ef28858..55fd2c314a9781d4719f5d16fd5cd498202f89a1 100644 --- a/styles/src/style_tree/tab_bar.ts +++ b/styles/src/style_tree/tab_bar.ts @@ -3,11 +3,11 @@ import { with_opacity } from "../theme/color" import { text, border, background, foreground } from "./components" import { interactive, toggleable } from "../element" -export default function tab_bar(colorScheme: ColorScheme): any { +export default function tab_bar(theme: ColorScheme): any { const height = 32 - const activeLayer = colorScheme.highest - const layer = colorScheme.middle + const active_layer = theme.highest + const layer = theme.middle const tab = { height, @@ -29,12 +29,12 @@ export default function tab_bar(colorScheme: ColorScheme): any { // Close icons close_icon_width: 8, - iconClose: foreground(layer, "variant"), - iconCloseActive: foreground(layer, "hovered"), + icon_close: foreground(layer, "variant"), + icon_close_active: foreground(layer, "hovered"), // Indicators - iconConflict: foreground(layer, "warning"), - iconDirty: foreground(layer, "accent"), + icon_conflict: foreground(layer, "warning"), + icon_dirty: foreground(layer, "accent"), // When two tabs of the same name are open, a label appears next to them description: { @@ -43,25 +43,25 @@ export default function tab_bar(colorScheme: ColorScheme): any { }, } - const activePaneActiveTab = { + const active_pane_active_tab = { ...tab, - background: background(activeLayer), - text: text(activeLayer, "sans", "active", { size: "sm" }), + background: background(active_layer), + text: text(active_layer, "sans", "active", { size: "sm" }), border: { ...tab.border, bottom: false, }, } - const inactivePaneInactiveTab = { + const inactive_pane_inactive_tab = { ...tab, background: background(layer), text: text(layer, "sans", "variant", { size: "sm" }), } - const inactivePaneActiveTab = { + const inactive_pane_active_tab = { ...tab, - background: background(activeLayer), + background: background(active_layer), text: text(layer, "sans", "variant", { size: "sm" }), border: { ...tab.border, @@ -69,31 +69,31 @@ export default function tab_bar(colorScheme: ColorScheme): any { }, } - const draggedTab = { - ...activePaneActiveTab, + const dragged_tab = { + ...active_pane_active_tab, background: with_opacity(tab.background, 0.9), border: undefined as any, - shadow: colorScheme.popover_shadow, + shadow: theme.popover_shadow, } return { height, background: background(layer), - activePane: { - activeTab: activePaneActiveTab, - inactiveTab: tab, + active_pane: { + active_tab: active_pane_active_tab, + inactive_tab: tab, }, - inactivePane: { - activeTab: inactivePaneActiveTab, - inactiveTab: inactivePaneInactiveTab, + inactive_pane: { + active_tab: inactive_pane_active_tab, + inactive_tab: inactive_pane_inactive_tab, }, - draggedTab, - paneButton: toggleable({ + dragged_tab, + pane_button: toggleable({ base: interactive({ base: { color: foreground(layer, "variant"), icon_width: 12, - button_width: activePaneActiveTab.height, + button_width: active_pane_active_tab.height, }, state: { hovered: { @@ -118,7 +118,7 @@ export default function tab_bar(colorScheme: ColorScheme): any { }, }, }), - paneButtonContainer: { + pane_button_container: { background: tab.background, border: { ...tab.border, diff --git a/styles/src/style_tree/titlebar.ts b/styles/src/style_tree/titlebar.ts index 5972ba4bdd90c6a49237f1c58d0add7ab95bc8fd..067d619bb524880c1ddd9085a889cf41d3177470 100644 --- a/styles/src/style_tree/titlebar.ts +++ b/styles/src/style_tree/titlebar.ts @@ -17,8 +17,8 @@ function build_spacing( group: spacing, item: spacing / 2, half_item: spacing / 4, - marginY: (container_height - element_height) / 2, - marginX: (container_height - element_height) / 2, + margin_y: (container_height - element_height) / 2, + margin_x: (container_height - element_height) / 2, } } @@ -26,15 +26,15 @@ function call_controls(theme: ColorScheme) { const button_height = 18 const space = build_spacing(TITLEBAR_HEIGHT, button_height, ITEM_SPACING) - const marginY = { - top: space.marginY, - bottom: space.marginY, + const margin_y = { + top: space.margin_y, + bottom: space.margin_y, } return { toggle_microphone_button: toggleable_icon_button(theme, { margin: { - ...marginY, + ...margin_y, left: space.group, right: space.half_item, }, @@ -43,7 +43,7 @@ function call_controls(theme: ColorScheme) { toggle_speakers_button: toggleable_icon_button(theme, { margin: { - ...marginY, + ...margin_y, left: space.half_item, right: space.half_item, }, @@ -51,7 +51,7 @@ function call_controls(theme: ColorScheme) { screen_share_button: toggleable_icon_button(theme, { margin: { - ...marginY, + ...margin_y, left: space.half_item, right: space.group, }, @@ -150,20 +150,20 @@ function user_menu(theme: ColorScheme) { } } return { - userMenuButtonOnline: build_button({ online: true }), - userMenuButtonOffline: build_button({ online: false }), + user_menu_button_online: build_button({ online: true }), + user_menu_button_offline: build_button({ online: false }), } } export function titlebar(theme: ColorScheme): any { - const avatarWidth = 15 - const avatarOuterWidth = avatarWidth + 4 - const followerAvatarWidth = 14 - const followerAvatarOuterWidth = followerAvatarWidth + 4 + const avatar_width = 15 + const avatar_outer_width = avatar_width + 4 + const follower_avatar_width = 14 + const follower_avatar_outer_width = follower_avatar_width + 4 return { item_spacing: ITEM_SPACING, - facePileSpacing: 2, + face_pile_spacing: 2, height: TITLEBAR_HEIGHT, background: background(theme.lowest), border: border(theme.lowest, { bottom: true }), @@ -177,21 +177,21 @@ export function titlebar(theme: ColorScheme): any { highlight_color: text(theme.lowest, "sans", "active").color, // Collaborators - leaderAvatar: { - width: avatarWidth, - outerWidth: avatarOuterWidth, - corner_radius: avatarWidth / 2, - outerCornerRadius: avatarOuterWidth / 2, + leader_avatar: { + width: avatar_width, + outer_width: avatar_outer_width, + corner_radius: avatar_width / 2, + outer_corner_radius: avatar_outer_width / 2, }, - followerAvatar: { - width: followerAvatarWidth, - outerWidth: followerAvatarOuterWidth, - corner_radius: followerAvatarWidth / 2, - outerCornerRadius: followerAvatarOuterWidth / 2, + follower_avatar: { + width: follower_avatar_width, + outer_width: follower_avatar_outer_width, + corner_radius: follower_avatar_width / 2, + outer_corner_radius: follower_avatar_outer_width / 2, }, - inactiveAvatarGrayscale: true, - followerAvatarOverlap: 8, - leaderSelection: { + inactive_avatar_grayscale: true, + follower_avatar_overlap: 8, + leader_selection: { margin: { top: 4, bottom: 4, @@ -204,14 +204,14 @@ export function titlebar(theme: ColorScheme): any { }, corner_radius: 6, }, - avatarRibbon: { + avatar_ribbon: { height: 3, width: 14, // TODO: Chore: Make avatarRibbon colors driven by the theme rather than being hard coded. }, sign_in_button: toggleable_text_button(theme, {}), - offlineIcon: { + offline_icon: { color: foreground(theme.lowest, "variant"), width: 16, margin: { @@ -223,7 +223,7 @@ export function titlebar(theme: ColorScheme): any { }, // When the collaboration server is out of date, show a warning - outdatedWarning: { + outdated_warning: { ...text(theme.lowest, "sans", "warning", { size: "xs" }), background: with_opacity(background(theme.lowest, "warning"), 0.3), border: border(theme.lowest, "warning"), @@ -253,14 +253,14 @@ export function titlebar(theme: ColorScheme): any { }), // Jewel that notifies you that there are new contact requests - toggleContactsBadge: { + toggle_contacts_badge: { corner_radius: 3, padding: 2, margin: { top: 3, left: 3 }, border: border(theme.lowest), background: foreground(theme.lowest, "accent"), }, - shareButton: toggleable_text_button(theme, {}), + share_button: toggleable_text_button(theme, {}), user_menu: user_menu(theme), } } diff --git a/styles/src/style_tree/toolbar_dropdown_menu.ts b/styles/src/style_tree/toolbar_dropdown_menu.ts index 51e62db822edc8d0da82378ee25b5f3e03f17287..df5cc094c10619d06bf2c50af2c01def7ba29d69 100644 --- a/styles/src/style_tree/toolbar_dropdown_menu.ts +++ b/styles/src/style_tree/toolbar_dropdown_menu.ts @@ -1,61 +1,59 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, text } from "./components" import { interactive, toggleable } from "../element" -export default function dropdown_menu(colorScheme: ColorScheme): any { - const layer = colorScheme.middle - +export default function dropdown_menu(theme: ColorScheme): any { return { - rowHeight: 30, - background: background(layer), - border: border(layer), - shadow: colorScheme.popover_shadow, + row_height: 30, + background: background(theme.middle), + border: border(theme.middle), + shadow: theme.popover_shadow, header: interactive({ base: { - ...text(layer, "sans", { size: "sm" }), - secondaryText: text(layer, "sans", { + ...text(theme.middle, "sans", { size: "sm" }), + secondary_text: text(theme.middle, "sans", { size: "sm", color: "#aaaaaa", }), - secondaryTextSpacing: 10, + secondary_text_spacing: 10, padding: { left: 8, right: 8, top: 2, bottom: 2 }, corner_radius: 6, - background: background(layer, "on"), + background: background(theme.middle, "on"), }, state: { hovered: { - background: background(layer, "hovered"), + background: background(theme.middle, "hovered"), }, clicked: { - background: background(layer, "pressed"), + background: background(theme.middle, "pressed"), }, }, }), - sectionHeader: { - ...text(layer, "sans", { size: "sm" }), + section_header: { + ...text(theme.middle, "sans", { size: "sm" }), padding: { left: 8, right: 8, top: 8, bottom: 8 }, }, item: toggleable({ base: interactive({ base: { - ...text(layer, "sans", { size: "sm" }), - secondaryTextSpacing: 10, - secondaryText: text(layer, "sans", { size: "sm" }), + ...text(theme.middle, "sans", { size: "sm" }), + secondary_text_spacing: 10, + secondary_text: text(theme.middle, "sans", { size: "sm" }), padding: { left: 18, right: 18, top: 2, bottom: 2 }, }, state: { hovered: { - background: background(layer, "hovered"), - ...text(layer, "sans", "hovered", { size: "sm" }), + background: background(theme.middle, "hovered"), + ...text(theme.middle, "sans", "hovered", { size: "sm" }), }, }, }), state: { active: { default: { - background: background(layer, "active"), + background: background(theme.middle, "active"), }, hovered: { - background: background(layer, "hovered"), + background: background(theme.middle, "hovered"), }, }, }, diff --git a/styles/src/style_tree/tooltip.ts b/styles/src/style_tree/tooltip.ts index ea890232b5d45938cc0411e5cf087674deff5468..2fa5db04d4f96eee33cca9ea9190dff275ad7e0c 100644 --- a/styles/src/style_tree/tooltip.ts +++ b/styles/src/style_tree/tooltip.ts @@ -1,23 +1,22 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, text } from "./components" -export default function tooltip(colorScheme: ColorScheme): any { - const layer = colorScheme.middle +export default function tooltip(theme: ColorScheme): any { return { - background: background(layer), - border: border(layer), + background: background(theme.middle), + border: border(theme.middle), padding: { top: 4, bottom: 4, left: 8, right: 8 }, margin: { top: 6, left: 6 }, - shadow: colorScheme.popover_shadow, + shadow: theme.popover_shadow, corner_radius: 6, - text: text(layer, "sans", { size: "xs" }), + text: text(theme.middle, "sans", { size: "xs" }), keystroke: { - background: background(layer, "on"), + background: background(theme.middle, "on"), corner_radius: 4, margin: { left: 6 }, padding: { left: 4, right: 4 }, - ...text(layer, "mono", "on", { size: "xs", weight: "bold" }), + ...text(theme.middle, "mono", "on", { size: "xs", weight: "bold" }), }, - maxTextWidth: 200, + max_text_width: 200, } } diff --git a/styles/src/style_tree/update_notification.ts b/styles/src/style_tree/update_notification.ts index e3cf833ce85e0e83ac655b6285485af1c882be13..48581a5d210dc2948d415c6b3919284eba601823 100644 --- a/styles/src/style_tree/update_notification.ts +++ b/styles/src/style_tree/update_notification.ts @@ -2,37 +2,37 @@ import { ColorScheme } from "../theme/color_scheme" import { foreground, text } from "./components" import { interactive } from "../element" -const headerPadding = 8 -export default function update_notification(colorScheme: ColorScheme): any { - const layer = colorScheme.middle +export default function update_notification(theme: ColorScheme): any { + const header_padding = 8 + return { message: { - ...text(layer, "sans", { size: "xs" }), - margin: { left: headerPadding, right: headerPadding }, + ...text(theme.middle, "sans", { size: "xs" }), + margin: { left: header_padding, right: header_padding }, }, - actionMessage: interactive({ + action_message: interactive({ base: { - ...text(layer, "sans", { size: "xs" }), - margin: { left: headerPadding, top: 6, bottom: 6 }, + ...text(theme.middle, "sans", { size: "xs" }), + margin: { left: header_padding, top: 6, bottom: 6 }, }, state: { hovered: { - color: foreground(layer, "hovered"), + color: foreground(theme.middle, "hovered"), }, }, }), - dismissButton: interactive({ + dismiss_button: interactive({ base: { - color: foreground(layer), + color: foreground(theme.middle), icon_width: 8, - iconHeight: 8, + icon_height: 8, button_width: 8, - buttonHeight: 8, + button_height: 8, }, state: { hovered: { - color: foreground(layer, "hovered"), + color: foreground(theme.middle, "hovered"), }, }, }), diff --git a/styles/src/style_tree/welcome.ts b/styles/src/style_tree/welcome.ts index 2e21e331707c098953c0447ccbe1cd23dc197f4b..0d99ad3f77150077cb56d56629b8bb6fb6688124 100644 --- a/styles/src/style_tree/welcome.ts +++ b/styles/src/style_tree/welcome.ts @@ -10,10 +10,8 @@ import { } from "./components" import { interactive } from "../element" -export default function welcome(colorScheme: ColorScheme): any { - const layer = colorScheme.highest - - const checkboxBase = { +export default function welcome(theme: ColorScheme): any { + const checkbox_base = { corner_radius: 4, padding: { left: 3, @@ -21,8 +19,8 @@ export default function welcome(colorScheme: ColorScheme): any { top: 3, bottom: 3, }, - // shadow: colorScheme.popover_shadow, - border: border(layer), + // shadow: theme.popover_shadow, + border: border(theme.highest), margin: { right: 8, top: 5, @@ -33,30 +31,30 @@ export default function welcome(colorScheme: ColorScheme): any { const interactive_text_size: TextProperties = { size: "sm" } return { - pageWidth: 320, - logo: svg(foreground(layer, "default"), "icons/logo_96.svg", 64, 64), - logoSubheading: { - ...text(layer, "sans", "variant", { size: "md" }), + page_width: 320, + logo: svg(foreground(theme.highest, "default"), "icons/logo_96.svg", 64, 64), + logo_subheading: { + ...text(theme.highest, "sans", "variant", { size: "md" }), margin: { top: 10, bottom: 7, }, }, - buttonGroup: { + button_group: { margin: { top: 8, bottom: 16, }, }, - headingGroup: { + heading_group: { margin: { top: 8, bottom: 12, }, }, - checkboxGroup: { - border: border(layer, "variant"), - background: with_opacity(background(layer, "hovered"), 0.25), + checkbox_group: { + border: border(theme.highest, "variant"), + background: with_opacity(background(theme.highest, "hovered"), 0.25), corner_radius: 4, padding: { left: 12, @@ -66,8 +64,8 @@ export default function welcome(colorScheme: ColorScheme): any { }, button: interactive({ base: { - background: background(layer), - border: border(layer, "active"), + background: background(theme.highest), + border: border(theme.highest, "active"), corner_radius: 4, margin: { top: 4, @@ -79,23 +77,23 @@ export default function welcome(colorScheme: ColorScheme): any { left: 7, right: 7, }, - ...text(layer, "sans", "default", interactive_text_size), + ...text(theme.highest, "sans", "default", interactive_text_size), }, state: { hovered: { - ...text(layer, "sans", "default", interactive_text_size), - background: background(layer, "hovered"), + ...text(theme.highest, "sans", "default", interactive_text_size), + background: background(theme.highest, "hovered"), }, }, }), - usageNote: { - ...text(layer, "sans", "variant", { size: "2xs" }), + usage_note: { + ...text(theme.highest, "sans", "variant", { size: "2xs" }), padding: { top: -4, }, }, - checkboxContainer: { + checkbox_container: { margin: { top: 4, }, @@ -105,29 +103,29 @@ export default function welcome(colorScheme: ColorScheme): any { }, checkbox: { label: { - ...text(layer, "sans", interactive_text_size), + ...text(theme.highest, "sans", interactive_text_size), // Also supports margin, container, border, etc. }, - icon: svg(foreground(layer, "on"), "icons/check_12.svg", 12, 12), + icon: svg(foreground(theme.highest, "on"), "icons/check_12.svg", 12, 12), default: { - ...checkboxBase, - background: background(layer, "default"), - border: border(layer, "active"), + ...checkbox_base, + background: background(theme.highest, "default"), + border: border(theme.highest, "active"), }, checked: { - ...checkboxBase, - background: background(layer, "hovered"), - border: border(layer, "active"), + ...checkbox_base, + background: background(theme.highest, "hovered"), + border: border(theme.highest, "active"), }, hovered: { - ...checkboxBase, - background: background(layer, "hovered"), - border: border(layer, "active"), + ...checkbox_base, + background: background(theme.highest, "hovered"), + border: border(theme.highest, "active"), }, - hoveredAndChecked: { - ...checkboxBase, - background: background(layer, "hovered"), - border: border(layer, "active"), + hovered_and_checked: { + ...checkbox_base, + background: background(theme.highest, "hovered"), + border: border(theme.highest, "active"), }, }, } diff --git a/styles/src/style_tree/workspace.ts b/styles/src/style_tree/workspace.ts index 02b6c80fa989a19ba0e694edc69e644bc70c5595..82b05eab91f86c1c539c53588af1bf94e987360e 100644 --- a/styles/src/style_tree/workspace.ts +++ b/styles/src/style_tree/workspace.ts @@ -13,44 +13,43 @@ import tabBar from "./tab_bar" import { interactive } from "../element" import { titlebar } from "./titlebar" -export default function workspace(colorScheme: ColorScheme): any { - const layer = colorScheme.lowest - const is_light = colorScheme.is_light +export default function workspace(theme: ColorScheme): any { + const { is_light } = theme return { - background: background(colorScheme.lowest), - blankPane: { - logoContainer: { + background: background(theme.lowest), + blank_pane: { + logo_container: { width: 256, height: 256, }, logo: svg( - with_opacity("#000000", colorScheme.is_light ? 0.6 : 0.8), + with_opacity("#000000", theme.is_light ? 0.6 : 0.8), "icons/logo_96.svg", 256, 256 ), - logoShadow: svg( + logo_shadow: svg( with_opacity( - colorScheme.is_light + theme.is_light ? "#FFFFFF" - : colorScheme.lowest.base.default.background, - colorScheme.is_light ? 1 : 0.6 + : theme.lowest.base.default.background, + theme.is_light ? 1 : 0.6 ), "icons/logo_96.svg", 256, 256 ), - keyboardHints: { + keyboard_hints: { margin: { top: 96, }, corner_radius: 4, }, - keyboardHint: interactive({ + keyboard_hint: interactive({ base: { - ...text(layer, "sans", "variant", { size: "sm" }), + ...text(theme.lowest, "sans", "variant", { size: "sm" }), padding: { top: 3, left: 8, @@ -61,32 +60,32 @@ export default function workspace(colorScheme: ColorScheme): any { }, state: { hovered: { - ...text(layer, "sans", "active", { size: "sm" }), + ...text(theme.lowest, "sans", "active", { size: "sm" }), }, }, }), - keyboardHintWidth: 320, + keyboard_hint_width: 320, }, - joiningProjectAvatar: { + joining_project_avatar: { corner_radius: 40, width: 80, }, - joiningProjectMessage: { + joining_project_message: { padding: 12, - ...text(layer, "sans", { size: "lg" }), + ...text(theme.lowest, "sans", { size: "lg" }), }, - externalLocationMessage: { - background: background(colorScheme.middle, "accent"), - border: border(colorScheme.middle, "accent"), + external_location_message: { + background: background(theme.middle, "accent"), + border: border(theme.middle, "accent"), corner_radius: 6, padding: 12, margin: { bottom: 8, right: 8 }, - ...text(colorScheme.middle, "sans", "accent", { size: "xs" }), + ...text(theme.middle, "sans", "accent", { size: "xs" }), }, - leaderBorderOpacity: 0.7, - leaderBorderWidth: 2.0, - tabBar: tabBar(colorScheme), + leader_border_opacity: 0.7, + leader_border_width: 2.0, + tab_bar: tabBar(theme), modal: { margin: { bottom: 52, @@ -94,62 +93,62 @@ export default function workspace(colorScheme: ColorScheme): any { }, cursor: "Arrow", }, - zoomedBackground: { + zoomed_background: { cursor: "Arrow", background: is_light - ? with_opacity(background(colorScheme.lowest), 0.8) - : with_opacity(background(colorScheme.highest), 0.6), + ? with_opacity(background(theme.lowest), 0.8) + : with_opacity(background(theme.highest), 0.6), }, - zoomedPaneForeground: { + zoomed_pane_foreground: { margin: 16, - shadow: colorScheme.modal_shadow, - border: border(colorScheme.lowest, { overlay: true }), + shadow: theme.modal_shadow, + border: border(theme.lowest, { overlay: true }), }, - zoomedPanelForeground: { + zoomed_panel_foreground: { margin: 16, - border: border(colorScheme.lowest, { overlay: true }), + border: border(theme.lowest, { overlay: true }), }, dock: { left: { - border: border(layer, { right: true }), + border: border(theme.lowest, { right: true }), }, bottom: { - border: border(layer, { top: true }), + border: border(theme.lowest, { top: true }), }, right: { - border: border(layer, { left: true }), + border: border(theme.lowest, { left: true }), }, }, - paneDivider: { - color: border_color(layer), + pane_divider: { + color: border_color(theme.lowest), width: 1, }, - statusBar: statusBar(colorScheme), - titlebar: titlebar(colorScheme), + status_bar: statusBar(theme), + titlebar: titlebar(theme), toolbar: { height: 34, - background: background(colorScheme.highest), - border: border(colorScheme.highest, { bottom: true }), - itemSpacing: 8, - navButton: interactive({ + background: background(theme.highest), + border: border(theme.highest, { bottom: true }), + item_spacing: 8, + nav_button: interactive({ base: { - color: foreground(colorScheme.highest, "on"), + color: foreground(theme.highest, "on"), icon_width: 12, button_width: 24, corner_radius: 6, }, state: { hovered: { - color: foreground(colorScheme.highest, "on", "hovered"), + color: foreground(theme.highest, "on", "hovered"), background: background( - colorScheme.highest, + theme.highest, "on", "hovered" ), }, disabled: { color: foreground( - colorScheme.highest, + theme.highest, "on", "disabled" ), @@ -158,10 +157,10 @@ export default function workspace(colorScheme: ColorScheme): any { }), padding: { left: 8, right: 8, top: 4, bottom: 4 }, }, - breadcrumbHeight: 24, + breadcrumb_height: 24, breadcrumbs: interactive({ base: { - ...text(colorScheme.highest, "sans", "variant"), + ...text(theme.highest, "sans", "variant"), corner_radius: 6, padding: { left: 6, @@ -170,31 +169,31 @@ export default function workspace(colorScheme: ColorScheme): any { }, state: { hovered: { - color: foreground(colorScheme.highest, "on", "hovered"), + color: foreground(theme.highest, "on", "hovered"), background: background( - colorScheme.highest, + theme.highest, "on", "hovered" ), }, }, }), - disconnectedOverlay: { - ...text(layer, "sans"), - background: with_opacity(background(layer), 0.8), + disconnected_overlay: { + ...text(theme.lowest, "sans"), + background: with_opacity(background(theme.lowest), 0.8), }, notification: { margin: { top: 10 }, - background: background(colorScheme.middle), + background: background(theme.middle), corner_radius: 6, padding: 12, - border: border(colorScheme.middle), - shadow: colorScheme.popover_shadow, + border: border(theme.middle), + shadow: theme.popover_shadow, }, notifications: { width: 400, margin: { right: 10, bottom: 10 }, }, - dropTargetOverlayColor: with_opacity(foreground(layer, "variant"), 0.5), + drop_target_overlay_color: with_opacity(foreground(theme.lowest, "variant"), 0.5), } } diff --git a/styles/src/theme/tokens/color_scheme.ts b/styles/src/theme/tokens/color_scheme.ts index 21334fb199a19f3e1dfae2b514b80679418bca54..57793cf8dd052ad0228d4a72850c9e2ec2bfc7a4 100644 --- a/styles/src/theme/tokens/color_scheme.ts +++ b/styles/src/theme/tokens/color_scheme.ts @@ -51,29 +51,29 @@ const modal_shadow_token = (theme: ColorScheme): SingleBoxShadowToken => { type ThemeSyntaxColorTokens = Record -function syntaxHighlightStyleColorTokens( +function syntax_highlight_style_color_tokens( syntax: Syntax ): ThemeSyntaxColorTokens { - const styleKeys = Object.keys(syntax) as (keyof Syntax)[] + const style_keys = Object.keys(syntax) as (keyof Syntax)[] - return styleKeys.reduce((acc, styleKey) => { + return style_keys.reduce((acc, style_key) => { // Hack: The type of a style could be "Function" // This can happen because we have a "constructor" property on the syntax object // and a "constructor" property on the prototype of the syntax object // To work around this just assert that the type of the style is not a function - if (!syntax[styleKey] || typeof syntax[styleKey] === "function") + if (!syntax[style_key] || typeof syntax[style_key] === "function") return acc - const { color } = syntax[styleKey] as Required - return { ...acc, [styleKey]: colorToken(styleKey, color) } + const { color } = syntax[style_key] as Required + return { ...acc, [style_key]: colorToken(style_key, color) } }, {} as ThemeSyntaxColorTokens) } -const syntax_Tokens = ( +const syntax_tokens = ( theme: ColorScheme ): ColorSchemeTokens["syntax"] => { const syntax = editor(theme).syntax - return syntaxHighlightStyleColorTokens(syntax) + return syntax_highlight_style_color_tokens(syntax) } export function theme_tokens(theme: ColorScheme): ColorSchemeTokens { @@ -94,6 +94,6 @@ export function theme_tokens(theme: ColorScheme): ColorSchemeTokens { popover_shadow: popover_shadow_token(theme), modal_shadow: modal_shadow_token(theme), players: playersToken(theme), - syntax: syntax_Tokens(theme), + syntax: syntax_tokens(theme), } } diff --git a/styles/src/theme/tokens/layer.ts b/styles/src/theme/tokens/layer.ts index 10309e0d2e2bdda2f3c938ee20b1aa43d9aee4e0..a2e539092e4a9f0a4d49a74a615867e69bc6a923 100644 --- a/styles/src/theme/tokens/layer.ts +++ b/styles/src/theme/tokens/layer.ts @@ -1,6 +1,6 @@ import { SingleColorToken } from "@tokens-studio/types" import { Layer, Style, StyleSet } from "../color_scheme" -import { colorToken } from "./token" +import { color_token } from "./token" interface StyleToken { background: SingleColorToken @@ -27,36 +27,36 @@ export interface LayerToken { negative: StyleSetToken } -export const styleToken = (style: Style, name: string): StyleToken => { +export const style_token = (style: Style, name: string): StyleToken => { const token = { - background: colorToken(`${name}Background`, style.background), - border: colorToken(`${name}Border`, style.border), - foreground: colorToken(`${name}Foreground`, style.foreground), + background: color_token(`${name}Background`, style.background), + border: color_token(`${name}Border`, style.border), + foreground: color_token(`${name}Foreground`, style.foreground), } return token } -export const styleSetToken = ( - styleSet: StyleSet, +export const style_set_token = ( + style_set: StyleSet, name: string ): StyleSetToken => { const token: StyleSetToken = {} as StyleSetToken - for (const style in styleSet) { + for (const style in style_set) { const s = style as keyof StyleSet - token[s] = styleToken(styleSet[s], `${name}${style}`) + token[s] = style_token(style_set[s], `${name}${style}`) } return token } -export const layerToken = (layer: Layer, name: string): LayerToken => { +export const layer_token = (layer: Layer, name: string): LayerToken => { const token: LayerToken = {} as LayerToken - for (const styleSet in layer) { - const s = styleSet as keyof Layer - token[s] = styleSetToken(layer[s], `${name}${styleSet}`) + for (const style_set in layer) { + const s = style_set as keyof Layer + token[s] = style_set_token(layer[s], `${name}${style_set}`) } return token diff --git a/styles/src/theme/tokens/players.ts b/styles/src/theme/tokens/players.ts index 12f16343e9d08e670cb58ebe24c847a5c10786cf..68a8e676a71bb7e81d8134c75f77c05289ac4e62 100644 --- a/styles/src/theme/tokens/players.ts +++ b/styles/src/theme/tokens/players.ts @@ -1,36 +1,36 @@ import { SingleColorToken } from "@tokens-studio/types" -import { colorToken } from "./token" +import { color_token } from "./token" import { ColorScheme, Players } from "../color_scheme" export type PlayerToken = Record<"selection" | "cursor", SingleColorToken> export type PlayersToken = Record -function buildPlayerToken( - colorScheme: ColorScheme, +function build_player_token( + theme: ColorScheme, index: number ): PlayerToken { - const playerNumber = index.toString() as keyof Players + const player_number = index.toString() as keyof Players return { - selection: colorToken( + selection: color_token( `player${index}Selection`, - colorScheme.players[playerNumber].selection + theme.players[player_number].selection ), - cursor: colorToken( + cursor: color_token( `player${index}Cursor`, - colorScheme.players[playerNumber].cursor + theme.players[player_number].cursor ), } } -export const playersToken = (colorScheme: ColorScheme): PlayersToken => ({ - "0": buildPlayerToken(colorScheme, 0), - "1": buildPlayerToken(colorScheme, 1), - "2": buildPlayerToken(colorScheme, 2), - "3": buildPlayerToken(colorScheme, 3), - "4": buildPlayerToken(colorScheme, 4), - "5": buildPlayerToken(colorScheme, 5), - "6": buildPlayerToken(colorScheme, 6), - "7": buildPlayerToken(colorScheme, 7), +export const players_token = (theme: ColorScheme): PlayersToken => ({ + "0": build_player_token(theme, 0), + "1": build_player_token(theme, 1), + "2": build_player_token(theme, 2), + "3": build_player_token(theme, 3), + "4": build_player_token(theme, 4), + "5": build_player_token(theme, 5), + "6": build_player_token(theme, 6), + "7": build_player_token(theme, 7), }) diff --git a/styles/src/theme/tokens/token.ts b/styles/src/theme/tokens/token.ts index 2f1760778eaff686fdf26e03d05a0996e771ed2d..60e846ce94aafbbd98bf17948acfda983420f769 100644 --- a/styles/src/theme/tokens/token.ts +++ b/styles/src/theme/tokens/token.ts @@ -1,6 +1,6 @@ import { SingleColorToken, TokenTypes } from "@tokens-studio/types" -export function colorToken( +export function color_token( name: string, value: string, description?: string diff --git a/styles/src/themes/andromeda/LICENSE b/styles/src/themes/andromeda/LICENSE index bdd549491fac6822878157337aa5dc4d09ef53f2..9422adafa4dbd08333fb027481c2323c1d256872 100644 --- a/styles/src/themes/andromeda/LICENSE +++ b/styles/src/themes/andromeda/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/styles/src/themes/atelier/LICENSE b/styles/src/themes/atelier/LICENSE index 9f92967a0436d7118c20cf29bfb8844dba2699b1..47c46d04295dacb5373d352004286dcf1df8d3f9 100644 --- a/styles/src/themes/atelier/LICENSE +++ b/styles/src/themes/atelier/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/styles/src/themes/ayu/LICENSE b/styles/src/themes/ayu/LICENSE index 6b83ef0582f26b04f37f8b78ef5a3121b3f3a326..37a92292688fe679502eaa6be87ae5e2ce09eb03 100644 --- a/styles/src/themes/ayu/LICENSE +++ b/styles/src/themes/ayu/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/styles/src/themes/ayu/common.ts b/styles/src/themes/ayu/common.ts index 9caaee8e346d6a1706fba5d85f9140624394c1ed..2bd0bbf259aef2d9fc6c084f1da3c72379927026 100644 --- a/styles/src/themes/ayu/common.ts +++ b/styles/src/themes/ayu/common.ts @@ -15,14 +15,14 @@ export const ayu = { export const build_theme = (t: typeof dark, light: boolean) => { const color = { - lightBlue: t.syntax.tag.hex(), + light_blue: t.syntax.tag.hex(), yellow: t.syntax.func.hex(), blue: t.syntax.entity.hex(), green: t.syntax.string.hex(), teal: t.syntax.regexp.hex(), red: t.syntax.markup.hex(), orange: t.syntax.keyword.hex(), - lightYellow: t.syntax.special.hex(), + light_yellow: t.syntax.special.hex(), gray: t.syntax.comment.hex(), purple: t.syntax.constant.hex(), } @@ -55,7 +55,7 @@ export const build_theme = (t: typeof dark, light: boolean) => { cyan: color_ramp(chroma(color.teal)), blue: color_ramp(chroma(color.blue)), violet: color_ramp(chroma(color.purple)), - magenta: color_ramp(chroma(color.lightBlue)), + magenta: color_ramp(chroma(color.light_blue)), }, syntax, } diff --git a/styles/src/themes/gruvbox/LICENSE b/styles/src/themes/gruvbox/LICENSE index 2a9230614399a48916e74cfb74bd4625686c7bcb..0e18d6d7a93b8054677b18cbe8d0d1e914718452 100644 --- a/styles/src/themes/gruvbox/LICENSE +++ b/styles/src/themes/gruvbox/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/styles/src/themes/one/LICENSE b/styles/src/themes/one/LICENSE index dc07dc10ad0de56ebe0bfad8d65e82f0f5d627ef..f7637d33eafbc01c0ec8770eb9d900ddd8bca64b 100644 --- a/styles/src/themes/one/LICENSE +++ b/styles/src/themes/one/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/styles/src/themes/rose-pine/LICENSE b/styles/src/themes/rose-pine/LICENSE index dfd60136f95374fbe3e112a6051a4854b61ac4ec..12767334539540f92889031d8682d2487acc28bd 100644 --- a/styles/src/themes/rose-pine/LICENSE +++ b/styles/src/themes/rose-pine/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/styles/src/themes/sandcastle/LICENSE b/styles/src/themes/sandcastle/LICENSE index c66a06c51b46671cfe20194ac8ff545683c7a7e3..ba6559d8106fb5f9dfefc2cd0da8540c86ffdd68 100644 --- a/styles/src/themes/sandcastle/LICENSE +++ b/styles/src/themes/sandcastle/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/styles/src/themes/solarized/LICENSE b/styles/src/themes/solarized/LICENSE index 221eee6f152873e2e6c52ca4a89ac1d65118843b..2b5ddc4158b51df484a9df6e1724b9ef387860b6 100644 --- a/styles/src/themes/solarized/LICENSE +++ b/styles/src/themes/solarized/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/styles/src/themes/summercamp/LICENSE b/styles/src/themes/summercamp/LICENSE index d7525414ad01c246c21e908666064d6db4233901..dd49a64536aea1cecc98e709c923e1d7d69e23f6 100644 --- a/styles/src/themes/summercamp/LICENSE +++ b/styles/src/themes/summercamp/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. From a6f7e31bb9f5bb77d5be2dbbec87af20b085f4b1 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 29 Jun 2023 11:41:51 -0400 Subject: [PATCH 10/13] Update & format --- styles/src/build_licenses.ts | 4 +-- styles/src/build_themes.ts | 18 +++++----- styles/src/build_tokens.ts | 4 +-- styles/src/common.ts | 6 ++-- styles/src/component/icon_button.ts | 6 ++-- styles/src/component/text_button.ts | 6 ++-- styles/src/style_tree/assistant.ts | 2 +- styles/src/style_tree/command_palette.ts | 8 +++-- styles/src/style_tree/components.ts | 6 +--- styles/src/style_tree/contact_finder.ts | 4 ++- styles/src/style_tree/context_menu.ts | 4 ++- styles/src/style_tree/copilot.ts | 16 ++++++--- styles/src/style_tree/editor.ts | 12 ++----- styles/src/style_tree/feedback.ts | 4 ++- styles/src/style_tree/hover_popover.ts | 4 ++- .../style_tree/incoming_call_notification.ts | 5 ++- styles/src/style_tree/project_panel.ts | 4 ++- .../style_tree/project_shared_notification.ts | 5 ++- styles/src/style_tree/search.ts | 5 ++- .../style_tree/simple_message_notification.ts | 4 +-- .../src/style_tree/toolbar_dropdown_menu.ts | 4 ++- styles/src/style_tree/update_notification.ts | 1 - styles/src/style_tree/welcome.ts | 33 ++++++++++++++++--- styles/src/style_tree/workspace.ts | 23 ++++--------- styles/src/theme/syntax.ts | 5 ++- styles/src/theme/tokens/color_scheme.ts | 20 +++++------ styles/src/theme/tokens/players.ts | 5 +-- styles/src/themes/one/one-dark.ts | 3 +- styles/src/utils/snake_case.ts | 4 +-- 29 files changed, 127 insertions(+), 98 deletions(-) diff --git a/styles/src/build_licenses.ts b/styles/src/build_licenses.ts index 9cfaafdb750ce42207b2cfab5b2048c4ed72a50d..76c18dfee1fcb63e346d7bad8f093d57fae97dbe 100644 --- a/styles/src/build_licenses.ts +++ b/styles/src/build_licenses.ts @@ -20,7 +20,7 @@ function parse_accepted_toml(file: string): string[] { function check_licenses(themes: ThemeConfig[]) { for (const theme of themes) { - if (!theme.licenseFile) { + if (!theme.license_file) { throw Error(`Theme ${theme.name} should have a LICENSE file`) } } @@ -29,7 +29,7 @@ function check_licenses(themes: ThemeConfig[]) { function generate_license_file(themes: ThemeConfig[]) { check_licenses(themes) for (const theme of themes) { - const license_text = fs.readFileSync(theme.licenseFile).toString() + const license_text = fs.readFileSync(theme.license_file).toString() write_license(theme.name, license_text, theme.license_url) } } diff --git a/styles/src/build_themes.ts b/styles/src/build_themes.ts index 98ab8d27081dd0c0d7d58c758b343cb0f031c425..5a091719df2cf1bd115e0570d58fc84b18a66fc4 100644 --- a/styles/src/build_themes.ts +++ b/styles/src/build_themes.ts @@ -3,13 +3,11 @@ import { tmpdir } from "os" import * as path from "path" import app from "./style_tree/app" import { ColorScheme, create_color_scheme } from "./theme/color_scheme" -import snakeCase from "./utils/snake_case" import { themes } from "./themes" const assets_directory = `${__dirname}/../../assets` const temp_directory = fs.mkdtempSync(path.join(tmpdir(), "build-themes")) -// Clear existing themes function clear_themes(theme_directory: string) { if (!fs.existsSync(theme_directory)) { fs.mkdirSync(theme_directory, { recursive: true }) @@ -22,22 +20,24 @@ function clear_themes(theme_directory: string) { } } -function write_themes(color_schemes: ColorScheme[], output_directory: string) { +function write_themes(themes: ColorScheme[], output_directory: string) { clear_themes(output_directory) - for (const color_scheme of color_schemes) { - const style_tree = snakeCase(app(color_scheme)) + for (const color_scheme of themes) { + const style_tree = app(color_scheme) const style_tree_json = JSON.stringify(style_tree, null, 2) const temp_path = path.join(temp_directory, `${color_scheme.name}.json`) - const out_path = path.join(output_directory, `${color_scheme.name}.json`) + const out_path = path.join( + output_directory, + `${color_scheme.name}.json` + ) fs.writeFileSync(temp_path, style_tree_json) fs.renameSync(temp_path, out_path) console.log(`- ${out_path} created`) } } -const color_schemes: ColorScheme[] = themes.map((theme) => +const all_themes: ColorScheme[] = themes.map((theme) => create_color_scheme(theme) ) -// Write new themes to theme directory -write_themes(color_schemes, `${assets_directory}/themes`) +write_themes(all_themes, `${assets_directory}/themes`) diff --git a/styles/src/build_tokens.ts b/styles/src/build_tokens.ts index 09eed6a7b956e0f2e53865bbcf6bd470a529b72b..e33c3712e64d94d56b9b20d9317c270dd0b0aa28 100644 --- a/styles/src/build_tokens.ts +++ b/styles/src/build_tokens.ts @@ -3,7 +3,7 @@ import * as path from "path" import { ColorScheme, create_color_scheme } from "./common" import { themes } from "./themes" import { slugify } from "./utils/slugify" -import { colorSchemeTokens as color_scheme_tokens } from "./theme/tokens/color_scheme" +import { theme_tokens } from "./theme/tokens/color_scheme" const TOKENS_DIRECTORY = path.join(__dirname, "..", "target", "tokens") const TOKENS_FILE = path.join(TOKENS_DIRECTORY, "$themes.json") @@ -60,7 +60,7 @@ function write_tokens(themes: ColorScheme[], tokens_directory: string) { for (const theme of themes) { const file_name = slugify(theme.name) + ".json" - const tokens = color_scheme_tokens(theme) + const tokens = theme_tokens(theme) const tokens_json = JSON.stringify(tokens, null, 2) const out_path = path.join(tokens_directory, file_name) fs.writeFileSync(out_path, tokens_json, { mode: 0o644 }) diff --git a/styles/src/common.ts b/styles/src/common.ts index 6c90de40942c6975d218b2843b62030086257008..054b2837914c89d82ffc584a1f5ba14e5a34f8ae 100644 --- a/styles/src/common.ts +++ b/styles/src/common.ts @@ -12,12 +12,10 @@ export const font_sizes = { xs: 12, sm: 14, md: 16, - lg: 18 + lg: 18, } -export type FontWeight = - | "normal" - | "bold" +export type FontWeight = "normal" | "bold" export const font_weights: { [key: string]: FontWeight } = { normal: "normal", diff --git a/styles/src/component/icon_button.ts b/styles/src/component/icon_button.ts index 4664928d555dce2a07b2e2d1afb1ed7f3f4fcc6b..79891c2477809a1312c968241ee833b62f0922cd 100644 --- a/styles/src/component/icon_button.ts +++ b/styles/src/component/icon_button.ts @@ -11,9 +11,9 @@ export type Margin = { interface IconButtonOptions { layer?: - | ColorScheme["lowest"] - | ColorScheme["middle"] - | ColorScheme["highest"] + | ColorScheme["lowest"] + | ColorScheme["middle"] + | ColorScheme["highest"] color?: keyof ColorScheme["lowest"] margin?: Partial } diff --git a/styles/src/component/text_button.ts b/styles/src/component/text_button.ts index 64a91de7b0424945e153563d36a012380796add1..477c2515e320d5e1d4ac2b2cdaf7f8dd587cdde8 100644 --- a/styles/src/component/text_button.ts +++ b/styles/src/component/text_button.ts @@ -10,9 +10,9 @@ import { Margin } from "./icon_button" interface TextButtonOptions { layer?: - | ColorScheme["lowest"] - | ColorScheme["middle"] - | ColorScheme["highest"] + | ColorScheme["lowest"] + | ColorScheme["middle"] + | ColorScheme["highest"] color?: keyof ColorScheme["lowest"] margin?: Partial text_properties?: TextProperties diff --git a/styles/src/style_tree/assistant.ts b/styles/src/style_tree/assistant.ts index 1f14d65c8ece43db23b17fa6fec11b5987acb775..bdde221acae12f47711f46ea66c5dcc1fbb21d31 100644 --- a/styles/src/style_tree/assistant.ts +++ b/styles/src/style_tree/assistant.ts @@ -181,7 +181,7 @@ export default function assistant(theme: ColorScheme): any { }, }, }), - savedAt: { + saved_at: { margin: { left: 8 }, ...text(theme.highest, "sans", "default", { size: "xs" }), }, diff --git a/styles/src/style_tree/command_palette.ts b/styles/src/style_tree/command_palette.ts index ca9daad95b1d43b829d006a10f9e3899329adabc..289deef54b63b8b71fd24960d88508f7f7d44c98 100644 --- a/styles/src/style_tree/command_palette.ts +++ b/styles/src/style_tree/command_palette.ts @@ -6,7 +6,9 @@ import { toggleable } from "../element" export default function command_palette(theme: ColorScheme): any { const key = toggleable({ base: { - text: text(theme.highest, "mono", "variant", "default", { size: "xs" }), + text: text(theme.highest, "mono", "variant", "default", { + size: "xs", + }), corner_radius: 2, background: background(theme.highest, "on"), padding: { @@ -23,7 +25,9 @@ export default function command_palette(theme: ColorScheme): any { }, state: { active: { - text: text(theme.highest, "mono", "on", "default", { size: "xs" }), + text: text(theme.highest, "mono", "on", "default", { + size: "xs", + }), background: with_opacity(background(theme.highest, "on"), 0.2), }, }, diff --git a/styles/src/style_tree/components.ts b/styles/src/style_tree/components.ts index 6e20486631ab4dabd7b62a765f62ba7292a0b47e..db32712f41b5d0d2f8cf785ea53a2008b6a80cdf 100644 --- a/styles/src/style_tree/components.ts +++ b/styles/src/style_tree/components.ts @@ -1,8 +1,4 @@ -import { - font_families, - font_sizes, - FontWeight, -} from "../common" +import { font_families, font_sizes, FontWeight } from "../common" import { Layer, Styles, StyleSets, Style } from "../theme/color_scheme" function is_style_set(key: any): key is StyleSets { diff --git a/styles/src/style_tree/contact_finder.ts b/styles/src/style_tree/contact_finder.ts index 9f02d450d93d7bc2e8bd9d86535ef82b602a7384..e61d100264bb9713f312c27c446ff36f054e77f5 100644 --- a/styles/src/style_tree/contact_finder.ts +++ b/styles/src/style_tree/contact_finder.ts @@ -17,7 +17,9 @@ export default function contact_finder(theme: ColorScheme): any { background: background(theme.middle, "on"), corner_radius: 6, text: text(theme.middle, "mono"), - placeholder_text: text(theme.middle, "mono", "on", "disabled", { size: "xs" }), + placeholder_text: text(theme.middle, "mono", "on", "disabled", { + size: "xs", + }), selection: theme.players[0], border: border(theme.middle), padding: { diff --git a/styles/src/style_tree/context_menu.ts b/styles/src/style_tree/context_menu.ts index f111225c947af39b7fb25234de3196b61fca5735..af45942d2d56d69dcb4ca799282d71c203223eec 100644 --- a/styles/src/style_tree/context_menu.ts +++ b/styles/src/style_tree/context_menu.ts @@ -29,7 +29,9 @@ export default function context_menu(theme: ColorScheme): any { state: { hovered: { background: background(theme.middle, "hovered"), - label: text(theme.middle, "sans", "hovered", { size: "sm" }), + label: text(theme.middle, "sans", "hovered", { + size: "sm", + }), keystroke: { ...text(theme.middle, "sans", "hovered", { size: "sm", diff --git a/styles/src/style_tree/copilot.ts b/styles/src/style_tree/copilot.ts index 7b0fc5e4ea69ee26f4c750e8a0884d5e418b6799..eee6880e0cfa240ad6b9ce38bc3d7252bf1a427e 100644 --- a/styles/src/style_tree/copilot.ts +++ b/styles/src/style_tree/copilot.ts @@ -2,7 +2,6 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, svg, text } from "./components" import { interactive } from "../element" export default function copilot(theme: ColorScheme): any { - const content_width = 264 const cta_button = @@ -61,7 +60,10 @@ export default function copilot(theme: ColorScheme): any { modal: { title_text: { default: { - ...text(theme.middle, "sans", { size: "xs", weight: "bold" }), + ...text(theme.middle, "sans", { + size: "xs", + weight: "bold", + }), }, }, titlebar: { @@ -163,7 +165,10 @@ export default function copilot(theme: ColorScheme): any { }, hint: { - ...text(theme.middle, "sans", { size: "xs", color: "#838994" }), + ...text(theme.middle, "sans", { + size: "xs", + color: "#838994", + }), margin: { top: 6, bottom: 2, @@ -271,7 +276,10 @@ export default function copilot(theme: ColorScheme): any { }, hint: { - ...text(theme.middle, "sans", { size: "xs", color: "#838994" }), + ...text(theme.middle, "sans", { + size: "xs", + color: "#838994", + }), margin: { top: 24, bottom: 4, diff --git a/styles/src/style_tree/editor.ts b/styles/src/style_tree/editor.ts index 67e67e0cf0a3c7cea7454df486acd1c159669ac5..aeb84f678d41e5f4304d436ef0deec46dc5a6b62 100644 --- a/styles/src/style_tree/editor.ts +++ b/styles/src/style_tree/editor.ts @@ -191,20 +191,12 @@ export default function editor(theme: ColorScheme): any { item: autocomplete_item, hovered_item: { ...autocomplete_item, - match_highlight: foreground( - theme.middle, - "accent", - "hovered" - ), + match_highlight: foreground(theme.middle, "accent", "hovered"), background: background(theme.middle, "hovered"), }, selected_item: { ...autocomplete_item, - match_highlight: foreground( - theme.middle, - "accent", - "active" - ), + match_highlight: foreground(theme.middle, "accent", "active"), background: background(theme.middle, "active"), }, }, diff --git a/styles/src/style_tree/feedback.ts b/styles/src/style_tree/feedback.ts index ab3a40c148b54a1fd7a0a672df258707cd7f3aab..9217b609299426d5444c9e2703fe843aa98e2350 100644 --- a/styles/src/style_tree/feedback.ts +++ b/styles/src/style_tree/feedback.ts @@ -34,7 +34,9 @@ export default function feedback(theme: ColorScheme): any { }, }), button_margin: 8, - info_text_default: text(theme.highest, "sans", "default", { size: "xs" }), + info_text_default: text(theme.highest, "sans", "default", { + size: "xs", + }), link_text_default: text(theme.highest, "sans", "default", { size: "xs", underline: true, diff --git a/styles/src/style_tree/hover_popover.ts b/styles/src/style_tree/hover_popover.ts index e9a008b3c61426aaeb79beea37872cf56ed8388e..f4695057419d3adb0af4c8f46413574f6817a479 100644 --- a/styles/src/style_tree/hover_popover.ts +++ b/styles/src/style_tree/hover_popover.ts @@ -39,7 +39,9 @@ export default function hover_popover(theme: ColorScheme): any { padding: { top: 4 }, }, prose: text(theme.middle, "sans", { size: "sm" }), - diagnostic_source_highlight: { color: foreground(theme.middle, "accent") }, + diagnostic_source_highlight: { + color: foreground(theme.middle, "accent"), + }, highlight: theme.ramps.neutral(0.5).alpha(0.2).hex(), // TODO: blend was used here. Replace with something better } } diff --git a/styles/src/style_tree/incoming_call_notification.ts b/styles/src/style_tree/incoming_call_notification.ts index 91947b9da5cfca5a7eefb1a1ac571fe6a24c4ea9..ca46596e57fc46ca4fef1baa50d342b41f720c8a 100644 --- a/styles/src/style_tree/incoming_call_notification.ts +++ b/styles/src/style_tree/incoming_call_notification.ts @@ -29,7 +29,10 @@ export default function incoming_call_notification( margin: { top: -3 }, }, worktree_roots: { - ...text(theme.middle, "sans", "variant", { size: "xs", weight: "bold" }), + ...text(theme.middle, "sans", "variant", { + size: "xs", + weight: "bold", + }), margin: { top: -3 }, }, button_width: 96, diff --git a/styles/src/style_tree/project_panel.ts b/styles/src/style_tree/project_panel.ts index 346ffb7641e8c891cd567046f9716e94db9380fc..6ca37936de7ffaa8dc67398118807b8438b7f1dc 100644 --- a/styles/src/style_tree/project_panel.ts +++ b/styles/src/style_tree/project_panel.ts @@ -173,7 +173,9 @@ export default function project_panel(theme: ColorScheme): any { { default: { background: background(theme.middle, "active"), - text: text(theme.middle, "mono", "disabled", { size: "sm" }), + text: text(theme.middle, "mono", "disabled", { + size: "sm", + }), }, } ), diff --git a/styles/src/style_tree/project_shared_notification.ts b/styles/src/style_tree/project_shared_notification.ts index d93c1d65d50f1f8cc85ca1e3d051b875efa37941..ffda0f4b70812a9ff1c1ea65ac87a280c8836bad 100644 --- a/styles/src/style_tree/project_shared_notification.ts +++ b/styles/src/style_tree/project_shared_notification.ts @@ -29,7 +29,10 @@ export default function project_shared_notification( margin: { top: -3 }, }, worktree_roots: { - ...text(theme.middle, "sans", "variant", { size: "xs", weight: "bold" }), + ...text(theme.middle, "sans", "variant", { + size: "xs", + weight: "bold", + }), margin: { top: -3 }, }, button_width: 96, diff --git a/styles/src/style_tree/search.ts b/styles/src/style_tree/search.ts index da515114e7e33f4e4bd4e110176ed1918ccc4068..df260f95b79dc00a22eb3fa23c31b32d03c0007e 100644 --- a/styles/src/style_tree/search.ts +++ b/styles/src/style_tree/search.ts @@ -33,7 +33,10 @@ export default function search(theme: ColorScheme): any { return { // TODO: Add an activeMatchBackground on the rust side to differentiate between active and inactive - match_background: with_opacity(foreground(theme.highest, "accent"), 0.4), + match_background: with_opacity( + foreground(theme.highest, "accent"), + 0.4 + ), option_button: toggleable({ base: interactive({ base: { diff --git a/styles/src/style_tree/simple_message_notification.ts b/styles/src/style_tree/simple_message_notification.ts index e9567e235a4bb7dbfbc56f8cb49e5df3e5391ee8..0b5c1e0c294dc9b6f96afb9614a4841b65e2281c 100644 --- a/styles/src/style_tree/simple_message_notification.ts +++ b/styles/src/style_tree/simple_message_notification.ts @@ -2,9 +2,7 @@ import { ColorScheme } from "../theme/color_scheme" import { background, border, foreground, text } from "./components" import { interactive } from "../element" -export default function simple_message_notification( - theme: ColorScheme -): any { +export default function simple_message_notification(theme: ColorScheme): any { const header_padding = 8 return { diff --git a/styles/src/style_tree/toolbar_dropdown_menu.ts b/styles/src/style_tree/toolbar_dropdown_menu.ts index df5cc094c10619d06bf2c50af2c01def7ba29d69..dc22ac73cf09033a9f446555e871401990b0e81c 100644 --- a/styles/src/style_tree/toolbar_dropdown_menu.ts +++ b/styles/src/style_tree/toolbar_dropdown_menu.ts @@ -43,7 +43,9 @@ export default function dropdown_menu(theme: ColorScheme): any { state: { hovered: { background: background(theme.middle, "hovered"), - ...text(theme.middle, "sans", "hovered", { size: "sm" }), + ...text(theme.middle, "sans", "hovered", { + size: "sm", + }), }, }, }), diff --git a/styles/src/style_tree/update_notification.ts b/styles/src/style_tree/update_notification.ts index 48581a5d210dc2948d415c6b3919284eba601823..d14e840450f36a39bc705ac6018563bc1bf4ad81 100644 --- a/styles/src/style_tree/update_notification.ts +++ b/styles/src/style_tree/update_notification.ts @@ -2,7 +2,6 @@ import { ColorScheme } from "../theme/color_scheme" import { foreground, text } from "./components" import { interactive } from "../element" - export default function update_notification(theme: ColorScheme): any { const header_padding = 8 diff --git a/styles/src/style_tree/welcome.ts b/styles/src/style_tree/welcome.ts index 0d99ad3f77150077cb56d56629b8bb6fb6688124..fad8dfe23523ba3b1654072251adf3b466963906 100644 --- a/styles/src/style_tree/welcome.ts +++ b/styles/src/style_tree/welcome.ts @@ -32,7 +32,12 @@ export default function welcome(theme: ColorScheme): any { return { page_width: 320, - logo: svg(foreground(theme.highest, "default"), "icons/logo_96.svg", 64, 64), + logo: svg( + foreground(theme.highest, "default"), + "icons/logo_96.svg", + 64, + 64 + ), logo_subheading: { ...text(theme.highest, "sans", "variant", { size: "md" }), margin: { @@ -54,7 +59,10 @@ export default function welcome(theme: ColorScheme): any { }, checkbox_group: { border: border(theme.highest, "variant"), - background: with_opacity(background(theme.highest, "hovered"), 0.25), + background: with_opacity( + background(theme.highest, "hovered"), + 0.25 + ), corner_radius: 4, padding: { left: 12, @@ -77,11 +85,21 @@ export default function welcome(theme: ColorScheme): any { left: 7, right: 7, }, - ...text(theme.highest, "sans", "default", interactive_text_size), + ...text( + theme.highest, + "sans", + "default", + interactive_text_size + ), }, state: { hovered: { - ...text(theme.highest, "sans", "default", interactive_text_size), + ...text( + theme.highest, + "sans", + "default", + interactive_text_size + ), background: background(theme.highest, "hovered"), }, }, @@ -106,7 +124,12 @@ export default function welcome(theme: ColorScheme): any { ...text(theme.highest, "sans", interactive_text_size), // Also supports margin, container, border, etc. }, - icon: svg(foreground(theme.highest, "on"), "icons/check_12.svg", 12, 12), + icon: svg( + foreground(theme.highest, "on"), + "icons/check_12.svg", + 12, + 12 + ), default: { ...checkbox_base, background: background(theme.highest, "default"), diff --git a/styles/src/style_tree/workspace.ts b/styles/src/style_tree/workspace.ts index 82b05eab91f86c1c539c53588af1bf94e987360e..0326de414abea6e189cae93a1321fe0a8c0f4fa0 100644 --- a/styles/src/style_tree/workspace.ts +++ b/styles/src/style_tree/workspace.ts @@ -140,18 +140,10 @@ export default function workspace(theme: ColorScheme): any { state: { hovered: { color: foreground(theme.highest, "on", "hovered"), - background: background( - theme.highest, - "on", - "hovered" - ), + background: background(theme.highest, "on", "hovered"), }, disabled: { - color: foreground( - theme.highest, - "on", - "disabled" - ), + color: foreground(theme.highest, "on", "disabled"), }, }, }), @@ -170,11 +162,7 @@ export default function workspace(theme: ColorScheme): any { state: { hovered: { color: foreground(theme.highest, "on", "hovered"), - background: background( - theme.highest, - "on", - "hovered" - ), + background: background(theme.highest, "on", "hovered"), }, }, }), @@ -194,6 +182,9 @@ export default function workspace(theme: ColorScheme): any { width: 400, margin: { right: 10, bottom: 10 }, }, - drop_target_overlay_color: with_opacity(foreground(theme.lowest, "variant"), 0.5), + drop_target_overlay_color: with_opacity( + foreground(theme.lowest, "variant"), + 0.5 + ), } } diff --git a/styles/src/theme/syntax.ts b/styles/src/theme/syntax.ts index a8bf807ee0a4a533eabc971e2505e3de42e5a854..148d600713e6b92db3689a3e7d181f6c9b31332f 100644 --- a/styles/src/theme/syntax.ts +++ b/styles/src/theme/syntax.ts @@ -291,7 +291,10 @@ function build_default_syntax(color_scheme: ColorScheme): Syntax { return default_syntax } -function merge_syntax(default_syntax: Syntax, color_scheme: ColorScheme): Syntax { +function merge_syntax( + default_syntax: Syntax, + color_scheme: ColorScheme +): Syntax { if (!color_scheme.syntax) { return default_syntax } diff --git a/styles/src/theme/tokens/color_scheme.ts b/styles/src/theme/tokens/color_scheme.ts index 57793cf8dd052ad0228d4a72850c9e2ec2bfc7a4..a8ce4ec2d252de5f8ec13963c5f41ecbb8ab3424 100644 --- a/styles/src/theme/tokens/color_scheme.ts +++ b/styles/src/theme/tokens/color_scheme.ts @@ -10,9 +10,9 @@ import { SyntaxHighlightStyle, ThemeSyntax, } from "../color_scheme" -import { LayerToken, layerToken } from "./layer" -import { PlayersToken, playersToken } from "./players" -import { colorToken } from "./token" +import { LayerToken, layer_token } from "./layer" +import { PlayersToken, players_token } from "./players" +import { color_token } from "./token" import { Syntax } from "../syntax" import editor from "../../style_tree/editor" @@ -64,13 +64,11 @@ function syntax_highlight_style_color_tokens( if (!syntax[style_key] || typeof syntax[style_key] === "function") return acc const { color } = syntax[style_key] as Required - return { ...acc, [style_key]: colorToken(style_key, color) } + return { ...acc, [style_key]: color_token(style_key, color) } }, {} as ThemeSyntaxColorTokens) } -const syntax_tokens = ( - theme: ColorScheme -): ColorSchemeTokens["syntax"] => { +const syntax_tokens = (theme: ColorScheme): ColorSchemeTokens["syntax"] => { const syntax = editor(theme).syntax return syntax_highlight_style_color_tokens(syntax) @@ -88,12 +86,12 @@ export function theme_tokens(theme: ColorScheme): ColorSchemeTokens { value: theme.is_light ? "light" : "dark", type: TokenTypes.OTHER, }, - lowest: layerToken(theme.lowest, "lowest"), - middle: layerToken(theme.middle, "middle"), - highest: layerToken(theme.highest, "highest"), + lowest: layer_token(theme.lowest, "lowest"), + middle: layer_token(theme.middle, "middle"), + highest: layer_token(theme.highest, "highest"), popover_shadow: popover_shadow_token(theme), modal_shadow: modal_shadow_token(theme), - players: playersToken(theme), + players: players_token(theme), syntax: syntax_tokens(theme), } } diff --git a/styles/src/theme/tokens/players.ts b/styles/src/theme/tokens/players.ts index 68a8e676a71bb7e81d8134c75f77c05289ac4e62..545a712ff123e12aaa2dd32a9645ea64001dd061 100644 --- a/styles/src/theme/tokens/players.ts +++ b/styles/src/theme/tokens/players.ts @@ -6,10 +6,7 @@ export type PlayerToken = Record<"selection" | "cursor", SingleColorToken> export type PlayersToken = Record -function build_player_token( - theme: ColorScheme, - index: number -): PlayerToken { +function build_player_token(theme: ColorScheme, index: number): PlayerToken { const player_number = index.toString() as keyof Players return { diff --git a/styles/src/themes/one/one-dark.ts b/styles/src/themes/one/one-dark.ts index 1241668cc2a2434e3c5d6971e6eddf189a11a6f6..f672b892ee040e60745f3d0f8bd6875c743ed46a 100644 --- a/styles/src/themes/one/one-dark.ts +++ b/styles/src/themes/one/one-dark.ts @@ -25,7 +25,8 @@ export const theme: ThemeConfig = { author: "simurai", appearance: ThemeAppearance.Dark, license_type: ThemeLicenseType.MIT, - license_url: "https://github.com/atom/atom/tree/master/packages/one-dark-ui", + license_url: + "https://github.com/atom/atom/tree/master/packages/one-dark-ui", license_file: `${__dirname}/LICENSE`, input_color: { neutral: chroma diff --git a/styles/src/utils/snake_case.ts b/styles/src/utils/snake_case.ts index 38c8a90a9e864177dcea255fa5b87a87da5a9607..cdd9684752826c5606b0e0273b5286bca57c85e0 100644 --- a/styles/src/utils/snake_case.ts +++ b/styles/src/utils/snake_case.ts @@ -5,8 +5,8 @@ import { snakeCase } from "case-anything" // Typescript magic to convert any string from camelCase to snake_case at compile time type SnakeCase = S extends string ? S extends `${infer T}${infer U}` - ? `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` - : S + ? `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` + : S : S type SnakeCased = { From 8bff641cc4a4ef61a03b4a87814b8184efa6efa5 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 29 Jun 2023 11:47:58 -0400 Subject: [PATCH 11/13] Organize and update dotfiles --- styles/.eslintrc.js | 35 ----------------------------------- styles/.prettierrc | 6 ++++++ styles/package.json | 19 ++++--------------- 3 files changed, 10 insertions(+), 50 deletions(-) create mode 100644 styles/.prettierrc diff --git a/styles/.eslintrc.js b/styles/.eslintrc.js index 0b4af9dcbc29895d3e83589972106da88d401c8a..485ff73d10441b93e118bbf1a6a89ba5a5f3a8d1 100644 --- a/styles/.eslintrc.js +++ b/styles/.eslintrc.js @@ -29,40 +29,5 @@ module.exports = { rules: { "linebreak-style": ["error", "unix"], semi: ["error", "never"], - "@typescript-eslint/naming-convention": [ - "warn", - { - selector: ["property", "variableLike", "memberLike", "method"], - format: ["snake_case"], - }, - { - selector: ["typeLike"], - format: ["PascalCase"], - }, - ], - "import/no-restricted-paths": [ - "error", - { - zones: [ - { - target: [ - "./src/component/*", - "./src/element/*", - "./src/styleTree/*", - "./src/system/*", - "./src/theme/*", - "./src/themes/*", - "./src/utils/*", - ], - from: [ - "./src/types/styleTree.ts", - "./src/types/element.ts", - "./src/types/property.ts", - ], - message: "Import from `@types` instead", - }, - ], - }, - ], }, } diff --git a/styles/.prettierrc b/styles/.prettierrc new file mode 100644 index 0000000000000000000000000000000000000000..b83ccdda6a71debf8e212f52dd8cc288dd5b521b --- /dev/null +++ b/styles/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": false, + "printWidth": 80, + "htmlWhitespaceSensitivity": "strict", + "tabWidth": 4 +} diff --git a/styles/package.json b/styles/package.json index 1b90b81048faf590625091b92089d7b40c4adc9f..d82bbb7e817675ffde132e31922691ba7a117fea 100644 --- a/styles/package.json +++ b/styles/package.json @@ -1,8 +1,8 @@ { "name": "styles", "version": "1.0.0", - "description": "", - "main": "index.js", + "description": "Typescript app that builds Zed's themes", + "main": "./src/build_themes.ts", "scripts": { "build": "ts-node ./src/build_themes.ts", "build-licenses": "ts-node ./src/build_licenses.ts", @@ -10,15 +10,13 @@ "build-types": "ts-node ./src/build_types.ts", "test": "vitest" }, - "author": "", + "author": "Zed Industries (https://github.com/zed-industries/)", "license": "ISC", "dependencies": { "@tokens-studio/types": "^0.2.3", "@types/chroma-js": "^2.4.0", "@types/node": "^18.14.1", "ayu": "^8.0.1", - "bezier-easing": "^2.1.0", - "case-anything": "^2.1.10", "chroma-js": "^2.4.2", "deepmerge": "^4.3.0", "json-schema-to-typescript": "^13.0.2", @@ -26,22 +24,13 @@ "ts-deepmerge": "^6.0.3", "ts-node": "^10.9.1", "utility-types": "^3.10.0", - "vitest": "^0.32.0" - }, - "prettier": { - "semi": false, - "printWidth": 80, - "htmlWhitespaceSensitivity": "strict", - "tabWidth": 4 - }, - "devDependencies": { + "vitest": "^0.32.0", "@typescript-eslint/eslint-plugin": "^5.60.1", "@typescript-eslint/parser": "^5.60.1", "@vitest/coverage-v8": "^0.32.0", "eslint": "^8.43.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "^2.27.5", - "eslint-plugin-snakecasejs": "^2.2.0", "typescript": "^5.1.5" } } From d285d56fe31ff70ed66af502f59bba64ee606154 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 29 Jun 2023 11:48:17 -0400 Subject: [PATCH 12/13] Update package-lock.json --- styles/package-lock.json | 341 +++++---------------------------------- 1 file changed, 37 insertions(+), 304 deletions(-) diff --git a/styles/package-lock.json b/styles/package-lock.json index 6f3e98a35b481933fbdc17c2af7658ac7a2ee047..3f73a0b4e533899055b2a03e60938eb384e1e583 100644 --- a/styles/package-lock.json +++ b/styles/package-lock.json @@ -12,34 +12,28 @@ "@tokens-studio/types": "^0.2.3", "@types/chroma-js": "^2.4.0", "@types/node": "^18.14.1", + "@typescript-eslint/eslint-plugin": "^5.60.1", + "@typescript-eslint/parser": "^5.60.1", + "@vitest/coverage-v8": "^0.32.0", "ayu": "^8.0.1", - "bezier-easing": "^2.1.0", - "case-anything": "^2.1.10", "chroma-js": "^2.4.2", "deepmerge": "^4.3.0", + "eslint": "^8.43.0", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-plugin-import": "^2.27.5", "json-schema-to-typescript": "^13.0.2", "toml": "^3.0.0", "ts-deepmerge": "^6.0.3", "ts-node": "^10.9.1", + "typescript": "^5.1.5", "utility-types": "^3.10.0", "vitest": "^0.32.0" - }, - "devDependencies": { - "@typescript-eslint/eslint-plugin": "^5.60.1", - "@typescript-eslint/parser": "^5.60.1", - "@vitest/coverage-v8": "^0.32.0", - "eslint": "^8.43.0", - "eslint-import-resolver-typescript": "^3.5.5", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-snakecasejs": "^2.2.0", - "typescript": "^5.1.5" } }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -48,7 +42,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -77,8 +70,7 @@ "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", @@ -110,7 +102,6 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -125,7 +116,6 @@ "version": "4.5.1", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", - "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -134,7 +124,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", - "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -157,7 +146,6 @@ "version": "8.43.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -166,7 +154,6 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", - "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -180,7 +167,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, "engines": { "node": ">=12.22" }, @@ -192,14 +178,12 @@ "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, "engines": { "node": ">=8" } @@ -208,7 +192,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -230,7 +213,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -258,7 +240,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -271,7 +252,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, "engines": { "node": ">= 8" } @@ -280,7 +260,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -293,7 +272,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.1.tgz", "integrity": "sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==", - "dev": true, "dependencies": { "cross-spawn": "^7.0.3", "fast-glob": "^3.2.12", @@ -312,8 +290,7 @@ "node_modules/@pkgr/utils/node_modules/tslib": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", - "dev": true + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" }, "node_modules/@tokens-studio/types": { "version": "0.2.3", @@ -370,8 +347,7 @@ "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==" }, "node_modules/@types/json-schema": { "version": "7.0.12", @@ -381,8 +357,7 @@ "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, "node_modules/@types/lodash": { "version": "4.14.195", @@ -407,14 +382,12 @@ "node_modules/@types/semver": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", - "dev": true + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==" }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.1.tgz", "integrity": "sha512-KSWsVvsJsLJv3c4e73y/Bzt7OpqMCADUO846bHcuWYSYM19bldbAeDv7dYyV0jwkbMfJ2XdlzwjhXtuD7OY6bw==", - "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", "@typescript-eslint/scope-manager": "5.60.1", @@ -448,7 +421,6 @@ "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.1.tgz", "integrity": "sha512-pHWlc3alg2oSMGwsU/Is8hbm3XFbcrb6P5wIxcQW9NsYBfnrubl/GhVVD/Jm/t8HXhA2WncoIRfBtnCgRGV96Q==", - "dev": true, "dependencies": { "@typescript-eslint/scope-manager": "5.60.1", "@typescript-eslint/types": "5.60.1", @@ -475,7 +447,6 @@ "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.1.tgz", "integrity": "sha512-Dn/LnN7fEoRD+KspEOV0xDMynEmR3iSHdgNsarlXNLGGtcUok8L4N71dxUgt3YvlO8si7E+BJ5Fe3wb5yUw7DQ==", - "dev": true, "dependencies": { "@typescript-eslint/types": "5.60.1", "@typescript-eslint/visitor-keys": "5.60.1" @@ -492,7 +463,6 @@ "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.1.tgz", "integrity": "sha512-vN6UztYqIu05nu7JqwQGzQKUJctzs3/Hg7E2Yx8rz9J+4LgtIDFWjjl1gm3pycH0P3mHAcEUBd23LVgfrsTR8A==", - "dev": true, "dependencies": { "@typescript-eslint/typescript-estree": "5.60.1", "@typescript-eslint/utils": "5.60.1", @@ -519,7 +489,6 @@ "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.1.tgz", "integrity": "sha512-zDcDx5fccU8BA0IDZc71bAtYIcG9PowaOwaD8rjYbqwK7dpe/UMQl3inJ4UtUK42nOCT41jTSCwg76E62JpMcg==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -532,7 +501,6 @@ "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.1.tgz", "integrity": "sha512-hkX70J9+2M2ZT6fhti5Q2FoU9zb+GeZK2SLP1WZlvUDqdMbEKhexZODD1WodNRyO8eS+4nScvT0dts8IdaBzfw==", - "dev": true, "dependencies": { "@typescript-eslint/types": "5.60.1", "@typescript-eslint/visitor-keys": "5.60.1", @@ -559,7 +527,6 @@ "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.1.tgz", "integrity": "sha512-tiJ7FFdFQOWssFa3gqb94Ilexyw0JVxj6vBzaSpfN/8IhoKkDuSAenUKvsSHw2A/TMpJb26izIszTXaqygkvpQ==", - "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", @@ -585,7 +552,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -598,7 +564,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, "engines": { "node": ">=4.0" } @@ -607,7 +572,6 @@ "version": "5.60.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.1.tgz", "integrity": "sha512-xEYIxKcultP6E/RMKqube11pGjXH1DCo60mQoWhVYyKfLkwbIVVjYxmOenNMxILx0TjCujPTjjnTIVzm09TXIw==", - "dev": true, "dependencies": { "@typescript-eslint/types": "5.60.1", "eslint-visitor-keys": "^3.3.0" @@ -624,7 +588,6 @@ "version": "0.32.0", "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-0.32.0.tgz", "integrity": "sha512-VXXlWq9X/NbsoP/l/CHLBjutsFFww1UY1qEhzGjn/DY7Tqe+z0Nu8XKc8im/XUAmjiWsh2XV7sy/F0IKAl4eaw==", - "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.1", "@bcoe/v8-coverage": "^0.2.3", @@ -724,7 +687,6 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -741,7 +703,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -791,7 +752,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "is-array-buffer": "^3.0.1" @@ -804,7 +764,6 @@ "version": "3.1.6", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -823,7 +782,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, "engines": { "node": ">=8" } @@ -832,7 +790,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -850,7 +807,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -876,7 +832,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -899,16 +854,10 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/bezier-easing": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/bezier-easing/-/bezier-easing-2.1.0.tgz", - "integrity": "sha512-gbIqZ/eslnUFC1tjEvtz0sgx+xTK20wDnYMIA27VA04R7w6xxXQPZDbibjA9DTWZRA2CXtwHykkVzlCaAJAZig==" - }, "node_modules/big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", - "dev": true, "engines": { "node": ">=0.6" } @@ -922,7 +871,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", - "dev": true, "dependencies": { "big-integer": "^1.6.44" }, @@ -943,7 +891,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -955,7 +902,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", - "dev": true, "dependencies": { "run-applescript": "^5.0.0" }, @@ -978,7 +924,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, "dependencies": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -996,22 +941,10 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, "engines": { "node": ">=6" } }, - "node_modules/case-anything": { - "version": "2.1.10", - "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.10.tgz", - "integrity": "sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==", - "engines": { - "node": ">=12.13" - }, - "funding": { - "url": "https://github.com/sponsors/mesqueeb" - } - }, "node_modules/chai": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", @@ -1033,7 +966,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1049,7 +981,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -1092,7 +1023,6 @@ "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, "dependencies": { "color-name": "~1.1.4" }, @@ -1103,8 +1033,7 @@ "node_modules/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 + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/concat-map": { "version": "0.0.1", @@ -1132,8 +1061,7 @@ "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, "node_modules/create-require": { "version": "1.1.1", @@ -1144,7 +1072,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1204,8 +1131,7 @@ "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "node_modules/deepmerge": { "version": "4.3.0", @@ -1219,7 +1145,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", - "dev": true, "dependencies": { "bundle-name": "^3.0.0", "default-browser-id": "^3.0.0", @@ -1237,7 +1162,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", - "dev": true, "dependencies": { "bplist-parser": "^0.2.0", "untildify": "^4.0.0" @@ -1253,7 +1177,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "dev": true, "engines": { "node": ">=12" }, @@ -1265,7 +1188,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, "dependencies": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -1289,7 +1211,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, "dependencies": { "path-type": "^4.0.0" }, @@ -1301,7 +1222,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, "dependencies": { "esutils": "^2.0.2" }, @@ -1313,7 +1233,6 @@ "version": "5.15.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", - "dev": true, "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -1326,7 +1245,6 @@ "version": "1.21.2", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", - "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", "available-typed-arrays": "^1.0.5", @@ -1374,7 +1292,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3", "has": "^1.0.3", @@ -1388,7 +1305,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", - "dev": true, "dependencies": { "has": "^1.0.3" } @@ -1397,7 +1313,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -1494,7 +1409,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, "engines": { "node": ">=10" }, @@ -1506,7 +1420,6 @@ "version": "8.43.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", - "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", @@ -1562,7 +1475,6 @@ "version": "0.3.7", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", - "dev": true, "dependencies": { "debug": "^3.2.7", "is-core-module": "^2.11.0", @@ -1573,7 +1485,6 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, "dependencies": { "ms": "^2.1.1" } @@ -1582,7 +1493,6 @@ "version": "3.5.5", "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz", "integrity": "sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==", - "dev": true, "dependencies": { "debug": "^4.3.4", "enhanced-resolve": "^5.12.0", @@ -1608,7 +1518,6 @@ "version": "13.2.0", "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.0.tgz", "integrity": "sha512-jWsQfayf13NvqKUIL3Ta+CIqMnvlaIDFveWE/dpOZ9+3AMEJozsxDvKA02zync9UuvOM8rOXzsD5GqKP4OnWPQ==", - "dev": true, "dependencies": { "dir-glob": "^3.0.1", "fast-glob": "^3.2.11", @@ -1627,7 +1536,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true, "engines": { "node": ">=12" }, @@ -1639,7 +1547,6 @@ "version": "2.8.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, "dependencies": { "debug": "^3.2.7" }, @@ -1656,7 +1563,6 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, "dependencies": { "ms": "^2.1.1" } @@ -1665,7 +1571,6 @@ "version": "2.27.5", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", - "dev": true, "dependencies": { "array-includes": "^3.1.6", "array.prototype.flat": "^1.3.1", @@ -1694,7 +1599,6 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, "dependencies": { "ms": "^2.1.1" } @@ -1703,7 +1607,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, "dependencies": { "esutils": "^2.0.2" }, @@ -1715,25 +1618,14 @@ "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, "bin": { "semver": "bin/semver.js" } }, - "node_modules/eslint-plugin-snakecasejs": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-snakecasejs/-/eslint-plugin-snakecasejs-2.2.0.tgz", - "integrity": "sha512-vdQHT2VvzPpJHHPAVXjtyAZ/CfiJqNCa2d9kn6XMapWBN2Uio/nzL957TooNa6gumlHabBAhB5eSNmqwHgu8gA==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/eslint-scope": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", - "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -1749,7 +1641,6 @@ "version": "3.4.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -1761,7 +1652,6 @@ "version": "9.5.2", "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", - "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", @@ -1778,7 +1668,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -1790,7 +1679,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -1802,7 +1690,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "engines": { "node": ">=4.0" } @@ -1828,7 +1715,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", - "dev": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.1", @@ -1863,8 +1749,7 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-diff": { "version": "1.3.0", @@ -1875,7 +1760,6 @@ "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -1891,7 +1775,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -1902,20 +1785,17 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, "dependencies": { "reusify": "^1.0.4" } @@ -1924,7 +1804,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, "dependencies": { "flat-cache": "^3.0.4" }, @@ -1936,7 +1815,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1948,7 +1826,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -1964,7 +1841,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -1976,14 +1852,12 @@ "node_modules/flatted": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, "dependencies": { "is-callable": "^1.1.3" } @@ -2009,14 +1883,12 @@ "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "node_modules/function.prototype.name": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", @@ -2034,7 +1906,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2051,7 +1922,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", - "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -2077,7 +1947,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, "engines": { "node": ">=10" }, @@ -2089,7 +1958,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" @@ -2105,7 +1973,6 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.6.2.tgz", "integrity": "sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==", - "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -2136,7 +2003,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -2166,7 +2032,6 @@ "version": "13.20.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -2181,7 +2046,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, "dependencies": { "define-properties": "^1.1.3" }, @@ -2196,7 +2060,6 @@ "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -2216,7 +2079,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -2227,26 +2089,22 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/grapheme-splitter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -2258,7 +2116,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2267,7 +2124,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -2276,7 +2132,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.1" }, @@ -2288,7 +2143,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -2300,7 +2154,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -2312,7 +2165,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -2326,14 +2178,12 @@ "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" }, "node_modules/human-signals": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", - "dev": true, "engines": { "node": ">=14.18.0" } @@ -2342,7 +2192,6 @@ "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, "engines": { "node": ">= 4" } @@ -2351,7 +2200,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -2367,7 +2215,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, "engines": { "node": ">=0.8.19" } @@ -2390,7 +2237,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.2.0", "has": "^1.0.3", @@ -2404,7 +2250,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.2.0", @@ -2418,7 +2263,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, "dependencies": { "has-bigints": "^1.0.1" }, @@ -2430,7 +2274,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -2446,7 +2289,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -2458,7 +2300,6 @@ "version": "2.12.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", - "dev": true, "dependencies": { "has": "^1.0.3" }, @@ -2470,7 +2311,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -2485,7 +2325,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "dev": true, "bin": { "is-docker": "cli.js" }, @@ -2519,7 +2358,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "dev": true, "dependencies": { "is-docker": "^3.0.0" }, @@ -2537,7 +2375,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -2549,7 +2386,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, "engines": { "node": ">=0.12.0" } @@ -2558,7 +2394,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -2573,7 +2408,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -2587,7 +2421,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -2603,7 +2436,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2" }, @@ -2615,7 +2447,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -2627,7 +2458,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -2642,7 +2472,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -2657,7 +2486,6 @@ "version": "1.1.10", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", - "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -2676,7 +2504,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.2" }, @@ -2688,7 +2515,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, "dependencies": { "is-docker": "^2.0.0" }, @@ -2700,7 +2526,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, "bin": { "is-docker": "cli.js" }, @@ -2714,14 +2539,12 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true, "engines": { "node": ">=8" } @@ -2730,7 +2553,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^3.0.0", @@ -2744,7 +2566,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -2758,7 +2579,6 @@ "version": "3.1.5", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", - "dev": true, "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -2816,20 +2636,17 @@ "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" }, "node_modules/json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, "dependencies": { "minimist": "^1.2.0" }, @@ -2846,7 +2663,6 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -2870,7 +2686,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -2889,8 +2704,7 @@ "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "node_modules/loupe": { "version": "2.3.6", @@ -2934,7 +2748,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, "dependencies": { "semver": "^6.0.0" }, @@ -2949,7 +2762,6 @@ "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, "bin": { "semver": "bin/semver.js" } @@ -2988,14 +2800,12 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, "engines": { "node": ">= 8" } @@ -3004,7 +2814,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -3017,7 +2826,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, "engines": { "node": ">=12" }, @@ -3101,14 +2909,12 @@ "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, "node_modules/natural-compare-lite": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==" }, "node_modules/next-tick": { "version": "1.1.0", @@ -3124,7 +2930,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", - "dev": true, "dependencies": { "path-key": "^4.0.0" }, @@ -3139,7 +2944,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, "engines": { "node": ">=12" }, @@ -3159,7 +2963,6 @@ "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3168,7 +2971,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -3177,7 +2979,6 @@ "version": "4.1.4", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -3195,7 +2996,6 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -3220,7 +3020,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, "dependencies": { "mimic-fn": "^4.0.0" }, @@ -3235,7 +3034,6 @@ "version": "9.1.0", "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", - "dev": true, "dependencies": { "default-browser": "^4.0.0", "define-lazy-prop": "^3.0.0", @@ -3253,7 +3051,6 @@ "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, "dependencies": { "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", @@ -3284,7 +3081,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -3299,7 +3095,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -3314,7 +3109,6 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, "engines": { "node": ">=10" }, @@ -3326,7 +3120,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -3338,7 +3131,6 @@ "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, "engines": { "node": ">=8" } @@ -3355,7 +3147,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "engines": { "node": ">=8" } @@ -3363,14 +3154,12 @@ "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, "engines": { "node": ">=8" } @@ -3397,7 +3186,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, "engines": { "node": ">=8.6" }, @@ -3446,7 +3234,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, "engines": { "node": ">= 0.8.0" } @@ -3482,7 +3269,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, "engines": { "node": ">=6" } @@ -3491,7 +3277,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, "funding": [ { "type": "github", @@ -3516,7 +3301,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -3533,7 +3317,6 @@ "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, "dependencies": { "is-core-module": "^2.11.0", "path-parse": "^1.0.7", @@ -3550,7 +3333,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, "engines": { "node": ">=4" } @@ -3559,7 +3341,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } @@ -3568,7 +3349,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -3578,7 +3358,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -3608,7 +3387,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", - "dev": true, "dependencies": { "execa": "^5.0.0" }, @@ -3623,7 +3401,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -3646,7 +3423,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, "engines": { "node": ">=10.17.0" } @@ -3655,7 +3431,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, "engines": { "node": ">=8" }, @@ -3667,7 +3442,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, "engines": { "node": ">=6" } @@ -3676,7 +3450,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, "dependencies": { "path-key": "^3.0.0" }, @@ -3688,7 +3461,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, "dependencies": { "mimic-fn": "^2.1.0" }, @@ -3703,7 +3475,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, "engines": { "node": ">=6" } @@ -3712,7 +3483,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, "funding": [ { "type": "github", @@ -3735,7 +3505,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.3", @@ -3763,7 +3532,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -3775,7 +3543,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "engines": { "node": ">=8" } @@ -3784,7 +3551,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, "dependencies": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -3802,14 +3568,12 @@ "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, "engines": { "node": ">=8" } @@ -3818,7 +3582,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -3845,7 +3608,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -3862,7 +3624,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -3876,7 +3637,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -3890,7 +3650,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -3902,7 +3661,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, "engines": { "node": ">=4" } @@ -3911,7 +3669,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, "engines": { "node": ">=12" }, @@ -3923,7 +3680,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, "engines": { "node": ">=8" }, @@ -3946,7 +3702,6 @@ "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, "dependencies": { "has-flag": "^4.0.0" }, @@ -3958,7 +3713,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -3970,7 +3724,6 @@ "version": "0.8.5", "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", - "dev": true, "dependencies": { "@pkgr/utils": "^2.3.1", "tslib": "^2.5.0" @@ -3985,14 +3738,12 @@ "node_modules/synckit/node_modules/tslib": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", - "dev": true + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, "engines": { "node": ">=6" } @@ -4001,7 +3752,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -4014,8 +3764,7 @@ "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "node_modules/thenify": { "version": "3.3.1", @@ -4078,7 +3827,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", - "dev": true, "engines": { "node": ">=12" }, @@ -4090,7 +3838,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -4157,7 +3904,6 @@ "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", - "dev": true, "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.2", @@ -4168,14 +3914,12 @@ "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, "dependencies": { "tslib": "^1.8.1" }, @@ -4195,7 +3939,6 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, "dependencies": { "prelude-ls": "^1.2.1" }, @@ -4215,7 +3958,6 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, "engines": { "node": ">=10" }, @@ -4227,7 +3969,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "for-each": "^0.3.3", @@ -4258,7 +3999,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -4273,7 +4013,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true, "engines": { "node": ">=8" } @@ -4282,7 +4021,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -4304,7 +4042,6 @@ "version": "9.1.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", - "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -4318,7 +4055,6 @@ "version": "0.3.18", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", - "dev": true, "dependencies": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" @@ -4482,7 +4218,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -4497,7 +4232,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -4513,7 +4247,6 @@ "version": "1.1.9", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", - "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", From 52113282340b093319df0b5310209fb745ad3f74 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 29 Jun 2023 11:56:14 -0400 Subject: [PATCH 13/13] Delete snake_case.ts --- styles/src/utils/snake_case.ts | 36 ---------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 styles/src/utils/snake_case.ts diff --git a/styles/src/utils/snake_case.ts b/styles/src/utils/snake_case.ts deleted file mode 100644 index cdd9684752826c5606b0e0273b5286bca57c85e0..0000000000000000000000000000000000000000 --- a/styles/src/utils/snake_case.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { snakeCase } from "case-anything" - -// https://stackoverflow.com/questions/60269936/typescript-convert-generic-object-from-snake-to-camel-case - -// Typescript magic to convert any string from camelCase to snake_case at compile time -type SnakeCase = S extends string - ? S extends `${infer T}${infer U}` - ? `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` - : S - : S - -type SnakeCased = { - [Property in keyof Type as SnakeCase]: SnakeCased -} - -export default function snakeCaseTree(object: T): SnakeCased { - const snakeObject: any = {} // eslint-disable-line @typescript-eslint/no-explicit-any - for (const key in object) { - snakeObject[snakeCase(key, { keepSpecialCharacters: true })] = - snakeCaseValue(object[key]) - } - return snakeObject -} - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function snakeCaseValue(value: any): any { - if (typeof value === "object") { - if (Array.isArray(value)) { - return value.map(snakeCaseValue) - } else { - return snakeCaseTree(value) - } - } else { - return value - } -}