From bbcc5403bc39c43cf5273e83c29b4ad35d1c862b Mon Sep 17 00:00:00 2001 From: Sarah Schwartz <58856580+sarahschwartz@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:59:00 -0600 Subject: [PATCH] refactor: automate component imports (#21) --- .gitignore | 1 + docs/fuel-graphql-docs | 2 +- docs/fuel-indexer | 2 +- docs/fuels-wallet | 2 +- package.json | 7 +- pnpm-lock.yaml | 652 ++++++++++++++++-------------- scripts/clean-build-files.sh | 5 +- scripts/components.mjs | 371 +++++++++++++++++ scripts/generate-links.mjs | 43 +- src/components/MobileMenu.tsx | 1 + src/components/Provider.tsx | 16 +- src/components/SidebarSubmenu.tsx | 1 + src/lib/imports.ts | 51 ++- src/styles/index.css | 4 + src/types.ts | 16 + 15 files changed, 802 insertions(+), 372 deletions(-) create mode 100644 scripts/components.mjs diff --git a/.gitignore b/.gitignore index 5c328f9b..ea7a8219 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ notes # Generated files src/config/sidebar-links/ +src/component-exports/ diff --git a/docs/fuel-graphql-docs b/docs/fuel-graphql-docs index 61829daa..398330f6 160000 --- a/docs/fuel-graphql-docs +++ b/docs/fuel-graphql-docs @@ -1 +1 @@ -Subproject commit 61829daaa0a784f2464766a3f67b2738461a6186 +Subproject commit 398330f6d7f471096818d7ee6a92fe41d52dd888 diff --git a/docs/fuel-indexer b/docs/fuel-indexer index af26434f..848989fd 160000 --- a/docs/fuel-indexer +++ b/docs/fuel-indexer @@ -1 +1 @@ -Subproject commit af26434f536a73d16e1d1f4e7d5a7b89b81bf033 +Subproject commit 848989fdd7b58d3c254d1d3f90010f6d8abdc195 diff --git a/docs/fuels-wallet b/docs/fuels-wallet index e2d891ca..7b92baf7 160000 --- a/docs/fuels-wallet +++ b/docs/fuels-wallet @@ -1 +1 @@ -Subproject commit e2d891ca171924f7dc6215fa31ed2af03b26af38 +Subproject commit 7b92baf77526944c0788af13bb0a2bb01ae123c4 diff --git a/package.json b/package.json index f0bd9d56..80392394 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,10 @@ "docs:sync": "sh ./scripts/sync-repos.sh", "docs:clean": "sh ./scripts/clean-build-files.sh", "deps:update": "updates -gu", - "dev": "pnpm generate:links && next dev", + "dev": "pnpm generate:links && pnpm generate:components && next dev", "export": "DOCS_DIST=${DOCS_DIST:=dist} next export -o $DOCS_DIST", "generate:links": "node scripts/generate-links.mjs", + "generate:components": "node scripts/components.mjs", "lint": "eslint . --ext .ts,.tsx,.js,.jsx", "lint:fix": "pnpm lint --fix", "lint:prod": "eslint . --ext .ts,.tsx,.js,.jsx -c .eslintrc.prod", @@ -28,7 +29,7 @@ "@fuel-ui/config": "^0.16.1", "@fuel-ui/css": "^0.16.1", "@fuel-ui/react": "^0.16.1", - "@fuel-wallet/sdk": "^0.11.0", + "@fuel-wallet/sdk": "^0.11.2", "@fuels/eslint-plugin": "^0.0.3", "@fuels/prettier-config": "^0.0.3", "@fuels/ts-config": "^0.0.3", @@ -41,7 +42,7 @@ "cookie": "^0.5.0", "dotenv": "^16.3.1", "framer-motion": "^10.13.1", - "fuels": "0.48.1", + "fuels": "0.49.1", "globby": "^13.2.2", "gray-matter": "^4.0.3", "hast-util-from-text": "^2.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cda27a21..733aa859 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,7 +14,7 @@ dependencies: version: 3.5.1 '@docsearch/react': specifier: 3.5.1 - version: 3.5.1(@algolia/client-search@4.18.0)(@types/react@18.2.16)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0) + version: 3.5.1(@algolia/client-search@4.19.1)(@types/react@18.2.16)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.7.0) '@fuel-ui/config': specifier: ^0.16.1 version: 0.16.1(typescript@5.1.6) @@ -23,10 +23,10 @@ dependencies: version: 0.16.1 '@fuel-ui/react': specifier: ^0.16.1 - version: 0.16.1(@babel/core@7.22.6)(@types/node@20.4.5)(@types/react-dom@18.2.7)(@types/react@18.2.16)(csstype@3.1.2)(esbuild@0.18.16)(typescript@5.1.6) + version: 0.16.1(@babel/core@7.22.6)(@types/node@20.4.5)(@types/react-dom@18.2.7)(@types/react@18.2.16)(csstype@3.1.2)(esbuild@0.19.0)(typescript@5.1.6) '@fuel-wallet/sdk': - specifier: ^0.11.0 - version: 0.11.0(dexie@3.2.4)(fuels@0.48.1) + specifier: ^0.11.2 + version: 0.11.2(dexie@3.2.4)(fuels@0.49.1) '@fuels/eslint-plugin': specifier: ^0.0.3 version: 0.0.3(@testing-library/dom@9.3.1)(eslint@8.45.0)(typescript@5.1.6) @@ -53,7 +53,7 @@ dependencies: version: 8.2.0 contentlayer: specifier: ^0.3.4 - version: 0.3.4(esbuild@0.18.16) + version: 0.3.4(esbuild@0.19.0) cookie: specifier: ^0.5.0 version: 0.5.0 @@ -64,8 +64,8 @@ dependencies: specifier: ^10.13.1 version: 10.13.1(react-dom@18.2.0)(react@18.2.0) fuels: - specifier: 0.48.1 - version: 0.48.1 + specifier: 0.49.1 + version: 0.49.1 globby: specifier: ^13.2.2 version: 13.2.2 @@ -92,7 +92,7 @@ dependencies: version: 13.4.12(@babel/core@7.22.6)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) next-contentlayer: specifier: ^0.3.4 - version: 0.3.4(contentlayer@0.3.4)(esbuild@0.18.16)(next@13.4.12)(react-dom@18.2.0)(react@18.2.0) + version: 0.3.4(contentlayer@0.3.4)(esbuild@0.19.0)(next@13.4.12)(react-dom@18.2.0)(react@18.2.0) node-html-markdown: specifier: ^1.3.0 version: 1.3.0 @@ -253,47 +253,47 @@ packages: resolution: {integrity: sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==} dev: false - /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.18.0)(search-insights@2.6.0): + /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.18.0)(search-insights@2.7.0): resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.18.0)(search-insights@2.6.0) - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.18.0) + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.18.0)(search-insights@2.7.0) + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.18.0) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights dev: false - /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.18.0)(search-insights@2.6.0): + /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.18.0)(search-insights@2.7.0): resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} peerDependencies: search-insights: '>= 1 < 3' dependencies: - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.18.0) - search-insights: 2.6.0 + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.18.0) + search-insights: 2.7.0 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch dev: false - /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.18.0): + /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.18.0): resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.18.0) - '@algolia/client-search': 4.18.0 + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.18.0) + '@algolia/client-search': 4.19.1 algoliasearch: 4.18.0 dev: false - /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.18.0): + /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.18.0): resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/client-search': 4.18.0 + '@algolia/client-search': 4.19.1 algoliasearch: 4.18.0 dev: false @@ -307,6 +307,10 @@ packages: resolution: {integrity: sha512-BmxsicMR4doGbeEXQu8yqiGmiyvpNvejYJtQ7rvzttEAMxOPoWEHrWyzBQw4x7LrBY9pMrgv4ZlUaF8PGzewHg==} dev: false + /@algolia/cache-common@4.19.1: + resolution: {integrity: sha512-XGghi3l0qA38HiqdoUY+wvGyBsGvKZ6U3vTiMBT4hArhP3fOGLXpIINgMiiGjTe4FVlTa5a/7Zf2bwlIHfRqqg==} + dev: false + /@algolia/cache-in-memory@4.18.0: resolution: {integrity: sha512-evD4dA1nd5HbFdufBxLqlJoob7E2ozlqJZuV3YlirNx5Na4q1LckIuzjNYZs2ddLzuTc/Xd5O3Ibf7OwPskHxw==} dependencies: @@ -337,6 +341,13 @@ packages: '@algolia/transporter': 4.18.0 dev: false + /@algolia/client-common@4.19.1: + resolution: {integrity: sha512-3kAIVqTcPrjfS389KQvKzliC559x+BDRxtWamVJt8IVp7LGnjq+aVAXg4Xogkur1MUrScTZ59/AaUd5EdpyXgA==} + dependencies: + '@algolia/requester-common': 4.19.1 + '@algolia/transporter': 4.19.1 + dev: false + /@algolia/client-personalization@4.18.0: resolution: {integrity: sha512-+PeCjODbxtamHcPl+couXMeHEefpUpr7IHftj4Y4Nia1hj8gGq4VlIcqhToAw8YjLeCTfOR7r7xtj3pJcYdP8A==} dependencies: @@ -353,10 +364,22 @@ packages: '@algolia/transporter': 4.18.0 dev: false + /@algolia/client-search@4.19.1: + resolution: {integrity: sha512-mBecfMFS4N+yK/p0ZbK53vrZbL6OtWMk8YmnOv1i0LXx4pelY8TFhqKoTit3NPVPwoSNN0vdSN9dTu1xr1XOVw==} + dependencies: + '@algolia/client-common': 4.19.1 + '@algolia/requester-common': 4.19.1 + '@algolia/transporter': 4.19.1 + dev: false + /@algolia/logger-common@4.18.0: resolution: {integrity: sha512-46etYgSlkoKepkMSyaoriSn2JDgcrpc/nkOgou/lm0y17GuMl9oYZxwKKTSviLKI5Irk9nSKGwnBTQYwXOYdRg==} dev: false + /@algolia/logger-common@4.19.1: + resolution: {integrity: sha512-i6pLPZW/+/YXKis8gpmSiNk1lOmYCmRI6+x6d2Qk1OdfvX051nRVdalRbEcVTpSQX6FQAoyeaui0cUfLYW5Elw==} + dev: false + /@algolia/logger-console@4.18.0: resolution: {integrity: sha512-3P3VUYMl9CyJbi/UU1uUNlf6Z8N2ltW3Oqhq/nR7vH0CjWv32YROq3iGWGxB2xt3aXobdUPXs6P0tHSKRmNA6g==} dependencies: @@ -373,6 +396,10 @@ packages: resolution: {integrity: sha512-xlT8R1qYNRBCi1IYLsx7uhftzdfsLPDGudeQs+xvYB4sQ3ya7+ppolB/8m/a4F2gCkEO6oxpp5AGemM7kD27jA==} dev: false + /@algolia/requester-common@4.19.1: + resolution: {integrity: sha512-BisRkcWVxrDzF1YPhAckmi2CFYK+jdMT60q10d7z3PX+w6fPPukxHRnZwooiTUrzFe50UBmLItGizWHP5bDzVQ==} + dev: false + /@algolia/requester-node-http@4.18.0: resolution: {integrity: sha512-TGfwj9aeTVgOUhn5XrqBhwUhUUDnGIKlI0kCBMdR58XfXcfdwomka+CPIgThRbfYw04oQr31A6/95ZH2QVJ9UQ==} dependencies: @@ -387,6 +414,14 @@ packages: '@algolia/requester-common': 4.18.0 dev: false + /@algolia/transporter@4.19.1: + resolution: {integrity: sha512-nkpvPWbpuzxo1flEYqNIbGz7xhfhGOKGAZS7tzC+TELgEmi7z99qRyTfNSUlW7LZmB3ACdnqAo+9A9KFBENviQ==} + dependencies: + '@algolia/cache-common': 4.19.1 + '@algolia/logger-common': 4.19.1 + '@algolia/requester-common': 4.19.1 + dev: false + /@ampproject/remapping@2.2.1: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} @@ -416,7 +451,7 @@ packages: '@babel/helper-compilation-targets': 7.22.6(@babel/core@7.22.6) '@babel/helper-module-transforms': 7.22.5 '@babel/helpers': 7.22.6 - '@babel/parser': 7.22.6 + '@babel/parser': 7.22.7 '@babel/template': 7.22.5 '@babel/traverse': 7.22.6 '@babel/types': 7.22.5 @@ -548,8 +583,8 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser@7.22.6: - resolution: {integrity: sha512-EIQu22vNkceq3LbjAq7knDf/UmtI2qbcNI8GRBlijez6TpQLvSodJPYfydQmNA5buwkxxxa/PVI44jjYZ+/cLw==} + /@babel/parser@7.22.7: + resolution: {integrity: sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==} engines: {node: '>=6.0.0'} hasBin: true dependencies: @@ -696,7 +731,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.5 - '@babel/parser': 7.22.6 + '@babel/parser': 7.22.7 '@babel/types': 7.22.5 dev: false @@ -710,7 +745,7 @@ packages: '@babel/helper-function-name': 7.22.5 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.22.6 + '@babel/parser': 7.22.7 '@babel/types': 7.22.5 debug: 4.3.4 globals: 11.12.0 @@ -731,10 +766,10 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: false - /@contentlayer/cli@0.3.4(esbuild@0.18.16): + /@contentlayer/cli@0.3.4(esbuild@0.19.0): resolution: {integrity: sha512-vNDwgLuhYNu+m70NZ3XK9kexKNguuxPXg7Yvzj3B34cEilQjjzSrcTY/i+AIQm9V7uT5GGshx9ukzPf+SmoszQ==} dependencies: - '@contentlayer/core': 0.3.4(esbuild@0.18.16) + '@contentlayer/core': 0.3.4(esbuild@0.19.0) '@contentlayer/utils': 0.3.4 clipanion: 3.2.1(typanion@3.13.0) typanion: 3.13.0 @@ -745,10 +780,10 @@ packages: - supports-color dev: false - /@contentlayer/client@0.3.4(esbuild@0.18.16): + /@contentlayer/client@0.3.4(esbuild@0.19.0): resolution: {integrity: sha512-QSlLyc3y4PtdC5lFw0L4wTZUH8BQnv2nk37hNCsPAqGf+dRO7TLAzdc+2/mVIRgK+vSH+pSOzjLsQpFxxXRTZA==} dependencies: - '@contentlayer/core': 0.3.4(esbuild@0.18.16) + '@contentlayer/core': 0.3.4(esbuild@0.19.0) transitivePeerDependencies: - '@effect-ts/otel-node' - esbuild @@ -756,7 +791,7 @@ packages: - supports-color dev: false - /@contentlayer/core@0.3.4(esbuild@0.18.16): + /@contentlayer/core@0.3.4(esbuild@0.19.0): resolution: {integrity: sha512-o68oBLwfYZ+2vtgfk1lgHxOl3LoxvRNiUfeQ8IWFWy/L4wnIkKIqLZX01zlRE5IzYM+ZMMN5V0cKQlO7DsyR9g==} peerDependencies: esbuild: 0.17.x || 0.18.x @@ -770,9 +805,9 @@ packages: '@contentlayer/utils': 0.3.4 camel-case: 4.1.2 comment-json: 4.2.3 - esbuild: 0.18.16 + esbuild: 0.19.0 gray-matter: 4.0.3 - mdx-bundler: 9.2.1(esbuild@0.18.16) + mdx-bundler: 9.2.1(esbuild@0.19.0) rehype-stringify: 9.0.3 remark-frontmatter: 4.0.1 remark-parse: 10.0.2 @@ -785,10 +820,10 @@ packages: - supports-color dev: false - /@contentlayer/source-files@0.3.4(esbuild@0.18.16): + /@contentlayer/source-files@0.3.4(esbuild@0.19.0): resolution: {integrity: sha512-4njyn0OFPu7WY4tAjMxiJgWOKeiHuBOGdQ36EYE03iij/pPPRbiWbL+cmLccYXUFEW58mDwpqROZZm6pnxjRDQ==} dependencies: - '@contentlayer/core': 0.3.4(esbuild@0.18.16) + '@contentlayer/core': 0.3.4(esbuild@0.19.0) '@contentlayer/utils': 0.3.4 chokidar: 3.5.3 fast-glob: 3.3.0 @@ -806,11 +841,11 @@ packages: - supports-color dev: false - /@contentlayer/source-remote-files@0.3.4(esbuild@0.18.16): + /@contentlayer/source-remote-files@0.3.4(esbuild@0.19.0): resolution: {integrity: sha512-cyiv4sNUySZvR0uAKlM+kSAELzNd2h2QT1R2e41dRKbwOUVxeLfmGiLugr0aVac6Q3xYcD99dbHyR1xWPV+w9w==} dependencies: - '@contentlayer/core': 0.3.4(esbuild@0.18.16) - '@contentlayer/source-files': 0.3.4(esbuild@0.18.16) + '@contentlayer/core': 0.3.4(esbuild@0.19.0) + '@contentlayer/source-files': 0.3.4(esbuild@0.19.0) '@contentlayer/utils': 0.3.4 transitivePeerDependencies: - '@effect-ts/otel-node' @@ -856,7 +891,7 @@ packages: resolution: {integrity: sha512-2Pu9HDg/uP/IT10rbQ+4OrTQuxIWdKVUEdcw9/w7kZJv9NeHS6skJx1xuRiFyoGKwAzcHXnLp7csE99sj+O1YA==} dev: false - /@docsearch/react@3.5.1(@algolia/client-search@4.18.0)(@types/react@18.2.16)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0): + /@docsearch/react@3.5.1(@algolia/client-search@4.19.1)(@types/react@18.2.16)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.7.0): resolution: {integrity: sha512-t5mEODdLzZq4PTFAm/dvqcvZFdPDMdfPE5rJS5SC8OUq9mPzxEy6b+9THIqNM9P0ocCb4UC5jqBrxKclnuIbzQ==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' @@ -870,8 +905,8 @@ packages: react-dom: optional: true dependencies: - '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.18.0)(search-insights@2.6.0) - '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.18.0) + '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.18.0)(search-insights@2.7.0) + '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.18.0) '@docsearch/css': 3.5.1 '@types/react': 18.2.16 algoliasearch: 4.18.0 @@ -950,25 +985,26 @@ packages: /@emotion/memoize@0.7.4: resolution: {integrity: sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==} + requiresBuild: true dev: false optional: true - /@esbuild-plugins/node-resolve@0.1.4(esbuild@0.18.16): + /@esbuild-plugins/node-resolve@0.1.4(esbuild@0.19.0): resolution: {integrity: sha512-haFQ0qhxEpqtWWY0kx1Y5oE3sMyO1PcoSiWEPrAw6tm/ZOOLXjSs6Q+v1v9eyuVF0nNt50YEvrcrvENmyoMv5g==} peerDependencies: esbuild: '*' dependencies: '@types/resolve': 1.20.2 debug: 4.3.4 - esbuild: 0.18.16 + esbuild: 0.19.0 escape-string-regexp: 4.0.0 resolve: 1.22.2 transitivePeerDependencies: - supports-color dev: false - /@esbuild/android-arm64@0.18.16: - resolution: {integrity: sha512-wsCqSPqLz+6Ov+OM4EthU43DyYVVyfn15S4j1bJzylDpc1r1jZFFfJQNfDuT8SlgwuqpmpJXK4uPlHGw6ve7eA==} + /@esbuild/android-arm64@0.19.0: + resolution: {integrity: sha512-AzsozJnB+RNaDncBCs3Ys5g3kqhPFUueItfEaCpp89JH2naFNX2mYDIvUgPYMqqjm8hiFoo+jklb3QHZyR3ubw==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -976,8 +1012,8 @@ packages: dev: false optional: true - /@esbuild/android-arm@0.18.16: - resolution: {integrity: sha512-gCHjjQmA8L0soklKbLKA6pgsLk1byULuHe94lkZDzcO3/Ta+bbeewJioEn1Fr7kgy9NWNFy/C+MrBwC6I/WCug==} + /@esbuild/android-arm@0.19.0: + resolution: {integrity: sha512-GAkjUyHgWTYuex3evPd5V7uV/XS4LMKr1PWHRPW1xNyy/Jx08x3uTrDFRefBYLKT/KpaWM8/YMQcwbp5a3yIDA==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -985,8 +1021,8 @@ packages: dev: false optional: true - /@esbuild/android-x64@0.18.16: - resolution: {integrity: sha512-ldsTXolyA3eTQ1//4DS+E15xl0H/3DTRJaRL0/0PgkqDsI0fV/FlOtD+h0u/AUJr+eOTlZv4aC9gvfppo3C4sw==} + /@esbuild/android-x64@0.19.0: + resolution: {integrity: sha512-SUG8/qiVhljBDpdkHQ9DvOWbp7hFFIP0OzxOTptbmVsgBgzY6JWowmMd6yJuOhapfxmj/DrvwKmjRLvVSIAKZg==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -994,8 +1030,8 @@ packages: dev: false optional: true - /@esbuild/darwin-arm64@0.18.16: - resolution: {integrity: sha512-aBxruWCII+OtluORR/KvisEw0ALuw/qDQWvkoosA+c/ngC/Kwk0lLaZ+B++LLS481/VdydB2u6tYpWxUfnLAIw==} + /@esbuild/darwin-arm64@0.19.0: + resolution: {integrity: sha512-HkxZ8k3Jvcw0FORPNTavA8BMgQjLOB6AajT+iXmil7BwY3gU1hWvJJAyWyEogCmA4LdbGvKF8vEykdmJ4xNJJQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -1003,8 +1039,8 @@ packages: dev: false optional: true - /@esbuild/darwin-x64@0.18.16: - resolution: {integrity: sha512-6w4Dbue280+rp3LnkgmriS1icOUZDyPuZo/9VsuMUTns7SYEiOaJ7Ca1cbhu9KVObAWfmdjUl4gwy9TIgiO5eA==} + /@esbuild/darwin-x64@0.19.0: + resolution: {integrity: sha512-9IRWJjqpWFHM9a5Qs3r3bK834NCFuDY5ZaLrmTjqE+10B6w65UMQzeZjh794JcxpHolsAHqwsN/33crUXNCM2Q==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -1012,8 +1048,8 @@ packages: dev: false optional: true - /@esbuild/freebsd-arm64@0.18.16: - resolution: {integrity: sha512-x35fCebhe9s979DGKbVAwXUOcTmCIE32AIqB9CB1GralMIvxdnMLAw5CnID17ipEw9/3MvDsusj/cspYt2ZLNQ==} + /@esbuild/freebsd-arm64@0.19.0: + resolution: {integrity: sha512-s7i2WcXcK0V1PJHVBe7NsGddsL62a9Vhpz2U7zapPrwKoFuxPP9jybwX8SXnropR/AOj3ppt2ern4ItblU6UQQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -1021,8 +1057,8 @@ packages: dev: false optional: true - /@esbuild/freebsd-x64@0.18.16: - resolution: {integrity: sha512-YM98f+PeNXF3GbxIJlUsj+McUWG1irguBHkszCIwfr3BXtXZsXo0vqybjUDFfu9a8Wr7uUD/YSmHib+EeGAFlg==} + /@esbuild/freebsd-x64@0.19.0: + resolution: {integrity: sha512-NMdBSSdgwHCqCsucU5k1xflIIRU0qi1QZnM6+vdGy5fvxm1c8rKh50VzsWsIVTFUG3l91AtRxVwoz3Lcvy3I5w==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -1030,8 +1066,8 @@ packages: dev: false optional: true - /@esbuild/linux-arm64@0.18.16: - resolution: {integrity: sha512-XIqhNUxJiuy+zsR77+H5Z2f7s4YRlriSJKtvx99nJuG5ATuJPjmZ9n0ANgnGlPCpXGSReFpgcJ7O3SMtzIFeiQ==} + /@esbuild/linux-arm64@0.19.0: + resolution: {integrity: sha512-I4zvE2srSZxRPapFnNqj+NL3sDJ1wkvEZqt903OZUlBBgigrQMvzUowvP/TTTu2OGYe1oweg5MFilfyrElIFag==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -1039,8 +1075,8 @@ packages: dev: false optional: true - /@esbuild/linux-arm@0.18.16: - resolution: {integrity: sha512-b5ABb+5Ha2C9JkeZXV+b+OruR1tJ33ePmv9ZwMeETSEKlmu/WJ45XTTG+l6a2KDsQtJJ66qo/hbSGBtk0XVLHw==} + /@esbuild/linux-arm@0.19.0: + resolution: {integrity: sha512-2F1+lH7ZBcCcgxiSs8EXQV0PPJJdTNiNcXxDb61vzxTRJJkXX1I/ye9mAhfHyScXzHaEibEXg1Jq9SW586zz7w==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -1048,8 +1084,8 @@ packages: dev: false optional: true - /@esbuild/linux-ia32@0.18.16: - resolution: {integrity: sha512-no+pfEpwnRvIyH+txbBAWtjxPU9grslmTBfsmDndj7bnBmr55rOo/PfQmRfz7Qg9isswt1FP5hBbWb23fRWnow==} + /@esbuild/linux-ia32@0.19.0: + resolution: {integrity: sha512-dz2Q7+P92r1Evc8kEN+cQnB3qqPjmCrOZ+EdBTn8lEc1yN8WDgaDORQQiX+mxaijbH8npXBT9GxUqE52Gt6Y+g==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -1057,8 +1093,8 @@ packages: dev: false optional: true - /@esbuild/linux-loong64@0.18.16: - resolution: {integrity: sha512-Zbnczs9ZXjmo0oZSS0zbNlJbcwKXa/fcNhYQjahDs4Xg18UumpXG/lwM2lcSvHS3mTrRyCYZvJbmzYc4laRI1g==} + /@esbuild/linux-loong64@0.19.0: + resolution: {integrity: sha512-IcVJovJVflih4oFahhUw+N7YgNbuMSVFNr38awb0LNzfaiIfdqIh518nOfYaNQU3aVfiJnOIRVJDSAP4k35WxA==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -1066,8 +1102,8 @@ packages: dev: false optional: true - /@esbuild/linux-mips64el@0.18.16: - resolution: {integrity: sha512-YMF7hih1HVR/hQVa/ot4UVffc5ZlrzEb3k2ip0nZr1w6fnYypll9td2qcoMLvd3o8j3y6EbJM3MyIcXIVzXvQQ==} + /@esbuild/linux-mips64el@0.19.0: + resolution: {integrity: sha512-bZGRAGySMquWsKw0gIdsClwfvgbsSq/7oq5KVu1H1r9Il+WzOcfkV1hguntIuBjRVL8agI95i4AukjdAV2YpUw==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -1075,8 +1111,8 @@ packages: dev: false optional: true - /@esbuild/linux-ppc64@0.18.16: - resolution: {integrity: sha512-Wkz++LZ29lDwUyTSEnzDaaP5OveOgTU69q9IyIw9WqLRxM4BjTBjz9un4G6TOvehWpf/J3gYVFN96TjGHrbcNQ==} + /@esbuild/linux-ppc64@0.19.0: + resolution: {integrity: sha512-3LC6H5/gCDorxoRBUdpLV/m7UthYSdar0XcCu+ypycQxMS08MabZ06y1D1yZlDzL/BvOYliRNRWVG/YJJvQdbg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -1084,8 +1120,8 @@ packages: dev: false optional: true - /@esbuild/linux-riscv64@0.18.16: - resolution: {integrity: sha512-LFMKZ30tk78/mUv1ygvIP+568bwf4oN6reG/uczXnz6SvFn4e2QUFpUpZY9iSJT6Qpgstrhef/nMykIXZtZWGQ==} + /@esbuild/linux-riscv64@0.19.0: + resolution: {integrity: sha512-jfvdKjWk+Cp2sgLtEEdSHXO7qckrw2B2eFBaoRdmfhThqZs29GMMg7q/LsQpybA7BxCLLEs4di5ucsWzZC5XPA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -1093,8 +1129,8 @@ packages: dev: false optional: true - /@esbuild/linux-s390x@0.18.16: - resolution: {integrity: sha512-3ZC0BgyYHYKfZo3AV2/66TD/I9tlSBaW7eWTEIkrQQKfJIifKMMttXl9FrAg+UT0SGYsCRLI35Gwdmm96vlOjg==} + /@esbuild/linux-s390x@0.19.0: + resolution: {integrity: sha512-ofcucfNLkoXmcnJaw9ugdEOf40AWKGt09WBFCkpor+vFJVvmk/8OPjl/qRtks2Z7BuZbG3ztJuK1zS9z5Cgx9A==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -1102,8 +1138,8 @@ packages: dev: false optional: true - /@esbuild/linux-x64@0.18.16: - resolution: {integrity: sha512-xu86B3647DihHJHv/wx3NCz2Dg1gjQ8bbf9cVYZzWKY+gsvxYmn/lnVlqDRazObc3UMwoHpUhNYaZset4X8IPA==} + /@esbuild/linux-x64@0.19.0: + resolution: {integrity: sha512-Fpf7zNDBti3xrQKQKLdXT0hTyOxgFdRJIMtNy8x1az9ATR9/GJ1brYbB/GLWoXhKiHsoWs+2DLkFVNNMTCLEwA==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -1111,8 +1147,8 @@ packages: dev: false optional: true - /@esbuild/netbsd-x64@0.18.16: - resolution: {integrity: sha512-uVAgpimx9Ffw3xowtg/7qQPwHFx94yCje+DoBx+LNm2ePDpQXHrzE+Sb0Si2VBObYz+LcRps15cq+95YM7gkUw==} + /@esbuild/netbsd-x64@0.19.0: + resolution: {integrity: sha512-AMQAp/5oENgDOvVhvOlbhVe1pWii7oFAMRHlmTjSEMcpjTpIHtFXhv9uAFgUERHm3eYtNvS9Vf+gT55cwuI6Aw==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -1120,8 +1156,8 @@ packages: dev: false optional: true - /@esbuild/openbsd-x64@0.18.16: - resolution: {integrity: sha512-6OjCQM9wf7z8/MBi6BOWaTL2AS/SZudsZtBziXMtNI8r/U41AxS9x7jn0ATOwVy08OotwkPqGRMkpPR2wcTJXA==} + /@esbuild/openbsd-x64@0.19.0: + resolution: {integrity: sha512-fDztEve1QUs3h/Dw2AUmBlWGkNQbhDoD05ppm5jKvzQv+HVuV13so7m5RYeiSMIC2XQy7PAjZh+afkxAnCRZxA==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -1129,8 +1165,8 @@ packages: dev: false optional: true - /@esbuild/sunos-x64@0.18.16: - resolution: {integrity: sha512-ZoNkruFYJp9d1LbUYCh8awgQDvB9uOMZqlQ+gGEZR7v6C+N6u7vPr86c+Chih8niBR81Q/bHOSKGBK3brJyvkQ==} + /@esbuild/sunos-x64@0.19.0: + resolution: {integrity: sha512-bKZzJ2/rvUjDzA5Ddyva2tMk89WzNJEibZEaq+wY6SiqPlwgFbqyQLimouxLHiHh1itb5P3SNCIF1bc2bw5H9w==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -1138,8 +1174,8 @@ packages: dev: false optional: true - /@esbuild/win32-arm64@0.18.16: - resolution: {integrity: sha512-+j4anzQ9hrs+iqO+/wa8UE6TVkKua1pXUb0XWFOx0FiAj6R9INJ+WE//1/Xo6FG1vB5EpH3ko+XcgwiDXTxcdw==} + /@esbuild/win32-arm64@0.19.0: + resolution: {integrity: sha512-NQJ+4jmnA79saI+sE+QzcEls19uZkoEmdxo7r//PDOjIpX8pmoWtTnWg6XcbnO7o4fieyAwb5U2LvgWynF4diA==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -1147,8 +1183,8 @@ packages: dev: false optional: true - /@esbuild/win32-ia32@0.18.16: - resolution: {integrity: sha512-5PFPmq3sSKTp9cT9dzvI67WNfRZGvEVctcZa1KGjDDu4n3H8k59Inbk0du1fz0KrAbKKNpJbdFXQMDUz7BG4rQ==} + /@esbuild/win32-ia32@0.19.0: + resolution: {integrity: sha512-uyxiZAnsfu9diHm9/rIH2soecF/HWLXYUhJKW4q1+/LLmNQ+55lRjvSUDhUmsgJtSUscRJB/3S4RNiTb9o9mCg==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -1156,8 +1192,8 @@ packages: dev: false optional: true - /@esbuild/win32-x64@0.18.16: - resolution: {integrity: sha512-sCIVrrtcWN5Ua7jYXNG1xD199IalrbfV2+0k/2Zf2OyV2FtnQnMgdzgpRAbi4AWlKJj1jkX+M+fEGPQj6BQB4w==} + /@esbuild/win32-x64@0.19.0: + resolution: {integrity: sha512-jl+NXUjK2StMgqnZnqgNjZuerFG8zQqWXMBZdMMv4W/aO1ZKQaYWZBxTrtWKphkCBVEMh0wMVfGgOd2BjOZqUQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -1438,8 +1474,8 @@ packages: tslib: 2.6.0 dev: false - /@fuel-ts/abi-coder@0.48.1: - resolution: {integrity: sha512-z7boxLOtIRzRzT/UvyrD/HtNRpsIRGuDKSDq8bpp5w3ylfSQwKuJeJoYnPQvsTpPHPMXg+eilLomlxnQYt1GjA==} + /@fuel-ts/abi-coder@0.49.1: + resolution: {integrity: sha512-bO4qdvftm5fpV2QGX8km/BRc0XfrsI8R5RP1bG81dpAR2dqIqg7QSFKItT06OaeUScY/4bUJz4VqzYCSMQvKWw==} dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/bignumber': 5.7.0 @@ -1448,19 +1484,19 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/sha2': 5.7.0 '@ethersproject/strings': 5.7.0 - '@fuel-ts/keystore': 0.48.1 - '@fuel-ts/math': 0.48.1 - '@fuel-ts/versions': 0.48.1 + '@fuel-ts/crypto': 0.49.1 + '@fuel-ts/math': 0.49.1 + '@fuel-ts/versions': 0.49.1 type-fest: 3.12.0 dev: false - /@fuel-ts/abi-typegen@0.48.1: - resolution: {integrity: sha512-aA980hhC+/YQTu6kf8+YkmXBhQ3Z+PYR5LVcM2J+1VffTT1QQvnDg2ycc1JYXb6XdFp9fYsClW4oLKuosSkgBw==} + /@fuel-ts/abi-typegen@0.49.1: + resolution: {integrity: sha512-GRaXOrp3xxcJt1dIYk2SABwHntET2xQPtXg9zseuABPXiUSMZegxY3Ue3UBb9XeHyNPTHFix5zOhBqHXY5zlQA==} hasBin: true dependencies: '@ethersproject/bytes': 5.7.0 - '@fuel-ts/utils': 0.48.1 - '@fuel-ts/versions': 0.48.1 + '@fuel-ts/utils': 0.49.1 + '@fuel-ts/versions': 0.49.1 commander: 9.5.0 glob: 10.3.1 handlebars: 4.7.7 @@ -1470,73 +1506,74 @@ packages: rimraf: 3.0.2 dev: false - /@fuel-ts/address@0.48.1: - resolution: {integrity: sha512-1+IwWJ9VQWO9YB1R7+X8xhbJPZuZRQj+VCt0m1ahUNFisq3NZDAgV83LFc9TF/6rU+eacSk7xO+ZMZJ5+Wqa8A==} + /@fuel-ts/address@0.49.1: + resolution: {integrity: sha512-XTT7vym0Qo2VfPn9WqkXHlEF+0vE7XUPwrF2M40T9WfA7jhcGEfKvtUhMDLyR2ayr1KU3fNO+ZZ1/svUyjyggQ==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/interfaces': 0.48.1 - '@fuel-ts/keystore': 0.48.1 - '@fuel-ts/versions': 0.48.1 + '@fuel-ts/crypto': 0.49.1 + '@fuel-ts/interfaces': 0.49.1 + '@fuel-ts/versions': 0.49.1 bech32: 2.0.0 dev: false - /@fuel-ts/contract@0.48.1: - resolution: {integrity: sha512-p+Ya0b6GLVlmVnlS+Vhp2+HhQ5wCI1QcNqeBEAjb9OKBOaGDCEk7QmpBHrdZ/4cZkZPfb/m/P2sZx/qn0FL9yQ==} + /@fuel-ts/contract@0.49.1: + resolution: {integrity: sha512-z+K13M+S4+FdTxSKps7yFaOmomFW6IJRsOJfGX4rwwLpWsyCukWZC0jGlNhZvQbhmv4oWiLLqSqAXXttUIUCOw==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/abi-coder': 0.48.1 - '@fuel-ts/keystore': 0.48.1 - '@fuel-ts/merkle': 0.48.1 - '@fuel-ts/program': 0.48.1 - '@fuel-ts/providers': 0.48.1 - '@fuel-ts/transactions': 0.48.1 - '@fuel-ts/versions': 0.48.1 - '@fuel-ts/wallet': 0.48.1 + '@fuel-ts/abi-coder': 0.49.1 + '@fuel-ts/crypto': 0.49.1 + '@fuel-ts/merkle': 0.49.1 + '@fuel-ts/program': 0.49.1 + '@fuel-ts/providers': 0.49.1 + '@fuel-ts/transactions': 0.49.1 + '@fuel-ts/utils': 0.49.1 + '@fuel-ts/versions': 0.49.1 + '@fuel-ts/wallet': 0.49.1 transitivePeerDependencies: - encoding dev: false - /@fuel-ts/hasher@0.48.1: - resolution: {integrity: sha512-9sThfwytja2vRW4YJhUGSIoDyT7mgdagYUT7shmrOkwq0d1y88dpsvbciFt0uSxxzt0cT0d7qHiviIK4vI7GOw==} + /@fuel-ts/crypto@0.49.1: + resolution: {integrity: sha512-Dcc8sx+/YwYuwQGNo3iTwrhXwtYQOPSaNkGZosxc834bs4YnEhxg46pLzkrVb8j94VUAN6BYwMpoOP0ODiMASQ==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + dev: false + + /@fuel-ts/hasher@0.49.1: + resolution: {integrity: sha512-qIIJoEaQMCAs4nqH/7fIwXogCoHu+g4sPizg/pt7wSaihCw2gIaNiCKjRnHyvy//ZgLnRp3CtOde8EHEVYTNFg==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/address': 0.48.1 - '@fuel-ts/keystore': 0.48.1 - '@fuel-ts/math': 0.48.1 - '@fuel-ts/providers': 0.48.1 - '@fuel-ts/transactions': 0.48.1 + '@fuel-ts/address': 0.49.1 + '@fuel-ts/crypto': 0.49.1 + '@fuel-ts/math': 0.49.1 + '@fuel-ts/providers': 0.49.1 + '@fuel-ts/transactions': 0.49.1 lodash.clonedeep: 4.5.0 transitivePeerDependencies: - encoding dev: false - /@fuel-ts/hdwallet@0.48.1: - resolution: {integrity: sha512-iKWpmBMCiZPsJv/QKsrU+Ap0FfEWnOrLsqZzgLI1uYHEVMhQC51gFL/7hA6GzjIo2YUC5O4OCID6wFKc4maHFg==} + /@fuel-ts/hdwallet@0.49.1: + resolution: {integrity: sha512-sAMTUONdxFQM1pHpsFr1cGAXDUJej2moecKy6Qj1hi0/L5K9gE6REubJqa1pky9jTzWc3xQKOzVC+1BdM0xMdA==} dependencies: '@ethersproject/basex': 5.7.0 '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/math': 0.48.1 - '@fuel-ts/mnemonic': 0.48.1 - '@fuel-ts/signer': 0.48.1 + '@fuel-ts/math': 0.49.1 + '@fuel-ts/mnemonic': 0.49.1 + '@fuel-ts/signer': 0.49.1 transitivePeerDependencies: - encoding dev: false - /@fuel-ts/interfaces@0.48.1: - resolution: {integrity: sha512-5E+uaIYh9DzjvbsMG/Lin1UPcR5rxPNulnw1uaqCGsBr/UroiWaX0MDCzTN+AGKlXokOCQQpMVtw2yFf6ZcskQ==} - dev: false - - /@fuel-ts/keystore@0.48.1: - resolution: {integrity: sha512-D6Ha4Uu+Vvw3NIywE/k21FUjEIfAxn3iuUp+UMFVowv6MSRPZvVBmXdxM6hNovEc032qnBYbIpmZmvRIfQaUng==} - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/pbkdf2': 5.7.0 + /@fuel-ts/interfaces@0.49.1: + resolution: {integrity: sha512-O6pfqEpOzEjH6JHWLjX58M6LLAwbUmO6FTDxyC2FqV2holETW7zi2tYwO4IdtccZAFvDnD8RquTWRw9ZKXj/rQ==} dev: false /@fuel-ts/math@0.42.0: @@ -1546,79 +1583,80 @@ packages: bn.js: 5.2.1 dev: false - /@fuel-ts/math@0.48.1: - resolution: {integrity: sha512-7FJQZY0qv2tzDgp7KoKOej6aAF4NlEpTfjKDuEV6iJTGJBEhNV5wmIbLwno1qtrbL3uji2N+d2ZfqV9sBoLxBw==} + /@fuel-ts/math@0.49.1: + resolution: {integrity: sha512-h+ozE982eKkvqulX1V6X0JdsH2RkkCtYwYr9v1vwT5L/J73RySuxhoVEFSYkURjPOKSPjxK9q4RANXZZi433bA==} dependencies: '@types/bn.js': 5.1.1 bn.js: 5.2.1 dev: false - /@fuel-ts/merkle@0.48.1: - resolution: {integrity: sha512-cxHBUa70xDBCN+6tFJkcsMp1JcfVXOY0SCh8fmoHOTp5Gx4Uy7bLa294zR+14QvOZiJpWKB8pde9wS1MdCvPPg==} + /@fuel-ts/merkle@0.49.1: + resolution: {integrity: sha512-tbFI8AQdnQUfGqAonATss7CV6ow5CxbR3zOKwLnPnUziACY9Zo2Qkp/5D2tGHF3+lVVRbcXwweMEYxhyjLsn8Q==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/math': 0.48.1 + '@fuel-ts/math': 0.49.1 dev: false - /@fuel-ts/mnemonic@0.48.1: - resolution: {integrity: sha512-jGGS6Gq1n5q9PzIt5iy0Ajz3CK1E5vZ44QNikWJpFOMUx/iALPLvPPA8CVNNwmuvC6qg63XnN+cGYKQferUrlw==} + /@fuel-ts/mnemonic@0.49.1: + resolution: {integrity: sha512-dSf1/JALHFyfD4mOOs+i3TGeY8bsLvWwlEIQElUNxCdWJr6sqB2vmmaaA/DwEpXqPxicA850rPvRG45PmynNLg==} dependencies: '@ethersproject/basex': 5.7.0 '@ethersproject/bytes': 5.7.0 '@ethersproject/pbkdf2': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/keystore': 0.48.1 - '@fuel-ts/wordlists': 0.48.1 + '@fuel-ts/crypto': 0.49.1 + '@fuel-ts/wordlists': 0.49.1 dev: false - /@fuel-ts/predicate@0.48.1: - resolution: {integrity: sha512-dg7/2CcvBtzMUshUv3k/1OHhS89jpGNh1h5LurgJcgmTlbBn4sn9+VIMDPtea2wBcfoPip4/rvJtirHlRZhJDQ==} + /@fuel-ts/predicate@0.49.1: + resolution: {integrity: sha512-W6xdumFr5TSv/KdhxVpYoeAOFFhjWCSfCazjOsj/WeLKYjShU2pyD7pJ3XREmXL8AXwG864h0Hhr/SLIEzZpqg==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 - '@fuel-ts/abi-coder': 0.48.1 - '@fuel-ts/address': 0.48.1 - '@fuel-ts/hasher': 0.48.1 - '@fuel-ts/interfaces': 0.48.1 - '@fuel-ts/merkle': 0.48.1 - '@fuel-ts/providers': 0.48.1 - '@fuel-ts/transactions': 0.48.1 - '@fuel-ts/versions': 0.48.1 - '@fuel-ts/wallet': 0.48.1 + '@fuel-ts/abi-coder': 0.49.1 + '@fuel-ts/address': 0.49.1 + '@fuel-ts/hasher': 0.49.1 + '@fuel-ts/interfaces': 0.49.1 + '@fuel-ts/merkle': 0.49.1 + '@fuel-ts/providers': 0.49.1 + '@fuel-ts/transactions': 0.49.1 + '@fuel-ts/utils': 0.49.1 + '@fuel-ts/versions': 0.49.1 + '@fuel-ts/wallet': 0.49.1 transitivePeerDependencies: - encoding dev: false - /@fuel-ts/program@0.48.1: - resolution: {integrity: sha512-SLzOhq4utdq5U0RVirvrpaeE9MirlN+xpLjFfP9BWLCezYCY5p/yLh+/IvGK1q/OuLxSNoUMD/wfh9bRvwRILg==} + /@fuel-ts/program@0.49.1: + resolution: {integrity: sha512-D8hTGm5/B43EisfrBZhI7y2Z3K/u/s/FHawg4R/ZjJ9GD5RVxeDFvsHhVXf90xFLoriFW7uW2x/V8KHhaZbBXA==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 - '@fuel-ts/abi-coder': 0.48.1 - '@fuel-ts/address': 0.48.1 - '@fuel-ts/interfaces': 0.48.1 - '@fuel-ts/math': 0.48.1 - '@fuel-ts/providers': 0.48.1 - '@fuel-ts/transactions': 0.48.1 - '@fuel-ts/versions': 0.48.1 - '@fuel-ts/wallet': 0.48.1 + '@fuel-ts/abi-coder': 0.49.1 + '@fuel-ts/address': 0.49.1 + '@fuel-ts/interfaces': 0.49.1 + '@fuel-ts/math': 0.49.1 + '@fuel-ts/providers': 0.49.1 + '@fuel-ts/transactions': 0.49.1 + '@fuel-ts/versions': 0.49.1 + '@fuel-ts/wallet': 0.49.1 transitivePeerDependencies: - encoding dev: false - /@fuel-ts/providers@0.48.1: - resolution: {integrity: sha512-sCdVCd/8mhuK8XpEu3Vahv+28HOo+CxQvBPES5uGv78A2hw1lWNQe4VC+iH9af0Gp+HiX6wmAxxSb2jhK2xiyQ==} + /@fuel-ts/providers@0.49.1: + resolution: {integrity: sha512-xVCcTM+0++um6FPVRK7vO8IKVjMDuXXi8bDJtlaw5rgShM57jYyCOMaocnY8HtUudMQX0GTzbdmNtQ8k3Ozahw==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/networks': 5.7.1 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/abi-coder': 0.48.1 - '@fuel-ts/address': 0.48.1 - '@fuel-ts/interfaces': 0.48.1 - '@fuel-ts/keystore': 0.48.1 - '@fuel-ts/math': 0.48.1 - '@fuel-ts/transactions': 0.48.1 + '@fuel-ts/abi-coder': 0.49.1 + '@fuel-ts/address': 0.49.1 + '@fuel-ts/crypto': 0.49.1 + '@fuel-ts/interfaces': 0.49.1 + '@fuel-ts/math': 0.49.1 + '@fuel-ts/transactions': 0.49.1 graphql: 16.7.1 graphql-request: 5.2.0(graphql@16.7.1) graphql-tag: 2.12.6(graphql@16.7.1) @@ -1627,61 +1665,61 @@ packages: - encoding dev: false - /@fuel-ts/script@0.48.1: - resolution: {integrity: sha512-TgKkIi7AlQwG6Q86duLTKu7R+oFat6m3WSIG/IeqKKhGLcMwHfQ7ejGcOtjQVUGGqnLx9q+tH6FWFO7ue3k7ZQ==} + /@fuel-ts/script@0.49.1: + resolution: {integrity: sha512-dND7DL4srLJE/24nuyu0MczjLK2XEwrZ3HoroXn8YHhBZNGgZoO5OOPVApB/iSGJBvFreWsz72Uen8M0Axum1A==} dependencies: '@ethersproject/bytes': 5.7.0 - '@fuel-ts/abi-coder': 0.48.1 - '@fuel-ts/abi-typegen': 0.48.1 - '@fuel-ts/address': 0.48.1 - '@fuel-ts/interfaces': 0.48.1 - '@fuel-ts/math': 0.48.1 - '@fuel-ts/program': 0.48.1 - '@fuel-ts/providers': 0.48.1 - '@fuel-ts/transactions': 0.48.1 - '@fuel-ts/utils': 0.48.1 - '@fuel-ts/wallet': 0.48.1 + '@fuel-ts/abi-coder': 0.49.1 + '@fuel-ts/abi-typegen': 0.49.1 + '@fuel-ts/address': 0.49.1 + '@fuel-ts/interfaces': 0.49.1 + '@fuel-ts/math': 0.49.1 + '@fuel-ts/program': 0.49.1 + '@fuel-ts/providers': 0.49.1 + '@fuel-ts/transactions': 0.49.1 + '@fuel-ts/utils': 0.49.1 + '@fuel-ts/wallet': 0.49.1 transitivePeerDependencies: - encoding dev: false - /@fuel-ts/signer@0.48.1: - resolution: {integrity: sha512-das9v7T7dkQjvuxJhPzwxEUggsGSjfeYFlhPPLgMerB6PRajfQqsvjxnq70ZEkDgEutjBs+J9SesuWARjD+r4Q==} + /@fuel-ts/signer@0.49.1: + resolution: {integrity: sha512-n2kcJOwJgBNF7PLM83O+9VSk4w6BU7nzsTRLJt1kKbMG1beoZjTthVEctwJl5u6GLS7LntjdS0yFh5XTvoDdiQ==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/address': 0.48.1 - '@fuel-ts/hasher': 0.48.1 - '@fuel-ts/keystore': 0.48.1 - '@fuel-ts/math': 0.48.1 + '@fuel-ts/address': 0.49.1 + '@fuel-ts/crypto': 0.49.1 + '@fuel-ts/hasher': 0.49.1 + '@fuel-ts/math': 0.49.1 elliptic: 6.5.4 transitivePeerDependencies: - encoding dev: false - /@fuel-ts/testcases@0.48.1: - resolution: {integrity: sha512-2AfRI8VAR1PxA7vSF980sQEspDlkcjo2KEUhDVmxJg2a6nQZMutOgimadH3/lsMmshpAECAOSW6uwoVPueuWQQ==} + /@fuel-ts/testcases@0.49.1: + resolution: {integrity: sha512-2n5pdXklxtdst+oae9tIZvW+Ptd5E8p/6qIVeJSiUfhPsLsD9VaJDRURUyTMJwPRRszwtwSbgVpMeHECBEDnZA==} dev: false - /@fuel-ts/transactions@0.48.1: - resolution: {integrity: sha512-Nq2ljqOgIVruQ8Z9uye02FHR5yQ0UaTVeppthwFAAKSW8xPVpejEPQn9TX/n5P2ER1XsswP+Aptq+SCP3P84nA==} + /@fuel-ts/transactions@0.49.1: + resolution: {integrity: sha512-maqWjy9GdXi7qTodV/uTlVqpmxq2IMFpzWYOs0lJ2hIhsT7W3VFtS15vVvWD3MbABYXA6q+9hYIh8zwKyCEmUQ==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/abi-coder': 0.48.1 - '@fuel-ts/address': 0.48.1 - '@fuel-ts/math': 0.48.1 + '@fuel-ts/abi-coder': 0.49.1 + '@fuel-ts/address': 0.49.1 + '@fuel-ts/math': 0.49.1 dev: false - /@fuel-ts/utils@0.48.1: - resolution: {integrity: sha512-1Pr0aIlAtmN+zpX2jqre2OOtdrmrdqqVkPuAjGDCVsBw8OmSjR63+4o/fk5HWXUv1m7W39Rjnztq6TeJ1+3hcA==} + /@fuel-ts/utils@0.49.1: + resolution: {integrity: sha512-WPn6D5lHoz3pr/1Nv7pz61cgxo4jYRIvSK6EZRzRNEsw8NsGi3fdJxIvJvI9Wern3EoUhUOzzov/rqvjbKdCdw==} dependencies: lodash.upperfirst: 4.3.1 rimraf: 3.0.2 dev: false - /@fuel-ts/versions@0.48.1: - resolution: {integrity: sha512-SZjl6fMEGQsKW+PR6vmJkdXSiUwZPA5nOXay5/QjGk+Ay/IQLKhP3599MyEZy7CD7CZcAgpYVJ9ktx+xHIVtjA==} + /@fuel-ts/versions@0.49.1: + resolution: {integrity: sha512-RUVcq29ITCuzwb1dfk81/bbBAlJ3sqbv5dFbDMUJbzmIUn5+BRW5Sv5UCRDZFWxuhurb3aR6kRaT+nEbCAVIEA==} hasBin: true dependencies: chalk: 4.1.2 @@ -1689,40 +1727,40 @@ packages: semver: 7.5.4 dev: false - /@fuel-ts/wallet-manager@0.48.1: - resolution: {integrity: sha512-Wt6xmXvipkJNakCBqSkcfRjCGtnrXEnsEM8c4xmmXXKkdHE+wXVjYfLEi89nh0FnlRPjFMbPbVsiGEN984rYBw==} + /@fuel-ts/wallet-manager@0.49.1: + resolution: {integrity: sha512-FZkDfB6x2VxUPdZXoodjXjPYcyRojhSpb9avPMkZytNy2G0ERQBNZ4+sL0PDOwsMdn3qvx9O4NsxC+8g4X1Wrw==} dependencies: - '@fuel-ts/address': 0.48.1 - '@fuel-ts/interfaces': 0.48.1 - '@fuel-ts/keystore': 0.48.1 - '@fuel-ts/mnemonic': 0.48.1 - '@fuel-ts/wallet': 0.48.1 + '@fuel-ts/address': 0.49.1 + '@fuel-ts/crypto': 0.49.1 + '@fuel-ts/interfaces': 0.49.1 + '@fuel-ts/mnemonic': 0.49.1 + '@fuel-ts/wallet': 0.49.1 events: 3.3.0 transitivePeerDependencies: - encoding dev: false - /@fuel-ts/wallet@0.48.1: - resolution: {integrity: sha512-PBzjHhjUs+7Mfnkt0MSjPbx4c+LgvGMMP0jIQ5IVMWp5W/eyjIqdpAiUpSoghHgRbOXXfQPpmaHYBQOZXA7Ixw==} + /@fuel-ts/wallet@0.49.1: + resolution: {integrity: sha512-H52q9cYllQX5IedpF7v9V2dj1Ox3wMCV/OJYWLYjMsBHaAsIIavyCdFQDA8M9qytGNB05pj71E3E5PTPZ1pCNg==} dependencies: '@ethersproject/bytes': 5.7.0 - '@fuel-ts/abi-coder': 0.48.1 - '@fuel-ts/address': 0.48.1 - '@fuel-ts/hasher': 0.48.1 - '@fuel-ts/hdwallet': 0.48.1 - '@fuel-ts/interfaces': 0.48.1 - '@fuel-ts/math': 0.48.1 - '@fuel-ts/mnemonic': 0.48.1 - '@fuel-ts/providers': 0.48.1 - '@fuel-ts/signer': 0.48.1 - '@fuel-ts/transactions': 0.48.1 + '@fuel-ts/abi-coder': 0.49.1 + '@fuel-ts/address': 0.49.1 + '@fuel-ts/hasher': 0.49.1 + '@fuel-ts/hdwallet': 0.49.1 + '@fuel-ts/interfaces': 0.49.1 + '@fuel-ts/math': 0.49.1 + '@fuel-ts/mnemonic': 0.49.1 + '@fuel-ts/providers': 0.49.1 + '@fuel-ts/signer': 0.49.1 + '@fuel-ts/transactions': 0.49.1 '@fuels/vm-asm': 0.34.1 transitivePeerDependencies: - encoding dev: false - /@fuel-ts/wordlists@0.48.1: - resolution: {integrity: sha512-0Z5bgDg1yS1YNJwgaTKxRdghcSTfXU1oTaGmrl+QR+bsQmcORFOTQPSYzSerGrC5xdndpucNhbQY73+cdk8gRg==} + /@fuel-ts/wordlists@0.49.1: + resolution: {integrity: sha512-7nt00VvEo48/KZvrzQZlowBPPkpKIvL9hn5xdth1rcj5ybOTO1BrQo1xGOUf3F6xFpJxX9WYoZDh5ZG8Z1ECjA==} dev: false /@fuel-ui/config@0.16.1(typescript@5.1.6): @@ -1771,12 +1809,12 @@ packages: lodash: 4.17.21 dev: false - /@fuel-ui/react@0.16.1(@babel/core@7.22.6)(@types/node@20.4.5)(@types/react-dom@18.2.7)(@types/react@18.2.16)(csstype@3.1.2)(esbuild@0.18.16)(typescript@5.1.6): + /@fuel-ui/react@0.16.1(@babel/core@7.22.6)(@types/node@20.4.5)(@types/react-dom@18.2.7)(@types/react@18.2.16)(csstype@3.1.2)(esbuild@0.19.0)(typescript@5.1.6): resolution: {integrity: sha512-0OZa/6mZ5l2MhI88wJHU4IBqOGFkhXEUJf4+qKvCbSe4zQ8D+/0mOu856Ddq32KPrjae7THMR8aS2Z7+MYjcKg==} dependencies: '@fuel-ts/math': 0.42.0 '@fuel-ui/css': 0.16.1 - '@fuel-ui/test-utils': 0.16.1(@babel/core@7.22.6)(@types/node@20.4.5)(esbuild@0.18.16)(react@18.2.0)(typescript@5.1.6) + '@fuel-ui/test-utils': 0.16.1(@babel/core@7.22.6)(@types/node@20.4.5)(esbuild@0.19.0)(react@18.2.0)(typescript@5.1.6) '@radix-ui/react-accordion': 1.1.2(@types/react-dom@18.2.7)(@types/react@18.2.16)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-alert-dialog': 1.0.4(@types/react-dom@18.2.7)(@types/react@18.2.16)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-aspect-ratio': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.16)(react-dom@18.2.0)(react@18.2.0) @@ -1828,7 +1866,7 @@ packages: - utf-8-validate dev: false - /@fuel-ui/test-utils@0.16.1(@babel/core@7.22.6)(@types/node@20.4.5)(esbuild@0.18.16)(react@18.2.0)(typescript@5.1.6): + /@fuel-ui/test-utils@0.16.1(@babel/core@7.22.6)(@types/node@20.4.5)(esbuild@0.19.0)(react@18.2.0)(typescript@5.1.6): resolution: {integrity: sha512-osQgH9aKK/BwBvPQ4yYmqR0YIdI5RbJ4e4ZcfODFIijWv08Jc1u/RSaDqpyhNzCkwI7163GSH3JQyBgcuqjoXw==} peerDependencies: react: '>=18.2.0' @@ -1847,7 +1885,7 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) resize-observer-polyfill: 1.5.1 - ts-jest: 29.1.1(@babel/core@7.22.6)(esbuild@0.18.16)(jest@29.6.0)(typescript@5.1.6) + ts-jest: 29.1.1(@babel/core@7.22.6)(esbuild@0.19.0)(jest@29.6.0)(typescript@5.1.6) transitivePeerDependencies: - '@babel/core' - '@jest/types' @@ -1863,18 +1901,18 @@ packages: - utf-8-validate dev: false - /@fuel-wallet/sdk@0.11.0(dexie@3.2.4)(fuels@0.48.1): - resolution: {integrity: sha512-KOTRbjJOAuMcyi/VmqtY07Zwy0sm1WH6s6snfo42M74WLX29lrCm99EpKlMDkpobov+nvR9gsnw7KEOLGUJ9lA==} + /@fuel-wallet/sdk@0.11.2(dexie@3.2.4)(fuels@0.49.1): + resolution: {integrity: sha512-7DYwi9FxMLieDlagNjIZqE7DEqWjZ36HB1/1Q/7gcim/98uk3Xqlgaf1P9Hrwmzv3qcD0OxY3/W8nVnGnHYUQw==} peerDependencies: - fuels: '>=0.44.2' + fuels: '>=0.49.1' dependencies: - '@types/chrome': 0.0.237 + '@types/chrome': 0.0.242 dexie-observable: 4.0.1-beta.13(dexie@3.2.4) events: 3.3.0 - fuels: 0.48.1 + fuels: 0.49.1 json-rpc-2.0: 1.6.0 uuid: 9.0.0 - xstate: 4.38.0 + xstate: 4.38.2 transitivePeerDependencies: - dexie dev: false @@ -2281,13 +2319,13 @@ packages: tslib: 2.6.0 dev: false - /@mdx-js/esbuild@2.3.0(esbuild@0.18.16): + /@mdx-js/esbuild@2.3.0(esbuild@0.19.0): resolution: {integrity: sha512-r/vsqsM0E+U4Wr0DK+0EfmABE/eg+8ITW4DjvYdh3ve/tK2safaqHArNnaqbOk1DjYGrhxtoXoGaM3BY8fGBTA==} peerDependencies: esbuild: '>=0.11.0' dependencies: '@mdx-js/mdx': 2.3.0 - esbuild: 0.18.16 + esbuild: 0.19.0 node-fetch: 3.3.2 vfile: 5.3.7 transitivePeerDependencies: @@ -4864,7 +4902,7 @@ packages: /@types/babel__core@7.20.1: resolution: {integrity: sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==} dependencies: - '@babel/parser': 7.22.6 + '@babel/parser': 7.22.7 '@babel/types': 7.22.5 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 @@ -4880,7 +4918,7 @@ packages: /@types/babel__template@7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.22.6 + '@babel/parser': 7.22.7 '@babel/types': 7.22.5 dev: false @@ -4896,19 +4934,11 @@ packages: '@types/node': 20.4.5 dev: false - /@types/chrome@0.0.237: - resolution: {integrity: sha512-krsRmyfMlck5r+H1EapsrrucDRq6iRm0NAi5fapr93CgnpVMDdK+h2+z4x79GegdW7BNH9Vb//gkptORwwwVIQ==} - dependencies: - '@types/filesystem': 0.0.32 - '@types/har-format': 1.2.11 - dev: false - /@types/chrome@0.0.242: resolution: {integrity: sha512-SeMXBSfcAGX9ezTz7Pro7n/AiNdIH3cetkdbM+Kfg3zD24jmbnm0IAEIxzx8ccqrnJenLCfD7fR+4WIYAbeQHw==} dependencies: '@types/filesystem': 0.0.32 '@types/har-format': 1.2.11 - dev: true /@types/cookie@0.3.3: resolution: {integrity: sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow==} @@ -6071,17 +6101,17 @@ packages: /confusing-browser-globals@1.0.11: resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} - /contentlayer@0.3.4(esbuild@0.18.16): + /contentlayer@0.3.4(esbuild@0.19.0): resolution: {integrity: sha512-FYDdTUFaN4yqep0waswrhcXjmMJnPD5iXDTtxcUCGdklfuIrXM2xLx51xl748cHmGA6IsC+27YZFxU6Ym13QIA==} engines: {node: '>=14.18'} hasBin: true requiresBuild: true dependencies: - '@contentlayer/cli': 0.3.4(esbuild@0.18.16) - '@contentlayer/client': 0.3.4(esbuild@0.18.16) - '@contentlayer/core': 0.3.4(esbuild@0.18.16) - '@contentlayer/source-files': 0.3.4(esbuild@0.18.16) - '@contentlayer/source-remote-files': 0.3.4(esbuild@0.18.16) + '@contentlayer/cli': 0.3.4(esbuild@0.19.0) + '@contentlayer/client': 0.3.4(esbuild@0.19.0) + '@contentlayer/core': 0.3.4(esbuild@0.19.0) + '@contentlayer/source-files': 0.3.4(esbuild@0.19.0) + '@contentlayer/source-remote-files': 0.3.4(esbuild@0.19.0) '@contentlayer/utils': 0.3.4 transitivePeerDependencies: - '@effect-ts/otel-node' @@ -6114,8 +6144,8 @@ packages: toggle-selection: 1.0.6 dev: false - /core-js@3.31.0: - resolution: {integrity: sha512-NIp2TQSGfR6ba5aalZD+ZQ1fSxGhDo/s1w0nx3RYzf2pnJxt7YynxFlFScP6eV7+GZsKO95NSjGxyJsU3DZgeQ==} + /core-js@3.32.0: + resolution: {integrity: sha512-rd4rYZNlF3WuoYuRIDEmbR/ga9CeuWX9U05umAvgrrZoHY4Z++cp/xwPQMvUpBB4Ag6J8KfD80G0zwCyaSxDww==} requiresBuild: true dev: false @@ -6569,34 +6599,34 @@ packages: is-date-object: 1.0.5 is-symbol: 1.0.4 - /esbuild@0.18.16: - resolution: {integrity: sha512-1xLsOXrDqwdHxyXb/x/SOyg59jpf/SH7YMvU5RNSU7z3TInaASNJWNFJ6iRvLvLETZMasF3d1DdZLg7sgRimRQ==} + /esbuild@0.19.0: + resolution: {integrity: sha512-i7i8TP4vuG55bKeLyqqk5sTPu1ZjPH3wkcLvAj/0X/222iWFo3AJUYRKjbOoY6BWFMH3teizxHEdV9Su5ESl0w==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.18.16 - '@esbuild/android-arm64': 0.18.16 - '@esbuild/android-x64': 0.18.16 - '@esbuild/darwin-arm64': 0.18.16 - '@esbuild/darwin-x64': 0.18.16 - '@esbuild/freebsd-arm64': 0.18.16 - '@esbuild/freebsd-x64': 0.18.16 - '@esbuild/linux-arm': 0.18.16 - '@esbuild/linux-arm64': 0.18.16 - '@esbuild/linux-ia32': 0.18.16 - '@esbuild/linux-loong64': 0.18.16 - '@esbuild/linux-mips64el': 0.18.16 - '@esbuild/linux-ppc64': 0.18.16 - '@esbuild/linux-riscv64': 0.18.16 - '@esbuild/linux-s390x': 0.18.16 - '@esbuild/linux-x64': 0.18.16 - '@esbuild/netbsd-x64': 0.18.16 - '@esbuild/openbsd-x64': 0.18.16 - '@esbuild/sunos-x64': 0.18.16 - '@esbuild/win32-arm64': 0.18.16 - '@esbuild/win32-ia32': 0.18.16 - '@esbuild/win32-x64': 0.18.16 + '@esbuild/android-arm': 0.19.0 + '@esbuild/android-arm64': 0.19.0 + '@esbuild/android-x64': 0.19.0 + '@esbuild/darwin-arm64': 0.19.0 + '@esbuild/darwin-x64': 0.19.0 + '@esbuild/freebsd-arm64': 0.19.0 + '@esbuild/freebsd-x64': 0.19.0 + '@esbuild/linux-arm': 0.19.0 + '@esbuild/linux-arm64': 0.19.0 + '@esbuild/linux-ia32': 0.19.0 + '@esbuild/linux-loong64': 0.19.0 + '@esbuild/linux-mips64el': 0.19.0 + '@esbuild/linux-ppc64': 0.19.0 + '@esbuild/linux-riscv64': 0.19.0 + '@esbuild/linux-s390x': 0.19.0 + '@esbuild/linux-x64': 0.19.0 + '@esbuild/netbsd-x64': 0.19.0 + '@esbuild/openbsd-x64': 0.19.0 + '@esbuild/sunos-x64': 0.19.0 + '@esbuild/win32-arm64': 0.19.0 + '@esbuild/win32-ia32': 0.19.0 + '@esbuild/win32-x64': 0.19.0 dev: false /escalade@3.1.1: @@ -7459,33 +7489,33 @@ packages: dev: false optional: true - /fuels@0.48.1: - resolution: {integrity: sha512-eVBE/JYhXkKZgDApqKLPrgRmqgB1jl8ako9pjYrifu5vkPHrfiTgK1whAu9NTBWL4wrYflxZUTeqgvzKlSK6Qw==} + /fuels@0.49.1: + resolution: {integrity: sha512-ul/q/M8yiHFR3Vs22Z027GvGc1h5xUuhW4I+mP+koxgohmn1xHjzVXcd35RPR7gMIcT5+hkFdpwKgbw0Jrvjeg==} hasBin: true dependencies: '@ethersproject/bytes': 5.7.0 - '@fuel-ts/abi-coder': 0.48.1 - '@fuel-ts/abi-typegen': 0.48.1 - '@fuel-ts/address': 0.48.1 - '@fuel-ts/contract': 0.48.1 - '@fuel-ts/hasher': 0.48.1 - '@fuel-ts/hdwallet': 0.48.1 - '@fuel-ts/interfaces': 0.48.1 - '@fuel-ts/keystore': 0.48.1 - '@fuel-ts/math': 0.48.1 - '@fuel-ts/merkle': 0.48.1 - '@fuel-ts/mnemonic': 0.48.1 - '@fuel-ts/predicate': 0.48.1 - '@fuel-ts/program': 0.48.1 - '@fuel-ts/providers': 0.48.1 - '@fuel-ts/script': 0.48.1 - '@fuel-ts/signer': 0.48.1 - '@fuel-ts/testcases': 0.48.1 - '@fuel-ts/transactions': 0.48.1 - '@fuel-ts/versions': 0.48.1 - '@fuel-ts/wallet': 0.48.1 - '@fuel-ts/wallet-manager': 0.48.1 - '@fuel-ts/wordlists': 0.48.1 + '@fuel-ts/abi-coder': 0.49.1 + '@fuel-ts/abi-typegen': 0.49.1 + '@fuel-ts/address': 0.49.1 + '@fuel-ts/contract': 0.49.1 + '@fuel-ts/crypto': 0.49.1 + '@fuel-ts/hasher': 0.49.1 + '@fuel-ts/hdwallet': 0.49.1 + '@fuel-ts/interfaces': 0.49.1 + '@fuel-ts/math': 0.49.1 + '@fuel-ts/merkle': 0.49.1 + '@fuel-ts/mnemonic': 0.49.1 + '@fuel-ts/predicate': 0.49.1 + '@fuel-ts/program': 0.49.1 + '@fuel-ts/providers': 0.49.1 + '@fuel-ts/script': 0.49.1 + '@fuel-ts/signer': 0.49.1 + '@fuel-ts/testcases': 0.49.1 + '@fuel-ts/transactions': 0.49.1 + '@fuel-ts/versions': 0.49.1 + '@fuel-ts/wallet': 0.49.1 + '@fuel-ts/wallet-manager': 0.49.1 + '@fuel-ts/wordlists': 0.49.1 commander: 9.5.0 transitivePeerDependencies: - encoding @@ -8343,7 +8373,7 @@ packages: engines: {node: '>=8'} dependencies: '@babel/core': 7.22.6 - '@babel/parser': 7.22.6 + '@babel/parser': 7.22.7 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 7.5.4 @@ -9386,17 +9416,17 @@ packages: resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} dev: false - /mdx-bundler@9.2.1(esbuild@0.18.16): + /mdx-bundler@9.2.1(esbuild@0.19.0): resolution: {integrity: sha512-hWEEip1KU9MCNqeH2rqwzAZ1pdqPPbfkx9OTJjADqGPQz4t9BO85fhI7AP9gVYrpmfArf9/xJZUN0yBErg/G/Q==} engines: {node: '>=14', npm: '>=6'} peerDependencies: esbuild: 0.* dependencies: '@babel/runtime': 7.22.6 - '@esbuild-plugins/node-resolve': 0.1.4(esbuild@0.18.16) + '@esbuild-plugins/node-resolve': 0.1.4(esbuild@0.19.0) '@fal-works/esbuild-plugin-global-externals': 2.1.2 - '@mdx-js/esbuild': 2.3.0(esbuild@0.18.16) - esbuild: 0.18.16 + '@mdx-js/esbuild': 2.3.0(esbuild@0.19.0) + esbuild: 0.19.0 gray-matter: 4.0.3 remark-frontmatter: 4.0.1 remark-mdx-frontmatter: 1.1.1 @@ -9892,7 +9922,7 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: false - /next-contentlayer@0.3.4(contentlayer@0.3.4)(esbuild@0.18.16)(next@13.4.12)(react-dom@18.2.0)(react@18.2.0): + /next-contentlayer@0.3.4(contentlayer@0.3.4)(esbuild@0.19.0)(next@13.4.12)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-UtUCwgAl159KwfhNaOwyiI7Lg6sdioyKMeh+E7jxx0CJ29JuXGxBEYmCI6+72NxFGIFZKx8lvttbbQhbnYWYSw==} peerDependencies: contentlayer: 0.3.4 @@ -9900,9 +9930,9 @@ packages: react: '*' react-dom: '*' dependencies: - '@contentlayer/core': 0.3.4(esbuild@0.18.16) + '@contentlayer/core': 0.3.4(esbuild@0.19.0) '@contentlayer/utils': 0.3.4 - contentlayer: 0.3.4(esbuild@0.18.16) + contentlayer: 0.3.4(esbuild@0.19.0) next: 13.4.12(@babel/core@7.22.6)(@opentelemetry/api@1.4.1)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -10378,7 +10408,7 @@ packages: /plyr@3.7.8: resolution: {integrity: sha512-yG/EHDobwbB/uP+4Bm6eUpJ93f8xxHjjk2dYcD1Oqpe1EcuQl5tzzw9Oq+uVAzd2lkM11qZfydSiyIpiB8pgdA==} dependencies: - core-js: 3.31.0 + core-js: 3.32.0 custom-event-polyfill: 1.0.7 loadjs: 4.2.0 rangetouch: 2.0.1 @@ -11084,8 +11114,8 @@ packages: engines: {node: '>=0.10.0'} dev: false - /search-insights@2.6.0: - resolution: {integrity: sha512-vU2/fJ+h/Mkm/DJOe+EaM5cafJv/1rRTZpGJTuFPf/Q5LjzgMDsqPdSaZsAe+GAWHHsfsu+rQSAn6c8IGtBEVw==} + /search-insights@2.7.0: + resolution: {integrity: sha512-GLbVaGgzYEKMvuJbHRhLi1qoBFnjXZGZ6l4LxOYPCp4lI2jDRB3jPU9/XNhMwv6kvnA9slTreq6pvK+b3o3aqg==} engines: {node: '>=8.16.0'} dev: false @@ -11705,7 +11735,7 @@ packages: resolution: {integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==} dev: false - /ts-jest@29.1.1(@babel/core@7.22.6)(esbuild@0.18.16)(jest@29.6.0)(typescript@5.1.6): + /ts-jest@29.1.1(@babel/core@7.22.6)(esbuild@0.19.0)(jest@29.6.0)(typescript@5.1.6): resolution: {integrity: sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -11728,7 +11758,7 @@ packages: dependencies: '@babel/core': 7.22.6 bs-logger: 0.2.6 - esbuild: 0.18.16 + esbuild: 0.19.0 fast-json-stable-stringify: 2.1.0 jest: 29.6.0(@types/node@20.4.5) jest-util: 29.6.0 @@ -12293,6 +12323,10 @@ packages: resolution: {integrity: sha512-oFjw2YZPyu6HeO0JWCSqfhAALsjFPURsrD2FUFN3u213dWwYU68RFuLtSHco+cEUhpQFW+hRG3PNYgq8HatudQ==} dev: false + /xstate@4.38.2: + resolution: {integrity: sha512-Fba/DwEPDLneHT3tbJ9F3zafbQXszOlyCJyQqqdzmtlY/cwE2th462KK48yaANf98jHlP6lJvxfNtN0LFKXPQg==} + dev: false + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} diff --git a/scripts/clean-build-files.sh b/scripts/clean-build-files.sh index e50ba8b4..fec6847e 100644 --- a/scripts/clean-build-files.sh +++ b/scripts/clean-build-files.sh @@ -5,4 +5,7 @@ rm -rf ./docs/builds/sway/v* rm -rf ./docs/builds/sway/latest # generate sidebar links -pnpm generate:links \ No newline at end of file +pnpm generate:links + +# generate components +pnpm generate:components \ No newline at end of file diff --git a/scripts/components.mjs b/scripts/components.mjs new file mode 100644 index 00000000..5bcc593c --- /dev/null +++ b/scripts/components.mjs @@ -0,0 +1,371 @@ +import * as acornLoose from 'acorn-loose'; +import fs from 'fs'; +import { globby } from 'globby'; +import path from 'path'; +import * as prettier from 'prettier'; +import remarkMdx from 'remark-mdx'; +import remarkParse from 'remark-parse'; +import { unified } from 'unified'; +import { visit } from 'unist-util-visit'; + +const DOCS_DIRECTORY = path.join(process.cwd(), './docs'); +const OUTPUT_FOLDER = 'src/component-exports'; + +const GRAPHQL_BOOK_NAME = 'fuel-graphql-docs'; +const GRAPHQL_DIRECTORY = path.join(DOCS_DIRECTORY, `./${GRAPHQL_BOOK_NAME}`); +const GRAPHQL_DOCS_DIRECTORY = path.join(GRAPHQL_DIRECTORY, './docs'); +const GRAPHQL_COMPONENTS_CONFIG_PATH = path.join( + GRAPHQL_DIRECTORY, + './src/components.json' +); + +const WALLET_BOOK_NAME = 'fuels-wallet'; +const WALLET_DIRECTORY = path.join( + DOCS_DIRECTORY, + `./${WALLET_BOOK_NAME}/packages/docs` +); +const WALLET_DOCS_DIRECTORY = path.join(WALLET_DIRECTORY, './docs'); +const WALLET_COMPONENTS_CONFIG_PATH = path.join( + WALLET_DIRECTORY, + './src/components.json' +); + +const completedExports = []; +const completedObjects = []; + +async function main() { + if (!fs.existsSync(path.join(process.cwd(), OUTPUT_FOLDER))) { + fs.mkdirSync(path.join(process.cwd(), OUTPUT_FOLDER)); + } + await exportComponents( + GRAPHQL_DIRECTORY, + GRAPHQL_DOCS_DIRECTORY, + GRAPHQL_BOOK_NAME, + GRAPHQL_COMPONENTS_CONFIG_PATH, + 'graphql.ts' + ); + await exportComponents( + path.join(DOCS_DIRECTORY, WALLET_BOOK_NAME), + WALLET_DOCS_DIRECTORY, + WALLET_BOOK_NAME, + WALLET_COMPONENTS_CONFIG_PATH, + 'wallet.ts' + ); +} + +main(); + +async function getMDXFilesFromFolder(folderPath) { + const paths = await globby(['**.mdx'], { + cwd: folderPath, + }); + return paths.map((thisPath) => path.join(folderPath, thisPath)); +} + +function getComponents(mdxContent) { + const components = []; + const tree = unified().use(remarkParse).use(remarkMdx).parse(mdxContent); + + visit(tree, 'mdxJsxFlowElement', (node) => { + components.push(node.name); + }); + return Array.from(new Set(components)); +} + +function findComponentsInMDXFiles(files, componentsConfig) { + const components = {}; + + files.forEach((filePath) => { + const mdxContent = fs.readFileSync(filePath, 'utf-8'); + const comps = getComponents(mdxContent); + if (comps.length > 0) { + const fileName = filePath.split('/').pop()?.replace('.mdx', ''); + const final = []; + const categories = {}; + const subcategories = {}; + + comps.forEach((comp) => { + if (comp.includes('.')) { + const split = comp.split('.'); + if (!componentsConfig.ignore.includes(split[0])) { + // handle nested components + if (split.length == 2) { + const categoryComp = split.pop(); + const category = split.pop(); + if (!categories[category]) { + categories[category] = []; + } + categories[category].push(categoryComp); + } else if (split.length == 3) { + const categoryComp = split.pop(); + const subCategory = split.pop(); + const category = split.pop(); + if (!subcategories[category]) { + subcategories[category] = {}; + } + if (!subcategories[category][subCategory]) { + subcategories[category][subCategory] = []; + } + subcategories[category][subCategory].push(categoryComp); + } + } + } else { + // ignore components that are replaced in the docs hub + if (!componentsConfig.ignore.includes(comp)) { + final.push({ + name: comp, + }); + } + } + }); + + Object.keys(categories).forEach((cat) => { + final.push({ + name: cat, + subComponents: categories[cat], + subCategories: subcategories[cat], + }); + }); + + if (final.length > 0) { + components[fileName] = final; + } + } + }); + return components; +} + +function hasDefaultExport(componentPath) { + const fileContent = fs.readFileSync(componentPath, 'utf8'); + + const ast = acornLoose.parse(fileContent, { + ecmaVersion: 'latest', + sourceType: 'module', + }); + let isDefault = false; + visit(ast, '', (node) => { + if (node.body) { + node.body.forEach((bodyNode) => { + if (bodyNode.type === 'ExportDefaultDeclaration') { + isDefault = true; + } + }); + } + }); + return isDefault; +} + +function getPath(compName, componentsConfig, directory, dirPath) { + let actualCompPath = ''; + let isDefault = false; + for (let i = 0; i < componentsConfig.folders.length; i++) { + const thisPath = `${componentsConfig.folders[i]}/${compName}`; + const actualPath = `${directory}${thisPath}.tsx`; + if (fs.existsSync(actualPath)) { + isDefault = hasDefaultExport(actualPath); + actualCompPath = `../../docs/${dirPath}${thisPath}`; + break; + } + } + if (actualCompPath === '') { + throw Error(`Can't find ${compName}`); + } + + return { actualCompPath, isDefault }; +} + +function handleSubCategory( + key, + comp, + componentsConfig, + directory, + dirPath, + subCategories +) { + const importName = `${comp.name}.${key}`; + let categories = subCategories; + if (!completedObjects.includes(importName)) { + completedObjects.push(importName); + categories = categories + `${importName} = {};\n\n`; + } + + const subCatComps = comp.subCategories[key]; + categories = + categories + + subCatComps + .map((subCatComp) => { + const { actualCompPath, isDefault } = getPath( + subCatComp, + componentsConfig, + directory, + dirPath + ); + + const id = `${comp.name}.${key}.${subCatComp}`; + if (!completedExports.includes(id)) { + completedExports.push(id); + return `${id} = dynamic( + () => import("${actualCompPath}")${ + isDefault ? '' : `.then((mod) => mod.${subCatComp})` + }) + ;\n\n`; + } + }) + .join('\n'); + return categories; +} + +function handleSubComponents(comp, componentsConfig, directory, dirPath) { + let subCategories = ''; + const subComps = comp.subComponents + .map((subComp) => { + const { actualCompPath, isDefault } = getPath( + subComp, + componentsConfig, + directory, + dirPath + ); + + if (!completedExports.includes(`${comp.name}.${subComp}`)) { + completedExports.push(`${comp.name}.${subComp}`); + return `${comp.name}.${subComp} = dynamic( + () => import("${actualCompPath}")${ + isDefault ? '' : `.then((mod) => mod.${subComp})` + }) + ;\n\n`; + } + }) + .join(''); + + if (comp.subCategories) { + Object.keys(comp.subCategories).forEach((key) => { + subCategories = + subCategories + + handleSubCategory( + key, + comp, + componentsConfig, + directory, + dirPath, + subCategories + ); + }); + } + if (!completedObjects.includes(comp.name)) { + const cat = `const ${comp.name}: ComponentObject= {};\n\n`; + completedObjects.push(comp.name); + return cat + subComps + subCategories; + } + return subComps + subCategories; +} + +function handleComponent(comp, componentsConfig, directory, dirPath) { + // handle component with no subComponents + const { actualCompPath, isDefault } = getPath( + comp.name, + componentsConfig, + directory, + dirPath + ); + + if (!completedExports.includes(comp.name)) { + return `const ${comp.name} = dynamic( +() => import("${actualCompPath}")${ + isDefault ? '' : `.then((mod) => mod.${comp.name})` + }) +;\n\n`; + } +} + +function getImports(components) { + const includesDynamic = `import dynamic from "next/dynamic"; + + `; + const includesObject = `import type { ComponentObject, ComponentsList } from '../types';`; + const noObject = `import type { ComponentsList } from '../types';`; + let hasObject = false; + let hasDynamic = false; + + const pages = Object.keys(components); + if (pages.length > 0) { + hasDynamic = true; + Object.keys(components).forEach((key) => { + if (!hasObject) { + const pageArray = components[key]; + hasObject = pageArray.some( + (comp) => + (comp.subComponents && comp.subComponents.length > 0) || + comp.subCategories + ); + } + }); + } + + if (hasObject) { + return includesDynamic + includesObject; + } else if (hasDynamic) { + return includesDynamic + noObject; + } + return noObject; +} + +async function exportComponents( + directory, + docsDirectory, + dirPath, + configPath, + fileName +) { + const componentsConfigFile = fs.readFileSync(configPath, 'utf8'); + const componentsConfig = JSON.parse(componentsConfigFile); + + const paths = await getMDXFilesFromFolder(docsDirectory); + const components = findComponentsInMDXFiles(paths, componentsConfig); + + const componentsString = `${getImports(components)} + + ${Object.keys(components) + .map((page) => { + const pageArray = components[page]; + return pageArray + .map((comp) => { + if ( + (comp.subComponents && comp.subComponents.length > 0) || + comp.subCategories + ) { + return handleSubComponents( + comp, + componentsConfig, + directory, + dirPath + ); + } else { + return handleComponent(comp, componentsConfig, directory, dirPath); + } + }) + .join('\n'); + }) + .join('\n')} + export const COMPONENTS: ComponentsList = { + ${Object.keys(components) + .map((page) => { + return `'${page}': [ + ${components[page] + .map((comp) => { + return ` { + name: "${comp.name}", + ${comp.subComponents ? 'imports:' : 'import:'} ${comp.name} + },`; + }) + .join('\n')} + ],`; + }) + .join('\n')} + }; + `; + const outputPath = path.join(OUTPUT_FOLDER, fileName); + const formatted = prettier + .format(componentsString, { parser: 'babel-ts' }) + .trimEnd(); + fs.writeFileSync(outputPath, formatted); +} diff --git a/scripts/generate-links.mjs b/scripts/generate-links.mjs index 071e71dc..0c575641 100644 --- a/scripts/generate-links.mjs +++ b/scripts/generate-links.mjs @@ -18,7 +18,11 @@ const graphqlOrderPath = join( DOCS_DIRECTORY, './fuel-graphql-docs/src/nav.json' ); -const guidesOrderPath = join(DOCS_DIRECTORY, '../docs/guides/docs/nav.json'); +const guidesOrderPath = join(DOCS_DIRECTORY, './guides/docs/nav.json'); +const walletOrderPath = join( + DOCS_DIRECTORY, + './fuels-wallet/packages/docs/src/nav.json' +); const aboutFuelOrderPath = join(DOCS_DIRECTORY, '../docs/about-fuel/nav.json'); const tsConfigPath = join( DOCS_DIRECTORY, @@ -32,6 +36,7 @@ const indexerSummaryFile = fs.readFileSync(indexerSummaryPath, 'utf8'); const specsSummaryFile = fs.readFileSync(specsSummaryPath, 'utf8'); const graphqlOrderFile = JSON.parse(fs.readFileSync(graphqlOrderPath, 'utf8')); const guidesOrderFile = JSON.parse(fs.readFileSync(guidesOrderPath, 'utf8')); +const walletOrderFile = JSON.parse(fs.readFileSync(walletOrderPath, 'utf8')); const aboutFuelOrderFile = JSON.parse( fs.readFileSync(aboutFuelOrderPath, 'utf8') ); @@ -173,33 +178,7 @@ async function getOrders() { orders['about-fuel'] = aboutFuelOrderFile; // WALLET ORDER - // replace this with a nav.json file - // once wallet npm package is updated to the master version - orders.wallet = { - menu: [ - 'Install', - 'Browser Support', - 'How To Use', - 'For Developers', - 'Contributing', - ], - - for_developers: [ - 'Getting Started', - 'Connecting', - 'Accounts', - 'Assets', - 'Networks', - 'Signing a Message', - 'Wallet Connectors', - 'Reference', - ], - contributing: [ - 'Running locally', - 'Contributing Guide', - 'Linking local dependencies', - ], - }; + orders.wallet = walletOrderFile; orders['fuels-ts'] = processVPConfig(tsConfigFile.split(EOL)); @@ -303,12 +282,18 @@ function getSortedLinks(config, docs) { /** Sort categoried links */ .map((link) => { if (!link.submenu) return link; - const key = link.label + let key = link.label .toLowerCase() .replaceAll(' ', '-') .replaceAll('_', '-'); let catOrder = config[key]; if (!catOrder) catOrder = config[key.replaceAll('-', '_')]; + if (!catOrder) { + const regex = /\/([^/]+)\/[^/]+$/; + const match = link.submenu[0].slug.match(regex); + key = match[1]; + catOrder = config[key]; + } catOrder = catOrder?.map((title) => title.toLowerCase().replaceAll('-', '_').replaceAll(' ', '_') diff --git a/src/components/MobileMenu.tsx b/src/components/MobileMenu.tsx index 3007b676..cd2a6152 100644 --- a/src/components/MobileMenu.tsx +++ b/src/components/MobileMenu.tsx @@ -132,6 +132,7 @@ function MenuButton({ item, active }: MenuButtonProps) { onPress={() => setIsOpen(!isOpen)} css={styles.navButton} variant="link" + intent="base" data-active={isActive} rightIcon={isOpen ? Icon.is('ChevronUp') : Icon.is('ChevronDown')} > diff --git a/src/components/Provider.tsx b/src/components/Provider.tsx index f748da42..314aac07 100644 --- a/src/components/Provider.tsx +++ b/src/components/Provider.tsx @@ -7,11 +7,25 @@ type ProviderProps = { children: ReactNode; }; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function editTheme(ogTheme: any) { + const thisTheme = ogTheme; + if (!thisTheme.components) thisTheme.components = {}; + if (!thisTheme.components.Button) thisTheme.components.Button = {}; + thisTheme.components.Button.defaultProps = { + intent: 'primary', + }; + return thisTheme; +} + +const newDarkTheme = editTheme(darkTheme); +const newLightTheme = editTheme(lightTheme); + export function Provider({ children }: ProviderProps) { const { theme } = useTheme(); return ( {children} diff --git a/src/components/SidebarSubmenu.tsx b/src/components/SidebarSubmenu.tsx index 6ce3ff1b..82235fe7 100644 --- a/src/components/SidebarSubmenu.tsx +++ b/src/components/SidebarSubmenu.tsx @@ -38,6 +38,7 @@ export function SidebarSubmenu({ return ( diff --git a/src/lib/imports.ts b/src/lib/imports.ts index 4fbb672f..f46a9fa5 100644 --- a/src/lib/imports.ts +++ b/src/lib/imports.ts @@ -4,7 +4,9 @@ import dynamic from 'next/dynamic'; import * as GQLExamples from '~/docs/fuel-graphql-docs/examples'; import * as FuelExamples from '~/docs/fuels-wallet/packages/docs/examples'; -import type { DocType } from './types'; +import { COMPONENTS as GQL_COMPONENTS } from '../component-exports/graphql'; +import { COMPONENTS as WALLET_COMPONENTS } from '../component-exports/wallet'; +import type { DocType, ComponentsList } from '../types'; function loadComponent(imp: any, name?: string) { return dynamic(() => imp.then((mod: any) => (name ? mod[name] : mod)), { @@ -16,44 +18,41 @@ export function getComponents(doc: DocType) { const components: any = {}; const slug = doc.docsConfig.slug || ''; - if (['wallet/', 'guides/'].some((s) => slug.includes(s))) { + function addComponents(list: ComponentsList) { + Object.keys(list).forEach((page) => { + if (doc.slug.includes(page)) { + list[page].forEach((comp: any) => { + if (comp.import) { + components[comp.name] = comp.import; + } else if (comp.imports) { + components[comp.name] = comp.imports; + } + }); + } + }); + } + + if (['guides/'].some((s) => slug.startsWith(s))) { components.CodeImport = loadComponent( import('~/src/components/CodeImport'), 'CodeImport' ); - - // load the components used in the wallet docs - components.Demo = loadComponent( - import('~/docs/fuels-wallet/packages/docs/src/components/Demo'), - 'Demo' - ); - - components.Player = loadComponent( - import('~/docs/fuels-wallet/packages/docs/src/components/Player'), - 'Player' - ); - - components.InstallSection = loadComponent( - import('~/docs/fuels-wallet/packages/docs/src/components/InstallSection'), - 'InstallSection' + } else if (['docs/wallet/'].some((s) => slug.startsWith(s))) { + components.CodeImport = loadComponent( + import('~/src/components/CodeImport'), + 'CodeImport' ); - components.ConnectionAlert = loadComponent( - import( - '~/docs/fuels-wallet/packages/docs/src/components/ConnectionAlert' - ), - 'ConnectionAlert' - ); + addComponents(WALLET_COMPONENTS); components.Examples = FuelExamples; - } - - if (['graphql/', 'recipes/'].some((s) => slug.includes(s))) { + } else if (['docs/graphql/'].some((s) => slug.startsWith(s))) { components.GQLExamples = GQLExamples; components.CodeExamples = loadComponent( import('~/src/components/GraphqlCodeExample'), 'GraphQLCodeExample' ); + addComponents(GQL_COMPONENTS); } return components; diff --git a/src/styles/index.css b/src/styles/index.css index 6f987d44..fe163ae6 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -74,3 +74,7 @@ img { ul > li > ul { margin: 5px 0 !important; } + +textarea { + color: inherit !important; +} diff --git a/src/types.ts b/src/types.ts index 38a31d5f..05361a17 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,6 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import type { RawDocumentData } from 'contentlayer/core'; +import type { ComponentType } from 'react'; export type MenuKey = string; @@ -39,3 +41,17 @@ export type NodeHeading = { id: string; children?: NodeHeading[]; }; + +export interface ComponentObject { + [key: string]: ComponentType | ComponentObject; +} + +export interface Component { + name: string; + import?: ComponentType; + imports?: ComponentObject; +} + +export interface ComponentsList { + [key: string]: Component[]; +}