@liberfi.io/ui-tokens 3.0.21 → 3.0.23
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 +83 -41
- package/dist/index.d.ts +83 -41
- 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, Chain, WalletTag, TokenSocialMedias, TokenHoldersSortBy, TokenHolder, ActivitiesSortBy, Activity, TokenStats, TokenSecurity as TokenSecurity$1, TokenLiquidity, PortfolioPnl, LimitOrderState, LimitOrder,
|
|
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';
|
|
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;
|
|
@@ -53,11 +55,42 @@ interface PulseListItemSkeletonProps {
|
|
|
53
55
|
}
|
|
54
56
|
declare function PulseListItemSkeleton({ isLast, className, }: PulseListItemSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
55
57
|
|
|
58
|
+
type TokenListResolution = "1m" | "5m" | "1h" | "4h" | "24h";
|
|
59
|
+
interface TokenListResolutionSelectorProps {
|
|
60
|
+
/** current resolution */
|
|
61
|
+
resolution?: TokenListResolution;
|
|
62
|
+
/** callback function when resolution changes */
|
|
63
|
+
onResolutionChange?: (resolution: TokenListResolution) => void | Promise<void>;
|
|
64
|
+
/** resolution options */
|
|
65
|
+
resolutionOptions?: TokenListResolution[];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
type TokenListFiltersType = Pick<GetTokenListOptions, "filters" | "keywords" | "excludeKeywords">;
|
|
69
|
+
interface TokenListFilterProps {
|
|
70
|
+
/** protocol filter options */
|
|
71
|
+
protocols?: Array<TokenProtocol>;
|
|
72
|
+
/** current resolution */
|
|
73
|
+
resolution: TokenListResolution;
|
|
74
|
+
/** filters */
|
|
75
|
+
filters?: TokenListFiltersType;
|
|
76
|
+
/** callback when filters change */
|
|
77
|
+
onFiltersChange?: (filters?: TokenListFiltersType) => void;
|
|
78
|
+
/** custom class name */
|
|
79
|
+
className?: string;
|
|
80
|
+
}
|
|
81
|
+
declare function TokenListFilter({ protocols, resolution, filters, onFiltersChange, className, }: TokenListFilterProps): react_jsx_runtime.JSX.Element;
|
|
82
|
+
|
|
56
83
|
type UsePulseNewListScriptParams = {
|
|
57
84
|
/** chain id */
|
|
58
85
|
chain: Chain;
|
|
86
|
+
/** local display filters */
|
|
87
|
+
filters?: TokenListFiltersType;
|
|
59
88
|
/** whether to pause adding new items (existing items still update) */
|
|
60
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;
|
|
61
94
|
};
|
|
62
95
|
type UsePulseNewListScriptResult = {
|
|
63
96
|
/** whether tokens are loading */
|
|
@@ -65,11 +98,13 @@ type UsePulseNewListScriptResult = {
|
|
|
65
98
|
/** token list */
|
|
66
99
|
tokens: Token[];
|
|
67
100
|
};
|
|
68
|
-
declare function usePulseNewListScript({ chain, isPaused, }: UsePulseNewListScriptParams): UsePulseNewListScriptResult;
|
|
101
|
+
declare function usePulseNewListScript({ chain, filters, isPaused, deferUpdates, updateFlushInterval, }: UsePulseNewListScriptParams): UsePulseNewListScriptResult;
|
|
69
102
|
|
|
70
103
|
interface PulseNewListWidgetProps {
|
|
71
104
|
/** chain id */
|
|
72
105
|
chain: Chain;
|
|
106
|
+
/** local display filters */
|
|
107
|
+
filters?: TokenListFiltersType;
|
|
73
108
|
/** list title */
|
|
74
109
|
title: string;
|
|
75
110
|
/** custom render for header extra content (e.g. instant buy amount input) */
|
|
@@ -83,15 +118,21 @@ interface PulseNewListWidgetProps {
|
|
|
83
118
|
/** whether to hide the header */
|
|
84
119
|
hideHeader?: boolean;
|
|
85
120
|
}
|
|
86
|
-
declare function PulseNewListWidget({ chain, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseNewListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
121
|
+
declare function PulseNewListWidget({ chain, filters, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseNewListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
87
122
|
|
|
88
123
|
type UsePulseMigratedListScriptParams = {
|
|
89
124
|
/** chain id */
|
|
90
125
|
chain: Chain;
|
|
126
|
+
/** local display filters */
|
|
127
|
+
filters?: TokenListFiltersType;
|
|
91
128
|
/** whether to pause adding new items (existing items still update) */
|
|
92
129
|
isPaused?: boolean;
|
|
93
130
|
/** refetch interval in milliseconds */
|
|
94
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;
|
|
95
136
|
};
|
|
96
137
|
type UsePulseMigratedListScriptResult = {
|
|
97
138
|
/** whether tokens are loading */
|
|
@@ -99,11 +140,13 @@ type UsePulseMigratedListScriptResult = {
|
|
|
99
140
|
/** token list */
|
|
100
141
|
tokens: Token[];
|
|
101
142
|
};
|
|
102
|
-
declare function usePulseMigratedListScript({ chain, isPaused, refetchInterval, }: UsePulseMigratedListScriptParams): UsePulseMigratedListScriptResult;
|
|
143
|
+
declare function usePulseMigratedListScript({ chain, filters, isPaused, refetchInterval, deferUpdates, updateFlushInterval, }: UsePulseMigratedListScriptParams): UsePulseMigratedListScriptResult;
|
|
103
144
|
|
|
104
145
|
interface PulseMigratedListWidgetProps {
|
|
105
146
|
/** chain id */
|
|
106
147
|
chain: Chain;
|
|
148
|
+
/** local display filters */
|
|
149
|
+
filters?: TokenListFiltersType;
|
|
107
150
|
/** list title */
|
|
108
151
|
title: string;
|
|
109
152
|
/** custom render for header extra content (e.g. instant buy amount input) */
|
|
@@ -117,15 +160,21 @@ interface PulseMigratedListWidgetProps {
|
|
|
117
160
|
/** whether to hide the header */
|
|
118
161
|
hideHeader?: boolean;
|
|
119
162
|
}
|
|
120
|
-
declare function PulseMigratedListWidget({ chain, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseMigratedListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
163
|
+
declare function PulseMigratedListWidget({ chain, filters, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseMigratedListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
121
164
|
|
|
122
165
|
type UsePulseFinalStretchListScriptParams = {
|
|
123
166
|
/** chain id */
|
|
124
167
|
chain: Chain;
|
|
168
|
+
/** local display filters */
|
|
169
|
+
filters?: TokenListFiltersType;
|
|
125
170
|
/** whether to pause adding new items (existing items still update) */
|
|
126
171
|
isPaused?: boolean;
|
|
127
172
|
/** refetch interval in milliseconds */
|
|
128
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;
|
|
129
178
|
};
|
|
130
179
|
type UsePulseFinalStretchListScriptResult = {
|
|
131
180
|
/** whether tokens are loading */
|
|
@@ -133,11 +182,13 @@ type UsePulseFinalStretchListScriptResult = {
|
|
|
133
182
|
/** token list */
|
|
134
183
|
tokens: Token[];
|
|
135
184
|
};
|
|
136
|
-
declare function usePulseFinalStretchListScript({ chain, isPaused, refetchInterval, }: UsePulseFinalStretchListScriptParams): UsePulseFinalStretchListScriptResult;
|
|
185
|
+
declare function usePulseFinalStretchListScript({ chain, filters, isPaused, refetchInterval, deferUpdates, updateFlushInterval, }: UsePulseFinalStretchListScriptParams): UsePulseFinalStretchListScriptResult;
|
|
137
186
|
|
|
138
187
|
interface PulseFinalStretchListWidgetProps {
|
|
139
188
|
/** chain id */
|
|
140
189
|
chain: Chain;
|
|
190
|
+
/** local display filters */
|
|
191
|
+
filters?: TokenListFiltersType;
|
|
141
192
|
/** list title */
|
|
142
193
|
title: string;
|
|
143
194
|
/** custom render for header extra content (e.g. instant buy amount input) */
|
|
@@ -151,7 +202,7 @@ interface PulseFinalStretchListWidgetProps {
|
|
|
151
202
|
/** whether to hide the header */
|
|
152
203
|
hideHeader?: boolean;
|
|
153
204
|
}
|
|
154
|
-
declare function PulseFinalStretchListWidget({ chain, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseFinalStretchListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
205
|
+
declare function PulseFinalStretchListWidget({ chain, filters, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseFinalStretchListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
155
206
|
|
|
156
207
|
type PulseListType = "new" | "final_stretch" | "migrated";
|
|
157
208
|
interface PulseListItemActionProps {
|
|
@@ -1584,42 +1635,35 @@ interface TokenReusedImageListWidgetProps {
|
|
|
1584
1635
|
*/
|
|
1585
1636
|
declare function TokenReusedImageListWidget({ chain, address, onTokenClick, className, }: TokenReusedImageListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1586
1637
|
|
|
1587
|
-
type
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
/** resolution options */
|
|
1594
|
-
resolutionOptions?: TokenListResolution[];
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
type TokenListFiltersType = Pick<GetTokenListOptions, "filters" | "keywords" | "excludeKeywords">;
|
|
1598
|
-
interface TokenListFilterProps {
|
|
1599
|
-
/** protocol filter options */
|
|
1600
|
-
protocols?: Array<TokenProtocol>;
|
|
1601
|
-
/** current resolution */
|
|
1602
|
-
resolution: TokenListResolution;
|
|
1603
|
-
/** filters */
|
|
1604
|
-
filters?: TokenListFiltersType;
|
|
1605
|
-
/** callback when filters change */
|
|
1606
|
-
onFiltersChange?: (filters?: TokenListFiltersType) => void;
|
|
1607
|
-
/** custom class name */
|
|
1638
|
+
type TokenListFilterModalProps = Pick<TokenListFilterProps, "protocols" | "resolution" | "filters" | "onFiltersChange"> & {
|
|
1639
|
+
/** trigger button style variant */
|
|
1640
|
+
triggerVariant?: "default" | "plain";
|
|
1641
|
+
/** active badge placement on the trigger */
|
|
1642
|
+
badgePlacement?: "outer" | "icon";
|
|
1643
|
+
/** trigger button className */
|
|
1608
1644
|
className?: string;
|
|
1609
|
-
}
|
|
1610
|
-
declare function
|
|
1611
|
-
|
|
1612
|
-
type TokenListFilterModalProps = Pick<TokenListFilterProps, "protocols" | "resolution" | "filters" | "onFiltersChange">;
|
|
1613
|
-
declare function TokenListFilterModal({ protocols, resolution, filters, onFiltersChange, }: TokenListFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
1645
|
+
};
|
|
1646
|
+
declare function TokenListFilterModal({ protocols, resolution, filters, onFiltersChange, triggerVariant, badgePlacement, className, }: TokenListFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
1614
1647
|
|
|
1615
|
-
type TokenListFilterPopoverProps = Pick<PopoverProps, "placement"> & Pick<TokenListFilterProps, "protocols" | "resolution" | "filters" | "onFiltersChange"
|
|
1616
|
-
|
|
1648
|
+
type TokenListFilterPopoverProps = Pick<PopoverProps, "placement"> & Pick<TokenListFilterProps, "protocols" | "resolution" | "filters" | "onFiltersChange"> & {
|
|
1649
|
+
/** whether to render only the filter icon in the trigger */
|
|
1650
|
+
iconOnly?: boolean;
|
|
1651
|
+
/** trigger button className */
|
|
1652
|
+
className?: string;
|
|
1653
|
+
};
|
|
1654
|
+
declare function TokenListFilterPopover({ protocols, resolution, filters, onFiltersChange, iconOnly, className, }: TokenListFilterPopoverProps): react_jsx_runtime.JSX.Element;
|
|
1617
1655
|
|
|
1618
1656
|
type TokenListFilterWidgetProps = TokenListFilterModalProps & {
|
|
1619
1657
|
/** Popover placement used on non-mobile screens. @default "bottom-end" */
|
|
1620
1658
|
popoverPlacement?: PopoverProps["placement"];
|
|
1659
|
+
/** whether to render only the filter icon in the non-mobile trigger */
|
|
1660
|
+
iconOnly?: boolean;
|
|
1661
|
+
/** trigger button className */
|
|
1662
|
+
className?: string;
|
|
1663
|
+
/** overlay used on non-mobile screens. @default "popover" */
|
|
1664
|
+
desktopOverlay?: "popover" | "modal";
|
|
1621
1665
|
};
|
|
1622
|
-
declare function TokenListFilterWidget({ popoverPlacement, ...filterProps }: TokenListFilterWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1666
|
+
declare function TokenListFilterWidget({ popoverPlacement, iconOnly, className, desktopOverlay, ...filterProps }: TokenListFilterWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1623
1667
|
|
|
1624
1668
|
declare function TokenListResolutionSelectorDesktop({ resolution, onResolutionChange, resolutionOptions, }: TokenListResolutionSelectorProps): react_jsx_runtime.JSX.Element;
|
|
1625
1669
|
|
|
@@ -1723,10 +1767,8 @@ type UseNewTokensScriptParams = {
|
|
|
1723
1767
|
chain: Chain;
|
|
1724
1768
|
/** resolution */
|
|
1725
1769
|
resolution: TokenListResolution;
|
|
1726
|
-
/**
|
|
1770
|
+
/** local display options */
|
|
1727
1771
|
options?: GetTokenListOptions;
|
|
1728
|
-
/** refetch tokens interval */
|
|
1729
|
-
refetchInterval?: number;
|
|
1730
1772
|
/** defer websocket updates while the list is actively scrolling */
|
|
1731
1773
|
deferUpdates?: boolean;
|
|
1732
1774
|
/** minimum interval for batched websocket updates */
|
|
@@ -1738,7 +1780,7 @@ type UseNewTokensScriptResult = {
|
|
|
1738
1780
|
/** tokens */
|
|
1739
1781
|
tokens: Array<Token>;
|
|
1740
1782
|
};
|
|
1741
|
-
declare function useNewTokensScript({ chain,
|
|
1783
|
+
declare function useNewTokensScript({ chain, options, deferUpdates, updateFlushInterval, }: UseNewTokensScriptParams): UseNewTokensScriptResult;
|
|
1742
1784
|
|
|
1743
1785
|
type NewTokenListWidgetProps = {
|
|
1744
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, Chain, WalletTag, TokenSocialMedias, TokenHoldersSortBy, TokenHolder, ActivitiesSortBy, Activity, TokenStats, TokenSecurity as TokenSecurity$1, TokenLiquidity, PortfolioPnl, LimitOrderState, LimitOrder,
|
|
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';
|
|
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;
|
|
@@ -53,11 +55,42 @@ interface PulseListItemSkeletonProps {
|
|
|
53
55
|
}
|
|
54
56
|
declare function PulseListItemSkeleton({ isLast, className, }: PulseListItemSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
55
57
|
|
|
58
|
+
type TokenListResolution = "1m" | "5m" | "1h" | "4h" | "24h";
|
|
59
|
+
interface TokenListResolutionSelectorProps {
|
|
60
|
+
/** current resolution */
|
|
61
|
+
resolution?: TokenListResolution;
|
|
62
|
+
/** callback function when resolution changes */
|
|
63
|
+
onResolutionChange?: (resolution: TokenListResolution) => void | Promise<void>;
|
|
64
|
+
/** resolution options */
|
|
65
|
+
resolutionOptions?: TokenListResolution[];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
type TokenListFiltersType = Pick<GetTokenListOptions, "filters" | "keywords" | "excludeKeywords">;
|
|
69
|
+
interface TokenListFilterProps {
|
|
70
|
+
/** protocol filter options */
|
|
71
|
+
protocols?: Array<TokenProtocol>;
|
|
72
|
+
/** current resolution */
|
|
73
|
+
resolution: TokenListResolution;
|
|
74
|
+
/** filters */
|
|
75
|
+
filters?: TokenListFiltersType;
|
|
76
|
+
/** callback when filters change */
|
|
77
|
+
onFiltersChange?: (filters?: TokenListFiltersType) => void;
|
|
78
|
+
/** custom class name */
|
|
79
|
+
className?: string;
|
|
80
|
+
}
|
|
81
|
+
declare function TokenListFilter({ protocols, resolution, filters, onFiltersChange, className, }: TokenListFilterProps): react_jsx_runtime.JSX.Element;
|
|
82
|
+
|
|
56
83
|
type UsePulseNewListScriptParams = {
|
|
57
84
|
/** chain id */
|
|
58
85
|
chain: Chain;
|
|
86
|
+
/** local display filters */
|
|
87
|
+
filters?: TokenListFiltersType;
|
|
59
88
|
/** whether to pause adding new items (existing items still update) */
|
|
60
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;
|
|
61
94
|
};
|
|
62
95
|
type UsePulseNewListScriptResult = {
|
|
63
96
|
/** whether tokens are loading */
|
|
@@ -65,11 +98,13 @@ type UsePulseNewListScriptResult = {
|
|
|
65
98
|
/** token list */
|
|
66
99
|
tokens: Token[];
|
|
67
100
|
};
|
|
68
|
-
declare function usePulseNewListScript({ chain, isPaused, }: UsePulseNewListScriptParams): UsePulseNewListScriptResult;
|
|
101
|
+
declare function usePulseNewListScript({ chain, filters, isPaused, deferUpdates, updateFlushInterval, }: UsePulseNewListScriptParams): UsePulseNewListScriptResult;
|
|
69
102
|
|
|
70
103
|
interface PulseNewListWidgetProps {
|
|
71
104
|
/** chain id */
|
|
72
105
|
chain: Chain;
|
|
106
|
+
/** local display filters */
|
|
107
|
+
filters?: TokenListFiltersType;
|
|
73
108
|
/** list title */
|
|
74
109
|
title: string;
|
|
75
110
|
/** custom render for header extra content (e.g. instant buy amount input) */
|
|
@@ -83,15 +118,21 @@ interface PulseNewListWidgetProps {
|
|
|
83
118
|
/** whether to hide the header */
|
|
84
119
|
hideHeader?: boolean;
|
|
85
120
|
}
|
|
86
|
-
declare function PulseNewListWidget({ chain, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseNewListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
121
|
+
declare function PulseNewListWidget({ chain, filters, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseNewListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
87
122
|
|
|
88
123
|
type UsePulseMigratedListScriptParams = {
|
|
89
124
|
/** chain id */
|
|
90
125
|
chain: Chain;
|
|
126
|
+
/** local display filters */
|
|
127
|
+
filters?: TokenListFiltersType;
|
|
91
128
|
/** whether to pause adding new items (existing items still update) */
|
|
92
129
|
isPaused?: boolean;
|
|
93
130
|
/** refetch interval in milliseconds */
|
|
94
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;
|
|
95
136
|
};
|
|
96
137
|
type UsePulseMigratedListScriptResult = {
|
|
97
138
|
/** whether tokens are loading */
|
|
@@ -99,11 +140,13 @@ type UsePulseMigratedListScriptResult = {
|
|
|
99
140
|
/** token list */
|
|
100
141
|
tokens: Token[];
|
|
101
142
|
};
|
|
102
|
-
declare function usePulseMigratedListScript({ chain, isPaused, refetchInterval, }: UsePulseMigratedListScriptParams): UsePulseMigratedListScriptResult;
|
|
143
|
+
declare function usePulseMigratedListScript({ chain, filters, isPaused, refetchInterval, deferUpdates, updateFlushInterval, }: UsePulseMigratedListScriptParams): UsePulseMigratedListScriptResult;
|
|
103
144
|
|
|
104
145
|
interface PulseMigratedListWidgetProps {
|
|
105
146
|
/** chain id */
|
|
106
147
|
chain: Chain;
|
|
148
|
+
/** local display filters */
|
|
149
|
+
filters?: TokenListFiltersType;
|
|
107
150
|
/** list title */
|
|
108
151
|
title: string;
|
|
109
152
|
/** custom render for header extra content (e.g. instant buy amount input) */
|
|
@@ -117,15 +160,21 @@ interface PulseMigratedListWidgetProps {
|
|
|
117
160
|
/** whether to hide the header */
|
|
118
161
|
hideHeader?: boolean;
|
|
119
162
|
}
|
|
120
|
-
declare function PulseMigratedListWidget({ chain, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseMigratedListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
163
|
+
declare function PulseMigratedListWidget({ chain, filters, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseMigratedListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
121
164
|
|
|
122
165
|
type UsePulseFinalStretchListScriptParams = {
|
|
123
166
|
/** chain id */
|
|
124
167
|
chain: Chain;
|
|
168
|
+
/** local display filters */
|
|
169
|
+
filters?: TokenListFiltersType;
|
|
125
170
|
/** whether to pause adding new items (existing items still update) */
|
|
126
171
|
isPaused?: boolean;
|
|
127
172
|
/** refetch interval in milliseconds */
|
|
128
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;
|
|
129
178
|
};
|
|
130
179
|
type UsePulseFinalStretchListScriptResult = {
|
|
131
180
|
/** whether tokens are loading */
|
|
@@ -133,11 +182,13 @@ type UsePulseFinalStretchListScriptResult = {
|
|
|
133
182
|
/** token list */
|
|
134
183
|
tokens: Token[];
|
|
135
184
|
};
|
|
136
|
-
declare function usePulseFinalStretchListScript({ chain, isPaused, refetchInterval, }: UsePulseFinalStretchListScriptParams): UsePulseFinalStretchListScriptResult;
|
|
185
|
+
declare function usePulseFinalStretchListScript({ chain, filters, isPaused, refetchInterval, deferUpdates, updateFlushInterval, }: UsePulseFinalStretchListScriptParams): UsePulseFinalStretchListScriptResult;
|
|
137
186
|
|
|
138
187
|
interface PulseFinalStretchListWidgetProps {
|
|
139
188
|
/** chain id */
|
|
140
189
|
chain: Chain;
|
|
190
|
+
/** local display filters */
|
|
191
|
+
filters?: TokenListFiltersType;
|
|
141
192
|
/** list title */
|
|
142
193
|
title: string;
|
|
143
194
|
/** custom render for header extra content (e.g. instant buy amount input) */
|
|
@@ -151,7 +202,7 @@ interface PulseFinalStretchListWidgetProps {
|
|
|
151
202
|
/** whether to hide the header */
|
|
152
203
|
hideHeader?: boolean;
|
|
153
204
|
}
|
|
154
|
-
declare function PulseFinalStretchListWidget({ chain, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseFinalStretchListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
205
|
+
declare function PulseFinalStretchListWidget({ chain, filters, title, renderHeaderExtra, renderItemAction, onSelectToken, className, hideHeader, }: PulseFinalStretchListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
155
206
|
|
|
156
207
|
type PulseListType = "new" | "final_stretch" | "migrated";
|
|
157
208
|
interface PulseListItemActionProps {
|
|
@@ -1584,42 +1635,35 @@ interface TokenReusedImageListWidgetProps {
|
|
|
1584
1635
|
*/
|
|
1585
1636
|
declare function TokenReusedImageListWidget({ chain, address, onTokenClick, className, }: TokenReusedImageListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1586
1637
|
|
|
1587
|
-
type
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
/** resolution options */
|
|
1594
|
-
resolutionOptions?: TokenListResolution[];
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
type TokenListFiltersType = Pick<GetTokenListOptions, "filters" | "keywords" | "excludeKeywords">;
|
|
1598
|
-
interface TokenListFilterProps {
|
|
1599
|
-
/** protocol filter options */
|
|
1600
|
-
protocols?: Array<TokenProtocol>;
|
|
1601
|
-
/** current resolution */
|
|
1602
|
-
resolution: TokenListResolution;
|
|
1603
|
-
/** filters */
|
|
1604
|
-
filters?: TokenListFiltersType;
|
|
1605
|
-
/** callback when filters change */
|
|
1606
|
-
onFiltersChange?: (filters?: TokenListFiltersType) => void;
|
|
1607
|
-
/** custom class name */
|
|
1638
|
+
type TokenListFilterModalProps = Pick<TokenListFilterProps, "protocols" | "resolution" | "filters" | "onFiltersChange"> & {
|
|
1639
|
+
/** trigger button style variant */
|
|
1640
|
+
triggerVariant?: "default" | "plain";
|
|
1641
|
+
/** active badge placement on the trigger */
|
|
1642
|
+
badgePlacement?: "outer" | "icon";
|
|
1643
|
+
/** trigger button className */
|
|
1608
1644
|
className?: string;
|
|
1609
|
-
}
|
|
1610
|
-
declare function
|
|
1611
|
-
|
|
1612
|
-
type TokenListFilterModalProps = Pick<TokenListFilterProps, "protocols" | "resolution" | "filters" | "onFiltersChange">;
|
|
1613
|
-
declare function TokenListFilterModal({ protocols, resolution, filters, onFiltersChange, }: TokenListFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
1645
|
+
};
|
|
1646
|
+
declare function TokenListFilterModal({ protocols, resolution, filters, onFiltersChange, triggerVariant, badgePlacement, className, }: TokenListFilterModalProps): react_jsx_runtime.JSX.Element;
|
|
1614
1647
|
|
|
1615
|
-
type TokenListFilterPopoverProps = Pick<PopoverProps, "placement"> & Pick<TokenListFilterProps, "protocols" | "resolution" | "filters" | "onFiltersChange"
|
|
1616
|
-
|
|
1648
|
+
type TokenListFilterPopoverProps = Pick<PopoverProps, "placement"> & Pick<TokenListFilterProps, "protocols" | "resolution" | "filters" | "onFiltersChange"> & {
|
|
1649
|
+
/** whether to render only the filter icon in the trigger */
|
|
1650
|
+
iconOnly?: boolean;
|
|
1651
|
+
/** trigger button className */
|
|
1652
|
+
className?: string;
|
|
1653
|
+
};
|
|
1654
|
+
declare function TokenListFilterPopover({ protocols, resolution, filters, onFiltersChange, iconOnly, className, }: TokenListFilterPopoverProps): react_jsx_runtime.JSX.Element;
|
|
1617
1655
|
|
|
1618
1656
|
type TokenListFilterWidgetProps = TokenListFilterModalProps & {
|
|
1619
1657
|
/** Popover placement used on non-mobile screens. @default "bottom-end" */
|
|
1620
1658
|
popoverPlacement?: PopoverProps["placement"];
|
|
1659
|
+
/** whether to render only the filter icon in the non-mobile trigger */
|
|
1660
|
+
iconOnly?: boolean;
|
|
1661
|
+
/** trigger button className */
|
|
1662
|
+
className?: string;
|
|
1663
|
+
/** overlay used on non-mobile screens. @default "popover" */
|
|
1664
|
+
desktopOverlay?: "popover" | "modal";
|
|
1621
1665
|
};
|
|
1622
|
-
declare function TokenListFilterWidget({ popoverPlacement, ...filterProps }: TokenListFilterWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1666
|
+
declare function TokenListFilterWidget({ popoverPlacement, iconOnly, className, desktopOverlay, ...filterProps }: TokenListFilterWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1623
1667
|
|
|
1624
1668
|
declare function TokenListResolutionSelectorDesktop({ resolution, onResolutionChange, resolutionOptions, }: TokenListResolutionSelectorProps): react_jsx_runtime.JSX.Element;
|
|
1625
1669
|
|
|
@@ -1723,10 +1767,8 @@ type UseNewTokensScriptParams = {
|
|
|
1723
1767
|
chain: Chain;
|
|
1724
1768
|
/** resolution */
|
|
1725
1769
|
resolution: TokenListResolution;
|
|
1726
|
-
/**
|
|
1770
|
+
/** local display options */
|
|
1727
1771
|
options?: GetTokenListOptions;
|
|
1728
|
-
/** refetch tokens interval */
|
|
1729
|
-
refetchInterval?: number;
|
|
1730
1772
|
/** defer websocket updates while the list is actively scrolling */
|
|
1731
1773
|
deferUpdates?: boolean;
|
|
1732
1774
|
/** minimum interval for batched websocket updates */
|
|
@@ -1738,7 +1780,7 @@ type UseNewTokensScriptResult = {
|
|
|
1738
1780
|
/** tokens */
|
|
1739
1781
|
tokens: Array<Token>;
|
|
1740
1782
|
};
|
|
1741
|
-
declare function useNewTokensScript({ chain,
|
|
1783
|
+
declare function useNewTokensScript({ chain, options, deferUpdates, updateFlushInterval, }: UseNewTokensScriptParams): UseNewTokensScriptResult;
|
|
1742
1784
|
|
|
1743
1785
|
type NewTokenListWidgetProps = {
|
|
1744
1786
|
/** chain id */
|