@crossmint/client-sdk-react-ui 1.10.7 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2POV64LQ.js +1 -0
- package/dist/chunk-2U6DCZSI.js +1 -0
- package/dist/chunk-2VILTRL5.js +1 -0
- package/dist/chunk-2VQLMU5A.cjs +1 -0
- package/dist/chunk-2WSEHVNP.cjs +1 -0
- package/dist/chunk-33OQI6MO.js +1 -0
- package/dist/chunk-3BUVHV54.js +0 -0
- package/dist/chunk-3EQVCVCE.cjs +1 -0
- package/dist/chunk-3FQDW3IU.js +1 -0
- package/dist/chunk-3GIMVKF3.js +1 -0
- package/dist/chunk-4IHRWQWT.js +1 -0
- package/dist/chunk-4ITU7JF2.js +1 -0
- package/dist/chunk-56YL3XJW.cjs +1 -0
- package/dist/chunk-5IFQJPBE.cjs +1 -0
- package/dist/chunk-5M3BWY6T.cjs +1 -0
- package/dist/chunk-6IRIZUTM.cjs +1 -0
- package/dist/chunk-6M5OP7SM.js +1 -0
- package/dist/chunk-72MMCJ2E.js +0 -0
- package/dist/chunk-72P3JMXX.js +1 -0
- package/dist/chunk-77PBG2JJ.js +1 -0
- package/dist/chunk-7ANJ2GZG.cjs +1 -0
- package/dist/chunk-7ASOCI4Q.js +1 -0
- package/dist/chunk-7B364FBM.cjs +1 -0
- package/dist/chunk-7VI5AXX5.cjs +1 -0
- package/dist/chunk-AUSETHZ3.cjs +1 -0
- package/dist/chunk-AXMHJC73.cjs +1 -0
- package/dist/chunk-BR77Q3PK.cjs +1 -0
- package/dist/chunk-BV7CQ2QS.js +1 -0
- package/dist/chunk-C3JRTLQP.js +1 -0
- package/dist/chunk-CW33KBH3.cjs +1 -0
- package/dist/chunk-D3255LVM.cjs +1 -0
- package/dist/chunk-D4K2AGJK.cjs +1 -0
- package/dist/chunk-DGZQUCSD.js +1 -0
- package/dist/chunk-DPUG72P3.cjs +1 -0
- package/dist/chunk-E4TBJMOO.js +1 -0
- package/dist/chunk-EA7H4AXL.js +1 -0
- package/dist/chunk-EUXGP4IN.cjs +1 -0
- package/dist/chunk-EVADF7QA.js +1 -0
- package/dist/chunk-FON43I6G.cjs +1 -0
- package/dist/chunk-G4LT7I7W.js +1 -0
- package/dist/chunk-GPGY5B6G.js +1 -0
- package/dist/chunk-GPQZG7HC.cjs +1 -0
- package/dist/chunk-HG5ML6KX.cjs +1 -0
- package/dist/chunk-HJ4ZXU2X.js +1 -0
- package/dist/chunk-I4GMMHQR.cjs +1 -0
- package/dist/chunk-IAJBYU5C.js +1 -0
- package/dist/chunk-IMRZHYQK.cjs +1 -0
- package/dist/chunk-IMV35JZB.cjs +1 -0
- package/dist/chunk-IV4ACZQE.js +1 -0
- package/dist/chunk-IZGR67ZI.js +1 -0
- package/dist/chunk-JDYEU555.cjs +1 -0
- package/dist/chunk-JGM3G5E2.js +1 -0
- package/dist/chunk-JSNUJJQJ.js +1 -0
- package/dist/chunk-KFL42A3A.js +1 -0
- package/dist/chunk-KI4HRYHD.cjs +1 -0
- package/dist/chunk-LMSKJDGS.js +1 -0
- package/dist/chunk-M42BIIZJ.cjs +1 -0
- package/dist/chunk-N7OESP3W.js +1 -0
- package/dist/chunk-NB7AJIPT.js +0 -0
- package/dist/chunk-NBJIJZGO.js +1 -0
- package/dist/chunk-NCDVID2B.js +1 -0
- package/dist/chunk-NEKICGOA.cjs +1 -0
- package/dist/chunk-NFLGT52C.cjs +1 -0
- package/dist/chunk-NRN4WNQL.cjs +1 -0
- package/dist/chunk-NU6UB76I.cjs +1 -0
- package/dist/chunk-NZQIZ4ZY.cjs +1 -0
- package/dist/chunk-O5J2ZIJ6.cjs +1 -0
- package/dist/chunk-O73L7XWQ.js +1 -0
- package/dist/chunk-OOLXYAO7.js +1 -0
- package/dist/chunk-PDEAWPX3.cjs +1 -0
- package/dist/chunk-PW7TOKQ2.cjs +1 -0
- package/dist/chunk-PXDN3KFO.js +1 -0
- package/dist/chunk-QASKWI5Y.js +1 -0
- package/dist/chunk-QYQERFYL.cjs +1 -0
- package/dist/chunk-ROJ6HFVK.js +1 -0
- package/dist/chunk-RYQRCUKB.js +1 -0
- package/dist/chunk-S73E6EBO.cjs +1 -0
- package/dist/chunk-SFDQPSSP.js +1 -0
- package/dist/chunk-SRQAQHYK.cjs +1 -0
- package/dist/chunk-T6FFMX2I.js +1 -0
- package/dist/chunk-TD56X3VP.js +1 -0
- package/dist/chunk-TM7WDKYR.cjs +1 -0
- package/dist/chunk-TNCETEEL.js +1 -0
- package/dist/chunk-TXOVDTYK.cjs +1 -0
- package/dist/chunk-UAFW3OWA.js +1 -0
- package/dist/chunk-UEC3RXWE.cjs +1 -0
- package/dist/chunk-UHKWPOFV.js +1 -0
- package/dist/chunk-UP4F7YLI.cjs +1 -0
- package/dist/chunk-UYSB2EMS.cjs +1 -0
- package/dist/chunk-VHNBXIOC.js +1 -0
- package/dist/chunk-VI6TW7JT.cjs +1 -0
- package/dist/chunk-VLDE23JX.js +1 -0
- package/dist/chunk-VWBAHXIO.cjs +1 -0
- package/dist/chunk-VWL76U5G.js +1 -0
- package/dist/chunk-W4UPIFFS.cjs +1 -0
- package/dist/chunk-WABJHG6B.cjs +1 -0
- package/dist/chunk-WECMBN4Z.cjs +1 -0
- package/dist/chunk-WHFUW3W3.js +0 -0
- package/dist/chunk-WW3LYPGC.cjs +1 -0
- package/dist/chunk-X5BBXO27.cjs +1 -0
- package/dist/chunk-XIVIIEY5.js +1 -0
- package/dist/chunk-XUQK2ILL.cjs +1 -0
- package/dist/chunk-XUT4N66R.cjs +1 -0
- package/dist/chunk-YV6LD2NU.js +1 -0
- package/dist/chunk-YXF74MVI.cjs +1 -0
- package/dist/chunk-Z2FGFHRQ.cjs +1 -0
- package/dist/chunk-Z5PEH5AD.js +1 -0
- package/dist/chunk-ZUZEZZX7.js +1 -0
- package/dist/components/CrossmintNFTCollectionView.cjs +1 -9
- package/dist/components/CrossmintNFTCollectionView.js +1 -9
- package/dist/components/CrossmintNFTDetail.cjs +1 -9
- package/dist/components/CrossmintNFTDetail.js +1 -9
- package/dist/components/auth/AuthForm.cjs +1 -30
- package/dist/components/auth/AuthForm.js +1 -30
- package/dist/components/auth/AuthFormBackButton.cjs +1 -30
- package/dist/components/auth/AuthFormBackButton.js +1 -30
- package/dist/components/auth/AuthFormDialog.cjs +1 -30
- package/dist/components/auth/AuthFormDialog.js +1 -30
- package/dist/components/auth/EmbeddedAuthForm.cjs +1 -31
- package/dist/components/auth/EmbeddedAuthForm.js +1 -31
- package/dist/components/auth/PasskeyPrompt.cjs +1 -14
- package/dist/components/auth/PasskeyPrompt.js +1 -14
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -30
- package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -30
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -32
- package/dist/components/auth/methods/email/EmailOTPInput.js +1 -32
- package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -30
- package/dist/components/auth/methods/email/EmailSignIn.js +1 -30
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +1 -30
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +1 -30
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +1 -30
- package/dist/components/auth/methods/google/GoogleSignIn.js +1 -30
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +1 -67
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +1 -67
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +1 -33
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +1 -33
- package/dist/components/auth/methods/web3/Web3Connector.cjs +1 -65
- package/dist/components/auth/methods/web3/Web3Connector.js +1 -65
- package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs +1 -53
- package/dist/components/auth/methods/web3/Web3ConnectorButton.js +1 -53
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +1 -31
- package/dist/components/auth/methods/web3/Web3Connectors.js +1 -31
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.cjs +1 -0
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.d.cts +9 -0
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.d.ts +9 -0
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.js +1 -0
- package/dist/components/common/CrossmintLogoV2/consts.cjs +1 -0
- package/dist/components/common/CrossmintLogoV2/consts.d.cts +35 -0
- package/dist/components/common/CrossmintLogoV2/consts.d.ts +35 -0
- package/dist/components/common/CrossmintLogoV2/consts.js +1 -0
- package/dist/components/common/CrossmintLogoV2/schemas.cjs +1 -0
- package/dist/components/common/CrossmintLogoV2/schemas.d.cts +199 -0
- package/dist/components/common/CrossmintLogoV2/schemas.d.ts +199 -0
- package/dist/components/common/CrossmintLogoV2/schemas.js +1 -0
- package/dist/components/common/Dialog.cjs +1 -26
- package/dist/components/common/Dialog.js +1 -26
- package/dist/components/common/Divider.cjs +1 -30
- package/dist/components/common/Divider.js +1 -30
- package/dist/components/common/InputOTP.cjs +1 -14
- package/dist/components/common/InputOTP.js +1 -14
- package/dist/components/common/PoweredByCrossmint.cjs +1 -10
- package/dist/components/common/PoweredByCrossmint.js +1 -10
- package/dist/components/common/Spinner.cjs +1 -9
- package/dist/components/common/Spinner.js +1 -9
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs +1 -8
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js +1 -8
- package/dist/components/embed/EmbeddedCheckoutIFrame.cjs +1 -8
- package/dist/components/embed/EmbeddedCheckoutIFrame.js +1 -8
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs +1 -11
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js +1 -11
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs +1 -10
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js +1 -10
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs +1 -11
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.js +1 -11
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs +1 -10
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js +1 -10
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs +1 -75
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.js +1 -75
- package/dist/components/embed/index.cjs +1 -14
- package/dist/components/embed/index.js +1 -14
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -32
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -32
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -31
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -31
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +1 -142
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +1 -142
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs +1 -70
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js +1 -70
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs +1 -8
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js +1 -8
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs +1 -52
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js +1 -52
- package/dist/components/embed/v3/index.cjs +1 -33
- package/dist/components/embed/v3/index.js +1 -33
- package/dist/components/hosted/CrossmintPayButton.cjs +1 -11
- package/dist/components/hosted/CrossmintPayButton.js +1 -11
- package/dist/components/hosted/index.cjs +1 -12
- package/dist/components/hosted/index.d.cts +1 -0
- package/dist/components/hosted/index.d.ts +1 -0
- package/dist/components/hosted/index.js +1 -12
- package/dist/components/hosted/styles.cjs +1 -10
- package/dist/components/hosted/styles.js +1 -10
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -0
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.d.cts +8 -0
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.d.ts +8 -0
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -0
- package/dist/components/hosted/v3/index.cjs +1 -0
- package/dist/components/hosted/v3/index.d.cts +4 -0
- package/dist/components/hosted/v3/index.d.ts +4 -0
- package/dist/components/hosted/v3/index.js +1 -0
- package/dist/components/index.cjs +1 -63
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -63
- package/dist/consts/version.cjs +1 -8
- package/dist/consts/version.js +1 -8
- package/dist/hooks/index.cjs +1 -42
- package/dist/hooks/index.js +1 -42
- package/dist/hooks/useAuth.cjs +1 -30
- package/dist/hooks/useAuth.js +1 -30
- package/dist/hooks/useCrossmint.cjs +1 -10
- package/dist/hooks/useCrossmint.js +1 -10
- package/dist/hooks/useCrossmintAuth.cjs +1 -30
- package/dist/hooks/useCrossmintAuth.js +1 -30
- package/dist/hooks/useCrossmintCheckout.cjs +1 -13
- package/dist/hooks/useCrossmintCheckout.js +1 -13
- package/dist/hooks/useDeepEffect.cjs +1 -8
- package/dist/hooks/useDeepEffect.js +1 -8
- package/dist/hooks/useEnvironment.cjs +1 -8
- package/dist/hooks/useEnvironment.js +1 -8
- package/dist/hooks/useOAuthWindowListener.cjs +1 -30
- package/dist/hooks/useOAuthWindowListener.js +1 -30
- package/dist/hooks/useWallet.cjs +1 -30
- package/dist/hooks/useWallet.js +1 -30
- package/dist/icons/alert.cjs +1 -8
- package/dist/icons/alert.js +1 -8
- package/dist/icons/base64Icons.cjs +1 -12
- package/dist/icons/base64Icons.js +1 -12
- package/dist/icons/chevronRight.cjs +1 -8
- package/dist/icons/chevronRight.js +1 -8
- package/dist/icons/discord.cjs +1 -29
- package/dist/icons/discord.js +1 -29
- package/dist/icons/emailOTP.cjs +1 -8
- package/dist/icons/emailOTP.js +1 -8
- package/dist/icons/farcaster.cjs +1 -8
- package/dist/icons/farcaster.js +1 -8
- package/dist/icons/fingerprint.cjs +1 -8
- package/dist/icons/fingerprint.js +1 -8
- package/dist/icons/google.cjs +1 -8
- package/dist/icons/google.js +1 -8
- package/dist/icons/leftArrow.cjs +1 -8
- package/dist/icons/leftArrow.js +1 -8
- package/dist/icons/passkey.cjs +1 -8
- package/dist/icons/passkey.js +1 -8
- package/dist/icons/passkeyPromptLogo.cjs +1 -8
- package/dist/icons/passkeyPromptLogo.js +1 -8
- package/dist/icons/poweredByLeaf.cjs +1 -8
- package/dist/icons/poweredByLeaf.js +1 -8
- package/dist/icons/wallet.cjs +1 -8
- package/dist/icons/wallet.js +1 -8
- package/dist/icons/x.cjs +1 -29
- package/dist/icons/x.js +1 -29
- package/dist/index.cjs +1 -119
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -119
- package/dist/providers/CrossmintAuthProvider.cjs +1 -32
- package/dist/providers/CrossmintAuthProvider.js +1 -32
- package/dist/providers/CrossmintWalletProvider.cjs +1 -32
- package/dist/providers/CrossmintWalletProvider.js +1 -32
- package/dist/providers/TwindProvider.cjs +1 -9
- package/dist/providers/TwindProvider.js +1 -9
- package/dist/providers/auth/AuthFormProvider.cjs +1 -32
- package/dist/providers/auth/AuthFormProvider.js +1 -32
- package/dist/providers/auth/FarcasterProvider.cjs +1 -8
- package/dist/providers/auth/FarcasterProvider.js +1 -8
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs +1 -33
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js +1 -33
- package/dist/providers/index.cjs +1 -36
- package/dist/providers/index.js +1 -36
- package/dist/testUtils.cjs +1 -8
- package/dist/testUtils.js +1 -8
- package/dist/twind.config.cjs +1 -8
- package/dist/twind.config.js +1 -8
- package/dist/types/auth.cjs +1 -1
- package/dist/types/auth.js +0 -1
- package/dist/utils/classNames.cjs +1 -8
- package/dist/utils/classNames.js +1 -8
- package/dist/utils/createCrossmintApiClient.cjs +1 -9
- package/dist/utils/createCrossmintApiClient.js +1 -9
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.cjs +1 -8
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.js +1 -8
- package/package.json +8 -8
- package/dist/chunk-2ROLE4XU.cjs +0 -31
- package/dist/chunk-2ROLE4XU.cjs.map +0 -1
- package/dist/chunk-2T2VCED7.js +0 -17
- package/dist/chunk-2T2VCED7.js.map +0 -1
- package/dist/chunk-33WZFL2D.js +0 -80
- package/dist/chunk-33WZFL2D.js.map +0 -1
- package/dist/chunk-35RV5AOT.cjs +0 -70
- package/dist/chunk-35RV5AOT.cjs.map +0 -1
- package/dist/chunk-3J6CUUWT.js +0 -50
- package/dist/chunk-3J6CUUWT.js.map +0 -1
- package/dist/chunk-3KR4GYLF.js +0 -26
- package/dist/chunk-3KR4GYLF.js.map +0 -1
- package/dist/chunk-43P7QWBK.cjs +0 -17
- package/dist/chunk-43P7QWBK.cjs.map +0 -1
- package/dist/chunk-4DAZAO6Y.cjs +0 -59
- package/dist/chunk-4DAZAO6Y.cjs.map +0 -1
- package/dist/chunk-5EE2IAIP.js +0 -87
- package/dist/chunk-5EE2IAIP.js.map +0 -1
- package/dist/chunk-5KK3YQWD.cjs +0 -1
- package/dist/chunk-5KK3YQWD.cjs.map +0 -1
- package/dist/chunk-5RX5WFEW.cjs +0 -11
- package/dist/chunk-5RX5WFEW.cjs.map +0 -1
- package/dist/chunk-5UXGDXPR.js +0 -153
- package/dist/chunk-5UXGDXPR.js.map +0 -1
- package/dist/chunk-6CPZDD6Y.js +0 -29
- package/dist/chunk-6CPZDD6Y.js.map +0 -1
- package/dist/chunk-6EX2VR7S.js +0 -14
- package/dist/chunk-6EX2VR7S.js.map +0 -1
- package/dist/chunk-6FG6NL44.js +0 -30
- package/dist/chunk-6FG6NL44.js.map +0 -1
- package/dist/chunk-6LO4NSRH.cjs +0 -21
- package/dist/chunk-6LO4NSRH.cjs.map +0 -1
- package/dist/chunk-6PPUWTTF.cjs +0 -31
- package/dist/chunk-6PPUWTTF.cjs.map +0 -1
- package/dist/chunk-7BZSIPWM.js +0 -31
- package/dist/chunk-7BZSIPWM.js.map +0 -1
- package/dist/chunk-7KIY6DLW.js +0 -28
- package/dist/chunk-7KIY6DLW.js.map +0 -1
- package/dist/chunk-7SBZ6OIH.js +0 -1
- package/dist/chunk-7SBZ6OIH.js.map +0 -1
- package/dist/chunk-A2JCJ2OV.cjs +0 -119
- package/dist/chunk-A2JCJ2OV.cjs.map +0 -1
- package/dist/chunk-A6Q4Z5TO.js +0 -31
- package/dist/chunk-A6Q4Z5TO.js.map +0 -1
- package/dist/chunk-A7J4DAE7.js +0 -16
- package/dist/chunk-A7J4DAE7.js.map +0 -1
- package/dist/chunk-ATHR4S2P.js +0 -48
- package/dist/chunk-ATHR4S2P.js.map +0 -1
- package/dist/chunk-AUCL5NPW.cjs +0 -31
- package/dist/chunk-AUCL5NPW.cjs.map +0 -1
- package/dist/chunk-AUEQQ4D3.js +0 -119
- package/dist/chunk-AUEQQ4D3.js.map +0 -1
- package/dist/chunk-AXZLLRBU.cjs +0 -26
- package/dist/chunk-AXZLLRBU.cjs.map +0 -1
- package/dist/chunk-B7LYPQ4K.cjs +0 -38
- package/dist/chunk-B7LYPQ4K.cjs.map +0 -1
- package/dist/chunk-BE2ZLB3L.cjs +0 -19
- package/dist/chunk-BE2ZLB3L.cjs.map +0 -1
- package/dist/chunk-BFTVVPCU.js +0 -81
- package/dist/chunk-BFTVVPCU.js.map +0 -1
- package/dist/chunk-BKVDVDKX.cjs +0 -1
- package/dist/chunk-BKVDVDKX.cjs.map +0 -1
- package/dist/chunk-BURUD6IV.cjs +0 -64
- package/dist/chunk-BURUD6IV.cjs.map +0 -1
- package/dist/chunk-C2VARNXL.js +0 -70
- package/dist/chunk-C2VARNXL.js.map +0 -1
- package/dist/chunk-CPYPI45H.js +0 -98
- package/dist/chunk-CPYPI45H.js.map +0 -1
- package/dist/chunk-CRTRMMJ7.js +0 -59
- package/dist/chunk-CRTRMMJ7.js.map +0 -1
- package/dist/chunk-DCMLWFDK.js +0 -31
- package/dist/chunk-DCMLWFDK.js.map +0 -1
- package/dist/chunk-DR67KSE7.js +0 -31
- package/dist/chunk-DR67KSE7.js.map +0 -1
- package/dist/chunk-DZ5MGN25.js +0 -147
- package/dist/chunk-DZ5MGN25.js.map +0 -1
- package/dist/chunk-ENCR5SUW.cjs +0 -51
- package/dist/chunk-ENCR5SUW.cjs.map +0 -1
- package/dist/chunk-EOWJ7775.js +0 -18
- package/dist/chunk-EOWJ7775.js.map +0 -1
- package/dist/chunk-FGHABNQM.js +0 -10
- package/dist/chunk-FGHABNQM.js.map +0 -1
- package/dist/chunk-FKIMKZ4Y.js +0 -17
- package/dist/chunk-FKIMKZ4Y.js.map +0 -1
- package/dist/chunk-GMKTZIU2.cjs +0 -22
- package/dist/chunk-GMKTZIU2.cjs.map +0 -1
- package/dist/chunk-H4F7UVPT.js +0 -34
- package/dist/chunk-H4F7UVPT.js.map +0 -1
- package/dist/chunk-HATQVB6H.js +0 -19
- package/dist/chunk-HATQVB6H.js.map +0 -1
- package/dist/chunk-HCW4RO2O.cjs +0 -29
- package/dist/chunk-HCW4RO2O.cjs.map +0 -1
- package/dist/chunk-HOTEC5UH.js +0 -22
- package/dist/chunk-HOTEC5UH.js.map +0 -1
- package/dist/chunk-HPOZ6I54.cjs +0 -44
- package/dist/chunk-HPOZ6I54.cjs.map +0 -1
- package/dist/chunk-HW2Q6J4R.js +0 -64
- package/dist/chunk-HW2Q6J4R.js.map +0 -1
- package/dist/chunk-HZ26XTTK.cjs +0 -81
- package/dist/chunk-HZ26XTTK.cjs.map +0 -1
- package/dist/chunk-I63FQCIV.js +0 -189
- package/dist/chunk-I63FQCIV.js.map +0 -1
- package/dist/chunk-IP4HQL5I.cjs +0 -147
- package/dist/chunk-IP4HQL5I.cjs.map +0 -1
- package/dist/chunk-IQPA3QOV.js +0 -27
- package/dist/chunk-IQPA3QOV.js.map +0 -1
- package/dist/chunk-K5S6RUJ3.cjs +0 -153
- package/dist/chunk-K5S6RUJ3.cjs.map +0 -1
- package/dist/chunk-KEKBOJCF.cjs +0 -50
- package/dist/chunk-KEKBOJCF.cjs.map +0 -1
- package/dist/chunk-KLWDDALZ.cjs +0 -14
- package/dist/chunk-KLWDDALZ.cjs.map +0 -1
- package/dist/chunk-KNOUJZN5.cjs +0 -32
- package/dist/chunk-KNOUJZN5.cjs.map +0 -1
- package/dist/chunk-L3FKENHU.js +0 -14
- package/dist/chunk-L3FKENHU.js.map +0 -1
- package/dist/chunk-LGY5FQOZ.cjs +0 -29
- package/dist/chunk-LGY5FQOZ.cjs.map +0 -1
- package/dist/chunk-LJA62EVT.cjs +0 -87
- package/dist/chunk-LJA62EVT.cjs.map +0 -1
- package/dist/chunk-MCINXS2Y.cjs +0 -1111
- package/dist/chunk-MCINXS2Y.cjs.map +0 -1
- package/dist/chunk-MH37OJT2.cjs +0 -80
- package/dist/chunk-MH37OJT2.cjs.map +0 -1
- package/dist/chunk-MJHLKJ6X.cjs +0 -212
- package/dist/chunk-MJHLKJ6X.cjs.map +0 -1
- package/dist/chunk-MUS7DUPS.cjs +0 -98
- package/dist/chunk-MUS7DUPS.cjs.map +0 -1
- package/dist/chunk-NMXFWIFA.js +0 -133
- package/dist/chunk-NMXFWIFA.js.map +0 -1
- package/dist/chunk-O53ZB544.js +0 -1111
- package/dist/chunk-O53ZB544.js.map +0 -1
- package/dist/chunk-PBSL6JOF.cjs +0 -17
- package/dist/chunk-PBSL6JOF.cjs.map +0 -1
- package/dist/chunk-PHCGCJSA.js +0 -107
- package/dist/chunk-PHCGCJSA.js.map +0 -1
- package/dist/chunk-Q3M4UH5U.cjs +0 -48
- package/dist/chunk-Q3M4UH5U.cjs.map +0 -1
- package/dist/chunk-QDKAU3H2.js +0 -31
- package/dist/chunk-QDKAU3H2.js.map +0 -1
- package/dist/chunk-QFZ6GZZR.cjs +0 -14
- package/dist/chunk-QFZ6GZZR.cjs.map +0 -1
- package/dist/chunk-QQXBYOKA.cjs +0 -16
- package/dist/chunk-QQXBYOKA.cjs.map +0 -1
- package/dist/chunk-QT7UEJZG.cjs +0 -133
- package/dist/chunk-QT7UEJZG.cjs.map +0 -1
- package/dist/chunk-QTL5I5C2.js +0 -38
- package/dist/chunk-QTL5I5C2.js.map +0 -1
- package/dist/chunk-R6IL3WOE.cjs +0 -31
- package/dist/chunk-R6IL3WOE.cjs.map +0 -1
- package/dist/chunk-RZPQIRIY.js +0 -11
- package/dist/chunk-RZPQIRIY.js.map +0 -1
- package/dist/chunk-RZT2J42J.js +0 -29
- package/dist/chunk-RZT2J42J.js.map +0 -1
- package/dist/chunk-SBA6FMFT.cjs +0 -18
- package/dist/chunk-SBA6FMFT.cjs.map +0 -1
- package/dist/chunk-SBTNHVSD.cjs +0 -30
- package/dist/chunk-SBTNHVSD.cjs.map +0 -1
- package/dist/chunk-SZA3XDJ5.cjs +0 -1
- package/dist/chunk-SZA3XDJ5.cjs.map +0 -1
- package/dist/chunk-TH42AO6J.js +0 -17
- package/dist/chunk-TH42AO6J.js.map +0 -1
- package/dist/chunk-U7LXB3SM.js +0 -50
- package/dist/chunk-U7LXB3SM.js.map +0 -1
- package/dist/chunk-UASNCH3A.cjs +0 -27
- package/dist/chunk-UASNCH3A.cjs.map +0 -1
- package/dist/chunk-UGHW5HMB.cjs +0 -31
- package/dist/chunk-UGHW5HMB.cjs.map +0 -1
- package/dist/chunk-UQAKJ4T7.cjs +0 -29
- package/dist/chunk-UQAKJ4T7.cjs.map +0 -1
- package/dist/chunk-URKPLEPV.cjs +0 -189
- package/dist/chunk-URKPLEPV.cjs.map +0 -1
- package/dist/chunk-VZIXXIU5.js +0 -32
- package/dist/chunk-VZIXXIU5.js.map +0 -1
- package/dist/chunk-XDJ6F7N4.cjs +0 -107
- package/dist/chunk-XDJ6F7N4.cjs.map +0 -1
- package/dist/chunk-XEZF7G64.js +0 -212
- package/dist/chunk-XEZF7G64.js.map +0 -1
- package/dist/chunk-XXJ7LQ44.js +0 -1
- package/dist/chunk-XXJ7LQ44.js.map +0 -1
- package/dist/chunk-XYMYRPVT.js +0 -1
- package/dist/chunk-XYMYRPVT.js.map +0 -1
- package/dist/chunk-Y3SUMTUI.cjs +0 -10
- package/dist/chunk-Y3SUMTUI.cjs.map +0 -1
- package/dist/chunk-YE55IKBP.cjs +0 -34
- package/dist/chunk-YE55IKBP.cjs.map +0 -1
- package/dist/chunk-YNBGMNE6.cjs +0 -17
- package/dist/chunk-YNBGMNE6.cjs.map +0 -1
- package/dist/chunk-YWVQCHQF.js +0 -51
- package/dist/chunk-YWVQCHQF.js.map +0 -1
- package/dist/chunk-ZDQGQY7Z.js +0 -29
- package/dist/chunk-ZDQGQY7Z.js.map +0 -1
- package/dist/chunk-ZIHCLVCD.js +0 -44
- package/dist/chunk-ZIHCLVCD.js.map +0 -1
- package/dist/chunk-ZJC4OB5Z.cjs +0 -50
- package/dist/chunk-ZJC4OB5Z.cjs.map +0 -1
- package/dist/chunk-ZMSST6ZZ.cjs +0 -28
- package/dist/chunk-ZMSST6ZZ.cjs.map +0 -1
- package/dist/chunk-ZUIS3FET.js +0 -21
- package/dist/chunk-ZUIS3FET.js.map +0 -1
- package/dist/components/CrossmintNFTCollectionView.cjs.map +0 -1
- package/dist/components/CrossmintNFTCollectionView.js.map +0 -1
- package/dist/components/CrossmintNFTDetail.cjs.map +0 -1
- package/dist/components/CrossmintNFTDetail.js.map +0 -1
- package/dist/components/auth/AuthForm.cjs.map +0 -1
- package/dist/components/auth/AuthForm.js.map +0 -1
- package/dist/components/auth/AuthFormBackButton.cjs.map +0 -1
- package/dist/components/auth/AuthFormBackButton.js.map +0 -1
- package/dist/components/auth/AuthFormDialog.cjs.map +0 -1
- package/dist/components/auth/AuthFormDialog.js.map +0 -1
- package/dist/components/auth/EmbeddedAuthForm.cjs.map +0 -1
- package/dist/components/auth/EmbeddedAuthForm.js.map +0 -1
- package/dist/components/auth/PasskeyPrompt.cjs.map +0 -1
- package/dist/components/auth/PasskeyPrompt.js.map +0 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs.map +0 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.js.map +0 -1
- package/dist/components/auth/methods/email/EmailOTPInput.cjs.map +0 -1
- package/dist/components/auth/methods/email/EmailOTPInput.js.map +0 -1
- package/dist/components/auth/methods/email/EmailSignIn.cjs.map +0 -1
- package/dist/components/auth/methods/email/EmailSignIn.js.map +0 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs.map +0 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js.map +0 -1
- package/dist/components/auth/methods/google/GoogleSignIn.cjs.map +0 -1
- package/dist/components/auth/methods/google/GoogleSignIn.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3Connector.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3Connector.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3ConnectorButton.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3Connectors.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3Connectors.js.map +0 -1
- package/dist/components/common/Dialog.cjs.map +0 -1
- package/dist/components/common/Dialog.js.map +0 -1
- package/dist/components/common/Divider.cjs.map +0 -1
- package/dist/components/common/Divider.js.map +0 -1
- package/dist/components/common/InputOTP.cjs.map +0 -1
- package/dist/components/common/InputOTP.js.map +0 -1
- package/dist/components/common/PoweredByCrossmint.cjs.map +0 -1
- package/dist/components/common/PoweredByCrossmint.js.map +0 -1
- package/dist/components/common/Spinner.cjs.map +0 -1
- package/dist/components/common/Spinner.js.map +0 -1
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs.map +0 -1
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js.map +0 -1
- package/dist/components/embed/EmbeddedCheckoutIFrame.cjs.map +0 -1
- package/dist/components/embed/EmbeddedCheckoutIFrame.js.map +0 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs.map +0 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js.map +0 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs.map +0 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js.map +0 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs.map +0 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.js.map +0 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs.map +0 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js.map +0 -1
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs.map +0 -1
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.js.map +0 -1
- package/dist/components/embed/index.cjs.map +0 -1
- package/dist/components/embed/index.js.map +0 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs.map +0 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js.map +0 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs.map +0 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js.map +0 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +0 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs.map +0 -1
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js.map +0 -1
- package/dist/components/embed/v3/index.cjs.map +0 -1
- package/dist/components/embed/v3/index.js.map +0 -1
- package/dist/components/hosted/CrossmintPayButton.cjs.map +0 -1
- package/dist/components/hosted/CrossmintPayButton.js.map +0 -1
- package/dist/components/hosted/index.cjs.map +0 -1
- package/dist/components/hosted/index.js.map +0 -1
- package/dist/components/hosted/styles.cjs.map +0 -1
- package/dist/components/hosted/styles.js.map +0 -1
- package/dist/components/index.cjs.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/consts/version.cjs.map +0 -1
- package/dist/consts/version.js.map +0 -1
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/useAuth.cjs.map +0 -1
- package/dist/hooks/useAuth.js.map +0 -1
- package/dist/hooks/useCrossmint.cjs.map +0 -1
- package/dist/hooks/useCrossmint.js.map +0 -1
- package/dist/hooks/useCrossmintAuth.cjs.map +0 -1
- package/dist/hooks/useCrossmintAuth.js.map +0 -1
- package/dist/hooks/useCrossmintCheckout.cjs.map +0 -1
- package/dist/hooks/useCrossmintCheckout.js.map +0 -1
- package/dist/hooks/useDeepEffect.cjs.map +0 -1
- package/dist/hooks/useDeepEffect.js.map +0 -1
- package/dist/hooks/useEnvironment.cjs.map +0 -1
- package/dist/hooks/useEnvironment.js.map +0 -1
- package/dist/hooks/useOAuthWindowListener.cjs.map +0 -1
- package/dist/hooks/useOAuthWindowListener.js.map +0 -1
- package/dist/hooks/useWallet.cjs.map +0 -1
- package/dist/hooks/useWallet.js.map +0 -1
- package/dist/icons/alert.cjs.map +0 -1
- package/dist/icons/alert.js.map +0 -1
- package/dist/icons/base64Icons.cjs.map +0 -1
- package/dist/icons/base64Icons.js.map +0 -1
- package/dist/icons/chevronRight.cjs.map +0 -1
- package/dist/icons/chevronRight.js.map +0 -1
- package/dist/icons/discord.cjs.map +0 -1
- package/dist/icons/discord.js.map +0 -1
- package/dist/icons/emailOTP.cjs.map +0 -1
- package/dist/icons/emailOTP.js.map +0 -1
- package/dist/icons/farcaster.cjs.map +0 -1
- package/dist/icons/farcaster.js.map +0 -1
- package/dist/icons/fingerprint.cjs.map +0 -1
- package/dist/icons/fingerprint.js.map +0 -1
- package/dist/icons/google.cjs.map +0 -1
- package/dist/icons/google.js.map +0 -1
- package/dist/icons/leftArrow.cjs.map +0 -1
- package/dist/icons/leftArrow.js.map +0 -1
- package/dist/icons/passkey.cjs.map +0 -1
- package/dist/icons/passkey.js.map +0 -1
- package/dist/icons/passkeyPromptLogo.cjs.map +0 -1
- package/dist/icons/passkeyPromptLogo.js.map +0 -1
- package/dist/icons/poweredByLeaf.cjs.map +0 -1
- package/dist/icons/poweredByLeaf.js.map +0 -1
- package/dist/icons/wallet.cjs.map +0 -1
- package/dist/icons/wallet.js.map +0 -1
- package/dist/icons/x.cjs.map +0 -1
- package/dist/icons/x.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/providers/CrossmintAuthProvider.cjs.map +0 -1
- package/dist/providers/CrossmintAuthProvider.js.map +0 -1
- package/dist/providers/CrossmintWalletProvider.cjs.map +0 -1
- package/dist/providers/CrossmintWalletProvider.js.map +0 -1
- package/dist/providers/TwindProvider.cjs.map +0 -1
- package/dist/providers/TwindProvider.js.map +0 -1
- package/dist/providers/auth/AuthFormProvider.cjs.map +0 -1
- package/dist/providers/auth/AuthFormProvider.js.map +0 -1
- package/dist/providers/auth/FarcasterProvider.cjs.map +0 -1
- package/dist/providers/auth/FarcasterProvider.js.map +0 -1
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs.map +0 -1
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js.map +0 -1
- package/dist/providers/index.cjs.map +0 -1
- package/dist/providers/index.js.map +0 -1
- package/dist/testUtils.cjs.map +0 -1
- package/dist/testUtils.js.map +0 -1
- package/dist/twind.config.cjs.map +0 -1
- package/dist/twind.config.js.map +0 -1
- package/dist/types/auth.cjs.map +0 -1
- package/dist/types/auth.js.map +0 -1
- package/dist/utils/classNames.cjs.map +0 -1
- package/dist/utils/classNames.js.map +0 -1
- package/dist/utils/createCrossmintApiClient.cjs.map +0 -1
- package/dist/utils/createCrossmintApiClient.js.map +0 -1
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.cjs.map +0 -1
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.js.map +0 -1
- package/src/components/CrossmintCollectionView.test.tsx +0 -36
- package/src/components/CrossmintNFTCollectionView.tsx +0 -25
- package/src/components/CrossmintNFTDetail.test.tsx +0 -38
- package/src/components/CrossmintNFTDetail.tsx +0 -25
- package/src/components/auth/AuthForm.tsx +0 -84
- package/src/components/auth/AuthFormBackButton.tsx +0 -30
- package/src/components/auth/AuthFormDialog.tsx +0 -38
- package/src/components/auth/EmbeddedAuthForm.tsx +0 -5
- package/src/components/auth/PasskeyPrompt.tsx +0 -258
- package/src/components/auth/methods/email/EmailAuthFlow.tsx +0 -19
- package/src/components/auth/methods/email/EmailOTPInput.tsx +0 -124
- package/src/components/auth/methods/email/EmailSignIn.tsx +0 -110
- package/src/components/auth/methods/farcaster/FarcasterSignIn.tsx +0 -169
- package/src/components/auth/methods/google/GoogleSignIn.tsx +0 -53
- package/src/components/auth/methods/web3/Web3AuthFlow.tsx +0 -35
- package/src/components/auth/methods/web3/Web3AuthFlowButton.tsx +0 -44
- package/src/components/auth/methods/web3/Web3Connector.tsx +0 -62
- package/src/components/auth/methods/web3/Web3ConnectorButton.tsx +0 -38
- package/src/components/auth/methods/web3/Web3Connectors.tsx +0 -28
- package/src/components/common/Dialog.tsx +0 -122
- package/src/components/common/Divider.tsx +0 -25
- package/src/components/common/InputOTP.tsx +0 -94
- package/src/components/common/PoweredByCrossmint.tsx +0 -10
- package/src/components/common/Spinner.tsx +0 -22
- package/src/components/dynamic-xyz/DynamicContextProviderWrapper.tsx +0 -31
- package/src/components/embed/CrossmintPaymentElement.test.tsx +0 -79
- package/src/components/embed/EmbeddedCheckoutIFrame.tsx +0 -71
- package/src/components/embed/crypto/CryptoEmbeddedCheckout.tsx +0 -11
- package/src/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.tsx +0 -108
- package/src/components/embed/fiat/FiatEmbeddedCheckout.tsx +0 -7
- package/src/components/embed/fiat/FiatEmbeddedCheckoutIFrame.tsx +0 -21
- package/src/components/embed/fiat/FiatPaymentElement_OLD.tsx +0 -73
- package/src/components/embed/index.tsx +0 -19
- package/src/components/embed/v3/CrossmintEmbeddedCheckoutV3.tsx +0 -7
- package/src/components/embed/v3/EmbeddedCheckoutV3IFrame.tsx +0 -83
- package/src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx +0 -144
- package/src/components/embed/v3/crypto/utils/handleEvmTransaction.ts +0 -78
- package/src/components/embed/v3/crypto/utils/handleSendTransaction.ts +0 -29
- package/src/components/embed/v3/crypto/utils/handleSolanaTransaction.ts +0 -54
- package/src/components/embed/v3/index.ts +0 -1
- package/src/components/hosted/CrossmintPayButton.test.tsx +0 -188
- package/src/components/hosted/CrossmintPayButton.tsx +0 -132
- package/src/components/hosted/index.ts +0 -1
- package/src/components/hosted/styles.ts +0 -58
- package/src/components/index.ts +0 -8
- package/src/consts/version.ts +0 -3
- package/src/hooks/index.ts +0 -4
- package/src/hooks/useAuth.ts +0 -11
- package/src/hooks/useCrossmint.test.tsx +0 -103
- package/src/hooks/useCrossmint.tsx +0 -57
- package/src/hooks/useCrossmintAuth.ts +0 -12
- package/src/hooks/useCrossmintCheckout.tsx +0 -56
- package/src/hooks/useDeepEffect.ts +0 -15
- package/src/hooks/useEnvironment.ts +0 -10
- package/src/hooks/useOAuthWindowListener.ts +0 -84
- package/src/hooks/useWallet.ts +0 -13
- package/src/icons/alert.tsx +0 -19
- package/src/icons/base64Icons.ts +0 -8
- package/src/icons/chevronRight.tsx +0 -21
- package/src/icons/discord.tsx +0 -18
- package/src/icons/emailOTP.tsx +0 -147
- package/src/icons/farcaster.tsx +0 -26
- package/src/icons/fingerprint.tsx +0 -25
- package/src/icons/google.tsx +0 -30
- package/src/icons/leftArrow.tsx +0 -20
- package/src/icons/passkey.tsx +0 -18
- package/src/icons/passkeyPromptLogo.tsx +0 -76
- package/src/icons/poweredByLeaf.tsx +0 -85
- package/src/icons/wallet.tsx +0 -23
- package/src/icons/x.tsx +0 -19
- package/src/index.ts +0 -23
- package/src/providers/CrossmintAuthProvider.test.tsx +0 -269
- package/src/providers/CrossmintAuthProvider.tsx +0 -211
- package/src/providers/CrossmintWalletProvider.test.tsx +0 -218
- package/src/providers/CrossmintWalletProvider.tsx +0 -155
- package/src/providers/TwindProvider.tsx +0 -14
- package/src/providers/auth/AuthFormProvider.test.tsx +0 -142
- package/src/providers/auth/AuthFormProvider.tsx +0 -109
- package/src/providers/auth/FarcasterProvider.tsx +0 -12
- package/src/providers/auth/web3/DynamicWeb3WalletConnect.tsx +0 -73
- package/src/providers/index.ts +0 -2
- package/src/testUtils.ts +0 -1
- package/src/twind.config.ts +0 -114
- package/src/types/auth.ts +0 -4
- package/src/utils/classNames.ts +0 -12
- package/src/utils/createCrossmintApiClient.ts +0 -17
- package/src/utils/dynamic/dynamicChainToCrossmintChain.ts +0 -20
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import DynamicContextProviderWrapper from "@/components/dynamic-xyz/DynamicContextProviderWrapper";
|
|
2
|
-
import type { EmbeddedCheckoutV3IFrameEmitter } from "@crossmint/client-sdk-base";
|
|
3
|
-
import type { APIKeyEnvironmentPrefix, BlockchainIncludingTestnet } from "@crossmint/common-sdk-base";
|
|
4
|
-
import { EthereumWalletConnectors } from "@dynamic-labs/ethereum";
|
|
5
|
-
import { DynamicContext, useDynamicContext } from "@dynamic-labs/sdk-react-core";
|
|
6
|
-
import { SolanaWalletConnectors } from "@dynamic-labs/solana";
|
|
7
|
-
import { type Dispatch, type SetStateAction, useContext, useEffect, useState } from "react";
|
|
8
|
-
import { handleSendTransaction } from "./utils/handleSendTransaction";
|
|
9
|
-
import { dynamicChainToCrossmintChain } from "@/utils/dynamic/dynamicChainToCrossmintChain";
|
|
10
|
-
|
|
11
|
-
export function CryptoWalletConnectionHandler(props: {
|
|
12
|
-
iframeClient: EmbeddedCheckoutV3IFrameEmitter | null;
|
|
13
|
-
apiKeyEnvironment: APIKeyEnvironmentPrefix;
|
|
14
|
-
}) {
|
|
15
|
-
const { iframeClient, apiKeyEnvironment } = props;
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<DynamicContextProviderWrapper
|
|
19
|
-
apiKeyEnvironment={apiKeyEnvironment}
|
|
20
|
-
settings={{
|
|
21
|
-
walletConnectors: [EthereumWalletConnectors, SolanaWalletConnectors],
|
|
22
|
-
events: {
|
|
23
|
-
onAuthFlowCancel() {
|
|
24
|
-
console.log("[CryptoWalletConnectionHandler] onAuthFlowCancel");
|
|
25
|
-
iframeClient?.send("crypto:connect-wallet.failed", {
|
|
26
|
-
error: "cancelled",
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
onAuthFlowClose() {
|
|
30
|
-
console.log("[CryptoWalletConnectionHandler] onAuthFlowClose");
|
|
31
|
-
},
|
|
32
|
-
onAuthFailure(data, reason) {
|
|
33
|
-
console.error("[CryptoWalletConnectionHandler] onAuthFailure", data, reason);
|
|
34
|
-
},
|
|
35
|
-
onAuthSuccess(data) {
|
|
36
|
-
console.log("[CryptoWalletConnectionHandler] onAuthSuccess", data);
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
handlers: {
|
|
40
|
-
handleConnectedWallet: async (wallet) => {
|
|
41
|
-
console.log("[CryptoWalletConnectionHandler] handleConnectedWallet", wallet);
|
|
42
|
-
|
|
43
|
-
const address = wallet.address;
|
|
44
|
-
if (!address) {
|
|
45
|
-
console.error("[CryptoWalletConnectionHandler] handleConnectedWallet: address is missing");
|
|
46
|
-
iframeClient?.send("crypto:connect-wallet.failed", {
|
|
47
|
-
error: "address is missing",
|
|
48
|
-
});
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const chain = await dynamicChainToCrossmintChain(wallet);
|
|
53
|
-
|
|
54
|
-
iframeClient?.send("crypto:connect-wallet.success", {
|
|
55
|
-
address,
|
|
56
|
-
chain,
|
|
57
|
-
walletProviderKey: wallet.connector?.key,
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
return true;
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
<_CryptoWalletConnectionHandler {...props} />
|
|
66
|
-
</DynamicContextProviderWrapper>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function _CryptoWalletConnectionHandler({ iframeClient }: Parameters<typeof CryptoWalletConnectionHandler>[0]) {
|
|
71
|
-
const [showDynamicModal, setShowDynamicModal] = useState(false);
|
|
72
|
-
const { primaryWallet } = useDynamicContext();
|
|
73
|
-
|
|
74
|
-
useEffect(() => {
|
|
75
|
-
if (iframeClient == null) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
const showAuthFlowListener = iframeClient.on("crypto:connect-wallet.show", ({ show }) => {
|
|
79
|
-
setShowDynamicModal(show);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
return () => {
|
|
83
|
-
iframeClient.off(showAuthFlowListener);
|
|
84
|
-
};
|
|
85
|
-
}, [iframeClient]);
|
|
86
|
-
|
|
87
|
-
useEffect(() => {
|
|
88
|
-
if (iframeClient == null) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const signTransactionListener = iframeClient.on(
|
|
92
|
-
"crypto:send-transaction",
|
|
93
|
-
async ({ chain, serializedTransaction }) => {
|
|
94
|
-
if (primaryWallet == null) {
|
|
95
|
-
console.error("[CryptoWalletConnectionHandler] signTransaction: primaryWallet is missing");
|
|
96
|
-
iframeClient.send("crypto:send-transaction:failed", {
|
|
97
|
-
error: "primaryWallet is missing",
|
|
98
|
-
});
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
await handleSendTransaction(
|
|
103
|
-
primaryWallet,
|
|
104
|
-
chain as BlockchainIncludingTestnet,
|
|
105
|
-
serializedTransaction,
|
|
106
|
-
iframeClient
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
return () => {
|
|
112
|
-
iframeClient.off(signTransactionListener);
|
|
113
|
-
};
|
|
114
|
-
}, [iframeClient, primaryWallet]);
|
|
115
|
-
|
|
116
|
-
return showDynamicModal ? <ShowDynamicModal setShowDynamicModal={setShowDynamicModal} /> : null;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export function ShowDynamicModal({ setShowDynamicModal }: { setShowDynamicModal: Dispatch<SetStateAction<boolean>> }) {
|
|
120
|
-
const context = useContext(DynamicContext);
|
|
121
|
-
if (context == null) {
|
|
122
|
-
throw new Error("DynamicContext is missing");
|
|
123
|
-
}
|
|
124
|
-
const { setShowAuthFlow, handleLogOut } = context;
|
|
125
|
-
|
|
126
|
-
useEffect(() => {
|
|
127
|
-
// Move focus from the iframe to the main page, otherwise the modal will require a double click to interact with it
|
|
128
|
-
document.getElementById("crossmint-focus-target")?.focus();
|
|
129
|
-
|
|
130
|
-
(async () => {
|
|
131
|
-
await handleLogOut();
|
|
132
|
-
setShowAuthFlow(true, {
|
|
133
|
-
clearErrors: true,
|
|
134
|
-
emitCancelAuth: true,
|
|
135
|
-
ignoreIfIsEmbeddedWidget: true,
|
|
136
|
-
initializeWalletConnect: true,
|
|
137
|
-
performMultiWalletChecks: false, // Important to be false in order to not require double clicking connect button
|
|
138
|
-
});
|
|
139
|
-
setShowDynamicModal(false);
|
|
140
|
-
})();
|
|
141
|
-
}, []);
|
|
142
|
-
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { EmbeddedCheckoutV3IFrameEmitter } from "@crossmint/client-sdk-base";
|
|
2
|
-
import {
|
|
3
|
-
type BlockchainIncludingTestnet,
|
|
4
|
-
blockchainToChainId,
|
|
5
|
-
type EVMBlockchainIncludingTestnet,
|
|
6
|
-
} from "@crossmint/common-sdk-base";
|
|
7
|
-
import type { Wallet } from "@dynamic-labs/sdk-react-core";
|
|
8
|
-
import {
|
|
9
|
-
type Chain,
|
|
10
|
-
type Account,
|
|
11
|
-
type WalletClient,
|
|
12
|
-
type TransactionSerializableEIP1559,
|
|
13
|
-
type Transport,
|
|
14
|
-
parseTransaction,
|
|
15
|
-
} from "viem";
|
|
16
|
-
|
|
17
|
-
export async function handleEvmTransaction({
|
|
18
|
-
primaryWallet,
|
|
19
|
-
chain,
|
|
20
|
-
serializedTransaction,
|
|
21
|
-
iframeClient,
|
|
22
|
-
}: {
|
|
23
|
-
primaryWallet: Wallet;
|
|
24
|
-
chain: BlockchainIncludingTestnet;
|
|
25
|
-
serializedTransaction: string;
|
|
26
|
-
iframeClient: EmbeddedCheckoutV3IFrameEmitter;
|
|
27
|
-
}) {
|
|
28
|
-
const { connector } = primaryWallet;
|
|
29
|
-
const chainId = blockchainToChainId(chain as EVMBlockchainIncludingTestnet);
|
|
30
|
-
|
|
31
|
-
try {
|
|
32
|
-
await connector.switchNetwork({ networkChainId: chainId });
|
|
33
|
-
} catch (error) {
|
|
34
|
-
console.error(`[CryptoWalletConnectionHandler] failed to switch network to ${chainId}`, error);
|
|
35
|
-
iframeClient.send("crypto:send-transaction:failed", {
|
|
36
|
-
error: (error as Error).message,
|
|
37
|
-
});
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
let walletClient: WalletClient<Transport, Chain, Account> | undefined;
|
|
42
|
-
try {
|
|
43
|
-
walletClient = connector.getWalletClient<WalletClient<Transport, Chain, Account> | undefined>(String(chainId));
|
|
44
|
-
if (!walletClient) {
|
|
45
|
-
throw new Error(`connector.getWalletClient(${chainId}) returned undefined`);
|
|
46
|
-
}
|
|
47
|
-
} catch (error) {
|
|
48
|
-
console.error("[CryptoWalletConnectionHandler] failed to get wallet client", error);
|
|
49
|
-
iframeClient.send("crypto:send-transaction:failed", {
|
|
50
|
-
error: (error as Error).message,
|
|
51
|
-
});
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
let parsedTransaction: TransactionSerializableEIP1559;
|
|
56
|
-
try {
|
|
57
|
-
parsedTransaction = parseTransaction(serializedTransaction as `0x${string}`) as TransactionSerializableEIP1559;
|
|
58
|
-
} catch (error) {
|
|
59
|
-
console.error("[CryptoWalletConnectionHandler] failed to parse transaction", error);
|
|
60
|
-
iframeClient.send("crypto:send-transaction:failed", {
|
|
61
|
-
error: (error as Error).message,
|
|
62
|
-
});
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
try {
|
|
67
|
-
const txId = await walletClient.sendTransaction(parsedTransaction);
|
|
68
|
-
console.log("[CryptoWalletConnectionHandler] txId", txId);
|
|
69
|
-
iframeClient.send("crypto:send-transaction:success", {
|
|
70
|
-
txId,
|
|
71
|
-
});
|
|
72
|
-
} catch (error) {
|
|
73
|
-
console.error("[CryptoWalletConnectionHandler] failed to send transaction", error);
|
|
74
|
-
iframeClient.send("crypto:send-transaction:failed", {
|
|
75
|
-
error: (error as Error).message,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Wallet } from "@dynamic-labs/sdk-react-core";
|
|
2
|
-
import type { BlockchainIncludingTestnet } from "@crossmint/common-sdk-base";
|
|
3
|
-
import type { EmbeddedCheckoutV3IFrameEmitter } from "@crossmint/client-sdk-base";
|
|
4
|
-
|
|
5
|
-
export async function handleSendTransaction(
|
|
6
|
-
primaryWallet: Wallet,
|
|
7
|
-
chain: BlockchainIncludingTestnet,
|
|
8
|
-
serializedTransaction: string,
|
|
9
|
-
iframeClient: EmbeddedCheckoutV3IFrameEmitter
|
|
10
|
-
) {
|
|
11
|
-
const commonParams = {
|
|
12
|
-
chain,
|
|
13
|
-
serializedTransaction,
|
|
14
|
-
iframeClient,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
switch (primaryWallet.chain) {
|
|
18
|
-
case "EVM":
|
|
19
|
-
// @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
|
|
20
|
-
const { handleEvmTransaction } = await import("./handleEvmTransaction");
|
|
21
|
-
return await handleEvmTransaction({ ...commonParams, primaryWallet });
|
|
22
|
-
case "SOL":
|
|
23
|
-
// @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
|
|
24
|
-
const { handleSolanaTransaction } = await import("./handleSolanaTransaction");
|
|
25
|
-
return await handleSolanaTransaction({ ...commonParams, primaryWallet });
|
|
26
|
-
default:
|
|
27
|
-
throw new Error(`Connected wallet is on an unsupported chain: ${primaryWallet.chain}`);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { EmbeddedCheckoutV3IFrameEmitter } from "@crossmint/client-sdk-base";
|
|
2
|
-
import type { Wallet } from "@dynamic-labs/sdk-react-core";
|
|
3
|
-
import type { ISolana } from "@dynamic-labs/solana";
|
|
4
|
-
import { Transaction } from "@solana/web3.js";
|
|
5
|
-
import base58 from "bs58";
|
|
6
|
-
|
|
7
|
-
export async function handleSolanaTransaction({
|
|
8
|
-
primaryWallet,
|
|
9
|
-
serializedTransaction,
|
|
10
|
-
iframeClient,
|
|
11
|
-
}: {
|
|
12
|
-
primaryWallet: Wallet;
|
|
13
|
-
serializedTransaction: string;
|
|
14
|
-
iframeClient: EmbeddedCheckoutV3IFrameEmitter;
|
|
15
|
-
}) {
|
|
16
|
-
// TODO: Handle switch network
|
|
17
|
-
|
|
18
|
-
const { connector } = primaryWallet;
|
|
19
|
-
|
|
20
|
-
let signer: ISolana;
|
|
21
|
-
try {
|
|
22
|
-
signer = await connector.getSigner<ISolana>();
|
|
23
|
-
} catch (error) {
|
|
24
|
-
console.error("[CryptoWalletConnectionHandler] failed to get signer", error);
|
|
25
|
-
iframeClient.send("crypto:send-transaction:failed", {
|
|
26
|
-
error: "Failed to get signer",
|
|
27
|
-
});
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
let deserializedTransaction: Transaction;
|
|
32
|
-
try {
|
|
33
|
-
deserializedTransaction = Transaction.from(base58.decode(serializedTransaction));
|
|
34
|
-
} catch (error) {
|
|
35
|
-
console.error("[CryptoWalletConnectionHandler] failed to deserialize transaction", error);
|
|
36
|
-
iframeClient.send("crypto:send-transaction:failed", {
|
|
37
|
-
error: "Failed to deserialize transaction",
|
|
38
|
-
});
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
try {
|
|
43
|
-
const { signature: txId } = await signer.signAndSendTransaction(deserializedTransaction);
|
|
44
|
-
console.log("[CryptoWalletConnectionHandler] txId", txId);
|
|
45
|
-
iframeClient.send("crypto:send-transaction:success", {
|
|
46
|
-
txId,
|
|
47
|
-
});
|
|
48
|
-
} catch (error) {
|
|
49
|
-
console.error("[CryptoWalletConnectionHandler] failed to send transaction", error);
|
|
50
|
-
iframeClient.send("crypto:send-transaction:failed", {
|
|
51
|
-
error: (error as Error).message,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./CrossmintEmbeddedCheckoutV3";
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import "@testing-library/jest-dom/vitest";
|
|
2
|
-
import { act, fireEvent, render, screen } from "@testing-library/react";
|
|
3
|
-
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
4
|
-
|
|
5
|
-
import { CrossmintPayButton } from ".";
|
|
6
|
-
import { LIB_VERSION } from "../../consts/version";
|
|
7
|
-
|
|
8
|
-
// TODO(#60): create a global service for this to work everywhere and to be able to customize resolved/rejected responses
|
|
9
|
-
const fetchReturns = Promise.resolve({
|
|
10
|
-
json: () => Promise.resolve({}),
|
|
11
|
-
}) as any;
|
|
12
|
-
global.fetch = vi.fn(() => fetchReturns);
|
|
13
|
-
|
|
14
|
-
// TODO(#61): make this automatically mocked in every test suite
|
|
15
|
-
const openReturns = {} as Window;
|
|
16
|
-
global.open = vi.fn(() => openReturns);
|
|
17
|
-
global.console = {
|
|
18
|
-
log: vi.fn(),
|
|
19
|
-
error: vi.fn(),
|
|
20
|
-
warn: vi.fn(),
|
|
21
|
-
} as any;
|
|
22
|
-
|
|
23
|
-
const defaultProps = {
|
|
24
|
-
clientId: "a4e1bfcc-9884-11ec-b909-0242ac120002",
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
describe("CrossmintPayButton", () => {
|
|
28
|
-
afterEach(() => {
|
|
29
|
-
vi.clearAllMocks();
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it("should open window with correct url", async () => {
|
|
33
|
-
render(<CrossmintPayButton {...defaultProps} />);
|
|
34
|
-
|
|
35
|
-
await act(async () => {
|
|
36
|
-
fireEvent.click(screen.getByText("Buy with credit card"));
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const urlOrigin = "https://www.crossmint.com";
|
|
40
|
-
|
|
41
|
-
const mintQueryParams = new URLSearchParams({
|
|
42
|
-
clientId: defaultProps.clientId,
|
|
43
|
-
clientName: "client-sdk-react-ui",
|
|
44
|
-
clientVersion: LIB_VERSION,
|
|
45
|
-
locale: "en-US",
|
|
46
|
-
currency: "usd",
|
|
47
|
-
}).toString();
|
|
48
|
-
|
|
49
|
-
const callbackUrl = encodeURIComponent(`${urlOrigin}/checkout/mint?${mintQueryParams}`);
|
|
50
|
-
|
|
51
|
-
const signinURLParams = new URLSearchParams({
|
|
52
|
-
locale: "en-US",
|
|
53
|
-
currency: "usd",
|
|
54
|
-
email: "",
|
|
55
|
-
}).toString();
|
|
56
|
-
|
|
57
|
-
const expectedURL = `${urlOrigin}/signin?${signinURLParams}&callbackUrl=${callbackUrl}`;
|
|
58
|
-
expect(global.open).toHaveBeenCalledWith(
|
|
59
|
-
expectedURL,
|
|
60
|
-
"popUpWindow",
|
|
61
|
-
"height=750,width=400,left=312,top=9,resizable=yes,scrollbars=yes,toolbar=yes,menubar=true,location=no,directories=no,status=yes"
|
|
62
|
-
);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it("should add the `whPassThroughArgs` prop on the window url", async () => {
|
|
66
|
-
const whPassThroughArgs = { hello: "hi" };
|
|
67
|
-
render(<CrossmintPayButton {...defaultProps} whPassThroughArgs={whPassThroughArgs} />);
|
|
68
|
-
|
|
69
|
-
await act(async () => {
|
|
70
|
-
fireEvent.click(screen.getByText("Buy with credit card"));
|
|
71
|
-
});
|
|
72
|
-
expect(global.open).toHaveBeenCalledWith(
|
|
73
|
-
expect.stringContaining("whPassThroughArgs%3D%257B%2522hello%2522%253A%2522hi%2522%257D"),
|
|
74
|
-
expect.anything(),
|
|
75
|
-
expect.anything()
|
|
76
|
-
);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
describe("when passing the prepay prop", () => {
|
|
80
|
-
it("should pass the prepay query param", async () => {
|
|
81
|
-
render(<CrossmintPayButton {...defaultProps} prepay />);
|
|
82
|
-
|
|
83
|
-
await act(async () => {
|
|
84
|
-
fireEvent.click(screen.getByText("Buy with credit card"));
|
|
85
|
-
});
|
|
86
|
-
expect(global.open).toHaveBeenCalledWith(
|
|
87
|
-
expect.stringContaining("prepay%3Dtrue"),
|
|
88
|
-
expect.anything(),
|
|
89
|
-
expect.anything()
|
|
90
|
-
);
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
describe("when passing the prepay prop as false", () => {
|
|
95
|
-
it("should not pass the prepay query param", async () => {
|
|
96
|
-
render(<CrossmintPayButton {...defaultProps} prepay={false} />);
|
|
97
|
-
|
|
98
|
-
await act(async () => {
|
|
99
|
-
fireEvent.click(screen.getByText("Buy with credit card"));
|
|
100
|
-
});
|
|
101
|
-
expect(global.open).toHaveBeenCalledWith(
|
|
102
|
-
expect.not.stringContaining("prepay"),
|
|
103
|
-
expect.anything(),
|
|
104
|
-
expect.anything()
|
|
105
|
-
);
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
describe("when passing the loginEmail prop", () => {
|
|
110
|
-
it("should pass an email in the email query param", async () => {
|
|
111
|
-
render(<CrossmintPayButton {...defaultProps} loginEmail="user@gmail.com" />);
|
|
112
|
-
|
|
113
|
-
await act(async () => {
|
|
114
|
-
fireEvent.click(screen.getByText("Buy with credit card"));
|
|
115
|
-
});
|
|
116
|
-
expect(global.open).toHaveBeenCalledWith(
|
|
117
|
-
expect.stringContaining("email=user%40gmail.com"),
|
|
118
|
-
expect.anything(),
|
|
119
|
-
expect.anything()
|
|
120
|
-
);
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
it("should pass the email query param empty if loginEmail is empty", async () => {
|
|
124
|
-
render(<CrossmintPayButton {...defaultProps} loginEmail="" />);
|
|
125
|
-
|
|
126
|
-
await act(async () => {
|
|
127
|
-
fireEvent.click(screen.getByText("Buy with credit card"));
|
|
128
|
-
});
|
|
129
|
-
expect(global.open).toHaveBeenCalledWith(
|
|
130
|
-
expect.stringContaining("email=&"),
|
|
131
|
-
expect.anything(),
|
|
132
|
-
expect.anything()
|
|
133
|
-
);
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
it("should pass the email query param empty if loginEmail is not present as a param", async () => {
|
|
137
|
-
render(<CrossmintPayButton {...defaultProps} />);
|
|
138
|
-
|
|
139
|
-
await act(async () => {
|
|
140
|
-
fireEvent.click(screen.getByText("Buy with credit card"));
|
|
141
|
-
});
|
|
142
|
-
expect(global.open).toHaveBeenCalledWith(
|
|
143
|
-
expect.stringContaining("email=&"),
|
|
144
|
-
expect.anything(),
|
|
145
|
-
expect.anything()
|
|
146
|
-
);
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
describe("when passing collectionId instead of clientId", () => {
|
|
151
|
-
it("should open window with correct url", async () => {
|
|
152
|
-
render(<CrossmintPayButton collectionId={defaultProps.clientId} />);
|
|
153
|
-
|
|
154
|
-
await act(async () => {
|
|
155
|
-
fireEvent.click(screen.getByText("Buy with credit card"));
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
expect(global.open).toHaveBeenCalledWith(
|
|
159
|
-
expect.stringContaining(`clientId%3D${defaultProps.clientId}`),
|
|
160
|
-
expect.anything(),
|
|
161
|
-
expect.anything()
|
|
162
|
-
);
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
describe("when passing projectId", () => {
|
|
167
|
-
it("should open window with projectId included in query params", async () => {
|
|
168
|
-
render(<CrossmintPayButton {...defaultProps} projectId="123" />);
|
|
169
|
-
|
|
170
|
-
await act(async () => {
|
|
171
|
-
fireEvent.click(screen.getByText("Buy with credit card"));
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
expect(global.open).toHaveBeenCalledWith(
|
|
175
|
-
expect.stringContaining(`projectId%3D123`),
|
|
176
|
-
expect.anything(),
|
|
177
|
-
expect.anything()
|
|
178
|
-
);
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
describe("when passing getButtonText prop", () => {
|
|
183
|
-
it("should show custom text", async () => {
|
|
184
|
-
render(<CrossmintPayButton {...defaultProps} getButtonText={() => "Custom text"} />);
|
|
185
|
-
expect(screen.getByText("Custom text")).toBeInTheDocument();
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
});
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { type CSSProperties, type MouseEvent, useMemo } from "react";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
type CheckoutProps,
|
|
6
|
-
type CrossmintPayButtonProps,
|
|
7
|
-
clientNames,
|
|
8
|
-
crossmintModalService,
|
|
9
|
-
crossmintPayButtonService,
|
|
10
|
-
} from "@crossmint/client-sdk-base";
|
|
11
|
-
|
|
12
|
-
import { LIB_VERSION } from "../../consts/version";
|
|
13
|
-
import useEnvironment from "../../hooks/useEnvironment";
|
|
14
|
-
import { formatProps, useStyles } from "./styles";
|
|
15
|
-
|
|
16
|
-
export type CrossmintPayButtonReactProps = CrossmintPayButtonProps & {
|
|
17
|
-
onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
18
|
-
style?: CSSProperties;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export function CrossmintPayButton(buttonProps: CrossmintPayButtonReactProps) {
|
|
22
|
-
const {
|
|
23
|
-
className,
|
|
24
|
-
disabled,
|
|
25
|
-
onClick,
|
|
26
|
-
style,
|
|
27
|
-
tabIndex,
|
|
28
|
-
theme = "dark",
|
|
29
|
-
mintTo,
|
|
30
|
-
emailTo,
|
|
31
|
-
listingId,
|
|
32
|
-
auctionId,
|
|
33
|
-
showOverlay = true,
|
|
34
|
-
mintConfig,
|
|
35
|
-
whPassThroughArgs,
|
|
36
|
-
environment,
|
|
37
|
-
paymentMethod,
|
|
38
|
-
preferredSigninMethod,
|
|
39
|
-
dismissOverlayOnClick,
|
|
40
|
-
prepay,
|
|
41
|
-
locale = "en-US",
|
|
42
|
-
currency = "usd",
|
|
43
|
-
successCallbackURL = "",
|
|
44
|
-
failureCallbackURL = "",
|
|
45
|
-
loginEmail = "",
|
|
46
|
-
projectId,
|
|
47
|
-
getButtonText,
|
|
48
|
-
checkoutProps = {
|
|
49
|
-
experimental: false,
|
|
50
|
-
display: "same-tab",
|
|
51
|
-
paymentMethods: ["fiat", "ETH", "SOL"],
|
|
52
|
-
} as CheckoutProps,
|
|
53
|
-
...props
|
|
54
|
-
} = buttonProps;
|
|
55
|
-
|
|
56
|
-
const collectionId = "clientId" in props ? props.clientId : props.collectionId;
|
|
57
|
-
|
|
58
|
-
const [connecting, setConnecting] = useState(false);
|
|
59
|
-
const { isServerSideRendering } = useEnvironment();
|
|
60
|
-
|
|
61
|
-
const { connect } = crossmintModalService({
|
|
62
|
-
clientId: collectionId,
|
|
63
|
-
projectId,
|
|
64
|
-
showOverlay,
|
|
65
|
-
dismissOverlayOnClick,
|
|
66
|
-
setConnecting,
|
|
67
|
-
libVersion: LIB_VERSION,
|
|
68
|
-
environment,
|
|
69
|
-
clientName: clientNames.reactUi,
|
|
70
|
-
locale,
|
|
71
|
-
currency,
|
|
72
|
-
successCallbackURL,
|
|
73
|
-
failureCallbackURL,
|
|
74
|
-
loginEmail,
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
const { getButtonText: getButtonTextInternal, handleClick } = crossmintPayButtonService({
|
|
78
|
-
onClick,
|
|
79
|
-
connecting,
|
|
80
|
-
paymentMethod,
|
|
81
|
-
locale,
|
|
82
|
-
checkoutProps,
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
const _handleClick = (event: MouseEvent<HTMLButtonElement>) =>
|
|
86
|
-
handleClick(event, () => {
|
|
87
|
-
connect(
|
|
88
|
-
mintConfig,
|
|
89
|
-
mintTo,
|
|
90
|
-
emailTo,
|
|
91
|
-
listingId,
|
|
92
|
-
whPassThroughArgs,
|
|
93
|
-
paymentMethod,
|
|
94
|
-
preferredSigninMethod,
|
|
95
|
-
prepay,
|
|
96
|
-
checkoutProps
|
|
97
|
-
);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
const classes = useStyles(formatProps(theme));
|
|
101
|
-
|
|
102
|
-
const content = useMemo(() => {
|
|
103
|
-
return (
|
|
104
|
-
<span className={classes.crossmintParagraph} role="button-paragraph">
|
|
105
|
-
{getButtonText != null
|
|
106
|
-
? getButtonText(connecting, paymentMethod || "fiat")
|
|
107
|
-
: getButtonTextInternal(connecting)}
|
|
108
|
-
</span>
|
|
109
|
-
);
|
|
110
|
-
}, [connecting, getButtonText, paymentMethod]);
|
|
111
|
-
|
|
112
|
-
return (
|
|
113
|
-
<>
|
|
114
|
-
{!isServerSideRendering && (
|
|
115
|
-
<button
|
|
116
|
-
className={`${classes.crossmintButton} ${className || ""}`}
|
|
117
|
-
disabled={disabled}
|
|
118
|
-
onClick={_handleClick}
|
|
119
|
-
style={{ ...style }}
|
|
120
|
-
tabIndex={tabIndex}
|
|
121
|
-
>
|
|
122
|
-
<img
|
|
123
|
-
className={classes.crossmintImg}
|
|
124
|
-
src="https://www.crossmint.io/assets/crossmint/logo.svg"
|
|
125
|
-
alt="Crossmint logo"
|
|
126
|
-
/>
|
|
127
|
-
{content}
|
|
128
|
-
</button>
|
|
129
|
-
)}
|
|
130
|
-
</>
|
|
131
|
-
);
|
|
132
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./CrossmintPayButton";
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { type Styles, createUseStyles } from "react-jss";
|
|
2
|
-
|
|
3
|
-
const DARK_BG = "#1e1e1e";
|
|
4
|
-
|
|
5
|
-
const themeIsLight = (theme: string) => theme === "light";
|
|
6
|
-
|
|
7
|
-
export const formatProps = (theme: string): CustomStylingProps => ({
|
|
8
|
-
buttonBgColor: themeIsLight(theme) ? "white" : DARK_BG,
|
|
9
|
-
paragraphColor: themeIsLight(theme) ? "black" : "white",
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export type Classes<Name extends string | number | symbol = string> = Record<Name, string>;
|
|
13
|
-
interface CustomStylingProps {
|
|
14
|
-
buttonBgColor?: string;
|
|
15
|
-
paragraphColor?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const styles: Styles<"crossmintButton" | "crossmintImg" | "crossmintParagraph" | "@global", CustomStylingProps> = {
|
|
19
|
-
"@global": {
|
|
20
|
-
"@import":
|
|
21
|
-
"url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap')",
|
|
22
|
-
},
|
|
23
|
-
crossmintButton: {
|
|
24
|
-
display: "flex",
|
|
25
|
-
"flex-direction": "row",
|
|
26
|
-
"align-items": "center",
|
|
27
|
-
padding: "0.875rem 0.875rem",
|
|
28
|
-
"font-weight": "900",
|
|
29
|
-
transition: "opacity ease-in-out 0.25s",
|
|
30
|
-
"border-radius": "0.5rem",
|
|
31
|
-
"font-family": `"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif`,
|
|
32
|
-
outline: "none",
|
|
33
|
-
border: "none",
|
|
34
|
-
"box-shadow": "0px 8px 15px rgba(0, 0, 0, 0.1)",
|
|
35
|
-
"justify-content": "center",
|
|
36
|
-
background: ({ buttonBgColor }: CustomStylingProps) => buttonBgColor,
|
|
37
|
-
|
|
38
|
-
"&:hover:enabled": {
|
|
39
|
-
opacity: "0.6",
|
|
40
|
-
cursor: "pointer",
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
crossmintImg: {
|
|
44
|
-
width: "21px",
|
|
45
|
-
height: "21px",
|
|
46
|
-
"margin-right": "0.875rem",
|
|
47
|
-
},
|
|
48
|
-
crossmintParagraph: {
|
|
49
|
-
color: ({ paragraphColor }: CustomStylingProps) => paragraphColor,
|
|
50
|
-
margin: "0",
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const useStyles: (
|
|
55
|
-
data?: CustomStylingProps & {
|
|
56
|
-
theme?: any;
|
|
57
|
-
}
|
|
58
|
-
) => Classes<"crossmintButton" | "crossmintImg" | "crossmintParagraph" | "@global"> = createUseStyles(styles);
|