@gearbox-protocol/ui-kit 3.10.1 → 3.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,63 +16,63 @@ interface ColumnHeaderOptions {
16
16
  *
17
17
  * Used in both charts and client-v3.
18
18
  */
19
- export declare function poolColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo>(options?: ColumnHeaderOptions & {
19
+ export declare function poolColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo, S extends string = string>(options?: ColumnHeaderOptions & {
20
20
  renderDescription?: (ctx: PoolTableCellContext<P, T>) => React.ReactNode;
21
21
  /** Custom pool name formatter. Defaults to "TOKEN vN" for v3 pools. */
22
22
  getPoolName?: (ctx: PoolTableCellContext<P, T>) => string;
23
23
  width?: string;
24
- }): PoolTableColumnDef<P, T>;
24
+ }): PoolTableColumnDef<P, T, S>;
25
25
  /**
26
26
  * Total supply column — shows total expected liquidity in USD and native token.
27
27
  *
28
28
  * Used in both charts and client-v3.
29
29
  */
30
- export declare function supplyColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo>(options?: ColumnHeaderOptions & {
30
+ export declare function supplyColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo, S extends string = string>(options?: ColumnHeaderOptions & {
31
31
  width?: string;
32
- sortField?: string;
32
+ sortField?: S;
33
33
  hideOnMedium?: boolean;
34
- }): PoolTableColumnDef<P, T>;
34
+ }): PoolTableColumnDef<P, T, S>;
35
35
  /**
36
36
  * Supply APY column — shows compound APY with tooltip breakdown.
37
37
  *
38
38
  * Used in both charts and client-v3.
39
39
  */
40
- export declare function supplyApyColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo>(options?: ColumnHeaderOptions & {
40
+ export declare function supplyApyColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo, S extends string = string>(options?: ColumnHeaderOptions & {
41
41
  width?: string;
42
- sortField?: string;
43
- }): PoolTableColumnDef<P, T>;
42
+ sortField?: S;
43
+ }): PoolTableColumnDef<P, T, S>;
44
44
  /**
45
45
  * Total borrowed column — shows total borrowed in USD and native token.
46
46
  *
47
47
  * Used in both charts and client-v3.
48
48
  */
49
- export declare function borrowedColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo>(options?: ColumnHeaderOptions & {
49
+ export declare function borrowedColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo, S extends string = string>(options?: ColumnHeaderOptions & {
50
50
  width?: string;
51
- }): PoolTableColumnDef<P, T>;
51
+ }): PoolTableColumnDef<P, T, S>;
52
52
  /**
53
53
  * Borrow APY column — formatted borrow rate (`percentageTemplate`: **basis points**, 10_000 = 100%).
54
54
  *
55
55
  * Prefer `pool.borrowAPY` when the backend (or adapter) fills it; otherwise pass `getBorrowRate`.
56
56
  */
57
- export declare function borrowApyColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo>(options?: ColumnHeaderOptions & {
57
+ export declare function borrowApyColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo, S extends string = string>(options?: ColumnHeaderOptions & {
58
58
  width?: string;
59
59
  /** Custom getter for borrow rate (basis points). Used when `pool.borrowAPY` is undefined. */
60
60
  getBorrowRate?: (pool: P) => number;
61
- }): PoolTableColumnDef<P, T>;
61
+ }): PoolTableColumnDef<P, T, S>;
62
62
  /**
63
63
  * Utilization column — `pool.utilization` (0–100) with a progress bar.
64
64
  */
65
- export declare function utilizationColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo>(options?: ColumnHeaderOptions & {
65
+ export declare function utilizationColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo, S extends string = string>(options?: ColumnHeaderOptions & {
66
66
  width?: string;
67
- sortField?: string;
68
- }): PoolTableColumnDef<P, T>;
67
+ sortField?: S;
68
+ }): PoolTableColumnDef<P, T, S>;
69
69
  /**
70
70
  * Collateral / assets column — shows a list of collateral asset icons.
71
71
  *
72
72
  * Default: reads `pool.collateralTokens` and renders {@link AssetsListCell}.
73
73
  * Override with `cell` / `mobileCell` for custom asset shapes (e.g. client-v3 quota objects).
74
74
  */
75
- export declare function collateralColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo>(options?: ColumnHeaderOptions & {
75
+ export declare function collateralColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo, S extends string = string>(options?: ColumnHeaderOptions & {
76
76
  width?: string;
77
77
  gapBefore?: "sm" | "md" | "none";
78
78
  cell?: (ctx: PoolTableCellContext<P, T>) => React.ReactNode;
@@ -81,21 +81,21 @@ export declare function collateralColumn<P extends PoolDTO = PoolDTO, T extends
81
81
  /** @default 5 */
82
82
  maxAssets?: number;
83
83
  options?: MultiAssetCellProps["options"];
84
- }): PoolTableColumnDef<P, T>;
84
+ }): PoolTableColumnDef<P, T, S>;
85
85
  /**
86
86
  * User balance column (client-v3 style) — USD + amount in pool token.
87
87
  *
88
88
  * Default: `pool.userBalanceInUSD`, `pool.userBalance`, `pool.poolTokenSymbol` (and underlying decimals for formatting).
89
89
  */
90
- export declare function balanceColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo>(options?: ColumnHeaderOptions & {
90
+ export declare function balanceColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo, S extends string = string>(options?: ColumnHeaderOptions & {
91
91
  width?: string;
92
92
  className?: string;
93
93
  headerClassName?: string;
94
- sortField?: string;
94
+ sortField?: S;
95
95
  cell?: (ctx: PoolTableCellContext<P, T>) => React.ReactNode;
96
- }): PoolTableColumnDef<P, T>;
96
+ }): PoolTableColumnDef<P, T, S>;
97
97
  /**
98
98
  * Generic custom column — convenience helper to create a column with minimal boilerplate.
99
99
  */
100
- export declare function customColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo>(def: PoolTableColumnDef<P, T>): PoolTableColumnDef<P, T>;
100
+ export declare function customColumn<P extends PoolDTO = PoolDTO, T extends TokenMetaInfo = TokenMetaInfo, S extends string = string>(def: PoolTableColumnDef<P, T, S>): PoolTableColumnDef<P, T, S>;
101
101
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "3.10.1",
3
+ "version": "3.10.2",
4
4
  "description": "Internal UI components",
5
5
  "repository": "https://github.com/gearbox-protocol/ui-kit",
6
6
  "license": "MIT",