@funkit/connect-rn 8.1.0 → 8.3.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 (329) hide show
  1. package/CHANGELOG.md +167 -0
  2. package/README.md +29 -0
  3. package/dist/chunk-BC4RXFI7.js +319 -0
  4. package/dist/chunk-BC4RXFI7.js.map +7 -0
  5. package/dist/{chunk-4YNYOJJK.js → chunk-KDRCHYXB.js} +377 -154
  6. package/dist/chunk-KDRCHYXB.js.map +7 -0
  7. package/dist/{chunk-75U7A2Q5.js → chunk-Z6IQFV5E.js} +3 -3
  8. package/dist/{chunk-75U7A2Q5.js.map → chunk-Z6IQFV5E.js.map} +2 -2
  9. package/dist/{chunk-D64EJ57D.js → chunk-ZIT24GW5.js} +1 -1
  10. package/dist/chunk-ZIT24GW5.js.map +7 -0
  11. package/dist/clients/lighter.js +2 -2
  12. package/dist/clients/nado.js +3 -3
  13. package/dist/clients/solana.js +1 -1
  14. package/dist/index.d.ts +1 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +10582 -6262
  17. package/dist/index.js.map +4 -4
  18. package/dist/preview.d.ts +5 -0
  19. package/dist/preview.d.ts.map +1 -0
  20. package/dist/preview.js +1159 -0
  21. package/dist/preview.js.map +7 -0
  22. package/dist/src/components/BlurBand.d.ts +14 -0
  23. package/dist/src/components/BlurBand.d.ts.map +1 -0
  24. package/dist/src/components/DepositActionMotion.d.ts +4 -1
  25. package/dist/src/components/DepositActionMotion.d.ts.map +1 -1
  26. package/dist/src/components/DismissibleToast.d.ts +35 -0
  27. package/dist/src/components/DismissibleToast.d.ts.map +1 -0
  28. package/dist/src/components/GlassSurface.d.ts +16 -0
  29. package/dist/src/components/GlassSurface.d.ts.map +1 -0
  30. package/dist/src/components/PillButton.d.ts +20 -2
  31. package/dist/src/components/PillButton.d.ts.map +1 -1
  32. package/dist/src/components/ScrollingDots.d.ts +24 -0
  33. package/dist/src/components/ScrollingDots.d.ts.map +1 -0
  34. package/dist/src/components/StateSwap.d.ts +17 -0
  35. package/dist/src/components/StateSwap.d.ts.map +1 -0
  36. package/dist/src/components/WithdrawSourceCard.d.ts.map +1 -1
  37. package/dist/src/components/v2/AmountDisplay.d.ts.map +1 -1
  38. package/dist/src/components/v2/PaymentMethodPicker.d.ts +18 -0
  39. package/dist/src/components/v2/PaymentMethodPicker.d.ts.map +1 -0
  40. package/dist/src/components/v2/QuickAmountsRow.d.ts.map +1 -1
  41. package/dist/src/fiat/FiatBackButton.d.ts +9 -1
  42. package/dist/src/fiat/FiatBackButton.d.ts.map +1 -1
  43. package/dist/src/fiat/FiatBirthDateField.d.ts.map +1 -1
  44. package/dist/src/fiat/FiatChoiceField.d.ts +9 -1
  45. package/dist/src/fiat/FiatChoiceField.d.ts.map +1 -1
  46. package/dist/src/fiat/FiatContactScreen.d.ts.map +1 -1
  47. package/dist/src/fiat/FiatCountrySheet.d.ts +22 -7
  48. package/dist/src/fiat/FiatCountrySheet.d.ts.map +1 -1
  49. package/dist/src/fiat/FiatDocumentCaptureStep.d.ts +8 -2
  50. package/dist/src/fiat/FiatDocumentCaptureStep.d.ts.map +1 -1
  51. package/dist/src/fiat/FiatFailureBanner.d.ts +4 -1
  52. package/dist/src/fiat/FiatFailureBanner.d.ts.map +1 -1
  53. package/dist/src/fiat/FiatFormAdvance.d.ts.map +1 -1
  54. package/dist/src/fiat/FiatFormFieldRow.d.ts +15 -1
  55. package/dist/src/fiat/FiatFormFieldRow.d.ts.map +1 -1
  56. package/dist/src/fiat/FiatFormHeading.d.ts +21 -0
  57. package/dist/src/fiat/FiatFormHeading.d.ts.map +1 -0
  58. package/dist/src/fiat/FiatFormScreen.d.ts +8 -2
  59. package/dist/src/fiat/FiatFormScreen.d.ts.map +1 -1
  60. package/dist/src/fiat/FiatIdentityStep.d.ts +16 -1
  61. package/dist/src/fiat/FiatIdentityStep.d.ts.map +1 -1
  62. package/dist/src/fiat/FiatKycFieldControl.d.ts +2 -0
  63. package/dist/src/fiat/FiatKycFieldControl.d.ts.map +1 -1
  64. package/dist/src/fiat/FiatKycIntroScreen.d.ts +16 -3
  65. package/dist/src/fiat/FiatKycIntroScreen.d.ts.map +1 -1
  66. package/dist/src/fiat/FiatKycOutcomeScreen.d.ts +8 -6
  67. package/dist/src/fiat/FiatKycOutcomeScreen.d.ts.map +1 -1
  68. package/dist/src/fiat/FiatKycPhoneField.d.ts +2 -3
  69. package/dist/src/fiat/FiatKycPhoneField.d.ts.map +1 -1
  70. package/dist/src/fiat/FiatKycPosition.d.ts +5 -3
  71. package/dist/src/fiat/FiatKycPosition.d.ts.map +1 -1
  72. package/dist/src/fiat/FiatOtpScreen.d.ts.map +1 -1
  73. package/dist/src/fiat/FiatPhoneField.d.ts +17 -4
  74. package/dist/src/fiat/FiatPhoneField.d.ts.map +1 -1
  75. package/dist/src/fiat/FiatReceipt.d.ts +9 -3
  76. package/dist/src/fiat/FiatReceipt.d.ts.map +1 -1
  77. package/dist/src/fiat/FiatRegionUnsupportedScreen.d.ts.map +1 -1
  78. package/dist/src/fiat/FiatSsnField.d.ts.map +1 -1
  79. package/dist/src/fiat/FiatSubmissionIndicator.d.ts +7 -1
  80. package/dist/src/fiat/FiatSubmissionIndicator.d.ts.map +1 -1
  81. package/dist/src/fiat/FiatTermsNotice.d.ts +5 -2
  82. package/dist/src/fiat/FiatTermsNotice.d.ts.map +1 -1
  83. package/dist/src/fiat/SurfaceSlot.d.ts +5 -2
  84. package/dist/src/fiat/SurfaceSlot.d.ts.map +1 -1
  85. package/dist/src/fiat/countryListEntries.d.ts +8 -13
  86. package/dist/src/fiat/countryListEntries.d.ts.map +1 -1
  87. package/dist/src/fiat/countrySections.d.ts +12 -6
  88. package/dist/src/fiat/countrySections.d.ts.map +1 -1
  89. package/dist/src/fiat/fieldLabel.d.ts +14 -0
  90. package/dist/src/fiat/fieldLabel.d.ts.map +1 -0
  91. package/dist/src/fiat/formLayout.d.ts +16 -3
  92. package/dist/src/fiat/formLayout.d.ts.map +1 -1
  93. package/dist/src/fiat/formValidationError.d.ts +4 -2
  94. package/dist/src/fiat/formValidationError.d.ts.map +1 -1
  95. package/dist/src/fiat/kycFailover.d.ts +6 -0
  96. package/dist/src/fiat/kycFailover.d.ts.map +1 -0
  97. package/dist/src/fiat/kycFieldValidators.d.ts +5 -1
  98. package/dist/src/fiat/kycFieldValidators.d.ts.map +1 -1
  99. package/dist/src/fiat/kycFormState.d.ts +12 -0
  100. package/dist/src/fiat/kycFormState.d.ts.map +1 -1
  101. package/dist/src/fiat/kycFormTheme.d.ts +7 -2
  102. package/dist/src/fiat/kycFormTheme.d.ts.map +1 -1
  103. package/dist/src/fiat/kycUnavailableAlert.d.ts.map +1 -1
  104. package/dist/src/fiat/kycWalk.d.ts +22 -0
  105. package/dist/src/fiat/kycWalk.d.ts.map +1 -0
  106. package/dist/src/fiat/legalLinks.d.ts +4 -3
  107. package/dist/src/fiat/legalLinks.d.ts.map +1 -1
  108. package/dist/src/fiat/paymentSurfaceFailure.d.ts +56 -0
  109. package/dist/src/fiat/paymentSurfaceFailure.d.ts.map +1 -0
  110. package/dist/src/fiat/phoneDraft.d.ts +20 -0
  111. package/dist/src/fiat/phoneDraft.d.ts.map +1 -1
  112. package/dist/src/fiat/postalCodeCountries.d.ts +16 -0
  113. package/dist/src/fiat/postalCodeCountries.d.ts.map +1 -0
  114. package/dist/src/fiat/providers/CoinbaseCheckoutSurface.d.ts +8 -2
  115. package/dist/src/fiat/providers/CoinbaseCheckoutSurface.d.ts.map +1 -1
  116. package/dist/src/fiat/providers/HostedControlFrame.d.ts.map +1 -1
  117. package/dist/src/fiat/providers/adapter.d.ts +48 -6
  118. package/dist/src/fiat/providers/adapter.d.ts.map +1 -1
  119. package/dist/src/fiat/providers/applePayButtonMetrics.d.ts +28 -0
  120. package/dist/src/fiat/providers/applePayButtonMetrics.d.ts.map +1 -0
  121. package/dist/src/fiat/providers/applePayPaintGate.d.ts +24 -0
  122. package/dist/src/fiat/providers/applePayPaintGate.d.ts.map +1 -0
  123. package/dist/src/fiat/providers/banxaRedirect.d.ts.map +1 -1
  124. package/dist/src/fiat/providers/coinbaseApplePay.d.ts +2 -1
  125. package/dist/src/fiat/providers/coinbaseApplePay.d.ts.map +1 -1
  126. package/dist/src/fiat/providers/coinbaseFailureCopy.d.ts +6 -1
  127. package/dist/src/fiat/providers/coinbaseFailureCopy.d.ts.map +1 -1
  128. package/dist/src/fiat/providers/describeThrown.d.ts.map +1 -1
  129. package/dist/src/fiat/providers/kycIntro.d.ts +20 -0
  130. package/dist/src/fiat/providers/kycIntro.d.ts.map +1 -0
  131. package/dist/src/fiat/providers/moonpay.d.ts +10 -1
  132. package/dist/src/fiat/providers/moonpay.d.ts.map +1 -1
  133. package/dist/src/fiat/providers/moonpayApplePayPainted.d.ts +10 -0
  134. package/dist/src/fiat/providers/moonpayApplePayPainted.d.ts.map +1 -0
  135. package/dist/src/fiat/providers/moonpayApplePayStyle.d.ts +12 -0
  136. package/dist/src/fiat/providers/moonpayApplePayStyle.d.ts.map +1 -0
  137. package/dist/src/fiat/providers/moonpayAuthStyle.d.ts +19 -0
  138. package/dist/src/fiat/providers/moonpayAuthStyle.d.ts.map +1 -0
  139. package/dist/src/fiat/providers/moonpayFeeQuote.d.ts +26 -0
  140. package/dist/src/fiat/providers/moonpayFeeQuote.d.ts.map +1 -0
  141. package/dist/src/fiat/providers/stripeAuthorize.d.ts.map +1 -1
  142. package/dist/src/fiat/providers/stripeCheckout.d.ts.map +1 -1
  143. package/dist/src/fiat/providers/stripeKyc.d.ts +2 -0
  144. package/dist/src/fiat/providers/stripeKyc.d.ts.map +1 -1
  145. package/dist/src/fiat/providers/stripeKycIntro.d.ts +10 -0
  146. package/dist/src/fiat/providers/stripeKycIntro.d.ts.map +1 -0
  147. package/dist/src/fiat/providers/stripePayment.d.ts +2 -2
  148. package/dist/src/fiat/providers/stripePayment.d.ts.map +1 -1
  149. package/dist/src/fiat/providers/stripeRoundPush.d.ts +39 -0
  150. package/dist/src/fiat/providers/stripeRoundPush.d.ts.map +1 -0
  151. package/dist/src/fiat/providers/stripeSeamlessSignIn.d.ts +5 -0
  152. package/dist/src/fiat/providers/stripeSeamlessSignIn.d.ts.map +1 -1
  153. package/dist/src/fiat/providers/stripeSessionAuth.d.ts.map +1 -1
  154. package/dist/src/fiat/providers/sumsubKyc.d.ts.map +1 -1
  155. package/dist/src/fiat/providers/surfaceParams.d.ts +30 -0
  156. package/dist/src/fiat/providers/surfaceParams.d.ts.map +1 -0
  157. package/dist/src/fiat/providers/transakApplePay.d.ts.map +1 -1
  158. package/dist/src/fiat/providers/useStripeOnrampClient.d.ts +0 -10
  159. package/dist/src/fiat/providers/useStripeOnrampClient.d.ts.map +1 -1
  160. package/dist/src/fiat/providers/useStripeSessionAuth.d.ts +42 -0
  161. package/dist/src/fiat/providers/useStripeSessionAuth.d.ts.map +1 -0
  162. package/dist/src/fiat/quoteNoRoute.d.ts +11 -0
  163. package/dist/src/fiat/quoteNoRoute.d.ts.map +1 -0
  164. package/dist/src/fiat/renderCaptureSurface.d.ts +6 -0
  165. package/dist/src/fiat/renderCaptureSurface.d.ts.map +1 -1
  166. package/dist/src/fiat/sectionDetail.d.ts +8 -1
  167. package/dist/src/fiat/sectionDetail.d.ts.map +1 -1
  168. package/dist/src/fiat/shownFieldIssues.d.ts +17 -0
  169. package/dist/src/fiat/shownFieldIssues.d.ts.map +1 -0
  170. package/dist/src/fiat/stepDetails.d.ts +13 -14
  171. package/dist/src/fiat/stepDetails.d.ts.map +1 -1
  172. package/dist/src/fiat/subdivisions.d.ts +21 -0
  173. package/dist/src/fiat/subdivisions.d.ts.map +1 -0
  174. package/dist/src/fiat/useContactAutoSubmit.d.ts +20 -0
  175. package/dist/src/fiat/useContactAutoSubmit.d.ts.map +1 -0
  176. package/dist/src/fiat/useFiatCheckoutPreparation.d.ts +2 -1
  177. package/dist/src/fiat/useFiatCheckoutPreparation.d.ts.map +1 -1
  178. package/dist/src/fiat/useKycCaptureRound.d.ts +16 -0
  179. package/dist/src/fiat/useKycCaptureRound.d.ts.map +1 -0
  180. package/dist/src/fiat/useKycCompletion.d.ts.map +1 -1
  181. package/dist/src/fiat/useOtpAutoSubmit.d.ts +15 -2
  182. package/dist/src/fiat/useOtpAutoSubmit.d.ts.map +1 -1
  183. package/dist/src/fiat/useOtpReceipt.d.ts +3 -2
  184. package/dist/src/fiat/useOtpReceipt.d.ts.map +1 -1
  185. package/dist/src/fiat/useReceiptTitles.d.ts +6 -0
  186. package/dist/src/fiat/useReceiptTitles.d.ts.map +1 -0
  187. package/dist/src/flow/DepositAmountStep.d.ts.map +1 -1
  188. package/dist/src/flow/DepositAssetPicker.d.ts +4 -2
  189. package/dist/src/flow/DepositAssetPicker.d.ts.map +1 -1
  190. package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
  191. package/dist/src/flow/DepositReceivedToast.d.ts +2 -2
  192. package/dist/src/flow/DepositReceivedToast.d.ts.map +1 -1
  193. package/dist/src/flow/Drawer.d.ts +27 -9
  194. package/dist/src/flow/Drawer.d.ts.map +1 -1
  195. package/dist/src/flow/FeeDetailsSheet.d.ts +3 -1
  196. package/dist/src/flow/FeeDetailsSheet.d.ts.map +1 -1
  197. package/dist/src/flow/FiatDepositAmountStep.d.ts +5 -1
  198. package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
  199. package/dist/src/flow/FlowPage.d.ts +23 -0
  200. package/dist/src/flow/FlowPage.d.ts.map +1 -0
  201. package/dist/src/flow/FlowSheet.d.ts +18 -3
  202. package/dist/src/flow/FlowSheet.d.ts.map +1 -1
  203. package/dist/src/flow/FunkitFlowProvider.d.ts +3 -0
  204. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  205. package/dist/src/flow/SheetMaterial.d.ts +18 -4
  206. package/dist/src/flow/SheetMaterial.d.ts.map +1 -1
  207. package/dist/src/flow/WithdrawalFlowContent.d.ts.map +1 -1
  208. package/dist/src/flow/depositFlowConfig.d.ts +13 -3
  209. package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
  210. package/dist/src/flow/depositRailCopy.d.ts +2 -0
  211. package/dist/src/flow/depositRailCopy.d.ts.map +1 -1
  212. package/dist/src/flow/pageMotion.d.ts +37 -0
  213. package/dist/src/flow/pageMotion.d.ts.map +1 -0
  214. package/dist/src/flow/pageTurn.d.ts +28 -0
  215. package/dist/src/flow/pageTurn.d.ts.map +1 -0
  216. package/dist/src/flow/sheetPressHold.d.ts +24 -0
  217. package/dist/src/flow/sheetPressHold.d.ts.map +1 -0
  218. package/dist/src/flow/sheetSizing.d.ts +6 -5
  219. package/dist/src/flow/sheetSizing.d.ts.map +1 -1
  220. package/dist/src/flow/swipeBack.d.ts +30 -0
  221. package/dist/src/flow/swipeBack.d.ts.map +1 -0
  222. package/dist/src/flow/useDepositReceivedToast.d.ts.map +1 -1
  223. package/dist/src/flow/useFlowTransitions.d.ts +47 -0
  224. package/dist/src/flow/useFlowTransitions.d.ts.map +1 -0
  225. package/dist/src/flow/useKeyboardHeight.d.ts +2 -2
  226. package/dist/src/flow/useKeyboardHeight.d.ts.map +1 -1
  227. package/dist/src/flow/v2DepositCustomers.d.ts +2 -0
  228. package/dist/src/flow/v2DepositCustomers.d.ts.map +1 -0
  229. package/dist/src/flow/withdrawalFlowConfig.d.ts +18 -5
  230. package/dist/src/flow/withdrawalFlowConfig.d.ts.map +1 -1
  231. package/dist/src/hooks/useNestedSheetHeight.d.ts +10 -3
  232. package/dist/src/hooks/useNestedSheetHeight.d.ts.map +1 -1
  233. package/dist/src/hooks/usePressScale.d.ts +2 -6
  234. package/dist/src/hooks/usePressScale.d.ts.map +1 -1
  235. package/dist/src/hooks/useSheetFade.d.ts.map +1 -1
  236. package/dist/src/icons/assetLogos.d.ts.map +1 -1
  237. package/dist/src/native/glassEffect.d.ts +1 -0
  238. package/dist/src/native/glassEffect.d.ts.map +1 -1
  239. package/dist/src/preview/fixtures/kycForms.d.ts +45 -0
  240. package/dist/src/preview/fixtures/kycForms.d.ts.map +1 -0
  241. package/dist/src/preview/flowPreview.d.ts +142 -0
  242. package/dist/src/preview/flowPreview.d.ts.map +1 -0
  243. package/dist/src/preview/previewFetch.d.ts +10 -0
  244. package/dist/src/preview/previewFetch.d.ts.map +1 -0
  245. package/dist/src/preview/scenarioCatalog.d.ts +380 -0
  246. package/dist/src/preview/scenarioCatalog.d.ts.map +1 -0
  247. package/dist/src/preview/scenarios.d.ts +57 -0
  248. package/dist/src/preview/scenarios.d.ts.map +1 -0
  249. package/dist/src/providers/FunkitI18nProvider.d.ts +2 -0
  250. package/dist/src/providers/FunkitI18nProvider.d.ts.map +1 -1
  251. package/dist/src/providers/useFunkitCheckout.d.ts +6 -0
  252. package/dist/src/providers/useFunkitCheckout.d.ts.map +1 -1
  253. package/dist/src/screens/DepositAmountScreen.d.ts +14 -2
  254. package/dist/src/screens/DepositAmountScreen.d.ts.map +1 -1
  255. package/dist/src/screens/FeeDetailsScreen.d.ts.map +1 -1
  256. package/dist/src/screens/TokenAndChainPickerScreen.d.ts +3 -1
  257. package/dist/src/screens/TokenAndChainPickerScreen.d.ts.map +1 -1
  258. package/dist/src/screens/WithdrawAddressScreen.d.ts +4 -1
  259. package/dist/src/screens/WithdrawAddressScreen.d.ts.map +1 -1
  260. package/dist/src/screens/WithdrawAmountScreen.d.ts +16 -8
  261. package/dist/src/screens/WithdrawAmountScreen.d.ts.map +1 -1
  262. package/dist/src/screens/WithdrawCryptoSteps.d.ts.map +1 -1
  263. package/dist/src/screens/depositMetrics.d.ts +40 -3
  264. package/dist/src/screens/depositMetrics.d.ts.map +1 -1
  265. package/dist/src/swapped/SwappedWebView.d.ts.map +1 -1
  266. package/dist/src/theme/buildFunkitTheme.d.ts +1 -0
  267. package/dist/src/theme/buildFunkitTheme.d.ts.map +1 -1
  268. package/dist/src/theme/keyboardAppearance.d.ts +10 -0
  269. package/dist/src/theme/keyboardAppearance.d.ts.map +1 -0
  270. package/dist/src/theme/restyle.d.ts +33 -0
  271. package/dist/src/theme/restyle.d.ts.map +1 -1
  272. package/dist/src/theme/toRestyleTheme.d.ts +3 -0
  273. package/dist/src/theme/toRestyleTheme.d.ts.map +1 -1
  274. package/dist/src/theme/tokens.d.ts +10 -1
  275. package/dist/src/theme/tokens.d.ts.map +1 -1
  276. package/dist/src/transfer/depositAssets.d.ts +6 -4
  277. package/dist/src/transfer/depositAssets.d.ts.map +1 -1
  278. package/dist/src/transfer/hooks/useFiatExchangeRates.d.ts +5 -4
  279. package/dist/src/transfer/hooks/useFiatExchangeRates.d.ts.map +1 -1
  280. package/dist/src/transfer/hooks/useLockedTokenAmount.d.ts +19 -1
  281. package/dist/src/transfer/hooks/useLockedTokenAmount.d.ts.map +1 -1
  282. package/dist/src/transfer/hooks/useUDAParams.d.ts.map +1 -1
  283. package/dist/src/transfer/lockedQuoteSource.d.ts +23 -0
  284. package/dist/src/transfer/lockedQuoteSource.d.ts.map +1 -0
  285. package/dist/src/transfer/lockedTokenAmount.d.ts +25 -0
  286. package/dist/src/transfer/lockedTokenAmount.d.ts.map +1 -1
  287. package/dist/src/utils/formatAmount.d.ts +1 -0
  288. package/dist/src/utils/formatAmount.d.ts.map +1 -1
  289. package/dist/src/utils/motion.d.ts +6 -15
  290. package/dist/src/utils/motion.d.ts.map +1 -1
  291. package/dist/src/withdrawal/maxWithdrawAmount.d.ts +43 -0
  292. package/dist/src/withdrawal/maxWithdrawAmount.d.ts.map +1 -0
  293. package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts +9 -3
  294. package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts.map +1 -1
  295. package/dist/src/withdrawal/useCryptoWithdrawalValidation.d.ts +6 -1
  296. package/dist/src/withdrawal/useCryptoWithdrawalValidation.d.ts.map +1 -1
  297. package/dist/src/withdrawal/useSourceTokenUsdPrice.d.ts +2 -1
  298. package/dist/src/withdrawal/useSourceTokenUsdPrice.d.ts.map +1 -1
  299. package/dist/src/withdrawal/useWithdrawalAmountInput.d.ts +8 -5
  300. package/dist/src/withdrawal/useWithdrawalAmountInput.d.ts.map +1 -1
  301. package/dist/src/withdrawal/useWithdrawalFiatPrice.d.ts +6 -0
  302. package/dist/src/withdrawal/useWithdrawalFiatPrice.d.ts.map +1 -0
  303. package/dist/src/withdrawal/useWithdrawalMaximum.d.ts +19 -0
  304. package/dist/src/withdrawal/useWithdrawalMaximum.d.ts.map +1 -0
  305. package/dist/src/withdrawal/validation.d.ts +6 -2
  306. package/dist/src/withdrawal/validation.d.ts.map +1 -1
  307. package/package.json +13 -6
  308. package/dist/chunk-4YNYOJJK.js.map +0 -7
  309. package/dist/chunk-D64EJ57D.js.map +0 -7
  310. package/dist/src/components/ActionLoading.d.ts +0 -19
  311. package/dist/src/components/ActionLoading.d.ts.map +0 -1
  312. package/dist/src/fiat/FiatConsentCheck.d.ts +0 -11
  313. package/dist/src/fiat/FiatConsentCheck.d.ts.map +0 -1
  314. package/dist/src/fiat/FiatFormConsent.d.ts +0 -6
  315. package/dist/src/fiat/FiatFormConsent.d.ts.map +0 -1
  316. package/dist/src/fiat/FiatQuotePrice.d.ts +0 -12
  317. package/dist/src/fiat/FiatQuotePrice.d.ts.map +0 -1
  318. package/dist/src/fiat/kycFormPosition.d.ts +0 -28
  319. package/dist/src/fiat/kycFormPosition.d.ts.map +0 -1
  320. package/dist/src/fiat/providerFailover.d.ts +0 -12
  321. package/dist/src/fiat/providerFailover.d.ts.map +0 -1
  322. package/dist/src/fiat/providers/StripeSessionAuthController.d.ts +0 -29
  323. package/dist/src/fiat/providers/StripeSessionAuthController.d.ts.map +0 -1
  324. package/dist/src/fiat/providers/moonpayTrace.d.ts +0 -25
  325. package/dist/src/fiat/providers/moonpayTrace.d.ts.map +0 -1
  326. package/dist/src/fiat/useQuoteableCeiling.d.ts +0 -28
  327. package/dist/src/fiat/useQuoteableCeiling.d.ts.map +0 -1
  328. package/dist/src/flow/StepPage.d.ts +0 -16
  329. package/dist/src/flow/StepPage.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,172 @@
