@crossmint/client-sdk-react-native-ui 0.13.27 → 0.13.29

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 (297) hide show
  1. package/dist/chunk-24MMQ2R4.js +15 -0
  2. package/dist/chunk-24MMQ2R4.js.map +1 -0
  3. package/dist/chunk-2DNOAXOE.mjs +8 -0
  4. package/dist/chunk-2DNOAXOE.mjs.map +1 -0
  5. package/dist/chunk-2TEAOLM6.mjs +149 -0
  6. package/dist/chunk-2TEAOLM6.mjs.map +1 -0
  7. package/dist/chunk-34OVOZB2.mjs +111 -0
  8. package/dist/chunk-34OVOZB2.mjs.map +1 -0
  9. package/dist/chunk-3AWDWMZ2.mjs +18 -0
  10. package/dist/chunk-3AWDWMZ2.mjs.map +1 -0
  11. package/dist/chunk-3PJ6FXFT.mjs +1 -0
  12. package/dist/chunk-3PJ6FXFT.mjs.map +1 -0
  13. package/dist/chunk-3SFSPJXM.mjs +55 -0
  14. package/dist/chunk-3SFSPJXM.mjs.map +1 -0
  15. package/dist/chunk-4AJTICKY.mjs +44 -0
  16. package/dist/chunk-4AJTICKY.mjs.map +1 -0
  17. package/dist/chunk-4HKXTAVR.js +14 -0
  18. package/dist/chunk-4HKXTAVR.js.map +1 -0
  19. package/dist/chunk-4V7NDO5X.mjs +157 -0
  20. package/dist/chunk-4V7NDO5X.mjs.map +1 -0
  21. package/dist/chunk-4WJIXD7U.mjs +14 -0
  22. package/dist/chunk-4WJIXD7U.mjs.map +1 -0
  23. package/dist/chunk-5V6ONJWT.mjs +61 -0
  24. package/dist/chunk-5V6ONJWT.mjs.map +1 -0
  25. package/dist/chunk-5ZBDQUNG.js +1 -0
  26. package/dist/chunk-5ZBDQUNG.js.map +1 -0
  27. package/dist/chunk-6S5SEVGS.js +17 -0
  28. package/dist/chunk-6S5SEVGS.js.map +1 -0
  29. package/dist/chunk-6Z74KC25.mjs +1 -0
  30. package/dist/chunk-6Z74KC25.mjs.map +1 -0
  31. package/dist/chunk-7SPIOD4K.mjs +66 -0
  32. package/dist/chunk-7SPIOD4K.mjs.map +1 -0
  33. package/dist/chunk-ALMDA3KN.mjs +199 -0
  34. package/dist/chunk-ALMDA3KN.mjs.map +1 -0
  35. package/dist/chunk-BE4HT2U7.mjs +1 -0
  36. package/dist/chunk-BE4HT2U7.mjs.map +1 -0
  37. package/dist/chunk-BTH5QRIT.js +149 -0
  38. package/dist/chunk-BTH5QRIT.js.map +1 -0
  39. package/dist/chunk-BUB4U2GE.js +44 -0
  40. package/dist/chunk-BUB4U2GE.js.map +1 -0
  41. package/dist/chunk-BUTZZ7JB.js +36 -0
  42. package/dist/chunk-BUTZZ7JB.js.map +1 -0
  43. package/dist/chunk-CFHHVHNZ.mjs +157 -0
  44. package/dist/chunk-CFHHVHNZ.mjs.map +1 -0
  45. package/dist/chunk-CV6RWU2T.js +50 -0
  46. package/dist/chunk-CV6RWU2T.js.map +1 -0
  47. package/dist/chunk-DD2MVD6A.mjs +36 -0
  48. package/dist/chunk-DD2MVD6A.mjs.map +1 -0
  49. package/dist/chunk-EKXEDMRD.mjs +71 -0
  50. package/dist/chunk-EKXEDMRD.mjs.map +1 -0
  51. package/dist/chunk-FCDPEDXH.mjs +148 -0
  52. package/dist/chunk-FCDPEDXH.mjs.map +1 -0
  53. package/dist/chunk-FQID5LOL.js +22 -0
  54. package/dist/chunk-FQID5LOL.js.map +1 -0
  55. package/dist/chunk-FRD6HEIM.mjs +22 -0
  56. package/dist/chunk-FRD6HEIM.mjs.map +1 -0
  57. package/dist/chunk-GYBEEYGB.mjs +1 -0
  58. package/dist/chunk-GYBEEYGB.mjs.map +1 -0
  59. package/dist/chunk-HELXBZ7D.js +18 -0
  60. package/dist/chunk-HELXBZ7D.js.map +1 -0
  61. package/dist/chunk-IBQK5B7B.js +71 -0
  62. package/dist/chunk-IBQK5B7B.js.map +1 -0
  63. package/dist/chunk-IHZNXV5S.js +1 -0
  64. package/dist/chunk-IHZNXV5S.js.map +1 -0
  65. package/dist/chunk-IMME6ZBV.js +61 -0
  66. package/dist/chunk-IMME6ZBV.js.map +1 -0
  67. package/dist/chunk-J2MDWDV6.mjs +1 -0
  68. package/dist/chunk-J2MDWDV6.mjs.map +1 -0
  69. package/dist/chunk-KK4SQ7WF.js +1 -0
  70. package/dist/chunk-KK4SQ7WF.js.map +1 -0
  71. package/dist/chunk-KOUCOMBE.js +148 -0
  72. package/dist/chunk-KOUCOMBE.js.map +1 -0
  73. package/dist/chunk-MMVER6VO.js +1 -0
  74. package/dist/chunk-MMVER6VO.js.map +1 -0
  75. package/dist/chunk-MVLQR6RI.js +199 -0
  76. package/dist/chunk-MVLQR6RI.js.map +1 -0
  77. package/dist/chunk-NBWATZY4.js +157 -0
  78. package/dist/chunk-NBWATZY4.js.map +1 -0
  79. package/dist/chunk-OTRMAWWU.js +55 -0
  80. package/dist/chunk-OTRMAWWU.js.map +1 -0
  81. package/dist/chunk-P35PHJU5.mjs +17 -0
  82. package/dist/chunk-P35PHJU5.mjs.map +1 -0
  83. package/dist/chunk-PUTC7LI4.mjs +348 -0
  84. package/dist/chunk-PUTC7LI4.mjs.map +1 -0
  85. package/dist/chunk-Q2Y5CZT4.js +157 -0
  86. package/dist/chunk-Q2Y5CZT4.js.map +1 -0
  87. package/dist/chunk-Q7YPX4RJ.js +66 -0
  88. package/dist/chunk-Q7YPX4RJ.js.map +1 -0
  89. package/dist/chunk-R47XMJ32.js +1 -0
  90. package/dist/chunk-R47XMJ32.js.map +1 -0
  91. package/dist/chunk-RSCBYS6I.mjs +15 -0
  92. package/dist/chunk-RSCBYS6I.mjs.map +1 -0
  93. package/dist/chunk-RTLOANMR.mjs +50 -0
  94. package/dist/chunk-RTLOANMR.mjs.map +1 -0
  95. package/dist/chunk-S3OC5AT3.mjs +24 -0
  96. package/dist/chunk-S3OC5AT3.mjs.map +1 -0
  97. package/dist/chunk-SHSENRY7.js +24 -0
  98. package/dist/chunk-SHSENRY7.js.map +1 -0
  99. package/dist/chunk-TNPZITVL.mjs +1 -0
  100. package/dist/chunk-TNPZITVL.mjs.map +1 -0
  101. package/dist/chunk-UNIFCVYR.js +348 -0
  102. package/dist/chunk-UNIFCVYR.js.map +1 -0
  103. package/dist/chunk-VCF2YXCO.js +208 -0
  104. package/dist/chunk-VCF2YXCO.js.map +1 -0
  105. package/dist/chunk-XNVZRSGL.js +111 -0
  106. package/dist/chunk-XNVZRSGL.js.map +1 -0
  107. package/dist/chunk-XUGJXLWC.js +8 -0
  108. package/dist/chunk-XUGJXLWC.js.map +1 -0
  109. package/dist/chunk-XXJ7LQ44.js +1 -0
  110. package/dist/chunk-XXJ7LQ44.js.map +1 -0
  111. package/dist/chunk-Z7Y7COJM.mjs +208 -0
  112. package/dist/chunk-Z7Y7COJM.mjs.map +1 -0
  113. package/dist/components/embed/index.js +16 -1
  114. package/dist/components/embed/index.js.map +1 -0
  115. package/dist/components/embed/index.mjs +16 -1
  116. package/dist/components/embed/index.mjs.map +1 -0
  117. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +14 -1
  118. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js.map +1 -0
  119. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.mjs +14 -1
  120. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.mjs.map +1 -0
  121. package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.js +13 -1
  122. package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.js.map +1 -0
  123. package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.mjs +13 -1
  124. package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.mjs.map +1 -0
  125. package/dist/components/embed/v3/crypto/PayerConnectionHandler.js +8 -1
  126. package/dist/components/embed/v3/crypto/PayerConnectionHandler.js.map +1 -0
  127. package/dist/components/embed/v3/crypto/PayerConnectionHandler.mjs +8 -1
  128. package/dist/components/embed/v3/crypto/PayerConnectionHandler.mjs.map +1 -0
  129. package/dist/components/embed/v3/index.js +15 -1
  130. package/dist/components/embed/v3/index.js.map +1 -0
  131. package/dist/components/embed/v3/index.mjs +15 -1
  132. package/dist/components/embed/v3/index.mjs.map +1 -0
  133. package/dist/components/index.js +34 -1
  134. package/dist/components/index.js.map +1 -0
  135. package/dist/components/index.mjs +34 -1
  136. package/dist/components/index.mjs.map +1 -0
  137. package/dist/components/signers/BaseCodeInput.js +9 -1
  138. package/dist/components/signers/BaseCodeInput.js.map +1 -0
  139. package/dist/components/signers/BaseCodeInput.mjs +9 -1
  140. package/dist/components/signers/BaseCodeInput.mjs.map +1 -0
  141. package/dist/components/signers/BaseConfirmation.js +9 -1
  142. package/dist/components/signers/BaseConfirmation.js.map +1 -0
  143. package/dist/components/signers/BaseConfirmation.mjs +9 -1
  144. package/dist/components/signers/BaseConfirmation.mjs.map +1 -0
  145. package/dist/components/signers/EmailSignersDialog.js +11 -1
  146. package/dist/components/signers/EmailSignersDialog.js.map +1 -0
  147. package/dist/components/signers/EmailSignersDialog.mjs +11 -1
  148. package/dist/components/signers/EmailSignersDialog.mjs.map +1 -0
  149. package/dist/components/signers/PhoneSignersDialog.js +11 -1
  150. package/dist/components/signers/PhoneSignersDialog.js.map +1 -0
  151. package/dist/components/signers/PhoneSignersDialog.mjs +11 -1
  152. package/dist/components/signers/PhoneSignersDialog.mjs.map +1 -0
  153. package/dist/components/signers/index.js +16 -1
  154. package/dist/components/signers/index.js.map +1 -0
  155. package/dist/components/signers/index.mjs +16 -1
  156. package/dist/components/signers/index.mjs.map +1 -0
  157. package/dist/components/wallets/ExportPrivateKeyButton.js +8 -1
  158. package/dist/components/wallets/ExportPrivateKeyButton.js.map +1 -0
  159. package/dist/components/wallets/ExportPrivateKeyButton.mjs +8 -1
  160. package/dist/components/wallets/ExportPrivateKeyButton.mjs.map +1 -0
  161. package/dist/components/wallets/index.js +9 -1
  162. package/dist/components/wallets/index.js.map +1 -0
  163. package/dist/components/wallets/index.mjs +9 -1
  164. package/dist/components/wallets/index.mjs.map +1 -0
  165. package/dist/hooks/index.js +26 -1
  166. package/dist/hooks/index.js.map +1 -0
  167. package/dist/hooks/index.mjs +26 -1
  168. package/dist/hooks/index.mjs.map +1 -0
  169. package/dist/hooks/useAuth.js +14 -1
  170. package/dist/hooks/useAuth.js.map +1 -0
  171. package/dist/hooks/useAuth.mjs +14 -1
  172. package/dist/hooks/useAuth.mjs.map +1 -0
  173. package/dist/hooks/useCrossmintCheckout.js +11 -1
  174. package/dist/hooks/useCrossmintCheckout.js.map +1 -0
  175. package/dist/hooks/useCrossmintCheckout.mjs +11 -1
  176. package/dist/hooks/useCrossmintCheckout.mjs.map +1 -0
  177. package/dist/hooks/useWalletEmailSigner.js +8 -1
  178. package/dist/hooks/useWalletEmailSigner.js.map +1 -0
  179. package/dist/hooks/useWalletEmailSigner.mjs +8 -1
  180. package/dist/hooks/useWalletEmailSigner.mjs.map +1 -0
  181. package/dist/index.js +79 -1
  182. package/dist/index.js.map +1 -0
  183. package/dist/index.mjs +79 -1
  184. package/dist/index.mjs.map +1 -0
  185. package/dist/logger/init.js +9 -1
  186. package/dist/logger/init.js.map +1 -0
  187. package/dist/logger/init.mjs +9 -1
  188. package/dist/logger/init.mjs.map +1 -0
  189. package/dist/plugin/mods/addQueryToAndroidManifest.js +8 -1
  190. package/dist/plugin/mods/addQueryToAndroidManifest.js.map +1 -0
  191. package/dist/plugin/mods/addQueryToAndroidManifest.mjs +8 -1
  192. package/dist/plugin/mods/addQueryToAndroidManifest.mjs.map +1 -0
  193. package/dist/plugin/withGooglePay.js +57 -1
  194. package/dist/plugin/withGooglePay.js.map +1 -0
  195. package/dist/plugin/withGooglePay.mjs +57 -1
  196. package/dist/plugin/withGooglePay.mjs.map +1 -0
  197. package/dist/providers/CrossmintAuthProvider.js +14 -1
  198. package/dist/providers/CrossmintAuthProvider.js.map +1 -0
  199. package/dist/providers/CrossmintAuthProvider.mjs +14 -1
  200. package/dist/providers/CrossmintAuthProvider.mjs.map +1 -0
  201. package/dist/providers/CrossmintProvider.js +12 -1
  202. package/dist/providers/CrossmintProvider.js.map +1 -0
  203. package/dist/providers/CrossmintProvider.mjs +12 -1
  204. package/dist/providers/CrossmintProvider.mjs.map +1 -0
  205. package/dist/providers/CrossmintWalletProvider.js +16 -1
  206. package/dist/providers/CrossmintWalletProvider.js.map +1 -0
  207. package/dist/providers/CrossmintWalletProvider.mjs +16 -1
  208. package/dist/providers/CrossmintWalletProvider.mjs.map +1 -0
  209. package/dist/providers/index.js +28 -1
  210. package/dist/providers/index.js.map +1 -0
  211. package/dist/providers/index.mjs +28 -1
  212. package/dist/providers/index.mjs.map +1 -0
  213. package/dist/styles/index.js +8 -1
  214. package/dist/styles/index.js.map +1 -0
  215. package/dist/styles/index.mjs +8 -1
  216. package/dist/styles/index.mjs.map +1 -0
  217. package/dist/styles/theme.js +8 -1
  218. package/dist/styles/theme.js.map +1 -0
  219. package/dist/styles/theme.mjs +8 -1
  220. package/dist/styles/theme.mjs.map +1 -0
  221. package/dist/types/auth.js +1 -1
  222. package/dist/types/auth.js.map +1 -0
  223. package/dist/types/auth.mjs +1 -0
  224. package/dist/types/auth.mjs.map +1 -0
  225. package/dist/utils/SecureStorage.js +8 -1
  226. package/dist/utils/SecureStorage.js.map +1 -0
  227. package/dist/utils/SecureStorage.mjs +8 -1
  228. package/dist/utils/SecureStorage.mjs.map +1 -0
  229. package/dist/utils/createCrossmintApiClient.js +9 -1
  230. package/dist/utils/createCrossmintApiClient.js.map +1 -0
  231. package/dist/utils/createCrossmintApiClient.mjs +9 -1
  232. package/dist/utils/createCrossmintApiClient.mjs.map +1 -0
  233. package/dist/utils/embed/userAgent.js +12 -1
  234. package/dist/utils/embed/userAgent.js.map +1 -0
  235. package/dist/utils/embed/userAgent.mjs +12 -1
  236. package/dist/utils/embed/userAgent.mjs.map +1 -0
  237. package/dist/utils/eventEmitter.js +8 -1
  238. package/dist/utils/eventEmitter.js.map +1 -0
  239. package/dist/utils/eventEmitter.mjs +8 -1
  240. package/dist/utils/eventEmitter.mjs.map +1 -0
  241. package/package.json +54 -58
  242. package/dist/chunk-26ALKCF5.js +0 -1
  243. package/dist/chunk-2D2RJCVX.js +0 -1
  244. package/dist/chunk-2PX34LDU.js +0 -1
  245. package/dist/chunk-3HU2PILN.js +0 -1
  246. package/dist/chunk-3QSVHCEH.mjs +0 -2
  247. package/dist/chunk-3RE54L4I.js +0 -1
  248. package/dist/chunk-5CLFJLE4.mjs +0 -0
  249. package/dist/chunk-5ZNJIO4M.js +0 -1
  250. package/dist/chunk-72MMCJ2E.js +0 -1
  251. package/dist/chunk-77GXCNDP.js +0 -1
  252. package/dist/chunk-7USVT6EZ.mjs +0 -1
  253. package/dist/chunk-7YKYLQL6.mjs +0 -1
  254. package/dist/chunk-AJMHVVST.js +0 -1
  255. package/dist/chunk-ASFGJDGB.mjs +0 -1
  256. package/dist/chunk-AV236X3H.mjs +0 -1
  257. package/dist/chunk-C62HRWJA.js +0 -1
  258. package/dist/chunk-D4347S2W.mjs +0 -1
  259. package/dist/chunk-D5QADN6Z.mjs +0 -1
  260. package/dist/chunk-DC5HCBPK.js +0 -1
  261. package/dist/chunk-DKQZSNOO.js +0 -1
  262. package/dist/chunk-EF2YTIUF.mjs +0 -1
  263. package/dist/chunk-EF5KYLDO.js +0 -1
  264. package/dist/chunk-EI5LOD4Y.js +0 -1
  265. package/dist/chunk-EJO7BAXE.js +0 -1
  266. package/dist/chunk-F7VXWATP.js +0 -1
  267. package/dist/chunk-FEGPD4LZ.mjs +0 -1
  268. package/dist/chunk-FFQ6EQCL.mjs +0 -1
  269. package/dist/chunk-FX23A4BR.mjs +0 -1
  270. package/dist/chunk-I3QSTPTV.mjs +0 -0
  271. package/dist/chunk-I4D3YJW2.js +0 -1
  272. package/dist/chunk-IDJHXN7Q.js +0 -1
  273. package/dist/chunk-IUDQDPIN.mjs +0 -1
  274. package/dist/chunk-J2XU2BUG.mjs +0 -1
  275. package/dist/chunk-J42HASCI.js +0 -1
  276. package/dist/chunk-J477SX6P.mjs +0 -1
  277. package/dist/chunk-J7Q2R6UH.mjs +0 -0
  278. package/dist/chunk-LK3AO6AY.mjs +0 -1
  279. package/dist/chunk-LOFHVHXQ.js +0 -1
  280. package/dist/chunk-MB7H3PBJ.mjs +0 -0
  281. package/dist/chunk-MKCQJOIO.js +0 -1
  282. package/dist/chunk-MVVSGLQL.js +0 -2
  283. package/dist/chunk-PCJMDUSI.mjs +0 -1
  284. package/dist/chunk-PSSAAY7D.mjs +0 -1
  285. package/dist/chunk-RQ5I5OCQ.mjs +0 -1
  286. package/dist/chunk-SHTETN4C.js +0 -1
  287. package/dist/chunk-TCTH7JIY.js +0 -1
  288. package/dist/chunk-TIQGKXQA.mjs +0 -0
  289. package/dist/chunk-TYFMPXM4.mjs +0 -1
  290. package/dist/chunk-UA34B5QB.js +0 -1
  291. package/dist/chunk-UBHIBMTA.mjs +0 -0
  292. package/dist/chunk-VACQTZRT.js +0 -1
  293. package/dist/chunk-XNDIT72O.mjs +0 -2
  294. package/dist/chunk-YJORUMPB.js +0 -2
  295. package/dist/chunk-YLJDAK2S.mjs +0 -1
  296. package/dist/chunk-YQEWHOQ7.js +0 -1
  297. package/dist/chunk-ZCKUSOGC.mjs +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/signers/PhoneSignersDialog.tsx"],"sourcesContent":["import type { MutableRefObject } from \"react\";\nimport { View, StyleSheet, Dimensions, Modal, TouchableOpacity, Text } from \"react-native\";\nimport type { UIConfig } from \"@crossmint/common-sdk-base\";\nimport { PhoneIcon, Smartphone, X } from \"lucide-react-native\";\nimport { BaseConfirmation } from \"./BaseConfirmation\";\nimport { BaseCodeInput } from \"./BaseCodeInput\";\nimport { theme } from \"../../styles/theme\";\n\ninterface PhoneSignersDialogProps {\n phone?: string;\n open: boolean;\n setOpen: (open: boolean) => void;\n step: \"initial\" | \"otp\";\n onSubmitOTP: (token: string) => Promise<void>;\n onResendOTPCode: () => Promise<void>;\n onSubmitPhone: () => Promise<void>;\n rejectRef: MutableRefObject<((error: Error) => void) | undefined>;\n appearance?: UIConfig;\n}\n\nconst { width: screenWidth } = Dimensions.get(\"window\");\n\nexport function PhoneSignersDialog({\n phone,\n open,\n setOpen,\n step,\n onSubmitOTP,\n onResendOTPCode,\n onSubmitPhone,\n rejectRef,\n appearance,\n}: PhoneSignersDialogProps) {\n function handleOnCancel() {\n if (open) {\n rejectRef.current?.(new Error(\"User cancelled\"));\n setOpen(false);\n }\n }\n\n const dynamicStyles = StyleSheet.create({\n modalOverlay: {\n flex: 1,\n backgroundColor: \"rgba(0, 0, 0, 0.5)\",\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 16,\n },\n modalContainer: {\n backgroundColor: appearance?.colors?.background || theme[\"cm-background-primary\"],\n borderRadius: appearance?.borderRadius || 12,\n padding: 32,\n width: Math.min(screenWidth - 32, 400),\n maxHeight: \"80%\",\n position: \"relative\",\n alignItems: \"center\",\n shadowColor: \"#000\",\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.25,\n shadowRadius: 4,\n elevation: 5,\n },\n closeButton: {\n position: \"absolute\",\n top: 16,\n right: 16,\n width: 32,\n height: 32,\n borderRadius: 6,\n backgroundColor: appearance?.colors?.inputBackground || theme[\"cm-muted-primary\"],\n alignItems: \"center\",\n justifyContent: \"center\",\n zIndex: 1,\n },\n });\n\n if (!open) {\n return null;\n }\n\n return (\n <Modal\n visible={open}\n transparent={true}\n animationType=\"fade\"\n onRequestClose={handleOnCancel}\n statusBarTranslucent={true}\n >\n <View style={dynamicStyles.modalOverlay}>\n <View style={dynamicStyles.modalContainer}>\n <TouchableOpacity\n style={dynamicStyles.closeButton}\n onPress={handleOnCancel}\n hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}\n >\n <X size={16} color={appearance?.colors?.textSecondary || theme[\"cm-text-secondary\"]} />\n </TouchableOpacity>\n\n {step === \"initial\" ? (\n <BaseConfirmation\n contactInfo={phone ?? \"\"}\n contactType=\"phone\"\n icon={\n <PhoneIcon\n size={22}\n color={appearance?.colors?.textPrimary || theme[\"cm-text-primary\"]}\n />\n }\n onConfirm={onSubmitPhone}\n onCancel={handleOnCancel}\n appearance={appearance}\n />\n ) : (\n <BaseCodeInput\n contactInfo={phone ?? \"\"}\n contactType=\"phone\"\n icon={\n <View\n style={{\n backgroundColor: appearance?.colors?.accent || theme[\"cm-accent\"],\n borderRadius: 999,\n padding: 12,\n }}\n >\n <Smartphone\n size={22}\n color={appearance?.colors?.background || theme[\"cm-background-primary\"]}\n />\n </View>\n }\n title=\"Check your phone\"\n description={\n <Text>\n A temporary login code has been sent via SMS to{\" \"}\n <Text style={{ fontWeight: \"bold\" }}>{phone}</Text>\n </Text>\n }\n helpText={`Can't receive the SMS? Check your phone number.\\nSome messages may take several minutes to arrive.`}\n onSubmitOTP={onSubmitOTP}\n onResendCode={onResendOTPCode}\n appearance={appearance}\n otpLength={10}\n keyboardType=\"number-pad\"\n autoComplete=\"sms-otp\"\n textContentType=\"oneTimeCode\"\n />\n )}\n </View>\n </View>\n </Modal>\n );\n}\n"],"mappings":";;;;;;;;;;;AACA,SAAS,MAAM,YAAY,YAAY,OAAO,kBAAkB,YAAY;AAE5E,SAAS,WAAW,YAAY,SAAS;AA+FjB,cAqCQ,YArCR;AA9ExB,IAAM,EAAE,OAAO,YAAY,IAAI,WAAW,IAAI,QAAQ;AAE/C,SAAS,mBAAmB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,GAA4B;AAhC5B;AAiCI,WAAS,iBAAiB;AAjC9B,QAAAA;AAkCQ,QAAI,MAAM;AACN,OAAAA,MAAA,UAAU,YAAV,gBAAAA,IAAA,gBAAoB,IAAI,MAAM,gBAAgB;AAC9C,cAAQ,KAAK;AAAA,IACjB;AAAA,EACJ;AAEA,QAAM,gBAAgB,WAAW,OAAO;AAAA,IACpC,cAAc;AAAA,MACV,MAAM;AAAA,MACN,iBAAiB;AAAA,M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AAC;AAAA;AAAA,YACG,aAAa,wBAAS;AAAA,YACtB,aAAY;AAAA,YACZ,MACI;AAAA,cAAC;AAAA;AAAA,gBACG,MAAM;AAAA,gBACN,SAAO,8CAAY,WAAZ,mBAAoB,gBAAe,MAAM,iBAAiB;AAAA;AAAA,YACrE;AAAA,YAEJ,WAAW;AAAA,YACX,UAAU;AAAA,YACV;AAAA;AAAA,QACJ,IAEA;AAAA,UAAC;AAAA;AAAA,YACG,aAAa,wBAAS;AAAA,YACtB,aAAY;AAAA,YACZ,MACI;AAAA,cAAC;AAAA;AAAA,gBACG,OAAO;AAAA,kBACH,mBAAiB,8CAAY,WAAZ,mBAAoB,WAAU,MAAM,WAAW;AAAA,kBAChE,cAAc;AAAA,kBACd,SAAS;AAAA,gBACb;AAAA,gBAEA;AAAA,kBAAC;AAAA;AAAA,oBACG,MAAM;AAAA,oBACN,SAAO,8CAAY,WAAZ,mBAAoB,eAAc,MAAM,uBAAuB;AAAA;AAAA,gBAC1E;AAAA;AAAA,YACJ;AAAA,YAEJ,OAAM;AAAA,YACN,aACI,qBAAC,QAAK;AAAA;AAAA,cAC8C;AAAA,cAChD,oBAAC,QAAK,OAAO,EAAE,YAAY,OAAO,GAAI,iBAAM;AAAA,eAChD;AAAA,YAEJ,UAAU;AAAA;AAAA,YACV;AAAA,YACA,cAAc;AAAA,YACd;AAAA,YACA,WAAW;AAAA,YACX,cAAa;AAAA,YACb,cAAa;AAAA,YACb,iBAAgB;AAAA;AAAA,QACpB;AAAA,SAER,GACJ;AAAA;AAAA,EACJ;AAER;","names":["_a"]}
