@funkit/connect-rn 8.2.0 → 9.0.0

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/CHANGELOG.md +184 -0
  2. package/README.md +25 -12
  3. package/dist/{chunk-GG2WCQ6N.js → chunk-3ZNAGQHD.js} +3 -3
  4. package/dist/chunk-BC4RXFI7.js +319 -0
  5. package/dist/chunk-BC4RXFI7.js.map +7 -0
  6. package/dist/{chunk-J5K2FSAI.js → chunk-MVQH4YFI.js} +330 -146
  7. package/dist/chunk-MVQH4YFI.js.map +7 -0
  8. package/dist/{chunk-D64EJ57D.js → chunk-ZE77GVDW.js} +94 -10
  9. package/dist/chunk-ZE77GVDW.js.map +7 -0
  10. package/dist/clients/lighter.js +2 -2
  11. package/dist/clients/nado.js +3 -3
  12. package/dist/clients/solana.js +1 -1
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +9859 -6316
  16. package/dist/index.js.map +4 -4
  17. package/dist/preview.d.ts +5 -0
  18. package/dist/preview.d.ts.map +1 -0
  19. package/dist/preview.js +1159 -0
  20. package/dist/preview.js.map +7 -0
  21. package/dist/src/components/DepositActionMotion.d.ts +4 -1
  22. package/dist/src/components/DepositActionMotion.d.ts.map +1 -1
  23. package/dist/src/components/DismissibleToast.d.ts +35 -0
  24. package/dist/src/components/DismissibleToast.d.ts.map +1 -0
  25. package/dist/src/components/GlassSurface.d.ts +3 -1
  26. package/dist/src/components/GlassSurface.d.ts.map +1 -1
  27. package/dist/src/components/PillButton.d.ts +20 -2
  28. package/dist/src/components/PillButton.d.ts.map +1 -1
  29. package/dist/src/components/StateSwap.d.ts +17 -0
  30. package/dist/src/components/StateSwap.d.ts.map +1 -0
  31. package/dist/src/components/WithdrawSourceCard.d.ts.map +1 -1
  32. package/dist/src/components/v2/AmountDisplay.d.ts.map +1 -1
  33. package/dist/src/components/v2/PaymentMethodPicker.d.ts +18 -0
  34. package/dist/src/components/v2/PaymentMethodPicker.d.ts.map +1 -0
  35. package/dist/src/components/v2/QuickAmountsRow.d.ts.map +1 -1
  36. package/dist/src/fiat/FiatBackButton.d.ts +5 -1
  37. package/dist/src/fiat/FiatBackButton.d.ts.map +1 -1
  38. package/dist/src/fiat/FiatChoiceField.d.ts +4 -3
  39. package/dist/src/fiat/FiatChoiceField.d.ts.map +1 -1
  40. package/dist/src/fiat/FiatContactScreen.d.ts.map +1 -1
  41. package/dist/src/fiat/FiatCountrySheet.d.ts.map +1 -1
  42. package/dist/src/fiat/FiatDocumentCaptureStep.d.ts +7 -2
  43. package/dist/src/fiat/FiatDocumentCaptureStep.d.ts.map +1 -1
  44. package/dist/src/fiat/FiatFailureBanner.d.ts +4 -1
  45. package/dist/src/fiat/FiatFailureBanner.d.ts.map +1 -1
  46. package/dist/src/fiat/FiatFormAdvance.d.ts.map +1 -1
  47. package/dist/src/fiat/FiatFormFieldRow.d.ts +15 -1
  48. package/dist/src/fiat/FiatFormFieldRow.d.ts.map +1 -1
  49. package/dist/src/fiat/FiatFormHeading.d.ts +21 -0
  50. package/dist/src/fiat/FiatFormHeading.d.ts.map +1 -0
  51. package/dist/src/fiat/FiatFormScreen.d.ts +7 -1
  52. package/dist/src/fiat/FiatFormScreen.d.ts.map +1 -1
  53. package/dist/src/fiat/FiatIdentityStep.d.ts +16 -1
  54. package/dist/src/fiat/FiatIdentityStep.d.ts.map +1 -1
  55. package/dist/src/fiat/FiatKycFieldControl.d.ts +0 -2
  56. package/dist/src/fiat/FiatKycFieldControl.d.ts.map +1 -1
  57. package/dist/src/fiat/FiatKycIntroScreen.d.ts +14 -3
  58. package/dist/src/fiat/FiatKycIntroScreen.d.ts.map +1 -1
  59. package/dist/src/fiat/FiatKycOptionsScreen.d.ts +1 -1
  60. package/dist/src/fiat/FiatKycOptionsScreen.d.ts.map +1 -1
  61. package/dist/src/fiat/FiatKycOutcomeScreen.d.ts +8 -6
  62. package/dist/src/fiat/FiatKycOutcomeScreen.d.ts.map +1 -1
  63. package/dist/src/fiat/FiatKycPhoneField.d.ts +2 -3
  64. package/dist/src/fiat/FiatKycPhoneField.d.ts.map +1 -1
  65. package/dist/src/fiat/FiatOtpScreen.d.ts.map +1 -1
  66. package/dist/src/fiat/FiatPhoneField.d.ts +17 -4
  67. package/dist/src/fiat/FiatPhoneField.d.ts.map +1 -1
  68. package/dist/src/fiat/FiatReceipt.d.ts +9 -3
  69. package/dist/src/fiat/FiatReceipt.d.ts.map +1 -1
  70. package/dist/src/fiat/FiatRegionUnsupportedScreen.d.ts.map +1 -1
  71. package/dist/src/fiat/FiatSsnField.d.ts.map +1 -1
  72. package/dist/src/fiat/FiatSubmissionIndicator.d.ts +7 -1
  73. package/dist/src/fiat/FiatSubmissionIndicator.d.ts.map +1 -1
  74. package/dist/src/fiat/FiatTermsNotice.d.ts +4 -2
  75. package/dist/src/fiat/FiatTermsNotice.d.ts.map +1 -1
  76. package/dist/src/fiat/FiatUnsupportedStep.d.ts +11 -0
  77. package/dist/src/fiat/FiatUnsupportedStep.d.ts.map +1 -0
  78. package/dist/src/fiat/SurfaceSlot.d.ts +8 -3
  79. package/dist/src/fiat/SurfaceSlot.d.ts.map +1 -1
  80. package/dist/src/fiat/closeFailure.d.ts +19 -0
  81. package/dist/src/fiat/closeFailure.d.ts.map +1 -0
  82. package/dist/src/fiat/countryListEntries.d.ts +2 -3
  83. package/dist/src/fiat/countryListEntries.d.ts.map +1 -1
  84. package/dist/src/fiat/depositOutcome.d.ts +18 -1
  85. package/dist/src/fiat/depositOutcome.d.ts.map +1 -1
  86. package/dist/src/fiat/fieldLabel.d.ts +14 -0
  87. package/dist/src/fiat/fieldLabel.d.ts.map +1 -0
  88. package/dist/src/fiat/formLayout.d.ts +16 -3
  89. package/dist/src/fiat/formLayout.d.ts.map +1 -1
  90. package/dist/src/fiat/formValidationError.d.ts +4 -2
  91. package/dist/src/fiat/formValidationError.d.ts.map +1 -1
  92. package/dist/src/fiat/kycFailover.d.ts +6 -0
  93. package/dist/src/fiat/kycFailover.d.ts.map +1 -0
  94. package/dist/src/fiat/kycFormState.d.ts +12 -0
  95. package/dist/src/fiat/kycFormState.d.ts.map +1 -1
  96. package/dist/src/fiat/kycFormTheme.d.ts +8 -0
  97. package/dist/src/fiat/kycFormTheme.d.ts.map +1 -1
  98. package/dist/src/fiat/kycUnavailableAlert.d.ts.map +1 -1
  99. package/dist/src/fiat/legalLinks.d.ts +4 -3
  100. package/dist/src/fiat/legalLinks.d.ts.map +1 -1
  101. package/dist/src/fiat/otpScreenProps.d.ts.map +1 -1
  102. package/dist/src/fiat/paymentSurfaceFailure.d.ts +56 -0
  103. package/dist/src/fiat/paymentSurfaceFailure.d.ts.map +1 -0
  104. package/dist/src/fiat/phoneDraft.d.ts +20 -0
  105. package/dist/src/fiat/phoneDraft.d.ts.map +1 -1
  106. package/dist/src/fiat/postalCodeCountries.d.ts +16 -0
  107. package/dist/src/fiat/postalCodeCountries.d.ts.map +1 -0
  108. package/dist/src/fiat/providers/CoinbaseCheckoutSurface.d.ts +8 -2
  109. package/dist/src/fiat/providers/CoinbaseCheckoutSurface.d.ts.map +1 -1
  110. package/dist/src/fiat/providers/SumsubKycSurface.d.ts.map +1 -1
  111. package/dist/src/fiat/providers/TransakApplePaySurface.d.ts.map +1 -1
  112. package/dist/src/fiat/providers/adapter.d.ts +33 -5
  113. package/dist/src/fiat/providers/adapter.d.ts.map +1 -1
  114. package/dist/src/fiat/providers/applePayButtonMetrics.d.ts +1 -2
  115. package/dist/src/fiat/providers/applePayButtonMetrics.d.ts.map +1 -1
  116. package/dist/src/fiat/providers/applePayPaintGate.d.ts +5 -2
  117. package/dist/src/fiat/providers/applePayPaintGate.d.ts.map +1 -1
  118. package/dist/src/fiat/providers/banxaRedirect.d.ts.map +1 -1
  119. package/dist/src/fiat/providers/coinbaseApplePay.d.ts +2 -1
  120. package/dist/src/fiat/providers/coinbaseApplePay.d.ts.map +1 -1
  121. package/dist/src/fiat/providers/coinbaseFailureCopy.d.ts +7 -1
  122. package/dist/src/fiat/providers/coinbaseFailureCopy.d.ts.map +1 -1
  123. package/dist/src/fiat/providers/describeThrown.d.ts.map +1 -1
  124. package/dist/src/fiat/providers/kycIntro.d.ts +20 -0
  125. package/dist/src/fiat/providers/kycIntro.d.ts.map +1 -0
  126. package/dist/src/fiat/providers/moonpay.d.ts +6 -1
  127. package/dist/src/fiat/providers/moonpay.d.ts.map +1 -1
  128. package/dist/src/fiat/providers/moonpayApplePayPainted.d.ts +6 -3
  129. package/dist/src/fiat/providers/moonpayApplePayPainted.d.ts.map +1 -1
  130. package/dist/src/fiat/providers/moonpayApplePayStyle.d.ts +5 -10
  131. package/dist/src/fiat/providers/moonpayApplePayStyle.d.ts.map +1 -1
  132. package/dist/src/fiat/providers/moonpayAuthStyle.d.ts +19 -0
  133. package/dist/src/fiat/providers/moonpayAuthStyle.d.ts.map +1 -0
  134. package/dist/src/fiat/providers/moonpayFeeQuote.d.ts +26 -0
  135. package/dist/src/fiat/providers/moonpayFeeQuote.d.ts.map +1 -0
  136. package/dist/src/fiat/providers/stripeAuthorize.d.ts.map +1 -1
  137. package/dist/src/fiat/providers/stripeCheckout.d.ts.map +1 -1
  138. package/dist/src/fiat/providers/stripeKyc.d.ts +2 -0
  139. package/dist/src/fiat/providers/stripeKyc.d.ts.map +1 -1
  140. package/dist/src/fiat/providers/stripeKycIntro.d.ts +10 -0
  141. package/dist/src/fiat/providers/stripeKycIntro.d.ts.map +1 -0
  142. package/dist/src/fiat/providers/stripePayment.d.ts +2 -2
  143. package/dist/src/fiat/providers/stripePayment.d.ts.map +1 -1
  144. package/dist/src/fiat/providers/stripeRoundPush.d.ts +45 -0
  145. package/dist/src/fiat/providers/stripeRoundPush.d.ts.map +1 -0
  146. package/dist/src/fiat/providers/stripeSeamlessSignIn.d.ts +5 -0
  147. package/dist/src/fiat/providers/stripeSeamlessSignIn.d.ts.map +1 -1
  148. package/dist/src/fiat/providers/stripeSessionAuth.d.ts.map +1 -1
  149. package/dist/src/fiat/providers/sumsubKyc.d.ts.map +1 -1
  150. package/dist/src/fiat/providers/surfaceParams.d.ts +30 -0
  151. package/dist/src/fiat/providers/surfaceParams.d.ts.map +1 -0
  152. package/dist/src/fiat/providers/transakApplePay.d.ts.map +1 -1
  153. package/dist/src/fiat/providers/useStripeOnrampClient.d.ts +0 -10
  154. package/dist/src/fiat/providers/useStripeOnrampClient.d.ts.map +1 -1
  155. package/dist/src/fiat/providers/useStripeSessionAuth.d.ts +42 -0
  156. package/dist/src/fiat/providers/useStripeSessionAuth.d.ts.map +1 -0
  157. package/dist/src/fiat/providers/useWebViewTermination.d.ts +15 -0
  158. package/dist/src/fiat/providers/useWebViewTermination.d.ts.map +1 -0
  159. package/dist/src/fiat/quoteNoRoute.d.ts +11 -0
  160. package/dist/src/fiat/quoteNoRoute.d.ts.map +1 -0
  161. package/dist/src/fiat/renderCaptureSurface.d.ts +2 -0
  162. package/dist/src/fiat/renderCaptureSurface.d.ts.map +1 -1
  163. package/dist/src/fiat/sectionDetail.d.ts +8 -1
  164. package/dist/src/fiat/sectionDetail.d.ts.map +1 -1
  165. package/dist/src/fiat/shownFieldIssues.d.ts +17 -0
  166. package/dist/src/fiat/shownFieldIssues.d.ts.map +1 -0
  167. package/dist/src/fiat/stepDetails.d.ts +13 -14
  168. package/dist/src/fiat/stepDetails.d.ts.map +1 -1
  169. package/dist/src/fiat/subdivisions.d.ts +6 -0
  170. package/dist/src/fiat/subdivisions.d.ts.map +1 -1
  171. package/dist/src/fiat/useContactAutoSubmit.d.ts +20 -0
  172. package/dist/src/fiat/useContactAutoSubmit.d.ts.map +1 -0
  173. package/dist/src/fiat/useFiatCheckoutPreparation.d.ts +2 -1
  174. package/dist/src/fiat/useFiatCheckoutPreparation.d.ts.map +1 -1
  175. package/dist/src/fiat/useKycCaptureRound.d.ts +16 -0
  176. package/dist/src/fiat/useKycCaptureRound.d.ts.map +1 -0
  177. package/dist/src/fiat/useKycCompletion.d.ts.map +1 -1
  178. package/dist/src/fiat/useOtpAutoSubmit.d.ts +15 -2
  179. package/dist/src/fiat/useOtpAutoSubmit.d.ts.map +1 -1
  180. package/dist/src/fiat/useOtpReceipt.d.ts +3 -2
  181. package/dist/src/fiat/useOtpReceipt.d.ts.map +1 -1
  182. package/dist/src/fiat/useReceiptTitles.d.ts +6 -0
  183. package/dist/src/fiat/useReceiptTitles.d.ts.map +1 -0
  184. package/dist/src/flow/DepositAmountStep.d.ts.map +1 -1
  185. package/dist/src/flow/DepositAssetPicker.d.ts +4 -2
  186. package/dist/src/flow/DepositAssetPicker.d.ts.map +1 -1
  187. package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
  188. package/dist/src/flow/DepositReceivedToast.d.ts +2 -2
  189. package/dist/src/flow/DepositReceivedToast.d.ts.map +1 -1
  190. package/dist/src/flow/FeeDetailsSheet.d.ts +3 -1
  191. package/dist/src/flow/FeeDetailsSheet.d.ts.map +1 -1
  192. package/dist/src/flow/FiatDepositAmountStep.d.ts +11 -1
  193. package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
  194. package/dist/src/flow/FlowPage.d.ts +3 -0
  195. package/dist/src/flow/FlowPage.d.ts.map +1 -1
  196. package/dist/src/flow/FlowSheet.d.ts +10 -2
  197. package/dist/src/flow/FlowSheet.d.ts.map +1 -1
  198. package/dist/src/flow/FunkitFlowProvider.d.ts +3 -0
  199. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  200. package/dist/src/flow/SheetMaterial.d.ts +7 -6
  201. package/dist/src/flow/SheetMaterial.d.ts.map +1 -1
  202. package/dist/src/flow/WithdrawalFlowContent.d.ts.map +1 -1
  203. package/dist/src/flow/depositFlowConfig.d.ts +24 -7
  204. package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
  205. package/dist/src/flow/depositRailCopy.d.ts +2 -0
  206. package/dist/src/flow/depositRailCopy.d.ts.map +1 -1
  207. package/dist/src/flow/flowError.d.ts +3 -1
  208. package/dist/src/flow/flowError.d.ts.map +1 -1
  209. package/dist/src/flow/guardHostCallbacks.d.ts +8 -1
  210. package/dist/src/flow/guardHostCallbacks.d.ts.map +1 -1
  211. package/dist/src/flow/sheetPressHold.d.ts +24 -0
  212. package/dist/src/flow/sheetPressHold.d.ts.map +1 -0
  213. package/dist/src/flow/swipeBack.d.ts +30 -0
  214. package/dist/src/flow/swipeBack.d.ts.map +1 -0
  215. package/dist/src/flow/useDepositReceivedToast.d.ts.map +1 -1
  216. package/dist/src/flow/useFlowTransitions.d.ts +47 -0
  217. package/dist/src/flow/useFlowTransitions.d.ts.map +1 -0
  218. package/dist/src/flow/useKeyboardHeight.d.ts +2 -2
  219. package/dist/src/flow/useKeyboardHeight.d.ts.map +1 -1
  220. package/dist/src/flow/v2DepositCustomers.d.ts +2 -0
  221. package/dist/src/flow/v2DepositCustomers.d.ts.map +1 -0
  222. package/dist/src/flow/validateClientMetadata.d.ts.map +1 -1
  223. package/dist/src/hooks/usePressScale.d.ts +2 -6
  224. package/dist/src/hooks/usePressScale.d.ts.map +1 -1
  225. package/dist/src/icons/assetLogos.d.ts.map +1 -1
  226. package/dist/src/identity/IdentityContext.d.ts +8 -0
  227. package/dist/src/identity/IdentityContext.d.ts.map +1 -1
  228. package/dist/src/logging/datadogHttpLogTransport.d.ts +10 -3
  229. package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -1
  230. package/dist/src/logging/logger.d.ts.map +1 -1
  231. package/dist/src/native/glassEffect.d.ts +20 -0
  232. package/dist/src/native/glassEffect.d.ts.map +1 -1
  233. package/dist/src/preview/fixtures/kycForms.d.ts +45 -0
  234. package/dist/src/preview/fixtures/kycForms.d.ts.map +1 -0
  235. package/dist/src/preview/flowPreview.d.ts +142 -0
  236. package/dist/src/preview/flowPreview.d.ts.map +1 -0
  237. package/dist/src/preview/previewFetch.d.ts +10 -0
  238. package/dist/src/preview/previewFetch.d.ts.map +1 -0
  239. package/dist/src/preview/scenarioCatalog.d.ts +380 -0
  240. package/dist/src/preview/scenarioCatalog.d.ts.map +1 -0
  241. package/dist/src/preview/scenarios.d.ts +57 -0
  242. package/dist/src/preview/scenarios.d.ts.map +1 -0
  243. package/dist/src/providers/FunkitI18nProvider.d.ts +2 -0
  244. package/dist/src/providers/FunkitI18nProvider.d.ts.map +1 -1
  245. package/dist/src/providers/useFunkitCheckout.d.ts +6 -0
  246. package/dist/src/providers/useFunkitCheckout.d.ts.map +1 -1
  247. package/dist/src/screens/DepositAmountScreen.d.ts +9 -2
  248. package/dist/src/screens/DepositAmountScreen.d.ts.map +1 -1
  249. package/dist/src/screens/FeeDetailsScreen.d.ts.map +1 -1
  250. package/dist/src/screens/TokenAndChainPickerScreen.d.ts +3 -1
  251. package/dist/src/screens/TokenAndChainPickerScreen.d.ts.map +1 -1
  252. package/dist/src/screens/WithdrawCryptoSteps.d.ts.map +1 -1
  253. package/dist/src/screens/depositMetrics.d.ts +40 -3
  254. package/dist/src/screens/depositMetrics.d.ts.map +1 -1
  255. package/dist/src/swapped/SwappedWebView.d.ts.map +1 -1
  256. package/dist/src/theme/keyboardAppearance.d.ts +10 -0
  257. package/dist/src/theme/keyboardAppearance.d.ts.map +1 -0
  258. package/dist/src/theme/tokens.d.ts +4 -1
  259. package/dist/src/theme/tokens.d.ts.map +1 -1
  260. package/dist/src/transfer/depositAssets.d.ts +6 -4
  261. package/dist/src/transfer/depositAssets.d.ts.map +1 -1
  262. package/dist/src/transfer/hooks/useLockedTokenAmount.d.ts +19 -1
  263. package/dist/src/transfer/hooks/useLockedTokenAmount.d.ts.map +1 -1
  264. package/dist/src/transfer/hooks/useUDAParams.d.ts.map +1 -1
  265. package/dist/src/transfer/lockedQuoteSource.d.ts +23 -0
  266. package/dist/src/transfer/lockedQuoteSource.d.ts.map +1 -0
  267. package/dist/src/transfer/lockedTokenAmount.d.ts +25 -0
  268. package/dist/src/transfer/lockedTokenAmount.d.ts.map +1 -1
  269. package/dist/src/utils/formatAmount.d.ts +1 -0
  270. package/dist/src/utils/formatAmount.d.ts.map +1 -1
  271. package/dist/src/utils/motion.d.ts +6 -0
  272. package/dist/src/utils/motion.d.ts.map +1 -1
  273. package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts +3 -2
  274. package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts.map +1 -1
  275. package/ios/FrostedGlassView.swift +207 -0
  276. package/ios/FunkitGlassEffect.podspec +1 -1
  277. package/ios/FunkitGlassEffectModule.swift +42 -0
  278. package/package.json +14 -8
  279. package/dist/chunk-D64EJ57D.js.map +0 -7
  280. package/dist/chunk-J5K2FSAI.js.map +0 -7
  281. package/dist/src/components/ActionLoading.d.ts +0 -19
  282. package/dist/src/components/ActionLoading.d.ts.map +0 -1
  283. package/dist/src/fiat/FiatConsentCheck.d.ts +0 -11
  284. package/dist/src/fiat/FiatConsentCheck.d.ts.map +0 -1
  285. package/dist/src/fiat/FiatFormConsent.d.ts +0 -6
  286. package/dist/src/fiat/FiatFormConsent.d.ts.map +0 -1
  287. package/dist/src/fiat/FiatQuotePrice.d.ts +0 -12
  288. package/dist/src/fiat/FiatQuotePrice.d.ts.map +0 -1
  289. package/dist/src/fiat/providerFailover.d.ts +0 -12
  290. package/dist/src/fiat/providerFailover.d.ts.map +0 -1
  291. package/dist/src/fiat/providers/StripeSessionAuthController.d.ts +0 -29
  292. package/dist/src/fiat/providers/StripeSessionAuthController.d.ts.map +0 -1
  293. package/dist/src/fiat/providers/moonpayTrace.d.ts +0 -25
  294. package/dist/src/fiat/providers/moonpayTrace.d.ts.map +0 -1
  295. package/dist/src/fiat/useQuoteableCeiling.d.ts +0 -28
  296. package/dist/src/fiat/useQuoteableCeiling.d.ts.map +0 -1
  297. /package/dist/{chunk-GG2WCQ6N.js.map → chunk-3ZNAGQHD.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,189 @@
1
1
  # @funkit/connect-rn
2
2
 
3
+ ## 9.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - fb2c49d: Match MoonPay's Apple Pay button size to the app's button style
8
+
9
+ **Breaking:** `react-native-webview` peer dependency raised to `>=13.15.0`, required by MoonPay's SDK. Apps on 13.0–13.14 must upgrade `react-native-webview` before updating.
10
+
11
+ ### Minor Changes
12
+
13
+ - b8682b9: `onPaymentMethodPress` receives the amount the user has entered, with its currency.
14
+ - fb5996c: Add `hideFiatDeposit` to `FunkitConfig` to hide the cash funding options on the Add money screen (React Native only)
15
+ - 4b2e9ba: Report a deposit that ends on a provider refusal as `provider_unavailable` instead of `cancelled`.
16
+
17
+ ### Patch Changes
18
+
19
+ - 59d1eec: Fix Continue doing nothing when Coinbase asks to re-verify the phone before Apple Pay.
20
+ - a0e75ad: The phone and email verification heading matches the design: 24pt at full text colour.
21
+ - 2f2a64c: Stripe initialization failures now log the Stripe error instead of "[object Object]"
22
+ - 7a9c5a8: Deposit sheet logs record each sheet movement, to help diagnose a resume that shows no sheet.
23
+ - 8be3920: Keep the deposit sheet translucent on iOS 27 instead of rendering it as a solid black panel
24
+ - 41ae7fc: Log an error whenever a fiat step shows "This step isn't available yet"
25
+ - ab6c8a8: Fail and log a fiat payment page whose web view crashed or never loaded.
26
+ - 9ffe53d: Stop repeating fiat log records on every re-render.
27
+ - 76eb22c: Fix the deposit sheet not reopening after it is closed.
28
+ - 7cd38f7: Keep a deposit's closing log records on its trace.
29
+ - b33e619: Keep diagnostic logs that failed to send or were buffered when the app went to the background.
30
+ - dee74e5: A deposit session replaced by another `begin*` no longer reports errors or close to the host after the replacement opens.
31
+ - 2d378e2: `unstable_routingOverrides` is now accepted by production backends, so a host can pin quotes to chosen providers when testing against prod.
32
+ - df13498: Say when a phone number is already on too many Link accounts, instead of asking the buyer to check their details.
33
+ - 0bbc429: Fix withdrawals crashing on web when native keyboard APIs are unavailable.
34
+ - Updated dependencies [fb5996c]
35
+ - Updated dependencies [9ffe53d]
36
+ - Updated dependencies [ea451cf]
37
+ - Updated dependencies [2d378e2]
38
+ - @funkit/connect-core@8.5.1
39
+ - @funkit/api-base@8.5.3
40
+
41
+ ## 8.3.0
42
+
43
+ ### Minor Changes
44
+
45
+ - 6a8dead: Add `onPaymentMethodPress` to `useFunkitCheckout`: when set, the fiat amount screen shows the payment method as a pressable row and reports its press to the host.
46
+ - 04cb25b: Add `close`, `hide` and `resume` to `useFunkitCheckout`, so a host can close the flow, or step it off screen and bring the same session back.
47
+ - ecf32dd: Locked deposits show a buffered amount sized to meet the configured cap
48
+ - 1a9f6fb: Submit a pasted or autofilled phone number on its own, without a Continue tap.
49
+ - 19ca858: feat(connect-rn): open the deposit and withdrawal flows at any internal state via `@funkit/connect-rn/preview`
50
+ - 6ec4894: Swipe in from the left edge to go back a step on the fiat verification screens, and leaving KYC returns to the amount instead of closing the flow
51
+ - 28150c2: Banners over the deposit sheet can be dismissed by dragging them up.
52
+
53
+ ### Patch Changes
54
+
55
+ - ae29a94: Open Stripe's account-creation form without the "Let's verify your identity" consent page.
56
+ - f8aa110: The deposit amount stays in place when returning from OTP or KYC instead of replaying its typing animation
57
+ - ada407b: A failed Apple Pay sheet now raises the "temporarily unavailable" alert and re-presents the Apple Pay button instead of a "Try again" banner.
58
+ - 2ad6fd9: Coinbase Apple Pay shows its button after an amount change without another tap
59
+ - 8baa512: A Coinbase card or risk decline now raises its own alert with Contact Support and re-presents the Apple Pay button.
60
+ - d3d4ff6: Draw the typed email dark on the yellow field when the address is refused, so it stays readable on dark themes
61
+ - 9ad3c40: Say what to do when the contact screen can't send a verification code, and set the notice apart from Continue.
62
+ - 51d1612: Show country search results as one list that matches names from the start of a word
63
+ - e8a2534: Tapping above the keyboard on the phone and code screens no longer dismisses it
64
+ - 5b2d531: Fiat email, phone, code and KYC fields raise a dark keyboard on a dark modal
65
+ - 5f3e4ee: Stop the fiat code screen jittering just before a verified code moves on.
66
+ - ec723b4: Internal cleanup of the KYC chooser's chevron; no visual change.
67
+ - a423502: The KYC phone field no longer stacks a Done bar on top of the iOS number pad
68
+ - b3cf58c: A Stripe identity push that Stripe refuses because it already holds the buyer's identity now carries on to the backend instead of showing "We couldn't save your details with Stripe".
69
+ - 32a8819: Keep the fee drawer tall enough to cover the Apple Pay button
70
+ - 04a00ea: The fee drawer's dollar form now reads "Your deposit incurs a fee of $X…" above a plain "Fee" row.
71
+ - 1cc5fff: Show the "powered by Fun" mark in the fee drawer only when the fee is zero
72
+ - 984b09e: Show MoonPay fees, and any fee of 7% or more, as a dollar amount in the fee details instead of a percentage.
73
+ - be282ce: Offer Try again on the fiat amount screen when the buyer's currency lookup fails, instead of loading forever
74
+ - 07b3391: Stop offering "Try again" on the fiat amount screen when no provider can serve the buyer, their identity or their limit.
75
+ - 8cdbdef: The fiat deposit amount step takes its maximum from the quote and ignores `amountEntry.limitUsd`.
76
+ - 0d554e1: The fiat deposit amount step takes its minimum from the quote and ignores `amountEntry.minLimitUsd`.
77
+ - 5bf8392: Fiat flows now refresh a cached buyer ceiling only when the backend reports that a capacity-changing step may have moved it.
78
+ - e90e8d5: Use the theoretical fiat purchase limit, including zero, to avoid futile quotes.
79
+ - 7cdae1c: Terms footer links now match the body text's opacity and differ only by weight
80
+ - f17c6fc: Wait for the buyer's tap before leaving the amount screen for a verification, code or provider page
81
+ - 8c7f360: Match the verification-unavailable alerts to the design wording, including "Contact Support"
82
+ - 958454d: Keep the button and terms still when the iOS keyboard's suggestion row goes away.
83
+ - 953d83c: KYC address page highlights one refused field at a time (the State chooser included), checks a field as it is left, and says "Please check the address and try again."
84
+ - 4ebf582: Record KYC consent taps in the backend audit trail.
85
+ - 2197013: Draw KYC form dividers translucent, so the rule under a refused field reads on its yellow.
86
+ - f8d1699: Tell the buyer when a provider refused their identity and the flow requoted them to another provider, instead of switching silently
87
+ - 4e91313: No change to how the KYC form looks or behaves.
88
+ - 74d7497: Show the provider handoff toast once, on arrival, instead of again on every return to the amount screen
89
+ - 20e8f55: Draw the KYC form page headings in primary text, set the country pages' heading level with the name page, and point the country field chevron down
90
+ - 902e484: KYC hold screens now match the design and no longer show a raw ISO retry date, and the blocked-deposit screen no longer shows a bare retry date.
91
+ - ba38091: Internal cleanup of the KYC intro screen; no visible change.
92
+ - 1a60f81: Label the additional-verification KYC intro button "Continue" instead of "Agree & Continue"
93
+ - e951485: Strip the country code from a typed, autofilled or pasted phone number in the KYC form, stop taking digits past the longest number the country issues, and format US numbers as (408) 460-6031.
94
+ - b647c9a: Request a fresh fiat quote after a KYC refusal that explicitly calls for requoting; preserve the existing outcome for permanent refusals. Show identity options only when verification or its provider failover cannot proceed. Preserve structured 404 response details so the client can distinguish an exhausted KYC route from a retryable quote failure.
95
+ - 2a8da3d: The KYC purpose page now asks for your purpose for this transaction
96
+ - be496cc: Keep the KYC receipt's support link and action in place when its title changes, and crossfade the change.
97
+ - d583323: Add a Recheck verification option to the KYC options card while a verification is in review or on hold
98
+ - c650759: The KYC name and address keyboards step over optional lines and show "next" on every field.
99
+ - 204c71c: Stop showing "being reviewed" after a KYC review's poll has moved on to a price or the next check.
100
+ - d65bce3: Show the next identity form when a KYC review's poll lands on one, instead of an on-hold screen over it.
101
+ - 204c71c: Keep one "we're reviewing your information" screen up while a KYC review's poll runs, and show it as a hold only if the poll gives up.
102
+ - c6d0607: Hold back the KYC form's pending spinner so quick submissions no longer flash it.
103
+ - a06470e: Render the KYC intro and questionnaire titles in semibold under a custom host font.
104
+ - 8c6ba8f: The deposit sheet can be swiped down while an identity verification result is showing.
105
+ - 8c49acc: Internal lint cleanup; no behavior change.
106
+ - 7691344: Show MoonPay Apple Pay sooner by reusing the authenticated SDK session during the same foreground checkout attempt.
107
+ - 56d37e2: The amount screen's minimum notice and "Change to minimum" use the provider's reported minimum once a quote is refused below it.
108
+ - cb050b8: Log whether a MoonPay Apple Pay checkout used its prepared payment.
109
+ - 6f7fef4: Wait for MoonPay verification before showing a MoonPay challenge on Apple Pay.
110
+ - 7185c0e: Mount MoonPay Apple Pay surfaces while backend verification runs to shorten checkout loading.
111
+ - 5e5f35c: The MoonPay sign-in and terms pages have a back button to return to the deposit amount
112
+ - 5e5f35c: The MoonPay sign-in and terms pages follow the host app's theme
113
+ - 3b85bb2: Verification codes typed a digit at a time now wait for Continue, while a pasted or autofilled code still submits on its own.
114
+ - e636ef3: The one-time code screen always reads "Enter the code sent to" with the phone or email on its own line, and a long email address no longer breaks mid-domain
115
+ - d1449f7: Resending a one-time code empties the boxes at the tap and brings the number pad back up on the first box.
116
+ - f335e54: The code screen's "Need a new code? Resend" row lines up with the heading, sits further below the boxes, and sets "Resend" in medium weight.
117
+ - 78e1d15: Start the fiat code screen on empty boxes when a new round or a different destination asks for the code.
118
+ - 4a5d627: Keep the phone screen's Continue button above the keyboard after a contact suggestion fills the number.
119
+ - 47f4434: The phone field no longer accepts a return key, so its number pad can never draw the iOS Done bar.
120
+ - 99a1647: Draw the deposit action's waiting state with the same button as the action itself, with no visual change.
121
+ - 65b0281: Open the KYC postal code field on the number pad for countries whose postal codes are digits only.
122
+ - ce84c2f: Buttons spring under the finger with retuned depth and dim, and pressing one no longer drags the drawer beneath it.
123
+ - c5b34c6: Pick the fiat terms notice copy from the quoted provider, not only the document link
124
+ - f0ab5b7: fix(connect-rn): quick-amount pills show their background on iOS
125
+ - 7691344: Keep Coinbase checkout behind the payment tap and measure Apple Pay button readiness across providers.
126
+ - 16907d2: A contact the server refuses is highlighted and handed back with the keyboard up, ready to correct.
127
+ - f2ebb0c: Remove internal modules that nothing imported; no exported API changes.
128
+ - 827ec3d: Show the soft-rejection options when an ID check fails, and let the buyer retry Stripe's verification
129
+ - 2c2d9c1: Tapping anywhere on the country and state search pill now focuses the search field
130
+ - e2505f7: Clear the KYC state field when the residence country changes to one that does not list it.
131
+ - 3684f6d: KYC form copy follows the design: legal name labels, citizenship and address country pages with notes, country-aware state and postal code labels, and a clearer age requirement.
132
+ - ed7f0de: Shorten the helper lines on the KYC citizenship and address country pages
133
+ - a6975f6: refactor(connect-rn): internal move of the KYC form fixtures; no consumer-facing changes
134
+ - a92aeab: Default fiat deposit quick-amount pills are now $20 / $50 / $100 / $200.
135
+ - d19a865: Pre-load a returning buyer's own deposit maximum from payment-method discovery before the first quote
136
+ - 8082cd5: Selected integrations open the V2 deposit flow without waiting on remote config
137
+ - bb06636: Log and refuse a fiat provider URL that is not a well-formed https link.
138
+ - ae29a94: Skip identity fields an earlier round of the session already answered, and send their values without asking again.
139
+ - e9b4ad5: Show Continue on the KYC SSN page before it is filled, and raise a digits-only keypad for the SSN on iOS
140
+ - 6b7187c: Fix the deposit sheet freezing the app behind an empty backdrop when Add money is tapped while the previous sheet is still closing.
141
+ - 134a81a: Closing Stripe's Apple Pay sheet brings the Apple Pay button straight back on the same quote, instead of waiting on a fresh one
142
+ - 8baa512: Closing the Stripe Apple Pay sheet now brings back the Apple Pay button instead of a "Try again" button
143
+ - e340bbb: Show one loading state while Stripe opens Apple Pay, Link or ID verification.
144
+ - ee7413d: Show the loading state on the Stripe KYC form's Continue button as soon as it is tapped
145
+ - 4f98309: Keep the ID verification intro on screen, with a loading button, while Stripe's sheet opens
146
+ - dacacdd: Sign the Stripe Link session back in before sending KYC details, so a relaunched app no longer fails with "couldn't save your details with Stripe".
147
+ - bd38c54: Open Stripe's quick follow-up verification on "We need a little more info", and reword the notice after a verification handoff.
148
+ - 98e7984: Show the "We need a little more info" screen before Stripe's L2 ID check
149
+ - b06d194: Stop the page turn when Stripe's Link sign-in opens. The round no longer draws a copy of the quote as a page of its own, so the flow does not turn to that copy and back as the sheet appears.
150
+ - 9853d66: Draw the Stripe Link sheets in the Funkit theme's light or dark mode, not the phone's
151
+ - 0ab8164: Stripe's processing waits after Apple Pay are one page now: the title changes between them instead of the screen swiping
152
+ - 0ab8164: The Stripe processing screen says which step it is waiting on: confirming the payment, completing the purchase, then processing the deposit
153
+ - 0ab8164: A Stripe Apple Pay deposit shows one processing screen from the moment Apple Pay closes until the order settles, instead of returning to the quote between steps
154
+ - eaef73a: Keep the quote screen up with a loading "Continue in Stripe" button while Stripe's Link and Apple Pay sheets open.
155
+ - d65bce3: Push a Stripe step-up identity form to Stripe even when an earlier identity form already pushed.
156
+ - 816a1cb: Fix withdrawal Use Max backgrounds and locked deposit Copy labels to respect button theme overrides.
157
+ - 1ffc17a: Match the Apple Pay deposit-received toast to the design: a rounded glass card instead of a black capsule.
158
+ - 443cbc7: Accept Solana deposit-address routes whose target asset is a Solana mint.
159
+ - 9dabfc6: Show crypto withdrawal amounts after entry in the configured display currency: the recipient step's title and receive summary, the transaction breakdown, the success screen, and the below-minimum message.
160
+ - 6d47c89: Keep withdrawal source details visible above Continue on mobile and display the EURC logo.
161
+ - Updated dependencies [f285f3e]
162
+ - Updated dependencies [25bf89e]
163
+ - Updated dependencies [e2505f7]
164
+ - Updated dependencies [00bee30]
165
+ - Updated dependencies [07b3391]
166
+ - Updated dependencies [dfe1f5a]
167
+ - Updated dependencies [5bf8392]
168
+ - Updated dependencies [7691344]
169
+ - Updated dependencies [e90e8d5]
170
+ - Updated dependencies [d3257dc]
171
+ - Updated dependencies [020e9d7]
172
+ - Updated dependencies [4ebf582]
173
+ - Updated dependencies [b647c9a]
174
+ - Updated dependencies [e9bb068]
175
+ - Updated dependencies [7185c0e]
176
+ - Updated dependencies [78e1d15]
177
+ - Updated dependencies [f2ebb0c]
178
+ - Updated dependencies [19ca858]
179
+ - Updated dependencies [8082cd5]
180
+ - Updated dependencies [56d37e2]
181
+ - Updated dependencies [443cbc7]
182
+ - @funkit/api-base@8.5.2
183
+ - @funkit/connect-core@8.5.0
184
+ - @funkit/chains@2.4.2
185
+ - @funkit/utils@5.0.2
186
+
3
187
  ## 8.2.0
4
188
 
5
189
  ### Minor Changes
package/README.md CHANGED
@@ -70,6 +70,15 @@ zeros, or `beginDeposit` throws `FunkitMisconfiguredError` before opening.
70
70
  The field is optional in the SDK; Betty's backend requires it with the payment
71
71
  IDs and rejects a different cap or destination when reusing the same payment ID.
72
72
 
73
+ When `lockAmount` is set and this cap is supplied, the transfer screen sizes the
74
+ amount to send from a routing quote for the selected source token: the price-feed
75
+ estimate is quoted, scaled so the route delivers the cap, rounded up, then grown by
76
+ the `lockeddepositbufferbps` Statsig config (default 30 bps, targetable per
77
+ customer via the Statsig user's `apiKey`). If the quote or its route inputs are
78
+ unavailable, the screen falls back to the price-feed estimate plus the same
79
+ buffer and logs a warning.
80
+ Locked deposits without this cap keep the plain price-feed estimate.
81
+
73
82
  ## MoonPay crypto setup
74
83
 
75
84
  MoonPay requires a secure `globalThis.crypto.getRandomValues` implementation on
@@ -219,18 +228,22 @@ view is.
219
228
  The V2 deposit sheet and the drawers over it (fee details, country list, KYC
220
229
  choosers) are drawn on glass: the design's Figma layer is a dark fill with a
221
230
  **Glass** effect, which is iOS 26's Liquid Glass. The SDK ships that material
222
- itself (`src/flow/SheetMaterial.tsx`): an `expo-blur` blur of the host app with
223
- the SDK's own Liquid Glass view refracting through it. The tint is the
224
- material's — every surface renders it as is, and none passes one in.
225
-
226
- The glass view is a native module this package carries under `ios/`
227
- (`FunkitGlassEffect`, forked from `expo-glass-effect` with iOS 26's
228
- container-concentric corners added, so the slab's corners match the device's).
229
- Expo autolinking picks it up from `expo-module.config.json`; a host rebuilds
230
- its binary once after upgrading. Where the pod isn't linked — Android, Expo Go,
231
- a binary built before the upgrade — `src/native/glassEffect.ts` reads the
232
- module as absent, the blur stands alone, and each surface paints its fill over
233
- it, as the blur path always has.
231
+ itself (`src/flow/SheetMaterial.tsx`): a blur of the host app with Liquid Glass
232
+ refracting through it, drawn by one native view, `FrostedGlassView`, so the
233
+ blur and the glass share a single corner. The tint is the material's — every
234
+ surface renders it as is, and none passes one in. The deposit-received toast
235
+ draws its card on the same view.
236
+
237
+ The view lives in a native module this package carries under `ios/`
238
+ (`FunkitGlassEffect`). It also exports `GlassView`, forked from
239
+ `expo-glass-effect` with iOS 26's container-concentric corners added, which the
240
+ SDK uses alone for controls floating over content. Expo autolinking picks the
241
+ module up from `expo-module.config.json`; a host rebuilds its binary once after
242
+ upgrading. Below iOS 26 `FrostedGlassView` draws the blur without glass. Where
243
+ the pod isn't linked — Android, Expo Go, a binary built before the upgrade —
244
+ `src/native/glassEffect.ts` reads the module as absent and the surfaces draw
245
+ an `expo-blur` blur instead. Wherever there is no glass, each surface paints
246
+ its fill over the blur.
234
247
 
235
248
  `expo` and `expo-blur` are peer dependencies for this. A host that wants a
236
249
  different native material still has `FunkitProvider`'s `renderBackdropBlur`,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useFunkitIdentity
3
- } from "./chunk-J5K2FSAI.js";
3
+ } from "./chunk-MVQH4YFI.js";
4
4
  import {
5
5
  logger
6
- } from "./chunk-D64EJ57D.js";
6
+ } from "./chunk-ZE77GVDW.js";
7
7
 