1
1
  # @funkit/connect-rn
2
2
 
3
+ ## 8.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 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.
8
+ - 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.
9
+ - ecf32dd: Locked deposits show a buffered amount sized to meet the configured cap
10
+ - 1a9f6fb: Submit a pasted or autofilled phone number on its own, without a Continue tap.
11
+ - 19ca858: feat(connect-rn): open the deposit and withdrawal flows at any internal state via `@funkit/connect-rn/preview`
12
+ - 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
13
+ - 28150c2: Banners over the deposit sheet can be dismissed by dragging them up.
14
+
15
+ ### Patch Changes
16
+
17
+ - ae29a94: Open Stripe's account-creation form without the "Let's verify your identity" consent page.
18
+ - f8aa110: The deposit amount stays in place when returning from OTP or KYC instead of replaying its typing animation
19
+ - 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.
20
+ - 2ad6fd9: Coinbase Apple Pay shows its button after an amount change without another tap
21
+ - 8baa512: A Coinbase card or risk decline now raises its own alert with Contact Support and re-presents the Apple Pay button.
22
+ - d3d4ff6: Draw the typed email dark on the yellow field when the address is refused, so it stays readable on dark themes
23
+ - 9ad3c40: Say what to do when the contact screen can't send a verification code, and set the notice apart from Continue.
24
+ - 51d1612: Show country search results as one list that matches names from the start of a word
25
+ - e8a2534: Tapping above the keyboard on the phone and code screens no longer dismisses it
26
+ - 5b2d531: Fiat email, phone, code and KYC fields raise a dark keyboard on a dark modal
27
+ - 5f3e4ee: Stop the fiat code screen jittering just before a verified code moves on.
28
+ - ec723b4: Internal cleanup of the KYC chooser's chevron; no visual change.
29
+ - a423502: The KYC phone field no longer stacks a Done bar on top of the iOS number pad
30
+ - 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".
31
+ - 32a8819: Keep the fee drawer tall enough to cover the Apple Pay button
32
+ - 04a00ea: The fee drawer's dollar form now reads "Your deposit incurs a fee of $X…" above a plain "Fee" row.
33
+ - 1cc5fff: Show the "powered by Fun" mark in the fee drawer only when the fee is zero
34
+ - 984b09e: Show MoonPay fees, and any fee of 7% or more, as a dollar amount in the fee details instead of a percentage.
35
+ - be282ce: Offer Try again on the fiat amount screen when the buyer's currency lookup fails, instead of loading forever
36
+ - 07b3391: Stop offering "Try again" on the fiat amount screen when no provider can serve the buyer, their identity or their limit.
37
+ - 8cdbdef: The fiat deposit amount step takes its maximum from the quote and ignores `amountEntry.limitUsd`.
38
+ - 0d554e1: The fiat deposit amount step takes its minimum from the quote and ignores `amountEntry.minLimitUsd`.
39
+ - 5bf8392: Fiat flows now refresh a cached buyer ceiling only when the backend reports that a capacity-changing step may have moved it.
40
+ - e90e8d5: Use the theoretical fiat purchase limit, including zero, to avoid futile quotes.
41
+ - 7cdae1c: Terms footer links now match the body text's opacity and differ only by weight
42
+ - f17c6fc: Wait for the buyer's tap before leaving the amount screen for a verification, code or provider page
43
+ - 8c7f360: Match the verification-unavailable alerts to the design wording, including "Contact Support"
44
+ - 958454d: Keep the button and terms still when the iOS keyboard's suggestion row goes away.
45
+ - 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."
46
+ - 4ebf582: Record KYC consent taps in the backend audit trail.
47
+ - 2197013: Draw KYC form dividers translucent, so the rule under a refused field reads on its yellow.
48
+ - f8d1699: Tell the buyer when a provider refused their identity and the flow requoted them to another provider, instead of switching silently
49
+ - 4e91313: No change to how the KYC form looks or behaves.
50
+ - 74d7497: Show the provider handoff toast once, on arrival, instead of again on every return to the amount screen
51
+ - 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
52
+ - 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.
53
+ - ba38091: Internal cleanup of the KYC intro screen; no visible change.
54
+ - 1a60f81: Label the additional-verification KYC intro button "Continue" instead of "Agree & Continue"
55
+ - 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.
56
+ - 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.
57
+ - 2a8da3d: The KYC purpose page now asks for your purpose for this transaction
58
+ - be496cc: Keep the KYC receipt's support link and action in place when its title changes, and crossfade the change.
59
+ - d583323: Add a Recheck verification option to the KYC options card while a verification is in review or on hold
60
+ - c650759: The KYC name and address keyboards step over optional lines and show "next" on every field.
61
+ - 204c71c: Stop showing "being reviewed" after a KYC review's poll has moved on to a price or the next check.
62
+ - d65bce3: Show the next identity form when a KYC review's poll lands on one, instead of an on-hold screen over it.
63
+ - 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.
64
+ - c6d0607: Hold back the KYC form's pending spinner so quick submissions no longer flash it.
65
+ - a06470e: Render the KYC intro and questionnaire titles in semibold under a custom host font.
66
+ - 8c6ba8f: The deposit sheet can be swiped down while an identity verification result is showing.
67
+ - 8c49acc: Internal lint cleanup; no behavior change.
68
+ - 7691344: Show MoonPay Apple Pay sooner by reusing the authenticated SDK session during the same foreground checkout attempt.
69
+ - 56d37e2: The amount screen's minimum notice and "Change to minimum" use the provider's reported minimum once a quote is refused below it.
70
+ - cb050b8: Log whether a MoonPay Apple Pay checkout used its prepared payment.
71
+ - 6f7fef4: Wait for MoonPay verification before showing a MoonPay challenge on Apple Pay.
72
+ - 7185c0e: Mount MoonPay Apple Pay surfaces while backend verification runs to shorten checkout loading.
73
+ - 5e5f35c: The MoonPay sign-in and terms pages have a back button to return to the deposit amount
74
+ - 5e5f35c: The MoonPay sign-in and terms pages follow the host app's theme
75
+ - 3b85bb2: Verification codes typed a digit at a time now wait for Continue, while a pasted or autofilled code still submits on its own.
76
+ - 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
77
+ - d1449f7: Resending a one-time code empties the boxes at the tap and brings the number pad back up on the first box.
78
+ - 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.
79
+ - 78e1d15: Start the fiat code screen on empty boxes when a new round or a different destination asks for the code.
80
+ - 4a5d627: Keep the phone screen's Continue button above the keyboard after a contact suggestion fills the number.
81
+ - 47f4434: The phone field no longer accepts a return key, so its number pad can never draw the iOS Done bar.
82
+ - 99a1647: Draw the deposit action's waiting state with the same button as the action itself, with no visual change.
83
+ - 65b0281: Open the KYC postal code field on the number pad for countries whose postal codes are digits only.
84
+ - ce84c2f: Buttons spring under the finger with retuned depth and dim, and pressing one no longer drags the drawer beneath it.
85
+ - c5b34c6: Pick the fiat terms notice copy from the quoted provider, not only the document link
86
+ - f0ab5b7: fix(connect-rn): quick-amount pills show their background on iOS
87
+ - 7691344: Keep Coinbase checkout behind the payment tap and measure Apple Pay button readiness across providers.
88
+ - 16907d2: A contact the server refuses is highlighted and handed back with the keyboard up, ready to correct.
89
+ - f2ebb0c: Remove internal modules that nothing imported; no exported API changes.
90
+ - 827ec3d: Show the soft-rejection options when an ID check fails, and let the buyer retry Stripe's verification
91
+ - 2c2d9c1: Tapping anywhere on the country and state search pill now focuses the search field
92
+ - e2505f7: Clear the KYC state field when the residence country changes to one that does not list it.
93
+ - 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.
94
+ - ed7f0de: Shorten the helper lines on the KYC citizenship and address country pages
95
+ - a6975f6: refactor(connect-rn): internal move of the KYC form fixtures; no consumer-facing changes
96
+ - a92aeab: Default fiat deposit quick-amount pills are now $20 / $50 / $100 / $200.
97
+ - d19a865: Pre-load a returning buyer's own deposit maximum from payment-method discovery before the first quote
98
+ - 8082cd5: Selected integrations open the V2 deposit flow without waiting on remote config
99
+ - bb06636: Log and refuse a fiat provider URL that is not a well-formed https link.
100
+ - ae29a94: Skip identity fields an earlier round of the session already answered, and send their values without asking again.
101
+ - e9b4ad5: Show Continue on the KYC SSN page before it is filled, and raise a digits-only keypad for the SSN on iOS
102
+ - 6b7187c: Fix the deposit sheet freezing the app behind an empty backdrop when Add money is tapped while the previous sheet is still closing.
103
+ - 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
104
+ - 8baa512: Closing the Stripe Apple Pay sheet now brings back the Apple Pay button instead of a "Try again" button
105
+ - e340bbb: Show one loading state while Stripe opens Apple Pay, Link or ID verification.
106
+ - ee7413d: Show the loading state on the Stripe KYC form's Continue button as soon as it is tapped
107
+ - 4f98309: Keep the ID verification intro on screen, with a loading button, while Stripe's sheet opens
108
+ - 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".
109
+ - bd38c54: Open Stripe's quick follow-up verification on "We need a little more info", and reword the notice after a verification handoff.
110
+ - 98e7984: Show the "We need a little more info" screen before Stripe's L2 ID check
111
+ - 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.
112
+ - 9853d66: Draw the Stripe Link sheets in the Funkit theme's light or dark mode, not the phone's
113
+ - 0ab8164: Stripe's processing waits after Apple Pay are one page now: the title changes between them instead of the screen swiping
114
+ - 0ab8164: The Stripe processing screen says which step it is waiting on: confirming the payment, completing the purchase, then processing the deposit
115
+ - 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
116
+ - eaef73a: Keep the quote screen up with a loading "Continue in Stripe" button while Stripe's Link and Apple Pay sheets open.
117
+ - d65bce3: Push a Stripe step-up identity form to Stripe even when an earlier identity form already pushed.
118
+ - 816a1cb: Fix withdrawal Use Max backgrounds and locked deposit Copy labels to respect button theme overrides.
119
+ - 1ffc17a: Match the Apple Pay deposit-received toast to the design: a rounded glass card instead of a black capsule.
120
+ - 443cbc7: Accept Solana deposit-address routes whose target asset is a Solana mint.
121
+ - 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.
122
+ - 6d47c89: Keep withdrawal source details visible above Continue on mobile and display the EURC logo.
123
+ - Updated dependencies [f285f3e]
124
+ - Updated dependencies [25bf89e]
125
+ - Updated dependencies [e2505f7]
126
+ - Updated dependencies [00bee30]
127
+ - Updated dependencies [07b3391]
128
+ - Updated dependencies [dfe1f5a]
129
+ - Updated dependencies [5bf8392]
130
+ - Updated dependencies [7691344]
131
+ - Updated dependencies [e90e8d5]
132
+ - Updated dependencies [d3257dc]
133
+ - Updated dependencies [020e9d7]
134
+ - Updated dependencies [4ebf582]
135
+ - Updated dependencies [b647c9a]
136
+ - Updated dependencies [e9bb068]
137
+ - Updated dependencies [7185c0e]
138
+ - Updated dependencies [78e1d15]
139
+ - Updated dependencies [f2ebb0c]
140
+ - Updated dependencies [19ca858]
141
+ - Updated dependencies [8082cd5]
142
+ - Updated dependencies [56d37e2]
143
+ - Updated dependencies [443cbc7]
144
+ - @funkit/api-base@8.5.2
145
+ - @funkit/connect-core@8.5.0
146
+ - @funkit/chains@2.4.2
147
+ - @funkit/utils@5.0.2
148
+
149
+ ## 8.2.0
150
+
151
+ ### Minor Changes
152
+
153
+ - df17726: Add fiat withdrawal ceilings while preserving token-limit priority and balance checks without asset prices.
154
+ - cc8b722: Country, state and KYC option drawers open on a plain white or black panel instead of glass, themeable through the new `background.drawer` token.
155
+ - cc8b722: V2 deposit screens slide in from the right, KYC pages show a scrolling three-dot indicator, and the address form picks the state from a searchable drawer.
156
+ - e8dd054: Allow crypto withdrawal entry in euros with switching between EUR and token units.
157
+
158
+ ### Patch Changes
159
+
160
+ - d308c78: MoonPay and Coinbase Apple Pay deposits reveal the fee, terms and a ready Apple Pay button together, and MoonPay skips the Continue tap for connected buyers.
161
+ - cc8b722: Country and state pickers read like a contacts list: every entry in its letter with the chosen one checked, an index rail, a blurred title bar the list scrolls under, a Liquid Glass search floating over its foot, and the drawer dismissible by dragging the bar; the sheet material follows the theme's light or dark modal fill.
162
+ - cc8b722: The date-of-birth wheel sits centred on the page instead of against its left edge.
163
+ - cc8b722: The country picker's title bar and search foot blur the list along a gradient instead of in four visible steps.
164
+ - f096d39: Show withdrawal limit errors and let users correct amounts without losing their recipient.
165
+ - 4267e0a: Explain unavailable withdrawal limits and allow retrying failed exchange-rate requests.
166
+ - 4aa16c2: Show the provider's correction reason before reopening document verification.
167
+ - Updated dependencies [4aa16c2]
168
+ - @funkit/connect-core@8.4.1
169
+
3
170
  ## 8.1.0