@@ -0,0 +1,14 @@
1
+ // src/plugin/mods/addQueryToAndroidManifest.ts
2
+ function addQueryToAndroidManifest(androidManifest, query) {
3
+ const manifest = androidManifest.manifest;
4
+ if (!manifest.queries) {
5
+ manifest.queries = [];
6
+ }
7
+ manifest.queries.push(query);
8
+ return androidManifest;
9
+ }
10
+
11
+ export {
12
+ addQueryToAndroidManifest
13
+ };
14
+ //# sourceMappingURL=chunk-4WJIXD7U.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/plugin/mods/addQueryToAndroidManifest.ts"],"sourcesContent":["import type { AndroidManifest, ManifestQuery } from \"@expo/config-plugins/build/android/Manifest\";\n\nexport function addQueryToAndroidManifest(androidManifest: AndroidManifest, query: ManifestQuery): AndroidManifest {\n const manifest = androidManifest.manifest;\n\n if (!manifest.queries) {\n manifest.queries = [];\n }\n\n manifest.queries.push(query);\n\n return androidManifest;\n}\n"],"mappings":";AAEO,SAAS,0BAA0B,iBAAkC,OAAuC;AAC/G,QAAM,WAAW,gBAAgB;AAEjC,MAAI,CAAC,SAAS,SAAS;AACnB,aAAS,UAAU,CAAC;AAAA,EACxB;AAEA,WAAS,QAAQ,KAAK,KAAK;AAE3B,SAAO;AACX;","names":[]}
@@ -0,0 +1,61 @@
1
+ // package.json
2
+ var package_default = {
3
+ name: "@crossmint/client-sdk-react-native-ui",
4
+ version: "0.13.28",
5
+ repository: "https://github.com/Crossmint/crossmint-sdk",
6
+ license: "Apache-2.0",
7
+ author: "Paella Labs Inc",
8
+ sideEffects: false,
9
+ main: "./dist/index.js",
10
+ module: "./dist/index.mjs",
11
+ types: "./dist/index.d.ts",
12
+ files: ["dist", "app.plugin.js", "LICENSE"],
13
+ scripts: {
14
+ build: "cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup",
15
+ dev: "cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch",
16
+ "generate:docs": "typedoc && node scripts/generate-reference.mjs"
17
+ },
18
+ dependencies: {
19
+ "@crossmint/client-sdk-auth": "workspace:*",
20
+ "@crossmint/client-sdk-base": "workspace:*",
21
+ "@crossmint/client-sdk-react-base": "workspace:*",
22
+ "@crossmint/client-sdk-rn-window": "workspace:*",
23
+ "@crossmint/client-signers": "workspace:*",
24
+ "@crossmint/common-sdk-auth": "workspace:*",
25
+ "@crossmint/common-sdk-base": "workspace:*",
26
+ "@crossmint/wallets-sdk": "workspace:*",
27
+ "@solana/web3.js": "1.98.1",
28
+ bs58: "^5.0.0",
29
+ "lodash.clonedeep": "4.5.0",
30
+ "lodash.isequal": "4.5.0",
31
+ "lucide-react-native": "0.548.0",
32
+ mitt: "3.0.1",
33
+ "react-native-svg": "15.14.0",
34
+ zod: "3.22.4"
35
+ },
36
+ devDependencies: {
37
+ "@expo/config-plugins": "^9.0.17",
38
+ typedoc: "0.28.16",
39
+ "@types/react": "19.1.10",
40
+ "expo-constants": "~18.0.9",
41
+ "expo-device": "~8.0.9",
42
+ "expo-secure-store": "~15.0.7",
43
+ "expo-web-browser": "~15.0.8"
44
+ },
45
+ peerDependencies: {
46
+ "@expo/config-plugins": ">=9.0.0",
47
+ "@solana/web3.js": "^1.98.1",
48
+ "expo-constants": ">=17 <19",
49
+ "expo-device": ">=7 <9",
50
+ "expo-secure-store": ">=14 <16",
51
+ "expo-web-browser": ">=14 <16",
52
+ react: ">=17.0.2",
53
+ "react-native": ">=0.74.3",
54
+ "react-native-webview": ">=13.15.0 <14"
55
+ }
56
+ };
57
+
58
+ export {
59
+ package_default
60
+ };
61
+ //# sourceMappingURL=chunk-5V6ONJWT.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@crossmint/client-sdk-react-native-ui\",\n \"version\": \"0.13.28\",\n \"repository\": \"https://github.com/Crossmint/crossmint-sdk\",\n \"license\": \"Apache-2.0\",\n \"author\": \"Paella Labs Inc\",\n \"sideEffects\": false,\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\"dist\", \"app.plugin.js\", \"LICENSE\"],\n \"scripts\": {\n \"build\": \"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup\",\n \"dev\": \"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch\",\n \"generate:docs\": \"typedoc && node scripts/generate-reference.mjs\"\n },\n \"dependencies\": {\n \"@crossmint/client-sdk-auth\": \"workspace:*\",\n \"@crossmint/client-sdk-base\": \"workspace:*\",\n \"@crossmint/client-sdk-react-base\": \"workspace:*\",\n \"@crossmint/client-sdk-rn-window\": \"workspace:*\",\n \"@crossmint/client-signers\": \"workspace:*\",\n \"@crossmint/common-sdk-auth\": \"workspace:*\",\n \"@crossmint/common-sdk-base\": \"workspace:*\",\n \"@crossmint/wallets-sdk\": \"workspace:*\",\n \"@solana/web3.js\": \"1.98.1\",\n \"bs58\": \"^5.0.0\",\n \"lodash.clonedeep\": \"4.5.0\",\n \"lodash.isequal\": \"4.5.0\",\n \"lucide-react-native\": \"0.548.0\",\n \"mitt\": \"3.0.1\",\n \"react-native-svg\": \"15.14.0\",\n \"zod\": \"3.22.4\"\n },\n \"devDependencies\": {\n \"@expo/config-plugins\": \"^9.0.17\",\n \"typedoc\": \"0.28.16\",\n \"@types/react\": \"19.1.10\",\n \"expo-constants\": \"~18.0.9\",\n \"expo-device\": \"~8.0.9\",\n \"expo-secure-store\": \"~15.0.7\",\n \"expo-web-browser\": \"~15.0.8\"\n },\n \"peerDependencies\": {\n \"@expo/config-plugins\": \">=9.0.0\",\n \"@solana/web3.js\": \"^1.98.1\",\n \"expo-constants\": \">=17 <19\",\n \"expo-device\": \">=7 <9\",\n \"expo-secure-store\": \">=14 <16\",\n \"expo-web-browser\": \">=14 <16\",\n \"react\": \">=17.0.2\",\n \"react-native\": \">=0.74.3\",\n \"react-native-webview\": \">=13.15.0 <14\"\n }\n}\n"],"mappings":";AAAA;AAAA,EACI,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,YAAc;AAAA,EACd,SAAW;AAAA,EACX,QAAU;AAAA,EACV,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,QAAU;AAAA,EACV,OAAS;AAAA,EACT,OAAS,CAAC,QAAQ,iBAAiB,SAAS;AAAA,EAC5C,SAAW;AAAA,IACP,OAAS;AAAA,IACT,KAAO;AAAA,IACP,iBAAiB;AAAA,EACrB;AAAA,EACA,cAAgB;AAAA,IACZ,8BAA8B;AAAA,IAC9B,8BAA8B;AAAA,IAC9B,oCAAoC;AAAA,IACpC,mCAAmC;AAAA,IACnC,6BAA6B;AAAA,IAC7B,8BAA8B;AAAA,IAC9B,8BAA8B;AAAA,IAC9B,0BAA0B;AAAA,IAC1B,mBAAmB;AAAA,IACnB,MAAQ;AAAA,IACR,oBAAoB;AAAA,IACpB,kBAAkB;AAAA,IAClB,uBAAuB;AAAA,IACvB,MAAQ;AAAA,IACR,oBAAoB;AAAA,IACpB,KAAO;AAAA,EACX;AAAA,EACA,iBAAmB;AAAA,IACf,wBAAwB;AAAA,IACxB,SAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,eAAe;AAAA,IACf,qBAAqB;AAAA,IACrB,oBAAoB;AAAA,EACxB;AAAA,EACA,kBAAoB;AAAA,IAChB,wBAAwB;AAAA,IACxB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,eAAe;AAAA,IACf,qBAAqB;AAAA,IACrB,oBAAoB;AAAA,IACpB,OAAS;AAAA,IACT,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC5B;AACJ;","names":[]}
@@ -0,0 +1 @@
1
+ "use strict";//# sourceMappingURL=chunk-5ZBDQUNG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkKOUCOMBEjs = require('./chunk-KOUCOMBE.js');
4
+
5
+
6
+ var _chunkQ7YPX4RJjs = require('./chunk-Q7YPX4RJ.js');
7
+
8
+ // src/components/embed/v3/CrossmintEmbeddedCheckoutV3.tsx
9
+ var _jsxruntime = require('react/jsx-runtime');
10
+ function CrossmintEmbeddedCheckout(props) {
11
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOUCOMBEjs.EmbeddedCheckoutV3WebView, _chunkQ7YPX4RJjs.__spreadValues.call(void 0, {}, props));
12
+ }
13
+
14
+
15
+
16
+ exports.CrossmintEmbeddedCheckout = CrossmintEmbeddedCheckout;
17
+ //# sourceMappingURL=chunk-6S5SEVGS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/embed/v3/CrossmintEmbeddedCheckoutV3.tsx"],"names":[],"mappings":";;;;;;;;AAIW;AADJ,SAAS,0BAA0B,OAAyC;AAC/E,SAAO,oBAAC,8CAA8B,MAAO;AACjD","sourcesContent":["import { EmbeddedCheckoutV3WebView } from \"./EmbeddedCheckoutV3WebView\";\nimport type { CrossmintEmbeddedCheckoutV3Props } from \"@crossmint/client-sdk-base\";\n\nexport function CrossmintEmbeddedCheckout(props: CrossmintEmbeddedCheckoutV3Props) {\n return <EmbeddedCheckoutV3WebView {...props} />;\n}\n"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-6Z74KC25.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,66 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
21
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
22
+ }) : x)(function(x) {
23
+ if (typeof require !== "undefined") return require.apply(this, arguments);
24
+ throw Error('Dynamic require of "' + x + '" is not supported');
25
+ });
26
+ var __objRest = (source, exclude) => {
27
+ var target = {};
28
+ for (var prop in source)
29
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
+ target[prop] = source[prop];
31
+ if (source != null && __getOwnPropSymbols)
32
+ for (var prop of __getOwnPropSymbols(source)) {
33
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
+ target[prop] = source[prop];
35
+ }
36
+ return target;
37
+ };
38
+ var __async = (__this, __arguments, generator) => {
39
+ return new Promise((resolve, reject) => {
40
+ var fulfilled = (value) => {
41
+ try {
42
+ step(generator.next(value));
43
+ } catch (e) {
44
+ reject(e);
45
+ }
46
+ };
47
+ var rejected = (value) => {
48
+ try {
49
+ step(generator.throw(value));
50
+ } catch (e) {
51
+ reject(e);
52
+ }
53
+ };
54
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
55
+ step((generator = generator.apply(__this, __arguments)).next());
56
+ });
57
+ };
58
+
59
+ export {
60
+ __spreadValues,
61
+ __spreadProps,
62
+ __require,
63
+ __objRest,
64
+ __async
65
+ };
66
+ //# sourceMappingURL=chunk-7SPIOD4K.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,199 @@
1
+ import {
2
+ theme
3
+ } from "./chunk-3AWDWMZ2.mjs";
4
+ import {
5
+ __async
6
+ } from "./chunk-7SPIOD4K.mjs";
7
+
8
+ // src/components/signers/BaseCodeInput.tsx
9
+ import { useState } from "react";
10
+ import { View, Text, TextInput, TouchableOpacity, StyleSheet, ActivityIndicator } from "react-native";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ function BaseCodeInput({
13
+ icon,
14
+ title,
15
+ description,
16
+ helpText,
17
+ onSubmitOTP,
18
+ onResendCode,
19
+ appearance,
20
+ otpLength = 9,
21
+ keyboardType = "default",
22
+ autoComplete = "one-time-code",
23
+ textContentType = "oneTimeCode"
24
+ }) {
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
26
+ const [otpCode, setOtpCode] = useState("");
27
+ const [isLoading, setIsLoading] = useState(false);
28
+ const [error, setError] = useState(null);
29
+ const [resendCooldown, setResendCooldown] = useState(0);
30
+ const handleSubmitOTP = () => __async(this, null, function* () {
31
+ if (otpCode.length === 0) {
32
+ return;
33
+ }
34
+ setIsLoading(true);
35
+ setError(null);
36
+ try {
37
+ yield onSubmitOTP(otpCode);
38
+ setOtpCode("");
39
+ } catch (error2) {
40
+ console.error("Failed to verify OTP", error2);
41
+ setError("Invalid code. Please try again.");
42
+ } finally {
43
+ setIsLoading(false);
44
+ }
45
+ });
46
+ const handleResendCode = () => __async(this, null, function* () {
47
+ if (resendCooldown > 0 || !onResendCode) {
48
+ return;
49
+ }
50
+ setIsLoading(true);
51
+ setError(null);
52
+ try {
53
+ yield onResendCode();
54
+ setResendCooldown(60);
55
+ const timer = setInterval(() => {
56
+ setResendCooldown((prev) => {
57
+ if (prev <= 1) {
58
+ clearInterval(timer);
59
+ return 0;
60
+ }
61
+ return prev - 1;
62
+ });
63
+ }, 1e3);
64
+ } catch (error2) {
65
+ console.error("Failed to resend OTP", error2);
66
+ setError("Failed to resend code. Please try again.");
67
+ } finally {
68
+ setIsLoading(false);
69
+ }
70
+ });
71
+ const dynamicStyles = StyleSheet.create({
72
+ container: {
73
+ width: "100%"
74
+ },
75
+ iconContainer: {
76
+ alignItems: "center",
77
+ marginBottom: 8
78
+ },
79
+ title: {
80
+ fontSize: 18,
81
+ fontWeight: "600",
82
+ color: ((_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary) || theme["cm-text-primary"],
83
+ textAlign: "center",
84
+ marginBottom: 8,
85
+ marginTop: 16
86
+ },
87
+ description: {
88
+ fontSize: 14,
89
+ color: ((_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary) || theme["cm-text-secondary"],
90
+ textAlign: "center",
91
+ marginBottom: 24,
92
+ lineHeight: 20
93
+ },
94
+ otpInput: {
95
+ borderWidth: 1,
96
+ borderColor: error ? ((_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.danger) || theme["cm-danger"] : ((_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.border) || theme["cm-border"],
97
+ borderRadius: (appearance == null ? void 0 : appearance.borderRadius) || 12,
98
+ backgroundColor: ((_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.inputBackground) || theme["cm-muted-primary"],
99
+ padding: 16,
100
+ fontSize: 16,
101
+ color: ((_f = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _f.textPrimary) || theme["cm-text-primary"],
102
+ marginBottom: 16,
103
+ textAlign: "center"
104
+ },
105
+ errorText: {
106
+ fontSize: 14,
107
+ color: ((_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.danger) || theme["cm-danger"],
108
+ textAlign: "center",
109
+ marginBottom: 16
110
+ },
111
+ helpText: {
112
+ fontSize: 12,
113
+ color: ((_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.textSecondary) || theme["cm-text-secondary"],
114
+ textAlign: "center",
115
+ marginBottom: 16,
116
+ lineHeight: 16
117
+ },
118
+ submitButton: {
119
+ backgroundColor: ((_i = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _i.accent) || theme["cm-accent"],
120
+ paddingVertical: 16,
121
+ paddingHorizontal: 32,
122
+ borderRadius: (appearance == null ? void 0 : appearance.borderRadius) || 12,
123
+ alignItems: "center",
124
+ marginBottom: 16
125
+ },
126
+ submitButtonDisabled: {
127
+ opacity: 0.6
128
+ },
129
+ submitButtonText: {
130
+ fontSize: 16,
131
+ fontWeight: "500",
132
+ color: ((_j = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _j.background) || theme["cm-background-primary"]
133
+ },
134
+ resendButton: {
135
+ alignSelf: "center",
136
+ paddingVertical: 12,
137
+ paddingHorizontal: 16
138
+ },
139
+ resendButtonText: {
140
+ fontSize: 14,
141
+ color: ((_k = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _k.accent) || theme["cm-accent"],
142
+ textAlign: "center"
143
+ },
144
+ resendButtonDisabled: {
145
+ opacity: 0.6
146
+ }
147
+ });
148
+ return /* @__PURE__ */ jsxs(View, { style: dynamicStyles.container, children: [
149
+ /* @__PURE__ */ jsx(View, { style: dynamicStyles.iconContainer, children: icon }),
150
+ /* @__PURE__ */ jsx(Text, { style: dynamicStyles.title, children: title }),
151
+ /* @__PURE__ */ jsx(Text, { style: dynamicStyles.description, children: description }),
152
+ /* @__PURE__ */ jsx(
153
+ TextInput,
154
+ {
155
+ style: dynamicStyles.otpInput,
156
+ placeholder: "Enter code",
157
+ placeholderTextColor: ((_l = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _l.textSecondary) || theme["cm-text-secondary"],
158
+ value: otpCode,
159
+ onChangeText: (text) => {
160
+ setOtpCode(text);
161
+ setError(null);
162
+ },
163
+ keyboardType,
164
+ autoComplete,
165
+ textContentType,
166
+ editable: !isLoading,
167
+ maxLength: otpLength
168
+ }
169
+ ),
170
+ error && /* @__PURE__ */ jsx(Text, { style: dynamicStyles.errorText, children: error }),
171
+ /* @__PURE__ */ jsx(Text, { style: dynamicStyles.helpText, children: helpText }),
172
+ /* @__PURE__ */ jsx(
173
+ TouchableOpacity,
174
+ {
175
+ style: [
176
+ dynamicStyles.submitButton,
177
+ (otpCode.length === 0 || isLoading) && dynamicStyles.submitButtonDisabled
178
+ ],
179
+ onPress: handleSubmitOTP,
180
+ disabled: otpCode.length === 0 || isLoading,
181
+ children: isLoading ? /* @__PURE__ */ jsx(ActivityIndicator, { color: ((_m = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _m.background) || theme["cm-background-primary"] }) : /* @__PURE__ */ jsx(Text, { style: dynamicStyles.submitButtonText, children: "Submit" })
182
+ }
183
+ ),
184
+ onResendCode && /* @__PURE__ */ jsx(
185
+ TouchableOpacity,
186
+ {
187
+ style: [dynamicStyles.resendButton, resendCooldown > 0 && dynamicStyles.resendButtonDisabled],
188
+ onPress: handleResendCode,
189
+ disabled: resendCooldown > 0 || isLoading,
190
+ children: /* @__PURE__ */ jsx(Text, { style: dynamicStyles.resendButtonText, children: resendCooldown > 0 ? `Re-send code in ${resendCooldown}s` : "Re-send code" })
191
+ }
192
+ )
193
+ ] });
194
+ }
195
+
196
+ export {
197
+ BaseCodeInput
198
+ };
199
+ //# sourceMappingURL=chunk-ALMDA3KN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/signers/BaseCodeInput.tsx"],"sourcesContent":["import { useState, type ReactNode } from \"react\";\nimport { View, Text, TextInput, TouchableOpacity, StyleSheet, ActivityIndicator } from \"react-native\";\nimport type { UIConfig } from \"@crossmint/common-sdk-base\";\nimport { theme } from \"../../styles/theme\";\n\ninterface BaseCodeInputProps {\n contactInfo: string;\n contactType: \"email\" | \"phone\";\n icon: ReactNode;\n title: string;\n description: string | ReactNode;\n helpText: string;\n onSubmitOTP: (token: string) => Promise<void>;\n onResendCode?: () => Promise<void>;\n appearance?: UIConfig;\n otpLength?: number;\n keyboardType?: \"default\" | \"number-pad\";\n autoComplete?: \"one-time-code\" | \"sms-otp\";\n textContentType?: \"oneTimeCode\";\n}\n\nexport function BaseCodeInput({\n icon,\n title,\n description,\n helpText,\n onSubmitOTP,\n onResendCode,\n appearance,\n otpLength = 9,\n keyboardType = \"default\",\n autoComplete = \"one-time-code\",\n textContentType = \"oneTimeCode\",\n}: BaseCodeInputProps) {\n const [otpCode, setOtpCode] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [resendCooldown, setResendCooldown] = useState(0);\n\n const handleSubmitOTP = async () => {\n if (otpCode.length === 0) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n try {\n await onSubmitOTP(otpCode);\n setOtpCode(\"\");\n } catch (error) {\n console.error(\"Failed to verify OTP\", error);\n setError(\"Invalid code. Please try again.\");\n } finally {\n setIsLoading(false);\n }\n };\n\n const handleResendCode = async () => {\n if (resendCooldown > 0 || !onResendCode) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n try {\n await onResendCode();\n setResendCooldown(60);\n const timer = setInterval(() => {\n setResendCooldown((prev) => {\n if (prev <= 1) {\n clearInterval(timer);\n return 0;\n }\n return prev - 1;\n });\n }, 1000);\n } catch (error) {\n console.error(\"Failed to resend OTP\", error);\n setError(\"Failed to resend code. Please try again.\");\n } finally {\n setIsLoading(false);\n }\n };\n\n const dynamicStyles = StyleSheet.create({\n container: {\n width: \"100%\",\n },\n iconContainer: {\n alignItems: \"center\",\n marginBottom: 8,\n },\n title: {\n fontSize: 18,\n fontWeight: \"600\",\n color: appearance?.colors?.textPrimary || theme[\"cm-text-primary\"],\n textAlign: \"center\",\n marginBottom: 8,\n marginTop: 16,\n },\n description: {\n fontSize: 14,\n color: appearance?.colors?.textSecondary || theme[\"cm-text-secondary\"],\n textAlign: \"center\",\n marginBottom: 24,\n lineHeight: 20,\n },\n otpInput: {\n borderWidth: 1,\n borderColor: error\n ? appearance?.colors?.danger || theme[\"cm-danger\"]\n : appearance?.colors?.border || theme[\"cm-border\"],\n borderRadius: appearance?.borderRadius || 12,\n backgroundColor: appearance?.colors?.inputBackground || theme[\"cm-muted-primary\"],\n padding: 16,\n fontSize: 16,\n color: appearance?.colors?.textPrimary || theme[\"cm-text-primary\"],\n marginBottom: 16,\n textAlign: \"center\",\n },\n errorText: {\n fontSize: 14,\n color: appearance?.colors?.danger || theme[\"cm-danger\"],\n textAlign: \"center\",\n marginBottom: 16,\n },\n helpText: {\n fontSize: 12,\n color: appearance?.colors?.textSecondary || theme[\"cm-text-secondary\"],\n textAlign: \"center\",\n marginBottom: 16,\n lineHeight: 16,\n },\n submitButton: {\n backgroundColor: appearance?.colors?.accent || theme[\"cm-accent\"],\n paddingVertical: 16,\n paddingHorizontal: 32,\n borderRadius: appearance?.borderRadius || 12,\n alignItems: \"center\",\n marginBottom: 16,\n },\n submitButtonDisabled: {\n opacity: 0.6,\n },\n submitButtonText: {\n fontSize: 16,\n fontWeight: \"500\",\n color: appearance?.colors?.background || theme[\"cm-background-primary\"],\n },\n resendButton: {\n alignSelf: \"center\",\n paddingVertical: 12,\n paddingHorizontal: 16,\n },\n resendButtonText: {\n fontSize: 14,\n color: appearance?.colors?.accent || theme[\"cm-accent\"],\n textAlign: \"center\",\n },\n resendButtonDisabled: {\n opacity: 0.6,\n },\n });\n\n return (\n <View style={dynamicStyles.container}>\n <View style={dynamicStyles.iconContainer}>{icon}</View>\n\n <Text style={dynamicStyles.title}>{title}</Text>\n <Text style={dynamicStyles.description}>{description}</Text>\n\n <TextInput\n style={dynamicStyles.otpInput}\n placeholder=\"Enter code\"\n placeholderTextColor={appearance?.colors?.textSecondary || theme[\"cm-text-secondary\"]}\n value={otpCode}\n onChangeText={(text) => {\n setOtpCode(text);\n setError(null);\n }}\n keyboardType={keyboardType}\n autoComplete={autoComplete}\n textContentType={textContentType}\n editable={!isLoading}\n maxLength={otpLength}\n />\n\n {error && <Text style={dynamicStyles.errorText}>{error}</Text>}\n\n <Text style={dynamicStyles.helpText}>{helpText}</Text>\n\n <TouchableOpacity\n style={[\n dynamicStyles.submitButton,\n (otpCode.length === 0 || isLoading) && dynamicStyles.submitButtonDisabled,\n ]}\n onPress={handleSubmitOTP}\n disabled={otpCode.length === 0 || isLoading}\n >\n {isLoading ? (\n <ActivityIndicator color={appearance?.colors?.background || theme[\"cm-background-primary\"]} />\n ) : (\n <Text style={dynamicStyles.submitButtonText}>Submit</Text>\n )}\n </TouchableOpacity>\n\n {onResendCode && (\n <TouchableOpacity\n style={[dynamicStyles.resendButton, resendCooldown > 0 && dynamicStyles.resendButtonDisabled]}\n onPress={handleResendCode}\n disabled={resendCooldown > 0 || isLoading}\n >\n <Text style={dynamicStyles.resendButtonText}>\n {resendCooldown > 0 ? `Re-send code in ${resendCooldown}s` : \"Re-send code\"}\n </Text>\n </TouchableOpacity>\n )}\n </View>\n );\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,gBAAgC;AACzC,SAAS,MAAM,MAAM,WAAW,kBAAkB,YAAY,yBAAyB;AAoK/E,SACI,KADJ;AAhJD,SAAS,cAAc;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,eAAe;AAAA,EACf,kBAAkB;AACtB,GAAuB;AAjCvB;AAkCI,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,EAAE;AACzC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAwB,IAAI;AACtD,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,CAAC;AAEtD,QAAM,kBAAkB,MAAY;AAChC,QAAI,QAAQ,WAAW,GAAG;AACtB;AAAA,IACJ;AAEA,iBAAa,IAAI;AACjB,aAAS,IAAI;AACb,QAAI;AACA,YAAM,YAAY,OAAO;AACzB,iBAAW,EAAE;AAAA,IACjB,SAASA,QAAO;AACZ,cAAQ,MAAM,wBAAwBA,MAAK;AAC3C,eAAS,iCAAiC;AAAA,IAC9C,UAAE;AACE,mBAAa,KAAK;AAAA,IACtB;AAAA,EACJ;AAEA,QAAM,mBAAmB,MAAY;AACjC,QAAI,iBAAiB,KAAK,CAAC,cAAc;AACrC;AAAA,IACJ;AAEA,iBAAa,IAAI;AACjB,aAAS,IAAI;AACb,QAAI;AACA,YAAM,aAAa;AACnB,wBAAkB,EAAE;AACpB,YAAM,QAAQ,YAAY,MAAM;AAC5B,0BAAkB,CAAC,SAAS;AAC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,IAAI;AACf,mBAAS,IAAI;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,CAAC;AAAA,QACX,WAAW;AAAA;AAAA,IACf;AAAA,IAEC,SAAS,oBAAC,QAAK,OAAO,cAAc,WAAY,iBAAM;AAAA,IAEvD,oBAAC,QAAK,OAAO,cAAc,UAAW,oBAAS;AAAA,IAE/C;AAAA,MAAC;AAAA;AAAA,QACG,OAAO;AAAA,UACH,cAAc;AAAA,WACb,QAAQ,WAAW,KAAK,cAAc,cAAc;AAAA,QACzD;AAAA,QACA,SAAS;AAAA,QACT,UAAU,QAAQ,WAAW,KAAK;AAAA,QAEjC,sBACG,oBAAC,qBAAkB,SAAO,8CAAY,WAAZ,mBAAoB,eAAc,MAAM,uBAAuB,GAAG,IAE5F,oBAAC,QAAK,OAAO,cAAc,kBAAkB,oBAAM;AAAA;AAAA,IAE3D;AAAA,IAEC,gBACG;AAAA,MAAC;AAAA;AAAA,QACG,OAAO,CAAC,cAAc,cAAc,iBAAiB,KAAK,cAAc,oBAAoB;AAAA,QAC5F,SAAS;AAAA,QACT,UAAU,iBAAiB,KAAK;AAAA,QAEhC,8BAAC,QAAK,OAAO,cAAc,kBACtB,2BAAiB,IAAI,mBAAmB,cAAc,MAAM,gBACjE;AAAA;AAAA,IACJ;AAAA,KAER;AAER;","names":["error"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-BE4HT2U7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,149 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkHELXBZ7Djs = require('./chunk-HELXBZ7D.js');
4
+
5
+
6
+ var _chunkQ7YPX4RJjs = require('./chunk-Q7YPX4RJ.js');
7
+
8
+ // src/components/signers/BaseConfirmation.tsx
9
+ var _react = require('react');
10
+ var _reactnative = require('react-native');
11
+ var _jsxruntime = require('react/jsx-runtime');
12
+ function BaseConfirmation({
13
+ contactInfo,
14
+ contactType,
15
+ icon,
16
+ onConfirm,
17
+ onCancel,
18
+ appearance
19
+ }) {
20
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
21
+ const [isLoading, setIsLoading] = _react.useState.call(void 0, false);
22
+ const [error, setError] = _react.useState.call(void 0, null);
23
+ const handleConfirm = () => _chunkQ7YPX4RJjs.__async.call(void 0, this, null, function* () {
24
+ setIsLoading(true);
25
+ setError(null);
26
+ try {
27
+ yield onConfirm();
28
+ } catch (error2) {
29
+ console.error(`Failed to send ${contactType} code`, error2);
30
+ setError(`Failed to send ${contactType === "email" ? "email" : "SMS"}. Please try again.`);
31
+ } finally {
32
+ setIsLoading(false);
33
+ }
34
+ });
35
+ const dynamicStyles = _reactnative.StyleSheet.create({
36
+ container: {
37
+ width: "100%"
38
+ },
39
+ title: {
40
+ fontSize: 24,
41
+ fontWeight: "600",
42
+ color: ((_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary) || _chunkHELXBZ7Djs.theme["cm-text-primary"],
43
+ textAlign: "center",
44
+ marginBottom: 8
45
+ },
46
+ description: {
47
+ fontSize: 16,
48
+ color: ((_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary) || _chunkHELXBZ7Djs.theme["cm-text-secondary"],
49
+ textAlign: "center",
50
+ marginBottom: 24,
51
+ lineHeight: 22
52
+ },
53
+ contactContainer: {
54
+ borderWidth: 1,
55
+ borderColor: ((_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.border) || _chunkHELXBZ7Djs.theme["cm-border"],
56
+ borderRadius: (appearance == null ? void 0 : appearance.borderRadius) || 12,
57
+ padding: 16,
58
+ marginBottom: 24,
59
+ flexDirection: "row",
60
+ alignItems: "center"
61
+ },
62
+ contactText: {
63
+ fontSize: 16,
64
+ color: ((_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textPrimary) || _chunkHELXBZ7Djs.theme["cm-text-primary"],
65
+ marginLeft: 12,
66
+ flex: 1
67
+ },
68
+ errorText: {
69
+ fontSize: 14,
70
+ color: ((_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.danger) || _chunkHELXBZ7Djs.theme["cm-danger"],
71
+ textAlign: "center",
72
+ marginBottom: 16
73
+ },
74
+ buttonContainer: {
75
+ flexDirection: "row",
76
+ gap: 12
77
+ },
78
+ button: {
79
+ flex: 1,
80
+ paddingVertical: 16,
81
+ paddingHorizontal: 24,
82
+ borderRadius: 999,
83
+ alignItems: "center",
84
+ justifyContent: "center",
85
+ minHeight: 52
86
+ },
87
+ primaryButton: {
88
+ backgroundColor: ((_f = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _f.accent) || _chunkHELXBZ7Djs.theme["cm-accent"]
89
+ },
90
+ secondaryButton: {
91
+ backgroundColor: "transparent",
92
+ borderWidth: 1,
93
+ borderColor: ((_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.border) || _chunkHELXBZ7Djs.theme["cm-border"]
94
+ },
95
+ disabledButton: {
96
+ opacity: 0.6
97
+ },
98
+ buttonText: {
99
+ fontSize: 16,
100
+ fontWeight: "500",
101
+ color: ((_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.background) || _chunkHELXBZ7Djs.theme["cm-background-primary"]
102
+ },
103
+ secondaryButtonText: {
104
+ color: ((_i = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _i.textPrimary) || _chunkHELXBZ7Djs.theme["cm-text-primary"]
105
+ }
106
+ });
107
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: dynamicStyles.container, children: [
108
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: dynamicStyles.title, children: "Confirm it's you" }),
109
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.Text, { style: dynamicStyles.description, children: [
110
+ "You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code",
111
+ contactType === "phone" ? " via SMS" : "",
112
+ "."
113
+ ] }),
114
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: dynamicStyles.contactContainer, children: [
115
+ icon,
116
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: dynamicStyles.contactText, children: contactInfo })
117
+ ] }),
118
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: dynamicStyles.errorText, children: error }),
119
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: dynamicStyles.buttonContainer, children: [
120
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
121
+ _reactnative.TouchableOpacity,
122
+ {
123
+ style: [dynamicStyles.button, dynamicStyles.secondaryButton],
124
+ onPress: onCancel,
125
+ disabled: isLoading,
126
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [dynamicStyles.buttonText, dynamicStyles.secondaryButtonText], children: "Cancel" })
127
+ }
128
+ ),
129
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
130
+ _reactnative.TouchableOpacity,
131
+ {
132
+ style: [
133
+ dynamicStyles.button,
134
+ dynamicStyles.primaryButton,
135
+ isLoading && dynamicStyles.disabledButton
136
+ ],
137
+ onPress: handleConfirm,
138
+ disabled: isLoading,
139
+ children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.ActivityIndicator, { color: ((_j = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _j.background) || _chunkHELXBZ7Djs.theme["cm-background-primary"] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: dynamicStyles.buttonText, children: "Send code" })
140
+ }
141
+ )
142
+ ] })
143
+ ] });
144
+ }
145
+
146
+
147
+
148
+ exports.BaseConfirmation = BaseConfirmation;
149
+ //# sourceMappingURL=chunk-BTH5QRIT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/signers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tB;AAAA;AAAA,MACD,oBAAC,QAAK,OAAO,cAAc,aAAc,uBAAY;AAAA,OACzD;AAAA,IAEC,SAAS,oBAAC,QAAK,OAAO,cAAc,WAAY,iBAAM;AAAA,IAEvD,qBAAC,QAAK,OAAO,cAAc,iBACvB;AAAA;AAAA,QAAC;AAAA;AAAA,UACG,OAAO,CAAC,cAAc,QAAQ,cAAc,eAAe;AAAA,UAC3D,SAAS;AAAA,UACT,UAAU;AAAA,UAEV,8BAAC,QAAK,OAAO,CAAC,cAAc,YAAY,cAAc,mBAAmB,GAAG,oBAAM;AAAA;AAAA,MACtF;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACG,OAAO;AAAA,YACH,cAAc;AAAA,YACd,cAAc;AAAA,YACd,aAAa,cAAc;AAAA,UAC/B;AAAA,UACA,SAAS;AAAA,UACT,UAAU;AAAA,UAET,sBACG,oBAAC,qBAAkB,SAAO,8CAAY,WAAZ,mBAAoB,eAAc,MAAM,uBAAuB,GAAG,IAE5F,oBAAC,QAAK,OAAO,cAAc,YAAY,uBAAS;AAAA;AAAA,MAExD;AAAA,OACJ;AAAA,KACJ;AAER","sourcesContent":["import { useState, type ReactNode } from \"react\";\nimport { View, Text, TouchableOpacity, StyleSheet, ActivityIndicator } from \"react-native\";\nimport type { UIConfig } from \"@crossmint/common-sdk-base\";\nimport { theme } from \"../../styles/theme\";\n\ninterface BaseConfirmationProps {\n contactInfo: string;\n contactType: \"email\" | \"phone\";\n icon: ReactNode;\n onConfirm: () => Promise<void>;\n onCancel?: () => void;\n appearance?: UIConfig;\n}\n\nexport function BaseConfirmation({\n contactInfo,\n contactType,\n icon,\n onConfirm,\n onCancel,\n appearance,\n}: BaseConfirmationProps) {\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n const handleConfirm = async () => {\n setIsLoading(true);\n setError(null);\n try {\n await onConfirm();\n } catch (error) {\n console.error(`Failed to send ${contactType} code`, error);\n setError(`Failed to send ${contactType === \"email\" ? \"email\" : \"SMS\"}. Please try again.`);\n } finally {\n setIsLoading(false);\n }\n };\n\n const dynamicStyles = StyleSheet.create({\n container: {\n width: \"100%\",\n },\n title: {\n fontSize: 24,\n fontWeight: \"600\",\n color: appearance?.colors?.textPrimary || theme[\"cm-text-primary\"],\n textAlign: \"center\",\n marginBottom: 8,\n },\n description: {\n fontSize: 16,\n color: appearance?.colors?.textSecondary || theme[\"cm-text-secondary\"],\n textAlign: \"center\",\n marginBottom: 24,\n lineHeight: 22,\n },\n contactContainer: {\n borderWidth: 1,\n borderColor: appearance?.colors?.border || theme[\"cm-border\"],\n borderRadius: appearance?.borderRadius || 12,\n padding: 16,\n marginBottom: 24,\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n contactText: {\n fontSize: 16,\n color: appearance?.colors?.textPrimary || theme[\"cm-text-primary\"],\n marginLeft: 12,\n flex: 1,\n },\n errorText: {\n fontSize: 14,\n color: appearance?.colors?.danger || theme[\"cm-danger\"],\n textAlign: \"center\",\n marginBottom: 16,\n },\n buttonContainer: {\n flexDirection: \"row\",\n gap: 12,\n },\n button: {\n flex: 1,\n paddingVertical: 16,\n paddingHorizontal: 24,\n borderRadius: 999,\n alignItems: \"center\",\n justifyContent: \"center\",\n minHeight: 52,\n },\n primaryButton: {\n backgroundColor: appearance?.colors?.accent || theme[\"cm-accent\"],\n },\n secondaryButton: {\n backgroundColor: \"transparent\",\n borderWidth: 1,\n borderColor: appearance?.colors?.border || theme[\"cm-border\"],\n },\n disabledButton: {\n opacity: 0.6,\n },\n buttonText: {\n fontSize: 16,\n fontWeight: \"500\",\n color: appearance?.colors?.background || theme[\"cm-background-primary\"],\n },\n secondaryButtonText: {\n color: appearance?.colors?.textPrimary || theme[\"cm-text-primary\"],\n },\n });\n\n return (\n <View style={dynamicStyles.container}>\n <Text style={dynamicStyles.title}>Confirm it's you</Text>\n <Text style={dynamicStyles.description}>\n You're using this wallet for the first time on this device. Click 'Send code' to get a one-time\n verification code{contactType === \"phone\" ? \" via SMS\" : \"\"}.\n </Text>\n\n <View style={dynamicStyles.contactContainer}>\n {icon}\n <Text style={dynamicStyles.contactText}>{contactInfo}</Text>\n </View>\n\n {error && <Text style={dynamicStyles.errorText}>{error}</Text>}\n\n <View style={dynamicStyles.buttonContainer}>\n <TouchableOpacity\n style={[dynamicStyles.button, dynamicStyles.secondaryButton]}\n onPress={onCancel}\n disabled={isLoading}\n >\n <Text style={[dynamicStyles.buttonText, dynamicStyles.secondaryButtonText]}>Cancel</Text>\n </TouchableOpacity>\n\n <TouchableOpacity\n style={[\n dynamicStyles.button,\n dynamicStyles.primaryButton,\n isLoading && dynamicStyles.disabledButton,\n ]}\n onPress={handleConfirm}\n disabled={isLoading}\n >\n {isLoading ? (\n <ActivityIndicator color={appearance?.colors?.background || theme[\"cm-background-primary\"]} />\n ) : (\n <Text style={dynamicStyles.buttonText}>Send code</Text>\n )}\n </TouchableOpacity>\n </View>\n </View>\n );\n}\n"]}