@velora-dex/widget 0.6.1-dev.1 → 0.6.1-dev.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/dist/assets/bridges/canonical-uni.js +44 -0
- package/dist/assets/bridges/canonical-uni.js.map +1 -0
- package/dist/assets/bridges/cctp.js +53 -0
- package/dist/assets/bridges/cctp.js.map +1 -0
- package/dist/assets/bridges/celer.js +94 -0
- package/dist/assets/bridges/celer.js.map +1 -0
- package/dist/assets/bridges/relay.js +40 -0
- package/dist/assets/bridges/{relay.svg.js → relay.js.map} +1 -12
- package/dist/assets/check.js +24 -0
- package/dist/assets/check.js.map +1 -0
- package/dist/assets/chevron.js +22 -0
- package/dist/assets/chevron.js.map +1 -0
- package/dist/assets/circle-check.js +20 -0
- package/dist/assets/circle-check.js.map +1 -0
- package/dist/assets/circle-exclamation.js +24 -0
- package/dist/assets/circle-exclamation.js.map +1 -0
- package/dist/assets/copy.js +24 -0
- package/dist/assets/copy.js.map +1 -0
- package/dist/assets/delta.js +20 -0
- package/dist/assets/delta.js.map +1 -0
- package/dist/assets/ellipse.js +25 -0
- package/dist/assets/ellipse.js.map +1 -0
- package/dist/assets/external-url.js +43 -0
- package/dist/assets/external-url.js.map +1 -0
- package/dist/assets/info.js +23 -0
- package/dist/assets/info.js.map +1 -0
- package/dist/assets/logout.js +20 -0
- package/dist/assets/logout.js.map +1 -0
- package/dist/assets/{market.svg.js.map → market.js} +23 -1
- package/dist/assets/market.js.map +1 -0
- package/dist/assets/price-impact.js +20 -0
- package/dist/assets/price-impact.js.map +1 -0
- package/dist/assets/receipt.js +25 -0
- package/dist/assets/receipt.js.map +1 -0
- package/dist/assets/refresh.js +26 -0
- package/dist/assets/refresh.js.map +1 -0
- package/dist/assets/slider.js +20 -0
- package/dist/assets/slider.js.map +1 -0
- package/dist/assets/speedometer.js +46 -0
- package/dist/assets/speedometer.js.map +1 -0
- package/dist/assets/spinner.js +57 -0
- package/dist/assets/spinner.js.map +1 -0
- package/dist/assets/two-dots.js +32 -0
- package/dist/assets/two-dots.js.map +1 -0
- package/dist/assets/vlr.js +6 -0
- package/dist/assets/vlr.js.map +1 -0
- package/dist/assets/wavax.js +47 -0
- package/dist/assets/wavax.js.map +1 -0
- package/dist/assets/wavax2.js +6 -0
- package/dist/assets/wavax2.js.map +1 -0
- package/dist/assets/wbnb.js +47 -0
- package/dist/assets/wbnb.js.map +1 -0
- package/dist/assets/wbnb2.js +6 -0
- package/dist/assets/wbnb2.js.map +1 -0
- package/dist/assets/weth.js +49 -0
- package/dist/assets/weth.js.map +1 -0
- package/dist/assets/weth2.js +6 -0
- package/dist/assets/weth2.js.map +1 -0
- package/dist/assets/wmatic.js +69 -0
- package/dist/assets/wmatic.js.map +1 -0
- package/dist/assets/wmatic2.js +6 -0
- package/dist/assets/wmatic2.js.map +1 -0
- package/dist/assets/wxdai.js +56 -0
- package/dist/assets/wxdai.js.map +1 -0
- package/dist/assets/wxdai2.js +6 -0
- package/dist/assets/wxdai2.js.map +1 -0
- package/dist/components/ui/accordion.js +77 -208
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/button.js +64 -109
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/card.js +51 -142
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/drawer.js +100 -270
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.js +84 -232
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/input.js +50 -122
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/progress.js +47 -118
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/skeleton.js +18 -40
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/sonner.js +39 -66
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/switch.js +28 -63
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/tooltip.js +61 -159
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/web3/AccountButton.js +62 -131
- package/dist/components/web3/AccountButton.js.map +1 -1
- package/dist/components/web3/ConnectExternalProvider/AutoconnectExternal.js +56 -95
- package/dist/components/web3/ConnectExternalProvider/AutoconnectExternal.js.map +1 -1
- package/dist/components/web3/ConnectExternalProvider/constants.js +5 -5
- package/dist/components/web3/ConnectExternalProvider/constants.js.map +1 -1
- package/dist/components/web3/ConnectExternalProvider/metamaskProviderWrapper.js +58 -51
- package/dist/components/web3/ConnectExternalProvider/metamaskProviderWrapper.js.map +1 -1
- package/dist/components/web3/ConnectExternalProvider/safeProviderWrapper.js +48 -72
- package/dist/components/web3/ConnectExternalProvider/safeProviderWrapper.js.map +1 -1
- package/dist/components/web3/ConnectExternalProvider/utils.js +24 -35
- package/dist/components/web3/ConnectExternalProvider/utils.js.map +1 -1
- package/dist/components/web3/ConnectWallets/WalletConnectButtons.js +102 -242
- package/dist/components/web3/ConnectWallets/WalletConnectButtons.js.map +1 -1
- package/dist/components/web3/ConnectWallets/assets/browser-wallet.js +6 -0
- package/dist/components/web3/ConnectWallets/assets/browser-wallet.js.map +1 -0
- package/dist/components/web3/ConnectWallets/assets/bscwallet.js +6 -0
- package/dist/components/web3/ConnectWallets/assets/bscwallet.js.map +1 -0
- package/dist/components/web3/ConnectWallets/assets/coinbasewallet.js +6 -0
- package/dist/components/web3/ConnectWallets/assets/coinbasewallet.js.map +1 -0
- package/dist/components/web3/ConnectWallets/assets/email.js +6 -0
- package/dist/components/web3/ConnectWallets/assets/email.js.map +1 -0
- package/dist/components/web3/ConnectWallets/assets/ledger.js +6 -0
- package/dist/components/web3/ConnectWallets/assets/ledger.js.map +1 -0
- package/dist/components/web3/ConnectWallets/assets/metamask.js +6 -0
- package/dist/components/web3/ConnectWallets/assets/metamask.js.map +1 -0
- package/dist/components/web3/ConnectWallets/assets/paraswap.js +6 -0
- package/dist/components/web3/ConnectWallets/assets/paraswap.js.map +1 -0
- package/dist/components/web3/ConnectWallets/assets/safe.js +6 -0
- package/dist/components/web3/ConnectWallets/assets/safe.js.map +1 -0
- package/dist/components/web3/ConnectWallets/assets/trezor.js +6 -0
- package/dist/components/web3/ConnectWallets/assets/trezor.js.map +1 -0
- package/dist/components/web3/ConnectWallets/assets/walletconnect.js +6 -0
- package/dist/components/web3/ConnectWallets/assets/walletconnect.js.map +1 -0
- package/dist/components/web3/ConnectWallets/index.js +110 -254
- package/dist/components/web3/ConnectWallets/index.js.map +1 -1
- package/dist/components/web3/ConnectWallets/privy/button.js +80 -196
- package/dist/components/web3/ConnectWallets/privy/button.js.map +1 -1
- package/dist/components/web3/ConnectWallets/privy/connectRunner.js +49 -68
- package/dist/components/web3/ConnectWallets/privy/connectRunner.js.map +1 -1
- package/dist/components/web3/ConnectWallets/privy/iframe.js +17 -31
- package/dist/components/web3/ConnectWallets/privy/iframe.js.map +1 -1
- package/dist/components/web3/ConnectWallets/privy/provider.js +16 -25
- package/dist/components/web3/ConnectWallets/privy/provider.js.map +1 -1
- package/dist/components/web3/ConnectWallets/walletFlags.js +97 -102
- package/dist/components/web3/ConnectWallets/walletFlags.js.map +1 -1
- package/dist/components/web3/ConnectWallets/walletIcons.js +122 -173
- package/dist/components/web3/ConnectWallets/walletIcons.js.map +1 -1
- package/dist/components/web3/ConnectedWallet/ConnectedWallet.js +116 -182
- package/dist/components/web3/ConnectedWallet/ConnectedWallet.js.map +1 -1
- package/dist/components/web3/providers.js +30 -54
- package/dist/components/web3/providers.js.map +1 -1
- package/dist/components/widget/AppHeader/Activities/Activities.js +66 -122
- package/dist/components/widget/AppHeader/Activities/Activities.js.map +1 -1
- package/dist/components/widget/AppHeader/Activities/ActivitiesScreen.js +64 -130
- package/dist/components/widget/AppHeader/Activities/ActivitiesScreen.js.map +1 -1
- package/dist/components/widget/AppHeader/Activities/ActivityItems.js +161 -319
- package/dist/components/widget/AppHeader/Activities/ActivityItems.js.map +1 -1
- package/dist/components/widget/AppHeader/Activities/Drawers.js +90 -166
- package/dist/components/widget/AppHeader/Activities/Drawers.js.map +1 -1
- package/dist/components/widget/AppHeader/Activities/assets/eye-crossed.js +20 -0
- package/dist/components/widget/AppHeader/Activities/assets/eye-crossed.js.map +1 -0
- package/dist/components/widget/AppHeader/Activities/assets/eye.js +20 -0
- package/dist/components/widget/AppHeader/Activities/assets/eye.js.map +1 -0
- package/dist/components/widget/AppHeader/Activities/hooks.js +330 -831
- package/dist/components/widget/AppHeader/Activities/hooks.js.map +1 -1
- package/dist/components/widget/AppHeader/Activities/utils.js +42 -68
- package/dist/components/widget/AppHeader/Activities/utils.js.map +1 -1
- package/dist/components/widget/AppHeader/ActivityButton.js +45 -101
- package/dist/components/widget/AppHeader/ActivityButton.js.map +1 -1
- package/dist/components/widget/AppHeader/AppHeader.js +81 -172
- package/dist/components/widget/AppHeader/AppHeader.js.map +1 -1
- package/dist/components/widget/AppHeader/TradeModeSwitcher.js +50 -95
- package/dist/components/widget/AppHeader/TradeModeSwitcher.js.map +1 -1
- package/dist/components/widget/AppHeader/state/showMoreAtom.js +13 -18
- package/dist/components/widget/AppHeader/state/showMoreAtom.js.map +1 -1
- package/dist/components/widget/BridgeList/BridgeListItem.js +187 -474
- package/dist/components/widget/BridgeList/BridgeListItem.js.map +1 -1
- package/dist/components/widget/BridgeList/BridgeProtocolsList.js +98 -216
- package/dist/components/widget/BridgeList/BridgeProtocolsList.js.map +1 -1
- package/dist/components/widget/BridgeList/BridgesList.js +40 -72
- package/dist/components/widget/BridgeList/BridgesList.js.map +1 -1
- package/dist/components/widget/BridgeList/hooks.js +119 -241
- package/dist/components/widget/BridgeList/hooks.js.map +1 -1
- package/dist/components/widget/BridgePreferences/BridgePreferences.js +75 -134
- package/dist/components/widget/BridgePreferences/BridgePreferences.js.map +1 -1
- package/dist/components/widget/BridgeSelectorExpandable/BridgeSelectorExpandable.js +78 -135
- package/dist/components/widget/BridgeSelectorExpandable/BridgeSelectorExpandable.js.map +1 -1
- package/dist/components/widget/Button/CancelButton/CancelButton.js +43 -104
- package/dist/components/widget/Button/CancelButton/CancelButton.js.map +1 -1
- package/dist/components/widget/Button/CancelButton/CancelButtonWithDrawer.js +35 -64
- package/dist/components/widget/Button/CancelButton/CancelButtonWithDrawer.js.map +1 -1
- package/dist/components/widget/Button/CancelButton/constants.js +5 -3
- package/dist/components/widget/Button/CancelButton/constants.js.map +1 -1
- package/dist/components/widget/Button/DismissButton.js +19 -27
- package/dist/components/widget/Button/DismissButton.js.map +1 -1
- package/dist/components/widget/CompareQuotes/CompareQuotes.js +96 -208
- package/dist/components/widget/CompareQuotes/CompareQuotes.js.map +1 -1
- package/dist/components/widget/Details/DetailWithTooltip.js +28 -75
- package/dist/components/widget/Details/DetailWithTooltip.js.map +1 -1
- package/dist/components/widget/Details/DetailWithValueList.js +38 -68
- package/dist/components/widget/Details/DetailWithValueList.js.map +1 -1
- package/dist/components/widget/Details/DetailWithValueListExpandable.js +29 -60
- package/dist/components/widget/Details/DetailWithValueListExpandable.js.map +1 -1
- package/dist/components/widget/Details/SwapDetailsExpandable.js +11 -19
- package/dist/components/widget/Details/SwapDetailsExpandable.js.map +1 -1
- package/dist/components/widget/DexesList/DexItem.js +201 -357
- package/dist/components/widget/DexesList/DexItem.js.map +1 -1
- package/dist/components/widget/DexesList/DexesList.js +49 -58
- package/dist/components/widget/DexesList/DexesList.js.map +1 -1
- package/dist/components/widget/DexesList/assets/exchanges/biswap.js +6 -0
- package/dist/components/widget/DexesList/assets/exchanges/biswap.js.map +1 -0
- package/dist/components/widget/DexesList/assets/exchanges/cheeseswap.js +6 -0
- package/dist/components/widget/DexesList/assets/exchanges/cheeseswap.js.map +1 -0
- package/dist/components/widget/DexesList/assets/exchanges/complusswap.js +6 -0
- package/dist/components/widget/DexesList/assets/exchanges/complusswap.js.map +1 -0
- package/dist/components/widget/DexesList/assets/exchanges/hashflow.js +6 -0
- package/dist/components/widget/DexesList/assets/exchanges/hashflow.js.map +1 -0
- package/dist/components/widget/DexesList/assets/exchanges/icons.js +83 -0
- package/dist/components/widget/DexesList/assets/exchanges/icons.js.map +1 -0
- package/dist/components/widget/DexesList/assets/exchanges/quickswap.js +6 -0
- package/dist/components/widget/DexesList/assets/exchanges/quickswap.js.map +1 -0
- package/dist/components/widget/DexesList/assets/exchanges/shibaswap.js +6 -0
- package/dist/components/widget/DexesList/assets/exchanges/shibaswap.js.map +1 -0
- package/dist/components/widget/DexesList/assets/exchanges/uniswap.js +6 -0
- package/dist/components/widget/DexesList/assets/exchanges/uniswap.js.map +1 -0
- package/dist/components/widget/DexesList/assets/exchanges/velora-dark.js +6 -0
- package/dist/components/widget/DexesList/assets/exchanges/velora-dark.js.map +1 -0
- package/dist/components/widget/DexesList/assets/exchanges/velora-light.js +6 -0
- package/dist/components/widget/DexesList/assets/exchanges/velora-light.js.map +1 -0
- package/dist/components/widget/DexesList/assets/gas.js +20 -0
- package/dist/components/widget/DexesList/assets/gas.js.map +1 -0
- package/dist/components/widget/DexesList/assets/unknown-dex.js +6 -0
- package/dist/components/widget/DexesList/assets/unknown-dex.js.map +1 -0
- package/dist/components/widget/DexesList/constants.js +5 -3
- package/dist/components/widget/DexesList/constants.js.map +1 -1
- package/dist/components/widget/DexesList/getDexProps.js +59 -89
- package/dist/components/widget/DexesList/getDexProps.js.map +1 -1
- package/dist/components/widget/Dialog/ReceiverAddressDialog/ReceiverAddressDialog.js +118 -277
- package/dist/components/widget/Dialog/ReceiverAddressDialog/ReceiverAddressDialog.js.map +1 -1
- package/dist/components/widget/Dialog/ReceiverAddressDialog/ReceiverAddressInput.js +34 -46
- package/dist/components/widget/Dialog/ReceiverAddressDialog/ReceiverAddressInput.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/SelectTokenDialog.js +242 -664
- package/dist/components/widget/Dialog/SelectTokenDialog/SelectTokenDialog.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/AcrossTokenList.js +23 -45
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/AcrossTokenList.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/RegularTokenList.js +29 -65
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/RegularTokenList.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/TokenCloud/index.js +52 -106
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/TokenCloud/index.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/TokenCloud/tokens.js +217 -173
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/TokenCloud/tokens.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/TokenListBody.js +28 -49
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/TokenListBody.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/TokenListRow.js +104 -237
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/TokenListRow.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenSearch.js +45 -75
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenSearch.js.map +1 -1
- package/dist/components/widget/Drawer/Overlay.js +25 -60
- package/dist/components/widget/Drawer/Overlay.js.map +1 -1
- package/dist/components/widget/Drawer/index.js +93 -229
- package/dist/components/widget/Drawer/index.js.map +1 -1
- package/dist/components/widget/Drawer/state/useDrawerControls.js +85 -258
- package/dist/components/widget/Drawer/state/useDrawerControls.js.map +1 -1
- package/dist/components/widget/Dropdown/DropdownWithItems.js +35 -43
- package/dist/components/widget/Dropdown/DropdownWithItems.js.map +1 -1
- package/dist/components/widget/Duration/Duration.d.ts.map +1 -1
- package/dist/components/widget/Duration/Duration.js +51 -89
- package/dist/components/widget/Duration/Duration.js.map +1 -1
- package/dist/components/widget/Duration/utils.js +6 -4
- package/dist/components/widget/Duration/utils.js.map +1 -1
- package/dist/components/widget/FetchingQuotes/FetchingQuotes.js +48 -39
- package/dist/components/widget/FetchingQuotes/FetchingQuotes.js.map +1 -1
- package/dist/components/widget/Icon/CheckIcon.js +10 -17
- package/dist/components/widget/Icon/CheckIcon.js.map +1 -1
- package/dist/components/widget/Icon/ChevronIcon.js +18 -41
- package/dist/components/widget/Icon/ChevronIcon.js.map +1 -1
- package/dist/components/widget/Icon/DeltaIcon.js +10 -17
- package/dist/components/widget/Icon/DeltaIcon.js.map +1 -1
- package/dist/components/widget/Icon/EllipseIcon.js +10 -17
- package/dist/components/widget/Icon/EllipseIcon.js.map +1 -1
- package/dist/components/widget/Icon/InfoIcon.js +21 -44
- package/dist/components/widget/Icon/InfoIcon.js.map +1 -1
- package/dist/components/widget/Icon/MarketIcon.js +10 -17
- package/dist/components/widget/Icon/MarketIcon.js.map +1 -1
- package/dist/components/widget/Icon/SliderIcon.js +10 -17
- package/dist/components/widget/Icon/SliderIcon.js.map +1 -1
- package/dist/components/widget/ImportToken/ImportToken.js +92 -120
- package/dist/components/widget/ImportToken/ImportToken.js.map +1 -1
- package/dist/components/widget/ImportToken/useImportTokenDrawer.js +38 -89
- package/dist/components/widget/ImportToken/useImportTokenDrawer.js.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/Controls.js +97 -208
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/Controls.js.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/LimitOrderDetails.d.ts.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/LimitOrderDetails.js +82 -169
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/LimitOrderDetails.js.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/utils.js +77 -89
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/utils.js.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderListItem.d.ts +5 -7
- package/dist/components/widget/LimitOrderItem/LimitOrderListItem.d.ts.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderListItem.js +193 -447
- package/dist/components/widget/LimitOrderItem/LimitOrderListItem.js.map +1 -1
- package/dist/components/widget/LimitOrderItem/constants.js +6 -9
- package/dist/components/widget/LimitOrderItem/constants.js.map +1 -1
- package/dist/components/widget/LimitOrderItem/types.d.ts +1 -0
- package/dist/components/widget/LimitOrderItem/types.d.ts.map +1 -1
- package/dist/components/widget/LimitOrderItem/utils.d.ts.map +1 -1
- package/dist/components/widget/LimitOrderItem/utils.js +43 -63
- package/dist/components/widget/LimitOrderItem/utils.js.map +1 -1
- package/dist/components/widget/LimitPriceInput/index.js +158 -319
- package/dist/components/widget/LimitPriceInput/index.js.map +1 -1
- package/dist/components/widget/Line/Line.js +17 -47
- package/dist/components/widget/Line/Line.js.map +1 -1
- package/dist/components/widget/NetworkIcon/NetworkIconSquare.js +36 -64
- package/dist/components/widget/NetworkIcon/NetworkIconSquare.js.map +1 -1
- package/dist/components/widget/NetworkIcon/assets/sqr/arbitrum.js +47 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/arbitrum.js.map +1 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/avalanche.js +27 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/avalanche.js.map +1 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/base.js +27 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/base.js.map +1 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/bsc.js +31 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/bsc.js.map +1 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/eth.js +67 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/eth.js.map +1 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/gnosis.js +35 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/gnosis.js.map +1 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/optimism.js +33 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/optimism.js.map +1 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/polygon.js +27 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/polygon.js.map +1 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/unichain.js +46 -0
- package/dist/components/widget/NetworkIcon/assets/sqr/unichain.js.map +1 -0
- package/dist/components/widget/NetworkSwitcher/CompactNetworkSwitcher.js +33 -54
- package/dist/components/widget/NetworkSwitcher/CompactNetworkSwitcher.js.map +1 -1
- package/dist/components/widget/NetworkSwitcher/NetworkSwitcherDropdown.js +38 -83
- package/dist/components/widget/NetworkSwitcher/NetworkSwitcherDropdown.js.map +1 -1
- package/dist/components/widget/NetworkSwitcher/NetworkSwitcherList.js +32 -70
- package/dist/components/widget/NetworkSwitcher/NetworkSwitcherList.js.map +1 -1
- package/dist/components/widget/NetworkSwitcher/common/AllNetworksItem.js +18 -46
- package/dist/components/widget/NetworkSwitcher/common/AllNetworksItem.js.map +1 -1
- package/dist/components/widget/NetworkSwitcher/common/NetworkItem.js +15 -44
- package/dist/components/widget/NetworkSwitcher/common/NetworkItem.js.map +1 -1
- package/dist/components/widget/NetworkSwitcher/utils/items.js +49 -61
- package/dist/components/widget/NetworkSwitcher/utils/items.js.map +1 -1
- package/dist/components/widget/NetworkWithIcon/NetworkIconWithChevron.js +60 -144
- package/dist/components/widget/NetworkWithIcon/NetworkIconWithChevron.js.map +1 -1
- package/dist/components/widget/NetworkWithIcon/NetworkWithIcon.js +55 -109
- package/dist/components/widget/NetworkWithIcon/NetworkWithIcon.js.map +1 -1
- package/dist/components/widget/NumberInput/NumberInput.d.ts +2 -1
- package/dist/components/widget/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/widget/NumberInput/NumberInput.js +102 -237
- package/dist/components/widget/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/widget/NumberInput/assets/arrow-down.js +20 -0
- package/dist/components/widget/NumberInput/assets/arrow-down.js.map +1 -0
- package/dist/components/widget/NumberInput/assets/arrow-up.js +20 -0
- package/dist/components/widget/NumberInput/assets/arrow-up.js.map +1 -0
- package/dist/components/widget/OrderExpiryInput/index.js +112 -223
- package/dist/components/widget/OrderExpiryInput/index.js.map +1 -1
- package/dist/components/widget/OtcOrderItem/OtcOrderDetails/Controls.js +84 -186
- package/dist/components/widget/OtcOrderItem/OtcOrderDetails/Controls.js.map +1 -1
- package/dist/components/widget/OtcOrderItem/OtcOrderDetails/OtcOrderDetails.js +51 -93
- package/dist/components/widget/OtcOrderItem/OtcOrderDetails/OtcOrderDetails.js.map +1 -1
- package/dist/components/widget/OtcOrderItem/OtcOrderDetails/utils.js +16 -15
- package/dist/components/widget/OtcOrderItem/OtcOrderDetails/utils.js.map +1 -1
- package/dist/components/widget/OtcOrderItem/OtcOrderListItem.js +83 -180
- package/dist/components/widget/OtcOrderItem/OtcOrderListItem.js.map +1 -1
- package/dist/components/widget/OtcOrderItem/constants.js +7 -7
- package/dist/components/widget/OtcOrderItem/constants.js.map +1 -1
- package/dist/components/widget/OtcOrderItem/utils.d.ts.map +1 -1
- package/dist/components/widget/OtcOrderItem/utils.js +58 -80
- package/dist/components/widget/OtcOrderItem/utils.js.map +1 -1
- package/dist/components/widget/PayReceiveInfo/PayReceiveInfo.js +92 -198
- package/dist/components/widget/PayReceiveInfo/PayReceiveInfo.js.map +1 -1
- package/dist/components/widget/PoweredBy/PoweredBy.js +16 -19
- package/dist/components/widget/PoweredBy/PoweredBy.js.map +1 -1
- package/dist/components/widget/PoweredBy/assets/velora.js +55 -0
- package/dist/components/widget/PoweredBy/assets/velora.js.map +1 -0
- package/dist/components/widget/ReceiverAddress/ReceiverAddress.js +67 -124
- package/dist/components/widget/ReceiverAddress/ReceiverAddress.js.map +1 -1
- package/dist/components/widget/ReceiverAddress/state/receiverAddressAtom.js +18 -39
- package/dist/components/widget/ReceiverAddress/state/receiverAddressAtom.js.map +1 -1
- package/dist/components/widget/ReceiverAddress/state/subscriptions.js +47 -67
- package/dist/components/widget/ReceiverAddress/state/subscriptions.js.map +1 -1
- package/dist/components/widget/ReviewAndConfirm/FillOtcReviewAndConfirm/FillOtcControls.js +39 -142
- package/dist/components/widget/ReviewAndConfirm/FillOtcReviewAndConfirm/FillOtcControls.js.map +1 -1
- package/dist/components/widget/ReviewAndConfirm/FillOtcReviewAndConfirm/FillOtcReviewAndConfirm.js +90 -204
- package/dist/components/widget/ReviewAndConfirm/FillOtcReviewAndConfirm/FillOtcReviewAndConfirm.js.map +1 -1
- package/dist/components/widget/ReviewAndConfirm/FillOtcReviewAndConfirm/utils.js +82 -106
- package/dist/components/widget/ReviewAndConfirm/FillOtcReviewAndConfirm/utils.js.map +1 -1
- package/dist/components/widget/RowVirtualizer/RowVirtualizerFixed.js +46 -46
- package/dist/components/widget/RowVirtualizer/RowVirtualizerFixed.js.map +1 -1
- package/dist/components/widget/Screen/GenericScreen.js +56 -144
- package/dist/components/widget/Screen/GenericScreen.js.map +1 -1
- package/dist/components/widget/Screen/ScreenContainer.js +18 -34
- package/dist/components/widget/Screen/ScreenContainer.js.map +1 -1
- package/dist/components/widget/SelectToken/SelectTokenButton.js +82 -197
- package/dist/components/widget/SelectToken/SelectTokenButton.js.map +1 -1
- package/dist/components/widget/SettingsButton/SettingsButton.js +25 -59
- package/dist/components/widget/SettingsButton/SettingsButton.js.map +1 -1
- package/dist/components/widget/SwapModeSwitcher/SwapModeSwitcherExpandable.js +166 -413
- package/dist/components/widget/SwapModeSwitcher/SwapModeSwitcherExpandable.js.map +1 -1
- package/dist/components/widget/SwapModeSwitcher/state/swapModeActionsAtom.js +19 -31
- package/dist/components/widget/SwapModeSwitcher/state/swapModeActionsAtom.js.map +1 -1
- package/dist/components/widget/SwapModeSwitcher/state/swapModeAtom.js +7 -9
- package/dist/components/widget/SwapModeSwitcher/state/swapModeAtom.js.map +1 -1
- package/dist/components/widget/SwapModeSwitcher/state/swapSideAtom.js +10 -23
- package/dist/components/widget/SwapModeSwitcher/state/swapSideAtom.js.map +1 -1
- package/dist/components/widget/SwapRate/SwapRate.js +56 -111
- package/dist/components/widget/SwapRate/SwapRate.js.map +1 -1
- package/dist/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.js +48 -116
- package/dist/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.js.map +1 -1
- package/dist/components/widget/Tabs/Tabs.js +49 -101
- package/dist/components/widget/Tabs/Tabs.js.map +1 -1
- package/dist/components/widget/Toasts/CustomToast.js +120 -220
- package/dist/components/widget/Toasts/CustomToast.js.map +1 -1
- package/dist/components/widget/TokenBadge/TokenBadge.js +81 -174
- package/dist/components/widget/TokenBadge/TokenBadge.js.map +1 -1
- package/dist/components/widget/TokenBadge/TokenLink.js +32 -63
- package/dist/components/widget/TokenBadge/TokenLink.js.map +1 -1
- package/dist/components/widget/TokenBadge/assets/placeholder.js +6 -0
- package/dist/components/widget/TokenBadge/assets/placeholder.js.map +1 -0
- package/dist/components/widget/TokenInput/InputContainer.js +17 -52
- package/dist/components/widget/TokenInput/InputContainer.js.map +1 -1
- package/dist/components/widget/TokenInput/InputField.js +50 -82
- package/dist/components/widget/TokenInput/InputField.js.map +1 -1
- package/dist/components/widget/TokenInput/InputFooter.js +86 -204
- package/dist/components/widget/TokenInput/InputFooter.js.map +1 -1
- package/dist/components/widget/TokenInput/InputHeader.js +28 -56
- package/dist/components/widget/TokenInput/InputHeader.js.map +1 -1
- package/dist/components/widget/TokenInput/common/Balance.js +21 -26
- package/dist/components/widget/TokenInput/common/Balance.js.map +1 -1
- package/dist/components/widget/TokenInput/common/MaxButtons.js +25 -46
- package/dist/components/widget/TokenInput/common/MaxButtons.js.map +1 -1
- package/dist/components/widget/TokenInput/index.js +84 -167
- package/dist/components/widget/TokenInput/index.js.map +1 -1
- package/dist/components/widget/TokenSwitcher/TokenSwitcher.js +34 -75
- package/dist/components/widget/TokenSwitcher/TokenSwitcher.js.map +1 -1
- package/dist/components/widget/TradeOverview/CancelButtonWithDrawer.js +43 -82
- package/dist/components/widget/TradeOverview/CancelButtonWithDrawer.js.map +1 -1
- package/dist/components/widget/TradeOverview/CancelOrder/ConfirmCancel.js +99 -225
- package/dist/components/widget/TradeOverview/CancelOrder/ConfirmCancel.js.map +1 -1
- package/dist/components/widget/TradeOverview/CancelOrder/constants.js +20 -18
- package/dist/components/widget/TradeOverview/CancelOrder/constants.js.map +1 -1
- package/dist/components/widget/TradeOverview/CancelOrder/utils.js +24 -43
- package/dist/components/widget/TradeOverview/CancelOrder/utils.js.map +1 -1
- package/dist/components/widget/TradeOverview/DeltaOrderTradeOverview.js +108 -241
- package/dist/components/widget/TradeOverview/DeltaOrderTradeOverview.js.map +1 -1
- package/dist/components/widget/TradeOverview/FillOtcOrderTradeOverview.js +60 -131
- package/dist/components/widget/TradeOverview/FillOtcOrderTradeOverview.js.map +1 -1
- package/dist/components/widget/TradeOverview/LimitOrderTradeOverview.js +73 -181
- package/dist/components/widget/TradeOverview/LimitOrderTradeOverview.js.map +1 -1
- package/dist/components/widget/TradeOverview/MarketSwapTradeOverview.js +101 -229
- package/dist/components/widget/TradeOverview/MarketSwapTradeOverview.js.map +1 -1
- package/dist/components/widget/TradeOverview/OtcOrderTradeOverview.js +69 -149
- package/dist/components/widget/TradeOverview/OtcOrderTradeOverview.js.map +1 -1
- package/dist/components/widget/TradeOverview/Step/Step.js +71 -164
- package/dist/components/widget/TradeOverview/Step/Step.js.map +1 -1
- package/dist/components/widget/TradeOverview/Step/utils.js +16 -40
- package/dist/components/widget/TradeOverview/Step/utils.js.map +1 -1
- package/dist/components/widget/TradeOverview/Stepper.js +57 -106
- package/dist/components/widget/TradeOverview/Stepper.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeComplete/TradeCompleteFooter.js +51 -84
- package/dist/components/widget/TradeOverview/TradeComplete/TradeCompleteFooter.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeComplete/TradeCompleteHeader.js +75 -179
- package/dist/components/widget/TradeOverview/TradeComplete/TradeCompleteHeader.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeComplete/TradeCompletedDetails.js +21 -24
- package/dist/components/widget/TradeOverview/TradeComplete/TradeCompletedDetails.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeComplete/constants.js +11 -9
- package/dist/components/widget/TradeOverview/TradeComplete/constants.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeComplete/index.js +22 -46
- package/dist/components/widget/TradeOverview/TradeComplete/index.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeComplete/useTradeCompleteDetails.js +96 -170
- package/dist/components/widget/TradeOverview/TradeComplete/useTradeCompleteDetails.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeComplete/utils.js +166 -255
- package/dist/components/widget/TradeOverview/TradeComplete/utils.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeDetails.js +175 -375
- package/dist/components/widget/TradeOverview/TradeDetails.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeDetailsDisplay.js +43 -50
- package/dist/components/widget/TradeOverview/TradeDetailsDisplay.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeError/TradeErrorDetails.js +43 -95
- package/dist/components/widget/TradeOverview/TradeError/TradeErrorDetails.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeError/TradeErrorFooter.js +31 -41
- package/dist/components/widget/TradeOverview/TradeError/TradeErrorFooter.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeError/index.js +19 -48
- package/dist/components/widget/TradeOverview/TradeError/index.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeError/utils.js +31 -56
- package/dist/components/widget/TradeOverview/TradeError/utils.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeOverview.js +190 -404
- package/dist/components/widget/TradeOverview/TradeOverview.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeOverviewFooter.js +132 -221
- package/dist/components/widget/TradeOverview/TradeOverviewFooter.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeOverviewHeader.js +26 -45
- package/dist/components/widget/TradeOverview/TradeOverviewHeader.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeOverviewScreen.js +40 -85
- package/dist/components/widget/TradeOverview/TradeOverviewScreen.js.map +1 -1
- package/dist/components/widget/TradeOverview/TwapOrderTradeOverview.js +108 -245
- package/dist/components/widget/TradeOverview/TwapOrderTradeOverview.js.map +1 -1
- package/dist/components/widget/TradeOverview/VerticalDash.js +28 -34
- package/dist/components/widget/TradeOverview/VerticalDash.js.map +1 -1
- package/dist/components/widget/TradeOverview/assets/1_approving.js +6 -0
- package/dist/components/widget/TradeOverview/assets/1_approving.js.map +1 -0
- package/dist/components/widget/TradeOverview/assets/2_in_progress.js +6 -0
- package/dist/components/widget/TradeOverview/assets/2_in_progress.js.map +1 -0
- package/dist/components/widget/TradeOverview/assets/3_executing_step.js +6 -0
- package/dist/components/widget/TradeOverview/assets/3_executing_step.js.map +1 -0
- package/dist/components/widget/TradeOverview/assets/4_complete_step.js +6 -0
- package/dist/components/widget/TradeOverview/assets/4_complete_step.js.map +1 -0
- package/dist/components/widget/TradeOverview/assets/5_error_step.js +6 -0
- package/dist/components/widget/TradeOverview/assets/5_error_step.js.map +1 -0
- package/dist/components/widget/TradeOverview/motionProps.js +63 -119
- package/dist/components/widget/TradeOverview/motionProps.js.map +1 -1
- package/dist/components/widget/TradeOverview/steps.js +141 -121
- package/dist/components/widget/TradeOverview/steps.js.map +1 -1
- package/dist/components/widget/TradeOverview/tradeFlowContext.js +25 -65
- package/dist/components/widget/TradeOverview/tradeFlowContext.js.map +1 -1
- package/dist/components/widget/TradeOverview/utils/isNonFlowStep.js +6 -4
- package/dist/components/widget/TradeOverview/utils/isNonFlowStep.js.map +1 -1
- package/dist/components/widget/TradeOverview/utils/preWrap.js +26 -34
- package/dist/components/widget/TradeOverview/utils/preWrap.js.map +1 -1
- package/dist/components/widget/TradeOverview/utils/useSwapAmountsWithSlippage.js +36 -87
- package/dist/components/widget/TradeOverview/utils/useSwapAmountsWithSlippage.js.map +1 -1
- package/dist/components/widget/TradeParameters/BridgePreferenceParameters/BridgePreferenceParameters.js +38 -88
- package/dist/components/widget/TradeParameters/BridgePreferenceParameters/BridgePreferenceParameters.js.map +1 -1
- package/dist/components/widget/TradeParameters/BridgePreferenceParameters/useDraftBridgePreferencesState.js +28 -66
- package/dist/components/widget/TradeParameters/BridgePreferenceParameters/useDraftBridgePreferencesState.js.map +1 -1
- package/dist/components/widget/TradeParameters/DegenModeConfirmation.js +81 -139
- package/dist/components/widget/TradeParameters/DegenModeConfirmation.js.map +1 -1
- package/dist/components/widget/TradeParameters/DegenModeParameter.js +42 -82
- package/dist/components/widget/TradeParameters/DegenModeParameter.js.map +1 -1
- package/dist/components/widget/TradeParameters/DeltaParameter.js +35 -65
- package/dist/components/widget/TradeParameters/DeltaParameter.js.map +1 -1
- package/dist/components/widget/TradeParameters/EIP1559Parameter.js +27 -55
- package/dist/components/widget/TradeParameters/EIP1559Parameter.js.map +1 -1
- package/dist/components/widget/TradeParameters/SlippageParameter/CustomSlippageInput.js +43 -75
- package/dist/components/widget/TradeParameters/SlippageParameter/CustomSlippageInput.js.map +1 -1
- package/dist/components/widget/TradeParameters/SlippageParameter/EditSlippage.js +16 -25
- package/dist/components/widget/TradeParameters/SlippageParameter/EditSlippage.js.map +1 -1
- package/dist/components/widget/TradeParameters/SlippageParameter/SlippageParameter.js +92 -176
- package/dist/components/widget/TradeParameters/SlippageParameter/SlippageParameter.js.map +1 -1
- package/dist/components/widget/TradeParameters/SlippageParameter/hooks/useCustomSlippageProps.js +60 -141
- package/dist/components/widget/TradeParameters/SlippageParameter/hooks/useCustomSlippageProps.js.map +1 -1
- package/dist/components/widget/TradeParameters/TradeParameters.js +93 -207
- package/dist/components/widget/TradeParameters/TradeParameters.js.map +1 -1
- package/dist/components/widget/TradeParameters/TransactionSpeedParameter.js +98 -181
- package/dist/components/widget/TradeParameters/TransactionSpeedParameter.js.map +1 -1
- package/dist/components/widget/TradeParameters/hooks/useIsNotDefaultAnyParameter.js +25 -49
- package/dist/components/widget/TradeParameters/hooks/useIsNotDefaultAnyParameter.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/bridgePreferences/bridgePreferenceAtom.js +11 -15
- package/dist/components/widget/TradeParameters/state/bridgePreferences/bridgePreferenceAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/bridgePreferences/constants.js +6 -6
- package/dist/components/widget/TradeParameters/state/bridgePreferences/constants.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/bridgePreferences/disabledBridgesAtom.js +12 -17
- package/dist/components/widget/TradeParameters/state/bridgePreferences/disabledBridgesAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/bridgePreferences/excludeBridgesAtom.js +8 -10
- package/dist/components/widget/TradeParameters/state/bridgePreferences/excludeBridgesAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/bridgePreferences/protocolNameAtom.js +7 -6
- package/dist/components/widget/TradeParameters/state/bridgePreferences/protocolNameAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/bridgePreferences/resetDraftsAtom.js +9 -9
- package/dist/components/widget/TradeParameters/state/bridgePreferences/resetDraftsAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/bridgePreferences/useBridgePreferences.js +28 -61
- package/dist/components/widget/TradeParameters/state/bridgePreferences/useBridgePreferences.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/constants.js +5 -8
- package/dist/components/widget/TradeParameters/state/constants.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/degenModeParamAtom.js +7 -19
- package/dist/components/widget/TradeParameters/state/degenModeParamAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/deltaParamActionsAtom.js +9 -9
- package/dist/components/widget/TradeParameters/state/deltaParamActionsAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/deltaParamAtom.js +8 -12
- package/dist/components/widget/TradeParameters/state/deltaParamAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/eip1559ParamAtom.js +7 -10
- package/dist/components/widget/TradeParameters/state/eip1559ParamAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/gasPresetParamAtom.js +9 -14
- package/dist/components/widget/TradeParameters/state/gasPresetParamAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/slippageParamAtom.js +10 -15
- package/dist/components/widget/TradeParameters/state/slippageParamAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/tradePreferencesAtom.js +23 -30
- package/dist/components/widget/TradeParameters/state/tradePreferencesAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/useTempTradeParameters.js +97 -261
- package/dist/components/widget/TradeParameters/useTempTradeParameters.js.map +1 -1
- package/dist/components/widget/TransactionDetails/LimitOrderDetails/Controls.js +93 -160
- package/dist/components/widget/TransactionDetails/LimitOrderDetails/Controls.js.map +1 -1
- package/dist/components/widget/TransactionDetails/LimitOrderDetails/TransactionDetails.js +49 -84
- package/dist/components/widget/TransactionDetails/LimitOrderDetails/TransactionDetails.js.map +1 -1
- package/dist/components/widget/TransactionDetails/LimitOrderDetails/utils.js +69 -80
- package/dist/components/widget/TransactionDetails/LimitOrderDetails/utils.js.map +1 -1
- package/dist/components/widget/TransactionDetails/TransactionListItem.js +172 -385
- package/dist/components/widget/TransactionDetails/TransactionListItem.js.map +1 -1
- package/dist/components/widget/TransactionDetails/utils.js +44 -75
- package/dist/components/widget/TransactionDetails/utils.js.map +1 -1
- package/dist/components/widget/Twap/CustomDurationDrawer.d.ts +3 -2
- package/dist/components/widget/Twap/CustomDurationDrawer.d.ts.map +1 -1
- package/dist/components/widget/Twap/CustomDurationDrawer.js +150 -233
- package/dist/components/widget/Twap/CustomDurationDrawer.js.map +1 -1
- package/dist/components/widget/Twap/OrderDuration.d.ts +9 -0
- package/dist/components/widget/Twap/OrderDuration.d.ts.map +1 -1
- package/dist/components/widget/Twap/OrderDuration.js +90 -142
- package/dist/components/widget/Twap/OrderDuration.js.map +1 -1
- package/dist/components/widget/Twap/OrderSplit.js +38 -55
- package/dist/components/widget/Twap/OrderSplit.js.map +1 -1
- package/dist/components/widget/Twap/RateProtection.js +40 -55
- package/dist/components/widget/Twap/RateProtection.js.map +1 -1
- package/dist/components/widget/Twap/TwapDetailWithTooltip.js +19 -31
- package/dist/components/widget/Twap/TwapDetailWithTooltip.js.map +1 -1
- package/dist/components/widget/Warning/InsufficientBalanceMessage.js +13 -24
- package/dist/components/widget/Warning/InsufficientBalanceMessage.js.map +1 -1
- package/dist/components/widget/Warning/Warning.js +57 -150
- package/dist/components/widget/Warning/Warning.js.map +1 -1
- package/dist/components/widget/Warning/WarningMessage.js +17 -34
- package/dist/components/widget/Warning/WarningMessage.js.map +1 -1
- package/dist/components/widget/WrapEth/WrapEthContent.js +86 -164
- package/dist/components/widget/WrapEth/WrapEthContent.js.map +1 -1
- package/dist/components/widget/WrapEth/WrapEthDrawerButton.js +64 -156
- package/dist/components/widget/WrapEth/WrapEthDrawerButton.js.map +1 -1
- package/dist/components/widget/WrapEth/hooks/useSubmitDepositTxMutation.js +91 -121
- package/dist/components/widget/WrapEth/hooks/useSubmitDepositTxMutation.js.map +1 -1
- package/dist/components/widget/WrapEth/hooks/useWrapEthProps.js +60 -157
- package/dist/components/widget/WrapEth/hooks/useWrapEthProps.js.map +1 -1
- package/dist/components/widget/YouGet/YouGet.js +94 -156
- package/dist/components/widget/YouGet/YouGet.js.map +1 -1
- package/dist/core/ConnectWalletDrawerButton.js +47 -112
- package/dist/core/ConnectWalletDrawerButton.js.map +1 -1
- package/dist/core/LimitOrderButton.js +68 -160
- package/dist/core/LimitOrderButton.js.map +1 -1
- package/dist/core/LimitOrderDetails.js +13 -22
- package/dist/core/LimitOrderDetails.js.map +1 -1
- package/dist/core/OtcOrderButton.js +72 -156
- package/dist/core/OtcOrderButton.js.map +1 -1
- package/dist/core/OtcOrderDetails.js +13 -22
- package/dist/core/OtcOrderDetails.js.map +1 -1
- package/dist/core/Toaster.js +19 -22
- package/dist/core/Toaster.js.map +1 -1
- package/dist/core/TradeFlowScreenButton.js +119 -258
- package/dist/core/TradeFlowScreenButton.js.map +1 -1
- package/dist/core/TwapDetails.js +13 -22
- package/dist/core/TwapDetails.js.map +1 -1
- package/dist/core/Updaters.js +34 -70
- package/dist/core/Updaters.js.map +1 -1
- package/dist/core/Warnings.d.ts +1 -1
- package/dist/core/Warnings.d.ts.map +1 -1
- package/dist/core/Warnings.js +209 -384
- package/dist/core/Warnings.js.map +1 -1
- package/dist/core/across/isCrosschainPossible.js +24 -39
- package/dist/core/across/isCrosschainPossible.js.map +1 -1
- package/dist/core/across/utils.js +18 -37
- package/dist/core/across/utils.js.map +1 -1
- package/dist/core/button/hooks/useWidgetButtonExtraProps.d.ts.map +1 -1
- package/dist/core/button/hooks/useWidgetButtonExtraProps.js +173 -448
- package/dist/core/button/hooks/useWidgetButtonExtraProps.js.map +1 -1
- package/dist/core/constants.js +14 -23
- package/dist/core/constants.js.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +590 -1398
- package/dist/core/index.js.map +1 -1
- package/dist/core/inputs/hooks/useMaxButtonProps.js +75 -145
- package/dist/core/inputs/hooks/useMaxButtonProps.js.map +1 -1
- package/dist/core/inputs/hooks/useTokenFromInputProps.js +167 -452
- package/dist/core/inputs/hooks/useTokenFromInputProps.js.map +1 -1
- package/dist/core/inputs/hooks/useTokenSwitcherProps.js +17 -35
- package/dist/core/inputs/hooks/useTokenSwitcherProps.js.map +1 -1
- package/dist/core/inputs/hooks/useTokenToInputProps.js +149 -387
- package/dist/core/inputs/hooks/useTokenToInputProps.js.map +1 -1
- package/dist/core/inputs/hooks/useWarningMessage.js +28 -69
- package/dist/core/inputs/hooks/useWarningMessage.js.map +1 -1
- package/dist/core/inputs/hooks/utils.js +24 -39
- package/dist/core/inputs/hooks/utils.js.map +1 -1
- package/dist/core/inputs/state/common.d.ts.map +1 -1
- package/dist/core/inputs/state/common.js +141 -171
- package/dist/core/inputs/state/common.js.map +1 -1
- package/dist/core/inputs/state/inputAmountAtom.js +13 -19
- package/dist/core/inputs/state/inputAmountAtom.js.map +1 -1
- package/dist/core/inputs/state/selectedTokenActionsAtom.js +138 -248
- package/dist/core/inputs/state/selectedTokenActionsAtom.js.map +1 -1
- package/dist/core/inputs/state/selectedTokenAtom.js +14 -23
- package/dist/core/inputs/state/selectedTokenAtom.js.map +1 -1
- package/dist/core/inputs/state/setTokenByAddressAtom.js +171 -303
- package/dist/core/inputs/state/setTokenByAddressAtom.js.map +1 -1
- package/dist/core/inputs/state/subscriptions.js +14 -19
- package/dist/core/inputs/state/subscriptions.js.map +1 -1
- package/dist/core/limit/state/constants.js +28 -24
- package/dist/core/limit/state/constants.js.map +1 -1
- package/dist/core/limit/state/currentLimitInputAtom.js +6 -5
- package/dist/core/limit/state/currentLimitInputAtom.js.map +1 -1
- package/dist/core/limit/state/deadlineAtom.js +12 -24
- package/dist/core/limit/state/deadlineAtom.js.map +1 -1
- package/dist/core/limit/state/isCrosschainAtom.js +9 -11
- package/dist/core/limit/state/isCrosschainAtom.js.map +1 -1
- package/dist/core/limit/state/isLimitPriceLockedAtom.js +6 -5
- package/dist/core/limit/state/isLimitPriceLockedAtom.js.map +1 -1
- package/dist/core/limit/state/isLimitPriceReversedAtom.js +6 -5
- package/dist/core/limit/state/isLimitPriceReversedAtom.js.map +1 -1
- package/dist/core/limit/state/limitInputActionsAtom.js +41 -77
- package/dist/core/limit/state/limitInputActionsAtom.js.map +1 -1
- package/dist/core/limit/state/limitInputAmountAtom.js +18 -27
- package/dist/core/limit/state/limitInputAmountAtom.js.map +1 -1
- package/dist/core/limit/state/limitTokenAtoms.js +9 -16
- package/dist/core/limit/state/limitTokenAtoms.js.map +1 -1
- package/dist/core/limit/state/receiverAddressAtom.js +18 -39
- package/dist/core/limit/state/receiverAddressAtom.js.map +1 -1
- package/dist/core/limit/state/selectedTokenActionsAtom.js +86 -160
- package/dist/core/limit/state/selectedTokenActionsAtom.js.map +1 -1
- package/dist/core/limit/state/selectedTokenAtom.js +38 -57
- package/dist/core/limit/state/selectedTokenAtom.js.map +1 -1
- package/dist/core/limit/state/utils.js +89 -101
- package/dist/core/limit/state/utils.js.map +1 -1
- package/dist/core/limit/useLimitDetailsListProps.js +38 -67
- package/dist/core/limit/useLimitDetailsListProps.js.map +1 -1
- package/dist/core/limit/useLimitNotSupported.js +11 -22
- package/dist/core/limit/useLimitNotSupported.js.map +1 -1
- package/dist/core/limit/useLimitPriceDifference.js +25 -50
- package/dist/core/limit/useLimitPriceDifference.js.map +1 -1
- package/dist/core/limit/useLimitPriceInputProps.js +43 -117
- package/dist/core/limit/useLimitPriceInputProps.js.map +1 -1
- package/dist/core/limit/useLimitRate.js +121 -288
- package/dist/core/limit/useLimitRate.js.map +1 -1
- package/dist/core/limit/useLimitTokenFromInputProps.js +144 -389
- package/dist/core/limit/useLimitTokenFromInputProps.js.map +1 -1
- package/dist/core/limit/useLimitTokenSwitcherProps.js +24 -60
- package/dist/core/limit/useLimitTokenSwitcherProps.js.map +1 -1
- package/dist/core/limit/useLimitTokenToInputProps.js +126 -351
- package/dist/core/limit/useLimitTokenToInputProps.js.map +1 -1
- package/dist/core/logger.js +25 -37
- package/dist/core/logger.js.map +1 -1
- package/dist/core/otc/state/currentOtcInputAtom.js +6 -5
- package/dist/core/otc/state/currentOtcInputAtom.js.map +1 -1
- package/dist/core/otc/state/deadlineAtom.js +12 -24
- package/dist/core/otc/state/deadlineAtom.js.map +1 -1
- package/dist/core/otc/state/isOtcPriceLockedAtom.js +6 -5
- package/dist/core/otc/state/isOtcPriceLockedAtom.js.map +1 -1
- package/dist/core/otc/state/isOtcPriceReversedAtom.js +6 -5
- package/dist/core/otc/state/isOtcPriceReversedAtom.js.map +1 -1
- package/dist/core/otc/state/otcInputActionsAtom.js +41 -77
- package/dist/core/otc/state/otcInputActionsAtom.js.map +1 -1
- package/dist/core/otc/state/otcInputAmountAtom.js +18 -27
- package/dist/core/otc/state/otcInputAmountAtom.js.map +1 -1
- package/dist/core/otc/state/receiverAddressAtom.js +18 -39
- package/dist/core/otc/state/receiverAddressAtom.js.map +1 -1
- package/dist/core/otc/state/selectedTokenActionsAtom.js +34 -79
- package/dist/core/otc/state/selectedTokenActionsAtom.js.map +1 -1
- package/dist/core/otc/state/selectedTokenAtom.js +13 -23
- package/dist/core/otc/state/selectedTokenAtom.js.map +1 -1
- package/dist/core/otc/useOtcDetailsListProps.js +38 -67
- package/dist/core/otc/useOtcDetailsListProps.js.map +1 -1
- package/dist/core/otc/useOtcNotSupported.js +11 -22
- package/dist/core/otc/useOtcNotSupported.js.map +1 -1
- package/dist/core/otc/useOtcPriceDifference.js +25 -50
- package/dist/core/otc/useOtcPriceDifference.js.map +1 -1
- package/dist/core/otc/useOtcPriceInputProps.js +48 -136
- package/dist/core/otc/useOtcPriceInputProps.js.map +1 -1
- package/dist/core/otc/useOtcTokenFromInputProps.js +144 -389
- package/dist/core/otc/useOtcTokenFromInputProps.js.map +1 -1
- package/dist/core/otc/useOtcTokenSwitcherProps.js +21 -50
- package/dist/core/otc/useOtcTokenSwitcherProps.js.map +1 -1
- package/dist/core/otc/useOtcTokenToInputProps.js +71 -177
- package/dist/core/otc/useOtcTokenToInputProps.js.map +1 -1
- package/dist/core/screen/hooks/useInitialValue.js +8 -7
- package/dist/core/screen/hooks/useInitialValue.js.map +1 -1
- package/dist/core/screen/hooks/useOnClickOutside.js +16 -33
- package/dist/core/screen/hooks/useOnClickOutside.js.map +1 -1
- package/dist/core/screen/hooks/useResizeObserver.js +18 -34
- package/dist/core/screen/hooks/useResizeObserver.js.map +1 -1
- package/dist/core/screen/hooks/useRunOnMount.js +11 -26
- package/dist/core/screen/hooks/useRunOnMount.js.map +1 -1
- package/dist/core/screen/screenByType.js +16 -16
- package/dist/core/screen/screenByType.js.map +1 -1
- package/dist/core/screen/state/hooks/useScreen.js +13 -23
- package/dist/core/screen/state/hooks/useScreen.js.map +1 -1
- package/dist/core/screen/state/hooks/useScreenValue.js +21 -40
- package/dist/core/screen/state/hooks/useScreenValue.js.map +1 -1
- package/dist/core/screen/state/hooks/useSetScreen.js +56 -111
- package/dist/core/screen/state/hooks/useSetScreen.js.map +1 -1
- package/dist/core/screen/state/screenAtom.js +8 -9
- package/dist/core/screen/state/screenAtom.js.map +1 -1
- package/dist/core/state/apiConfigAtom.js +14 -19
- package/dist/core/state/apiConfigAtom.js.map +1 -1
- package/dist/core/state/chainToAtom.js +51 -88
- package/dist/core/state/chainToAtom.js.map +1 -1
- package/dist/core/state/configActionsAtom.js +21 -40
- package/dist/core/state/configActionsAtom.js.map +1 -1
- package/dist/core/state/configAtom.js +38 -44
- package/dist/core/state/configAtom.js.map +1 -1
- package/dist/core/state/configEffectAtom.js +37 -60
- package/dist/core/state/configEffectAtom.js.map +1 -1
- package/dist/core/state/containerAtom.js +11 -16
- package/dist/core/state/containerAtom.js.map +1 -1
- package/dist/core/state/currentSwapInputAtom.js +6 -5
- package/dist/core/state/currentSwapInputAtom.js.map +1 -1
- package/dist/core/state/enabledChainsAtom.js +39 -96
- package/dist/core/state/enabledChainsAtom.js.map +1 -1
- package/dist/core/state/enabledTradeModesAtom.js +24 -48
- package/dist/core/state/enabledTradeModesAtom.js.map +1 -1
- package/dist/core/state/externalProviderAtom.js +10 -22
- package/dist/core/state/externalProviderAtom.js.map +1 -1
- package/dist/core/state/getSelectableDestChains.js +22 -32
- package/dist/core/state/getSelectableDestChains.js.map +1 -1
- package/dist/core/state/isCrosschainAtom.js +11 -15
- package/dist/core/state/isCrosschainAtom.js.map +1 -1
- package/dist/core/state/tradeModeAtom.js +11 -16
- package/dist/core/state/tradeModeAtom.js.map +1 -1
- package/dist/core/state/validatedPartnerConfigAtom.js +15 -20
- package/dist/core/state/validatedPartnerConfigAtom.js.map +1 -1
- package/dist/core/state/widgetEventsAtom.js +196 -269
- package/dist/core/state/widgetEventsAtom.js.map +1 -1
- package/dist/core/store.js +7 -14
- package/dist/core/store.js.map +1 -1
- package/dist/core/subscriptions.js +9 -10
- package/dist/core/subscriptions.js.map +1 -1
- package/dist/core/swapDetails/fees.js +35 -40
- package/dist/core/swapDetails/fees.js.map +1 -1
- package/dist/core/swapDetails/maxToPay.js +24 -39
- package/dist/core/swapDetails/maxToPay.js.map +1 -1
- package/dist/core/swapDetails/orderRouting.js +42 -60
- package/dist/core/swapDetails/orderRouting.js.map +1 -1
- package/dist/core/swapDetails/priceImpact.js +31 -39
- package/dist/core/swapDetails/priceImpact.js.map +1 -1
- package/dist/core/swapDetails/useSwapDetailsListProps.js +86 -149
- package/dist/core/swapDetails/useSwapDetailsListProps.js.map +1 -1
- package/dist/core/swapDetails/youGet.js +27 -36
- package/dist/core/swapDetails/youGet.js.map +1 -1
- package/dist/core/twap/state/constants.d.ts +3 -1
- package/dist/core/twap/state/constants.d.ts.map +1 -1
- package/dist/core/twap/state/constants.js +22 -27
- package/dist/core/twap/state/constants.js.map +1 -1
- package/dist/core/twap/state/currentTwapInputAtom.js +6 -5
- package/dist/core/twap/state/currentTwapInputAtom.js.map +1 -1
- package/dist/core/twap/state/isCrosschainAtom.js +11 -15
- package/dist/core/twap/state/isCrosschainAtom.js.map +1 -1
- package/dist/core/twap/state/selectedTokenActionsAtom.d.ts.map +1 -1
- package/dist/core/twap/state/selectedTokenActionsAtom.js +112 -192
- package/dist/core/twap/state/selectedTokenActionsAtom.js.map +1 -1
- package/dist/core/twap/state/twapInputAmountAtom.js +13 -19
- package/dist/core/twap/state/twapInputAmountAtom.js.map +1 -1
- package/dist/core/twap/state/twapParamsAtom.d.ts +2 -1
- package/dist/core/twap/state/twapParamsAtom.d.ts.map +1 -1
- package/dist/core/twap/state/twapParamsAtom.js +17 -29
- package/dist/core/twap/state/twapParamsAtom.js.map +1 -1
- package/dist/core/twap/state/twapReceiverAddressAtom.js +7 -9
- package/dist/core/twap/state/twapReceiverAddressAtom.js.map +1 -1
- package/dist/core/twap/state/twapSideAtom.js +13 -23
- package/dist/core/twap/state/twapSideAtom.js.map +1 -1
- package/dist/core/twap/state/twapTokenAtoms.js +9 -16
- package/dist/core/twap/state/twapTokenAtoms.js.map +1 -1
- package/dist/core/twap/twapDetails/minimumReceiveable.js +31 -42
- package/dist/core/twap/twapDetails/minimumReceiveable.js.map +1 -1
- package/dist/core/twap/useTwapDetailsListProps.js +79 -142
- package/dist/core/twap/useTwapDetailsListProps.js.map +1 -1
- package/dist/core/twap/useTwapTokenFromInputProps.js +162 -452
- package/dist/core/twap/useTwapTokenFromInputProps.js.map +1 -1
- package/dist/core/twap/useTwapTokenSwitcherProps.js +17 -35
- package/dist/core/twap/useTwapTokenSwitcherProps.js.map +1 -1
- package/dist/core/twap/useTwapTokenToInputProps.d.ts.map +1 -1
- package/dist/core/twap/useTwapTokenToInputProps.js +112 -299
- package/dist/core/twap/useTwapTokenToInputProps.js.map +1 -1
- package/dist/events/effects/formInput.js +35 -69
- package/dist/events/effects/formInput.js.map +1 -1
- package/dist/events/effects/price.js +35 -50
- package/dist/events/effects/price.js.map +1 -1
- package/dist/events/effects/swapMode.js +40 -45
- package/dist/events/effects/swapMode.js.map +1 -1
- package/dist/events/getters/limit.js +32 -39
- package/dist/events/getters/limit.js.map +1 -1
- package/dist/events/getters/otc.js +31 -37
- package/dist/events/getters/otc.js.map +1 -1
- package/dist/events/getters/settings.js +21 -27
- package/dist/events/getters/settings.js.map +1 -1
- package/dist/events/getters/swap.js +48 -56
- package/dist/events/getters/swap.js.map +1 -1
- package/dist/events/getters/twap.js +53 -67
- package/dist/events/getters/twap.js.map +1 -1
- package/dist/events/getters/widgetState.js +36 -42
- package/dist/events/getters/widgetState.js.map +1 -1
- package/dist/events/hooks/useActivateEffects.js +8 -10
- package/dist/events/hooks/useActivateEffects.js.map +1 -1
- package/dist/events/hooks/useOnPriceUpdates.js +48 -114
- package/dist/events/hooks/useOnPriceUpdates.js.map +1 -1
- package/dist/events/hooks/useOnWalletConnect.js +30 -66
- package/dist/events/hooks/useOnWalletConnect.js.map +1 -1
- package/dist/external/.pnpm/vaul@1.1.2_patch_hash_07b36ba5def3805dde9d543a880ba9e4caf55e5eb58e544faaa2c186846bf3c1__7f2d7d5ed11750fbec42b3f5689c802d/external/vaul/dist/index.js +910 -1621
- package/dist/external/.pnpm/vaul@1.1.2_patch_hash_07b36ba5def3805dde9d543a880ba9e4caf55e5eb58e544faaa2c186846bf3c1__7f2d7d5ed11750fbec42b3f5689c802d/external/vaul/dist/index.js.map +1 -1
- package/dist/hooks/batch/useAwaitCalls.js +27 -56
- package/dist/hooks/batch/useAwaitCalls.js.map +1 -1
- package/dist/hooks/batch/useBatchWithApproveTxs.js +53 -91
- package/dist/hooks/batch/useBatchWithApproveTxs.js.map +1 -1
- package/dist/hooks/batch/useCanBatchTxs.js +36 -73
- package/dist/hooks/batch/useCanBatchTxs.js.map +1 -1
- package/dist/hooks/batch/useSendBatchTx.js +42 -86
- package/dist/hooks/batch/useSendBatchTx.js.map +1 -1
- package/dist/hooks/connectors/useIsConnectedSafe.js +14 -23
- package/dist/hooks/connectors/useIsConnectedSafe.js.map +1 -1
- package/dist/hooks/connectors/useIsGnosisSafeConnector.js +14 -25
- package/dist/hooks/connectors/useIsGnosisSafeConnector.js.map +1 -1
- package/dist/hooks/connectors/useIsSafeThroughWalletConnect.js +30 -73
- package/dist/hooks/connectors/useIsSafeThroughWalletConnect.js.map +1 -1
- package/dist/hooks/gas/config.js +42 -41
- package/dist/hooks/gas/config.js.map +1 -1
- package/dist/hooks/gas/useGasPrices.js +71 -115
- package/dist/hooks/gas/useGasPrices.js.map +1 -1
- package/dist/hooks/gas/utils.js +11 -10
- package/dist/hooks/gas/utils.js.map +1 -1
- package/dist/hooks/getCode/query.js +19 -28
- package/dist/hooks/getCode/query.js.map +1 -1
- package/dist/hooks/getCode/useIsAccountContract.js +16 -35
- package/dist/hooks/getCode/useIsAccountContract.js.map +1 -1
- package/dist/hooks/getCode/useIsContractAtAddress.js +29 -61
- package/dist/hooks/getCode/useIsContractAtAddress.js.map +1 -1
- package/dist/hooks/otc/mutations/useCancelLimitOrder.js +164 -386
- package/dist/hooks/otc/mutations/useCancelLimitOrder.js.map +1 -1
- package/dist/hooks/otc/mutations/useCreateLimitOrder.js +57 -117
- package/dist/hooks/otc/mutations/useCreateLimitOrder.js.map +1 -1
- package/dist/hooks/otc/mutations/useFillOrder.js +28 -92
- package/dist/hooks/otc/mutations/useFillOrder.js.map +1 -1
- package/dist/hooks/otc/mutations/utils.js +7 -6
- package/dist/hooks/otc/mutations/utils.js.map +1 -1
- package/dist/hooks/otc/queries/useLimitOrderRequiredBalance.js +74 -160
- package/dist/hooks/otc/queries/useLimitOrderRequiredBalance.js.map +1 -1
- package/dist/hooks/otc/queries/useLimitOrders.js +78 -205
- package/dist/hooks/otc/queries/useLimitOrders.js.map +1 -1
- package/dist/hooks/otc/queries/utils.js +17 -7
- package/dist/hooks/otc/queries/utils.js.map +1 -1
- package/dist/hooks/otc/tradeFlow/useFillOtcOrderFlow.js +297 -464
- package/dist/hooks/otc/tradeFlow/useFillOtcOrderFlow.js.map +1 -1
- package/dist/hooks/otc/tradeFlow/useFillOtcOrderStep.js +54 -128
- package/dist/hooks/otc/tradeFlow/useFillOtcOrderStep.js.map +1 -1
- package/dist/hooks/otc/tradeFlow/useOtcOrderFlow.js +251 -389
- package/dist/hooks/otc/tradeFlow/useOtcOrderFlow.js.map +1 -1
- package/dist/hooks/otc/tradeFlow/useOtcOrderStep.js +53 -126
- package/dist/hooks/otc/tradeFlow/useOtcOrderStep.js.map +1 -1
- package/dist/hooks/permit/hooks/common/useSignArbitraryTypedData.js +34 -97
- package/dist/hooks/permit/hooks/common/useSignArbitraryTypedData.js.map +1 -1
- package/dist/hooks/permit/hooks/common/useSignPermit.js +32 -91
- package/dist/hooks/permit/hooks/common/useSignPermit.js.map +1 -1
- package/dist/hooks/permit/hooks/common/useWalletSupportsPermit.js +14 -39
- package/dist/hooks/permit/hooks/common/useWalletSupportsPermit.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useGetPermitInfo.js +46 -89
- package/dist/hooks/permit/hooks/permit1/useGetPermitInfo.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useGetSafePermitInfo.js +45 -117
- package/dist/hooks/permit/hooks/permit1/useGetSafePermitInfo.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/usePermit1Nonce.js +110 -141
- package/dist/hooks/permit/hooks/permit1/usePermit1Nonce.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useSignTokenPermit1.js +142 -332
- package/dist/hooks/permit/hooks/permit1/useSignTokenPermit1.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useTokenFromPermit1Nonce.js +24 -57
- package/dist/hooks/permit/hooks/permit1/useTokenFromPermit1Nonce.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useTokenFromPermitInfo.js +22 -51
- package/dist/hooks/permit/hooks/permit1/useTokenFromPermitInfo.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useTryToSignPermit1.js +48 -103
- package/dist/hooks/permit/hooks/permit1/useTryToSignPermit1.js.map +1 -1
- package/dist/hooks/permit/hooks/permit2/usePermit2Allowance.js +44 -102
- package/dist/hooks/permit/hooks/permit2/usePermit2Allowance.js.map +1 -1
- package/dist/hooks/permit/hooks/permit2/usePermit2TransferFromNonce.js +91 -139
- package/dist/hooks/permit/hooks/permit2/usePermit2TransferFromNonce.js.map +1 -1
- package/dist/hooks/permit/hooks/permit2/useSignTokenPermit2TransferFrom.js +119 -286
- package/dist/hooks/permit/hooks/permit2/useSignTokenPermit2TransferFrom.js.map +1 -1
- package/dist/hooks/permit/hooks/permit2/useTokenFromPermit2Allowance.js +10 -20
- package/dist/hooks/permit/hooks/permit2/useTokenFromPermit2Allowance.js.map +1 -1
- package/dist/hooks/permit/hooks/permit2/useTokenFromPermit2TransferFromNonce.js +22 -53
- package/dist/hooks/permit/hooks/permit2/useTokenFromPermit2TransferFromNonce.js.map +1 -1
- package/dist/hooks/permit/utils/abi.js +432 -366
- package/dist/hooks/permit/utils/abi.js.map +1 -1
- package/dist/hooks/permit/utils/constants.js +229 -217
- package/dist/hooks/permit/utils/constants.js.map +1 -1
- package/dist/hooks/permit/utils/construct.js +178 -214
- package/dist/hooks/permit/utils/construct.js.map +1 -1
- package/dist/hooks/permit/utils/deadlines.js +9 -7
- package/dist/hooks/permit/utils/deadlines.js.map +1 -1
- package/dist/hooks/permit/utils/detect.js +181 -228
- package/dist/hooks/permit/utils/detect.js.map +1 -1
- package/dist/hooks/permit/utils/domainSeparator.js +123 -200
- package/dist/hooks/permit/utils/domainSeparator.js.map +1 -1
- package/dist/hooks/permit/utils/encodeArgs.js +47 -44
- package/dist/hooks/permit/utils/encodeArgs.js.map +1 -1
- package/dist/hooks/permit/utils/trySignPermit1.js +222 -269
- package/dist/hooks/permit/utils/trySignPermit1.js.map +1 -1
- package/dist/hooks/permit/utils/utils.js +24 -31
- package/dist/hooks/permit/utils/utils.js.map +1 -1
- package/dist/hooks/sdk/useGetContracts.js +11 -22
- package/dist/hooks/sdk/useGetContracts.js.map +1 -1
- package/dist/hooks/sdk/useSpender.js +14 -31
- package/dist/hooks/sdk/useSpender.js.map +1 -1
- package/dist/hooks/swap/prices/constants.js +7 -6
- package/dist/hooks/swap/prices/constants.js.map +1 -1
- package/dist/hooks/swap/prices/delta/bridge/const.js +11 -11
- package/dist/hooks/swap/prices/delta/bridge/const.js.map +1 -1
- package/dist/hooks/swap/prices/delta/bridge/useSelectedBridgePrice.js +19 -34
- package/dist/hooks/swap/prices/delta/bridge/useSelectedBridgePrice.js.map +1 -1
- package/dist/hooks/swap/prices/delta/bridge/utils.js +24 -33
- package/dist/hooks/swap/prices/delta/bridge/utils.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/twap/useCreatePreSignableTwapOrder.js +40 -84
- package/dist/hooks/swap/prices/delta/mutations/twap/useCreatePreSignableTwapOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/twap/useCreateTwapOrder.js +75 -162
- package/dist/hooks/swap/prices/delta/mutations/twap/useCreateTwapOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/twap/useDepositAndSubmitTwapOrder.js +119 -276
- package/dist/hooks/swap/prices/delta/mutations/twap/useDepositAndSubmitTwapOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/twap/usePostTwapOrder.js +40 -87
- package/dist/hooks/swap/prices/delta/mutations/twap/usePostTwapOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/twap/usePreSignAndSubmitTwapOrder.js +133 -323
- package/dist/hooks/swap/prices/delta/mutations/twap/usePreSignAndSubmitTwapOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/twap/useTwapOrderToPost.js +37 -85
- package/dist/hooks/swap/prices/delta/mutations/twap/useTwapOrderToPost.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useCancelDeltaOrders.js +49 -114
- package/dist/hooks/swap/prices/delta/mutations/useCancelDeltaOrders.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useCancelDeltaOrdersEvents.js +60 -101
- package/dist/hooks/swap/prices/delta/mutations/useCancelDeltaOrdersEvents.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useCancelOrWithdrawAndCancelDeltaOrder.js +97 -282
- package/dist/hooks/swap/prices/delta/mutations/useCancelOrWithdrawAndCancelDeltaOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useCreateDeltaOrder.js +75 -162
- package/dist/hooks/swap/prices/delta/mutations/useCreateDeltaOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useCreatePreSignableDeltaOrder.js +41 -85
- package/dist/hooks/swap/prices/delta/mutations/useCreatePreSignableDeltaOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useDeltaOrderToPost.js +37 -85
- package/dist/hooks/swap/prices/delta/mutations/useDeltaOrderToPost.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useIsDeltaOrderCancellable.js +24 -67
- package/dist/hooks/swap/prices/delta/mutations/useIsDeltaOrderCancellable.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/usePostDeltaOrder.js +40 -86
- package/dist/hooks/swap/prices/delta/mutations/usePostDeltaOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useSendDepositPreSignDeltaOrderTx.js +32 -78
- package/dist/hooks/swap/prices/delta/mutations/useSendDepositPreSignDeltaOrderTx.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useWithdrawAndCancelDeltaOrder.js +120 -272
- package/dist/hooks/swap/prices/delta/mutations/useWithdrawAndCancelDeltaOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/utils.js +43 -61
- package/dist/hooks/swap/prices/delta/mutations/utils.js.map +1 -1
- package/dist/hooks/swap/prices/delta/orders/types.d.ts +18 -3
- package/dist/hooks/swap/prices/delta/orders/types.d.ts.map +1 -1
- package/dist/hooks/swap/prices/delta/orders/unposted/const.js +6 -7
- package/dist/hooks/swap/prices/delta/orders/unposted/const.js.map +1 -1
- package/dist/hooks/swap/prices/delta/orders/unposted/effect.js +17 -25
- package/dist/hooks/swap/prices/delta/orders/unposted/effect.js.map +1 -1
- package/dist/hooks/swap/prices/delta/orders/unposted/index.js +26 -31
- package/dist/hooks/swap/prices/delta/orders/unposted/index.js.map +1 -1
- package/dist/hooks/swap/prices/delta/orders/unposted/storage.js +31 -42
- package/dist/hooks/swap/prices/delta/orders/unposted/storage.js.map +1 -1
- package/dist/hooks/swap/prices/delta/orders/unposted/utils.js +78 -115
- package/dist/hooks/swap/prices/delta/orders/unposted/utils.js.map +1 -1
- package/dist/hooks/swap/prices/delta/orders/utils.d.ts +15 -17
- package/dist/hooks/swap/prices/delta/orders/utils.d.ts.map +1 -1
- package/dist/hooks/swap/prices/delta/orders/utils.js +182 -194
- package/dist/hooks/swap/prices/delta/orders/utils.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/bridgeInfo/bridgeInfosLoadedAtom.js +14 -23
- package/dist/hooks/swap/prices/delta/queries/bridgeInfo/bridgeInfosLoadedAtom.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/bridgeInfo/common.js +7 -7
- package/dist/hooks/swap/prices/delta/queries/bridgeInfo/common.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/bridgeInfo/getBridgeInfoQueryData.js +9 -10
- package/dist/hooks/swap/prices/delta/queries/bridgeInfo/getBridgeInfoQueryData.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/bridgeInfo/useBridgeInfo.js +29 -79
- package/dist/hooks/swap/prices/delta/queries/bridgeInfo/useBridgeInfo.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/bridgeProtocols/useBridgeProtocols.js +28 -73
- package/dist/hooks/swap/prices/delta/queries/bridgeProtocols/useBridgeProtocols.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/errors.js +21 -26
- package/dist/hooks/swap/prices/delta/queries/errors.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useDeltaLimitOrderRequiredBalance.js +73 -159
- package/dist/hooks/swap/prices/delta/queries/useDeltaLimitOrderRequiredBalance.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useDeltaOrderPreConditions.js +130 -254
- package/dist/hooks/swap/prices/delta/queries/useDeltaOrderPreConditions.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useDeltaOrders.js +49 -130
- package/dist/hooks/swap/prices/delta/queries/useDeltaOrders.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useDeltaPriceQuery.d.ts +1 -1
- package/dist/hooks/swap/prices/delta/queries/useDeltaPriceQuery.js +129 -201
- package/dist/hooks/swap/prices/delta/queries/useDeltaPriceQuery.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useIsTokenSupportedInDelta.js +34 -86
- package/dist/hooks/swap/prices/delta/queries/useIsTokenSupportedInDelta.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useWatchDeltaOrder.d.ts +3 -2
- package/dist/hooks/swap/prices/delta/queries/useWatchDeltaOrder.d.ts.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useWatchDeltaOrder.js +109 -220
- package/dist/hooks/swap/prices/delta/queries/useWatchDeltaOrder.js.map +1 -1
- package/dist/hooks/swap/prices/factory.js +21 -33
- package/dist/hooks/swap/prices/factory.js.map +1 -1
- package/dist/hooks/swap/prices/market/mutations/useBuildTx.js +20 -53
- package/dist/hooks/swap/prices/market/mutations/useBuildTx.js.map +1 -1
- package/dist/hooks/swap/prices/market/mutations/useSendMarketSwapTx.js +37 -86
- package/dist/hooks/swap/prices/market/mutations/useSendMarketSwapTx.js.map +1 -1
- package/dist/hooks/swap/prices/market/queries/errors.js +11 -13
- package/dist/hooks/swap/prices/market/queries/errors.js.map +1 -1
- package/dist/hooks/swap/prices/market/queries/useMarketPriceQuery.js +136 -197
- package/dist/hooks/swap/prices/market/queries/useMarketPriceQuery.js.map +1 -1
- package/dist/hooks/swap/prices/market/queries/useSpenderAndContracts.js +39 -115
- package/dist/hooks/swap/prices/market/queries/useSpenderAndContracts.js.map +1 -1
- package/dist/hooks/swap/prices/usePricesParams.js +56 -166
- package/dist/hooks/swap/prices/usePricesParams.js.map +1 -1
- package/dist/hooks/swap/prices/useSwapPrices.js +172 -496
- package/dist/hooks/swap/prices/useSwapPrices.js.map +1 -1
- package/dist/hooks/swap/prices/useTokenInputsFromPrice.js +28 -75
- package/dist/hooks/swap/prices/useTokenInputsFromPrice.js.map +1 -1
- package/dist/hooks/swap/prices/useTokenInputsFromTwapPrice.js +28 -70
- package/dist/hooks/swap/prices/useTokenInputsFromTwapPrice.js.map +1 -1
- package/dist/hooks/swap/prices/useTwapPrices.d.ts +2 -1
- package/dist/hooks/swap/prices/useTwapPrices.d.ts.map +1 -1
- package/dist/hooks/swap/prices/useTwapPrices.js +95 -251
- package/dist/hooks/swap/prices/useTwapPrices.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/errors.js +19 -26
- package/dist/hooks/swap/tradeFlow/common/errors.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/factory/depositAndSubmitOrderFactory.js +53 -69
- package/dist/hooks/swap/tradeFlow/common/factory/depositAndSubmitOrderFactory.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/factory/preSignAndSubmitOrderFactory.js +57 -92
- package/dist/hooks/swap/tradeFlow/common/factory/preSignAndSubmitOrderFactory.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useApproveOrPermit.js +139 -358
- package/dist/hooks/swap/tradeFlow/common/useApproveOrPermit.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useApproveOrPermitEvents.js +126 -221
- package/dist/hooks/swap/tradeFlow/common/useApproveOrPermitEvents.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useBatchWrapAndApprove.js +193 -324
- package/dist/hooks/swap/tradeFlow/common/useBatchWrapAndApprove.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useConstructGasParams.js +39 -81
- package/dist/hooks/swap/tradeFlow/common/useConstructGasParams.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useDepositAndSubmitDeltaOrder.js +119 -276
- package/dist/hooks/swap/tradeFlow/common/useDepositAndSubmitDeltaOrder.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/usePreSignAndSubmitDeltaOrder.js +142 -354
- package/dist/hooks/swap/tradeFlow/common/usePreSignAndSubmitDeltaOrder.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useRequiredAllowanceForOrders.js +30 -86
- package/dist/hooks/swap/tradeFlow/common/useRequiredAllowanceForOrders.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useSignPermit1Or2.js +153 -355
- package/dist/hooks/swap/tradeFlow/common/useSignPermit1Or2.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/utils.js +20 -20
- package/dist/hooks/swap/tradeFlow/common/utils.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useDeltaFlow.js +408 -636
- package/dist/hooks/swap/tradeFlow/useDeltaFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useDeltaSwapStep.js +87 -235
- package/dist/hooks/swap/tradeFlow/useDeltaSwapStep.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.js +306 -436
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useLimitOrderStep.js +53 -123
- package/dist/hooks/swap/tradeFlow/useLimitOrderStep.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useMarketFlow.js +435 -658
- package/dist/hooks/swap/tradeFlow/useMarketFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useMarketSwapStep.js +88 -231
- package/dist/hooks/swap/tradeFlow/useMarketSwapStep.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useTwapFlow.d.ts +0 -3
- package/dist/hooks/swap/tradeFlow/useTwapFlow.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/useTwapFlow.js +365 -616
- package/dist/hooks/swap/tradeFlow/useTwapFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useTwapSwapStep.js +82 -223
- package/dist/hooks/swap/tradeFlow/useTwapSwapStep.js.map +1 -1
- package/dist/hooks/tokens/allowance/useGenericTokenAllowance.js +87 -140
- package/dist/hooks/tokens/allowance/useGenericTokenAllowance.js.map +1 -1
- package/dist/hooks/tokens/allowance/useTokenAllowance.js +28 -75
- package/dist/hooks/tokens/allowance/useTokenAllowance.js.map +1 -1
- package/dist/hooks/tokens/allowance/utils.js +16 -27
- package/dist/hooks/tokens/allowance/utils.js.map +1 -1
- package/dist/hooks/tokens/balances/queries.js +56 -76
- package/dist/hooks/tokens/balances/queries.js.map +1 -1
- package/dist/hooks/tokens/balances/useAttachTokenBalanceMultichain.js +35 -78
- package/dist/hooks/tokens/balances/useAttachTokenBalanceMultichain.js.map +1 -1
- package/dist/hooks/tokens/balances/useInvalidateTokenData.js +52 -75
- package/dist/hooks/tokens/balances/useInvalidateTokenData.js.map +1 -1
- package/dist/hooks/tokens/balances/useIsInsufficientTokenBalance.js +27 -64
- package/dist/hooks/tokens/balances/useIsInsufficientTokenBalance.js.map +1 -1
- package/dist/hooks/tokens/balances/useIsLimitOrderInsufficientBalance.js +69 -190
- package/dist/hooks/tokens/balances/useIsLimitOrderInsufficientBalance.js.map +1 -1
- package/dist/hooks/tokens/balances/useMultichainTokenBalances.js +40 -77
- package/dist/hooks/tokens/balances/useMultichainTokenBalances.js.map +1 -1
- package/dist/hooks/tokens/balances/useSelectedTokenBalances.js +22 -36
- package/dist/hooks/tokens/balances/useSelectedTokenBalances.js.map +1 -1
- package/dist/hooks/tokens/balances/useTokenBalance.js +95 -252
- package/dist/hooks/tokens/balances/useTokenBalance.js.map +1 -1
- package/dist/hooks/tokens/data/useCombineTokensWithFetched.js +50 -124
- package/dist/hooks/tokens/data/useCombineTokensWithFetched.js.map +1 -1
- package/dist/hooks/tokens/data/useFetchTokens.js +15 -40
- package/dist/hooks/tokens/data/useFetchTokens.js.map +1 -1
- package/dist/hooks/tokens/data/useMultichainTokensData.js +106 -165
- package/dist/hooks/tokens/data/useMultichainTokensData.js.map +1 -1
- package/dist/hooks/tokens/prices/queries.js +50 -74
- package/dist/hooks/tokens/prices/queries.js.map +1 -1
- package/dist/hooks/tokens/prices/useMultichainTokenPrices.js +32 -69
- package/dist/hooks/tokens/prices/useMultichainTokenPrices.js.map +1 -1
- package/dist/hooks/tokens/prices/useTokenPrices.js +48 -115
- package/dist/hooks/tokens/prices/useTokenPrices.js.map +1 -1
- package/dist/hooks/tokens/useAllTokensWithFilter.js +107 -258
- package/dist/hooks/tokens/useAllTokensWithFilter.js.map +1 -1
- package/dist/hooks/tokens/useNativeToken.js +14 -36
- package/dist/hooks/tokens/useNativeToken.js.map +1 -1
- package/dist/hooks/tokens/useTokenTaxFee.js +32 -65
- package/dist/hooks/tokens/useTokenTaxFee.js.map +1 -1
- package/dist/hooks/tokens/useTokensByAddress.js +20 -32
- package/dist/hooks/tokens/useTokensByAddress.js.map +1 -1
- package/dist/hooks/tokens/useTokensFromAcross.js +22 -62
- package/dist/hooks/tokens/useTokensFromAcross.js.map +1 -1
- package/dist/hooks/txs/mutations/useApprove.js +54 -142
- package/dist/hooks/txs/mutations/useApprove.js.map +1 -1
- package/dist/hooks/txs/mutations/useDepositWeth.js +56 -138
- package/dist/hooks/txs/mutations/useDepositWeth.js.map +1 -1
- package/dist/hooks/txs/mutations/useReplaceTx.js +234 -509
- package/dist/hooks/txs/mutations/useReplaceTx.js.map +1 -1
- package/dist/hooks/txs/mutations/useSendTx.js +33 -103
- package/dist/hooks/txs/mutations/useSendTx.js.map +1 -1
- package/dist/hooks/txs/queries/useAccountNonce.js +16 -29
- package/dist/hooks/txs/queries/useAccountNonce.js.map +1 -1
- package/dist/hooks/txs/queries/useAwaitTx.js +62 -169
- package/dist/hooks/txs/queries/useAwaitTx.js.map +1 -1
- package/dist/hooks/txs/queries/useTxFees.js +42 -98
- package/dist/hooks/txs/queries/useTxFees.js.map +1 -1
- package/dist/hooks/txs/queries/useTxHistory.js +71 -121
- package/dist/hooks/txs/queries/useTxHistory.js.map +1 -1
- package/dist/hooks/txs/queries/useTxResponse.js +28 -72
- package/dist/hooks/txs/queries/useTxResponse.js.map +1 -1
- package/dist/hooks/txs/queries/useWalletCanReplaceTx.js +14 -28
- package/dist/hooks/txs/queries/useWalletCanReplaceTx.js.map +1 -1
- package/dist/hooks/txs/queries/utils.js +11 -10
- package/dist/hooks/txs/queries/utils.js.map +1 -1
- package/dist/hooks/useAvailableCrosses.js +35 -73
- package/dist/hooks/useAvailableCrosses.js.map +1 -1
- package/dist/hooks/useBreakpoints.js +10 -20
- package/dist/hooks/useBreakpoints.js.map +1 -1
- package/dist/hooks/useBridgeInfo.js +18 -37
- package/dist/hooks/useBridgeInfo.js.map +1 -1
- package/dist/hooks/useBridgeProtocols.js +19 -32
- package/dist/hooks/useBridgeProtocols.js.map +1 -1
- package/dist/hooks/useCachedQueryError.js +8 -9
- package/dist/hooks/useCachedQueryError.js.map +1 -1
- package/dist/hooks/useChainMatches.js +13 -29
- package/dist/hooks/useChainMatches.js.map +1 -1
- package/dist/hooks/useClickOutside.js +26 -63
- package/dist/hooks/useClickOutside.js.map +1 -1
- package/dist/hooks/useCurrentChain.js +9 -8
- package/dist/hooks/useCurrentChain.js.map +1 -1
- package/dist/hooks/useDebouncedInputState.js +24 -58
- package/dist/hooks/useDebouncedInputState.js.map +1 -1
- package/dist/hooks/useEIP1559Enabled.js +16 -29
- package/dist/hooks/useEIP1559Enabled.js.map +1 -1
- package/dist/hooks/useGlobalDeltaEnabled.js +20 -40
- package/dist/hooks/useGlobalDeltaEnabled.js.map +1 -1
- package/dist/hooks/useIsCrosschainPossible.js +23 -67
- package/dist/hooks/useIsCrosschainPossible.js.map +1 -1
- package/dist/hooks/useMinViemClient.js +47 -105
- package/dist/hooks/useMinViemClient.js.map +1 -1
- package/dist/hooks/usePartner.js +7 -8
- package/dist/hooks/usePartner.js.map +1 -1
- package/dist/hooks/useSDK.js +130 -148
- package/dist/hooks/useSDK.js.map +1 -1
- package/dist/hooks/useSelectableDestChains.js +35 -94
- package/dist/hooks/useSelectableDestChains.js.map +1 -1
- package/dist/hooks/useSlippage.js +20 -45
- package/dist/hooks/useSlippage.js.map +1 -1
- package/dist/hooks/useSwitchChainWithGuard.js +28 -68
- package/dist/hooks/useSwitchChainWithGuard.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/lib/constants/delta.js +16 -18
- package/dist/lib/constants/delta.js.map +1 -1
- package/dist/lib/constants/index.js +5 -9
- package/dist/lib/constants/index.js.map +1 -1
- package/dist/lib/constants/mobile.js +6 -5
- package/dist/lib/constants/mobile.js.map +1 -1
- package/dist/lib/constants/otc.js +11 -5
- package/dist/lib/constants/otc.js.map +1 -1
- package/dist/lib/constants/storage.js +6 -5
- package/dist/lib/constants/storage.js.map +1 -1
- package/dist/lib/constants/time.d.ts +1 -0
- package/dist/lib/constants/time.d.ts.map +1 -1
- package/dist/lib/constants/time.js +5 -6
- package/dist/lib/constants/time.js.map +1 -1
- package/dist/lib/constants/urls.js +16 -26
- package/dist/lib/constants/urls.js.map +1 -1
- package/dist/lib/constants/weth.js +62 -62
- package/dist/lib/constants/weth.js.map +1 -1
- package/dist/lib/ipfs.js +11 -22
- package/dist/lib/ipfs.js.map +1 -1
- package/dist/lib/queryClient.js +40 -60
- package/dist/lib/queryClient.js.map +1 -1
- package/dist/lib/tradeMode.js +16 -8
- package/dist/lib/tradeMode.js.map +1 -1
- package/dist/lib/utils/approval.js +78 -112
- package/dist/lib/utils/approval.js.map +1 -1
- package/dist/lib/utils/atomWithCompare.js +7 -11
- package/dist/lib/utils/atomWithCompare.js.map +1 -1
- package/dist/lib/utils/copyToClipboard.js +11 -12
- package/dist/lib/utils/copyToClipboard.js.map +1 -1
- package/dist/lib/utils/delta.js +52 -74
- package/dist/lib/utils/delta.js.map +1 -1
- package/dist/lib/utils/dexes.js +5 -11
- package/dist/lib/utils/dexes.js.map +1 -1
- package/dist/lib/utils/explorer.js +20 -41
- package/dist/lib/utils/explorer.js.map +1 -1
- package/dist/lib/utils/fee.js +11 -12
- package/dist/lib/utils/fee.js.map +1 -1
- package/dist/lib/utils/formatFiatPrice.js +11 -10
- package/dist/lib/utils/formatFiatPrice.js.map +1 -1
- package/dist/lib/utils/formatPercent.js +9 -8
- package/dist/lib/utils/formatPercent.js.map +1 -1
- package/dist/lib/utils/formatTokenBalance.js +15 -32
- package/dist/lib/utils/formatTokenBalance.js.map +1 -1
- package/dist/lib/utils/index.js +63 -97
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/lib/utils/logger.js +160 -229
- package/dist/lib/utils/logger.js.map +1 -1
- package/dist/lib/utils/metabase.js +25 -25
- package/dist/lib/utils/metabase.js.map +1 -1
- package/dist/lib/utils/mobile.js +7 -8
- package/dist/lib/utils/mobile.js.map +1 -1
- package/dist/lib/utils/price.js +22 -35
- package/dist/lib/utils/price.js.map +1 -1
- package/dist/lib/utils/priceImpact.js +29 -41
- package/dist/lib/utils/priceImpact.js.map +1 -1
- package/dist/lib/utils/providerErrors.js +26 -25
- package/dist/lib/utils/providerErrors.js.map +1 -1
- package/dist/lib/utils/rate.js +14 -16
- package/dist/lib/utils/rate.js.map +1 -1
- package/dist/lib/utils/removeZeroDecimals.js +11 -12
- package/dist/lib/utils/removeZeroDecimals.js.map +1 -1
- package/dist/lib/utils/savedAmountUSD.js +26 -55
- package/dist/lib/utils/savedAmountUSD.js.map +1 -1
- package/dist/lib/utils/scaleFactor.js +11 -10
- package/dist/lib/utils/scaleFactor.js.map +1 -1
- package/dist/lib/utils/slippage.js +12 -11
- package/dist/lib/utils/slippage.js.map +1 -1
- package/dist/lib/utils/theme.js +5 -9
- package/dist/lib/utils/theme.js.map +1 -1
- package/dist/lib/utils/time.js +13 -14
- package/dist/lib/utils/time.js.map +1 -1
- package/dist/lib/utils/toDecimal.js +13 -22
- package/dist/lib/utils/toDecimal.js.map +1 -1
- package/dist/lib/utils/toasts.js +65 -50
- package/dist/lib/utils/toasts.js.map +1 -1
- package/dist/lib/utils/tradeFlow.js +12 -10
- package/dist/lib/utils/tradeFlow.js.map +1 -1
- package/dist/lib/utils/transactionHandlers.js +12 -15
- package/dist/lib/utils/transactionHandlers.js.map +1 -1
- package/dist/lib/utils/tuple.js +10 -12
- package/dist/lib/utils/tuple.js.map +1 -1
- package/dist/lib/utils/twap.js +29 -47
- package/dist/lib/utils/twap.js.map +1 -1
- package/dist/lib/utils/useDateNow.js +7 -5
- package/dist/lib/utils/useDateNow.js.map +1 -1
- package/dist/lib/web3/privy/config.js +15 -36
- package/dist/lib/web3/privy/config.js.map +1 -1
- package/dist/lib/web3/wagmi/config.js +25 -36
- package/dist/lib/web3/wagmi/config.js.map +1 -1
- package/dist/lib/web3/wagmi/constants.js +36 -27
- package/dist/lib/web3/wagmi/constants.js.map +1 -1
- package/dist/lib/web3/wagmi/external.js +27 -32
- package/dist/lib/web3/wagmi/external.js.map +1 -1
- package/dist/lib/web3/wagmi/isInIframe.js +5 -3
- package/dist/lib/web3/wagmi/isInIframe.js.map +1 -1
- package/dist/lib/web3/wagmi/isInsideSafeIframe.js +61 -109
- package/dist/lib/web3/wagmi/isInsideSafeIframe.js.map +1 -1
- package/dist/lib/web3/wagmi/supportedChains.js +2 -0
- package/dist/lib/web3/wagmi/switchChain.js +13 -21
- package/dist/lib/web3/wagmi/switchChain.js.map +1 -1
- package/dist/lib/web3/wagmi/transports.js +18 -20
- package/dist/lib/web3/wagmi/transports.js.map +1 -1
- package/dist/lib/web3/wagmi/utils.js +8 -7
- package/dist/lib/web3/wagmi/utils.js.map +1 -1
- package/dist/styles.css +1 -3506
- package/dist/tokens/blacklist.js +16 -23
- package/dist/tokens/blacklist.js.map +1 -1
- package/dist/tokens/constants.js +20 -23
- package/dist/tokens/constants.js.map +1 -1
- package/dist/tokens/constructor.js +50 -75
- package/dist/tokens/constructor.js.map +1 -1
- package/dist/tokens/defaultTokens.js +203 -207
- package/dist/tokens/defaultTokens.js.map +1 -1
- package/dist/tokens/hooks.js +16 -20
- package/dist/tokens/hooks.js.map +1 -1
- package/dist/tokens/lists/constants.js +13 -30
- package/dist/tokens/lists/constants.js.map +1 -1
- package/dist/tokens/lists/download.js +16 -29
- package/dist/tokens/lists/download.js.map +1 -1
- package/dist/tokens/lists/lists.js +6 -0
- package/dist/tokens/lists/lists.js.map +1 -0
- package/dist/tokens/lists/state/effects.js +26 -30
- package/dist/tokens/lists/state/effects.js.map +1 -1
- package/dist/tokens/lists/state/tokenListsActionsAtom.js +24 -34
- package/dist/tokens/lists/state/tokenListsActionsAtom.js.map +1 -1
- package/dist/tokens/lists/state/tokenListsStateAtom.js +32 -53
- package/dist/tokens/lists/state/tokenListsStateAtom.js.map +1 -1
- package/dist/tokens/lists/utils.js +14 -19
- package/dist/tokens/lists/utils.js.map +1 -1
- package/dist/tokens/overrides.js +86 -173
- package/dist/tokens/overrides.js.map +1 -1
- package/dist/tokens/queries.js +65 -119
- package/dist/tokens/queries.js.map +1 -1
- package/dist/tokens/stabeCoins/hooks.js +17 -36
- package/dist/tokens/stabeCoins/hooks.js.map +1 -1
- package/dist/tokens/stabeCoins/index.js +5 -6
- package/dist/tokens/stabeCoins/index.js.map +1 -1
- package/dist/tokens/state/addImportedTokenAtom.js +55 -71
- package/dist/tokens/state/addImportedTokenAtom.js.map +1 -1
- package/dist/tokens/state/allTokensByChainAtom.js +36 -47
- package/dist/tokens/state/allTokensByChainAtom.js.map +1 -1
- package/dist/tokens/state/constructTokens.js +25 -37
- package/dist/tokens/state/constructTokens.js.map +1 -1
- package/dist/tokens/state/fromListsAtom.js +34 -42
- package/dist/tokens/state/fromListsAtom.js.map +1 -1
- package/dist/tokens/state/importedTokensAtom.js +8 -10
- package/dist/tokens/state/importedTokensAtom.js.map +1 -1
- package/dist/tokens/utils/areTokensSame.js +6 -4
- package/dist/tokens/utils/areTokensSame.js.map +1 -1
- package/dist/tokens/utils/brand.js +8 -7
- package/dist/tokens/utils/brand.js.map +1 -1
- package/dist/tokens/utils/eth.js +9 -12
- package/dist/tokens/utils/eth.js.map +1 -1
- package/dist/tokens/utils/filtering.js +34 -72
- package/dist/tokens/utils/filtering.js.map +1 -1
- package/dist/tokens/utils/sets.js +13 -16
- package/dist/tokens/utils/sets.js.map +1 -1
- package/dist/tokens/utils/sorting.js +33 -51
- package/dist/tokens/utils/sorting.js.map +1 -1
- package/dist/tokens/utils/transferAmountsFromReceipt.js +160 -345
- package/dist/tokens/utils/transferAmountsFromReceipt.js.map +1 -1
- package/dist/transactions/hash.js +15 -30
- package/dist/transactions/hash.js.map +1 -1
- package/dist/transactions/logger.js +6 -5
- package/dist/transactions/logger.js.map +1 -1
- package/dist/transactions/queries/ensureCallsStatus.js +27 -43
- package/dist/transactions/queries/ensureCallsStatus.js.map +1 -1
- package/dist/transactions/queries/ensureEstimateFeesPerGas.js +14 -21
- package/dist/transactions/queries/ensureEstimateFeesPerGas.js.map +1 -1
- package/dist/transactions/queries/ensureTxReceipt.js +49 -85
- package/dist/transactions/queries/ensureTxReceipt.js.map +1 -1
- package/dist/transactions/queries/ensureTxResponse.js +14 -21
- package/dist/transactions/queries/ensureTxResponse.js.map +1 -1
- package/dist/transactions/state/effects/finalize.js +46 -72
- package/dist/transactions/state/effects/finalize.js.map +1 -1
- package/dist/transactions/state/hooks/useActivateEffects.js +8 -10
- package/dist/transactions/state/hooks/useActivateEffects.js.map +1 -1
- package/dist/transactions/state/hooks/useMarkTxAsDropped.js +8 -8
- package/dist/transactions/state/hooks/useMarkTxAsDropped.js.map +1 -1
- package/dist/transactions/state/hooks/useTransactions.js +28 -68
- package/dist/transactions/state/hooks/useTransactions.js.map +1 -1
- package/dist/transactions/state/transactionsActionAtom.js +147 -222
- package/dist/transactions/state/transactionsActionAtom.js.map +1 -1
- package/dist/transactions/state/transactionsAtom.js +23 -58
- package/dist/transactions/state/transactionsAtom.js.map +1 -1
- package/dist/transactions/status.js +7 -11
- package/dist/transactions/status.js.map +1 -1
- package/dist/transactions/utils.js +26 -27
- package/dist/transactions/utils.js.map +1 -1
- package/package.json +11 -9
- package/dist/_virtual/index.js +0 -6
- package/dist/_virtual/index.js.map +0 -1
- package/dist/assets/bridges/canonical-uni.svg.js +0 -12
- package/dist/assets/bridges/canonical-uni.svg.js.map +0 -1
- package/dist/assets/bridges/cctp.svg.js +0 -12
- package/dist/assets/bridges/cctp.svg.js.map +0 -1
- package/dist/assets/bridges/celer.svg.js +0 -16
- package/dist/assets/bridges/celer.svg.js.map +0 -1
- package/dist/assets/bridges/relay.svg.js.map +0 -1
- package/dist/assets/check.svg.js +0 -12
- package/dist/assets/check.svg.js.map +0 -1
- package/dist/assets/chevron.svg.js +0 -12
- package/dist/assets/chevron.svg.js.map +0 -1
- package/dist/assets/circle-check.svg.js +0 -12
- package/dist/assets/circle-check.svg.js.map +0 -1
- package/dist/assets/circle-exclamation.svg.js +0 -12
- package/dist/assets/circle-exclamation.svg.js.map +0 -1
- package/dist/assets/copy.svg.js +0 -12
- package/dist/assets/copy.svg.js.map +0 -1
- package/dist/assets/delta.svg.js +0 -12
- package/dist/assets/delta.svg.js.map +0 -1
- package/dist/assets/ellipse.svg.js +0 -12
- package/dist/assets/ellipse.svg.js.map +0 -1
- package/dist/assets/external-url.svg.js +0 -12
- package/dist/assets/external-url.svg.js.map +0 -1
- package/dist/assets/info.svg.js +0 -12
- package/dist/assets/info.svg.js.map +0 -1
- package/dist/assets/logout.svg.js +0 -12
- package/dist/assets/logout.svg.js.map +0 -1
- package/dist/assets/market.svg.js +0 -12
- package/dist/assets/price-impact.svg.js +0 -12
- package/dist/assets/price-impact.svg.js.map +0 -1
- package/dist/assets/receipt.svg.js +0 -12
- package/dist/assets/receipt.svg.js.map +0 -1
- package/dist/assets/refresh.svg.js +0 -12
- package/dist/assets/refresh.svg.js.map +0 -1
- package/dist/assets/slider.svg.js +0 -12
- package/dist/assets/slider.svg.js.map +0 -1
- package/dist/assets/speedometer.svg.js +0 -12
- package/dist/assets/speedometer.svg.js.map +0 -1
- package/dist/assets/spinner.svg.js +0 -18
- package/dist/assets/spinner.svg.js.map +0 -1
- package/dist/assets/two-dots.svg.js +0 -12
- package/dist/assets/two-dots.svg.js.map +0 -1
- package/dist/assets/vlr.svg.js +0 -4
- package/dist/assets/vlr.svg.js.map +0 -1
- package/dist/assets/wavax.svg.js +0 -12
- package/dist/assets/wavax.svg.js.map +0 -1
- package/dist/assets/wavax.svg2.js +0 -4
- package/dist/assets/wavax.svg2.js.map +0 -1
- package/dist/assets/wbnb.svg.js +0 -12
- package/dist/assets/wbnb.svg.js.map +0 -1
- package/dist/assets/wbnb.svg2.js +0 -4
- package/dist/assets/wbnb.svg2.js.map +0 -1
- package/dist/assets/weth.svg.js +0 -12
- package/dist/assets/weth.svg.js.map +0 -1
- package/dist/assets/weth.svg2.js +0 -4
- package/dist/assets/weth.svg2.js.map +0 -1
- package/dist/assets/wmatic.svg.js +0 -12
- package/dist/assets/wmatic.svg.js.map +0 -1
- package/dist/assets/wmatic.svg2.js +0 -4
- package/dist/assets/wmatic.svg2.js.map +0 -1
- package/dist/assets/wxdai.svg.js +0 -12
- package/dist/assets/wxdai.svg.js.map +0 -1
- package/dist/assets/wxdai.svg2.js +0 -4
- package/dist/assets/wxdai.svg2.js.map +0 -1
- package/dist/components/web3/ConnectWallets/assets/browser-wallet.svg.js +0 -4
- package/dist/components/web3/ConnectWallets/assets/browser-wallet.svg.js.map +0 -1
- package/dist/components/web3/ConnectWallets/assets/bscwallet.svg.js +0 -4
- package/dist/components/web3/ConnectWallets/assets/bscwallet.svg.js.map +0 -1
- package/dist/components/web3/ConnectWallets/assets/coinbasewallet.svg.js +0 -4
- package/dist/components/web3/ConnectWallets/assets/coinbasewallet.svg.js.map +0 -1
- package/dist/components/web3/ConnectWallets/assets/email.svg.js +0 -4
- package/dist/components/web3/ConnectWallets/assets/email.svg.js.map +0 -1
- package/dist/components/web3/ConnectWallets/assets/ledger.svg.js +0 -4
- package/dist/components/web3/ConnectWallets/assets/ledger.svg.js.map +0 -1
- package/dist/components/web3/ConnectWallets/assets/metamask.svg.js +0 -4
- package/dist/components/web3/ConnectWallets/assets/metamask.svg.js.map +0 -1
- package/dist/components/web3/ConnectWallets/assets/paraswap.svg.js +0 -4
- package/dist/components/web3/ConnectWallets/assets/paraswap.svg.js.map +0 -1
- package/dist/components/web3/ConnectWallets/assets/safe.svg.js +0 -4
- package/dist/components/web3/ConnectWallets/assets/safe.svg.js.map +0 -1
- package/dist/components/web3/ConnectWallets/assets/trezor.svg.js +0 -4
- package/dist/components/web3/ConnectWallets/assets/trezor.svg.js.map +0 -1
- package/dist/components/web3/ConnectWallets/assets/walletconnect.svg.js +0 -4
- package/dist/components/web3/ConnectWallets/assets/walletconnect.svg.js.map +0 -1
- package/dist/components/widget/AppHeader/Activities/assets/eye-crossed.svg.js +0 -12
- package/dist/components/widget/AppHeader/Activities/assets/eye-crossed.svg.js.map +0 -1
- package/dist/components/widget/AppHeader/Activities/assets/eye.svg.js +0 -12
- package/dist/components/widget/AppHeader/Activities/assets/eye.svg.js.map +0 -1
- package/dist/components/widget/DexesList/assets/exchanges/biswap.png.js +0 -4
- package/dist/components/widget/DexesList/assets/exchanges/biswap.png.js.map +0 -1
- package/dist/components/widget/DexesList/assets/exchanges/cheeseswap.png.js +0 -4
- package/dist/components/widget/DexesList/assets/exchanges/cheeseswap.png.js.map +0 -1
- package/dist/components/widget/DexesList/assets/exchanges/complusswap.png.js +0 -4
- package/dist/components/widget/DexesList/assets/exchanges/complusswap.png.js.map +0 -1
- package/dist/components/widget/DexesList/assets/exchanges/hashflow.png.js +0 -4
- package/dist/components/widget/DexesList/assets/exchanges/hashflow.png.js.map +0 -1
- package/dist/components/widget/DexesList/assets/exchanges/icons.json.js +0 -159
- package/dist/components/widget/DexesList/assets/exchanges/icons.json.js.map +0 -1
- package/dist/components/widget/DexesList/assets/exchanges/quickswap.png.js +0 -4
- package/dist/components/widget/DexesList/assets/exchanges/quickswap.png.js.map +0 -1
- package/dist/components/widget/DexesList/assets/exchanges/shibaswap.png.js +0 -4
- package/dist/components/widget/DexesList/assets/exchanges/shibaswap.png.js.map +0 -1
- package/dist/components/widget/DexesList/assets/exchanges/uniswap.svg.js +0 -4
- package/dist/components/widget/DexesList/assets/exchanges/uniswap.svg.js.map +0 -1
- package/dist/components/widget/DexesList/assets/exchanges/velora-dark.svg.js +0 -4
- package/dist/components/widget/DexesList/assets/exchanges/velora-dark.svg.js.map +0 -1
- package/dist/components/widget/DexesList/assets/exchanges/velora-light.svg.js +0 -4
- package/dist/components/widget/DexesList/assets/exchanges/velora-light.svg.js.map +0 -1
- package/dist/components/widget/DexesList/assets/gas.svg.js +0 -12
- package/dist/components/widget/DexesList/assets/gas.svg.js.map +0 -1
- package/dist/components/widget/DexesList/assets/unknown-dex.svg.js +0 -4
- package/dist/components/widget/DexesList/assets/unknown-dex.svg.js.map +0 -1
- package/dist/components/widget/NetworkIcon/assets/sqr/arbitrum.svg.js +0 -12
- package/dist/components/widget/NetworkIcon/assets/sqr/arbitrum.svg.js.map +0 -1
- package/dist/components/widget/NetworkIcon/assets/sqr/avalanche.svg.js +0 -12
- package/dist/components/widget/NetworkIcon/assets/sqr/avalanche.svg.js.map +0 -1
- package/dist/components/widget/NetworkIcon/assets/sqr/base.svg.js +0 -12
- package/dist/components/widget/NetworkIcon/assets/sqr/base.svg.js.map +0 -1
- package/dist/components/widget/NetworkIcon/assets/sqr/bsc.svg.js +0 -12
- package/dist/components/widget/NetworkIcon/assets/sqr/bsc.svg.js.map +0 -1
- package/dist/components/widget/NetworkIcon/assets/sqr/eth.svg.js +0 -12
- package/dist/components/widget/NetworkIcon/assets/sqr/eth.svg.js.map +0 -1
- package/dist/components/widget/NetworkIcon/assets/sqr/gnosis.svg.js +0 -12
- package/dist/components/widget/NetworkIcon/assets/sqr/gnosis.svg.js.map +0 -1
- package/dist/components/widget/NetworkIcon/assets/sqr/optimism.svg.js +0 -12
- package/dist/components/widget/NetworkIcon/assets/sqr/optimism.svg.js.map +0 -1
- package/dist/components/widget/NetworkIcon/assets/sqr/polygon.svg.js +0 -12
- package/dist/components/widget/NetworkIcon/assets/sqr/polygon.svg.js.map +0 -1
- package/dist/components/widget/NetworkIcon/assets/sqr/unichain.svg.js +0 -12
- package/dist/components/widget/NetworkIcon/assets/sqr/unichain.svg.js.map +0 -1
- package/dist/components/widget/NumberInput/assets/arrow-down.svg.js +0 -12
- package/dist/components/widget/NumberInput/assets/arrow-down.svg.js.map +0 -1
- package/dist/components/widget/NumberInput/assets/arrow-up.svg.js +0 -12
- package/dist/components/widget/NumberInput/assets/arrow-up.svg.js.map +0 -1
- package/dist/components/widget/PoweredBy/assets/velora.svg.js +0 -12
- package/dist/components/widget/PoweredBy/assets/velora.svg.js.map +0 -1
- package/dist/components/widget/TokenBadge/assets/placeholder.png.js +0 -4
- package/dist/components/widget/TokenBadge/assets/placeholder.png.js.map +0 -1
- package/dist/components/widget/TradeOverview/assets/1_approving.lottie.js +0 -4
- package/dist/components/widget/TradeOverview/assets/1_approving.lottie.js.map +0 -1
- package/dist/components/widget/TradeOverview/assets/2_in_progress.lottie.js +0 -4
- package/dist/components/widget/TradeOverview/assets/2_in_progress.lottie.js.map +0 -1
- package/dist/components/widget/TradeOverview/assets/3_executing_step.lottie.js +0 -4
- package/dist/components/widget/TradeOverview/assets/3_executing_step.lottie.js.map +0 -1
- package/dist/components/widget/TradeOverview/assets/4_complete_step.lottie.js +0 -4
- package/dist/components/widget/TradeOverview/assets/4_complete_step.lottie.js.map +0 -1
- package/dist/components/widget/TradeOverview/assets/5_error_step.lottie.js +0 -4
- package/dist/components/widget/TradeOverview/assets/5_error_step.lottie.js.map +0 -1
- package/dist/external/.pnpm/react-compiler-runtime@1.0.0_react@19.1.1/external/react-compiler-runtime/dist/index.js +0 -385
- package/dist/external/.pnpm/react-compiler-runtime@1.0.0_react@19.1.1/external/react-compiler-runtime/dist/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/tokens/lists/lists.json.js +0 -4
- package/dist/tokens/lists/lists.json.js.map +0 -1
|
@@ -1,1628 +1,917 @@
|
|
|
1
|
-
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
current: true
|
|
46
|
-
},
|
|
47
|
-
shouldScaleBackground: false,
|
|
48
|
-
setBackgroundColorOnScale: true,
|
|
49
|
-
noBodyStyles: false,
|
|
50
|
-
container: null,
|
|
51
|
-
autoFocus: false
|
|
52
|
-
});
|
|
53
|
-
const useDrawerContext = ()=>{
|
|
54
|
-
const context = React__default.useContext(DrawerContext);
|
|
55
|
-
if (!context) {
|
|
56
|
-
throw new Error('useDrawerContext must be used within a Drawer.Root');
|
|
57
|
-
}
|
|
58
|
-
return context;
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import t, { useEffect as n, useLayoutEffect as r, useMemo as i } from "react";
|
|
4
|
+
import * as a from "@radix-ui/react-dialog";
|
|
5
|
+
//#region ../../node_modules/.pnpm/vaul@1.1.2_patch_hash=07b36ba5def3805dde9d543a880ba9e4caf55e5eb58e544faaa2c186846bf3c1__7f2d7d5ed11750fbec42b3f5689c802d/node_modules/vaul/dist/index.mjs
|
|
6
|
+
function o(e) {
|
|
7
|
+
if (!e || typeof document > "u") return;
|
|
8
|
+
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
9
|
+
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
10
|
+
}
|
|
11
|
+
var s = t.createContext({
|
|
12
|
+
drawerRef: { current: null },
|
|
13
|
+
overlayRef: { current: null },
|
|
14
|
+
onPress: () => {},
|
|
15
|
+
onRelease: () => {},
|
|
16
|
+
onDrag: () => {},
|
|
17
|
+
onNestedDrag: () => {},
|
|
18
|
+
onNestedOpenChange: () => {},
|
|
19
|
+
onNestedRelease: () => {},
|
|
20
|
+
openProp: void 0,
|
|
21
|
+
dismissible: !1,
|
|
22
|
+
isOpen: !1,
|
|
23
|
+
isDragging: !1,
|
|
24
|
+
keyboardIsOpen: { current: !1 },
|
|
25
|
+
snapPointsOffset: null,
|
|
26
|
+
snapPoints: null,
|
|
27
|
+
handleOnly: !1,
|
|
28
|
+
modal: !1,
|
|
29
|
+
shouldFade: !1,
|
|
30
|
+
activeSnapPoint: null,
|
|
31
|
+
onOpenChange: () => {},
|
|
32
|
+
setActiveSnapPoint: () => {},
|
|
33
|
+
closeDrawer: () => {},
|
|
34
|
+
direction: "bottom",
|
|
35
|
+
shouldAnimate: { current: !0 },
|
|
36
|
+
shouldScaleBackground: !1,
|
|
37
|
+
setBackgroundColorOnScale: !0,
|
|
38
|
+
noBodyStyles: !1,
|
|
39
|
+
container: null,
|
|
40
|
+
autoFocus: !1
|
|
41
|
+
}), c = () => {
|
|
42
|
+
let e = t.useContext(s);
|
|
43
|
+
if (!e) throw Error("useDrawerContext must be used within a Drawer.Root");
|
|
44
|
+
return e;
|
|
59
45
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
function
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
let target = e.target;
|
|
217
|
-
// Apply this change if we're not already focused on the target element
|
|
218
|
-
if (isInput(target) && target !== document.activeElement) {
|
|
219
|
-
e.preventDefault();
|
|
220
|
-
// Apply a transform to trick Safari into thinking the input is at the top of the page
|
|
221
|
-
// so it doesn't try to scroll it into view. When tapping on an input, this needs to
|
|
222
|
-
// be done before the "focus" event, so we have to focus the element ourselves.
|
|
223
|
-
target.style.transform = 'translateY(-2000px)';
|
|
224
|
-
target.focus();
|
|
225
|
-
requestAnimationFrame(()=>{
|
|
226
|
-
target.style.transform = '';
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
let onFocus = (e)=>{
|
|
231
|
-
let target = e.target;
|
|
232
|
-
if (isInput(target)) {
|
|
233
|
-
// Transform also needs to be applied in the focus event in cases where focus moves
|
|
234
|
-
// other than tapping on an input directly, e.g. the next/previous buttons in the
|
|
235
|
-
// software keyboard. In these cases, it seems applying the transform in the focus event
|
|
236
|
-
// is good enough, whereas when tapping an input, it must be done before the focus event. 🤷♂️
|
|
237
|
-
target.style.transform = 'translateY(-2000px)';
|
|
238
|
-
requestAnimationFrame(()=>{
|
|
239
|
-
target.style.transform = '';
|
|
240
|
-
// This will have prevented the browser from scrolling the focused element into view,
|
|
241
|
-
// so we need to do this ourselves in a way that doesn't cause the whole page to scroll.
|
|
242
|
-
if (visualViewport) {
|
|
243
|
-
if (visualViewport.height < window.innerHeight) {
|
|
244
|
-
// If the keyboard is already visible, do this after one additional frame
|
|
245
|
-
// to wait for the transform to be removed.
|
|
246
|
-
requestAnimationFrame(()=>{
|
|
247
|
-
scrollIntoView(target);
|
|
248
|
-
});
|
|
249
|
-
} else {
|
|
250
|
-
// Otherwise, wait for the visual viewport to resize before scrolling so we can
|
|
251
|
-
// measure the correct position to scroll to.
|
|
252
|
-
visualViewport.addEventListener('resize', ()=>scrollIntoView(target), {
|
|
253
|
-
once: true
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
let onWindowScroll = ()=>{
|
|
261
|
-
// Last resort. If the window scrolled, scroll it back to the top.
|
|
262
|
-
// It should always be at the top because the body will have a negative margin (see below).
|
|
263
|
-
window.scrollTo(0, 0);
|
|
264
|
-
};
|
|
265
|
-
// Record the original scroll position so we can restore it.
|
|
266
|
-
// Then apply a negative margin to the body to offset it by the scroll position. This will
|
|
267
|
-
// enable us to scroll the window to the top, which is required for the rest of this to work.
|
|
268
|
-
let scrollX = window.pageXOffset;
|
|
269
|
-
let scrollY = window.pageYOffset;
|
|
270
|
-
let restoreStyles = chain$1(setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
271
|
-
// Scroll to the top. The negative margin on the body will make this appear the same.
|
|
272
|
-
window.scrollTo(0, 0);
|
|
273
|
-
let removeEvents = chain$1(addEvent(document, 'touchstart', onTouchStart, {
|
|
274
|
-
passive: false,
|
|
275
|
-
capture: true
|
|
276
|
-
}), addEvent(document, 'touchmove', onTouchMove, {
|
|
277
|
-
passive: false,
|
|
278
|
-
capture: true
|
|
279
|
-
}), addEvent(document, 'touchend', onTouchEnd, {
|
|
280
|
-
passive: false,
|
|
281
|
-
capture: true
|
|
282
|
-
}), addEvent(document, 'focus', onFocus, true), addEvent(window, 'scroll', onWindowScroll));
|
|
283
|
-
return ()=>{
|
|
284
|
-
// Restore styles and scroll the page back to where it was.
|
|
285
|
-
restoreStyles();
|
|
286
|
-
removeEvents();
|
|
287
|
-
window.scrollTo(scrollX, scrollY);
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
// Sets a CSS property on an element, and returns a function to revert it to the previous value.
|
|
291
|
-
function setStyle(element, style, value) {
|
|
292
|
-
// https://github.com/microsoft/TypeScript/issues/17827#issuecomment-391663310
|
|
293
|
-
// @ts-ignore
|
|
294
|
-
let cur = element.style[style];
|
|
295
|
-
// @ts-ignore
|
|
296
|
-
element.style[style] = value;
|
|
297
|
-
return ()=>{
|
|
298
|
-
// @ts-ignore
|
|
299
|
-
element.style[style] = cur;
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
// Adds an event listener to an element, and returns a function to remove it.
|
|
303
|
-
function addEvent(target, event, handler, options) {
|
|
304
|
-
// @ts-ignore
|
|
305
|
-
target.addEventListener(event, handler, options);
|
|
306
|
-
return ()=>{
|
|
307
|
-
// @ts-ignore
|
|
308
|
-
target.removeEventListener(event, handler, options);
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
function scrollIntoView(target) {
|
|
312
|
-
let root = document.scrollingElement || document.documentElement;
|
|
313
|
-
while(target && target !== root){
|
|
314
|
-
// Find the parent scrollable element and adjust the scroll position if the target is not already in view.
|
|
315
|
-
let scrollable = getScrollParent(target);
|
|
316
|
-
if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== target) {
|
|
317
|
-
let scrollableTop = scrollable.getBoundingClientRect().top;
|
|
318
|
-
let targetTop = target.getBoundingClientRect().top;
|
|
319
|
-
let targetBottom = target.getBoundingClientRect().bottom;
|
|
320
|
-
// Buffer is needed for some edge cases
|
|
321
|
-
const keyboardHeight = scrollable.getBoundingClientRect().bottom + KEYBOARD_BUFFER;
|
|
322
|
-
if (targetBottom > keyboardHeight) {
|
|
323
|
-
scrollable.scrollTop += targetTop - scrollableTop;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
// @ts-ignore
|
|
327
|
-
target = scrollable.parentElement;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
function isInput(target) {
|
|
331
|
-
return target instanceof HTMLInputElement && !nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// This code comes from https://github.com/radix-ui/primitives/tree/main/packages/react/compose-refs
|
|
335
|
-
/**
|
|
336
|
-
* Set a given ref to a given value
|
|
337
|
-
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
338
|
-
*/ function setRef(ref, value) {
|
|
339
|
-
if (typeof ref === 'function') {
|
|
340
|
-
ref(value);
|
|
341
|
-
} else if (ref !== null && ref !== undefined) {
|
|
342
|
-
ref.current = value;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* A utility to compose multiple refs together
|
|
347
|
-
* Accepts callback refs and RefObject(s)
|
|
348
|
-
*/ function composeRefs(...refs) {
|
|
349
|
-
return (node)=>refs.forEach((ref)=>setRef(ref, node));
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
* A custom hook that composes multiple refs
|
|
353
|
-
* Accepts callback refs and RefObject(s)
|
|
354
|
-
*/ function useComposedRefs(...refs) {
|
|
355
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
356
|
-
return React.useCallback(composeRefs(...refs), refs);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
const cache = new WeakMap();
|
|
360
|
-
function set(el, styles, ignoreCache = false) {
|
|
361
|
-
if (!el || !(el instanceof HTMLElement)) return;
|
|
362
|
-
let originalStyles = {};
|
|
363
|
-
Object.entries(styles).forEach(([key, value])=>{
|
|
364
|
-
if (key.startsWith('--')) {
|
|
365
|
-
el.style.setProperty(key, value);
|
|
366
|
-
return;
|
|
367
|
-
}
|
|
368
|
-
originalStyles[key] = el.style[key];
|
|
369
|
-
el.style[key] = value;
|
|
370
|
-
});
|
|
371
|
-
if (ignoreCache) return;
|
|
372
|
-
cache.set(el, originalStyles);
|
|
373
|
-
}
|
|
374
|
-
function reset(el, prop) {
|
|
375
|
-
if (!el || !(el instanceof HTMLElement)) return;
|
|
376
|
-
let originalStyles = cache.get(el);
|
|
377
|
-
if (!originalStyles) {
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
380
|
-
{
|
|
381
|
-
el.style[prop] = originalStyles[prop];
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
const isVertical = (direction)=>{
|
|
385
|
-
switch(direction){
|
|
386
|
-
case 'top':
|
|
387
|
-
case 'bottom':
|
|
388
|
-
return true;
|
|
389
|
-
case 'left':
|
|
390
|
-
case 'right':
|
|
391
|
-
return false;
|
|
392
|
-
default:
|
|
393
|
-
return direction;
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
function getTranslate(element, direction) {
|
|
397
|
-
if (!element) {
|
|
398
|
-
return null;
|
|
399
|
-
}
|
|
400
|
-
const style = window.getComputedStyle(element);
|
|
401
|
-
const transform = // @ts-ignore
|
|
402
|
-
style.transform || style.webkitTransform || style.mozTransform;
|
|
403
|
-
let mat = transform.match(/^matrix3d\((.+)\)$/);
|
|
404
|
-
if (mat) {
|
|
405
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d
|
|
406
|
-
return parseFloat(mat[1].split(', ')[isVertical(direction) ? 13 : 12]);
|
|
407
|
-
}
|
|
408
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix
|
|
409
|
-
mat = transform.match(/^matrix\((.+)\)$/);
|
|
410
|
-
return mat ? parseFloat(mat[1].split(', ')[isVertical(direction) ? 5 : 4]) : null;
|
|
411
|
-
}
|
|
412
|
-
function dampenValue(v) {
|
|
413
|
-
return 8 * (Math.log(v + 1) - 2);
|
|
414
|
-
}
|
|
415
|
-
function assignStyle(element, style) {
|
|
416
|
-
if (!element) return ()=>{};
|
|
417
|
-
const prevStyle = element.style.cssText;
|
|
418
|
-
Object.assign(element.style, style);
|
|
419
|
-
return ()=>{
|
|
420
|
-
element.style.cssText = prevStyle;
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* Receives functions as arguments and returns a new function that calls all.
|
|
425
|
-
*/ function chain(...fns) {
|
|
426
|
-
return (...args)=>{
|
|
427
|
-
for (const fn of fns){
|
|
428
|
-
if (typeof fn === 'function') {
|
|
429
|
-
// @ts-ignore
|
|
430
|
-
fn(...args);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
const TRANSITIONS = {
|
|
437
|
-
DURATION: 0.5,
|
|
438
|
-
EASE: [
|
|
439
|
-
0.32,
|
|
440
|
-
0.72,
|
|
441
|
-
0,
|
|
442
|
-
1
|
|
443
|
-
]
|
|
46
|
+
o("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");
|
|
47
|
+
function l() {
|
|
48
|
+
let e = navigator.userAgent;
|
|
49
|
+
return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || /FxiOS/.test(e));
|
|
50
|
+
}
|
|
51
|
+
function u() {
|
|
52
|
+
return h(/^Mac/);
|
|
53
|
+
}
|
|
54
|
+
function d() {
|
|
55
|
+
return h(/^iPhone/);
|
|
56
|
+
}
|
|
57
|
+
function f() {
|
|
58
|
+
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
59
|
+
}
|
|
60
|
+
function p() {
|
|
61
|
+
return h(/^iPad/) || u() && navigator.maxTouchPoints > 1;
|
|
62
|
+
}
|
|
63
|
+
function m() {
|
|
64
|
+
return d() || p();
|
|
65
|
+
}
|
|
66
|
+
function h(e) {
|
|
67
|
+
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
68
|
+
}
|
|
69
|
+
var g = 24, _ = typeof window < "u" ? r : n;
|
|
70
|
+
function v(...e) {
|
|
71
|
+
return (...t) => {
|
|
72
|
+
for (let n of e) typeof n == "function" && n(...t);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
var y = typeof document < "u" && window.visualViewport;
|
|
76
|
+
function b(e) {
|
|
77
|
+
let t = window.getComputedStyle(e);
|
|
78
|
+
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
79
|
+
}
|
|
80
|
+
function x(e) {
|
|
81
|
+
for (b(e) && (e = e.parentElement); e && !b(e);) e = e.parentElement;
|
|
82
|
+
return e || document.scrollingElement || document.documentElement;
|
|
83
|
+
}
|
|
84
|
+
var S = new Set([
|
|
85
|
+
"checkbox",
|
|
86
|
+
"radio",
|
|
87
|
+
"range",
|
|
88
|
+
"color",
|
|
89
|
+
"file",
|
|
90
|
+
"image",
|
|
91
|
+
"button",
|
|
92
|
+
"submit",
|
|
93
|
+
"reset"
|
|
94
|
+
]), C = 0, w;
|
|
95
|
+
function ee(e = {}) {
|
|
96
|
+
let { isDisabled: t } = e;
|
|
97
|
+
_(() => {
|
|
98
|
+
if (!t) return C++, C === 1 && m() && (w = T()), () => {
|
|
99
|
+
C--, C === 0 && w?.();
|
|
100
|
+
};
|
|
101
|
+
}, [t]);
|
|
102
|
+
}
|
|
103
|
+
function T() {
|
|
104
|
+
let e, t = 0, n = (n) => {
|
|
105
|
+
e = x(n.target), !(e === document.documentElement && e === document.body) && (t = n.changedTouches[0].pageY);
|
|
106
|
+
}, r = (n) => {
|
|
107
|
+
if (!e || e === document.documentElement || e === document.body) {
|
|
108
|
+
n.preventDefault();
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
let r = n.changedTouches[0].pageY, i = e.scrollTop, a = e.scrollHeight - e.clientHeight;
|
|
112
|
+
a !== 0 && ((i <= 0 && r > t || i >= a && r < t) && n.preventDefault(), t = r);
|
|
113
|
+
}, i = (e) => {
|
|
114
|
+
let t = e.target;
|
|
115
|
+
k(t) && t !== document.activeElement && (e.preventDefault(), t.style.transform = "translateY(-2000px)", t.focus(), requestAnimationFrame(() => {
|
|
116
|
+
t.style.transform = "";
|
|
117
|
+
}));
|
|
118
|
+
}, a = (e) => {
|
|
119
|
+
let t = e.target;
|
|
120
|
+
k(t) && (t.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
121
|
+
t.style.transform = "", y && (y.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
122
|
+
O(t);
|
|
123
|
+
}) : y.addEventListener("resize", () => O(t), { once: !0 }));
|
|
124
|
+
}));
|
|
125
|
+
}, o = () => {
|
|
126
|
+
window.scrollTo(0, 0);
|
|
127
|
+
}, s = window.pageXOffset, c = window.pageYOffset, l = v(E(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
128
|
+
window.scrollTo(0, 0);
|
|
129
|
+
let u = v(D(document, "touchstart", n, {
|
|
130
|
+
passive: !1,
|
|
131
|
+
capture: !0
|
|
132
|
+
}), D(document, "touchmove", r, {
|
|
133
|
+
passive: !1,
|
|
134
|
+
capture: !0
|
|
135
|
+
}), D(document, "touchend", i, {
|
|
136
|
+
passive: !1,
|
|
137
|
+
capture: !0
|
|
138
|
+
}), D(document, "focus", a, !0), D(window, "scroll", o));
|
|
139
|
+
return () => {
|
|
140
|
+
l(), u(), window.scrollTo(s, c);
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function E(e, t, n) {
|
|
144
|
+
let r = e.style[t];
|
|
145
|
+
return e.style[t] = n, () => {
|
|
146
|
+
e.style[t] = r;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function D(e, t, n, r) {
|
|
150
|
+
return e.addEventListener(t, n, r), () => {
|
|
151
|
+
e.removeEventListener(t, n, r);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function O(e) {
|
|
155
|
+
let t = document.scrollingElement || document.documentElement;
|
|
156
|
+
for (; e && e !== t;) {
|
|
157
|
+
let t = x(e);
|
|
158
|
+
if (t !== document.documentElement && t !== document.body && t !== e) {
|
|
159
|
+
let n = t.getBoundingClientRect().top, r = e.getBoundingClientRect().top;
|
|
160
|
+
e.getBoundingClientRect().bottom > t.getBoundingClientRect().bottom + g && (t.scrollTop += r - n);
|
|
161
|
+
}
|
|
162
|
+
e = t.parentElement;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function k(e) {
|
|
166
|
+
return e instanceof HTMLInputElement && !S.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
167
|
+
}
|
|
168
|
+
function A(e, t) {
|
|
169
|
+
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
170
|
+
}
|
|
171
|
+
function te(...e) {
|
|
172
|
+
return (t) => e.forEach((e) => A(e, t));
|
|
173
|
+
}
|
|
174
|
+
function ne(...t) {
|
|
175
|
+
return e.useCallback(te(...t), t);
|
|
176
|
+
}
|
|
177
|
+
var j = /* @__PURE__ */ new WeakMap();
|
|
178
|
+
function M(e, t, n = !1) {
|
|
179
|
+
if (!e || !(e instanceof HTMLElement)) return;
|
|
180
|
+
let r = {};
|
|
181
|
+
Object.entries(t).forEach(([t, n]) => {
|
|
182
|
+
if (t.startsWith("--")) {
|
|
183
|
+
e.style.setProperty(t, n);
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
r[t] = e.style[t], e.style[t] = n;
|
|
187
|
+
}), !n && j.set(e, r);
|
|
188
|
+
}
|
|
189
|
+
function re(e, t) {
|
|
190
|
+
if (!e || !(e instanceof HTMLElement)) return;
|
|
191
|
+
let n = j.get(e);
|
|
192
|
+
n && (e.style[t] = n[t]);
|
|
193
|
+
}
|
|
194
|
+
var N = (e) => {
|
|
195
|
+
switch (e) {
|
|
196
|
+
case "top":
|
|
197
|
+
case "bottom": return !0;
|
|
198
|
+
case "left":
|
|
199
|
+
case "right": return !1;
|
|
200
|
+
default: return e;
|
|
201
|
+
}
|
|
444
202
|
};
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
}
|
|
986
|
-
// Allow scrolling when animating
|
|
987
|
-
if (openTime.current && date.getTime() - openTime.current.getTime() < 500) {
|
|
988
|
-
return false;
|
|
989
|
-
}
|
|
990
|
-
if (swipeAmount !== null) {
|
|
991
|
-
if (direction === 'bottom' ? swipeAmount > 0 : swipeAmount < 0) {
|
|
992
|
-
return true;
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
// Don't drag if there's highlighted text
|
|
996
|
-
if (highlightedText && highlightedText.length > 0) {
|
|
997
|
-
return false;
|
|
998
|
-
}
|
|
999
|
-
// Disallow dragging if drawer was scrolled within `scrollLockTimeout`
|
|
1000
|
-
if (lastTimeDragPrevented.current && date.getTime() - lastTimeDragPrevented.current.getTime() < scrollLockTimeout && swipeAmount === 0) {
|
|
1001
|
-
lastTimeDragPrevented.current = date;
|
|
1002
|
-
return false;
|
|
1003
|
-
}
|
|
1004
|
-
if (isDraggingInDirection) {
|
|
1005
|
-
lastTimeDragPrevented.current = date;
|
|
1006
|
-
// We are dragging down so we should allow scrolling
|
|
1007
|
-
return false;
|
|
1008
|
-
}
|
|
1009
|
-
// Keep climbing up the DOM tree as long as there's a parent
|
|
1010
|
-
while(element){
|
|
1011
|
-
// Check if the element is scrollable
|
|
1012
|
-
if (element.scrollHeight > element.clientHeight) {
|
|
1013
|
-
if (element.scrollTop !== 0) {
|
|
1014
|
-
lastTimeDragPrevented.current = new Date();
|
|
1015
|
-
// The element is scrollable and not scrolled to the top, so don't drag
|
|
1016
|
-
return false;
|
|
1017
|
-
}
|
|
1018
|
-
if (element.getAttribute('role') === 'dialog') {
|
|
1019
|
-
return true;
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
// Move up to the parent element
|
|
1023
|
-
element = element.parentNode;
|
|
1024
|
-
}
|
|
1025
|
-
// No scrollable parents not scrolled to the top found, so drag
|
|
1026
|
-
return true;
|
|
1027
|
-
}
|
|
1028
|
-
function onDrag(event) {
|
|
1029
|
-
if (!drawerRef.current) {
|
|
1030
|
-
return;
|
|
1031
|
-
}
|
|
1032
|
-
// We need to know how much of the drawer has been dragged in percentages so that we can transform background accordingly
|
|
1033
|
-
if (isDragging) {
|
|
1034
|
-
const directionMultiplier = direction === 'bottom' || direction === 'right' ? 1 : -1;
|
|
1035
|
-
const draggedDistance = (pointerStart.current - (isVertical(direction) ? event.pageY : event.pageX)) * directionMultiplier;
|
|
1036
|
-
const isDraggingInDirection = draggedDistance > 0;
|
|
1037
|
-
// Pre condition for disallowing dragging in the close direction.
|
|
1038
|
-
const noCloseSnapPointsPreCondition = snapPoints && !dismissible && !isDraggingInDirection;
|
|
1039
|
-
// Disallow dragging down to close when first snap point is the active one and dismissible prop is set to false.
|
|
1040
|
-
if (noCloseSnapPointsPreCondition && activeSnapPointIndex === 0) return;
|
|
1041
|
-
// We need to capture last time when drag with scroll was triggered and have a timeout between
|
|
1042
|
-
const absDraggedDistance = Math.abs(draggedDistance);
|
|
1043
|
-
const wrapper = document.querySelector('[data-vaul-drawer-wrapper]');
|
|
1044
|
-
const drawerDimension = direction === 'bottom' || direction === 'top' ? drawerHeightRef.current : drawerWidthRef.current;
|
|
1045
|
-
// Calculate the percentage dragged, where 1 is the closed position
|
|
1046
|
-
let percentageDragged = absDraggedDistance / drawerDimension;
|
|
1047
|
-
const snapPointPercentageDragged = getSnapPointsPercentageDragged(absDraggedDistance, isDraggingInDirection);
|
|
1048
|
-
if (snapPointPercentageDragged !== null) {
|
|
1049
|
-
percentageDragged = snapPointPercentageDragged;
|
|
1050
|
-
}
|
|
1051
|
-
// Disallow close dragging beyond the smallest snap point.
|
|
1052
|
-
if (noCloseSnapPointsPreCondition && percentageDragged >= 1) {
|
|
1053
|
-
return;
|
|
1054
|
-
}
|
|
1055
|
-
if (!isAllowedToDrag.current && !shouldDrag(event.target, isDraggingInDirection)) return;
|
|
1056
|
-
drawerRef.current.classList.add(DRAG_CLASS);
|
|
1057
|
-
// If shouldDrag gave true once after pressing down on the drawer, we set isAllowedToDrag to true and it will remain true until we let go, there's no reason to disable dragging mid way, ever, and that's the solution to it
|
|
1058
|
-
isAllowedToDrag.current = true;
|
|
1059
|
-
set(drawerRef.current, {
|
|
1060
|
-
transition: 'none'
|
|
1061
|
-
});
|
|
1062
|
-
set(overlayRef.current, {
|
|
1063
|
-
transition: 'none'
|
|
1064
|
-
});
|
|
1065
|
-
if (snapPoints) {
|
|
1066
|
-
onDragSnapPoints({
|
|
1067
|
-
draggedDistance
|
|
1068
|
-
});
|
|
1069
|
-
}
|
|
1070
|
-
// Run this only if snapPoints are not defined or if we are at the last snap point (highest one)
|
|
1071
|
-
if (isDraggingInDirection && !snapPoints) {
|
|
1072
|
-
const dampenedDraggedDistance = dampenValue(draggedDistance);
|
|
1073
|
-
const translateValue = Math.min(dampenedDraggedDistance * -1, 0) * directionMultiplier;
|
|
1074
|
-
set(drawerRef.current, {
|
|
1075
|
-
transform: isVertical(direction) ? `translate3d(0, ${translateValue}px, 0)` : `translate3d(${translateValue}px, 0, 0)`
|
|
1076
|
-
});
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
const opacityValue = 1 - percentageDragged;
|
|
1080
|
-
if (shouldFade || fadeFromIndex && activeSnapPointIndex === fadeFromIndex - 1) {
|
|
1081
|
-
onDragProp == null ? void 0 : onDragProp(event, percentageDragged);
|
|
1082
|
-
set(overlayRef.current, {
|
|
1083
|
-
opacity: `${opacityValue}`,
|
|
1084
|
-
transition: 'none'
|
|
1085
|
-
}, true);
|
|
1086
|
-
}
|
|
1087
|
-
if (wrapper && overlayRef.current && shouldScaleBackground) {
|
|
1088
|
-
// Calculate percentageDragged as a fraction (0 to 1)
|
|
1089
|
-
const scaleValue = Math.min(getScale() + percentageDragged * (1 - getScale()), 1);
|
|
1090
|
-
const borderRadiusValue = 8 - percentageDragged * 8;
|
|
1091
|
-
const translateValue = Math.max(0, 14 - percentageDragged * 14);
|
|
1092
|
-
set(wrapper, {
|
|
1093
|
-
borderRadius: `${borderRadiusValue}px`,
|
|
1094
|
-
transform: isVertical(direction) ? `scale(${scaleValue}) translate3d(0, ${translateValue}px, 0)` : `scale(${scaleValue}) translate3d(${translateValue}px, 0, 0)`,
|
|
1095
|
-
transition: 'none'
|
|
1096
|
-
}, true);
|
|
1097
|
-
}
|
|
1098
|
-
if (!snapPoints) {
|
|
1099
|
-
const translateValue = absDraggedDistance * directionMultiplier;
|
|
1100
|
-
set(drawerRef.current, {
|
|
1101
|
-
transform: isVertical(direction) ? `translate3d(0, ${translateValue}px, 0)` : `translate3d(${translateValue}px, 0, 0)`
|
|
1102
|
-
});
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
React__default.useEffect(()=>{
|
|
1107
|
-
window.requestAnimationFrame(()=>{
|
|
1108
|
-
shouldAnimate.current = true;
|
|
1109
|
-
});
|
|
1110
|
-
}, []);
|
|
1111
|
-
React__default.useEffect(()=>{
|
|
1112
|
-
var _window_visualViewport;
|
|
1113
|
-
function onVisualViewportChange() {
|
|
1114
|
-
if (!drawerRef.current || !repositionInputs) return;
|
|
1115
|
-
const focusedElement = document.activeElement;
|
|
1116
|
-
if (isInput(focusedElement) || keyboardIsOpen.current) {
|
|
1117
|
-
var _window_visualViewport;
|
|
1118
|
-
const visualViewportHeight = ((_window_visualViewport = window.visualViewport) == null ? void 0 : _window_visualViewport.height) || 0;
|
|
1119
|
-
const totalHeight = window.innerHeight;
|
|
1120
|
-
// This is the height of the keyboard
|
|
1121
|
-
let diffFromInitial = totalHeight - visualViewportHeight;
|
|
1122
|
-
const drawerHeight = drawerRef.current.getBoundingClientRect().height || 0;
|
|
1123
|
-
// Adjust drawer height only if it's tall enough
|
|
1124
|
-
const isTallEnough = drawerHeight > totalHeight * 0.8;
|
|
1125
|
-
if (!initialDrawerHeight.current) {
|
|
1126
|
-
initialDrawerHeight.current = drawerHeight;
|
|
1127
|
-
}
|
|
1128
|
-
const offsetFromTop = drawerRef.current.getBoundingClientRect().top;
|
|
1129
|
-
// visualViewport height may change due to somq e subtle changes to the keyboard. Checking if the height changed by 60 or more will make sure that they keyboard really changed its open state.
|
|
1130
|
-
if (Math.abs(previousDiffFromInitial.current - diffFromInitial) > 60) {
|
|
1131
|
-
keyboardIsOpen.current = !keyboardIsOpen.current;
|
|
1132
|
-
}
|
|
1133
|
-
if (snapPoints && snapPoints.length > 0 && snapPointsOffset && activeSnapPointIndex) {
|
|
1134
|
-
const activeSnapPointHeight = snapPointsOffset[activeSnapPointIndex] || 0;
|
|
1135
|
-
diffFromInitial += activeSnapPointHeight;
|
|
1136
|
-
}
|
|
1137
|
-
previousDiffFromInitial.current = diffFromInitial;
|
|
1138
|
-
// We don't have to change the height if the input is in view, when we are here we are in the opened keyboard state so we can correctly check if the input is in view
|
|
1139
|
-
if (drawerHeight > visualViewportHeight || keyboardIsOpen.current) {
|
|
1140
|
-
const height = drawerRef.current.getBoundingClientRect().height;
|
|
1141
|
-
let newDrawerHeight = height;
|
|
1142
|
-
if (height > visualViewportHeight) {
|
|
1143
|
-
newDrawerHeight = visualViewportHeight - (isTallEnough ? offsetFromTop : WINDOW_TOP_OFFSET);
|
|
1144
|
-
}
|
|
1145
|
-
// When fixed, don't move the drawer upwards if there's space, but rather only change it's height so it's fully scrollable when the keyboard is open
|
|
1146
|
-
if (fixed) {
|
|
1147
|
-
drawerRef.current.style.height = `${height - Math.max(diffFromInitial, 0)}px`;
|
|
1148
|
-
} else {
|
|
1149
|
-
drawerRef.current.style.height = `${Math.max(newDrawerHeight, visualViewportHeight - offsetFromTop)}px`;
|
|
1150
|
-
}
|
|
1151
|
-
} else if (!isMobileFirefox()) {
|
|
1152
|
-
drawerRef.current.style.height = `${initialDrawerHeight.current}px`;
|
|
1153
|
-
}
|
|
1154
|
-
if (snapPoints && snapPoints.length > 0 && !keyboardIsOpen.current) {
|
|
1155
|
-
drawerRef.current.style.bottom = `0px`;
|
|
1156
|
-
} else {
|
|
1157
|
-
// Negative bottom value would never make sense
|
|
1158
|
-
drawerRef.current.style.bottom = `${Math.max(diffFromInitial, 0)}px`;
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
(_window_visualViewport = window.visualViewport) == null ? void 0 : _window_visualViewport.addEventListener('resize', onVisualViewportChange);
|
|
1163
|
-
return ()=>{
|
|
1164
|
-
var _window_visualViewport;
|
|
1165
|
-
return (_window_visualViewport = window.visualViewport) == null ? void 0 : _window_visualViewport.removeEventListener('resize', onVisualViewportChange);
|
|
1166
|
-
};
|
|
1167
|
-
}, [
|
|
1168
|
-
activeSnapPointIndex,
|
|
1169
|
-
snapPoints,
|
|
1170
|
-
snapPointsOffset
|
|
1171
|
-
]);
|
|
1172
|
-
function closeDrawer(fromWithin) {
|
|
1173
|
-
cancelDrag();
|
|
1174
|
-
onClose == null ? void 0 : onClose();
|
|
1175
|
-
if (!fromWithin) {
|
|
1176
|
-
setIsOpen(false);
|
|
1177
|
-
}
|
|
1178
|
-
setTimeout(()=>{
|
|
1179
|
-
if (snapPoints) {
|
|
1180
|
-
setActiveSnapPoint(snapPoints[0]);
|
|
1181
|
-
}
|
|
1182
|
-
}, TRANSITIONS.DURATION * 1000); // seconds to ms
|
|
1183
|
-
}
|
|
1184
|
-
function resetDrawer() {
|
|
1185
|
-
if (!drawerRef.current) return;
|
|
1186
|
-
const wrapper = document.querySelector('[data-vaul-drawer-wrapper]');
|
|
1187
|
-
const currentSwipeAmount = getTranslate(drawerRef.current, direction);
|
|
1188
|
-
set(drawerRef.current, {
|
|
1189
|
-
transform: 'translate3d(0, 0, 0)',
|
|
1190
|
-
transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`
|
|
1191
|
-
});
|
|
1192
|
-
set(overlayRef.current, {
|
|
1193
|
-
transition: `opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`,
|
|
1194
|
-
opacity: '1'
|
|
1195
|
-
});
|
|
1196
|
-
// Don't reset background if swiped upwards
|
|
1197
|
-
if (shouldScaleBackground && currentSwipeAmount && currentSwipeAmount > 0 && isOpen) {
|
|
1198
|
-
set(wrapper, {
|
|
1199
|
-
borderRadius: `${BORDER_RADIUS}px`,
|
|
1200
|
-
overflow: 'hidden',
|
|
1201
|
-
...isVertical(direction) ? {
|
|
1202
|
-
transform: `scale(${getScale()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
1203
|
-
transformOrigin: 'top'
|
|
1204
|
-
} : {
|
|
1205
|
-
transform: `scale(${getScale()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
1206
|
-
transformOrigin: 'left'
|
|
1207
|
-
},
|
|
1208
|
-
transitionProperty: 'transform, border-radius',
|
|
1209
|
-
transitionDuration: `${TRANSITIONS.DURATION}s`,
|
|
1210
|
-
transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join(',')})`
|
|
1211
|
-
}, true);
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
function cancelDrag() {
|
|
1215
|
-
if (!isDragging || !drawerRef.current) return;
|
|
1216
|
-
drawerRef.current.classList.remove(DRAG_CLASS);
|
|
1217
|
-
isAllowedToDrag.current = false;
|
|
1218
|
-
setIsDragging(false);
|
|
1219
|
-
dragEndTime.current = new Date();
|
|
1220
|
-
}
|
|
1221
|
-
function onRelease(event) {
|
|
1222
|
-
if (!isDragging || !drawerRef.current) return;
|
|
1223
|
-
drawerRef.current.classList.remove(DRAG_CLASS);
|
|
1224
|
-
isAllowedToDrag.current = false;
|
|
1225
|
-
setIsDragging(false);
|
|
1226
|
-
dragEndTime.current = new Date();
|
|
1227
|
-
const swipeAmount = getTranslate(drawerRef.current, direction);
|
|
1228
|
-
if (!event || !shouldDrag(event.target, false) || !swipeAmount || Number.isNaN(swipeAmount)) return;
|
|
1229
|
-
if (dragStartTime.current === null) return;
|
|
1230
|
-
const timeTaken = dragEndTime.current.getTime() - dragStartTime.current.getTime();
|
|
1231
|
-
const distMoved = pointerStart.current - (isVertical(direction) ? event.pageY : event.pageX);
|
|
1232
|
-
const velocity = Math.abs(distMoved) / timeTaken;
|
|
1233
|
-
if (velocity > 0.05) {
|
|
1234
|
-
// `justReleased` is needed to prevent the drawer from focusing on an input when the drag ends, as it's not the intent most of the time.
|
|
1235
|
-
setJustReleased(true);
|
|
1236
|
-
setTimeout(()=>{
|
|
1237
|
-
setJustReleased(false);
|
|
1238
|
-
}, 200);
|
|
1239
|
-
}
|
|
1240
|
-
if (snapPoints) {
|
|
1241
|
-
const directionMultiplier = direction === 'bottom' || direction === 'right' ? 1 : -1;
|
|
1242
|
-
onReleaseSnapPoints({
|
|
1243
|
-
draggedDistance: distMoved * directionMultiplier,
|
|
1244
|
-
closeDrawer,
|
|
1245
|
-
velocity,
|
|
1246
|
-
dismissible
|
|
1247
|
-
});
|
|
1248
|
-
onReleaseProp == null ? void 0 : onReleaseProp(event, true);
|
|
1249
|
-
return;
|
|
1250
|
-
}
|
|
1251
|
-
// Moved upwards, don't do anything
|
|
1252
|
-
if (direction === 'bottom' || direction === 'right' ? distMoved > 0 : distMoved < 0) {
|
|
1253
|
-
resetDrawer();
|
|
1254
|
-
onReleaseProp == null ? void 0 : onReleaseProp(event, true);
|
|
1255
|
-
return;
|
|
1256
|
-
}
|
|
1257
|
-
if (velocity > VELOCITY_THRESHOLD) {
|
|
1258
|
-
closeDrawer();
|
|
1259
|
-
onReleaseProp == null ? void 0 : onReleaseProp(event, false);
|
|
1260
|
-
return;
|
|
1261
|
-
}
|
|
1262
|
-
var _drawerRef_current_getBoundingClientRect_height;
|
|
1263
|
-
const visibleDrawerHeight = Math.min((_drawerRef_current_getBoundingClientRect_height = drawerRef.current.getBoundingClientRect().height) != null ? _drawerRef_current_getBoundingClientRect_height : 0, window.innerHeight);
|
|
1264
|
-
var _drawerRef_current_getBoundingClientRect_width;
|
|
1265
|
-
const visibleDrawerWidth = Math.min((_drawerRef_current_getBoundingClientRect_width = drawerRef.current.getBoundingClientRect().width) != null ? _drawerRef_current_getBoundingClientRect_width : 0, window.innerWidth);
|
|
1266
|
-
const isHorizontalSwipe = direction === 'left' || direction === 'right';
|
|
1267
|
-
if (Math.abs(swipeAmount) >= (isHorizontalSwipe ? visibleDrawerWidth : visibleDrawerHeight) * closeThreshold) {
|
|
1268
|
-
closeDrawer();
|
|
1269
|
-
onReleaseProp == null ? void 0 : onReleaseProp(event, false);
|
|
1270
|
-
return;
|
|
1271
|
-
}
|
|
1272
|
-
onReleaseProp == null ? void 0 : onReleaseProp(event, true);
|
|
1273
|
-
resetDrawer();
|
|
1274
|
-
}
|
|
1275
|
-
React__default.useEffect(()=>{
|
|
1276
|
-
// Trigger enter animation without using CSS animation
|
|
1277
|
-
if (isOpen) {
|
|
1278
|
-
set(document.documentElement, {
|
|
1279
|
-
scrollBehavior: 'auto'
|
|
1280
|
-
});
|
|
1281
|
-
openTime.current = new Date();
|
|
1282
|
-
}
|
|
1283
|
-
return ()=>{
|
|
1284
|
-
reset(document.documentElement, 'scrollBehavior');
|
|
1285
|
-
};
|
|
1286
|
-
}, [
|
|
1287
|
-
isOpen
|
|
1288
|
-
]);
|
|
1289
|
-
function onNestedOpenChange(o) {
|
|
1290
|
-
const scale = o ? (window.innerWidth - NESTED_DISPLACEMENT) / window.innerWidth : 1;
|
|
1291
|
-
const initialTranslate = o ? -NESTED_DISPLACEMENT : 0;
|
|
1292
|
-
if (nestedOpenChangeTimer.current) {
|
|
1293
|
-
window.clearTimeout(nestedOpenChangeTimer.current);
|
|
1294
|
-
}
|
|
1295
|
-
set(drawerRef.current, {
|
|
1296
|
-
transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`,
|
|
1297
|
-
transform: isVertical(direction) ? `scale(${scale}) translate3d(0, ${initialTranslate}px, 0)` : `scale(${scale}) translate3d(${initialTranslate}px, 0, 0)`
|
|
1298
|
-
});
|
|
1299
|
-
if (!o && drawerRef.current) {
|
|
1300
|
-
nestedOpenChangeTimer.current = setTimeout(()=>{
|
|
1301
|
-
const translateValue = getTranslate(drawerRef.current, direction);
|
|
1302
|
-
set(drawerRef.current, {
|
|
1303
|
-
transition: 'none',
|
|
1304
|
-
transform: isVertical(direction) ? `translate3d(0, ${translateValue}px, 0)` : `translate3d(${translateValue}px, 0, 0)`
|
|
1305
|
-
});
|
|
1306
|
-
}, 500);
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
function onNestedDrag(_event, percentageDragged) {
|
|
1310
|
-
if (percentageDragged < 0) return;
|
|
1311
|
-
const initialScale = (window.innerWidth - NESTED_DISPLACEMENT) / window.innerWidth;
|
|
1312
|
-
const newScale = initialScale + percentageDragged * (1 - initialScale);
|
|
1313
|
-
const newTranslate = -NESTED_DISPLACEMENT + percentageDragged * NESTED_DISPLACEMENT;
|
|
1314
|
-
set(drawerRef.current, {
|
|
1315
|
-
transform: isVertical(direction) ? `scale(${newScale}) translate3d(0, ${newTranslate}px, 0)` : `scale(${newScale}) translate3d(${newTranslate}px, 0, 0)`,
|
|
1316
|
-
transition: 'none'
|
|
1317
|
-
});
|
|
1318
|
-
}
|
|
1319
|
-
function onNestedRelease(_event, o) {
|
|
1320
|
-
const dim = isVertical(direction) ? window.innerHeight : window.innerWidth;
|
|
1321
|
-
const scale = o ? (dim - NESTED_DISPLACEMENT) / dim : 1;
|
|
1322
|
-
const translate = o ? -NESTED_DISPLACEMENT : 0;
|
|
1323
|
-
if (o) {
|
|
1324
|
-
set(drawerRef.current, {
|
|
1325
|
-
transition: `transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(',')})`,
|
|
1326
|
-
transform: isVertical(direction) ? `scale(${scale}) translate3d(0, ${translate}px, 0)` : `scale(${scale}) translate3d(${translate}px, 0, 0)`
|
|
1327
|
-
});
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
React__default.useEffect(()=>{
|
|
1331
|
-
if (!modal) {
|
|
1332
|
-
// Need to do this manually unfortunately
|
|
1333
|
-
window.requestAnimationFrame(()=>{
|
|
1334
|
-
document.body.style.pointerEvents = 'auto';
|
|
1335
|
-
});
|
|
1336
|
-
}
|
|
1337
|
-
}, [
|
|
1338
|
-
modal
|
|
1339
|
-
]);
|
|
1340
|
-
return /*#__PURE__*/ React__default.createElement(DialogPrimitive.Root, {
|
|
1341
|
-
defaultOpen: defaultOpen,
|
|
1342
|
-
onOpenChange: (open)=>{
|
|
1343
|
-
if (!dismissible && !open) return;
|
|
1344
|
-
if (open) {
|
|
1345
|
-
setHasBeenOpened(true);
|
|
1346
|
-
} else {
|
|
1347
|
-
closeDrawer(true);
|
|
1348
|
-
}
|
|
1349
|
-
setIsOpen(open);
|
|
1350
|
-
},
|
|
1351
|
-
open: isOpen,
|
|
1352
|
-
modal,
|
|
1353
|
-
}, /*#__PURE__*/ React__default.createElement(DrawerContext.Provider, {
|
|
1354
|
-
value: {
|
|
1355
|
-
activeSnapPoint,
|
|
1356
|
-
snapPoints,
|
|
1357
|
-
setActiveSnapPoint,
|
|
1358
|
-
drawerRef,
|
|
1359
|
-
overlayRef,
|
|
1360
|
-
onOpenChange,
|
|
1361
|
-
onPress,
|
|
1362
|
-
onRelease,
|
|
1363
|
-
onDrag,
|
|
1364
|
-
dismissible,
|
|
1365
|
-
shouldAnimate,
|
|
1366
|
-
handleOnly,
|
|
1367
|
-
isOpen,
|
|
1368
|
-
isDragging,
|
|
1369
|
-
shouldFade,
|
|
1370
|
-
closeDrawer,
|
|
1371
|
-
onNestedDrag,
|
|
1372
|
-
onNestedOpenChange,
|
|
1373
|
-
onNestedRelease,
|
|
1374
|
-
keyboardIsOpen,
|
|
1375
|
-
modal,
|
|
1376
|
-
snapPointsOffset,
|
|
1377
|
-
activeSnapPointIndex,
|
|
1378
|
-
direction,
|
|
1379
|
-
shouldScaleBackground,
|
|
1380
|
-
setBackgroundColorOnScale,
|
|
1381
|
-
noBodyStyles,
|
|
1382
|
-
container,
|
|
1383
|
-
autoFocus
|
|
1384
|
-
}
|
|
1385
|
-
}, children));
|
|
1386
|
-
}
|
|
1387
|
-
const Overlay = /*#__PURE__*/ React__default.forwardRef(function({ ...rest }, ref) {
|
|
1388
|
-
const { overlayRef, snapPoints, onRelease, shouldFade, isOpen, modal, shouldAnimate } = useDrawerContext();
|
|
1389
|
-
const composedRef = useComposedRefs(ref, overlayRef);
|
|
1390
|
-
const hasSnapPoints = snapPoints && snapPoints.length > 0;
|
|
1391
|
-
// Overlay is the component that is locking scroll, removing it will unlock the scroll without having to dig into Radix's Dialog library
|
|
1392
|
-
if (!modal) {
|
|
1393
|
-
return null;
|
|
1394
|
-
}
|
|
1395
|
-
const onMouseUp = React__default.useCallback((event)=>onRelease(event), [
|
|
1396
|
-
onRelease
|
|
1397
|
-
]);
|
|
1398
|
-
return /*#__PURE__*/ React__default.createElement(DialogPrimitive.Overlay, {
|
|
1399
|
-
onMouseUp: onMouseUp,
|
|
1400
|
-
ref: composedRef,
|
|
1401
|
-
"data-vaul-overlay": "",
|
|
1402
|
-
"data-vaul-snap-points": isOpen && hasSnapPoints ? 'true' : 'false',
|
|
1403
|
-
"data-vaul-snap-points-overlay": isOpen && shouldFade ? 'true' : 'false',
|
|
1404
|
-
"data-vaul-animate": (shouldAnimate == null ? void 0 : shouldAnimate.current) ? 'true' : 'false',
|
|
1405
|
-
...rest
|
|
1406
|
-
});
|
|
203
|
+
function P(e, t) {
|
|
204
|
+
if (!e) return null;
|
|
205
|
+
let n = window.getComputedStyle(e), r = n.transform || n.webkitTransform || n.mozTransform, i = r.match(/^matrix3d\((.+)\)$/);
|
|
206
|
+
return i ? parseFloat(i[1].split(", ")[N(t) ? 13 : 12]) : (i = r.match(/^matrix\((.+)\)$/), i ? parseFloat(i[1].split(", ")[N(t) ? 5 : 4]) : null);
|
|
207
|
+
}
|
|
208
|
+
function ie(e) {
|
|
209
|
+
return 8 * (Math.log(e + 1) - 2);
|
|
210
|
+
}
|
|
211
|
+
function F(e, t) {
|
|
212
|
+
if (!e) return () => {};
|
|
213
|
+
let n = e.style.cssText;
|
|
214
|
+
return Object.assign(e.style, t), () => {
|
|
215
|
+
e.style.cssText = n;
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
var I = {
|
|
219
|
+
DURATION: .5,
|
|
220
|
+
EASE: [
|
|
221
|
+
.32,
|
|
222
|
+
.72,
|
|
223
|
+
0,
|
|
224
|
+
1
|
|
225
|
+
]
|
|
226
|
+
}, ae = .4, oe = .25, se = 100, ce = 8, L = 16, le = 26, ue = "vaul-dragging";
|
|
227
|
+
function R(e) {
|
|
228
|
+
let n = t.useRef(e);
|
|
229
|
+
return t.useEffect(() => {
|
|
230
|
+
n.current = e;
|
|
231
|
+
}), t.useMemo(() => (...e) => n.current == null ? void 0 : n.current.call(n, ...e), []);
|
|
232
|
+
}
|
|
233
|
+
function de({ defaultProp: e, onChange: n }) {
|
|
234
|
+
let r = t.useState(e), [i] = r, a = t.useRef(i), o = R(n);
|
|
235
|
+
return t.useEffect(() => {
|
|
236
|
+
a.current !== i && (o(i), a.current = i);
|
|
237
|
+
}, [
|
|
238
|
+
i,
|
|
239
|
+
a,
|
|
240
|
+
o
|
|
241
|
+
]), r;
|
|
242
|
+
}
|
|
243
|
+
function fe({ prop: e, defaultProp: n, onChange: r = () => {} }) {
|
|
244
|
+
let [i, a] = de({
|
|
245
|
+
defaultProp: n,
|
|
246
|
+
onChange: r
|
|
247
|
+
}), o = e !== void 0, s = o ? e : i, c = R(r);
|
|
248
|
+
return [s, t.useCallback((t) => {
|
|
249
|
+
if (o) {
|
|
250
|
+
let n = typeof t == "function" ? t(e) : t;
|
|
251
|
+
n !== e && c(n);
|
|
252
|
+
} else a(t);
|
|
253
|
+
}, [
|
|
254
|
+
o,
|
|
255
|
+
e,
|
|
256
|
+
a,
|
|
257
|
+
c
|
|
258
|
+
])];
|
|
259
|
+
}
|
|
260
|
+
function pe({ activeSnapPointProp: e, setActiveSnapPointProp: n, snapPoints: r, drawerRef: i, overlayRef: a, fadeFromIndex: o, onSnapPointChange: s, direction: c = "bottom", container: l, snapToSequentialPoint: u }) {
|
|
261
|
+
let [d, f] = fe({
|
|
262
|
+
prop: e,
|
|
263
|
+
defaultProp: r?.[0],
|
|
264
|
+
onChange: n
|
|
265
|
+
}), [p, m] = t.useState(typeof window < "u" ? {
|
|
266
|
+
innerWidth: window.innerWidth,
|
|
267
|
+
innerHeight: window.innerHeight
|
|
268
|
+
} : void 0);
|
|
269
|
+
t.useEffect(() => {
|
|
270
|
+
function e() {
|
|
271
|
+
m({
|
|
272
|
+
innerWidth: window.innerWidth,
|
|
273
|
+
innerHeight: window.innerHeight
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
277
|
+
}, []);
|
|
278
|
+
let h = t.useMemo(() => d === r?.[r.length - 1] || null, [r, d]), g = t.useMemo(() => r?.findIndex((e) => e === d) ?? null, [r, d]), _ = r && r.length > 0 && (o || o === 0) && !Number.isNaN(o) && r[o] === d || !r, v = t.useMemo(() => {
|
|
279
|
+
let e = l ? {
|
|
280
|
+
width: l.getBoundingClientRect().width,
|
|
281
|
+
height: l.getBoundingClientRect().height
|
|
282
|
+
} : typeof window < "u" ? {
|
|
283
|
+
width: window.innerWidth,
|
|
284
|
+
height: window.innerHeight
|
|
285
|
+
} : {
|
|
286
|
+
width: 0,
|
|
287
|
+
height: 0
|
|
288
|
+
};
|
|
289
|
+
return r?.map((t) => {
|
|
290
|
+
let n = typeof t == "string", r = 0;
|
|
291
|
+
if (n && (r = parseInt(t, 10)), N(c)) {
|
|
292
|
+
let i = n ? r : p ? t * e.height : 0;
|
|
293
|
+
return p ? c === "bottom" ? e.height - i : -e.height + i : i;
|
|
294
|
+
}
|
|
295
|
+
let i = n ? r : p ? t * e.width : 0;
|
|
296
|
+
return p ? c === "right" ? e.width - i : -e.width + i : i;
|
|
297
|
+
}) ?? [];
|
|
298
|
+
}, [
|
|
299
|
+
r,
|
|
300
|
+
p,
|
|
301
|
+
l
|
|
302
|
+
]), y = t.useMemo(() => g === null ? null : v?.[g], [v, g]), b = t.useCallback((e) => {
|
|
303
|
+
let t = v?.findIndex((t) => t === e) ?? null;
|
|
304
|
+
s(t), M(i.current, {
|
|
305
|
+
transition: `transform ${I.DURATION}s cubic-bezier(${I.EASE.join(",")})`,
|
|
306
|
+
transform: N(c) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)`
|
|
307
|
+
}), v && t !== v.length - 1 && o !== void 0 && t !== o && t < o ? M(a.current, {
|
|
308
|
+
transition: `opacity ${I.DURATION}s cubic-bezier(${I.EASE.join(",")})`,
|
|
309
|
+
opacity: "0"
|
|
310
|
+
}) : M(a.current, {
|
|
311
|
+
transition: `opacity ${I.DURATION}s cubic-bezier(${I.EASE.join(",")})`,
|
|
312
|
+
opacity: "1"
|
|
313
|
+
}), f(r?.[Math.max(t, 0)]);
|
|
314
|
+
}, [
|
|
315
|
+
i.current,
|
|
316
|
+
r,
|
|
317
|
+
v,
|
|
318
|
+
o,
|
|
319
|
+
a,
|
|
320
|
+
f
|
|
321
|
+
]);
|
|
322
|
+
t.useEffect(() => {
|
|
323
|
+
if (d || e) {
|
|
324
|
+
let t = r?.findIndex((t) => t === e || t === d) ?? -1;
|
|
325
|
+
v && t !== -1 && typeof v[t] == "number" && b(v[t]);
|
|
326
|
+
}
|
|
327
|
+
}, [
|
|
328
|
+
d,
|
|
329
|
+
e,
|
|
330
|
+
r,
|
|
331
|
+
v,
|
|
332
|
+
b
|
|
333
|
+
]);
|
|
334
|
+
function x({ draggedDistance: e, closeDrawer: t, velocity: n, dismissible: i }) {
|
|
335
|
+
if (o === void 0) return;
|
|
336
|
+
let s = c === "bottom" || c === "right" ? (y ?? 0) - e : (y ?? 0) + e, l = g === o - 1, d = g === 0, f = e > 0;
|
|
337
|
+
if (l && M(a.current, { transition: `opacity ${I.DURATION}s cubic-bezier(${I.EASE.join(",")})` }), !u && n > 2 && !f) {
|
|
338
|
+
i ? t() : b(v[0]);
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
if (!u && n > 2 && f && v && r) {
|
|
342
|
+
b(v[r.length - 1]);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
let p = v?.reduce((e, t) => typeof e != "number" || typeof t != "number" ? e : Math.abs(t - s) < Math.abs(e - s) ? t : e), m = N(c) ? window.innerHeight : window.innerWidth;
|
|
346
|
+
if (n > ae && Math.abs(e) < m * .4) {
|
|
347
|
+
let e = f ? 1 : -1;
|
|
348
|
+
if (e > 0 && h && r) {
|
|
349
|
+
b(v[r.length - 1]);
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
if (d && e < 0 && i && t(), g === null) return;
|
|
353
|
+
b(v[g + e]);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
b(p);
|
|
357
|
+
}
|
|
358
|
+
function S({ draggedDistance: e }) {
|
|
359
|
+
if (y === null) return;
|
|
360
|
+
let t = c === "bottom" || c === "right" ? y - e : y + e;
|
|
361
|
+
(c === "bottom" || c === "right") && t < v[v.length - 1] || (c === "top" || c === "left") && t > v[v.length - 1] || M(i.current, { transform: N(c) ? `translate3d(0, ${t}px, 0)` : `translate3d(${t}px, 0, 0)` });
|
|
362
|
+
}
|
|
363
|
+
function C(e, t) {
|
|
364
|
+
if (!r || typeof g != "number" || !v || o === void 0) return null;
|
|
365
|
+
let n = g === o - 1;
|
|
366
|
+
if (g >= o && t) return 0;
|
|
367
|
+
if (n && !t) return 1;
|
|
368
|
+
if (!_ && !n) return null;
|
|
369
|
+
let i = n ? g + 1 : g - 1, a = n ? v[i] - v[i - 1] : v[i + 1] - v[i], s = e / Math.abs(a);
|
|
370
|
+
return n ? 1 - s : s;
|
|
371
|
+
}
|
|
372
|
+
return {
|
|
373
|
+
isLastSnapPoint: h,
|
|
374
|
+
activeSnapPoint: d,
|
|
375
|
+
shouldFade: _,
|
|
376
|
+
getPercentageDragged: C,
|
|
377
|
+
setActiveSnapPoint: f,
|
|
378
|
+
activeSnapPointIndex: g,
|
|
379
|
+
onRelease: x,
|
|
380
|
+
onDrag: S,
|
|
381
|
+
snapPointsOffset: v
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
function me() {
|
|
385
|
+
let { direction: e, isOpen: n, shouldScaleBackground: r, setBackgroundColorOnScale: a, noBodyStyles: o } = c(), s = t.useRef(null), l = i(() => document.body.style.backgroundColor, []);
|
|
386
|
+
function u() {
|
|
387
|
+
return (window.innerWidth - le) / window.innerWidth;
|
|
388
|
+
}
|
|
389
|
+
t.useEffect(() => {
|
|
390
|
+
if (n && r) {
|
|
391
|
+
s.current && clearTimeout(s.current);
|
|
392
|
+
let t = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
|
|
393
|
+
if (!t) return;
|
|
394
|
+
a && !o && F(document.body, { background: "black" }), F(t, {
|
|
395
|
+
transformOrigin: N(e) ? "top" : "left",
|
|
396
|
+
transitionProperty: "transform, border-radius",
|
|
397
|
+
transitionDuration: `${I.DURATION}s`,
|
|
398
|
+
transitionTimingFunction: `cubic-bezier(${I.EASE.join(",")})`
|
|
399
|
+
});
|
|
400
|
+
let n = F(t, {
|
|
401
|
+
borderRadius: `${ce}px`,
|
|
402
|
+
overflow: "hidden",
|
|
403
|
+
...N(e) ? { transform: `scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)` } : { transform: `scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)` }
|
|
404
|
+
});
|
|
405
|
+
return () => {
|
|
406
|
+
n(), s.current = window.setTimeout(() => {
|
|
407
|
+
l ? document.body.style.background = l : document.body.style.removeProperty("background");
|
|
408
|
+
}, I.DURATION * 1e3);
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
}, [
|
|
412
|
+
n,
|
|
413
|
+
r,
|
|
414
|
+
l
|
|
415
|
+
]);
|
|
416
|
+
}
|
|
417
|
+
var z = null;
|
|
418
|
+
function he({ isOpen: e, modal: n, nested: r, hasBeenOpened: i, preventScrollRestoration: a, noBodyStyles: o }) {
|
|
419
|
+
let [s, c] = t.useState(() => typeof window < "u" ? window.location.href : ""), l = t.useRef(0), u = t.useCallback(() => {
|
|
420
|
+
if (f() && z === null && e && !o) {
|
|
421
|
+
z = {
|
|
422
|
+
position: document.body.style.position,
|
|
423
|
+
top: document.body.style.top,
|
|
424
|
+
left: document.body.style.left,
|
|
425
|
+
height: document.body.style.height,
|
|
426
|
+
right: "unset"
|
|
427
|
+
};
|
|
428
|
+
let { scrollX: e, innerHeight: t } = window;
|
|
429
|
+
document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
|
|
430
|
+
top: `${-l.current}px`,
|
|
431
|
+
left: `${-e}px`,
|
|
432
|
+
right: "0px",
|
|
433
|
+
height: "auto"
|
|
434
|
+
}), window.setTimeout(() => window.requestAnimationFrame(() => {
|
|
435
|
+
let e = t - window.innerHeight;
|
|
436
|
+
e && l.current >= t && (document.body.style.top = `${-(l.current + e)}px`);
|
|
437
|
+
}), 300);
|
|
438
|
+
}
|
|
439
|
+
}, [e]), d = t.useCallback(() => {
|
|
440
|
+
if (f() && z !== null && !o) {
|
|
441
|
+
let e = -parseInt(document.body.style.top, 10), t = -parseInt(document.body.style.left, 10);
|
|
442
|
+
Object.assign(document.body.style, z), window.requestAnimationFrame(() => {
|
|
443
|
+
if (a && s !== window.location.href) {
|
|
444
|
+
c(window.location.href);
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
window.scrollTo(t, e);
|
|
448
|
+
}), z = null;
|
|
449
|
+
}
|
|
450
|
+
}, [s]);
|
|
451
|
+
return t.useEffect(() => {
|
|
452
|
+
function e() {
|
|
453
|
+
l.current = window.scrollY;
|
|
454
|
+
}
|
|
455
|
+
return e(), window.addEventListener("scroll", e), () => {
|
|
456
|
+
window.removeEventListener("scroll", e);
|
|
457
|
+
};
|
|
458
|
+
}, []), t.useEffect(() => {
|
|
459
|
+
if (n) return () => {
|
|
460
|
+
typeof document > "u" || document.querySelector("[data-vaul-drawer]") || d();
|
|
461
|
+
};
|
|
462
|
+
}, [n, d]), t.useEffect(() => {
|
|
463
|
+
r || !i || (e ? (!window.matchMedia("(display-mode: standalone)").matches && u(), n || window.setTimeout(() => {
|
|
464
|
+
d();
|
|
465
|
+
}, 500)) : d());
|
|
466
|
+
}, [
|
|
467
|
+
e,
|
|
468
|
+
i,
|
|
469
|
+
s,
|
|
470
|
+
n,
|
|
471
|
+
r,
|
|
472
|
+
u,
|
|
473
|
+
d
|
|
474
|
+
]), { restorePositionSetting: d };
|
|
475
|
+
}
|
|
476
|
+
function B({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: o, snapPoints: c, shouldScaleBackground: u = !1, setBackgroundColorOnScale: d = !0, closeThreshold: f = oe, scrollLockTimeout: p = se, dismissible: h = !0, handleOnly: g = !1, fadeFromIndex: _ = c && c.length - 1, activeSnapPoint: v, setActiveSnapPoint: y, fixed: b, modal: x = !0, onClose: S, nested: C, noBodyStyles: w = !1, direction: T = "bottom", defaultOpen: E = !1, disablePreventScroll: D = !0, snapToSequentialPoint: O = !1, preventScrollRestoration: A = !1, repositionInputs: te = !0, onAnimationEnd: ne, container: j, autoFocus: F = !1 }) {
|
|
477
|
+
let [R = !1, de] = fe({
|
|
478
|
+
defaultProp: E,
|
|
479
|
+
prop: e,
|
|
480
|
+
onChange: (e) => {
|
|
481
|
+
n?.(e), !e && !C && je(), setTimeout(() => {
|
|
482
|
+
ne?.(e);
|
|
483
|
+
}, I.DURATION * 1e3), e && !x && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
484
|
+
document.body.style.pointerEvents = "auto";
|
|
485
|
+
}), e || (document.body.style.pointerEvents = "auto");
|
|
486
|
+
}
|
|
487
|
+
}), [me, z] = t.useState(!1), [B, V] = t.useState(!1), [ge, _e] = t.useState(!1), H = t.useRef(null), U = t.useRef(null), W = t.useRef(null), G = t.useRef(null), K = t.useRef(null), q = t.useRef(!1), ve = t.useRef(null), ye = t.useRef(0), J = t.useRef(!1), be = t.useRef(!E), xe = t.useRef(0), Y = t.useRef(null), Se = t.useRef(Y.current?.getBoundingClientRect().height || 0), Ce = t.useRef(Y.current?.getBoundingClientRect().width || 0), we = t.useRef(0), { activeSnapPoint: Te, activeSnapPointIndex: X, setActiveSnapPoint: Ee, onRelease: De, snapPointsOffset: Z, onDrag: Oe, shouldFade: ke, getPercentageDragged: Ae } = pe({
|
|
488
|
+
snapPoints: c,
|
|
489
|
+
activeSnapPointProp: v,
|
|
490
|
+
setActiveSnapPointProp: y,
|
|
491
|
+
drawerRef: Y,
|
|
492
|
+
fadeFromIndex: _,
|
|
493
|
+
overlayRef: H,
|
|
494
|
+
onSnapPointChange: t.useCallback((e) => {
|
|
495
|
+
c && e === Z.length - 1 && (U.current = /* @__PURE__ */ new Date());
|
|
496
|
+
}, []),
|
|
497
|
+
direction: T,
|
|
498
|
+
container: j,
|
|
499
|
+
snapToSequentialPoint: O
|
|
500
|
+
});
|
|
501
|
+
ee({ isDisabled: !R || B || !x || ge || !me || !te || !D });
|
|
502
|
+
let { restorePositionSetting: je } = he({
|
|
503
|
+
isOpen: R,
|
|
504
|
+
modal: x,
|
|
505
|
+
nested: C ?? !1,
|
|
506
|
+
hasBeenOpened: me,
|
|
507
|
+
preventScrollRestoration: A,
|
|
508
|
+
noBodyStyles: w
|
|
509
|
+
});
|
|
510
|
+
function Q() {
|
|
511
|
+
return (window.innerWidth - le) / window.innerWidth;
|
|
512
|
+
}
|
|
513
|
+
function Me(e) {
|
|
514
|
+
!h && !c || Y.current && !Y.current.contains(e.target) || (Se.current = Y.current?.getBoundingClientRect().height || 0, Ce.current = Y.current?.getBoundingClientRect().width || 0, V(!0), W.current = /* @__PURE__ */ new Date(), m() && window.addEventListener("touchend", () => q.current = !1, { once: !0 }), e.target.setPointerCapture(e.pointerId), ye.current = N(T) ? e.pageY : e.pageX);
|
|
515
|
+
}
|
|
516
|
+
function Ne(e, t) {
|
|
517
|
+
let n = e, r = window.getSelection()?.toString(), i = Y.current ? P(Y.current, T) : null, a = /* @__PURE__ */ new Date();
|
|
518
|
+
if (n.tagName === "SELECT" || n.hasAttribute("data-vaul-no-drag") || n.closest("[data-vaul-no-drag]")) return !1;
|
|
519
|
+
if (T === "right" || T === "left") return !0;
|
|
520
|
+
if (U.current && a.getTime() - U.current.getTime() < 500) return !1;
|
|
521
|
+
if (i !== null && (T === "bottom" ? i > 0 : i < 0)) return !0;
|
|
522
|
+
if (r && r.length > 0) return !1;
|
|
523
|
+
if (K.current && a.getTime() - K.current.getTime() < p && i === 0 || t) return K.current = a, !1;
|
|
524
|
+
for (; n;) {
|
|
525
|
+
if (n.scrollHeight > n.clientHeight) {
|
|
526
|
+
if (n.scrollTop !== 0) return K.current = /* @__PURE__ */ new Date(), !1;
|
|
527
|
+
if (n.getAttribute("role") === "dialog") return !0;
|
|
528
|
+
}
|
|
529
|
+
n = n.parentNode;
|
|
530
|
+
}
|
|
531
|
+
return !0;
|
|
532
|
+
}
|
|
533
|
+
function Pe(e) {
|
|
534
|
+
if (Y.current && B) {
|
|
535
|
+
let t = T === "bottom" || T === "right" ? 1 : -1, n = (ye.current - (N(T) ? e.pageY : e.pageX)) * t, r = n > 0, a = c && !h && !r;
|
|
536
|
+
if (a && X === 0) return;
|
|
537
|
+
let o = Math.abs(n), s = document.querySelector("[data-vaul-drawer-wrapper]"), l = o / (T === "bottom" || T === "top" ? Se.current : Ce.current), d = Ae(o, r);
|
|
538
|
+
if (d !== null && (l = d), a && l >= 1 || !q.current && !Ne(e.target, r)) return;
|
|
539
|
+
if (Y.current.classList.add(ue), q.current = !0, M(Y.current, { transition: "none" }), M(H.current, { transition: "none" }), c && Oe({ draggedDistance: n }), r && !c) {
|
|
540
|
+
let e = ie(n), r = Math.min(e * -1, 0) * t;
|
|
541
|
+
M(Y.current, { transform: N(T) ? `translate3d(0, ${r}px, 0)` : `translate3d(${r}px, 0, 0)` });
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
let f = 1 - l;
|
|
545
|
+
if ((ke || _ && X === _ - 1) && (i?.(e, l), M(H.current, {
|
|
546
|
+
opacity: `${f}`,
|
|
547
|
+
transition: "none"
|
|
548
|
+
}, !0)), s && H.current && u) {
|
|
549
|
+
let e = Math.min(Q() + l * (1 - Q()), 1), t = 8 - l * 8, n = Math.max(0, 14 - l * 14);
|
|
550
|
+
M(s, {
|
|
551
|
+
borderRadius: `${t}px`,
|
|
552
|
+
transform: N(T) ? `scale(${e}) translate3d(0, ${n}px, 0)` : `scale(${e}) translate3d(${n}px, 0, 0)`,
|
|
553
|
+
transition: "none"
|
|
554
|
+
}, !0);
|
|
555
|
+
}
|
|
556
|
+
if (!c) {
|
|
557
|
+
let e = o * t;
|
|
558
|
+
M(Y.current, { transform: N(T) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)` });
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
t.useEffect(() => {
|
|
563
|
+
window.requestAnimationFrame(() => {
|
|
564
|
+
be.current = !0;
|
|
565
|
+
});
|
|
566
|
+
}, []), t.useEffect(() => {
|
|
567
|
+
var e;
|
|
568
|
+
function t() {
|
|
569
|
+
if (!Y.current || !te) return;
|
|
570
|
+
let e = document.activeElement;
|
|
571
|
+
if (k(e) || J.current) {
|
|
572
|
+
let e = window.visualViewport?.height || 0, t = window.innerHeight, n = t - e, r = Y.current.getBoundingClientRect().height || 0, i = r > t * .8;
|
|
573
|
+
we.current ||= r;
|
|
574
|
+
let a = Y.current.getBoundingClientRect().top;
|
|
575
|
+
if (Math.abs(xe.current - n) > 60 && (J.current = !J.current), c && c.length > 0 && Z && X) {
|
|
576
|
+
let e = Z[X] || 0;
|
|
577
|
+
n += e;
|
|
578
|
+
}
|
|
579
|
+
if (xe.current = n, r > e || J.current) {
|
|
580
|
+
let t = Y.current.getBoundingClientRect().height, r = t;
|
|
581
|
+
t > e && (r = e - (i ? a : le)), b ? Y.current.style.height = `${t - Math.max(n, 0)}px` : Y.current.style.height = `${Math.max(r, e - a)}px`;
|
|
582
|
+
} else l() || (Y.current.style.height = `${we.current}px`);
|
|
583
|
+
c && c.length > 0 && !J.current ? Y.current.style.bottom = "0px" : Y.current.style.bottom = `${Math.max(n, 0)}px`;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return (e = window.visualViewport) == null || e.addEventListener("resize", t), () => window.visualViewport?.removeEventListener("resize", t);
|
|
587
|
+
}, [
|
|
588
|
+
X,
|
|
589
|
+
c,
|
|
590
|
+
Z
|
|
591
|
+
]);
|
|
592
|
+
function $(e) {
|
|
593
|
+
Ie(), S?.(), e || de(!1), setTimeout(() => {
|
|
594
|
+
c && Ee(c[0]);
|
|
595
|
+
}, I.DURATION * 1e3);
|
|
596
|
+
}
|
|
597
|
+
function Fe() {
|
|
598
|
+
if (!Y.current) return;
|
|
599
|
+
let e = document.querySelector("[data-vaul-drawer-wrapper]"), t = P(Y.current, T);
|
|
600
|
+
M(Y.current, {
|
|
601
|
+
transform: "translate3d(0, 0, 0)",
|
|
602
|
+
transition: `transform ${I.DURATION}s cubic-bezier(${I.EASE.join(",")})`
|
|
603
|
+
}), M(H.current, {
|
|
604
|
+
transition: `opacity ${I.DURATION}s cubic-bezier(${I.EASE.join(",")})`,
|
|
605
|
+
opacity: "1"
|
|
606
|
+
}), u && t && t > 0 && R && M(e, {
|
|
607
|
+
borderRadius: `${ce}px`,
|
|
608
|
+
overflow: "hidden",
|
|
609
|
+
...N(T) ? {
|
|
610
|
+
transform: `scale(${Q()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
611
|
+
transformOrigin: "top"
|
|
612
|
+
} : {
|
|
613
|
+
transform: `scale(${Q()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
614
|
+
transformOrigin: "left"
|
|
615
|
+
},
|
|
616
|
+
transitionProperty: "transform, border-radius",
|
|
617
|
+
transitionDuration: `${I.DURATION}s`,
|
|
618
|
+
transitionTimingFunction: `cubic-bezier(${I.EASE.join(",")})`
|
|
619
|
+
}, !0);
|
|
620
|
+
}
|
|
621
|
+
function Ie() {
|
|
622
|
+
!B || !Y.current || (Y.current.classList.remove(ue), q.current = !1, V(!1), G.current = /* @__PURE__ */ new Date());
|
|
623
|
+
}
|
|
624
|
+
function Le(e) {
|
|
625
|
+
if (!B || !Y.current) return;
|
|
626
|
+
Y.current.classList.remove(ue), q.current = !1, V(!1), G.current = /* @__PURE__ */ new Date();
|
|
627
|
+
let t = P(Y.current, T);
|
|
628
|
+
if (!e || !Ne(e.target, !1) || !t || Number.isNaN(t) || W.current === null) return;
|
|
629
|
+
let n = G.current.getTime() - W.current.getTime(), r = ye.current - (N(T) ? e.pageY : e.pageX), i = Math.abs(r) / n;
|
|
630
|
+
if (i > .05 && (_e(!0), setTimeout(() => {
|
|
631
|
+
_e(!1);
|
|
632
|
+
}, 200)), c) {
|
|
633
|
+
De({
|
|
634
|
+
draggedDistance: r * (T === "bottom" || T === "right" ? 1 : -1),
|
|
635
|
+
closeDrawer: $,
|
|
636
|
+
velocity: i,
|
|
637
|
+
dismissible: h
|
|
638
|
+
}), o?.(e, !0);
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
if (T === "bottom" || T === "right" ? r > 0 : r < 0) {
|
|
642
|
+
Fe(), o?.(e, !0);
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
if (i > ae) {
|
|
646
|
+
$(), o?.(e, !1);
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
let a = Math.min(Y.current.getBoundingClientRect().height ?? 0, window.innerHeight), s = Math.min(Y.current.getBoundingClientRect().width ?? 0, window.innerWidth);
|
|
650
|
+
if (Math.abs(t) >= (T === "left" || T === "right" ? s : a) * f) {
|
|
651
|
+
$(), o?.(e, !1);
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
654
|
+
o?.(e, !0), Fe();
|
|
655
|
+
}
|
|
656
|
+
t.useEffect(() => (R && (M(document.documentElement, { scrollBehavior: "auto" }), U.current = /* @__PURE__ */ new Date()), () => {
|
|
657
|
+
re(document.documentElement, "scrollBehavior");
|
|
658
|
+
}), [R]);
|
|
659
|
+
function Re(e) {
|
|
660
|
+
let t = e ? (window.innerWidth - L) / window.innerWidth : 1, n = e ? -L : 0;
|
|
661
|
+
ve.current && window.clearTimeout(ve.current), M(Y.current, {
|
|
662
|
+
transition: `transform ${I.DURATION}s cubic-bezier(${I.EASE.join(",")})`,
|
|
663
|
+
transform: N(T) ? `scale(${t}) translate3d(0, ${n}px, 0)` : `scale(${t}) translate3d(${n}px, 0, 0)`
|
|
664
|
+
}), !e && Y.current && (ve.current = setTimeout(() => {
|
|
665
|
+
let e = P(Y.current, T);
|
|
666
|
+
M(Y.current, {
|
|
667
|
+
transition: "none",
|
|
668
|
+
transform: N(T) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)`
|
|
669
|
+
});
|
|
670
|
+
}, 500));
|
|
671
|
+
}
|
|
672
|
+
function ze(e, t) {
|
|
673
|
+
if (t < 0) return;
|
|
674
|
+
let n = (window.innerWidth - L) / window.innerWidth, r = n + t * (1 - n), i = -L + t * L;
|
|
675
|
+
M(Y.current, {
|
|
676
|
+
transform: N(T) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`,
|
|
677
|
+
transition: "none"
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
function Be(e, t) {
|
|
681
|
+
let n = N(T) ? window.innerHeight : window.innerWidth, r = t ? (n - L) / n : 1, i = t ? -L : 0;
|
|
682
|
+
t && M(Y.current, {
|
|
683
|
+
transition: `transform ${I.DURATION}s cubic-bezier(${I.EASE.join(",")})`,
|
|
684
|
+
transform: N(T) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
return t.useEffect(() => {
|
|
688
|
+
x || window.requestAnimationFrame(() => {
|
|
689
|
+
document.body.style.pointerEvents = "auto";
|
|
690
|
+
});
|
|
691
|
+
}, [x]), /* @__PURE__ */ t.createElement(a.Root, {
|
|
692
|
+
defaultOpen: E,
|
|
693
|
+
onOpenChange: (e) => {
|
|
694
|
+
!h && !e || (e ? z(!0) : $(!0), de(e));
|
|
695
|
+
},
|
|
696
|
+
open: R,
|
|
697
|
+
modal: x
|
|
698
|
+
}, /* @__PURE__ */ t.createElement(s.Provider, { value: {
|
|
699
|
+
activeSnapPoint: Te,
|
|
700
|
+
snapPoints: c,
|
|
701
|
+
setActiveSnapPoint: Ee,
|
|
702
|
+
drawerRef: Y,
|
|
703
|
+
overlayRef: H,
|
|
704
|
+
onOpenChange: n,
|
|
705
|
+
onPress: Me,
|
|
706
|
+
onRelease: Le,
|
|
707
|
+
onDrag: Pe,
|
|
708
|
+
dismissible: h,
|
|
709
|
+
shouldAnimate: be,
|
|
710
|
+
handleOnly: g,
|
|
711
|
+
isOpen: R,
|
|
712
|
+
isDragging: B,
|
|
713
|
+
shouldFade: ke,
|
|
714
|
+
closeDrawer: $,
|
|
715
|
+
onNestedDrag: ze,
|
|
716
|
+
onNestedOpenChange: Re,
|
|
717
|
+
onNestedRelease: Be,
|
|
718
|
+
keyboardIsOpen: J,
|
|
719
|
+
modal: x,
|
|
720
|
+
snapPointsOffset: Z,
|
|
721
|
+
activeSnapPointIndex: X,
|
|
722
|
+
direction: T,
|
|
723
|
+
shouldScaleBackground: u,
|
|
724
|
+
setBackgroundColorOnScale: d,
|
|
725
|
+
noBodyStyles: w,
|
|
726
|
+
container: j,
|
|
727
|
+
autoFocus: F
|
|
728
|
+
} }, r));
|
|
729
|
+
}
|
|
730
|
+
var V = /* @__PURE__ */ t.forwardRef(function({ ...e }, n) {
|
|
731
|
+
let { overlayRef: r, snapPoints: i, onRelease: o, shouldFade: s, isOpen: l, modal: u, shouldAnimate: d } = c(), f = ne(n, r), p = i && i.length > 0;
|
|
732
|
+
if (!u) return null;
|
|
733
|
+
let m = t.useCallback((e) => o(e), [o]);
|
|
734
|
+
return /* @__PURE__ */ t.createElement(a.Overlay, {
|
|
735
|
+
onMouseUp: m,
|
|
736
|
+
ref: f,
|
|
737
|
+
"data-vaul-overlay": "",
|
|
738
|
+
"data-vaul-snap-points": l && p ? "true" : "false",
|
|
739
|
+
"data-vaul-snap-points-overlay": l && s ? "true" : "false",
|
|
740
|
+
"data-vaul-animate": d?.current ? "true" : "false",
|
|
741
|
+
...e
|
|
742
|
+
});
|
|
1407
743
|
});
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
},
|
|
1482
|
-
onPointerDownOutside: (e)=>{
|
|
1483
|
-
onPointerDownOutside == null ? void 0 : onPointerDownOutside(e);
|
|
1484
|
-
if (!modal || e.defaultPrevented) {
|
|
1485
|
-
e.preventDefault();
|
|
1486
|
-
return;
|
|
1487
|
-
}
|
|
1488
|
-
if (keyboardIsOpen.current) {
|
|
1489
|
-
keyboardIsOpen.current = false;
|
|
1490
|
-
}
|
|
1491
|
-
},
|
|
1492
|
-
onFocusOutside: (e)=>{
|
|
1493
|
-
if (!modal) {
|
|
1494
|
-
e.preventDefault();
|
|
1495
|
-
return;
|
|
1496
|
-
}
|
|
1497
|
-
},
|
|
1498
|
-
onPointerMove: (event)=>{
|
|
1499
|
-
lastKnownPointerEventRef.current = event;
|
|
1500
|
-
if (handleOnly) return;
|
|
1501
|
-
rest.onPointerMove == null ? void 0 : rest.onPointerMove.call(rest, event);
|
|
1502
|
-
if (!pointerStartRef.current) return;
|
|
1503
|
-
const yPosition = event.pageY - pointerStartRef.current.y;
|
|
1504
|
-
const xPosition = event.pageX - pointerStartRef.current.x;
|
|
1505
|
-
const swipeStartThreshold = event.pointerType === 'touch' ? 10 : 2;
|
|
1506
|
-
const delta = {
|
|
1507
|
-
x: xPosition,
|
|
1508
|
-
y: yPosition
|
|
1509
|
-
};
|
|
1510
|
-
const isAllowedToSwipe = isDeltaInDirection(delta, direction, swipeStartThreshold);
|
|
1511
|
-
if (isAllowedToSwipe) onDrag(event);
|
|
1512
|
-
else if (Math.abs(xPosition) > swipeStartThreshold || Math.abs(yPosition) > swipeStartThreshold) {
|
|
1513
|
-
pointerStartRef.current = null;
|
|
1514
|
-
}
|
|
1515
|
-
},
|
|
1516
|
-
onPointerUp: (event)=>{
|
|
1517
|
-
rest.onPointerUp == null ? void 0 : rest.onPointerUp.call(rest, event);
|
|
1518
|
-
pointerStartRef.current = null;
|
|
1519
|
-
wasBeyondThePointRef.current = false;
|
|
1520
|
-
onRelease(event);
|
|
1521
|
-
},
|
|
1522
|
-
onPointerOut: (event)=>{
|
|
1523
|
-
rest.onPointerOut == null ? void 0 : rest.onPointerOut.call(rest, event);
|
|
1524
|
-
handleOnPointerUp(lastKnownPointerEventRef.current);
|
|
1525
|
-
},
|
|
1526
|
-
onContextMenu: (event)=>{
|
|
1527
|
-
rest.onContextMenu == null ? void 0 : rest.onContextMenu.call(rest, event);
|
|
1528
|
-
if (lastKnownPointerEventRef.current) {
|
|
1529
|
-
handleOnPointerUp(lastKnownPointerEventRef.current);
|
|
1530
|
-
}
|
|
1531
|
-
}
|
|
1532
|
-
});
|
|
744
|
+
V.displayName = "Drawer.Overlay";
|
|
745
|
+
var ge = /* @__PURE__ */ t.forwardRef(function({ onPointerDownOutside: e, style: n, onOpenAutoFocus: r, ...i }, o) {
|
|
746
|
+
let { drawerRef: s, onPress: l, onRelease: u, onDrag: d, keyboardIsOpen: f, snapPointsOffset: p, activeSnapPointIndex: m, modal: h, isOpen: g, direction: _, snapPoints: v, container: y, handleOnly: b, shouldAnimate: x, autoFocus: S } = c(), [C, w] = t.useState(!1), ee = ne(o, s), T = t.useRef(null), E = t.useRef(null), D = t.useRef(!1), O = v && v.length > 0;
|
|
747
|
+
me();
|
|
748
|
+
let k = (e, t, n = 0) => {
|
|
749
|
+
if (D.current) return !0;
|
|
750
|
+
let r = Math.abs(e.y), i = Math.abs(e.x), a = i > r, o = ["bottom", "right"].includes(t) ? 1 : -1;
|
|
751
|
+
if (t === "left" || t === "right") {
|
|
752
|
+
if (!(e.x * o < 0) && i >= 0 && i <= n) return a;
|
|
753
|
+
} else if (!(e.y * o < 0) && r >= 0 && r <= n) return !a;
|
|
754
|
+
return D.current = !0, !0;
|
|
755
|
+
};
|
|
756
|
+
t.useEffect(() => {
|
|
757
|
+
O && window.requestAnimationFrame(() => {
|
|
758
|
+
w(!0);
|
|
759
|
+
});
|
|
760
|
+
}, []);
|
|
761
|
+
function A(e) {
|
|
762
|
+
T.current = null, D.current = !1, u(e);
|
|
763
|
+
}
|
|
764
|
+
return /* @__PURE__ */ t.createElement(a.Content, {
|
|
765
|
+
"data-vaul-drawer-direction": _,
|
|
766
|
+
"data-vaul-drawer": "",
|
|
767
|
+
"data-vaul-delayed-snap-points": C ? "true" : "false",
|
|
768
|
+
"data-vaul-snap-points": g && O ? "true" : "false",
|
|
769
|
+
"data-vaul-custom-container": y ? "true" : "false",
|
|
770
|
+
"data-vaul-animate": x?.current ? "true" : "false",
|
|
771
|
+
...i,
|
|
772
|
+
ref: ee,
|
|
773
|
+
style: p && p.length > 0 ? {
|
|
774
|
+
"--snap-point-height": `${p[m ?? 0]}px`,
|
|
775
|
+
...n
|
|
776
|
+
} : n,
|
|
777
|
+
onPointerDown: (e) => {
|
|
778
|
+
b || (i.onPointerDown == null || i.onPointerDown.call(i, e), T.current = {
|
|
779
|
+
x: e.pageX,
|
|
780
|
+
y: e.pageY
|
|
781
|
+
}, l(e));
|
|
782
|
+
},
|
|
783
|
+
onOpenAutoFocus: (e) => {
|
|
784
|
+
r?.(e), S || e.preventDefault();
|
|
785
|
+
},
|
|
786
|
+
onPointerDownOutside: (t) => {
|
|
787
|
+
if (e?.(t), !h || t.defaultPrevented) {
|
|
788
|
+
t.preventDefault();
|
|
789
|
+
return;
|
|
790
|
+
}
|
|
791
|
+
f.current &&= !1;
|
|
792
|
+
},
|
|
793
|
+
onFocusOutside: (e) => {
|
|
794
|
+
if (!h) {
|
|
795
|
+
e.preventDefault();
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
onPointerMove: (e) => {
|
|
800
|
+
if (E.current = e, b || (i.onPointerMove == null || i.onPointerMove.call(i, e), !T.current)) return;
|
|
801
|
+
let t = e.pageY - T.current.y, n = e.pageX - T.current.x, r = e.pointerType === "touch" ? 10 : 2;
|
|
802
|
+
k({
|
|
803
|
+
x: n,
|
|
804
|
+
y: t
|
|
805
|
+
}, _, r) ? d(e) : (Math.abs(n) > r || Math.abs(t) > r) && (T.current = null);
|
|
806
|
+
},
|
|
807
|
+
onPointerUp: (e) => {
|
|
808
|
+
i.onPointerUp == null || i.onPointerUp.call(i, e), T.current = null, D.current = !1, u(e);
|
|
809
|
+
},
|
|
810
|
+
onPointerOut: (e) => {
|
|
811
|
+
i.onPointerOut == null || i.onPointerOut.call(i, e), A(E.current);
|
|
812
|
+
},
|
|
813
|
+
onContextMenu: (e) => {
|
|
814
|
+
i.onContextMenu == null || i.onContextMenu.call(i, e), E.current && A(E.current);
|
|
815
|
+
}
|
|
816
|
+
});
|
|
1533
817
|
});
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
onPointerDown: (e)=>{
|
|
1591
|
-
if (handleOnly) onPress(e);
|
|
1592
|
-
handleStartInteraction();
|
|
1593
|
-
},
|
|
1594
|
-
onPointerMove: (e)=>{
|
|
1595
|
-
if (handleOnly) onDrag(e);
|
|
1596
|
-
},
|
|
1597
|
-
// onPointerUp is already handled by the content component
|
|
1598
|
-
ref: ref,
|
|
1599
|
-
"data-vaul-drawer-visible": isOpen ? 'true' : 'false',
|
|
1600
|
-
"data-vaul-handle": "",
|
|
1601
|
-
"aria-hidden": "true",
|
|
1602
|
-
...rest
|
|
1603
|
-
}, /*#__PURE__*/ React__default.createElement("span", {
|
|
1604
|
-
"data-vaul-handle-hitarea": "",
|
|
1605
|
-
"aria-hidden": "true"
|
|
1606
|
-
}, children));
|
|
818
|
+
ge.displayName = "Drawer.Content";
|
|
819
|
+
var _e = 250, H = 120, U = /* @__PURE__ */ t.forwardRef(function({ preventCycle: e = !1, children: n, ...r }, i) {
|
|
820
|
+
let { closeDrawer: a, isDragging: o, snapPoints: s, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: d, handleOnly: f, isOpen: p, onPress: m, onDrag: h } = c(), g = t.useRef(null), _ = t.useRef(!1);
|
|
821
|
+
function v() {
|
|
822
|
+
if (_.current) {
|
|
823
|
+
x();
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
window.setTimeout(() => {
|
|
827
|
+
y();
|
|
828
|
+
}, H);
|
|
829
|
+
}
|
|
830
|
+
function y() {
|
|
831
|
+
if (o || e || _.current) {
|
|
832
|
+
x();
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
835
|
+
if (x(), !s || s.length === 0) {
|
|
836
|
+
d || a();
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
if (l === s[s.length - 1] && d) {
|
|
840
|
+
a();
|
|
841
|
+
return;
|
|
842
|
+
}
|
|
843
|
+
let t = s.findIndex((e) => e === l);
|
|
844
|
+
if (t === -1) return;
|
|
845
|
+
let n = s[t + 1];
|
|
846
|
+
u(n);
|
|
847
|
+
}
|
|
848
|
+
function b() {
|
|
849
|
+
g.current = window.setTimeout(() => {
|
|
850
|
+
_.current = !0;
|
|
851
|
+
}, _e);
|
|
852
|
+
}
|
|
853
|
+
function x() {
|
|
854
|
+
g.current && window.clearTimeout(g.current), _.current = !1;
|
|
855
|
+
}
|
|
856
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
857
|
+
onClick: v,
|
|
858
|
+
onPointerCancel: x,
|
|
859
|
+
onPointerDown: (e) => {
|
|
860
|
+
f && m(e), b();
|
|
861
|
+
},
|
|
862
|
+
onPointerMove: (e) => {
|
|
863
|
+
f && h(e);
|
|
864
|
+
},
|
|
865
|
+
ref: i,
|
|
866
|
+
"data-vaul-drawer-visible": p ? "true" : "false",
|
|
867
|
+
"data-vaul-handle": "",
|
|
868
|
+
"aria-hidden": "true",
|
|
869
|
+
...r
|
|
870
|
+
}, /* @__PURE__ */ t.createElement("span", {
|
|
871
|
+
"data-vaul-handle-hitarea": "",
|
|
872
|
+
"aria-hidden": "true"
|
|
873
|
+
}, n));
|
|
1607
874
|
});
|
|
1608
|
-
|
|
1609
|
-
function
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
875
|
+
U.displayName = "Drawer.Handle";
|
|
876
|
+
function W({ onDrag: e, onOpenChange: n, open: r, ...i }) {
|
|
877
|
+
let { onNestedDrag: a, onNestedOpenChange: o, onNestedRelease: s } = c();
|
|
878
|
+
if (!a) throw Error("Drawer.NestedRoot must be placed in another drawer");
|
|
879
|
+
return /* @__PURE__ */ t.createElement(B, {
|
|
880
|
+
nested: !0,
|
|
881
|
+
open: r,
|
|
882
|
+
onClose: () => {
|
|
883
|
+
o(!1);
|
|
884
|
+
},
|
|
885
|
+
onDrag: (t, n) => {
|
|
886
|
+
a(t, n), e?.(t, n);
|
|
887
|
+
},
|
|
888
|
+
onOpenChange: (e) => {
|
|
889
|
+
e && o(e), n?.(e);
|
|
890
|
+
},
|
|
891
|
+
onRelease: s,
|
|
892
|
+
...i
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
function G(e) {
|
|
896
|
+
let n = c(), { container: r = n.container, ...i } = e;
|
|
897
|
+
return /* @__PURE__ */ t.createElement(a.Portal, {
|
|
898
|
+
container: r,
|
|
899
|
+
...i
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
var K = {
|
|
903
|
+
Root: B,
|
|
904
|
+
NestedRoot: W,
|
|
905
|
+
Content: ge,
|
|
906
|
+
Overlay: V,
|
|
907
|
+
Trigger: a.Trigger,
|
|
908
|
+
Portal: G,
|
|
909
|
+
Handle: U,
|
|
910
|
+
Close: a.Close,
|
|
911
|
+
Title: a.Title,
|
|
912
|
+
Description: a.Description
|
|
1625
913
|
};
|
|
914
|
+
//#endregion
|
|
915
|
+
export { K as Drawer };
|
|
1626
916
|
|
|
1627
|
-
|
|
1628
|
-
//# sourceMappingURL=index.js.map
|
|
917
|
+
//# sourceMappingURL=index.js.map
|