@crossmint/client-sdk-react-ui 1.10.7 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (738) hide show
  1. package/dist/chunk-2POV64LQ.js +1 -0
  2. package/dist/chunk-2U6DCZSI.js +1 -0
  3. package/dist/chunk-2VILTRL5.js +1 -0
  4. package/dist/chunk-2VQLMU5A.cjs +1 -0
  5. package/dist/chunk-2WSEHVNP.cjs +1 -0
  6. package/dist/chunk-33OQI6MO.js +1 -0
  7. package/dist/chunk-3BUVHV54.js +0 -0
  8. package/dist/chunk-3EQVCVCE.cjs +1 -0
  9. package/dist/chunk-3FQDW3IU.js +1 -0
  10. package/dist/chunk-3GIMVKF3.js +1 -0
  11. package/dist/chunk-4IHRWQWT.js +1 -0
  12. package/dist/chunk-4ITU7JF2.js +1 -0
  13. package/dist/chunk-56YL3XJW.cjs +1 -0
  14. package/dist/chunk-5IFQJPBE.cjs +1 -0
  15. package/dist/chunk-5M3BWY6T.cjs +1 -0
  16. package/dist/chunk-6IRIZUTM.cjs +1 -0
  17. package/dist/chunk-6M5OP7SM.js +1 -0
  18. package/dist/chunk-72MMCJ2E.js +0 -0
  19. package/dist/chunk-72P3JMXX.js +1 -0
  20. package/dist/chunk-77PBG2JJ.js +1 -0
  21. package/dist/chunk-7ANJ2GZG.cjs +1 -0
  22. package/dist/chunk-7ASOCI4Q.js +1 -0
  23. package/dist/chunk-7B364FBM.cjs +1 -0
  24. package/dist/chunk-7VI5AXX5.cjs +1 -0
  25. package/dist/chunk-AUSETHZ3.cjs +1 -0
  26. package/dist/chunk-AXMHJC73.cjs +1 -0
  27. package/dist/chunk-BR77Q3PK.cjs +1 -0
  28. package/dist/chunk-BV7CQ2QS.js +1 -0
  29. package/dist/chunk-C3JRTLQP.js +1 -0
  30. package/dist/chunk-CW33KBH3.cjs +1 -0
  31. package/dist/chunk-D3255LVM.cjs +1 -0
  32. package/dist/chunk-D4K2AGJK.cjs +1 -0
  33. package/dist/chunk-DGZQUCSD.js +1 -0
  34. package/dist/chunk-DPUG72P3.cjs +1 -0
  35. package/dist/chunk-E4TBJMOO.js +1 -0
  36. package/dist/chunk-EA7H4AXL.js +1 -0
  37. package/dist/chunk-EUXGP4IN.cjs +1 -0
  38. package/dist/chunk-EVADF7QA.js +1 -0
  39. package/dist/chunk-FON43I6G.cjs +1 -0
  40. package/dist/chunk-G4LT7I7W.js +1 -0
  41. package/dist/chunk-GPGY5B6G.js +1 -0
  42. package/dist/chunk-GPQZG7HC.cjs +1 -0
  43. package/dist/chunk-HG5ML6KX.cjs +1 -0
  44. package/dist/chunk-HJ4ZXU2X.js +1 -0
  45. package/dist/chunk-I4GMMHQR.cjs +1 -0
  46. package/dist/chunk-IAJBYU5C.js +1 -0
  47. package/dist/chunk-IMRZHYQK.cjs +1 -0
  48. package/dist/chunk-IMV35JZB.cjs +1 -0
  49. package/dist/chunk-IV4ACZQE.js +1 -0
  50. package/dist/chunk-IZGR67ZI.js +1 -0
  51. package/dist/chunk-JDYEU555.cjs +1 -0
  52. package/dist/chunk-JGM3G5E2.js +1 -0
  53. package/dist/chunk-JSNUJJQJ.js +1 -0
  54. package/dist/chunk-KFL42A3A.js +1 -0
  55. package/dist/chunk-KI4HRYHD.cjs +1 -0
  56. package/dist/chunk-LMSKJDGS.js +1 -0
  57. package/dist/chunk-M42BIIZJ.cjs +1 -0
  58. package/dist/chunk-N7OESP3W.js +1 -0
  59. package/dist/chunk-NB7AJIPT.js +0 -0
  60. package/dist/chunk-NBJIJZGO.js +1 -0
  61. package/dist/chunk-NCDVID2B.js +1 -0
  62. package/dist/chunk-NEKICGOA.cjs +1 -0
  63. package/dist/chunk-NFLGT52C.cjs +1 -0
  64. package/dist/chunk-NRN4WNQL.cjs +1 -0
  65. package/dist/chunk-NU6UB76I.cjs +1 -0
  66. package/dist/chunk-NZQIZ4ZY.cjs +1 -0
  67. package/dist/chunk-O5J2ZIJ6.cjs +1 -0
  68. package/dist/chunk-O73L7XWQ.js +1 -0
  69. package/dist/chunk-OOLXYAO7.js +1 -0
  70. package/dist/chunk-PDEAWPX3.cjs +1 -0
  71. package/dist/chunk-PW7TOKQ2.cjs +1 -0
  72. package/dist/chunk-PXDN3KFO.js +1 -0
  73. package/dist/chunk-QASKWI5Y.js +1 -0
  74. package/dist/chunk-QYQERFYL.cjs +1 -0
  75. package/dist/chunk-ROJ6HFVK.js +1 -0
  76. package/dist/chunk-RYQRCUKB.js +1 -0
  77. package/dist/chunk-S73E6EBO.cjs +1 -0
  78. package/dist/chunk-SFDQPSSP.js +1 -0
  79. package/dist/chunk-SRQAQHYK.cjs +1 -0
  80. package/dist/chunk-T6FFMX2I.js +1 -0
  81. package/dist/chunk-TD56X3VP.js +1 -0
  82. package/dist/chunk-TM7WDKYR.cjs +1 -0
  83. package/dist/chunk-TNCETEEL.js +1 -0
  84. package/dist/chunk-TXOVDTYK.cjs +1 -0
  85. package/dist/chunk-UAFW3OWA.js +1 -0
  86. package/dist/chunk-UEC3RXWE.cjs +1 -0
  87. package/dist/chunk-UHKWPOFV.js +1 -0
  88. package/dist/chunk-UP4F7YLI.cjs +1 -0
  89. package/dist/chunk-UYSB2EMS.cjs +1 -0
  90. package/dist/chunk-VHNBXIOC.js +1 -0
  91. package/dist/chunk-VI6TW7JT.cjs +1 -0
  92. package/dist/chunk-VLDE23JX.js +1 -0
  93. package/dist/chunk-VWBAHXIO.cjs +1 -0
  94. package/dist/chunk-VWL76U5G.js +1 -0
  95. package/dist/chunk-W4UPIFFS.cjs +1 -0
  96. package/dist/chunk-WABJHG6B.cjs +1 -0
  97. package/dist/chunk-WECMBN4Z.cjs +1 -0
  98. package/dist/chunk-WHFUW3W3.js +0 -0
  99. package/dist/chunk-WW3LYPGC.cjs +1 -0
  100. package/dist/chunk-X5BBXO27.cjs +1 -0
  101. package/dist/chunk-XIVIIEY5.js +1 -0
  102. package/dist/chunk-XUQK2ILL.cjs +1 -0
  103. package/dist/chunk-XUT4N66R.cjs +1 -0
  104. package/dist/chunk-YV6LD2NU.js +1 -0
  105. package/dist/chunk-YXF74MVI.cjs +1 -0
  106. package/dist/chunk-Z2FGFHRQ.cjs +1 -0
  107. package/dist/chunk-Z5PEH5AD.js +1 -0
  108. package/dist/chunk-ZUZEZZX7.js +1 -0
  109. package/dist/components/CrossmintNFTCollectionView.cjs +1 -9
  110. package/dist/components/CrossmintNFTCollectionView.js +1 -9
  111. package/dist/components/CrossmintNFTDetail.cjs +1 -9
  112. package/dist/components/CrossmintNFTDetail.js +1 -9
  113. package/dist/components/auth/AuthForm.cjs +1 -30
  114. package/dist/components/auth/AuthForm.js +1 -30
  115. package/dist/components/auth/AuthFormBackButton.cjs +1 -30
  116. package/dist/components/auth/AuthFormBackButton.js +1 -30
  117. package/dist/components/auth/AuthFormDialog.cjs +1 -30
  118. package/dist/components/auth/AuthFormDialog.js +1 -30
  119. package/dist/components/auth/EmbeddedAuthForm.cjs +1 -31
  120. package/dist/components/auth/EmbeddedAuthForm.js +1 -31
  121. package/dist/components/auth/PasskeyPrompt.cjs +1 -14
  122. package/dist/components/auth/PasskeyPrompt.js +1 -14
  123. package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -30
  124. package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -30
  125. package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -32
  126. package/dist/components/auth/methods/email/EmailOTPInput.js +1 -32
  127. package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -30
  128. package/dist/components/auth/methods/email/EmailSignIn.js +1 -30
  129. package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +1 -30
  130. package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +1 -30
  131. package/dist/components/auth/methods/google/GoogleSignIn.cjs +1 -30
  132. package/dist/components/auth/methods/google/GoogleSignIn.js +1 -30
  133. package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +1 -67
  134. package/dist/components/auth/methods/web3/Web3AuthFlow.js +1 -67
  135. package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +1 -33
  136. package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +1 -33
  137. package/dist/components/auth/methods/web3/Web3Connector.cjs +1 -65
  138. package/dist/components/auth/methods/web3/Web3Connector.js +1 -65
  139. package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs +1 -53
  140. package/dist/components/auth/methods/web3/Web3ConnectorButton.js +1 -53
  141. package/dist/components/auth/methods/web3/Web3Connectors.cjs +1 -31
  142. package/dist/components/auth/methods/web3/Web3Connectors.js +1 -31
  143. package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.cjs +1 -0
  144. package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.d.cts +9 -0
  145. package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.d.ts +9 -0
  146. package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.js +1 -0
  147. package/dist/components/common/CrossmintLogoV2/consts.cjs +1 -0
  148. package/dist/components/common/CrossmintLogoV2/consts.d.cts +35 -0
  149. package/dist/components/common/CrossmintLogoV2/consts.d.ts +35 -0
  150. package/dist/components/common/CrossmintLogoV2/consts.js +1 -0
  151. package/dist/components/common/CrossmintLogoV2/schemas.cjs +1 -0
  152. package/dist/components/common/CrossmintLogoV2/schemas.d.cts +199 -0
  153. package/dist/components/common/CrossmintLogoV2/schemas.d.ts +199 -0
  154. package/dist/components/common/CrossmintLogoV2/schemas.js +1 -0
  155. package/dist/components/common/Dialog.cjs +1 -26
  156. package/dist/components/common/Dialog.js +1 -26
  157. package/dist/components/common/Divider.cjs +1 -30
  158. package/dist/components/common/Divider.js +1 -30
  159. package/dist/components/common/InputOTP.cjs +1 -14
  160. package/dist/components/common/InputOTP.js +1 -14
  161. package/dist/components/common/PoweredByCrossmint.cjs +1 -10
  162. package/dist/components/common/PoweredByCrossmint.js +1 -10
  163. package/dist/components/common/Spinner.cjs +1 -9
  164. package/dist/components/common/Spinner.js +1 -9
  165. package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs +1 -8
  166. package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js +1 -8
  167. package/dist/components/embed/EmbeddedCheckoutIFrame.cjs +1 -8
  168. package/dist/components/embed/EmbeddedCheckoutIFrame.js +1 -8
  169. package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs +1 -11
  170. package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js +1 -11
  171. package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs +1 -10
  172. package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js +1 -10
  173. package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs +1 -11
  174. package/dist/components/embed/fiat/FiatEmbeddedCheckout.js +1 -11
  175. package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs +1 -10
  176. package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js +1 -10
  177. package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs +1 -75
  178. package/dist/components/embed/fiat/FiatPaymentElement_OLD.js +1 -75
  179. package/dist/components/embed/index.cjs +1 -14
  180. package/dist/components/embed/index.js +1 -14
  181. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -32
  182. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -32
  183. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -31
  184. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -31
  185. package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +1 -142
  186. package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +1 -142
  187. package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs +1 -70
  188. package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js +1 -70
  189. package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs +1 -8
  190. package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js +1 -8
  191. package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs +1 -52
  192. package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js +1 -52
  193. package/dist/components/embed/v3/index.cjs +1 -33
  194. package/dist/components/embed/v3/index.js +1 -33
  195. package/dist/components/hosted/CrossmintPayButton.cjs +1 -11
  196. package/dist/components/hosted/CrossmintPayButton.js +1 -11
  197. package/dist/components/hosted/index.cjs +1 -12
  198. package/dist/components/hosted/index.d.cts +1 -0
  199. package/dist/components/hosted/index.d.ts +1 -0
  200. package/dist/components/hosted/index.js +1 -12
  201. package/dist/components/hosted/styles.cjs +1 -10
  202. package/dist/components/hosted/styles.js +1 -10
  203. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -0
  204. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.d.cts +8 -0
  205. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.d.ts +8 -0
  206. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -0
  207. package/dist/components/hosted/v3/index.cjs +1 -0
  208. package/dist/components/hosted/v3/index.d.cts +4 -0
  209. package/dist/components/hosted/v3/index.d.ts +4 -0
  210. package/dist/components/hosted/v3/index.js +1 -0
  211. package/dist/components/index.cjs +1 -63
  212. package/dist/components/index.d.cts +1 -0
  213. package/dist/components/index.d.ts +1 -0
  214. package/dist/components/index.js +1 -63
  215. package/dist/consts/version.cjs +1 -8
  216. package/dist/consts/version.js +1 -8
  217. package/dist/hooks/index.cjs +1 -42
  218. package/dist/hooks/index.js +1 -42
  219. package/dist/hooks/useAuth.cjs +1 -30
  220. package/dist/hooks/useAuth.js +1 -30
  221. package/dist/hooks/useCrossmint.cjs +1 -10
  222. package/dist/hooks/useCrossmint.js +1 -10
  223. package/dist/hooks/useCrossmintAuth.cjs +1 -30
  224. package/dist/hooks/useCrossmintAuth.js +1 -30
  225. package/dist/hooks/useCrossmintCheckout.cjs +1 -13
  226. package/dist/hooks/useCrossmintCheckout.js +1 -13
  227. package/dist/hooks/useDeepEffect.cjs +1 -8
  228. package/dist/hooks/useDeepEffect.js +1 -8
  229. package/dist/hooks/useEnvironment.cjs +1 -8
  230. package/dist/hooks/useEnvironment.js +1 -8
  231. package/dist/hooks/useOAuthWindowListener.cjs +1 -30
  232. package/dist/hooks/useOAuthWindowListener.js +1 -30
  233. package/dist/hooks/useWallet.cjs +1 -30
  234. package/dist/hooks/useWallet.js +1 -30
  235. package/dist/icons/alert.cjs +1 -8
  236. package/dist/icons/alert.js +1 -8
  237. package/dist/icons/base64Icons.cjs +1 -12
  238. package/dist/icons/base64Icons.js +1 -12
  239. package/dist/icons/chevronRight.cjs +1 -8
  240. package/dist/icons/chevronRight.js +1 -8
  241. package/dist/icons/discord.cjs +1 -29
  242. package/dist/icons/discord.js +1 -29
  243. package/dist/icons/emailOTP.cjs +1 -8
  244. package/dist/icons/emailOTP.js +1 -8
  245. package/dist/icons/farcaster.cjs +1 -8
  246. package/dist/icons/farcaster.js +1 -8
  247. package/dist/icons/fingerprint.cjs +1 -8
  248. package/dist/icons/fingerprint.js +1 -8
  249. package/dist/icons/google.cjs +1 -8
  250. package/dist/icons/google.js +1 -8
  251. package/dist/icons/leftArrow.cjs +1 -8
  252. package/dist/icons/leftArrow.js +1 -8
  253. package/dist/icons/passkey.cjs +1 -8
  254. package/dist/icons/passkey.js +1 -8
  255. package/dist/icons/passkeyPromptLogo.cjs +1 -8
  256. package/dist/icons/passkeyPromptLogo.js +1 -8
  257. package/dist/icons/poweredByLeaf.cjs +1 -8
  258. package/dist/icons/poweredByLeaf.js +1 -8
  259. package/dist/icons/wallet.cjs +1 -8
  260. package/dist/icons/wallet.js +1 -8
  261. package/dist/icons/x.cjs +1 -29
  262. package/dist/icons/x.js +1 -29
  263. package/dist/index.cjs +1 -119
  264. package/dist/index.d.cts +1 -0
  265. package/dist/index.d.ts +1 -0
  266. package/dist/index.js +1 -119
  267. package/dist/providers/CrossmintAuthProvider.cjs +1 -32
  268. package/dist/providers/CrossmintAuthProvider.js +1 -32
  269. package/dist/providers/CrossmintWalletProvider.cjs +1 -32
  270. package/dist/providers/CrossmintWalletProvider.js +1 -32
  271. package/dist/providers/TwindProvider.cjs +1 -9
  272. package/dist/providers/TwindProvider.js +1 -9
  273. package/dist/providers/auth/AuthFormProvider.cjs +1 -32
  274. package/dist/providers/auth/AuthFormProvider.js +1 -32
  275. package/dist/providers/auth/FarcasterProvider.cjs +1 -8
  276. package/dist/providers/auth/FarcasterProvider.js +1 -8
  277. package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs +1 -33
  278. package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js +1 -33
  279. package/dist/providers/index.cjs +1 -36
  280. package/dist/providers/index.js +1 -36
  281. package/dist/testUtils.cjs +1 -8
  282. package/dist/testUtils.js +1 -8
  283. package/dist/twind.config.cjs +1 -8
  284. package/dist/twind.config.js +1 -8
  285. package/dist/types/auth.cjs +1 -1
  286. package/dist/types/auth.js +0 -1
  287. package/dist/utils/classNames.cjs +1 -8
  288. package/dist/utils/classNames.js +1 -8
  289. package/dist/utils/createCrossmintApiClient.cjs +1 -9
  290. package/dist/utils/createCrossmintApiClient.js +1 -9
  291. package/dist/utils/dynamic/dynamicChainToCrossmintChain.cjs +1 -8
  292. package/dist/utils/dynamic/dynamicChainToCrossmintChain.js +1 -8
  293. package/package.json +8 -8
  294. package/dist/chunk-2ROLE4XU.cjs +0 -31
  295. package/dist/chunk-2ROLE4XU.cjs.map +0 -1
  296. package/dist/chunk-2T2VCED7.js +0 -17
  297. package/dist/chunk-2T2VCED7.js.map +0 -1
  298. package/dist/chunk-33WZFL2D.js +0 -80
  299. package/dist/chunk-33WZFL2D.js.map +0 -1
  300. package/dist/chunk-35RV5AOT.cjs +0 -70
  301. package/dist/chunk-35RV5AOT.cjs.map +0 -1
  302. package/dist/chunk-3J6CUUWT.js +0 -50
  303. package/dist/chunk-3J6CUUWT.js.map +0 -1
  304. package/dist/chunk-3KR4GYLF.js +0 -26
  305. package/dist/chunk-3KR4GYLF.js.map +0 -1
  306. package/dist/chunk-43P7QWBK.cjs +0 -17
  307. package/dist/chunk-43P7QWBK.cjs.map +0 -1
  308. package/dist/chunk-4DAZAO6Y.cjs +0 -59
  309. package/dist/chunk-4DAZAO6Y.cjs.map +0 -1
  310. package/dist/chunk-5EE2IAIP.js +0 -87
  311. package/dist/chunk-5EE2IAIP.js.map +0 -1
  312. package/dist/chunk-5KK3YQWD.cjs +0 -1
  313. package/dist/chunk-5KK3YQWD.cjs.map +0 -1
  314. package/dist/chunk-5RX5WFEW.cjs +0 -11
  315. package/dist/chunk-5RX5WFEW.cjs.map +0 -1
  316. package/dist/chunk-5UXGDXPR.js +0 -153
  317. package/dist/chunk-5UXGDXPR.js.map +0 -1
  318. package/dist/chunk-6CPZDD6Y.js +0 -29
  319. package/dist/chunk-6CPZDD6Y.js.map +0 -1
  320. package/dist/chunk-6EX2VR7S.js +0 -14
  321. package/dist/chunk-6EX2VR7S.js.map +0 -1
  322. package/dist/chunk-6FG6NL44.js +0 -30
  323. package/dist/chunk-6FG6NL44.js.map +0 -1
  324. package/dist/chunk-6LO4NSRH.cjs +0 -21
  325. package/dist/chunk-6LO4NSRH.cjs.map +0 -1
  326. package/dist/chunk-6PPUWTTF.cjs +0 -31
  327. package/dist/chunk-6PPUWTTF.cjs.map +0 -1
  328. package/dist/chunk-7BZSIPWM.js +0 -31
  329. package/dist/chunk-7BZSIPWM.js.map +0 -1
  330. package/dist/chunk-7KIY6DLW.js +0 -28
  331. package/dist/chunk-7KIY6DLW.js.map +0 -1
  332. package/dist/chunk-7SBZ6OIH.js +0 -1
  333. package/dist/chunk-7SBZ6OIH.js.map +0 -1
  334. package/dist/chunk-A2JCJ2OV.cjs +0 -119
  335. package/dist/chunk-A2JCJ2OV.cjs.map +0 -1
  336. package/dist/chunk-A6Q4Z5TO.js +0 -31
  337. package/dist/chunk-A6Q4Z5TO.js.map +0 -1
  338. package/dist/chunk-A7J4DAE7.js +0 -16
  339. package/dist/chunk-A7J4DAE7.js.map +0 -1
  340. package/dist/chunk-ATHR4S2P.js +0 -48
  341. package/dist/chunk-ATHR4S2P.js.map +0 -1
  342. package/dist/chunk-AUCL5NPW.cjs +0 -31
  343. package/dist/chunk-AUCL5NPW.cjs.map +0 -1
  344. package/dist/chunk-AUEQQ4D3.js +0 -119
  345. package/dist/chunk-AUEQQ4D3.js.map +0 -1
  346. package/dist/chunk-AXZLLRBU.cjs +0 -26
  347. package/dist/chunk-AXZLLRBU.cjs.map +0 -1
  348. package/dist/chunk-B7LYPQ4K.cjs +0 -38
  349. package/dist/chunk-B7LYPQ4K.cjs.map +0 -1
  350. package/dist/chunk-BE2ZLB3L.cjs +0 -19
  351. package/dist/chunk-BE2ZLB3L.cjs.map +0 -1
  352. package/dist/chunk-BFTVVPCU.js +0 -81
  353. package/dist/chunk-BFTVVPCU.js.map +0 -1
  354. package/dist/chunk-BKVDVDKX.cjs +0 -1
  355. package/dist/chunk-BKVDVDKX.cjs.map +0 -1
  356. package/dist/chunk-BURUD6IV.cjs +0 -64
  357. package/dist/chunk-BURUD6IV.cjs.map +0 -1
  358. package/dist/chunk-C2VARNXL.js +0 -70
  359. package/dist/chunk-C2VARNXL.js.map +0 -1
  360. package/dist/chunk-CPYPI45H.js +0 -98
  361. package/dist/chunk-CPYPI45H.js.map +0 -1
  362. package/dist/chunk-CRTRMMJ7.js +0 -59
  363. package/dist/chunk-CRTRMMJ7.js.map +0 -1
  364. package/dist/chunk-DCMLWFDK.js +0 -31
  365. package/dist/chunk-DCMLWFDK.js.map +0 -1
  366. package/dist/chunk-DR67KSE7.js +0 -31
  367. package/dist/chunk-DR67KSE7.js.map +0 -1
  368. package/dist/chunk-DZ5MGN25.js +0 -147
  369. package/dist/chunk-DZ5MGN25.js.map +0 -1
  370. package/dist/chunk-ENCR5SUW.cjs +0 -51
  371. package/dist/chunk-ENCR5SUW.cjs.map +0 -1
  372. package/dist/chunk-EOWJ7775.js +0 -18
  373. package/dist/chunk-EOWJ7775.js.map +0 -1
  374. package/dist/chunk-FGHABNQM.js +0 -10
  375. package/dist/chunk-FGHABNQM.js.map +0 -1
  376. package/dist/chunk-FKIMKZ4Y.js +0 -17
  377. package/dist/chunk-FKIMKZ4Y.js.map +0 -1
  378. package/dist/chunk-GMKTZIU2.cjs +0 -22
  379. package/dist/chunk-GMKTZIU2.cjs.map +0 -1
  380. package/dist/chunk-H4F7UVPT.js +0 -34
  381. package/dist/chunk-H4F7UVPT.js.map +0 -1
  382. package/dist/chunk-HATQVB6H.js +0 -19
  383. package/dist/chunk-HATQVB6H.js.map +0 -1
  384. package/dist/chunk-HCW4RO2O.cjs +0 -29
  385. package/dist/chunk-HCW4RO2O.cjs.map +0 -1
  386. package/dist/chunk-HOTEC5UH.js +0 -22
  387. package/dist/chunk-HOTEC5UH.js.map +0 -1
  388. package/dist/chunk-HPOZ6I54.cjs +0 -44
  389. package/dist/chunk-HPOZ6I54.cjs.map +0 -1
  390. package/dist/chunk-HW2Q6J4R.js +0 -64
  391. package/dist/chunk-HW2Q6J4R.js.map +0 -1
  392. package/dist/chunk-HZ26XTTK.cjs +0 -81
  393. package/dist/chunk-HZ26XTTK.cjs.map +0 -1
  394. package/dist/chunk-I63FQCIV.js +0 -189
  395. package/dist/chunk-I63FQCIV.js.map +0 -1
  396. package/dist/chunk-IP4HQL5I.cjs +0 -147
  397. package/dist/chunk-IP4HQL5I.cjs.map +0 -1
  398. package/dist/chunk-IQPA3QOV.js +0 -27
  399. package/dist/chunk-IQPA3QOV.js.map +0 -1
  400. package/dist/chunk-K5S6RUJ3.cjs +0 -153
  401. package/dist/chunk-K5S6RUJ3.cjs.map +0 -1
  402. package/dist/chunk-KEKBOJCF.cjs +0 -50
  403. package/dist/chunk-KEKBOJCF.cjs.map +0 -1
  404. package/dist/chunk-KLWDDALZ.cjs +0 -14
  405. package/dist/chunk-KLWDDALZ.cjs.map +0 -1
  406. package/dist/chunk-KNOUJZN5.cjs +0 -32
  407. package/dist/chunk-KNOUJZN5.cjs.map +0 -1
  408. package/dist/chunk-L3FKENHU.js +0 -14
  409. package/dist/chunk-L3FKENHU.js.map +0 -1
  410. package/dist/chunk-LGY5FQOZ.cjs +0 -29
  411. package/dist/chunk-LGY5FQOZ.cjs.map +0 -1
  412. package/dist/chunk-LJA62EVT.cjs +0 -87
  413. package/dist/chunk-LJA62EVT.cjs.map +0 -1
  414. package/dist/chunk-MCINXS2Y.cjs +0 -1111
  415. package/dist/chunk-MCINXS2Y.cjs.map +0 -1
  416. package/dist/chunk-MH37OJT2.cjs +0 -80
  417. package/dist/chunk-MH37OJT2.cjs.map +0 -1
  418. package/dist/chunk-MJHLKJ6X.cjs +0 -212
  419. package/dist/chunk-MJHLKJ6X.cjs.map +0 -1
  420. package/dist/chunk-MUS7DUPS.cjs +0 -98
  421. package/dist/chunk-MUS7DUPS.cjs.map +0 -1
  422. package/dist/chunk-NMXFWIFA.js +0 -133
  423. package/dist/chunk-NMXFWIFA.js.map +0 -1
  424. package/dist/chunk-O53ZB544.js +0 -1111
  425. package/dist/chunk-O53ZB544.js.map +0 -1
  426. package/dist/chunk-PBSL6JOF.cjs +0 -17
  427. package/dist/chunk-PBSL6JOF.cjs.map +0 -1
  428. package/dist/chunk-PHCGCJSA.js +0 -107
  429. package/dist/chunk-PHCGCJSA.js.map +0 -1
  430. package/dist/chunk-Q3M4UH5U.cjs +0 -48
  431. package/dist/chunk-Q3M4UH5U.cjs.map +0 -1
  432. package/dist/chunk-QDKAU3H2.js +0 -31
  433. package/dist/chunk-QDKAU3H2.js.map +0 -1
  434. package/dist/chunk-QFZ6GZZR.cjs +0 -14
  435. package/dist/chunk-QFZ6GZZR.cjs.map +0 -1
  436. package/dist/chunk-QQXBYOKA.cjs +0 -16
  437. package/dist/chunk-QQXBYOKA.cjs.map +0 -1
  438. package/dist/chunk-QT7UEJZG.cjs +0 -133
  439. package/dist/chunk-QT7UEJZG.cjs.map +0 -1
  440. package/dist/chunk-QTL5I5C2.js +0 -38
  441. package/dist/chunk-QTL5I5C2.js.map +0 -1
  442. package/dist/chunk-R6IL3WOE.cjs +0 -31
  443. package/dist/chunk-R6IL3WOE.cjs.map +0 -1
  444. package/dist/chunk-RZPQIRIY.js +0 -11
  445. package/dist/chunk-RZPQIRIY.js.map +0 -1
  446. package/dist/chunk-RZT2J42J.js +0 -29
  447. package/dist/chunk-RZT2J42J.js.map +0 -1
  448. package/dist/chunk-SBA6FMFT.cjs +0 -18
  449. package/dist/chunk-SBA6FMFT.cjs.map +0 -1
  450. package/dist/chunk-SBTNHVSD.cjs +0 -30
  451. package/dist/chunk-SBTNHVSD.cjs.map +0 -1
  452. package/dist/chunk-SZA3XDJ5.cjs +0 -1
  453. package/dist/chunk-SZA3XDJ5.cjs.map +0 -1
  454. package/dist/chunk-TH42AO6J.js +0 -17
  455. package/dist/chunk-TH42AO6J.js.map +0 -1
  456. package/dist/chunk-U7LXB3SM.js +0 -50
  457. package/dist/chunk-U7LXB3SM.js.map +0 -1
  458. package/dist/chunk-UASNCH3A.cjs +0 -27
  459. package/dist/chunk-UASNCH3A.cjs.map +0 -1
  460. package/dist/chunk-UGHW5HMB.cjs +0 -31
  461. package/dist/chunk-UGHW5HMB.cjs.map +0 -1
  462. package/dist/chunk-UQAKJ4T7.cjs +0 -29
  463. package/dist/chunk-UQAKJ4T7.cjs.map +0 -1
  464. package/dist/chunk-URKPLEPV.cjs +0 -189
  465. package/dist/chunk-URKPLEPV.cjs.map +0 -1
  466. package/dist/chunk-VZIXXIU5.js +0 -32
  467. package/dist/chunk-VZIXXIU5.js.map +0 -1
  468. package/dist/chunk-XDJ6F7N4.cjs +0 -107
  469. package/dist/chunk-XDJ6F7N4.cjs.map +0 -1
  470. package/dist/chunk-XEZF7G64.js +0 -212
  471. package/dist/chunk-XEZF7G64.js.map +0 -1
  472. package/dist/chunk-XXJ7LQ44.js +0 -1
  473. package/dist/chunk-XXJ7LQ44.js.map +0 -1
  474. package/dist/chunk-XYMYRPVT.js +0 -1
  475. package/dist/chunk-XYMYRPVT.js.map +0 -1
  476. package/dist/chunk-Y3SUMTUI.cjs +0 -10
  477. package/dist/chunk-Y3SUMTUI.cjs.map +0 -1
  478. package/dist/chunk-YE55IKBP.cjs +0 -34
  479. package/dist/chunk-YE55IKBP.cjs.map +0 -1
  480. package/dist/chunk-YNBGMNE6.cjs +0 -17
  481. package/dist/chunk-YNBGMNE6.cjs.map +0 -1
  482. package/dist/chunk-YWVQCHQF.js +0 -51
  483. package/dist/chunk-YWVQCHQF.js.map +0 -1
  484. package/dist/chunk-ZDQGQY7Z.js +0 -29
  485. package/dist/chunk-ZDQGQY7Z.js.map +0 -1
  486. package/dist/chunk-ZIHCLVCD.js +0 -44
  487. package/dist/chunk-ZIHCLVCD.js.map +0 -1
  488. package/dist/chunk-ZJC4OB5Z.cjs +0 -50
  489. package/dist/chunk-ZJC4OB5Z.cjs.map +0 -1
  490. package/dist/chunk-ZMSST6ZZ.cjs +0 -28
  491. package/dist/chunk-ZMSST6ZZ.cjs.map +0 -1
  492. package/dist/chunk-ZUIS3FET.js +0 -21
  493. package/dist/chunk-ZUIS3FET.js.map +0 -1
  494. package/dist/components/CrossmintNFTCollectionView.cjs.map +0 -1
  495. package/dist/components/CrossmintNFTCollectionView.js.map +0 -1
  496. package/dist/components/CrossmintNFTDetail.cjs.map +0 -1
  497. package/dist/components/CrossmintNFTDetail.js.map +0 -1
  498. package/dist/components/auth/AuthForm.cjs.map +0 -1
  499. package/dist/components/auth/AuthForm.js.map +0 -1
  500. package/dist/components/auth/AuthFormBackButton.cjs.map +0 -1
  501. package/dist/components/auth/AuthFormBackButton.js.map +0 -1
  502. package/dist/components/auth/AuthFormDialog.cjs.map +0 -1
  503. package/dist/components/auth/AuthFormDialog.js.map +0 -1
  504. package/dist/components/auth/EmbeddedAuthForm.cjs.map +0 -1
  505. package/dist/components/auth/EmbeddedAuthForm.js.map +0 -1
  506. package/dist/components/auth/PasskeyPrompt.cjs.map +0 -1
  507. package/dist/components/auth/PasskeyPrompt.js.map +0 -1
  508. package/dist/components/auth/methods/email/EmailAuthFlow.cjs.map +0 -1
  509. package/dist/components/auth/methods/email/EmailAuthFlow.js.map +0 -1
  510. package/dist/components/auth/methods/email/EmailOTPInput.cjs.map +0 -1
  511. package/dist/components/auth/methods/email/EmailOTPInput.js.map +0 -1
  512. package/dist/components/auth/methods/email/EmailSignIn.cjs.map +0 -1
  513. package/dist/components/auth/methods/email/EmailSignIn.js.map +0 -1
  514. package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs.map +0 -1
  515. package/dist/components/auth/methods/farcaster/FarcasterSignIn.js.map +0 -1
  516. package/dist/components/auth/methods/google/GoogleSignIn.cjs.map +0 -1
  517. package/dist/components/auth/methods/google/GoogleSignIn.js.map +0 -1
  518. package/dist/components/auth/methods/web3/Web3AuthFlow.cjs.map +0 -1
  519. package/dist/components/auth/methods/web3/Web3AuthFlow.js.map +0 -1
  520. package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs.map +0 -1
  521. package/dist/components/auth/methods/web3/Web3AuthFlowButton.js.map +0 -1
  522. package/dist/components/auth/methods/web3/Web3Connector.cjs.map +0 -1
  523. package/dist/components/auth/methods/web3/Web3Connector.js.map +0 -1
  524. package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs.map +0 -1
  525. package/dist/components/auth/methods/web3/Web3ConnectorButton.js.map +0 -1
  526. package/dist/components/auth/methods/web3/Web3Connectors.cjs.map +0 -1
  527. package/dist/components/auth/methods/web3/Web3Connectors.js.map +0 -1
  528. package/dist/components/common/Dialog.cjs.map +0 -1
  529. package/dist/components/common/Dialog.js.map +0 -1
  530. package/dist/components/common/Divider.cjs.map +0 -1
  531. package/dist/components/common/Divider.js.map +0 -1
  532. package/dist/components/common/InputOTP.cjs.map +0 -1
  533. package/dist/components/common/InputOTP.js.map +0 -1
  534. package/dist/components/common/PoweredByCrossmint.cjs.map +0 -1
  535. package/dist/components/common/PoweredByCrossmint.js.map +0 -1
  536. package/dist/components/common/Spinner.cjs.map +0 -1
  537. package/dist/components/common/Spinner.js.map +0 -1
  538. package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs.map +0 -1
  539. package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js.map +0 -1
  540. package/dist/components/embed/EmbeddedCheckoutIFrame.cjs.map +0 -1
  541. package/dist/components/embed/EmbeddedCheckoutIFrame.js.map +0 -1
  542. package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs.map +0 -1
  543. package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js.map +0 -1
  544. package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs.map +0 -1
  545. package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js.map +0 -1
  546. package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs.map +0 -1
  547. package/dist/components/embed/fiat/FiatEmbeddedCheckout.js.map +0 -1
  548. package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs.map +0 -1
  549. package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js.map +0 -1
  550. package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs.map +0 -1
  551. package/dist/components/embed/fiat/FiatPaymentElement_OLD.js.map +0 -1
  552. package/dist/components/embed/index.cjs.map +0 -1
  553. package/dist/components/embed/index.js.map +0 -1
  554. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs.map +0 -1
  555. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js.map +0 -1
  556. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs.map +0 -1
  557. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js.map +0 -1
  558. package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +0 -1
  559. package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +0 -1
  560. package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs.map +0 -1
  561. package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js.map +0 -1
  562. package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs.map +0 -1
  563. package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js.map +0 -1
  564. package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs.map +0 -1
  565. package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js.map +0 -1
  566. package/dist/components/embed/v3/index.cjs.map +0 -1
  567. package/dist/components/embed/v3/index.js.map +0 -1
  568. package/dist/components/hosted/CrossmintPayButton.cjs.map +0 -1
  569. package/dist/components/hosted/CrossmintPayButton.js.map +0 -1
  570. package/dist/components/hosted/index.cjs.map +0 -1
  571. package/dist/components/hosted/index.js.map +0 -1
  572. package/dist/components/hosted/styles.cjs.map +0 -1
  573. package/dist/components/hosted/styles.js.map +0 -1
  574. package/dist/components/index.cjs.map +0 -1
  575. package/dist/components/index.js.map +0 -1
  576. package/dist/consts/version.cjs.map +0 -1
  577. package/dist/consts/version.js.map +0 -1
  578. package/dist/hooks/index.cjs.map +0 -1
  579. package/dist/hooks/index.js.map +0 -1
  580. package/dist/hooks/useAuth.cjs.map +0 -1
  581. package/dist/hooks/useAuth.js.map +0 -1
  582. package/dist/hooks/useCrossmint.cjs.map +0 -1
  583. package/dist/hooks/useCrossmint.js.map +0 -1
  584. package/dist/hooks/useCrossmintAuth.cjs.map +0 -1
  585. package/dist/hooks/useCrossmintAuth.js.map +0 -1
  586. package/dist/hooks/useCrossmintCheckout.cjs.map +0 -1
  587. package/dist/hooks/useCrossmintCheckout.js.map +0 -1
  588. package/dist/hooks/useDeepEffect.cjs.map +0 -1
  589. package/dist/hooks/useDeepEffect.js.map +0 -1
  590. package/dist/hooks/useEnvironment.cjs.map +0 -1
  591. package/dist/hooks/useEnvironment.js.map +0 -1
  592. package/dist/hooks/useOAuthWindowListener.cjs.map +0 -1
  593. package/dist/hooks/useOAuthWindowListener.js.map +0 -1
  594. package/dist/hooks/useWallet.cjs.map +0 -1
  595. package/dist/hooks/useWallet.js.map +0 -1
  596. package/dist/icons/alert.cjs.map +0 -1
  597. package/dist/icons/alert.js.map +0 -1
  598. package/dist/icons/base64Icons.cjs.map +0 -1
  599. package/dist/icons/base64Icons.js.map +0 -1
  600. package/dist/icons/chevronRight.cjs.map +0 -1
  601. package/dist/icons/chevronRight.js.map +0 -1
  602. package/dist/icons/discord.cjs.map +0 -1
  603. package/dist/icons/discord.js.map +0 -1
  604. package/dist/icons/emailOTP.cjs.map +0 -1
  605. package/dist/icons/emailOTP.js.map +0 -1
  606. package/dist/icons/farcaster.cjs.map +0 -1
  607. package/dist/icons/farcaster.js.map +0 -1
  608. package/dist/icons/fingerprint.cjs.map +0 -1
  609. package/dist/icons/fingerprint.js.map +0 -1
  610. package/dist/icons/google.cjs.map +0 -1
  611. package/dist/icons/google.js.map +0 -1
  612. package/dist/icons/leftArrow.cjs.map +0 -1
  613. package/dist/icons/leftArrow.js.map +0 -1
  614. package/dist/icons/passkey.cjs.map +0 -1
  615. package/dist/icons/passkey.js.map +0 -1
  616. package/dist/icons/passkeyPromptLogo.cjs.map +0 -1
  617. package/dist/icons/passkeyPromptLogo.js.map +0 -1
  618. package/dist/icons/poweredByLeaf.cjs.map +0 -1
  619. package/dist/icons/poweredByLeaf.js.map +0 -1
  620. package/dist/icons/wallet.cjs.map +0 -1
  621. package/dist/icons/wallet.js.map +0 -1
  622. package/dist/icons/x.cjs.map +0 -1
  623. package/dist/icons/x.js.map +0 -1
  624. package/dist/index.cjs.map +0 -1
  625. package/dist/index.js.map +0 -1
  626. package/dist/providers/CrossmintAuthProvider.cjs.map +0 -1
  627. package/dist/providers/CrossmintAuthProvider.js.map +0 -1
  628. package/dist/providers/CrossmintWalletProvider.cjs.map +0 -1
  629. package/dist/providers/CrossmintWalletProvider.js.map +0 -1
  630. package/dist/providers/TwindProvider.cjs.map +0 -1
  631. package/dist/providers/TwindProvider.js.map +0 -1
  632. package/dist/providers/auth/AuthFormProvider.cjs.map +0 -1
  633. package/dist/providers/auth/AuthFormProvider.js.map +0 -1
  634. package/dist/providers/auth/FarcasterProvider.cjs.map +0 -1
  635. package/dist/providers/auth/FarcasterProvider.js.map +0 -1
  636. package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs.map +0 -1
  637. package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js.map +0 -1
  638. package/dist/providers/index.cjs.map +0 -1
  639. package/dist/providers/index.js.map +0 -1
  640. package/dist/testUtils.cjs.map +0 -1
  641. package/dist/testUtils.js.map +0 -1
  642. package/dist/twind.config.cjs.map +0 -1
  643. package/dist/twind.config.js.map +0 -1
  644. package/dist/types/auth.cjs.map +0 -1
  645. package/dist/types/auth.js.map +0 -1
  646. package/dist/utils/classNames.cjs.map +0 -1
  647. package/dist/utils/classNames.js.map +0 -1
  648. package/dist/utils/createCrossmintApiClient.cjs.map +0 -1
  649. package/dist/utils/createCrossmintApiClient.js.map +0 -1
  650. package/dist/utils/dynamic/dynamicChainToCrossmintChain.cjs.map +0 -1
  651. package/dist/utils/dynamic/dynamicChainToCrossmintChain.js.map +0 -1
  652. package/src/components/CrossmintCollectionView.test.tsx +0 -36
  653. package/src/components/CrossmintNFTCollectionView.tsx +0 -25
  654. package/src/components/CrossmintNFTDetail.test.tsx +0 -38
  655. package/src/components/CrossmintNFTDetail.tsx +0 -25
  656. package/src/components/auth/AuthForm.tsx +0 -84
  657. package/src/components/auth/AuthFormBackButton.tsx +0 -30
  658. package/src/components/auth/AuthFormDialog.tsx +0 -38
  659. package/src/components/auth/EmbeddedAuthForm.tsx +0 -5
  660. package/src/components/auth/PasskeyPrompt.tsx +0 -258
  661. package/src/components/auth/methods/email/EmailAuthFlow.tsx +0 -19
  662. package/src/components/auth/methods/email/EmailOTPInput.tsx +0 -124
  663. package/src/components/auth/methods/email/EmailSignIn.tsx +0 -110
  664. package/src/components/auth/methods/farcaster/FarcasterSignIn.tsx +0 -169
  665. package/src/components/auth/methods/google/GoogleSignIn.tsx +0 -53
  666. package/src/components/auth/methods/web3/Web3AuthFlow.tsx +0 -35
  667. package/src/components/auth/methods/web3/Web3AuthFlowButton.tsx +0 -44
  668. package/src/components/auth/methods/web3/Web3Connector.tsx +0 -62
  669. package/src/components/auth/methods/web3/Web3ConnectorButton.tsx +0 -38
  670. package/src/components/auth/methods/web3/Web3Connectors.tsx +0 -28
  671. package/src/components/common/Dialog.tsx +0 -122
  672. package/src/components/common/Divider.tsx +0 -25
  673. package/src/components/common/InputOTP.tsx +0 -94
  674. package/src/components/common/PoweredByCrossmint.tsx +0 -10
  675. package/src/components/common/Spinner.tsx +0 -22
  676. package/src/components/dynamic-xyz/DynamicContextProviderWrapper.tsx +0 -31
  677. package/src/components/embed/CrossmintPaymentElement.test.tsx +0 -79
  678. package/src/components/embed/EmbeddedCheckoutIFrame.tsx +0 -71
  679. package/src/components/embed/crypto/CryptoEmbeddedCheckout.tsx +0 -11
  680. package/src/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.tsx +0 -108
  681. package/src/components/embed/fiat/FiatEmbeddedCheckout.tsx +0 -7
  682. package/src/components/embed/fiat/FiatEmbeddedCheckoutIFrame.tsx +0 -21
  683. package/src/components/embed/fiat/FiatPaymentElement_OLD.tsx +0 -73
  684. package/src/components/embed/index.tsx +0 -19
  685. package/src/components/embed/v3/CrossmintEmbeddedCheckoutV3.tsx +0 -7
  686. package/src/components/embed/v3/EmbeddedCheckoutV3IFrame.tsx +0 -83
  687. package/src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx +0 -144
  688. package/src/components/embed/v3/crypto/utils/handleEvmTransaction.ts +0 -78
  689. package/src/components/embed/v3/crypto/utils/handleSendTransaction.ts +0 -29
  690. package/src/components/embed/v3/crypto/utils/handleSolanaTransaction.ts +0 -54
  691. package/src/components/embed/v3/index.ts +0 -1
  692. package/src/components/hosted/CrossmintPayButton.test.tsx +0 -188
  693. package/src/components/hosted/CrossmintPayButton.tsx +0 -132
  694. package/src/components/hosted/index.ts +0 -1
  695. package/src/components/hosted/styles.ts +0 -58
  696. package/src/components/index.ts +0 -8
  697. package/src/consts/version.ts +0 -3
  698. package/src/hooks/index.ts +0 -4
  699. package/src/hooks/useAuth.ts +0 -11
  700. package/src/hooks/useCrossmint.test.tsx +0 -103
  701. package/src/hooks/useCrossmint.tsx +0 -57
  702. package/src/hooks/useCrossmintAuth.ts +0 -12
  703. package/src/hooks/useCrossmintCheckout.tsx +0 -56
  704. package/src/hooks/useDeepEffect.ts +0 -15
  705. package/src/hooks/useEnvironment.ts +0 -10
  706. package/src/hooks/useOAuthWindowListener.ts +0 -84
  707. package/src/hooks/useWallet.ts +0 -13
  708. package/src/icons/alert.tsx +0 -19
  709. package/src/icons/base64Icons.ts +0 -8
  710. package/src/icons/chevronRight.tsx +0 -21
  711. package/src/icons/discord.tsx +0 -18
  712. package/src/icons/emailOTP.tsx +0 -147
  713. package/src/icons/farcaster.tsx +0 -26
  714. package/src/icons/fingerprint.tsx +0 -25
  715. package/src/icons/google.tsx +0 -30
  716. package/src/icons/leftArrow.tsx +0 -20
  717. package/src/icons/passkey.tsx +0 -18
  718. package/src/icons/passkeyPromptLogo.tsx +0 -76
  719. package/src/icons/poweredByLeaf.tsx +0 -85
  720. package/src/icons/wallet.tsx +0 -23
  721. package/src/icons/x.tsx +0 -19
  722. package/src/index.ts +0 -23
  723. package/src/providers/CrossmintAuthProvider.test.tsx +0 -269
  724. package/src/providers/CrossmintAuthProvider.tsx +0 -211
  725. package/src/providers/CrossmintWalletProvider.test.tsx +0 -218
  726. package/src/providers/CrossmintWalletProvider.tsx +0 -155
  727. package/src/providers/TwindProvider.tsx +0 -14
  728. package/src/providers/auth/AuthFormProvider.test.tsx +0 -142
  729. package/src/providers/auth/AuthFormProvider.tsx +0 -109
  730. package/src/providers/auth/FarcasterProvider.tsx +0 -12
  731. package/src/providers/auth/web3/DynamicWeb3WalletConnect.tsx +0 -73
  732. package/src/providers/index.ts +0 -2
  733. package/src/testUtils.ts +0 -1
  734. package/src/twind.config.ts +0 -114
  735. package/src/types/auth.ts +0 -4
  736. package/src/utils/classNames.ts +0 -12
  737. package/src/utils/createCrossmintApiClient.ts +0 -17
  738. package/src/utils/dynamic/dynamicChainToCrossmintChain.ts +0 -20