4
171
 
5
172
  ### Minor Changes
package/README.md CHANGED
@@ -39,6 +39,26 @@ log transports, identity context, and transfer hooks are **internal** (mirroring
39
39
  `@funkit/connect`, which exports none of them). When adding a public export, wire
40
40
  it explicitly in `index.ts`.
41
41
 
42
+ ## Withdrawal display currency
43
+
44
+ Set `WithdrawalFlowConfig.displayCurrency` to `'EUR'` to enter crypto withdrawal
45
+ amounts in euros. Users can switch between EUR and source-token units. The
46
+ conversion uses the token's USD price and the shared USD-to-EUR rate, without
47
+ assuming that EURC trades at exactly one euro. For example, at $2 per token and
48
+ 0.8 EUR per USD, entering €8 stages 5 tokens for withdrawal.
49
+
50
+ Token amounts round down to the token's precision; the typed fiat value is
51
+ preserved through denomination switches and navigation. Use Max still stages
52
+ the exact allowed token amount. Rate refreshes do not rewrite an existing entry.
53
+ Until usable rates are available, entry stays in clearly labelled token units;
54
+ a rate arriving later does not reinterpret an amount already typed. Cached
55
+ rates remain usable if a background refresh fails.
56
+
57
+ Omitting the option, or setting `'USD'`, preserves existing USD entry behavior.
58
+ Limits, quotes, confirmation screens, and settlement retain their existing
59
+ denominations. Configure withdrawal ceilings separately using the maximum
60
+ callbacks; a EUR ceiling does not implicitly select an entry currency.
61
+
42
62
  ## Payment deposit metadata
