From df0b7c015a823507b24ef5059ebdf61d12dca2cd Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:45:33 -0300 Subject: [PATCH 1/8] feat: add remaining operations to simple transaction view --- .../component/TxScripts/TxScripts.tsx | 171 +++++++++++++++++- 1 file changed, 167 insertions(+), 4 deletions(-) diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx index ff3b4e907..65d4e33e1 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx @@ -441,7 +441,7 @@ function ReceiptHeader() { const assetId = receipt?.assetId ?? ''; const amount = bn(receipt?.amount); - if (type === 'CALL' && Boolean(contract)) { + if (type === GQLReceiptType.Call && Boolean(contract)) { return ( @@ -472,7 +472,7 @@ function ReceiptHeader() { ); } - if (type === 'MINT' || type === 'BURN') { + if (type === GQLReceiptType.Mint || type === GQLReceiptType.Burn) { return ( @@ -504,7 +504,7 @@ function ReceiptHeader() { ); } - if (type === 'TRANSFER_OUT' || type === 'TRANSFER') { + if (type === GQLReceiptType.TransferOut || type === GQLReceiptType.Transfer) { return ( @@ -527,11 +527,12 @@ function ReceiptHeader() { /> )} + ); } - if (type === 'MESSAGE_OUT') { + if (type === GQLReceiptType.MessageOut) { return ( @@ -557,6 +558,168 @@ function ReceiptHeader() { /> )} + + + ); + } + + // New cases for additional receipt types + if (type === GQLReceiptType.Log || type === GQLReceiptType.LogData) { + const pc = receipt?.pc; + const data = receipt?.data; + return ( + + + + {!!pc && ( + + PC: {pc} + + )} + {!!data && !data?.startsWith('0x') && ( + + Data: {data} + + )} + {!!data && data?.startsWith('0x') && ( +
+ )} + + + + ); + } + + if (type === GQLReceiptType.Panic || type === GQLReceiptType.Revert) { + const reason = receipt?.reason; + const contractId = receipt?.contractId; + return ( + + + + {!!reason && ( + + Reason: {reason} + + )} + {!!contractId && ( +
+ )} + + + + ); + } + + if (type === GQLReceiptType.ReturnData) { + const pc = receipt?.pc; + const data = receipt?.data; + return ( + + + + {!!pc && ( + + PC: {pc} + + )} + {data != null && ( + + Data: {data} + + )} + + + + ); + } + + if (type === GQLReceiptType.Return) { + const val = receipt?.val; + const pc = receipt?.pc; + return ( + + + + {!!val && ( + + Value: {val} + + )} + {pc != null && ( + + PC: {pc} + + )} + + + + ); + } + + if (type === GQLReceiptType.ScriptResult) { + const gasUsed = receipt?.gasUsed; + const result = receipt?.result; + return ( + + + + {!!gasUsed && ( + + Gas Used: {gasUsed} + + )} + {result != null && ( + + Result: {result} + + )} + + ); } From 515e2ee2c7afb0e6fd322a8ea1a9c8504a80b612 Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:45:44 -0300 Subject: [PATCH 2/8] chore: update browsers list --- pnpm-lock.yaml | 748 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 548 insertions(+), 200 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 383883974..804129cdb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,13 +46,13 @@ importers: version: 1.5.3 '@fuels/jest': specifier: 0.20.0 - version: 0.20.0(@jest/globals@29.7.0)(@types/jest@29.5.12)(bufferutil@4.0.8)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(utf-8-validate@5.0.10)(vitest@1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0)) + version: 0.20.0(@jest/globals@29.7.0)(@types/jest@29.5.12)(bufferutil@4.0.8)(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(utf-8-validate@5.0.10)(vitest@1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0)) '@fuels/ts-config': specifier: 0.20.0 version: 0.20.0(typescript@5.4.5) '@fuels/tsup-config': specifier: 0.20.0 - version: 0.20.0(tsup@8.0.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))(typescript@5.4.5)) + version: 0.20.0(tsup@8.0.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))(typescript@5.4.5)) '@jest/types': specifier: 29.6.3 version: 29.6.3 @@ -94,7 +94,7 @@ importers: version: 9.0.11 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + version: 29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) jest-environment-jsdom: specifier: 29.7.0 version: 29.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -112,13 +112,13 @@ importers: version: 4.1.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(typescript@5.4.5) + version: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(typescript@5.4.5) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5) + version: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5) tsup: specifier: 8.0.2 - version: 8.0.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))(typescript@5.4.5) + version: 8.0.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))(typescript@5.4.5) tsx: specifier: 4.7.1 version: 4.7.1 @@ -133,7 +133,7 @@ importers: version: 15.3.1 vitest: specifier: 1.2.2 - version: 1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0) + version: 1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0) ws: specifier: ^8.17.1 version: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -155,7 +155,7 @@ importers: version: 4.7.1 vitest: specifier: 1.2.2 - version: 1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0) + version: 1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0) docker/erc20-deployer/deployer: dependencies: @@ -171,7 +171,7 @@ importers: devDependencies: ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.5.4) packages/app-commons: devDependencies: @@ -201,7 +201,7 @@ importers: version: 18.2.0(react@18.2.0) tailwind-variants: specifier: 0.1.20 - version: 0.1.20(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))) + version: 0.1.20(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))) typescript: specifier: 5.4.5 version: 5.4.5 @@ -325,7 +325,7 @@ importers: version: 8.0.8(@types/react@18.2.54)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@storybook/addon-interactions': specifier: ^8.0.8 - version: 8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0)) + version: 8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0)) '@storybook/addon-links': specifier: ^8.0.8 version: 8.0.8(react@18.2.0) @@ -340,7 +340,7 @@ importers: version: 7.6.17(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@storybook/nextjs': specifier: ^8.0.8 - version: 8.0.8(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/webpack@4.41.38)(next@14.2.3(@babel/core@7.23.9)(@playwright/test@1.41.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(type-fest@4.26.0)(typescript@5.4.5)(webpack-dev-server@4.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))))(webpack-hot-middleware@2.26.1)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))) + version: 8.0.8(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/webpack@4.41.39)(next@14.2.3(@babel/core@7.23.9)(@playwright/test@1.41.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(type-fest@4.26.0)(typescript@5.4.5)(webpack-dev-server@4.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))))(webpack-hot-middleware@2.26.1)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))) '@storybook/react': specifier: ^8.0.8 version: 8.0.8(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.4.5) @@ -358,7 +358,7 @@ importers: version: 9.3.4 '@testing-library/jest-dom': specifier: 6.4.2 - version: 6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0)) + version: 6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0)) '@types/node': specifier: 20.11.6 version: 20.11.6 @@ -409,10 +409,10 @@ importers: version: 5.4.5 vite: specifier: ^5.1.3 - version: 5.2.6(@types/node@20.11.6)(terser@5.27.0) + version: 5.2.6(@types/node@20.11.6)(terser@5.32.0) vite-tsconfig-paths: specifier: ^4.3.1 - version: 4.3.1(typescript@5.4.5)(vite@5.2.6(@types/node@20.11.6)(terser@5.27.0)) + version: 4.3.1(typescript@5.4.5)(vite@5.2.6(@types/node@20.11.6)(terser@5.32.0)) packages/app-portal: dependencies: @@ -838,7 +838,7 @@ importers: version: 2.47.0(react@18.2.0) '@tailwindcss/typography': specifier: 0.5.10 - version: 0.5.10(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))) + version: 0.5.10(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))) clsx: specifier: 2.1.0 version: 2.1.0 @@ -874,16 +874,16 @@ importers: version: 17.5.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) tailwind-variants: specifier: 0.1.20 - version: 0.1.20(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))) + version: 0.1.20(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))) tailwindcss-animate: specifier: 1.0.7 - version: 1.0.7(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))) + version: 1.0.7(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))) tailwindcss-radix: specifier: 3.0.3 version: 3.0.3 tailwindcss-themer: specifier: 4.0.0 - version: 4.0.0(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))) + version: 4.0.0(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))) devDependencies: '@chialab/esbuild-plugin-meta-url': specifier: 0.18.0 @@ -899,7 +899,7 @@ importers: version: 8.0.8(@types/react@18.2.54)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@storybook/addon-interactions': specifier: ^8.0.8 - version: 8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0)) + version: 8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(vitest@1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0)) '@storybook/addon-links': specifier: ^8.0.8 version: 8.0.8(react@18.2.0) @@ -917,7 +917,7 @@ importers: version: 8.0.8(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.4.5) '@storybook/react-vite': specifier: ^8.0.8 - version: 8.0.8(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@4.13.1)(typescript@5.4.5)(vite@5.2.6(@types/node@20.14.15)(terser@5.27.0)) + version: 8.0.8(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@4.13.1)(typescript@5.4.5)(vite@5.2.6(@types/node@22.5.4)(terser@5.32.0)) '@storybook/testing-library': specifier: ^0.2.2 version: 0.2.2 @@ -956,7 +956,7 @@ importers: version: link:../storybook-addon-theme tailwindcss: specifier: 3.4.4 - version: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + version: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) tsconfig-paths-webpack-plugin: specifier: ^4.1.0 version: 4.1.0 @@ -965,10 +965,10 @@ importers: version: 5.4.5 vite: specifier: ^5.1.3 - version: 5.2.6(@types/node@20.14.15)(terser@5.27.0) + version: 5.2.6(@types/node@22.5.4)(terser@5.32.0) vite-tsconfig-paths: specifier: ^4.3.1 - version: 4.3.1(typescript@5.4.5)(vite@5.2.6(@types/node@20.14.15)(terser@5.27.0)) + version: 4.3.1(typescript@5.4.5)(vite@5.2.6(@types/node@22.5.4)(terser@5.32.0)) packages: @@ -1011,7 +1011,10 @@ packages: peerDependencies: '@testing-library/dom': ^8.0.0 || ^9.0.0 '@testing-library/react': ^12.0.0 || ^13.0.0 || ^14.0.0 - react: ^17.0.0 || ^18.0.0 + react: '*' + peerDependenciesMeta: + react: + optional: true '@aw-web-design/x-default-browser@1.4.126': resolution: {integrity: sha512-Xk1sIhyNC/esHGGVjL/niHLowM0csl/kFO5uawBy4IrWwy0o1G8LGt3jP6nmWGz+USxeeqbihAmp/oVZju6wug==} @@ -2848,10 +2851,6 @@ packages: '@fal-works/esbuild-plugin-global-externals@2.1.2': resolution: {integrity: sha512-cEee/Z+I12mZcFJshKcCqC8tuX5hG3s+d+9nZ3LabqKF1vKdF41B92pJVCBggjAGORAeOzyyDDKrZwIkLffeOQ==} - '@fastify/busboy@2.1.1': - resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} - engines: {node: '>=14'} - '@floating-ui/core@1.6.0': resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==} @@ -3632,23 +3631,44 @@ packages: resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} + '@jridgewell/gen-mapping@0.3.5': + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} + '@jridgewell/resolve-uri@3.1.1': resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + '@jridgewell/set-array@1.1.2': resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + '@jridgewell/source-map@0.3.5': resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} + '@jridgewell/source-map@0.3.6': + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.22': resolution: {integrity: sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==} + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} @@ -3671,7 +3691,10 @@ packages: resolution: {integrity: sha512-9ZrPIU4MGf6et1m1ov3zKf+q9+deetI51zprKB1D/z3NOb+rUxxtEl3mCjW5wTGh6VhRdwPueh1oRzi6ezkA8A==} peerDependencies: '@types/react': '>=16' - react: '>=16' + react: '*' + peerDependenciesMeta: + react: + optional: true '@metamask/eth-json-rpc-provider@1.0.1': resolution: {integrity: sha512-whiUMPlAOrVGmX8aKYVPvlKyG4CpQXiNNyt74vE1xb5sPvmx5oA7B/kOi/JdBvhGQq97U1/AVdXEdk2zkP8qyA==} @@ -3704,6 +3727,10 @@ packages: resolution: {integrity: sha512-VTgWkjWLzb0nupkFl1duQi9Mk8TGT9rsdnQg6DeRrYEFxtFOh0IF8nAwxM/4GWqDl6uIB06lqUBgUrAVWl62Bw==} engines: {node: '>=16.0.0'} + '@metamask/rpc-errors@6.3.1': + resolution: {integrity: sha512-ugDY7cKjF4/yH5LtBaOIKHw/AiGGSAmzptAUEiAEGr/78LwuzcXAxmzEQfSfMIfI+f9Djr8cttq1pRJJKfTuCg==} + engines: {node: '>=16.0.0'} + '@metamask/safe-event-emitter@2.0.0': resolution: {integrity: sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==} @@ -3746,6 +3773,10 @@ packages: react-dom: optional: true + '@metamask/superstruct@3.1.0': + resolution: {integrity: sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA==} + engines: {node: '>=16.0.0'} + '@metamask/utils@5.0.2': resolution: {integrity: sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g==} engines: {node: '>=14.0.0'} @@ -3754,6 +3785,14 @@ packages: resolution: {integrity: sha512-dbIc3C7alOe0agCuBHM1h71UaEaEqOk2W8rAtEn8QGz4haH2Qq7MoK6i7v2guzvkJVVh79c+QCzIqphC3KvrJg==} engines: {node: '>=16.0.0'} + '@metamask/utils@8.5.0': + resolution: {integrity: sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ==} + engines: {node: '>=16.0.0'} + + '@metamask/utils@9.2.1': + resolution: {integrity: sha512-/u663aUaB6+Xe75i3Mt/1cCljm41HDYIsna5oBrwGvgkY2zH7/9k9Zjd706cxoAbxN7QgLSVAReUiGnuxCuXrQ==} + engines: {node: '>=16.0.0'} + '@motionone/animation@10.17.0': resolution: {integrity: sha512-ANfIN9+iq1kGgsZxs+Nz96uiNcPLGTXwfNo2Xz/fcJXniPYpaz/Uyrfa+7I5BPLxCP82sh7quVDudf1GABqHbg==} @@ -3866,6 +3905,10 @@ packages: resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} + '@noble/hashes@1.5.0': + resolution: {integrity: sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==} + engines: {node: ^14.21.3 || >=16} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -4393,13 +4436,17 @@ packages: peerDependencies: '@types/react': '*' '@types/react-dom': '*' - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react: '*' + react-dom: '*' peerDependenciesMeta: '@types/react': optional: true '@types/react-dom': optional: true + react: + optional: true + react-dom: + optional: true '@radix-ui/react-navigation-menu@1.2.0': resolution: {integrity: sha512-OQ8tcwAOR0DhPlSY3e4VMXeHiol7la4PPdJWhhwJiJA+NLX0SaCaonOkRnI3gCDHoZ7Fo7bb/G6q25fRM2Y+3Q==} @@ -4432,13 +4479,17 @@ packages: peerDependencies: '@types/react': '*' '@types/react-dom': '*' - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react: '*' + react-dom: '*' peerDependenciesMeta: '@types/react': optional: true '@types/react-dom': optional: true + react: + optional: true + react-dom: + optional: true '@radix-ui/react-portal@1.1.1': resolution: {integrity: sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g==} @@ -4632,13 +4683,17 @@ packages: peerDependencies: '@types/react': '*' '@types/react-dom': '*' - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react: '*' + react-dom: '*' peerDependenciesMeta: '@types/react': optional: true '@types/react-dom': optional: true + react: + optional: true + react-dom: + optional: true '@radix-ui/react-toggle-group@1.1.0': resolution: {integrity: sha512-PpTJV68dZU2oqqgq75Uzto5o/XfOVgkrJ9rulVmfTKxWp3HfUjHE6CP/WLRR4AzPX9HWxw7vFow2me85Yu+Naw==} @@ -4746,10 +4801,12 @@ packages: resolution: {integrity: sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==} peerDependencies: '@types/react': '*' - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react: '*' peerDependenciesMeta: '@types/react': optional: true + react: + optional: true '@radix-ui/react-use-rect@1.1.0': resolution: {integrity: sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==} @@ -4764,10 +4821,12 @@ packages: resolution: {integrity: sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==} peerDependencies: '@types/react': '*' - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react: '*' peerDependenciesMeta: '@types/react': optional: true + react: + optional: true '@radix-ui/react-visually-hidden@1.1.0': resolution: {integrity: sha512-N8MDZqtgCgG5S3aV60INAB475osJousYpZ4cTJ2cFbMpdHS5Y6loLTH8LPtkj2QN0x93J30HT/M3qJXM0+lyeQ==} @@ -6074,6 +6133,7 @@ packages: '@storybook/testing-library@0.2.2': resolution: {integrity: sha512-L8sXFJUHmrlyU2BsWWZGuAjv39Jl1uAqUHdxmN42JY15M4+XCMjGlArdCCjDe1wpTSW6USYISA9axjZojgtvnw==} + deprecated: In Storybook 8, this package functionality has been integrated to a new package called @storybook/test, which uses Vitest APIs for an improved experience. When upgrading to Storybook 8 with 'npx storybook@latest upgrade', you will get prompted and will get an automigration for the new package. Please migrate when you can. '@storybook/theming@7.6.17': resolution: {integrity: sha512-ZbaBt3KAbmBtfjNqgMY7wPMBshhSJlhodyMNQypv+95xLD/R+Az6aBYbpVAOygLaUQaQk4ar7H/Ww6lFIoiFbA==} @@ -6295,7 +6355,10 @@ packages: '@tabler/icons-react@2.46.0': resolution: {integrity: sha512-X8MRxuslIOFqMjAo+GvUZDpjlOwNYNJTuOsHXf/NBvVI6ygqUf0FUNsDLLA5fQ6k6KtRwxMlgGB+eR8ZG1UP0g==} peerDependencies: - react: ^16.5.1 || ^17.0.0 || ^18.0.0 + react: '*' + peerDependenciesMeta: + react: + optional: true '@tabler/icons-react@2.47.0': resolution: {integrity: sha512-iqly2FvCF/qUbgmvS8E40rVeYY7laltc5GUjRxQj59DuX0x/6CpKHTXt86YlI2whg4czvd/c8Ce8YR08uEku0g==} @@ -6617,6 +6680,9 @@ packages: '@types/node@20.14.15': resolution: {integrity: sha512-Fz1xDMCF/B00/tYSVMlmK7hVeLh7jE5f3B7X1/hmV0MJBwE27KlS7EvD/Yp+z1lm8mVhwV5w+n8jOZG8AfTlKw==} + '@types/node@22.5.4': + resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==} + '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6737,8 +6803,8 @@ packages: '@types/webpack-sources@3.2.3': resolution: {integrity: sha512-4nZOdMwSPHZ4pTEZzSp0AsTM4K7Qmu40UKW4tJDiOVs20UzYF9l+qUe4s0ftfN0pin06n+5cWWDJXH+sbhAiDw==} - '@types/webpack@4.41.38': - resolution: {integrity: sha512-oOW7E931XJU1mVfCnxCVgv8GLFL768pDO5u2Gzk82i8yTIgX6i7cntyZOkZYb/JtYM8252SN9bQp9tgkVDSsRw==} + '@types/webpack@4.41.39': + resolution: {integrity: sha512-otxUJvoi6FbBq/64gGH34eblpKLgdi+gf08GaAh8Bx6So0ZZic028Ev/SUxD22gbthMKCkeeiXEat1kHLDJfYg==} '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} @@ -7276,6 +7342,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + engines: {node: '>=0.4.0'} + hasBin: true + address@1.2.2: resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==} engines: {node: '>= 10.0.0'} @@ -8625,6 +8696,15 @@ packages: supports-color: optional: true + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decamelize@1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} @@ -9137,6 +9217,10 @@ packages: resolution: {integrity: sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==} engines: {node: '>= 0.4'} + es-abstract@1.23.3: + resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} + engines: {node: '>= 0.4'} + es-array-method-boxes-properly@1.0.0: resolution: {integrity: sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==} @@ -9952,6 +10036,7 @@ packages: glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported global-dirs@3.0.1: resolution: {integrity: sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==} @@ -9965,6 +10050,10 @@ packages: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} + globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} + globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -10361,6 +10450,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.3: resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} @@ -11500,6 +11590,10 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + miller-rabin@4.0.1: resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} hasBin: true @@ -11861,6 +11955,10 @@ packages: object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + object-inspect@1.13.2: + resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} + engines: {node: '>= 0.4'} + object-is@1.1.5: resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} engines: {node: '>= 0.4'} @@ -12352,6 +12450,10 @@ packages: resolution: {integrity: sha512-3IKLNXclQgkU++2fSi93sQ6BznFuxSLB11HdvZQ6JW/spahf/P1pAHBQEahr20rs0htZW0UDkM1HmA+nZkXKsw==} engines: {node: '>=12.0.0'} + pony-cause@2.1.11: + resolution: {integrity: sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg==} + engines: {node: '>=12.0.0'} + popmotion@11.0.3: resolution: {integrity: sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA==} @@ -12505,6 +12607,9 @@ packages: preact@10.19.3: resolution: {integrity: sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==} + preact@10.23.2: + resolution: {integrity: sha512-kKYfePf9rzKnxOAKDpsWhg/ysrHPqT+yQ7UW4JjdnqjFIeNUnNcEJvhuA8fDenxAGWzUqtd51DfVg7xp/8T9NA==} + preact@10.4.1: resolution: {integrity: sha512-WKrRpCSwL2t3tpOOGhf2WfTpcmbpxaWtDbdJdKdjd0aEiTkvOmS4NBkG6kzlaAHI9AkQ3iVqbFWM3Ei7mZ4o1Q==} @@ -12794,7 +12899,10 @@ packages: resolution: {integrity: sha512-wh6F6uJyYAmQ4fK0e8dSQMEWuvTs2Wr3el3sLD9bambX1+pSWUVXIz1RFaoy3TI1mZ0FqdpKq9YgbgTTgyrmXA==} engines: {node: '>=14'} peerDependencies: - react: ^16.13.1 || ^17.0.0 || ^18.0.0 + react: '*' + peerDependenciesMeta: + react: + optional: true react-native-webview@11.26.1: resolution: {integrity: sha512-hC7BkxOpf+z0UKhxFSFTPAM4shQzYmZHoELa6/8a/MspcjEP7ukYKpuSUTLDywQditT8yI9idfcKvfZDKQExGw==} @@ -13095,6 +13203,7 @@ packages: rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@5.0.9: @@ -13264,6 +13373,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + send@0.19.0: resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} engines: {node: '>= 0.8.0'} @@ -13691,6 +13805,10 @@ packages: string.prototype.trimstart@1.0.7: resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} + string.prototype.trimstart@1.0.8: + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} + string_decoder@0.10.31: resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} @@ -13956,6 +14074,11 @@ packages: engines: {node: '>=10'} hasBin: true + terser@5.32.0: + resolution: {integrity: sha512-v3Gtw3IzpBJ0ugkxEX8U0W6+TnPKRRCWGh1jC/iM/e3Ki5+qvO1L1EAZ56bZasc64aXHwRHNIQEzm6//i5cemQ==} + engines: {node: '>=10'} + hasBin: true + test-exclude@6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} @@ -14190,6 +14313,9 @@ packages: tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + tsup@8.0.1: resolution: {integrity: sha512-hvW7gUSG96j53ZTSlT4j/KL0q1Q2l6TqGBFc6/mu/L46IoNWqLLUzLRLP1R8Q7xrJTmkDxxDoojV5uCVs1sVOg==} engines: {node: '>=18'} @@ -14382,6 +14508,10 @@ packages: resolution: {integrity: sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==} engines: {node: '>= 0.4'} + typed-array-length@1.0.6: + resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} + engines: {node: '>= 0.4'} + typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} @@ -14431,14 +14561,17 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - undici@5.28.4: - resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} - engines: {node: '>=14.0'} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} undici@6.18.1: resolution: {integrity: sha512-/0BWqR8rJNRysS5lqVmfc7eeOErcOP4tZpATVjJOojjHZ71gSYVAtFhEmadcIjwMIUehh5NFyKGsXCnXIajtbA==} engines: {node: '>=18.17'} + undici@6.19.8: + resolution: {integrity: sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==} + engines: {node: '>=18.17'} + unenv@1.9.0: resolution: {integrity: sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g==} @@ -14607,10 +14740,12 @@ packages: resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} peerDependencies: '@types/react': '*' - react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: '*' peerDependenciesMeta: '@types/react': optional: true + react: + optional: true use-sidecar@1.1.2: resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} @@ -14674,7 +14809,7 @@ packages: engines: {node: '>=12.20.0'} peerDependencies: '@types/react': '>=16.8' - react: '>=16.8' + react: '*' peerDependenciesMeta: '@types/react': optional: true @@ -15198,6 +15333,7 @@ snapshots: '@ariakit/core': 0.3.2 '@testing-library/dom': 9.3.4 '@testing-library/react': 14.2.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + optionalDependencies: react: 18.2.0 '@aw-web-design/x-default-browser@1.4.126': @@ -15300,7 +15436,7 @@ snapshots: '@babel/core': 7.23.9 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.22.5 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -16141,7 +16277,7 @@ snapshots: eth-json-rpc-filters: 6.0.1 eventemitter3: 5.0.1 keccak: 3.0.4 - preact: 10.19.3 + preact: 10.23.2 sha.js: 2.4.11 transitivePeerDependencies: - supports-color @@ -16231,7 +16367,7 @@ snapshots: '@babel/preset-env': 7.23.9(@babel/core@7.23.9) babel-loader: 9.1.3(@babel/core@7.23.9)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))) bluebird: 3.7.1 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) lodash: 4.17.21 webpack: 5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12)) transitivePeerDependencies: @@ -17000,8 +17136,6 @@ snapshots: '@fal-works/esbuild-plugin-global-externals@2.1.2': {} - '@fastify/busboy@2.1.1': {} - '@floating-ui/core@1.6.0': dependencies: '@floating-ui/utils': 0.2.1 @@ -17511,19 +17645,19 @@ snapshots: - vue - zod - '@fuels/jest@0.20.0(@jest/globals@29.7.0)(@types/jest@29.5.12)(bufferutil@4.0.8)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(utf-8-validate@5.0.10)(vitest@1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0))': + '@fuels/jest@0.20.0(@jest/globals@29.7.0)(@types/jest@29.5.12)(bufferutil@4.0.8)(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(utf-8-validate@5.0.10)(vitest@1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0))': dependencies: '@ariakit/test': 0.2.5(@testing-library/dom@9.3.4)(@testing-library/react@14.2.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0) '@chakra-ui/utils': 2.0.15 '@testing-library/dom': 9.3.4 - '@testing-library/jest-dom': 6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0)) + '@testing-library/jest-dom': 6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(vitest@1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0)) '@testing-library/react': 14.2.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@testing-library/user-event': 14.5.2(@testing-library/dom@9.3.4) '@types/react': 18.2.54 '@types/react-dom': 18.2.22 dotenv: 16.4.5 identity-obj-proxy: 3.0.0 - jest: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + jest: 29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) jest-axe: 8.0.0 jest-environment-jsdom: 29.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) jest-fail-on-console: 3.1.2 @@ -17586,12 +17720,12 @@ snapshots: dependencies: typescript: 5.5.4 - '@fuels/tsup-config@0.20.0(tsup@8.0.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))(typescript@5.4.5))': + '@fuels/tsup-config@0.20.0(tsup@8.0.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))(typescript@5.4.5))': dependencies: dotenv: 16.4.5 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - tsup: 8.0.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))(typescript@5.4.5) + tsup: 8.0.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))(typescript@5.4.5) '@fuels/vm-asm@0.54.0': {} @@ -18362,7 +18496,7 @@ snapshots: - ts-node optional: true - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -18376,7 +18510,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -18397,7 +18531,7 @@ snapshots: - supports-color - ts-node - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -18411,7 +18545,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) + jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -18586,13 +18720,13 @@ snapshots: - supports-color - utf-8-validate - '@joshwooding/vite-plugin-react-docgen-typescript@0.3.0(typescript@5.4.5)(vite@5.2.6(@types/node@20.14.15)(terser@5.27.0))': + '@joshwooding/vite-plugin-react-docgen-typescript@0.3.0(typescript@5.4.5)(vite@5.2.6(@types/node@22.5.4)(terser@5.32.0))': dependencies: glob: 7.2.3 glob-promise: 4.2.2(glob@7.2.3) magic-string: 0.27.0 react-docgen-typescript: 2.2.2(typescript@5.4.5) - vite: 5.2.6(@types/node@20.14.15)(terser@5.27.0) + vite: 5.2.6(@types/node@22.5.4)(terser@5.32.0) optionalDependencies: typescript: 5.4.5 @@ -18602,22 +18736,44 @@ snapshots: '@jridgewell/sourcemap-codec': 1.4.15 '@jridgewell/trace-mapping': 0.3.22 + '@jridgewell/gen-mapping@0.3.5': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/resolve-uri@3.1.1': {} + '@jridgewell/resolve-uri@3.1.2': {} + '@jridgewell/set-array@1.1.2': {} + '@jridgewell/set-array@1.2.1': {} + '@jridgewell/source-map@0.3.5': dependencies: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.22 + '@jridgewell/source-map@0.3.6': + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/trace-mapping@0.3.22': dependencies: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.1 @@ -18641,6 +18797,7 @@ snapshots: dependencies: '@types/mdx': 2.0.11 '@types/react': 18.2.54 + optionalDependencies: react: 18.2.0 '@metamask/eth-json-rpc-provider@1.0.1': @@ -18653,9 +18810,9 @@ snapshots: '@metamask/json-rpc-engine@7.3.3': dependencies: - '@metamask/rpc-errors': 6.2.1 + '@metamask/rpc-errors': 6.3.1 '@metamask/safe-event-emitter': 3.1.1 - '@metamask/utils': 8.4.0 + '@metamask/utils': 8.5.0 transitivePeerDependencies: - supports-color @@ -18709,6 +18866,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@metamask/rpc-errors@6.3.1': + dependencies: + '@metamask/utils': 9.2.1 + fast-safe-stringify: 2.1.1 + transitivePeerDependencies: + - supports-color + '@metamask/safe-event-emitter@2.0.0': {} '@metamask/safe-event-emitter@3.1.1': {} @@ -18718,7 +18882,7 @@ snapshots: bufferutil: 4.0.8 cross-fetch: 4.0.0 date-fns: 2.30.0 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7 eciesjs: 0.3.18 eventemitter2: 6.4.9 readable-stream: 3.6.2 @@ -18745,7 +18909,7 @@ snapshots: '@types/dom-screen-wake-lock': 1.0.3 bowser: 2.11.0 cross-fetch: 4.0.0 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7 eciesjs: 0.3.18 eth-rpc-errors: 4.0.3 eventemitter2: 6.4.9 @@ -18771,12 +18935,14 @@ snapshots: - supports-color - utf-8-validate + '@metamask/superstruct@3.1.0': {} + '@metamask/utils@5.0.2': dependencies: '@ethereumjs/tx': 4.2.0 '@types/debug': 4.1.12 - debug: 4.3.6(supports-color@8.1.1) - semver: 7.6.0 + debug: 4.3.7 + semver: 7.6.3 superstruct: 1.0.4 transitivePeerDependencies: - supports-color @@ -18787,7 +18953,7 @@ snapshots: '@noble/hashes': 1.4.0 '@scure/base': 1.1.8 '@types/debug': 4.1.12 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7 pony-cause: 2.1.10 semver: 7.6.0 superstruct: 1.0.4 @@ -18795,6 +18961,34 @@ snapshots: transitivePeerDependencies: - supports-color + '@metamask/utils@8.5.0': + dependencies: + '@ethereumjs/tx': 4.2.0 + '@metamask/superstruct': 3.1.0 + '@noble/hashes': 1.5.0 + '@scure/base': 1.1.8 + '@types/debug': 4.1.12 + debug: 4.3.7 + pony-cause: 2.1.11 + semver: 7.6.3 + uuid: 9.0.1 + transitivePeerDependencies: + - supports-color + + '@metamask/utils@9.2.1': + dependencies: + '@ethereumjs/tx': 4.2.0 + '@metamask/superstruct': 3.1.0 + '@noble/hashes': 1.5.0 + '@scure/base': 1.1.8 + '@types/debug': 4.1.12 + debug: 4.3.7 + pony-cause: 2.1.11 + semver: 7.6.3 + uuid: 9.0.1 + transitivePeerDependencies: + - supports-color + '@motionone/animation@10.17.0': dependencies: '@motionone/easing': 10.17.0 @@ -18906,6 +19100,8 @@ snapshots: '@noble/hashes@1.4.0': {} + '@noble/hashes@1.5.0': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -18929,7 +19125,7 @@ snapshots: lodash: 4.17.21 semver: 7.6.0 table: 6.8.1 - undici: 5.28.4 + undici: 6.19.8 transitivePeerDependencies: - supports-color @@ -19049,7 +19245,7 @@ snapshots: '@parcel/watcher-wasm@2.4.0': dependencies: is-glob: 4.0.3 - micromatch: 4.0.5 + micromatch: 4.0.8 '@parcel/watcher-win32-arm64@2.4.0': optional: true @@ -19064,7 +19260,7 @@ snapshots: dependencies: detect-libc: 1.0.3 is-glob: 4.0.3 - micromatch: 4.0.5 + micromatch: 4.0.8 node-addon-api: 7.1.0 optionalDependencies: '@parcel/watcher-android-arm64': 2.4.0 @@ -19152,11 +19348,11 @@ snapshots: '@pm2/pm2-version-check@1.0.4': dependencies: - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) transitivePeerDependencies: - supports-color - '@pmmmwh/react-refresh-webpack-plugin@0.5.11(@types/webpack@4.41.38)(react-refresh@0.14.0)(type-fest@4.26.0)(webpack-dev-server@4.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))))(webpack-hot-middleware@2.26.1)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12)))': + '@pmmmwh/react-refresh-webpack-plugin@0.5.11(@types/webpack@4.41.39)(react-refresh@0.14.0)(type-fest@4.26.0)(webpack-dev-server@4.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))))(webpack-hot-middleware@2.26.1)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12)))': dependencies: ansi-html-community: 0.0.8 common-path-prefix: 3.0.0 @@ -19170,7 +19366,7 @@ snapshots: source-map: 0.7.4 webpack: 5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12)) optionalDependencies: - '@types/webpack': 4.41.38 + '@types/webpack': 4.41.39 type-fest: 4.26.0 webpack-dev-server: 4.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))) webpack-hot-middleware: 2.26.1 @@ -19508,12 +19704,12 @@ snapshots: '@radix-ui/react-slot': 1.1.0(@types/react@18.2.54)(react@18.2.0) '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.2.54)(react@18.2.0) aria-hidden: 1.2.3 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) react-remove-scroll: 2.5.7(@types/react@18.2.54)(react@18.2.0) optionalDependencies: '@types/react': 18.2.54 '@types/react-dom': 18.2.22 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) '@radix-ui/react-navigation-menu@1.2.0(@types/react-dom@18.2.22)(@types/react@18.2.54)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: @@ -19572,11 +19768,11 @@ snapshots: '@radix-ui/react-use-rect': 1.1.0(@types/react@18.2.54)(react@18.2.0) '@radix-ui/react-use-size': 1.1.0(@types/react@18.2.54)(react@18.2.0) '@radix-ui/rect': 1.1.0 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) optionalDependencies: '@types/react': 18.2.54 '@types/react-dom': 18.2.22 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) '@radix-ui/react-portal@1.1.1(@types/react-dom@18.2.22)(@types/react@18.2.54)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: @@ -19798,11 +19994,11 @@ snapshots: '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.2.54)(react@18.2.0) '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.2.54)(react@18.2.0) '@radix-ui/react-visually-hidden': 1.1.0(@types/react-dom@18.2.22)(@types/react@18.2.54)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) optionalDependencies: '@types/react': 18.2.54 '@types/react-dom': 18.2.22 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) '@radix-ui/react-toggle-group@1.1.0(@types/react-dom@18.2.22)(@types/react@18.2.54)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: @@ -19899,10 +20095,9 @@ snapshots: '@types/react': 18.2.54 '@radix-ui/react-use-previous@1.1.0(@types/react@18.2.54)(react@18.2.0)': - dependencies: - react: 18.2.0 optionalDependencies: '@types/react': 18.2.54 + react: 18.2.0 '@radix-ui/react-use-rect@1.1.0(@types/react@18.2.54)(react@18.2.0)': dependencies: @@ -19914,9 +20109,9 @@ snapshots: '@radix-ui/react-use-size@1.1.0(@types/react@18.2.54)(react@18.2.0)': dependencies: '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.2.54)(react@18.2.0) - react: 18.2.0 optionalDependencies: '@types/react': 18.2.54 + react: 18.2.0 '@radix-ui/react-visually-hidden@1.1.0(@types/react-dom@18.2.22)(@types/react@18.2.54)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: @@ -21614,11 +21809,11 @@ snapshots: dependencies: '@storybook/global': 5.0.0 - '@storybook/addon-interactions@8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0))': + '@storybook/addon-interactions@8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0))': dependencies: '@storybook/global': 5.0.0 '@storybook/instrumenter': 8.0.8 - '@storybook/test': 8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0)) + '@storybook/test': 8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0)) '@storybook/types': 8.0.8 polished: 4.3.1 ts-dedent: 2.2.0 @@ -21629,11 +21824,11 @@ snapshots: - jest - vitest - '@storybook/addon-interactions@8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0))': + '@storybook/addon-interactions@8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(vitest@1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0))': dependencies: '@storybook/global': 5.0.0 '@storybook/instrumenter': 8.0.8 - '@storybook/test': 8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0)) + '@storybook/test': 8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(vitest@1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0)) '@storybook/types': 8.0.8 polished: 4.3.1 ts-dedent: 2.2.0 @@ -21737,7 +21932,7 @@ snapshots: - encoding - supports-color - '@storybook/builder-vite@8.0.8(typescript@5.4.5)(vite@5.2.6(@types/node@20.14.15)(terser@5.27.0))': + '@storybook/builder-vite@8.0.8(typescript@5.4.5)(vite@5.2.6(@types/node@22.5.4)(terser@5.32.0))': dependencies: '@storybook/channels': 8.0.8 '@storybook/client-logger': 8.0.8 @@ -21756,7 +21951,7 @@ snapshots: fs-extra: 11.2.0 magic-string: 0.30.7 ts-dedent: 2.2.0 - vite: 5.2.6(@types/node@20.14.15)(terser@5.27.0) + vite: 5.2.6(@types/node@22.5.4)(terser@5.32.0) optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: @@ -22177,7 +22372,7 @@ snapshots: '@storybook/manager@8.0.8': {} - '@storybook/nextjs@8.0.8(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/webpack@4.41.38)(next@14.2.3(@babel/core@7.23.9)(@playwright/test@1.41.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(type-fest@4.26.0)(typescript@5.4.5)(webpack-dev-server@4.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))))(webpack-hot-middleware@2.26.1)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12)))': + '@storybook/nextjs@8.0.8(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/webpack@4.41.39)(next@14.2.3(@babel/core@7.23.9)(@playwright/test@1.41.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(type-fest@4.26.0)(typescript@5.4.5)(webpack-dev-server@4.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))))(webpack-hot-middleware@2.26.1)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12)))': dependencies: '@babel/core': 7.23.9 '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.23.9) @@ -22192,7 +22387,7 @@ snapshots: '@babel/preset-react': 7.23.3(@babel/core@7.23.9) '@babel/preset-typescript': 7.23.3(@babel/core@7.23.9) '@babel/runtime': 7.24.0 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.11(@types/webpack@4.41.38)(react-refresh@0.14.0)(type-fest@4.26.0)(webpack-dev-server@4.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))))(webpack-hot-middleware@2.26.1)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))) + '@pmmmwh/react-refresh-webpack-plugin': 0.5.11(@types/webpack@4.41.39)(react-refresh@0.14.0)(type-fest@4.26.0)(webpack-dev-server@4.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))))(webpack-hot-middleware@2.26.1)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))) '@storybook/addon-actions': 8.0.8 '@storybook/builder-webpack5': 8.0.8(@swc/core@1.4.1(@swc/helpers@0.5.12))(typescript@5.4.5) '@storybook/core-common': 8.0.8 @@ -22319,11 +22514,11 @@ snapshots: '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.4.5)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12)))': dependencies: - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7 endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.2.0 - micromatch: 4.0.5 + micromatch: 4.0.8 react-docgen-typescript: 2.2.2(typescript@5.4.5) tslib: 2.6.3 typescript: 5.4.5 @@ -22336,11 +22531,11 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@storybook/react-vite@8.0.8(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@4.13.1)(typescript@5.4.5)(vite@5.2.6(@types/node@20.14.15)(terser@5.27.0))': + '@storybook/react-vite@8.0.8(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(rollup@4.13.1)(typescript@5.4.5)(vite@5.2.6(@types/node@22.5.4)(terser@5.32.0))': dependencies: - '@joshwooding/vite-plugin-react-docgen-typescript': 0.3.0(typescript@5.4.5)(vite@5.2.6(@types/node@20.14.15)(terser@5.27.0)) + '@joshwooding/vite-plugin-react-docgen-typescript': 0.3.0(typescript@5.4.5)(vite@5.2.6(@types/node@22.5.4)(terser@5.32.0)) '@rollup/pluginutils': 5.1.0(rollup@4.13.1) - '@storybook/builder-vite': 8.0.8(typescript@5.4.5)(vite@5.2.6(@types/node@20.14.15)(terser@5.27.0)) + '@storybook/builder-vite': 8.0.8(typescript@5.4.5)(vite@5.2.6(@types/node@22.5.4)(terser@5.32.0)) '@storybook/node-logger': 8.0.8 '@storybook/react': 8.0.8(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.4.5) find-up: 5.0.0 @@ -22350,7 +22545,7 @@ snapshots: react-dom: 18.2.0(react@18.2.0) resolve: 1.22.8 tsconfig-paths: 4.2.0 - vite: 5.2.6(@types/node@20.14.15)(terser@5.27.0) + vite: 5.2.6(@types/node@22.5.4)(terser@5.32.0) transitivePeerDependencies: - '@preact/preset-vite' - encoding @@ -22430,14 +22625,14 @@ snapshots: - encoding - supports-color - '@storybook/test@8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0))': + '@storybook/test@8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0))': dependencies: '@storybook/client-logger': 8.0.8 '@storybook/core-events': 8.0.8 '@storybook/instrumenter': 8.0.8 '@storybook/preview-api': 8.0.8 '@testing-library/dom': 9.3.4 - '@testing-library/jest-dom': 6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0)) + '@testing-library/jest-dom': 6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0)) '@testing-library/user-event': 14.5.2(@testing-library/dom@9.3.4) '@vitest/expect': 1.3.1 '@vitest/spy': 1.5.0 @@ -22450,14 +22645,14 @@ snapshots: - jest - vitest - '@storybook/test@8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0))': + '@storybook/test@8.0.8(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(vitest@1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0))': dependencies: '@storybook/client-logger': 8.0.8 '@storybook/core-events': 8.0.8 '@storybook/instrumenter': 8.0.8 '@storybook/preview-api': 8.0.8 '@testing-library/dom': 9.3.4 - '@testing-library/jest-dom': 6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0)) + '@testing-library/jest-dom': 6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(vitest@1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0)) '@testing-library/user-event': 14.5.2(@testing-library/dom@9.3.4) '@vitest/expect': 1.3.1 '@vitest/spy': 1.5.0 @@ -22751,6 +22946,7 @@ snapshots: dependencies: '@tabler/icons': 2.46.0 prop-types: 15.8.1 + optionalDependencies: react: 18.2.0 '@tabler/icons-react@2.47.0(react@18.2.0)': @@ -22763,13 +22959,13 @@ snapshots: '@tabler/icons@2.47.0': {} - '@tailwindcss/typography@0.5.10(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))': + '@tailwindcss/typography@0.5.10(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))': dependencies: lodash.castarray: 4.4.0 lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 postcss-selector-parser: 6.0.10 - tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) '@tanstack/query-core@5.0.5': {} @@ -22835,7 +23031,7 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 - '@testing-library/jest-dom@6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0))': + '@testing-library/jest-dom@6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0))': dependencies: '@adobe/css-tools': 4.3.3 '@babel/runtime': 7.24.0 @@ -22849,9 +23045,9 @@ snapshots: '@jest/globals': 29.7.0 '@types/jest': 29.5.12 jest: 29.7.0(@types/node@20.11.6)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)) - vitest: 1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0) + vitest: 1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0) - '@testing-library/jest-dom@6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(vitest@1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0))': + '@testing-library/jest-dom@6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(vitest@1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0))': dependencies: '@adobe/css-tools': 4.3.3 '@babel/runtime': 7.24.0 @@ -22864,8 +23060,8 @@ snapshots: optionalDependencies: '@jest/globals': 29.7.0 '@types/jest': 29.5.12 - jest: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) - vitest: 1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0) + jest: 29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) + vitest: 1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0) '@testing-library/react@14.2.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: @@ -23120,6 +23316,10 @@ snapshots: dependencies: undici-types: 5.26.5 + '@types/node@22.5.4': + dependencies: + undici-types: 6.19.8 + '@types/normalize-package-data@2.4.4': {} '@types/parse-json@4.0.2': {} @@ -23241,13 +23441,13 @@ snapshots: '@types/webpack-sources@3.2.3': dependencies: - '@types/node': 20.14.15 + '@types/node': 22.5.4 '@types/source-list-map': 0.1.6 source-map: 0.7.4 - '@types/webpack@4.41.38': + '@types/webpack@4.41.39': dependencies: - '@types/node': 20.14.15 + '@types/node': 22.5.4 '@types/tapable': 1.0.12 '@types/uglify-js': 3.17.5 '@types/webpack-sources': 3.2.3 @@ -24725,6 +24925,8 @@ snapshots: acorn@8.11.3: {} + acorn@8.12.1: {} + address@1.2.2: {} adjust-sourcemap-loader@4.0.0: @@ -24964,7 +25166,7 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-array-method-boxes-properly: 1.0.0 es-errors: 1.3.0 es-object-atoms: 1.0.0 @@ -25016,7 +25218,7 @@ snapshots: ast-types@0.13.4: dependencies: - tslib: 2.6.3 + tslib: 2.7.0 ast-types@0.16.1: dependencies: @@ -25028,7 +25230,7 @@ snapshots: async-mutex@0.2.6: dependencies: - tslib: 2.6.3 + tslib: 2.7.0 async-retry@1.3.3: dependencies: @@ -25941,7 +26143,7 @@ snapshots: accepts: 1.3.8 bytes: 3.0.0 compressible: 2.0.18 - debug: 2.6.9 + debug: 4.3.7 on-headers: 1.0.2 safe-buffer: 5.1.2 vary: 1.1.2 @@ -26105,13 +26307,13 @@ snapshots: - ts-node optional: true - create-jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)): + create-jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -26120,13 +26322,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)): + create-jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) + jest-config: 29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -26398,6 +26600,10 @@ snapshots: optionalDependencies: supports-color: 8.1.1 + debug@4.3.7: + dependencies: + ms: 2.1.3 + decamelize@1.2.0: {} decimal.js@10.4.3: {} @@ -26579,7 +26785,7 @@ snapshots: detect-port@1.5.1: dependencies: address: 1.2.2 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7 transitivePeerDependencies: - supports-color @@ -26945,6 +27151,55 @@ snapshots: unbox-primitive: 1.0.2 which-typed-array: 1.1.15 + es-abstract@1.23.3: + dependencies: + array-buffer-byte-length: 1.0.1 + arraybuffer.prototype.slice: 1.0.3 + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + data-view-buffer: 1.0.1 + data-view-byte-length: 1.0.1 + data-view-byte-offset: 1.0.0 + es-define-property: 1.0.0 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-set-tostringtag: 2.0.3 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.4 + get-symbol-description: 1.0.2 + globalthis: 1.0.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + internal-slot: 1.0.7 + is-array-buffer: 3.0.4 + is-callable: 1.2.7 + is-data-view: 1.0.1 + is-negative-zero: 2.0.3 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.3 + is-string: 1.0.7 + is-typed-array: 1.1.13 + is-weakref: 1.0.2 + object-inspect: 1.13.2 + object-keys: 1.1.1 + object.assign: 4.1.5 + regexp.prototype.flags: 1.5.2 + safe-array-concat: 1.1.2 + safe-regex-test: 1.0.3 + string.prototype.trim: 1.2.9 + string.prototype.trimend: 1.0.8 + string.prototype.trimstart: 1.0.8 + typed-array-buffer: 1.0.2 + typed-array-byte-length: 1.0.1 + typed-array-byte-offset: 1.0.2 + typed-array-length: 1.0.6 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.15 + es-array-method-boxes-properly@1.0.0: {} es-define-property@1.0.0: @@ -27570,7 +27825,7 @@ snapshots: '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 - micromatch: 4.0.5 + micromatch: 4.0.8 fast-json-parse@1.0.3: {} @@ -28138,6 +28393,11 @@ snapshots: dependencies: define-properties: 1.2.1 + globalthis@1.0.4: + dependencies: + define-properties: 1.2.1 + gopd: 1.0.1 + globby@11.1.0: dependencies: array-union: 2.1.0 @@ -28441,7 +28701,7 @@ snapshots: he: 1.2.0 param-case: 3.0.4 relateurl: 0.2.7 - terser: 5.27.0 + terser: 5.32.0 html-tags@3.3.1: {} @@ -28449,7 +28709,7 @@ snapshots: dependencies: '@types/html-minifier-terser': 5.1.2 '@types/tapable': 1.0.12 - '@types/webpack': 4.41.38 + '@types/webpack': 4.41.39 html-minifier-terser: 5.1.1 loader-utils: 1.4.2 lodash: 4.17.21 @@ -28517,7 +28777,7 @@ snapshots: http-proxy: 1.18.1 is-glob: 4.0.3 is-plain-obj: 3.0.0 - micromatch: 4.0.5 + micromatch: 4.0.8 optionalDependencies: '@types/express': 4.17.21 transitivePeerDependencies: @@ -28530,7 +28790,7 @@ snapshots: http-proxy: 1.18.1(debug@4.3.4) is-glob: 4.0.3 is-plain-obj: 3.0.0 - micromatch: 4.0.5 + micromatch: 4.0.8 optionalDependencies: '@types/express': 4.17.21 transitivePeerDependencies: @@ -28726,7 +28986,7 @@ snapshots: dependencies: '@ioredis/commands': 1.2.0 cluster-key-slot: 1.1.2 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7 denque: 2.1.0 lodash.defaults: 4.2.0 lodash.isarguments: 3.1.0 @@ -29061,7 +29321,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7 istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -29167,16 +29427,16 @@ snapshots: - ts-node optional: true - jest-cli@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)): + jest-cli@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + create-jest: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -29186,16 +29446,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)): + jest-cli@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) + create-jest: 29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) + jest-config: 29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -29269,7 +29529,7 @@ snapshots: - supports-color optional: true - jest-config@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)): + jest-config@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)): dependencies: '@babel/core': 7.23.9 '@jest/test-sequencer': 29.7.0 @@ -29295,12 +29555,12 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.14.15 - ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5) + ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)): + jest-config@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)): dependencies: '@babel/core': 7.23.9 '@jest/test-sequencer': 29.7.0 @@ -29326,7 +29586,38 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.14.15 - ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4) + ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-config@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)): + dependencies: + '@babel/core': 7.23.9 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.23.9) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 22.5.4 + ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -29591,24 +29882,24 @@ snapshots: - ts-node optional: true - jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)): + jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + jest-cli: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros - supports-color - ts-node - jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)): + jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)) + jest-cli: 29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -29678,7 +29969,7 @@ snapshots: chalk: 4.1.2 flow-parser: 0.228.0 graceful-fs: 4.2.11 - micromatch: 4.0.5 + micromatch: 4.0.8 neo-async: 2.6.2 node-dir: 0.1.17 recast: 0.23.4 @@ -30194,6 +30485,11 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + miller-rabin@4.0.1: dependencies: bn.js: 4.12.0 @@ -30574,6 +30870,8 @@ snapshots: object-inspect@1.13.1: {} + object-inspect@1.13.2: {} + object-is@1.1.5: dependencies: call-bind: 1.0.7 @@ -30593,7 +30891,7 @@ snapshots: array.prototype.reduce: 1.0.7 call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-object-atoms: 1.0.0 gopd: 1.0.1 safe-array-concat: 1.1.2 @@ -31149,6 +31447,8 @@ snapshots: pony-cause@2.1.10: {} + pony-cause@2.1.11: {} + popmotion@11.0.3: dependencies: framesync: 6.0.1 @@ -31215,29 +31515,29 @@ snapshots: postcss: 8.4.35 ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5) - postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)): + postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)): dependencies: lilconfig: 3.0.0 yaml: 2.3.4 optionalDependencies: postcss: 8.4.35 - ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5) + ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5) - postcss-load-config@4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)): + postcss-load-config@4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)): dependencies: lilconfig: 3.0.0 yaml: 2.3.4 optionalDependencies: postcss: 8.4.38 - ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5) + ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4) - postcss-load-config@4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4)): + postcss-load-config@4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)): dependencies: lilconfig: 3.0.0 yaml: 2.3.4 optionalDependencies: postcss: 8.4.38 - ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4) + ts-node: 10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5) postcss-loader@7.3.4(postcss@8.4.35)(typescript@5.4.5)(webpack@5.90.1(@swc/core@1.4.1(@swc/helpers@0.5.12))): dependencies: @@ -31341,6 +31641,8 @@ snapshots: preact@10.19.3: {} + preact@10.23.2: {} + preact@10.4.1: {} prebuild-install@7.1.1: @@ -31702,7 +32004,7 @@ snapshots: react-is@18.2.0: {} react-json-view-lite@1.4.0(react@18.2.0): - dependencies: + optionalDependencies: react: 18.2.0 react-native-webview@11.26.1(react@18.2.0): @@ -32295,6 +32597,8 @@ snapshots: dependencies: lru-cache: 6.0.0 + semver@7.6.3: {} + send@0.19.0: dependencies: debug: 2.6.9 @@ -32523,7 +32827,7 @@ snapshots: socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@socket.io/component-emitter': 3.1.0 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7 engine.io-client: 6.5.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) socket.io-parser: 4.2.4 transitivePeerDependencies: @@ -32632,7 +32936,7 @@ snapshots: spdy-transport@3.0.0: dependencies: - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) detect-node: 2.1.0 hpack.js: 2.1.6 obuf: 1.1.2 @@ -32643,7 +32947,7 @@ snapshots: spdy@4.0.2: dependencies: - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) handle-thing: 2.0.1 http-deceiver: 1.2.7 select-hose: 2.0.0 @@ -32854,6 +33158,12 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.22.3 + string.prototype.trimstart@1.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + string_decoder@0.10.31: {} string_decoder@1.1.1: @@ -33027,10 +33337,10 @@ snapshots: tailwind-merge: 1.14.0 tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)) - tailwind-variants@0.1.20(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))): + tailwind-variants@0.1.20(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))): dependencies: tailwind-merge: 1.14.0 - tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) tailwindcss-animate@1.0.7(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@18.19.14)(typescript@5.4.5))): dependencies: @@ -33040,19 +33350,19 @@ snapshots: dependencies: tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5)) - tailwindcss-animate@1.0.7(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))): + tailwindcss-animate@1.0.7(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))): dependencies: - tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) tailwindcss-radix@3.0.3: {} - tailwindcss-themer@4.0.0(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))): + tailwindcss-themer@4.0.0(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))): dependencies: color: 4.2.3 just-unique: 4.2.0 lodash.merge: 4.6.2 lodash.mergewith: 4.6.2 - tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@18.19.14)(typescript@5.4.5)): dependencies: @@ -33108,7 +33418,7 @@ snapshots: transitivePeerDependencies: - ts-node - tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)): + tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -33127,7 +33437,7 @@ snapshots: postcss: 8.4.35 postcss-import: 15.1.0(postcss@8.4.35) postcss-js: 4.0.1(postcss@8.4.35) - postcss-load-config: 4.0.2(postcss@8.4.35)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + postcss-load-config: 4.0.2(postcss@8.4.35)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) postcss-nested: 6.0.1(postcss@8.4.35) postcss-selector-parser: 6.0.15 resolve: 1.22.8 @@ -33231,7 +33541,7 @@ snapshots: terser@4.8.1: dependencies: - acorn: 8.11.3 + acorn: 8.12.1 commander: 2.20.3 source-map: 0.6.1 source-map-support: 0.5.21 @@ -33243,6 +33553,13 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 + terser@5.32.0: + dependencies: + '@jridgewell/source-map': 0.3.6 + acorn: 8.12.1 + commander: 2.20.3 + source-map-support: 0.5.21 + test-exclude@6.0.0: dependencies: '@istanbuljs/schema': 0.1.3 @@ -33387,11 +33704,11 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)))(typescript@5.4.5): + ts-jest@29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(jest@29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)))(typescript@5.4.5): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + jest: 29.7.0(@types/node@22.5.4)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -33448,7 +33765,7 @@ snapshots: '@swc/core': 1.4.1(@swc/helpers@0.5.12) optional: true - ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5): + ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 @@ -33462,20 +33779,41 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 + typescript: 5.5.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.4.1(@swc/helpers@0.5.12) + optional: true + + ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 22.5.4 + acorn: 8.11.3 + acorn-walk: 8.3.2 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 typescript: 5.4.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: '@swc/core': 1.4.1(@swc/helpers@0.5.12) - ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.5.4): + ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.5.4): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.14.15 + '@types/node': 22.5.4 acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 @@ -33520,6 +33858,8 @@ snapshots: tslib@2.6.3: {} + tslib@2.7.0: {} + tsup@8.0.1(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.35)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.11.6)(typescript@5.4.5))(typescript@5.4.5): dependencies: bundle-require: 4.0.2(esbuild@0.19.12) @@ -33544,7 +33884,7 @@ snapshots: - supports-color - ts-node - tsup@8.0.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5))(typescript@5.4.5): + tsup@8.0.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5))(typescript@5.4.5): dependencies: bundle-require: 4.0.2(esbuild@0.19.12) cac: 6.7.14 @@ -33554,7 +33894,7 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@20.14.15)(typescript@5.4.5)) + postcss-load-config: 4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.4.1(@swc/helpers@0.5.12))(@types/node@22.5.4)(typescript@5.4.5)) resolve-from: 5.0.0 rollup: 4.13.1 source-map: 0.8.0-beta.0 @@ -33736,6 +34076,15 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 + typed-array-length@1.0.6: + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + possible-typed-array-names: 1.0.0 + typedarray-to-buffer@3.1.5: dependencies: is-typedarray: 1.0.0 @@ -33778,12 +34127,12 @@ snapshots: undici-types@5.26.5: {} - undici@5.28.4: - dependencies: - '@fastify/busboy': 2.1.1 + undici-types@6.19.8: {} undici@6.18.1: {} + undici@6.19.8: {} + unenv@1.9.0: dependencies: consola: 3.2.3 @@ -33921,10 +34270,9 @@ snapshots: '@types/react': 18.2.54 use-isomorphic-layout-effect@1.1.2(@types/react@18.2.54)(react@18.2.0): - dependencies: - react: 18.2.0 optionalDependencies: '@types/react': 18.2.54 + react: 18.2.0 use-sidecar@1.1.2(@types/react@18.2.54)(react@18.2.0): dependencies: @@ -34071,13 +34419,13 @@ snapshots: - utf-8-validate - zod - vite-node@1.2.2(@types/node@20.11.6)(terser@5.27.0): + vite-node@1.2.2(@types/node@20.11.6)(terser@5.32.0): dependencies: cac: 6.7.14 debug: 4.3.4(supports-color@5.5.0) pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.2.6(@types/node@20.11.6)(terser@5.27.0) + vite: 5.2.6(@types/node@20.11.6)(terser@5.32.0) transitivePeerDependencies: - '@types/node' - less @@ -34089,13 +34437,13 @@ snapshots: - terser optional: true - vite-node@1.2.2(@types/node@20.14.15)(terser@5.27.0): + vite-node@1.2.2(@types/node@22.5.4)(terser@5.32.0): dependencies: cac: 6.7.14 debug: 4.3.4(supports-color@5.5.0) pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.2.6(@types/node@20.14.15)(terser@5.27.0) + vite: 5.2.6(@types/node@22.5.4)(terser@5.32.0) transitivePeerDependencies: - '@types/node' - less @@ -34106,29 +34454,29 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@4.3.1(typescript@5.4.5)(vite@5.2.6(@types/node@20.11.6)(terser@5.27.0)): + vite-tsconfig-paths@4.3.1(typescript@5.4.5)(vite@5.2.6(@types/node@20.11.6)(terser@5.32.0)): dependencies: debug: 4.3.4(supports-color@5.5.0) globrex: 0.1.2 tsconfck: 3.0.1(typescript@5.4.5) optionalDependencies: - vite: 5.2.6(@types/node@20.11.6)(terser@5.27.0) + vite: 5.2.6(@types/node@20.11.6)(terser@5.32.0) transitivePeerDependencies: - supports-color - typescript - vite-tsconfig-paths@4.3.1(typescript@5.4.5)(vite@5.2.6(@types/node@20.14.15)(terser@5.27.0)): + vite-tsconfig-paths@4.3.1(typescript@5.4.5)(vite@5.2.6(@types/node@22.5.4)(terser@5.32.0)): dependencies: debug: 4.3.4(supports-color@5.5.0) globrex: 0.1.2 tsconfck: 3.0.1(typescript@5.4.5) optionalDependencies: - vite: 5.2.6(@types/node@20.14.15)(terser@5.27.0) + vite: 5.2.6(@types/node@22.5.4)(terser@5.32.0) transitivePeerDependencies: - supports-color - typescript - vite@5.2.6(@types/node@20.11.6)(terser@5.27.0): + vite@5.2.6(@types/node@20.11.6)(terser@5.32.0): dependencies: esbuild: 0.20.2 postcss: 8.4.38 @@ -34136,19 +34484,19 @@ snapshots: optionalDependencies: '@types/node': 20.11.6 fsevents: 2.3.3 - terser: 5.27.0 + terser: 5.32.0 - vite@5.2.6(@types/node@20.14.15)(terser@5.27.0): + vite@5.2.6(@types/node@22.5.4)(terser@5.32.0): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.13.1 optionalDependencies: - '@types/node': 20.14.15 + '@types/node': 22.5.4 fsevents: 2.3.3 - terser: 5.27.0 + terser: 5.32.0 - vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0): + vitest@1.2.2(@types/node@20.11.6)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0): dependencies: '@vitest/expect': 1.2.2 '@vitest/runner': 1.2.2 @@ -34168,8 +34516,8 @@ snapshots: strip-literal: 1.3.0 tinybench: 2.6.0 tinypool: 0.8.2 - vite: 5.2.6(@types/node@20.11.6)(terser@5.27.0) - vite-node: 1.2.2(@types/node@20.11.6)(terser@5.27.0) + vite: 5.2.6(@types/node@20.11.6)(terser@5.32.0) + vite-node: 1.2.2(@types/node@20.11.6)(terser@5.32.0) why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 20.11.6 @@ -34184,7 +34532,7 @@ snapshots: - terser optional: true - vitest@1.2.2(@types/node@20.14.15)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.27.0): + vitest@1.2.2(@types/node@22.5.4)(jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0): dependencies: '@vitest/expect': 1.2.2 '@vitest/runner': 1.2.2 @@ -34204,11 +34552,11 @@ snapshots: strip-literal: 1.3.0 tinybench: 2.6.0 tinypool: 0.8.2 - vite: 5.2.6(@types/node@20.14.15)(terser@5.27.0) - vite-node: 1.2.2(@types/node@20.14.15)(terser@5.27.0) + vite: 5.2.6(@types/node@22.5.4)(terser@5.32.0) + vite-node: 1.2.2(@types/node@22.5.4)(terser@5.32.0) why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 20.14.15 + '@types/node': 22.5.4 jsdom: 20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 2bb870fd1d54a04997a1eb2a667aeea73d178632 Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 13 Sep 2024 15:31:02 -0300 Subject: [PATCH 3/8] refactor: replace if else with value and property mappings --- .../component/TxScripts/TxScripts.tsx | 370 ++++-------------- .../component/TxScripts/constants.ts | 116 ++++++ .../Transaction/component/TxScripts/types.ts | 33 ++ 3 files changed, 232 insertions(+), 287 deletions(-) create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/constants.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/types.ts diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx index 65d4e33e1..c8aafa5b3 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx @@ -1,6 +1,7 @@ import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; import type { GQLOperationReceipt, + GQLReceipt, GQLTransactionReceiptFragment, Maybe, } from '@fuel-explorer/graphql/sdk'; @@ -36,8 +37,12 @@ import { tv } from 'tailwind-variants'; import { Amount } from '~/systems/Core/components/Amount/Amount'; import { EmptyCard } from '~/systems/Core/components/EmptyCard/EmptyCard'; import { JsonViewer } from '~/systems/Core/components/JsonViewer/JsonViewer'; - import type { TransactionNode } from '../../types'; +import { RECEIPT_FIELDS_MAP } from './constants'; +import { + type ReceiptHeaderOperation, + ReceiptHeaderOperationDataType, +} from './types'; export type TxScriptsProps = BaseProps<{ tx: TransactionNode | undefined; @@ -431,304 +436,95 @@ function ReceiptAmount() { ); } -function ReceiptHeader() { - const { receipt: item } = useContext(ctx); - const receipt = item?.item; - const classes = styles(); - const type = receipt?.receiptType ?? 'UNKNOWN'; - const param1 = receipt?.param1; - const contract = receipt?.to ?? receipt?.contractId ?? null; - const assetId = receipt?.assetId ?? ''; - const amount = bn(receipt?.amount); - - if (type === GQLReceiptType.Call && Boolean(contract)) { - return ( - - - - {param1 && ( - - Method: {bn(param1).toHex()} - - )} - {contract && ( -
- )} - - - - ); - } - - if (type === GQLReceiptType.Mint || type === GQLReceiptType.Burn) { - return ( - - - {receipt?.subId && ( - - {receipt.val && ( - - )} - {receipt.contractId && ( -
- )} - - )} - - - ); - } - - if (type === GQLReceiptType.TransferOut || type === GQLReceiptType.Transfer) { - return ( - - - {receipt?.toAddress && ( - - -
- - )} - - - ); - } - - if (type === GQLReceiptType.MessageOut) { - return ( - - - {receipt?.sender && receipt?.recipient && ( - -
-
- - )} - - - ); - } - - // New cases for additional receipt types - if (type === GQLReceiptType.Log || type === GQLReceiptType.LogData) { - const pc = receipt?.pc; - const data = receipt?.data; - return ( - - - - {!!pc && ( - - PC: {pc} - - )} - {!!data && !data?.startsWith('0x') && ( - - Data: {data} - - )} - {!!data && data?.startsWith('0x') && ( -
- )} - - - - ); +function OperationHeader({ + field, + index, + receipt, +}: { + field: ReceiptHeaderOperation; + index: number; + receipt: Maybe | undefined; +}) { + if ( + field == null || + (field.requiredField && !receipt?.[field.requiredField]) + ) { + return null; } - if (type === GQLReceiptType.Panic || type === GQLReceiptType.Revert) { - const reason = receipt?.reason; - const contractId = receipt?.contractId; - return ( - - - - {!!reason && ( - - Reason: {reason} - - )} - {!!contractId && ( -
- )} - - - - ); + const key = `${field.label}-${index}`; + const value = + (field.field && receipt?.[field.field]) || + (field.fieldFallback && receipt?.[field.fieldFallback]); + const formattedValue = + field.type === ReceiptHeaderOperationDataType.HEX_ADDRESS && + value && + !String(value)?.startsWith('0x') + ? bn(value).toHex() + : value; + + if (formattedValue == null) { + return null; } - if (type === GQLReceiptType.ReturnData) { - const pc = receipt?.pc; - const data = receipt?.data; + if (field.type === ReceiptHeaderOperationDataType.AMOUNT) { return ( - - - - {!!pc && ( - - PC: {pc} - - )} - {data != null && ( - - Data: {data} - - )} - - - + ); } - if (type === GQLReceiptType.Return) { - const val = receipt?.val; - const pc = receipt?.pc; - return ( - - - - {!!val && ( - - Value: {val} - - )} - {pc != null && ( - - PC: {pc} - - )} - - - - ); - } + return String(formattedValue)?.startsWith('0x') ? ( +
+ ) : ( + + {`${field.label} ${value}`} + + ); +} - if (type === GQLReceiptType.ScriptResult) { - const gasUsed = receipt?.gasUsed; - const result = receipt?.result; - return ( - - - - {!!gasUsed && ( - - Gas Used: {gasUsed} - - )} - {result != null && ( - - Result: {result} - - )} - - - - ); - } +function ReceiptHeader() { + const { receipt: item } = useContext(ctx); + const receipt = item?.item; + const classes = styles(); + const type = (receipt?.receiptType ?? 'UNKNOWN') as GQLReceiptType; + const fields = RECEIPT_FIELDS_MAP[type] || []; return ( -
- -
+ + + {!fields?.length && } + + {fields?.map((field, index) => ( + + ))} +
); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/constants.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/constants.ts new file mode 100644 index 000000000..29255e2bc --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/constants.ts @@ -0,0 +1,116 @@ +import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; +import { + type ReceiptHeaderOperation, + ReceiptHeaderOperationDataType, +} from './types'; + +export const RECEIPT_FIELDS_MAP: Record< + GQLReceiptType, + Array +> = { + [GQLReceiptType.Call]: [ + { label: 'Method', field: 'param1' }, + { + label: 'Contract:', + type: ReceiptHeaderOperationDataType.HEX_ADDRESS, + field: 'to', + fieldFallback: 'contractId', + }, + ], + [GQLReceiptType.Mint]: [ + { + label: 'Value', + type: ReceiptHeaderOperationDataType.AMOUNT, + field: 'val', + requiredField: 'subId', + }, + { + label: 'Asset:', + type: ReceiptHeaderOperationDataType.HEX_ADDRESS, + field: 'contractId', + }, + ], + [GQLReceiptType.Burn]: [ + { + label: 'Value', + type: ReceiptHeaderOperationDataType.AMOUNT, + field: 'val', + requiredField: 'subId', + }, + { + label: 'Asset:', + type: ReceiptHeaderOperationDataType.HEX_ADDRESS, + field: 'contractId', + }, + ], + [GQLReceiptType.TransferOut]: [ + { type: ReceiptHeaderOperationDataType.AMOUNT, field: 'amount' }, + { + label: 'To:', + type: ReceiptHeaderOperationDataType.HEX_ADDRESS, + field: 'toAddress', + hrefFactory: (value: string) => `/account/${value}/assets`, + }, + ], + [GQLReceiptType.Transfer]: [ + { type: ReceiptHeaderOperationDataType.AMOUNT, field: 'amount' }, + { + label: 'To:', + type: ReceiptHeaderOperationDataType.HEX_ADDRESS, + field: 'toAddress', + hrefFactory: (value: string) => `/account/${value}/assets`, + }, + ], + [GQLReceiptType.MessageOut]: [ + { + label: 'To:', + type: ReceiptHeaderOperationDataType.HEX_ADDRESS, + field: 'sender', + requiredField: 'recipient', + hrefFactory: (value: string) => `/account/${value}/assets`, + }, + { + label: 'From:', + type: ReceiptHeaderOperationDataType.HEX_ADDRESS, + field: 'recipient', + requiredField: 'sender', + hrefFactory: (value: string) => `/account/${value}/assets`, + }, + ], + [GQLReceiptType.Log]: [ + { label: 'PC', field: 'pc' }, + { label: 'Data:', field: 'data' }, + ], + [GQLReceiptType.LogData]: [ + { label: 'PC', field: 'pc' }, + { label: 'Data:', field: 'data' }, + ], + [GQLReceiptType.Panic]: [ + { label: 'Reason:', field: 'reason' }, + { + label: 'Contract ID:', + type: ReceiptHeaderOperationDataType.HEX_ADDRESS, + field: 'contractId', + }, + ], + [GQLReceiptType.Revert]: [ + { label: 'Reason:', field: 'reason' }, + { + label: 'Contract ID:', + type: ReceiptHeaderOperationDataType.HEX_ADDRESS, + field: 'contractId', + }, + ], + [GQLReceiptType.ReturnData]: [ + { label: 'PC', field: 'pc' }, + { label: 'Data:', field: 'data' }, + ], + [GQLReceiptType.Return]: [ + { label: 'Value:', field: 'val' }, + { label: 'PC', field: 'pc' }, + ], + [GQLReceiptType.ScriptResult]: [ + { label: 'Gas Used:', field: 'gasUsed' }, + { label: 'Result:', field: 'result' }, + ], +}; diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/types.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/types.ts new file mode 100644 index 000000000..24e918f67 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/types.ts @@ -0,0 +1,33 @@ +import type { GQLReceipt } from '@fuel-explorer/graphql'; + +export enum ReceiptHeaderOperationDataType { + DEFAULT = 'DEFAULT', + HEX_ADDRESS = 'HEX_ADDRESS', + AMOUNT = 'AMOUNT', +} + +interface ReceiptHeaderOperationBase { + label?: string; + type?: Omit< + ReceiptHeaderOperationDataType, + ReceiptHeaderOperationDataType.AMOUNT + >; + requiredField?: keyof GQLReceipt; + fieldFallback?: keyof GQLReceipt; + hrefFactory?: (value: string) => string; +} + +interface ReceiptHeaderOperationAmount extends ReceiptHeaderOperationBase { + label?: never; + type: ReceiptHeaderOperationDataType.AMOUNT; + field?: keyof GQLReceipt; + hrefFactory?: never; +} + +interface ReceiptHeaderDefaultOperations extends ReceiptHeaderOperationBase { + field: keyof GQLReceipt; +} + +export type ReceiptHeaderOperation = + | ReceiptHeaderDefaultOperations + | ReceiptHeaderOperationAmount; From 2f565da67aadcb46728e5500c5d899b762e2e61a Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:07:11 -0300 Subject: [PATCH 4/8] refactor: move components to their own files and folders --- .../component/TxScripts/CountReceipt.tsx | 18 + .../TxScripts/ReceiptItem/ReceiptItem.tsx | 39 ++ .../TxScripts/ReceiptItem/constants.ts | 6 + .../component/TxScripts/ReceiptItem/styles.ts | 21 + .../component/TxScripts/ReceiptItem/types.ts | 8 + .../TxScripts/ReceiptItemR/ReceiptItemR.tsx | 28 + .../TxScripts/ReceiptItemR/styles.ts | 20 + .../component/TxScripts/ReceiptItemR/types.ts | 6 + .../component/TxScripts/TxOperationHeader.tsx | 74 +++ .../component/TxScripts/TxReceiptAmount.tsx | 37 ++ .../TxReceiptBadge/TxReceiptBadge.tsx | 18 + .../TxScripts/TxReceiptBadge/constants.ts | 3 + .../TxScripts/TxReceiptBadge/utils.ts | 24 + .../TxReceiptBlock/TxReceiptBlock.tsx | 24 + .../TxScripts/TxReceiptBlock/styles.ts | 7 + .../TxReceiptHeader/TxReceiptHeader.tsx | 37 ++ .../{ => TxReceiptHeader}/constants.ts | 9 +- .../TxScripts/TxReceiptHeader/types.ts | 33 ++ .../component/TxScripts/TxScripts.tsx | 532 +----------------- .../TxScriptsContent/TxScriptsContent.tsx | 113 ++++ .../TxScripts/TxScriptsContent/constants.ts | 24 + .../TxScripts/TxScriptsContent/types.ts | 8 + .../TxScripts/TypesCounter/TypesCounter.tsx | 59 ++ .../component/TxScripts/TypesCounter/types.ts | 8 + .../Transaction/component/TxScripts/types.ts | 38 +- .../Transaction/component/TxScripts/utils.ts | 17 + 26 files changed, 651 insertions(+), 560 deletions(-) create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/CountReceipt.tsx create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/constants.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/styles.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/types.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/ReceiptItemR.tsx create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/styles.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/types.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxOperationHeader.tsx create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptAmount.tsx create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge.tsx create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/constants.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/utils.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock.tsx create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/styles.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx rename packages/app-explorer/src/systems/Transaction/component/TxScripts/{ => TxReceiptHeader}/constants.ts (94%) create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/types.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/constants.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/types.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/TypesCounter.tsx create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/types.ts create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/utils.ts diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/CountReceipt.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/CountReceipt.tsx new file mode 100644 index 000000000..aa30f63a3 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/CountReceipt.tsx @@ -0,0 +1,18 @@ +import { Text } from '@fuels/ui'; +import { IconArrowRight } from '@tabler/icons-react'; + +export function CountReceipt({ num, op }: { num: number; op: string }) { + const length = new Intl.NumberFormat('en-IN', { + minimumIntegerDigits: 2, + }).format(num); + const text = num > 1 ? `${op}s` : op; + return ( + + {length} {text} + + ); +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx new file mode 100644 index 000000000..79b23a1f1 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx @@ -0,0 +1,39 @@ +import { Collapsible, cx } from '@fuels/ui'; +import { useState } from 'react'; +import { TxReceiptBlock } from '~/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock'; +import { TxReceiptHeader } from '~/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader'; +import { TxScriptsContext } from './constants'; +import { styles } from './styles'; +import { ReceiptItemProps } from './types'; + +export function ReceiptItem({ + receipt, + isIndented, + hasPanic, + className, + ...props +}: ReceiptItemProps) { + const classes = styles({ indent: isIndented }); + const [opened, setOpened] = useState(false); + + return ( + +
+ + + + +
+
+ ); +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/constants.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/constants.ts new file mode 100644 index 000000000..8d23232cf --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/constants.ts @@ -0,0 +1,6 @@ +import { createContext } from 'react'; +import type { ReceiptItemProps } from './types'; + +export const TxScriptsContext = createContext( + {} as ReceiptItemProps, +); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/styles.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/styles.ts new file mode 100644 index 000000000..8329c073a --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/styles.ts @@ -0,0 +1,21 @@ +import { tv } from 'tailwind-variants'; + +export const styles = tv({ + slots: { + receiptRow: 'peer relative', + }, + variants: { + indent: { + true: { + receiptRow: [ + 'ml-5 before:absolute before:top-[-35px] before:left-[-20px]', + 'tablet:ml-10 tablet:before:left-[-40px]', + 'before:bottom-[20px] before:right-[100%]', + 'before:content-[""] before:block before:border-l before:border-b', + 'before:border-border before:border-dashed before:rounded-bl', + '[&[data-opened=true]:before+&]:top-[-120px]', + ], + }, + }, + }, +}); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/types.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/types.ts new file mode 100644 index 000000000..79eb8d9e8 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/types.ts @@ -0,0 +1,8 @@ +import type { GQLOperationReceipt, Maybe } from '@fuel-explorer/graphql/sdk'; +import type { BaseProps } from '@fuels/ui'; + +export type ReceiptItemProps = BaseProps<{ + receipt?: Maybe; + isIndented?: boolean; + hasPanic?: boolean; +}>; diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/ReceiptItemR.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/ReceiptItemR.tsx new file mode 100644 index 000000000..fef27eb0e --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/ReceiptItemR.tsx @@ -0,0 +1,28 @@ +import { GQLOperationReceipt } from '@fuel-explorer/graphql'; +import { ReceiptItem } from '~/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem'; +import { styles } from './styles'; +import { ReceiptItemRProps } from './types'; + +export function ReceiptItemR(props: ReceiptItemRProps) { + const classes = styles(); + return ( + <> + {props.receipts?.map((sub, j) => ( +
+ + {sub?.receipts && sub?.receipts?.length > 0 && ( + + )} +
+ ))} + + ); +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/styles.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/styles.ts new file mode 100644 index 000000000..5a4ea93ee --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/styles.ts @@ -0,0 +1,20 @@ +import { tv } from 'tailwind-variants'; + +export const styles = tv({ + slots: { + operationChild: [ + 'relative flex flex-col gap-3 ml-5', + 'tablet:ml-10', + '[&[data-nested=true]]:before:absolute', + '[&[data-nested=true]]:before:content-[""]', + '[&[data-nested=true]]:before:block', + '[&[data-nested=true]]:before:border-l', + '[&[data-nested=true]]:before:border-border', + '[&[data-nested=true]]:before:border-dashed', + '[&[data-nested=true]]:before:top-[40px]', + '[&[data-nested=true]]:before:bottom-[20px]', + '[&[data-nested=true]]:before:left-0', + '[&[data-nested=true]]:before:right-0', + ], + }, +}); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/types.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/types.ts new file mode 100644 index 000000000..9e7c8c313 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/types.ts @@ -0,0 +1,6 @@ +import type { GQLOperationReceipt } from '@fuel-explorer/graphql'; + +export interface ReceiptItemRProps { + receipts?: GQLOperationReceipt[]; + hasPanic: boolean; +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxOperationHeader.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxOperationHeader.tsx new file mode 100644 index 000000000..2a158da48 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxOperationHeader.tsx @@ -0,0 +1,74 @@ +import { GQLReceipt, Maybe } from '@fuel-explorer/graphql/sdk'; +import { Address, Code } from '@fuels/ui'; +import { bn } from 'fuels'; +import NextLink from 'next/link'; +import { Amount } from '~/systems/Core/components/Amount/Amount'; +import { + ReceiptHeaderOperation, + ReceiptHeaderOperationDataType, +} from '~/systems/Transaction/component/TxScripts/TxReceiptHeader/types'; + +export function TxOperationHeader({ + field, + index, + receipt, +}: { + field: ReceiptHeaderOperation; + index: number; + receipt: Maybe | undefined; +}) { + if ( + field == null || + (field.requiredField && !receipt?.[field.requiredField]) + ) { + return null; + } + + const key = `${field.label}-${index}`; + const value = + (field.field && receipt?.[field.field]) || + (field.fieldFallback && receipt?.[field.fieldFallback]); + const formattedValue = + field.type === ReceiptHeaderOperationDataType.HEX_ADDRESS && + value && + !String(value)?.startsWith('0x') + ? bn(value).toHex() + : value; + + if (formattedValue == null) { + return null; + } + + if (field.type === ReceiptHeaderOperationDataType.AMOUNT) { + return ( + + ); + } + + return String(formattedValue)?.startsWith('0x') ? ( +
+ ) : ( + + {`${field.label} ${value}`} + + ); +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptAmount.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptAmount.tsx new file mode 100644 index 000000000..9359ffc77 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptAmount.tsx @@ -0,0 +1,37 @@ +import { Address, VStack } from '@fuels/ui'; +import { bn } from 'fuels'; +import { useContext } from 'react'; + +import NextLink from 'next/link'; +import { Amount } from '~/systems/Core/components/Amount/Amount'; +import { TxScriptsContext } from '~/systems/Transaction/component/TxScripts/ReceiptItem/constants'; + +export function TxReceiptAmount() { + const { receipt: item } = useContext(TxScriptsContext); + const receipt = item?.item; + const assetId = receipt?.assetId ?? ''; + const amount = bn(receipt?.amount); + const contract = receipt?.to ?? receipt?.contractId ?? null; + + return ( + amount.gt(0) && ( + + +
+ + ) + ); +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge.tsx new file mode 100644 index 000000000..11ee7214a --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge.tsx @@ -0,0 +1,18 @@ +import { useContext } from 'react'; + +import { Badge } from '@fuels/ui'; +import { TxScriptsContext } from '~/systems/Transaction/component/TxScripts/ReceiptItem/constants'; +import { getBadgeColor } from './utils'; + +export function TxReceiptBadge() { + const { receipt, hasPanic } = useContext(TxScriptsContext); + const type = receipt?.item?.receiptType ?? 'UNKNOWN'; + const color = getBadgeColor(Boolean(hasPanic), receipt?.item); + return ( +
+ + {type} + +
+ ); +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/constants.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/constants.ts new file mode 100644 index 000000000..89b6002cf --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/constants.ts @@ -0,0 +1,3 @@ +import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; + +export const RETURN_TYPES = [GQLReceiptType.Return, GQLReceiptType.ReturnData]; diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/utils.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/utils.ts new file mode 100644 index 000000000..028889727 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/utils.ts @@ -0,0 +1,24 @@ +import { + GQLReceiptType, + type GQLTransactionReceiptFragment, + type Maybe, +} from '@fuel-explorer/graphql/sdk'; +import { RETURN_TYPES } from './constants'; + +export function getBadgeColor( + hasError: boolean, + receipt?: Maybe, +) { + const type = receipt?.receiptType ?? 'UNKNOWN'; + if (type === GQLReceiptType.Revert || type === GQLReceiptType.Panic) { + return 'red'; + } + if ( + RETURN_TYPES.some((t) => t === type) && + !hasError && + !receipt?.contractId + ) { + return 'green'; + } + return 'gray'; +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock.tsx new file mode 100644 index 000000000..2d42b2e8b --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock.tsx @@ -0,0 +1,24 @@ +import { useContext } from 'react'; +import { useMeasure } from 'react-use'; + +import { Collapsible, ScrollArea } from '@fuels/ui'; +import { JsonViewer } from '~/systems/Core/components/JsonViewer/JsonViewer'; +import { TxScriptsContext } from '~/systems/Transaction/component/TxScripts/ReceiptItem/constants'; +import { parseTXScriptJson } from '~/systems/Transaction/component/TxScripts/utils'; +import { styles } from './styles'; + +export function TxReceiptBlock() { + const { receipt } = useContext(TxScriptsContext); + const classes = styles(); + const [ref, { width }] = useMeasure(); + return ( + } + className={classes.utxos()} + > + + + + + ); +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/styles.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/styles.ts new file mode 100644 index 000000000..5f2606e32 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/styles.ts @@ -0,0 +1,7 @@ +import { tv } from 'tailwind-variants'; + +export const styles = tv({ + slots: { + utxos: 'bg-gray-3 mx-3 my-3 p-0 rounded', + }, +}); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx new file mode 100644 index 000000000..2ee9809bf --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx @@ -0,0 +1,37 @@ +import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; +import { Collapsible, VStack } from '@fuels/ui'; +import { useContext } from 'react'; +import { TxScriptsContext } from '~/systems/Transaction/component/TxScripts/ReceiptItem/constants'; +import { TxOperationHeader } from '~/systems/Transaction/component/TxScripts/TxOperationHeader'; +import { TxReceiptAmount } from '~/systems/Transaction/component/TxScripts/TxReceiptAmount'; +import { TxReceiptBadge } from '~/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge'; +import { RECEIPT_FIELDS_MAP, styles } from './constants'; + +export function TxReceiptHeader() { + const { receipt: item } = useContext(TxScriptsContext); + const receipt = item?.item; + const classes = styles(); + const type = (receipt?.receiptType ?? 'UNKNOWN') as GQLReceiptType; + const fields = RECEIPT_FIELDS_MAP[type] || []; + + return ( + + + + {!fields?.length && } + + {fields?.map((field, index) => ( + + ))} + + + + ); +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/constants.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/constants.ts similarity index 94% rename from packages/app-explorer/src/systems/Transaction/component/TxScripts/constants.ts rename to packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/constants.ts index 29255e2bc..dffb73e1b 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/constants.ts +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/constants.ts @@ -1,6 +1,7 @@ import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; +import { tv } from 'tailwind-variants'; import { - type ReceiptHeaderOperation, + ReceiptHeaderOperation, ReceiptHeaderOperationDataType, } from './types'; @@ -114,3 +115,9 @@ export const RECEIPT_FIELDS_MAP: Record< { label: 'Result:', field: 'result' }, ], }; + +export const styles = tv({ + slots: { + header: 'group min-h-[42px] gap-2 tablet:gap-4', + }, +}); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/types.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/types.ts new file mode 100644 index 000000000..24e918f67 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/types.ts @@ -0,0 +1,33 @@ +import type { GQLReceipt } from '@fuel-explorer/graphql'; + +export enum ReceiptHeaderOperationDataType { + DEFAULT = 'DEFAULT', + HEX_ADDRESS = 'HEX_ADDRESS', + AMOUNT = 'AMOUNT', +} + +interface ReceiptHeaderOperationBase { + label?: string; + type?: Omit< + ReceiptHeaderOperationDataType, + ReceiptHeaderOperationDataType.AMOUNT + >; + requiredField?: keyof GQLReceipt; + fieldFallback?: keyof GQLReceipt; + hrefFactory?: (value: string) => string; +} + +interface ReceiptHeaderOperationAmount extends ReceiptHeaderOperationBase { + label?: never; + type: ReceiptHeaderOperationDataType.AMOUNT; + field?: keyof GQLReceipt; + hrefFactory?: never; +} + +interface ReceiptHeaderDefaultOperations extends ReceiptHeaderOperationBase { + field: keyof GQLReceipt; +} + +export type ReceiptHeaderOperation = + | ReceiptHeaderDefaultOperations + | ReceiptHeaderOperationAmount; diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx index c8aafa5b3..fcd1dd92b 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScripts.tsx @@ -1,53 +1,16 @@ -import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; -import type { - GQLOperationReceipt, - GQLReceipt, - GQLTransactionReceiptFragment, - Maybe, -} from '@fuel-explorer/graphql/sdk'; -import type { BaseProps } from '@fuels/ui'; import { - Address, - Badge, - Box, Button, Card, - Code, - Collapsible, - HStack, Heading, - HoverCard, LoadingBox, LoadingWrapper, - ScrollArea, - Text, VStack, - cx, } from '@fuels/ui'; -import { - IconArrowRight, - IconArrowsMoveVertical, - IconFold, -} from '@tabler/icons-react'; -import { bn } from 'fuels'; -import NextLink from 'next/link'; -import { createContext, useContext, useState } from 'react'; -import { useMeasure } from 'react-use'; -import { tv } from 'tailwind-variants'; -import { Amount } from '~/systems/Core/components/Amount/Amount'; +import { IconFold } from '@tabler/icons-react'; +import { useState } from 'react'; import { EmptyCard } from '~/systems/Core/components/EmptyCard/EmptyCard'; -import { JsonViewer } from '~/systems/Core/components/JsonViewer/JsonViewer'; -import type { TransactionNode } from '../../types'; -import { RECEIPT_FIELDS_MAP } from './constants'; -import { - type ReceiptHeaderOperation, - ReceiptHeaderOperationDataType, -} from './types'; - -export type TxScriptsProps = BaseProps<{ - tx: TransactionNode | undefined; - isLoading?: boolean; -}>; +import { TxScriptsContent } from '~/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent'; +import { type TxScriptsProps } from './types'; export function TxScripts({ tx, isLoading, ...props }: TxScriptsProps) { const [opened, setOpened] = useState(false); @@ -78,7 +41,7 @@ export function TxScripts({ tx, isLoading, ...props }: TxScriptsProps) { )} - + } loadingEl={ @@ -99,488 +62,3 @@ export function TxScripts({ tx, isLoading, ...props }: TxScriptsProps) { ); } - -type ScriptsContent = BaseProps<{ - tx: TransactionNode | undefined; - opened: boolean; - setOpened: React.Dispatch>; -}>; - -function ScriptsContent({ tx, opened, setOpened }: ScriptsContent) { - const operations = tx?.operations ?? []; - const classes = styles(); - const [ref, { width }] = useMeasure(); - - if (!operations.length) { - return ( - - No Scripts - - This transaction does not have any scripts. - - - ); - } - - const txReceipts = tx?.receipts ?? []; - const receipts = operations.flatMap((i) => i?.receipts ?? []); - const first = receipts?.[0]; - const last = receipts?.[receipts.length - 1]; - const hasPanic = operations?.some((o) => - o?.receipts?.some( - (r) => - r?.item?.receiptType === GQLReceiptType.Panic || - r?.item?.receiptType === GQLReceiptType.Revert, - ), - ); - - if (!opened && receipts.length > 3) { - return ( - <> - - - - - - - - - - - - - - - - ); - } - - return ( -
- {operations.map((item, i) => ( -
- {item?.receipts?.map((receipt, idx) => { - return ( -
- 0} - hasPanic={hasPanic} - /> - -
- ); - })} -
- ))} -
- ); -} - -function ReceiptItemR(props: { - receipts?: GQLOperationReceipt[]; - hasPanic: boolean; -}) { - const classes = styles(); - return ( - <> - {props.receipts?.map((sub, j) => ( -
- - {sub?.receipts && sub?.receipts?.length > 0 && ( - - )} -
- ))} - - ); -} - -function CountReceipt({ num, op }: { num: number; op: string }) { - const length = new Intl.NumberFormat('en-IN', { - minimumIntegerDigits: 2, - }).format(num); - const text = num > 1 ? `${op}s` : op; - return ( - - {length} {text} - - ); -} - -function TypesCounter({ - receipts: items = [], -}: { - receipts?: Maybe; -}) { - const receipts = items ?? []; - const calls = receipts.filter((i) => i?.receiptType === GQLReceiptType.Call); - const transfers = receipts.filter( - (i) => - i?.receiptType === GQLReceiptType.Transfer || - i?.receiptType === GQLReceiptType.TransferOut, - ); - const mints = receipts.filter((i) => i?.receiptType === GQLReceiptType.Mint); - const burns = receipts.filter((i) => i?.receiptType === GQLReceiptType.Burn); - const messages = receipts.filter( - (i) => i?.receiptType === GQLReceiptType.MessageOut, - ); - const returns = receipts.filter( - (i) => - i?.receiptType === GQLReceiptType.Return || - i?.receiptType === GQLReceiptType.ReturnData, - ); - const results = receipts.filter( - (i) => i?.receiptType === GQLReceiptType.ScriptResult, - ); - const errors = receipts.filter( - (i) => - i?.receiptType === GQLReceiptType.Panic || - i?.receiptType === GQLReceiptType.Revert, - ); - const logs = receipts.filter( - (i) => - i?.receiptType === GQLReceiptType.Log || - i?.receiptType === GQLReceiptType.LogData, - ); - return ( -
- {Boolean(calls.length) && } - {Boolean(logs.length) && } - {Boolean(transfers.length) && ( - - )} - {Boolean(messages.length) && ( - - )} - {Boolean(mints.length) && } - {Boolean(burns.length) && } - {Boolean(returns.length) && ( - - )} - {Boolean(results.length) && ( - - )} - {Boolean(errors.length) && ( - - )} -
- ); -} - -const ctx = createContext({} as ReceiptItemProps); -const RETURN_TYPES = [GQLReceiptType.Return, GQLReceiptType.ReturnData]; - -function getBadgeColor( - hasError: boolean, - receipt?: Maybe, -) { - const type = receipt?.receiptType ?? 'UNKNOWN'; - if (type === GQLReceiptType.Revert || type === GQLReceiptType.Panic) { - return 'red'; - } - if ( - RETURN_TYPES.some((t) => t === type) && - !hasError && - !receipt?.contractId - ) { - return 'green'; - } - return 'gray'; -} - -export type ReceiptItemProps = BaseProps<{ - receipt?: Maybe; - isIndented?: boolean; - hasPanic?: boolean; -}>; - -function ReceiptItem({ - receipt, - isIndented, - hasPanic, - className, - ...props -}: ReceiptItemProps) { - const classes = styles({ indent: isIndented }); - const [opened, setOpened] = useState(false); - - return ( - -
- - - - -
-
- ); -} - -function parseJson( - item?: Maybe, -): Record { - if (!item) return {}; - return Object.entries(item).reduce((acc, [key, value]) => { - if (!value || key === '__typename') return acc; - if (typeof value === 'object') { - return { ...acc, [key]: parseJson(value) }; - } - return { ...acc, [key]: value }; - }, {}); -} - -function ReceiptBlock() { - const { receipt } = useContext(ctx); - const classes = styles(); - const [ref, { width }] = useMeasure(); - return ( - } - className={classes.utxos()} - > - - - - - ); -} - -function ReceiptBadge() { - const { receipt, hasPanic } = useContext(ctx); - const type = receipt?.item?.receiptType ?? 'UNKNOWN'; - const color = getBadgeColor(Boolean(hasPanic), receipt?.item); - return ( -
- - {type} - -
- ); -} - -function ReceiptAmount() { - const { receipt: item } = useContext(ctx); - const receipt = item?.item; - const assetId = receipt?.assetId ?? ''; - const amount = bn(receipt?.amount); - const contract = receipt?.to ?? receipt?.contractId ?? null; - - return ( - amount.gt(0) && ( - - -
- - ) - ); -} - -function OperationHeader({ - field, - index, - receipt, -}: { - field: ReceiptHeaderOperation; - index: number; - receipt: Maybe | undefined; -}) { - if ( - field == null || - (field.requiredField && !receipt?.[field.requiredField]) - ) { - return null; - } - - const key = `${field.label}-${index}`; - const value = - (field.field && receipt?.[field.field]) || - (field.fieldFallback && receipt?.[field.fieldFallback]); - const formattedValue = - field.type === ReceiptHeaderOperationDataType.HEX_ADDRESS && - value && - !String(value)?.startsWith('0x') - ? bn(value).toHex() - : value; - - if (formattedValue == null) { - return null; - } - - if (field.type === ReceiptHeaderOperationDataType.AMOUNT) { - return ( - - ); - } - - return String(formattedValue)?.startsWith('0x') ? ( -
- ) : ( - - {`${field.label} ${value}`} - - ); -} - -function ReceiptHeader() { - const { receipt: item } = useContext(ctx); - const receipt = item?.item; - const classes = styles(); - const type = (receipt?.receiptType ?? 'UNKNOWN') as GQLReceiptType; - const fields = RECEIPT_FIELDS_MAP[type] || []; - - return ( - - - - {!fields?.length && } - - {fields?.map((field, index) => ( - - ))} - - - - ); -} - -const styles = tv({ - slots: { - icon: 'transition-transform group-data-[state=closed]:hover:rotate-180 group-data-[state=open]:rotate-180', - utxos: 'bg-gray-3 mx-3 my-3 p-0 rounded', - lines: [ - 'relative flex-1 border-t border-b border-border', - 'before:h-[1px] before:absolute before:top-1/2 before:left-0', - 'before:w-full before:bg-border before:content-[""]', - ], - receiptRow: 'peer relative', - header: 'group min-h-[42px] gap-2 tablet:gap-4', - operation: [ - 'relative flex flex-col gap-3', - '[&[data-nested=true]]:before:absolute', - '[&[data-nested=true]]:before:content-[""]', - '[&[data-nested=true]]:before:block', - '[&[data-nested=true]]:before:border-l', - '[&[data-nested=true]]:before:border-border', - '[&[data-nested=true]]:before:border-dashed', - '[&[data-nested=true]]:before:top-[40px]', - '[&[data-nested=true]]:before:bottom-[20px]', - '[&[data-nested=true]]:before:left-0', - '[&[data-nested=true]]:before:right-0', - ], - operationChild: [ - 'relative flex flex-col gap-3 ml-5', - 'tablet:ml-10', - '[&[data-nested=true]]:before:absolute', - '[&[data-nested=true]]:before:content-[""]', - '[&[data-nested=true]]:before:block', - '[&[data-nested=true]]:before:border-l', - '[&[data-nested=true]]:before:border-border', - '[&[data-nested=true]]:before:border-dashed', - '[&[data-nested=true]]:before:top-[40px]', - '[&[data-nested=true]]:before:bottom-[20px]', - '[&[data-nested=true]]:before:left-0', - '[&[data-nested=true]]:before:right-0', - ], - }, - variants: { - indent: { - true: { - receiptRow: [ - 'ml-5 before:absolute before:top-[-35px] before:left-[-20px]', - 'tablet:ml-10 tablet:before:left-[-40px]', - 'before:bottom-[20px] before:right-[100%]', - 'before:content-[""] before:block before:border-l before:border-b', - 'before:border-border before:border-dashed before:rounded-bl', - '[&[data-opened=true]:before+&]:top-[-120px]', - ], - }, - }, - }, -}); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx new file mode 100644 index 000000000..22f7262c0 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx @@ -0,0 +1,113 @@ +import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; +import type { GQLOperationReceipt } from '@fuel-explorer/graphql/sdk'; +import { Box, Button, HStack, HoverCard } from '@fuels/ui'; +import { IconArrowsMoveVertical } from '@tabler/icons-react'; +import { useMeasure } from 'react-use'; +import { EmptyCard } from '~/systems/Core/components/EmptyCard/EmptyCard'; +import { ReceiptItem } from '~/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem'; +import { ReceiptItemR } from '~/systems/Transaction/component/TxScripts/ReceiptItemR/ReceiptItemR'; +import { TypesCounter } from '~/systems/Transaction/component/TxScripts/TypesCounter/TypesCounter'; +import { styles } from './constants'; +import type { ScriptsContentProps } from './types'; + +export function TxScriptsContent({ + tx, + opened, + setOpened, +}: ScriptsContentProps) { + const operations = tx?.operations ?? []; + const classes = styles(); + const [ref, { width }] = useMeasure(); + + if (!operations.length) { + return ( + + No Scripts + + This transaction does not have any scripts. + + + ); + } + + const txReceipts = tx?.receipts ?? []; + const receipts = operations.flatMap((i) => i?.receipts ?? []); + const first = receipts?.[0]; + const last = receipts?.[receipts.length - 1]; + const hasPanic = operations?.some((o) => + o?.receipts?.some( + (r) => + r?.item?.receiptType === GQLReceiptType.Panic || + r?.item?.receiptType === GQLReceiptType.Revert, + ), + ); + + if (!opened && receipts.length > 3) { + return ( + <> + + + + + + + + + + + + + + + + ); + } + + return ( +
+ {operations.map((item, i) => ( +
+ {item?.receipts?.map((receipt, idx) => { + return ( +
+ 0} + hasPanic={hasPanic} + /> + +
+ ); + })} +
+ ))} +
+ ); +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/constants.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/constants.ts new file mode 100644 index 000000000..d99401018 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/constants.ts @@ -0,0 +1,24 @@ +import { tv } from 'tailwind-variants'; + +export const styles = tv({ + slots: { + lines: [ + 'relative flex-1 border-t border-b border-border', + 'before:h-[1px] before:absolute before:top-1/2 before:left-0', + 'before:w-full before:bg-border before:content-[""]', + ], + operation: [ + 'relative flex flex-col gap-3', + '[&[data-nested=true]]:before:absolute', + '[&[data-nested=true]]:before:content-[""]', + '[&[data-nested=true]]:before:block', + '[&[data-nested=true]]:before:border-l', + '[&[data-nested=true]]:before:border-border', + '[&[data-nested=true]]:before:border-dashed', + '[&[data-nested=true]]:before:top-[40px]', + '[&[data-nested=true]]:before:bottom-[20px]', + '[&[data-nested=true]]:before:left-0', + '[&[data-nested=true]]:before:right-0', + ], + }, +}); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/types.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/types.ts new file mode 100644 index 000000000..f0688912b --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/types.ts @@ -0,0 +1,8 @@ +import type { BaseProps } from '@fuels/ui'; +import { TransactionNode } from '~/systems/Transaction/types'; + +export type ScriptsContentProps = BaseProps<{ + tx: TransactionNode | undefined; + opened: boolean; + setOpened: React.Dispatch>; +}>; diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/TypesCounter.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/TypesCounter.tsx new file mode 100644 index 000000000..37f08522d --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/TypesCounter.tsx @@ -0,0 +1,59 @@ +import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; +import { CountReceipt } from '~/systems/Transaction/component/TxScripts/CountReceipt'; +import type { TypesCounterProps } from './types'; + +export function TypesCounter({ receipts: items = [] }: TypesCounterProps) { + const receipts = items ?? []; + const calls = receipts.filter((i) => i?.receiptType === GQLReceiptType.Call); + const transfers = receipts.filter( + (i) => + i?.receiptType === GQLReceiptType.Transfer || + i?.receiptType === GQLReceiptType.TransferOut, + ); + const mints = receipts.filter((i) => i?.receiptType === GQLReceiptType.Mint); + const burns = receipts.filter((i) => i?.receiptType === GQLReceiptType.Burn); + const messages = receipts.filter( + (i) => i?.receiptType === GQLReceiptType.MessageOut, + ); + const returns = receipts.filter( + (i) => + i?.receiptType === GQLReceiptType.Return || + i?.receiptType === GQLReceiptType.ReturnData, + ); + const results = receipts.filter( + (i) => i?.receiptType === GQLReceiptType.ScriptResult, + ); + const errors = receipts.filter( + (i) => + i?.receiptType === GQLReceiptType.Panic || + i?.receiptType === GQLReceiptType.Revert, + ); + const logs = receipts.filter( + (i) => + i?.receiptType === GQLReceiptType.Log || + i?.receiptType === GQLReceiptType.LogData, + ); + return ( +
+ {Boolean(calls.length) && } + {Boolean(logs.length) && } + {Boolean(transfers.length) && ( + + )} + {Boolean(messages.length) && ( + + )} + {Boolean(mints.length) && } + {Boolean(burns.length) && } + {Boolean(returns.length) && ( + + )} + {Boolean(results.length) && ( + + )} + {Boolean(errors.length) && ( + + )} +
+ ); +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/types.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/types.ts new file mode 100644 index 000000000..fe2ea25fb --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/types.ts @@ -0,0 +1,8 @@ +import { + GQLTransactionReceiptFragment, + Maybe, +} from '@fuel-explorer/graphql/sdk'; + +export interface TypesCounterProps { + receipts?: Maybe; +} diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/types.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/types.ts index 24e918f67..d1bc9b04a 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/types.ts +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/types.ts @@ -1,33 +1,7 @@ -import type { GQLReceipt } from '@fuel-explorer/graphql'; +import type { BaseProps } from '@fuels/ui'; +import { TransactionNode } from '~/systems/Transaction/types'; -export enum ReceiptHeaderOperationDataType { - DEFAULT = 'DEFAULT', - HEX_ADDRESS = 'HEX_ADDRESS', - AMOUNT = 'AMOUNT', -} - -interface ReceiptHeaderOperationBase { - label?: string; - type?: Omit< - ReceiptHeaderOperationDataType, - ReceiptHeaderOperationDataType.AMOUNT - >; - requiredField?: keyof GQLReceipt; - fieldFallback?: keyof GQLReceipt; - hrefFactory?: (value: string) => string; -} - -interface ReceiptHeaderOperationAmount extends ReceiptHeaderOperationBase { - label?: never; - type: ReceiptHeaderOperationDataType.AMOUNT; - field?: keyof GQLReceipt; - hrefFactory?: never; -} - -interface ReceiptHeaderDefaultOperations extends ReceiptHeaderOperationBase { - field: keyof GQLReceipt; -} - -export type ReceiptHeaderOperation = - | ReceiptHeaderDefaultOperations - | ReceiptHeaderOperationAmount; +export type TxScriptsProps = BaseProps<{ + tx: TransactionNode | undefined; + isLoading?: boolean; +}>; diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/utils.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/utils.ts new file mode 100644 index 000000000..b4c142e03 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/utils.ts @@ -0,0 +1,17 @@ +import { + GQLTransactionReceiptFragment, + Maybe, +} from '@fuel-explorer/graphql/sdk'; + +export function parseTXScriptJson( + item?: Maybe, +): Record { + if (!item) return {}; + return Object.entries(item).reduce((acc, [key, value]) => { + if (!value || key === '__typename') return acc; + if (typeof value === 'object') { + return { ...acc, [key]: parseTXScriptJson(value) }; + } + return { ...acc, [key]: value }; + }, {}); +} From 04f523a7804f48f48630943d5d7169ea19767017 Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:09:24 -0300 Subject: [PATCH 5/8] feat: add memo to components rendered through iteration --- .../component/TxScripts/ReceiptItem/ReceiptItem.tsx | 6 ++++-- .../component/TxScripts/ReceiptItemR/ReceiptItemR.tsx | 5 ++++- .../component/TxScripts/TxOperationHeader.tsx | 5 ++++- .../TxScripts/TxScriptsContent/TxScriptsContent.tsx | 9 ++++----- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx index 79b23a1f1..9ab6c9a73 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx @@ -1,12 +1,12 @@ import { Collapsible, cx } from '@fuels/ui'; -import { useState } from 'react'; +import { memo, useState } from 'react'; import { TxReceiptBlock } from '~/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock'; import { TxReceiptHeader } from '~/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader'; import { TxScriptsContext } from './constants'; import { styles } from './styles'; import { ReceiptItemProps } from './types'; -export function ReceiptItem({ +function _ReceiptItem({ receipt, isIndented, hasPanic, @@ -37,3 +37,5 @@ export function ReceiptItem({ ); } + +export const ReceiptItem = memo(_ReceiptItem); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/ReceiptItemR.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/ReceiptItemR.tsx index fef27eb0e..05bb0a50f 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/ReceiptItemR.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItemR/ReceiptItemR.tsx @@ -1,9 +1,10 @@ import { GQLOperationReceipt } from '@fuel-explorer/graphql'; +import { memo } from 'react'; import { ReceiptItem } from '~/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem'; import { styles } from './styles'; import { ReceiptItemRProps } from './types'; -export function ReceiptItemR(props: ReceiptItemRProps) { +function _ReceiptItemR(props: ReceiptItemRProps) { const classes = styles(); return ( <> @@ -26,3 +27,5 @@ export function ReceiptItemR(props: ReceiptItemRProps) { ); } + +export const ReceiptItemR = memo(_ReceiptItemR); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxOperationHeader.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxOperationHeader.tsx index 2a158da48..31c398af9 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxOperationHeader.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxOperationHeader.tsx @@ -2,13 +2,14 @@ import { GQLReceipt, Maybe } from '@fuel-explorer/graphql/sdk'; import { Address, Code } from '@fuels/ui'; import { bn } from 'fuels'; import NextLink from 'next/link'; +import { memo } from 'react'; import { Amount } from '~/systems/Core/components/Amount/Amount'; import { ReceiptHeaderOperation, ReceiptHeaderOperationDataType, } from '~/systems/Transaction/component/TxScripts/TxReceiptHeader/types'; -export function TxOperationHeader({ +function _TxOperationHeader({ field, index, receipt, @@ -72,3 +73,5 @@ export function TxOperationHeader({ ); } + +export const TxOperationHeader = memo(_TxOperationHeader); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx index 22f7262c0..f921f5162 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx @@ -2,6 +2,7 @@ import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; import type { GQLOperationReceipt } from '@fuel-explorer/graphql/sdk'; import { Box, Button, HStack, HoverCard } from '@fuels/ui'; import { IconArrowsMoveVertical } from '@tabler/icons-react'; +import { memo } from 'react'; import { useMeasure } from 'react-use'; import { EmptyCard } from '~/systems/Core/components/EmptyCard/EmptyCard'; import { ReceiptItem } from '~/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem'; @@ -10,11 +11,7 @@ import { TypesCounter } from '~/systems/Transaction/component/TxScripts/TypesCou import { styles } from './constants'; import type { ScriptsContentProps } from './types'; -export function TxScriptsContent({ - tx, - opened, - setOpened, -}: ScriptsContentProps) { +function _TxScriptsContent({ tx, opened, setOpened }: ScriptsContentProps) { const operations = tx?.operations ?? []; const classes = styles(); const [ref, { width }] = useMeasure(); @@ -111,3 +108,5 @@ export function TxScriptsContent({ ); } + +export const TxScriptsContent = memo(_TxScriptsContent); From c9d781a27aa2bfd84866c1b1bdb14d9e77d7fa0a Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:19:59 -0300 Subject: [PATCH 6/8] feat: move context to separate file --- .../TxScripts/ReceiptItem/ReceiptItem.tsx | 14 +++++++------- .../component/TxScripts/ReceiptItem/constants.ts | 6 ------ .../component/TxScripts/TxReceiptAmount.tsx | 7 +++---- .../TxScripts/TxReceiptBadge/TxReceiptBadge.tsx | 6 +++--- .../TxScripts/TxReceiptBlock/TxReceiptBlock.tsx | 8 ++++---- .../TxScripts/TxReceiptHeader/TxReceiptHeader.tsx | 5 +++-- .../TxScripts/{ReceiptItem/types.ts => context.ts} | 7 ++++++- 7 files changed, 26 insertions(+), 27 deletions(-) delete mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/constants.ts rename packages/app-explorer/src/systems/Transaction/component/TxScripts/{ReceiptItem/types.ts => context.ts} (54%) diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx index 9ab6c9a73..0db192f15 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem.tsx @@ -2,9 +2,11 @@ import { Collapsible, cx } from '@fuels/ui'; import { memo, useState } from 'react'; import { TxReceiptBlock } from '~/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock'; import { TxReceiptHeader } from '~/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader'; -import { TxScriptsContext } from './constants'; +import { + ReceiptContext, + type ReceiptItemContext, +} from '~/systems/Transaction/component/TxScripts/context'; import { styles } from './styles'; -import { ReceiptItemProps } from './types'; function _ReceiptItem({ receipt, @@ -12,14 +14,12 @@ function _ReceiptItem({ hasPanic, className, ...props -}: ReceiptItemProps) { +}: ReceiptItemContext) { const classes = styles({ indent: isIndented }); const [opened, setOpened] = useState(false); return ( - +
-
+ ); } diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/constants.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/constants.ts deleted file mode 100644 index 8d23232cf..000000000 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/constants.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { createContext } from 'react'; -import type { ReceiptItemProps } from './types'; - -export const TxScriptsContext = createContext( - {} as ReceiptItemProps, -); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptAmount.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptAmount.tsx index 9359ffc77..2ae55b89a 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptAmount.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptAmount.tsx @@ -1,13 +1,12 @@ import { Address, VStack } from '@fuels/ui'; import { bn } from 'fuels'; -import { useContext } from 'react'; - import NextLink from 'next/link'; +import { useContext } from 'react'; import { Amount } from '~/systems/Core/components/Amount/Amount'; -import { TxScriptsContext } from '~/systems/Transaction/component/TxScripts/ReceiptItem/constants'; +import { ReceiptContext } from '~/systems/Transaction/component/TxScripts/context'; export function TxReceiptAmount() { - const { receipt: item } = useContext(TxScriptsContext); + const { receipt: item } = useContext(ReceiptContext); const receipt = item?.item; const assetId = receipt?.assetId ?? ''; const amount = bn(receipt?.amount); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge.tsx index 11ee7214a..0634676f3 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge.tsx @@ -1,11 +1,11 @@ +import { Badge } from '@fuels/ui'; import { useContext } from 'react'; +import { ReceiptContext } from '~/systems/Transaction/component/TxScripts/context'; -import { Badge } from '@fuels/ui'; -import { TxScriptsContext } from '~/systems/Transaction/component/TxScripts/ReceiptItem/constants'; import { getBadgeColor } from './utils'; export function TxReceiptBadge() { - const { receipt, hasPanic } = useContext(TxScriptsContext); + const { receipt, hasPanic } = useContext(ReceiptContext); const type = receipt?.item?.receiptType ?? 'UNKNOWN'; const color = getBadgeColor(Boolean(hasPanic), receipt?.item); return ( diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock.tsx index 2d42b2e8b..0a89ca25f 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptBlock/TxReceiptBlock.tsx @@ -1,14 +1,14 @@ +import { Collapsible, ScrollArea } from '@fuels/ui'; import { useContext } from 'react'; import { useMeasure } from 'react-use'; - -import { Collapsible, ScrollArea } from '@fuels/ui'; import { JsonViewer } from '~/systems/Core/components/JsonViewer/JsonViewer'; -import { TxScriptsContext } from '~/systems/Transaction/component/TxScripts/ReceiptItem/constants'; +import { ReceiptContext } from '~/systems/Transaction/component/TxScripts/context'; import { parseTXScriptJson } from '~/systems/Transaction/component/TxScripts/utils'; + import { styles } from './styles'; export function TxReceiptBlock() { - const { receipt } = useContext(TxScriptsContext); + const { receipt } = useContext(ReceiptContext); const classes = styles(); const [ref, { width }] = useMeasure(); return ( diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx index 2ee9809bf..a1b67af4d 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx @@ -1,14 +1,15 @@ import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; import { Collapsible, VStack } from '@fuels/ui'; import { useContext } from 'react'; -import { TxScriptsContext } from '~/systems/Transaction/component/TxScripts/ReceiptItem/constants'; import { TxOperationHeader } from '~/systems/Transaction/component/TxScripts/TxOperationHeader'; import { TxReceiptAmount } from '~/systems/Transaction/component/TxScripts/TxReceiptAmount'; import { TxReceiptBadge } from '~/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge'; +import { ReceiptContext } from '~/systems/Transaction/component/TxScripts/context'; + import { RECEIPT_FIELDS_MAP, styles } from './constants'; export function TxReceiptHeader() { - const { receipt: item } = useContext(TxScriptsContext); + const { receipt: item } = useContext(ReceiptContext); const receipt = item?.item; const classes = styles(); const type = (receipt?.receiptType ?? 'UNKNOWN') as GQLReceiptType; diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/types.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/context.ts similarity index 54% rename from packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/types.ts rename to packages/app-explorer/src/systems/Transaction/component/TxScripts/context.ts index 79eb8d9e8..707c96ea0 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/ReceiptItem/types.ts +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/context.ts @@ -1,8 +1,13 @@ import type { GQLOperationReceipt, Maybe } from '@fuel-explorer/graphql/sdk'; import type { BaseProps } from '@fuels/ui'; +import { createContext } from 'react'; -export type ReceiptItemProps = BaseProps<{ +export type ReceiptItemContext = BaseProps<{ receipt?: Maybe; isIndented?: boolean; hasPanic?: boolean; }>; + +export const ReceiptContext = createContext( + {} as ReceiptItemContext, +); From 81ba2f7dd3b3cacef07e00e2b7bc66811f86f9df Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:29:15 -0300 Subject: [PATCH 7/8] chore: move styles to style.ts files --- .../TxScripts/TxReceiptHeader/TxReceiptHeader.tsx | 3 ++- .../component/TxScripts/TxReceiptHeader/constants.ts | 7 ------- .../component/TxScripts/TxReceiptHeader/styles.ts | 7 +++++++ .../TxScripts/TxScriptsContent/TxScriptsContent.tsx | 2 +- .../TxScripts/TxScriptsContent/{constants.ts => styles.ts} | 0 5 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/styles.ts rename packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/{constants.ts => styles.ts} (100%) diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx index a1b67af4d..b88d8d370 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/TxReceiptHeader.tsx @@ -6,7 +6,8 @@ import { TxReceiptAmount } from '~/systems/Transaction/component/TxScripts/TxRec import { TxReceiptBadge } from '~/systems/Transaction/component/TxScripts/TxReceiptBadge/TxReceiptBadge'; import { ReceiptContext } from '~/systems/Transaction/component/TxScripts/context'; -import { RECEIPT_FIELDS_MAP, styles } from './constants'; +import { RECEIPT_FIELDS_MAP } from './constants'; +import { styles } from './styles'; export function TxReceiptHeader() { const { receipt: item } = useContext(ReceiptContext); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/constants.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/constants.ts index dffb73e1b..3b107b6cf 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/constants.ts +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/constants.ts @@ -1,5 +1,4 @@ import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; -import { tv } from 'tailwind-variants'; import { ReceiptHeaderOperation, ReceiptHeaderOperationDataType, @@ -115,9 +114,3 @@ export const RECEIPT_FIELDS_MAP: Record< { label: 'Result:', field: 'result' }, ], }; - -export const styles = tv({ - slots: { - header: 'group min-h-[42px] gap-2 tablet:gap-4', - }, -}); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/styles.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/styles.ts new file mode 100644 index 000000000..86d5b35f7 --- /dev/null +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxReceiptHeader/styles.ts @@ -0,0 +1,7 @@ +import { tv } from 'tailwind-variants'; + +export const styles = tv({ + slots: { + header: 'group min-h-[42px] gap-2 tablet:gap-4', + }, +}); diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx index f921f5162..d07d245dd 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/TxScriptsContent.tsx @@ -8,7 +8,7 @@ import { EmptyCard } from '~/systems/Core/components/EmptyCard/EmptyCard'; import { ReceiptItem } from '~/systems/Transaction/component/TxScripts/ReceiptItem/ReceiptItem'; import { ReceiptItemR } from '~/systems/Transaction/component/TxScripts/ReceiptItemR/ReceiptItemR'; import { TypesCounter } from '~/systems/Transaction/component/TxScripts/TypesCounter/TypesCounter'; -import { styles } from './constants'; +import { styles } from './styles'; import type { ScriptsContentProps } from './types'; function _TxScriptsContent({ tx, opened, setOpened }: ScriptsContentProps) { diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/constants.ts b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/styles.ts similarity index 100% rename from packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/constants.ts rename to packages/app-explorer/src/systems/Transaction/component/TxScripts/TxScriptsContent/styles.ts From a5d46a9924e6e74e63fda6a791359b8c64a0cad9 Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:41:02 -0300 Subject: [PATCH 8/8] refactor: types counter from filters to a single reduce --- .../TxScripts/TypesCounter/TypesCounter.tsx | 117 +++++++++++------- 1 file changed, 70 insertions(+), 47 deletions(-) diff --git a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/TypesCounter.tsx b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/TypesCounter.tsx index 37f08522d..ac18a7c7e 100644 --- a/packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/TypesCounter.tsx +++ b/packages/app-explorer/src/systems/Transaction/component/TxScripts/TypesCounter/TypesCounter.tsx @@ -1,59 +1,82 @@ import { GQLReceiptType } from '@fuel-explorer/graphql/sdk'; +import { useMemo } from 'react'; import { CountReceipt } from '~/systems/Transaction/component/TxScripts/CountReceipt'; import type { TypesCounterProps } from './types'; -export function TypesCounter({ receipts: items = [] }: TypesCounterProps) { - const receipts = items ?? []; - const calls = receipts.filter((i) => i?.receiptType === GQLReceiptType.Call); - const transfers = receipts.filter( - (i) => - i?.receiptType === GQLReceiptType.Transfer || - i?.receiptType === GQLReceiptType.TransferOut, - ); - const mints = receipts.filter((i) => i?.receiptType === GQLReceiptType.Mint); - const burns = receipts.filter((i) => i?.receiptType === GQLReceiptType.Burn); - const messages = receipts.filter( - (i) => i?.receiptType === GQLReceiptType.MessageOut, - ); - const returns = receipts.filter( - (i) => - i?.receiptType === GQLReceiptType.Return || - i?.receiptType === GQLReceiptType.ReturnData, - ); - const results = receipts.filter( - (i) => i?.receiptType === GQLReceiptType.ScriptResult, - ); - const errors = receipts.filter( - (i) => - i?.receiptType === GQLReceiptType.Panic || - i?.receiptType === GQLReceiptType.Revert, - ); - const logs = receipts.filter( - (i) => - i?.receiptType === GQLReceiptType.Log || - i?.receiptType === GQLReceiptType.LogData, +const EMPTY_ARRAY = [] as NonNullable; + +export function TypesCounter({ receipts: items }: TypesCounterProps) { + const counts = useMemo( + () => + (items ?? EMPTY_ARRAY).reduce( + (acc, receipt) => { + switch (receipt?.receiptType) { + case GQLReceiptType.Call: + acc.calls += 1; + break; + case GQLReceiptType.Transfer: + case GQLReceiptType.TransferOut: + acc.transfers += 1; + break; + case GQLReceiptType.Mint: + acc.mints += 1; + break; + case GQLReceiptType.Burn: + acc.burns += 1; + break; + case GQLReceiptType.MessageOut: + acc.messages += 1; + break; + case GQLReceiptType.Return: + case GQLReceiptType.ReturnData: + acc.returns += 1; + break; + case GQLReceiptType.ScriptResult: + acc.results += 1; + break; + case GQLReceiptType.Panic: + case GQLReceiptType.Revert: + acc.errors += 1; + break; + case GQLReceiptType.Log: + case GQLReceiptType.LogData: + acc.logs += 1; + break; + default: + break; + } + return acc; + }, + { + calls: 0, + transfers: 0, + mints: 0, + burns: 0, + messages: 0, + returns: 0, + results: 0, + errors: 0, + logs: 0, + }, + ), + [items], ); + return (
- {Boolean(calls.length) && } - {Boolean(logs.length) && } - {Boolean(transfers.length) && ( - - )} - {Boolean(messages.length) && ( - - )} - {Boolean(mints.length) && } - {Boolean(burns.length) && } - {Boolean(returns.length) && ( - - )} - {Boolean(results.length) && ( - + {counts.calls > 0 && } + {counts.logs > 0 && } + {counts.transfers > 0 && ( + )} - {Boolean(errors.length) && ( - + {counts.messages > 0 && ( + )} + {counts.mints > 0 && } + {counts.burns > 0 && } + {counts.returns > 0 && } + {counts.results > 0 && } + {counts.errors > 0 && }
); }