@b3dotfun/sdk 0.1.66 → 0.1.68
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/cjs/anyspend/react/components/AnySpend.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/AnySpend.js +40 -11
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +6 -1
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +16 -14
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +40 -10
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +10 -1
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +5 -4
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendTournament.d.ts +11 -0
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +2 -2
- package/dist/cjs/anyspend/react/components/checkout/AddressForm.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/checkout/AddressForm.js +14 -0
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.d.ts +117 -0
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.js +158 -0
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +81 -0
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +61 -0
- package/dist/cjs/anyspend/react/components/checkout/CartItemRow.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/checkout/CartItemRow.js +9 -0
- package/dist/cjs/anyspend/react/components/checkout/CartSummary.d.ts +30 -0
- package/dist/cjs/anyspend/react/components/checkout/CartSummary.js +20 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +32 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.js +27 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormField.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormField.js +31 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +39 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.js +75 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutLayout.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutLayout.js +13 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutOrderStatus.d.ts +28 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutOrderStatus.js +65 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +31 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.js +64 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.js +31 -0
- package/dist/cjs/anyspend/react/components/checkout/CoinbaseCheckoutPanel.d.ts +20 -0
- package/dist/cjs/anyspend/react/components/checkout/CoinbaseCheckoutPanel.js +170 -0
- package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.d.ts +23 -0
- package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.js +324 -0
- package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.d.ts +12 -0
- package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.js +62 -0
- package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.d.ts +20 -0
- package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.js +269 -0
- package/dist/cjs/anyspend/react/components/checkout/PoweredByBranding.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/checkout/PoweredByBranding.js +9 -0
- package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.d.ts +11 -0
- package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.js +20 -0
- package/dist/cjs/anyspend/react/components/common/ConnectWalletPayment.js +19 -5
- package/dist/cjs/anyspend/react/components/common/CryptoPaySection.js +1 -1
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethodDisplay.js +1 -1
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +4 -4
- package/dist/cjs/anyspend/react/components/common/OrderStatus.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/common/OrderStatus.js +93 -19
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +4 -4
- package/dist/cjs/anyspend/react/components/common/PaySection.js +1 -1
- package/dist/cjs/anyspend/react/components/common/StepProgress.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/common/StepProgress.js +6 -11
- package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.js +1 -1
- package/dist/cjs/anyspend/react/components/common/TransferResultScreen.js +5 -1
- package/dist/cjs/anyspend/react/components/context/AnySpendCustomizationContext.d.ts +16 -0
- package/dist/cjs/anyspend/react/components/context/AnySpendCustomizationContext.js +92 -0
- package/dist/cjs/anyspend/react/components/icons/AnimatedCheckmark.d.ts +23 -0
- package/dist/cjs/anyspend/react/components/icons/AnimatedCheckmark.js +71 -0
- package/dist/cjs/anyspend/react/components/index.d.ts +8 -1
- package/dist/cjs/anyspend/react/components/index.js +10 -1
- package/dist/cjs/anyspend/react/components/types/classes.d.ts +50 -0
- package/dist/cjs/anyspend/react/components/types/customization.d.ts +75 -0
- package/dist/cjs/anyspend/react/components/types/customization.js +2 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +8 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +8 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +15 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +3 -2
- package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +9 -2
- package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.js +1 -0
- package/dist/cjs/anyspend/services/anyspend.d.ts +1 -0
- package/dist/cjs/anyspend/services/anyspend.js +17 -2
- package/dist/cjs/anyspend/types/forms.d.ts +92 -0
- package/dist/cjs/anyspend/types/forms.js +8 -0
- package/dist/cjs/anyspend/utils/format.js +12 -3
- package/dist/cjs/app.shared.js +8 -0
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +9 -3
- package/dist/cjs/global-account/react/components/WalletImage/WalletImage.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/command.d.ts +7 -7
- package/dist/cjs/global-account/react/components/ui/dialog.d.ts +2 -0
- package/dist/cjs/global-account/react/components/ui/dialog.js +2 -2
- package/dist/cjs/global-account/react/components/ui/drawer.d.ts +3 -1
- package/dist/cjs/global-account/react/components/ui/drawer.js +1 -1
- package/dist/cjs/global-account/react/hooks/useAuth.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +4 -4
- package/dist/cjs/global-account/react/hooks/useUser.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useUserQuery.d.ts +1 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +53 -1
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +2 -2
- package/dist/cjs/shared/constants/chains/supported.d.ts +3 -3
- package/dist/cjs/shared/utils/number.d.ts +5 -0
- package/dist/cjs/shared/utils/number.js +13 -0
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +9 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +41 -12
- package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +6 -1
- package/dist/esm/anyspend/react/components/AnySpendBondKit.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +9 -0
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +16 -14
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +9 -0
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +42 -12
- package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +10 -1
- package/dist/esm/anyspend/react/components/AnySpendDeposit.js +5 -4
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendTournament.d.ts +11 -0
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +2 -2
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +5 -1
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +2 -2
- package/dist/esm/anyspend/react/components/checkout/AddressForm.d.ts +9 -0
- package/dist/esm/anyspend/react/components/checkout/AddressForm.js +11 -0
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.d.ts +117 -0
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.js +155 -0
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +81 -0
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +58 -0
- package/dist/esm/anyspend/react/components/checkout/CartItemRow.d.ts +8 -0
- package/dist/esm/anyspend/react/components/checkout/CartItemRow.js +6 -0
- package/dist/esm/anyspend/react/components/checkout/CartSummary.d.ts +30 -0
- package/dist/esm/anyspend/react/components/checkout/CartSummary.js +17 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +32 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.js +24 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormField.d.ts +10 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormField.js +28 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +39 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.js +72 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutLayout.d.ts +10 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutLayout.js +10 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutOrderStatus.d.ts +28 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutOrderStatus.js +62 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +31 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.js +61 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.d.ts +10 -0
- package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.js +28 -0
- package/dist/esm/anyspend/react/components/checkout/CoinbaseCheckoutPanel.d.ts +20 -0
- package/dist/esm/anyspend/react/components/checkout/CoinbaseCheckoutPanel.js +167 -0
- package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.d.ts +23 -0
- package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.js +321 -0
- package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.d.ts +12 -0
- package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.js +59 -0
- package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.d.ts +20 -0
- package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.js +266 -0
- package/dist/esm/anyspend/react/components/checkout/PoweredByBranding.d.ts +8 -0
- package/dist/esm/anyspend/react/components/checkout/PoweredByBranding.js +6 -0
- package/dist/esm/anyspend/react/components/checkout/ShippingSelector.d.ts +11 -0
- package/dist/esm/anyspend/react/components/checkout/ShippingSelector.js +17 -0
- package/dist/esm/anyspend/react/components/common/ConnectWalletPayment.js +19 -5
- package/dist/esm/anyspend/react/components/common/CryptoPaySection.js +1 -1
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethodDisplay.js +1 -1
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +4 -4
- package/dist/esm/anyspend/react/components/common/OrderStatus.d.ts +2 -1
- package/dist/esm/anyspend/react/components/common/OrderStatus.js +96 -22
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +4 -4
- package/dist/esm/anyspend/react/components/common/PaySection.js +1 -1
- package/dist/esm/anyspend/react/components/common/StepProgress.d.ts +5 -1
- package/dist/esm/anyspend/react/components/common/StepProgress.js +6 -11
- package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.js +1 -1
- package/dist/esm/anyspend/react/components/common/TransferResultScreen.js +7 -3
- package/dist/esm/anyspend/react/components/context/AnySpendCustomizationContext.d.ts +16 -0
- package/dist/esm/anyspend/react/components/context/AnySpendCustomizationContext.js +88 -0
- package/dist/esm/anyspend/react/components/icons/AnimatedCheckmark.d.ts +23 -0
- package/dist/esm/anyspend/react/components/icons/AnimatedCheckmark.js +68 -0
- package/dist/esm/anyspend/react/components/index.d.ts +8 -1
- package/dist/esm/anyspend/react/components/index.js +5 -0
- package/dist/esm/anyspend/react/components/types/classes.d.ts +50 -0
- package/dist/esm/anyspend/react/components/types/customization.d.ts +75 -0
- package/dist/esm/anyspend/react/components/types/customization.js +1 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +8 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +8 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +15 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +3 -2
- package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +9 -2
- package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.js +1 -0
- package/dist/esm/anyspend/services/anyspend.d.ts +1 -0
- package/dist/esm/anyspend/services/anyspend.js +17 -2
- package/dist/esm/anyspend/types/forms.d.ts +92 -0
- package/dist/esm/anyspend/types/forms.js +7 -0
- package/dist/esm/anyspend/utils/format.js +12 -3
- package/dist/esm/app.shared.js +8 -0
- package/dist/esm/global-account/react/components/B3DynamicModal.js +9 -3
- package/dist/esm/global-account/react/components/WalletImage/WalletImage.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.d.ts +7 -7
- package/dist/esm/global-account/react/components/ui/dialog.d.ts +2 -0
- package/dist/esm/global-account/react/components/ui/dialog.js +2 -2
- package/dist/esm/global-account/react/components/ui/drawer.d.ts +3 -1
- package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
- package/dist/esm/global-account/react/hooks/useAuth.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +4 -4
- package/dist/esm/global-account/react/hooks/useUser.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useUserQuery.d.ts +1 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +53 -1
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +2 -2
- package/dist/esm/shared/constants/chains/supported.d.ts +3 -3
- package/dist/esm/shared/utils/number.d.ts +5 -0
- package/dist/esm/shared/utils/number.js +12 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/react/components/AnySpend.d.ts +9 -0
- package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +6 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +9 -0
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +9 -0
- package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +10 -1
- package/dist/types/anyspend/react/components/AnySpendDepositUpside.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendStakeUpside.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnySpendTournament.d.ts +11 -0
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +5 -1
- package/dist/types/anyspend/react/components/checkout/AddressForm.d.ts +9 -0
- package/dist/types/anyspend/react/components/checkout/AnySpendCheckout.d.ts +117 -0
- package/dist/types/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +81 -0
- package/dist/types/anyspend/react/components/checkout/CartItemRow.d.ts +8 -0
- package/dist/types/anyspend/react/components/checkout/CartSummary.d.ts +30 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +32 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutFormField.d.ts +10 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +39 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutLayout.d.ts +10 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutOrderStatus.d.ts +28 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +31 -0
- package/dist/types/anyspend/react/components/checkout/CheckoutSuccess.d.ts +10 -0
- package/dist/types/anyspend/react/components/checkout/CoinbaseCheckoutPanel.d.ts +20 -0
- package/dist/types/anyspend/react/components/checkout/CryptoPayPanel.d.ts +23 -0
- package/dist/types/anyspend/react/components/checkout/DiscountCodeInput.d.ts +12 -0
- package/dist/types/anyspend/react/components/checkout/FiatCheckoutPanel.d.ts +20 -0
- package/dist/types/anyspend/react/components/checkout/PoweredByBranding.d.ts +8 -0
- package/dist/types/anyspend/react/components/checkout/ShippingSelector.d.ts +11 -0
- package/dist/types/anyspend/react/components/common/OrderStatus.d.ts +2 -1
- package/dist/types/anyspend/react/components/common/StepProgress.d.ts +5 -1
- package/dist/types/anyspend/react/components/context/AnySpendCustomizationContext.d.ts +16 -0
- package/dist/types/anyspend/react/components/icons/AnimatedCheckmark.d.ts +23 -0
- package/dist/types/anyspend/react/components/index.d.ts +8 -1
- package/dist/types/anyspend/react/components/types/classes.d.ts +50 -0
- package/dist/types/anyspend/react/components/types/customization.d.ts +75 -0
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +8 -2
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +8 -2
- package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +15 -3
- package/dist/types/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +9 -2
- package/dist/types/anyspend/services/anyspend.d.ts +1 -0
- package/dist/types/anyspend/types/forms.d.ts +92 -0
- package/dist/types/global-account/react/components/WalletImage/WalletImage.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +7 -7
- package/dist/types/global-account/react/components/ui/dialog.d.ts +2 -0
- package/dist/types/global-account/react/components/ui/drawer.d.ts +3 -1
- package/dist/types/global-account/react/hooks/useAuth.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useAuthentication.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +4 -4
- package/dist/types/global-account/react/hooks/useUser.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useUserQuery.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +53 -1
- package/dist/types/shared/constants/chains/b3Chain.d.ts +2 -2
- package/dist/types/shared/constants/chains/supported.d.ts +3 -3
- package/dist/types/shared/utils/number.d.ts +5 -0
- package/package.json +1 -1
- package/src/anyspend/react/components/AnySpend.tsx +84 -37
- package/src/anyspend/react/components/AnySpendBondKit.tsx +12 -1
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +14 -0
- package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +10 -0
- package/src/anyspend/react/components/AnySpendCustom.tsx +38 -20
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +82 -35
- package/src/anyspend/react/components/AnySpendDeposit.tsx +24 -2
- package/src/anyspend/react/components/AnySpendDepositUpside.tsx +14 -0
- package/src/anyspend/react/components/AnySpendNFT.tsx +14 -0
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +14 -0
- package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +14 -0
- package/src/anyspend/react/components/AnySpendStakeUpside.tsx +14 -0
- package/src/anyspend/react/components/AnySpendStakeUpsideExactIn.tsx +14 -0
- package/src/anyspend/react/components/AnySpendTournament.tsx +19 -0
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +14 -0
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +10 -0
- package/src/anyspend/react/components/checkout/AddressForm.tsx +98 -0
- package/src/anyspend/react/components/checkout/AnySpendCheckout.tsx +398 -0
- package/src/anyspend/react/components/checkout/AnySpendCheckoutTrigger.tsx +221 -0
- package/src/anyspend/react/components/checkout/CartItemRow.tsx +58 -0
- package/src/anyspend/react/components/checkout/CartSummary.tsx +158 -0
- package/src/anyspend/react/components/checkout/CheckoutCartPanel.tsx +98 -0
- package/src/anyspend/react/components/checkout/CheckoutFormField.tsx +129 -0
- package/src/anyspend/react/components/checkout/CheckoutFormPanel.tsx +241 -0
- package/src/anyspend/react/components/checkout/CheckoutLayout.tsx +52 -0
- package/src/anyspend/react/components/checkout/CheckoutOrderStatus.tsx +224 -0
- package/src/anyspend/react/components/checkout/CheckoutPaymentPanel.tsx +341 -0
- package/src/anyspend/react/components/checkout/CheckoutSuccess.tsx +110 -0
- package/src/anyspend/react/components/checkout/CoinbaseCheckoutPanel.tsx +279 -0
- package/src/anyspend/react/components/checkout/CryptoPayPanel.tsx +630 -0
- package/src/anyspend/react/components/checkout/DiscountCodeInput.tsx +127 -0
- package/src/anyspend/react/components/checkout/FiatCheckoutPanel.tsx +612 -0
- package/src/anyspend/react/components/checkout/PoweredByBranding.tsx +42 -0
- package/src/anyspend/react/components/checkout/ShippingSelector.tsx +73 -0
- package/src/anyspend/react/components/common/ConnectWalletPayment.tsx +29 -7
- package/src/anyspend/react/components/common/CryptoPaySection.tsx +1 -1
- package/src/anyspend/react/components/common/CryptoPaymentMethodDisplay.tsx +1 -1
- package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +2 -2
- package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +5 -5
- package/src/anyspend/react/components/common/OrderStatus.tsx +140 -34
- package/src/anyspend/react/components/common/PanelOnramp.tsx +9 -9
- package/src/anyspend/react/components/common/PaySection.tsx +1 -1
- package/src/anyspend/react/components/common/StepProgress.tsx +40 -52
- package/src/anyspend/react/components/common/TokenBalance.tsx +0 -12
- package/src/anyspend/react/components/common/TransferCryptoDetails.tsx +1 -9
- package/src/anyspend/react/components/common/TransferResultScreen.tsx +19 -11
- package/src/anyspend/react/components/context/AnySpendCustomizationContext.tsx +124 -0
- package/src/anyspend/react/components/icons/AnimatedCheckmark.tsx +119 -0
- package/src/anyspend/react/components/index.ts +33 -0
- package/src/anyspend/react/components/types/classes.ts +70 -0
- package/src/anyspend/react/components/types/customization.ts +99 -0
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +3 -2
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +3 -2
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +5 -1
- package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +5 -2
- package/src/anyspend/services/anyspend.ts +19 -2
- package/src/anyspend/types/forms.ts +97 -0
- package/src/anyspend/utils/format.ts +12 -3
- package/src/app.shared.ts +11 -0
- package/src/global-account/react/components/B3DynamicModal.tsx +13 -4
- package/src/global-account/react/components/ui/dialog.tsx +17 -8
- package/src/global-account/react/components/ui/drawer.tsx +2 -2
- package/src/global-account/react/stores/useModalStore.ts +52 -1
- package/src/shared/utils/number.ts +12 -0
- package/src/styles/index.css +48 -2
|
@@ -366,11 +366,61 @@ export interface QRDepositClasses {
|
|
|
366
366
|
orderDetailsContainer?: string;
|
|
367
367
|
orderDetailsContent?: string;
|
|
368
368
|
}
|
|
369
|
+
/** Classes for AnySpendCheckout component */
|
|
370
|
+
export interface AnySpendCheckoutClasses {
|
|
371
|
+
root?: string;
|
|
372
|
+
layout?: string;
|
|
373
|
+
paymentColumn?: string;
|
|
374
|
+
cartColumn?: string;
|
|
375
|
+
paymentPanel?: string;
|
|
376
|
+
paymentTitle?: string;
|
|
377
|
+
paymentMethodSelector?: string;
|
|
378
|
+
paymentMethodButton?: string;
|
|
379
|
+
cryptoPanel?: string;
|
|
380
|
+
tokenSelector?: string;
|
|
381
|
+
quoteDisplay?: string;
|
|
382
|
+
payButton?: string;
|
|
383
|
+
fiatPanel?: string;
|
|
384
|
+
stripeForm?: string;
|
|
385
|
+
stripeSubmitButton?: string;
|
|
386
|
+
coinbasePanel?: string;
|
|
387
|
+
cartPanel?: string;
|
|
388
|
+
cartTitle?: string;
|
|
389
|
+
cartItemRow?: string;
|
|
390
|
+
cartItemImage?: string;
|
|
391
|
+
cartItemName?: string;
|
|
392
|
+
cartItemDescription?: string;
|
|
393
|
+
cartItemPrice?: string;
|
|
394
|
+
cartSummary?: string;
|
|
395
|
+
cartTotal?: string;
|
|
396
|
+
cartSubtotal?: string;
|
|
397
|
+
cartSummaryLine?: string;
|
|
398
|
+
cartSummaryLineLabel?: string;
|
|
399
|
+
cartSummaryLineAmount?: string;
|
|
400
|
+
cartDiscount?: string;
|
|
401
|
+
cartItemMetadata?: string;
|
|
402
|
+
cartItemMetadataLabel?: string;
|
|
403
|
+
cartItemMetadataValue?: string;
|
|
404
|
+
formPanel?: string;
|
|
405
|
+
formField?: string;
|
|
406
|
+
formFieldLabel?: string;
|
|
407
|
+
formFieldInput?: string;
|
|
408
|
+
shippingSelector?: string;
|
|
409
|
+
discountInput?: string;
|
|
410
|
+
addressForm?: string;
|
|
411
|
+
poweredBy?: string;
|
|
412
|
+
successPanel?: string;
|
|
413
|
+
returnButton?: string;
|
|
414
|
+
orderStatusPanel?: string;
|
|
415
|
+
retryButton?: string;
|
|
416
|
+
transactionLink?: string;
|
|
417
|
+
}
|
|
369
418
|
/** Combined classes for all AnySpend-related components */
|
|
370
419
|
export interface AnySpendAllClasses {
|
|
371
420
|
deposit?: AnySpendDepositClasses;
|
|
372
421
|
anySpend?: AnySpendClasses;
|
|
373
422
|
customExactIn?: AnySpendCustomExactInClasses;
|
|
423
|
+
checkout?: AnySpendCheckoutClasses;
|
|
374
424
|
cryptoPaySection?: CryptoPaySectionClasses;
|
|
375
425
|
cryptoReceiveSection?: CryptoReceiveSectionClasses;
|
|
376
426
|
panelOnramp?: PanelOnrampClasses;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { CheckoutFormComponentProps, ShippingSelectorSlotProps, DiscountInputSlotProps } from "../../../types/forms";
|
|
3
|
+
export interface ActionButtonSlotProps {
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ConnectWalletButtonSlotProps {
|
|
10
|
+
onPayment: () => void;
|
|
11
|
+
txLoading: boolean;
|
|
12
|
+
connectedAddress?: string;
|
|
13
|
+
paymentLabel: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SuccessScreenSlotProps {
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
txHash?: string;
|
|
19
|
+
orderId?: string;
|
|
20
|
+
explorerUrl?: string;
|
|
21
|
+
onDone: () => void;
|
|
22
|
+
returnUrl?: string;
|
|
23
|
+
returnLabel?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ErrorScreenSlotProps {
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
errorType: "failure" | "expired" | "refunded";
|
|
29
|
+
orderId?: string;
|
|
30
|
+
onRetry?: () => void;
|
|
31
|
+
onDone?: () => void;
|
|
32
|
+
}
|
|
33
|
+
export interface AnySpendSlots {
|
|
34
|
+
actionButton?: (props: ActionButtonSlotProps) => ReactNode;
|
|
35
|
+
connectWalletButton?: (props: ConnectWalletButtonSlotProps) => ReactNode;
|
|
36
|
+
header?: (props: {
|
|
37
|
+
mode: "page" | "modal";
|
|
38
|
+
}) => ReactNode;
|
|
39
|
+
footer?: ReactNode;
|
|
40
|
+
successScreen?: (props: SuccessScreenSlotProps) => ReactNode;
|
|
41
|
+
errorScreen?: (props: ErrorScreenSlotProps) => ReactNode;
|
|
42
|
+
/** Replace the entire checkout form panel with a custom component */
|
|
43
|
+
checkoutForm?: (props: CheckoutFormComponentProps) => ReactNode;
|
|
44
|
+
/** Replace the shipping method selector */
|
|
45
|
+
shippingSelector?: (props: ShippingSelectorSlotProps) => ReactNode;
|
|
46
|
+
/** Replace the discount code input */
|
|
47
|
+
discountInput?: (props: DiscountInputSlotProps) => ReactNode;
|
|
48
|
+
}
|
|
49
|
+
export interface AnySpendContent {
|
|
50
|
+
successTitle?: string | ReactNode;
|
|
51
|
+
successDescription?: string | ReactNode;
|
|
52
|
+
failureTitle?: string | ReactNode;
|
|
53
|
+
failureDescription?: string | ReactNode;
|
|
54
|
+
expiredTitle?: string | ReactNode;
|
|
55
|
+
expiredDescription?: string | ReactNode;
|
|
56
|
+
refundedTitle?: string | ReactNode;
|
|
57
|
+
refundedDescription?: string | ReactNode;
|
|
58
|
+
processingTitle?: string | ReactNode;
|
|
59
|
+
processingDescription?: string | ReactNode;
|
|
60
|
+
returnButtonLabel?: string;
|
|
61
|
+
retryButtonLabel?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface AnySpendTheme {
|
|
64
|
+
brandColor?: string;
|
|
65
|
+
colors?: Partial<{
|
|
66
|
+
primary: string;
|
|
67
|
+
secondary: string;
|
|
68
|
+
tertiary: string;
|
|
69
|
+
surfacePrimary: string;
|
|
70
|
+
surfaceSecondary: string;
|
|
71
|
+
brand: string;
|
|
72
|
+
borderPrimary: string;
|
|
73
|
+
borderSecondary: string;
|
|
74
|
+
}>;
|
|
75
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { components } from "../../../anyspend/types/api";
|
|
2
|
+
import { CreateOrderResponse } from "../../../anyspend/types/api_req_res";
|
|
2
3
|
import { CreateOrderParams } from "./useAnyspendCreateOrder";
|
|
3
4
|
export type OnrampOptions = {
|
|
4
5
|
vendor: components["schemas"]["OnrampMetadata"]["vendor"];
|
|
@@ -11,7 +12,7 @@ export type CreateOnrampOrderParams = Omit<CreateOrderParams, "srcChain" | "srcT
|
|
|
11
12
|
onramp: OnrampOptions;
|
|
12
13
|
};
|
|
13
14
|
export type UseAnyspendCreateOnrampOrderProps = {
|
|
14
|
-
onSuccess?: (data:
|
|
15
|
+
onSuccess?: (data: CreateOrderResponse) => void;
|
|
15
16
|
onError?: (error: Error) => void;
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
@@ -19,6 +20,11 @@ export type UseAnyspendCreateOnrampOrderProps = {
|
|
|
19
20
|
* Specifically handles orders that involve fiat-to-crypto onramp functionality
|
|
20
21
|
*/
|
|
21
22
|
export declare function useAnyspendCreateOnrampOrder({ onSuccess, onError }?: UseAnyspendCreateOnrampOrderProps): {
|
|
22
|
-
createOrder: import("@tanstack/react-query").UseMutateFunction<
|
|
23
|
+
createOrder: import("@tanstack/react-query").UseMutateFunction<{
|
|
24
|
+
success: boolean;
|
|
25
|
+
message: string;
|
|
26
|
+
data: components["schemas"]["Order"];
|
|
27
|
+
statusCode: number;
|
|
28
|
+
}, Error, CreateOnrampOrderParams, unknown>;
|
|
23
29
|
isCreatingOrder: boolean;
|
|
24
30
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { components } from "../../../anyspend/types/api";
|
|
2
|
+
import { CreateOrderResponse } from "../../../anyspend/types/api_req_res";
|
|
2
3
|
export type CreateOrderParams = {
|
|
3
4
|
recipientAddress: string;
|
|
4
5
|
orderType: components["schemas"]["Order"]["type"];
|
|
@@ -21,7 +22,7 @@ export type CreateOrderParams = {
|
|
|
21
22
|
callbackMetadata?: Record<string, unknown>;
|
|
22
23
|
};
|
|
23
24
|
export type UseAnyspendCreateOrderProps = {
|
|
24
|
-
onSuccess?: (data:
|
|
25
|
+
onSuccess?: (data: CreateOrderResponse) => void;
|
|
25
26
|
onError?: (error: Error) => void;
|
|
26
27
|
};
|
|
27
28
|
/**
|
|
@@ -30,6 +31,11 @@ export type UseAnyspendCreateOrderProps = {
|
|
|
30
31
|
* For onramp orders, use useAnyspendCreateOnrampOrder instead.
|
|
31
32
|
*/
|
|
32
33
|
export declare function useAnyspendCreateOrder({ onSuccess, onError }?: UseAnyspendCreateOrderProps): {
|
|
33
|
-
createOrder: import("@tanstack/react-query").UseMutateFunction<
|
|
34
|
+
createOrder: import("@tanstack/react-query").UseMutateFunction<{
|
|
35
|
+
success: boolean;
|
|
36
|
+
message: string;
|
|
37
|
+
data: components["schemas"]["Order"];
|
|
38
|
+
statusCode: number;
|
|
39
|
+
}, Error, CreateOrderParams, unknown>;
|
|
34
40
|
isCreatingOrder: boolean;
|
|
35
41
|
};
|
|
@@ -40,8 +40,10 @@ interface UseAnyspendFlowProps {
|
|
|
40
40
|
disableUrlParamManagement?: boolean;
|
|
41
41
|
orderType?: "hype_duel" | "custom_exact_in" | "swap";
|
|
42
42
|
customExactInConfig?: CustomExactInConfig;
|
|
43
|
+
/** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
|
|
44
|
+
senderAddress?: string;
|
|
43
45
|
}
|
|
44
|
-
export declare function useAnyspendFlow({ paymentType, recipientAddress, loadOrder, onOrderSuccess, onTransactionSuccess, sourceTokenAddress, sourceTokenChainId, destinationTokenAddress, destinationTokenChainId, slippage, disableUrlParamManagement, orderType, customExactInConfig, }: UseAnyspendFlowProps): {
|
|
46
|
+
export declare function useAnyspendFlow({ paymentType, recipientAddress, loadOrder, onOrderSuccess, onTransactionSuccess, sourceTokenAddress, sourceTokenChainId, destinationTokenAddress, destinationTokenChainId, slippage, disableUrlParamManagement, orderType, customExactInConfig, senderAddress, }: UseAnyspendFlowProps): {
|
|
45
47
|
activePanel: PanelView;
|
|
46
48
|
setActivePanel: import("react").Dispatch<import("react").SetStateAction<PanelView>>;
|
|
47
49
|
orderId: string | undefined;
|
|
@@ -213,9 +215,19 @@ export declare function useAnyspendFlow({ paymentType, recipientAddress, loadOrd
|
|
|
213
215
|
formattedFeeUsd: string;
|
|
214
216
|
};
|
|
215
217
|
getOnrampVendor: (paymentMethod: FiatPaymentMethod) => "coinbase" | "stripe" | "stripe-web2" | undefined;
|
|
216
|
-
createOrder: import("@tanstack/react-query").UseMutateFunction<
|
|
218
|
+
createOrder: import("@tanstack/react-query").UseMutateFunction<{
|
|
219
|
+
success: boolean;
|
|
220
|
+
message: string;
|
|
221
|
+
data: components["schemas"]["Order"];
|
|
222
|
+
statusCode: number;
|
|
223
|
+
}, Error, import("../../../anyspend/react").CreateOrderParams, unknown>;
|
|
217
224
|
isCreatingOrder: boolean;
|
|
218
|
-
createOnrampOrder: import("@tanstack/react-query").UseMutateFunction<
|
|
225
|
+
createOnrampOrder: import("@tanstack/react-query").UseMutateFunction<{
|
|
226
|
+
success: boolean;
|
|
227
|
+
message: string;
|
|
228
|
+
data: components["schemas"]["Order"];
|
|
229
|
+
statusCode: number;
|
|
230
|
+
}, Error, import("../../../anyspend/react").CreateOnrampOrderParams, unknown>;
|
|
219
231
|
isCreatingOnrampOrder: boolean;
|
|
220
232
|
};
|
|
221
233
|
export {};
|
|
@@ -73,7 +73,7 @@ function generateEncodedData(config, amountInWei) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
// This hook serves for order hype_duel and custom_exact_in
|
|
76
|
-
function useAnyspendFlow({ paymentType = "crypto", recipientAddress, loadOrder, onOrderSuccess, onTransactionSuccess, sourceTokenAddress, sourceTokenChainId, destinationTokenAddress, destinationTokenChainId, slippage = 0, disableUrlParamManagement = false, orderType = "hype_duel", customExactInConfig, }) {
|
|
76
|
+
function useAnyspendFlow({ paymentType = "crypto", recipientAddress, loadOrder, onOrderSuccess, onTransactionSuccess, sourceTokenAddress, sourceTokenChainId, destinationTokenAddress, destinationTokenChainId, slippage = 0, disableUrlParamManagement = false, orderType = "hype_duel", customExactInConfig, senderAddress, }) {
|
|
77
77
|
const searchParams = (0, react_2.useSearchParamsSSR)();
|
|
78
78
|
const router = (0, react_2.useRouter)();
|
|
79
79
|
// Panel and order state
|
|
@@ -108,9 +108,10 @@ function useAnyspendFlow({ paymentType = "crypto", recipientAddress, loadOrder,
|
|
|
108
108
|
const recipientProfile = (0, react_2.useProfile)({ address: effectiveRecipientAddress, fresh: true });
|
|
109
109
|
const recipientName = recipientProfile.data?.name;
|
|
110
110
|
// Check token balance for crypto payments
|
|
111
|
+
const effectiveBalanceAddress = senderAddress || walletAddress;
|
|
111
112
|
const { rawBalance, isLoading: isBalanceLoading } = (0, react_2.useTokenBalance)({
|
|
112
113
|
token: selectedSrcToken,
|
|
113
|
-
address:
|
|
114
|
+
address: effectiveBalanceAddress,
|
|
114
115
|
});
|
|
115
116
|
// Check if user has enough balance
|
|
116
117
|
const hasEnoughBalance = (0, react_3.useMemo)(() => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { components } from "../../../anyspend/types/api";
|
|
2
|
+
import { CreateOrderResponse } from "../../../anyspend/types/api_req_res";
|
|
2
3
|
import { DepositContractConfig } from "../components/AnySpendDeposit";
|
|
3
4
|
export type CreateDepositFirstOrderParams = {
|
|
4
5
|
recipientAddress: string;
|
|
@@ -9,9 +10,10 @@ export type CreateDepositFirstOrderParams = {
|
|
|
9
10
|
creatorAddress?: string;
|
|
10
11
|
/** Optional contract config for custom execution after deposit */
|
|
11
12
|
contractConfig?: DepositContractConfig;
|
|
13
|
+
callbackMetadata?: Record<string, unknown>;
|
|
12
14
|
};
|
|
13
15
|
export type UseCreateDepositFirstOrderProps = {
|
|
14
|
-
onSuccess?: (data:
|
|
16
|
+
onSuccess?: (data: CreateOrderResponse) => void;
|
|
15
17
|
onError?: (error: Error) => void;
|
|
16
18
|
};
|
|
17
19
|
/**
|
|
@@ -19,6 +21,11 @@ export type UseCreateDepositFirstOrderProps = {
|
|
|
19
21
|
* This order type doesn't require srcAmount - the user deposits tokens after the order is created.
|
|
20
22
|
*/
|
|
21
23
|
export declare function useCreateDepositFirstOrder({ onSuccess, onError }?: UseCreateDepositFirstOrderProps): {
|
|
22
|
-
createOrder: import("@tanstack/react-query").UseMutateFunction<
|
|
24
|
+
createOrder: import("@tanstack/react-query").UseMutateFunction<{
|
|
25
|
+
success: boolean;
|
|
26
|
+
message: string;
|
|
27
|
+
data: components["schemas"]["Order"];
|
|
28
|
+
statusCode: number;
|
|
29
|
+
}, Error, CreateDepositFirstOrderParams, unknown>;
|
|
23
30
|
isCreatingOrder: boolean;
|
|
24
31
|
};
|
|
@@ -63,6 +63,7 @@ function useCreateDepositFirstOrder({ onSuccess, onError } = {}) {
|
|
|
63
63
|
creatorAddress: creatorAddress ? (0, utils_1.normalizeAddress)(creatorAddress) : undefined,
|
|
64
64
|
partnerId,
|
|
65
65
|
visitorData,
|
|
66
|
+
callbackMetadata: params.callbackMetadata,
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
catch (error) {
|
|
@@ -35,5 +35,6 @@ export declare const anyspendService: {
|
|
|
35
35
|
stripeOnramp: boolean;
|
|
36
36
|
stripeWeb2: components["schemas"]["StripeWeb2Support"];
|
|
37
37
|
}>;
|
|
38
|
+
getCoinbaseOnrampUrl: (request: components["schemas"]["CoinbaseOnrampUrlRequest"]) => Promise<components["schemas"]["CoinbaseOnrampUrlResponse"]>;
|
|
38
39
|
getStripeClientSecret: (paymentIntentId: string) => Promise<string | null>;
|
|
39
40
|
};
|
|
@@ -11,7 +11,8 @@ const invariant_1 = __importDefault(require("invariant"));
|
|
|
11
11
|
// Service functions
|
|
12
12
|
exports.anyspendService = {
|
|
13
13
|
getTokenList: async (chainId, query) => {
|
|
14
|
-
const
|
|
14
|
+
const params = new URLSearchParams({ limit: "100", term: query });
|
|
15
|
+
const response = await fetch(`${constants_1.ANYSPEND_MAINNET_BASE_URL}/chains/${chainId}/tokens?${params.toString()}`);
|
|
15
16
|
const body = await response.json();
|
|
16
17
|
(0, invariant_1.default)(response.status === 200, `Failed to fetch token list for chain ${chainId}`);
|
|
17
18
|
return body.data;
|
|
@@ -77,6 +78,7 @@ exports.anyspendService = {
|
|
|
77
78
|
(0, invariant_1.default)(orderId, "orderId is required");
|
|
78
79
|
const response = await fetch(`${constants_1.ANYSPEND_MAINNET_BASE_URL}/orders/${orderId}`);
|
|
79
80
|
const data = await response.json();
|
|
81
|
+
(0, invariant_1.default)(response.status === 200, data.message || `Failed to fetch order ${orderId}`);
|
|
80
82
|
return data;
|
|
81
83
|
},
|
|
82
84
|
getOrderHistory: async (creatorAddress, limit = 100, offset = 0) => {
|
|
@@ -89,6 +91,7 @@ exports.anyspendService = {
|
|
|
89
91
|
}
|
|
90
92
|
const response = await fetch(`${constants_1.ANYSPEND_MAINNET_BASE_URL}/orders?${params.toString()}`);
|
|
91
93
|
const data = await response.json();
|
|
94
|
+
(0, invariant_1.default)(response.status === 200, data.message || "Failed to fetch order history");
|
|
92
95
|
return data;
|
|
93
96
|
},
|
|
94
97
|
getCoinbaseOnrampOptions: async (country, visitorData) => {
|
|
@@ -117,8 +120,20 @@ exports.anyspendService = {
|
|
|
117
120
|
(0, invariant_1.default)(response.status === 200, "Failed to check Stripe support");
|
|
118
121
|
return data.data;
|
|
119
122
|
},
|
|
123
|
+
getCoinbaseOnrampUrl: async (request) => {
|
|
124
|
+
const response = await fetch(`${constants_1.ANYSPEND_MAINNET_BASE_URL}/onramp/coinbase/onramp-url`, {
|
|
125
|
+
method: "POST",
|
|
126
|
+
headers: { "Content-Type": "application/json" },
|
|
127
|
+
body: JSON.stringify(request),
|
|
128
|
+
});
|
|
129
|
+
const data = await response.json();
|
|
130
|
+
if (!response.ok)
|
|
131
|
+
throw new Error(data.message || "Failed to get Coinbase onramp URL");
|
|
132
|
+
return data;
|
|
133
|
+
},
|
|
120
134
|
getStripeClientSecret: async (paymentIntentId) => {
|
|
121
|
-
const
|
|
135
|
+
const params = new URLSearchParams({ paymentIntentId });
|
|
136
|
+
const response = await fetch(`${constants_1.ANYSPEND_MAINNET_BASE_URL}/stripe/clientSecret?${params.toString()}`);
|
|
122
137
|
const data = await response.json();
|
|
123
138
|
(0, invariant_1.default)(response.status === 200, "Failed to get Stripe client secret");
|
|
124
139
|
return data.data;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkout form schema types
|
|
3
|
+
*
|
|
4
|
+
* Merchants define forms using a JSON schema to collect customer information
|
|
5
|
+
* during checkout (email, shipping address, discount codes, arbitrary fields).
|
|
6
|
+
*/
|
|
7
|
+
export interface CheckoutFormField {
|
|
8
|
+
/** Unique field identifier */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Field type */
|
|
11
|
+
type: "text" | "email" | "phone" | "textarea" | "select" | "number" | "checkbox" | "address";
|
|
12
|
+
/** Display label */
|
|
13
|
+
label: string;
|
|
14
|
+
/** Placeholder text */
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
/** Whether the field is required. Default: false */
|
|
17
|
+
required?: boolean;
|
|
18
|
+
/** Default value */
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
/** Options for "select" type fields */
|
|
21
|
+
options?: {
|
|
22
|
+
label: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}[];
|
|
25
|
+
/** Validation rules */
|
|
26
|
+
validation?: {
|
|
27
|
+
pattern?: string;
|
|
28
|
+
minLength?: number;
|
|
29
|
+
maxLength?: number;
|
|
30
|
+
min?: number;
|
|
31
|
+
max?: number;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface CheckoutFormSchema {
|
|
35
|
+
fields: CheckoutFormField[];
|
|
36
|
+
}
|
|
37
|
+
export interface ShippingOption {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
/** Amount in wei */
|
|
42
|
+
amount: string;
|
|
43
|
+
/** e.g. "5-7 business days" */
|
|
44
|
+
estimated_days?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface DiscountResult {
|
|
47
|
+
valid: boolean;
|
|
48
|
+
discount_type?: "percentage" | "fixed";
|
|
49
|
+
discount_value?: string;
|
|
50
|
+
/** Computed discount amount in wei */
|
|
51
|
+
discount_amount?: string;
|
|
52
|
+
/** Final amount after discount in wei */
|
|
53
|
+
final_amount?: string;
|
|
54
|
+
error?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface AddressData {
|
|
57
|
+
street: string;
|
|
58
|
+
city: string;
|
|
59
|
+
state: string;
|
|
60
|
+
zip: string;
|
|
61
|
+
country: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Props passed to custom form components or the checkoutForm slot
|
|
65
|
+
*/
|
|
66
|
+
export interface CheckoutFormComponentProps {
|
|
67
|
+
/** Call this when the form is submitted / values change */
|
|
68
|
+
onSubmit: (data: Record<string, unknown>) => void;
|
|
69
|
+
/** Call to signal whether the form is currently valid */
|
|
70
|
+
onValidationChange: (isValid: boolean) => void;
|
|
71
|
+
/** Current form data */
|
|
72
|
+
formData: Record<string, unknown>;
|
|
73
|
+
/** Update form data */
|
|
74
|
+
setFormData: (data: Record<string, unknown>) => void;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Props for shipping selector slot
|
|
78
|
+
*/
|
|
79
|
+
export interface ShippingSelectorSlotProps {
|
|
80
|
+
options: ShippingOption[];
|
|
81
|
+
selectedId: string | null;
|
|
82
|
+
onSelect: (option: ShippingOption) => void;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Props for discount input slot
|
|
86
|
+
*/
|
|
87
|
+
export interface DiscountInputSlotProps {
|
|
88
|
+
onApply: (code: string) => Promise<DiscountResult>;
|
|
89
|
+
appliedDiscount: DiscountResult | null;
|
|
90
|
+
onRemove: () => void;
|
|
91
|
+
loading: boolean;
|
|
92
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Checkout form schema types
|
|
4
|
+
*
|
|
5
|
+
* Merchants define forms using a JSON schema to collect customer information
|
|
6
|
+
* during checkout (email, shipping address, discount codes, arbitrary fields).
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -22,6 +22,7 @@ const getStatusDisplay = (order) => {
|
|
|
22
22
|
return {
|
|
23
23
|
text: depositText,
|
|
24
24
|
status: "processing",
|
|
25
|
+
description: "Waiting for your deposit to be confirmed on-chain",
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
case "waiting_stripe_payment":
|
|
@@ -37,7 +38,7 @@ const getStatusDisplay = (order) => {
|
|
|
37
38
|
description: "This order is no longer valid because the order expired.",
|
|
38
39
|
};
|
|
39
40
|
case "sending_token_from_vault":
|
|
40
|
-
return { text: "Sending Token", status: "processing" };
|
|
41
|
+
return { text: "Sending Token", status: "processing", description: "Preparing your tokens for delivery" };
|
|
41
42
|
case "relay":
|
|
42
43
|
case "executing":
|
|
43
44
|
return {
|
|
@@ -65,9 +66,17 @@ const getStatusDisplay = (order) => {
|
|
|
65
66
|
return { text, status: "success", description };
|
|
66
67
|
}
|
|
67
68
|
case "refunding":
|
|
68
|
-
return {
|
|
69
|
+
return {
|
|
70
|
+
text: "Refunding Order",
|
|
71
|
+
status: "processing",
|
|
72
|
+
description: "Your funds are being returned to your wallet",
|
|
73
|
+
};
|
|
69
74
|
case "refunded":
|
|
70
|
-
return {
|
|
75
|
+
return {
|
|
76
|
+
text: "Order Refunded",
|
|
77
|
+
status: "failure",
|
|
78
|
+
description: "Your funds have been returned to your wallet.",
|
|
79
|
+
};
|
|
71
80
|
case "failure":
|
|
72
81
|
return {
|
|
73
82
|
text: "Order Failure",
|
package/dist/cjs/app.shared.js
CHANGED
|
@@ -8,6 +8,7 @@ const authentication_client_1 = require("@feathersjs/authentication-client");
|
|
|
8
8
|
const js_cookie_1 = __importDefault(require("js-cookie"));
|
|
9
9
|
const constants_1 = require("./shared/constants");
|
|
10
10
|
exports.B3_API_URL = process.env.EXPO_PUBLIC_B3_API || process.env.NEXT_PUBLIC_B3_API || process.env.PUBLIC_B3_API || "https://api.b3.fun";
|
|
11
|
+
const DEV_USER_GROUP = 4;
|
|
11
12
|
const authenticate = async (app, accessToken, identityToken, params) => {
|
|
12
13
|
const fullToken = `${accessToken}+${identityToken}`;
|
|
13
14
|
// Do not authenticate if there is no token
|
|
@@ -22,6 +23,13 @@ const authenticate = async (app, accessToken, identityToken, params) => {
|
|
|
22
23
|
}, {
|
|
23
24
|
query: params || {},
|
|
24
25
|
});
|
|
26
|
+
// Extend cookie expiration to 30 days for dev users
|
|
27
|
+
if (response?.user?.userGroups?.includes(DEV_USER_GROUP)) {
|
|
28
|
+
const token = js_cookie_1.default.get(constants_1.B3_AUTH_COOKIE_NAME);
|
|
29
|
+
if (token) {
|
|
30
|
+
js_cookie_1.default.set(constants_1.B3_AUTH_COOKIE_NAME, token, { expires: 30 });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
25
33
|
return response;
|
|
26
34
|
}
|
|
27
35
|
catch (error) {
|
|
@@ -8,6 +8,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
8
8
|
const react_1 = require("../../../anyspend/react");
|
|
9
9
|
const AnySpendDeposit_1 = require("../../../anyspend/react/components/AnySpendDeposit");
|
|
10
10
|
const AnyspendDepositHype_1 = require("../../../anyspend/react/components/AnyspendDepositHype");
|
|
11
|
+
const AnySpendCheckoutTrigger_1 = require("../../../anyspend/react/components/checkout/AnySpendCheckoutTrigger");
|
|
11
12
|
const AnySpendWorkflowTrigger_1 = require("../../../anyspend/react/components/AnySpendWorkflowTrigger");
|
|
12
13
|
const AnySpendDepositUpside_1 = require("../../../anyspend/react/components/AnySpendDepositUpside");
|
|
13
14
|
const AnySpendStakeUpside_1 = require("../../../anyspend/react/components/AnySpendStakeUpside");
|
|
@@ -60,6 +61,7 @@ function B3DynamicModal() {
|
|
|
60
61
|
"notifications",
|
|
61
62
|
"anySpendDeposit",
|
|
62
63
|
"anySpendWorkflowTrigger",
|
|
64
|
+
"anySpendCheckoutTrigger",
|
|
63
65
|
];
|
|
64
66
|
const freestyleTypes = [
|
|
65
67
|
"anySpendNft",
|
|
@@ -73,6 +75,8 @@ function B3DynamicModal() {
|
|
|
73
75
|
"anySpendSignatureMint",
|
|
74
76
|
"anySpendBondKit",
|
|
75
77
|
];
|
|
78
|
+
// AnySpend modal types should not show the "Global Account" branding footer
|
|
79
|
+
const isAnySpendType = contentType?.type?.toLowerCase().startsWith("anyspend") ?? false;
|
|
76
80
|
// Check if current content type is in freestyle types
|
|
77
81
|
const isFreestyleType = freestyleTypes.includes(contentType?.type);
|
|
78
82
|
// Determine if modal should be closable - defaults to true unless explicitly set to false
|
|
@@ -80,7 +84,7 @@ function B3DynamicModal() {
|
|
|
80
84
|
const hideCloseButton = true;
|
|
81
85
|
// Build content class using cn utility
|
|
82
86
|
// eslint-disable-next-line tailwindcss/no-custom-classname
|
|
83
|
-
const contentClass = (0, cn_1.cn)("b3-modal", theme === "dark" && "dark", fullWidthTypes.includes(contentType?.type) && "w-full", isFreestyleType && "b3-modal-freestyle", contentType?.type === "signInWithB3" && "p-0", contentType?.type === "anySpend" && "md:p-0", contentType?.type === "send" && "p-0", contentType?.type === "manageAccount" && " md:p-0 md:pt-2", contentType?.type === "linkAccount" && "md:p-0");
|
|
87
|
+
const contentClass = (0, cn_1.cn)("b3-modal", theme === "dark" && "dark", fullWidthTypes.includes(contentType?.type) && "w-full", isFreestyleType && "b3-modal-freestyle", contentType?.type === "signInWithB3" && "p-0", contentType?.type === "anySpend" && "md:p-0", contentType?.type === "send" && "p-0", contentType?.type === "manageAccount" && " md:p-0 md:pt-2", contentType?.type === "linkAccount" && "md:p-0", contentType?.type === "anySpendCheckoutTrigger" && "p-0");
|
|
84
88
|
debug("contentType", contentType);
|
|
85
89
|
const renderContent = () => {
|
|
86
90
|
if (!contentType)
|
|
@@ -132,6 +136,8 @@ function B3DynamicModal() {
|
|
|
132
136
|
return (0, jsx_runtime_1.jsx)(AnySpendDeposit_1.AnySpendDeposit, { ...contentType, mode: "modal" });
|
|
133
137
|
case "anySpendWorkflowTrigger":
|
|
134
138
|
return (0, jsx_runtime_1.jsx)(AnySpendWorkflowTrigger_1.AnySpendWorkflowTrigger, { ...contentType, mode: "modal" });
|
|
139
|
+
case "anySpendCheckoutTrigger":
|
|
140
|
+
return (0, jsx_runtime_1.jsx)(AnySpendCheckoutTrigger_1.AnySpendCheckoutTrigger, { ...contentType, mode: "modal" });
|
|
135
141
|
case "avatarEditor":
|
|
136
142
|
return (0, jsx_runtime_1.jsx)(AvatarEditor_1.AvatarEditor, { onSetAvatar: contentType.onSuccess });
|
|
137
143
|
case "deposit":
|
|
@@ -157,12 +163,12 @@ function B3DynamicModal() {
|
|
|
157
163
|
}
|
|
158
164
|
setB3ModalOpen(open);
|
|
159
165
|
};
|
|
160
|
-
return ((0, jsx_runtime_1.jsxs)(ModalComponent, { open: isOpen, onOpenChange: handleOpenChange, children: [(0, jsx_runtime_1.jsxs)(ModalContent, { className: (0, cn_1.cn)(contentClass, "rounded-2xl bg-white shadow-xl dark:bg-
|
|
166
|
+
return ((0, jsx_runtime_1.jsxs)(ModalComponent, { open: isOpen, onOpenChange: handleOpenChange, children: [(0, jsx_runtime_1.jsxs)(ModalContent, { className: (0, cn_1.cn)(contentClass, "rounded-2xl bg-white shadow-xl dark:bg-neutral-900", "border border-gray-200 dark:border-neutral-800", (contentType?.type === "manageAccount" ||
|
|
161
167
|
contentType?.type === "deposit" ||
|
|
162
168
|
contentType?.type === "send" ||
|
|
163
169
|
contentType?.type === "avatarEditor" ||
|
|
164
170
|
contentType?.type === "notifications") &&
|
|
165
|
-
"p-0", "mx-auto w-full max-w-md sm:max-w-lg"), hideCloseButton: hideCloseButton, onEscapeKeyDown: !isClosable ? e => e.preventDefault() : undefined, onPointerDownOutside: !isClosable ? e => e.preventDefault() : undefined, onInteractOutside: !isClosable ? e => e.preventDefault() : undefined, children: [(0, jsx_runtime_1.jsx)(ModalTitle, { className: "sr-only hidden", children: contentType?.type || "Modal" }), (0, jsx_runtime_1.jsx)(ModalDescription, { className: "sr-only hidden", children: contentType?.type || "Modal Body" }), (0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("b3-modal-content no-scrollbar dark:bg-b3-background flex max-h-[90dvh] flex-col overflow-auto sm:max-h-[80dvh]"), children: [!hideCloseButton && ((0, jsx_runtime_1.jsxs)("button", { onClick: navigateBack, className: "flex items-center gap-2 px-6 py-4 text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-white", children: [(0, jsx_runtime_1.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M15.8337 10H4.16699", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M10.0003 15.8334L4.16699 10L10.0003 4.16669", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }), (0, jsx_runtime_1.jsx)("span", { className: "font-inter text-sm font-semibold", children: "Back" })] })), (0, jsx_runtime_1.jsx)("div", { className: "flex-1", children: renderContent() }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: toasts.length > 0 && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { height: 0 }, animate: { height: "auto" }, exit: { height: 0 }, transition: { duration: 0.3, ease: "easeInOut" }, className: "toast-section relative z-10 overflow-hidden bg-white dark:border-
|
|
171
|
+
"p-0", "mx-auto w-full max-w-md sm:max-w-lg"), hideCloseButton: hideCloseButton, hideGABranding: isAnySpendType, onEscapeKeyDown: !isClosable ? e => e.preventDefault() : undefined, onPointerDownOutside: !isClosable ? e => e.preventDefault() : undefined, onInteractOutside: !isClosable ? e => e.preventDefault() : undefined, children: [(0, jsx_runtime_1.jsx)(ModalTitle, { className: "sr-only hidden", children: contentType?.type || "Modal" }), (0, jsx_runtime_1.jsx)(ModalDescription, { className: "sr-only hidden", children: contentType?.type || "Modal Body" }), (0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("b3-modal-content no-scrollbar dark:bg-b3-background flex max-h-[90dvh] flex-col overflow-auto sm:max-h-[80dvh]"), children: [!hideCloseButton && ((0, jsx_runtime_1.jsxs)("button", { onClick: navigateBack, className: "flex items-center gap-2 px-6 py-4 text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-white", children: [(0, jsx_runtime_1.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M15.8337 10H4.16699", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M10.0003 15.8334L4.16699 10L10.0003 4.16669", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }), (0, jsx_runtime_1.jsx)("span", { className: "font-inter text-sm font-semibold", children: "Back" })] })), (0, jsx_runtime_1.jsx)("div", { className: "flex-1", children: renderContent() }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: toasts.length > 0 && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { height: 0 }, animate: { height: "auto" }, exit: { height: 0 }, transition: { duration: 0.3, ease: "easeInOut" }, className: "toast-section relative z-10 overflow-hidden bg-white dark:border-neutral-800 dark:bg-neutral-900", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, transition: { duration: 0.2, delay: 0.1 }, className: "p-4 pt-0", children: (0, jsx_runtime_1.jsx)(index_1.ToastContainer, { toasts: toasts, onDismiss: removeToast, theme: theme }) }) })) })] })] }), isOpen && !isAnySpendType && ((0, jsx_runtime_1.jsx)("style", { children: `
|
|
166
172
|
.modal-inner-content {
|
|
167
173
|
transition: margin-bottom 0.3s ease-in-out;
|
|
168
174
|
margin-bottom: ${toasts.length > 0 ? "0px" : "23px"} !important;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const WalletImage: ({ fallback }: {
|
|
2
2
|
fallback?: React.ReactNode;
|
|
3
|
-
}) => string | number | bigint | true | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> |
|
|
3
|
+
}) => string | number | bigint | true | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | null;
|
|
4
4
|
export default WalletImage;
|
|
@@ -6,7 +6,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
|
6
6
|
ref?: React.Ref<HTMLDivElement>;
|
|
7
7
|
} & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}, "key" |
|
|
9
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
10
10
|
label?: string;
|
|
11
11
|
shouldFilter?: boolean;
|
|
12
12
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -23,7 +23,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
23
23
|
ref?: React.Ref<HTMLInputElement>;
|
|
24
24
|
} & {
|
|
25
25
|
asChild?: boolean;
|
|
26
|
-
}, "key" | keyof React.InputHTMLAttributes<HTMLInputElement
|
|
26
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
27
27
|
value?: string;
|
|
28
28
|
onValueChange?: (search: string) => void;
|
|
29
29
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -33,7 +33,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
|
33
33
|
ref?: React.Ref<HTMLDivElement>;
|
|
34
34
|
} & {
|
|
35
35
|
asChild?: boolean;
|
|
36
|
-
}, "key" |
|
|
36
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
37
37
|
label?: string;
|
|
38
38
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
39
39
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -42,14 +42,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
|
42
42
|
ref?: React.Ref<HTMLDivElement>;
|
|
43
43
|
} & {
|
|
44
44
|
asChild?: boolean;
|
|
45
|
-
}, "key" |
|
|
45
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
46
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
47
47
|
children?: React.ReactNode;
|
|
48
48
|
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
49
49
|
ref?: React.Ref<HTMLDivElement>;
|
|
50
50
|
} & {
|
|
51
51
|
asChild?: boolean;
|
|
52
|
-
}, "key" |
|
|
52
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
|
|
53
53
|
heading?: React.ReactNode;
|
|
54
54
|
value?: string;
|
|
55
55
|
forceMount?: boolean;
|
|
@@ -58,7 +58,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
|
|
|
58
58
|
ref?: React.Ref<HTMLDivElement>;
|
|
59
59
|
} & {
|
|
60
60
|
asChild?: boolean;
|
|
61
|
-
}, "key" |
|
|
61
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
62
62
|
alwaysRender?: boolean;
|
|
63
63
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
64
64
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -67,7 +67,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
67
67
|
ref?: React.Ref<HTMLDivElement>;
|
|
68
68
|
} & {
|
|
69
69
|
asChild?: boolean;
|
|
70
|
-
}, "key" |
|
|
70
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "onSelect" | "disabled"> & {
|
|
71
71
|
disabled?: boolean;
|
|
72
72
|
onSelect?: (value: string) => void;
|
|
73
73
|
value?: string;
|