@crossmint/client-sdk-react-ui 1.9.3 → 1.10.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-2T2VCED7.js +17 -0
- package/dist/chunk-2T2VCED7.js.map +1 -0
- package/dist/chunk-33WZFL2D.js +80 -0
- package/dist/chunk-33WZFL2D.js.map +1 -0
- package/dist/chunk-35RV5AOT.cjs +70 -0
- package/dist/chunk-35RV5AOT.cjs.map +1 -0
- package/dist/chunk-3C5IQSUX.cjs +50 -0
- package/dist/chunk-3C5IQSUX.cjs.map +1 -0
- package/dist/chunk-3J6CUUWT.js +50 -0
- package/dist/chunk-3J6CUUWT.js.map +1 -0
- package/dist/chunk-3KR4GYLF.js +26 -0
- package/dist/chunk-3KR4GYLF.js.map +1 -0
- package/dist/chunk-3RXUFZTR.cjs +14 -0
- package/dist/chunk-3RXUFZTR.cjs.map +1 -0
- package/dist/chunk-43P7QWBK.cjs +17 -0
- package/dist/chunk-43P7QWBK.cjs.map +1 -0
- package/dist/chunk-4DAZAO6Y.cjs +59 -0
- package/dist/chunk-4DAZAO6Y.cjs.map +1 -0
- package/dist/chunk-5IX763AW.js +10 -0
- package/dist/chunk-5IX763AW.js.map +1 -0
- package/dist/chunk-5KK3YQWD.cjs +1 -0
- package/dist/chunk-5KK3YQWD.cjs.map +1 -0
- package/dist/chunk-5RX5WFEW.cjs +11 -0
- package/dist/chunk-5RX5WFEW.cjs.map +1 -0
- package/dist/chunk-5S4VO6RB.cjs +55 -0
- package/dist/chunk-5S4VO6RB.cjs.map +1 -0
- package/dist/chunk-6DNBJVR5.js +64 -0
- package/dist/chunk-6DNBJVR5.js.map +1 -0
- package/dist/chunk-6LO4NSRH.cjs +21 -0
- package/dist/chunk-6LO4NSRH.cjs.map +1 -0
- package/dist/chunk-7KIY6DLW.js +28 -0
- package/dist/chunk-7KIY6DLW.js.map +1 -0
- package/dist/chunk-7SBZ6OIH.js +1 -0
- package/dist/chunk-7SBZ6OIH.js.map +1 -0
- package/dist/chunk-A2JCJ2OV.cjs +119 -0
- package/dist/chunk-A2JCJ2OV.cjs.map +1 -0
- package/dist/chunk-A7J4DAE7.js +16 -0
- package/dist/chunk-A7J4DAE7.js.map +1 -0
- package/dist/chunk-ATHR4S2P.js +48 -0
- package/dist/chunk-ATHR4S2P.js.map +1 -0
- package/dist/chunk-AUEQQ4D3.js +119 -0
- package/dist/chunk-AUEQQ4D3.js.map +1 -0
- package/dist/chunk-AXZLLRBU.cjs +26 -0
- package/dist/chunk-AXZLLRBU.cjs.map +1 -0
- package/dist/chunk-B7LYPQ4K.cjs +38 -0
- package/dist/chunk-B7LYPQ4K.cjs.map +1 -0
- package/dist/chunk-BE2ZLB3L.cjs +19 -0
- package/dist/chunk-BE2ZLB3L.cjs.map +1 -0
- package/dist/chunk-BKVDVDKX.cjs +1 -0
- package/dist/chunk-BKVDVDKX.cjs.map +1 -0
- package/dist/chunk-C2VARNXL.js +70 -0
- package/dist/chunk-C2VARNXL.js.map +1 -0
- package/dist/chunk-CPYPI45H.js +98 -0
- package/dist/chunk-CPYPI45H.js.map +1 -0
- package/dist/chunk-CRTRMMJ7.js +59 -0
- package/dist/chunk-CRTRMMJ7.js.map +1 -0
- package/dist/chunk-CUODMU27.js +1265 -0
- package/dist/chunk-CUODMU27.js.map +1 -0
- package/dist/chunk-DJ32OEWG.cjs +54 -0
- package/dist/chunk-DJ32OEWG.cjs.map +1 -0
- package/dist/chunk-DZ5MGN25.js +147 -0
- package/dist/chunk-DZ5MGN25.js.map +1 -0
- package/dist/chunk-ENCR5SUW.cjs +51 -0
- package/dist/chunk-ENCR5SUW.cjs.map +1 -0
- package/dist/chunk-EOWJ7775.js +18 -0
- package/dist/chunk-EOWJ7775.js.map +1 -0
- package/dist/chunk-EVL7VEPX.js +14 -0
- package/dist/chunk-EVL7VEPX.js.map +1 -0
- package/dist/chunk-FKIMKZ4Y.js +17 -0
- package/dist/chunk-FKIMKZ4Y.js.map +1 -0
- package/dist/chunk-FOCUIKYH.cjs +1265 -0
- package/dist/chunk-FOCUIKYH.cjs.map +1 -0
- package/dist/chunk-GGE3H4XP.cjs +33 -0
- package/dist/chunk-GGE3H4XP.cjs.map +1 -0
- package/dist/chunk-GY6G3ZC2.cjs +41 -0
- package/dist/chunk-GY6G3ZC2.cjs.map +1 -0
- package/dist/chunk-H4F7UVPT.js +34 -0
- package/dist/chunk-H4F7UVPT.js.map +1 -0
- package/dist/chunk-HATQVB6H.js +19 -0
- package/dist/chunk-HATQVB6H.js.map +1 -0
- package/dist/chunk-HCW4RO2O.cjs +29 -0
- package/dist/chunk-HCW4RO2O.cjs.map +1 -0
- package/dist/chunk-HENBZUED.cjs +10 -0
- package/dist/chunk-HENBZUED.cjs.map +1 -0
- package/dist/chunk-HG57BLPT.js +31 -0
- package/dist/chunk-HG57BLPT.js.map +1 -0
- package/dist/chunk-HPOZ6I54.cjs +44 -0
- package/dist/chunk-HPOZ6I54.cjs.map +1 -0
- package/dist/chunk-HYGCZCR2.js +33 -0
- package/dist/chunk-HYGCZCR2.js.map +1 -0
- package/dist/chunk-I63FQCIV.js +189 -0
- package/dist/chunk-I63FQCIV.js.map +1 -0
- package/dist/chunk-IP4HQL5I.cjs +147 -0
- package/dist/chunk-IP4HQL5I.cjs.map +1 -0
- package/dist/chunk-IQPA3QOV.js +27 -0
- package/dist/chunk-IQPA3QOV.js.map +1 -0
- package/dist/chunk-KAXBBO66.cjs +30 -0
- package/dist/chunk-KAXBBO66.cjs.map +1 -0
- package/dist/chunk-KEKBOJCF.cjs +50 -0
- package/dist/chunk-KEKBOJCF.cjs.map +1 -0
- package/dist/chunk-KLWDDALZ.cjs +14 -0
- package/dist/chunk-KLWDDALZ.cjs.map +1 -0
- package/dist/chunk-KNOUJZN5.cjs +32 -0
- package/dist/chunk-KNOUJZN5.cjs.map +1 -0
- package/dist/chunk-L3FKENHU.js +14 -0
- package/dist/chunk-L3FKENHU.js.map +1 -0
- package/dist/chunk-L3L7YEW3.js +22 -0
- package/dist/chunk-L3L7YEW3.js.map +1 -0
- package/dist/chunk-MH37OJT2.cjs +80 -0
- package/dist/chunk-MH37OJT2.cjs.map +1 -0
- package/dist/chunk-MJHLKJ6X.cjs +212 -0
- package/dist/chunk-MJHLKJ6X.cjs.map +1 -0
- package/dist/chunk-MUS7DUPS.cjs +98 -0
- package/dist/chunk-MUS7DUPS.cjs.map +1 -0
- package/dist/chunk-NMXFWIFA.js +133 -0
- package/dist/chunk-NMXFWIFA.js.map +1 -0
- package/dist/chunk-OZS4WEKF.js +55 -0
- package/dist/chunk-OZS4WEKF.js.map +1 -0
- package/dist/chunk-PBSL6JOF.cjs +17 -0
- package/dist/chunk-PBSL6JOF.cjs.map +1 -0
- package/dist/chunk-PHCGCJSA.js +107 -0
- package/dist/chunk-PHCGCJSA.js.map +1 -0
- package/dist/chunk-Q3M4UH5U.cjs +48 -0
- package/dist/chunk-Q3M4UH5U.cjs.map +1 -0
- package/dist/chunk-QDKAU3H2.js +31 -0
- package/dist/chunk-QDKAU3H2.js.map +1 -0
- package/dist/chunk-QFQWKKVU.js +11 -0
- package/dist/chunk-QFQWKKVU.js.map +1 -0
- package/dist/chunk-QIPMBCAV.js +86 -0
- package/dist/chunk-QIPMBCAV.js.map +1 -0
- package/dist/chunk-QJ44PL7L.js +41 -0
- package/dist/chunk-QJ44PL7L.js.map +1 -0
- package/dist/chunk-QK5J7FD3.cjs +11 -0
- package/dist/chunk-QK5J7FD3.cjs.map +1 -0
- package/dist/chunk-QKALEGXY.js +153 -0
- package/dist/chunk-QKALEGXY.js.map +1 -0
- package/dist/chunk-QQXBYOKA.cjs +16 -0
- package/dist/chunk-QQXBYOKA.cjs.map +1 -0
- package/dist/chunk-QT7UEJZG.cjs +133 -0
- package/dist/chunk-QT7UEJZG.cjs.map +1 -0
- package/dist/chunk-QTGK3RB5.js +31 -0
- package/dist/chunk-QTGK3RB5.js.map +1 -0
- package/dist/chunk-QTL5I5C2.js +38 -0
- package/dist/chunk-QTL5I5C2.js.map +1 -0
- package/dist/chunk-R6IL3WOE.cjs +31 -0
- package/dist/chunk-R6IL3WOE.cjs.map +1 -0
- package/dist/chunk-RZPQIRIY.js +11 -0
- package/dist/chunk-RZPQIRIY.js.map +1 -0
- package/dist/chunk-RZT2J42J.js +29 -0
- package/dist/chunk-RZT2J42J.js.map +1 -0
- package/dist/chunk-SBA6FMFT.cjs +18 -0
- package/dist/chunk-SBA6FMFT.cjs.map +1 -0
- package/dist/chunk-SVI3L5G5.cjs +86 -0
- package/dist/chunk-SVI3L5G5.cjs.map +1 -0
- package/dist/chunk-SZA3XDJ5.cjs +1 -0
- package/dist/chunk-SZA3XDJ5.cjs.map +1 -0
- package/dist/chunk-TIQPIPH5.cjs +31 -0
- package/dist/chunk-TIQPIPH5.cjs.map +1 -0
- package/dist/chunk-U5EONMPH.js +30 -0
- package/dist/chunk-U5EONMPH.js.map +1 -0
- package/dist/chunk-UASNCH3A.cjs +27 -0
- package/dist/chunk-UASNCH3A.cjs.map +1 -0
- package/dist/chunk-UQAKJ4T7.cjs +29 -0
- package/dist/chunk-UQAKJ4T7.cjs.map +1 -0
- package/dist/chunk-URKPLEPV.cjs +189 -0
- package/dist/chunk-URKPLEPV.cjs.map +1 -0
- package/dist/chunk-VZIXXIU5.js +32 -0
- package/dist/chunk-VZIXXIU5.js.map +1 -0
- package/dist/chunk-W2Q46OO4.js +17 -0
- package/dist/chunk-W2Q46OO4.js.map +1 -0
- package/dist/chunk-W3SNJ5XS.cjs +153 -0
- package/dist/chunk-W3SNJ5XS.cjs.map +1 -0
- package/dist/chunk-WK5RAFJ3.js +54 -0
- package/dist/chunk-WK5RAFJ3.js.map +1 -0
- package/dist/chunk-WQ7WULBW.cjs +31 -0
- package/dist/chunk-WQ7WULBW.cjs.map +1 -0
- package/dist/chunk-XDJ6F7N4.cjs +107 -0
- package/dist/chunk-XDJ6F7N4.cjs.map +1 -0
- package/dist/chunk-XEZF7G64.js +212 -0
- package/dist/chunk-XEZF7G64.js.map +1 -0
- package/dist/chunk-XRFRY2LN.js +50 -0
- package/dist/chunk-XRFRY2LN.js.map +1 -0
- package/dist/chunk-XXJ7LQ44.js +1 -0
- package/dist/chunk-XXJ7LQ44.js.map +1 -0
- package/dist/chunk-XYMYRPVT.js +1 -0
- package/dist/chunk-XYMYRPVT.js.map +1 -0
- package/dist/chunk-Y7PF2Z3W.cjs +22 -0
- package/dist/chunk-Y7PF2Z3W.cjs.map +1 -0
- package/dist/chunk-YE55IKBP.cjs +34 -0
- package/dist/chunk-YE55IKBP.cjs.map +1 -0
- package/dist/chunk-YNJPYSO4.cjs +17 -0
- package/dist/chunk-YNJPYSO4.cjs.map +1 -0
- package/dist/chunk-YWVQCHQF.js +51 -0
- package/dist/chunk-YWVQCHQF.js.map +1 -0
- package/dist/chunk-ZCYU7QA6.cjs +64 -0
- package/dist/chunk-ZCYU7QA6.cjs.map +1 -0
- package/dist/chunk-ZDQGQY7Z.js +29 -0
- package/dist/chunk-ZDQGQY7Z.js.map +1 -0
- package/dist/chunk-ZIHCLVCD.js +44 -0
- package/dist/chunk-ZIHCLVCD.js.map +1 -0
- package/dist/chunk-ZMSST6ZZ.cjs +28 -0
- package/dist/chunk-ZMSST6ZZ.cjs.map +1 -0
- package/dist/chunk-ZUIS3FET.js +21 -0
- package/dist/chunk-ZUIS3FET.js.map +1 -0
- package/dist/components/CrossmintNFTCollectionView.cjs +9 -1
- package/dist/components/CrossmintNFTCollectionView.cjs.map +1 -0
- package/dist/components/CrossmintNFTCollectionView.js +9 -1
- package/dist/components/CrossmintNFTCollectionView.js.map +1 -0
- package/dist/components/CrossmintNFTDetail.cjs +9 -1
- package/dist/components/CrossmintNFTDetail.cjs.map +1 -0
- package/dist/components/CrossmintNFTDetail.js +9 -1
- package/dist/components/CrossmintNFTDetail.js.map +1 -0
- package/dist/components/auth/AuthForm.cjs +37 -1
- package/dist/components/auth/AuthForm.cjs.map +1 -0
- package/dist/components/auth/AuthForm.js +37 -1
- package/dist/components/auth/AuthForm.js.map +1 -0
- package/dist/components/auth/AuthFormBackButton.cjs +10 -1
- package/dist/components/auth/AuthFormBackButton.cjs.map +1 -0
- package/dist/components/auth/AuthFormBackButton.js +10 -1
- package/dist/components/auth/AuthFormBackButton.js.map +1 -0
- package/dist/components/auth/AuthFormDialog.cjs +37 -1
- package/dist/components/auth/AuthFormDialog.cjs.map +1 -0
- package/dist/components/auth/AuthFormDialog.js +37 -1
- package/dist/components/auth/AuthFormDialog.js.map +1 -0
- package/dist/components/auth/EmbeddedAuthForm.cjs +38 -1
- package/dist/components/auth/EmbeddedAuthForm.cjs.map +1 -0
- package/dist/components/auth/EmbeddedAuthForm.js +38 -1
- package/dist/components/auth/EmbeddedAuthForm.js.map +1 -0
- package/dist/components/auth/PasskeyPrompt.cjs +14 -1
- package/dist/components/auth/PasskeyPrompt.cjs.map +1 -0
- package/dist/components/auth/PasskeyPrompt.js +14 -1
- package/dist/components/auth/PasskeyPrompt.js.map +1 -0
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +37 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs.map +1 -0
- package/dist/components/auth/methods/email/EmailAuthFlow.js +37 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.js.map +1 -0
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +39 -1
- package/dist/components/auth/methods/email/EmailOTPInput.cjs.map +1 -0
- package/dist/components/auth/methods/email/EmailOTPInput.js +39 -1
- package/dist/components/auth/methods/email/EmailOTPInput.js.map +1 -0
- package/dist/components/auth/methods/email/EmailSignIn.cjs +37 -1
- package/dist/components/auth/methods/email/EmailSignIn.cjs.map +1 -0
- package/dist/components/auth/methods/email/EmailSignIn.js +37 -1
- package/dist/components/auth/methods/email/EmailSignIn.js.map +1 -0
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +37 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs.map +1 -0
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +37 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js.map +1 -0
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +37 -1
- package/dist/components/auth/methods/google/GoogleSignIn.cjs.map +1 -0
- package/dist/components/auth/methods/google/GoogleSignIn.js +37 -1
- package/dist/components/auth/methods/google/GoogleSignIn.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.cts +5 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.ts +5 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +37 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.d.cts +10 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.d.ts +10 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.js +37 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.cjs +11 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.d.cts +13 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.d.ts +13 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.js +11 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3Connectors.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3Connectors.d.cts +5 -0
- package/dist/components/auth/methods/web3/Web3Connectors.d.ts +5 -0
- package/dist/components/auth/methods/web3/Web3Connectors.js +37 -0
- package/dist/components/auth/methods/web3/Web3Connectors.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.cjs +9 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.d.cts +11 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.d.ts +11 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.js +9 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3SignIn.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3SignIn.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3SignIn.d.cts +5 -0
- package/dist/components/auth/methods/web3/Web3SignIn.d.ts +5 -0
- package/dist/components/auth/methods/web3/Web3SignIn.js +37 -0
- package/dist/components/auth/methods/web3/Web3SignIn.js.map +1 -0
- package/dist/components/common/Dialog.cjs +26 -1
- package/dist/components/common/Dialog.cjs.map +1 -0
- package/dist/components/common/Dialog.d.cts +1 -2
- package/dist/components/common/Dialog.d.ts +1 -2
- package/dist/components/common/Dialog.js +26 -1
- package/dist/components/common/Dialog.js.map +1 -0
- package/dist/components/common/Divider.cjs +37 -1
- package/dist/components/common/Divider.cjs.map +1 -0
- package/dist/components/common/Divider.js +37 -1
- package/dist/components/common/Divider.js.map +1 -0
- package/dist/components/common/InputOTP.cjs +14 -1
- package/dist/components/common/InputOTP.cjs.map +1 -0
- package/dist/components/common/InputOTP.d.cts +5 -27
- package/dist/components/common/InputOTP.d.ts +5 -27
- package/dist/components/common/InputOTP.js +14 -1
- package/dist/components/common/InputOTP.js.map +1 -0
- package/dist/components/common/PoweredByCrossmint.cjs +10 -1
- package/dist/components/common/PoweredByCrossmint.cjs.map +1 -0
- package/dist/components/common/PoweredByCrossmint.js +10 -1
- package/dist/components/common/PoweredByCrossmint.js.map +1 -0
- package/dist/components/common/Spinner.cjs +9 -1
- package/dist/components/common/Spinner.cjs.map +1 -0
- package/dist/components/common/Spinner.js +9 -1
- package/dist/components/common/Spinner.js.map +1 -0
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs +8 -1
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs.map +1 -0
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js +8 -1
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js.map +1 -0
- package/dist/components/embed/EmbeddedCheckoutIFrame.cjs +8 -1
- package/dist/components/embed/EmbeddedCheckoutIFrame.cjs.map +1 -0
- package/dist/components/embed/EmbeddedCheckoutIFrame.js +8 -1
- package/dist/components/embed/EmbeddedCheckoutIFrame.js.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs +11 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js +11 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs +10 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js +10 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs +11 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.js +11 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.js.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs +10 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js +10 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js.map +1 -0
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs +75 -1
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs.map +1 -0
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.js +75 -1
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.js.map +1 -0
- package/dist/components/embed/index.cjs +14 -1
- package/dist/components/embed/index.cjs.map +1 -0
- package/dist/components/embed/index.js +14 -1
- package/dist/components/embed/index.js.map +1 -0
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +39 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs.map +1 -0
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +39 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js.map +1 -0
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +38 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs.map +1 -0
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +38 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js.map +1 -0
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +135 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +135 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs +63 -1
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js +63 -1
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs +8 -1
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js +8 -1
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs +51 -1
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js +51 -1
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js.map +1 -0
- package/dist/components/embed/v3/index.cjs +40 -1
- package/dist/components/embed/v3/index.cjs.map +1 -0
- package/dist/components/embed/v3/index.js +40 -1
- package/dist/components/embed/v3/index.js.map +1 -0
- package/dist/components/hosted/CrossmintPayButton.cjs +11 -1
- package/dist/components/hosted/CrossmintPayButton.cjs.map +1 -0
- package/dist/components/hosted/CrossmintPayButton.js +11 -1
- package/dist/components/hosted/CrossmintPayButton.js.map +1 -0
- package/dist/components/hosted/index.cjs +12 -1
- package/dist/components/hosted/index.cjs.map +1 -0
- package/dist/components/hosted/index.js +12 -1
- package/dist/components/hosted/index.js.map +1 -0
- package/dist/components/hosted/styles.cjs +10 -1
- package/dist/components/hosted/styles.cjs.map +1 -0
- package/dist/components/hosted/styles.js +10 -1
- package/dist/components/hosted/styles.js.map +1 -0
- package/dist/components/index.cjs +70 -1
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.js +70 -1
- package/dist/components/index.js.map +1 -0
- package/dist/consts/version.cjs +8 -1
- package/dist/consts/version.cjs.map +1 -0
- package/dist/consts/version.js +8 -1
- package/dist/consts/version.js.map +1 -0
- package/dist/hooks/index.cjs +49 -1
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +3 -2
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/index.js +49 -1
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useAuth.cjs +37 -1
- package/dist/hooks/useAuth.cjs.map +1 -0
- package/dist/hooks/useAuth.d.cts +8 -10
- package/dist/hooks/useAuth.d.ts +8 -10
- package/dist/hooks/useAuth.js +37 -1
- package/dist/hooks/useAuth.js.map +1 -0
- package/dist/hooks/useCrossmint.cjs +10 -1
- package/dist/hooks/useCrossmint.cjs.map +1 -0
- package/dist/hooks/useCrossmint.d.cts +0 -1
- package/dist/hooks/useCrossmint.d.ts +0 -1
- package/dist/hooks/useCrossmint.js +10 -1
- package/dist/hooks/useCrossmint.js.map +1 -0
- package/dist/hooks/useCrossmintAuth.cjs +37 -0
- package/dist/hooks/useCrossmintAuth.cjs.map +1 -0
- package/dist/hooks/useCrossmintAuth.d.cts +11 -0
- package/dist/hooks/useCrossmintAuth.d.ts +11 -0
- package/dist/hooks/useCrossmintAuth.js +37 -0
- package/dist/hooks/useCrossmintAuth.js.map +1 -0
- package/dist/hooks/useCrossmintCheckout.cjs +13 -1
- package/dist/hooks/useCrossmintCheckout.cjs.map +1 -0
- package/dist/hooks/useCrossmintCheckout.d.cts +2 -1
- package/dist/hooks/useCrossmintCheckout.d.ts +2 -1
- package/dist/hooks/useCrossmintCheckout.js +13 -1
- package/dist/hooks/useCrossmintCheckout.js.map +1 -0
- package/dist/hooks/useDeepEffect.cjs +8 -1
- package/dist/hooks/useDeepEffect.cjs.map +1 -0
- package/dist/hooks/useDeepEffect.js +8 -1
- package/dist/hooks/useDeepEffect.js.map +1 -0
- package/dist/hooks/useEnvironment.cjs +8 -1
- package/dist/hooks/useEnvironment.cjs.map +1 -0
- package/dist/hooks/useEnvironment.js +8 -1
- package/dist/hooks/useEnvironment.js.map +1 -0
- package/dist/hooks/useOAuthWindowListener.cjs +37 -1
- package/dist/hooks/useOAuthWindowListener.cjs.map +1 -0
- package/dist/hooks/useOAuthWindowListener.d.cts +2 -6
- package/dist/hooks/useOAuthWindowListener.d.ts +2 -6
- package/dist/hooks/useOAuthWindowListener.js +37 -1
- package/dist/hooks/useOAuthWindowListener.js.map +1 -0
- package/dist/hooks/useWallet.cjs +37 -1
- package/dist/hooks/useWallet.cjs.map +1 -0
- package/dist/hooks/useWallet.js +37 -1
- package/dist/hooks/useWallet.js.map +1 -0
- package/dist/icons/alert.cjs +8 -1
- package/dist/icons/alert.cjs.map +1 -0
- package/dist/icons/alert.js +8 -1
- package/dist/icons/alert.js.map +1 -0
- package/dist/icons/base64Icons.cjs +12 -0
- package/dist/icons/base64Icons.cjs.map +1 -0
- package/dist/icons/base64Icons.d.cts +5 -0
- package/dist/icons/base64Icons.d.ts +5 -0
- package/dist/icons/base64Icons.js +12 -0
- package/dist/icons/base64Icons.js.map +1 -0
- package/dist/icons/chevronRight.cjs +8 -0
- package/dist/icons/chevronRight.cjs.map +1 -0
- package/dist/icons/chevronRight.d.cts +9 -0
- package/dist/icons/chevronRight.d.ts +9 -0
- package/dist/icons/chevronRight.js +8 -0
- package/dist/icons/chevronRight.js.map +1 -0
- package/dist/icons/discord.cjs +29 -1
- package/dist/icons/discord.cjs.map +1 -0
- package/dist/icons/discord.js +29 -1
- package/dist/icons/discord.js.map +1 -0
- package/dist/icons/emailOTP.cjs +8 -1
- package/dist/icons/emailOTP.cjs.map +1 -0
- package/dist/icons/emailOTP.js +8 -1
- package/dist/icons/emailOTP.js.map +1 -0
- package/dist/icons/farcaster.cjs +8 -1
- package/dist/icons/farcaster.cjs.map +1 -0
- package/dist/icons/farcaster.js +8 -1
- package/dist/icons/farcaster.js.map +1 -0
- package/dist/icons/fingerprint.cjs +8 -1
- package/dist/icons/fingerprint.cjs.map +1 -0
- package/dist/icons/fingerprint.js +8 -1
- package/dist/icons/fingerprint.js.map +1 -0
- package/dist/icons/google.cjs +8 -1
- package/dist/icons/google.cjs.map +1 -0
- package/dist/icons/google.js +8 -1
- package/dist/icons/google.js.map +1 -0
- package/dist/icons/leftArrow.cjs +8 -1
- package/dist/icons/leftArrow.cjs.map +1 -0
- package/dist/icons/leftArrow.js +8 -1
- package/dist/icons/leftArrow.js.map +1 -0
- package/dist/icons/passkey.cjs +8 -1
- package/dist/icons/passkey.cjs.map +1 -0
- package/dist/icons/passkey.js +8 -1
- package/dist/icons/passkey.js.map +1 -0
- package/dist/icons/passkeyPromptLogo.cjs +8 -1
- package/dist/icons/passkeyPromptLogo.cjs.map +1 -0
- package/dist/icons/passkeyPromptLogo.js +8 -1
- package/dist/icons/passkeyPromptLogo.js.map +1 -0
- package/dist/icons/poweredByLeaf.cjs +8 -1
- package/dist/icons/poweredByLeaf.cjs.map +1 -0
- package/dist/icons/poweredByLeaf.d.cts +1 -2
- package/dist/icons/poweredByLeaf.d.ts +1 -2
- package/dist/icons/poweredByLeaf.js +8 -1
- package/dist/icons/poweredByLeaf.js.map +1 -0
- package/dist/icons/wallet.cjs +8 -0
- package/dist/icons/wallet.cjs.map +1 -0
- package/dist/icons/wallet.d.cts +9 -0
- package/dist/icons/wallet.d.ts +9 -0
- package/dist/icons/wallet.js +8 -0
- package/dist/icons/wallet.js.map +1 -0
- package/dist/icons/x.cjs +29 -1
- package/dist/icons/x.cjs.map +1 -0
- package/dist/icons/x.js +29 -1
- package/dist/icons/x.js.map +1 -0
- package/dist/index.cjs +126 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +126 -1
- package/dist/index.js.map +1 -0
- package/dist/providers/CrossmintAuthProvider.cjs +39 -1
- package/dist/providers/CrossmintAuthProvider.cjs.map +1 -0
- package/dist/providers/CrossmintAuthProvider.d.cts +9 -6
- package/dist/providers/CrossmintAuthProvider.d.ts +9 -6
- package/dist/providers/CrossmintAuthProvider.js +39 -1
- package/dist/providers/CrossmintAuthProvider.js.map +1 -0
- package/dist/providers/CrossmintWalletProvider.cjs +39 -1
- package/dist/providers/CrossmintWalletProvider.cjs.map +1 -0
- package/dist/providers/CrossmintWalletProvider.js +39 -1
- package/dist/providers/CrossmintWalletProvider.js.map +1 -0
- package/dist/providers/TwindProvider.cjs +9 -1
- package/dist/providers/TwindProvider.cjs.map +1 -0
- package/dist/providers/TwindProvider.js +9 -1
- package/dist/providers/TwindProvider.js.map +1 -0
- package/dist/providers/auth/AuthFormProvider.cjs +39 -1
- package/dist/providers/auth/AuthFormProvider.cjs.map +1 -0
- package/dist/providers/auth/AuthFormProvider.d.cts +7 -9
- package/dist/providers/auth/AuthFormProvider.d.ts +7 -9
- package/dist/providers/auth/AuthFormProvider.js +39 -1
- package/dist/providers/auth/AuthFormProvider.js.map +1 -0
- package/dist/providers/auth/FarcasterProvider.cjs +8 -1
- package/dist/providers/auth/FarcasterProvider.cjs.map +1 -0
- package/dist/providers/auth/FarcasterProvider.js +8 -1
- package/dist/providers/auth/FarcasterProvider.js.map +1 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.cjs +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.cjs.map +1 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.d.cts +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.d.ts +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.js +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.js.map +1 -0
- package/dist/providers/index.cjs +43 -1
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.d.cts +2 -1
- package/dist/providers/index.d.ts +2 -1
- package/dist/providers/index.js +43 -1
- package/dist/providers/index.js.map +1 -0
- package/dist/testUtils.cjs +8 -1
- package/dist/testUtils.cjs.map +1 -0
- package/dist/testUtils.d.cts +1 -2
- package/dist/testUtils.d.ts +1 -2
- package/dist/testUtils.js +8 -1
- package/dist/testUtils.js.map +1 -0
- package/dist/twind.config.cjs +8 -1
- package/dist/twind.config.cjs.map +1 -0
- package/dist/twind.config.d.cts +0 -3
- package/dist/twind.config.d.ts +0 -3
- package/dist/twind.config.js +8 -1
- package/dist/twind.config.js.map +1 -0
- package/dist/types/auth.cjs +1 -1
- package/dist/types/auth.cjs.map +1 -0
- package/dist/types/auth.js +1 -0
- package/dist/types/auth.js.map +1 -0
- package/dist/utils/classNames.cjs +8 -1
- package/dist/utils/classNames.cjs.map +1 -0
- package/dist/utils/classNames.js +8 -1
- package/dist/utils/classNames.js.map +1 -0
- package/dist/utils/createCrossmintApiClient.cjs +9 -1
- package/dist/utils/createCrossmintApiClient.cjs.map +1 -0
- package/dist/utils/createCrossmintApiClient.js +9 -1
- package/dist/utils/createCrossmintApiClient.js.map +1 -0
- package/package.json +21 -15
- package/src/components/auth/AuthForm.tsx +10 -5
- package/src/components/auth/AuthFormBackButton.tsx +1 -5
- package/src/components/auth/AuthFormDialog.tsx +7 -2
- package/src/components/auth/methods/email/EmailOTPInput.tsx +13 -14
- package/src/components/auth/methods/email/EmailSignIn.tsx +15 -19
- package/src/components/auth/methods/farcaster/FarcasterSignIn.tsx +10 -14
- package/src/components/auth/methods/google/GoogleSignIn.tsx +7 -16
- package/src/components/auth/methods/web3/Web3AuthFlow.tsx +17 -0
- package/src/components/auth/methods/web3/Web3AuthWrapper.tsx +87 -0
- package/src/components/auth/methods/web3/Web3ConnectButton.tsx +62 -0
- package/src/components/auth/methods/web3/Web3Connectors.tsx +91 -0
- package/src/components/auth/methods/web3/Web3ProviderButton.tsx +38 -0
- package/src/components/auth/methods/web3/Web3SignIn.tsx +41 -0
- package/src/components/common/Dialog.tsx +10 -29
- package/src/components/common/Divider.tsx +1 -1
- package/src/components/common/InputOTP.tsx +9 -4
- package/src/components/common/PoweredByCrossmint.tsx +3 -10
- package/src/components/embed/v3/EmbeddedCheckoutV3IFrame.tsx +11 -3
- package/src/components/embed/v3/crypto/utils/handleSendTransaction.ts +12 -6
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useAuth.ts +2 -2
- package/src/hooks/useCrossmint.test.tsx +4 -33
- package/src/hooks/useCrossmint.tsx +1 -12
- package/src/hooks/useCrossmintAuth.ts +12 -0
- package/src/hooks/useCrossmintCheckout.tsx +7 -5
- package/src/hooks/useOAuthWindowListener.ts +4 -10
- package/src/icons/base64Icons.ts +8 -0
- package/src/icons/chevronRight.tsx +21 -0
- package/src/icons/poweredByLeaf.tsx +81 -80
- package/src/icons/wallet.tsx +23 -0
- package/src/providers/CrossmintAuthProvider.test.tsx +72 -87
- package/src/providers/CrossmintAuthProvider.tsx +52 -49
- package/src/providers/CrossmintWalletProvider.test.tsx +15 -9
- package/src/providers/auth/AuthFormProvider.test.tsx +61 -19
- package/src/providers/auth/AuthFormProvider.tsx +52 -60
- package/src/providers/auth/web3/WagmiAuthProvider.tsx +56 -0
- package/src/testUtils.ts +0 -4
- package/src/twind.config.ts +12 -5
- package/dist/chunk-22TFOKGT.js +0 -1
- package/dist/chunk-265BME7Y.cjs +0 -1
- package/dist/chunk-2POV64LQ.js +0 -1
- package/dist/chunk-2TVTJ6GV.js +0 -1
- package/dist/chunk-2VQLMU5A.cjs +0 -1
- package/dist/chunk-2WSEHVNP.cjs +0 -1
- package/dist/chunk-3BUVHV54.js +0 -0
- package/dist/chunk-3JUSQ2QE.cjs +0 -1
- package/dist/chunk-47YB6ECI.cjs +0 -1
- package/dist/chunk-4IHRWQWT.js +0 -1
- package/dist/chunk-4ITU7JF2.js +0 -1
- package/dist/chunk-5DCSVXPM.js +0 -1
- package/dist/chunk-5IFQJPBE.cjs +0 -1
- package/dist/chunk-63OMZNLN.js +0 -1
- package/dist/chunk-6GZGVNLH.cjs +0 -1
- package/dist/chunk-6IWCD2YY.cjs +0 -1
- package/dist/chunk-72MMCJ2E.js +0 -0
- package/dist/chunk-72P3JMXX.js +0 -1
- package/dist/chunk-77PBG2JJ.js +0 -1
- package/dist/chunk-7CPFUVAV.js +0 -1
- package/dist/chunk-7HSC6Q3U.js +0 -1
- package/dist/chunk-7M23WP3P.js +0 -1
- package/dist/chunk-7MUBJ5DE.cjs +0 -1
- package/dist/chunk-7MYTZUEK.js +0 -1
- package/dist/chunk-7WTGDAJW.js +0 -1
- package/dist/chunk-7YJMOHOO.js +0 -1
- package/dist/chunk-7Z2T6P5L.cjs +0 -1
- package/dist/chunk-A3QHXPHD.js +0 -1
- package/dist/chunk-AMP2ZDXD.cjs +0 -1
- package/dist/chunk-ASU2E6GU.js +0 -1
- package/dist/chunk-B7GHWWM6.cjs +0 -1
- package/dist/chunk-BHJ5JTA2.js +0 -1
- package/dist/chunk-BR77Q3PK.cjs +0 -1
- package/dist/chunk-C3JRTLQP.js +0 -1
- package/dist/chunk-D3255LVM.cjs +0 -1
- package/dist/chunk-DCG56C7R.cjs +0 -1
- package/dist/chunk-DGZQUCSD.js +0 -1
- package/dist/chunk-E4TBJMOO.js +0 -1
- package/dist/chunk-E75QRQ6Q.js +0 -1
- package/dist/chunk-E7T2NBUP.cjs +0 -1
- package/dist/chunk-EK4Y233O.js +0 -1
- package/dist/chunk-EUXGP4IN.cjs +0 -1
- package/dist/chunk-EVADF7QA.js +0 -1
- package/dist/chunk-FFIN4TCT.cjs +0 -1
- package/dist/chunk-FON43I6G.cjs +0 -1
- package/dist/chunk-FYYNH6VT.js +0 -1
- package/dist/chunk-G6WJLBM7.js +0 -1
- package/dist/chunk-GJTS3VOX.cjs +0 -1
- package/dist/chunk-HFIIBQLK.js +0 -1
- package/dist/chunk-HHQZJJKE.js +0 -1
- package/dist/chunk-HWGRWJUT.cjs +0 -1
- package/dist/chunk-HYI4R74V.cjs +0 -1
- package/dist/chunk-I4GMMHQR.cjs +0 -1
- package/dist/chunk-IAJBYU5C.js +0 -1
- package/dist/chunk-IKY4YQDO.js +0 -1
- package/dist/chunk-IMV35JZB.cjs +0 -1
- package/dist/chunk-JGM3G5E2.js +0 -1
- package/dist/chunk-JSNLFGET.js +0 -1
- package/dist/chunk-JSNUJJQJ.js +0 -1
- package/dist/chunk-KY4UBKAO.cjs +0 -1
- package/dist/chunk-LF6WLVWL.js +0 -1
- package/dist/chunk-LZ5XEFKY.cjs +0 -1
- package/dist/chunk-MC3WZMO2.cjs +0 -1
- package/dist/chunk-MJMMQJVO.cjs +0 -1
- package/dist/chunk-N4QVZLJB.js +0 -1
- package/dist/chunk-NBJIJZGO.js +0 -1
- package/dist/chunk-NETRNZFY.js +0 -1
- package/dist/chunk-NFLGT52C.cjs +0 -1
- package/dist/chunk-NRN4WNQL.cjs +0 -1
- package/dist/chunk-NTIINLZM.cjs +0 -1
- package/dist/chunk-NY7SDPXG.js +0 -1
- package/dist/chunk-NZQIZ4ZY.cjs +0 -1
- package/dist/chunk-O5J2ZIJ6.cjs +0 -1
- package/dist/chunk-OEAPYLBR.cjs +0 -1
- package/dist/chunk-OOLXYAO7.js +0 -1
- package/dist/chunk-OVBCANGC.cjs +0 -1
- package/dist/chunk-PNUQCT4M.cjs +0 -1
- package/dist/chunk-PXDN3KFO.js +0 -1
- package/dist/chunk-QASKWI5Y.js +0 -1
- package/dist/chunk-QDOP7HRG.js +0 -1
- package/dist/chunk-QP4CMLMG.cjs +0 -1
- package/dist/chunk-QYQERFYL.cjs +0 -1
- package/dist/chunk-QZZXNJMU.js +0 -1
- package/dist/chunk-RGOIGFPQ.cjs +0 -1
- package/dist/chunk-RJGOALQ6.cjs +0 -1
- package/dist/chunk-RUQHINLO.js +0 -1
- package/dist/chunk-RYQRCUKB.js +0 -1
- package/dist/chunk-S73E6EBO.cjs +0 -1
- package/dist/chunk-SC5LQJBG.cjs +0 -1
- package/dist/chunk-SFDQPSSP.js +0 -1
- package/dist/chunk-SJFJI2OT.cjs +0 -1
- package/dist/chunk-SKRQKK2T.cjs +0 -1
- package/dist/chunk-SRQAQHYK.cjs +0 -1
- package/dist/chunk-SSWWXH5O.cjs +0 -1
- package/dist/chunk-SYDMK3TQ.js +0 -1
- package/dist/chunk-T422SK4C.cjs +0 -1
- package/dist/chunk-T5PSAJ3R.cjs +0 -1
- package/dist/chunk-TM7WDKYR.cjs +0 -1
- package/dist/chunk-TNCETEEL.js +0 -1
- package/dist/chunk-U6FTIAJO.js +0 -1
- package/dist/chunk-U7JNW7VQ.js +0 -1
- package/dist/chunk-UAFW3OWA.js +0 -1
- package/dist/chunk-UI2RH2CP.js +0 -1
- package/dist/chunk-UOHM5SBY.cjs +0 -1
- package/dist/chunk-UX6T7EAP.js +0 -1
- package/dist/chunk-V2YSOSYZ.cjs +0 -1
- package/dist/chunk-V4LKDMLV.js +0 -1
- package/dist/chunk-VI6TW7JT.cjs +0 -1
- package/dist/chunk-VIJFGMUH.js +0 -1
- package/dist/chunk-VWBAHXIO.cjs +0 -1
- package/dist/chunk-W4UPIFFS.cjs +0 -1
- package/dist/chunk-WABJHG6B.cjs +0 -1
- package/dist/chunk-WARJE3L2.cjs +0 -1
- package/dist/chunk-WF3RK7VH.js +0 -1
- package/dist/chunk-X5BBXO27.cjs +0 -1
- package/dist/chunk-XIVIIEY5.js +0 -1
- package/dist/chunk-XMNGTV3F.cjs +0 -1
- package/dist/chunk-Y5RJUIQB.cjs +0 -1
- package/dist/chunk-YKC4ST2J.js +0 -1
- package/dist/chunk-YLAJFXWZ.js +0 -0
- package/dist/chunk-YVTAV6EU.cjs +0 -1
- package/dist/chunk-Z2FGFHRQ.cjs +0 -1
- package/dist/hooks/useAuthSignIn.cjs +0 -1
- package/dist/hooks/useAuthSignIn.d.cts +0 -21
- package/dist/hooks/useAuthSignIn.d.ts +0 -21
- package/dist/hooks/useAuthSignIn.js +0 -1
- package/dist/hooks/useRefreshToken.cjs +0 -1
- package/dist/hooks/useRefreshToken.d.cts +0 -11
- package/dist/hooks/useRefreshToken.d.ts +0 -11
- package/dist/hooks/useRefreshToken.js +0 -1
- package/dist/utils/authCookies.cjs +0 -1
- package/dist/utils/authCookies.d.cts +0 -5
- package/dist/utils/authCookies.d.ts +0 -5
- package/dist/utils/authCookies.js +0 -1
- package/src/hooks/useAuthSignIn.ts +0 -117
- package/src/hooks/useRefreshToken.test.ts +0 -155
- package/src/hooks/useRefreshToken.ts +0 -68
- package/src/utils/authCookies.test.ts +0 -41
- package/src/utils/authCookies.ts +0 -13
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
import { useAuthForm } from "@/providers/auth/AuthFormProvider";
|
|
3
|
+
import { Web3ConnectButton } from "./Web3ConnectButton";
|
|
4
|
+
import { useAccount, useChainId, useConnect, useSignMessage } from "wagmi";
|
|
5
|
+
import { useCrossmintAuth } from "@/hooks/useCrossmintAuth";
|
|
6
|
+
|
|
7
|
+
interface Web3AuthWrapperProps {
|
|
8
|
+
providerType: "metaMaskSDK" | "coinbaseWalletSDK" | "walletConnect";
|
|
9
|
+
flag?: "isMetaMask";
|
|
10
|
+
icon: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function Web3AuthWrapper({ providerType, flag, icon }: Web3AuthWrapperProps) {
|
|
14
|
+
const { crossmintAuth } = useCrossmintAuth();
|
|
15
|
+
const { appearance } = useAuthForm();
|
|
16
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
17
|
+
const [error, setError] = useState<string | null>(null);
|
|
18
|
+
|
|
19
|
+
const chainId = useChainId();
|
|
20
|
+
const { address, status: accountStatus } = useAccount(); // hook is causing a hydration error when navigating back
|
|
21
|
+
const { signMessageAsync, status: signMessageStatus } = useSignMessage();
|
|
22
|
+
const { connect, connectors } = useConnect({
|
|
23
|
+
mutation: {
|
|
24
|
+
onError: () => setIsLoading(false),
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// fallback to walletConnect if the extension is not installed
|
|
29
|
+
const isExtensionInstalled = window.ethereum?.[flag as keyof typeof window.ethereum] ?? false;
|
|
30
|
+
if (!isExtensionInstalled) {
|
|
31
|
+
providerType = "walletConnect";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const connector = connectors.find((c) => c.id === providerType);
|
|
35
|
+
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (address != null) {
|
|
38
|
+
handleSignIn();
|
|
39
|
+
}
|
|
40
|
+
}, [address]);
|
|
41
|
+
|
|
42
|
+
const handleSignIn = async () => {
|
|
43
|
+
if (address == null) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
setIsLoading(true);
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
const res = await crossmintAuth?.signInWithSmartWallet(address);
|
|
50
|
+
const signature = await signMessageAsync({ message: res.challenge });
|
|
51
|
+
const authResponse = (await crossmintAuth?.authenticateSmartWallet(address, signature)) as {
|
|
52
|
+
oneTimeSecret: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const oneTimeSecret = authResponse.oneTimeSecret;
|
|
56
|
+
await crossmintAuth?.handleRefreshAuthMaterial(oneTimeSecret);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error(`Error connecting to ${providerType}:`, error);
|
|
59
|
+
setError(`Error connecting to ${providerType}. Please try again or contact support.`);
|
|
60
|
+
} finally {
|
|
61
|
+
setIsLoading(false);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const isLoadingOrPending =
|
|
66
|
+
isLoading ||
|
|
67
|
+
accountStatus === "connecting" ||
|
|
68
|
+
accountStatus === "reconnecting" ||
|
|
69
|
+
signMessageStatus === "pending";
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<Web3ConnectButton
|
|
73
|
+
icon={icon}
|
|
74
|
+
appearance={appearance}
|
|
75
|
+
headingText={signMessageStatus === "pending" ? "Sign to verify" : "Connect your wallet"}
|
|
76
|
+
buttonText={error != null && !isLoadingOrPending ? "Retry" : isLoadingOrPending ? "Connecting" : "Connect"}
|
|
77
|
+
isLoading={isLoadingOrPending}
|
|
78
|
+
onConnectClick={() => {
|
|
79
|
+
if (address != null) {
|
|
80
|
+
handleSignIn();
|
|
81
|
+
} else if (connector) {
|
|
82
|
+
connect({ connector, chainId });
|
|
83
|
+
}
|
|
84
|
+
}}
|
|
85
|
+
/>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { UIConfig } from "@crossmint/common-sdk-base";
|
|
2
|
+
import { PoweredByCrossmint } from "@/components/common/PoweredByCrossmint";
|
|
3
|
+
import { classNames } from "@/utils/classNames";
|
|
4
|
+
|
|
5
|
+
export function Web3ConnectButton({
|
|
6
|
+
icon,
|
|
7
|
+
appearance,
|
|
8
|
+
isLoading,
|
|
9
|
+
onConnectClick,
|
|
10
|
+
headingText,
|
|
11
|
+
buttonText,
|
|
12
|
+
}: {
|
|
13
|
+
icon: string;
|
|
14
|
+
appearance?: UIConfig;
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
onConnectClick: () => void;
|
|
17
|
+
headingText: string;
|
|
18
|
+
buttonText: string;
|
|
19
|
+
}) {
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
<div className="flex flex-col items-center text-center mt-8 mb-4 gap-2">
|
|
23
|
+
<img src={icon} alt={"metamask"} className="h-[74px] w-[74px]" />
|
|
24
|
+
<h3
|
|
25
|
+
className="text-lg font-semibold text-cm-text-primary"
|
|
26
|
+
style={{ color: appearance?.colors?.textPrimary }}
|
|
27
|
+
>
|
|
28
|
+
{headingText}
|
|
29
|
+
</h3>
|
|
30
|
+
<p
|
|
31
|
+
className="text-base font-normal text-cm-text-primary"
|
|
32
|
+
style={{ color: appearance?.colors?.textPrimary }}
|
|
33
|
+
>
|
|
34
|
+
Don’t see your wallet? Check your other browser windows.
|
|
35
|
+
</p>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<button
|
|
39
|
+
className={classNames(
|
|
40
|
+
"relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
|
|
41
|
+
"transition-colors duration-200 ease-in-out",
|
|
42
|
+
"hover:bg-cm-hover focus:bg-cm-hover outline-none",
|
|
43
|
+
isLoading ? "cursor-not-allowed bg-cm-muted-primary" : ""
|
|
44
|
+
)}
|
|
45
|
+
style={{
|
|
46
|
+
borderRadius: appearance?.borderRadius,
|
|
47
|
+
borderColor: appearance?.colors?.border,
|
|
48
|
+
backgroundColor: appearance?.colors?.buttonBackground,
|
|
49
|
+
}}
|
|
50
|
+
onClick={isLoading ? undefined : onConnectClick}
|
|
51
|
+
>
|
|
52
|
+
<span className="font-medium" style={{ color: appearance?.colors?.textPrimary }}>
|
|
53
|
+
{buttonText}
|
|
54
|
+
</span>
|
|
55
|
+
</button>
|
|
56
|
+
|
|
57
|
+
<div className="flex justify-center pt-4">
|
|
58
|
+
<PoweredByCrossmint color={appearance?.colors?.textSecondary} />
|
|
59
|
+
</div>
|
|
60
|
+
</>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { useAuthForm } from "@/providers/auth/AuthFormProvider";
|
|
2
|
+
import { AuthFormBackButton } from "../../AuthFormBackButton";
|
|
3
|
+
import { Web3ProviderButton } from "./Web3ProviderButton";
|
|
4
|
+
import { metamaskIcon, walletConnectIcon } from "@/icons/base64Icons";
|
|
5
|
+
import { Web3AuthWrapper } from "./Web3AuthWrapper";
|
|
6
|
+
import { useAccount, useDisconnect } from "wagmi";
|
|
7
|
+
|
|
8
|
+
export function Web3Connectors() {
|
|
9
|
+
const { appearance, step, setStep } = useAuthForm();
|
|
10
|
+
const { isConnected } = useAccount();
|
|
11
|
+
const { disconnect } = useDisconnect();
|
|
12
|
+
|
|
13
|
+
if (step === "web3") {
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<AuthFormBackButton
|
|
17
|
+
onClick={() => setStep("initial")}
|
|
18
|
+
iconColor={appearance?.colors?.textPrimary}
|
|
19
|
+
ringColor={appearance?.colors?.accent}
|
|
20
|
+
/>
|
|
21
|
+
<div className="flex flex-col items-center gap-2">
|
|
22
|
+
<div className="text-center mb-6">
|
|
23
|
+
<h3
|
|
24
|
+
className="text-lg font-semibold text-cm-text-primary"
|
|
25
|
+
style={{ color: appearance?.colors?.textPrimary }}
|
|
26
|
+
>
|
|
27
|
+
Connect wallet
|
|
28
|
+
</h3>
|
|
29
|
+
</div>
|
|
30
|
+
<div className="flex flex-col gap-[10px] w-full">
|
|
31
|
+
<Web3ProviderButton
|
|
32
|
+
title="Metamask"
|
|
33
|
+
appearance={appearance}
|
|
34
|
+
img={metamaskIcon}
|
|
35
|
+
onClick={() => {
|
|
36
|
+
if (isConnected) {
|
|
37
|
+
disconnect();
|
|
38
|
+
}
|
|
39
|
+
// wait for all disconnect state to be cleared before proceeding to the next step
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
setStep("web3/metamask");
|
|
42
|
+
}, 200);
|
|
43
|
+
}}
|
|
44
|
+
/>
|
|
45
|
+
<Web3ProviderButton
|
|
46
|
+
title="WalletConnect"
|
|
47
|
+
appearance={appearance}
|
|
48
|
+
img={walletConnectIcon}
|
|
49
|
+
onClick={() => {
|
|
50
|
+
if (isConnected) {
|
|
51
|
+
disconnect();
|
|
52
|
+
}
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
setStep("web3/walletconnect");
|
|
55
|
+
}, 200);
|
|
56
|
+
}}
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (step === "web3/metamask") {
|
|
65
|
+
return (
|
|
66
|
+
<>
|
|
67
|
+
<AuthFormBackButton
|
|
68
|
+
onClick={() => setStep("web3")}
|
|
69
|
+
iconColor={appearance?.colors?.textPrimary}
|
|
70
|
+
ringColor={appearance?.colors?.accent}
|
|
71
|
+
/>
|
|
72
|
+
<Web3AuthWrapper providerType="metaMaskSDK" flag="isMetaMask" icon={metamaskIcon} />
|
|
73
|
+
</>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (step === "web3/walletconnect") {
|
|
78
|
+
return (
|
|
79
|
+
<>
|
|
80
|
+
<AuthFormBackButton
|
|
81
|
+
onClick={() => setStep("web3")}
|
|
82
|
+
iconColor={appearance?.colors?.textPrimary}
|
|
83
|
+
ringColor={appearance?.colors?.accent}
|
|
84
|
+
/>
|
|
85
|
+
<Web3AuthWrapper providerType="walletConnect" icon={walletConnectIcon} />
|
|
86
|
+
</>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { UIConfig } from "@crossmint/common-sdk-base";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { classNames } from "../../../../utils/classNames";
|
|
4
|
+
|
|
5
|
+
export function Web3ProviderButton({
|
|
6
|
+
title,
|
|
7
|
+
appearance,
|
|
8
|
+
img,
|
|
9
|
+
...props
|
|
10
|
+
}: {
|
|
11
|
+
title: string;
|
|
12
|
+
appearance?: UIConfig;
|
|
13
|
+
img: string;
|
|
14
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement>) {
|
|
15
|
+
return (
|
|
16
|
+
<button
|
|
17
|
+
className={classNames(
|
|
18
|
+
"relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
|
|
19
|
+
"transition-colors duration-200 ease-in-out",
|
|
20
|
+
"hover:bg-cm-hover focus:bg-cm-hover outline-none"
|
|
21
|
+
)}
|
|
22
|
+
style={{
|
|
23
|
+
borderRadius: appearance?.borderRadius,
|
|
24
|
+
borderColor: appearance?.colors?.border,
|
|
25
|
+
backgroundColor: appearance?.colors?.buttonBackground,
|
|
26
|
+
}}
|
|
27
|
+
{...props}
|
|
28
|
+
>
|
|
29
|
+
<>
|
|
30
|
+
<img src={img} alt={title} className="h-[25px] w-[25px] absolute left-[18px]" />
|
|
31
|
+
<span className="font-medium" style={{ color: appearance?.colors?.textPrimary }}>
|
|
32
|
+
{title}
|
|
33
|
+
</span>
|
|
34
|
+
</>
|
|
35
|
+
<span className="sr-only">Sign in with {title}</span>
|
|
36
|
+
</button>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ChevronRightIcon } from "@/icons/chevronRight";
|
|
2
|
+
import { WalletIcon } from "@/icons/wallet";
|
|
3
|
+
import { useAuthForm } from "@/providers/auth/AuthFormProvider";
|
|
4
|
+
import { classNames } from "@/utils/classNames";
|
|
5
|
+
|
|
6
|
+
export function Web3SignIn() {
|
|
7
|
+
const { step, appearance, setStep } = useAuthForm();
|
|
8
|
+
|
|
9
|
+
if (step !== "initial") {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<button
|
|
15
|
+
className={classNames(
|
|
16
|
+
"relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
|
|
17
|
+
"transition-colors duration-200 ease-in-out",
|
|
18
|
+
"hover:bg-cm-hover focus:bg-cm-hover outline-none"
|
|
19
|
+
)}
|
|
20
|
+
style={{
|
|
21
|
+
borderRadius: appearance?.borderRadius,
|
|
22
|
+
borderColor: appearance?.colors?.border,
|
|
23
|
+
backgroundColor: appearance?.colors?.buttonBackground,
|
|
24
|
+
}}
|
|
25
|
+
onClick={() => setStep("web3")}
|
|
26
|
+
>
|
|
27
|
+
<WalletIcon
|
|
28
|
+
className="h-[21px] w-[21px] absolute left-[20px]"
|
|
29
|
+
style={{ color: appearance?.colors?.textPrimary }}
|
|
30
|
+
/>
|
|
31
|
+
<span className="font-medium" style={{ margin: "0px 32px", color: appearance?.colors?.textPrimary }}>
|
|
32
|
+
Continue with a wallet
|
|
33
|
+
</span>
|
|
34
|
+
<ChevronRightIcon
|
|
35
|
+
className="h-[21px] w-[21px] absolute right-[20px]"
|
|
36
|
+
style={{ color: appearance?.colors?.textSecondary }}
|
|
37
|
+
/>
|
|
38
|
+
<span className="sr-only">Continue with a wallet</span>
|
|
39
|
+
</button>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -9,21 +9,6 @@ const DialogTrigger = DialogPrimitive.Trigger;
|
|
|
9
9
|
const DialogClose = DialogPrimitive.Close;
|
|
10
10
|
const DialogPortal = DialogPrimitive.Portal;
|
|
11
11
|
|
|
12
|
-
const DialogOverlay = React.forwardRef<
|
|
13
|
-
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
14
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
15
|
-
>(({ className, ...props }, ref) => (
|
|
16
|
-
<DialogPrimitive.Overlay
|
|
17
|
-
ref={ref}
|
|
18
|
-
className={classNames(
|
|
19
|
-
"fixed inset-0 z-50 bg-black/80 backdrop-blur-[2px] data-[state=closed]:animate-out data-[state=closed]:animate-fade-out data-[state=open]:animate-in data-[state=open]:animate-fade-in",
|
|
20
|
-
className
|
|
21
|
-
)}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
));
|
|
25
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
26
|
-
|
|
27
12
|
interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
28
13
|
showCloseButton?: boolean;
|
|
29
14
|
closeButtonColor?: string;
|
|
@@ -33,19 +18,20 @@ interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof Dialo
|
|
|
33
18
|
const DialogContent = React.forwardRef<React.ElementRef<typeof DialogPrimitive.Content>, DialogContentProps>(
|
|
34
19
|
({ className, children, showCloseButton = true, closeButtonColor, closeButtonRingColor, ...props }, ref) => (
|
|
35
20
|
<DialogPortal>
|
|
36
|
-
|
|
21
|
+
{/* Because we're using modal={false}, the regular overlay is not shown. We need to add our own overlay */}
|
|
22
|
+
<div className="fixed inset-0 z-40 bg-black/60 backdrop-blur-sm overflow-x-hidden" />
|
|
37
23
|
<DialogPrimitive.Content
|
|
38
24
|
ref={ref}
|
|
39
25
|
className={classNames(
|
|
40
|
-
"fixed z-50 p-6 pb-
|
|
26
|
+
"fixed z-50 p-6 pb-4 bg-cm-background-primary border border-cm-border shadow-xl transition-none",
|
|
41
27
|
// Small viewport styles (bottom sheet)
|
|
42
28
|
"inset-x-0 bottom-0 w-full border-t rounded-t-xl",
|
|
43
29
|
"data-[state=closed]:animate-slide-out-to-bottom data-[state=open]:animate-slide-in-from-bottom",
|
|
44
30
|
// Regular viewport styles (centered modal)
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
31
|
+
"min-[480px]:inset-auto !min-[480px]:p-10 !min-[480px]:pb-8 min-[480px]:left-[50%] min-[480px]:top-[50%] min-[480px]:translate-x-[-50%] min-[480px]:translate-y-[-52%]",
|
|
32
|
+
"min-[480px]:max-w-[448px] min-[480px]:rounded-xl",
|
|
33
|
+
"min-[480px]:data-[state=closed]:animate-fade-out min-[480px]:data-[state=closed]:animate-zoom-out-95",
|
|
34
|
+
"min-[480px]:data-[state=open]:animate-fade-in min-[480px]:data-[state=open]:animate-zoom-in-95",
|
|
49
35
|
// Duration for animations
|
|
50
36
|
"data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
51
37
|
className
|
|
@@ -57,14 +43,10 @@ const DialogContent = React.forwardRef<React.ElementRef<typeof DialogPrimitive.C
|
|
|
57
43
|
<DialogPrimitive.Close
|
|
58
44
|
className={classNames(
|
|
59
45
|
"absolute rounded-full opacity-70 ring-offset-background transition-opacity hover:opacity-100",
|
|
60
|
-
"focus:outline-none focus:ring-2 focus:ring-cm-
|
|
61
|
-
"right-4 top-4 !
|
|
46
|
+
"focus:outline-none focus:ring-2 focus:ring-cm-accent focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-text-primary",
|
|
47
|
+
"right-4 top-4 !min-[480px]:right-6 !min-[480px]:top-6"
|
|
62
48
|
)}
|
|
63
|
-
style={{
|
|
64
|
-
color: closeButtonColor,
|
|
65
|
-
// @ts-expect-error --tw-ring-color is not recognized by typescript but gets picked up by tailwind
|
|
66
|
-
"--tw-ring-color": closeButtonRingColor ?? "#1A73E8",
|
|
67
|
-
}}
|
|
49
|
+
style={{ color: closeButtonColor ?? "#00150D" }}
|
|
68
50
|
>
|
|
69
51
|
<svg
|
|
70
52
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -130,7 +112,6 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
130
112
|
export {
|
|
131
113
|
Dialog,
|
|
132
114
|
DialogPortal,
|
|
133
|
-
DialogOverlay,
|
|
134
115
|
DialogClose,
|
|
135
116
|
DialogTrigger,
|
|
136
117
|
DialogContent,
|
|
@@ -9,7 +9,7 @@ export function Divider({ appearance, text }: { appearance?: UIConfig; text?: st
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<div className="flex items-center justify-center w-full pt-
|
|
12
|
+
<div className="flex items-center justify-center w-full pt-2 pb-3">
|
|
13
13
|
<span className="w-full h-[1px] bg-cm-border" style={{ backgroundColor: appearance?.colors?.border }} />
|
|
14
14
|
{text != null ? (
|
|
15
15
|
<p
|
|
@@ -19,9 +19,14 @@ type CustomStyles = {
|
|
|
19
19
|
// Create a context for customStyles
|
|
20
20
|
const CustomStylesContext = createContext<CustomStyles | undefined>(undefined);
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
type InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput> & {
|
|
23
|
+
customStyles?: CustomStyles;
|
|
24
|
+
};
|
|
25
|
+
type InputOTPRef = React.ElementRef<typeof OTPInput>;
|
|
26
|
+
|
|
27
|
+
const InputOTP: React.ForwardRefExoticComponent<InputOTPProps & React.RefAttributes<InputOTPRef>> = React.forwardRef<
|
|
28
|
+
InputOTPRef,
|
|
29
|
+
InputOTPProps
|
|
25
30
|
>(({ className, containerClassName, customStyles, ...props }, ref) => (
|
|
26
31
|
<CustomStylesContext.Provider value={customStyles}>
|
|
27
32
|
<OTPInput
|
|
@@ -57,7 +62,7 @@ const InputOTPSlot = React.forwardRef<
|
|
|
57
62
|
<div
|
|
58
63
|
ref={ref}
|
|
59
64
|
className={classNames(
|
|
60
|
-
"relative flex h-14 w-12 items-center justify-center border text-lg transition-all rounded-md text-cm-text-primary",
|
|
65
|
+
"relative flex h-14 w-12 items-center bg-cm-muted-primary justify-center border border-cm-border text-lg transition-all rounded-md text-cm-text-primary",
|
|
61
66
|
isActive && `z-10 ring-2 ring-offset-background`,
|
|
62
67
|
className
|
|
63
68
|
)}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { PoweredByLeaf } from "@/icons/poweredByLeaf";
|
|
2
2
|
import { classNames } from "@/utils/classNames";
|
|
3
3
|
|
|
4
|
-
export function PoweredByCrossmint({ color, className }: { color?: string; className?: string }) {
|
|
4
|
+
export function PoweredByCrossmint({ color = "#A4AFB2", className }: { color?: string; className?: string }) {
|
|
5
5
|
return (
|
|
6
|
-
<p
|
|
7
|
-
|
|
8
|
-
style={{ color: color || "#67797F" }}
|
|
9
|
-
>
|
|
10
|
-
Powered by
|
|
11
|
-
<span className="flex self-center pl-1 gap-1 items-center font-semibold">
|
|
12
|
-
<PoweredByLeaf color={color ?? "#67797F"} size={"12"} />
|
|
13
|
-
<span>crossmint</span>
|
|
14
|
-
</span>
|
|
6
|
+
<p className={classNames("flex", className)}>
|
|
7
|
+
<PoweredByLeaf color={color} />
|
|
15
8
|
</p>
|
|
16
9
|
);
|
|
17
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCrossmint } from "@/hooks";
|
|
2
|
-
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { lazy, useEffect, useRef, useState } from "react";
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
type CrossmintEmbeddedCheckoutV3Props,
|
|
@@ -7,15 +7,23 @@ import {
|
|
|
7
7
|
crossmintEmbeddedCheckoutV3Service,
|
|
8
8
|
} from "@crossmint/client-sdk-base";
|
|
9
9
|
|
|
10
|
-
import { CryptoWalletConnectionHandler } from "./crypto/CryptoWalletConnectionHandler";
|
|
11
10
|
import { createCrossmintApiClient } from "@/utils/createCrossmintApiClient";
|
|
12
11
|
|
|
12
|
+
const CryptoWalletConnectionHandler = lazy(() =>
|
|
13
|
+
// @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
|
|
14
|
+
import("./crypto/CryptoWalletConnectionHandler").then((mod) => ({
|
|
15
|
+
default: mod.CryptoWalletConnectionHandler,
|
|
16
|
+
}))
|
|
17
|
+
);
|
|
18
|
+
|
|
13
19
|
export function EmbeddedCheckoutV3IFrame(props: CrossmintEmbeddedCheckoutV3Props) {
|
|
14
20
|
const [iframeClient, setIframeClient] = useState<EmbeddedCheckoutV3IFrameEmitter | null>(null);
|
|
15
21
|
const [height, setHeight] = useState(0);
|
|
16
22
|
|
|
17
23
|
const { crossmint } = useCrossmint();
|
|
18
|
-
const apiClient = createCrossmintApiClient(crossmint
|
|
24
|
+
const apiClient = createCrossmintApiClient(crossmint, {
|
|
25
|
+
usageOrigin: "client",
|
|
26
|
+
});
|
|
19
27
|
const embedV3Service = crossmintEmbeddedCheckoutV3Service({ apiClient });
|
|
20
28
|
|
|
21
29
|
const ref = useRef<HTMLIFrameElement>(null);
|
|
@@ -2,11 +2,6 @@ import type { Wallet } from "@dynamic-labs/sdk-react-core";
|
|
|
2
2
|
|
|
3
3
|
import type { BlockchainIncludingTestnet } from "@crossmint/common-sdk-base";
|
|
4
4
|
|
|
5
|
-
import { handleEvmTransaction } from "./handleEvmTransaction";
|
|
6
|
-
|
|
7
|
-
import { isSolanaWallet } from "@dynamic-labs/solana";
|
|
8
|
-
import { handleSolanaTransaction } from "./handleSolanaTransaction";
|
|
9
|
-
import { isEthereumWallet } from "@dynamic-labs/ethereum";
|
|
10
5
|
import type { EmbeddedCheckoutV3IFrameEmitter } from "@crossmint/client-sdk-base";
|
|
11
6
|
|
|
12
7
|
export async function handleSendTransaction(
|
|
@@ -20,12 +15,23 @@ export async function handleSendTransaction(
|
|
|
20
15
|
serializedTransaction,
|
|
21
16
|
iframeClient,
|
|
22
17
|
};
|
|
18
|
+
|
|
19
|
+
// @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
|
|
20
|
+
const { isSolanaWallet } = await import("@dynamic-labs/solana");
|
|
23
21
|
if (isSolanaWallet(primaryWallet)) {
|
|
22
|
+
// @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
|
|
23
|
+
const { handleSolanaTransaction } = await import("./handleSolanaTransaction");
|
|
24
24
|
return await handleSolanaTransaction({
|
|
25
25
|
...commonParams,
|
|
26
26
|
primaryWallet,
|
|
27
27
|
});
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
|
|
31
|
+
const { isEthereumWallet } = await import("@dynamic-labs/ethereum");
|
|
32
|
+
if (isEthereumWallet(primaryWallet)) {
|
|
33
|
+
// @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
|
|
34
|
+
const { handleEvmTransaction } = await import("./handleEvmTransaction");
|
|
29
35
|
return await handleEvmTransaction({ ...commonParams, primaryWallet });
|
|
30
36
|
}
|
|
31
37
|
}
|
package/src/hooks/index.ts
CHANGED
package/src/hooks/useAuth.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
2
|
|
|
3
|
-
import { AuthContext } from "../providers";
|
|
3
|
+
import { AuthContext, type AuthContextType } from "../providers";
|
|
4
4
|
|
|
5
|
-
export function useAuth() {
|
|
5
|
+
export function useAuth(): AuthContextType {
|
|
6
6
|
const context = useContext(AuthContext);
|
|
7
7
|
if (context === undefined) {
|
|
8
8
|
throw new Error("useAuth must be used within an AuthProvider");
|
|
@@ -18,9 +18,6 @@ class MockSDK {
|
|
|
18
18
|
somethingThatUpdatesJWT(newJWT: string) {
|
|
19
19
|
this.crossmint.jwt = newJWT;
|
|
20
20
|
}
|
|
21
|
-
somethingThatUpdatesRefreshToken(newRefreshToken: string) {
|
|
22
|
-
this.crossmint.refreshToken = newRefreshToken;
|
|
23
|
-
}
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
function renderCrossmintProvider({ children }: { children: JSX.Element }) {
|
|
@@ -33,23 +30,20 @@ describe("CrossmintProvider", () => {
|
|
|
33
30
|
vi.mocked(createCrossmint).mockImplementation(() => ({
|
|
34
31
|
apiKey: MOCK_API_KEY,
|
|
35
32
|
jwt: "",
|
|
36
|
-
refreshToken: "",
|
|
37
33
|
}));
|
|
38
34
|
});
|
|
39
35
|
|
|
40
|
-
it("provides initial JWT
|
|
36
|
+
it("provides initial JWT value", () => {
|
|
41
37
|
const TestComponent = () => {
|
|
42
38
|
const { crossmint } = useCrossmint();
|
|
43
39
|
return (
|
|
44
40
|
<div>
|
|
45
41
|
<div data-testid="jwt">{crossmint.jwt}</div>
|
|
46
|
-
<div data-testid="refreshToken">{crossmint.refreshToken}</div>
|
|
47
42
|
</div>
|
|
48
43
|
);
|
|
49
44
|
};
|
|
50
45
|
const { getByTestId } = renderCrossmintProvider({ children: <TestComponent /> });
|
|
51
46
|
expect(getByTestId("jwt").textContent).toBe("");
|
|
52
|
-
expect(getByTestId("refreshToken").textContent).toBe("");
|
|
53
47
|
});
|
|
54
48
|
|
|
55
49
|
it("updates JWT using setJwt", () => {
|
|
@@ -67,54 +61,34 @@ describe("CrossmintProvider", () => {
|
|
|
67
61
|
expect(getByTestId("jwt").textContent).toBe("new_jwt");
|
|
68
62
|
});
|
|
69
63
|
|
|
70
|
-
it("updates
|
|
71
|
-
const TestComponent = () => {
|
|
72
|
-
const { crossmint, setRefreshToken } = useCrossmint();
|
|
73
|
-
return (
|
|
74
|
-
<div>
|
|
75
|
-
<div data-testid="refreshToken">{crossmint.refreshToken}</div>
|
|
76
|
-
<button onClick={() => setRefreshToken("new_refresh_token")}>Update Refresh Token</button>
|
|
77
|
-
</div>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
const { getByTestId, getByText } = renderCrossmintProvider({ children: <TestComponent /> });
|
|
81
|
-
fireEvent.click(getByText("Update Refresh Token"));
|
|
82
|
-
expect(getByTestId("refreshToken").textContent).toBe("new_refresh_token");
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
it("updates JWT and refreshToken using WalletSDK", () => {
|
|
64
|
+
it("updates JWT using WalletSDK", () => {
|
|
86
65
|
const TestComponent = () => {
|
|
87
66
|
const { crossmint } = useCrossmint();
|
|
88
67
|
useEffect(() => {
|
|
89
68
|
const wallet = new MockSDK(crossmint);
|
|
90
69
|
wallet.somethingThatUpdatesJWT("sdk_jwt");
|
|
91
|
-
wallet.somethingThatUpdatesRefreshToken("sdk_refresh_token");
|
|
92
70
|
}, []);
|
|
93
71
|
return (
|
|
94
72
|
<div>
|
|
95
73
|
<div data-testid="jwt">{crossmint.jwt}</div>
|
|
96
|
-
<div data-testid="refreshToken">{crossmint.refreshToken}</div>
|
|
97
74
|
</div>
|
|
98
75
|
);
|
|
99
76
|
};
|
|
100
77
|
const { getByTestId } = renderCrossmintProvider({ children: <TestComponent /> });
|
|
101
78
|
expect(getByTestId("jwt").textContent).toBe("sdk_jwt");
|
|
102
|
-
expect(getByTestId("refreshToken").textContent).toBe("sdk_refresh_token");
|
|
103
79
|
});
|
|
104
80
|
|
|
105
|
-
it("triggers re-render on JWT
|
|
81
|
+
it("triggers re-render on JWT change", () => {
|
|
106
82
|
const renderCount = vi.fn();
|
|
107
83
|
const TestComponent = () => {
|
|
108
|
-
const { crossmint, setJwt
|
|
84
|
+
const { crossmint, setJwt } = useCrossmint();
|
|
109
85
|
useEffect(() => {
|
|
110
86
|
renderCount();
|
|
111
87
|
});
|
|
112
88
|
return (
|
|
113
89
|
<div>
|
|
114
90
|
<div data-testid="jwt">{crossmint.jwt}</div>
|
|
115
|
-
<div data-testid="refreshToken">{crossmint.refreshToken}</div>
|
|
116
91
|
<button onClick={() => setJwt("new_jwt")}>Update JWT</button>
|
|
117
|
-
<button onClick={() => setRefreshToken("new_refresh_token")}>Update Refresh Token</button>
|
|
118
92
|
</div>
|
|
119
93
|
);
|
|
120
94
|
};
|
|
@@ -125,8 +99,5 @@ describe("CrossmintProvider", () => {
|
|
|
125
99
|
|
|
126
100
|
fireEvent.click(getByText("Update JWT"));
|
|
127
101
|
expect(renderCount).toHaveBeenCalledTimes(2);
|
|
128
|
-
|
|
129
|
-
fireEvent.click(getByText("Update Refresh Token"));
|
|
130
|
-
expect(renderCount).toHaveBeenCalledTimes(3);
|
|
131
102
|
});
|
|
132
103
|
});
|