@liberfi.io/ui-tokens 3.0.23 → 3.0.25

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';
@@ -749,7 +749,7 @@ type TokenActivitiesListCurrency = "usd" | "native";
749
749
  interface TokenActivitiesListProps {
750
750
  activities: Array<Activity>;
751
751
  isLoading?: boolean;
752
- sortBy: TokenActivitiesListSortBy;
752
+ sortBy?: TokenActivitiesListSortBy;
753
753
  onSortByChange: (sortBy: TokenActivitiesListSortBy) => void;
754
754
  /** filter by activity type; "all" shows everything including liquidity / red packets */
755
755
  typeFilter?: "all" | "buy" | "sell";
@@ -788,7 +788,7 @@ interface UseTokenActivitiesListScriptParams {
788
788
  interface UseTokenActivitiesListScriptResult {
789
789
  activities: Array<Activity>;
790
790
  isLoading: boolean;
791
- sortBy: TokenActivitiesListSortBy;
791
+ sortBy: TokenActivitiesListSortBy | undefined;
792
792
  setSortBy: (s: TokenActivitiesListSortBy) => void;
793
793
  typeFilter: "all" | "buy" | "sell";
794
794
  setTypeFilter: (t: "all" | "buy" | "sell") => void;
@@ -803,9 +803,10 @@ interface UseTokenActivitiesListScriptResult {
803
803
  * and semantic filters change the result set.
804
804
  *
805
805
  * Realtime: {@link useTokenActivitiesSubscription} prepends new activities to
806
- * the first page while we're on the default `timestamp` sort + `all` filter
807
- * (and no cursor has been pushed). In other states, live pushes are ignored
808
- * to avoid confusing the sorted / filtered window.
806
+ * the first page while we're on the server default ordering (or explicit
807
+ * `timestamp`) + `all` filter (and no cursor has been pushed). In other
808
+ * states, live pushes are ignored to avoid confusing the sorted / filtered
809
+ * window.
809
810
  */
810
811
  declare function useTokenActivitiesListScript({ chain, address, limit, initialSortBy, initialTypeFilter, }: UseTokenActivitiesListScriptParams): UseTokenActivitiesListScriptResult;
811
812
 
@@ -1335,7 +1336,7 @@ interface TokenOrdersListWidgetProps {
1335
1336
  declare function TokenOrdersListWidget({ chain, wallet, tokenAddress, tokenSymbol, limit, initialStateFilter, initialCurrency, nativeSymbol, onCancelAll, renderActions, className, }: TokenOrdersListWidgetProps): react_jsx_runtime.JSX.Element;
1336
1337
 
1337
1338
  interface TokenTopTradersListProps {
1338
- traders: Array<TokenHolder>;
1339
+ traders: Array<TokenTopTrader>;
1339
1340
  isLoading?: boolean;
1340
1341
  hasMore?: boolean;
1341
1342
  onLoadMore?: () => void;
@@ -1350,10 +1351,7 @@ interface TokenTopTradersListProps {
1350
1351
  * Presentational Top Traders list — visually parallel to
1351
1352
  * {@link TokenHoldersList} but with its own header + filters.
1352
1353
  *
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.
1354
+ * Uses the token top-traders endpoint and its trader-specific PnL fields.
1357
1355
  */
1358
1356
  declare function TokenTopTradersList({ traders, isLoading, hasMore, onLoadMore, onlyTracked, onOnlyTrackedChange, now, renderAddress, className, }: TokenTopTradersListProps): react_jsx_runtime.JSX.Element;
1359
1357
 
@@ -1361,11 +1359,15 @@ interface UseTokenTopTradersListScriptParams {
1361
1359
  chain: Chain;
1362
1360
  address: string;
1363
1361
  limit?: number;
1362
+ /** initial sortBy; undefined means the first request uses server default ordering. */
1363
+ initialSortBy?: TokenTopTradersSortBy;
1364
1364
  initialOnlyTracked?: boolean;
1365
1365
  }
1366
1366
  interface UseTokenTopTradersListScriptResult {
1367
- traders: Array<TokenHolder>;
1367
+ traders: Array<TokenTopTrader>;
1368
1368
  isLoading: boolean;
1369
+ sortBy: TokenTopTradersSortBy | undefined;
1370
+ setSortBy: (s: TokenTopTradersSortBy) => void;
1369
1371
  hasMore: boolean;
1370
1372
  loadMore: () => void;
1371
1373
  onlyTracked: boolean;
@@ -1374,13 +1376,12 @@ interface UseTokenTopTradersListScriptResult {
1374
1376
  /**
1375
1377
  * Script for the top-traders list widget.
1376
1378
  *
1377
- * Builds on {@link useTokenTopTradersQuery} (bridge over the holders
1378
- * endpoint with `sortBy=realizedPnl`). `onlyTracked` is a client-side
1379
+ * Builds on {@link useTokenTopTradersQuery}. `onlyTracked` is a client-side
1379
1380
  * filter retained for UI parity with Axiom — until the server flags
1380
1381
  * tracked wallets, the toggle narrows visible rows to those whose `tags`
1381
1382
  * list is non-empty (a reasonable proxy for "tracked by someone").
1382
1383
  */
1383
- declare function useTokenTopTradersListScript({ chain, address, limit, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
1384
+ declare function useTokenTopTradersListScript({ chain, address, limit, initialSortBy, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
1384
1385
 
1385
1386
  interface TokenTopTradersListWidgetProps {
1386
1387
  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';
@@ -749,7 +749,7 @@ type TokenActivitiesListCurrency = "usd" | "native";
749
749
  interface TokenActivitiesListProps {
750
750
  activities: Array<Activity>;
751
751
  isLoading?: boolean;
752
- sortBy: TokenActivitiesListSortBy;
752
+ sortBy?: TokenActivitiesListSortBy;
753
753
  onSortByChange: (sortBy: TokenActivitiesListSortBy) => void;
754
754
  /** filter by activity type; "all" shows everything including liquidity / red packets */
755
755
  typeFilter?: "all" | "buy" | "sell";
@@ -788,7 +788,7 @@ interface UseTokenActivitiesListScriptParams {
788
788
  interface UseTokenActivitiesListScriptResult {
789
789
  activities: Array<Activity>;
790
790
  isLoading: boolean;
791
- sortBy: TokenActivitiesListSortBy;
791
+ sortBy: TokenActivitiesListSortBy | undefined;
792
792
  setSortBy: (s: TokenActivitiesListSortBy) => void;
793
793
  typeFilter: "all" | "buy" | "sell";
794
794
  setTypeFilter: (t: "all" | "buy" | "sell") => void;
@@ -803,9 +803,10 @@ interface UseTokenActivitiesListScriptResult {
803
803
  * and semantic filters change the result set.
804
804
  *
805
805
  * Realtime: {@link useTokenActivitiesSubscription} prepends new activities to
806
- * the first page while we're on the default `timestamp` sort + `all` filter
807
- * (and no cursor has been pushed). In other states, live pushes are ignored
808
- * to avoid confusing the sorted / filtered window.
806
+ * the first page while we're on the server default ordering (or explicit
807
+ * `timestamp`) + `all` filter (and no cursor has been pushed). In other
808
+ * states, live pushes are ignored to avoid confusing the sorted / filtered
809
+ * window.
809
810
  */
810
811
  declare function useTokenActivitiesListScript({ chain, address, limit, initialSortBy, initialTypeFilter, }: UseTokenActivitiesListScriptParams): UseTokenActivitiesListScriptResult;
811
812
 
@@ -1335,7 +1336,7 @@ interface TokenOrdersListWidgetProps {
1335
1336
  declare function TokenOrdersListWidget({ chain, wallet, tokenAddress, tokenSymbol, limit, initialStateFilter, initialCurrency, nativeSymbol, onCancelAll, renderActions, className, }: TokenOrdersListWidgetProps): react_jsx_runtime.JSX.Element;
1336
1337
 
1337
1338
  interface TokenTopTradersListProps {
1338
- traders: Array<TokenHolder>;
1339
+ traders: Array<TokenTopTrader>;
1339
1340
  isLoading?: boolean;
1340
1341
  hasMore?: boolean;
1341
1342
  onLoadMore?: () => void;
@@ -1350,10 +1351,7 @@ interface TokenTopTradersListProps {
1350
1351
  * Presentational Top Traders list — visually parallel to
1351
1352
  * {@link TokenHoldersList} but with its own header + filters.
1352
1353
  *
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.
1354
+ * Uses the token top-traders endpoint and its trader-specific PnL fields.
1357
1355
  */
1358
1356
  declare function TokenTopTradersList({ traders, isLoading, hasMore, onLoadMore, onlyTracked, onOnlyTrackedChange, now, renderAddress, className, }: TokenTopTradersListProps): react_jsx_runtime.JSX.Element;
1359
1357
 
@@ -1361,11 +1359,15 @@ interface UseTokenTopTradersListScriptParams {
1361
1359
  chain: Chain;
1362
1360
  address: string;
1363
1361
  limit?: number;
1362
+ /** initial sortBy; undefined means the first request uses server default ordering. */
1363
+ initialSortBy?: TokenTopTradersSortBy;
1364
1364
  initialOnlyTracked?: boolean;
1365
1365
  }
1366
1366
  interface UseTokenTopTradersListScriptResult {
1367
- traders: Array<TokenHolder>;
1367
+ traders: Array<TokenTopTrader>;
1368
1368
  isLoading: boolean;
1369
+ sortBy: TokenTopTradersSortBy | undefined;
1370
+ setSortBy: (s: TokenTopTradersSortBy) => void;
1369
1371
  hasMore: boolean;
1370
1372
  loadMore: () => void;
1371
1373
  onlyTracked: boolean;
@@ -1374,13 +1376,12 @@ interface UseTokenTopTradersListScriptResult {
1374
1376
  /**
1375
1377
  * Script for the top-traders list widget.
1376
1378
  *
1377
- * Builds on {@link useTokenTopTradersQuery} (bridge over the holders
1378
- * endpoint with `sortBy=realizedPnl`). `onlyTracked` is a client-side
1379
+ * Builds on {@link useTokenTopTradersQuery}. `onlyTracked` is a client-side
1379
1380
  * filter retained for UI parity with Axiom — until the server flags
1380
1381
  * tracked wallets, the toggle narrows visible rows to those whose `tags`
1381
1382
  * list is non-empty (a reasonable proxy for "tracked by someone").
1382
1383
  */
1383
- declare function useTokenTopTradersListScript({ chain, address, limit, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
1384
+ declare function useTokenTopTradersListScript({ chain, address, limit, initialSortBy, initialOnlyTracked, }: UseTokenTopTradersListScriptParams): UseTokenTopTradersListScriptResult;
1384
1385
 
1385
1386
  interface TokenTopTradersListWidgetProps {
1386
1387
  chain: Chain;