@lifi/widget 4.6.0 → 4.7.1
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/README.md +26 -3
- package/dist/esm/App.d.ts +1 -2
- package/dist/esm/App.d.ts.map +1 -1
- package/dist/esm/AppDrawer.d.ts +1 -2
- package/dist/esm/AppDrawer.d.ts.map +1 -1
- package/dist/esm/components/ActionRow/ActionRow.d.ts +1 -2
- package/dist/esm/components/ActionRow/ActionRow.d.ts.map +1 -1
- package/dist/esm/components/AmountInput/AmountInput.style.d.ts +2 -2
- package/dist/esm/components/AmountInput/AmountInput.style.d.ts.map +1 -1
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.d.ts +1 -2
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.d.ts.map +1 -1
- package/dist/esm/components/AmountInput/PriceFormHelperText.style.d.ts +1 -2
- package/dist/esm/components/AmountInput/PriceFormHelperText.style.d.ts.map +1 -1
- package/dist/esm/components/AmountInputCard/ReceiveAmountCard.js +6 -2
- package/dist/esm/components/AmountInputCard/ReceiveAmountCard.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.d.ts +1 -2
- package/dist/esm/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/esm/components/Avatar/TokenAvatar.d.ts +1 -2
- package/dist/esm/components/Avatar/TokenAvatar.d.ts.map +1 -1
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.d.ts +1 -2
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.d.ts.map +1 -1
- package/dist/esm/components/BaseTransactionButton/types.d.ts +1 -2
- package/dist/esm/components/BaseTransactionButton/types.d.ts.map +1 -1
- package/dist/esm/components/BottomSheet/BottomSheet.js +1 -0
- package/dist/esm/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/esm/components/BottomSheet/types.d.ts +1 -2
- package/dist/esm/components/BottomSheet/types.d.ts.map +1 -1
- package/dist/esm/components/ButtonTertiary.d.ts +1 -2
- package/dist/esm/components/ButtonTertiary.d.ts.map +1 -1
- package/dist/esm/components/Card/CardIconButton.d.ts +1 -2
- package/dist/esm/components/Card/CardIconButton.d.ts.map +1 -1
- package/dist/esm/components/Card/CardTitle.d.ts +1 -2
- package/dist/esm/components/Card/CardTitle.d.ts.map +1 -1
- package/dist/esm/components/Card/InputCard.d.ts +1 -2
- package/dist/esm/components/Card/InputCard.d.ts.map +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.d.ts +1 -2
- package/dist/esm/components/ChainSelect/ChainSelect.d.ts.map +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.style.d.ts +1 -2
- package/dist/esm/components/ChainSelect/ChainSelect.style.d.ts.map +1 -1
- package/dist/esm/components/ContractComponent/ContractComponent.d.ts +1 -2
- package/dist/esm/components/ContractComponent/ContractComponent.d.ts.map +1 -1
- package/dist/esm/components/ContractComponent/ItemPrice.d.ts +2 -3
- package/dist/esm/components/ContractComponent/ItemPrice.d.ts.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFT.d.ts +1 -2
- package/dist/esm/components/ContractComponent/NFT/NFT.d.ts.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFTBase.d.ts +1 -2
- package/dist/esm/components/ContractComponent/NFT/NFTBase.d.ts.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/types.d.ts +3 -4
- package/dist/esm/components/ContractComponent/NFT/types.d.ts.map +1 -1
- package/dist/esm/components/ExecutionStatusCard/ExecutionStatusCard.d.ts +1 -2
- package/dist/esm/components/ExecutionStatusCard/ExecutionStatusCard.d.ts.map +1 -1
- package/dist/esm/components/ExecutionStatusCard/StatusIcon.d.ts +1 -2
- package/dist/esm/components/ExecutionStatusCard/StatusIcon.d.ts.map +1 -1
- package/dist/esm/components/FeeBreakdownTooltip.d.ts +1 -2
- package/dist/esm/components/FeeBreakdownTooltip.d.ts.map +1 -1
- package/dist/esm/components/IconCircle/IconCircle.d.ts +1 -2
- package/dist/esm/components/IconCircle/IconCircle.d.ts.map +1 -1
- package/dist/esm/components/IconCircle/statusIcons.d.ts +1 -2
- package/dist/esm/components/IconCircle/statusIcons.d.ts.map +1 -1
- package/dist/esm/components/IconTypography.d.ts +1 -2
- package/dist/esm/components/IconTypography.d.ts.map +1 -1
- package/dist/esm/components/ListItem/ListItemButton.d.ts +1 -2
- package/dist/esm/components/ListItem/ListItemButton.d.ts.map +1 -1
- package/dist/esm/components/Messages/WarningMessages.d.ts +1 -2
- package/dist/esm/components/Messages/WarningMessages.d.ts.map +1 -1
- package/dist/esm/components/PageContainer.d.ts +2 -3
- package/dist/esm/components/PageContainer.d.ts.map +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.d.ts +1 -2
- package/dist/esm/components/PoweredBy/PoweredBy.d.ts.map +1 -1
- package/dist/esm/components/ProgressToNextUpdate.d.ts +1 -2
- package/dist/esm/components/ProgressToNextUpdate.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteCard.d.ts +1 -2
- package/dist/esm/components/RouteCard/RouteCard.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardSkeleton.d.ts +1 -2
- package/dist/esm/components/RouteCard/RouteCardSkeleton.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteDetails.d.ts +1 -2
- package/dist/esm/components/RouteCard/RouteDetails.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteDetails.style.d.ts +5 -6
- package/dist/esm/components/RouteCard/RouteDetails.style.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteNotFoundCard.d.ts +1 -2
- package/dist/esm/components/RouteCard/RouteNotFoundCard.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteTokens.d.ts +1 -2
- package/dist/esm/components/RouteCard/RouteTokens.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/types.d.ts +2 -3
- package/dist/esm/components/RouteCard/types.d.ts.map +1 -1
- package/dist/esm/components/Search/SearchInput.d.ts +1 -2
- package/dist/esm/components/Search/SearchInput.d.ts.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.d.ts +1 -2
- package/dist/esm/components/SendToWallet/SendToWalletButton.d.ts.map +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.d.ts +1 -2
- package/dist/esm/components/Skeleton/WidgetSkeleton.d.ts.map +1 -1
- package/dist/esm/components/StepActions/SentToWalletRow.d.ts +1 -2
- package/dist/esm/components/StepActions/SentToWalletRow.d.ts.map +1 -1
- package/dist/esm/components/StepActions/StepActionRow.style.d.ts +1 -2
- package/dist/esm/components/StepActions/StepActionRow.style.d.ts.map +1 -1
- package/dist/esm/components/StepActions/StepActionsList.d.ts +1 -2
- package/dist/esm/components/StepActions/StepActionsList.d.ts.map +1 -1
- package/dist/esm/components/StepActions/executionRows.d.ts +2 -3
- package/dist/esm/components/StepActions/executionRows.d.ts.map +1 -1
- package/dist/esm/components/Token/Token.d.ts.map +1 -1
- package/dist/esm/components/Token/Token.js +2 -4
- package/dist/esm/components/Token/Token.js.map +1 -1
- package/dist/esm/components/TokenList/RecentTokensHeader.js +44 -0
- package/dist/esm/components/TokenList/RecentTokensHeader.js.map +1 -0
- package/dist/esm/components/TokenList/RecentTokensToggle.js +36 -0
- package/dist/esm/components/TokenList/RecentTokensToggle.js.map +1 -0
- package/dist/esm/components/TokenList/RemoveRecentTokenButton.js +32 -0
- package/dist/esm/components/TokenList/RemoveRecentTokenButton.js.map +1 -0
- package/dist/esm/components/TokenList/TokenList.js +55 -5
- package/dist/esm/components/TokenList/TokenList.js.map +1 -1
- package/dist/esm/components/TokenList/TokenListItem.js +35 -19
- package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
- package/dist/esm/components/TokenList/TokenNotFound.d.ts +1 -2
- package/dist/esm/components/TokenList/TokenNotFound.d.ts.map +1 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.d.ts +1 -2
- package/dist/esm/components/TokenList/VirtualizedTokenList.d.ts.map +1 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.js +55 -42
- package/dist/esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/dist/esm/components/TokenList/types.d.ts +9 -2
- package/dist/esm/components/TokenList/types.d.ts.map +1 -1
- package/dist/esm/components/TokenList/useTokenSelect.d.ts +1 -2
- package/dist/esm/components/TokenList/useTokenSelect.d.ts.map +1 -1
- package/dist/esm/components/TokenRate/TokenRate.d.ts +1 -2
- package/dist/esm/components/TokenRate/TokenRate.d.ts.map +1 -1
- package/dist/esm/components/TransactionCard/TransactionCard.style.d.ts +2 -3
- package/dist/esm/components/TransactionCard/TransactionCard.style.d.ts.map +1 -1
- package/dist/esm/config/constants.d.ts +1 -2
- package/dist/esm/config/constants.d.ts.map +1 -1
- package/dist/esm/config/version.d.ts +2 -3
- package/dist/esm/config/version.d.ts.map +1 -1
- package/dist/esm/config/version.js +1 -1
- package/dist/esm/config/version.js.map +1 -1
- package/dist/esm/hooks/useAddressActivity.d.ts +1 -2
- package/dist/esm/hooks/useAddressActivity.d.ts.map +1 -1
- package/dist/esm/hooks/useAddressValidation.d.ts +2 -3
- package/dist/esm/hooks/useAddressValidation.d.ts.map +1 -1
- package/dist/esm/hooks/useAvailableChains.d.ts +1 -2
- package/dist/esm/hooks/useAvailableChains.d.ts.map +1 -1
- package/dist/esm/hooks/useChain.d.ts +1 -2
- package/dist/esm/hooks/useChain.d.ts.map +1 -1
- package/dist/esm/hooks/useContactSupport.d.ts +1 -2
- package/dist/esm/hooks/useContactSupport.d.ts.map +1 -1
- package/dist/esm/hooks/useDebouncedWatch.d.ts +1 -2
- package/dist/esm/hooks/useDebouncedWatch.d.ts.map +1 -1
- package/dist/esm/hooks/useDisplayedTokens.js +6 -4
- package/dist/esm/hooks/useDisplayedTokens.js.map +1 -1
- package/dist/esm/hooks/useExplorer.d.ts +2 -3
- package/dist/esm/hooks/useExplorer.d.ts.map +1 -1
- package/dist/esm/hooks/useExplorer.js +7 -3
- package/dist/esm/hooks/useExplorer.js.map +1 -1
- package/dist/esm/hooks/useHeader.d.ts +1 -2
- package/dist/esm/hooks/useHeader.d.ts.map +1 -1
- package/dist/esm/hooks/useListHeight.d.ts +1 -2
- package/dist/esm/hooks/useListHeight.d.ts.map +1 -1
- package/dist/esm/hooks/useNavigateBack.d.ts +1 -2
- package/dist/esm/hooks/useNavigateBack.d.ts.map +1 -1
- package/dist/esm/hooks/useRecentTokens.js +46 -0
- package/dist/esm/hooks/useRecentTokens.js.map +1 -0
- package/dist/esm/hooks/useRouteExecution.d.ts +1 -2
- package/dist/esm/hooks/useRouteExecution.d.ts.map +1 -1
- package/dist/esm/hooks/useRouteExecutionMessage.d.ts +1 -2
- package/dist/esm/hooks/useRouteExecutionMessage.d.ts.map +1 -1
- package/dist/esm/hooks/useRoutes.d.ts +1 -2
- package/dist/esm/hooks/useRoutes.d.ts.map +1 -1
- package/dist/esm/hooks/useRoutes.js +7 -2
- package/dist/esm/hooks/useRoutes.js.map +1 -1
- package/dist/esm/hooks/useToAddressRequirements.d.ts +1 -2
- package/dist/esm/hooks/useToAddressRequirements.d.ts.map +1 -1
- package/dist/esm/hooks/useToAddressRequirements.js +8 -2
- package/dist/esm/hooks/useToAddressRequirements.js.map +1 -1
- package/dist/esm/hooks/useToken.d.ts +1 -2
- package/dist/esm/hooks/useToken.d.ts.map +1 -1
- package/dist/esm/hooks/useTokenAddressBalance.d.ts +1 -2
- package/dist/esm/hooks/useTokenAddressBalance.d.ts.map +1 -1
- package/dist/esm/hooks/useTokenBalances.d.ts +3 -2
- package/dist/esm/hooks/useTokenBalances.d.ts.map +1 -1
- package/dist/esm/hooks/useTokenBalances.js +15 -9
- package/dist/esm/hooks/useTokenBalances.js.map +1 -1
- package/dist/esm/hooks/useTokenList.d.ts +1 -2
- package/dist/esm/hooks/useTokenList.d.ts.map +1 -1
- package/dist/esm/hooks/useTokenSearch.js +3 -2
- package/dist/esm/hooks/useTokenSearch.js.map +1 -1
- package/dist/esm/hooks/useTokens.js +26 -15
- package/dist/esm/hooks/useTokens.js.map +1 -1
- package/dist/esm/hooks/useTools.d.ts +1 -2
- package/dist/esm/hooks/useTools.d.ts.map +1 -1
- package/dist/esm/hooks/useWidgetChains.d.ts +1 -2
- package/dist/esm/hooks/useWidgetChains.d.ts.map +1 -1
- package/dist/esm/hooks/useWidgetEvents.d.ts +3 -4
- package/dist/esm/hooks/useWidgetEvents.d.ts.map +1 -1
- package/dist/esm/i18n/bn.json +4 -0
- package/dist/esm/i18n/de.json +4 -0
- package/dist/esm/i18n/en.json +4 -0
- package/dist/esm/i18n/es.json +4 -0
- package/dist/esm/i18n/fr.json +4 -0
- package/dist/esm/i18n/hi.json +4 -0
- package/dist/esm/i18n/id.json +4 -0
- package/dist/esm/i18n/it.json +4 -0
- package/dist/esm/i18n/ja.json +4 -0
- package/dist/esm/i18n/ko.json +4 -0
- package/dist/esm/i18n/pl.json +4 -0
- package/dist/esm/i18n/pt.json +4 -0
- package/dist/esm/i18n/th.json +4 -0
- package/dist/esm/i18n/tr.json +4 -0
- package/dist/esm/i18n/uk.json +4 -0
- package/dist/esm/i18n/vi.json +4 -0
- package/dist/esm/i18n/zh.json +4 -0
- package/dist/esm/pages/MainPage/MainWarningMessages.d.ts +1 -2
- package/dist/esm/pages/MainPage/MainWarningMessages.d.ts.map +1 -1
- package/dist/esm/pages/SelectChainPage/SelectChainPage.d.ts +1 -2
- package/dist/esm/pages/SelectChainPage/SelectChainPage.d.ts.map +1 -1
- package/dist/esm/pages/SelectChainPage/types.d.ts +1 -2
- package/dist/esm/pages/SelectChainPage/types.d.ts.map +1 -1
- package/dist/esm/pages/SelectTokenPage/SearchTokenInput.d.ts +1 -2
- package/dist/esm/pages/SelectTokenPage/SearchTokenInput.d.ts.map +1 -1
- package/dist/esm/pages/SendToWallet/BookmarksPage.js +2 -1
- package/dist/esm/pages/SendToWallet/BookmarksPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.js +2 -1
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.js +2 -1
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.js +2 -1
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/ContactSupportButton.d.ts +1 -2
- package/dist/esm/pages/TransactionDetailsPage/ContactSupportButton.d.ts.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +2 -1
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js +2 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js.map +1 -1
- package/dist/esm/pages/TransactionPage/ConfirmToAddressSheet.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/ConfirmToAddressSheet.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.d.ts +2 -3
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/ExecutionDoneCard.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/ExecutionDoneCard.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/RouteTracker.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/RouteTracker.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/StartTransactionButton.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/StartTransactionButton.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js +0 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenVerificationBottomSheet.js +0 -1
- package/dist/esm/pages/TransactionPage/TokenVerificationBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionDoneButtons.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/TransactionDoneButtons.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionFailedButtons.js +38 -12
- package/dist/esm/pages/TransactionPage/TransactionFailedButtons.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionReview.js +22 -21
- package/dist/esm/pages/TransactionPage/TransactionReview.js.map +1 -1
- package/dist/esm/pages/TransactionPage/types.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/types.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/utils.d.ts +2 -3
- package/dist/esm/pages/TransactionPage/utils.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/utils.js +23 -1
- package/dist/esm/pages/TransactionPage/utils.js.map +1 -1
- package/dist/esm/providers/I18nProvider/I18nProvider.d.ts +1 -2
- package/dist/esm/providers/I18nProvider/I18nProvider.d.ts.map +1 -1
- package/dist/esm/providers/I18nProvider/types.d.ts +4 -5
- package/dist/esm/providers/I18nProvider/types.d.ts.map +1 -1
- package/dist/esm/providers/QueryClientProvider.d.ts +1 -2
- package/dist/esm/providers/QueryClientProvider.d.ts.map +1 -1
- package/dist/esm/providers/SDKClientProvider.d.ts +2 -3
- package/dist/esm/providers/SDKClientProvider.d.ts.map +1 -1
- package/dist/esm/providers/WalletProvider/WalletProvider.d.ts +1 -2
- package/dist/esm/providers/WalletProvider/WalletProvider.d.ts.map +1 -1
- package/dist/esm/providers/WidgetProvider/WidgetProvider.d.ts +2 -3
- package/dist/esm/providers/WidgetProvider/WidgetProvider.d.ts.map +1 -1
- package/dist/esm/providers/WidgetProvider/types.d.ts +2 -3
- package/dist/esm/providers/WidgetProvider/types.d.ts.map +1 -1
- package/dist/esm/shared.d.ts +2 -1
- package/dist/esm/shared.js +2 -1
- package/dist/esm/stores/StoreProvider.d.ts +1 -2
- package/dist/esm/stores/StoreProvider.d.ts.map +1 -1
- package/dist/esm/stores/StoreProvider.js +10 -6
- package/dist/esm/stores/StoreProvider.js.map +1 -1
- package/dist/esm/stores/bookmarks/BookmarkStore.d.ts +1 -2
- package/dist/esm/stores/bookmarks/BookmarkStore.d.ts.map +1 -1
- package/dist/esm/stores/bookmarks/types.d.ts +5 -6
- package/dist/esm/stores/bookmarks/types.d.ts.map +1 -1
- package/dist/esm/stores/chains/ChainOrderStore.d.ts +1 -2
- package/dist/esm/stores/chains/ChainOrderStore.d.ts.map +1 -1
- package/dist/esm/stores/chains/ChainOrderStore.js +11 -5
- package/dist/esm/stores/chains/ChainOrderStore.js.map +1 -1
- package/dist/esm/stores/chains/types.d.ts +1 -2
- package/dist/esm/stores/chains/types.d.ts.map +1 -1
- package/dist/esm/stores/form/types.d.ts +20 -21
- package/dist/esm/stores/form/types.d.ts.map +1 -1
- package/dist/esm/stores/form/useFieldActions.d.ts +1 -2
- package/dist/esm/stores/form/useFieldActions.d.ts.map +1 -1
- package/dist/esm/stores/form/useFieldValues.d.ts +1 -2
- package/dist/esm/stores/form/useFieldValues.d.ts.map +1 -1
- package/dist/esm/stores/header/types.d.ts +1 -2
- package/dist/esm/stores/header/types.d.ts.map +1 -1
- package/dist/esm/stores/header/useHeaderStore.d.ts +2 -3
- package/dist/esm/stores/header/useHeaderStore.d.ts.map +1 -1
- package/dist/esm/stores/inputMode/useInputModeStore.d.ts +1 -2
- package/dist/esm/stores/inputMode/useInputModeStore.d.ts.map +1 -1
- package/dist/esm/stores/recentTokens/RecentTokensStore.js +23 -0
- package/dist/esm/stores/recentTokens/RecentTokensStore.js.map +1 -0
- package/dist/esm/stores/recentTokens/createRecentTokensStore.js +54 -0
- package/dist/esm/stores/recentTokens/createRecentTokensStore.js.map +1 -0
- package/dist/esm/stores/recentTokens/utils.js +15 -0
- package/dist/esm/stores/recentTokens/utils.js.map +1 -0
- package/dist/esm/stores/routes/RouteExecutionStore.d.ts +2 -3
- package/dist/esm/stores/routes/RouteExecutionStore.d.ts.map +1 -1
- package/dist/esm/stores/routes/types.d.ts +3 -4
- package/dist/esm/stores/routes/types.d.ts.map +1 -1
- package/dist/esm/stores/routes/utils.d.ts +4 -5
- package/dist/esm/stores/routes/utils.d.ts.map +1 -1
- package/dist/esm/stores/settings/SettingsStore.d.ts +2 -3
- package/dist/esm/stores/settings/SettingsStore.d.ts.map +1 -1
- package/dist/esm/stores/settings/types.d.ts +2 -3
- package/dist/esm/stores/settings/types.d.ts.map +1 -1
- package/dist/esm/stores/types.d.ts +2 -3
- package/dist/esm/stores/types.d.ts.map +1 -1
- package/dist/esm/themes/azureLight.d.ts +1 -2
- package/dist/esm/themes/azureLight.d.ts.map +1 -1
- package/dist/esm/themes/jumper.d.ts +1 -2
- package/dist/esm/themes/jumper.d.ts.map +1 -1
- package/dist/esm/themes/palettes.d.ts +3 -4
- package/dist/esm/themes/palettes.d.ts.map +1 -1
- package/dist/esm/themes/types.d.ts +1 -0
- package/dist/esm/themes/watermelonLight.d.ts +1 -2
- package/dist/esm/themes/watermelonLight.d.ts.map +1 -1
- package/dist/esm/themes/windows95.d.ts +1 -2
- package/dist/esm/themes/windows95.d.ts.map +1 -1
- package/dist/esm/types/events.d.ts +13 -14
- package/dist/esm/types/events.d.ts.map +1 -1
- package/dist/esm/types/token.d.ts +4 -2
- package/dist/esm/types/token.d.ts.map +1 -1
- package/dist/esm/types/widget.d.ts +55 -51
- package/dist/esm/types/widget.d.ts.map +1 -1
- package/dist/esm/types/widget.js.map +1 -1
- package/dist/esm/utils/address.js +19 -0
- package/dist/esm/utils/address.js.map +1 -0
- package/dist/esm/utils/compactNumberFormatter.d.ts +1 -2
- package/dist/esm/utils/compactNumberFormatter.d.ts.map +1 -1
- package/dist/esm/utils/converters.d.ts +1 -2
- package/dist/esm/utils/converters.d.ts.map +1 -1
- package/dist/esm/utils/currencyExtendedFormatter.d.ts +1 -2
- package/dist/esm/utils/currencyExtendedFormatter.d.ts.map +1 -1
- package/dist/esm/utils/customReceiver.js +6 -1
- package/dist/esm/utils/customReceiver.js.map +1 -1
- package/dist/esm/utils/elements.d.ts +2 -3
- package/dist/esm/utils/elements.d.ts.map +1 -1
- package/dist/esm/utils/enum.d.ts +1 -2
- package/dist/esm/utils/enum.d.ts.map +1 -1
- package/dist/esm/utils/fees.d.ts +2 -3
- package/dist/esm/utils/fees.d.ts.map +1 -1
- package/dist/esm/utils/format.d.ts +8 -9
- package/dist/esm/utils/format.d.ts.map +1 -1
- package/dist/esm/utils/getPriceImpact.d.ts +1 -2
- package/dist/esm/utils/getPriceImpact.d.ts.map +1 -1
- package/dist/esm/utils/input.d.ts +1 -2
- package/dist/esm/utils/input.d.ts.map +1 -1
- package/dist/esm/utils/navigationRoutes.d.ts +2 -3
- package/dist/esm/utils/navigationRoutes.d.ts.map +1 -1
- package/dist/esm/utils/percentFormatter.d.ts +1 -2
- package/dist/esm/utils/percentFormatter.d.ts.map +1 -1
- package/dist/esm/utils/recentTokens.js +97 -0
- package/dist/esm/utils/recentTokens.js.map +1 -0
- package/dist/esm/utils/token.js +30 -4
- package/dist/esm/utils/token.js.map +1 -1
- package/dist/esm/utils/tokenList.js +18 -6
- package/dist/esm/utils/tokenList.js.map +1 -1
- package/dist/esm/utils/tokenListBands.js +85 -0
- package/dist/esm/utils/tokenListBands.js.map +1 -0
- package/dist/esm/utils/url.d.ts +5 -0
- package/dist/esm/utils/url.d.ts.map +1 -0
- package/dist/esm/utils/url.js +17 -0
- package/dist/esm/utils/url.js.map +1 -0
- package/dist/esm/utils/wallet.d.ts +1 -2
- package/dist/esm/utils/wallet.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/components/AmountInputCard/ReceiveAmountCard.tsx +16 -3
- package/src/components/BottomSheet/BottomSheet.tsx +3 -0
- package/src/components/Token/Token.tsx +2 -1
- package/src/components/TokenList/RecentTokensHeader.tsx +52 -0
- package/src/components/TokenList/RecentTokensToggle.tsx +45 -0
- package/src/components/TokenList/RemoveRecentTokenButton.tsx +38 -0
- package/src/components/TokenList/TokenList.tsx +92 -3
- package/src/components/TokenList/TokenListItem.tsx +15 -0
- package/src/components/TokenList/VirtualizedTokenList.tsx +84 -125
- package/src/components/TokenList/types.ts +9 -0
- package/src/config/version.ts +1 -1
- package/src/hooks/useDisplayedTokens.ts +17 -3
- package/src/hooks/useExplorer.test.tsx +106 -0
- package/src/hooks/useExplorer.ts +11 -5
- package/src/hooks/useRecentTokens.ts +88 -0
- package/src/hooks/useRoutes.ts +8 -5
- package/src/hooks/useToAddressRequirements.ts +11 -5
- package/src/hooks/useTokenBalances.ts +34 -31
- package/src/hooks/useTokenSearch.ts +5 -14
- package/src/hooks/useTokens.ts +69 -27
- package/src/pages/SendToWallet/BookmarksPage.tsx +3 -3
- package/src/pages/SendToWallet/ConnectedWalletsPage.tsx +3 -3
- package/src/pages/SendToWallet/RecentWalletsPage.tsx +3 -3
- package/src/pages/SendToWallet/SendToConfiguredWalletPage.tsx +3 -3
- package/src/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +5 -5
- package/src/pages/TransactionDetailsPage/TransferIdCard.tsx +2 -1
- package/src/pages/TransactionPage/TokenValueBottomSheet.tsx +1 -1
- package/src/pages/TransactionPage/TokenVerificationBottomSheet.tsx +1 -1
- package/src/pages/TransactionPage/TransactionFailedButtons.tsx +62 -26
- package/src/pages/TransactionPage/TransactionReview.tsx +36 -37
- package/src/pages/TransactionPage/utils.ts +78 -0
- package/src/shared.ts +1 -0
- package/src/stores/StoreProvider.tsx +10 -7
- package/src/stores/chains/ChainOrderStore.test.tsx +298 -0
- package/src/stores/chains/ChainOrderStore.tsx +25 -6
- package/src/stores/recentTokens/RecentTokensStore.tsx +39 -0
- package/src/stores/recentTokens/createRecentTokensStore.ts +107 -0
- package/src/stores/recentTokens/types.ts +37 -0
- package/src/stores/recentTokens/utils.ts +18 -0
- package/src/types/token.ts +2 -0
- package/src/types/widget.ts +5 -0
- package/src/utils/address.ts +21 -0
- package/src/utils/customReceiver.ts +24 -0
- package/src/utils/recentTokens.ts +187 -0
- package/src/utils/token.ts +69 -10
- package/src/utils/tokenList.ts +41 -23
- package/src/utils/tokenListBands.ts +181 -0
- package/src/utils/url.ts +17 -0
package/README.md
CHANGED
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
[**LI.FI Widget**](https://docs.li.fi/widget/overview) features include:
|
|
18
18
|
|
|
19
|
-
- **Provider-based architecture** - Modular blockchain support with separate packages for Ethereum, Bitcoin, Solana, Sui, and
|
|
19
|
+
- **Provider-based architecture** - Modular blockchain support with separate packages for Ethereum, Bitcoin, Solana, Sui, Tron, and Stellar
|
|
20
20
|
- All ecosystems, chains, bridges, exchanges, and solvers that [LI.FI](https://docs.li.fi/introduction/chains) supports
|
|
21
21
|
- Embeddable variants - compact, wide, and drawer
|
|
22
22
|
- Options to allow or deny certain chains, tokens, bridges, and exchanges
|
|
23
23
|
- Pre-configured themes and lots of customization options with dark mode support so you can match the look and feel of your web app
|
|
24
|
-
- Built-in wallet management UI with support for external wallet providers ([Wagmi](https://wagmi.sh/), [Bigmi](https://github.com/lifinance/bigmi), [Wallet Standard](https://github.com/wallet-standard/wallet-standard), [@mysten/dapp-kit-react](https://sdk.mystenlabs.com/dapp-kit),
|
|
24
|
+
- Built-in wallet management UI with support for external wallet providers ([Wagmi](https://wagmi.sh/), [Bigmi](https://github.com/lifinance/bigmi), [Wallet Standard](https://github.com/wallet-standard/wallet-standard), [@mysten/dapp-kit-react](https://sdk.mystenlabs.com/dapp-kit), [TronWallet Adapters](https://github.com/tronweb3/tronwallet-adapter), and [Stellar Wallets Kit](https://github.com/Creit-Tech/Stellar-Wallets-Kit))
|
|
25
25
|
- Supports widely adopted industry standards, including [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792), [ERC-2612](https://eips.ethereum.org/EIPS/eip-2612), [EIP-712](https://eips.ethereum.org/EIPS/eip-712), [EIP-6963](https://eips.ethereum.org/EIPS/eip-6963), and [Permit2](https://github.com/Uniswap/permit2)
|
|
26
26
|
- View of transactions in progress and transaction history
|
|
27
27
|
- Curated wallet lists and wallet bookmarks
|
|
@@ -159,6 +159,26 @@ npm install @lifi/widget-provider-tron @tronweb3/tronwallet-adapter-react-hooks
|
|
|
159
159
|
yarn add @lifi/widget-provider-tron @tronweb3/tronwallet-adapter-react-hooks
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
+
**Stellar:**
|
|
163
|
+
|
|
164
|
+
**pnpm:**
|
|
165
|
+
|
|
166
|
+
```sh
|
|
167
|
+
pnpm add @lifi/widget-provider-stellar
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**npm:**
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
npm install @lifi/widget-provider-stellar
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**yarn:**
|
|
177
|
+
|
|
178
|
+
```sh
|
|
179
|
+
yarn add @lifi/widget-provider-stellar
|
|
180
|
+
```
|
|
181
|
+
|
|
162
182
|
**Note:** You only need to install the provider packages for the blockchains you want to support. Each provider package includes its required peer dependencies.
|
|
163
183
|
|
|
164
184
|
### LI.FI Wallet Management
|
|
@@ -218,6 +238,7 @@ The LI.FI Widget uses a **provider-based architecture** that allows you to selec
|
|
|
218
238
|
- **`@lifi/widget-provider-solana`** - Solana support (requires [bs58](https://www.npmjs.com/package/bs58))
|
|
219
239
|
- **`@lifi/widget-provider-sui`** - Sui support (requires [@mysten/dapp-kit-react](https://sdk.mystenlabs.com/dapp-kit))
|
|
220
240
|
- **`@lifi/widget-provider-tron`** - Tron support (requires [@tronweb3/tronwallet-adapter-react-hooks](https://github.com/tronweb3/tronwallet-adapter))
|
|
241
|
+
- **`@lifi/widget-provider-stellar`** - Stellar support (bundles [Stellar Wallets Kit](https://github.com/Creit-Tech/Stellar-Wallets-Kit); no extra install)
|
|
221
242
|
- **`@lifi/wallet-management`** - Wallet management UI components
|
|
222
243
|
- **`@lifi/widget-light`** - Lightweight iframe-based integration ([docs](https://docs.li.fi/widget/widget-light-overview))
|
|
223
244
|
|
|
@@ -254,13 +275,14 @@ export const WidgetPage = () => {
|
|
|
254
275
|
};
|
|
255
276
|
```
|
|
256
277
|
|
|
257
|
-
**Multi-chain example** (Ethereum, Solana, Bitcoin, Sui, and
|
|
278
|
+
**Multi-chain example** (Ethereum, Solana, Bitcoin, Sui, Tron, and Stellar):
|
|
258
279
|
|
|
259
280
|
```tsx
|
|
260
281
|
import { LiFiWidget, WidgetConfig } from '@lifi/widget';
|
|
261
282
|
import { BitcoinProvider } from '@lifi/widget-provider-bitcoin';
|
|
262
283
|
import { EthereumProvider } from '@lifi/widget-provider-ethereum';
|
|
263
284
|
import { SolanaProvider } from '@lifi/widget-provider-solana';
|
|
285
|
+
import { StellarProvider } from '@lifi/widget-provider-stellar';
|
|
264
286
|
import { SuiProvider } from '@lifi/widget-provider-sui';
|
|
265
287
|
import { TronProvider } from '@lifi/widget-provider-tron';
|
|
266
288
|
|
|
@@ -271,6 +293,7 @@ const widgetConfig: WidgetConfig = {
|
|
|
271
293
|
BitcoinProvider(),
|
|
272
294
|
SuiProvider(),
|
|
273
295
|
TronProvider(),
|
|
296
|
+
StellarProvider(),
|
|
274
297
|
],
|
|
275
298
|
theme: {
|
|
276
299
|
container: {
|
package/dist/esm/App.d.ts
CHANGED
|
@@ -2,9 +2,8 @@ import { WidgetProps } from "./types/widget.js";
|
|
|
2
2
|
import { WidgetDrawer } from "./AppDrawer.js";
|
|
3
3
|
import { JSX, Ref } from "react";
|
|
4
4
|
//#region src/App.d.ts
|
|
5
|
-
declare const App: (props: WidgetProps & {
|
|
5
|
+
export declare const App: (props: WidgetProps & {
|
|
6
6
|
ref?: Ref<WidgetDrawer>;
|
|
7
7
|
}) => JSX.Element;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { App };
|
|
10
9
|
//# sourceMappingURL=App.d.ts.map
|
package/dist/esm/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","names":[],"sources":["../../src/App.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"App.d.ts","names":[],"sources":["../../src/App.tsx"],"mappings":";;;;qBASa,MACX,OAAO;EAAgB,MAAM,IAAI;MAChC,IAAI"}
|
package/dist/esm/AppDrawer.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import "./types/widget.js";
|
|
2
2
|
import { JSX, PropsWithChildren, Ref } from "react";
|
|
3
3
|
//#region src/AppDrawer.d.ts
|
|
4
|
-
interface WidgetDrawer {
|
|
4
|
+
export interface WidgetDrawer {
|
|
5
5
|
isOpen(): void;
|
|
6
6
|
toggleDrawer(): void;
|
|
7
7
|
openDrawer(): void;
|
|
8
8
|
closeDrawer(): void;
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { WidgetDrawer };
|
|
12
11
|
//# sourceMappingURL=AppDrawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppDrawer.d.ts","names":[],"sources":["../../src/AppDrawer.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"AppDrawer.d.ts","names":[],"sources":["../../src/AppDrawer.tsx"],"mappings":";;;iBAaiB;EACf;EACA;EACA;EACA"}
|
|
@@ -7,7 +7,6 @@ interface ActionRowProps {
|
|
|
7
7
|
endAdornment?: ReactNode;
|
|
8
8
|
sx?: SxProps<Theme>;
|
|
9
9
|
}
|
|
10
|
-
declare const ActionRow: FC<ActionRowProps>;
|
|
10
|
+
export declare const ActionRow: FC<ActionRowProps>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { ActionRow };
|
|
13
12
|
//# sourceMappingURL=ActionRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionRow.d.ts","names":[],"sources":["../../../../src/components/ActionRow/ActionRow.tsx"],"mappings":";;;UAIU;EACR;EACA,gBAAgB;EAChB,eAAe;EACf,KAAK,QAAQ;;
|
|
1
|
+
{"version":3,"file":"ActionRow.d.ts","names":[],"sources":["../../../../src/components/ActionRow/ActionRow.tsx"],"mappings":";;;UAIU;EACR;EACA,gBAAgB;EAChB,eAAe;EACf,KAAK,QAAQ;;qBAGF,WAAW,GAAG"}
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { Box, FormControl, InputBase } from "@mui/material";
|
|
4
4
|
//#region src/components/AmountInput/AmountInput.style.d.ts
|
|
5
5
|
declare const FormControl$1: React.FC<React.ComponentProps<typeof FormControl>>;
|
|
6
|
-
declare const Input: React.FC<React.ComponentProps<typeof InputBase>>;
|
|
6
|
+
export declare const Input: React.FC<React.ComponentProps<typeof InputBase>>;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { FormControl$1 as FormControl
|
|
8
|
+
export { FormControl$1 as FormControl };
|
|
9
9
|
//# sourceMappingURL=AmountInput.style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmountInput.style.d.ts","names":[],"sources":["../../../../src/components/AmountInput/AmountInput.style.tsx"],"mappings":";;;;cAqBa,eAAa,MAAM,GAC9B,MAAM,sBAAsB;
|
|
1
|
+
{"version":3,"file":"AmountInput.style.d.ts","names":[],"sources":["../../../../src/components/AmountInput/AmountInput.style.tsx"],"mappings":";;;;cAqBa,eAAa,MAAM,GAC9B,MAAM,sBAAsB;qBAKjB,OAAO,MAAM,GAAG,MAAM,sBAAsB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FormTypeProps } from "../../stores/form/types.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
//#region src/components/AmountInput/AmountInputEndAdornment.d.ts
|
|
4
|
-
declare const AmountInputEndAdornment: React.NamedExoticComponent<FormTypeProps>;
|
|
4
|
+
export declare const AmountInputEndAdornment: React.NamedExoticComponent<FormTypeProps>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { AmountInputEndAdornment };
|
|
7
6
|
//# sourceMappingURL=AmountInputEndAdornment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmountInputEndAdornment.d.ts","names":[],"sources":["../../../../src/components/AmountInput/AmountInputEndAdornment.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"AmountInputEndAdornment.d.ts","names":[],"sources":["../../../../src/components/AmountInput/AmountInputEndAdornment.tsx"],"mappings":";;;qBAiBa,yBAAyB,MAAM,qBAAqB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Button } from "@mui/material";
|
|
3
3
|
//#region src/components/AmountInput/PriceFormHelperText.style.d.ts
|
|
4
|
-
declare const InputPriceButton: React.FC<React.ComponentProps<typeof Button>>;
|
|
4
|
+
export declare const InputPriceButton: React.FC<React.ComponentProps<typeof Button>>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { InputPriceButton };
|
|
7
6
|
//# sourceMappingURL=PriceFormHelperText.style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceFormHelperText.style.d.ts","names":[],"sources":["../../../../src/components/AmountInput/PriceFormHelperText.style.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PriceFormHelperText.style.d.ts","names":[],"sources":["../../../../src/components/AmountInput/PriceFormHelperText.style.tsx"],"mappings":";;;qBAGa,kBAAkB,MAAM,GAAG,MAAM,sBAAsB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useWidgetConfig } from "../../providers/WidgetProvider/WidgetProvider.js";
|
|
2
2
|
import { formatTokenAmount, formatTokenPrice } from "../../utils/format.js";
|
|
3
3
|
import { useFieldValues } from "../../stores/form/useFieldValues.js";
|
|
4
|
+
import { mergeFallbackToken } from "../../utils/token.js";
|
|
5
|
+
import { useToken } from "../../hooks/useToken.js";
|
|
4
6
|
import { useRoutes } from "../../hooks/useRoutes.js";
|
|
5
7
|
import { ProgressToNextUpdate } from "../ProgressToNextUpdate.js";
|
|
6
8
|
import { getPriceImpact } from "../../utils/getPriceImpact.js";
|
|
@@ -80,10 +82,12 @@ const ReceiveAmountCard = (props) => {
|
|
|
80
82
|
const route = routes?.find((r) => r.id === selectedRouteId) ?? routes?.[0];
|
|
81
83
|
const priceImpact = useReceivePriceImpact(route);
|
|
82
84
|
const showPriceImpact = !hiddenUI?.routeCardPriceImpact;
|
|
85
|
+
const { token: cachedToken } = useToken(route?.toToken.chainId, route?.toToken.address);
|
|
86
|
+
const pricedToken = route ? mergeFallbackToken(route.toToken, cachedToken) : void 0;
|
|
83
87
|
const receiveAmount = route?.toAmount ? formatTokenAmount(BigInt(route.toAmount), route.toToken.decimals) : void 0;
|
|
84
88
|
const showSkeleton = isFetching && !receiveAmount;
|
|
85
|
-
const fiatValue = receiveAmount &&
|
|
86
|
-
const canToggle = !!receiveAmount && !!
|
|
89
|
+
const fiatValue = receiveAmount && pricedToken?.priceUSD ? formatTokenPrice(receiveAmount, pricedToken.priceUSD) : 0;
|
|
90
|
+
const canToggle = !!receiveAmount && !!pricedToken?.priceUSD;
|
|
87
91
|
const mainDisplay = showFiat ? t("format.currency", { value: fiatValue }) : t("format.tokenAmount", { value: receiveAmount || "0" });
|
|
88
92
|
const footerDisplay = showFiat ? t("format.tokenAmount", { value: receiveAmount || "0" }) : t("format.currency", { value: fiatValue });
|
|
89
93
|
useLayoutEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReceiveAmountCard.js","names":["InfoOutlinedIcon"],"sources":["../../../../src/components/AmountInputCard/ReceiveAmountCard.tsx"],"sourcesContent":["import type { Route } from '@lifi/sdk'\nimport InfoOutlinedIcon from '@mui/icons-material/InfoOutlined'\nimport SwapVertIcon from '@mui/icons-material/SwapVert'\nimport type { CardProps } from '@mui/material'\nimport { Box, Skeleton, Tooltip } from '@mui/material'\nimport { type JSX, type ReactNode, useLayoutEffect, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useRoutes } from '../../hooks/useRoutes.js'\nimport { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js'\nimport { useFieldValues } from '../../stores/form/useFieldValues.js'\nimport { useInputModeStore } from '../../stores/inputMode/useInputModeStore.js'\nimport { formatTokenAmount, formatTokenPrice } from '../../utils/format.js'\nimport { getPriceImpact } from '../../utils/getPriceImpact.js'\nimport { fitInputText } from '../../utils/input.js'\nimport { CardTitle } from '../Card/CardTitle.js'\nimport { ProgressToNextUpdate } from '../ProgressToNextUpdate.js'\nimport { TokenPillButton } from '../TokenPillButton/TokenPillButton.js'\nimport {\n AmountCard,\n AmountDisplay,\n amountHeight,\n CardBodyRow,\n CardFooterRow,\n CardHeaderRow,\n FooterText,\n footerFontSize,\n maxInputFontSize,\n minInputFontSize,\n ToggleButton,\n} from './AmountInputCard.style.js'\n\nconst formType = 'to' as const\n\ntype ReceiveCardProps = CardProps & { mask?: boolean }\n\nconst ReceiveAmountCardLayout = ({\n cardProps,\n title,\n headerEnd,\n amount,\n footerStart,\n footerEnd,\n}: {\n cardProps: ReceiveCardProps\n title: string\n headerEnd?: ReactNode\n amount: ReactNode\n footerStart: ReactNode\n footerEnd?: ReactNode\n}): JSX.Element => (\n <AmountCard {...cardProps} formType={formType}>\n <CardHeaderRow>\n <CardTitle sx={{ padding: 0 }}>{title}</CardTitle>\n {headerEnd}\n </CardHeaderRow>\n <CardBodyRow>\n {amount}\n <TokenPillButton formType={formType} />\n </CardBodyRow>\n <CardFooterRow>\n {footerStart}\n {footerEnd}\n </CardFooterRow>\n </AmountCard>\n)\n\nconst PriceImpactBadge = ({\n priceImpact,\n}: {\n priceImpact: number | undefined\n}): JSX.Element | null => {\n const { t } = useTranslation()\n if (priceImpact === undefined) {\n return null\n }\n return (\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>\n <FooterText>\n {t('format.percent', { value: priceImpact, usePlusSign: true })}\n </FooterText>\n <Tooltip title={t('tooltip.priceImpact')}>\n <InfoOutlinedIcon\n sx={{ fontSize: 16, color: 'text.secondary', cursor: 'help' }}\n />\n </Tooltip>\n </Box>\n )\n}\n\nconst useReceivePriceImpact = (\n route: Route | undefined\n): number | undefined => {\n const { hiddenUI } = useWidgetConfig()\n if (!route || hiddenUI?.routeCardPriceImpact) {\n return undefined\n }\n return getPriceImpact({\n fromAmount: BigInt(route.fromAmount),\n toAmount: BigInt(route.toAmount),\n fromToken: route.fromToken,\n toToken: route.toToken,\n })\n}\n\n/**\n * The receive amount is a read-only quote derived from the best route, with a\n * fiat/token toggle and price impact in the footer. In limit mode the amount is\n * still the quote for the current limit (the limit price drives it via the\n * dedicated price card); it is never edited here, and the header shows the\n * refetch progress indicator with a \"Buy\" title.\n */\nexport const ReceiveAmountCard: React.FC<ReceiveCardProps> = (\n props\n): JSX.Element => {\n const { t } = useTranslation()\n const amountRef = useRef<HTMLSpanElement>(null)\n const { inputMode, toggleInputMode } = useInputModeStore()\n const showFiat = inputMode[formType] === 'price'\n const { hiddenUI, mode } = useWidgetConfig()\n const isLimit = mode === 'limit'\n\n const [selectedRouteId] = useFieldValues('selectedRouteId')\n const { routes, isFetching, dataUpdatedAt, refetchTime, refetch } =\n useRoutes()\n // Reflect the route the user selected in the routes list (falling back to the\n // best route), so the buy amount matches the highlighted provider card.\n const route = routes?.find((r) => r.id === selectedRouteId) ?? routes?.[0]\n const priceImpact = useReceivePriceImpact(route)\n const showPriceImpact = !hiddenUI?.routeCardPriceImpact\n\n const receiveAmount = route?.toAmount\n ? formatTokenAmount(BigInt(route.toAmount), route.toToken.decimals)\n : undefined\n // Only show skeletons on the initial fetch.\n const showSkeleton = isFetching && !receiveAmount\n\n const fiatValue =\n receiveAmount && route?.toToken.priceUSD\n ? formatTokenPrice(receiveAmount, route.toToken.priceUSD)\n : 0\n const canToggle = !!receiveAmount && !!route?.toToken.priceUSD\n\n const mainDisplay = showFiat\n ? t('format.currency', { value: fiatValue })\n : t('format.tokenAmount', { value: receiveAmount || '0' })\n const footerDisplay = showFiat\n ? t('format.tokenAmount', { value: receiveAmount || '0' })\n : t('format.currency', { value: fiatValue })\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: effect must run on value change\n useLayoutEffect(() => {\n if (amountRef.current) {\n fitInputText(maxInputFontSize, minInputFontSize, amountRef.current)\n }\n }, [mainDisplay])\n\n return (\n <ReceiveAmountCardLayout\n cardProps={props}\n title={isLimit ? t('header.buy') : t('header.receive')}\n headerEnd={\n isLimit && (isFetching || routes?.length) ? (\n <ProgressToNextUpdate\n updatedAt={dataUpdatedAt || Date.now()}\n timeToUpdate={refetchTime}\n isLoading={isFetching}\n onClick={() => refetch()}\n sx={{ padding: 0 }}\n />\n ) : undefined\n }\n amount={\n showSkeleton ? (\n <Skeleton variant=\"rounded\" height={amountHeight} sx={{ flex: 1 }} />\n ) : (\n <AmountDisplay\n ref={amountRef}\n sx={{ color: 'text.primary', opacity: receiveAmount ? 1 : 0.5 }}\n >\n {mainDisplay}\n </AmountDisplay>\n )\n }\n footerStart={\n showSkeleton ? (\n <Skeleton\n variant=\"text\"\n width={72}\n sx={{ fontSize: footerFontSize }}\n />\n ) : (\n <ToggleButton\n clickable={canToggle}\n onClick={canToggle ? () => toggleInputMode(formType) : undefined}\n aria-label={canToggle ? 'Toggle fiat value' : undefined}\n >\n <FooterText>{footerDisplay}</FooterText>\n {canToggle ? (\n <SwapVertIcon sx={{ fontSize: 14, color: 'text.secondary' }} />\n ) : null}\n </ToggleButton>\n )\n }\n footerEnd={\n showSkeleton ? (\n showPriceImpact ? (\n <Skeleton\n variant=\"text\"\n width={56}\n sx={{ fontSize: footerFontSize }}\n />\n ) : null\n ) : (\n <PriceImpactBadge priceImpact={priceImpact} />\n )\n }\n />\n )\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"ReceiveAmountCard.js","names":["InfoOutlinedIcon"],"sources":["../../../../src/components/AmountInputCard/ReceiveAmountCard.tsx"],"sourcesContent":["import type { Route } from '@lifi/sdk'\nimport InfoOutlinedIcon from '@mui/icons-material/InfoOutlined'\nimport SwapVertIcon from '@mui/icons-material/SwapVert'\nimport type { CardProps } from '@mui/material'\nimport { Box, Skeleton, Tooltip } from '@mui/material'\nimport { type JSX, type ReactNode, useLayoutEffect, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useRoutes } from '../../hooks/useRoutes.js'\nimport { useToken } from '../../hooks/useToken.js'\nimport { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js'\nimport { useFieldValues } from '../../stores/form/useFieldValues.js'\nimport { useInputModeStore } from '../../stores/inputMode/useInputModeStore.js'\nimport { formatTokenAmount, formatTokenPrice } from '../../utils/format.js'\nimport { getPriceImpact } from '../../utils/getPriceImpact.js'\nimport { fitInputText } from '../../utils/input.js'\nimport { mergeFallbackToken } from '../../utils/token.js'\nimport { CardTitle } from '../Card/CardTitle.js'\nimport { ProgressToNextUpdate } from '../ProgressToNextUpdate.js'\nimport { TokenPillButton } from '../TokenPillButton/TokenPillButton.js'\nimport {\n AmountCard,\n AmountDisplay,\n amountHeight,\n CardBodyRow,\n CardFooterRow,\n CardHeaderRow,\n FooterText,\n footerFontSize,\n maxInputFontSize,\n minInputFontSize,\n ToggleButton,\n} from './AmountInputCard.style.js'\n\nconst formType = 'to' as const\n\ntype ReceiveCardProps = CardProps & { mask?: boolean }\n\nconst ReceiveAmountCardLayout = ({\n cardProps,\n title,\n headerEnd,\n amount,\n footerStart,\n footerEnd,\n}: {\n cardProps: ReceiveCardProps\n title: string\n headerEnd?: ReactNode\n amount: ReactNode\n footerStart: ReactNode\n footerEnd?: ReactNode\n}): JSX.Element => (\n <AmountCard {...cardProps} formType={formType}>\n <CardHeaderRow>\n <CardTitle sx={{ padding: 0 }}>{title}</CardTitle>\n {headerEnd}\n </CardHeaderRow>\n <CardBodyRow>\n {amount}\n <TokenPillButton formType={formType} />\n </CardBodyRow>\n <CardFooterRow>\n {footerStart}\n {footerEnd}\n </CardFooterRow>\n </AmountCard>\n)\n\nconst PriceImpactBadge = ({\n priceImpact,\n}: {\n priceImpact: number | undefined\n}): JSX.Element | null => {\n const { t } = useTranslation()\n if (priceImpact === undefined) {\n return null\n }\n return (\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>\n <FooterText>\n {t('format.percent', { value: priceImpact, usePlusSign: true })}\n </FooterText>\n <Tooltip title={t('tooltip.priceImpact')}>\n <InfoOutlinedIcon\n sx={{ fontSize: 16, color: 'text.secondary', cursor: 'help' }}\n />\n </Tooltip>\n </Box>\n )\n}\n\nconst useReceivePriceImpact = (\n route: Route | undefined\n): number | undefined => {\n const { hiddenUI } = useWidgetConfig()\n if (!route || hiddenUI?.routeCardPriceImpact) {\n return undefined\n }\n return getPriceImpact({\n fromAmount: BigInt(route.fromAmount),\n toAmount: BigInt(route.toAmount),\n fromToken: route.fromToken,\n toToken: route.toToken,\n })\n}\n\n/**\n * The receive amount is a read-only quote derived from the best route, with a\n * fiat/token toggle and price impact in the footer. In limit mode the amount is\n * still the quote for the current limit (the limit price drives it via the\n * dedicated price card); it is never edited here, and the header shows the\n * refetch progress indicator with a \"Buy\" title.\n */\nexport const ReceiveAmountCard: React.FC<ReceiveCardProps> = (\n props\n): JSX.Element => {\n const { t } = useTranslation()\n const amountRef = useRef<HTMLSpanElement>(null)\n const { inputMode, toggleInputMode } = useInputModeStore()\n const showFiat = inputMode[formType] === 'price'\n const { hiddenUI, mode } = useWidgetConfig()\n const isLimit = mode === 'limit'\n\n const [selectedRouteId] = useFieldValues('selectedRouteId')\n const { routes, isFetching, dataUpdatedAt, refetchTime, refetch } =\n useRoutes()\n // Reflect the route the user selected in the routes list (falling back to the\n // best route), so the buy amount matches the highlighted provider card.\n const route = routes?.find((r) => r.id === selectedRouteId) ?? routes?.[0]\n const priceImpact = useReceivePriceImpact(route)\n const showPriceImpact = !hiddenUI?.routeCardPriceImpact\n\n // Value the amount the way a quote card does, so the two sides of the screen\n // cannot disagree: the route's own price wins, and the cache fills only a gap\n // the route leaves — a token it could not price arrives as '0' or ''.\n const { token: cachedToken } = useToken(\n route?.toToken.chainId,\n route?.toToken.address\n )\n const pricedToken = route\n ? mergeFallbackToken(route.toToken, cachedToken)\n : undefined\n\n const receiveAmount = route?.toAmount\n ? formatTokenAmount(BigInt(route.toAmount), route.toToken.decimals)\n : undefined\n // Only show skeletons on the initial fetch.\n const showSkeleton = isFetching && !receiveAmount\n\n const fiatValue =\n receiveAmount && pricedToken?.priceUSD\n ? formatTokenPrice(receiveAmount, pricedToken.priceUSD)\n : 0\n const canToggle = !!receiveAmount && !!pricedToken?.priceUSD\n\n const mainDisplay = showFiat\n ? t('format.currency', { value: fiatValue })\n : t('format.tokenAmount', { value: receiveAmount || '0' })\n const footerDisplay = showFiat\n ? t('format.tokenAmount', { value: receiveAmount || '0' })\n : t('format.currency', { value: fiatValue })\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: effect must run on value change\n useLayoutEffect(() => {\n if (amountRef.current) {\n fitInputText(maxInputFontSize, minInputFontSize, amountRef.current)\n }\n }, [mainDisplay])\n\n return (\n <ReceiveAmountCardLayout\n cardProps={props}\n title={isLimit ? t('header.buy') : t('header.receive')}\n headerEnd={\n isLimit && (isFetching || routes?.length) ? (\n <ProgressToNextUpdate\n updatedAt={dataUpdatedAt || Date.now()}\n timeToUpdate={refetchTime}\n isLoading={isFetching}\n onClick={() => refetch()}\n sx={{ padding: 0 }}\n />\n ) : undefined\n }\n amount={\n showSkeleton ? (\n <Skeleton variant=\"rounded\" height={amountHeight} sx={{ flex: 1 }} />\n ) : (\n <AmountDisplay\n ref={amountRef}\n sx={{ color: 'text.primary', opacity: receiveAmount ? 1 : 0.5 }}\n >\n {mainDisplay}\n </AmountDisplay>\n )\n }\n footerStart={\n showSkeleton ? (\n <Skeleton\n variant=\"text\"\n width={72}\n sx={{ fontSize: footerFontSize }}\n />\n ) : (\n <ToggleButton\n clickable={canToggle}\n onClick={canToggle ? () => toggleInputMode(formType) : undefined}\n aria-label={canToggle ? 'Toggle fiat value' : undefined}\n >\n <FooterText>{footerDisplay}</FooterText>\n {canToggle ? (\n <SwapVertIcon sx={{ fontSize: 14, color: 'text.secondary' }} />\n ) : null}\n </ToggleButton>\n )\n }\n footerEnd={\n showSkeleton ? (\n showPriceImpact ? (\n <Skeleton\n variant=\"text\"\n width={56}\n sx={{ fontSize: footerFontSize }}\n />\n ) : null\n ) : (\n <PriceImpactBadge priceImpact={priceImpact} />\n )\n }\n />\n )\n}\n"],"mappings":"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"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ExtendedChain } from "@lifi/sdk";
|
|
2
2
|
import { SxProps, Theme } from "@mui/material";
|
|
3
3
|
//#region src/components/Avatar/Avatar.d.ts
|
|
4
|
-
declare const AvatarBadgedDefault: React.FC<{
|
|
4
|
+
export declare const AvatarBadgedDefault: React.FC<{
|
|
5
5
|
sx?: SxProps<Theme>;
|
|
6
6
|
chain?: ExtendedChain;
|
|
7
7
|
avatarSize?: number;
|
|
8
8
|
badgeSize?: number;
|
|
9
9
|
}>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { AvatarBadgedDefault };
|
|
12
11
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","names":[],"sources":["../../../../src/components/Avatar/Avatar.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","names":[],"sources":["../../../../src/components/Avatar/Avatar.tsx"],"mappings":";;;qBAOa,qBAAqB,MAAM;EACtC,KAAK,QAAQ;EACb,QAAQ;EACR;EACA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Chain, StaticToken } from "@lifi/sdk";
|
|
2
2
|
import { SxProps, Theme } from "@mui/material";
|
|
3
3
|
//#region src/components/Avatar/TokenAvatar.d.ts
|
|
4
|
-
declare const TokenAvatar: React.FC<{
|
|
4
|
+
export declare const TokenAvatar: React.FC<{
|
|
5
5
|
token?: StaticToken;
|
|
6
6
|
chain?: Chain;
|
|
7
7
|
isLoading?: boolean;
|
|
@@ -10,5 +10,4 @@ declare const TokenAvatar: React.FC<{
|
|
|
10
10
|
chainAvatarSize?: number;
|
|
11
11
|
}>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { TokenAvatar };
|
|
14
13
|
//# sourceMappingURL=TokenAvatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenAvatar.d.ts","names":[],"sources":["../../../../src/components/Avatar/TokenAvatar.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"TokenAvatar.d.ts","names":[],"sources":["../../../../src/components/Avatar/TokenAvatar.tsx"],"mappings":";;;qBASa,aAAa,MAAM;EAC9B,QAAQ;EACR,QAAQ;EACR;EACA,KAAK,QAAQ;EACb;EACA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BaseTransactionButtonProps } from "./types.js";
|
|
2
2
|
//#region src/components/BaseTransactionButton/BaseTransactionButton.d.ts
|
|
3
|
-
declare const BaseTransactionButton: React.FC<BaseTransactionButtonProps>;
|
|
3
|
+
export declare const BaseTransactionButton: React.FC<BaseTransactionButtonProps>;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { BaseTransactionButton };
|
|
6
5
|
//# sourceMappingURL=BaseTransactionButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTransactionButton.d.ts","names":[],"sources":["../../../../src/components/BaseTransactionButton/BaseTransactionButton.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"BaseTransactionButton.d.ts","names":[],"sources":["../../../../src/components/BaseTransactionButton/BaseTransactionButton.tsx"],"mappings":";;qBASa,uBAAuB,MAAM,GAAG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RouteExtended } from "@lifi/sdk";
|
|
2
2
|
import { SxProps, Theme } from "@mui/material";
|
|
3
3
|
//#region src/components/BaseTransactionButton/types.d.ts
|
|
4
|
-
interface BaseTransactionButtonProps {
|
|
4
|
+
export interface BaseTransactionButtonProps {
|
|
5
5
|
onClick?(): void;
|
|
6
6
|
text?: string;
|
|
7
7
|
disabled?: boolean;
|
|
@@ -10,5 +10,4 @@ interface BaseTransactionButtonProps {
|
|
|
10
10
|
sx?: SxProps<Theme>;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
export { BaseTransactionButtonProps };
|
|
14
13
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/components/BaseTransactionButton/types.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/components/BaseTransactionButton/types.ts"],"mappings":";;;iBAGiB;EACf;EACA;EACA;EACA;EACA,QAAQ;EACR,KAAK,QAAQ"}
|
|
@@ -10,6 +10,7 @@ const BottomSheet = ({ elementRef, children, open, onClose, keepMounted = false,
|
|
|
10
10
|
const [drawerOpen, setDrawerOpen] = useState(open);
|
|
11
11
|
const [isInert, setIsInert] = useState(!open);
|
|
12
12
|
const close = useCallback(() => {
|
|
13
|
+
if (!openRef.current) return;
|
|
13
14
|
setIsInert(true);
|
|
14
15
|
startTransition(() => {
|
|
15
16
|
setDrawerOpen(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.js","names":[],"sources":["../../../../src/components/BottomSheet/BottomSheet.tsx"],"sourcesContent":["import { Drawer } from '@mui/material'\nimport type { JSX, Ref } from 'react'\nimport {\n startTransition,\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react'\nimport { useGetScrollableContainer } from '../../hooks/useScrollableContainer.js'\nimport { modalProps, slotProps } from '../Dialog/Dialog.js'\nimport type { BottomSheetBase, BottomSheetProps } from './types.js'\n\nexport const BottomSheet = ({\n elementRef,\n children,\n open,\n onClose,\n keepMounted = false,\n ref,\n}: Omit<BottomSheetProps, 'ref'> & {\n ref?: Ref<BottomSheetBase>\n}): JSX.Element => {\n const getContainer = useGetScrollableContainer()\n const openRef = useRef(open)\n const [drawerOpen, setDrawerOpen] = useState(open)\n const [isInert, setIsInert] = useState(!open)\n\n const close = useCallback(() => {\n // Set inert first to prevent focus issues\n setIsInert(true)\n // Push the state update to the next event loop tick\n // to ensure the inert is applied to before the drawer is closed\n startTransition(() => {\n setDrawerOpen(false)\n openRef.current = false\n onClose?.()\n })\n }, [onClose])\n\n useImperativeHandle(\n ref,\n () => ({\n isOpen: () => openRef.current,\n open: () => {\n setIsInert(false)\n setDrawerOpen(true)\n openRef.current = true\n },\n close,\n }),\n [close]\n )\n\n return (\n <Drawer\n container={getContainer}\n ref={elementRef}\n anchor=\"bottom\"\n open={drawerOpen}\n onClose={close}\n ModalProps={modalProps}\n slotProps={slotProps}\n disableAutoFocus\n keepMounted={keepMounted}\n inert={isInert}\n >\n {children}\n </Drawer>\n )\n}\n"],"mappings":";;;;;;AAaA,MAAa,eAAe,EAC1B,YACA,UACA,MACA,SACA,cAAc,OACd,UAGiB;CACjB,MAAM,eAAe,0BAA0B;CAC/C,MAAM,UAAU,OAAO,IAAI;CAC3B,MAAM,CAAC,YAAY,iBAAiB,SAAS,IAAI;CACjD,MAAM,CAAC,SAAS,cAAc,SAAS,CAAC,IAAI;CAE5C,MAAM,QAAQ,kBAAkB;
|
|
1
|
+
{"version":3,"file":"BottomSheet.js","names":[],"sources":["../../../../src/components/BottomSheet/BottomSheet.tsx"],"sourcesContent":["import { Drawer } from '@mui/material'\nimport type { JSX, Ref } from 'react'\nimport {\n startTransition,\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react'\nimport { useGetScrollableContainer } from '../../hooks/useScrollableContainer.js'\nimport { modalProps, slotProps } from '../Dialog/Dialog.js'\nimport type { BottomSheetBase, BottomSheetProps } from './types.js'\n\nexport const BottomSheet = ({\n elementRef,\n children,\n open,\n onClose,\n keepMounted = false,\n ref,\n}: Omit<BottomSheetProps, 'ref'> & {\n ref?: Ref<BottomSheetBase>\n}): JSX.Element => {\n const getContainer = useGetScrollableContainer()\n const openRef = useRef(open)\n const [drawerOpen, setDrawerOpen] = useState(open)\n const [isInert, setIsInert] = useState(!open)\n\n const close = useCallback(() => {\n if (!openRef.current) {\n return\n }\n // Set inert first to prevent focus issues\n setIsInert(true)\n // Push the state update to the next event loop tick\n // to ensure the inert is applied to before the drawer is closed\n startTransition(() => {\n setDrawerOpen(false)\n openRef.current = false\n onClose?.()\n })\n }, [onClose])\n\n useImperativeHandle(\n ref,\n () => ({\n isOpen: () => openRef.current,\n open: () => {\n setIsInert(false)\n setDrawerOpen(true)\n openRef.current = true\n },\n close,\n }),\n [close]\n )\n\n return (\n <Drawer\n container={getContainer}\n ref={elementRef}\n anchor=\"bottom\"\n open={drawerOpen}\n onClose={close}\n ModalProps={modalProps}\n slotProps={slotProps}\n disableAutoFocus\n keepMounted={keepMounted}\n inert={isInert}\n >\n {children}\n </Drawer>\n )\n}\n"],"mappings":";;;;;;AAaA,MAAa,eAAe,EAC1B,YACA,UACA,MACA,SACA,cAAc,OACd,UAGiB;CACjB,MAAM,eAAe,0BAA0B;CAC/C,MAAM,UAAU,OAAO,IAAI;CAC3B,MAAM,CAAC,YAAY,iBAAiB,SAAS,IAAI;CACjD,MAAM,CAAC,SAAS,cAAc,SAAS,CAAC,IAAI;CAE5C,MAAM,QAAQ,kBAAkB;EAC9B,IAAI,CAAC,QAAQ,SACX;EAGF,WAAW,IAAI;EAGf,sBAAsB;GACpB,cAAc,KAAK;GACnB,QAAQ,UAAU;GAClB,UAAU;EACZ,CAAC;CACH,GAAG,CAAC,OAAO,CAAC;CAEZ,oBACE,YACO;EACL,cAAc,QAAQ;EACtB,YAAY;GACV,WAAW,KAAK;GAChB,cAAc,IAAI;GAClB,QAAQ,UAAU;EACpB;EACA;CACF,IACA,CAAC,KAAK,CACR;CAEA,OACE,oBAAC,QAAD;EACE,WAAW;EACX,KAAK;EACL,QAAO;EACP,MAAM;EACN,SAAS;EACT,YAAY;EACD;EACX,kBAAA;EACa;EACb,OAAO;EAEN;CACK,CAAA;AAEZ"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
2
|
import "@mui/material";
|
|
3
3
|
//#region src/components/BottomSheet/types.d.ts
|
|
4
|
-
interface BottomSheetBase {
|
|
4
|
+
export interface BottomSheetBase {
|
|
5
5
|
isOpen(): void;
|
|
6
6
|
open(): void;
|
|
7
7
|
close(): void;
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
-
export { BottomSheetBase };
|
|
11
10
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/components/BottomSheet/types.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/components/BottomSheet/types.ts"],"mappings":";;;iBASiB;EACf;EACA;EACA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Button } from "@mui/material";
|
|
3
3
|
//#region src/components/ButtonTertiary.d.ts
|
|
4
|
-
declare const ButtonTertiary: React.FC<React.ComponentProps<typeof Button>>;
|
|
4
|
+
export declare const ButtonTertiary: React.FC<React.ComponentProps<typeof Button>>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { ButtonTertiary };
|
|
7
6
|
//# sourceMappingURL=ButtonTertiary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTertiary.d.ts","names":[],"sources":["../../../src/components/ButtonTertiary.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ButtonTertiary.d.ts","names":[],"sources":["../../../src/components/ButtonTertiary.tsx"],"mappings":";;;qBAGa,gBAAgB,MAAM,GAAG,MAAM,sBAAsB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IconButton, IconButtonProps, LinkProps } from "@mui/material";
|
|
3
3
|
//#region src/components/Card/CardIconButton.d.ts
|
|
4
|
-
declare const CardIconButton: React.FC<React.ComponentProps<typeof IconButton> & IconButtonProps & Pick<LinkProps, "href" | "target" | "rel">>;
|
|
4
|
+
export declare const CardIconButton: React.FC<React.ComponentProps<typeof IconButton> & IconButtonProps & Pick<LinkProps, "href" | "target" | "rel">>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { CardIconButton };
|
|
7
6
|
//# sourceMappingURL=CardIconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardIconButton.d.ts","names":[],"sources":["../../../../src/components/Card/CardIconButton.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"CardIconButton.d.ts","names":[],"sources":["../../../../src/components/Card/CardIconButton.tsx"],"mappings":";;;qBAIa,gBAAgB,MAAM,GACjC,MAAM,sBAAsB,cAC1B,kBACA,KAAK"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Typography } from "@mui/material";
|
|
3
3
|
//#region src/components/Card/CardTitle.d.ts
|
|
4
|
-
declare const CardTitle: React.FC<React.ComponentProps<typeof Typography> & {
|
|
4
|
+
export declare const CardTitle: React.FC<React.ComponentProps<typeof Typography> & {
|
|
5
5
|
required?: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { CardTitle };
|
|
9
8
|
//# sourceMappingURL=CardTitle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardTitle.d.ts","names":[],"sources":["../../../../src/components/Card/CardTitle.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"CardTitle.d.ts","names":[],"sources":["../../../../src/components/Card/CardTitle.tsx"],"mappings":";;;qBAGa,WAAW,MAAM,GAC5B,MAAM,sBAAsB;EAAgB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Card } from "./Card.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
//#region src/components/Card/InputCard.d.ts
|
|
4
|
-
declare const InputCard: React.FC<React.ComponentProps<typeof Card>>;
|
|
4
|
+
export declare const InputCard: React.FC<React.ComponentProps<typeof Card>>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { InputCard };
|
|
7
6
|
//# sourceMappingURL=InputCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputCard.d.ts","names":[],"sources":["../../../../src/components/Card/InputCard.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"InputCard.d.ts","names":[],"sources":["../../../../src/components/Card/InputCard.tsx"],"mappings":";;;qBAIa,WAAW,MAAM,GAAG,MAAM,sBAAsB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FormTypeProps } from "../../stores/form/types.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
//#region src/components/ChainSelect/ChainSelect.d.ts
|
|
4
|
-
declare const ChainSelect: React.NamedExoticComponent<FormTypeProps>;
|
|
4
|
+
export declare const ChainSelect: React.NamedExoticComponent<FormTypeProps>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { ChainSelect };
|
|
7
6
|
//# sourceMappingURL=ChainSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainSelect.d.ts","names":[],"sources":["../../../../src/components/ChainSelect/ChainSelect.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ChainSelect.d.ts","names":[],"sources":["../../../../src/components/ChainSelect/ChainSelect.tsx"],"mappings":";;;qBA2Ba,aAAa,MAAM,qBAAqB"}
|
|
@@ -2,9 +2,8 @@ import "../Card/Card.js";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Avatar, Box, Typography } from "@mui/material";
|
|
4
4
|
//#region src/components/ChainSelect/ChainSelect.style.d.ts
|
|
5
|
-
declare const ChainAvatar: React.FC<React.ComponentProps<typeof Avatar> & {
|
|
5
|
+
export declare const ChainAvatar: React.FC<React.ComponentProps<typeof Avatar> & {
|
|
6
6
|
itemCount?: number;
|
|
7
7
|
}>;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { ChainAvatar };
|
|
10
9
|
//# sourceMappingURL=ChainSelect.style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainSelect.style.d.ts","names":[],"sources":["../../../../src/components/ChainSelect/ChainSelect.style.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"ChainSelect.style.d.ts","names":[],"sources":["../../../../src/components/ChainSelect/ChainSelect.style.tsx"],"mappings":";;;;qBA+Ba,aAAa,MAAM,GAC9B,MAAM,sBAAsB;EAAY"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from "react";
|
|
2
2
|
import { CardProps } from "@mui/material";
|
|
3
3
|
//#region src/components/ContractComponent/ContractComponent.d.ts
|
|
4
|
-
declare const ContractComponent: React.FC<PropsWithChildren<CardProps>>;
|
|
4
|
+
export declare const ContractComponent: React.FC<PropsWithChildren<CardProps>>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { ContractComponent };
|
|
7
6
|
//# sourceMappingURL=ContractComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractComponent.d.ts","names":[],"sources":["../../../../src/components/ContractComponent/ContractComponent.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ContractComponent.d.ts","names":[],"sources":["../../../../src/components/ContractComponent/ContractComponent.tsx"],"mappings":";;;qBAIa,mBAAmB,MAAM,GAAG,kBAAkB"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { TokenAmount as TokenAmount$1 } from "../../types/token.js";
|
|
2
2
|
import { ContractCall } from "@lifi/sdk";
|
|
3
3
|
//#region src/components/ContractComponent/ItemPrice.d.ts
|
|
4
|
-
interface ItemPriceProps {
|
|
4
|
+
export interface ItemPriceProps {
|
|
5
5
|
token: TokenAmount$1;
|
|
6
6
|
contractCalls?: ContractCall[];
|
|
7
7
|
}
|
|
8
|
-
declare const ItemPrice: React.FC<ItemPriceProps>;
|
|
8
|
+
export declare const ItemPrice: React.FC<ItemPriceProps>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { ItemPrice, ItemPriceProps };
|
|
11
10
|
//# sourceMappingURL=ItemPrice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemPrice.d.ts","names":[],"sources":["../../../../src/components/ContractComponent/ItemPrice.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ItemPrice.d.ts","names":[],"sources":["../../../../src/components/ContractComponent/ItemPrice.tsx"],"mappings":";;;iBAMiB;EACf,OAAO;EACP,gBAAgB;;qBAGL,WAAW,MAAM,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NFT.d.ts","names":[],"sources":["../../../../../src/components/ContractComponent/NFT/NFT.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"NFT.d.ts","names":[],"sources":["../../../../../src/components/ContractComponent/NFT/NFT.tsx"],"mappings":";;qBAMa,KAAK,MAAM,GAAG"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { NFTProps } from "./types.js";
|
|
2
2
|
//#region src/components/ContractComponent/NFT/NFTBase.d.ts
|
|
3
|
-
declare const NFTBase: React.FC<NFTProps>;
|
|
3
|
+
export declare const NFTBase: React.FC<NFTProps>;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { NFTBase };
|
|
6
5
|
//# sourceMappingURL=NFTBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NFTBase.d.ts","names":[],"sources":["../../../../../src/components/ContractComponent/NFT/NFTBase.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"NFTBase.d.ts","names":[],"sources":["../../../../../src/components/ContractComponent/NFT/NFTBase.tsx"],"mappings":";;qBAMa,SAAS,MAAM,GAAG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContractCall, TokenAmount } from "@lifi/sdk";
|
|
2
2
|
//#region src/components/ContractComponent/NFT/types.d.ts
|
|
3
|
-
interface NFTBaseProps {
|
|
3
|
+
export interface NFTBaseProps {
|
|
4
4
|
imageUrl?: string;
|
|
5
5
|
collectionName?: string;
|
|
6
6
|
assetName?: string;
|
|
@@ -8,13 +8,12 @@ interface NFTBaseProps {
|
|
|
8
8
|
owner?: NFTOwner;
|
|
9
9
|
token: TokenAmount;
|
|
10
10
|
}
|
|
11
|
-
interface NFTProps extends NFTBaseProps {
|
|
11
|
+
export interface NFTProps extends NFTBaseProps {
|
|
12
12
|
contractCall?: ContractCall;
|
|
13
13
|
}
|
|
14
|
-
interface NFTOwner {
|
|
14
|
+
export interface NFTOwner {
|
|
15
15
|
name?: string;
|
|
16
16
|
url?: string;
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
|
-
export { NFTBaseProps, NFTOwner, NFTProps };
|
|
20
19
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../../src/components/ContractComponent/NFT/types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../../src/components/ContractComponent/NFT/types.ts"],"mappings":";;iBAEiB;EACf;EACA;EACA;EACA;EACA,QAAQ;EACR,OAAO;;iBAGQ,iBAAiB;EAChC,eAAe;;iBAGA;EACf;EACA"}
|
|
@@ -15,7 +15,6 @@ interface ExecutionStatusCardProps {
|
|
|
15
15
|
/** Partner/VC component, shown after the icon/title when done. */
|
|
16
16
|
vcSlot?: ReactNode;
|
|
17
17
|
}
|
|
18
|
-
declare function ExecutionStatusCard({ title, description, rows, iconSlot, footerSlot, vcSlot }: ExecutionStatusCardProps): JSX.Element;
|
|
18
|
+
export declare function ExecutionStatusCard({ title, description, rows, iconSlot, footerSlot, vcSlot }: ExecutionStatusCardProps): JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { ExecutionStatusCard };
|
|
21
20
|
//# sourceMappingURL=ExecutionStatusCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionStatusCard.d.ts","names":[],"sources":["../../../../src/components/ExecutionStatusCard/ExecutionStatusCard.tsx"],"mappings":";;;UAWU;;EAER;;EAEA;;EAEA,MAAM;;EAEN,UAAU;;EAEV,YAAY;;EAEZ,SAAS;;
|
|
1
|
+
{"version":3,"file":"ExecutionStatusCard.d.ts","names":[],"sources":["../../../../src/components/ExecutionStatusCard/ExecutionStatusCard.tsx"],"mappings":";;;UAWU;;EAER;;EAEA;;EAEA,MAAM;;EAEN,UAAU;;EAEV,YAAY;;EAEZ,SAAS;;wBA6EK,sBACd,OACA,aACA,MACA,UACA,YACA,UACC,2BAA2B,IAAI"}
|
|
@@ -10,7 +10,6 @@ interface StatusIconProps {
|
|
|
10
10
|
* The animated status icon. Each state animates in its own way; they all
|
|
11
11
|
* animate out the same way.
|
|
12
12
|
*/
|
|
13
|
-
declare function StatusIcon({ route, status }: StatusIconProps): JSX.Element;
|
|
13
|
+
export declare function StatusIcon({ route, status }: StatusIconProps): JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { StatusIcon };
|
|
16
15
|
//# sourceMappingURL=StatusIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.d.ts","names":[],"sources":["../../../../src/components/ExecutionStatusCard/StatusIcon.tsx"],"mappings":";;;;UA0DU;EACR,OAAO;EACP,QAAQ;;;;;;
|
|
1
|
+
{"version":3,"file":"StatusIcon.d.ts","names":[],"sources":["../../../../src/components/ExecutionStatusCard/StatusIcon.tsx"],"mappings":";;;;UA0DU;EACR,OAAO;EACP,QAAQ;;;;;;wBAOM,aAAa,OAAO,UAAU,kBAAkB,IAAI"}
|