From dff6fed1dea99102364903ff4431a0bf146b6b5e Mon Sep 17 00:00:00 2001 From: Alexandru Cambose Date: Fri, 26 Sep 2025 17:00:51 +0100 Subject: [PATCH 1/8] feat: start table grid --- packages/component-library/package.json | 1 + .../src/TableGrid/index.module.scss | 17 +++ .../src/TableGrid/index.stories.tsx | 106 ++++++++++++++++++ .../component-library/src/TableGrid/index.tsx | 59 ++++++++++ pnpm-lock.yaml | 31 +++++ pnpm-workspace.yaml | 1 + 6 files changed, 215 insertions(+) create mode 100644 packages/component-library/src/TableGrid/index.module.scss create mode 100644 packages/component-library/src/TableGrid/index.stories.tsx create mode 100644 packages/component-library/src/TableGrid/index.tsx diff --git a/packages/component-library/package.json b/packages/component-library/package.json index afeadc77d8..129f2cd87b 100644 --- a/packages/component-library/package.json +++ b/packages/component-library/package.json @@ -41,6 +41,7 @@ "@amplitude/plugin-autocapture-browser": "catalog:", "@axe-core/react": "catalog:", "@next/third-parties": "catalog:", + "ag-grid-react": "catalog:", "@react-hookz/web": "catalog:", "bcp-47": "catalog:", "clsx": "catalog:", diff --git a/packages/component-library/src/TableGrid/index.module.scss b/packages/component-library/src/TableGrid/index.module.scss new file mode 100644 index 0000000000..c519b6050c --- /dev/null +++ b/packages/component-library/src/TableGrid/index.module.scss @@ -0,0 +1,17 @@ +@use "../theme"; + +.tableGrid { + --ag-browser-color-scheme: light-dark(light, dark); + --ag-background-color: #{theme.color("background", "primary")}; + --ag-header-background-color: var(--ag-background-color); + --ag-foreground-color: #{theme.color("paragraph")}; + --ag-accent-color: #{theme.color("button", "outline", "background", "active")}; + --ag-wrapper-border: none; + // .ag-row-hover { + // background-color: theme.color("button","outline","background","active"); + // } +} + +.tableGrid{ + height: 100%; +} \ No newline at end of file diff --git a/packages/component-library/src/TableGrid/index.stories.tsx b/packages/component-library/src/TableGrid/index.stories.tsx new file mode 100644 index 0000000000..3cd9fd2101 --- /dev/null +++ b/packages/component-library/src/TableGrid/index.stories.tsx @@ -0,0 +1,106 @@ +import type { Meta, StoryObj } from "@storybook/react"; + +import { TableGrid as TableGridComponent } from "./index.jsx"; + +const meta = { + component: TableGridComponent, + parameters: { + layout: "padded", + }, + argTypes: { + columns: { + table: { + disable: true, + }, + }, + rows: { + table: { + disable: true, + }, + }, + renderEmptyState: { + table: { + disable: true, + }, + }, + className: { + table: { + disable: true, + }, + }, + label: { + table: { + category: "Accessibility", + }, + }, + isUpdating: { + control: "boolean", + table: { + category: "State", + }, + }, + isLoading: { + control: "boolean", + table: { + category: "State", + }, + }, + fill: { + control: "boolean", + table: { + category: "Variant", + }, + }, + rounded: { + control: "boolean", + table: { + category: "Variant", + }, + }, + dependencies: { + table: { + disable: true, + }, + }, + }, +} satisfies Meta; +export default meta; + +export const TableGrid = { + args: { + colDefs: [ + { + name: "PRICE FEED", + field: "feed", + }, + { + name: "PRICE", + field: "price", + fill: true, + loadingSkeletonWidth: 30, + }, + { + name: "CONFIDENCE", + field: "confidence", + loadingSkeletonWidth: 20, + }, + ], + rowData: [ + { + feed: "BTC/USD", + price: "$100,000", + confidence: "+/- 5%", + }, + { + feed: "ETH/USD", + price: "$1,000", + confidence: "+/- 10%", + }, + { + feed: "SOL/USD", + price: "$1,000,000,000", + confidence: "+/- 0.1%", + }, + ], + }, +} satisfies StoryObj; diff --git a/packages/component-library/src/TableGrid/index.tsx b/packages/component-library/src/TableGrid/index.tsx new file mode 100644 index 0000000000..0b01d349b2 --- /dev/null +++ b/packages/component-library/src/TableGrid/index.tsx @@ -0,0 +1,59 @@ +import { AllCommunityModule, ModuleRegistry, type ColDef } from 'ag-grid-community'; +import { AgGridReact, type CustomLoadingCellRendererProps } from 'ag-grid-react'; // React Data Grid Component +import { useCallback, useMemo, useState } from 'react'; +import styles from './index.module.scss'; +import { themeQuartz } from 'ag-grid-community'; +import type { CustomLoadingCellRendererProps } from 'ag-grid-react'; +import { Skeleton } from '../Skeleton'; + +// Register all Community features +ModuleRegistry.registerModules([AllCommunityModule,]); + +const SkeletonCellRenderer = (props) => { + console.log(props); + if (!props.value) { + return ; + } + return {props.value}; +}; + +type ExtendedColDef = ColDef & { + loadingSkeletonWidth?: number; +} + +export type TableGridProps = { + rowData: Record[]; + colDefs: ExtendedColDef[]; +} +export const TableGrid = ({ rowData, colDefs }: TableGridProps) => { + // Row Data: The data to be displayed. + // const [rowData, setRowData] = useState([ + // { make: undefined, model: "Model Y", price: 64950, electric: true }, + // { make: "Ford", model: "F-Series", price: 33850, electric: false }, + // { make: "Toyota", model: "Corolla", price: 29600, electric: false }, + // ]); + + // // Column Definitions: Defines the columns to be displayed. + // const [colDefs, setColDefs] = useState([ + // { field: "make", cellRenderer: SkeletonCellRenderer }, + // { field: "model", cellRenderer: SkeletonCellRenderer }, + // { field: "price", cellRenderer: SkeletonCellRenderer }, + // { field: "electric", cellRenderer: SkeletonCellRenderer } + // ]); + + const defaultColDef = useMemo(() => { + return { + cellRenderer: SkeletonCellRenderer, + }; + }, []); + return
+ +
+} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44619927c0..0d8e42cab9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -147,6 +147,9 @@ catalogs: '@vercel/functions': specifier: ^2.0.0 version: 2.0.0 + ag-grid-react: + specifier: ^34.2.0 + version: 34.2.0 async-cache-dedupe: specifier: ^3.0.0 version: 3.0.0 @@ -2163,6 +2166,9 @@ importers: '@react-hookz/web': specifier: 'catalog:' version: 25.1.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + ag-grid-react: + specifier: 'catalog:' + version: 34.2.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) bcp-47: specifier: 'catalog:' version: 2.1.0 @@ -12001,6 +12007,18 @@ packages: aes-js@4.0.0-beta.5: resolution: {integrity: sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==} + ag-charts-types@12.2.0: + resolution: {integrity: sha512-d2qQrQirt9wP36YW5HPuOvXsiajyiFnr1CTsoCbs02bavPDz7Lk2jHp64+waM4YKgXb3GN7gafbBI9Qgk33BmQ==} + + ag-grid-community@34.2.0: + resolution: {integrity: sha512-peS7THEMYwpIrwLQHmkRxw/TlOnddD/F5A88RqlBxf8j+WqVYRWMOOhU5TqymGcha7z2oZ8IoL9ROl3gvtdEjg==} + + ag-grid-react@34.2.0: + resolution: {integrity: sha512-dLKFw6hz75S0HLuZvtcwjm+gyiI4gXVzHEu7lWNafWAX0mb8DhogEOP5wbzAlsN6iCfi7bK/cgZImZFjenlqwg==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -38270,6 +38288,19 @@ snapshots: aes-js@4.0.0-beta.5: {} + ag-charts-types@12.2.0: {} + + ag-grid-community@34.2.0: + dependencies: + ag-charts-types: 12.2.0 + + ag-grid-react@34.2.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + dependencies: + ag-grid-community: 34.2.0 + prop-types: 15.8.1 + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + agent-base@6.0.2: dependencies: debug: 4.4.0(supports-color@8.1.1) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index ad63702af2..21ac1dba01 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -51,6 +51,7 @@ catalog: "@amplitude/analytics-browser": ^2.13.0 "@amplitude/plugin-autocapture-browser": ^1.0.0 "@axe-core/react": ^4.10.1 + "ag-grid-react": ^34.2.0 "@babel/cli": ^7.27.2 "@babel/core": ^7.27.1 "@babel/preset-typescript": ^7.27.1 From 4b43d05e1a457deb16eb759a0bd30bbcbf983c5a Mon Sep 17 00:00:00 2001 From: Alexandru Cambose Date: Mon, 29 Sep 2025 17:39:15 +0100 Subject: [PATCH 2/8] feat: forward ref --- .../.storybook/storybook.module.scss | 2 +- packages/component-library/package.json | 1 + .../component-library/src/Skeleton/index.tsx | 5 +- .../src/TableGrid/dummy-row-data.ts | 89 +++++ .../src/TableGrid/index.module.scss | 12 +- .../src/TableGrid/index.stories.tsx | 82 +++-- .../component-library/src/TableGrid/index.tsx | 150 +++++--- pnpm-lock.yaml | 326 +++++------------- pnpm-workspace.yaml | 1 + 9 files changed, 340 insertions(+), 328 deletions(-) create mode 100644 packages/component-library/src/TableGrid/dummy-row-data.ts diff --git a/packages/component-library/.storybook/storybook.module.scss b/packages/component-library/.storybook/storybook.module.scss index 4ee4766cc3..5b1a8f8469 100644 --- a/packages/component-library/.storybook/storybook.module.scss +++ b/packages/component-library/.storybook/storybook.module.scss @@ -6,7 +6,7 @@ body, } .contents { - height: 100vh; + min-height: 100vh; width: 100vw; color: theme.color("foreground"); background: theme.color("background", "primary"); diff --git a/packages/component-library/package.json b/packages/component-library/package.json index 129f2cd87b..10eb9f1f05 100644 --- a/packages/component-library/package.json +++ b/packages/component-library/package.json @@ -41,6 +41,7 @@ "@amplitude/plugin-autocapture-browser": "catalog:", "@axe-core/react": "catalog:", "@next/third-parties": "catalog:", + "ag-grid-community": "catalog:", "ag-grid-react": "catalog:", "@react-hookz/web": "catalog:", "bcp-47": "catalog:", diff --git a/packages/component-library/src/Skeleton/index.tsx b/packages/component-library/src/Skeleton/index.tsx index 06ad2ae0c8..08e6055c1a 100644 --- a/packages/component-library/src/Skeleton/index.tsx +++ b/packages/component-library/src/Skeleton/index.tsx @@ -23,10 +23,7 @@ export const Skeleton = ({ {...(width && !fill && { style: { "--skeleton-width": width } as CSSProperties })} data-fill={fill ? "" : undefined} - className={clsx( - styles.skeleton, - className, - )} + className={clsx(styles.skeleton, className)} > diff --git a/packages/component-library/src/TableGrid/dummy-row-data.ts b/packages/component-library/src/TableGrid/dummy-row-data.ts new file mode 100644 index 0000000000..2051b53b03 --- /dev/null +++ b/packages/component-library/src/TableGrid/dummy-row-data.ts @@ -0,0 +1,89 @@ +export const dummyRowData = [ + { id: 1, feed: "BTC/USD", price: "$54,392.28", confidence: "+/- 4.31%" }, + { id: 2, feed: "ETH/USD", price: "$3,129.50", confidence: "+/- 7.92%" }, + { id: 3, feed: "SOL/USD", price: "$142.11", confidence: "+/- 2.48%" }, + { id: 4, feed: "DOGE/USD", price: "$0.21", confidence: "+/- 8.17%" }, + { id: 5, feed: "BNB/USD", price: "$587.44", confidence: "+/- 3.22%" }, + { id: 6, feed: "XRP/USD", price: "$0.76", confidence: "+/- 6.43%" }, + { id: 7, feed: "ADA/USD", price: "$1.42", confidence: "+/- 9.88%" }, + { id: 8, feed: "DOT/USD", price: "$32.67", confidence: "+/- 1.76%" }, + { id: 9, feed: "MATIC/USD", price: "$2.04", confidence: "+/- 12.11%" }, + { id: 10, feed: "ATOM/USD", price: "$14.55", confidence: "+/- 4.98%" }, + + { id: 11, feed: "LTC/USD", price: "$228.77", confidence: "+/- 5.66%" }, + { id: 12, feed: "TRX/USD", price: "$0.12", confidence: "+/- 6.44%" }, + { id: 13, feed: "NEAR/USD", price: "$9.83", confidence: "+/- 7.15%" }, + { id: 14, feed: "APT/USD", price: "$11.25", confidence: "+/- 3.90%" }, + { id: 15, feed: "SUI/USD", price: "$1.77", confidence: "+/- 9.28%" }, + { id: 16, feed: "ARB/USD", price: "$1.54", confidence: "+/- 11.32%" }, + { id: 17, feed: "OP/USD", price: "$2.12", confidence: "+/- 10.44%" }, + { id: 18, feed: "FIL/USD", price: "$36.80", confidence: "+/- 2.27%" }, + { id: 19, feed: "ICP/USD", price: "$18.93", confidence: "+/- 6.15%" }, + { id: 20, feed: "BTC/USD", price: "$61,034.72", confidence: "+/- 4.08%" }, + + { id: 21, feed: "ETH/USD", price: "$2,940.18", confidence: "+/- 7.54%" }, + { id: 22, feed: "SOL/USD", price: "$153.22", confidence: "+/- 2.17%" }, + { id: 23, feed: "DOGE/USD", price: "$0.25", confidence: "+/- 11.28%" }, + { id: 24, feed: "BNB/USD", price: "$612.93", confidence: "+/- 3.10%" }, + { id: 25, feed: "XRP/USD", price: "$0.79", confidence: "+/- 5.94%" }, + { id: 26, feed: "ADA/USD", price: "$1.52", confidence: "+/- 9.45%" }, + { id: 27, feed: "DOT/USD", price: "$28.65", confidence: "+/- 1.93%" }, + { id: 28, feed: "MATIC/USD", price: "$2.14", confidence: "+/- 11.57%" }, + { id: 29, feed: "ATOM/USD", price: "$13.72", confidence: "+/- 5.36%" }, + { id: 30, feed: "LTC/USD", price: "$239.85", confidence: "+/- 4.79%" }, + + { id: 31, feed: "TRX/USD", price: "$0.11", confidence: "+/- 6.72%" }, + { id: 32, feed: "NEAR/USD", price: "$10.44", confidence: "+/- 7.09%" }, + { id: 33, feed: "APT/USD", price: "$10.85", confidence: "+/- 4.02%" }, + { id: 34, feed: "SUI/USD", price: "$1.83", confidence: "+/- 9.91%" }, + { id: 35, feed: "ARB/USD", price: "$1.61", confidence: "+/- 10.75%" }, + { id: 36, feed: "OP/USD", price: "$2.25", confidence: "+/- 8.66%" }, + { id: 37, feed: "FIL/USD", price: "$34.72", confidence: "+/- 3.48%" }, + { id: 38, feed: "ICP/USD", price: "$19.14", confidence: "+/- 5.28%" }, + { id: 39, feed: "BTC/USD", price: "$57,902.41", confidence: "+/- 3.76%" }, + { id: 40, feed: "ETH/USD", price: "$3,055.91", confidence: "+/- 7.11%" }, + + { id: 41, feed: "SOL/USD", price: "$161.83", confidence: "+/- 1.99%" }, + { id: 42, feed: "DOGE/USD", price: "$0.19", confidence: "+/- 8.74%" }, + { id: 43, feed: "BNB/USD", price: "$595.27", confidence: "+/- 3.85%" }, + { id: 44, feed: "XRP/USD", price: "$0.73", confidence: "+/- 6.20%" }, + { id: 45, feed: "ADA/USD", price: "$1.48", confidence: "+/- 10.51%" }, + { id: 46, feed: "DOT/USD", price: "$30.12", confidence: "+/- 2.09%" }, + { id: 47, feed: "MATIC/USD", price: "$2.19", confidence: "+/- 12.88%" }, + { id: 48, feed: "ATOM/USD", price: "$14.04", confidence: "+/- 4.62%" }, + { id: 49, feed: "LTC/USD", price: "$244.31", confidence: "+/- 5.12%" }, + { id: 50, feed: "TRX/USD", price: "$0.13", confidence: "+/- 6.91%" }, + + { id: 51, feed: "NEAR/USD", price: "$9.95", confidence: "+/- 6.84%" }, + { id: 52, feed: "APT/USD", price: "$11.42", confidence: "+/- 4.44%" }, + { id: 53, feed: "SUI/USD", price: "$1.79", confidence: "+/- 8.93%" }, + { id: 54, feed: "ARB/USD", price: "$1.59", confidence: "+/- 10.13%" }, + { id: 55, feed: "OP/USD", price: "$2.31", confidence: "+/- 9.20%" }, + { id: 56, feed: "FIL/USD", price: "$37.02", confidence: "+/- 2.72%" }, + { id: 57, feed: "ICP/USD", price: "$18.67", confidence: "+/- 6.01%" }, + { id: 58, feed: "BTC/USD", price: "$59,243.82", confidence: "+/- 3.92%" }, + { id: 59, feed: "ETH/USD", price: "$3,089.27", confidence: "+/- 7.47%" }, + { id: 60, feed: "SOL/USD", price: "$158.71", confidence: "+/- 2.26%" }, + + { id: 61, feed: "DOGE/USD", price: "$0.22", confidence: "+/- 8.55%" }, + { id: 62, feed: "BNB/USD", price: "$601.35", confidence: "+/- 3.69%" }, + { id: 63, feed: "XRP/USD", price: "$0.75", confidence: "+/- 5.72%" }, + { id: 64, feed: "ADA/USD", price: "$1.55", confidence: "+/- 9.68%" }, + { id: 65, feed: "DOT/USD", price: "$31.44", confidence: "+/- 1.88%" }, + { id: 66, feed: "MATIC/USD", price: "$2.23", confidence: "+/- 11.83%" }, + { id: 67, feed: "ATOM/USD", price: "$14.88", confidence: "+/- 4.34%" }, + { id: 68, feed: "LTC/USD", price: "$237.72", confidence: "+/- 5.55%" }, + { id: 69, feed: "TRX/USD", price: "$0.14", confidence: "+/- 6.63%" }, + { id: 70, feed: "NEAR/USD", price: "$10.17", confidence: "+/- 7.03%" }, + + { id: 71, feed: "APT/USD", price: "$11.07", confidence: "+/- 3.71%" }, + { id: 72, feed: "SUI/USD", price: "$1.81", confidence: "+/- 9.44%" }, + { id: 73, feed: "ARB/USD", price: "$1.63", confidence: "+/- 11.09%" }, + { id: 74, feed: "OP/USD", price: "$2.19", confidence: "+/- 10.27%" }, + { id: 75, feed: "FIL/USD", price: "$35.91", confidence: "+/- 3.18%" }, + { id: 76, feed: "ICP/USD", price: "$19.35", confidence: "+/- 5.64%" }, + { id: 77, feed: "BTC/USD", price: "$60,517.49", confidence: "+/- 4.02%" }, + { id: 78, feed: "ETH/USD", price: "$3,112.84", confidence: "+/- 7.21%" }, + { id: 79, feed: "SOL/USD", price: "$149.26", confidence: "+/- 2.51%" }, + { id: 80, feed: "DOGE/USD", price: "$0.20", confidence: "+/- 9.12%" }, +]; diff --git a/packages/component-library/src/TableGrid/index.module.scss b/packages/component-library/src/TableGrid/index.module.scss index c519b6050c..322e4f8729 100644 --- a/packages/component-library/src/TableGrid/index.module.scss +++ b/packages/component-library/src/TableGrid/index.module.scss @@ -6,12 +6,12 @@ --ag-header-background-color: var(--ag-background-color); --ag-foreground-color: #{theme.color("paragraph")}; --ag-accent-color: #{theme.color("button", "outline", "background", "active")}; + --ag-header-font-size: #{theme.font-size("xs")}; + --ag-header-font-weight: #{theme.font-weight("medium")}; + --ag-cell-font-size: #{theme.font-size("xs")}; --ag-wrapper-border: none; - // .ag-row-hover { - // background-color: theme.color("button","outline","background","active"); - // } -} + --ag-cell-text-color: #{theme.color("paragraph")}; + --ag-data-font-size: #{theme.font-size("base")}; -.tableGrid{ height: 100%; -} \ No newline at end of file +} diff --git a/packages/component-library/src/TableGrid/index.stories.tsx b/packages/component-library/src/TableGrid/index.stories.tsx index 3cd9fd2101..1fa0be3bb8 100644 --- a/packages/component-library/src/TableGrid/index.stories.tsx +++ b/packages/component-library/src/TableGrid/index.stories.tsx @@ -1,5 +1,8 @@ +import { ChartLine } from "@phosphor-icons/react/dist/ssr/ChartLine"; import type { Meta, StoryObj } from "@storybook/react"; +import { Badge } from "../Badge"; +import { dummyRowData } from "./dummy-row-data"; import { TableGrid as TableGridComponent } from "./index.jsx"; const meta = { @@ -66,41 +69,52 @@ const meta = { } satisfies Meta; export default meta; +const args = { + colDefs: [ + { + headerName: "ID", + field: "id", + }, + { + headerName: "PRICE FEED", + field: "feed", + }, + { + headerName: "PRICE", + field: "price", + flex: 2, + loadingSkeletonWidth: 30, + }, + { + headerName: "CONFIDENCE", + field: "confidence", + loadingSkeletonWidth: 20, + }, + ], + rowData: dummyRowData, +}; + export const TableGrid = { + args, +} satisfies StoryObj; + +export const PriceFeedsCard = { + render: (props) => { + return ; + }, args: { - colDefs: [ - { - name: "PRICE FEED", - field: "feed", - }, - { - name: "PRICE", - field: "price", - fill: true, - loadingSkeletonWidth: 30, - }, - { - name: "CONFIDENCE", - field: "confidence", - loadingSkeletonWidth: 20, - }, - ], - rowData: [ - { - feed: "BTC/USD", - price: "$100,000", - confidence: "+/- 5%", - }, - { - feed: "ETH/USD", - price: "$1,000", - confidence: "+/- 10%", - }, - { - feed: "SOL/USD", - price: "$1,000,000,000", - confidence: "+/- 0.1%", - }, - ], + ...args, + pagination: true, + cardProps: { + icon: , + title: ( + <> + Price Feeds + + {args.rowData.length} + + + ), + }, }, } satisfies StoryObj; diff --git a/packages/component-library/src/TableGrid/index.tsx b/packages/component-library/src/TableGrid/index.tsx index 0b01d349b2..ba371bfcfc 100644 --- a/packages/component-library/src/TableGrid/index.tsx +++ b/packages/component-library/src/TableGrid/index.tsx @@ -1,59 +1,117 @@ -import { AllCommunityModule, ModuleRegistry, type ColDef } from 'ag-grid-community'; -import { AgGridReact, type CustomLoadingCellRendererProps } from 'ag-grid-react'; // React Data Grid Component -import { useCallback, useMemo, useState } from 'react'; -import styles from './index.module.scss'; -import { themeQuartz } from 'ag-grid-community'; -import type { CustomLoadingCellRendererProps } from 'ag-grid-react'; -import { Skeleton } from '../Skeleton'; +import type { ColDef } from "ag-grid-community"; +import { + AllCommunityModule, + ModuleRegistry, + themeQuartz, +} from "ag-grid-community"; +import type { AgGridReactProps } from "ag-grid-react"; // React Data Grid Component +import { AgGridReact } from "ag-grid-react"; +import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from "react"; + +import type { Props as CardProps } from "../Card"; +import { Card } from "../Card"; +import { Paginator } from "../Paginator"; +import { Skeleton } from "../Skeleton"; +import styles from "./index.module.scss"; // Register all Community features -ModuleRegistry.registerModules([AllCommunityModule,]); +ModuleRegistry.registerModules([AllCommunityModule]); -const SkeletonCellRenderer = (props) => { - console.log(props); +const SkeletonCellRenderer = (props: { value?: unknown }) => { if (!props.value) { return ; } return {props.value}; }; -type ExtendedColDef = ColDef & { - loadingSkeletonWidth?: number; -} - -export type TableGridProps = { - rowData: Record[]; - colDefs: ExtendedColDef[]; -} -export const TableGrid = ({ rowData, colDefs }: TableGridProps) => { - // Row Data: The data to be displayed. - // const [rowData, setRowData] = useState([ - // { make: undefined, model: "Model Y", price: 64950, electric: true }, - // { make: "Ford", model: "F-Series", price: 33850, electric: false }, - // { make: "Toyota", model: "Corolla", price: 29600, electric: false }, - // ]); - - // // Column Definitions: Defines the columns to be displayed. - // const [colDefs, setColDefs] = useState([ - // { field: "make", cellRenderer: SkeletonCellRenderer }, - // { field: "model", cellRenderer: SkeletonCellRenderer }, - // { field: "price", cellRenderer: SkeletonCellRenderer }, - // { field: "electric", cellRenderer: SkeletonCellRenderer } - // ]); - - const defaultColDef = useMemo(() => { +type ExtendedColDef = ColDef & { + loadingSkeletonWidth?: number; +}; + +export type TableGridProps> = { + rowData: TData[]; + colDefs: ExtendedColDef[]; + isLoading?: boolean; + cardProps?: Omit, "children" | "footer"> & { nonInteractive?: true }; + pagination?: boolean; +} & Omit, "rowData" | "defaultColDef" | "columnDefs">; + +export const TableGrid = forwardRef(>({ + rowData, + colDefs, + isLoading, + cardProps, + pagination, + ...props +}: TableGridProps, ref: React.Ref>) => { + const gridRef = useRef>(null); + const [pageSize, setPageSize] = useState(10); + const [currentPage, setCurrentPage] = useState(1); + const [totalPages, setTotalPages] = useState(1); + useImperativeHandle(ref, () => gridRef.current); + + const defaultColDef = useMemo(() => { return { cellRenderer: SkeletonCellRenderer, + flex: 1, }; }, []); - return
- -
-} \ No newline at end of file + + const emptyRowData = useMemo(() => { + // create dummy row matching the shape of colDefs + return [colDefs.map(() => ({ value: undefined }))]; + }, [colDefs]); + + const onPaginationChanged = useCallback(() => { + if (gridRef.current?.api) { + const api = gridRef.current.api; + setPageSize(api.paginationGetPageSize()); + setCurrentPage(api.paginationGetCurrentPage() + 1); + setTotalPages(api.paginationGetTotalPages()); + } + }, []); + + const onPageChange = useCallback((newPage: number) => { + gridRef.current?.api.paginationGoToPage(newPage - 1); + }, []); + + const tableGrid = ( + + className={styles.tableGrid} + ref={gridRef} + rowData={isLoading ? emptyRowData : rowData} + defaultColDef={defaultColDef} + columnDefs={colDefs} + theme={themeQuartz} + domLayout="autoHeight" + pagination={pagination ?? false} + paginationPageSize={pageSize} + suppressPaginationPanel + onPaginationChanged={onPaginationChanged} + {...props} + /> + ); + if (!cardProps && !pagination) { + return tableGrid; + } + return ( + + ) + } + {...cardProps} + > + {tableGrid} + + ); +}); + +TableGrid.displayName = "TableGrid"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fc743297a4..65185cd5df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -147,6 +147,9 @@ catalogs: '@vercel/functions': specifier: ^2.0.0 version: 2.0.0 + ag-grid-community: + specifier: ^34.2.0 + version: 34.2.0 ag-grid-react: specifier: ^34.2.0 version: 34.2.0 @@ -1307,7 +1310,7 @@ importers: version: 0.9.36(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bs58@5.0.0)(react-dom@19.1.0(react@19.1.0))(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(react@19.1.0) '@solana/wallet-adapter-wallets': specifier: 'catalog:' - version: 0.19.33(@babel/runtime@7.27.0)(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bs58@5.0.0)(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(ioredis@5.7.0)(react-dom@19.1.0(react@19.1.0))(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(react@19.1.0)(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.24.4) + version: 0.19.33(@babel/runtime@7.27.0)(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bs58@5.0.0)(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-dom@19.1.0(react@19.1.0))(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(react@19.1.0)(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.24.4) '@solana/web3.js': specifier: 'catalog:' version: 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) @@ -1887,7 +1890,7 @@ importers: version: 0.9.36(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(react-dom@19.1.0(react@19.1.0))(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(react@19.1.0) '@solana/wallet-adapter-wallets': specifier: 'catalog:' - version: 0.19.33(@babel/runtime@7.27.0)(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(ioredis@5.7.0)(react-dom@19.1.0(react@19.1.0))(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(react@19.1.0)(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.24.2) + version: 0.19.33(@babel/runtime@7.27.0)(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-dom@19.1.0(react@19.1.0))(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(react@19.1.0)(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.24.2) '@solana/web3.js': specifier: ^1.73.0 version: 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) @@ -2169,6 +2172,9 @@ importers: '@react-hookz/web': specifier: 'catalog:' version: 25.1.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + ag-grid-community: + specifier: 'catalog:' + version: 34.2.0 ag-grid-react: specifier: 'catalog:' version: 34.2.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -26740,17 +26746,6 @@ snapshots: '@ethersproject/properties': 5.8.0 '@ethersproject/strings': 5.8.0 - '@everstake/wallet-sdk-solana@2.0.9(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana-program/compute-budget': 0.6.1(@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/stake': 0.1.0(@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/system': 0.6.2(@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana/web3.js': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - typescript - - ws - '@everstake/wallet-sdk-solana@2.0.9(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana-program/compute-budget': 0.6.1(@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) @@ -28264,12 +28259,12 @@ snapshots: '@types/yargs': 17.0.33 chalk: 4.1.2 - '@jnwng/walletconnect-solana@0.2.0(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)': + '@jnwng/walletconnect-solana@0.2.0(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)': dependencies: '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) '@walletconnect/qrcode-modal': 1.8.0 - '@walletconnect/sign-client': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) - '@walletconnect/utils': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/sign-client': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/utils': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) bs58: 5.0.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -28295,11 +28290,11 @@ snapshots: - utf-8-validate - zod - '@jnwng/walletconnect-solana@0.2.0(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@jnwng/walletconnect-solana@0.2.0(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) '@walletconnect/qrcode-modal': 1.8.0 - '@walletconnect/sign-client': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/sign-client': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/utils': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4) bs58: 5.0.0 transitivePeerDependencies: @@ -32966,60 +32961,31 @@ snapshots: - react - react-native - '@solana-program/compute-budget@0.6.1(@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': - dependencies: - '@solana/web3.js': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/compute-budget@0.6.1(@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': dependencies: '@solana/web3.js': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/compute-budget@0.7.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': - dependencies: - '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/compute-budget@0.7.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': dependencies: '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/stake@0.1.0(@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': - dependencies: - '@solana/web3.js': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/stake@0.1.0(@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': dependencies: '@solana/web3.js': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/system@0.6.2(@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': - dependencies: - '@solana/web3.js': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/system@0.6.2(@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': dependencies: '@solana/web3.js': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/system@0.7.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': - dependencies: - '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/system@0.7.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': dependencies: '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/token-2022@0.4.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))': - dependencies: - '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/sysvars': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana-program/token-2022@0.4.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))': dependencies: '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@solana/sysvars': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana-program/token@0.5.1(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': - dependencies: - '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/token@0.5.1(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': dependencies: '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) @@ -33359,31 +33325,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/accounts': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/addresses': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/codecs': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/errors': 2.1.0(typescript@5.8.2) - '@solana/functional': 2.1.0(typescript@5.8.2) - '@solana/instructions': 2.1.0(typescript@5.8.2) - '@solana/keys': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/programs': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/rpc': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/rpc-parsed-types': 2.1.0(typescript@5.8.2) - '@solana/rpc-spec-types': 2.1.0(typescript@5.8.2) - '@solana/rpc-subscriptions': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/rpc-types': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/signers': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/sysvars': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/transaction-confirmation': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/transaction-messages': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/transactions': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - typescript: 5.8.2 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - ws - '@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/accounts': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) @@ -33570,15 +33511,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/rpc-subscriptions-channel-websocket@2.0.0(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/errors': 2.0.0(typescript@5.8.2) - '@solana/functional': 2.0.0(typescript@5.8.2) - '@solana/rpc-subscriptions-spec': 2.0.0(typescript@5.8.2) - '@solana/subscribable': 2.0.0(typescript@5.8.2) - typescript: 5.8.2 - ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) - '@solana/rpc-subscriptions-channel-websocket@2.0.0(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/errors': 2.0.0(typescript@5.8.2) @@ -33588,15 +33520,6 @@ snapshots: typescript: 5.8.2 ws: 8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10) - '@solana/rpc-subscriptions-channel-websocket@2.1.0(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/errors': 2.1.0(typescript@5.8.2) - '@solana/functional': 2.1.0(typescript@5.8.2) - '@solana/rpc-subscriptions-spec': 2.1.0(typescript@5.8.2) - '@solana/subscribable': 2.1.0(typescript@5.8.2) - typescript: 5.8.2 - ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) - '@solana/rpc-subscriptions-channel-websocket@2.1.0(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/errors': 2.1.0(typescript@5.8.2) @@ -33622,24 +33545,6 @@ snapshots: '@solana/subscribable': 2.1.0(typescript@5.8.2) typescript: 5.8.2 - '@solana/rpc-subscriptions@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/errors': 2.0.0(typescript@5.8.2) - '@solana/fast-stable-stringify': 2.0.0(typescript@5.8.2) - '@solana/functional': 2.0.0(typescript@5.8.2) - '@solana/promises': 2.0.0(typescript@5.8.2) - '@solana/rpc-spec-types': 2.0.0(typescript@5.8.2) - '@solana/rpc-subscriptions-api': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/rpc-subscriptions-channel-websocket': 2.0.0(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/rpc-subscriptions-spec': 2.0.0(typescript@5.8.2) - '@solana/rpc-transformers': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/rpc-types': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/subscribable': 2.0.0(typescript@5.8.2) - typescript: 5.8.2 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - ws - '@solana/rpc-subscriptions@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/errors': 2.0.0(typescript@5.8.2) @@ -33658,24 +33563,6 @@ snapshots: - fastestsmallesttextencoderdecoder - ws - '@solana/rpc-subscriptions@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/errors': 2.1.0(typescript@5.8.2) - '@solana/fast-stable-stringify': 2.1.0(typescript@5.8.2) - '@solana/functional': 2.1.0(typescript@5.8.2) - '@solana/promises': 2.1.0(typescript@5.8.2) - '@solana/rpc-spec-types': 2.1.0(typescript@5.8.2) - '@solana/rpc-subscriptions-api': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/rpc-subscriptions-channel-websocket': 2.1.0(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/rpc-subscriptions-spec': 2.1.0(typescript@5.8.2) - '@solana/rpc-transformers': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/rpc-types': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/subscribable': 2.1.0(typescript@5.8.2) - typescript: 5.8.2 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - ws - '@solana/rpc-subscriptions@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/errors': 2.1.0(typescript@5.8.2) @@ -33946,23 +33833,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/transaction-confirmation@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/addresses': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/codecs-strings': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/errors': 2.0.0(typescript@5.8.2) - '@solana/keys': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/promises': 2.0.0(typescript@5.8.2) - '@solana/rpc': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/rpc-subscriptions': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/rpc-types': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/transaction-messages': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/transactions': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - typescript: 5.8.2 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - ws - '@solana/transaction-confirmation@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/addresses': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) @@ -33980,23 +33850,6 @@ snapshots: - fastestsmallesttextencoderdecoder - ws - '@solana/transaction-confirmation@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/addresses': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/codecs-strings': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/errors': 2.1.0(typescript@5.8.2) - '@solana/keys': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/promises': 2.1.0(typescript@5.8.2) - '@solana/rpc': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/rpc-subscriptions': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/rpc-types': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/transaction-messages': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/transactions': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - typescript: 5.8.2 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - ws - '@solana/transaction-confirmation@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/addresses': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) @@ -34370,11 +34223,11 @@ snapshots: - utf-8-validate - ws - '@solana/wallet-adapter-trezor@0.1.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + '@solana/wallet-adapter-trezor@0.1.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/wallet-adapter-base': 0.9.24(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) - '@trezor/connect-web': 9.5.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@trezor/connect-web': 9.5.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) buffer: 6.0.3 transitivePeerDependencies: - '@solana/sysvars' @@ -34403,9 +34256,9 @@ snapshots: '@solana/wallet-standard-util': 1.1.2 '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) - '@solana/wallet-adapter-walletconnect@0.1.17(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)': + '@solana/wallet-adapter-walletconnect@0.1.17(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)': dependencies: - '@jnwng/walletconnect-solana': 0.2.0(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) + '@jnwng/walletconnect-solana': 0.2.0(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) '@solana/wallet-adapter-base': 0.9.24(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -34432,9 +34285,9 @@ snapshots: - utf-8-validate - zod - '@solana/wallet-adapter-walletconnect@0.1.17(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@solana/wallet-adapter-walletconnect@0.1.17(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: - '@jnwng/walletconnect-solana': 0.2.0(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4) + '@jnwng/walletconnect-solana': 0.2.0(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4) '@solana/wallet-adapter-base': 0.9.24(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -34461,7 +34314,7 @@ snapshots: - utf-8-validate - zod - '@solana/wallet-adapter-wallets@0.19.33(@babel/runtime@7.27.0)(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(ioredis@5.7.0)(react-dom@19.1.0(react@19.1.0))(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(react@19.1.0)(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.24.2)': + '@solana/wallet-adapter-wallets@0.19.33(@babel/runtime@7.27.0)(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-dom@19.1.0(react@19.1.0))(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(react@19.1.0)(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.24.2)': dependencies: '@solana/wallet-adapter-alpha': 0.1.11(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/wallet-adapter-avana': 0.1.14(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) @@ -34497,7 +34350,7 @@ snapshots: '@solana/wallet-adapter-trezor': 0.1.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@solana/wallet-adapter-trust': 0.1.14(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/wallet-adapter-unsafe-burner': 0.1.8(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) - '@solana/wallet-adapter-walletconnect': 0.1.17(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) + '@solana/wallet-adapter-walletconnect': 0.1.17(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) '@solana/wallet-adapter-xdefi': 0.1.8(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -34538,7 +34391,7 @@ snapshots: - ws - zod - '@solana/wallet-adapter-wallets@0.19.33(@babel/runtime@7.27.0)(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bs58@5.0.0)(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(ioredis@5.7.0)(react-dom@19.1.0(react@19.1.0))(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(react@19.1.0)(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.24.4)': + '@solana/wallet-adapter-wallets@0.19.33(@babel/runtime@7.27.0)(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bs58@5.0.0)(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-dom@19.1.0(react@19.1.0))(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(react@19.1.0)(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.24.4)': dependencies: '@solana/wallet-adapter-alpha': 0.1.11(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/wallet-adapter-avana': 0.1.14(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) @@ -34571,10 +34424,10 @@ snapshots: '@solana/wallet-adapter-tokenary': 0.1.13(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/wallet-adapter-tokenpocket': 0.4.20(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/wallet-adapter-torus': 0.11.29(@babel/runtime@7.27.0)(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) - '@solana/wallet-adapter-trezor': 0.1.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@solana/wallet-adapter-trezor': 0.1.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@solana/wallet-adapter-trust': 0.1.14(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/wallet-adapter-unsafe-burner': 0.1.8(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) - '@solana/wallet-adapter-walletconnect': 0.1.17(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4) + '@solana/wallet-adapter-walletconnect': 0.1.17(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4) '@solana/wallet-adapter-xdefi': 0.1.8(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -34797,31 +34650,6 @@ snapshots: - encoding - utf-8-validate - '@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/accounts': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/addresses': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/codecs': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/errors': 2.0.0(typescript@5.8.2) - '@solana/functional': 2.0.0(typescript@5.8.2) - '@solana/instructions': 2.0.0(typescript@5.8.2) - '@solana/keys': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/programs': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/rpc': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/rpc-parsed-types': 2.0.0(typescript@5.8.2) - '@solana/rpc-spec-types': 2.0.0(typescript@5.8.2) - '@solana/rpc-subscriptions': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/rpc-types': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/signers': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/sysvars': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/transaction-confirmation': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/transaction-messages': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana/transactions': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - typescript: 5.8.2 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - ws - '@solana/web3.js@2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/accounts': 2.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) @@ -35771,17 +35599,6 @@ snapshots: - expo-localization - react-native - '@trezor/blockchain-link-types@1.3.3(fastestsmallesttextencoderdecoder@1.0.22)(tslib@2.8.1)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@trezor/type-utils': 1.1.5 - '@trezor/utxo-lib': 2.3.3(tslib@2.8.1) - tslib: 2.8.1 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - typescript - - ws - '@trezor/blockchain-link-types@1.3.3(fastestsmallesttextencoderdecoder@1.0.22)(tslib@2.8.1)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) @@ -35844,13 +35661,13 @@ snapshots: - utf-8-validate - ws - '@trezor/blockchain-link@2.4.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + '@trezor/blockchain-link@2.4.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: - '@everstake/wallet-sdk-solana': 2.0.9(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/token': 0.5.1(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/token-2022': 0.4.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)) - '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@trezor/blockchain-link-types': 1.3.3(fastestsmallesttextencoderdecoder@1.0.22)(tslib@2.8.1)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@everstake/wallet-sdk-solana': 2.0.9(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@solana-program/token': 0.5.1(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) + '@solana-program/token-2022': 0.4.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)) + '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@trezor/blockchain-link-types': 1.3.3(fastestsmallesttextencoderdecoder@1.0.22)(tslib@2.8.1)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@trezor/blockchain-link-utils': 1.3.3(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1) '@trezor/env-utils': 1.3.2(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1) '@trezor/utils': 9.3.3(tslib@2.8.1) @@ -35930,9 +35747,9 @@ snapshots: - utf-8-validate - ws - '@trezor/connect-web@9.5.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + '@trezor/connect-web@9.5.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: - '@trezor/connect': 9.5.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@trezor/connect': 9.5.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@trezor/connect-common': 0.3.3(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1) '@trezor/utils': 9.3.3(tslib@2.8.1) tslib: 2.8.1 @@ -35993,7 +35810,7 @@ snapshots: - utf-8-validate - ws - '@trezor/connect@9.5.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + '@trezor/connect@9.5.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@ethereumjs/common': 4.4.0 '@ethereumjs/tx': 5.4.0 @@ -36001,13 +35818,13 @@ snapshots: '@mobily/ts-belt': 3.13.1 '@noble/hashes': 1.8.0 '@scure/bip39': 1.6.0 - '@solana-program/compute-budget': 0.7.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/system': 0.7.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/token': 0.5.1(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/token-2022': 0.4.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)) - '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@trezor/blockchain-link': 2.4.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@trezor/blockchain-link-types': 1.3.3(fastestsmallesttextencoderdecoder@1.0.22)(tslib@2.8.1)(typescript@5.8.2)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@solana-program/compute-budget': 0.7.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) + '@solana-program/system': 0.7.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) + '@solana-program/token': 0.5.1(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) + '@solana-program/token-2022': 0.4.0(@solana/kit@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)) + '@solana/kit': 2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@trezor/blockchain-link': 2.4.3(@solana/sysvars@2.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@trezor/blockchain-link-types': 1.3.3(fastestsmallesttextencoderdecoder@1.0.22)(tslib@2.8.1)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@trezor/blockchain-link-utils': 1.3.3(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1) '@trezor/connect-analytics': 1.3.2(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1) '@trezor/connect-common': 0.3.3(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))(tslib@2.8.1) @@ -37546,21 +37363,21 @@ snapshots: '@walletconnect/window-metadata': 1.0.0 detect-browser: 5.2.0 - '@walletconnect/core@2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)': + '@walletconnect/core@2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)': dependencies: '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-provider': 1.0.14 '@walletconnect/jsonrpc-types': 1.0.4 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/jsonrpc-ws-connection': 1.0.16(bufferutil@4.0.9)(utf-8-validate@5.0.10) - '@walletconnect/keyvaluestorage': 1.1.1(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(ioredis@5.7.0) + '@walletconnect/keyvaluestorage': 1.1.1(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))) '@walletconnect/logger': 2.1.2 '@walletconnect/relay-api': 1.0.11 '@walletconnect/relay-auth': 1.1.0 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(ioredis@5.7.0) - '@walletconnect/utils': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/types': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))) + '@walletconnect/utils': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) '@walletconnect/window-getters': 1.0.1 es-toolkit: 1.33.0 events: 3.3.0 @@ -37723,7 +37540,7 @@ snapshots: - bufferutil - utf-8-validate - '@walletconnect/keyvaluestorage@1.1.1(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(ioredis@5.7.0)': + '@walletconnect/keyvaluestorage@1.1.1(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))': dependencies: '@walletconnect/safe-json': 1.0.2 idb-keyval: 6.2.1 @@ -37834,16 +37651,16 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/sign-client@2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)': + '@walletconnect/sign-client@2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)': dependencies: - '@walletconnect/core': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/core': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.1.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(ioredis@5.7.0) - '@walletconnect/utils': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) + '@walletconnect/types': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))) + '@walletconnect/utils': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2) events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -37904,18 +37721,53 @@ snapshots: - utf-8-validate - zod + '@walletconnect/sign-client@2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4)': + dependencies: + '@walletconnect/core': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/events': 1.0.1 + '@walletconnect/heartbeat': 1.2.2 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/logger': 2.1.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(ioredis@5.7.0) + '@walletconnect/utils': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.27.1)(@babel/preset-env@7.26.9(@babel/core@7.27.1))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.4) + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - typescript + - uploadthing + - utf-8-validate + - zod + '@walletconnect/time@1.0.2': dependencies: tslib: 1.14.1 '@walletconnect/types@1.8.0': {} - '@walletconnect/types@2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(ioredis@5.7.0)': + '@walletconnect/types@2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-types': 1.0.4 - '@walletconnect/keyvaluestorage': 1.1.1(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(ioredis@5.7.0) + '@walletconnect/keyvaluestorage': 1.1.1(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))) '@walletconnect/logger': 2.1.2 events: 3.3.0 transitivePeerDependencies: @@ -38005,18 +37857,18 @@ snapshots: - utf-8-validate - zod - '@walletconnect/utils@2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(ioredis@5.7.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)': + '@walletconnect/utils@2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)': dependencies: '@noble/ciphers': 1.2.1 '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/keyvaluestorage': 1.1.1(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(ioredis@5.7.0) + '@walletconnect/keyvaluestorage': 1.1.1(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))) '@walletconnect/relay-api': 1.0.11 '@walletconnect/relay-auth': 1.1.0 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)))(ioredis@5.7.0) + '@walletconnect/types': 2.19.2(@react-native-async-storage/async-storage@1.24.0(react-native@0.78.2(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@19.1.0)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10))) '@walletconnect/window-getters': 1.0.1 '@walletconnect/window-metadata': 1.0.1 bs58: 6.0.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 21ac1dba01..583fe85248 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -51,6 +51,7 @@ catalog: "@amplitude/analytics-browser": ^2.13.0 "@amplitude/plugin-autocapture-browser": ^1.0.0 "@axe-core/react": ^4.10.1 + "ag-grid-community": ^34.2.0 "ag-grid-react": ^34.2.0 "@babel/cli": ^7.27.2 "@babel/core": ^7.27.1 From 8b1cd3b16b01179ab95c651390ed5d139e0ff5da Mon Sep 17 00:00:00 2001 From: Alexandru Cambose Date: Wed, 1 Oct 2025 16:29:59 +0100 Subject: [PATCH 3/8] feat: more progress on responsive --- .../src/TableGrid/dummy-row-data.ts | 160 +++++++++--------- .../TableGrid/full-width-cell-renderer.tsx | 11 ++ .../src/TableGrid/index.stories.tsx | 54 +++--- .../component-library/src/TableGrid/index.tsx | 67 ++++---- .../src/TableGrid/table-grid-props.ts | 18 ++ .../src/useMediaQuery/index.module.scss | 9 + .../src/useMediaQuery/index.ts | 40 +++++ 7 files changed, 216 insertions(+), 143 deletions(-) create mode 100644 packages/component-library/src/TableGrid/full-width-cell-renderer.tsx create mode 100644 packages/component-library/src/TableGrid/table-grid-props.ts create mode 100644 packages/component-library/src/useMediaQuery/index.module.scss create mode 100644 packages/component-library/src/useMediaQuery/index.ts diff --git a/packages/component-library/src/TableGrid/dummy-row-data.ts b/packages/component-library/src/TableGrid/dummy-row-data.ts index 2051b53b03..818e4dce4c 100644 --- a/packages/component-library/src/TableGrid/dummy-row-data.ts +++ b/packages/component-library/src/TableGrid/dummy-row-data.ts @@ -1,89 +1,89 @@ export const dummyRowData = [ - { id: 1, feed: "BTC/USD", price: "$54,392.28", confidence: "+/- 4.31%" }, - { id: 2, feed: "ETH/USD", price: "$3,129.50", confidence: "+/- 7.92%" }, - { id: 3, feed: "SOL/USD", price: "$142.11", confidence: "+/- 2.48%" }, - { id: 4, feed: "DOGE/USD", price: "$0.21", confidence: "+/- 8.17%" }, - { id: 5, feed: "BNB/USD", price: "$587.44", confidence: "+/- 3.22%" }, - { id: 6, feed: "XRP/USD", price: "$0.76", confidence: "+/- 6.43%" }, - { id: 7, feed: "ADA/USD", price: "$1.42", confidence: "+/- 9.88%" }, - { id: 8, feed: "DOT/USD", price: "$32.67", confidence: "+/- 1.76%" }, - { id: 9, feed: "MATIC/USD", price: "$2.04", confidence: "+/- 12.11%" }, - { id: 10, feed: "ATOM/USD", price: "$14.55", confidence: "+/- 4.98%" }, + { id: 1, feed: "BTC/USD", price: 54_392.28, confidence: 4.31 }, + { id: 2, feed: "ETH/USD", price: 3129.5, confidence: 7.92 }, + { id: 3, feed: "SOL/USD", price: 142.11, confidence: 2.48 }, + { id: 4, feed: "DOGE/USD", price: 0.21, confidence: 8.17 }, + { id: 5, feed: "BNB/USD", price: 587.44, confidence: 3.22 }, + { id: 6, feed: "XRP/USD", price: 0.76, confidence: 6.43 }, + { id: 7, feed: "ADA/USD", price: 1.42, confidence: 9.88 }, + { id: 8, feed: "DOT/USD", price: 32.67, confidence: 1.76 }, + { id: 9, feed: "MATIC/USD", price: 2.04, confidence: 12.11 }, + { id: 10, feed: "ATOM/USD", price: 14.55, confidence: 4.98 }, - { id: 11, feed: "LTC/USD", price: "$228.77", confidence: "+/- 5.66%" }, - { id: 12, feed: "TRX/USD", price: "$0.12", confidence: "+/- 6.44%" }, - { id: 13, feed: "NEAR/USD", price: "$9.83", confidence: "+/- 7.15%" }, - { id: 14, feed: "APT/USD", price: "$11.25", confidence: "+/- 3.90%" }, - { id: 15, feed: "SUI/USD", price: "$1.77", confidence: "+/- 9.28%" }, - { id: 16, feed: "ARB/USD", price: "$1.54", confidence: "+/- 11.32%" }, - { id: 17, feed: "OP/USD", price: "$2.12", confidence: "+/- 10.44%" }, - { id: 18, feed: "FIL/USD", price: "$36.80", confidence: "+/- 2.27%" }, - { id: 19, feed: "ICP/USD", price: "$18.93", confidence: "+/- 6.15%" }, - { id: 20, feed: "BTC/USD", price: "$61,034.72", confidence: "+/- 4.08%" }, + { id: 11, feed: "LTC/USD", price: 228.77, confidence: 5.66 }, + { id: 12, feed: "TRX/USD", price: 0.12, confidence: 6.44 }, + { id: 13, feed: "NEAR/USD", price: 9.83, confidence: 7.15 }, + { id: 14, feed: "APT/USD", price: 11.25, confidence: 3.90 }, + { id: 15, feed: "SUI/USD", price: 1.77, confidence: 9.28 }, + { id: 16, feed: "ARB/USD", price: 1.54, confidence: 11.32 }, + { id: 17, feed: "OP/USD", price: 2.12, confidence: 10.44 }, + { id: 18, feed: "FIL/USD", price: 36.8, confidence: 2.27 }, + { id: 19, feed: "ICP/USD", price: 18.93, confidence: 6.15 }, + { id: 20, feed: "BTC/USD", price: 61_034.72, confidence: 4.08 }, - { id: 21, feed: "ETH/USD", price: "$2,940.18", confidence: "+/- 7.54%" }, - { id: 22, feed: "SOL/USD", price: "$153.22", confidence: "+/- 2.17%" }, - { id: 23, feed: "DOGE/USD", price: "$0.25", confidence: "+/- 11.28%" }, - { id: 24, feed: "BNB/USD", price: "$612.93", confidence: "+/- 3.10%" }, - { id: 25, feed: "XRP/USD", price: "$0.79", confidence: "+/- 5.94%" }, - { id: 26, feed: "ADA/USD", price: "$1.52", confidence: "+/- 9.45%" }, - { id: 27, feed: "DOT/USD", price: "$28.65", confidence: "+/- 1.93%" }, - { id: 28, feed: "MATIC/USD", price: "$2.14", confidence: "+/- 11.57%" }, - { id: 29, feed: "ATOM/USD", price: "$13.72", confidence: "+/- 5.36%" }, - { id: 30, feed: "LTC/USD", price: "$239.85", confidence: "+/- 4.79%" }, + { id: 21, feed: "ETH/USD", price: 2940.18, confidence: 7.54 }, + { id: 22, feed: "SOL/USD", price: 153.22, confidence: 2.17 }, + { id: 23, feed: "DOGE/USD", price: 0.25, confidence: 11.28 }, + { id: 24, feed: "BNB/USD", price: 612.93, confidence: 3.10 }, + { id: 25, feed: "XRP/USD", price: 0.79, confidence: 5.94 }, + { id: 26, feed: "ADA/USD", price: 1.52, confidence: 9.45 }, + { id: 27, feed: "DOT/USD", price: 28.65, confidence: 1.93 }, + { id: 28, feed: "MATIC/USD", price: 2.14, confidence: 11.57 }, + { id: 29, feed: "ATOM/USD", price: 13.72, confidence: 5.36 }, + { id: 30, feed: "LTC/USD", price: 239.85, confidence: 4.79 }, - { id: 31, feed: "TRX/USD", price: "$0.11", confidence: "+/- 6.72%" }, - { id: 32, feed: "NEAR/USD", price: "$10.44", confidence: "+/- 7.09%" }, - { id: 33, feed: "APT/USD", price: "$10.85", confidence: "+/- 4.02%" }, - { id: 34, feed: "SUI/USD", price: "$1.83", confidence: "+/- 9.91%" }, - { id: 35, feed: "ARB/USD", price: "$1.61", confidence: "+/- 10.75%" }, - { id: 36, feed: "OP/USD", price: "$2.25", confidence: "+/- 8.66%" }, - { id: 37, feed: "FIL/USD", price: "$34.72", confidence: "+/- 3.48%" }, - { id: 38, feed: "ICP/USD", price: "$19.14", confidence: "+/- 5.28%" }, - { id: 39, feed: "BTC/USD", price: "$57,902.41", confidence: "+/- 3.76%" }, - { id: 40, feed: "ETH/USD", price: "$3,055.91", confidence: "+/- 7.11%" }, + { id: 31, feed: "TRX/USD", price: 0.11, confidence: 6.72 }, + { id: 32, feed: "NEAR/USD", price: 10.44, confidence: 7.09 }, + { id: 33, feed: "APT/USD", price: 10.85, confidence: 4.02 }, + { id: 34, feed: "SUI/USD", price: 1.83, confidence: 9.91 }, + { id: 35, feed: "ARB/USD", price: 1.61, confidence: 10.75 }, + { id: 36, feed: "OP/USD", price: 2.25, confidence: 8.66 }, + { id: 37, feed: "FIL/USD", price: 34.72, confidence: 3.48 }, + { id: 38, feed: "ICP/USD", price: 19.14, confidence: 5.28 }, + { id: 39, feed: "BTC/USD", price: 57_902.41, confidence: 3.76 }, + { id: 40, feed: "ETH/USD", price: 3055.91, confidence: 7.11 }, - { id: 41, feed: "SOL/USD", price: "$161.83", confidence: "+/- 1.99%" }, - { id: 42, feed: "DOGE/USD", price: "$0.19", confidence: "+/- 8.74%" }, - { id: 43, feed: "BNB/USD", price: "$595.27", confidence: "+/- 3.85%" }, - { id: 44, feed: "XRP/USD", price: "$0.73", confidence: "+/- 6.20%" }, - { id: 45, feed: "ADA/USD", price: "$1.48", confidence: "+/- 10.51%" }, - { id: 46, feed: "DOT/USD", price: "$30.12", confidence: "+/- 2.09%" }, - { id: 47, feed: "MATIC/USD", price: "$2.19", confidence: "+/- 12.88%" }, - { id: 48, feed: "ATOM/USD", price: "$14.04", confidence: "+/- 4.62%" }, - { id: 49, feed: "LTC/USD", price: "$244.31", confidence: "+/- 5.12%" }, - { id: 50, feed: "TRX/USD", price: "$0.13", confidence: "+/- 6.91%" }, + { id: 41, feed: "SOL/USD", price: 161.83, confidence: 1.99 }, + { id: 42, feed: "DOGE/USD", price: 0.19, confidence: 8.74 }, + { id: 43, feed: "BNB/USD", price: 595.27, confidence: 3.85 }, + { id: 44, feed: "XRP/USD", price: 0.73, confidence: 6.20 }, + { id: 45, feed: "ADA/USD", price: 1.48, confidence: 10.51 }, + { id: 46, feed: "DOT/USD", price: 30.12, confidence: 2.09 }, + { id: 47, feed: "MATIC/USD", price: 2.19, confidence: 12.88 }, + { id: 48, feed: "ATOM/USD", price: 14.04, confidence: 4.62 }, + { id: 49, feed: "LTC/USD", price: 244.31, confidence: 5.12 }, + { id: 50, feed: "TRX/USD", price: 0.13, confidence: 6.91 }, - { id: 51, feed: "NEAR/USD", price: "$9.95", confidence: "+/- 6.84%" }, - { id: 52, feed: "APT/USD", price: "$11.42", confidence: "+/- 4.44%" }, - { id: 53, feed: "SUI/USD", price: "$1.79", confidence: "+/- 8.93%" }, - { id: 54, feed: "ARB/USD", price: "$1.59", confidence: "+/- 10.13%" }, - { id: 55, feed: "OP/USD", price: "$2.31", confidence: "+/- 9.20%" }, - { id: 56, feed: "FIL/USD", price: "$37.02", confidence: "+/- 2.72%" }, - { id: 57, feed: "ICP/USD", price: "$18.67", confidence: "+/- 6.01%" }, - { id: 58, feed: "BTC/USD", price: "$59,243.82", confidence: "+/- 3.92%" }, - { id: 59, feed: "ETH/USD", price: "$3,089.27", confidence: "+/- 7.47%" }, - { id: 60, feed: "SOL/USD", price: "$158.71", confidence: "+/- 2.26%" }, + { id: 51, feed: "NEAR/USD", price: 9.95, confidence: 6.84 }, + { id: 52, feed: "APT/USD", price: 11.42, confidence: 4.44 }, + { id: 53, feed: "SUI/USD", price: 1.79, confidence: 8.93 }, + { id: 54, feed: "ARB/USD", price: 1.59, confidence: 10.13 }, + { id: 55, feed: "OP/USD", price: 2.31, confidence: 9.20 }, + { id: 56, feed: "FIL/USD", price: 37.02, confidence: 2.72 }, + { id: 57, feed: "ICP/USD", price: 18.67, confidence: 6.01 }, + { id: 58, feed: "BTC/USD", price: 59_243.82, confidence: 3.92 }, + { id: 59, feed: "ETH/USD", price: 3089.27, confidence: 7.47 }, + { id: 60, feed: "SOL/USD", price: 158.71, confidence: 2.26 }, - { id: 61, feed: "DOGE/USD", price: "$0.22", confidence: "+/- 8.55%" }, - { id: 62, feed: "BNB/USD", price: "$601.35", confidence: "+/- 3.69%" }, - { id: 63, feed: "XRP/USD", price: "$0.75", confidence: "+/- 5.72%" }, - { id: 64, feed: "ADA/USD", price: "$1.55", confidence: "+/- 9.68%" }, - { id: 65, feed: "DOT/USD", price: "$31.44", confidence: "+/- 1.88%" }, - { id: 66, feed: "MATIC/USD", price: "$2.23", confidence: "+/- 11.83%" }, - { id: 67, feed: "ATOM/USD", price: "$14.88", confidence: "+/- 4.34%" }, - { id: 68, feed: "LTC/USD", price: "$237.72", confidence: "+/- 5.55%" }, - { id: 69, feed: "TRX/USD", price: "$0.14", confidence: "+/- 6.63%" }, - { id: 70, feed: "NEAR/USD", price: "$10.17", confidence: "+/- 7.03%" }, + { id: 61, feed: "DOGE/USD", price: 0.22, confidence: 8.55 }, + { id: 62, feed: "BNB/USD", price: 601.35, confidence: 3.69 }, + { id: 63, feed: "XRP/USD", price: 0.75, confidence: 5.72 }, + { id: 64, feed: "ADA/USD", price: 1.55, confidence: 9.68 }, + { id: 65, feed: "DOT/USD", price: 31.44, confidence: 1.88 }, + { id: 66, feed: "MATIC/USD", price: 2.23, confidence: 11.83 }, + { id: 67, feed: "ATOM/USD", price: 14.88, confidence: 4.34 }, + { id: 68, feed: "LTC/USD", price: 237.72, confidence: 5.55 }, + { id: 69, feed: "TRX/USD", price: 0.14, confidence: 6.63 }, + { id: 70, feed: "NEAR/USD", price: 10.17, confidence: 7.03 }, - { id: 71, feed: "APT/USD", price: "$11.07", confidence: "+/- 3.71%" }, - { id: 72, feed: "SUI/USD", price: "$1.81", confidence: "+/- 9.44%" }, - { id: 73, feed: "ARB/USD", price: "$1.63", confidence: "+/- 11.09%" }, - { id: 74, feed: "OP/USD", price: "$2.19", confidence: "+/- 10.27%" }, - { id: 75, feed: "FIL/USD", price: "$35.91", confidence: "+/- 3.18%" }, - { id: 76, feed: "ICP/USD", price: "$19.35", confidence: "+/- 5.64%" }, - { id: 77, feed: "BTC/USD", price: "$60,517.49", confidence: "+/- 4.02%" }, - { id: 78, feed: "ETH/USD", price: "$3,112.84", confidence: "+/- 7.21%" }, - { id: 79, feed: "SOL/USD", price: "$149.26", confidence: "+/- 2.51%" }, - { id: 80, feed: "DOGE/USD", price: "$0.20", confidence: "+/- 9.12%" }, + { id: 71, feed: "APT/USD", price: 11.07, confidence: 3.71 }, + { id: 72, feed: "SUI/USD", price: 1.81, confidence: 9.44 }, + { id: 73, feed: "ARB/USD", price: 1.63, confidence: 11.09 }, + { id: 74, feed: "OP/USD", price: 2.19, confidence: 10.27 }, + { id: 75, feed: "FIL/USD", price: 35.91, confidence: 3.18 }, + { id: 76, feed: "ICP/USD", price: 19.35, confidence: 5.64 }, + { id: 77, feed: "BTC/USD", price: 60_517.49, confidence: 4.02 }, + { id: 78, feed: "ETH/USD", price: 3112.84, confidence: 7.21 }, + { id: 79, feed: "SOL/USD", price: 149.26, confidence: 2.51 }, + { id: 80, feed: "DOGE/USD", price: 0.2, confidence: 9.12 }, ]; diff --git a/packages/component-library/src/TableGrid/full-width-cell-renderer.tsx b/packages/component-library/src/TableGrid/full-width-cell-renderer.tsx new file mode 100644 index 0000000000..7559526b2b --- /dev/null +++ b/packages/component-library/src/TableGrid/full-width-cell-renderer.tsx @@ -0,0 +1,11 @@ +import type { ICellRendererParams } from 'ag-grid-community'; + +export const FullWidthCellRenderer = colDefs => (props: ICellRendererParams) => { + console.log({props, colDefs}); + return ( +
+

Full Width Row

+

Row data: {JSON.stringify(props.data)}

+
+ ); +}; \ No newline at end of file diff --git a/packages/component-library/src/TableGrid/index.stories.tsx b/packages/component-library/src/TableGrid/index.stories.tsx index 1fa0be3bb8..3f92a32371 100644 --- a/packages/component-library/src/TableGrid/index.stories.tsx +++ b/packages/component-library/src/TableGrid/index.stories.tsx @@ -11,17 +11,12 @@ const meta = { layout: "padded", }, argTypes: { - columns: { + colDefs: { table: { disable: true, }, }, - rows: { - table: { - disable: true, - }, - }, - renderEmptyState: { + rowData: { table: { disable: true, }, @@ -31,15 +26,9 @@ const meta = { disable: true, }, }, - label: { - table: { - category: "Accessibility", - }, - }, - isUpdating: { - control: "boolean", + cardProps: { table: { - category: "State", + category: "Outer Card", }, }, isLoading: { @@ -48,27 +37,21 @@ const meta = { category: "State", }, }, - fill: { - control: "boolean", - table: { - category: "Variant", - }, - }, - rounded: { - control: "boolean", - table: { - category: "Variant", - }, - }, - dependencies: { - table: { - disable: true, - }, - }, }, } satisfies Meta; export default meta; +export const PriceCellRenderer = ({ value }: { value: number }) => ( + + {`$${value.toLocaleString(undefined, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + })}`} + + ); + +export const ConfidenceCellRenderer = ({ value }: { value: number }) => {`+/- ${value.toFixed(2)}%`}; + const args = { colDefs: [ { @@ -83,12 +66,15 @@ const args = { headerName: "PRICE", field: "price", flex: 2, - loadingSkeletonWidth: 30, + cellRenderer: PriceCellRenderer, }, { headerName: "CONFIDENCE", field: "confidence", - loadingSkeletonWidth: 20, + cellRenderer: ConfidenceCellRenderer, + context: { + loadingSkeletonWidth: 20, + } }, ], rowData: dummyRowData, diff --git a/packages/component-library/src/TableGrid/index.tsx b/packages/component-library/src/TableGrid/index.tsx index ba371bfcfc..88b87ded97 100644 --- a/packages/component-library/src/TableGrid/index.tsx +++ b/packages/component-library/src/TableGrid/index.tsx @@ -1,21 +1,23 @@ -import type { ColDef } from "ag-grid-community"; import { AllCommunityModule, + ClientSideRowModelModule, ModuleRegistry, + TextFilterModule, themeQuartz, } from "ag-grid-community"; -import type { AgGridReactProps } from "ag-grid-react"; // React Data Grid Component import { AgGridReact } from "ag-grid-react"; -import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from "react"; +import { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react"; -import type { Props as CardProps } from "../Card"; import { Card } from "../Card"; import { Paginator } from "../Paginator"; import { Skeleton } from "../Skeleton"; +import { useMediaQueryBreakpoint } from '../useMediaQuery'; +import { FullWidthCellRenderer } from './full-width-cell-renderer'; import styles from "./index.module.scss"; - +import type { TableGridProps } from './table-grid-props'; // Register all Community features -ModuleRegistry.registerModules([AllCommunityModule]); +ModuleRegistry.registerModules([AllCommunityModule, TextFilterModule, + ClientSideRowModelModule,]); const SkeletonCellRenderer = (props: { value?: unknown }) => { if (!props.value) { @@ -24,18 +26,6 @@ const SkeletonCellRenderer = (props: { value?: unknown }) => { return {props.value}; }; -type ExtendedColDef = ColDef & { - loadingSkeletonWidth?: number; -}; - -export type TableGridProps> = { - rowData: TData[]; - colDefs: ExtendedColDef[]; - isLoading?: boolean; - cardProps?: Omit, "children" | "footer"> & { nonInteractive?: true }; - pagination?: boolean; -} & Omit, "rowData" | "defaultColDef" | "columnDefs">; - export const TableGrid = forwardRef(>({ rowData, colDefs, @@ -48,20 +38,34 @@ export const TableGrid = forwardRef(>({ const [pageSize, setPageSize] = useState(10); const [currentPage, setCurrentPage] = useState(1); const [totalPages, setTotalPages] = useState(1); - useImperativeHandle(ref, () => gridRef.current); + useImperativeHandle(ref, () => gridRef.current); - const defaultColDef = useMemo(() => { + const defaultColDef = useMemo(() => { return { cellRenderer: SkeletonCellRenderer, flex: 1, }; }, []); - const emptyRowData = useMemo(() => { - // create dummy row matching the shape of colDefs - return [colDefs.map(() => ({ value: undefined }))]; - }, [colDefs]); + const isLargeScreen = useMediaQueryBreakpoint("md"); + useEffect(() => { + if(!gridRef.current?.api) return; + gridRef.current.api.redrawRows(); + gridRef.current.api.resetRowHeights() + gridRef.current.api.onRowHeightChanged(); + }, [isLargeScreen]); + const mappedColDefs = useMemo(() => { + return colDefs.map((colDef) => { + return { + ...colDef, + cellRenderer: isLoading ? SkeletonCellRenderer : colDef.cellRenderer, + }; + }); + }, [colDefs, isLoading]); + + const fullWidthCellRendererComponent = useMemo(() => FullWidthCellRenderer(colDefs), [colDefs]); + const onPaginationChanged = useCallback(() => { if (gridRef.current?.api) { const api = gridRef.current.api; @@ -70,21 +74,26 @@ export const TableGrid = forwardRef(>({ setTotalPages(api.paginationGetTotalPages()); } }, []); - const onPageChange = useCallback((newPage: number) => { gridRef.current?.api.paginationGoToPage(newPage - 1); }, []); - const tableGrid = ( className={styles.tableGrid} ref={gridRef} - rowData={isLoading ? emptyRowData : rowData} + // @ts-expect-error empty row data + rowData={isLoading ? [[]] : rowData} defaultColDef={defaultColDef} - columnDefs={colDefs} + columnDefs={mappedColDefs} theme={themeQuartz} domLayout="autoHeight" - pagination={pagination ?? false} + fullWidthCellRenderer={fullWidthCellRendererComponent} + getRowHeight={() => { + if (!isLargeScreen) { + return 100; + } + }} + isFullWidthRow={() => !isLargeScreen} pagination={pagination ?? false} paginationPageSize={pageSize} suppressPaginationPanel onPaginationChanged={onPaginationChanged} diff --git a/packages/component-library/src/TableGrid/table-grid-props.ts b/packages/component-library/src/TableGrid/table-grid-props.ts new file mode 100644 index 0000000000..7b75acd341 --- /dev/null +++ b/packages/component-library/src/TableGrid/table-grid-props.ts @@ -0,0 +1,18 @@ +import type { ColDef } from 'ag-grid-community'; +import type { AgGridReactProps } from 'ag-grid-react'; + +import type { Props as CardProps } from "../Card"; + +type ExtendedColDef = ColDef & { + loadingSkeletonWidth?: number; +}; + +export type TableGridProps> = { + rowData: TData[]; + colDefs: ExtendedColDef[]; + isLoading?: boolean; + cardProps?: Omit, "children" | "footer"> & { nonInteractive?: true }; + pagination?: boolean; +} & Omit, "rowData" | "defaultColDef" | "columnDefs">; + + diff --git a/packages/component-library/src/useMediaQuery/index.module.scss b/packages/component-library/src/useMediaQuery/index.module.scss new file mode 100644 index 0000000000..2b28877acc --- /dev/null +++ b/packages/component-library/src/useMediaQuery/index.module.scss @@ -0,0 +1,9 @@ +@use "../theme"; + +:export { + breakpointSm: #{theme.map-get-strict(theme.$breakpoints, "sm")}; + breakpointMd: #{theme.map-get-strict(theme.$breakpoints, "md")}; + breakpointLg: #{theme.map-get-strict(theme.$breakpoints, "lg")}; + breakpointXl: #{theme.map-get-strict(theme.$breakpoints, "xl")}; + breakpoint2Xl: #{theme.map-get-strict(theme.$breakpoints, "2xl")}; +} \ No newline at end of file diff --git a/packages/component-library/src/useMediaQuery/index.ts b/packages/component-library/src/useMediaQuery/index.ts new file mode 100644 index 0000000000..f2a6d9bd7d --- /dev/null +++ b/packages/component-library/src/useMediaQuery/index.ts @@ -0,0 +1,40 @@ +import { useEffect, useState } from 'react'; + +import styles from './index.module.scss'; + +export const MEDIA_BREAKPOINTS: Record = { + sm: styles.breakpointSm ?? "0", + md: styles.breakpointMd ?? "0", + lg: styles.breakpointLg ?? "0", + xl: styles.breakpointXl ?? "0", + "2xl": styles.breakpoint2Xl ?? "0", +} + +const mediaQuery = (breakpoint: string) => `(min-width: ${breakpoint})` + +export const useMediaQueryBreakpoint = (breakpoint: keyof typeof MEDIA_BREAKPOINTS, callback?: (matches: boolean) => void) => { + return useMediaQuery(mediaQuery(MEDIA_BREAKPOINTS[breakpoint] ?? ''), callback); +} + +export const useMediaQuery = (query: string, callback?: (matches: boolean) => void) => { + const [matches, setMatches] = useState(false); + + useEffect(() => { + const media = globalThis.window.matchMedia(query); + + setMatches(media.matches); + + const listener = (event: MediaQueryListEvent) => { + setMatches(event.matches); + callback?.(event.matches); + }; + + media.addEventListener("change", listener); + + return () => { + media.removeEventListener("change", listener); + }; + }, [query, callback]); + + return matches; +}; From 7f9292af0ea73bb84c9f34bb670aa3687335c7ad Mon Sep 17 00:00:00 2001 From: Alexandru Cambose Date: Fri, 3 Oct 2025 11:34:21 +0100 Subject: [PATCH 4/8] feat: simplified grid --- .../src/SymbolPairTag/index.stories.tsx | 4 +- .../src/TableGrid/dummy-row-data.ts | 8 +- .../TableGrid/full-width-cell-renderer.tsx | 11 -- .../src/TableGrid/index.module.scss | 12 ++ .../src/TableGrid/index.stories.tsx | 49 +++-- .../component-library/src/TableGrid/index.tsx | 178 +++++++++--------- .../src/TableGrid/table-grid-props.ts | 12 +- .../src/useMediaQuery/index.module.scss | 9 - .../src/useMediaQuery/index.ts | 40 ---- 9 files changed, 151 insertions(+), 172 deletions(-) delete mode 100644 packages/component-library/src/TableGrid/full-width-cell-renderer.tsx delete mode 100644 packages/component-library/src/useMediaQuery/index.module.scss delete mode 100644 packages/component-library/src/useMediaQuery/index.ts diff --git a/packages/component-library/src/SymbolPairTag/index.stories.tsx b/packages/component-library/src/SymbolPairTag/index.stories.tsx index ed0e05400b..2618fa61e5 100644 --- a/packages/component-library/src/SymbolPairTag/index.stories.tsx +++ b/packages/component-library/src/SymbolPairTag/index.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/react"; -import CryptoIcon from "cryptocurrency-icons/svg/color/btc.svg"; +import BtcIcon from "cryptocurrency-icons/svg/color/btc.svg"; import { SymbolPairTag as SymbolPairTagComponent } from "./index.jsx"; const meta = { @@ -29,7 +29,7 @@ export const SymbolPairTag = { args: { displaySymbol: "BTC/USD", isLoading: false, - icon: , + icon: , description: "Bitcoin", }, } satisfies StoryObj; diff --git a/packages/component-library/src/TableGrid/dummy-row-data.ts b/packages/component-library/src/TableGrid/dummy-row-data.ts index 818e4dce4c..f4fba3b3a3 100644 --- a/packages/component-library/src/TableGrid/dummy-row-data.ts +++ b/packages/component-library/src/TableGrid/dummy-row-data.ts @@ -13,7 +13,7 @@ export const dummyRowData = [ { id: 11, feed: "LTC/USD", price: 228.77, confidence: 5.66 }, { id: 12, feed: "TRX/USD", price: 0.12, confidence: 6.44 }, { id: 13, feed: "NEAR/USD", price: 9.83, confidence: 7.15 }, - { id: 14, feed: "APT/USD", price: 11.25, confidence: 3.90 }, + { id: 14, feed: "APT/USD", price: 11.25, confidence: 3.9 }, { id: 15, feed: "SUI/USD", price: 1.77, confidence: 9.28 }, { id: 16, feed: "ARB/USD", price: 1.54, confidence: 11.32 }, { id: 17, feed: "OP/USD", price: 2.12, confidence: 10.44 }, @@ -24,7 +24,7 @@ export const dummyRowData = [ { id: 21, feed: "ETH/USD", price: 2940.18, confidence: 7.54 }, { id: 22, feed: "SOL/USD", price: 153.22, confidence: 2.17 }, { id: 23, feed: "DOGE/USD", price: 0.25, confidence: 11.28 }, - { id: 24, feed: "BNB/USD", price: 612.93, confidence: 3.10 }, + { id: 24, feed: "BNB/USD", price: 612.93, confidence: 3.1 }, { id: 25, feed: "XRP/USD", price: 0.79, confidence: 5.94 }, { id: 26, feed: "ADA/USD", price: 1.52, confidence: 9.45 }, { id: 27, feed: "DOT/USD", price: 28.65, confidence: 1.93 }, @@ -46,7 +46,7 @@ export const dummyRowData = [ { id: 41, feed: "SOL/USD", price: 161.83, confidence: 1.99 }, { id: 42, feed: "DOGE/USD", price: 0.19, confidence: 8.74 }, { id: 43, feed: "BNB/USD", price: 595.27, confidence: 3.85 }, - { id: 44, feed: "XRP/USD", price: 0.73, confidence: 6.20 }, + { id: 44, feed: "XRP/USD", price: 0.73, confidence: 6.2 }, { id: 45, feed: "ADA/USD", price: 1.48, confidence: 10.51 }, { id: 46, feed: "DOT/USD", price: 30.12, confidence: 2.09 }, { id: 47, feed: "MATIC/USD", price: 2.19, confidence: 12.88 }, @@ -58,7 +58,7 @@ export const dummyRowData = [ { id: 52, feed: "APT/USD", price: 11.42, confidence: 4.44 }, { id: 53, feed: "SUI/USD", price: 1.79, confidence: 8.93 }, { id: 54, feed: "ARB/USD", price: 1.59, confidence: 10.13 }, - { id: 55, feed: "OP/USD", price: 2.31, confidence: 9.20 }, + { id: 55, feed: "OP/USD", price: 2.31, confidence: 9.2 }, { id: 56, feed: "FIL/USD", price: 37.02, confidence: 2.72 }, { id: 57, feed: "ICP/USD", price: 18.67, confidence: 6.01 }, { id: 58, feed: "BTC/USD", price: 59_243.82, confidence: 3.92 }, diff --git a/packages/component-library/src/TableGrid/full-width-cell-renderer.tsx b/packages/component-library/src/TableGrid/full-width-cell-renderer.tsx deleted file mode 100644 index 7559526b2b..0000000000 --- a/packages/component-library/src/TableGrid/full-width-cell-renderer.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import type { ICellRendererParams } from 'ag-grid-community'; - -export const FullWidthCellRenderer = colDefs => (props: ICellRendererParams) => { - console.log({props, colDefs}); - return ( -
-

Full Width Row

-

Row data: {JSON.stringify(props.data)}

-
- ); -}; \ No newline at end of file diff --git a/packages/component-library/src/TableGrid/index.module.scss b/packages/component-library/src/TableGrid/index.module.scss index 322e4f8729..5dcbc0691e 100644 --- a/packages/component-library/src/TableGrid/index.module.scss +++ b/packages/component-library/src/TableGrid/index.module.scss @@ -15,3 +15,15 @@ height: 100%; } + +.defaultCellContainer { + height: 100%; + display: flex; + align-items: center; +} + + +.skeletonContainer { + height: theme.spacing(10); + width: 100%; +} \ No newline at end of file diff --git a/packages/component-library/src/TableGrid/index.stories.tsx b/packages/component-library/src/TableGrid/index.stories.tsx index 3f92a32371..4d9460c28a 100644 --- a/packages/component-library/src/TableGrid/index.stories.tsx +++ b/packages/component-library/src/TableGrid/index.stories.tsx @@ -1,7 +1,9 @@ import { ChartLine } from "@phosphor-icons/react/dist/ssr/ChartLine"; import type { Meta, StoryObj } from "@storybook/react"; +import BtcIcon from "cryptocurrency-icons/svg/color/btc.svg"; import { Badge } from "../Badge"; +import { SymbolPairTag } from "../SymbolPairTag"; import { dummyRowData } from "./dummy-row-data"; import { TableGrid as TableGridComponent } from "./index.jsx"; @@ -41,16 +43,36 @@ const meta = { } satisfies Meta; export default meta; -export const PriceCellRenderer = ({ value }: { value: number }) => ( - - {`$${value.toLocaleString(undefined, { - minimumFractionDigits: 2, - maximumFractionDigits: 2, - })}`} - - ); +const PriceCellRenderer = ({ value }: { value: number }) => ( + + {`$${value.toLocaleString(undefined, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + })}`} + +); -export const ConfidenceCellRenderer = ({ value }: { value: number }) => {`+/- ${value.toFixed(2)}%`}; +const ConfidenceCellRenderer = ({ value }: { value: number }) => ( + {`+/- ${value.toFixed(2)}%`} +); + +const FeedCellRenderer = ({ value }: { value: string }) => ( +
+ } + description={value} + /> +
+); + +const FeedCellRendererLoading = () => ( +
+ +
+); const args = { colDefs: [ @@ -61,22 +83,23 @@ const args = { { headerName: "PRICE FEED", field: "feed", + cellRenderer: FeedCellRenderer, + loadingCellRenderer: FeedCellRendererLoading, + flex: 2, }, { headerName: "PRICE", field: "price", - flex: 2, + flex: 3, cellRenderer: PriceCellRenderer, }, { headerName: "CONFIDENCE", field: "confidence", cellRenderer: ConfidenceCellRenderer, - context: { - loadingSkeletonWidth: 20, - } }, ], + rowHeight: 70, rowData: dummyRowData, }; diff --git a/packages/component-library/src/TableGrid/index.tsx b/packages/component-library/src/TableGrid/index.tsx index 88b87ded97..2f96f60ebb 100644 --- a/packages/component-library/src/TableGrid/index.tsx +++ b/packages/component-library/src/TableGrid/index.tsx @@ -6,78 +6,87 @@ import { themeQuartz, } from "ag-grid-community"; import { AgGridReact } from "ag-grid-react"; -import { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react"; +import { + forwardRef, + ReactNode, + useCallback, + useImperativeHandle, + useMemo, + useRef, + useState, +} from "react"; import { Card } from "../Card"; import { Paginator } from "../Paginator"; import { Skeleton } from "../Skeleton"; -import { useMediaQueryBreakpoint } from '../useMediaQuery'; -import { FullWidthCellRenderer } from './full-width-cell-renderer'; import styles from "./index.module.scss"; -import type { TableGridProps } from './table-grid-props'; +import type { TableGridProps } from "./table-grid-props"; + // Register all Community features -ModuleRegistry.registerModules([AllCommunityModule, TextFilterModule, - ClientSideRowModelModule,]); +ModuleRegistry.registerModules([ + AllCommunityModule, + TextFilterModule, + ClientSideRowModelModule, +]); -const SkeletonCellRenderer = (props: { value?: unknown }) => { +const SkeletonCellRenderer = (props: { value?: ReactNode }) => { if (!props.value) { - return ; + return
; } - return {props.value}; + return
{props.value}
; }; -export const TableGrid = forwardRef(>({ - rowData, - colDefs, - isLoading, - cardProps, - pagination, - ...props -}: TableGridProps, ref: React.Ref>) => { - const gridRef = useRef>(null); - const [pageSize, setPageSize] = useState(10); - const [currentPage, setCurrentPage] = useState(1); - const [totalPages, setTotalPages] = useState(1); - useImperativeHandle(ref, () => gridRef.current); - - const defaultColDef = useMemo(() => { - return { - cellRenderer: SkeletonCellRenderer, - flex: 1, - }; - }, []); +export const TableGrid = forwardRef( + >( + { + rowData, + colDefs, + isLoading, + cardProps, + pagination, + ...props + }: TableGridProps, + ref: React.Ref | null>, + ) => { + const gridRef = useRef>(null); + const [pageSize, setPageSize] = useState(10); + const [currentPage, setCurrentPage] = useState(1); + const [totalPages, setTotalPages] = useState(1); + useImperativeHandle(ref, () => gridRef.current); - const isLargeScreen = useMediaQueryBreakpoint("md"); - useEffect(() => { - if(!gridRef.current?.api) return; - gridRef.current.api.redrawRows(); - gridRef.current.api.resetRowHeights() - gridRef.current.api.onRowHeightChanged(); - }, [isLargeScreen]); - - const mappedColDefs = useMemo(() => { - return colDefs.map((colDef) => { + const defaultColDef = useMemo(() => { return { - ...colDef, - cellRenderer: isLoading ? SkeletonCellRenderer : colDef.cellRenderer, + cellRenderer: SkeletonCellRenderer, + flex: 1, }; - }); - }, [colDefs, isLoading]); + }, []); - const fullWidthCellRendererComponent = useMemo(() => FullWidthCellRenderer(colDefs), [colDefs]); - - const onPaginationChanged = useCallback(() => { - if (gridRef.current?.api) { - const api = gridRef.current.api; - setPageSize(api.paginationGetPageSize()); - setCurrentPage(api.paginationGetCurrentPage() + 1); - setTotalPages(api.paginationGetTotalPages()); - } - }, []); - const onPageChange = useCallback((newPage: number) => { - gridRef.current?.api.paginationGoToPage(newPage - 1); - }, []); - const tableGrid = ( + const mappedColDefs = useMemo(() => { + return colDefs.map((colDef) => { + return { + ...colDef, + // the types in ag-grid are `any` for the cellRenderers + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + cellRenderer: isLoading + ? (colDef.loadingCellRenderer ?? SkeletonCellRenderer) + : colDef.cellRenderer, + }; + }); + }, [colDefs, isLoading]); + + const onPaginationChanged = useCallback(() => { + if (gridRef.current?.api) { + const api = gridRef.current.api; + setPageSize(api.paginationGetPageSize()); + setCurrentPage(api.paginationGetCurrentPage() + 1); + setTotalPages(api.paginationGetTotalPages()); + } + }, []); + const onPageChange = useCallback((newPage: number) => { + gridRef.current?.api.paginationGoToPage(newPage - 1); + }, []); + + const tableGrid = ( className={styles.tableGrid} ref={gridRef} @@ -87,40 +96,35 @@ export const TableGrid = forwardRef(>({ columnDefs={mappedColDefs} theme={themeQuartz} domLayout="autoHeight" - fullWidthCellRenderer={fullWidthCellRendererComponent} - getRowHeight={() => { - if (!isLargeScreen) { - return 100; - } - }} - isFullWidthRow={() => !isLargeScreen} pagination={pagination ?? false} + pagination={pagination ?? false} paginationPageSize={pageSize} suppressPaginationPanel onPaginationChanged={onPaginationChanged} {...props} /> - ); - if (!cardProps && !pagination) { - return tableGrid; - } - return ( - - ) - } - {...cardProps} - > - {tableGrid} - - ); -}); + ); + if (!cardProps && !pagination) { + return tableGrid; + } + return ( + + ) + } + {...cardProps} + > + {tableGrid} + + ); + }, +); TableGrid.displayName = "TableGrid"; diff --git a/packages/component-library/src/TableGrid/table-grid-props.ts b/packages/component-library/src/TableGrid/table-grid-props.ts index 7b75acd341..994fd3b990 100644 --- a/packages/component-library/src/TableGrid/table-grid-props.ts +++ b/packages/component-library/src/TableGrid/table-grid-props.ts @@ -1,18 +1,18 @@ -import type { ColDef } from 'ag-grid-community'; -import type { AgGridReactProps } from 'ag-grid-react'; +import type { ColDef } from "ag-grid-community"; +import type { AgGridReactProps } from "ag-grid-react"; import type { Props as CardProps } from "../Card"; type ExtendedColDef = ColDef & { - loadingSkeletonWidth?: number; + loadingCellRenderer?: ColDef["cellRenderer"]; }; export type TableGridProps> = { rowData: TData[]; colDefs: ExtendedColDef[]; isLoading?: boolean; - cardProps?: Omit, "children" | "footer"> & { nonInteractive?: true }; + cardProps?: Omit, "children" | "footer"> & { + nonInteractive?: true; + }; pagination?: boolean; } & Omit, "rowData" | "defaultColDef" | "columnDefs">; - - diff --git a/packages/component-library/src/useMediaQuery/index.module.scss b/packages/component-library/src/useMediaQuery/index.module.scss deleted file mode 100644 index 2b28877acc..0000000000 --- a/packages/component-library/src/useMediaQuery/index.module.scss +++ /dev/null @@ -1,9 +0,0 @@ -@use "../theme"; - -:export { - breakpointSm: #{theme.map-get-strict(theme.$breakpoints, "sm")}; - breakpointMd: #{theme.map-get-strict(theme.$breakpoints, "md")}; - breakpointLg: #{theme.map-get-strict(theme.$breakpoints, "lg")}; - breakpointXl: #{theme.map-get-strict(theme.$breakpoints, "xl")}; - breakpoint2Xl: #{theme.map-get-strict(theme.$breakpoints, "2xl")}; -} \ No newline at end of file diff --git a/packages/component-library/src/useMediaQuery/index.ts b/packages/component-library/src/useMediaQuery/index.ts deleted file mode 100644 index f2a6d9bd7d..0000000000 --- a/packages/component-library/src/useMediaQuery/index.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { useEffect, useState } from 'react'; - -import styles from './index.module.scss'; - -export const MEDIA_BREAKPOINTS: Record = { - sm: styles.breakpointSm ?? "0", - md: styles.breakpointMd ?? "0", - lg: styles.breakpointLg ?? "0", - xl: styles.breakpointXl ?? "0", - "2xl": styles.breakpoint2Xl ?? "0", -} - -const mediaQuery = (breakpoint: string) => `(min-width: ${breakpoint})` - -export const useMediaQueryBreakpoint = (breakpoint: keyof typeof MEDIA_BREAKPOINTS, callback?: (matches: boolean) => void) => { - return useMediaQuery(mediaQuery(MEDIA_BREAKPOINTS[breakpoint] ?? ''), callback); -} - -export const useMediaQuery = (query: string, callback?: (matches: boolean) => void) => { - const [matches, setMatches] = useState(false); - - useEffect(() => { - const media = globalThis.window.matchMedia(query); - - setMatches(media.matches); - - const listener = (event: MediaQueryListEvent) => { - setMatches(event.matches); - callback?.(event.matches); - }; - - media.addEventListener("change", listener); - - return () => { - media.removeEventListener("change", listener); - }; - }, [query, callback]); - - return matches; -}; From 0548bdee85bf7fa7cf9de496fd365677b7d10385 Mon Sep 17 00:00:00 2001 From: Alexandru Cambose Date: Mon, 6 Oct 2025 09:39:57 +0100 Subject: [PATCH 5/8] use ref --- .../component-library/src/TableGrid/index.stories.tsx | 10 ++++++++-- packages/component-library/src/TableGrid/index.tsx | 10 ++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/component-library/src/TableGrid/index.stories.tsx b/packages/component-library/src/TableGrid/index.stories.tsx index 4d9460c28a..0ecb9d0919 100644 --- a/packages/component-library/src/TableGrid/index.stories.tsx +++ b/packages/component-library/src/TableGrid/index.stories.tsx @@ -1,11 +1,13 @@ import { ChartLine } from "@phosphor-icons/react/dist/ssr/ChartLine"; import type { Meta, StoryObj } from "@storybook/react"; import BtcIcon from "cryptocurrency-icons/svg/color/btc.svg"; +import { useRef } from "react"; import { Badge } from "../Badge"; import { SymbolPairTag } from "../SymbolPairTag"; import { dummyRowData } from "./dummy-row-data"; import { TableGrid as TableGridComponent } from "./index.jsx"; +import { AgGridReact } from "ag-grid-react"; const meta = { component: TableGridComponent, @@ -106,10 +108,14 @@ const args = { export const TableGrid = { args, } satisfies StoryObj; - +const Comp = () => { + const gridRef = useRef>(null); + console.log(gridRef, args,'args'); + return ; +}; export const PriceFeedsCard = { render: (props) => { - return ; + return ; }, args: { ...args, diff --git a/packages/component-library/src/TableGrid/index.tsx b/packages/component-library/src/TableGrid/index.tsx index 2f96f60ebb..e04f575f77 100644 --- a/packages/component-library/src/TableGrid/index.tsx +++ b/packages/component-library/src/TableGrid/index.tsx @@ -7,8 +7,9 @@ import { } from "ag-grid-community"; import { AgGridReact } from "ag-grid-react"; import { + type ForwardedRef, forwardRef, - ReactNode, + type ReactNode, useCallback, useImperativeHandle, useMemo, @@ -46,13 +47,14 @@ export const TableGrid = forwardRef( pagination, ...props }: TableGridProps, - ref: React.Ref | null>, + ref: ForwardedRef>, ) => { const gridRef = useRef>(null); const [pageSize, setPageSize] = useState(10); const [currentPage, setCurrentPage] = useState(1); const [totalPages, setTotalPages] = useState(1); - useImperativeHandle(ref, () => gridRef.current); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + useImperativeHandle(ref, () => gridRef.current!); const defaultColDef = useMemo(() => { return { @@ -89,7 +91,6 @@ export const TableGrid = forwardRef( const tableGrid = ( className={styles.tableGrid} - ref={gridRef} // @ts-expect-error empty row data rowData={isLoading ? [[]] : rowData} defaultColDef={defaultColDef} @@ -100,6 +101,7 @@ export const TableGrid = forwardRef( paginationPageSize={pageSize} suppressPaginationPanel onPaginationChanged={onPaginationChanged} + ref={gridRef} {...props} /> ); From 568b34e0ab4b0741a9837896d8c7de97f21efb36 Mon Sep 17 00:00:00 2001 From: Alexandru Cambose Date: Mon, 6 Oct 2025 09:57:17 +0100 Subject: [PATCH 6/8] remove ref --- .../src/TableGrid/index.module.scss | 3 +- .../src/TableGrid/index.stories.tsx | 10 +- .../component-library/src/TableGrid/index.tsx | 185 ++++++++---------- 3 files changed, 90 insertions(+), 108 deletions(-) diff --git a/packages/component-library/src/TableGrid/index.module.scss b/packages/component-library/src/TableGrid/index.module.scss index 5dcbc0691e..d345325401 100644 --- a/packages/component-library/src/TableGrid/index.module.scss +++ b/packages/component-library/src/TableGrid/index.module.scss @@ -22,8 +22,7 @@ align-items: center; } - .skeletonContainer { height: theme.spacing(10); width: 100%; -} \ No newline at end of file +} diff --git a/packages/component-library/src/TableGrid/index.stories.tsx b/packages/component-library/src/TableGrid/index.stories.tsx index 0ecb9d0919..4d9460c28a 100644 --- a/packages/component-library/src/TableGrid/index.stories.tsx +++ b/packages/component-library/src/TableGrid/index.stories.tsx @@ -1,13 +1,11 @@ import { ChartLine } from "@phosphor-icons/react/dist/ssr/ChartLine"; import type { Meta, StoryObj } from "@storybook/react"; import BtcIcon from "cryptocurrency-icons/svg/color/btc.svg"; -import { useRef } from "react"; import { Badge } from "../Badge"; import { SymbolPairTag } from "../SymbolPairTag"; import { dummyRowData } from "./dummy-row-data"; import { TableGrid as TableGridComponent } from "./index.jsx"; -import { AgGridReact } from "ag-grid-react"; const meta = { component: TableGridComponent, @@ -108,14 +106,10 @@ const args = { export const TableGrid = { args, } satisfies StoryObj; -const Comp = () => { - const gridRef = useRef>(null); - console.log(gridRef, args,'args'); - return ; -}; + export const PriceFeedsCard = { render: (props) => { - return ; + return ; }, args: { ...args, diff --git a/packages/component-library/src/TableGrid/index.tsx b/packages/component-library/src/TableGrid/index.tsx index e04f575f77..3bbea544f1 100644 --- a/packages/component-library/src/TableGrid/index.tsx +++ b/packages/component-library/src/TableGrid/index.tsx @@ -6,16 +6,8 @@ import { themeQuartz, } from "ag-grid-community"; import { AgGridReact } from "ag-grid-react"; -import { - type ForwardedRef, - forwardRef, - type ReactNode, - useCallback, - useImperativeHandle, - useMemo, - useRef, - useState, -} from "react"; +import type { ReactNode } from "react"; +import { useCallback, useMemo, useRef, useState } from "react"; import { Card } from "../Card"; import { Paginator } from "../Paginator"; @@ -32,101 +24,98 @@ ModuleRegistry.registerModules([ const SkeletonCellRenderer = (props: { value?: ReactNode }) => { if (!props.value) { - return
; + return ( +
+
+ +
+
+ ); } return
{props.value}
; }; -export const TableGrid = forwardRef( - >( - { - rowData, - colDefs, - isLoading, - cardProps, - pagination, - ...props - }: TableGridProps, - ref: ForwardedRef>, - ) => { - const gridRef = useRef>(null); - const [pageSize, setPageSize] = useState(10); - const [currentPage, setCurrentPage] = useState(1); - const [totalPages, setTotalPages] = useState(1); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - useImperativeHandle(ref, () => gridRef.current!); +export const TableGrid = >({ + rowData, + colDefs, + isLoading, + cardProps, + pagination, + ...props +}: TableGridProps) => { + const gridRef = useRef>(null); + const [pageSize, setPageSize] = useState(10); + const [currentPage, setCurrentPage] = useState(1); + const [totalPages, setTotalPages] = useState(1); + + const defaultColDef = useMemo(() => { + return { + cellRenderer: SkeletonCellRenderer, + flex: 1, + }; + }, []); - const defaultColDef = useMemo(() => { + const mappedColDefs = useMemo(() => { + return colDefs.map((colDef) => { return { - cellRenderer: SkeletonCellRenderer, - flex: 1, + ...colDef, + // the types in ag-grid are `any` for the cellRenderers + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + cellRenderer: isLoading + ? (colDef.loadingCellRenderer ?? SkeletonCellRenderer) + : colDef.cellRenderer, }; - }, []); - - const mappedColDefs = useMemo(() => { - return colDefs.map((colDef) => { - return { - ...colDef, - // the types in ag-grid are `any` for the cellRenderers - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - cellRenderer: isLoading - ? (colDef.loadingCellRenderer ?? SkeletonCellRenderer) - : colDef.cellRenderer, - }; - }); - }, [colDefs, isLoading]); - - const onPaginationChanged = useCallback(() => { - if (gridRef.current?.api) { - const api = gridRef.current.api; - setPageSize(api.paginationGetPageSize()); - setCurrentPage(api.paginationGetCurrentPage() + 1); - setTotalPages(api.paginationGetTotalPages()); - } - }, []); - const onPageChange = useCallback((newPage: number) => { - gridRef.current?.api.paginationGoToPage(newPage - 1); - }, []); + }); + }, [colDefs, isLoading]); - const tableGrid = ( - - className={styles.tableGrid} - // @ts-expect-error empty row data - rowData={isLoading ? [[]] : rowData} - defaultColDef={defaultColDef} - columnDefs={mappedColDefs} - theme={themeQuartz} - domLayout="autoHeight" - pagination={pagination ?? false} - paginationPageSize={pageSize} - suppressPaginationPanel - onPaginationChanged={onPaginationChanged} - ref={gridRef} - {...props} - /> - ); - if (!cardProps && !pagination) { - return tableGrid; + const onPaginationChanged = useCallback(() => { + if (gridRef.current?.api) { + const api = gridRef.current.api; + setPageSize(api.paginationGetPageSize()); + setCurrentPage(api.paginationGetCurrentPage() + 1); + setTotalPages(api.paginationGetTotalPages()); } - return ( - - ) - } - {...cardProps} - > - {tableGrid} - - ); - }, -); + }, []); + const onPageChange = useCallback((newPage: number) => { + gridRef.current?.api.paginationGoToPage(newPage - 1); + }, []); -TableGrid.displayName = "TableGrid"; + const tableGrid = ( + + className={styles.tableGrid} + // @ts-expect-error empty row data + rowData={isLoading ? [[]] : rowData} + defaultColDef={defaultColDef} + columnDefs={mappedColDefs} + theme={themeQuartz} + domLayout="autoHeight" + pagination={pagination ?? false} + paginationPageSize={pageSize} + suppressPaginationPanel + onPaginationChanged={onPaginationChanged} + ref={gridRef} + {...props} + /> + ); + if (!cardProps && !pagination) { + return tableGrid; + } + return ( + + ) + } + {...cardProps} + > + {tableGrid} + + ); +}; From c125e88d4fac469861e71c07a323d012cbec0a2c Mon Sep 17 00:00:00 2001 From: Alexandru Cambose Date: Mon, 6 Oct 2025 10:03:36 +0100 Subject: [PATCH 7/8] formatting --- .../component-library/src/TableGrid/index.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/component-library/src/TableGrid/index.tsx b/packages/component-library/src/TableGrid/index.tsx index 3bbea544f1..ed3cb3a666 100644 --- a/packages/component-library/src/TableGrid/index.tsx +++ b/packages/component-library/src/TableGrid/index.tsx @@ -59,7 +59,7 @@ export const TableGrid = >({ return colDefs.map((colDef) => { return { ...colDef, - // the types in ag-grid are `any` for the cellRenderers + // the types in ag-grid are `any` for the cellRenderers which is throwing an error here // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment cellRenderer: isLoading ? (colDef.loadingCellRenderer ?? SkeletonCellRenderer) @@ -69,13 +69,13 @@ export const TableGrid = >({ }, [colDefs, isLoading]); const onPaginationChanged = useCallback(() => { - if (gridRef.current?.api) { - const api = gridRef.current.api; - setPageSize(api.paginationGetPageSize()); - setCurrentPage(api.paginationGetCurrentPage() + 1); - setTotalPages(api.paginationGetTotalPages()); - } + const api = gridRef.current?.api; + if (!api) return; + setPageSize(api.paginationGetPageSize()); + setCurrentPage(api.paginationGetCurrentPage() + 1); + setTotalPages(api.paginationGetTotalPages()); }, []); + const onPageChange = useCallback((newPage: number) => { gridRef.current?.api.paginationGoToPage(newPage - 1); }, []); @@ -83,7 +83,7 @@ export const TableGrid = >({ const tableGrid = ( className={styles.tableGrid} - // @ts-expect-error empty row data + // @ts-expect-error empty row data, which is throwing an error here btu required to display 1 row in the loading state rowData={isLoading ? [[]] : rowData} defaultColDef={defaultColDef} columnDefs={mappedColDefs} From 42ca1445897a709e31b326134c756ac591d808a6 Mon Sep 17 00:00:00 2001 From: Alexandru Cambose Date: Tue, 7 Oct 2025 14:54:22 +0100 Subject: [PATCH 8/8] fix: PR fixes --- .../src/TableGrid/index.stories.tsx | 6 ++--- .../component-library/src/TableGrid/index.tsx | 26 +++++++++---------- .../src/TableGrid/table-grid-props.ts | 3 +-- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/packages/component-library/src/TableGrid/index.stories.tsx b/packages/component-library/src/TableGrid/index.stories.tsx index 4d9460c28a..bf54092d4c 100644 --- a/packages/component-library/src/TableGrid/index.stories.tsx +++ b/packages/component-library/src/TableGrid/index.stories.tsx @@ -13,7 +13,7 @@ const meta = { layout: "padded", }, argTypes: { - colDefs: { + columnDefs: { table: { disable: true, }, @@ -33,7 +33,7 @@ const meta = { category: "Outer Card", }, }, - isLoading: { + loading: { control: "boolean", table: { category: "State", @@ -75,7 +75,7 @@ const FeedCellRendererLoading = () => ( ); const args = { - colDefs: [ + columnDefs: [ { headerName: "ID", field: "id", diff --git a/packages/component-library/src/TableGrid/index.tsx b/packages/component-library/src/TableGrid/index.tsx index ed3cb3a666..b0287d97a7 100644 --- a/packages/component-library/src/TableGrid/index.tsx +++ b/packages/component-library/src/TableGrid/index.tsx @@ -35,10 +35,15 @@ const SkeletonCellRenderer = (props: { value?: ReactNode }) => { return
{props.value}
; }; +const DEFAULT_COL_DEF = { + cellRenderer: SkeletonCellRenderer, + flex: 1, +}; + export const TableGrid = >({ rowData, - colDefs, - isLoading, + columnDefs, + loading, cardProps, pagination, ...props @@ -48,25 +53,18 @@ export const TableGrid = >({ const [currentPage, setCurrentPage] = useState(1); const [totalPages, setTotalPages] = useState(1); - const defaultColDef = useMemo(() => { - return { - cellRenderer: SkeletonCellRenderer, - flex: 1, - }; - }, []); - const mappedColDefs = useMemo(() => { - return colDefs.map((colDef) => { + return columnDefs.map((colDef) => { return { ...colDef, // the types in ag-grid are `any` for the cellRenderers which is throwing an error here // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - cellRenderer: isLoading + cellRenderer: loading ? (colDef.loadingCellRenderer ?? SkeletonCellRenderer) : colDef.cellRenderer, }; }); - }, [colDefs, isLoading]); + }, [columnDefs, loading]); const onPaginationChanged = useCallback(() => { const api = gridRef.current?.api; @@ -84,8 +82,8 @@ export const TableGrid = >({ className={styles.tableGrid} // @ts-expect-error empty row data, which is throwing an error here btu required to display 1 row in the loading state - rowData={isLoading ? [[]] : rowData} - defaultColDef={defaultColDef} + rowData={loading ? [[]] : rowData} + defaultColDef={DEFAULT_COL_DEF} columnDefs={mappedColDefs} theme={themeQuartz} domLayout="autoHeight" diff --git a/packages/component-library/src/TableGrid/table-grid-props.ts b/packages/component-library/src/TableGrid/table-grid-props.ts index 994fd3b990..b2af133e49 100644 --- a/packages/component-library/src/TableGrid/table-grid-props.ts +++ b/packages/component-library/src/TableGrid/table-grid-props.ts @@ -9,8 +9,7 @@ type ExtendedColDef = ColDef & { export type TableGridProps> = { rowData: TData[]; - colDefs: ExtendedColDef[]; - isLoading?: boolean; + columnDefs: ExtendedColDef[]; cardProps?: Omit, "children" | "footer"> & { nonInteractive?: true; };