8
8
  // src/statsig/useDynamicConfig.ts
9
9
  import {
@@ -110,4 +110,4 @@ export {
110
110
  useIsStablecoin,
111
111
  useSourceTokenUsdPrice
112
112
  };
113
- //# sourceMappingURL=chunk-GG2WCQ6N.js.map
113
+ //# sourceMappingURL=chunk-3ZNAGQHD.js.map
@@ -0,0 +1,319 @@
1
+ // src/preview/flowPreview.tsx
2
+ import {
3
+ createContext,
4
+ useContext,
5
+ useEffect,
6
+ useMemo,
7
+ useState
8
+ } from "react";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var HostPreviewContext = createContext(void 0);
11
+ function FunkitFlowPreview({
12
+ seed,
13
+ children
14
+ }) {
15
+ return /* @__PURE__ */ jsx(HostPreviewContext.Provider, { value: seed, children });
16
+ }
17
+ function useHostFlowPreview() {
18
+ return useContext(HostPreviewContext);
19
+ }
20
+ var NO_PREVIEW = {};
21
+ var ActivePreviewContext = createContext(NO_PREVIEW);
22
+ function ActiveFlowPreview({
23
+ deposit,
24
+ withdrawal,
25
+ children
26
+ }) {
27
+ const preview = useMemo(
28
+ () => deposit === void 0 && withdrawal === void 0 ? NO_PREVIEW : { deposit, withdrawal },
29
+ [deposit, withdrawal]
30
+ );
31
+ return /* @__PURE__ */ jsx(ActivePreviewContext.Provider, { value: preview, children });
32
+ }
33
+ var SEED = {
34
+ fiatAmount: (p) => p.deposit?.fiat?.amount,
35
+ fiatStep: (p) => p.deposit?.fiat?.step,
36
+ fiatPressEntry: (p) => p.deposit?.fiat?.pressEntry,
37
+ fiatSubmitOnOpen: (p) => p.deposit?.fiat?.submitOnOpen,
38
+ fiatSurfaceFailure: (p) => p.deposit?.fiat?.surfaceFailure,
39
+ kycCompletion: (p) => p.deposit?.fiat?.kycCompletion,
40
+ identityPage: (p) => p.deposit?.fiat?.identity?.page,
41
+ identitySection: (p) => {
42
+ const identity = p.deposit?.fiat?.identity;
43
+ return identity?.page === "form" ? identity.section : void 0;
44
+ },
45
+ documentStarted: (p) => p.deposit?.fiat?.documentStarted,
46
+ depositChainId: (p) => p.deposit?.chainId,
47
+ withdrawalMethodId: (p) => p.withdrawal?.methodId,
48
+ withdrawalAmount: (p) => p.withdrawal?.amount,
49
+ withdrawalRecipient: (p) => p.withdrawal?.recipient,
50
+ withdrawalComplete: (p) => p.withdrawal?.complete,
51
+ withdrawalExecutionError: (p) => p.withdrawal?.executionError
52
+ };
53
+ var readers = /* @__PURE__ */ new WeakMap();
54
+ function useSeed(pick) {
55
+ const preview = useContext(ActivePreviewContext);
56
+ const [seed] = useState(
57
+ () => readers.get(preview)?.has(pick) === true ? void 0 : pick(preview)
58
+ );
59
+ useEffect(() => {
60
+ if (preview === NO_PREVIEW) {
61
+ return;
62
+ }
63
+ const read = readers.get(preview) ?? /* @__PURE__ */ new Set();
64
+ read.add(pick);
65
+ readers.set(preview, read);
66
+ }, [preview, pick]);
67
+ return seed;
68
+ }
69
+ function useSeededState(pick, initial, fromSeed) {
70
+ const seed = useSeed(pick);
71
+ return useState(() => {
72
+ if (seed === void 0) {
73
+ return initial;
74
+ }
75
+ return fromSeed === void 0 ? seed : fromSeed(seed);
76
+ });
77
+ }
78
+
79
+ // src/fiat/formLayout.ts
80
+ import { Platform } from "react-native";
81
+
82
+ // src/fiat/keyboardReturnKey.ts
83
+ var PADS_WITHOUT_RETURN_KEY = /* @__PURE__ */ new Set([
84
+ "number-pad",
85
+ "numeric",
86
+ "decimal-pad",
87
+ "phone-pad"
88
+ ]);
89
+
90
+ // src/fiat/postalCodeCountries.ts
91
+ var codes = (list) => new Set(list.trim().split(/\s+/));
92
+ var DIGIT_COUNTRIES = codes(`
93
+ AF AL AM AS AT AU AX AZ BA BD BE BG BH BL BT BY CC CH CL CN CO CU CV
94
+ CX CY DE DK DO DZ EC EE EG EH ES ET FI FM FO FR GE GF GL GN GP GT GU
95
+ GW HM HN HR HT HU ID IL IN IQ IS IT JO KE KG KH KR KW KZ LA LI LK LR
96
+ LS LT LU MA MC MD ME MF MG MH MK MM MN MP MQ MV MX MY MZ NA NC NE NF
97
+ NG NO NP NZ PF PG PH PK PM PR PW PY RE RO RS RU SA SD SG SI SJ SM SN
98
+ TH TJ TM TN TR TW TZ UA UM US UY UZ VA VE VI VN WF XK YT ZA ZM
99
+ `);
100
+ var SEPARATED_COUNTRIES = codes(`
101
+ BR CR CZ GR IR JP LB PL PT SE SK
102
+ `);
103
+ function postalCodeForm(alpha2) {
104
+ const code = alpha2?.toUpperCase();
105
+ if (code === void 0) {
106
+ return void 0;
107
+ }
108
+ if (DIGIT_COUNTRIES.has(code)) {
109
+ return "digits";
110
+ }
111
+ return SEPARATED_COUNTRIES.has(code) ? "separated" : void 0;
112
+ }
113
+
114
+ // src/fiat/formLayout.ts
115
+ var GROSS_ANNUAL_INCOME = "QUESTIONNAIRE_RESPONSE:customerDueDiligence:grossAnnualIncome";
116
+ var EXPECTED_AMOUNT_PER_MONTH = "QUESTIONNAIRE_RESPONSE:customerDueDiligence:expectedTransactionAmountPerMonth";
117
+ var TRANSACTIONS_PER_MONTH = "QUESTIONNAIRE_RESPONSE:customerDueDiligence:transactionFrequencyPerMonth";
118
+ var SECTION_BY_ID = {
119
+ // 1508:2616 — "First name", "M.I.", "Last Name".
120
+ LEGAL_FIRST_NAME: "NAME",
121
+ LEGAL_MIDDLE_NAME: "NAME",
122
+ LEGAL_LAST_NAME: "NAME",
123
+ // 1844:17471 — its own page, asked for on its own over the date picker.
124
+ DATE_OF_BIRTH: "DOB",
125
+ NATIONALITY: "NATIONALITY",
126
+ // 1631:7256 — "Address", "Apartment, suite, etc.", "City", "State", "ZIP code".
127
+ RESIDENTIAL_ADDRESS_LINE_1: "ADDRESS",
128
+ RESIDENTIAL_ADDRESS_LINE_2: "ADDRESS",
129
+ RESIDENTIAL_ADDRESS_CITY: "ADDRESS",
130
+ RESIDENTIAL_ADDRESS_REGION: "ADDRESS",
131
+ RESIDENTIAL_ADDRESS_POSTAL_CODE: "ADDRESS",
132
+ RESIDENTIAL_ADDRESS_COUNTRY: "COUNTRY",
133
+ // 1631:7883 — "SSN".
134
+ TAX_IDENTIFIER: "SSN",
135
+ TAX_RESIDENCE_COUNTRY: "COUNTRY",
136
+ OCCUPATION_TITLE: "OCCUPATION",
137
+ OCCUPATION_INDUSTRY: "OCCUPATION",
138
+ PURPOSE_OF_TRANSACTION: "PURPOSE",
139
+ PURPOSE_OF_SERVICE: "PURPOSE",
140
+ // MoonPay's customer due diligence round, asked after the SSN.
141
+ PHONE_NUMBER: "PHONE",
142
+ EMPLOYMENT_STATUS: "EMPLOYMENT",
143
+ SOURCE_OF_WEALTH_DECLARATION: "SOURCE_OF_WEALTH",
144
+ [GROSS_ANNUAL_INCOME]: "INCOME",
145
+ [EXPECTED_AMOUNT_PER_MONTH]: "ACTIVITY",
146
+ [TRANSACTIONS_PER_MONTH]: "ACTIVITY"
147
+ };
148
+ var KEYBOARD_BY_ID = {
149
+ TAX_IDENTIFIER: "number-pad",
150
+ PHONE_NUMBER: "phone-pad",
151
+ [GROSS_ANNUAL_INCOME]: "decimal-pad",
152
+ [EXPECTED_AMOUNT_PER_MONTH]: "decimal-pad",
153
+ [TRANSACTIONS_PER_MONTH]: "number-pad"
154
+ };
155
+ var DRAWN_TYPES = /* @__PURE__ */ new Set(["TEXT", "SELECT", "DATE", "COUNTRY"]);
156
+ var GROUPED_SECTIONS = /* @__PURE__ */ new Set(["ADDRESS"]);
157
+ var SECTION_ORDER = [
158
+ "NAME",
159
+ "DOB",
160
+ "NATIONALITY",
161
+ "COUNTRY",
162
+ "ADDRESS",
163
+ "SSN",
164
+ "PHONE",
165
+ "OCCUPATION",
166
+ "EMPLOYMENT",
167
+ "PURPOSE",
168
+ "SOURCE_OF_WEALTH",
169
+ "INCOME",
170
+ "ACTIVITY",
171
+ "DETAILS"
172
+ ];
173
+ var IDENTITY_SECTIONS = /* @__PURE__ */ new Set([
174
+ "NAME",
175
+ "DOB",
176
+ "NATIONALITY",
177
+ "COUNTRY",
178
+ "ADDRESS",
179
+ "SSN"
180
+ ]);
181
+ function isIdentityField(field) {
182
+ const section = SECTION_BY_ID[field.id];
183
+ return section !== void 0 && IDENTITY_SECTIONS.has(section);
184
+ }
185
+ var INLINE_CHOICE_SECTIONS = /* @__PURE__ */ new Set([
186
+ "OCCUPATION",
187
+ "EMPLOYMENT",
188
+ "PURPOSE",
189
+ "SOURCE_OF_WEALTH"
190
+ ]);
191
+ function isInlineChoiceSection(section) {
192
+ return INLINE_CHOICE_SECTIONS.has(section);
193
+ }
194
+ function pickedDateField(page) {
195
+ const fields = page.rows.flat();
196
+ const only = fields.length === 1 ? fields[0] : void 0;
197
+ return only?.type === "DATE" ? only : void 0;
198
+ }
199
+ function isFocusableField(field) {
200
+ return field.type === "TEXT" || field.type === "DATE";
201
+ }
202
+ var NEXT_TO_TRY_SECTIONS = /* @__PURE__ */ new Set([
203
+ "NAME",
204
+ "ADDRESS"
205
+ ]);
206
+ function returnHop(section, typedFields, fieldId) {
207
+ const at = typedFields.findIndex((field) => field.id === fieldId);
208
+ if (at < 0) {
209
+ return void 0;
210
+ }
211
+ const to = typedFields.slice(at + 1).find((field) => field.required);
212
+ if (to !== void 0) {
213
+ return { label: "next", to };
214
+ }
215
+ return { label: NEXT_TO_TRY_SECTIONS.has(section) ? "next" : "done" };
216
+ }
217
+ var POSTAL_CODE_KEYBOARD = {
218
+ digits: "number-pad",
219
+ separated: Platform.OS === "ios" ? "numbers-and-punctuation" : void 0
220
+ };
221
+ function fieldKeyboardType(field, country) {
222
+ if (field.type !== "TEXT") {
223
+ return void 0;
224
+ }
225
+ if (field.id === "RESIDENTIAL_ADDRESS_POSTAL_CODE") {
226
+ const form = postalCodeForm(country);
227
+ return form === void 0 ? void 0 : POSTAL_CODE_KEYBOARD[form];
228
+ }
229
+ return KEYBOARD_BY_ID[field.id];
230
+ }
231
+ function isDigitsField(field, country) {
232
+ const keyboardType = fieldKeyboardType(field, country);
233
+ return keyboardType !== void 0 && PADS_WITHOUT_RETURN_KEY.has(keyboardType);
234
+ }
235
+ function isFixedWidthField(field) {
236
+ return field.id === "LEGAL_MIDDLE_NAME";
237
+ }
238
+ function unsupportedFields(fields) {
239
+ return fields.filter((field) => !DRAWN_TYPES.has(field.type));
240
+ }
241
+ function sectionPages(fields) {
242
+ const bySection = /* @__PURE__ */ new Map();
243
+ for (const field of fields) {
244
+ if (!DRAWN_TYPES.has(field.type)) {
245
+ continue;
246
+ }
247
+ if (field.id === "RESIDENTIAL_ADDRESS_REGION" && !field.required) {
248
+ continue;
249
+ }
250
+ const section = SECTION_BY_ID[field.id] ?? "DETAILS";
251
+ const collected = bySection.get(section) ?? [];
252
+ collected.push(field);
253
+ bySection.set(section, collected);
254
+ }
255
+ return SECTION_ORDER.flatMap((section) => {
256
+ const collected = bySection.get(section);
257
+ if (collected === void 0) {
258
+ return [];
259
+ }
260
+ if (isInlineChoiceSection(section) || section === "DETAILS") {
261
+ return collected.map((field) => ({
262
+ section,
263
+ grouped: false,
264
+ rows: [[field]]
265
+ }));
266
+ }
267
+ return [
268
+ {
269
+ section,
270
+ grouped: GROUPED_SECTIONS.has(section),
271
+ rows: section === "ADDRESS" ? addressRows(collected) : collected.map((field) => [field])
272
+ }
273
+ ];
274
+ });
275
+ }
276
+ function addressRows(fields) {
277
+ const byId = new Map(fields.map((field) => [field.id, field]));
278
+ const take = (id) => {
279
+ const field = byId.get(id);
280
+ byId.delete(id);
281
+ return field;
282
+ };
283
+ const line1 = take("RESIDENTIAL_ADDRESS_LINE_1");
284
+ const line2 = take("RESIDENTIAL_ADDRESS_LINE_2");
285
+ const city = take("RESIDENTIAL_ADDRESS_CITY");
286
+ const region = take("RESIDENTIAL_ADDRESS_REGION");
287
+ const postal = take("RESIDENTIAL_ADDRESS_POSTAL_CODE");
288
+ const rows = [[line1], [line2]];
289
+ if (region === void 0) {
290
+ rows.push([postal, city]);
291
+ } else {
292
+ rows.push([city], [region, postal]);
293
+ }
294
+ return [...rows, ...[...byId.values()].map((field) => [field])].map((row) => row.filter((field) => field !== void 0)).filter((row) => row.length > 0);
295
+ }
296
+
297
+ export {
298
+ FunkitFlowPreview,
299
+ useHostFlowPreview,
300
+ ActiveFlowPreview,
301
+ SEED,
302
+ useSeed,
303
+ useSeededState,
304
+ PADS_WITHOUT_RETURN_KEY,
305
+ GROSS_ANNUAL_INCOME,
306
+ EXPECTED_AMOUNT_PER_MONTH,
307
+ TRANSACTIONS_PER_MONTH,
308
+ isIdentityField,
309
+ isInlineChoiceSection,
310
+ pickedDateField,
311
+ isFocusableField,
312
+ returnHop,
313
+ fieldKeyboardType,
314
+ isDigitsField,
315
+ isFixedWidthField,
316
+ unsupportedFields,
317
+ sectionPages
318
+ };
319
+ //# sourceMappingURL=chunk-BC4RXFI7.js.map