From e49e7abf54f58f81f36061a95d75e5f7d7543867 Mon Sep 17 00:00:00 2001 From: Moiseev Ilya Date: Tue, 17 Dec 2024 22:13:59 +0400 Subject: [PATCH 1/8] fix: eslint source tags --- .eslintrc.js | 6 +++++- package-lock.json | 22 ++++++++++------------ packages/sdk/.eslintrc.js | 8 +++++++- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9b2ebe4a7..e93d4ed88 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -33,7 +33,11 @@ module.exports = { }, { "sourceTag": "scope:ui", - "onlyDependOnLibsWithTags": ["scope:core"] + "onlyDependOnLibsWithTags": ["scope:sdk"] + }, + { + "sourceTag": "scope:ui-react", + "onlyDependOnLibsWithTags": ["scope:ui"] } ] } diff --git a/package-lock.json b/package-lock.json index 84a1c3ea9..977bc3931 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7531,8 +7531,7 @@ "node_modules/csstype": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", - "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==", - "dev": true + "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" }, "node_modules/dargs": { "version": "7.0.0", @@ -18102,7 +18101,7 @@ }, "packages/sdk": { "name": "@tonconnect/sdk", - "version": "3.0.3-beta.0", + "version": "3.0.6-beta.0", "license": "Apache-2.0", "dependencies": { "@tonconnect/isomorphic-eventsource": "^0.0.2", @@ -18606,11 +18605,12 @@ }, "packages/ui": { "name": "@tonconnect/ui", - "version": "2.0.3-beta.2", + "version": "2.0.10-beta.3", "license": "Apache-2.0", "dependencies": { - "@tonconnect/sdk": "3.0.3-beta.0", + "@tonconnect/sdk": "3.0.6-beta.0", "classnames": "^2.3.2", + "csstype": "^3.1.1", "deepmerge": "^4.2.2", "ua-parser-js": "^1.0.35" }, @@ -18620,7 +18620,6 @@ "@solid-primitives/i18n": "^1.1.2", "@types/node": "^18.11.17", "@types/ua-parser-js": "^0.7.36", - "csstype": "^3.1.1", "eslint-plugin-solid": "^0.7.3", "is-plain-object": "^5.0.0", "qrcode-generator": "^1.4.4", @@ -18638,10 +18637,10 @@ }, "packages/ui-react": { "name": "@tonconnect/ui-react", - "version": "2.0.3-beta.2", + "version": "2.0.10-beta.3", "license": "Apache-2.0", "dependencies": { - "@tonconnect/ui": "2.0.3-beta.2" + "@tonconnect/ui": "2.0.10-beta.3" }, "devDependencies": { "@types/react": "^18.0.26", @@ -23171,7 +23170,7 @@ "@floating-ui/dom": "^1.0.12", "@rollup/plugin-replace": "5.0.5", "@solid-primitives/i18n": "^1.1.2", - "@tonconnect/sdk": "3.0.3-beta.0", + "@tonconnect/sdk": "3.0.6-beta.0", "@types/node": "^18.11.17", "@types/ua-parser-js": "^0.7.36", "classnames": "^2.3.2", @@ -23342,7 +23341,7 @@ "@tonconnect/ui-react": { "version": "file:packages/ui-react", "requires": { - "@tonconnect/ui": "2.0.3-beta.2", + "@tonconnect/ui": "2.0.10-beta.3", "@types/react": "^18.0.26", "@types/react-dom": "^18.0.9", "@vitejs/plugin-react": "^3.0.0", @@ -25520,8 +25519,7 @@ "csstype": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", - "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==", - "dev": true + "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" }, "dargs": { "version": "7.0.0", diff --git a/packages/sdk/.eslintrc.js b/packages/sdk/.eslintrc.js index 821b14de2..14ec2816a 100644 --- a/packages/sdk/.eslintrc.js +++ b/packages/sdk/.eslintrc.js @@ -1,5 +1,5 @@ module.exports = { - extends: ["../../.eslintrc.js"], + extends: ['../../.eslintrc.js'], overrides: [ { files: './vite.config.ts', @@ -9,6 +9,12 @@ module.exports = { tsconfigRootDir: __dirname, createDefaultProgram: true }, + '@nx/enforce-module-boundaries': [ + 'error', + { + allow: ['scope:protocol'] + } + ] } ] }; From 3ba0c46e1160848f9aed7beea11340402c1e3ceb Mon Sep 17 00:00:00 2001 From: Moiseev Ilya Date: Tue, 18 Feb 2025 10:21:58 +0400 Subject: [PATCH 2/8] refactor: clear ts & formatting --- .gitignore | 2 + packages/sdk/src/wallets-list-manager.ts | 27 +- packages/sdk/yarn.lock | 1460 ----------------- packages/ui/README.md | 2 +- .../desktop-universal-modal/index.tsx | 2 +- packages/ui/src/library.ts | 4 +- packages/ui/src/models/colors-set.ts | 35 +- packages/ui/src/ton-connect-ui.ts | 2 +- 8 files changed, 22 insertions(+), 1512 deletions(-) delete mode 100644 packages/sdk/yarn.lock diff --git a/.gitignore b/.gitignore index 82ee25a10..ae5f1d753 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ node_modules dist .idea +.vscode +.DS_Store diff --git a/packages/sdk/src/wallets-list-manager.ts b/packages/sdk/src/wallets-list-manager.ts index a0d1aa5e1..6e9289248 100644 --- a/packages/sdk/src/wallets-list-manager.ts +++ b/packages/sdk/src/wallets-list-manager.ts @@ -60,12 +60,7 @@ export class WalletsListManager { public async getEmbeddedWallet(): Promise { const walletsList = await this.getWallets(); const embeddedWallets = walletsList.filter(isWalletInfoCurrentlyEmbedded); - - if (embeddedWallets.length !== 1) { - return null; - } - - return embeddedWallets[0]!; + return embeddedWallets.length === 1 ? embeddedWallets[0]! : null; } private async fetchWalletsList(): Promise { @@ -87,7 +82,7 @@ export class WalletsListManager { if (wrongFormatWallets.length) { logError( `Wallet(s) ${wrongFormatWallets - .map(wallet => wallet.name) + .map(wallet => (wallet as WalletInfoDTO)?.name || 'unknown') .join( ', ' )} config format is wrong. They were removed from the wallets list.` @@ -115,7 +110,7 @@ export class WalletsListManager { private walletConfigDTOListToWalletConfigList(walletConfigDTO: WalletInfoDTO[]): WalletInfo[] { return walletConfigDTO.map(walletConfigDTO => { - const walletConfigBase: WalletInfoBase = { + const walletConfig: WalletInfoBase = { name: walletConfigDTO.name, appName: walletConfigDTO.app_name, imageUrl: walletConfigDTO.image, @@ -124,8 +119,6 @@ export class WalletsListManager { platforms: walletConfigDTO.platforms }; - const walletConfig: WalletInfo = walletConfigBase as WalletInfo; - walletConfigDTO.bridge.forEach(bridge => { if (bridge.type === 'sse') { (walletConfig as WalletInfoRemote).bridgeUrl = bridge.url; @@ -133,7 +126,6 @@ export class WalletsListManager { walletConfigDTO.universal_url!; (walletConfig as WalletInfoRemote).deepLink = walletConfigDTO.deepLink; } - if (bridge.type === 'js') { const jsBridgeKey = bridge.key; (walletConfig as WalletInfoInjectable).jsBridgeKey = jsBridgeKey; @@ -143,8 +135,7 @@ export class WalletsListManager { InjectedProvider.isInsideWalletBrowser(jsBridgeKey); } }); - - return walletConfig; + return walletConfig as WalletInfo; }); } @@ -209,9 +200,9 @@ export class WalletsListManager { if (sseBridge) { if ( - !('url' in sseBridge) || + !(sseBridge && typeof sseBridge === 'object' && 'url' in sseBridge) || !(sseBridge as { url: string }).url || - !(value as { universal_url: string }).universal_url + !(value as unknown as { universal_url: string }).universal_url ) { return false; } @@ -220,7 +211,11 @@ export class WalletsListManager { const jsBridge = bridge.find(item => (item as { type: string }).type === 'js'); if (jsBridge) { - if (!('key' in jsBridge) || !(jsBridge as { key: string }).key) { + if ( + typeof jsBridge !== 'object' || + !('key' in jsBridge) || + !(jsBridge as { key: string }).key + ) { return false; } } diff --git a/packages/sdk/yarn.lock b/packages/sdk/yarn.lock deleted file mode 100644 index 874a6fee8..000000000 --- a/packages/sdk/yarn.lock +++ /dev/null @@ -1,1460 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@eslint/eslintrc@^1.3.0": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.2.tgz#58b69582f3b7271d8fa67fe5251767a5b38ea356" - integrity sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.4.0" - globals "^13.15.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" - -"@humanwhocodes/config-array@^0.10.4": - version "0.10.5" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.5.tgz#bb679745224745fff1e9a41961c1d45a49f81c04" - integrity sha512-XVVDtp+dVvRxMoxSiSfasYaG02VEe1qH5cKgMQJWhol6HwzbcqoCMJi8dAGoYAO57jhUyhI6cWuRiTcRaDaYug== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.4" - -"@humanwhocodes/gitignore-to-minimatch@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" - integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== - -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== - -"@typescript-eslint/eslint-plugin@^5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.38.1.tgz#9f05d42fa8fb9f62304cc2f5c2805e03c01c2620" - integrity sha512-ky7EFzPhqz3XlhS7vPOoMDaQnQMn+9o5ICR9CPr/6bw8HrFkzhMSxuA3gRfiJVvs7geYrSeawGJjZoZQKCOglQ== - dependencies: - "@typescript-eslint/scope-manager" "5.38.1" - "@typescript-eslint/type-utils" "5.38.1" - "@typescript-eslint/utils" "5.38.1" - debug "^4.3.4" - ignore "^5.2.0" - regexpp "^3.2.0" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/parser@^5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.38.1.tgz#c577f429f2c32071b92dff4af4f5fbbbd2414bd0" - integrity sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw== - dependencies: - "@typescript-eslint/scope-manager" "5.38.1" - "@typescript-eslint/types" "5.38.1" - "@typescript-eslint/typescript-estree" "5.38.1" - debug "^4.3.4" - -"@typescript-eslint/scope-manager@5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.38.1.tgz#f87b289ef8819b47189351814ad183e8801d5764" - integrity sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ== - dependencies: - "@typescript-eslint/types" "5.38.1" - "@typescript-eslint/visitor-keys" "5.38.1" - -"@typescript-eslint/type-utils@5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.38.1.tgz#7f038fcfcc4ade4ea76c7c69b2aa25e6b261f4c1" - integrity sha512-UU3j43TM66gYtzo15ivK2ZFoDFKKP0k03MItzLdq0zV92CeGCXRfXlfQX5ILdd4/DSpHkSjIgLLLh1NtkOJOAw== - dependencies: - "@typescript-eslint/typescript-estree" "5.38.1" - "@typescript-eslint/utils" "5.38.1" - debug "^4.3.4" - tsutils "^3.21.0" - -"@typescript-eslint/types@5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.38.1.tgz#74f9d6dcb8dc7c58c51e9fbc6653ded39e2e225c" - integrity sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg== - -"@typescript-eslint/typescript-estree@5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.1.tgz#657d858d5d6087f96b638ee383ee1cff52605a1e" - integrity sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g== - dependencies: - "@typescript-eslint/types" "5.38.1" - "@typescript-eslint/visitor-keys" "5.38.1" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/utils@5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.38.1.tgz#e3ac37d7b33d1362bb5adf4acdbe00372fb813ef" - integrity sha512-oIuUiVxPBsndrN81oP8tXnFa/+EcZ03qLqPDfSZ5xIJVm7A9V0rlkQwwBOAGtrdN70ZKDlKv+l1BeT4eSFxwXA== - dependencies: - "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.38.1" - "@typescript-eslint/types" "5.38.1" - "@typescript-eslint/typescript-estree" "5.38.1" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" - -"@typescript-eslint/visitor-keys@5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.1.tgz#508071bfc6b96d194c0afe6a65ad47029059edbc" - integrity sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA== - dependencies: - "@typescript-eslint/types" "5.38.1" - eslint-visitor-keys "^3.3.0" - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn@^8.8.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" - integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== - -ajv@^6.10.0, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - 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" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -array-includes@^3.1.4: - version "3.1.5" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" - integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - get-intrinsic "^1.1.1" - is-string "^1.0.7" - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array.prototype.flat@^1.2.5: - version "1.3.0" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" - integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.2" - es-shim-unscopables "^1.0.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -chalk@^4.0.0, chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -confusing-browser-globals@^1.0.10: - version "1.0.11" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" - integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== - -cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - -define-properties@^1.1.3, define-properties@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" - integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -enhanced-resolve@^5.0.0: - version "5.10.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" - integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: - version "1.20.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.3.tgz#90b143ff7aedc8b3d189bcfac7f1e3e3f81e9da1" - integrity sha512-AyrnaKVpMzljIdwjzrj+LxGmj8ik2LckwXacHqrJJ/jxz6dDDBcZ7I7nlHM0FvEW8MfbWJwOd+yT2XzYW49Frw== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.1.3" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - is-callable "^1.2.6" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-weakref "^1.0.2" - object-inspect "^1.12.2" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trimend "^1.0.5" - string.prototype.trimstart "^1.0.5" - unbox-primitive "^1.0.2" - -es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== - dependencies: - has "^1.0.3" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-config-airbnb-base@^15.0.0: - version "15.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz#6b09add90ac79c2f8d723a2580e07f3925afd236" - integrity sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig== - dependencies: - confusing-browser-globals "^1.0.10" - object.assign "^4.1.2" - object.entries "^1.1.5" - semver "^6.3.0" - -eslint-config-airbnb-typescript@^17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-17.0.0.tgz#360dbcf810b26bbcf2ff716198465775f1c49a07" - integrity sha512-elNiuzD0kPAPTXjFWg+lE24nMdHMtuxgYoD30OyMD6yrW1AhFZPAg27VX7d3tzOErw+dgJTNWfRSDqEcXb4V0g== - dependencies: - eslint-config-airbnb-base "^15.0.0" - -eslint-config-prettier@^8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" - integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== - -eslint-import-resolver-node@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" - integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== - dependencies: - debug "^3.2.7" - resolve "^1.20.0" - -eslint-module-utils@^2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" - integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== - dependencies: - debug "^3.2.7" - -eslint-plugin-import@^2.26.0: - version "2.26.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" - integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== - dependencies: - array-includes "^3.1.4" - array.prototype.flat "^1.2.5" - debug "^2.6.9" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.3" - has "^1.0.3" - is-core-module "^2.8.1" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.values "^1.1.5" - resolve "^1.22.0" - tsconfig-paths "^3.14.1" - -eslint-plugin-prettier@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" - integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== - dependencies: - prettier-linter-helpers "^1.0.0" - -eslint-plugin-unused-imports@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-2.0.0.tgz#d8db8c4d0cfa0637a8b51ce3fd7d1b6bc3f08520" - integrity sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A== - dependencies: - eslint-rule-composer "^0.3.0" - -eslint-rule-composer@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" - integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg== - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== - -eslint@8.22.0: - version "8.22.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.22.0.tgz#78fcb044196dfa7eef30a9d65944f6f980402c48" - integrity sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA== - dependencies: - "@eslint/eslintrc" "^1.3.0" - "@humanwhocodes/config-array" "^0.10.4" - "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" - 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.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.3.3" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - functional-red-black-tree "^1.0.1" - glob-parent "^6.0.1" - globals "^13.15.0" - globby "^11.1.0" - grapheme-splitter "^1.0.4" - ignore "^5.2.0" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - 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" - regexpp "^3.2.0" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" - text-table "^0.2.0" - v8-compile-cache "^2.0.3" - -espree@^9.3.3, espree@^9.4.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" - integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" - -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== - -fast-glob@^3.2.9: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== - 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" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== - dependencies: - reusify "^1.0.4" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - -functions-have-names@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" - integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -glob-parent@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - 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" - -globals@^13.15.0: - version "13.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" - integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== - dependencies: - type-fest "^0.20.2" - -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - 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" - -graceful-fs@^4.2.4: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== - -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== - dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-callable@^1.1.4, is-callable@^1.2.6: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-core-module@^2.8.1, is-core-module@^2.9.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" - integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== - dependencies: - has "^1.0.3" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -micromatch@^4.0.0, micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0, minimist@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -object-inspect@^1.12.2, object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== - -object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@^4.1.2, object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.entries@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" - integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.values@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" - integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - -prettier@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" - integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" - -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve@>=1.9.0, resolve@^1.20.0, resolve@^1.22.0: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.4, semver@^7.3.7: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== - dependencies: - lru-cache "^6.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -string.prototype.trimend@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" - integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - -string.prototype.trimstart@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" - integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - -strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -ts-loader@^9.4.1: - version "9.4.1" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.4.1.tgz#b6f3d82db0eac5a8295994f8cb5e4940ff6b1060" - integrity sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw== - dependencies: - chalk "^4.1.0" - enhanced-resolve "^5.0.0" - micromatch "^4.0.0" - semver "^7.3.4" - -tsconfig-paths@^3.14.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" - integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.6" - strip-bom "^3.0.0" - -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - -ttypescript@^1.5.13: - version "1.5.13" - resolved "https://registry.yarnpkg.com/ttypescript/-/ttypescript-1.5.13.tgz#c3bcb760599fe49157d30c5d5895a0023cbb7f30" - integrity sha512-KT/RBfGGlVJFqEI8cVvI3nMsmYcFvPSZh8bU0qX+pAwbi7/ABmYkzn7l/K8skw0xmYjVCoyaV6WLsBQxdadybQ== - dependencies: - resolve ">=1.9.0" - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -typescript-transform-paths@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/typescript-transform-paths/-/typescript-transform-paths-3.3.1.tgz#74526bc1b6dc575ffe269cc81833db7bd81763e1" - integrity sha512-c+8Cqd2rsRtTU68rJI0NX/OtqgBDddNs1fIxm1nCNyhn0WpoyqtpUxc1w9Ke5c5kgE4/OT5xYbKf2cf694RYEg== - dependencies: - minimatch "^3.0.4" - -typescript@^4.8.3: - version "4.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" - integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - 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" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/packages/ui/README.md b/packages/ui/README.md index 7d3e89688..870d80878 100644 --- a/packages/ui/README.md +++ b/packages/ui/README.md @@ -43,7 +43,7 @@ You can find `TonConnectUI` in global variable `TON_CONNECT_UI`, e.g. ## Create TonConnectUI instance ```ts -import TonConnectUI from '@tonconnect/ui' +import { TonConnectUI } from '@tonconnect/ui' const tonConnectUI = new TonConnectUI({ manifestUrl: 'https:///tonconnect-manifest.json', diff --git a/packages/ui/src/app/views/modals/wallets-modal/desktop-universal-modal/index.tsx b/packages/ui/src/app/views/modals/wallets-modal/desktop-universal-modal/index.tsx index c74a6ce13..965a8ce37 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/desktop-universal-modal/index.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/desktop-universal-modal/index.tsx @@ -6,7 +6,7 @@ import { QRCodeStyled, WalletsContainerStyled } from './style'; -import { ConnectAdditionalRequest, isWalletInfoRemote, WalletInfo } from '@tonconnect/sdk'; +import { ConnectAdditionalRequest, WalletInfo } from '@tonconnect/sdk'; import { appState } from 'src/app/state/app.state'; import { setLastSelectedWalletInfo } from 'src/app/state/modals-state'; import { FourWalletsItem, H1, WalletLabeledItem } from 'src/app/components'; diff --git a/packages/ui/src/library.ts b/packages/ui/src/library.ts index f9a1c2754..c7444a686 100644 --- a/packages/ui/src/library.ts +++ b/packages/ui/src/library.ts @@ -1,7 +1,5 @@ export { TonConnectUI as default } from './ton-connect-ui'; export { TonConnectUI } from './ton-connect-ui'; -export type { - UserActionEvent, -} from './tracker/types'; +export type { UserActionEvent } from './tracker/types'; export * from './models'; export * from './errors'; diff --git a/packages/ui/src/models/colors-set.ts b/packages/ui/src/models/colors-set.ts index ef6c10522..4c16db227 100644 --- a/packages/ui/src/models/colors-set.ts +++ b/packages/ui/src/models/colors-set.ts @@ -1,6 +1,10 @@ import type { Property } from 'csstype'; type Color = Property.Color; +type DeepPartial = { + [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; +}; + export type ColorsSet = { constant: { black: Color; @@ -32,33 +36,4 @@ export type ColorsSet = { }; }; -export type PartialColorsSet = { - constant?: { - black?: Color; - white?: Color; - }; - connectButton?: { - background?: Color; - foreground?: Color; - }; - accent?: Color; - telegramButton?: Color; - icon?: { - primary?: Color; - secondary?: Color; - tertiary?: Color; - success?: Color; - error?: Color; - }; - background?: { - primary?: Color; - secondary?: Color; - segment?: Color; - tint?: Color; - qr?: Color; - }; - text?: { - primary?: Color; - secondary?: Color; - }; -}; +export type PartialColorsSet = DeepPartial; diff --git a/packages/ui/src/ton-connect-ui.ts b/packages/ui/src/ton-connect-ui.ts index d10eff5f2..3f9d9bc35 100644 --- a/packages/ui/src/ton-connect-ui.ts +++ b/packages/ui/src/ton-connect-ui.ts @@ -19,7 +19,7 @@ import { TonConnectUIError } from 'src/errors/ton-connect-ui.error'; import { TonConnectUiCreateOptions } from 'src/models/ton-connect-ui-create-options'; import { PreferredWalletStorage, WalletInfoStorage } from 'src/storage'; import { - createMacrotask, createMacrotaskAsync, + createMacrotaskAsync, getSystemTheme, preloadImages, subscribeToThemeChange From eec8699aab904e2041644a2614ee8c5b55d2fb7b Mon Sep 17 00:00:00 2001 From: Moiseev Ilya Date: Thu, 27 Feb 2025 20:24:32 +0400 Subject: [PATCH 3/8] feat(protocol): add optional device info to ConnectEventError and new error code for missing features --- .../src/models/wallet-message/wallet-event/connect-event.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/protocol/src/models/wallet-message/wallet-event/connect-event.ts b/packages/protocol/src/models/wallet-message/wallet-event/connect-event.ts index 5479ec481..f614d7e76 100644 --- a/packages/protocol/src/models/wallet-message/wallet-event/connect-event.ts +++ b/packages/protocol/src/models/wallet-message/wallet-event/connect-event.ts @@ -18,6 +18,7 @@ export interface ConnectEventError { payload: { code: CONNECT_EVENT_ERROR_CODES; message: string; + device?: DeviceInfo; }; } @@ -28,7 +29,8 @@ export enum CONNECT_EVENT_ERROR_CODES { MANIFEST_CONTENT_ERROR = 3, UNKNOWN_APP_ERROR = 100, USER_REJECTS_ERROR = 300, - METHOD_NOT_SUPPORTED = 400 + METHOD_NOT_SUPPORTED = 400, + MISSING_REQUIRED_FEATURES = 430 } export type ConnectItemReply = TonAddressItemReply | TonProofItemReply; From 4e2c5b1bf72bf9462f42462c10c08ed33fde7e7c Mon Sep 17 00:00:00 2001 From: Moiseev Ilya Date: Fri, 28 Feb 2025 02:37:41 +0400 Subject: [PATCH 4/8] feat(sdk): add support for required features --- .../errors/protocol/events/connect/index.ts | 1 + .../missing-required-features.error.ts | 21 ++++++++++ .../sdk/src/models/ton-connect-options.ts | 4 ++ packages/sdk/src/models/wallet/index.ts | 5 +++ .../sdk/src/models/wallet/require-feature.ts | 11 ++++++ packages/sdk/src/models/wallet/wallet-info.ts | 13 +++++++ .../sdk/src/parsers/connect-errors-parser.ts | 13 +++---- .../provider/injected/injected-provider.ts | 15 ++++++-- .../injected/models/injected-wallet-api.ts | 2 +- packages/sdk/src/ton-connect.ts | 33 +++++++++++++++- packages/sdk/src/utils/feature-support.ts | 38 +++++++++++++++++++ packages/sdk/src/wallets-list-manager.ts | 38 +++++++++++++------ 12 files changed, 170 insertions(+), 24 deletions(-) create mode 100644 packages/sdk/src/errors/protocol/events/connect/missing-required-features.error.ts create mode 100644 packages/sdk/src/models/wallet/require-feature.ts diff --git a/packages/sdk/src/errors/protocol/events/connect/index.ts b/packages/sdk/src/errors/protocol/events/connect/index.ts index 445318956..06094d088 100644 --- a/packages/sdk/src/errors/protocol/events/connect/index.ts +++ b/packages/sdk/src/errors/protocol/events/connect/index.ts @@ -1 +1,2 @@ export { UserRejectsError } from 'src/errors/protocol/events/connect/user-rejects.error'; +export { MissingRequiredFeaturesError } from 'src/errors/protocol/events/connect/missing-required-features.error'; diff --git a/packages/sdk/src/errors/protocol/events/connect/missing-required-features.error.ts b/packages/sdk/src/errors/protocol/events/connect/missing-required-features.error.ts new file mode 100644 index 000000000..ffffaa2cc --- /dev/null +++ b/packages/sdk/src/errors/protocol/events/connect/missing-required-features.error.ts @@ -0,0 +1,21 @@ +import { DeviceInfo } from '@tonconnect/protocol'; +import { TonConnectError } from 'src/errors/ton-connect.error'; + +/** + * Thrown when wallet can't get manifest by passed manifestUrl. + */ +export class MissingRequiredFeaturesError extends TonConnectError { + declare cause: { + device: DeviceInfo; + }; + + protected get info(): string { + return 'Missing required features. You need to update your wallet.'; + } + + constructor(...args: ConstructorParameters) { + super(...args); + + Object.setPrototypeOf(this, MissingRequiredFeaturesError.prototype); + } +} diff --git a/packages/sdk/src/models/ton-connect-options.ts b/packages/sdk/src/models/ton-connect-options.ts index fa88a44ab..fdd8b2fad 100644 --- a/packages/sdk/src/models/ton-connect-options.ts +++ b/packages/sdk/src/models/ton-connect-options.ts @@ -1,6 +1,8 @@ +import { Feature } from '@tonconnect/protocol'; import { IStorage } from 'src/storage/models/storage.interface'; import { EventDispatcher } from 'src/tracker/event-dispatcher'; import { SdkActionEvent } from 'src/tracker/types'; +import { RequireFeature } from './wallet'; /** * TonConnect constructor options @@ -35,6 +37,8 @@ export interface TonConnectOptions { */ walletsListCacheTTLMs?: number; + walletsRequiredFeatures?: RequireFeature[] | ((features: Feature[]) => boolean); + /** * Allows to disable auto pause/unpause SSE connection on 'document.visibilitychange' event. It is not recommended to change default behaviour. */ diff --git a/packages/sdk/src/models/wallet/index.ts b/packages/sdk/src/models/wallet/index.ts index ba4551227..595e33e06 100644 --- a/packages/sdk/src/models/wallet/index.ts +++ b/packages/sdk/src/models/wallet/index.ts @@ -19,3 +19,8 @@ export { isWalletInfoRemote, isWalletInfoInjected } from './wallet-info'; +export { + RequireFeature, + RequireSendTransactionFeature, + RequireSignDataFeature +} from './require-feature'; diff --git a/packages/sdk/src/models/wallet/require-feature.ts b/packages/sdk/src/models/wallet/require-feature.ts new file mode 100644 index 000000000..02a33d203 --- /dev/null +++ b/packages/sdk/src/models/wallet/require-feature.ts @@ -0,0 +1,11 @@ +export type RequireFeature = RequireSendTransactionFeature | RequireSignDataFeature + +export type RequireSendTransactionFeature = { + name: 'SendTransaction'; + minMessages?: number; + extraCurrencyRequired?: boolean; +}; + +export type RequireSignDataFeature = { + name: 'SignData'; +}; diff --git a/packages/sdk/src/models/wallet/wallet-info.ts b/packages/sdk/src/models/wallet/wallet-info.ts index e3d0cd905..77a9f7fb6 100644 --- a/packages/sdk/src/models/wallet/wallet-info.ts +++ b/packages/sdk/src/models/wallet/wallet-info.ts @@ -1,3 +1,5 @@ +import { Feature } from "@tonconnect/protocol"; + /** * Common information for injectable and http-compatible wallets. */ @@ -27,6 +29,16 @@ export interface WalletInfoBase { */ aboutUrl: string; + /** + * List of features supported by the wallet. + */ + features?: Feature[]; + + /** + * Indicates if the wallet supports required features. + */ + isSupportRequiredFeatures: boolean; + /** * OS and browsers where the wallet could be installed */ @@ -119,6 +131,7 @@ export interface WalletInfoDTO { tondns?: string; about_url: string; universal_url?: string; + features?: Feature[]; platforms: ( | 'ios' | 'android' diff --git a/packages/sdk/src/parsers/connect-errors-parser.ts b/packages/sdk/src/parsers/connect-errors-parser.ts index cec9df049..a94803bdb 100644 --- a/packages/sdk/src/parsers/connect-errors-parser.ts +++ b/packages/sdk/src/parsers/connect-errors-parser.ts @@ -4,6 +4,7 @@ import { ManifestNotFoundError } from 'src/errors/protocol/events/connect/manife import { TonConnectError } from 'src/errors/ton-connect.error'; import { UnknownError } from 'src/errors/unknown.error'; import { CONNECT_EVENT_ERROR_CODES, ConnectEventError } from '@tonconnect/protocol'; +import { MissingRequiredFeaturesError } from 'src/errors/protocol/events/connect/missing-required-features.error'; const connectEventErrorsCodes: Partial> = { @@ -12,18 +13,16 @@ const connectEventErrorsCodes: Partial implements InternalProv return false; } - public static getCurrentlyInjectedWallets(): WalletInfoCurrentlyInjected[] { + public static getCurrentlyInjectedWallets( + checkRequiredFeatures: (features: Feature[] | undefined) => boolean + ): WalletInfoCurrentlyInjected[] { if (!this.window) { return []; } @@ -66,7 +69,11 @@ export class InjectedProvider implements InternalProv jsBridgeKey, injected: true, embedded: wallet.tonconnect.isWalletBrowser, - platforms: wallet.tonconnect.walletInfo.platforms + platforms: wallet.tonconnect.walletInfo.platforms, + features: wallet.tonconnect.walletInfo.features, + isSupportRequiredFeatures: checkRequiredFeatures( + wallet.tonconnect.walletInfo.features + ), })); } @@ -184,7 +191,9 @@ export class InjectedProvider implements InternalProv ): Promise>>; public async sendRequest( request: WithoutId>, - optionsOrOnRequestSent?: (() => void) | { onRequestSent?: () => void; signal?: AbortSignal; attempts?: number } + optionsOrOnRequestSent?: + | (() => void) + | { onRequestSent?: () => void; signal?: AbortSignal; attempts?: number } ): Promise>> { // TODO: remove deprecated method const options: { diff --git a/packages/sdk/src/provider/injected/models/injected-wallet-api.ts b/packages/sdk/src/provider/injected/models/injected-wallet-api.ts index 975d7235d..db867b5df 100644 --- a/packages/sdk/src/provider/injected/models/injected-wallet-api.ts +++ b/packages/sdk/src/provider/injected/models/injected-wallet-api.ts @@ -14,7 +14,7 @@ export interface InjectedWalletApi { deviceInfo: DeviceInfo; walletInfo: Pick< WalletInfoDTO, - 'name' | 'app_name' | 'tondns' | 'image' | 'about_url' | 'platforms' + 'name' | 'app_name' | 'tondns' | 'image' | 'about_url' | 'platforms' | 'features' >; protocolVersion: number; isWalletBrowser: boolean; diff --git a/packages/sdk/src/ton-connect.ts b/packages/sdk/src/ton-connect.ts index 5bb4c3f67..3a54b39f6 100644 --- a/packages/sdk/src/ton-connect.ts +++ b/packages/sdk/src/ton-connect.ts @@ -1,8 +1,10 @@ import { + CONNECT_EVENT_ERROR_CODES, ConnectEventError, ConnectEventSuccess, ConnectItem, ConnectRequest, + Feature, SendTransactionRpcResponseSuccess, TonAddressItemReply, TonProofItemReply, @@ -16,6 +18,7 @@ import { WalletAlreadyConnectedError } from 'src/errors/wallet/wallet-already-co import { WalletNotConnectedError } from 'src/errors/wallet/wallet-not-connected.error'; import { Account, + RequireFeature, Wallet, WalletConnectionSource, WalletConnectionSourceHTTP, @@ -39,7 +42,10 @@ import { ITonConnect } from 'src/ton-connect.interface'; import { getDocument, getWebPageManifest } from 'src/utils/web-api'; import { WalletsListManager } from 'src/wallets-list-manager'; import { WithoutIdDistributive } from 'src/utils/types'; -import { checkSendTransactionSupport } from 'src/utils/feature-support'; +import { + checkSendTransactionSupport, + checkRequiredWalletFeatures +} from 'src/utils/feature-support'; import { callForSuccess } from 'src/utils/call-for-success'; import { logDebug, logError } from 'src/utils/log'; import { createAbortController } from 'src/utils/create-abort-controller'; @@ -90,6 +96,11 @@ export class TonConnect implements ITonConnect { private statusChangeErrorSubscriptions: ((err: TonConnectError) => void)[] = []; + private readonly walletsRequiredFeatures: + | RequireFeature[] + | ((features: Feature[]) => boolean) + | undefined; + private abortController?: AbortController; /** @@ -124,9 +135,12 @@ export class TonConnect implements ITonConnect { storage: options?.storage || new DefaultStorage() }; + this.walletsRequiredFeatures = options?.walletsRequiredFeatures; + this.walletsList = new WalletsListManager({ walletsListSource: options?.walletsListSource, - cacheTTLMs: options?.walletsListCacheTTLMs + cacheTTLMs: options?.walletsListCacheTTLMs, + walletsRequiredFeatures: options?.walletsRequiredFeatures }); this.tracker = new TonConnectTracker({ @@ -568,6 +582,21 @@ export class TonConnect implements ITonConnect { throw new TonConnectError('ton_addr connection item was not found'); } + const hasRequiredFeatures = checkRequiredWalletFeatures( + connectEvent.device.features, + this.walletsRequiredFeatures ?? [] + ); + + if (!hasRequiredFeatures) { + this.provider?.disconnect(); + this.walletEventsListener({ event: 'connect_error', payload: { + code: CONNECT_EVENT_ERROR_CODES.MISSING_REQUIRED_FEATURES, + message: 'Wallet does not support required features', + device: connectEvent.device + } }); + return; + } + const wallet: Wallet = { device: connectEvent.device, provider: this.provider!.type, diff --git a/packages/sdk/src/utils/feature-support.ts b/packages/sdk/src/utils/feature-support.ts index b21a19194..187c55070 100644 --- a/packages/sdk/src/utils/feature-support.ts +++ b/packages/sdk/src/utils/feature-support.ts @@ -1,6 +1,7 @@ import { Feature, SendTransactionFeature } from '@tonconnect/protocol'; import { logWarning } from 'src/utils/log'; import { WalletNotSupportFeatureError } from 'src/errors/wallet/wallet-not-support-feature.error'; +import { RequireFeature } from 'src/models'; export function checkSendTransactionSupport( features: Feature[], @@ -36,3 +37,40 @@ export function checkSendTransactionSupport( "Connected wallet didn't provide information about max allowed messages in the SendTransaction request. Request may be rejected by the wallet." ); } + +export function checkRequiredWalletFeatures( + features: Feature[], + walletsRequiredFeatures: RequireFeature[] | ((features: Feature[]) => boolean) +): boolean { + if (typeof walletsRequiredFeatures === 'function') { + return walletsRequiredFeatures(features); + } + + const res = walletsRequiredFeatures.every(requiredFeature => { + const feature = features.find(f => typeof f === 'object' && f.name === requiredFeature.name); + + if (!feature) { + return false; + } + + switch (requiredFeature.name) { + case 'SendTransaction': { + const sendTransactionFeature = feature as SendTransactionFeature; + const correctMessagesNumber = + requiredFeature.minMessages === undefined || + requiredFeature.minMessages <= sendTransactionFeature.maxMessages; + const correctExtraCurrency = + !requiredFeature.extraCurrencyRequired || + sendTransactionFeature.extraCurrencySupported; + + return correctMessagesNumber && correctExtraCurrency; + } + case 'SignData': + return true; + default: + return false; + } + }); + + return res; +} \ No newline at end of file diff --git a/packages/sdk/src/wallets-list-manager.ts b/packages/sdk/src/wallets-list-manager.ts index 6e9289248..27a1829c7 100644 --- a/packages/sdk/src/wallets-list-manager.ts +++ b/packages/sdk/src/wallets-list-manager.ts @@ -12,6 +12,9 @@ import { import { InjectedProvider } from 'src/provider/injected/injected-provider'; import { logError } from 'src/utils/log'; import { FALLBACK_WALLETS_LIST } from 'src/resources/fallback-wallets-list'; +import { Feature } from '@tonconnect/protocol'; +import { RequireFeature } from './models'; +import { checkRequiredWalletFeatures } from './utils/feature-support'; export class WalletsListManager { private walletsListCache: Promise | null = null; @@ -20,17 +23,24 @@ export class WalletsListManager { private readonly cacheTTLMs: number | undefined; - private readonly walletsListSource: string = - 'https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets-v2.json'; + private readonly walletsListSource: string; - constructor(options?: { walletsListSource?: string; cacheTTLMs?: number }) { - if (options?.walletsListSource) { - this.walletsListSource = options.walletsListSource; - } + private readonly checkRequiredFeatures: (features: Feature[] | undefined) => boolean; - if (options?.cacheTTLMs) { - this.cacheTTLMs = options.cacheTTLMs; - } + constructor(options?: { + walletsListSource?: string; + cacheTTLMs?: number; + walletsRequiredFeatures?: RequireFeature[] | ((features: Feature[]) => boolean); + }) { + this.walletsListSource = + options?.walletsListSource ?? + 'https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets-v2.json'; + + this.cacheTTLMs = options?.cacheTTLMs; + + this.checkRequiredFeatures = options?.walletsRequiredFeatures + ? features => checkRequiredWalletFeatures(features ?? [], options.walletsRequiredFeatures!) + : () => true; } public async getWallets(): Promise { @@ -97,7 +107,9 @@ export class WalletsListManager { let currentlyInjectedWallets: WalletInfoCurrentlyInjected[] = []; try { - currentlyInjectedWallets = InjectedProvider.getCurrentlyInjectedWallets(); + currentlyInjectedWallets = InjectedProvider.getCurrentlyInjectedWallets( + this.checkRequiredFeatures + ); } catch (e) { logError(e); } @@ -116,7 +128,11 @@ export class WalletsListManager { imageUrl: walletConfigDTO.image, aboutUrl: walletConfigDTO.about_url, tondns: walletConfigDTO.tondns, - platforms: walletConfigDTO.platforms + platforms: walletConfigDTO.platforms, + features: walletConfigDTO.features, + isSupportRequiredFeatures: this.checkRequiredFeatures( + walletConfigDTO.features + ) }; walletConfigDTO.bridge.forEach(bridge => { From 24d33df27b52fbbfbbe69b74cdf2e0df8d049802 Mon Sep 17 00:00:00 2001 From: Moiseev Ilya Date: Fri, 28 Feb 2025 02:52:30 +0400 Subject: [PATCH 5/8] feat(ui): add support for required features --- packages/ui/src/app/assets/i18n/en.json | 12 +- packages/ui/src/app/assets/i18n/ru.json | 12 +- .../app/components/icons/exclamation-icon.tsx | 60 ++++++++++ .../wallet-item/wallet-labeled-item.tsx | 2 + packages/ui/src/app/state/app.state.ts | 3 +- .../all-wallets-list-modal/index.tsx | 103 +++++++++++++++++- .../all-wallets-list-modal/style.ts | 39 ++++++- .../desktop-connection-modal/index.tsx | 102 +++++++++++++---- .../desktop-connection-modal/style.ts | 11 +- .../desktop-universal-modal/index.tsx | 39 ++++++- .../mobile-connection-modal/index.tsx | 1 + .../mobile-universal-modal/index.tsx | 94 +++++++++++----- .../wallets-modal/single-wallet-modal.tsx | 3 +- .../app/views/modals/wallets-modal/style.ts | 2 - .../modals/wallets-modal/wallets-modal.tsx | 34 +++++- .../ui/src/models/ton-connect-ui-options.ts | 6 + packages/ui/src/ton-connect-ui.ts | 11 +- 17 files changed, 459 insertions(+), 75 deletions(-) create mode 100644 packages/ui/src/app/components/icons/exclamation-icon.tsx diff --git a/packages/ui/src/app/assets/i18n/en.json b/packages/ui/src/app/assets/i18n/en.json index 8174ddf9c..46cbb9797 100644 --- a/packages/ui/src/app/assets/i18n/en.json +++ b/packages/ui/src/app/assets/i18n/en.json @@ -47,13 +47,15 @@ "openWalletOnTelegramOrSelect": "Use Wallet in Telegram or choose other application", "openWalletOnTelegram": "Connect Wallet in Telegram", "chooseOtherApplication": "Choose other application", + "chooseSupportedWallets": "Choose a wallet that supports the features of the connected service", "openLink": "Open Link", "scan": "Scan with your mobile wallet" }, "desktopUniversalModal": { "connectYourWallet": "Connect your TON wallet", "scan": "Scan with your mobile wallet", - "availableWallets": "Available wallets" + "availableWallets": "Available wallets", + "chooseSupportedWallets": "Choose a wallet that supports the features of the connected service" }, "mobileConnectionModal": { "showQR": "Show QR Code", @@ -65,7 +67,11 @@ "scanQR": "Scan the QR code below with your phone’s or {{ name }}’s camera", "continueInExtension": "Continue in {{ name }} browser extension…", "dontHaveExtension": "Seems you don't have installed {{ name }} browser extension", + "missingFeatures": "Please update {{ name }}, your version does not support required features for this dApp", + "notSupportedWallet": "{{ name }} doesn’t support the requested action. Please connect another wallet that supports it", "getWallet": "Get {{ name }}", + "updateWallet": "Update {{ name }}", + "chooseAnotherWallet": "Choose Another Wallet", "continueOnDesktop": "Continue in {{ name }} on desktop…", "openWalletOnTelegram": "Connect Wallet in Telegram on desktop", "connectionDeclined": "Connection declined" @@ -79,6 +85,10 @@ "effortlessCryptoTransactions": "Effortless crypto transactions", "easilySend": "Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications.", "getAWallet": "Get a Wallet" + }, + "allWallets": { + "walletsBelowNotSupported": "The wallets below don’t support all features of the connected service. You can use your recovery phrase in one of the supported wallets above.", + "walletNotSupportService": "{{ name }} doesn’t support connected service" } }, "actionModal": { diff --git a/packages/ui/src/app/assets/i18n/ru.json b/packages/ui/src/app/assets/i18n/ru.json index d97846caa..c580ca192 100644 --- a/packages/ui/src/app/assets/i18n/ru.json +++ b/packages/ui/src/app/assets/i18n/ru.json @@ -46,6 +46,7 @@ "connectYourWallet": "Подключите TON кошелёк", "openWalletOnTelegramOrSelect": "Подключите Wallet в Telegram или выберете другое приложение", "openWalletOnTelegram": "Открыть Wallet в Telegram", + "chooseSupportedWallets": "Выберите кошелёк, поддерживающий функции подключённого сервиса", "chooseOtherApplication": "Выберите другое приложение", "openLink": "Открыть", "scan": "Отсканируйте камерой вашего телефона" @@ -53,7 +54,8 @@ "desktopUniversalModal": { "connectYourWallet": "Подключите TON кошелёк", "scan": "Отсканируйте QR-код камерой вашего телефона", - "availableWallets": "Доступные кошельки" + "availableWallets": "Доступные кошельки", + "chooseSupportedWallets": "Выберите кошелёк, поддерживающий функции подключённого сервиса" }, "mobileConnectionModal": { "showQR": "Показать QR-код", @@ -65,7 +67,11 @@ "scanQR": "Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона", "continueInExtension": "Откройте браузерное расширение {{ name }}", "dontHaveExtension": "Похоже, у вас не установлено браузерное расширение {{ name }}", + "missingFeatures": "Обновите {{ name }}, ваша версия не поддерживает необходимые функции для этого dApp", + "notSupportedWallet": "{{ name }} не поддерживает запрошенное действие. Пожалуйста, подключите другой кошелёк, который поддерживает это", "getWallet": "Скачать {{ name }}", + "updateWallet": "Обновить {{ name }}", + "chooseAnotherWallet": "Выбрать другой кошелёк", "continueOnDesktop": "Откройте {{ name }} на компьютере…", "openWalletOnTelegram": "Открыть Wallet в Telegram", "connectionDeclined": "Подключение отклонено" @@ -79,6 +85,10 @@ "effortlessCryptoTransactions": "Простые криптотранзакции", "easilySend": "Легко отправляйте, получайте и отслеживайте свои криптовалюты. Оптимизируйте свои операции с помощью децентрализованных приложений.", "getAWallet": "Скачать кошелёк" + }, + "allWallets": { + "walletsBelowNotSupported": "Кошельки ниже не поддерживают все функции подключённого сервиса. Вы можете использовать свою фразу восстановления в одном из поддерживаемых выше кошельков.", + "walletNotSupportService": "{{ name }} не поддерживает подключённый сервис" } }, "actionModal": { diff --git a/packages/ui/src/app/components/icons/exclamation-icon.tsx b/packages/ui/src/app/components/icons/exclamation-icon.tsx new file mode 100644 index 000000000..c3f9a7ab3 --- /dev/null +++ b/packages/ui/src/app/components/icons/exclamation-icon.tsx @@ -0,0 +1,60 @@ +import type { Property } from 'csstype'; +import { Component } from 'solid-js'; +import { Styleable } from 'src/app/models/styleable'; +import { useTheme } from 'solid-styled-components'; + +export interface ExclamationIconProps extends Styleable { + fill?: Property.Color; + size: '16' | '28'; +} + +export const ExclamationIcon: Component = props => { + const theme = useTheme(); + + const size = (): '16' | '28' => props.size; + const fill = (): string => props.fill || theme.colors.icon.error; + + return ( + <> + {size() === '16' ? ( + + + + + + + + + + + + + ) : size() === '28' ? ( + + + + + + ) : null} + + ); +}; diff --git a/packages/ui/src/app/components/wallet-item/wallet-labeled-item.tsx b/packages/ui/src/app/components/wallet-item/wallet-labeled-item.tsx index 642382fb2..f88366d5d 100644 --- a/packages/ui/src/app/components/wallet-item/wallet-labeled-item.tsx +++ b/packages/ui/src/app/components/wallet-item/wallet-labeled-item.tsx @@ -40,6 +40,7 @@ export const WalletLabeledItem: Component = props => { secondLine="Telegram" badgeUrl={IMG.TG} onClick={() => props.onClick()} + class={props.class} /> ) : ( = props => { secondLine={walletsSecondLine()} secondLineColorPrimary={false} onClick={() => props.onClick()} + class={props.class} /> )} diff --git a/packages/ui/src/app/state/app.state.ts b/packages/ui/src/app/state/app.state.ts index cd17bfdd3..ece5363fc 100644 --- a/packages/ui/src/app/state/app.state.ts +++ b/packages/ui/src/app/state/app.state.ts @@ -1,4 +1,4 @@ -import { ConnectAdditionalRequest, ITonConnect } from '@tonconnect/sdk'; +import { ConnectAdditionalRequest, RequireFeature, Feature, ITonConnect } from '@tonconnect/sdk'; import { createStore } from 'solid-js/store'; import { Locales } from 'src/models/locales'; import { WalletsListConfiguration } from 'src/models/wallets-list-configuration'; @@ -15,6 +15,7 @@ export type AppState = { twaReturnUrl: `${string}://${string}` | undefined; preferredWalletAppName: string | undefined; enableAndroidBackHandler: boolean; + walletsRequiredFeatures: RequireFeature[] | ((features: Feature[]) => boolean) | undefined; }; export const [appState, setAppState] = createStore({ diff --git a/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/index.tsx b/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/index.tsx index 0e0d7b0ea..0e74db12b 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/index.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/index.tsx @@ -1,15 +1,22 @@ -import { Component, For } from 'solid-js'; +import { Component, createSignal, For, Show } from 'solid-js'; import { DesktopSelectWalletModalStyled, WalletsUl, H1Styled, StyledIconButton, - WalletLabeledItemStyled + WalletLabeledItemStyled, + WalletsNotSupportedNotifier, + ErrorBoxStyled } from './style'; import { WalletInfo } from '@tonconnect/sdk'; import { isMobile } from 'src/app/hooks/isMobile'; import { supportsMobile } from 'src/app/utils/wallets'; import { ScrollContainer } from 'src/app/components/scroll-container'; +import { ExclamationIcon } from 'src/app/components/icons/exclamation-icon'; +import { Transition } from 'solid-transition-group'; +import { animate } from 'src/app/utils/animate'; +import { ErrorIcon, Text } from 'src/app/components'; + export interface DesktopSelectWalletModalProps { walletsList: WalletInfo[]; @@ -21,16 +28,42 @@ export interface DesktopSelectWalletModalProps { export const AllWalletsListModal: Component = props => { const maxHeight = (): number | undefined => (isMobile() ? undefined : 510); + const [errorSupportOpened, setErrorSupportOpened] = createSignal(null); + let timeoutId: null | ReturnType = null; + const onErrorClick = (wallet: WalletInfo): void => { + setErrorSupportOpened(wallet); + + if (timeoutId != null) { + clearTimeout(timeoutId); + } + + timeoutId = setTimeout(() => setErrorSupportOpened(null), 1500); + }; + + const handleSelectWallet = (wallet: WalletInfo): void => { + if (!wallet.isSupportRequiredFeatures) { + onErrorClick(wallet); + return; + } + props.onSelect(wallet); + }; + const walletsList = (): WalletInfo[] => isMobile() ? props.walletsList.filter(supportsMobile) : props.walletsList; + const supportedWallets = (): WalletInfo[] => + walletsList().filter(wallet => wallet.isSupportRequiredFeatures); + + const unsupportedWallets = (): WalletInfo[] => + walletsList().filter(wallet => !wallet.isSupportRequiredFeatures); + return ( props.onBack()} /> Wallets - + {wallet => (
  • = pro )} + 0}> + + + The wallets below don’t support all features of the connected service. + You can use your recovery phrase in one of the supported wallets above. + + + + + + {wallet => ( +
  • + handleSelectWallet(wallet)} + withOpacity + /> +
  • + )} +
    +
    + { + animate( + el, + [ + { opacity: 0, transform: 'translate(-50%, 44px)' }, + { opacity: 1, transform: 'translate(-50%, 0)' } + ], + { + duration: 150, + easing: 'ease-out' + } + ); + }} + onExit={(el, done) => { + animate( + el, + [ + { opacity: 1, transform: 'translate(-50%, 0)' }, + { opacity: 0, transform: 'translate(-50%, 44px)' } + ], + { + duration: 150, + easing: 'ease-out' + } + ).finished.then(() => { + done(); + }); + }} + > + + + + + {errorSupportOpened()!.name} doesn’t support connected service + + + + +
    ); diff --git a/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/style.ts b/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/style.ts index ef8faff39..150081ce9 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/style.ts +++ b/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/style.ts @@ -30,7 +30,6 @@ export const WalletsUl = styled.ul` grid-template-columns: repeat(auto-fit, 92px); grid-template-rows: auto; align-content: flex-start; - justify-content: center; row-gap: 8px; width: 100%; padding: 0 0 16px; @@ -74,6 +73,40 @@ export const StyledIconButton = styled(IconButton)` left: 16px; `; -export const WalletLabeledItemStyled = styled(WalletLabeledItem)` - height: 100%; +export const WalletLabeledItemStyled = styled(WalletLabeledItem)<{ withOpacity?: boolean }>` + opacity: ${props => (props.withOpacity ? '0.4' : '1')}; +`; + +export const WalletsNotSupportedNotifier = styled.div` + display: grid; + grid-template-columns: auto 28px; + gap: 16px; + padding: 16px; + margin-bottom: 16px; + border-radius: 16px; + color: ${props => props.theme!.colors.text.secondary}; + background: ${props => props.theme!.colors.background.tint}; + + ${media('mobile')} { + margin-left: 16px; + margin-right: 16px; + } +`; + +export const ErrorBoxStyled = styled.div` + position: absolute; + bottom: 14px; + left: 50%; + transform: translate(-50%, 0); + + text-wrap: nowrap; + display: flex; + gap: 6px; + align-items: center; + border-radius: 18px; + min-width: 126px; + padding: 9px 16px 9px 10px; + + filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.08)); + background-color: ${props => props.theme!.colors.background.segment}; `; diff --git a/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/index.tsx b/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/index.tsx index 3a505d112..2bfddb811 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/index.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/index.tsx @@ -2,6 +2,7 @@ import { ConnectAdditionalRequest, isTelegramUrl, isWalletInfoCurrentlyInjected, + MissingRequiredFeaturesError, WalletInfoInjectable, WalletInfoRemote } from '@tonconnect/sdk'; @@ -60,20 +61,34 @@ export interface DesktopConnectionProps { wallet: WalletInfoRemote | (WalletInfoRemote & WalletInfoInjectable); onBackClick: () => void; backDisabled?: boolean; + defaultError?: 'missing-features' | 'connection-declined' | 'not-supported' | null; } export const DesktopConnectionModal: Component = props => { const [mode, setMode] = createSignal<'mobile' | 'desktop' | 'extension'>('mobile'); - const [connectionErrored, setConnectionErrored] = createSignal(false); + + const [connectionErrored, setConnectionErrored] = createSignal< + 'missing-features' | 'connection-declined' | 'not-supported' | null + >(null); + + createEffect(() => { + setConnectionErrored(props.defaultError ?? null); + }); + const [universalLink, setUniversalLink] = createSignal(); const [firstClick, setFirstClick] = createSignal(true); const connector = useContext(ConnectorContext)!; const unsubscribe = connector.onStatusChange( () => {}, - () => { + error => { + if (error instanceof MissingRequiredFeaturesError) { + setConnectionErrored('missing-features'); + return; + } + if (props.wallet.appName !== AT_WALLET_APP_NAME) { - setConnectionErrored(true); + setConnectionErrored('connection-declined'); } } ); @@ -105,7 +120,7 @@ export const DesktopConnectionModal: Component = props = }); const onClickMobile = (): void => { - setConnectionErrored(false); + setConnectionErrored(null); if (mode() === 'extension') { generateUniversalLink(); } @@ -118,7 +133,7 @@ export const DesktopConnectionModal: Component = props = }; const onClickDesktop = (): void => { - setConnectionErrored(false); + setConnectionErrored(null); if (mode() === 'extension') { generateUniversalLink(); } @@ -163,7 +178,7 @@ export const DesktopConnectionModal: Component = props = }; const onClickExtension = (): void => { - setConnectionErrored(false); + setConnectionErrored(null); setMode('extension'); if (isWalletInfoCurrentlyInjected(props.wallet)) { setLastSelectedWalletInfo(props.wallet); @@ -190,7 +205,7 @@ export const DesktopConnectionModal: Component = props = props.onBackClick()} /> {props.wallet.name} - + = props = + + + + + + Please update Wallet, your version does not support required + features for this dApp + + + + + Connection declined + + + + + {props.wallet.name} doesn’t support the requested action. Please + connect another wallet that supports it. + + + + + + + + + + + + + + + + + = props = imageUrl={props.wallet.imageUrl} /> - - - - Connection declined - - - - - diff --git a/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/style.ts b/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/style.ts index a033e288d..c3cc00e60 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/style.ts +++ b/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/style.ts @@ -1,5 +1,14 @@ import { styled } from 'solid-styled-components'; -import {Button, ErrorIcon, H1, H2, IconButton, LoaderIcon, Image, QRCode} from 'src/app/components'; +import { + Button, + ErrorIcon, + H1, + H2, + IconButton, + LoaderIcon, + Image, + QRCode +} from 'src/app/components'; import { BorderRadiusConfig } from 'src/app/models/border-radius-config'; const tgButtonBorders: BorderRadiusConfig = { diff --git a/packages/ui/src/app/views/modals/wallets-modal/desktop-universal-modal/index.tsx b/packages/ui/src/app/views/modals/wallets-modal/desktop-universal-modal/index.tsx index 965a8ce37..70b513697 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/desktop-universal-modal/index.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/desktop-universal-modal/index.tsx @@ -1,4 +1,4 @@ -import { Component, createMemo, createSignal, For } from 'solid-js'; +import { Component, createMemo, createSignal, For, Show, Switch } from 'solid-js'; import { DesktopUniversalModalStyled, H2AvailableWalletsStyled, @@ -37,6 +37,26 @@ export const DesktopUniversalModal: Component = prop setLastSelectedWalletInfo({ openMethod: 'qrcode' }); const request = createMemo(() => connector.connect(walletsBridges(), props.additionalRequest)); + const supportedWallets = createMemo( + () => props.walletsList.filter(wallet => wallet.isSupportRequiredFeatures), + null + ); + + const visibleWallets = createMemo(() => supportedWallets().slice(0, 3), null); + + const fourWalletsItem = createMemo( + () => + props.walletsList + .filter(wallet => !visibleWallets().find(w => w.appName === wallet.appName)) + .slice(0, 4), + null + ); + + const hasNoSupportedWallets = createMemo( + () => supportedWallets().length === props.walletsList.length, + null + ); + return ( setPopupOpened(false)} @@ -53,11 +73,18 @@ export const DesktopUniversalModal: Component = prop disableCopy={popupOpened()} imageUrl={IMG.TON} /> - - Available wallets - + + + Choose a wallet that supports the features of the connected service + + + + + Available wallets + + - + {wallet => (
  • = prop i.imageUrl)} + images={fourWalletsItem().map(i => i.imageUrl)} onClick={() => props.onSelectAllWallets()} /> diff --git a/packages/ui/src/app/views/modals/wallets-modal/mobile-connection-modal/index.tsx b/packages/ui/src/app/views/modals/wallets-modal/mobile-connection-modal/index.tsx index f9270bded..60a2edfe5 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/mobile-connection-modal/index.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/mobile-connection-modal/index.tsx @@ -28,6 +28,7 @@ export interface MobileConnectionProps { wallet: WalletInfoRemote; onBackClick: () => void; backDisabled?: boolean; + defaultError?: 'missing-features' | 'connection-declined' | 'not-supported' | null; } export const MobileConnectionModal: Component = props => { diff --git a/packages/ui/src/app/views/modals/wallets-modal/mobile-universal-modal/index.tsx b/packages/ui/src/app/views/modals/wallets-modal/mobile-universal-modal/index.tsx index d1832433e..f8ed13b6a 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/mobile-universal-modal/index.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/mobile-universal-modal/index.tsx @@ -44,6 +44,13 @@ export const MobileUniversalModal: Component = props equals: bridgesIsEqual }); + const atWalletSupportFeatures = createMemo( + () => + props.walletsList.find(wallet => wallet.appName === AT_WALLET_APP_NAME) + ?.isSupportRequiredFeatures ?? false, + null + ); + const getUniversalLink = (): string => { if (!universalLink()) { setUniversalLink(connector.connect(walletsBridges(), props.additionalRequest)); @@ -126,6 +133,26 @@ export const MobileUniversalModal: Component = props }); }; + const supportedWallets = createMemo( + () => walletsList().filter(wallet => wallet.isSupportRequiredFeatures), + null + ); + + const visibleWallets = createMemo(() => supportedWallets().slice(0, 3), null); + + const fourWalletsItem = createMemo( + () => + walletsList() + .filter(wallet => !visibleWallets().find(w => w.appName === wallet.appName)) + .slice(0, 4), + null + ); + + const hasNoSupportedWallets = createMemo( + () => supportedWallets().length === props.walletsList.length, + null + ); + return (
    @@ -142,32 +169,45 @@ export const MobileUniversalModal: Component = props Connect your TON wallet - - Use Wallet in Telegram or choose other application - - } - rightIcon={} - onClick={onSelectTelegram} - scale="s" - > - - Connect Wallet in Telegram - - - - Choose other application - + + + Use Wallet in Telegram or choose other application + + } + rightIcon={} + onClick={onSelectTelegram} + scale="s" + > + + Connect Wallet in Telegram + + + + + + Choose a wallet that supports the features of the connected service + + + + + Choose other application + + - + {wallet => (
  • = props i.imageUrl)} + images={fourWalletsItem().map(i => i.imageUrl)} onClick={() => props.onSelectAllWallets()} />
  • diff --git a/packages/ui/src/app/views/modals/wallets-modal/single-wallet-modal.tsx b/packages/ui/src/app/views/modals/wallets-modal/single-wallet-modal.tsx index c0be5cef1..02f8dfb0c 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/single-wallet-modal.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/single-wallet-modal.tsx @@ -11,8 +11,7 @@ import { import { ConnectorContext } from 'src/app/state/connector.context'; import { getSingleWalletModalIsOpened, - getSingleWalletModalWalletInfo, - setSingleWalletModalState + getSingleWalletModalWalletInfo } from 'src/app/state/modals-state'; import { H1Styled, LoaderContainerStyled, StyledModal } from './style'; import { useI18n } from '@solid-primitives/i18n'; diff --git a/packages/ui/src/app/views/modals/wallets-modal/style.ts b/packages/ui/src/app/views/modals/wallets-modal/style.ts index 7968b5d7c..fea4b56c5 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/style.ts +++ b/packages/ui/src/app/views/modals/wallets-modal/style.ts @@ -11,8 +11,6 @@ export const StyledModal = styled(Modal)` ${media('mobile')} { padding-left: 0; padding-right: 0; - - min-height: 364px; } `; diff --git a/packages/ui/src/app/views/modals/wallets-modal/wallets-modal.tsx b/packages/ui/src/app/views/modals/wallets-modal/wallets-modal.tsx index e241607bd..547e500c2 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/wallets-modal.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/wallets-modal.tsx @@ -1,6 +1,8 @@ import { ConnectAdditionalRequest, isWalletInfoCurrentlyInjected, + MissingRequiredFeaturesError, + TonConnectError, Wallet, WalletInfo, WalletInfoRemote @@ -57,6 +59,9 @@ export const WalletsModal: Component = () => { const [fetchedWalletsList] = createResource(() => tonConnectUI!.getWallets()); const [selectedWalletInfo, setSelectedWalletInfo] = createSignal(null); + const [selectedWalletError, setSelectedWalletError] = createSignal< + 'missing-features' | 'not-supported' | null + >(null); const [selectedTab, setSelectedTab] = createSignal<'universal' | 'all-wallets'>('universal'); const [infoTab, setInfoTab] = createSignal(false); @@ -112,11 +117,29 @@ export const WalletsModal: Component = () => { tonConnectUI!.closeModal(closeReason); }; - const unsubscribe = connector.onStatusChange((wallet: Wallet | null) => { - if (wallet) { - onClose('wallet-selected'); + const unsubscribe = connector.onStatusChange( + (wallet: Wallet | null) => { + if (wallet) { + onClose('wallet-selected'); + } + }, + err => { + if (err instanceof MissingRequiredFeaturesError) { + const wallet = walletsList()?.find( + w => w.appName.toLowerCase() === err.cause.device.appName.toLowerCase() + ); + if (!wallet) { + throw new TonConnectError('Wallet not found'); + } + + const walletErrorType = wallet.isSupportRequiredFeatures + ? 'missing-features' + : 'not-supported'; + setSelectedWalletError(walletErrorType); + setSelectedWalletInfo(wallet); + } } - }); + ); const onSelectAllWallets = (): void => { setSelectedTab('all-wallets'); @@ -128,10 +151,12 @@ export const WalletsModal: Component = () => { const clearSelectedWalletInfo = (): void => { setSelectedWalletInfo(null); + setSelectedWalletError(null); }; onCleanup(() => { setSelectedWalletInfo(null); + setSelectedWalletError(null); setInfoTab(false); }); @@ -169,6 +194,7 @@ export const WalletsModal: Component = () => { wallet={selectedWalletInfo()! as WalletInfoRemote} additionalRequest={additionalRequest()} onBackClick={clearSelectedWalletInfo} + defaultError={selectedWalletError()} />
    diff --git a/packages/ui/src/models/ton-connect-ui-options.ts b/packages/ui/src/models/ton-connect-ui-options.ts index 77c5cb57a..7675850db 100644 --- a/packages/ui/src/models/ton-connect-ui-options.ts +++ b/packages/ui/src/models/ton-connect-ui-options.ts @@ -2,6 +2,7 @@ import { Locales } from 'src/models/locales'; import { UIPreferences } from 'src/models/ui-preferences'; import { WalletsListConfiguration } from 'src/models/wallets-list-configuration'; import { ActionConfiguration } from 'src/models/action-configuration'; +import { Feature, RequireFeature } from '@tonconnect/sdk'; export interface TonConnectUiOptions { /** @@ -26,6 +27,11 @@ export interface TonConnectUiOptions { */ walletsListConfiguration?: WalletsListConfiguration; + /** + * TODO: add description + */ + walletsRequiredFeatures?: RequireFeature[] | ((features: Feature[]) => boolean); + /** * Configuration for action-period (e.g. sendTransaction) UI elements: modals and notifications and wallet behaviour (return strategy). */ diff --git a/packages/ui/src/ton-connect-ui.ts b/packages/ui/src/ton-connect-ui.ts index 3f9d9bc35..ae8bab4d6 100644 --- a/packages/ui/src/ton-connect-ui.ts +++ b/packages/ui/src/ton-connect-ui.ts @@ -1,6 +1,8 @@ import type { Account, ConnectAdditionalRequest, + Feature, + RequireFeature, WalletInfoCurrentlyEmbedded } from '@tonconnect/sdk'; import { @@ -68,6 +70,8 @@ export class TonConnectUI { private readonly walletsList: Promise; + public readonly walletsRequiredFeatures?: RequireFeature[] | ((features: Feature[]) => boolean); + private connectRequestParametersCallback?: ( parameters: ConnectAdditionalRequest | undefined ) => void; @@ -195,7 +199,8 @@ export class TonConnectUI { } else if (options && 'manifestUrl' in options && options.manifestUrl) { this.connector = new TonConnect({ manifestUrl: options.manifestUrl, - eventDispatcher: options?.eventDispatcher + eventDispatcher: options.eventDispatcher, + walletsRequiredFeatures: options.walletsRequiredFeatures }); } else { throw new TonConnectUIError( @@ -232,6 +237,8 @@ export class TonConnectUI { connector: this.connector }); + this.walletsRequiredFeatures = options.walletsRequiredFeatures; + this.walletsList = this.getWallets(); this.walletsList.then(list => preloadImages(uniq(list.map(item => item.imageUrl)))); @@ -421,7 +428,7 @@ export class TonConnectUI { sendExpand(); } - const { notifications, modals, returnStrategy, twaReturnUrl, skipRedirectToWallet } = + const { notifications, modals, returnStrategy, twaReturnUrl } = this.getModalsAndNotificationsConfiguration(options); widgetController.setAction({ From ee96df48afa8bea297ce3274a089d2b0c21fb7f9 Mon Sep 17 00:00:00 2001 From: Moiseev Ilya Date: Fri, 28 Feb 2025 02:55:02 +0400 Subject: [PATCH 6/8] feat(ui-react): add required features support --- packages/ui-react/src/components/TonConnectUIProvider.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ui-react/src/components/TonConnectUIProvider.tsx b/packages/ui-react/src/components/TonConnectUIProvider.tsx index 262241095..81e174edd 100644 --- a/packages/ui-react/src/components/TonConnectUIProvider.tsx +++ b/packages/ui-react/src/components/TonConnectUIProvider.tsx @@ -6,7 +6,7 @@ import { UIPreferences, WalletsListConfiguration } from '@tonconnect/ui'; -import type { ITonConnect } from '@tonconnect/ui'; +import type { ITonConnect, Feature, RequireFeature } from '@tonconnect/ui'; import { isClientSide } from '../utils/web'; export const TonConnectUIContext = createContext(null); @@ -60,6 +60,11 @@ export interface TonConnectUIProviderPropsBase { */ walletsListConfiguration?: WalletsListConfiguration; + /** + * Required features for wallets to be displayed in the connect wallet modal. + */ + walletsRequiredFeatures?: RequireFeature[] | ((features: Feature[]) => boolean); + /** * Configuration for action-period (e.g. sendTransaction) UI elements: modals and notifications and wallet behaviour (return strategy). */ From 20b914acbc083257550724e39257b6c1cf8da2fb Mon Sep 17 00:00:00 2001 From: Moiseev Ilya Date: Mon, 3 Mar 2025 13:26:27 +0400 Subject: [PATCH 7/8] feat(ui): add error messages for missing features and unsupported wallets in mobile connection modal --- packages/ui/src/app/assets/i18n/en.json | 4 + packages/ui/src/app/assets/i18n/ru.json | 4 + .../desktop-connection-modal/index.tsx | 60 +++++----- .../mobile-connection-modal/index.tsx | 104 ++++++++++++++---- 4 files changed, 125 insertions(+), 47 deletions(-) diff --git a/packages/ui/src/app/assets/i18n/en.json b/packages/ui/src/app/assets/i18n/en.json index 46cbb9797..6c9f6ebf0 100644 --- a/packages/ui/src/app/assets/i18n/en.json +++ b/packages/ui/src/app/assets/i18n/en.json @@ -60,7 +60,11 @@ "mobileConnectionModal": { "showQR": "Show QR Code", "scanQR": "Scan the QR code below with your phone’s or {{ name }}’s camera", + "missingFeatures": "Please update {{ name }}, your version does not support required features for this dApp", + "notSupportedWallet": "{{ name }} doesn’t support the requested action. Please connect another wallet that supports it", "continueIn": "Continue in {{ name }}…", + "updateWallet": "Update {{ name }}", + "chooseAnotherWallet": "Choose Another Wallet", "connectionDeclined": "Connection declined" }, "desktopConnectionModal": { diff --git a/packages/ui/src/app/assets/i18n/ru.json b/packages/ui/src/app/assets/i18n/ru.json index c580ca192..7168ead54 100644 --- a/packages/ui/src/app/assets/i18n/ru.json +++ b/packages/ui/src/app/assets/i18n/ru.json @@ -60,7 +60,11 @@ "mobileConnectionModal": { "showQR": "Показать QR-код", "scanQR": "Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона", + "missingFeatures": "Обновите {{ name }}, ваша версия не поддерживает необходимые функции для этого dApp", + "notSupportedWallet": "{{ name }} не поддерживает запрошенное действие. Пожалуйста, подключите другой кошелёк, который поддерживает это", "continueIn": "Продолжите в {{ name }}…", + "updateWallet": "Обновить {{ name }}", + "chooseAnotherWallet": "Выбрать другой кошелёк", "connectionDeclined": "Подключение отклонено" }, "desktopConnectionModal": { diff --git a/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/index.tsx b/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/index.tsx index 2bfddb811..bb8046bf1 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/index.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/desktop-connection-modal/index.tsx @@ -244,35 +244,41 @@ export const DesktopConnectionModal: Component = props =
    - - - - - - - - - - - + + + + + + + + + + diff --git a/packages/ui/src/app/views/modals/wallets-modal/mobile-connection-modal/index.tsx b/packages/ui/src/app/views/modals/wallets-modal/mobile-connection-modal/index.tsx index 60a2edfe5..41352289b 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/mobile-connection-modal/index.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/mobile-connection-modal/index.tsx @@ -1,5 +1,15 @@ import { ConnectAdditionalRequest, isTelegramUrl, WalletInfoRemote } from '@tonconnect/sdk'; -import { Component, createMemo, createSignal, onCleanup, Show, useContext } from 'solid-js'; +import { + Component, + createEffect, + createMemo, + createSignal, + Match, + onCleanup, + Show, + Switch, + useContext +} from 'solid-js'; import { BodyStyled, BodyTextStyled, @@ -14,7 +24,7 @@ import { StyledIconButton } from './style'; import { ConnectorContext } from 'src/app/state/connector.context'; -import { Button, H3, QRIcon, RetryIcon } from 'src/app/components'; +import { Button, H3, Link, LinkIcon, QRIcon, RetryIcon } from 'src/app/components'; import { appState } from 'src/app/state/app.state'; import { setLastSelectedWalletInfo } from 'src/app/state/modals-state'; import { useTheme } from 'solid-styled-components'; @@ -35,13 +45,19 @@ export const MobileConnectionModal: Component = props => const theme = useTheme(); const [firstClick, setFirstClick] = createSignal(true); const [showQR, setShowQR] = createSignal(false); - const [connectionErrored, setConnectionErrored] = createSignal(false); + const [connectionErrored, setConnectionErrored] = createSignal< + 'missing-features' | 'connection-declined' | 'not-supported' | null + >(null); + + createEffect(() => { + setConnectionErrored(props.defaultError ?? null); + }); const connector = useContext(ConnectorContext)!; const unsubscribe = connector.onStatusChange( () => {}, () => { - setConnectionErrored(true); + setConnectionErrored(null); } ); @@ -74,7 +90,7 @@ export const MobileConnectionModal: Component = props => return onClickTelegram(); } - setConnectionErrored(false); + setConnectionErrored(null); const forceRedirect = !firstClick(); setFirstClick(false); @@ -110,7 +126,7 @@ export const MobileConnectionModal: Component = props => }; const onOpenQR = (): void => { - setConnectionErrored(false); + setConnectionErrored(null); setShowQR(true); setLastSelectedWalletInfo({ ...props.wallet, @@ -157,21 +173,69 @@ export const MobileConnectionModal: Component = props => - - Connection declined - + + + + + Please update Wallet, your version does not support required + features for this dApp + + + + + Connection declined + + + + + {props.wallet.name} doesn’t support the requested action. Please + connect another wallet that supports it. + + + - - + + + + + + + + + + + + + + From 58619ce1887bb9c0b88387309f763cd4561073f2 Mon Sep 17 00:00:00 2001 From: Moiseev Ilya Date: Fri, 28 Feb 2025 03:59:23 +0400 Subject: [PATCH 8/8] feat(ui): enhance wallets modal with styled notifier text component --- .../modals/wallets-modal/all-wallets-list-modal/index.tsx | 7 ++++--- .../modals/wallets-modal/all-wallets-list-modal/style.ts | 8 +++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/index.tsx b/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/index.tsx index 0e74db12b..9972068e3 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/index.tsx +++ b/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/index.tsx @@ -6,7 +6,8 @@ import { StyledIconButton, WalletLabeledItemStyled, WalletsNotSupportedNotifier, - ErrorBoxStyled + ErrorBoxStyled, + WalletsNotSupportedNotifierText } from './style'; import { WalletInfo } from '@tonconnect/sdk'; import { isMobile } from 'src/app/hooks/isMobile'; @@ -76,10 +77,10 @@ export const AllWalletsListModal: Component = pro 0}> - + The wallets below don’t support all features of the connected service. You can use your recovery phrase in one of the supported wallets above. - + diff --git a/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/style.ts b/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/style.ts index 150081ce9..b5118822b 100644 --- a/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/style.ts +++ b/packages/ui/src/app/views/modals/wallets-modal/all-wallets-list-modal/style.ts @@ -1,5 +1,5 @@ import { styled } from 'solid-styled-components'; -import { Button, H1, IconButton, WalletLabeledItem } from 'src/app/components'; +import { Button, H1, H2, IconButton, WalletLabeledItem } from 'src/app/components'; import { media } from 'src/app/styles/media'; export const DesktopSelectWalletModalStyled = styled.div` @@ -93,6 +93,12 @@ export const WalletsNotSupportedNotifier = styled.div` } `; +export const WalletsNotSupportedNotifierText = styled(H2)` + color: ${props => props.theme!.colors.text.secondary}; + text-align: left; + margin: 0; +`; + export const ErrorBoxStyled = styled.div` position: absolute; bottom: 14px;