@liberfi.io/ui-tokens 3.0.23 → 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 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';
@@ -1335,7 +1335,7 @@ interface TokenOrdersListWidgetProps {
1335
1335
  declare function TokenOrdersListWidget({ chain, wallet, tokenAddress, tokenSymbol, limit, initialStateFilter, initialCurrency, nativeSymbol, onCancelAll, renderActions, className, }: TokenOrdersListWidgetProps): react_jsx_runtime.JSX.Element;
1336
1336
 
1337
1337
  interface TokenTopTradersListProps {
1338
- traders: Array<TokenHolder>;
1338
+ traders: Array<TokenTopTrader>;
1339
1339
  isLoading?: boolean;
1340
1340
  hasMore?: boolean;
1341
1341
  onLoadMore?: () => void;
@@ -1350,10 +1350,7 @@ interface TokenTopTradersListProps {
1350
1350
  * Presentational Top Traders list — visually parallel to
1351
1351
  * {@link TokenHoldersList} but with its own header + filters.
1352
1352
  *
1353
- * The server currently returns the same row shape as holders, ranked by
1354
- * realised PnL; the Realized PnL column stays blank (`—`) until the API
1355
- * adds per-holder PnL fields. When that lands, extend
1356
- * `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.
1357
1354
  */
1358
1355
  declare function TokenTopTradersList({ traders, isLoading, hasMore, onLoadMore, onlyTracked, onOnlyTrackedChange, now, renderAddress, className, }: TokenTopTradersListProps): react_jsx_runtime.JSX.Element;
1359
1356
 
@@ -1361,11 +1358,15 @@ interface UseTokenTopTradersListScriptParams {
1361
1358
  chain: Chain;
1362
1359
  address: string;
1363
1360
  limit?: number;
1361
+ /** initial sortBy; undefined means the first request uses server default ordering. */
1362
+ initialSortBy?: TokenTopTradersSortBy;
1364
1363
  initialOnlyTracked?: boolean;
1365
1364
  }
1366
1365
  interface UseTokenTopTradersListScriptResult {
1367
- traders: Array<TokenHolder>;
1366
+ traders: Array<TokenTopTrader>;
1368
1367
  isLoading: boolean;
1368
+ sortBy: TokenTopTradersSortBy | undefined;
1369
+ setSortBy: (s: TokenTopTradersSortBy) => void;
1369
1370
  hasMore: boolean;
1370
1371
  loadMore: () => void;
1371
1372
  onlyTracked: boolean;
@@ -1374,13 +1375,12 @@ interface UseTokenTopTradersListScriptResult {
1374
1375
  /**
1375
1376
  * Script for the top-traders list widget.
1376
1377
  *
1377
- * Builds on {@link useTokenTopTradersQuery} (bridge over the holders
1378
- * endpoint with `sortBy=realizedPnl`). `onlyTracked` is a client-side
1378
+ * Builds on {@link useTokenTopTradersQuery}. `onlyTracked` is a client-side
1379
1379
  * filter retained for UI parity with Axiom — until the server flags
1380
1380
  * tracked wallets, the toggle narrows visible rows to those whose `tags`
1381
1381
  * list is non-empty (a reasonable proxy for "tracked by someone").
1382
1382
  */
1383
- declare function useTokenTopTradersListScript({ chain, address, limit, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
1383
+ declare function useTokenTopTradersListScript({ chain, address, limit, initialSortBy, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
1384
1384
 
1385
1385
  interface TokenTopTradersListWidgetProps {
1386
1386
  chain: Chain;
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';
@@ -1335,7 +1335,7 @@ interface TokenOrdersListWidgetProps {
1335
1335
  declare function TokenOrdersListWidget({ chain, wallet, tokenAddress, tokenSymbol, limit, initialStateFilter, initialCurrency, nativeSymbol, onCancelAll, renderActions, className, }: TokenOrdersListWidgetProps): react_jsx_runtime.JSX.Element;
1336
1336
 
1337
1337
  interface TokenTopTradersListProps {
1338
- traders: Array<TokenHolder>;
1338
+ traders: Array<TokenTopTrader>;
1339
1339
  isLoading?: boolean;
1340
1340
  hasMore?: boolean;
1341
1341
  onLoadMore?: () => void;
@@ -1350,10 +1350,7 @@ interface TokenTopTradersListProps {
1350
1350
  * Presentational Top Traders list — visually parallel to
1351
1351
  * {@link TokenHoldersList} but with its own header + filters.
1352
1352
  *
1353
- * The server currently returns the same row shape as holders, ranked by
1354
- * realised PnL; the Realized PnL column stays blank (`—`) until the API
1355
- * adds per-holder PnL fields. When that lands, extend
1356
- * `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.
1357
1354
  */
1358
1355
  declare function TokenTopTradersList({ traders, isLoading, hasMore, onLoadMore, onlyTracked, onOnlyTrackedChange, now, renderAddress, className, }: TokenTopTradersListProps): react_jsx_runtime.JSX.Element;
1359
1356
 
@@ -1361,11 +1358,15 @@ interface UseTokenTopTradersListScriptParams {
1361
1358
  chain: Chain;
1362
1359
  address: string;
1363
1360
  limit?: number;
1361
+ /** initial sortBy; undefined means the first request uses server default ordering. */
1362
+ initialSortBy?: TokenTopTradersSortBy;
1364
1363
  initialOnlyTracked?: boolean;
1365
1364
  }
1366
1365
  interface UseTokenTopTradersListScriptResult {
1367
- traders: Array<TokenHolder>;
1366
+ traders: Array<TokenTopTrader>;
1368
1367
  isLoading: boolean;
1368
+ sortBy: TokenTopTradersSortBy | undefined;
1369
+ setSortBy: (s: TokenTopTradersSortBy) => void;
1369
1370
  hasMore: boolean;
1370
1371
  loadMore: () => void;
1371
1372
  onlyTracked: boolean;
@@ -1374,13 +1375,12 @@ interface UseTokenTopTradersListScriptResult {
1374
1375
  /**
1375
1376
  * Script for the top-traders list widget.
1376
1377
  *
1377
- * Builds on {@link useTokenTopTradersQuery} (bridge over the holders
1378
- * endpoint with `sortBy=realizedPnl`). `onlyTracked` is a client-side
1378
+ * Builds on {@link useTokenTopTradersQuery}. `onlyTracked` is a client-side
1379
1379
  * filter retained for UI parity with Axiom — until the server flags
1380
1380
  * tracked wallets, the toggle narrows visible rows to those whose `tags`
1381
1381
  * list is non-empty (a reasonable proxy for "tracked by someone").
1382
1382
  */
1383
- declare function useTokenTopTradersListScript({ chain, address, limit, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
1383
+ declare function useTokenTopTradersListScript({ chain, address, limit, initialSortBy, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
1384
1384
 
1385
1385
  interface TokenTopTradersListWidgetProps {
1386
1386
  chain: Chain;