@liberfi.io/ui-tokens 3.0.16 → 3.0.17
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 +18 -4
- package/dist/index.d.ts +18 -4
- 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
|
@@ -1651,6 +1651,8 @@ interface TokenListProps {
|
|
|
1651
1651
|
sortDirections?: TokenListSortDirections;
|
|
1652
1652
|
/** callback function when sort direction changes */
|
|
1653
1653
|
onSortChange?: (sortDirections: TokenListSortDirections) => void | Promise<void>;
|
|
1654
|
+
/** callback function when the virtualized list scroll state changes */
|
|
1655
|
+
onScrollingChange?: (isScrolling: boolean) => void;
|
|
1654
1656
|
/**
|
|
1655
1657
|
* list container height, required for virtualized list.
|
|
1656
1658
|
* you can use useResizeObserver hook to get the container's height.
|
|
@@ -1667,7 +1669,7 @@ interface TokenListProps {
|
|
|
1667
1669
|
/**
|
|
1668
1670
|
* Token List UI Component
|
|
1669
1671
|
*/
|
|
1670
|
-
declare function TokenList({ tokens, resolution, isLoading, ActionsComponent, onSelectToken, sortDirections, onSortChange, height, itemHeight, itemHeightMobile, className, }: TokenListProps): react_jsx_runtime.JSX.Element;
|
|
1672
|
+
declare function TokenList({ tokens, resolution, isLoading, ActionsComponent, onSelectToken, sortDirections, onSortChange, onScrollingChange, height, itemHeight, itemHeightMobile, className, }: TokenListProps): react_jsx_runtime.JSX.Element;
|
|
1671
1673
|
|
|
1672
1674
|
interface TokenCellProps {
|
|
1673
1675
|
token: Token;
|
|
@@ -1725,6 +1727,10 @@ type UseNewTokensScriptParams = {
|
|
|
1725
1727
|
options?: GetTokenListOptions;
|
|
1726
1728
|
/** refetch tokens interval */
|
|
1727
1729
|
refetchInterval?: number;
|
|
1730
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
1731
|
+
deferUpdates?: boolean;
|
|
1732
|
+
/** minimum interval for batched websocket updates */
|
|
1733
|
+
updateFlushInterval?: number;
|
|
1728
1734
|
};
|
|
1729
1735
|
type UseNewTokensScriptResult = {
|
|
1730
1736
|
/** is fetching tokens, return true if initially fetching tokens or refetching tokens due to query params change */
|
|
@@ -1732,7 +1738,7 @@ type UseNewTokensScriptResult = {
|
|
|
1732
1738
|
/** tokens */
|
|
1733
1739
|
tokens: Array<Token>;
|
|
1734
1740
|
};
|
|
1735
|
-
declare function useNewTokensScript({ chain, resolution, options, refetchInterval, }: UseNewTokensScriptParams): UseNewTokensScriptResult;
|
|
1741
|
+
declare function useNewTokensScript({ chain, resolution, options, refetchInterval, deferUpdates, updateFlushInterval, }: UseNewTokensScriptParams): UseNewTokensScriptResult;
|
|
1736
1742
|
|
|
1737
1743
|
type NewTokenListWidgetProps = {
|
|
1738
1744
|
/** chain id */
|
|
@@ -1769,6 +1775,10 @@ type UseStockTokensScriptParams = {
|
|
|
1769
1775
|
options?: GetTokenListOptions;
|
|
1770
1776
|
/** refetch tokens interval */
|
|
1771
1777
|
refetchInterval?: number;
|
|
1778
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
1779
|
+
deferUpdates?: boolean;
|
|
1780
|
+
/** minimum interval for batched websocket updates */
|
|
1781
|
+
updateFlushInterval?: number;
|
|
1772
1782
|
};
|
|
1773
1783
|
type UseStockTokensScriptResult = {
|
|
1774
1784
|
/** is fetching tokens, return true if initially fetching tokens or refetching tokens due to query params change */
|
|
@@ -1776,7 +1786,7 @@ type UseStockTokensScriptResult = {
|
|
|
1776
1786
|
/** tokens */
|
|
1777
1787
|
tokens: Array<Token>;
|
|
1778
1788
|
};
|
|
1779
|
-
declare function useStockTokensScript({ chain, resolution, options, refetchInterval, }: UseStockTokensScriptParams): UseStockTokensScriptResult;
|
|
1789
|
+
declare function useStockTokensScript({ chain, resolution, options, refetchInterval, deferUpdates, updateFlushInterval, }: UseStockTokensScriptParams): UseStockTokensScriptResult;
|
|
1780
1790
|
|
|
1781
1791
|
type StockTokenListWidgetProps = {
|
|
1782
1792
|
/** chain id */
|
|
@@ -1813,6 +1823,10 @@ type UseTrendingTokensScriptParams = {
|
|
|
1813
1823
|
options?: GetTokenListOptions;
|
|
1814
1824
|
/** refetch tokens interval */
|
|
1815
1825
|
refetchInterval?: number;
|
|
1826
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
1827
|
+
deferUpdates?: boolean;
|
|
1828
|
+
/** minimum interval for batched websocket updates */
|
|
1829
|
+
updateFlushInterval?: number;
|
|
1816
1830
|
};
|
|
1817
1831
|
type UseTrendingTokensScriptResult = {
|
|
1818
1832
|
/** is fetching tokens, return true if initially fetching tokens or refetching tokens due to query params change */
|
|
@@ -1820,7 +1834,7 @@ type UseTrendingTokensScriptResult = {
|
|
|
1820
1834
|
/** tokens */
|
|
1821
1835
|
tokens: Array<Token>;
|
|
1822
1836
|
};
|
|
1823
|
-
declare function useTrendingTokensScript({ chain, resolution, options, refetchInterval, }: UseTrendingTokensScriptParams): UseTrendingTokensScriptResult;
|
|
1837
|
+
declare function useTrendingTokensScript({ chain, resolution, options, refetchInterval, deferUpdates, updateFlushInterval, }: UseTrendingTokensScriptParams): UseTrendingTokensScriptResult;
|
|
1824
1838
|
|
|
1825
1839
|
type TrendingTokenListWidgetProps = {
|
|
1826
1840
|
/** chain id */
|
package/dist/index.d.ts
CHANGED
|
@@ -1651,6 +1651,8 @@ interface TokenListProps {
|
|
|
1651
1651
|
sortDirections?: TokenListSortDirections;
|
|
1652
1652
|
/** callback function when sort direction changes */
|
|
1653
1653
|
onSortChange?: (sortDirections: TokenListSortDirections) => void | Promise<void>;
|
|
1654
|
+
/** callback function when the virtualized list scroll state changes */
|
|
1655
|
+
onScrollingChange?: (isScrolling: boolean) => void;
|
|
1654
1656
|
/**
|
|
1655
1657
|
* list container height, required for virtualized list.
|
|
1656
1658
|
* you can use useResizeObserver hook to get the container's height.
|
|
@@ -1667,7 +1669,7 @@ interface TokenListProps {
|
|
|
1667
1669
|
/**
|
|
1668
1670
|
* Token List UI Component
|
|
1669
1671
|
*/
|
|
1670
|
-
declare function TokenList({ tokens, resolution, isLoading, ActionsComponent, onSelectToken, sortDirections, onSortChange, height, itemHeight, itemHeightMobile, className, }: TokenListProps): react_jsx_runtime.JSX.Element;
|
|
1672
|
+
declare function TokenList({ tokens, resolution, isLoading, ActionsComponent, onSelectToken, sortDirections, onSortChange, onScrollingChange, height, itemHeight, itemHeightMobile, className, }: TokenListProps): react_jsx_runtime.JSX.Element;
|
|
1671
1673
|
|
|
1672
1674
|
interface TokenCellProps {
|
|
1673
1675
|
token: Token;
|
|
@@ -1725,6 +1727,10 @@ type UseNewTokensScriptParams = {
|
|
|
1725
1727
|
options?: GetTokenListOptions;
|
|
1726
1728
|
/** refetch tokens interval */
|
|
1727
1729
|
refetchInterval?: number;
|
|
1730
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
1731
|
+
deferUpdates?: boolean;
|
|
1732
|
+
/** minimum interval for batched websocket updates */
|
|
1733
|
+
updateFlushInterval?: number;
|
|
1728
1734
|
};
|
|
1729
1735
|
type UseNewTokensScriptResult = {
|
|
1730
1736
|
/** is fetching tokens, return true if initially fetching tokens or refetching tokens due to query params change */
|
|
@@ -1732,7 +1738,7 @@ type UseNewTokensScriptResult = {
|
|
|
1732
1738
|
/** tokens */
|
|
1733
1739
|
tokens: Array<Token>;
|
|
1734
1740
|
};
|
|
1735
|
-
declare function useNewTokensScript({ chain, resolution, options, refetchInterval, }: UseNewTokensScriptParams): UseNewTokensScriptResult;
|
|
1741
|
+
declare function useNewTokensScript({ chain, resolution, options, refetchInterval, deferUpdates, updateFlushInterval, }: UseNewTokensScriptParams): UseNewTokensScriptResult;
|
|
1736
1742
|
|
|
1737
1743
|
type NewTokenListWidgetProps = {
|
|
1738
1744
|
/** chain id */
|
|
@@ -1769,6 +1775,10 @@ type UseStockTokensScriptParams = {
|
|
|
1769
1775
|
options?: GetTokenListOptions;
|
|
1770
1776
|
/** refetch tokens interval */
|
|
1771
1777
|
refetchInterval?: number;
|
|
1778
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
1779
|
+
deferUpdates?: boolean;
|
|
1780
|
+
/** minimum interval for batched websocket updates */
|
|
1781
|
+
updateFlushInterval?: number;
|
|
1772
1782
|
};
|
|
1773
1783
|
type UseStockTokensScriptResult = {
|
|
1774
1784
|
/** is fetching tokens, return true if initially fetching tokens or refetching tokens due to query params change */
|
|
@@ -1776,7 +1786,7 @@ type UseStockTokensScriptResult = {
|
|
|
1776
1786
|
/** tokens */
|
|
1777
1787
|
tokens: Array<Token>;
|
|
1778
1788
|
};
|
|
1779
|
-
declare function useStockTokensScript({ chain, resolution, options, refetchInterval, }: UseStockTokensScriptParams): UseStockTokensScriptResult;
|
|
1789
|
+
declare function useStockTokensScript({ chain, resolution, options, refetchInterval, deferUpdates, updateFlushInterval, }: UseStockTokensScriptParams): UseStockTokensScriptResult;
|
|
1780
1790
|
|
|
1781
1791
|
type StockTokenListWidgetProps = {
|
|
1782
1792
|
/** chain id */
|
|
@@ -1813,6 +1823,10 @@ type UseTrendingTokensScriptParams = {
|
|
|
1813
1823
|
options?: GetTokenListOptions;
|
|
1814
1824
|
/** refetch tokens interval */
|
|
1815
1825
|
refetchInterval?: number;
|
|
1826
|
+
/** defer websocket updates while the list is actively scrolling */
|
|
1827
|
+
deferUpdates?: boolean;
|
|
1828
|
+
/** minimum interval for batched websocket updates */
|
|
1829
|
+
updateFlushInterval?: number;
|
|
1816
1830
|
};
|
|
1817
1831
|
type UseTrendingTokensScriptResult = {
|
|
1818
1832
|
/** is fetching tokens, return true if initially fetching tokens or refetching tokens due to query params change */
|
|
@@ -1820,7 +1834,7 @@ type UseTrendingTokensScriptResult = {
|
|
|
1820
1834
|
/** tokens */
|
|
1821
1835
|
tokens: Array<Token>;
|
|
1822
1836
|
};
|
|
1823
|
-
declare function useTrendingTokensScript({ chain, resolution, options, refetchInterval, }: UseTrendingTokensScriptParams): UseTrendingTokensScriptResult;
|
|
1837
|
+
declare function useTrendingTokensScript({ chain, resolution, options, refetchInterval, deferUpdates, updateFlushInterval, }: UseTrendingTokensScriptParams): UseTrendingTokensScriptResult;
|
|
1824
1838
|
|
|
1825
1839
|
type TrendingTokenListWidgetProps = {
|
|
1826
1840
|
/** chain id */
|