@0xsquid/react-hooks 8.0.1 → 8.0.2
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/hooks/navigation/useKeyboardNavigation.d.ts +1 -4
- package/dist/{index-jI-SulDo.js → index-BKmIOD3t.js} +5 -56
- package/dist/{index-DVmnHUzP.js.map → index-BKmIOD3t.js.map} +1 -1
- package/dist/{index-DVmnHUzP.js → index-BjIFR_GS.js} +5 -56
- package/dist/{index-jI-SulDo.js.map → index-BjIFR_GS.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{secretService-DN5IzV4w.js → secretService-C2TxPa-m.js} +2 -2
- package/dist/{secretService-DN5IzV4w.js.map → secretService-C2TxPa-m.js.map} +1 -1
- package/dist/{secretService-DBxDcfuA.js → secretService-DT8cWLsm.js} +2 -2
- package/dist/{secretService-DBxDcfuA.js.map → secretService-DT8cWLsm.js.map} +1 -1
- package/dist/{stellarService.client-DTFEi5m2.js → stellarService.client-DH1Yp2nE.js} +2 -2
- package/dist/{stellarService.client-DTFEi5m2.js.map → stellarService.client-DH1Yp2nE.js.map} +1 -1
- package/dist/{stellarService.client-7sSrAZi2.js → stellarService.client-deOQBP3h.js} +2 -2
- package/dist/{stellarService.client-7sSrAZi2.js.map → stellarService.client-deOQBP3h.js.map} +1 -1
- package/package.json +1 -1
|
@@ -27497,7 +27497,7 @@ const filterViewableTokens = (tokens, config, direction) => {
|
|
|
27497
27497
|
};
|
|
27498
27498
|
const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
|
|
27499
27499
|
const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
|
|
27500
|
-
const { fetchAllSecretBalances } = await Promise.resolve().then(function () { return require('./secretService-
|
|
27500
|
+
const { fetchAllSecretBalances } = await Promise.resolve().then(function () { return require('./secretService-DT8cWLsm.js'); });
|
|
27501
27501
|
return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
|
|
27502
27502
|
};
|
|
27503
27503
|
function getTokenAssetsKey(token) {
|
|
@@ -30653,7 +30653,7 @@ function useStellarWallets() {
|
|
|
30653
30653
|
return;
|
|
30654
30654
|
try {
|
|
30655
30655
|
const { allowAllModules: initializeAllModules } = await import('@creit.tech/stellar-wallets-kit');
|
|
30656
|
-
const { formatStellarWallet } = await Promise.resolve().then(function () { return require('./stellarService.client-
|
|
30656
|
+
const { formatStellarWallet } = await Promise.resolve().then(function () { return require('./stellarService.client-DH1Yp2nE.js'); });
|
|
30657
30657
|
const modules = initializeAllModules();
|
|
30658
30658
|
const promises = modules.map(async (module) => {
|
|
30659
30659
|
const isAvailable = await module.isAvailable();
|
|
@@ -31953,64 +31953,13 @@ function useTrackSearchEmpty({ searchQuery, resultsLength, context, debounceMs =
|
|
|
31953
31953
|
}, [context, debounceMs, resultsLength, searchQuery]);
|
|
31954
31954
|
}
|
|
31955
31955
|
|
|
31956
|
-
const useKeyboardNavigation = (
|
|
31957
|
-
const { itemsListRef, activeListItemClassName = "", onEscape } = props ?? {};
|
|
31956
|
+
const useKeyboardNavigation = ({ onEscape }) => {
|
|
31958
31957
|
const onKeyDown = React.useCallback((event) => {
|
|
31959
31958
|
if (event.key === "Escape") {
|
|
31960
31959
|
onEscape?.();
|
|
31961
31960
|
return;
|
|
31962
31961
|
}
|
|
31963
|
-
|
|
31964
|
-
return;
|
|
31965
|
-
const itemsList = itemsListRef?.current;
|
|
31966
|
-
const separatedActiveItemClassNames = activeListItemClassName.split(" ");
|
|
31967
|
-
const defaultActiveItem = itemsList?.querySelector(`.${separatedActiveItemClassNames.join(".")}`);
|
|
31968
|
-
if (event.key === "ArrowUp") {
|
|
31969
|
-
if (!itemsList)
|
|
31970
|
-
return;
|
|
31971
|
-
event.preventDefault();
|
|
31972
|
-
const activeItem = defaultActiveItem ?? itemsList.lastElementChild;
|
|
31973
|
-
if (!activeItem)
|
|
31974
|
-
return;
|
|
31975
|
-
const previousItem = activeItem.previousElementSibling;
|
|
31976
|
-
if (previousItem) {
|
|
31977
|
-
activeItem.classList.remove(...separatedActiveItemClassNames);
|
|
31978
|
-
previousItem.classList.add(...separatedActiveItemClassNames);
|
|
31979
|
-
// scroll to previous item
|
|
31980
|
-
itemsList.scrollTo({
|
|
31981
|
-
top: (previousItem.offsetTop ?? 0) -
|
|
31982
|
-
itemsList.clientHeight,
|
|
31983
|
-
behavior: "smooth",
|
|
31984
|
-
});
|
|
31985
|
-
}
|
|
31986
|
-
}
|
|
31987
|
-
else if (event.key === "ArrowDown") {
|
|
31988
|
-
if (!itemsList)
|
|
31989
|
-
return;
|
|
31990
|
-
event.preventDefault();
|
|
31991
|
-
const activeItem = defaultActiveItem ?? itemsList.firstElementChild;
|
|
31992
|
-
if (!activeItem)
|
|
31993
|
-
return;
|
|
31994
|
-
const nextItem = activeItem.nextElementSibling;
|
|
31995
|
-
if (nextItem) {
|
|
31996
|
-
activeItem.classList.remove(...separatedActiveItemClassNames);
|
|
31997
|
-
nextItem.classList.add(...separatedActiveItemClassNames);
|
|
31998
|
-
// scroll to next item
|
|
31999
|
-
itemsList.scrollTo({
|
|
32000
|
-
top: (nextItem.offsetTop ?? 0) -
|
|
32001
|
-
itemsList.clientHeight,
|
|
32002
|
-
behavior: "smooth",
|
|
32003
|
-
});
|
|
32004
|
-
}
|
|
32005
|
-
}
|
|
32006
|
-
else if (event.key === "Enter") {
|
|
32007
|
-
event.preventDefault();
|
|
32008
|
-
if (defaultActiveItem) {
|
|
32009
|
-
// select active item
|
|
32010
|
-
defaultActiveItem.querySelector("button")?.click();
|
|
32011
|
-
}
|
|
32012
|
-
}
|
|
32013
|
-
}, [itemsListRef, activeListItemClassName]);
|
|
31962
|
+
}, [onEscape]);
|
|
32014
31963
|
React.useEffect(() => {
|
|
32015
31964
|
document.addEventListener("keydown", onKeyDown, false);
|
|
32016
31965
|
return () => {
|
|
@@ -41095,4 +41044,4 @@ exports.useWallets = useWallets;
|
|
|
41095
41044
|
exports.useXrplTrustLine = useXrplTrustLine;
|
|
41096
41045
|
exports.walletIconBaseUrl = walletIconBaseUrl;
|
|
41097
41046
|
exports.walletSupportsChainType = walletSupportsChainType;
|
|
41098
|
-
//# sourceMappingURL=index-
|
|
41047
|
+
//# sourceMappingURL=index-BjIFR_GS.js.map
|