@liberfi.io/ui-tokens 3.0.22 → 3.0.24
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.
- package/dist/index.d.mts +39 -21
- package/dist/index.d.ts +39 -21
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import * as _liberfi_io_types from '@liberfi.io/types';
|
|
4
|
-
import { Token, GetTokenListOptions, TokenProtocol, Chain, WalletTag, TokenSocialMedias, TokenHoldersSortBy, TokenHolder, ActivitiesSortBy, Activity, TokenStats, TokenSecurity as TokenSecurity$1, TokenLiquidity, PortfolioPnl, LimitOrderState, LimitOrder, TokenFieldOption } from '@liberfi.io/types';
|
|
4
|
+
import { Token, GetTokenListOptions, TokenProtocol, Chain, WalletTag, TokenSocialMedias, TokenHoldersSortBy, TokenHolder, ActivitiesSortBy, Activity, TokenStats, TokenSecurity as TokenSecurity$1, TokenLiquidity, PortfolioPnl, LimitOrderState, LimitOrder, TokenTopTrader, TokenTopTradersSortBy, TokenFieldOption } from '@liberfi.io/types';
|
|
5
5
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
6
6
|
import { PopoverProps } from '@liberfi.io/ui';
|
|
7
7
|
export { formatAmount } from '@liberfi.io/utils';
|
|
@@ -23,12 +23,14 @@ interface PulseListProps {
|
|
|
23
23
|
onSelectToken?: (token: Token) => void;
|
|
24
24
|
/** called when the list should pause/resume adding new items (e.g. mouse hover) */
|
|
25
25
|
onPauseChange?: (isPaused: boolean) => void;
|
|
26
|
+
/** callback function when the virtualized list scroll state changes */
|
|
27
|
+
onScrollingChange?: (isScrolling: boolean) => void;
|
|
26
28
|
/** custom styles */
|
|
27
29
|
className?: string;
|
|
28
30
|
/** whether to hide the header */
|
|
29
31
|
hideHeader?: boolean;
|
|
30
32
|
}
|
|
31
|
-
declare function PulseList({ title, tokens, isLoading, itemHeight, renderHeaderExtra, renderItemAction, onSelectToken, onPauseChange, className, hideHeader, }: PulseListProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
declare function PulseList({ title, tokens, isLoading, itemHeight, renderHeaderExtra, renderItemAction, onSelectToken, onPauseChange, onScrollingChange, className, hideHeader, }: PulseListProps): react_jsx_runtime.JSX.Element;
|
|
32
34
|
|
|
33
35
|
interface PulseListHeaderProps {
|
|
34
36
|
title: string;
|
|
@@ -85,6 +87,10 @@ type UsePulseNewListScriptParams = {
|
|
|
85
87
|
filters?: TokenListFiltersType;
|
|
86
88
|
/** whether to pause adding new items (existing items still update) */
|
|
87
89
|
isPaused?: boolean;
|
|
90
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
91
|
+
deferUpdates?: boolean;
|
|
92
|
+
/** minimum interval for batched websocket updates */
|
|
93
|
+
updateFlushInterval?: number;
|
|
88
94
|
};
|
|
89
95
|
type UsePulseNewListScriptResult = {
|
|
90
96
|
/** whether tokens are loading */
|
|
@@ -92,7 +98,7 @@ type UsePulseNewListScriptResult = {
|
|
|
92
98
|
/** token list */
|
|
93
99
|
tokens: Token[];
|
|
94
100
|
};
|
|
95
|
-
declare function usePulseNewListScript({ chain, filters, isPaused, }: UsePulseNewListScriptParams): UsePulseNewListScriptResult;
|
|
101
|
+
declare function usePulseNewListScript({ chain, filters, isPaused, deferUpdates, updateFlushInterval, }: UsePulseNewListScriptParams): UsePulseNewListScriptResult;
|
|
96
102
|
|
|
97
103
|
interface PulseNewListWidgetProps {
|
|
98
104
|
/** chain id */
|
|
@@ -123,6 +129,10 @@ type UsePulseMigratedListScriptParams = {
|
|
|
123
129
|
isPaused?: boolean;
|
|
124
130
|
/** refetch interval in milliseconds */
|
|
125
131
|
refetchInterval?: number;
|
|
132
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
133
|
+
deferUpdates?: boolean;
|
|
134
|
+
/** minimum interval for batched websocket updates */
|
|
135
|
+
updateFlushInterval?: number;
|
|
126
136
|
};
|
|
127
137
|
type UsePulseMigratedListScriptResult = {
|
|
128
138
|
/** whether tokens are loading */
|
|
@@ -130,7 +140,7 @@ type UsePulseMigratedListScriptResult = {
|
|
|
130
140
|
/** token list */
|
|
131
141
|
tokens: Token[];
|
|
132
142
|
};
|
|
133
|
-
declare function usePulseMigratedListScript({ chain, filters, isPaused, refetchInterval, }: UsePulseMigratedListScriptParams): UsePulseMigratedListScriptResult;
|
|
143
|
+
declare function usePulseMigratedListScript({ chain, filters, isPaused, refetchInterval, deferUpdates, updateFlushInterval, }: UsePulseMigratedListScriptParams): UsePulseMigratedListScriptResult;
|
|
134
144
|
|
|
135
145
|
interface PulseMigratedListWidgetProps {
|
|
136
146
|
/** chain id */
|
|
@@ -161,6 +171,10 @@ type UsePulseFinalStretchListScriptParams = {
|
|
|
161
171
|
isPaused?: boolean;
|
|
162
172
|
/** refetch interval in milliseconds */
|
|
163
173
|
refetchInterval?: number;
|
|
174
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
175
|
+
deferUpdates?: boolean;
|
|
176
|
+
/** minimum interval for batched websocket updates */
|
|
177
|
+
updateFlushInterval?: number;
|
|
164
178
|
};
|
|
165
179
|
type UsePulseFinalStretchListScriptResult = {
|
|
166
180
|
/** whether tokens are loading */
|
|
@@ -168,7 +182,7 @@ type UsePulseFinalStretchListScriptResult = {
|
|
|
168
182
|
/** token list */
|
|
169
183
|
tokens: Token[];
|
|
170
184
|
};
|
|
171
|
-
declare function usePulseFinalStretchListScript({ chain, filters, isPaused, refetchInterval, }: UsePulseFinalStretchListScriptParams): UsePulseFinalStretchListScriptResult;
|
|
185
|
+
declare function usePulseFinalStretchListScript({ chain, filters, isPaused, refetchInterval, deferUpdates, updateFlushInterval, }: UsePulseFinalStretchListScriptParams): UsePulseFinalStretchListScriptResult;
|
|
172
186
|
|
|
173
187
|
interface PulseFinalStretchListWidgetProps {
|
|
174
188
|
/** chain id */
|
|
@@ -1321,7 +1335,7 @@ interface TokenOrdersListWidgetProps {
|
|
|
1321
1335
|
declare function TokenOrdersListWidget({ chain, wallet, tokenAddress, tokenSymbol, limit, initialStateFilter, initialCurrency, nativeSymbol, onCancelAll, renderActions, className, }: TokenOrdersListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1322
1336
|
|
|
1323
1337
|
interface TokenTopTradersListProps {
|
|
1324
|
-
traders: Array<
|
|
1338
|
+
traders: Array<TokenTopTrader>;
|
|
1325
1339
|
isLoading?: boolean;
|
|
1326
1340
|
hasMore?: boolean;
|
|
1327
1341
|
onLoadMore?: () => void;
|
|
@@ -1336,10 +1350,7 @@ interface TokenTopTradersListProps {
|
|
|
1336
1350
|
* Presentational Top Traders list — visually parallel to
|
|
1337
1351
|
* {@link TokenHoldersList} but with its own header + filters.
|
|
1338
1352
|
*
|
|
1339
|
-
*
|
|
1340
|
-
* realised PnL; the Realized PnL column stays blank (`—`) until the API
|
|
1341
|
-
* adds per-holder PnL fields. When that lands, extend
|
|
1342
|
-
* `TokenHolder` with the new fields and wire them into the cells here.
|
|
1353
|
+
* Uses the token top-traders endpoint and its trader-specific PnL fields.
|
|
1343
1354
|
*/
|
|
1344
1355
|
declare function TokenTopTradersList({ traders, isLoading, hasMore, onLoadMore, onlyTracked, onOnlyTrackedChange, now, renderAddress, className, }: TokenTopTradersListProps): react_jsx_runtime.JSX.Element;
|
|
1345
1356
|
|
|
@@ -1347,11 +1358,15 @@ interface UseTokenTopTradersListScriptParams {
|
|
|
1347
1358
|
chain: Chain;
|
|
1348
1359
|
address: string;
|
|
1349
1360
|
limit?: number;
|
|
1361
|
+
/** initial sortBy; undefined means the first request uses server default ordering. */
|
|
1362
|
+
initialSortBy?: TokenTopTradersSortBy;
|
|
1350
1363
|
initialOnlyTracked?: boolean;
|
|
1351
1364
|
}
|
|
1352
1365
|
interface UseTokenTopTradersListScriptResult {
|
|
1353
|
-
traders: Array<
|
|
1366
|
+
traders: Array<TokenTopTrader>;
|
|
1354
1367
|
isLoading: boolean;
|
|
1368
|
+
sortBy: TokenTopTradersSortBy | undefined;
|
|
1369
|
+
setSortBy: (s: TokenTopTradersSortBy) => void;
|
|
1355
1370
|
hasMore: boolean;
|
|
1356
1371
|
loadMore: () => void;
|
|
1357
1372
|
onlyTracked: boolean;
|
|
@@ -1360,13 +1375,12 @@ interface UseTokenTopTradersListScriptResult {
|
|
|
1360
1375
|
/**
|
|
1361
1376
|
* Script for the top-traders list widget.
|
|
1362
1377
|
*
|
|
1363
|
-
* Builds on {@link useTokenTopTradersQuery}
|
|
1364
|
-
* endpoint with `sortBy=realizedPnl`). `onlyTracked` is a client-side
|
|
1378
|
+
* Builds on {@link useTokenTopTradersQuery}. `onlyTracked` is a client-side
|
|
1365
1379
|
* filter retained for UI parity with Axiom — until the server flags
|
|
1366
1380
|
* tracked wallets, the toggle narrows visible rows to those whose `tags`
|
|
1367
1381
|
* list is non-empty (a reasonable proxy for "tracked by someone").
|
|
1368
1382
|
*/
|
|
1369
|
-
declare function useTokenTopTradersListScript({ chain, address, limit, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
|
|
1383
|
+
declare function useTokenTopTradersListScript({ chain, address, limit, initialSortBy, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
|
|
1370
1384
|
|
|
1371
1385
|
interface TokenTopTradersListWidgetProps {
|
|
1372
1386
|
chain: Chain;
|
|
@@ -1626,24 +1640,30 @@ type TokenListFilterModalProps = Pick<TokenListFilterProps, "protocols" | "resol
|
|
|
1626
1640
|
triggerVariant?: "default" | "plain";
|
|
1627
1641
|
/** active badge placement on the trigger */
|
|
1628
1642
|
badgePlacement?: "outer" | "icon";
|
|
1643
|
+
/** trigger button className */
|
|
1644
|
+
className?: string;
|
|
1629
1645
|
};
|
|
1630
|
-
declare function TokenListFilterModal({ protocols, resolution, filters, onFiltersChange, triggerVariant, badgePlacement, }: TokenListFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
1646
|
+
declare function TokenListFilterModal({ protocols, resolution, filters, onFiltersChange, triggerVariant, badgePlacement, className, }: TokenListFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
1631
1647
|
|
|
1632
1648
|
type TokenListFilterPopoverProps = Pick<PopoverProps, "placement"> & Pick<TokenListFilterProps, "protocols" | "resolution" | "filters" | "onFiltersChange"> & {
|
|
1633
1649
|
/** whether to render only the filter icon in the trigger */
|
|
1634
1650
|
iconOnly?: boolean;
|
|
1651
|
+
/** trigger button className */
|
|
1652
|
+
className?: string;
|
|
1635
1653
|
};
|
|
1636
|
-
declare function TokenListFilterPopover({ protocols, resolution, filters, onFiltersChange, iconOnly, }: TokenListFilterPopoverProps): react_jsx_runtime.JSX.Element;
|
|
1654
|
+
declare function TokenListFilterPopover({ protocols, resolution, filters, onFiltersChange, iconOnly, className, }: TokenListFilterPopoverProps): react_jsx_runtime.JSX.Element;
|
|
1637
1655
|
|
|
1638
1656
|
type TokenListFilterWidgetProps = TokenListFilterModalProps & {
|
|
1639
1657
|
/** Popover placement used on non-mobile screens. @default "bottom-end" */
|
|
1640
1658
|
popoverPlacement?: PopoverProps["placement"];
|
|
1641
1659
|
/** whether to render only the filter icon in the non-mobile trigger */
|
|
1642
1660
|
iconOnly?: boolean;
|
|
1661
|
+
/** trigger button className */
|
|
1662
|
+
className?: string;
|
|
1643
1663
|
/** overlay used on non-mobile screens. @default "popover" */
|
|
1644
1664
|
desktopOverlay?: "popover" | "modal";
|
|
1645
1665
|
};
|
|
1646
|
-
declare function TokenListFilterWidget({ popoverPlacement, iconOnly, desktopOverlay, ...filterProps }: TokenListFilterWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1666
|
+
declare function TokenListFilterWidget({ popoverPlacement, iconOnly, className, desktopOverlay, ...filterProps }: TokenListFilterWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1647
1667
|
|
|
1648
1668
|
declare function TokenListResolutionSelectorDesktop({ resolution, onResolutionChange, resolutionOptions, }: TokenListResolutionSelectorProps): react_jsx_runtime.JSX.Element;
|
|
1649
1669
|
|
|
@@ -1747,10 +1767,8 @@ type UseNewTokensScriptParams = {
|
|
|
1747
1767
|
chain: Chain;
|
|
1748
1768
|
/** resolution */
|
|
1749
1769
|
resolution: TokenListResolution;
|
|
1750
|
-
/**
|
|
1770
|
+
/** local display options */
|
|
1751
1771
|
options?: GetTokenListOptions;
|
|
1752
|
-
/** refetch tokens interval */
|
|
1753
|
-
refetchInterval?: number;
|
|
1754
1772
|
/** defer websocket updates while the list is actively scrolling */
|
|
1755
1773
|
deferUpdates?: boolean;
|
|
1756
1774
|
/** minimum interval for batched websocket updates */
|
|
@@ -1762,7 +1780,7 @@ type UseNewTokensScriptResult = {
|
|
|
1762
1780
|
/** tokens */
|
|
1763
1781
|
tokens: Array<Token>;
|
|
1764
1782
|
};
|
|
1765
|
-
declare function useNewTokensScript({ chain,
|
|
1783
|
+
declare function useNewTokensScript({ chain, options, deferUpdates, updateFlushInterval, }: UseNewTokensScriptParams): UseNewTokensScriptResult;
|
|
1766
1784
|
|
|
1767
1785
|
type NewTokenListWidgetProps = {
|
|
1768
1786
|
/** chain id */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import * as _liberfi_io_types from '@liberfi.io/types';
|
|
4
|
-
import { Token, GetTokenListOptions, TokenProtocol, Chain, WalletTag, TokenSocialMedias, TokenHoldersSortBy, TokenHolder, ActivitiesSortBy, Activity, TokenStats, TokenSecurity as TokenSecurity$1, TokenLiquidity, PortfolioPnl, LimitOrderState, LimitOrder, TokenFieldOption } from '@liberfi.io/types';
|
|
4
|
+
import { Token, GetTokenListOptions, TokenProtocol, Chain, WalletTag, TokenSocialMedias, TokenHoldersSortBy, TokenHolder, ActivitiesSortBy, Activity, TokenStats, TokenSecurity as TokenSecurity$1, TokenLiquidity, PortfolioPnl, LimitOrderState, LimitOrder, TokenTopTrader, TokenTopTradersSortBy, TokenFieldOption } from '@liberfi.io/types';
|
|
5
5
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
6
6
|
import { PopoverProps } from '@liberfi.io/ui';
|
|
7
7
|
export { formatAmount } from '@liberfi.io/utils';
|
|
@@ -23,12 +23,14 @@ interface PulseListProps {
|
|
|
23
23
|
onSelectToken?: (token: Token) => void;
|
|
24
24
|
/** called when the list should pause/resume adding new items (e.g. mouse hover) */
|
|
25
25
|
onPauseChange?: (isPaused: boolean) => void;
|
|
26
|
+
/** callback function when the virtualized list scroll state changes */
|
|
27
|
+
onScrollingChange?: (isScrolling: boolean) => void;
|
|
26
28
|
/** custom styles */
|
|
27
29
|
className?: string;
|
|
28
30
|
/** whether to hide the header */
|
|
29
31
|
hideHeader?: boolean;
|
|
30
32
|
}
|
|
31
|
-
declare function PulseList({ title, tokens, isLoading, itemHeight, renderHeaderExtra, renderItemAction, onSelectToken, onPauseChange, className, hideHeader, }: PulseListProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
declare function PulseList({ title, tokens, isLoading, itemHeight, renderHeaderExtra, renderItemAction, onSelectToken, onPauseChange, onScrollingChange, className, hideHeader, }: PulseListProps): react_jsx_runtime.JSX.Element;
|
|
32
34
|
|
|
33
35
|
interface PulseListHeaderProps {
|
|
34
36
|
title: string;
|
|
@@ -85,6 +87,10 @@ type UsePulseNewListScriptParams = {
|
|
|
85
87
|
filters?: TokenListFiltersType;
|
|
86
88
|
/** whether to pause adding new items (existing items still update) */
|
|
87
89
|
isPaused?: boolean;
|
|
90
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
91
|
+
deferUpdates?: boolean;
|
|
92
|
+
/** minimum interval for batched websocket updates */
|
|
93
|
+
updateFlushInterval?: number;
|
|
88
94
|
};
|
|
89
95
|
type UsePulseNewListScriptResult = {
|
|
90
96
|
/** whether tokens are loading */
|
|
@@ -92,7 +98,7 @@ type UsePulseNewListScriptResult = {
|
|
|
92
98
|
/** token list */
|
|
93
99
|
tokens: Token[];
|
|
94
100
|
};
|
|
95
|
-
declare function usePulseNewListScript({ chain, filters, isPaused, }: UsePulseNewListScriptParams): UsePulseNewListScriptResult;
|
|
101
|
+
declare function usePulseNewListScript({ chain, filters, isPaused, deferUpdates, updateFlushInterval, }: UsePulseNewListScriptParams): UsePulseNewListScriptResult;
|
|
96
102
|
|
|
97
103
|
interface PulseNewListWidgetProps {
|
|
98
104
|
/** chain id */
|
|
@@ -123,6 +129,10 @@ type UsePulseMigratedListScriptParams = {
|
|
|
123
129
|
isPaused?: boolean;
|
|
124
130
|
/** refetch interval in milliseconds */
|
|
125
131
|
refetchInterval?: number;
|
|
132
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
133
|
+
deferUpdates?: boolean;
|
|
134
|
+
/** minimum interval for batched websocket updates */
|
|
135
|
+
updateFlushInterval?: number;
|
|
126
136
|
};
|
|
127
137
|
type UsePulseMigratedListScriptResult = {
|
|
128
138
|
/** whether tokens are loading */
|
|
@@ -130,7 +140,7 @@ type UsePulseMigratedListScriptResult = {
|
|
|
130
140
|
/** token list */
|
|
131
141
|
tokens: Token[];
|
|
132
142
|
};
|
|
133
|
-
declare function usePulseMigratedListScript({ chain, filters, isPaused, refetchInterval, }: UsePulseMigratedListScriptParams): UsePulseMigratedListScriptResult;
|
|
143
|
+
declare function usePulseMigratedListScript({ chain, filters, isPaused, refetchInterval, deferUpdates, updateFlushInterval, }: UsePulseMigratedListScriptParams): UsePulseMigratedListScriptResult;
|
|
134
144
|
|
|
135
145
|
interface PulseMigratedListWidgetProps {
|
|
136
146
|
/** chain id */
|
|
@@ -161,6 +171,10 @@ type UsePulseFinalStretchListScriptParams = {
|
|
|
161
171
|
isPaused?: boolean;
|
|
162
172
|
/** refetch interval in milliseconds */
|
|
163
173
|
refetchInterval?: number;
|
|
174
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
175
|
+
deferUpdates?: boolean;
|
|
176
|
+
/** minimum interval for batched websocket updates */
|
|
177
|
+
updateFlushInterval?: number;
|
|
164
178
|
};
|
|
165
179
|
type UsePulseFinalStretchListScriptResult = {
|
|
166
180
|
/** whether tokens are loading */
|
|
@@ -168,7 +182,7 @@ type UsePulseFinalStretchListScriptResult = {
|
|
|
168
182
|
/** token list */
|
|
169
183
|
tokens: Token[];
|
|
170
184
|
};
|
|
171
|
-
declare function usePulseFinalStretchListScript({ chain, filters, isPaused, refetchInterval, }: UsePulseFinalStretchListScriptParams): UsePulseFinalStretchListScriptResult;
|
|
185
|
+
declare function usePulseFinalStretchListScript({ chain, filters, isPaused, refetchInterval, deferUpdates, updateFlushInterval, }: UsePulseFinalStretchListScriptParams): UsePulseFinalStretchListScriptResult;
|
|
172
186
|
|
|
173
187
|
interface PulseFinalStretchListWidgetProps {
|
|
174
188
|
/** chain id */
|
|
@@ -1321,7 +1335,7 @@ interface TokenOrdersListWidgetProps {
|
|
|
1321
1335
|
declare function TokenOrdersListWidget({ chain, wallet, tokenAddress, tokenSymbol, limit, initialStateFilter, initialCurrency, nativeSymbol, onCancelAll, renderActions, className, }: TokenOrdersListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1322
1336
|
|
|
1323
1337
|
interface TokenTopTradersListProps {
|
|
1324
|
-
traders: Array<
|
|
1338
|
+
traders: Array<TokenTopTrader>;
|
|
1325
1339
|
isLoading?: boolean;
|
|
1326
1340
|
hasMore?: boolean;
|
|
1327
1341
|
onLoadMore?: () => void;
|
|
@@ -1336,10 +1350,7 @@ interface TokenTopTradersListProps {
|
|
|
1336
1350
|
* Presentational Top Traders list — visually parallel to
|
|
1337
1351
|
* {@link TokenHoldersList} but with its own header + filters.
|
|
1338
1352
|
*
|
|
1339
|
-
*
|
|
1340
|
-
* realised PnL; the Realized PnL column stays blank (`—`) until the API
|
|
1341
|
-
* adds per-holder PnL fields. When that lands, extend
|
|
1342
|
-
* `TokenHolder` with the new fields and wire them into the cells here.
|
|
1353
|
+
* Uses the token top-traders endpoint and its trader-specific PnL fields.
|
|
1343
1354
|
*/
|
|
1344
1355
|
declare function TokenTopTradersList({ traders, isLoading, hasMore, onLoadMore, onlyTracked, onOnlyTrackedChange, now, renderAddress, className, }: TokenTopTradersListProps): react_jsx_runtime.JSX.Element;
|
|
1345
1356
|
|
|
@@ -1347,11 +1358,15 @@ interface UseTokenTopTradersListScriptParams {
|
|
|
1347
1358
|
chain: Chain;
|
|
1348
1359
|
address: string;
|
|
1349
1360
|
limit?: number;
|
|
1361
|
+
/** initial sortBy; undefined means the first request uses server default ordering. */
|
|
1362
|
+
initialSortBy?: TokenTopTradersSortBy;
|
|
1350
1363
|
initialOnlyTracked?: boolean;
|
|
1351
1364
|
}
|
|
1352
1365
|
interface UseTokenTopTradersListScriptResult {
|
|
1353
|
-
traders: Array<
|
|
1366
|
+
traders: Array<TokenTopTrader>;
|
|
1354
1367
|
isLoading: boolean;
|
|
1368
|
+
sortBy: TokenTopTradersSortBy | undefined;
|
|
1369
|
+
setSortBy: (s: TokenTopTradersSortBy) => void;
|
|
1355
1370
|
hasMore: boolean;
|
|
1356
1371
|
loadMore: () => void;
|
|
1357
1372
|
onlyTracked: boolean;
|
|
@@ -1360,13 +1375,12 @@ interface UseTokenTopTradersListScriptResult {
|
|
|
1360
1375
|
/**
|
|
1361
1376
|
* Script for the top-traders list widget.
|
|
1362
1377
|
*
|
|
1363
|
-
* Builds on {@link useTokenTopTradersQuery}
|
|
1364
|
-
* endpoint with `sortBy=realizedPnl`). `onlyTracked` is a client-side
|
|
1378
|
+
* Builds on {@link useTokenTopTradersQuery}. `onlyTracked` is a client-side
|
|
1365
1379
|
* filter retained for UI parity with Axiom — until the server flags
|
|
1366
1380
|
* tracked wallets, the toggle narrows visible rows to those whose `tags`
|
|
1367
1381
|
* list is non-empty (a reasonable proxy for "tracked by someone").
|
|
1368
1382
|
*/
|
|
1369
|
-
declare function useTokenTopTradersListScript({ chain, address, limit, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
|
|
1383
|
+
declare function useTokenTopTradersListScript({ chain, address, limit, initialSortBy, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
|
|
1370
1384
|
|
|
1371
1385
|
interface TokenTopTradersListWidgetProps {
|
|
1372
1386
|
chain: Chain;
|
|
@@ -1626,24 +1640,30 @@ type TokenListFilterModalProps = Pick<TokenListFilterProps, "protocols" | "resol
|
|
|
1626
1640
|
triggerVariant?: "default" | "plain";
|
|
1627
1641
|
/** active badge placement on the trigger */
|
|
1628
1642
|
badgePlacement?: "outer" | "icon";
|
|
1643
|
+
/** trigger button className */
|
|
1644
|
+
className?: string;
|
|
1629
1645
|
};
|
|
1630
|
-
declare function TokenListFilterModal({ protocols, resolution, filters, onFiltersChange, triggerVariant, badgePlacement, }: TokenListFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
1646
|
+
declare function TokenListFilterModal({ protocols, resolution, filters, onFiltersChange, triggerVariant, badgePlacement, className, }: TokenListFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
1631
1647
|
|
|
1632
1648
|
type TokenListFilterPopoverProps = Pick<PopoverProps, "placement"> & Pick<TokenListFilterProps, "protocols" | "resolution" | "filters" | "onFiltersChange"> & {
|
|
1633
1649
|
/** whether to render only the filter icon in the trigger */
|
|
1634
1650
|
iconOnly?: boolean;
|
|
1651
|
+
/** trigger button className */
|
|
1652
|
+
className?: string;
|
|
1635
1653
|
};
|
|
1636
|
-
declare function TokenListFilterPopover({ protocols, resolution, filters, onFiltersChange, iconOnly, }: TokenListFilterPopoverProps): react_jsx_runtime.JSX.Element;
|
|
1654
|
+
declare function TokenListFilterPopover({ protocols, resolution, filters, onFiltersChange, iconOnly, className, }: TokenListFilterPopoverProps): react_jsx_runtime.JSX.Element;
|
|
1637
1655
|
|
|
1638
1656
|
type TokenListFilterWidgetProps = TokenListFilterModalProps & {
|
|
1639
1657
|
/** Popover placement used on non-mobile screens. @default "bottom-end" */
|
|
1640
1658
|
popoverPlacement?: PopoverProps["placement"];
|
|
1641
1659
|
/** whether to render only the filter icon in the non-mobile trigger */
|
|
1642
1660
|
iconOnly?: boolean;
|
|
1661
|
+
/** trigger button className */
|
|
1662
|
+
className?: string;
|
|
1643
1663
|
/** overlay used on non-mobile screens. @default "popover" */
|
|
1644
1664
|
desktopOverlay?: "popover" | "modal";
|
|
1645
1665
|
};
|
|
1646
|
-
declare function TokenListFilterWidget({ popoverPlacement, iconOnly, desktopOverlay, ...filterProps }: TokenListFilterWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1666
|
+
declare function TokenListFilterWidget({ popoverPlacement, iconOnly, className, desktopOverlay, ...filterProps }: TokenListFilterWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1647
1667
|
|
|
1648
1668
|
declare function TokenListResolutionSelectorDesktop({ resolution, onResolutionChange, resolutionOptions, }: TokenListResolutionSelectorProps): react_jsx_runtime.JSX.Element;
|
|
1649
1669
|
|
|
@@ -1747,10 +1767,8 @@ type UseNewTokensScriptParams = {
|
|
|
1747
1767
|
chain: Chain;
|
|
1748
1768
|
/** resolution */
|
|
1749
1769
|
resolution: TokenListResolution;
|
|
1750
|
-
/**
|
|
1770
|
+
/** local display options */
|
|
1751
1771
|
options?: GetTokenListOptions;
|
|
1752
|
-
/** refetch tokens interval */
|
|
1753
|
-
refetchInterval?: number;
|
|
1754
1772
|
/** defer websocket updates while the list is actively scrolling */
|
|
1755
1773
|
deferUpdates?: boolean;
|
|
1756
1774
|
/** minimum interval for batched websocket updates */
|
|
@@ -1762,7 +1780,7 @@ type UseNewTokensScriptResult = {
|
|
|
1762
1780
|
/** tokens */
|
|
1763
1781
|
tokens: Array<Token>;
|
|
1764
1782
|
};
|
|
1765
|
-
declare function useNewTokensScript({ chain,
|
|
1783
|
+
declare function useNewTokensScript({ chain, options, deferUpdates, updateFlushInterval, }: UseNewTokensScriptParams): UseNewTokensScriptResult;
|
|
1766
1784
|
|
|
1767
1785
|
type NewTokenListWidgetProps = {
|
|
1768
1786
|
/** chain id */
|