@liberfi.io/ui-tokens 3.0.22 → 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 +29 -11
- package/dist/index.d.ts +29 -11
- 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
|
@@ -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 */
|
|
@@ -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
|
@@ -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 */
|
|
@@ -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 */
|