43
63
 
44
64
  `clientMetadata.authorizedAmountBaseUnit` is an explicit maximum gross deposit
@@ -50,6 +70,15 @@ zeros, or `beginDeposit` throws `FunkitMisconfiguredError` before opening.
50
70
  The field is optional in the SDK; Betty's backend requires it with the payment
51
71
  IDs and rejects a different cap or destination when reusing the same payment ID.
52
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
+
53
82
  ## MoonPay crypto setup
54
83
 
55
84
  MoonPay requires a secure `globalThis.crypto.getRandomValues` implementation on
@@ -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
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/preview/flowPreview.tsx", "../src/fiat/formLayout.ts", "../src/fiat/keyboardReturnKey.ts", "../src/fiat/postalCodeCountries.ts"],
4
+ "sourcesContent": ["import type { FiatStepResponse } from '@funkit/connect-core'\nimport {\n type Dispatch,\n type ReactNode,\n type SetStateAction,\n createContext,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react'\n\nimport type { KycCompletion } from '../fiat/useKycCompletion'\nimport type { KycSection } from '../fiat/formLayout'\nimport type { FlowScreen } from '../flow/FunkitFlowProvider'\n\n/**\n * Where the fiat session opens. Each field seeds one piece of state a user would otherwise reach\n * by tapping through, so any screen of the rail is one seed away.\n */\nexport interface FiatPreviewSeed {\n /** The step response the session opens on, as if the backend had just sent it. */\n step?: FiatStepResponse\n /** The amount entry's value. */\n amount?: string\n /** Presses the entry CTA once it is ready: opens the contact round, or the KYC options card. */\n pressEntry?: boolean\n /** An identity round's consent intro, or its form open at a section. */\n identity?: { page: 'consent' } | { page: 'form'; section?: KycSection }\n /** Past the document-capture intro, onto the provider's own surface. */\n documentStarted?: boolean\n /** The acknowledgement a finished identity form shows before its verdict. */\n kycCompletion?: KycCompletion\n /** A provider surface that failed, as the adapter reports it. */\n surfaceFailure?: { code: string; detail?: string }\n /** Submits the seeded step's CTA with this id on open \u2014 how a failed send is reached. */\n submitOnOpen?: string\n}\n\nexport interface DepositPreviewSeed {\n /** The screen the flow opens on; defaults to the root `beginDeposit` picks. Transfer opens above it. */\n screen?: Extract<FlowScreen, 'depositAmount' | 'addMoney' | 'transfer'>\n fiat?: FiatPreviewSeed\n /** The deposit chain, by id, as if picked from the Crypto row \u2014 Transfer needs one. */\n chainId?: string\n}\n\ntype WithdrawalStackScreen = Extract<\n FlowScreen,\n | 'withdrawMethod'\n | 'withdrawAmount'\n | 'withdrawAddress'\n | 'withdrawReceiveToken'\n>\n\n/** The submitted withdrawal the completion screen reports on. */\nexport interface WithdrawalPreviewCompletion {\n txHash: `0x${string}`\n amountLabel: string\n usdLabel?: string\n tokenLabel?: string\n}\n\ninterface WithdrawalPreviewFields {\n /** The payout method picked on the list, by `WithdrawalMethodOption.id`. */\n methodId?: string\n amount?: string\n recipient?: string\n /** The retryable error that replaces every screen after a failed execution. */\n executionError?: boolean\n}\n\n/**\n * The withdrawal flow's opening state. The type rules out the stacks that render nothing: an\n * empty one, and a completion screen with no withdrawal to report.\n */\nexport type WithdrawalPreviewSeed = WithdrawalPreviewFields &\n (\n | {\n /** The screens on the stack, root first; defaults to the payout-method list. */\n stack?: [WithdrawalStackScreen, ...WithdrawalStackScreen[]]\n complete?: undefined\n }\n | { stack: ['withdrawComplete']; complete: WithdrawalPreviewCompletion }\n )\n\n/**\n * A state to open the SDK's flow at, for hosted previews and QA builds.\n * - Consumed by the next matching `begin*` only; closing and reopening starts clean.\n * - Never set in production: every read falls back to the flow's own start.\n */\nexport interface FlowPreviewSeed {\n deposit?: DepositPreviewSeed\n withdrawal?: WithdrawalPreviewSeed\n}\n\nconst HostPreviewContext = createContext<FlowPreviewSeed | undefined>(undefined)\n\n/**\n * Opens the next `beginDeposit` / `beginWithdrawal` below it at `seed`.\n * - Mount it above `<FunkitProvider>`.\n * - Memoize `seed`: a new object is a new preview, so one built inline reopens every flow seeded.\n */\nexport function FunkitFlowPreview({\n seed,\n children,\n}: {\n seed: FlowPreviewSeed | undefined\n children: ReactNode\n}) {\n return (\n <HostPreviewContext.Provider value={seed}>\n {children}\n </HostPreviewContext.Provider>\n )\n}\n\n/** The seed a host mounted; read by the flow provider when a flow opens. */\nexport function useHostFlowPreview(): FlowPreviewSeed | undefined {\n return useContext(HostPreviewContext)\n}\n\n/** The seeds of the flow session a host preview opened; empty everywhere else. */\nexport interface ActivePreview {\n deposit?: DepositPreviewSeed\n withdrawal?: WithdrawalPreviewSeed\n}\n\nconst NO_PREVIEW: ActivePreview = {}\nconst ActivePreviewContext = createContext<ActivePreview>(NO_PREVIEW)\n\n/** Scopes a consumed seed to the one flow session it opened. */\nexport function ActiveFlowPreview({\n deposit,\n withdrawal,\n children,\n}: {\n deposit?: DepositPreviewSeed\n withdrawal?: WithdrawalPreviewSeed\n children: ReactNode\n}) {\n // The value names the session: readers are tracked against it.\n const preview = useMemo(\n () =>\n deposit === undefined && withdrawal === undefined\n ? NO_PREVIEW\n : { deposit, withdrawal },\n [deposit, withdrawal],\n )\n return (\n <ActivePreviewContext.Provider value={preview}>\n {children}\n </ActivePreviewContext.Provider>\n )\n}\n\n/** Reads one seed value out of the session's preview. */\nexport type PreviewPick<T> = (preview: ActivePreview) => T | undefined\n\n/**\n * Every seed value a flow reads, one reader each. Readers are tracked by identity, so each is\n * declared once here rather than inline where it is read.\n */\nexport const SEED = {\n fiatAmount: (p) => p.deposit?.fiat?.amount,\n fiatStep: (p) => p.deposit?.fiat?.step,\n fiatPressEntry: (p) => p.deposit?.fiat?.pressEntry,\n fiatSubmitOnOpen: (p) => p.deposit?.fiat?.submitOnOpen,\n fiatSurfaceFailure: (p) => p.deposit?.fiat?.surfaceFailure,\n kycCompletion: (p) => p.deposit?.fiat?.kycCompletion,\n identityPage: (p) => p.deposit?.fiat?.identity?.page,\n identitySection: (p) => {\n const identity = p.deposit?.fiat?.identity\n return identity?.page === 'form' ? identity.section : undefined\n },\n documentStarted: (p) => p.deposit?.fiat?.documentStarted,\n depositChainId: (p) => p.deposit?.chainId,\n withdrawalMethodId: (p) => p.withdrawal?.methodId,\n withdrawalAmount: (p) => p.withdrawal?.amount,\n withdrawalRecipient: (p) => p.withdrawal?.recipient,\n withdrawalComplete: (p) => p.withdrawal?.complete,\n withdrawalExecutionError: (p) => p.withdrawal?.executionError,\n} satisfies Record<string, PreviewPick<unknown>>\n\nconst readers = new WeakMap<ActivePreview, Set<PreviewPick<unknown>>>()\n\n/**\n * The seed value for the first mount that reads it; `undefined` for every mount after.\n * - A later mount of the same reader is the user moving on (a new round, a return to the entry),\n * so a seed never re-applies after the state it describes.\n * - Marked read on commit, so Strict Mode's double render still sees it.\n */\nexport function useSeed<T>(pick: PreviewPick<T>): T | undefined {\n const preview = useContext(ActivePreviewContext)\n const [seed] = useState(() =>\n readers.get(preview)?.has(pick) === true ? undefined : pick(preview),\n )\n useEffect(() => {\n if (preview === NO_PREVIEW) {\n return\n }\n const read = readers.get(preview) ?? new Set()\n read.add(pick)\n readers.set(preview, read)\n }, [preview, pick])\n return seed\n}\n\n/**\n * `useState` whose initial value a host preview may seed; production always starts at `initial`.\n * `fromSeed` shapes a seed value into the state when the two differ.\n */\nexport function useSeededState<T>(\n pick: PreviewPick<T>,\n initial: T,\n): [T, Dispatch<SetStateAction<T>>]\nexport function useSeededState<S, T>(\n pick: PreviewPick<S>,\n initial: T,\n fromSeed: (seed: S) => T,\n): [T, Dispatch<SetStateAction<T>>]\nexport function useSeededState<S, T>(\n pick: PreviewPick<S>,\n initial: T,\n fromSeed?: (seed: S) => T,\n): [T, Dispatch<SetStateAction<T>>] {\n const seed = useSeed(pick)\n return useState<T>(() => {\n if (seed === undefined) {\n return initial\n }\n return fromSeed === undefined ? (seed as unknown as T) : fromSeed(seed)\n })\n}\n", "import type { FormField, KycFieldId } from '@funkit/connect-core'\nimport { isValueField } from '@funkit/connect-core'\nimport { Platform, type TextInputProps } from 'react-native'\n\nimport { PADS_WITHOUT_RETURN_KEY } from './keyboardReturnKey'\nimport { type PostalCodeForm, postalCodeForm } from './postalCodeCountries'\n\n/**\n * The pages the US form is drawn as, in the order the design steps them.\n *\n * Figma \"EDIT: KYC Enhancements\": 1508:2616 (name), 1844:17471 (date of\n * birth), 1631:7256 (address), 1631:7883 (SSN). `DETAILS` is not a frame \u2014 it\n * is where a field the design never drew goes, so a form the server words its\n * own way still renders.\n */\nexport type KycSection =\n | 'NAME'\n | 'DOB'\n | 'NATIONALITY'\n | 'COUNTRY'\n | 'ADDRESS'\n | 'SSN'\n | 'PHONE'\n | 'OCCUPATION'\n | 'EMPLOYMENT'\n | 'PURPOSE'\n | 'SOURCE_OF_WEALTH'\n | 'INCOME'\n | 'ACTIVITY'\n | 'DETAILS'\n\nexport interface KycSectionPage {\n section: KycSection\n /** Drawn as one card with a rule between rows, rather than loose boxes. */\n grouped: boolean\n /** Fields sharing a row sit side by side, as the design pairs them. */\n rows: FormField[][]\n}\n\n/**\n * The questionnaire the due-diligence figures arrive under. The contract types\n * a questionnaire id as a template, so these are the three this build draws\n * a page for; any other lands in `DETAILS`.\n */\nexport const GROSS_ANNUAL_INCOME =\n 'QUESTIONNAIRE_RESPONSE:customerDueDiligence:grossAnnualIncome'\nexport const EXPECTED_AMOUNT_PER_MONTH =\n 'QUESTIONNAIRE_RESPONSE:customerDueDiligence:expectedTransactionAmountPerMonth'\nexport const TRANSACTIONS_PER_MONTH =\n 'QUESTIONNAIRE_RESPONSE:customerDueDiligence:transactionFrequencyPerMonth'\n\n/**\n * Which page a field belongs to, by id.\n *\n * The contract closes the id set, so these are the canonical names and there\n * is no second spelling to carry. An id with no page here lands in `DETAILS`\n * rather than being refused: the server owns the list, and a form is not\n * undrawable just because it asks for something the frames do not group.\n */\nconst SECTION_BY_ID: Readonly<Partial<Record<KycFieldId, KycSection>>> = {\n // 1508:2616 \u2014 \"First name\", \"M.I.\", \"Last Name\".\n LEGAL_FIRST_NAME: 'NAME',\n LEGAL_MIDDLE_NAME: 'NAME',\n LEGAL_LAST_NAME: 'NAME',\n // 1844:17471 \u2014 its own page, asked for on its own over the date picker.\n DATE_OF_BIRTH: 'DOB',\n NATIONALITY: 'NATIONALITY',\n // 1631:7256 \u2014 \"Address\", \"Apartment, suite, etc.\", \"City\", \"State\", \"ZIP code\".\n RESIDENTIAL_ADDRESS_LINE_1: 'ADDRESS',\n RESIDENTIAL_ADDRESS_LINE_2: 'ADDRESS',\n RESIDENTIAL_ADDRESS_CITY: 'ADDRESS',\n RESIDENTIAL_ADDRESS_REGION: 'ADDRESS',\n RESIDENTIAL_ADDRESS_POSTAL_CODE: 'ADDRESS',\n RESIDENTIAL_ADDRESS_COUNTRY: 'COUNTRY',\n // 1631:7883 \u2014 \"SSN\".\n TAX_IDENTIFIER: 'SSN',\n TAX_RESIDENCE_COUNTRY: 'COUNTRY',\n OCCUPATION_TITLE: 'OCCUPATION',\n OCCUPATION_INDUSTRY: 'OCCUPATION',\n PURPOSE_OF_TRANSACTION: 'PURPOSE',\n PURPOSE_OF_SERVICE: 'PURPOSE',\n // MoonPay's customer due diligence round, asked after the SSN.\n PHONE_NUMBER: 'PHONE',\n EMPLOYMENT_STATUS: 'EMPLOYMENT',\n SOURCE_OF_WEALTH_DECLARATION: 'SOURCE_OF_WEALTH',\n [GROSS_ANNUAL_INCOME]: 'INCOME',\n [EXPECTED_AMOUNT_PER_MONTH]: 'ACTIVITY',\n [TRANSACTIONS_PER_MONTH]: 'ACTIVITY',\n}\n\n/**\n * The keyboard a typed field raises. The SSN page is drawn over a number pad\n * (1631:7883) and the due-diligence figures over the pads that fit them;\n * every other page in the form is drawn over letters.\n */\nconst KEYBOARD_BY_ID: Readonly<\n Partial<Record<KycFieldId, TextInputProps['keyboardType']>>\n> = {\n TAX_IDENTIFIER: 'number-pad',\n PHONE_NUMBER: 'phone-pad',\n [GROSS_ANNUAL_INCOME]: 'decimal-pad',\n [EXPECTED_AMOUNT_PER_MONTH]: 'decimal-pad',\n [TRANSACTIONS_PER_MONTH]: 'number-pad',\n}\n\n/**\n * Field types a page can draw. A date and a country are typed into the same\n * filled box as any other answer; a hosted step is an errand the user runs\n * elsewhere and a document streams to an endpoint this build has not\n * installed, so neither has a box to draw.\n */\nconst DRAWN_TYPES = new Set(['TEXT', 'SELECT', 'DATE', 'COUNTRY'])\n\n/** One card ruled between its rows (1631:7256, \"address\"). */\nconst GROUPED_SECTIONS = new Set<KycSection>(['ADDRESS'])\n\n/**\n * The order 1508:2616 \u2192 1844:17471 \u2192 1631:7256 \u2192 1631:7883 walks, anything\n * else trailing.\n */\nconst SECTION_ORDER: readonly KycSection[] = [\n 'NAME',\n 'DOB',\n 'NATIONALITY',\n 'COUNTRY',\n 'ADDRESS',\n 'SSN',\n 'PHONE',\n 'OCCUPATION',\n 'EMPLOYMENT',\n 'PURPOSE',\n 'SOURCE_OF_WEALTH',\n 'INCOME',\n 'ACTIVITY',\n 'DETAILS',\n]\n\n/**\n * The page's field a date picker can answer, when that is the whole page.\n *\n * A picker takes the keyboard's slot, so it can only be offered on a page\n * with nothing else to type: a date beside two names would leave one of the\n * two controls covering the other. Anywhere else the date is typed.\n */\nconst IDENTITY_SECTIONS: ReadonlySet<KycSection> = new Set<KycSection>([\n 'NAME',\n 'DOB',\n 'NATIONALITY',\n 'COUNTRY',\n 'ADDRESS',\n 'SSN',\n])\n\n/**\n * The server owns the field list, so an id this build does not know is not\n * identity: only the frames that collect who someone is qualify.\n */\nexport function isIdentityField(field: FormField): boolean {\n const section = SECTION_BY_ID[field.id]\n return section !== undefined && IDENTITY_SECTIONS.has(section)\n}\n\n/**\n * The pages that draw their answers on the page rather than behind a chooser\n * (2475:8992).\n *\n * Named, not inferred from the field's type: `DETAILS` also collects a\n * `SELECT`, but it holds whatever the server asks for that no frame drew, and\n * a list of unknown length is what the chooser's sheet is for.\n */\nconst INLINE_CHOICE_SECTIONS: ReadonlySet<KycSection> = new Set<KycSection>([\n 'OCCUPATION',\n 'EMPLOYMENT',\n 'PURPOSE',\n 'SOURCE_OF_WEALTH',\n])\n\nexport function isInlineChoiceSection(section: KycSection): boolean {\n return INLINE_CHOICE_SECTIONS.has(section)\n}\n\nexport function pickedDateField(page: KycSectionPage): FormField | undefined {\n const fields = page.rows.flat()\n const only = fields.length === 1 ? fields[0] : undefined\n return only?.type === 'DATE' ? only : undefined\n}\n\n/**\n * Whether the field is typed into, and so takes a turn in the return-key\n * chain. A choice is not.\n */\nexport function isFocusableField(field: FormField): boolean {\n return field.type === 'TEXT' || field.type === 'DATE'\n}\n\n/** Pages whose keyboards read \"next\" on the field that tries the page too (1950:2055, 1951:9265). */\nconst NEXT_TO_TRY_SECTIONS: ReadonlySet<KycSection> = new Set<KycSection>([\n 'NAME',\n 'ADDRESS',\n])\n\nexport interface ReturnHop {\n label: 'next' | 'done'\n /** Absent where the return key tries the page instead. */\n to?: FormField\n}\n\n/**\n * Where a typed field's return key goes: the next required typed field.\n *\n * - An optional line is stepped over (2334:7164) but still hands on when the\n * user taps into it.\n */\nexport function returnHop(\n section: KycSection,\n typedFields: readonly FormField[],\n fieldId: string,\n): ReturnHop | undefined {\n const at = typedFields.findIndex((field) => field.id === fieldId)\n if (at < 0) {\n return undefined\n }\n const to = typedFields.slice(at + 1).find((field) => field.required)\n if (to !== undefined) {\n return { label: 'next', to }\n }\n return { label: NEXT_TO_TRY_SECTIONS.has(section) ? 'next' : 'done' }\n}\n\n/**\n * - Digits alone take the number pad, whose missing return key the page\n * answers with Continue (`isDigitsField`).\n * - A hyphen or space needs iOS's digits-first keyboard, which can type it;\n * Android has none, so it keeps letters.\n */\nconst POSTAL_CODE_KEYBOARD: Readonly<\n Record<PostalCodeForm, TextInputProps['keyboardType']>\n> = {\n digits: 'number-pad',\n separated: Platform.OS === 'ios' ? 'numbers-and-punctuation' : undefined,\n}\n\n/** `country` is the address's, whose postal codes decide the postal code's keyboard. */\nexport function fieldKeyboardType(\n field: FormField,\n country?: string,\n): TextInputProps['keyboardType'] | undefined {\n if (field.type !== 'TEXT') {\n return undefined\n }\n if (field.id === 'RESIDENTIAL_ADDRESS_POSTAL_CODE') {\n const form = postalCodeForm(country)\n return form === undefined ? undefined : POSTAL_CODE_KEYBOARD[form]\n }\n return KEYBOARD_BY_ID[field.id]\n}\n\n/** Whether the field raises a pad rather than letters, and so has no return key. */\nexport function isDigitsField(field: FormField, country?: string): boolean {\n const keyboardType = fieldKeyboardType(field, country)\n return keyboardType !== undefined && PADS_WITHOUT_RETURN_KEY.has(keyboardType)\n}\n\n/** Whether the field is drawn at a fixed width rather than growing to fill. */\nexport function isFixedWidthField(field: FormField): boolean {\n return field.id === 'LEGAL_MIDDLE_NAME'\n}\n\n/**\n * The form's fields that no page draws.\n *\n * Type only: an unknown id has a page (`DETAILS`), so refusing one would\n * reject a whole form over a field the screens can draw perfectly well. A\n * form with any of these cannot be completed here, so the caller shows its\n * unsupported state rather than a form missing a field the server requires.\n */\nexport function unsupportedFields(fields: readonly FormField[]): FormField[] {\n return fields.filter((field) => !DRAWN_TYPES.has(field.type))\n}\n\n/**\n * Splits a form into the pages the design steps through.\n *\n * Pages keep the design's order; fields keep the server's, so a page that\n * gains a field it already draws renders it without a client release. A page\n * with no fields is not a page.\n */\nexport function sectionPages(fields: readonly FormField[]): KycSectionPage[] {\n const bySection = new Map<KycSection, FormField[]>()\n for (const field of fields) {\n if (!DRAWN_TYPES.has(field.type)) {\n continue\n }\n // A state the provider does not require is not asked: European\n // addresses have none, and the design draws no row for it.\n if (field.id === 'RESIDENTIAL_ADDRESS_REGION' && !field.required) {\n continue\n }\n const section = SECTION_BY_ID[field.id] ?? 'DETAILS'\n const collected = bySection.get(section) ?? []\n collected.push(field)\n bySection.set(section, collected)\n }\n\n return SECTION_ORDER.flatMap<KycSectionPage>((section) => {\n const collected = bySection.get(section)\n if (collected === undefined) {\n return []\n }\n if (isInlineChoiceSection(section) || section === 'DETAILS') {\n return collected.map((field) => ({\n section,\n grouped: false,\n rows: [[field]],\n }))\n }\n return [\n {\n section,\n grouped: GROUPED_SECTIONS.has(section),\n rows:\n section === 'ADDRESS'\n ? addressRows(collected)\n : collected.map((field) => [field]),\n },\n ]\n })\n}\n\n/**\n * The address card as the design lays it out for the country (1631:7256):\n * the street, the apartment line, then the city with the state and ZIP paired\n * under it \u2014 or, where the provider asks for no state, the postal code paired\n * before the city, as a European address reads. A field the design does not\n * place trails on its own row.\n */\nfunction addressRows(fields: readonly FormField[]): FormField[][] {\n const byId = new Map(fields.map((field) => [field.id, field]))\n const take = (id: KycFieldId) => {\n const field = byId.get(id)\n byId.delete(id)\n return field\n }\n const line1 = take('RESIDENTIAL_ADDRESS_LINE_1')\n const line2 = take('RESIDENTIAL_ADDRESS_LINE_2')\n const city = take('RESIDENTIAL_ADDRESS_CITY')\n const region = take('RESIDENTIAL_ADDRESS_REGION')\n const postal = take('RESIDENTIAL_ADDRESS_POSTAL_CODE')\n const rows: (FormField | undefined)[][] = [[line1], [line2]]\n if (region === undefined) {\n rows.push([postal, city])\n } else {\n rows.push([city], [region, postal])\n }\n return [...rows, ...[...byId.values()].map((field) => [field])]\n .map((row) => row.filter((field) => field !== undefined))\n .filter((row) => row.length > 0)\n}\n", "import type { TextInputProps } from 'react-native'\n\n/**\n * Keyboards with no return key. iOS draws a floating button of its own when\n * one of these is asked for a return key, and it lands over the screen's\n * bottom-right \u2014 where the advance control already is.\n */\nexport const PADS_WITHOUT_RETURN_KEY = new Set<TextInputProps['keyboardType']>([\n 'number-pad',\n 'numeric',\n 'decimal-pad',\n 'phone-pad',\n])\n", "/**\n * How a country writes its postal codes, where Google's address metadata\n * (libaddressinput, chromium-i18n.appspot.com/ssl-address/data) and\n * `postcode-validator` agree. Anywhere they disagree is on neither list, so\n * the keyboard stays letters (`postalCodeCountries.drift.test.ts`).\n *\n * - `digits`: codes are written as digits alone. The US ZIP+4 extension and\n * FR's space are optional, and neither is how the post office writes them.\n * - `separated`: digits the country writes split by a hyphen or space\n * (`12345-678`, `123 45`), which a number pad cannot type.\n * - A country whose codes carry any letter (GB, CA, NL, IE, AR, MT, LV\u2026), or\n * that has no postal code, is on neither list.\n */\nexport type PostalCodeForm = 'digits' | 'separated'\n\nconst codes = (list: string): ReadonlySet<string> =>\n new Set(list.trim().split(/\\s+/))\n\nconst DIGIT_COUNTRIES = codes(`\n AF AL AM AS AT AU AX AZ BA BD BE BG BH BL BT BY CC CH CL CN CO CU CV\n CX CY DE DK DO DZ EC EE EG EH ES ET FI FM FO FR GE GF GL GN GP GT GU\n GW HM HN HR HT HU ID IL IN IQ IS IT JO KE KG KH KR KW KZ LA LI LK LR\n LS LT LU MA MC MD ME MF MG MH MK MM MN MP MQ MV MX MY MZ NA NC NE NF\n NG NO NP NZ PF PG PH PK PM PR PW PY RE RO RS RU SA SD SG SI SJ SM SN\n TH TJ TM TN TR TW TZ UA UM US UY UZ VA VE VI VN WF XK YT ZA ZM\n`)\n\nconst SEPARATED_COUNTRIES = codes(`\n BR CR CZ GR IR JP LB PL PT SE SK\n`)\n\nexport function postalCodeForm(\n alpha2: string | undefined,\n): PostalCodeForm | undefined {\n const code = alpha2?.toUpperCase()\n if (code === undefined) {\n return undefined\n }\n if (DIGIT_COUNTRIES.has(code)) {\n return 'digits'\n }\n return SEPARATED_COUNTRIES.has(code) ? 'separated' : undefined\n}\n"],
5
+ "mappings": ";AACA;AAAA,EAIE;AAA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