@crossmint/client-sdk-react-ui 1.11.0 → 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 -9
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.js +1 -9
- package/dist/components/common/CrossmintLogoV2/consts.cjs +1 -12
- package/dist/components/common/CrossmintLogoV2/consts.js +1 -12
- package/dist/components/common/CrossmintLogoV2/schemas.cjs +1 -34
- package/dist/components/common/CrossmintLogoV2/schemas.js +1 -34
- 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 -21
- package/dist/components/hosted/index.js +1 -21
- package/dist/components/hosted/styles.cjs +1 -10
- package/dist/components/hosted/styles.js +1 -10
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -13
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -13
- package/dist/components/hosted/v3/index.cjs +1 -14
- package/dist/components/hosted/v3/index.js +1 -14
- package/dist/components/index.cjs +1 -70
- package/dist/components/index.js +1 -70
- 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 -126
- package/dist/index.js +1 -126
- 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 +7 -8
- 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-3DNABH3U.cjs +0 -87
- package/dist/chunk-3DNABH3U.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-3PV5EK7P.cjs +0 -153
- package/dist/chunk-3PV5EK7P.cjs.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-4F4YOWCE.cjs +0 -14
- package/dist/chunk-4F4YOWCE.cjs.map +0 -1
- package/dist/chunk-4S3T65XY.cjs +0 -1111
- package/dist/chunk-4S3T65XY.cjs.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-6CPZDD6Y.js +0 -29
- package/dist/chunk-6CPZDD6Y.js.map +0 -1
- package/dist/chunk-6FG6NL44.js +0 -30
- package/dist/chunk-6FG6NL44.js.map +0 -1
- package/dist/chunk-6HYESP6N.cjs +0 -81
- package/dist/chunk-6HYESP6N.cjs.map +0 -1
- package/dist/chunk-6JDOBNKD.cjs +0 -64
- package/dist/chunk-6JDOBNKD.cjs.map +0 -1
- package/dist/chunk-6LO4NSRH.cjs +0 -21
- package/dist/chunk-6LO4NSRH.cjs.map +0 -1
- package/dist/chunk-7GWCNJOK.cjs +0 -31
- package/dist/chunk-7GWCNJOK.cjs.map +0 -1
- package/dist/chunk-7KIY6DLW.js +0 -28
- package/dist/chunk-7KIY6DLW.js.map +0 -1
- package/dist/chunk-7UXIFMNO.js +0 -1
- package/dist/chunk-7UXIFMNO.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-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-DZ5MGN25.js +0 -147
- package/dist/chunk-DZ5MGN25.js.map +0 -1
- package/dist/chunk-E4SMHCKA.cjs +0 -31
- package/dist/chunk-E4SMHCKA.cjs.map +0 -1
- package/dist/chunk-EAEMD3DY.cjs +0 -34
- package/dist/chunk-EAEMD3DY.cjs.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-FKIMKZ4Y.js +0 -17
- package/dist/chunk-FKIMKZ4Y.js.map +0 -1
- package/dist/chunk-FKLRSMKS.js +0 -87
- package/dist/chunk-FKLRSMKS.js.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-HPOZ6I54.cjs +0 -44
- package/dist/chunk-HPOZ6I54.cjs.map +0 -1
- package/dist/chunk-I63FQCIV.js +0 -189
- package/dist/chunk-I63FQCIV.js.map +0 -1
- package/dist/chunk-IDJ7FOHB.js +0 -34
- package/dist/chunk-IDJ7FOHB.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-J3UJX77B.js +0 -31
- package/dist/chunk-J3UJX77B.js.map +0 -1
- package/dist/chunk-JD2M6AS5.js +0 -10
- package/dist/chunk-JD2M6AS5.js.map +0 -1
- package/dist/chunk-JWEEEVCE.js +0 -83
- package/dist/chunk-JWEEEVCE.js.map +0 -1
- package/dist/chunk-KEF5UBVQ.js +0 -31
- package/dist/chunk-KEF5UBVQ.js.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-KPQDVXHK.js +0 -105
- package/dist/chunk-KPQDVXHK.js.map +0 -1
- package/dist/chunk-KPTRUNFA.js +0 -81
- package/dist/chunk-KPTRUNFA.js.map +0 -1
- package/dist/chunk-L3FKENHU.js +0 -14
- package/dist/chunk-L3FKENHU.js.map +0 -1
- package/dist/chunk-LBGALVRW.js +0 -1111
- package/dist/chunk-LBGALVRW.js.map +0 -1
- package/dist/chunk-LDTLGSZB.cjs +0 -83
- package/dist/chunk-LDTLGSZB.cjs.map +0 -1
- package/dist/chunk-LGY5FQOZ.cjs +0 -29
- package/dist/chunk-LGY5FQOZ.cjs.map +0 -1
- package/dist/chunk-M7QMNNHL.cjs +0 -31
- package/dist/chunk-M7QMNNHL.cjs.map +0 -1
- package/dist/chunk-MARIDIHZ.js +0 -50
- package/dist/chunk-MARIDIHZ.js.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-NLGUTNQM.js +0 -22
- package/dist/chunk-NLGUTNQM.js.map +0 -1
- package/dist/chunk-NMXFWIFA.js +0 -133
- package/dist/chunk-NMXFWIFA.js.map +0 -1
- package/dist/chunk-ODL7X7KV.cjs +0 -17
- package/dist/chunk-ODL7X7KV.cjs.map +0 -1
- package/dist/chunk-PBSL6JOF.cjs +0 -17
- package/dist/chunk-PBSL6JOF.cjs.map +0 -1
- package/dist/chunk-PCY3N6C2.js +0 -1
- package/dist/chunk-PCY3N6C2.js.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-QCOHQSZM.js +0 -31
- package/dist/chunk-QCOHQSZM.js.map +0 -1
- package/dist/chunk-QDKAU3H2.js +0 -31
- package/dist/chunk-QDKAU3H2.js.map +0 -1
- package/dist/chunk-QFVOIF7B.cjs +0 -50
- package/dist/chunk-QFVOIF7B.cjs.map +0 -1
- package/dist/chunk-QP2A7HRU.cjs +0 -22
- package/dist/chunk-QP2A7HRU.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-RU4ZOZP5.cjs +0 -1
- package/dist/chunk-RU4ZOZP5.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-UASNCH3A.cjs +0 -27
- package/dist/chunk-UASNCH3A.cjs.map +0 -1
- package/dist/chunk-UD3UTFV3.cjs +0 -1
- package/dist/chunk-UD3UTFV3.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-W3P2I3UE.cjs +0 -10
- package/dist/chunk-W3P2I3UE.cjs.map +0 -1
- package/dist/chunk-X4GDZRHJ.js +0 -14
- package/dist/chunk-X4GDZRHJ.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-XQOEKZSB.js +0 -64
- package/dist/chunk-XQOEKZSB.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-XZPSXJOK.js +0 -17
- package/dist/chunk-XZPSXJOK.js.map +0 -1
- package/dist/chunk-YE55IKBP.cjs +0 -34
- package/dist/chunk-YE55IKBP.cjs.map +0 -1
- package/dist/chunk-YWVQCHQF.js +0 -51
- package/dist/chunk-YWVQCHQF.js.map +0 -1
- package/dist/chunk-Z6QSH522.cjs +0 -105
- package/dist/chunk-Z6QSH522.cjs.map +0 -1
- package/dist/chunk-ZAW535DG.js +0 -153
- package/dist/chunk-ZAW535DG.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-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/CrossmintLogoV2/CrossmintLogoV2.cjs.map +0 -1
- package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.js.map +0 -1
- package/dist/components/common/CrossmintLogoV2/consts.cjs.map +0 -1
- package/dist/components/common/CrossmintLogoV2/consts.js.map +0 -1
- package/dist/components/common/CrossmintLogoV2/schemas.cjs.map +0 -1
- package/dist/components/common/CrossmintLogoV2/schemas.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/hosted/v3/CrossmintHostedCheckoutV3.cjs.map +0 -1
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js.map +0 -1
- package/dist/components/hosted/v3/index.cjs.map +0 -1
- package/dist/components/hosted/v3/index.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/CrossmintLogoV2/CrossmintLogoV2.tsx +0 -98
- package/src/components/common/CrossmintLogoV2/consts.ts +0 -28
- package/src/components/common/CrossmintLogoV2/schemas.ts +0 -34
- 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 -3
- package/src/components/hosted/styles.ts +0 -58
- package/src/components/hosted/v3/CrossmintHostedCheckoutV3.tsx +0 -74
- package/src/components/hosted/v3/index.ts +0 -1
- 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
package/dist/chunk-LBGALVRW.js
DELETED
|
@@ -1,1111 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FarcasterProvider
|
|
3
|
-
} from "./chunk-A7J4DAE7.js";
|
|
4
|
-
import {
|
|
5
|
-
PasskeyPrompt
|
|
6
|
-
} from "./chunk-XEZF7G64.js";
|
|
7
|
-
import {
|
|
8
|
-
Dialog,
|
|
9
|
-
DialogContent,
|
|
10
|
-
DialogDescription,
|
|
11
|
-
DialogTitle
|
|
12
|
-
} from "./chunk-NMXFWIFA.js";
|
|
13
|
-
import {
|
|
14
|
-
InputOTP,
|
|
15
|
-
InputOTPGroup,
|
|
16
|
-
InputOTPSlot
|
|
17
|
-
} from "./chunk-33WZFL2D.js";
|
|
18
|
-
import {
|
|
19
|
-
PoweredByCrossmint
|
|
20
|
-
} from "./chunk-FKIMKZ4Y.js";
|
|
21
|
-
import {
|
|
22
|
-
Spinner
|
|
23
|
-
} from "./chunk-QTL5I5C2.js";
|
|
24
|
-
import {
|
|
25
|
-
TwindProvider
|
|
26
|
-
} from "./chunk-HATQVB6H.js";
|
|
27
|
-
import {
|
|
28
|
-
classNames
|
|
29
|
-
} from "./chunk-RZPQIRIY.js";
|
|
30
|
-
import {
|
|
31
|
-
LeftArrowIcon
|
|
32
|
-
} from "./chunk-ZDQGQY7Z.js";
|
|
33
|
-
import {
|
|
34
|
-
AlertIcon
|
|
35
|
-
} from "./chunk-7KIY6DLW.js";
|
|
36
|
-
import {
|
|
37
|
-
EmailOtpIcon
|
|
38
|
-
} from "./chunk-I63FQCIV.js";
|
|
39
|
-
import {
|
|
40
|
-
FarcasterIcon
|
|
41
|
-
} from "./chunk-ZIHCLVCD.js";
|
|
42
|
-
import {
|
|
43
|
-
GoogleIcon
|
|
44
|
-
} from "./chunk-YWVQCHQF.js";
|
|
45
|
-
import {
|
|
46
|
-
useCrossmint
|
|
47
|
-
} from "./chunk-3J6CUUWT.js";
|
|
48
|
-
import {
|
|
49
|
-
__async,
|
|
50
|
-
__objRest,
|
|
51
|
-
__spreadProps,
|
|
52
|
-
__spreadValues
|
|
53
|
-
} from "./chunk-CRTRMMJ7.js";
|
|
54
|
-
|
|
55
|
-
// src/providers/CrossmintWalletProvider.tsx
|
|
56
|
-
import { createContext as createContext3, useMemo as useMemo3, useState as useState8 } from "react";
|
|
57
|
-
import { createPortal } from "react-dom";
|
|
58
|
-
import {
|
|
59
|
-
SmartWalletError,
|
|
60
|
-
SmartWalletSDK
|
|
61
|
-
} from "@crossmint/client-sdk-smart-wallet";
|
|
62
|
-
|
|
63
|
-
// src/hooks/useWallet.ts
|
|
64
|
-
import { useContext } from "react";
|
|
65
|
-
function useWallet() {
|
|
66
|
-
const walletContext = useContext(WalletContext);
|
|
67
|
-
if (!walletContext) {
|
|
68
|
-
throw new Error("useWallet must be used within CrossmintAuthProvider or CrossmintWalletProvider");
|
|
69
|
-
}
|
|
70
|
-
return walletContext;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// src/hooks/useAuth.ts
|
|
74
|
-
import { useContext as useContext4 } from "react";
|
|
75
|
-
|
|
76
|
-
// src/providers/CrossmintAuthProvider.tsx
|
|
77
|
-
import { createContext as createContext2, useEffect as useEffect5, useMemo as useMemo2, useRef as useRef2, useState as useState7 } from "react";
|
|
78
|
-
import { CrossmintAuth, getCookie } from "@crossmint/client-sdk-auth";
|
|
79
|
-
import { validateApiKeyAndGetCrossmintBaseUrl } from "@crossmint/common-sdk-base";
|
|
80
|
-
import { SESSION_PREFIX } from "@crossmint/common-sdk-auth";
|
|
81
|
-
|
|
82
|
-
// src/components/auth/AuthFormDialog.tsx
|
|
83
|
-
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
|
84
|
-
|
|
85
|
-
// src/providers/auth/AuthFormProvider.tsx
|
|
86
|
-
import { createContext, useCallback, useContext as useContext3, useEffect, useState } from "react";
|
|
87
|
-
|
|
88
|
-
// src/hooks/useCrossmintAuth.ts
|
|
89
|
-
import { useContext as useContext2 } from "react";
|
|
90
|
-
function useCrossmintAuth() {
|
|
91
|
-
const context = useContext2(AuthContext);
|
|
92
|
-
if (!context) {
|
|
93
|
-
throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");
|
|
94
|
-
}
|
|
95
|
-
return context;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// src/providers/auth/AuthFormProvider.tsx
|
|
99
|
-
import { jsx } from "react/jsx-runtime";
|
|
100
|
-
var initialOAuthUrlMap = {
|
|
101
|
-
google: ""
|
|
102
|
-
// Farcaster is not included here as it uses a different authentication method
|
|
103
|
-
};
|
|
104
|
-
var AuthFormContext = createContext(void 0);
|
|
105
|
-
var useAuthForm = () => {
|
|
106
|
-
const context = useContext3(AuthFormContext);
|
|
107
|
-
if (!context) {
|
|
108
|
-
throw new Error("useAuthForm must be used within an AuthFormProvider");
|
|
109
|
-
}
|
|
110
|
-
return context;
|
|
111
|
-
};
|
|
112
|
-
var AuthFormProvider = ({
|
|
113
|
-
children,
|
|
114
|
-
initialState
|
|
115
|
-
}) => {
|
|
116
|
-
const { crossmintAuth } = useCrossmintAuth();
|
|
117
|
-
const [step, setStep] = useState("initial");
|
|
118
|
-
const [error, setError] = useState(null);
|
|
119
|
-
const [oauthUrlMap, setOauthUrlMap] = useState(initialOAuthUrlMap);
|
|
120
|
-
const [isLoadingOauthUrlMap, setIsLoadingOauthUrlMap] = useState(true);
|
|
121
|
-
const { loginMethods, baseUrl, setDialogOpen, appearance, embeddedWallets } = initialState;
|
|
122
|
-
if (loginMethods.includes("web3") && (embeddedWallets == null ? void 0 : embeddedWallets.createOnLogin) === "all-users") {
|
|
123
|
-
throw new Error("Creating wallets on login is not yet supported for web3 login method");
|
|
124
|
-
}
|
|
125
|
-
const preFetchAndSetOauthUrl = useCallback(() => __async(void 0, null, function* () {
|
|
126
|
-
setIsLoadingOauthUrlMap(true);
|
|
127
|
-
try {
|
|
128
|
-
const oauthProviders = loginMethods.filter(
|
|
129
|
-
(method) => method in initialOAuthUrlMap
|
|
130
|
-
);
|
|
131
|
-
const oauthPromiseList = oauthProviders.map((provider) => __async(void 0, null, function* () {
|
|
132
|
-
const url = yield crossmintAuth == null ? void 0 : crossmintAuth.getOAuthUrl(provider);
|
|
133
|
-
return { [provider]: url };
|
|
134
|
-
}));
|
|
135
|
-
const oauthUrlMap2 = Object.assign({}, ...yield Promise.all(oauthPromiseList));
|
|
136
|
-
setOauthUrlMap(oauthUrlMap2);
|
|
137
|
-
} catch (error2) {
|
|
138
|
-
console.error("Error fetching OAuth URLs:", error2);
|
|
139
|
-
setError("Unable to load oauth providers. Please try again later.");
|
|
140
|
-
} finally {
|
|
141
|
-
setIsLoadingOauthUrlMap(false);
|
|
142
|
-
}
|
|
143
|
-
}), [loginMethods, crossmintAuth]);
|
|
144
|
-
useEffect(() => {
|
|
145
|
-
preFetchAndSetOauthUrl();
|
|
146
|
-
}, [preFetchAndSetOauthUrl]);
|
|
147
|
-
const handleToggleDialog = (open) => {
|
|
148
|
-
setDialogOpen == null ? void 0 : setDialogOpen(open);
|
|
149
|
-
if (!open) {
|
|
150
|
-
setTimeout(() => setStep("initial"), 250);
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
const value = {
|
|
154
|
-
step,
|
|
155
|
-
error,
|
|
156
|
-
baseUrl,
|
|
157
|
-
appearance,
|
|
158
|
-
loginMethods,
|
|
159
|
-
oauthUrlMap,
|
|
160
|
-
isLoadingOauthUrlMap,
|
|
161
|
-
setDialogOpen: handleToggleDialog,
|
|
162
|
-
setError,
|
|
163
|
-
setStep
|
|
164
|
-
};
|
|
165
|
-
return /* @__PURE__ */ jsx(AuthFormContext.Provider, { value, children });
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
// src/components/auth/AuthForm.tsx
|
|
169
|
-
import { lazy } from "react";
|
|
170
|
-
import Color2 from "color";
|
|
171
|
-
|
|
172
|
-
// src/components/auth/methods/email/EmailAuthFlow.tsx
|
|
173
|
-
import { useState as useState4 } from "react";
|
|
174
|
-
|
|
175
|
-
// src/components/auth/methods/email/EmailOTPInput.tsx
|
|
176
|
-
import { useState as useState2 } from "react";
|
|
177
|
-
|
|
178
|
-
// src/components/auth/AuthFormBackButton.tsx
|
|
179
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
180
|
-
var AuthFormBackButton = (_a) => {
|
|
181
|
-
var _b = _a, {
|
|
182
|
-
className,
|
|
183
|
-
iconColor,
|
|
184
|
-
ringColor,
|
|
185
|
-
onClick
|
|
186
|
-
} = _b, props = __objRest(_b, [
|
|
187
|
-
"className",
|
|
188
|
-
"iconColor",
|
|
189
|
-
"ringColor",
|
|
190
|
-
"onClick"
|
|
191
|
-
]);
|
|
192
|
-
const { setError } = useAuthForm();
|
|
193
|
-
return /* @__PURE__ */ jsx2(
|
|
194
|
-
"button",
|
|
195
|
-
__spreadProps(__spreadValues({
|
|
196
|
-
className: classNames(
|
|
197
|
-
"absolute left-4 top-4 min-[480px]:!left-6 min-[480px]:!top-6 rounded-full opacity-70 ring-offset-background text-cm-text-primary transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-cm-accent focus:ring-offset-2 disabled:pointer-events-none",
|
|
198
|
-
className
|
|
199
|
-
),
|
|
200
|
-
onClick: (event) => {
|
|
201
|
-
setError(null);
|
|
202
|
-
onClick == null ? void 0 : onClick(event);
|
|
203
|
-
}
|
|
204
|
-
}, props), {
|
|
205
|
-
children: /* @__PURE__ */ jsx2(LeftArrowIcon, { className: "w-6 h-6", style: { color: iconColor } })
|
|
206
|
-
})
|
|
207
|
-
);
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
// src/components/auth/methods/email/EmailOTPInput.tsx
|
|
211
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
212
|
-
var EMAIL_VERIFICATION_TOKEN_LENGTH = 6;
|
|
213
|
-
function EmailOTPInput({
|
|
214
|
-
otpEmailData,
|
|
215
|
-
setOtpEmailData
|
|
216
|
-
}) {
|
|
217
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
218
|
-
const { crossmintAuth } = useCrossmintAuth();
|
|
219
|
-
const { appearance, setDialogOpen, setStep, setError } = useAuthForm();
|
|
220
|
-
const [token, setToken] = useState2("");
|
|
221
|
-
const [hasError, setHasError] = useState2(false);
|
|
222
|
-
const [loading, setLoading] = useState2(false);
|
|
223
|
-
const handleOnSubmit = () => __async(this, null, function* () {
|
|
224
|
-
var _a2, _b2;
|
|
225
|
-
setLoading(true);
|
|
226
|
-
try {
|
|
227
|
-
const oneTimeSecret = yield crossmintAuth == null ? void 0 : crossmintAuth.confirmEmailOtp(
|
|
228
|
-
(_a2 = otpEmailData == null ? void 0 : otpEmailData.email) != null ? _a2 : "",
|
|
229
|
-
(_b2 = otpEmailData == null ? void 0 : otpEmailData.emailId) != null ? _b2 : "",
|
|
230
|
-
token
|
|
231
|
-
);
|
|
232
|
-
yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(oneTimeSecret);
|
|
233
|
-
setDialogOpen(false);
|
|
234
|
-
setStep("initial");
|
|
235
|
-
} catch (error) {
|
|
236
|
-
console.error("Error confirming email OTP", error);
|
|
237
|
-
setError("Invalid code. Please try again.");
|
|
238
|
-
setHasError(true);
|
|
239
|
-
} finally {
|
|
240
|
-
setLoading(false);
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
const handleOnBack = () => {
|
|
244
|
-
setStep("initial");
|
|
245
|
-
setOtpEmailData(null);
|
|
246
|
-
};
|
|
247
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
248
|
-
/* @__PURE__ */ jsx3(
|
|
249
|
-
AuthFormBackButton,
|
|
250
|
-
{
|
|
251
|
-
onClick: handleOnBack,
|
|
252
|
-
iconColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
|
|
253
|
-
ringColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.accent
|
|
254
|
-
}
|
|
255
|
-
),
|
|
256
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-start w-full", children: [
|
|
257
|
-
/* @__PURE__ */ jsx3("div", { className: "relative left-3", children: /* @__PURE__ */ jsx3(
|
|
258
|
-
EmailOtpIcon,
|
|
259
|
-
{
|
|
260
|
-
customAccentColor: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.accent,
|
|
261
|
-
customButtonBackgroundColor: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.buttonBackground,
|
|
262
|
-
customBackgroundColor: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.background
|
|
263
|
-
}
|
|
264
|
-
) }),
|
|
265
|
-
/* @__PURE__ */ jsx3(
|
|
266
|
-
"p",
|
|
267
|
-
{
|
|
268
|
-
className: "text-base font-normal mt-4 mb-1 text-center text-cm-text-primary",
|
|
269
|
-
style: { color: (_f = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _f.textPrimary },
|
|
270
|
-
children: "Check your email"
|
|
271
|
-
}
|
|
272
|
-
),
|
|
273
|
-
/* @__PURE__ */ jsx3(
|
|
274
|
-
"p",
|
|
275
|
-
{
|
|
276
|
-
className: "text-center text-cm-text-secondary px-4",
|
|
277
|
-
style: { color: (_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.textSecondary },
|
|
278
|
-
children: "A temporary login code has been sent to your email"
|
|
279
|
-
}
|
|
280
|
-
),
|
|
281
|
-
/* @__PURE__ */ jsx3("div", { className: "py-8", children: /* @__PURE__ */ jsx3(
|
|
282
|
-
InputOTP,
|
|
283
|
-
{
|
|
284
|
-
maxLength: EMAIL_VERIFICATION_TOKEN_LENGTH,
|
|
285
|
-
value: token,
|
|
286
|
-
onChange: (val) => {
|
|
287
|
-
setToken(val);
|
|
288
|
-
setHasError(false);
|
|
289
|
-
setError(null);
|
|
290
|
-
},
|
|
291
|
-
onComplete: handleOnSubmit,
|
|
292
|
-
disabled: loading,
|
|
293
|
-
customStyles: {
|
|
294
|
-
accent: (_i = (_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.accent) != null ? _i : "#04AA6D",
|
|
295
|
-
danger: (_k = (_j = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _j.danger) != null ? _k : "#f44336",
|
|
296
|
-
border: (_m = (_l = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _l.border) != null ? _m : "#E5E7EB",
|
|
297
|
-
textPrimary: (_o = (_n = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _n.textPrimary) != null ? _o : "#909ca3",
|
|
298
|
-
buttonBackground: (_q = (_p = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _p.buttonBackground) != null ? _q : "#eff6ff",
|
|
299
|
-
inputBackground: (_s = (_r = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _r.inputBackground) != null ? _s : "#FFFFFF",
|
|
300
|
-
borderRadius: appearance == null ? void 0 : appearance.borderRadius
|
|
301
|
-
},
|
|
302
|
-
children: /* @__PURE__ */ jsxs(InputOTPGroup, { children: [
|
|
303
|
-
/* @__PURE__ */ jsx3(InputOTPSlot, { index: 0, hasError }),
|
|
304
|
-
/* @__PURE__ */ jsx3(InputOTPSlot, { index: 1, hasError }),
|
|
305
|
-
/* @__PURE__ */ jsx3(InputOTPSlot, { index: 2, hasError }),
|
|
306
|
-
/* @__PURE__ */ jsx3(InputOTPSlot, { index: 3, hasError }),
|
|
307
|
-
/* @__PURE__ */ jsx3(InputOTPSlot, { index: 4, hasError }),
|
|
308
|
-
/* @__PURE__ */ jsx3(InputOTPSlot, { index: 5, hasError })
|
|
309
|
-
] })
|
|
310
|
-
}
|
|
311
|
-
) }),
|
|
312
|
-
/* @__PURE__ */ jsxs("p", { className: "text-sm leading-tight text-cm-text-secondary text-center", children: [
|
|
313
|
-
/* @__PURE__ */ jsx3("span", { style: { color: (_t = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _t.textSecondary }, children: "Can't find the email? Check spam folder or contact" }),
|
|
314
|
-
" ",
|
|
315
|
-
/* @__PURE__ */ jsx3(
|
|
316
|
-
"a",
|
|
317
|
-
{
|
|
318
|
-
className: "transition-opacity duration-150 text-cm-link hover:opacity-70",
|
|
319
|
-
style: { color: (_u = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _u.textLink },
|
|
320
|
-
href: "mailto:support@crossmint.io",
|
|
321
|
-
children: "support@crossmint.io"
|
|
322
|
-
},
|
|
323
|
-
"resend-email-link"
|
|
324
|
-
)
|
|
325
|
-
] })
|
|
326
|
-
] })
|
|
327
|
-
] });
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
// src/components/auth/methods/email/EmailSignIn.tsx
|
|
331
|
-
import { useState as useState3 } from "react";
|
|
332
|
-
import Color from "color";
|
|
333
|
-
import { isEmailValid } from "@crossmint/common-sdk-auth";
|
|
334
|
-
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
335
|
-
function EmailSignIn({ setOtpEmailData }) {
|
|
336
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
337
|
-
const { crossmintAuth } = useCrossmintAuth();
|
|
338
|
-
const { appearance, setStep, setError } = useAuthForm();
|
|
339
|
-
const [emailInput, setEmailInput] = useState3("");
|
|
340
|
-
const [emailError, setEmailError] = useState3("");
|
|
341
|
-
const [isLoading, setIsLoading] = useState3(false);
|
|
342
|
-
function handleOnSubmit(e) {
|
|
343
|
-
return __async(this, null, function* () {
|
|
344
|
-
e.preventDefault();
|
|
345
|
-
if (!isEmailValid(emailInput)) {
|
|
346
|
-
setEmailError("Please enter a valid email address");
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
setIsLoading(true);
|
|
350
|
-
try {
|
|
351
|
-
const trimmedEmailInput = emailInput.trim().toLowerCase();
|
|
352
|
-
const emailSignInRes = yield crossmintAuth == null ? void 0 : crossmintAuth.sendEmailOtp(trimmedEmailInput);
|
|
353
|
-
setOtpEmailData({ email: trimmedEmailInput, emailId: emailSignInRes.emailId });
|
|
354
|
-
setStep("otp");
|
|
355
|
-
} catch (_e2) {
|
|
356
|
-
setIsLoading(false);
|
|
357
|
-
setError("Failed to send email. Please try again or contact support.");
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
return /* @__PURE__ */ jsx4(Fragment, { children: /* @__PURE__ */ jsx4("div", { className: "flex flex-col items-start justify-start w-full rounded-lg", children: /* @__PURE__ */ jsxs2("div", { className: "w-full", children: [
|
|
362
|
-
/* @__PURE__ */ jsxs2(
|
|
363
|
-
"form",
|
|
364
|
-
{
|
|
365
|
-
role: "form",
|
|
366
|
-
className: "relative",
|
|
367
|
-
onSubmit: handleOnSubmit,
|
|
368
|
-
noValidate: true,
|
|
369
|
-
children: [
|
|
370
|
-
/* @__PURE__ */ jsx4("label", { htmlFor: "emailInput", className: "sr-only", children: "Email" }),
|
|
371
|
-
/* @__PURE__ */ jsx4(
|
|
372
|
-
"input",
|
|
373
|
-
{
|
|
374
|
-
className: classNames(
|
|
375
|
-
"flex-grow text-cm-text-secondary text-left pl-[16px] pr-[80px] h-[58px] w-full border border-cm-border rounded-xl bg-cm-background-primary placeholder:text-sm placeholder:text-opacity-60",
|
|
376
|
-
"transition-none duration-200 ease-in-out",
|
|
377
|
-
"focus:outline-none focus-ring-custom",
|
|
378
|
-
// Add focus ring
|
|
379
|
-
emailError ? "border-red-500" : ""
|
|
380
|
-
),
|
|
381
|
-
style: {
|
|
382
|
-
color: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
|
|
383
|
-
borderRadius: appearance == null ? void 0 : appearance.borderRadius,
|
|
384
|
-
borderColor: emailError ? (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.danger : (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.border,
|
|
385
|
-
backgroundColor: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.inputBackground,
|
|
386
|
-
// @ts-expect-error Add custom ring color to tailwind
|
|
387
|
-
"--focus-ring-color": new Color((_f = (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.accent) != null ? _f : "#04AA6D").alpha(0.18).toString()
|
|
388
|
-
},
|
|
389
|
-
type: "email",
|
|
390
|
-
placeholder: "Enter email",
|
|
391
|
-
value: emailInput,
|
|
392
|
-
onChange: (e) => {
|
|
393
|
-
setEmailInput(e.target.value);
|
|
394
|
-
setEmailError("");
|
|
395
|
-
setError(null);
|
|
396
|
-
},
|
|
397
|
-
readOnly: isLoading,
|
|
398
|
-
"aria-describedby": "emailError"
|
|
399
|
-
}
|
|
400
|
-
),
|
|
401
|
-
/* @__PURE__ */ jsxs2("div", { className: "absolute inset-y-0 right-0 flex items-center pr-4", children: [
|
|
402
|
-
emailError && /* @__PURE__ */ jsx4(AlertIcon, { customColor: (_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.danger }),
|
|
403
|
-
isLoading && /* @__PURE__ */ jsx4(
|
|
404
|
-
Spinner,
|
|
405
|
-
{
|
|
406
|
-
style: {
|
|
407
|
-
color: (_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.textSecondary,
|
|
408
|
-
fill: (_i = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _i.textPrimary
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
),
|
|
412
|
-
!emailError && !isLoading && /* @__PURE__ */ jsx4(
|
|
413
|
-
"button",
|
|
414
|
-
{
|
|
415
|
-
type: "submit",
|
|
416
|
-
className: classNames("cursor-pointer font-medium text-cm-accent text-nowrap"),
|
|
417
|
-
style: { color: (_j = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _j.accent },
|
|
418
|
-
disabled: !emailInput,
|
|
419
|
-
children: "Sign in"
|
|
420
|
-
}
|
|
421
|
-
)
|
|
422
|
-
] })
|
|
423
|
-
]
|
|
424
|
-
}
|
|
425
|
-
),
|
|
426
|
-
emailError && /* @__PURE__ */ jsx4("p", { className: "text-xs text-red-500 mb-2 pt-2", children: emailError })
|
|
427
|
-
] }) }) });
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
// src/components/auth/methods/email/EmailAuthFlow.tsx
|
|
431
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
432
|
-
function EmailAuthFlow() {
|
|
433
|
-
const { step } = useAuthForm();
|
|
434
|
-
const [otpEmailData, setOtpEmailData] = useState4(null);
|
|
435
|
-
if (step === "otp") {
|
|
436
|
-
return /* @__PURE__ */ jsx5(EmailOTPInput, { otpEmailData, setOtpEmailData });
|
|
437
|
-
}
|
|
438
|
-
if (step === "initial") {
|
|
439
|
-
return /* @__PURE__ */ jsx5(EmailSignIn, { setOtpEmailData });
|
|
440
|
-
}
|
|
441
|
-
return null;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
// src/components/common/Divider.tsx
|
|
445
|
-
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
446
|
-
function Divider({ appearance, text }) {
|
|
447
|
-
var _a, _b, _c;
|
|
448
|
-
const { step } = useAuthForm();
|
|
449
|
-
if (step !== "initial") {
|
|
450
|
-
return null;
|
|
451
|
-
}
|
|
452
|
-
return /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-center w-full pt-2 pb-3", children: [
|
|
453
|
-
/* @__PURE__ */ jsx6("span", { className: "w-full h-[1px] bg-cm-border", style: { backgroundColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.border } }),
|
|
454
|
-
text != null ? /* @__PURE__ */ jsx6(
|
|
455
|
-
"p",
|
|
456
|
-
{
|
|
457
|
-
className: "flex-none px-2 text-sm text-cm-text-primary",
|
|
458
|
-
style: { color: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary },
|
|
459
|
-
children: text
|
|
460
|
-
}
|
|
461
|
-
) : null,
|
|
462
|
-
/* @__PURE__ */ jsx6("span", { className: "w-full h-[1px] bg-cm-border", style: { backgroundColor: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.border } })
|
|
463
|
-
] });
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
// src/hooks/useOAuthWindowListener.ts
|
|
467
|
-
import { ChildWindow, PopupWindow } from "@crossmint/client-sdk-window";
|
|
468
|
-
import { useEffect as useEffect2, useRef, useState as useState5 } from "react";
|
|
469
|
-
import { z } from "zod";
|
|
470
|
-
var useOAuthWindowListener = (provider) => {
|
|
471
|
-
const { crossmintAuth } = useCrossmintAuth();
|
|
472
|
-
const { oauthUrlMap, setError } = useAuthForm();
|
|
473
|
-
const [isLoading, setIsLoading] = useState5(false);
|
|
474
|
-
const childRef = useRef(null);
|
|
475
|
-
useEffect2(() => {
|
|
476
|
-
if (childRef.current == null) {
|
|
477
|
-
childRef.current = new ChildWindow(window.opener || window.parent, "*", {
|
|
478
|
-
incomingEvents
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
return () => {
|
|
482
|
-
if (childRef.current != null) {
|
|
483
|
-
childRef.current.off("authMaterialFromPopupCallback");
|
|
484
|
-
}
|
|
485
|
-
};
|
|
486
|
-
}, []);
|
|
487
|
-
const createPopupAndSetupListeners = () => __async(void 0, null, function* () {
|
|
488
|
-
if (childRef.current == null) {
|
|
489
|
-
throw new Error("Child window not initialized");
|
|
490
|
-
}
|
|
491
|
-
setIsLoading(true);
|
|
492
|
-
setError(null);
|
|
493
|
-
const popup = yield PopupWindow.init(oauthUrlMap[provider], {
|
|
494
|
-
awaitToLoad: false,
|
|
495
|
-
crossOrigin: true,
|
|
496
|
-
width: 400,
|
|
497
|
-
height: 700
|
|
498
|
-
});
|
|
499
|
-
const handleAuthMaterial = (data) => __async(void 0, null, function* () {
|
|
500
|
-
var _a;
|
|
501
|
-
yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(data.oneTimeSecret);
|
|
502
|
-
(_a = childRef.current) == null ? void 0 : _a.off("authMaterialFromPopupCallback");
|
|
503
|
-
popup.window.close();
|
|
504
|
-
setIsLoading(false);
|
|
505
|
-
});
|
|
506
|
-
const handleError = (data) => {
|
|
507
|
-
var _a;
|
|
508
|
-
setError(data.error);
|
|
509
|
-
(_a = childRef.current) == null ? void 0 : _a.off("errorFromPopupCallback");
|
|
510
|
-
popup.window.close();
|
|
511
|
-
setIsLoading(false);
|
|
512
|
-
};
|
|
513
|
-
childRef.current.on("authMaterialFromPopupCallback", handleAuthMaterial);
|
|
514
|
-
childRef.current.on("errorFromPopupCallback", handleError);
|
|
515
|
-
const checkWindowClosure = setInterval(() => {
|
|
516
|
-
var _a;
|
|
517
|
-
if (popup.window.closed) {
|
|
518
|
-
clearInterval(checkWindowClosure);
|
|
519
|
-
setIsLoading(false);
|
|
520
|
-
(_a = childRef.current) == null ? void 0 : _a.off("authMaterialFromPopupCallback");
|
|
521
|
-
}
|
|
522
|
-
}, 2500);
|
|
523
|
-
});
|
|
524
|
-
return {
|
|
525
|
-
createPopupAndSetupListeners,
|
|
526
|
-
isLoading
|
|
527
|
-
};
|
|
528
|
-
};
|
|
529
|
-
var incomingEvents = {
|
|
530
|
-
authMaterialFromPopupCallback: z.object({ oneTimeSecret: z.string() }),
|
|
531
|
-
errorFromPopupCallback: z.object({ error: z.string() })
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
// src/components/auth/methods/google/GoogleSignIn.tsx
|
|
535
|
-
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
536
|
-
function GoogleSignIn(_a) {
|
|
537
|
-
var props = __objRest(_a, []);
|
|
538
|
-
var _a2, _b, _c, _d;
|
|
539
|
-
const { step, appearance, isLoadingOauthUrlMap } = useAuthForm();
|
|
540
|
-
const { createPopupAndSetupListeners, isLoading: isLoadingOAuthWindow } = useOAuthWindowListener("google");
|
|
541
|
-
const isLoading = isLoadingOauthUrlMap || isLoadingOAuthWindow;
|
|
542
|
-
if (step !== "initial") {
|
|
543
|
-
return null;
|
|
544
|
-
}
|
|
545
|
-
return /* @__PURE__ */ jsxs4(
|
|
546
|
-
"button",
|
|
547
|
-
__spreadProps(__spreadValues({
|
|
548
|
-
className: classNames(
|
|
549
|
-
"relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
|
|
550
|
-
"transition-colors duration-200 ease-in-out",
|
|
551
|
-
"hover:bg-cm-hover focus:bg-cm-hover outline-none",
|
|
552
|
-
isLoading ? "cursor-not-allowed hover:bg-cm-muted-primary" : ""
|
|
553
|
-
),
|
|
554
|
-
style: {
|
|
555
|
-
borderRadius: appearance == null ? void 0 : appearance.borderRadius,
|
|
556
|
-
backgroundColor: (_a2 = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a2.buttonBackground
|
|
557
|
-
},
|
|
558
|
-
onClick: isLoading ? void 0 : createPopupAndSetupListeners
|
|
559
|
-
}, props), {
|
|
560
|
-
children: [
|
|
561
|
-
/* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
562
|
-
/* @__PURE__ */ jsx7(GoogleIcon, { className: "h-[25px] w-[25px] absolute left-[18px]" }),
|
|
563
|
-
isLoading ? /* @__PURE__ */ jsx7(
|
|
564
|
-
Spinner,
|
|
565
|
-
{
|
|
566
|
-
style: {
|
|
567
|
-
color: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary,
|
|
568
|
-
fill: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
) : /* @__PURE__ */ jsx7(
|
|
572
|
-
"span",
|
|
573
|
-
{
|
|
574
|
-
className: "font-medium",
|
|
575
|
-
style: { margin: "0px 32px", color: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textPrimary },
|
|
576
|
-
children: "Sign in with Google"
|
|
577
|
-
}
|
|
578
|
-
)
|
|
579
|
-
] }),
|
|
580
|
-
/* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Sign in with Google" })
|
|
581
|
-
]
|
|
582
|
-
})
|
|
583
|
-
);
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
// src/components/auth/methods/farcaster/FarcasterSignIn.tsx
|
|
587
|
-
import { useEffect as useEffect3, useMemo, useState as useState6 } from "react";
|
|
588
|
-
import { useSignIn, QRCode } from "@farcaster/auth-kit";
|
|
589
|
-
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
590
|
-
function FarcasterSignIn() {
|
|
591
|
-
var _a, _b;
|
|
592
|
-
const { step, appearance, setStep, setError } = useAuthForm();
|
|
593
|
-
if (step === "initial") {
|
|
594
|
-
return /* @__PURE__ */ jsx8("div", { children: /* @__PURE__ */ jsxs5(
|
|
595
|
-
"button",
|
|
596
|
-
{
|
|
597
|
-
className: classNames(
|
|
598
|
-
"relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
|
|
599
|
-
"transition-colors duration-200 ease-in-out",
|
|
600
|
-
"hover:bg-cm-hover focus:bg-cm-hover outline-none"
|
|
601
|
-
),
|
|
602
|
-
style: {
|
|
603
|
-
borderRadius: appearance == null ? void 0 : appearance.borderRadius,
|
|
604
|
-
backgroundColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.buttonBackground
|
|
605
|
-
},
|
|
606
|
-
onClick: () => {
|
|
607
|
-
setStep("qrCode");
|
|
608
|
-
setError(null);
|
|
609
|
-
},
|
|
610
|
-
children: [
|
|
611
|
-
/* @__PURE__ */ jsx8(FarcasterIcon, { className: "h-[25px] w-[25px] absolute left-[18px]" }),
|
|
612
|
-
/* @__PURE__ */ jsx8(
|
|
613
|
-
"span",
|
|
614
|
-
{
|
|
615
|
-
className: "font-medium",
|
|
616
|
-
style: { margin: "0px 32px", color: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textPrimary },
|
|
617
|
-
children: "Sign in with Farcaster"
|
|
618
|
-
}
|
|
619
|
-
),
|
|
620
|
-
/* @__PURE__ */ jsx8("span", { className: "sr-only", children: "Sign in with Farcaster" })
|
|
621
|
-
]
|
|
622
|
-
}
|
|
623
|
-
) });
|
|
624
|
-
}
|
|
625
|
-
if (step === "qrCode") {
|
|
626
|
-
return /* @__PURE__ */ jsx8(FarcasterQRCode, {});
|
|
627
|
-
}
|
|
628
|
-
return null;
|
|
629
|
-
}
|
|
630
|
-
function FarcasterQRCode() {
|
|
631
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
632
|
-
const { crossmintAuth } = useCrossmintAuth();
|
|
633
|
-
const { appearance, setStep, setDialogOpen, setError } = useAuthForm();
|
|
634
|
-
const [farcasterData, setFarcasterData] = useState6(null);
|
|
635
|
-
const farcasterProps = useMemo(
|
|
636
|
-
() => ({
|
|
637
|
-
onSuccess: (data) => {
|
|
638
|
-
setFarcasterData(data);
|
|
639
|
-
}
|
|
640
|
-
}),
|
|
641
|
-
[]
|
|
642
|
-
);
|
|
643
|
-
const { signIn, url: qrCodeUrl, connect, signOut, isConnected } = useSignIn(farcasterProps);
|
|
644
|
-
const handleFarcasterSignIn = (data) => __async(this, null, function* () {
|
|
645
|
-
setError(null);
|
|
646
|
-
try {
|
|
647
|
-
const oneTimeSecret = yield crossmintAuth == null ? void 0 : crossmintAuth.signInWithFarcaster(data);
|
|
648
|
-
yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(oneTimeSecret);
|
|
649
|
-
setDialogOpen(false);
|
|
650
|
-
setStep("initial");
|
|
651
|
-
} catch (error) {
|
|
652
|
-
console.error("Error during Farcaster sign-in:", error);
|
|
653
|
-
setError("Failed to sign in with Farcaster");
|
|
654
|
-
}
|
|
655
|
-
});
|
|
656
|
-
useEffect3(() => {
|
|
657
|
-
if (farcasterData != null) {
|
|
658
|
-
handleFarcasterSignIn(farcasterData);
|
|
659
|
-
}
|
|
660
|
-
}, [farcasterData]);
|
|
661
|
-
useEffect3(() => {
|
|
662
|
-
if (isConnected) {
|
|
663
|
-
signIn();
|
|
664
|
-
}
|
|
665
|
-
}, [isConnected]);
|
|
666
|
-
useEffect3(() => {
|
|
667
|
-
connect();
|
|
668
|
-
}, []);
|
|
669
|
-
return /* @__PURE__ */ jsxs5("div", { children: [
|
|
670
|
-
/* @__PURE__ */ jsx8(
|
|
671
|
-
AuthFormBackButton,
|
|
672
|
-
{
|
|
673
|
-
onClick: () => {
|
|
674
|
-
signOut();
|
|
675
|
-
setStep("initial");
|
|
676
|
-
},
|
|
677
|
-
iconColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
|
|
678
|
-
ringColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.accent
|
|
679
|
-
}
|
|
680
|
-
),
|
|
681
|
-
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col items-center gap-4", children: [
|
|
682
|
-
/* @__PURE__ */ jsxs5("div", { className: "text-center", children: [
|
|
683
|
-
/* @__PURE__ */ jsx8(
|
|
684
|
-
"h3",
|
|
685
|
-
{
|
|
686
|
-
className: "text-lg font-semibold text-cm-text-primary mb-2",
|
|
687
|
-
style: { color: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary },
|
|
688
|
-
children: "Sign in with Farcaster"
|
|
689
|
-
}
|
|
690
|
-
),
|
|
691
|
-
/* @__PURE__ */ jsx8(
|
|
692
|
-
"p",
|
|
693
|
-
{
|
|
694
|
-
className: "text-base font-normal text-cm-text-secondary",
|
|
695
|
-
style: { color: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textSecondary },
|
|
696
|
-
children: "Scan with your phone's camera to continue."
|
|
697
|
-
}
|
|
698
|
-
)
|
|
699
|
-
] }),
|
|
700
|
-
/* @__PURE__ */ jsx8(
|
|
701
|
-
"div",
|
|
702
|
-
{
|
|
703
|
-
className: "bg-white aspect-square rounded-lg p-4",
|
|
704
|
-
style: {
|
|
705
|
-
backgroundColor: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.inputBackground,
|
|
706
|
-
borderRadius: appearance == null ? void 0 : appearance.borderRadius
|
|
707
|
-
},
|
|
708
|
-
children: qrCodeUrl != null ? /* @__PURE__ */ jsx8(QRCode, { uri: qrCodeUrl, size: 280 }) : /* @__PURE__ */ jsx8("div", { className: "min-h-[246px] flex items-center justify-center", children: /* @__PURE__ */ jsx8(
|
|
709
|
-
Spinner,
|
|
710
|
-
{
|
|
711
|
-
style: {
|
|
712
|
-
color: (_f = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _f.textSecondary,
|
|
713
|
-
fill: (_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.textPrimary
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
) })
|
|
717
|
-
}
|
|
718
|
-
),
|
|
719
|
-
qrCodeUrl ? /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
720
|
-
/* @__PURE__ */ jsx8(
|
|
721
|
-
"p",
|
|
722
|
-
{
|
|
723
|
-
className: "text-base text-center font-normal text-cm-text-secondary",
|
|
724
|
-
style: { color: (_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.textSecondary },
|
|
725
|
-
children: "Alternatively, click on this link to open Warpcast."
|
|
726
|
-
}
|
|
727
|
-
),
|
|
728
|
-
/* @__PURE__ */ jsx8(
|
|
729
|
-
"a",
|
|
730
|
-
{
|
|
731
|
-
href: qrCodeUrl,
|
|
732
|
-
rel: "noopener noreferrer",
|
|
733
|
-
target: "_blank",
|
|
734
|
-
className: "text-base font-normal text-cm-link",
|
|
735
|
-
style: { color: (_i = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _i.textLink },
|
|
736
|
-
children: "Open Warpcast"
|
|
737
|
-
}
|
|
738
|
-
)
|
|
739
|
-
] }) : null
|
|
740
|
-
] })
|
|
741
|
-
] });
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
// src/components/auth/AuthForm.tsx
|
|
745
|
-
import { Fragment as Fragment4, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
746
|
-
var Web3AuthFlow = lazy(
|
|
747
|
-
() => (
|
|
748
|
-
// @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
|
|
749
|
-
import("./components/auth/methods/web3/Web3AuthFlow.js").then((mod) => ({
|
|
750
|
-
default: mod.Web3AuthFlow
|
|
751
|
-
}))
|
|
752
|
-
)
|
|
753
|
-
);
|
|
754
|
-
function AuthForm({ className }) {
|
|
755
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
756
|
-
const { step, appearance, loginMethods, baseUrl, error } = useAuthForm();
|
|
757
|
-
return /* @__PURE__ */ jsxs6(
|
|
758
|
-
"div",
|
|
759
|
-
{
|
|
760
|
-
className: classNames(
|
|
761
|
-
"relative p-6 pb-4 !min-[480px]:p-10 !min-[480px]:pb-8 flex flex-col gap-[10px] antialiased animate-none",
|
|
762
|
-
className
|
|
763
|
-
),
|
|
764
|
-
children: [
|
|
765
|
-
error ? /* @__PURE__ */ jsxs6(
|
|
766
|
-
"div",
|
|
767
|
-
{
|
|
768
|
-
className: "flex items-start justify-start w-full rounded-lg p-2 mt-4 bg-cm-danger-muted",
|
|
769
|
-
style: {
|
|
770
|
-
backgroundColor: new Color2((_b = (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.danger) != null ? _b : "#f44336").alpha(0.12).toString()
|
|
771
|
-
},
|
|
772
|
-
children: [
|
|
773
|
-
/* @__PURE__ */ jsx9(AlertIcon, { customColor: (_d = (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.danger) != null ? _d : "#f44336" }),
|
|
774
|
-
/* @__PURE__ */ jsx9("p", { className: "ml-2 text-sm", style: { color: (_f = (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.danger) != null ? _f : "#f44336" }, children: error })
|
|
775
|
-
]
|
|
776
|
-
}
|
|
777
|
-
) : null,
|
|
778
|
-
step === "initial" ? /* @__PURE__ */ jsxs6("div", { children: [
|
|
779
|
-
/* @__PURE__ */ jsx9(
|
|
780
|
-
"h1",
|
|
781
|
-
{
|
|
782
|
-
className: "text-2xl font-bold text-cm-text-primary",
|
|
783
|
-
style: { color: (_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.textPrimary },
|
|
784
|
-
children: "Sign In"
|
|
785
|
-
}
|
|
786
|
-
),
|
|
787
|
-
/* @__PURE__ */ jsx9(
|
|
788
|
-
"p",
|
|
789
|
-
{
|
|
790
|
-
className: "text-base font-normal mb-3 text-cm-text-secondary",
|
|
791
|
-
style: { color: (_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.textSecondary },
|
|
792
|
-
children: "Sign in using one of the options below"
|
|
793
|
-
}
|
|
794
|
-
)
|
|
795
|
-
] }) : null,
|
|
796
|
-
loginMethods.includes("email") ? /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
797
|
-
/* @__PURE__ */ jsx9(EmailAuthFlow, {}),
|
|
798
|
-
loginMethods.length > 1 ? /* @__PURE__ */ jsx9(Divider, { appearance, text: "OR" }) : null
|
|
799
|
-
] }) : null,
|
|
800
|
-
loginMethods.includes("google") ? /* @__PURE__ */ jsx9(GoogleSignIn, {}) : null,
|
|
801
|
-
loginMethods.includes("farcaster") ? /* @__PURE__ */ jsx9(FarcasterProvider, { baseUrl, children: /* @__PURE__ */ jsx9(FarcasterSignIn, {}) }) : null,
|
|
802
|
-
loginMethods.includes("web3") ? /* @__PURE__ */ jsx9(Web3AuthFlow, {}) : null,
|
|
803
|
-
step === "initial" || step === "otp" ? /* @__PURE__ */ jsx9(
|
|
804
|
-
PoweredByCrossmint,
|
|
805
|
-
{
|
|
806
|
-
className: "mt-4 justify-center",
|
|
807
|
-
color: (_j = (_i = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _i.textSecondary) != null ? _j : "#A4AFB2"
|
|
808
|
-
}
|
|
809
|
-
) : null
|
|
810
|
-
]
|
|
811
|
-
}
|
|
812
|
-
);
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
// src/components/auth/AuthFormDialog.tsx
|
|
816
|
-
import { useEffect as useEffect4 } from "react";
|
|
817
|
-
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
818
|
-
function AuthFormDialog({ open }) {
|
|
819
|
-
var _a, _b, _c;
|
|
820
|
-
const { appearance, setDialogOpen } = useAuthForm();
|
|
821
|
-
useEffect4(() => {
|
|
822
|
-
document.body.style.overflow = open ? "hidden" : "";
|
|
823
|
-
}, [open]);
|
|
824
|
-
return /* @__PURE__ */ jsx10(Dialog, { modal: false, open, onOpenChange: setDialogOpen, children: /* @__PURE__ */ jsxs7(
|
|
825
|
-
DialogContent,
|
|
826
|
-
{
|
|
827
|
-
onInteractOutside: (e) => e.preventDefault(),
|
|
828
|
-
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
829
|
-
closeButtonColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
|
|
830
|
-
closeButtonRingColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.accent,
|
|
831
|
-
className: "cm-responsive-border-radius-auth-dialog !p-0 !min-[480px]:p-0",
|
|
832
|
-
style: {
|
|
833
|
-
borderRadius: appearance == null ? void 0 : appearance.borderRadius,
|
|
834
|
-
backgroundColor: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.background
|
|
835
|
-
},
|
|
836
|
-
children: [
|
|
837
|
-
/* @__PURE__ */ jsx10(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx10(DialogTitle, { children: "Crossmint Auth" }) }),
|
|
838
|
-
/* @__PURE__ */ jsx10(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx10(DialogDescription, { children: "Sign in via Crossmint" }) }),
|
|
839
|
-
/* @__PURE__ */ jsx10(AuthForm, { className: "max-w-[448px]" })
|
|
840
|
-
]
|
|
841
|
-
}
|
|
842
|
-
) });
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
// src/providers/CrossmintAuthProvider.tsx
|
|
846
|
-
import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
847
|
-
var defaultContextValue = {
|
|
848
|
-
crossmintAuth: void 0,
|
|
849
|
-
login: () => {
|
|
850
|
-
},
|
|
851
|
-
logout: () => {
|
|
852
|
-
},
|
|
853
|
-
jwt: void 0,
|
|
854
|
-
user: void 0,
|
|
855
|
-
status: "logged-out",
|
|
856
|
-
getUser: () => {
|
|
857
|
-
}
|
|
858
|
-
};
|
|
859
|
-
var AuthContext = createContext2(defaultContextValue);
|
|
860
|
-
var defaultEmbeddedWallets = {
|
|
861
|
-
defaultChain: "base-sepolia",
|
|
862
|
-
createOnLogin: "off",
|
|
863
|
-
type: "evm-smart-wallet"
|
|
864
|
-
};
|
|
865
|
-
function CrossmintAuthProvider({
|
|
866
|
-
embeddedWallets = defaultEmbeddedWallets,
|
|
867
|
-
children,
|
|
868
|
-
appearance,
|
|
869
|
-
loginMethods = ["email", "google"],
|
|
870
|
-
refreshRoute,
|
|
871
|
-
logoutRoute
|
|
872
|
-
}) {
|
|
873
|
-
const [user, setUser] = useState7(void 0);
|
|
874
|
-
const { crossmint, setJwt } = useCrossmint("CrossmintAuthProvider must be used within CrossmintProvider");
|
|
875
|
-
const crossmintAuthRef = useRef2(null);
|
|
876
|
-
const crossmintAuth = useMemo2(() => {
|
|
877
|
-
if (!crossmintAuthRef.current) {
|
|
878
|
-
crossmintAuthRef.current = CrossmintAuth.from(crossmint, {
|
|
879
|
-
callbacks: {
|
|
880
|
-
onLogout: () => {
|
|
881
|
-
setJwt(void 0);
|
|
882
|
-
setUser(void 0);
|
|
883
|
-
},
|
|
884
|
-
onTokenRefresh: (authMaterial) => {
|
|
885
|
-
setJwt(authMaterial.jwt);
|
|
886
|
-
setUser(authMaterial.user);
|
|
887
|
-
}
|
|
888
|
-
},
|
|
889
|
-
refreshRoute,
|
|
890
|
-
logoutRoute
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
return crossmintAuthRef.current;
|
|
894
|
-
}, []);
|
|
895
|
-
const crossmintBaseUrl = validateApiKeyAndGetCrossmintBaseUrl(crossmint.apiKey);
|
|
896
|
-
const [dialogOpen, setDialogOpen] = useState7(false);
|
|
897
|
-
useEffect5(() => {
|
|
898
|
-
if (crossmint.jwt == null) {
|
|
899
|
-
const jwt = getCookie(SESSION_PREFIX);
|
|
900
|
-
setJwt(jwt);
|
|
901
|
-
}
|
|
902
|
-
}, []);
|
|
903
|
-
useEffect5(() => {
|
|
904
|
-
if (crossmint.jwt == null) {
|
|
905
|
-
return;
|
|
906
|
-
}
|
|
907
|
-
setDialogOpen(false);
|
|
908
|
-
}, [crossmint.jwt]);
|
|
909
|
-
const login = () => {
|
|
910
|
-
if (crossmint.jwt != null) {
|
|
911
|
-
console.log("User already logged in");
|
|
912
|
-
return;
|
|
913
|
-
}
|
|
914
|
-
setDialogOpen(true);
|
|
915
|
-
};
|
|
916
|
-
const logout = () => {
|
|
917
|
-
crossmintAuth.logout();
|
|
918
|
-
};
|
|
919
|
-
const getAuthStatus = () => {
|
|
920
|
-
if (crossmint.jwt != null) {
|
|
921
|
-
return "logged-in";
|
|
922
|
-
}
|
|
923
|
-
if (dialogOpen) {
|
|
924
|
-
return "in-progress";
|
|
925
|
-
}
|
|
926
|
-
return "logged-out";
|
|
927
|
-
};
|
|
928
|
-
const getUser = () => __async(this, null, function* () {
|
|
929
|
-
if (crossmint.jwt == null) {
|
|
930
|
-
console.log("User not logged in");
|
|
931
|
-
return;
|
|
932
|
-
}
|
|
933
|
-
const user2 = yield crossmintAuth.getUser();
|
|
934
|
-
setUser(user2);
|
|
935
|
-
});
|
|
936
|
-
return /* @__PURE__ */ jsx11(TwindProvider, { children: /* @__PURE__ */ jsx11(
|
|
937
|
-
AuthContext.Provider,
|
|
938
|
-
{
|
|
939
|
-
value: {
|
|
940
|
-
crossmintAuth,
|
|
941
|
-
login,
|
|
942
|
-
logout,
|
|
943
|
-
jwt: crossmint.jwt,
|
|
944
|
-
user,
|
|
945
|
-
status: getAuthStatus(),
|
|
946
|
-
getUser
|
|
947
|
-
},
|
|
948
|
-
children: /* @__PURE__ */ jsx11(
|
|
949
|
-
CrossmintWalletProvider,
|
|
950
|
-
{
|
|
951
|
-
defaultChain: embeddedWallets.defaultChain,
|
|
952
|
-
showPasskeyHelpers: embeddedWallets.showPasskeyHelpers,
|
|
953
|
-
appearance,
|
|
954
|
-
children: /* @__PURE__ */ jsxs8(
|
|
955
|
-
AuthFormProvider,
|
|
956
|
-
{
|
|
957
|
-
initialState: {
|
|
958
|
-
appearance,
|
|
959
|
-
setDialogOpen,
|
|
960
|
-
loginMethods,
|
|
961
|
-
embeddedWallets,
|
|
962
|
-
baseUrl: crossmintBaseUrl
|
|
963
|
-
},
|
|
964
|
-
children: [
|
|
965
|
-
/* @__PURE__ */ jsx11(WalletManager, { embeddedWallets, accessToken: crossmint.jwt, children }),
|
|
966
|
-
/* @__PURE__ */ jsx11(AuthFormDialog, { open: dialogOpen })
|
|
967
|
-
]
|
|
968
|
-
}
|
|
969
|
-
)
|
|
970
|
-
}
|
|
971
|
-
)
|
|
972
|
-
}
|
|
973
|
-
) });
|
|
974
|
-
}
|
|
975
|
-
function WalletManager({
|
|
976
|
-
embeddedWallets,
|
|
977
|
-
children,
|
|
978
|
-
accessToken
|
|
979
|
-
}) {
|
|
980
|
-
const { getOrCreateWallet, clearWallet, status } = useWallet();
|
|
981
|
-
useEffect5(() => {
|
|
982
|
-
if (embeddedWallets.createOnLogin === "all-users" && status === "not-loaded" && accessToken != null) {
|
|
983
|
-
getOrCreateWallet({
|
|
984
|
-
type: embeddedWallets.type,
|
|
985
|
-
signer: { type: "PASSKEY" }
|
|
986
|
-
});
|
|
987
|
-
}
|
|
988
|
-
if (status === "loaded" && accessToken == null) {
|
|
989
|
-
clearWallet();
|
|
990
|
-
}
|
|
991
|
-
}, [accessToken, status]);
|
|
992
|
-
return /* @__PURE__ */ jsx11(Fragment5, { children });
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
// src/hooks/useAuth.ts
|
|
996
|
-
function useAuth() {
|
|
997
|
-
const context = useContext4(AuthContext);
|
|
998
|
-
if (context === void 0) {
|
|
999
|
-
throw new Error("useAuth must be used within an AuthProvider");
|
|
1000
|
-
}
|
|
1001
|
-
return context;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
// src/providers/CrossmintWalletProvider.tsx
|
|
1005
|
-
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1006
|
-
var WalletContext = createContext3({
|
|
1007
|
-
status: "not-loaded",
|
|
1008
|
-
getOrCreateWallet: () => Promise.resolve({ startedCreation: false }),
|
|
1009
|
-
clearWallet: () => {
|
|
1010
|
-
}
|
|
1011
|
-
});
|
|
1012
|
-
function CrossmintWalletProvider({
|
|
1013
|
-
children,
|
|
1014
|
-
defaultChain,
|
|
1015
|
-
showPasskeyHelpers = true,
|
|
1016
|
-
// enabled by default
|
|
1017
|
-
appearance
|
|
1018
|
-
}) {
|
|
1019
|
-
const { crossmint } = useCrossmint("CrossmintWalletProvider must be used within CrossmintProvider");
|
|
1020
|
-
const smartWalletSDK = useMemo3(() => SmartWalletSDK.init({ clientApiKey: crossmint.apiKey }), [crossmint.apiKey]);
|
|
1021
|
-
const [walletState, setWalletState] = useState8({ status: "not-loaded" });
|
|
1022
|
-
const [passkeyPromptState, setPasskeyPromptState] = useState8({ open: false });
|
|
1023
|
-
const getOrCreateWallet = (..._0) => __async(this, [..._0], function* (config = { type: "evm-smart-wallet", signer: { type: "PASSKEY" } }) {
|
|
1024
|
-
if (walletState.status == "in-progress") {
|
|
1025
|
-
console.log("Wallet already loading");
|
|
1026
|
-
return { startedCreation: false, reason: "Wallet is already loading." };
|
|
1027
|
-
}
|
|
1028
|
-
if (crossmint.jwt == null) {
|
|
1029
|
-
return { startedCreation: false, reason: `Jwt not set in "CrossmintProvider".` };
|
|
1030
|
-
}
|
|
1031
|
-
try {
|
|
1032
|
-
setWalletState({ status: "in-progress" });
|
|
1033
|
-
const wallet = yield smartWalletSDK.getOrCreateWallet(
|
|
1034
|
-
{ jwt: crossmint.jwt },
|
|
1035
|
-
defaultChain,
|
|
1036
|
-
enhanceConfigWithPasskeyPrompts(config)
|
|
1037
|
-
);
|
|
1038
|
-
setWalletState({ status: "loaded", wallet });
|
|
1039
|
-
} catch (error) {
|
|
1040
|
-
console.error("There was an error creating a wallet ", error);
|
|
1041
|
-
setWalletState(deriveErrorState(error));
|
|
1042
|
-
}
|
|
1043
|
-
return { startedCreation: true };
|
|
1044
|
-
});
|
|
1045
|
-
const enhanceConfigWithPasskeyPrompts = (config) => {
|
|
1046
|
-
if (showPasskeyHelpers && config.signer.type === "PASSKEY") {
|
|
1047
|
-
return __spreadProps(__spreadValues({}, config), {
|
|
1048
|
-
signer: __spreadProps(__spreadValues({}, config.signer), {
|
|
1049
|
-
onPrePasskeyRegistration: createPasskeyPrompt("create-wallet"),
|
|
1050
|
-
onPasskeyRegistrationError: createPasskeyPrompt("create-wallet-error"),
|
|
1051
|
-
onFirstTimePasskeySigning: createPasskeyPrompt("transaction"),
|
|
1052
|
-
onFirstTimePasskeySigningError: createPasskeyPrompt("transaction-error")
|
|
1053
|
-
})
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
return config;
|
|
1057
|
-
};
|
|
1058
|
-
const createPasskeyPrompt = (type) => () => new Promise((resolve) => {
|
|
1059
|
-
setPasskeyPromptState({
|
|
1060
|
-
type,
|
|
1061
|
-
open: true,
|
|
1062
|
-
primaryActionOnClick: () => {
|
|
1063
|
-
setPasskeyPromptState({ open: false });
|
|
1064
|
-
resolve();
|
|
1065
|
-
},
|
|
1066
|
-
secondaryActionOnClick: () => {
|
|
1067
|
-
setPasskeyPromptState({ open: false });
|
|
1068
|
-
resolve();
|
|
1069
|
-
}
|
|
1070
|
-
});
|
|
1071
|
-
});
|
|
1072
|
-
const clearWallet = () => {
|
|
1073
|
-
setWalletState({ status: "not-loaded" });
|
|
1074
|
-
};
|
|
1075
|
-
return /* @__PURE__ */ jsxs9(WalletContext.Provider, { value: __spreadProps(__spreadValues({}, walletState), { getOrCreateWallet, clearWallet }), children: [
|
|
1076
|
-
children,
|
|
1077
|
-
passkeyPromptState.open ? createPortal(/* @__PURE__ */ jsx12(PasskeyPrompt, { state: passkeyPromptState, appearance }), document.body) : null
|
|
1078
|
-
] });
|
|
1079
|
-
}
|
|
1080
|
-
function deriveErrorState(error) {
|
|
1081
|
-
if (error instanceof SmartWalletError) {
|
|
1082
|
-
return { status: "loading-error", error };
|
|
1083
|
-
}
|
|
1084
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
1085
|
-
const stack = error instanceof Error ? error.stack : void 0;
|
|
1086
|
-
return { status: "loading-error", error: new SmartWalletError(`Unknown Wallet Error: ${message}`, stack) };
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
export {
|
|
1090
|
-
WalletContext,
|
|
1091
|
-
CrossmintWalletProvider,
|
|
1092
|
-
useWallet,
|
|
1093
|
-
useCrossmintAuth,
|
|
1094
|
-
useAuthForm,
|
|
1095
|
-
AuthFormProvider,
|
|
1096
|
-
AuthFormBackButton,
|
|
1097
|
-
EMAIL_VERIFICATION_TOKEN_LENGTH,
|
|
1098
|
-
EmailOTPInput,
|
|
1099
|
-
EmailSignIn,
|
|
1100
|
-
EmailAuthFlow,
|
|
1101
|
-
Divider,
|
|
1102
|
-
useOAuthWindowListener,
|
|
1103
|
-
GoogleSignIn,
|
|
1104
|
-
FarcasterSignIn,
|
|
1105
|
-
AuthForm,
|
|
1106
|
-
AuthFormDialog,
|
|
1107
|
-
AuthContext,
|
|
1108
|
-
CrossmintAuthProvider,
|
|
1109
|
-
useAuth
|
|
1110
|
-
};
|
|
1111
|
-
//# sourceMappingURL=chunk-LBGALVRW.js.map
|