@@ -1,144 +0,0 @@
1
- import DynamicContextProviderWrapper from "@/components/dynamic-xyz/DynamicContextProviderWrapper";
2
- import type { EmbeddedCheckoutV3IFrameEmitter } from "@crossmint/client-sdk-base";
3
- import type { APIKeyEnvironmentPrefix, BlockchainIncludingTestnet } from "@crossmint/common-sdk-base";
4
- import { EthereumWalletConnectors } from "@dynamic-labs/ethereum";
5
- import { DynamicContext, useDynamicContext } from "@dynamic-labs/sdk-react-core";
6
- import { SolanaWalletConnectors } from "@dynamic-labs/solana";
7
- import { type Dispatch, type SetStateAction, useContext, useEffect, useState } from "react";
8
- import { handleSendTransaction } from "./utils/handleSendTransaction";
9
- import { dynamicChainToCrossmintChain } from "@/utils/dynamic/dynamicChainToCrossmintChain";
10
-
11
- export function CryptoWalletConnectionHandler(props: {
12
- iframeClient: EmbeddedCheckoutV3IFrameEmitter | null;
13
- apiKeyEnvironment: APIKeyEnvironmentPrefix;
14
- }) {
15
- const { iframeClient, apiKeyEnvironment } = props;
16
-
17
- return (
18
- <DynamicContextProviderWrapper
19
- apiKeyEnvironment={apiKeyEnvironment}
20
- settings={{
21
- walletConnectors: [EthereumWalletConnectors, SolanaWalletConnectors],
22
- events: {
23
- onAuthFlowCancel() {
24
- console.log("[CryptoWalletConnectionHandler] onAuthFlowCancel");
25
- iframeClient?.send("crypto:connect-wallet.failed", {
26
- error: "cancelled",
27
- });
28
- },
29
- onAuthFlowClose() {
30
- console.log("[CryptoWalletConnectionHandler] onAuthFlowClose");
31
- },
32
- onAuthFailure(data, reason) {
33
- console.error("[CryptoWalletConnectionHandler] onAuthFailure", data, reason);
34
- },
35
- onAuthSuccess(data) {
36
- console.log("[CryptoWalletConnectionHandler] onAuthSuccess", data);
37
- },
38
- },
39
- handlers: {
40
- handleConnectedWallet: async (wallet) => {
41
- console.log("[CryptoWalletConnectionHandler] handleConnectedWallet", wallet);
42
-
43
- const address = wallet.address;
44
- if (!address) {
45
- console.error("[CryptoWalletConnectionHandler] handleConnectedWallet: address is missing");
46
- iframeClient?.send("crypto:connect-wallet.failed", {
47
- error: "address is missing",
48
- });
49
- return false;
50
- }
51
-
52
- const chain = await dynamicChainToCrossmintChain(wallet);
53
-
54
- iframeClient?.send("crypto:connect-wallet.success", {
55
- address,
56
- chain,
57
- walletProviderKey: wallet.connector?.key,
58
- });
59
-
60
- return true;
61
- },
62
- },
63
- }}
64
- >
65
- <_CryptoWalletConnectionHandler {...props} />
66
- </DynamicContextProviderWrapper>
67
- );
68
- }
69
-
70
- function _CryptoWalletConnectionHandler({ iframeClient }: Parameters<typeof CryptoWalletConnectionHandler>[0]) {
71
- const [showDynamicModal, setShowDynamicModal] = useState(false);
72
- const { primaryWallet } = useDynamicContext();
73
-
74
- useEffect(() => {
75
- if (iframeClient == null) {
76
- return;
77
- }
78
- const showAuthFlowListener = iframeClient.on("crypto:connect-wallet.show", ({ show }) => {
79
- setShowDynamicModal(show);
80
- });
81
-
82
- return () => {
83
- iframeClient.off(showAuthFlowListener);
84
- };
85
- }, [iframeClient]);
86
-
87
- useEffect(() => {
88
- if (iframeClient == null) {
89
- return;
90
- }
91
- const signTransactionListener = iframeClient.on(
92
- "crypto:send-transaction",
93
- async ({ chain, serializedTransaction }) => {
94
- if (primaryWallet == null) {
95
- console.error("[CryptoWalletConnectionHandler] signTransaction: primaryWallet is missing");
96
- iframeClient.send("crypto:send-transaction:failed", {
97
- error: "primaryWallet is missing",
98
- });
99
- return;
100
- }
101
-
102
- await handleSendTransaction(
103
- primaryWallet,
104
- chain as BlockchainIncludingTestnet,
105
- serializedTransaction,
106
- iframeClient
107
- );
108
- }
109
- );
110
-
111
- return () => {
112
- iframeClient.off(signTransactionListener);
113
- };
114
- }, [iframeClient, primaryWallet]);
115
-
116
- return showDynamicModal ? <ShowDynamicModal setShowDynamicModal={setShowDynamicModal} /> : null;
117
- }
118
-
119
- export function ShowDynamicModal({ setShowDynamicModal }: { setShowDynamicModal: Dispatch<SetStateAction<boolean>> }) {
120
- const context = useContext(DynamicContext);
121
- if (context == null) {
122
- throw new Error("DynamicContext is missing");
123
- }
124
- const { setShowAuthFlow, handleLogOut } = context;
125
-
126
- useEffect(() => {
127
- // Move focus from the iframe to the main page, otherwise the modal will require a double click to interact with it
128
- document.getElementById("crossmint-focus-target")?.focus();
129
-
130
- (async () => {
131
- await handleLogOut();
132
- setShowAuthFlow(true, {
133
- clearErrors: true,
134
- emitCancelAuth: true,
135
- ignoreIfIsEmbeddedWidget: true,
136
- initializeWalletConnect: true,
137
- performMultiWalletChecks: false, // Important to be false in order to not require double clicking connect button
138
- });
139
- setShowDynamicModal(false);
140
- })();
141
- }, []);
142
-
143
- return null;
144
- }
@@ -1,78 +0,0 @@
1
- import type { EmbeddedCheckoutV3IFrameEmitter } from "@crossmint/client-sdk-base";
2
- import {
3
- type BlockchainIncludingTestnet,
4
- blockchainToChainId,
5
- type EVMBlockchainIncludingTestnet,
6
- } from "@crossmint/common-sdk-base";
7
- import type { Wallet } from "@dynamic-labs/sdk-react-core";
8
- import {
9
- type Chain,
10
- type Account,
11
- type WalletClient,
12
- type TransactionSerializableEIP1559,
13
- type Transport,
14
- parseTransaction,
15
- } from "viem";
16
-
17
- export async function handleEvmTransaction({
18
- primaryWallet,
19
- chain,
20
- serializedTransaction,
21
- iframeClient,
22
- }: {
23
- primaryWallet: Wallet;
24
- chain: BlockchainIncludingTestnet;
25
- serializedTransaction: string;
26
- iframeClient: EmbeddedCheckoutV3IFrameEmitter;
27
- }) {
28
- const { connector } = primaryWallet;
29
- const chainId = blockchainToChainId(chain as EVMBlockchainIncludingTestnet);
30
-
31
- try {
32
- await connector.switchNetwork({ networkChainId: chainId });
33
- } catch (error) {
34
- console.error(`[CryptoWalletConnectionHandler] failed to switch network to ${chainId}`, error);
35
- iframeClient.send("crypto:send-transaction:failed", {
36
- error: (error as Error).message,
37
- });
38
- return;
39
- }
40
-
41
- let walletClient: WalletClient<Transport, Chain, Account> | undefined;
42
- try {
43
- walletClient = connector.getWalletClient<WalletClient<Transport, Chain, Account> | undefined>(String(chainId));
44
- if (!walletClient) {
45
- throw new Error(`connector.getWalletClient(${chainId}) returned undefined`);
46
- }
47
- } catch (error) {
48
- console.error("[CryptoWalletConnectionHandler] failed to get wallet client", error);
49
- iframeClient.send("crypto:send-transaction:failed", {
50
- error: (error as Error).message,
51
- });
52
- return;
53
- }
54
-
55
- let parsedTransaction: TransactionSerializableEIP1559;
56
- try {
57
- parsedTransaction = parseTransaction(serializedTransaction as `0x${string}`) as TransactionSerializableEIP1559;
58
- } catch (error) {
59
- console.error("[CryptoWalletConnectionHandler] failed to parse transaction", error);
60
- iframeClient.send("crypto:send-transaction:failed", {
61
- error: (error as Error).message,
62
- });
63
- return;
64
- }
65
-
66
- try {
67
- const txId = await walletClient.sendTransaction(parsedTransaction);
68
- console.log("[CryptoWalletConnectionHandler] txId", txId);
69
- iframeClient.send("crypto:send-transaction:success", {
70
- txId,
71
- });
72
- } catch (error) {
73
- console.error("[CryptoWalletConnectionHandler] failed to send transaction", error);
74
- iframeClient.send("crypto:send-transaction:failed", {
75
- error: (error as Error).message,
76
- });
77
- }
78
- }
@@ -1,29 +0,0 @@
1
- import type { Wallet } from "@dynamic-labs/sdk-react-core";
2
- import type { BlockchainIncludingTestnet } from "@crossmint/common-sdk-base";
3
- import type { EmbeddedCheckoutV3IFrameEmitter } from "@crossmint/client-sdk-base";
4
-
5
- export async function handleSendTransaction(
6
- primaryWallet: Wallet,
7
- chain: BlockchainIncludingTestnet,
8
- serializedTransaction: string,
9
- iframeClient: EmbeddedCheckoutV3IFrameEmitter
10
- ) {
11
- const commonParams = {
12
- chain,
13
- serializedTransaction,
14
- iframeClient,
15
- };
16
-
17
- switch (primaryWallet.chain) {
18
- case "EVM":
19
- // @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
20
- const { handleEvmTransaction } = await import("./handleEvmTransaction");
21
- return await handleEvmTransaction({ ...commonParams, primaryWallet });
22
- case "SOL":
23
- // @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
24
- const { handleSolanaTransaction } = await import("./handleSolanaTransaction");
25
- return await handleSolanaTransaction({ ...commonParams, primaryWallet });
26
- default:
27
- throw new Error(`Connected wallet is on an unsupported chain: ${primaryWallet.chain}`);
28
- }
29
- }
@@ -1,54 +0,0 @@
1
- import type { EmbeddedCheckoutV3IFrameEmitter } from "@crossmint/client-sdk-base";
2
- import type { Wallet } from "@dynamic-labs/sdk-react-core";
3
- import type { ISolana } from "@dynamic-labs/solana";
4
- import { Transaction } from "@solana/web3.js";
5
- import base58 from "bs58";
6
-
7
- export async function handleSolanaTransaction({
8
- primaryWallet,
9
- serializedTransaction,
10
- iframeClient,
11
- }: {
12
- primaryWallet: Wallet;
13
- serializedTransaction: string;
14
- iframeClient: EmbeddedCheckoutV3IFrameEmitter;
15
- }) {
16
- // TODO: Handle switch network
17
-
18
- const { connector } = primaryWallet;
19
-
20
- let signer: ISolana;
21
- try {
22
- signer = await connector.getSigner<ISolana>();
23
- } catch (error) {
24
- console.error("[CryptoWalletConnectionHandler] failed to get signer", error);
25
- iframeClient.send("crypto:send-transaction:failed", {
26
- error: "Failed to get signer",
27
- });
28
- return;
29
- }
30
-
31
- let deserializedTransaction: Transaction;
32
- try {
33
- deserializedTransaction = Transaction.from(base58.decode(serializedTransaction));
34
- } catch (error) {
35
- console.error("[CryptoWalletConnectionHandler] failed to deserialize transaction", error);
36
- iframeClient.send("crypto:send-transaction:failed", {
37
- error: "Failed to deserialize transaction",
38
- });
39
- return;
40
- }
41
-
42
- try {
43
- const { signature: txId } = await signer.signAndSendTransaction(deserializedTransaction);
44
- console.log("[CryptoWalletConnectionHandler] txId", txId);
45
- iframeClient.send("crypto:send-transaction:success", {
46
- txId,
47
- });
48
- } catch (error) {
49
- console.error("[CryptoWalletConnectionHandler] failed to send transaction", error);
50
- iframeClient.send("crypto:send-transaction:failed", {
51
- error: (error as Error).message,
52
- });
53
- }
54
- }
@@ -1 +0,0 @@
1
- export * from "./CrossmintEmbeddedCheckoutV3";
@@ -1,188 +0,0 @@
1
- import "@testing-library/jest-dom/vitest";
2
- import { act, fireEvent, render, screen } from "@testing-library/react";
3
- import { afterEach, describe, expect, it, vi } from "vitest";
4
-
5
- import { CrossmintPayButton } from ".";
6
- import { LIB_VERSION } from "../../consts/version";
7
-
8
- // TODO(#60): create a global service for this to work everywhere and to be able to customize resolved/rejected responses
9
- const fetchReturns = Promise.resolve({
10
- json: () => Promise.resolve({}),
11
- }) as any;
12
- global.fetch = vi.fn(() => fetchReturns);
13
-
14
- // TODO(#61): make this automatically mocked in every test suite
15
- const openReturns = {} as Window;
16
- global.open = vi.fn(() => openReturns);
17
- global.console = {
18
- log: vi.fn(),
19
- error: vi.fn(),
20
- warn: vi.fn(),
21
- } as any;
22
-
23
- const defaultProps = {
24
- clientId: "a4e1bfcc-9884-11ec-b909-0242ac120002",
25
- };
26
-
27
- describe("CrossmintPayButton", () => {
28
- afterEach(() => {
29
- vi.clearAllMocks();
30
- });
31
-
32
- it("should open window with correct url", async () => {
33
- render(<CrossmintPayButton {...defaultProps} />);
34
-
35
- await act(async () => {
36
- fireEvent.click(screen.getByText("Buy with credit card"));
37
- });
38
-
39
- const urlOrigin = "https://www.crossmint.com";
40
-
41
- const mintQueryParams = new URLSearchParams({
42
- clientId: defaultProps.clientId,
43
- clientName: "client-sdk-react-ui",
44
- clientVersion: LIB_VERSION,
45
- locale: "en-US",
46
- currency: "usd",
47
- }).toString();
48
-
49
- const callbackUrl = encodeURIComponent(`${urlOrigin}/checkout/mint?${mintQueryParams}`);
50
-
51
- const signinURLParams = new URLSearchParams({
52
- locale: "en-US",
53
- currency: "usd",
54
- email: "",
55
- }).toString();
56
-
57
- const expectedURL = `${urlOrigin}/signin?${signinURLParams}&callbackUrl=${callbackUrl}`;
58
- expect(global.open).toHaveBeenCalledWith(
59
- expectedURL,
60
- "popUpWindow",
61
- "height=750,width=400,left=312,top=9,resizable=yes,scrollbars=yes,toolbar=yes,menubar=true,location=no,directories=no,status=yes"
62
- );
63
- });
64
-
65
- it("should add the `whPassThroughArgs` prop on the window url", async () => {
66
- const whPassThroughArgs = { hello: "hi" };
67
- render(<CrossmintPayButton {...defaultProps} whPassThroughArgs={whPassThroughArgs} />);
68
-
69
- await act(async () => {
70
- fireEvent.click(screen.getByText("Buy with credit card"));
71
- });
72
- expect(global.open).toHaveBeenCalledWith(
73
- expect.stringContaining("whPassThroughArgs%3D%257B%2522hello%2522%253A%2522hi%2522%257D"),
74
- expect.anything(),
75
- expect.anything()
76
- );
77
- });
78
-
79
- describe("when passing the prepay prop", () => {
80
- it("should pass the prepay query param", async () => {
81
- render(<CrossmintPayButton {...defaultProps} prepay />);
82
-
83
- await act(async () => {
84
- fireEvent.click(screen.getByText("Buy with credit card"));
85
- });
86
- expect(global.open).toHaveBeenCalledWith(
87
- expect.stringContaining("prepay%3Dtrue"),
88
- expect.anything(),
89
- expect.anything()
90
- );
91
- });
92
- });
93
-
94
- describe("when passing the prepay prop as false", () => {
95
- it("should not pass the prepay query param", async () => {
96
- render(<CrossmintPayButton {...defaultProps} prepay={false} />);
97
-
98
- await act(async () => {
99
- fireEvent.click(screen.getByText("Buy with credit card"));
100
- });
101
- expect(global.open).toHaveBeenCalledWith(
102
- expect.not.stringContaining("prepay"),
103
- expect.anything(),
104
- expect.anything()
105
- );
106
- });
107
- });
108
-
109
- describe("when passing the loginEmail prop", () => {
110
- it("should pass an email in the email query param", async () => {
111
- render(<CrossmintPayButton {...defaultProps} loginEmail="user@gmail.com" />);
112
-
113
- await act(async () => {
114
- fireEvent.click(screen.getByText("Buy with credit card"));
115
- });
116
- expect(global.open).toHaveBeenCalledWith(
117
- expect.stringContaining("email=user%40gmail.com"),
118
- expect.anything(),
119
- expect.anything()
120
- );
121
- });
122
-
123
- it("should pass the email query param empty if loginEmail is empty", async () => {
124
- render(<CrossmintPayButton {...defaultProps} loginEmail="" />);
125
-
126
- await act(async () => {
127
- fireEvent.click(screen.getByText("Buy with credit card"));
128
- });
129
- expect(global.open).toHaveBeenCalledWith(
130
- expect.stringContaining("email=&"),
131
- expect.anything(),
132
- expect.anything()
133
- );
134
- });
135
-
136
- it("should pass the email query param empty if loginEmail is not present as a param", async () => {
137
- render(<CrossmintPayButton {...defaultProps} />);
138
-
139
- await act(async () => {
140
- fireEvent.click(screen.getByText("Buy with credit card"));
141
- });
142
- expect(global.open).toHaveBeenCalledWith(
143
- expect.stringContaining("email=&"),
144
- expect.anything(),
145
- expect.anything()
146
- );
147
- });
148
- });
149
-
150
- describe("when passing collectionId instead of clientId", () => {
151
- it("should open window with correct url", async () => {
152
- render(<CrossmintPayButton collectionId={defaultProps.clientId} />);
153
-
154
- await act(async () => {
155
- fireEvent.click(screen.getByText("Buy with credit card"));
156
- });
157
-
158
- expect(global.open).toHaveBeenCalledWith(
159
- expect.stringContaining(`clientId%3D${defaultProps.clientId}`),
160
- expect.anything(),
161
- expect.anything()
162
- );
163
- });
164
- });
165
-
166
- describe("when passing projectId", () => {
167
- it("should open window with projectId included in query params", async () => {
168
- render(<CrossmintPayButton {...defaultProps} projectId="123" />);
169
-
170
- await act(async () => {
171
- fireEvent.click(screen.getByText("Buy with credit card"));
172
- });
173
-
174
- expect(global.open).toHaveBeenCalledWith(
175
- expect.stringContaining(`projectId%3D123`),
176
- expect.anything(),
177
- expect.anything()
178
- );
179
- });
180
- });
181
-
182
- describe("when passing getButtonText prop", () => {
183
- it("should show custom text", async () => {
184
- render(<CrossmintPayButton {...defaultProps} getButtonText={() => "Custom text"} />);
185
- expect(screen.getByText("Custom text")).toBeInTheDocument();
186
- });
187
- });
188
- });
@@ -1,132 +0,0 @@
1
- import { type CSSProperties, type MouseEvent, useMemo } from "react";
2
- import { useState } from "react";
3
-
4
- import {
5
- type CheckoutProps,
6
- type CrossmintPayButtonProps,
7
- clientNames,
8
- crossmintModalService,
9
- crossmintPayButtonService,
10
- } from "@crossmint/client-sdk-base";
11
-
12
- import { LIB_VERSION } from "../../consts/version";
13
- import useEnvironment from "../../hooks/useEnvironment";
14
- import { formatProps, useStyles } from "./styles";
15
-
16
- export type CrossmintPayButtonReactProps = CrossmintPayButtonProps & {
17
- onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
18
- style?: CSSProperties;
19
- };
20
-
21
- export function CrossmintPayButton(buttonProps: CrossmintPayButtonReactProps) {
22
- const {
23
- className,
24
- disabled,
25
- onClick,
26
- style,
27
- tabIndex,
28
- theme = "dark",
29
- mintTo,
30
- emailTo,
31
- listingId,
32
- auctionId,
33
- showOverlay = true,
34
- mintConfig,
35
- whPassThroughArgs,
36
- environment,
37
- paymentMethod,
38
- preferredSigninMethod,
39
- dismissOverlayOnClick,
40
- prepay,
41
- locale = "en-US",
42
- currency = "usd",
43
- successCallbackURL = "",
44
- failureCallbackURL = "",
45
- loginEmail = "",
46
- projectId,
47
- getButtonText,
48
- checkoutProps = {
49
- experimental: false,
50
- display: "same-tab",
51
- paymentMethods: ["fiat", "ETH", "SOL"],
52
- } as CheckoutProps,
53
- ...props
54
- } = buttonProps;
55
-
56
- const collectionId = "clientId" in props ? props.clientId : props.collectionId;
57
-
58
- const [connecting, setConnecting] = useState(false);
59
- const { isServerSideRendering } = useEnvironment();
60
-
61
- const { connect } = crossmintModalService({
62
- clientId: collectionId,
63
- projectId,
64
- showOverlay,
65
- dismissOverlayOnClick,
66
- setConnecting,
67
- libVersion: LIB_VERSION,
68
- environment,
69
- clientName: clientNames.reactUi,
70
- locale,
71
- currency,
72
- successCallbackURL,
73
- failureCallbackURL,
74
- loginEmail,
75
- });
76
-
77
- const { getButtonText: getButtonTextInternal, handleClick } = crossmintPayButtonService({
78
- onClick,
79
- connecting,
80
- paymentMethod,
81
- locale,
82
- checkoutProps,
83
- });
84
-
85
- const _handleClick = (event: MouseEvent<HTMLButtonElement>) =>
86
- handleClick(event, () => {
87
- connect(
88
- mintConfig,
89
- mintTo,
90
- emailTo,
91
- listingId,
92
- whPassThroughArgs,
93
- paymentMethod,
94
- preferredSigninMethod,
95
- prepay,
96
- checkoutProps
97
- );
98
- });
99
-
100
- const classes = useStyles(formatProps(theme));
101
-
102
- const content = useMemo(() => {
103
- return (
104
- <span className={classes.crossmintParagraph} role="button-paragraph">
105
- {getButtonText != null
106
- ? getButtonText(connecting, paymentMethod || "fiat")
107
- : getButtonTextInternal(connecting)}
108
- </span>
109
- );
110
- }, [connecting, getButtonText, paymentMethod]);
111
-
112
- return (
113
- <>
114
- {!isServerSideRendering && (
115
- <button
116
- className={`${classes.crossmintButton} ${className || ""}`}
117
- disabled={disabled}
118
- onClick={_handleClick}
119
- style={{ ...style }}
120
- tabIndex={tabIndex}
121
- >
122
- <img
123
- className={classes.crossmintImg}
124
- src="https://www.crossmint.io/assets/crossmint/logo.svg"
125
- alt="Crossmint logo"
126
- />
127
- {content}
128
- </button>
129
- )}
130
- </>
131
- );
132
- }
@@ -1 +0,0 @@
1
- export * from "./CrossmintPayButton";
@@ -1,58 +0,0 @@
1
- import { type Styles, createUseStyles } from "react-jss";
2
-
3
- const DARK_BG = "#1e1e1e";
4
-
5
- const themeIsLight = (theme: string) => theme === "light";
6
-
7
- export const formatProps = (theme: string): CustomStylingProps => ({
8
- buttonBgColor: themeIsLight(theme) ? "white" : DARK_BG,
9
- paragraphColor: themeIsLight(theme) ? "black" : "white",
10
- });
11
-
12
- export type Classes<Name extends string | number | symbol = string> = Record<Name, string>;
13
- interface CustomStylingProps {
14
- buttonBgColor?: string;
15
- paragraphColor?: string;
16
- }
17
-
18
- const styles: Styles<"crossmintButton" | "crossmintImg" | "crossmintParagraph" | "@global", CustomStylingProps> = {
19
- "@global": {
20
- "@import":
21
- "url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap')",
22
- },
23
- crossmintButton: {
24
- display: "flex",
25
- "flex-direction": "row",
26
- "align-items": "center",
27
- padding: "0.875rem 0.875rem",
28
- "font-weight": "900",
29
- transition: "opacity ease-in-out 0.25s",
30
- "border-radius": "0.5rem",
31
- "font-family": `"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif`,
32
- outline: "none",
33
- border: "none",
34
- "box-shadow": "0px 8px 15px rgba(0, 0, 0, 0.1)",
35
- "justify-content": "center",
36
- background: ({ buttonBgColor }: CustomStylingProps) => buttonBgColor,
37
-
38
- "&:hover:enabled": {
39
- opacity: "0.6",
40
- cursor: "pointer",
41
- },
42
- },
43
- crossmintImg: {
44
- width: "21px",
45
- height: "21px",
46
- "margin-right": "0.875rem",
47
- },
48
- crossmintParagraph: {
49
- color: ({ paragraphColor }: CustomStylingProps) => paragraphColor,
50
- margin: "0",
51
- },
52
- };
53
-
54
- export const useStyles: (
55
- data?: CustomStylingProps & {
56
- theme?: any;
57
- }
58
- ) => Classes<"crossmintButton" | "crossmintImg" | "crossmintParagraph" | "@global"> = createUseStyles(styles);