@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
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { RefObject } from "react";
|
|
2
1
|
type Props = {
|
|
3
|
-
itemsListRef?: RefObject<HTMLElement>;
|
|
4
|
-
activeListItemClassName?: string;
|
|
5
2
|
onEscape?: () => void;
|
|
6
3
|
};
|
|
7
|
-
export declare const useKeyboardNavigation: (
|
|
4
|
+
export declare const useKeyboardNavigation: ({ onEscape }: Props) => void;
|
|
8
5
|
export {};
|
|
@@ -27476,7 +27476,7 @@ const filterViewableTokens = (tokens, config, direction) => {
|
|
|
27476
27476
|
};
|
|
27477
27477
|
const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
|
|
27478
27478
|
const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
|
|
27479
|
-
const { fetchAllSecretBalances } = await import('./secretService-
|
|
27479
|
+
const { fetchAllSecretBalances } = await import('./secretService-C2TxPa-m.js');
|
|
27480
27480
|
return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
|
|
27481
27481
|
};
|
|
27482
27482
|
function getTokenAssetsKey(token) {
|
|
@@ -30632,7 +30632,7 @@ function useStellarWallets() {
|
|
|
30632
30632
|
return;
|
|
30633
30633
|
try {
|
|
30634
30634
|
const { allowAllModules: initializeAllModules } = await import('@creit.tech/stellar-wallets-kit');
|
|
30635
|
-
const { formatStellarWallet } = await import('./stellarService.client-
|
|
30635
|
+
const { formatStellarWallet } = await import('./stellarService.client-deOQBP3h.js');
|
|
30636
30636
|
const modules = initializeAllModules();
|
|
30637
30637
|
const promises = modules.map(async (module) => {
|
|
30638
30638
|
const isAvailable = await module.isAvailable();
|
|
@@ -31932,64 +31932,13 @@ function useTrackSearchEmpty({ searchQuery, resultsLength, context, debounceMs =
|
|
|
31932
31932
|
}, [context, debounceMs, resultsLength, searchQuery]);
|
|
31933
31933
|
}
|
|
31934
31934
|
|
|
31935
|
-
const useKeyboardNavigation = (
|
|
31936
|
-
const { itemsListRef, activeListItemClassName = "", onEscape } = props ?? {};
|
|
31935
|
+
const useKeyboardNavigation = ({ onEscape }) => {
|
|
31937
31936
|
const onKeyDown = useCallback((event) => {
|
|
31938
31937
|
if (event.key === "Escape") {
|
|
31939
31938
|
onEscape?.();
|
|
31940
31939
|
return;
|
|
31941
31940
|
}
|
|
31942
|
-
|
|
31943
|
-
return;
|
|
31944
|
-
const itemsList = itemsListRef?.current;
|
|
31945
|
-
const separatedActiveItemClassNames = activeListItemClassName.split(" ");
|
|
31946
|
-
const defaultActiveItem = itemsList?.querySelector(`.${separatedActiveItemClassNames.join(".")}`);
|
|
31947
|
-
if (event.key === "ArrowUp") {
|
|
31948
|
-
if (!itemsList)
|
|
31949
|
-
return;
|
|
31950
|
-
event.preventDefault();
|
|
31951
|
-
const activeItem = defaultActiveItem ?? itemsList.lastElementChild;
|
|
31952
|
-
if (!activeItem)
|
|
31953
|
-
return;
|
|
31954
|
-
const previousItem = activeItem.previousElementSibling;
|
|
31955
|
-
if (previousItem) {
|
|
31956
|
-
activeItem.classList.remove(...separatedActiveItemClassNames);
|
|
31957
|
-
previousItem.classList.add(...separatedActiveItemClassNames);
|
|
31958
|
-
// scroll to previous item
|
|
31959
|
-
itemsList.scrollTo({
|
|
31960
|
-
top: (previousItem.offsetTop ?? 0) -
|
|
31961
|
-
itemsList.clientHeight,
|
|
31962
|
-
behavior: "smooth",
|
|
31963
|
-
});
|
|
31964
|
-
}
|
|
31965
|
-
}
|
|
31966
|
-
else if (event.key === "ArrowDown") {
|
|
31967
|
-
if (!itemsList)
|
|
31968
|
-
return;
|
|
31969
|
-
event.preventDefault();
|
|
31970
|
-
const activeItem = defaultActiveItem ?? itemsList.firstElementChild;
|
|
31971
|
-
if (!activeItem)
|
|
31972
|
-
return;
|
|
31973
|
-
const nextItem = activeItem.nextElementSibling;
|
|
31974
|
-
if (nextItem) {
|
|
31975
|
-
activeItem.classList.remove(...separatedActiveItemClassNames);
|
|
31976
|
-
nextItem.classList.add(...separatedActiveItemClassNames);
|
|
31977
|
-
// scroll to next item
|
|
31978
|
-
itemsList.scrollTo({
|
|
31979
|
-
top: (nextItem.offsetTop ?? 0) -
|
|
31980
|
-
itemsList.clientHeight,
|
|
31981
|
-
behavior: "smooth",
|
|
31982
|
-
});
|
|
31983
|
-
}
|
|
31984
|
-
}
|
|
31985
|
-
else if (event.key === "Enter") {
|
|
31986
|
-
event.preventDefault();
|
|
31987
|
-
if (defaultActiveItem) {
|
|
31988
|
-
// select active item
|
|
31989
|
-
defaultActiveItem.querySelector("button")?.click();
|
|
31990
|
-
}
|
|
31991
|
-
}
|
|
31992
|
-
}, [itemsListRef, activeListItemClassName]);
|
|
31941
|
+
}, [onEscape]);
|
|
31993
31942
|
useEffect(() => {
|
|
31994
31943
|
document.addEventListener("keydown", onKeyDown, false);
|
|
31995
31944
|
return () => {
|
|
@@ -40848,4 +40797,4 @@ const SquidProvider = ({ children, config, placeholder, }) => {
|
|
|
40848
40797
|
};
|
|
40849
40798
|
|
|
40850
40799
|
export { useNativeBalance as $, AxelarStatusResponseType as A, useAddressBookStore as B, CHAIN_IDS as C, DEFAULT_LOCALE as D, useAssetsColorsStore as E, useFavoriteTokensStore as F, useHistoryStore as G, HistoryTxType as H, useSendTransactionStore as I, useConfigStore as J, useSquidStore as K, useSwapRoutePersistStore as L, useTransactionStore as M, ConnectingWalletStatus as N, useWalletStore as O, useDepositAddress as P, useSwap as Q, useAllConnectedWalletBalances as R, SquidStatusErrorType as S, TransactionErrorType as T, useAllTokensWithBalanceForChainType as U, useCosmosBalance as V, WindowWalletFlag as W, XamanXrplNetwork as X, useEvmBalance as Y, useMultiChainBalance as Z, useMultipleTokenPrices as _, chainTypeToZeroAddressMap as a, findToken as a$, useNativeTokenForChain as a0, useSingleTokenPrice as a1, useSquidTokens as a2, useHistoricalData as a3, useTokensData as a4, useEstimateSendTransaction as a5, useSendTransaction as a6, useSendTransactionGas as a7, useAllTransactionsStatus as a8, useApproval as a9, useGetFiatQuote as aA, useGetOnRampConfig as aB, useExecuteFiatQuote as aC, useFiatOnRampTxStatus as aD, useFiatTransactions as aE, useCurrencyDetails as aF, useCountryDetails as aG, useAvailableQuotes as aH, useRecommendedQuote as aI, useGetOnrampPaymentTypes as aJ, useSuggestedFiatAmounts as aK, SquidProvider as aL, EnsService as aM, getXummClient as aN, isXamanXAppContext as aO, getQueryHeaders as aP, getStatusCode as aQ, is404Error as aR, assetsBaseUrl as aS, shareSubgraphId as aT, sortTokensBySharedSubgraphIds as aU, getSupportedChainIdsForDirection as aV, filterChains as aW, filterTokens as aX, getTokenImage as aY, getNewSwapParamsFromInput as aZ, sortAllTokens as a_, useEstimate as aa, useEstimatePriceImpact as ab, useExecuteTransaction as ac, useGetRoute as ad, useGetRouteWrapper as ae, useRouteWarnings as af, useSendTransactionStatus as ag, useSwapTransactionStatus as ah, useAvatar as ai, useHistory as aj, useUserParams as ak, useDebouncedValue as al, useAddToken as am, useAutoConnect as an, useEnsDataForAddress as ao, useEnsSearch as ap, useGnosisContext as aq, useIsSameAddressAndGnosisContext as ar, useIntegratorContext as as, useMultiChainWallet as at, useSigner as au, useWallet as av, useWallets as aw, useXrplTrustLine as ax, TX_STATUS_CONSTANTS as ay, FINAL_TRANSACTION_STATUSES as az, destinationAddressResetValue as b, isSolanaAddressValid as b$, findNativeToken as b0, normalizeIbcAddress as b1, groupTokensBySymbol as b2, groupTokensByChainId as b3, filterViewableTokens as b4, getSecretNetworkBalances as b5, getTokenAssetsKey as b6, fetchAssetsColors as b7, initializeSquidWithAssetsColors as b8, isEmptyObject as b9, isSwapRouteError as bA, isStatusError as bB, createQuoteRequestParamsHash as bC, WidgetEvents as bD, EvmNetworkNotSupportedErrorCode as bE, addEthereumChain as bF, parseEvmAddress as bG, formatEvmWallet as bH, filterWagmiConnector as bI, getUserCountry as bJ, getCountryData as bK, getCurrencyData as bL, adaptiveRound as bM, getSuggestedAmountsForCurrency as bN, parseToBigInt as bO, roundNumericValue as bP, formatUnitsRounded as bQ, formatTokenAmount as bR, formatUsdAmount as bS, trimExtraDecimals as bT, getNumericValue as bU, cleanAmount as bV, convertTokenAmountToUSD as bW, convertUSDToTokenAmount as bX, calculateTotal24hChange as bY, searchTokens as bZ, filterSolanaWallets as b_, normalizeTokenSymbol as ba, areTokenSymbolsCompatible as bb, isEvmosChain as bc, getConfigWithDefaults as bd, randomIntFromInterval as be, getTokensForChain as bf, getFirstAvailableChainId as bg, fetchHighestBalanceToken as bh, getInitialOrDefaultTokenAddressForChain as bi, getInitialTokenAddressForChain as bj, filterTokensForDestination as bk, getInitialChainIdFromConfig as bl, getCosmosKey as bm, getKeysSettled as bn, getAllKeysForSupportedCosmosChains as bo, isCosmosAddressValid as bp, getCosmosSigningClient as bq, getCosmosChainInfosObject as br, connectCosmosWallet as bs, isFallbackAddressNeeded as bt, suggestChainOrThrow as bu, normalizeError as bv, transactionErrorCode as bw, isUserRejectionError as bx, getTransactionError as by, handleTransactionErrorEvents as bz, chainTypeToNativeTokenAddressMap as c, executeSolanaSwap as c0, executeSolanaTransfer as c1, formatTransactionHistoryDate as c2, getAxelarExplorerTxUrl as c3, getSourceExplorerTxUrl as c4, getMainExplorerUrl as c5, formatDistance as c6, formatSeconds as c7, formatSwapTxStatusResponseForStorage as c8, simplifyRouteAction as c9, sortWallets as cA, areSameAddress as cB, sortAddressBook as cC, calculateTotalUsdBalanceUSD as cD, addTokenToWallet as cE, isEvmChainNotSupportedError as cF, getWalletSupportedChainTypes as cG, getConnectorForChainType as cH, walletSupportsChainType as cI, connectWallet as cJ, cancelConnectWallet as cK, isProblematicConnector as cL, mergeWallets as cM, isXionSmartContractAddress as cN, isXrplAddressValid as cO, buildXrplTrustSetTx as cP, getXrplNetwork as cQ, parseXrplPaymentTx as cR, fetchSwapTransactionStatus as ca, compareTransactionIds as cb, isCoralBridgeAction as cc, sleep as cd, isDepositRoute as ce, isChainflipBridgeTransaction as cf, getHistoryTransactionId as cg, getStepStatuses as ch, getHalfSuccessState as ci, getStepsInfos as cj, getSwapTxStatusRefetchInterval as ck, getSendTxStatusRefetchInterval as cl, chainflipMultihopBridgeType as cm, getBridgeType as cn, getTransactionStatus as co, getTransactionEndStatus as cp, isHistoryTransactionPending as cq, isHistoryTransactionFailed as cr, isHistoryTransactionWarning as cs, isHistoryTransactionEnded as ct, formatHash as cu, isWalletAddressValid as cv, redirectToExtensionsStore as cw, accessProperty as cx, populateWallets as cy, getDefaultChain as cz, definedInWindow as d, fallbackAddressResetValue as e, formatBNToReadable as f, nativeCosmosTokenAddress as g, nativeEvmTokenAddress as h, nativeSolanaTokenAddress as i, nativeStellarTokenAddress as j, nativeSuiTokenAddress as k, nativeXrplTokenAddress as l, CosmosProvider as m, nativeBitcoinTokenAddress as n, SendTransactionStatus as o, TransactionStatus as p, useTrackSearchEmpty as q, useSquidChains as r, useClient as s, useCosmosForChain as t, useCosmosContext as u, useKeyboardNavigation as v, walletIconBaseUrl as w, useSquidQueryClient as x, useSquid as y, useStellarAccountActivation as z };
|
|
40851
|
-
//# sourceMappingURL=index-
|
|
40800
|
+
//# sourceMappingURL=index-BKmIOD3t.js.map
|