@lifi/widget 1.13.2 → 1.13.3
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/cjs/App.d.ts +4 -0
- package/cjs/App.js +80 -0
- package/cjs/AppDrawer.d.ts +14 -0
- package/cjs/AppDrawer.js +44 -0
- package/cjs/AppDrawer.style.d.ts +53 -0
- package/cjs/AppDrawer.style.js +75 -0
- package/cjs/AppProvider.d.ts +11 -0
- package/cjs/AppProvider.js +31 -0
- package/cjs/components/AppContainer.d.ts +15 -0
- package/cjs/components/AppContainer.js +59 -0
- package/cjs/components/BottomSheet/BottomSheet.d.ts +3 -0
- package/cjs/components/BottomSheet/BottomSheet.js +45 -0
- package/cjs/components/BottomSheet/index.d.ts +2 -0
- package/cjs/components/BottomSheet/index.js +18 -0
- package/cjs/components/BottomSheet/types.d.ts +10 -0
- package/cjs/components/BottomSheet/types.js +2 -0
- package/cjs/components/Card/Card.d.ts +14 -0
- package/cjs/components/Card/Card.js +35 -0
- package/cjs/components/Card/CardHeader.d.ts +18 -0
- package/cjs/components/Card/CardHeader.js +23 -0
- package/cjs/components/Card/CardTitle.d.ts +14 -0
- package/cjs/components/Card/CardTitle.js +12 -0
- package/cjs/components/Card/index.d.ts +3 -0
- package/cjs/components/Card/index.js +19 -0
- package/cjs/components/Dialog.d.ts +3 -0
- package/cjs/components/Dialog.js +27 -0
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.d.ts +6 -0
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.js +45 -0
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +9 -0
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.js +14 -0
- package/cjs/components/GasSufficiencyMessage/index.d.ts +1 -0
- package/cjs/components/GasSufficiencyMessage/index.js +17 -0
- package/cjs/components/Header/Header.d.ts +2 -0
- package/cjs/components/Header/Header.js +27 -0
- package/cjs/components/Header/Header.style.d.ts +20 -0
- package/cjs/components/Header/Header.style.js +26 -0
- package/cjs/components/Header/NavigationHeader.d.ts +2 -0
- package/cjs/components/Header/NavigationHeader.js +58 -0
- package/cjs/components/Header/WalletHeader.d.ts +2 -0
- package/cjs/components/Header/WalletHeader.js +48 -0
- package/cjs/components/Header/index.d.ts +2 -0
- package/cjs/components/Header/index.js +18 -0
- package/cjs/components/Header/types.d.ts +8 -0
- package/cjs/components/Header/types.js +2 -0
- package/cjs/components/Header/useHeaderActionStore.d.ts +6 -0
- package/cjs/components/Header/useHeaderActionStore.js +26 -0
- package/cjs/components/Initializer.d.ts +2 -0
- package/cjs/components/Initializer.js +9 -0
- package/cjs/components/Input.d.ts +1 -0
- package/cjs/components/Input.js +17 -0
- package/cjs/components/LiFiLogo.d.ts +5 -0
- package/cjs/components/LiFiLogo.js +10 -0
- package/cjs/components/NotFound.d.ts +2 -0
- package/cjs/components/NotFound.js +19 -0
- package/cjs/components/PoweredBy/PoweredBy.d.ts +2 -0
- package/cjs/components/PoweredBy/PoweredBy.js +16 -0
- package/cjs/components/PoweredBy/PoweredBy.style.d.ts +12 -0
- package/cjs/components/PoweredBy/PoweredBy.style.js +12 -0
- package/cjs/components/PoweredBy/index.d.ts +1 -0
- package/cjs/components/PoweredBy/index.js +5 -0
- package/cjs/components/ProgressToNextUpdate/ProgressToNextUpdate.d.ts +7 -0
- package/cjs/components/ProgressToNextUpdate/ProgressToNextUpdate.js +63 -0
- package/cjs/components/ProgressToNextUpdate/index.d.ts +1 -0
- package/cjs/components/ProgressToNextUpdate/index.js +17 -0
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.d.ts +4 -0
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.js +26 -0
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +29 -0
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.js +19 -0
- package/cjs/components/ReverseTokensButton/index.d.ts +1 -0
- package/cjs/components/ReverseTokensButton/index.js +17 -0
- package/cjs/components/Select.d.ts +3 -0
- package/cjs/components/Select.js +30 -0
- package/cjs/components/SelectChainAndToken.d.ts +3 -0
- package/cjs/components/SelectChainAndToken.js +23 -0
- package/cjs/components/SelectTokenButton/SelectTokenButton.d.ts +5 -0
- package/cjs/components/SelectTokenButton/SelectTokenButton.js +35 -0
- package/cjs/components/SelectTokenButton/SelectTokenButton.style.d.ts +21 -0
- package/cjs/components/SelectTokenButton/SelectTokenButton.style.js +27 -0
- package/cjs/components/SelectTokenButton/index.d.ts +1 -0
- package/cjs/components/SelectTokenButton/index.js +17 -0
- package/cjs/components/SmallAvatar.d.ts +16 -0
- package/cjs/components/SmallAvatar.js +11 -0
- package/cjs/components/Step/CircularProgress.d.ts +5 -0
- package/cjs/components/Step/CircularProgress.js +24 -0
- package/cjs/components/Step/CircularProgress.style.d.ts +6 -0
- package/cjs/components/Step/CircularProgress.style.js +54 -0
- package/cjs/components/Step/Step.d.ts +7 -0
- package/cjs/components/Step/Step.js +36 -0
- package/cjs/components/Step/StepProcess.d.ts +6 -0
- package/cjs/components/Step/StepProcess.js +25 -0
- package/cjs/components/Step/StepProcess.style.d.ts +39 -0
- package/cjs/components/Step/StepProcess.style.js +8 -0
- package/cjs/components/Step/StepTimer.d.ts +5 -0
- package/cjs/components/Step/StepTimer.js +64 -0
- package/cjs/components/Step/index.d.ts +1 -0
- package/cjs/components/Step/index.js +17 -0
- package/cjs/components/Step/utils.d.ts +6 -0
- package/cjs/components/Step/utils.js +93 -0
- package/cjs/components/StepActions/StepActions.d.ts +13 -0
- package/cjs/components/StepActions/StepActions.js +71 -0
- package/cjs/components/StepActions/StepActions.style.d.ts +20 -0
- package/cjs/components/StepActions/StepActions.style.js +59 -0
- package/cjs/components/StepActions/index.d.ts +1 -0
- package/cjs/components/StepActions/index.js +5 -0
- package/cjs/components/StepActions/types.d.ts +6 -0
- package/cjs/components/StepActions/types.js +2 -0
- package/cjs/components/StepDivider/StepDivider.d.ts +2 -0
- package/cjs/components/StepDivider/StepDivider.js +10 -0
- package/cjs/components/StepDivider/StepDivider.style.d.ts +11 -0
- package/cjs/components/StepDivider/StepDivider.style.js +11 -0
- package/cjs/components/StepDivider/index.d.ts +1 -0
- package/cjs/components/StepDivider/index.js +17 -0
- package/cjs/components/SwapButton/ButtonTooltip.d.ts +5 -0
- package/cjs/components/SwapButton/ButtonTooltip.js +7 -0
- package/cjs/components/SwapButton/SwapButton.d.ts +3 -0
- package/cjs/components/SwapButton/SwapButton.js +74 -0
- package/cjs/components/SwapButton/SwapButton.style.d.ts +65 -0
- package/cjs/components/SwapButton/SwapButton.style.js +15 -0
- package/cjs/components/SwapButton/index.d.ts +1 -0
- package/cjs/components/SwapButton/index.js +5 -0
- package/cjs/components/SwapButton/types.d.ts +7 -0
- package/cjs/components/SwapButton/types.js +2 -0
- package/cjs/components/SwapInProgress/SwapInProgress.d.ts +3 -0
- package/cjs/components/SwapInProgress/SwapInProgress.js +29 -0
- package/cjs/components/SwapInProgress/SwapInProgress.style.d.ts +31 -0
- package/cjs/components/SwapInProgress/SwapInProgress.style.js +17 -0
- package/cjs/components/SwapInProgress/index.d.ts +1 -0
- package/cjs/components/SwapInProgress/index.js +17 -0
- package/cjs/components/SwapInput/FormPriceHelperText.d.ts +5 -0
- package/cjs/components/SwapInput/FormPriceHelperText.js +31 -0
- package/cjs/components/SwapInput/SwapInput.d.ts +3 -0
- package/cjs/components/SwapInput/SwapInput.js +46 -0
- package/cjs/components/SwapInput/SwapInput.style.d.ts +21 -0
- package/cjs/components/SwapInput/SwapInput.style.js +33 -0
- package/cjs/components/SwapInput/SwapInputAdornment.d.ts +3 -0
- package/cjs/components/SwapInput/SwapInputAdornment.js +27 -0
- package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +34 -0
- package/cjs/components/SwapInput/SwapInputAdornment.style.js +23 -0
- package/cjs/components/SwapInput/index.d.ts +1 -0
- package/cjs/components/SwapInput/index.js +17 -0
- package/cjs/components/SwapRouteCard/SwapRouteCard.d.ts +4 -0
- package/cjs/components/SwapRouteCard/SwapRouteCard.js +42 -0
- package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +16 -0
- package/cjs/components/SwapRouteCard/SwapRouteCard.style.js +30 -0
- package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.d.ts +4 -0
- package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +32 -0
- package/cjs/components/SwapRouteCard/SwapRouteNotFoundCard.d.ts +4 -0
- package/cjs/components/SwapRouteCard/SwapRouteNotFoundCard.js +30 -0
- package/cjs/components/SwapRouteCard/index.d.ts +3 -0
- package/cjs/components/SwapRouteCard/index.js +19 -0
- package/cjs/components/SwapRouteCard/types.d.ts +9 -0
- package/cjs/components/SwapRouteCard/types.js +2 -0
- package/cjs/components/Switch.d.ts +1 -0
- package/cjs/components/Switch.js +56 -0
- package/cjs/components/TextFitter/TextFitter.d.ts +3 -0
- package/cjs/components/TextFitter/TextFitter.js +52 -0
- package/cjs/components/TextFitter/index.d.ts +1 -0
- package/cjs/components/TextFitter/index.js +17 -0
- package/cjs/components/TextFitter/types.d.ts +12 -0
- package/cjs/components/TextFitter/types.js +2 -0
- package/cjs/components/Token/Token.d.ts +7 -0
- package/cjs/components/Token/Token.js +35 -0
- package/cjs/components/Token/Token.style.d.ts +24 -0
- package/cjs/components/Token/Token.style.js +34 -0
- package/cjs/components/Token/index.d.ts +2 -0
- package/cjs/components/Token/index.js +18 -0
- package/cjs/components/TokenAvatar/TokenAvatar.d.ts +7 -0
- package/cjs/components/TokenAvatar/TokenAvatar.js +13 -0
- package/cjs/components/TokenAvatar/TokenAvatar.style.d.ts +1 -0
- package/cjs/components/TokenAvatar/TokenAvatar.style.js +19 -0
- package/cjs/components/TokenAvatar/index.d.ts +2 -0
- package/cjs/components/TokenAvatar/index.js +18 -0
- package/cjs/components/TokenList/TokenList.d.ts +3 -0
- package/cjs/components/TokenList/TokenList.js +55 -0
- package/cjs/components/TokenList/TokenList.style.d.ts +32 -0
- package/cjs/components/TokenList/TokenList.style.js +28 -0
- package/cjs/components/TokenList/TokenListItem.d.ts +5 -0
- package/cjs/components/TokenList/TokenListItem.js +32 -0
- package/cjs/components/TokenList/TokenNotFound.d.ts +2 -0
- package/cjs/components/TokenList/TokenNotFound.js +19 -0
- package/cjs/components/TokenList/VirtualizedTokenList.d.ts +3 -0
- package/cjs/components/TokenList/VirtualizedTokenList.js +57 -0
- package/cjs/components/TokenList/index.d.ts +1 -0
- package/cjs/components/TokenList/index.js +17 -0
- package/cjs/components/TokenList/types.d.ts +32 -0
- package/cjs/components/TokenList/types.js +2 -0
- package/cjs/config/env.d.ts +3 -0
- package/cjs/config/env.js +6 -0
- package/cjs/config/lifi.d.ts +3 -0
- package/cjs/config/lifi.js +12 -0
- package/cjs/config/queryClient.d.ts +2 -0
- package/cjs/config/queryClient.js +28 -0
- package/cjs/config/sentry.d.ts +1 -0
- package/cjs/config/sentry.js +65 -0
- package/cjs/config/theme.d.ts +27 -0
- package/cjs/config/theme.js +175 -0
- package/cjs/config/version.d.ts +2 -0
- package/cjs/config/version.js +5 -0
- package/cjs/hooks/index.d.ts +17 -0
- package/cjs/hooks/index.js +33 -0
- package/cjs/hooks/useChain.d.ts +4 -0
- package/cjs/hooks/useChain.js +17 -0
- package/cjs/hooks/useChains.d.ts +101 -0
- package/cjs/hooks/useChains.js +43 -0
- package/cjs/hooks/useContentHeight.d.ts +1 -0
- package/cjs/hooks/useContentHeight.js +27 -0
- package/cjs/hooks/useDebouncedWatch.d.ts +1 -0
- package/cjs/hooks/useDebouncedWatch.js +36 -0
- package/cjs/hooks/useFeaturedTokens.d.ts +1 -0
- package/cjs/hooks/useFeaturedTokens.js +10 -0
- package/cjs/hooks/useGasSufficiency.d.ts +15 -0
- package/cjs/hooks/useGasSufficiency.js +105 -0
- package/cjs/hooks/useInitializer.d.ts +1 -0
- package/cjs/hooks/useInitializer.js +9 -0
- package/cjs/hooks/useRouteExecution.d.ts +8 -0
- package/cjs/hooks/useRouteExecution.js +163 -0
- package/cjs/hooks/useScrollableContainer.d.ts +2 -0
- package/cjs/hooks/useScrollableContainer.js +29 -0
- package/cjs/hooks/useSwapRoutes.d.ts +9 -0
- package/cjs/hooks/useSwapRoutes.js +109 -0
- package/cjs/hooks/useTelemetry.d.ts +1 -0
- package/cjs/hooks/useTelemetry.js +22 -0
- package/cjs/hooks/useToken.d.ts +5 -0
- package/cjs/hooks/useToken.js +18 -0
- package/cjs/hooks/useTokenBalance.d.ts +5 -0
- package/cjs/hooks/useTokenBalance.js +19 -0
- package/cjs/hooks/useTokenBalances.d.ts +10 -0
- package/cjs/hooks/useTokenBalances.js +80 -0
- package/cjs/hooks/useTokenSearch.d.ts +7 -0
- package/cjs/hooks/useTokenSearch.js +41 -0
- package/cjs/hooks/useTokens.d.ts +6 -0
- package/cjs/hooks/useTokens.js +36 -0
- package/cjs/hooks/useTools.d.ts +10 -0
- package/cjs/hooks/useTools.js +28 -0
- package/cjs/i18n/en/translation.json +175 -0
- package/cjs/i18n/index.d.ts +181 -0
- package/cjs/i18n/index.js +27 -0
- package/cjs/icons/LiFiFullLogo.d.ts +2 -0
- package/cjs/icons/LiFiFullLogo.js +6 -0
- package/cjs/icons/LiFiLogo.d.ts +2 -0
- package/cjs/icons/LiFiLogo.js +6 -0
- package/cjs/icons/LiFiToolLogo.d.ts +2 -0
- package/cjs/icons/LiFiToolLogo.js +6 -0
- package/cjs/icons/index.d.ts +3 -0
- package/cjs/icons/index.js +19 -0
- package/cjs/index.d.ts +5 -0
- package/cjs/index.js +28 -0
- package/cjs/pages/MainPage/MainPage.d.ts +2 -0
- package/cjs/pages/MainPage/MainPage.js +15 -0
- package/cjs/pages/MainPage/MainPage.style.d.ts +11 -0
- package/cjs/pages/MainPage/MainPage.style.js +11 -0
- package/cjs/pages/MainPage/MainSwapButton.d.ts +2 -0
- package/cjs/pages/MainPage/MainSwapButton.js +34 -0
- package/cjs/pages/MainPage/SwapRoutes.d.ts +3 -0
- package/cjs/pages/MainPage/SwapRoutes.js +40 -0
- package/cjs/pages/MainPage/SwapRoutes.style.d.ts +11 -0
- package/cjs/pages/MainPage/SwapRoutes.style.js +16 -0
- package/cjs/pages/MainPage/index.d.ts +1 -0
- package/cjs/pages/MainPage/index.js +17 -0
- package/cjs/pages/SelectTokenPage/ChainSelect.d.ts +3 -0
- package/cjs/pages/SelectTokenPage/ChainSelect.js +32 -0
- package/cjs/pages/SelectTokenPage/SearchTokenInput.d.ts +2 -0
- package/cjs/pages/SelectTokenPage/SearchTokenInput.js +21 -0
- package/cjs/pages/SelectTokenPage/SearchTokenInput.style.d.ts +1 -0
- package/cjs/pages/SelectTokenPage/SearchTokenInput.style.js +8 -0
- package/cjs/pages/SelectTokenPage/SelectTokenPage.d.ts +5 -0
- package/cjs/pages/SelectTokenPage/SelectTokenPage.js +27 -0
- package/cjs/pages/SelectTokenPage/index.d.ts +2 -0
- package/cjs/pages/SelectTokenPage/index.js +18 -0
- package/cjs/pages/SelectTokenPage/types.d.ts +4 -0
- package/cjs/pages/SelectTokenPage/types.js +8 -0
- package/cjs/pages/SelectWalletPage/SelectWalletPage.d.ts +2 -0
- package/cjs/pages/SelectWalletPage/SelectWalletPage.js +53 -0
- package/cjs/pages/SelectWalletPage/SelectWalletPage.style.d.ts +46 -0
- package/cjs/pages/SelectWalletPage/SelectWalletPage.style.js +30 -0
- package/cjs/pages/SelectWalletPage/index.d.ts +1 -0
- package/cjs/pages/SelectWalletPage/index.js +17 -0
- package/cjs/pages/SettingsPage/AdvancedPreferences.d.ts +2 -0
- package/cjs/pages/SettingsPage/AdvancedPreferences.js +24 -0
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.d.ts +2 -0
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +24 -0
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +33 -0
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.js +19 -0
- package/cjs/pages/SettingsPage/EnabledBridgesSelect.d.ts +2 -0
- package/cjs/pages/SettingsPage/EnabledBridgesSelect.js +30 -0
- package/cjs/pages/SettingsPage/EnabledExchangesSelect.d.ts +2 -0
- package/cjs/pages/SettingsPage/EnabledExchangesSelect.js +29 -0
- package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +2 -0
- package/cjs/pages/SettingsPage/GasPriceSelect.js +17 -0
- package/cjs/pages/SettingsPage/RoutePrioritySelect.d.ts +2 -0
- package/cjs/pages/SettingsPage/RoutePrioritySelect.js +18 -0
- package/cjs/pages/SettingsPage/SettingsPage.d.ts +2 -0
- package/cjs/pages/SettingsPage/SettingsPage.js +14 -0
- package/cjs/pages/SettingsPage/SlippageInput.d.ts +2 -0
- package/cjs/pages/SettingsPage/SlippageInput.js +29 -0
- package/cjs/pages/SettingsPage/index.d.ts +1 -0
- package/cjs/pages/SettingsPage/index.js +17 -0
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.d.ts +2 -0
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +69 -0
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.style.d.ts +11 -0
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.style.js +8 -0
- package/cjs/pages/SwapDetailsPage/index.d.ts +1 -0
- package/cjs/pages/SwapDetailsPage/index.js +17 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryEmpty.d.ts +2 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryEmpty.js +18 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryItem.d.ts +5 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryItem.js +27 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryPage.d.ts +2 -0
- package/cjs/pages/SwapHistoryPage/SwapHistoryPage.js +34 -0
- package/cjs/pages/SwapHistoryPage/index.d.ts +1 -0
- package/cjs/pages/SwapHistoryPage/index.js +17 -0
- package/cjs/pages/SwapPage/StatusBottomSheet.d.ts +3 -0
- package/cjs/pages/SwapPage/StatusBottomSheet.js +83 -0
- package/cjs/pages/SwapPage/StatusBottomSheet.style.d.ts +25 -0
- package/cjs/pages/SwapPage/StatusBottomSheet.style.js +35 -0
- package/cjs/pages/SwapPage/SwapPage.d.ts +2 -0
- package/cjs/pages/SwapPage/SwapPage.js +49 -0
- package/cjs/pages/SwapPage/SwapPage.style.d.ts +11 -0
- package/cjs/pages/SwapPage/SwapPage.style.js +8 -0
- package/cjs/pages/SwapPage/index.d.ts +1 -0
- package/cjs/pages/SwapPage/index.js +17 -0
- package/cjs/pages/SwapPage/utils.d.ts +6 -0
- package/cjs/pages/SwapPage/utils.js +93 -0
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.d.ts +3 -0
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +39 -0
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +11 -0
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.js +9 -0
- package/cjs/pages/SwapRoutesPage/index.d.ts +1 -0
- package/cjs/pages/SwapRoutesPage/index.js +17 -0
- package/cjs/providers/SwapFormProvider/SwapFormProvider.d.ts +6 -0
- package/cjs/providers/SwapFormProvider/SwapFormProvider.js +45 -0
- package/cjs/providers/SwapFormProvider/index.d.ts +2 -0
- package/cjs/providers/SwapFormProvider/index.js +18 -0
- package/cjs/providers/SwapFormProvider/types.d.ts +25 -0
- package/cjs/providers/SwapFormProvider/types.js +17 -0
- package/cjs/providers/ThemeProvider/ThemeProvider.d.ts +2 -0
- package/cjs/providers/ThemeProvider/ThemeProvider.js +37 -0
- package/cjs/providers/ThemeProvider/index.d.ts +1 -0
- package/cjs/providers/ThemeProvider/index.js +17 -0
- package/cjs/providers/WalletProvider/WalletProvider.d.ts +19 -0
- package/cjs/providers/WalletProvider/WalletProvider.js +106 -0
- package/cjs/providers/WalletProvider/index.d.ts +2 -0
- package/cjs/providers/WalletProvider/index.js +18 -0
- package/cjs/providers/WalletProvider/types.d.ts +17 -0
- package/cjs/providers/WalletProvider/types.js +2 -0
- package/cjs/providers/WidgetProvider/WidgetProvider.d.ts +4 -0
- package/cjs/providers/WidgetProvider/WidgetProvider.js +68 -0
- package/cjs/providers/WidgetProvider/index.d.ts +2 -0
- package/cjs/providers/WidgetProvider/index.js +18 -0
- package/cjs/providers/WidgetProvider/types.d.ts +8 -0
- package/cjs/providers/WidgetProvider/types.js +2 -0
- package/cjs/stores/index.d.ts +2 -0
- package/cjs/stores/index.js +18 -0
- package/cjs/stores/route/index.d.ts +5 -0
- package/cjs/stores/route/index.js +21 -0
- package/cjs/stores/route/types.d.ts +14 -0
- package/cjs/stores/route/types.js +2 -0
- package/cjs/stores/route/useExecutingRoutes.d.ts +2 -0
- package/cjs/stores/route/useExecutingRoutes.js +13 -0
- package/cjs/stores/route/useRouteStore.d.ts +18 -0
- package/cjs/stores/route/useRouteStore.js +57 -0
- package/cjs/stores/route/useSetExecutableRoute.d.ts +1 -0
- package/cjs/stores/route/useSetExecutableRoute.js +8 -0
- package/cjs/stores/route/useSwapHistory.d.ts +2 -0
- package/cjs/stores/route/useSwapHistory.js +18 -0
- package/cjs/stores/settings/index.d.ts +5 -0
- package/cjs/stores/settings/index.js +21 -0
- package/cjs/stores/settings/types.d.ts +23 -0
- package/cjs/stores/settings/types.js +4 -0
- package/cjs/stores/settings/useAppearance.d.ts +2 -0
- package/cjs/stores/settings/useAppearance.js +14 -0
- package/cjs/stores/settings/useSetSettings.d.ts +5 -0
- package/cjs/stores/settings/useSetSettings.js +12 -0
- package/cjs/stores/settings/useSettings.d.ts +2 -0
- package/cjs/stores/settings/useSettings.js +15 -0
- package/cjs/stores/settings/useSettingsStore.d.ts +38 -0
- package/cjs/stores/settings/useSettingsStore.js +90 -0
- package/cjs/types/index.d.ts +2 -0
- package/cjs/types/index.js +18 -0
- package/cjs/types/token.d.ts +4 -0
- package/cjs/types/token.js +2 -0
- package/cjs/types/widget.d.ts +47 -0
- package/cjs/types/widget.js +2 -0
- package/cjs/utils/colors.d.ts +3 -0
- package/cjs/utils/colors.js +13 -0
- package/cjs/utils/deepClone.d.ts +1 -0
- package/cjs/utils/deepClone.js +7 -0
- package/cjs/utils/elements.d.ts +4 -0
- package/cjs/utils/elements.js +8 -0
- package/cjs/utils/format.d.ts +9 -0
- package/cjs/utils/format.js +86 -0
- package/cjs/utils/index.d.ts +6 -0
- package/cjs/utils/index.js +22 -0
- package/cjs/utils/input.d.ts +1 -0
- package/cjs/utils/input.js +28 -0
- package/cjs/utils/navigationRoutes.d.ts +13 -0
- package/cjs/utils/navigationRoutes.js +15 -0
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/index.js +3 -1
- package/package.json +25 -11
- package/tsconfig.cjs.tsbuildinfo +1 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
|
|
3
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
4
|
+
centerRipple?: boolean | undefined;
|
|
5
|
+
children?: import("react").ReactNode;
|
|
6
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
disableRipple?: boolean | undefined;
|
|
9
|
+
disableTouchRipple?: boolean | undefined;
|
|
10
|
+
focusRipple?: boolean | undefined;
|
|
11
|
+
focusVisibleClassName?: string | undefined;
|
|
12
|
+
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
13
|
+
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
14
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
15
|
+
tabIndex?: number | undefined;
|
|
16
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
17
|
+
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
19
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
|
+
}, "className" | "style" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "autoFocus" | "dense" | "divider" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
21
|
+
export declare const ListItem: import("@emotion/styled").StyledComponent<{
|
|
22
|
+
button?: false | undefined;
|
|
23
|
+
} & import("@mui/material").ListItemBaseProps & {
|
|
24
|
+
components?: {
|
|
25
|
+
Root?: import("react").ElementType<any> | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
componentsProps?: {
|
|
28
|
+
root?: (import("react").HTMLAttributes<HTMLDivElement> & import("@mui/material").ListItemComponentsPropsOverrides) | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof import("react").LiHTMLAttributes<HTMLLIElement>> & {
|
|
31
|
+
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
32
|
+
}, "button" | "className" | "style" | "classes" | "children" | "disabled" | "sx" | "alignItems" | "autoFocus" | "dense" | "divider" | "components" | "componentsProps" | "selected" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListItem = exports.ListItemButton = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const ListItemSecondaryAction_1 = require("@mui/material/ListItemSecondaryAction");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ theme }) => ({
|
|
9
|
+
borderRadius: theme.shape.borderRadiusSecondary,
|
|
10
|
+
paddingLeft: theme.spacing(2),
|
|
11
|
+
height: 64,
|
|
12
|
+
width: '100%',
|
|
13
|
+
'&:hover': {
|
|
14
|
+
backgroundColor: (0, utils_1.getContrastAlphaColor)(theme, '4%'),
|
|
15
|
+
},
|
|
16
|
+
}));
|
|
17
|
+
exports.ListItem = (0, styles_1.styled)(material_1.ListItem)(({ theme }) => ({
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
top: 0,
|
|
20
|
+
left: 0,
|
|
21
|
+
height: 64,
|
|
22
|
+
flexDirection: 'column',
|
|
23
|
+
alignItems: 'flex-start',
|
|
24
|
+
padding: theme.spacing(0, 3),
|
|
25
|
+
[`.${ListItemSecondaryAction_1.listItemSecondaryActionClasses.root}`]: {
|
|
26
|
+
right: theme.spacing(5),
|
|
27
|
+
},
|
|
28
|
+
}));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TokenAmountSkeleton = exports.TokenListItemSkeleton = exports.TokenListItem = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const react_i18next_1 = require("react-i18next");
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
const TokenList_style_1 = require("./TokenList.style");
|
|
10
|
+
exports.TokenListItem = (0, react_1.memo)(({ onClick, size, start, token, showBalance, isBalanceLoading, startAdornment, endAdornment, }) => {
|
|
11
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
12
|
+
const handleClick = () => onClick === null || onClick === void 0 ? void 0 : onClick(token.address);
|
|
13
|
+
const tokenPrice = (0, utils_1.formatTokenPrice)(token.amount, token.priceUSD);
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItem, Object.assign({ disablePadding: true, style: {
|
|
15
|
+
height: `${size}px`,
|
|
16
|
+
transform: `translateY(${start}px)`,
|
|
17
|
+
} }, { children: [startAdornment, (0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItemButton, Object.assign({ onClick: handleClick, dense: true, disableRipple: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ src: token.logoURI, alt: token.symbol }, { children: token.symbol[0] })) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: token.symbol, secondary: token.name }), showBalance ? (isBalanceLoading ? ((0, jsx_runtime_1.jsx)(exports.TokenAmountSkeleton, {})) : ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { textAlign: 'right' } }, { children: [Number(token.amount) ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", noWrap: true }, { children: token.amount }))) : null, tokenPrice ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontWeight: 400, fontSize: 12, color: "text.secondary", "data-price": token.priceUSD }, { children: t(`swap.currency`, {
|
|
18
|
+
value: tokenPrice,
|
|
19
|
+
}) }))) : null] })))) : null] })), endAdornment] })));
|
|
20
|
+
});
|
|
21
|
+
const TokenListItemSkeleton = () => {
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItem, Object.assign({ secondaryAction: (0, jsx_runtime_1.jsx)(exports.TokenAmountSkeleton, {}), disablePadding: true, sx: { position: 'relative', flexDirection: 'row', alignItems: 'center' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", width: 32, height: 32, sx: { marginLeft: 2, marginRight: 2 } }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 48, height: 20 }), secondary: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 96, height: 20 }) })] })));
|
|
23
|
+
};
|
|
24
|
+
exports.TokenListItemSkeleton = TokenListItemSkeleton;
|
|
25
|
+
const TokenAmountSkeleton = () => {
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
|
|
27
|
+
display: 'flex',
|
|
28
|
+
flexDirection: 'column',
|
|
29
|
+
alignItems: 'flex-end',
|
|
30
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 56, height: 24 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 48, height: 18 })] })));
|
|
31
|
+
};
|
|
32
|
+
exports.TokenAmountSkeleton = TokenAmountSkeleton;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TokenNotFound = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const icons_material_1 = require("@mui/icons-material");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const react_i18next_1 = require("react-i18next");
|
|
8
|
+
const TokenNotFound = () => {
|
|
9
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
flexDirection: 'column',
|
|
15
|
+
flex: 1,
|
|
16
|
+
padding: 3,
|
|
17
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 48, lineHeight: 1 }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.SearchOff, { fontSize: "inherit" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, px: 2 }, { children: t('swap.couldntFindTokens') }))] })));
|
|
18
|
+
};
|
|
19
|
+
exports.TokenNotFound = TokenNotFound;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VirtualizedTokenList = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const react_virtual_1 = require("@tanstack/react-virtual");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const react_i18next_1 = require("react-i18next");
|
|
9
|
+
const TokenListItem_1 = require("./TokenListItem");
|
|
10
|
+
const VirtualizedTokenList = ({ tokens, featuredTokensLength, scrollElementRef, chainId, isLoading, isBalanceLoading, showBalance, showFeatured, onClick, }) => {
|
|
11
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
12
|
+
const hasFeaturedTokens = !!featuredTokensLength && showFeatured;
|
|
13
|
+
const featuredTokensLastIndex = (featuredTokensLength !== null && featuredTokensLength !== void 0 ? featuredTokensLength : 0) - 1;
|
|
14
|
+
const tokensLastIndex = tokens.length - 1;
|
|
15
|
+
const { getVirtualItems, getTotalSize, scrollToIndex } = (0, react_virtual_1.useVirtualizer)({
|
|
16
|
+
count: tokens.length,
|
|
17
|
+
getScrollElement: () => scrollElementRef.current,
|
|
18
|
+
overscan: 5,
|
|
19
|
+
paddingEnd: 12,
|
|
20
|
+
estimateSize: (index) => {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
// heigth of TokenListItem
|
|
23
|
+
let size = 64;
|
|
24
|
+
if (!hasFeaturedTokens) {
|
|
25
|
+
return size;
|
|
26
|
+
}
|
|
27
|
+
if (index === 0 && ((_a = tokens[index]) === null || _a === void 0 ? void 0 : _a.featured)) {
|
|
28
|
+
// height of startAdornment
|
|
29
|
+
size += 24;
|
|
30
|
+
}
|
|
31
|
+
if (index === featuredTokensLastIndex &&
|
|
32
|
+
index !== tokensLastIndex &&
|
|
33
|
+
((_b = tokens[index]) === null || _b === void 0 ? void 0 : _b.featured)) {
|
|
34
|
+
// height of endAdornment
|
|
35
|
+
size += 32;
|
|
36
|
+
}
|
|
37
|
+
return size;
|
|
38
|
+
},
|
|
39
|
+
getItemKey: (index) => { var _a; return (_a = tokens[index].address) !== null && _a !== void 0 ? _a : index; },
|
|
40
|
+
});
|
|
41
|
+
(0, react_1.useEffect)(() => {
|
|
42
|
+
scrollToIndex(0, { align: 'start', smoothScroll: false });
|
|
43
|
+
}, [scrollToIndex, chainId]);
|
|
44
|
+
if (isLoading) {
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ disablePadding: true }, { children: Array.from({ length: 3 }).map((_, index) => (
|
|
46
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
47
|
+
(0, jsx_runtime_1.jsx)(TokenListItem_1.TokenListItemSkeleton, {}, index))) })));
|
|
48
|
+
}
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ style: { height: getTotalSize() }, disablePadding: true }, { children: getVirtualItems().map((item) => {
|
|
50
|
+
const token = tokens[item.index];
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(TokenListItem_1.TokenListItem, { onClick: onClick, size: item.size, start: item.start, token: token, isBalanceLoading: isBalanceLoading, showBalance: showBalance, startAdornment: hasFeaturedTokens && token.featured && item.index === 0 ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 14, fontWeight: 600, lineHeight: 1, px: 2, pb: 1.25 }, { children: t('swap.featuredTokens') }))) : null, endAdornment: hasFeaturedTokens &&
|
|
52
|
+
token.featured &&
|
|
53
|
+
item.index === featuredTokensLastIndex &&
|
|
54
|
+
item.index !== tokensLastIndex ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 14, fontWeight: 600, lineHeight: 1, px: 2, py: 1.25 }, { children: t('swap.otherTokens') }))) : null }, item.key));
|
|
55
|
+
}) })));
|
|
56
|
+
};
|
|
57
|
+
exports.VirtualizedTokenList = VirtualizedTokenList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TokenList';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./TokenList"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TokenAmount } from '@lifi/sdk';
|
|
2
|
+
import { MutableRefObject } from 'react';
|
|
3
|
+
import { SwapFormDirection } from '../../providers/SwapFormProvider';
|
|
4
|
+
import { Token } from '../../types';
|
|
5
|
+
export interface TokenListProps {
|
|
6
|
+
formType: SwapFormDirection;
|
|
7
|
+
height: number;
|
|
8
|
+
onClick?(): void;
|
|
9
|
+
}
|
|
10
|
+
export interface VirtualizedTokenListProps {
|
|
11
|
+
tokens: Token[];
|
|
12
|
+
featuredTokensLength?: number;
|
|
13
|
+
scrollElementRef: MutableRefObject<HTMLElement | null>;
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
isBalanceLoading: boolean;
|
|
16
|
+
chainId: number;
|
|
17
|
+
showBalance?: boolean;
|
|
18
|
+
showFeatured?: boolean;
|
|
19
|
+
onClick(tokenAddress: string): void;
|
|
20
|
+
}
|
|
21
|
+
export interface TokenListItemBaseProps {
|
|
22
|
+
onClick?(tokenAddress: string): void;
|
|
23
|
+
size: number;
|
|
24
|
+
start: number;
|
|
25
|
+
}
|
|
26
|
+
export interface TokenListItemProps extends TokenListItemBaseProps {
|
|
27
|
+
showBalance?: boolean;
|
|
28
|
+
token: TokenAmount;
|
|
29
|
+
isBalanceLoading?: boolean;
|
|
30
|
+
startAdornment?: React.ReactNode;
|
|
31
|
+
endAdornment?: React.ReactNode;
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.updateLiFiConfig = exports.LiFi = void 0;
|
|
7
|
+
const sdk_1 = __importDefault(require("@lifi/sdk"));
|
|
8
|
+
exports.LiFi = new sdk_1.default();
|
|
9
|
+
const updateLiFiConfig = (configUpdate) => {
|
|
10
|
+
exports.LiFi.setConfig(configUpdate);
|
|
11
|
+
};
|
|
12
|
+
exports.updateLiFiConfig = updateLiFiConfig;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.queryClient = void 0;
|
|
4
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
5
|
+
exports.queryClient = new react_query_1.QueryClient({
|
|
6
|
+
defaultOptions: {
|
|
7
|
+
queries: {
|
|
8
|
+
enabled: true,
|
|
9
|
+
staleTime: 3600000,
|
|
10
|
+
cacheTime: Infinity,
|
|
11
|
+
refetchInterval: false,
|
|
12
|
+
refetchIntervalInBackground: false,
|
|
13
|
+
refetchOnWindowFocus: true,
|
|
14
|
+
refetchOnReconnect: true,
|
|
15
|
+
refetchOnMount: true,
|
|
16
|
+
retryOnMount: true,
|
|
17
|
+
// suspense: true,
|
|
18
|
+
onError: (error) => {
|
|
19
|
+
//
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
mutations: {
|
|
23
|
+
onError: (error) => {
|
|
24
|
+
//
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const initSentry: (enabled?: boolean) => Promise<void>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.initSentry = void 0;
|
|
36
|
+
const version_1 = require("./version");
|
|
37
|
+
let sentryLoaded = false;
|
|
38
|
+
const initSentry = (enabled) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
+
if (process.env.NODE_ENV === 'development') {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (enabled || sentryLoaded) {
|
|
43
|
+
const [Sentry, { CaptureConsole }, { BrowserTracing }] = yield Promise.all([
|
|
44
|
+
Promise.resolve().then(() => __importStar(require('@sentry/react'))),
|
|
45
|
+
Promise.resolve().then(() => __importStar(require('@sentry/integrations'))),
|
|
46
|
+
Promise.resolve().then(() => __importStar(require('@sentry/tracing'))),
|
|
47
|
+
]);
|
|
48
|
+
Sentry.init({
|
|
49
|
+
dsn: 'https://bc1312161bf948db9b9c82618035ec22@o1302189.ingest.sentry.io/6539228',
|
|
50
|
+
integrations: [
|
|
51
|
+
new BrowserTracing(),
|
|
52
|
+
new CaptureConsole({
|
|
53
|
+
levels: ['error'],
|
|
54
|
+
}),
|
|
55
|
+
],
|
|
56
|
+
sampleRate: 1,
|
|
57
|
+
tracesSampleRate: 0.2,
|
|
58
|
+
enabled,
|
|
59
|
+
environment: process.env.NODE_ENV,
|
|
60
|
+
release: version_1.version,
|
|
61
|
+
});
|
|
62
|
+
sentryLoaded = true;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
exports.initSentry = initSentry;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PaletteMode } from '@mui/material';
|
|
3
|
+
import { ThemeConfig } from '../types';
|
|
4
|
+
declare module '@mui/material/styles' {
|
|
5
|
+
interface TypographyVariants {
|
|
6
|
+
'@supports (font-variation-settings: normal)': React.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
interface TypographyVariantsOptions {
|
|
9
|
+
'@supports (font-variation-settings: normal)'?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
interface Shape {
|
|
12
|
+
borderRadius: number;
|
|
13
|
+
borderRadiusSecondary: number;
|
|
14
|
+
}
|
|
15
|
+
interface Theme {
|
|
16
|
+
shape: Shape;
|
|
17
|
+
}
|
|
18
|
+
interface ThemeOptions {
|
|
19
|
+
shape?: Partial<Shape>;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
declare module '@mui/material/Typography' {
|
|
23
|
+
interface TypographyPropsVariantOverrides {
|
|
24
|
+
'@supports (font-variation-settings: normal)': true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export declare const createTheme: (mode: PaletteMode, theme?: ThemeConfig) => import("@mui/material").Theme;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTheme = void 0;
|
|
4
|
+
const DialogActions_1 = require("@mui/material/DialogActions");
|
|
5
|
+
const styles_1 = require("@mui/material/styles");
|
|
6
|
+
const createPalette_1 = require("@mui/material/styles/createPalette");
|
|
7
|
+
const palette = {
|
|
8
|
+
primary: {
|
|
9
|
+
main: '#3F49E1',
|
|
10
|
+
light: (0, styles_1.lighten)('#3F49E1', 0.5),
|
|
11
|
+
dark: (0, styles_1.darken)('#3F49E1', 0.2),
|
|
12
|
+
},
|
|
13
|
+
secondary: {
|
|
14
|
+
main: '#F5B5FF',
|
|
15
|
+
light: (0, styles_1.lighten)('#F5B5FF', 0.5),
|
|
16
|
+
dark: (0, styles_1.darken)('#F5B5FF', 0.2),
|
|
17
|
+
},
|
|
18
|
+
success: {
|
|
19
|
+
main: '#0AA65B',
|
|
20
|
+
},
|
|
21
|
+
warning: {
|
|
22
|
+
main: '#FFE668',
|
|
23
|
+
},
|
|
24
|
+
error: {
|
|
25
|
+
main: '#E5452F',
|
|
26
|
+
},
|
|
27
|
+
info: {
|
|
28
|
+
main: '#297EFF',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const shape = {
|
|
32
|
+
borderRadius: 12,
|
|
33
|
+
borderRadiusSecondary: 6,
|
|
34
|
+
};
|
|
35
|
+
const createTheme = (mode, theme = {}) => {
|
|
36
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
37
|
+
const primaryMainColor = (_c = (_b = (_a = theme.palette) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b.main) !== null && _c !== void 0 ? _c : palette.primary.main;
|
|
38
|
+
const primaryLightColor = (0, styles_1.lighten)((_f = (_e = (_d = theme.palette) === null || _d === void 0 ? void 0 : _d.primary) === null || _e === void 0 ? void 0 : _e.main) !== null && _f !== void 0 ? _f : palette.primary.main, 0.5);
|
|
39
|
+
const primaryDarkColor = (0, styles_1.darken)((_j = (_h = (_g = theme.palette) === null || _g === void 0 ? void 0 : _g.primary) === null || _h === void 0 ? void 0 : _h.main) !== null && _j !== void 0 ? _j : palette.primary.main, 0.2);
|
|
40
|
+
return (0, styles_1.createTheme)({
|
|
41
|
+
typography: Object.assign({ fontFamily: 'Inter var, Inter, sans-serif' }, theme.typography),
|
|
42
|
+
palette: Object.assign(Object.assign(Object.assign({ mode }, palette), { primary: {
|
|
43
|
+
main: primaryMainColor,
|
|
44
|
+
light: primaryLightColor,
|
|
45
|
+
dark: primaryDarkColor,
|
|
46
|
+
}, secondary: {
|
|
47
|
+
main: (_m = (_l = (_k = theme.palette) === null || _k === void 0 ? void 0 : _k.secondary) === null || _l === void 0 ? void 0 : _l.main) !== null && _m !== void 0 ? _m : palette.secondary.main,
|
|
48
|
+
light: (0, styles_1.lighten)((_q = (_p = (_o = theme.palette) === null || _o === void 0 ? void 0 : _o.secondary) === null || _p === void 0 ? void 0 : _p.main) !== null && _q !== void 0 ? _q : palette.secondary.main, 0.5),
|
|
49
|
+
dark: (0, styles_1.darken)((_t = (_s = (_r = theme.palette) === null || _r === void 0 ? void 0 : _r.secondary) === null || _s === void 0 ? void 0 : _s.main) !== null && _t !== void 0 ? _t : palette.secondary.main, 0.2),
|
|
50
|
+
} }), (mode === 'light'
|
|
51
|
+
? {
|
|
52
|
+
text: {
|
|
53
|
+
primary: '#000',
|
|
54
|
+
secondary: '#52575b',
|
|
55
|
+
},
|
|
56
|
+
grey: {
|
|
57
|
+
100: '#F4F5F6',
|
|
58
|
+
200: '#EFF1F2',
|
|
59
|
+
300: '#E3E7E9',
|
|
60
|
+
400: '#C6C9CD',
|
|
61
|
+
500: '#AEB3B7',
|
|
62
|
+
600: '#798086',
|
|
63
|
+
700: '#57595C',
|
|
64
|
+
},
|
|
65
|
+
}
|
|
66
|
+
: {
|
|
67
|
+
background: {
|
|
68
|
+
paper: '#212121',
|
|
69
|
+
},
|
|
70
|
+
})),
|
|
71
|
+
shape: Object.assign(Object.assign({}, shape), theme.shape),
|
|
72
|
+
breakpoints: {
|
|
73
|
+
values: {
|
|
74
|
+
xs: 0,
|
|
75
|
+
sm: 392,
|
|
76
|
+
md: 900,
|
|
77
|
+
lg: 1200,
|
|
78
|
+
xl: 1536,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
components: {
|
|
82
|
+
MuiScopedCssBaseline: {
|
|
83
|
+
styleOverrides: {
|
|
84
|
+
root: Object.assign(Object.assign({ fontFamily: 'Inter, sans-serif' }, theme.typography), { '@supports (font-variation-settings: normal)': Object.assign({ fontFamily: 'Inter var, sans-serif' }, theme.typography) }),
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
MuiButton: {
|
|
88
|
+
defaultProps: {
|
|
89
|
+
disableElevation: true,
|
|
90
|
+
},
|
|
91
|
+
styleOverrides: Object.assign(Object.assign({}, (mode === 'dark'
|
|
92
|
+
? {
|
|
93
|
+
outlined: {
|
|
94
|
+
color: primaryLightColor,
|
|
95
|
+
borderColor: primaryLightColor,
|
|
96
|
+
'&:hover': {
|
|
97
|
+
backgroundColor: (0, styles_1.alpha)(primaryLightColor, 0.08),
|
|
98
|
+
borderColor: primaryLightColor,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
text: {
|
|
102
|
+
color: primaryLightColor,
|
|
103
|
+
'&:hover': {
|
|
104
|
+
backgroundColor: (0, styles_1.alpha)(primaryLightColor, 0.08),
|
|
105
|
+
borderColor: primaryLightColor,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
}
|
|
109
|
+
: {})), { root: {
|
|
110
|
+
borderRadius: (_v = (_u = theme.shape) === null || _u === void 0 ? void 0 : _u.borderRadiusSecondary) !== null && _v !== void 0 ? _v : shape.borderRadiusSecondary,
|
|
111
|
+
textTransform: 'none',
|
|
112
|
+
fontSize: '1rem',
|
|
113
|
+
padding: '10px 16px',
|
|
114
|
+
[`.${DialogActions_1.dialogActionsClasses.root} &`]: {
|
|
115
|
+
padding: '6px 12px',
|
|
116
|
+
},
|
|
117
|
+
'&.Mui-disabled, &.Mui-disabled:hover': {
|
|
118
|
+
color: mode === 'light'
|
|
119
|
+
? 'rgb(0 0 0 / 70%)'
|
|
120
|
+
: 'rgb(255 255 255 / 70%)',
|
|
121
|
+
cursor: 'not-allowed',
|
|
122
|
+
pointerEvents: 'auto',
|
|
123
|
+
},
|
|
124
|
+
}, contained: {
|
|
125
|
+
'&:hover': {
|
|
126
|
+
color: (0, styles_1.getContrastRatio)(createPalette_1.dark.text.primary, primaryMainColor) >= 3
|
|
127
|
+
? createPalette_1.dark.text.primary
|
|
128
|
+
: createPalette_1.light.text.primary,
|
|
129
|
+
},
|
|
130
|
+
} }),
|
|
131
|
+
},
|
|
132
|
+
MuiIconButton: {
|
|
133
|
+
styleOverrides: {
|
|
134
|
+
root: {
|
|
135
|
+
color: 'inherit',
|
|
136
|
+
'&:hover': {
|
|
137
|
+
color: 'inherit',
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
MuiAvatar: {
|
|
143
|
+
styleOverrides: {
|
|
144
|
+
root: {
|
|
145
|
+
height: 32,
|
|
146
|
+
width: 32,
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
MuiListItemAvatar: {
|
|
151
|
+
styleOverrides: {
|
|
152
|
+
root: {
|
|
153
|
+
minWidth: 48,
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
MuiListItemText: {
|
|
158
|
+
styleOverrides: {
|
|
159
|
+
primary: ({ theme }) => ({
|
|
160
|
+
fontWeight: '500',
|
|
161
|
+
fontSize: '1.125rem',
|
|
162
|
+
lineHeight: '1.2778',
|
|
163
|
+
color: theme.palette.text.primary,
|
|
164
|
+
}),
|
|
165
|
+
secondary: ({ theme }) => ({
|
|
166
|
+
fontWeight: '400',
|
|
167
|
+
fontSize: '0.75rem',
|
|
168
|
+
color: theme.palette.text.secondary,
|
|
169
|
+
}),
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
exports.createTheme = createTheme;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './useChain';
|
|
2
|
+
export * from './useChains';
|
|
3
|
+
export * from './useContentHeight';
|
|
4
|
+
export * from './useDebouncedWatch';
|
|
5
|
+
export * from './useFeaturedTokens';
|
|
6
|
+
export * from './useGasSufficiency';
|
|
7
|
+
export * from './useInitializer';
|
|
8
|
+
export * from './useRouteExecution';
|
|
9
|
+
export * from './useScrollableContainer';
|
|
10
|
+
export * from './useSwapRoutes';
|
|
11
|
+
export * from './useTelemetry';
|
|
12
|
+
export * from './useToken';
|
|
13
|
+
export * from './useTokenBalance';
|
|
14
|
+
export * from './useTokenBalances';
|
|
15
|
+
export * from './useTokens';
|
|
16
|
+
export * from './useTokenSearch';
|
|
17
|
+
export * from './useTools';
|