@velion-la/onboarding-sdk-react-native 1.0.0-beta.10

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 (614) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/LICENSE +12 -0
  3. package/README.md +888 -0
  4. package/app.plugin.js +101 -0
  5. package/lib/commonjs/camera/AddressSearchBar.js +304 -0
  6. package/lib/commonjs/camera/AddressSearchBar.js.map +1 -0
  7. package/lib/commonjs/camera/DocumentCapture.js +513 -0
  8. package/lib/commonjs/camera/DocumentCapture.js.map +1 -0
  9. package/lib/commonjs/camera/LivenessCamera.js +628 -0
  10. package/lib/commonjs/camera/LivenessCamera.js.map +1 -0
  11. package/lib/commonjs/camera/MapAddressPicker.js +331 -0
  12. package/lib/commonjs/camera/MapAddressPicker.js.map +1 -0
  13. package/lib/commonjs/core/VelionOnboarding.js +1113 -0
  14. package/lib/commonjs/core/VelionOnboarding.js.map +1 -0
  15. package/lib/commonjs/core/retryStepCopy.js +43 -0
  16. package/lib/commonjs/core/retryStepCopy.js.map +1 -0
  17. package/lib/commonjs/core/routingCommands.js +62 -0
  18. package/lib/commonjs/core/routingCommands.js.map +1 -0
  19. package/lib/commonjs/core/sessionDeclinedCopy.js +56 -0
  20. package/lib/commonjs/core/sessionDeclinedCopy.js.map +1 -0
  21. package/lib/commonjs/core/sessionStateMapper.js +200 -0
  22. package/lib/commonjs/core/sessionStateMapper.js.map +1 -0
  23. package/lib/commonjs/core/sseReasonMessages.js +450 -0
  24. package/lib/commonjs/core/sseReasonMessages.js.map +1 -0
  25. package/lib/commonjs/data/iso3166Alpha2Codes.json +1 -0
  26. package/lib/commonjs/data/iso3166CountryNames.json +251 -0
  27. package/lib/commonjs/i18n/index.js +30 -0
  28. package/lib/commonjs/i18n/index.js.map +1 -0
  29. package/lib/commonjs/i18n/strings/en.js +301 -0
  30. package/lib/commonjs/i18n/strings/en.js.map +1 -0
  31. package/lib/commonjs/i18n/strings/es.js +306 -0
  32. package/lib/commonjs/i18n/strings/es.js.map +1 -0
  33. package/lib/commonjs/index.js +225 -0
  34. package/lib/commonjs/index.js.map +1 -0
  35. package/lib/commonjs/package.json +1 -0
  36. package/lib/commonjs/steps/AddressInfoStep.js +662 -0
  37. package/lib/commonjs/steps/AddressInfoStep.js.map +1 -0
  38. package/lib/commonjs/steps/DocumentsOcrStep.js +405 -0
  39. package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -0
  40. package/lib/commonjs/steps/EconomicActivityStep.js +214 -0
  41. package/lib/commonjs/steps/EconomicActivityStep.js.map +1 -0
  42. package/lib/commonjs/steps/EmailContactStep.js +150 -0
  43. package/lib/commonjs/steps/EmailContactStep.js.map +1 -0
  44. package/lib/commonjs/steps/EmailOtpStep.js +225 -0
  45. package/lib/commonjs/steps/EmailOtpStep.js.map +1 -0
  46. package/lib/commonjs/steps/FaceMatchStep.js +169 -0
  47. package/lib/commonjs/steps/FaceMatchStep.js.map +1 -0
  48. package/lib/commonjs/steps/FingerprintStep.js +92 -0
  49. package/lib/commonjs/steps/FingerprintStep.js.map +1 -0
  50. package/lib/commonjs/steps/HumanBasicInfoStep.js +251 -0
  51. package/lib/commonjs/steps/HumanBasicInfoStep.js.map +1 -0
  52. package/lib/commonjs/steps/HumanExtendedInfoStep.js +275 -0
  53. package/lib/commonjs/steps/HumanExtendedInfoStep.js.map +1 -0
  54. package/lib/commonjs/steps/LegalBasicInfoStep.js +195 -0
  55. package/lib/commonjs/steps/LegalBasicInfoStep.js.map +1 -0
  56. package/lib/commonjs/steps/LegalExtendedInfoStep.js +173 -0
  57. package/lib/commonjs/steps/LegalExtendedInfoStep.js.map +1 -0
  58. package/lib/commonjs/steps/LivenessMatchStep.js +1184 -0
  59. package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -0
  60. package/lib/commonjs/steps/PhoneContactStep.js +151 -0
  61. package/lib/commonjs/steps/PhoneContactStep.js.map +1 -0
  62. package/lib/commonjs/steps/PhoneOtpStep.js +224 -0
  63. package/lib/commonjs/steps/PhoneOtpStep.js.map +1 -0
  64. package/lib/commonjs/steps/SwornDeclarationStep.js +206 -0
  65. package/lib/commonjs/steps/SwornDeclarationStep.js.map +1 -0
  66. package/lib/commonjs/steps/TaxInfoStep.js +251 -0
  67. package/lib/commonjs/steps/TaxInfoStep.js.map +1 -0
  68. package/lib/commonjs/steps/TermsAndConditionsStep.js +245 -0
  69. package/lib/commonjs/steps/TermsAndConditionsStep.js.map +1 -0
  70. package/lib/commonjs/steps/_shared.js +61 -0
  71. package/lib/commonjs/steps/_shared.js.map +1 -0
  72. package/lib/commonjs/steps/types.js +6 -0
  73. package/lib/commonjs/steps/types.js.map +1 -0
  74. package/lib/commonjs/transport/api.js +176 -0
  75. package/lib/commonjs/transport/api.js.map +1 -0
  76. package/lib/commonjs/transport/irisWebSocket.js +121 -0
  77. package/lib/commonjs/transport/irisWebSocket.js.map +1 -0
  78. package/lib/commonjs/transport/secureUrl.js +50 -0
  79. package/lib/commonjs/transport/secureUrl.js.map +1 -0
  80. package/lib/commonjs/transport/sse.js +248 -0
  81. package/lib/commonjs/transport/sse.js.map +1 -0
  82. package/lib/commonjs/types/index.js +458 -0
  83. package/lib/commonjs/types/index.js.map +1 -0
  84. package/lib/commonjs/ui/MapFallbackBoundary.js +42 -0
  85. package/lib/commonjs/ui/MapFallbackBoundary.js.map +1 -0
  86. package/lib/commonjs/ui/StepShell.js +251 -0
  87. package/lib/commonjs/ui/StepShell.js.map +1 -0
  88. package/lib/commonjs/ui/VelionOnboardingScreen.js +276 -0
  89. package/lib/commonjs/ui/VelionOnboardingScreen.js.map +1 -0
  90. package/lib/commonjs/ui/forms/index.js +38 -0
  91. package/lib/commonjs/ui/forms/index.js.map +1 -0
  92. package/lib/commonjs/ui/forms/useInlineValidation.js +88 -0
  93. package/lib/commonjs/ui/forms/useInlineValidation.js.map +1 -0
  94. package/lib/commonjs/ui/forms/validators.js +34 -0
  95. package/lib/commonjs/ui/forms/validators.js.map +1 -0
  96. package/lib/commonjs/ui/icons/HomeHeartIcon.js +38 -0
  97. package/lib/commonjs/ui/icons/HomeHeartIcon.js.map +1 -0
  98. package/lib/commonjs/ui/icons/StepIcon.js +59 -0
  99. package/lib/commonjs/ui/icons/StepIcon.js.map +1 -0
  100. package/lib/commonjs/ui/overlays/AnalyzingOverlay.js +284 -0
  101. package/lib/commonjs/ui/overlays/AnalyzingOverlay.js.map +1 -0
  102. package/lib/commonjs/ui/overlays/LoadingOverlay.js +108 -0
  103. package/lib/commonjs/ui/overlays/LoadingOverlay.js.map +1 -0
  104. package/lib/commonjs/ui/overlays/ProgressBar.js +101 -0
  105. package/lib/commonjs/ui/overlays/ProgressBar.js.map +1 -0
  106. package/lib/commonjs/ui/overlays/RetryDialog.js +125 -0
  107. package/lib/commonjs/ui/overlays/RetryDialog.js.map +1 -0
  108. package/lib/commonjs/ui/overlays/index.js +33 -0
  109. package/lib/commonjs/ui/overlays/index.js.map +1 -0
  110. package/lib/commonjs/ui/primitives/BackButton.js +75 -0
  111. package/lib/commonjs/ui/primitives/BackButton.js.map +1 -0
  112. package/lib/commonjs/ui/primitives/Banner.js +81 -0
  113. package/lib/commonjs/ui/primitives/Banner.js.map +1 -0
  114. package/lib/commonjs/ui/primitives/Button.js +142 -0
  115. package/lib/commonjs/ui/primitives/Button.js.map +1 -0
  116. package/lib/commonjs/ui/primitives/Card.js +50 -0
  117. package/lib/commonjs/ui/primitives/Card.js.map +1 -0
  118. package/lib/commonjs/ui/primitives/Checkbox.js +139 -0
  119. package/lib/commonjs/ui/primitives/Checkbox.js.map +1 -0
  120. package/lib/commonjs/ui/primitives/CountrySelect.js +288 -0
  121. package/lib/commonjs/ui/primitives/CountrySelect.js.map +1 -0
  122. package/lib/commonjs/ui/primitives/DatePicker.js +245 -0
  123. package/lib/commonjs/ui/primitives/DatePicker.js.map +1 -0
  124. package/lib/commonjs/ui/primitives/Input.js +101 -0
  125. package/lib/commonjs/ui/primitives/Input.js.map +1 -0
  126. package/lib/commonjs/ui/primitives/SearchableSingleSelectList.js +162 -0
  127. package/lib/commonjs/ui/primitives/SearchableSingleSelectList.js.map +1 -0
  128. package/lib/commonjs/ui/primitives/Select.js +209 -0
  129. package/lib/commonjs/ui/primitives/Select.js.map +1 -0
  130. package/lib/commonjs/ui/primitives/Spinner.js +25 -0
  131. package/lib/commonjs/ui/primitives/Spinner.js.map +1 -0
  132. package/lib/commonjs/ui/primitives/index.js +89 -0
  133. package/lib/commonjs/ui/primitives/index.js.map +1 -0
  134. package/lib/commonjs/ui/primitives/searchableSingleSelectFilter.js +31 -0
  135. package/lib/commonjs/ui/primitives/searchableSingleSelectFilter.js.map +1 -0
  136. package/lib/commonjs/ui/theme/ThemeProvider.js +74 -0
  137. package/lib/commonjs/ui/theme/ThemeProvider.js.map +1 -0
  138. package/lib/commonjs/ui/theme/index.js +68 -0
  139. package/lib/commonjs/ui/theme/index.js.map +1 -0
  140. package/lib/commonjs/ui/theme/tokens.js +154 -0
  141. package/lib/commonjs/ui/theme/tokens.js.map +1 -0
  142. package/lib/commonjs/utils/EventEmitter.js +144 -0
  143. package/lib/commonjs/utils/EventEmitter.js.map +1 -0
  144. package/lib/commonjs/utils/base64.js +53 -0
  145. package/lib/commonjs/utils/base64.js.map +1 -0
  146. package/lib/commonjs/utils/deviceFingerprint.js +132 -0
  147. package/lib/commonjs/utils/deviceFingerprint.js.map +1 -0
  148. package/lib/commonjs/utils/documentTypeOptions.js +35 -0
  149. package/lib/commonjs/utils/documentTypeOptions.js.map +1 -0
  150. package/lib/commonjs/utils/googleMapsPreflight.js +88 -0
  151. package/lib/commonjs/utils/googleMapsPreflight.js.map +1 -0
  152. package/lib/commonjs/utils/hmac.js +58 -0
  153. package/lib/commonjs/utils/hmac.js.map +1 -0
  154. package/lib/commonjs/utils/iso3166Countries.js +98 -0
  155. package/lib/commonjs/utils/iso3166Countries.js.map +1 -0
  156. package/lib/commonjs/utils/jpegFromUri.js +44 -0
  157. package/lib/commonjs/utils/jpegFromUri.js.map +1 -0
  158. package/lib/commonjs/utils/keepAwake.js +58 -0
  159. package/lib/commonjs/utils/keepAwake.js.map +1 -0
  160. package/lib/commonjs/utils/log.js +42 -0
  161. package/lib/commonjs/utils/log.js.map +1 -0
  162. package/lib/commonjs/utils/osGeocoder.js +70 -0
  163. package/lib/commonjs/utils/osGeocoder.js.map +1 -0
  164. package/lib/commonjs/utils/parseGoogleAddressComponents.js +74 -0
  165. package/lib/commonjs/utils/parseGoogleAddressComponents.js.map +1 -0
  166. package/lib/commonjs/utils/personNameNormalize.js +24 -0
  167. package/lib/commonjs/utils/personNameNormalize.js.map +1 -0
  168. package/lib/commonjs/utils/sdkError.js +34 -0
  169. package/lib/commonjs/utils/sdkError.js.map +1 -0
  170. package/lib/commonjs/utils/sdkVersion.js +13 -0
  171. package/lib/commonjs/utils/sdkVersion.js.map +1 -0
  172. package/lib/commonjs/utils/stepConfig.js +65 -0
  173. package/lib/commonjs/utils/stepConfig.js.map +1 -0
  174. package/lib/commonjs/utils/taxInfoConfig.js +19 -0
  175. package/lib/commonjs/utils/taxInfoConfig.js.map +1 -0
  176. package/lib/commonjs/utils/useSafeAreaInsets.js +41 -0
  177. package/lib/commonjs/utils/useSafeAreaInsets.js.map +1 -0
  178. package/lib/commonjs/utils/velionExtra.js +48 -0
  179. package/lib/commonjs/utils/velionExtra.js.map +1 -0
  180. package/lib/module/camera/AddressSearchBar.js +299 -0
  181. package/lib/module/camera/AddressSearchBar.js.map +1 -0
  182. package/lib/module/camera/DocumentCapture.js +508 -0
  183. package/lib/module/camera/DocumentCapture.js.map +1 -0
  184. package/lib/module/camera/LivenessCamera.js +623 -0
  185. package/lib/module/camera/LivenessCamera.js.map +1 -0
  186. package/lib/module/camera/MapAddressPicker.js +326 -0
  187. package/lib/module/camera/MapAddressPicker.js.map +1 -0
  188. package/lib/module/core/VelionOnboarding.js +1109 -0
  189. package/lib/module/core/VelionOnboarding.js.map +1 -0
  190. package/lib/module/core/retryStepCopy.js +39 -0
  191. package/lib/module/core/retryStepCopy.js.map +1 -0
  192. package/lib/module/core/routingCommands.js +57 -0
  193. package/lib/module/core/routingCommands.js.map +1 -0
  194. package/lib/module/core/sessionDeclinedCopy.js +52 -0
  195. package/lib/module/core/sessionDeclinedCopy.js.map +1 -0
  196. package/lib/module/core/sessionStateMapper.js +189 -0
  197. package/lib/module/core/sessionStateMapper.js.map +1 -0
  198. package/lib/module/core/sseReasonMessages.js +446 -0
  199. package/lib/module/core/sseReasonMessages.js.map +1 -0
  200. package/lib/module/data/iso3166Alpha2Codes.json +1 -0
  201. package/lib/module/data/iso3166CountryNames.json +251 -0
  202. package/lib/module/i18n/index.js +25 -0
  203. package/lib/module/i18n/index.js.map +1 -0
  204. package/lib/module/i18n/strings/en.js +297 -0
  205. package/lib/module/i18n/strings/en.js.map +1 -0
  206. package/lib/module/i18n/strings/es.js +302 -0
  207. package/lib/module/i18n/strings/es.js.map +1 -0
  208. package/lib/module/index.js +36 -0
  209. package/lib/module/index.js.map +1 -0
  210. package/lib/module/steps/AddressInfoStep.js +658 -0
  211. package/lib/module/steps/AddressInfoStep.js.map +1 -0
  212. package/lib/module/steps/DocumentsOcrStep.js +399 -0
  213. package/lib/module/steps/DocumentsOcrStep.js.map +1 -0
  214. package/lib/module/steps/EconomicActivityStep.js +209 -0
  215. package/lib/module/steps/EconomicActivityStep.js.map +1 -0
  216. package/lib/module/steps/EmailContactStep.js +145 -0
  217. package/lib/module/steps/EmailContactStep.js.map +1 -0
  218. package/lib/module/steps/EmailOtpStep.js +220 -0
  219. package/lib/module/steps/EmailOtpStep.js.map +1 -0
  220. package/lib/module/steps/FaceMatchStep.js +164 -0
  221. package/lib/module/steps/FaceMatchStep.js.map +1 -0
  222. package/lib/module/steps/FingerprintStep.js +87 -0
  223. package/lib/module/steps/FingerprintStep.js.map +1 -0
  224. package/lib/module/steps/HumanBasicInfoStep.js +246 -0
  225. package/lib/module/steps/HumanBasicInfoStep.js.map +1 -0
  226. package/lib/module/steps/HumanExtendedInfoStep.js +270 -0
  227. package/lib/module/steps/HumanExtendedInfoStep.js.map +1 -0
  228. package/lib/module/steps/LegalBasicInfoStep.js +190 -0
  229. package/lib/module/steps/LegalBasicInfoStep.js.map +1 -0
  230. package/lib/module/steps/LegalExtendedInfoStep.js +168 -0
  231. package/lib/module/steps/LegalExtendedInfoStep.js.map +1 -0
  232. package/lib/module/steps/LivenessMatchStep.js +1177 -0
  233. package/lib/module/steps/LivenessMatchStep.js.map +1 -0
  234. package/lib/module/steps/PhoneContactStep.js +146 -0
  235. package/lib/module/steps/PhoneContactStep.js.map +1 -0
  236. package/lib/module/steps/PhoneOtpStep.js +219 -0
  237. package/lib/module/steps/PhoneOtpStep.js.map +1 -0
  238. package/lib/module/steps/SwornDeclarationStep.js +203 -0
  239. package/lib/module/steps/SwornDeclarationStep.js.map +1 -0
  240. package/lib/module/steps/TaxInfoStep.js +246 -0
  241. package/lib/module/steps/TaxInfoStep.js.map +1 -0
  242. package/lib/module/steps/TermsAndConditionsStep.js +240 -0
  243. package/lib/module/steps/TermsAndConditionsStep.js.map +1 -0
  244. package/lib/module/steps/_shared.js +52 -0
  245. package/lib/module/steps/_shared.js.map +1 -0
  246. package/lib/module/steps/types.js +4 -0
  247. package/lib/module/steps/types.js.map +1 -0
  248. package/lib/module/transport/api.js +173 -0
  249. package/lib/module/transport/api.js.map +1 -0
  250. package/lib/module/transport/irisWebSocket.js +115 -0
  251. package/lib/module/transport/irisWebSocket.js.map +1 -0
  252. package/lib/module/transport/secureUrl.js +45 -0
  253. package/lib/module/transport/secureUrl.js.map +1 -0
  254. package/lib/module/transport/sse.js +242 -0
  255. package/lib/module/transport/sse.js.map +1 -0
  256. package/lib/module/types/index.js +532 -0
  257. package/lib/module/types/index.js.map +1 -0
  258. package/lib/module/ui/MapFallbackBoundary.js +37 -0
  259. package/lib/module/ui/MapFallbackBoundary.js.map +1 -0
  260. package/lib/module/ui/StepShell.js +246 -0
  261. package/lib/module/ui/StepShell.js.map +1 -0
  262. package/lib/module/ui/VelionOnboardingScreen.js +273 -0
  263. package/lib/module/ui/VelionOnboardingScreen.js.map +1 -0
  264. package/lib/module/ui/forms/index.js +5 -0
  265. package/lib/module/ui/forms/index.js.map +1 -0
  266. package/lib/module/ui/forms/useInlineValidation.js +84 -0
  267. package/lib/module/ui/forms/useInlineValidation.js.map +1 -0
  268. package/lib/module/ui/forms/validators.js +27 -0
  269. package/lib/module/ui/forms/validators.js.map +1 -0
  270. package/lib/module/ui/icons/HomeHeartIcon.js +33 -0
  271. package/lib/module/ui/icons/HomeHeartIcon.js.map +1 -0
  272. package/lib/module/ui/icons/StepIcon.js +55 -0
  273. package/lib/module/ui/icons/StepIcon.js.map +1 -0
  274. package/lib/module/ui/overlays/AnalyzingOverlay.js +279 -0
  275. package/lib/module/ui/overlays/AnalyzingOverlay.js.map +1 -0
  276. package/lib/module/ui/overlays/LoadingOverlay.js +104 -0
  277. package/lib/module/ui/overlays/LoadingOverlay.js.map +1 -0
  278. package/lib/module/ui/overlays/ProgressBar.js +97 -0
  279. package/lib/module/ui/overlays/ProgressBar.js.map +1 -0
  280. package/lib/module/ui/overlays/RetryDialog.js +121 -0
  281. package/lib/module/ui/overlays/RetryDialog.js.map +1 -0
  282. package/lib/module/ui/overlays/index.js +6 -0
  283. package/lib/module/ui/overlays/index.js.map +1 -0
  284. package/lib/module/ui/primitives/BackButton.js +71 -0
  285. package/lib/module/ui/primitives/BackButton.js.map +1 -0
  286. package/lib/module/ui/primitives/Banner.js +77 -0
  287. package/lib/module/ui/primitives/Banner.js.map +1 -0
  288. package/lib/module/ui/primitives/Button.js +138 -0
  289. package/lib/module/ui/primitives/Button.js.map +1 -0
  290. package/lib/module/ui/primitives/Card.js +46 -0
  291. package/lib/module/ui/primitives/Card.js.map +1 -0
  292. package/lib/module/ui/primitives/Checkbox.js +136 -0
  293. package/lib/module/ui/primitives/Checkbox.js.map +1 -0
  294. package/lib/module/ui/primitives/CountrySelect.js +284 -0
  295. package/lib/module/ui/primitives/CountrySelect.js.map +1 -0
  296. package/lib/module/ui/primitives/DatePicker.js +241 -0
  297. package/lib/module/ui/primitives/DatePicker.js.map +1 -0
  298. package/lib/module/ui/primitives/Input.js +97 -0
  299. package/lib/module/ui/primitives/Input.js.map +1 -0
  300. package/lib/module/ui/primitives/SearchableSingleSelectList.js +153 -0
  301. package/lib/module/ui/primitives/SearchableSingleSelectList.js.map +1 -0
  302. package/lib/module/ui/primitives/Select.js +205 -0
  303. package/lib/module/ui/primitives/Select.js.map +1 -0
  304. package/lib/module/ui/primitives/Spinner.js +21 -0
  305. package/lib/module/ui/primitives/Spinner.js.map +1 -0
  306. package/lib/module/ui/primitives/index.js +14 -0
  307. package/lib/module/ui/primitives/index.js.map +1 -0
  308. package/lib/module/ui/primitives/searchableSingleSelectFilter.js +27 -0
  309. package/lib/module/ui/primitives/searchableSingleSelectFilter.js.map +1 -0
  310. package/lib/module/ui/theme/ThemeProvider.js +67 -0
  311. package/lib/module/ui/theme/ThemeProvider.js.map +1 -0
  312. package/lib/module/ui/theme/index.js +5 -0
  313. package/lib/module/ui/theme/index.js.map +1 -0
  314. package/lib/module/ui/theme/tokens.js +145 -0
  315. package/lib/module/ui/theme/tokens.js.map +1 -0
  316. package/lib/module/utils/EventEmitter.js +139 -0
  317. package/lib/module/utils/EventEmitter.js.map +1 -0
  318. package/lib/module/utils/base64.js +47 -0
  319. package/lib/module/utils/base64.js.map +1 -0
  320. package/lib/module/utils/deviceFingerprint.js +129 -0
  321. package/lib/module/utils/deviceFingerprint.js.map +1 -0
  322. package/lib/module/utils/documentTypeOptions.js +31 -0
  323. package/lib/module/utils/documentTypeOptions.js.map +1 -0
  324. package/lib/module/utils/googleMapsPreflight.js +84 -0
  325. package/lib/module/utils/googleMapsPreflight.js.map +1 -0
  326. package/lib/module/utils/hmac.js +53 -0
  327. package/lib/module/utils/hmac.js.map +1 -0
  328. package/lib/module/utils/iso3166Countries.js +92 -0
  329. package/lib/module/utils/iso3166Countries.js.map +1 -0
  330. package/lib/module/utils/jpegFromUri.js +40 -0
  331. package/lib/module/utils/jpegFromUri.js.map +1 -0
  332. package/lib/module/utils/keepAwake.js +53 -0
  333. package/lib/module/utils/keepAwake.js.map +1 -0
  334. package/lib/module/utils/log.js +37 -0
  335. package/lib/module/utils/log.js.map +1 -0
  336. package/lib/module/utils/osGeocoder.js +65 -0
  337. package/lib/module/utils/osGeocoder.js.map +1 -0
  338. package/lib/module/utils/parseGoogleAddressComponents.js +69 -0
  339. package/lib/module/utils/parseGoogleAddressComponents.js.map +1 -0
  340. package/lib/module/utils/personNameNormalize.js +20 -0
  341. package/lib/module/utils/personNameNormalize.js.map +1 -0
  342. package/lib/module/utils/sdkError.js +29 -0
  343. package/lib/module/utils/sdkError.js.map +1 -0
  344. package/lib/module/utils/sdkVersion.js +9 -0
  345. package/lib/module/utils/sdkVersion.js.map +1 -0
  346. package/lib/module/utils/stepConfig.js +59 -0
  347. package/lib/module/utils/stepConfig.js.map +1 -0
  348. package/lib/module/utils/taxInfoConfig.js +15 -0
  349. package/lib/module/utils/taxInfoConfig.js.map +1 -0
  350. package/lib/module/utils/useSafeAreaInsets.js +37 -0
  351. package/lib/module/utils/useSafeAreaInsets.js.map +1 -0
  352. package/lib/module/utils/velionExtra.js +44 -0
  353. package/lib/module/utils/velionExtra.js.map +1 -0
  354. package/lib/typescript/camera/AddressSearchBar.d.ts +37 -0
  355. package/lib/typescript/camera/AddressSearchBar.d.ts.map +1 -0
  356. package/lib/typescript/camera/DocumentCapture.d.ts +34 -0
  357. package/lib/typescript/camera/DocumentCapture.d.ts.map +1 -0
  358. package/lib/typescript/camera/LivenessCamera.d.ts +67 -0
  359. package/lib/typescript/camera/LivenessCamera.d.ts.map +1 -0
  360. package/lib/typescript/camera/MapAddressPicker.d.ts +57 -0
  361. package/lib/typescript/camera/MapAddressPicker.d.ts.map +1 -0
  362. package/lib/typescript/core/VelionOnboarding.d.ts +169 -0
  363. package/lib/typescript/core/VelionOnboarding.d.ts.map +1 -0
  364. package/lib/typescript/core/retryStepCopy.d.ts +27 -0
  365. package/lib/typescript/core/retryStepCopy.d.ts.map +1 -0
  366. package/lib/typescript/core/routingCommands.d.ts +39 -0
  367. package/lib/typescript/core/routingCommands.d.ts.map +1 -0
  368. package/lib/typescript/core/sessionDeclinedCopy.d.ts +16 -0
  369. package/lib/typescript/core/sessionDeclinedCopy.d.ts.map +1 -0
  370. package/lib/typescript/core/sessionStateMapper.d.ts +52 -0
  371. package/lib/typescript/core/sessionStateMapper.d.ts.map +1 -0
  372. package/lib/typescript/core/sseReasonMessages.d.ts +20 -0
  373. package/lib/typescript/core/sseReasonMessages.d.ts.map +1 -0
  374. package/lib/typescript/i18n/index.d.ts +13 -0
  375. package/lib/typescript/i18n/index.d.ts.map +1 -0
  376. package/lib/typescript/i18n/strings/en.d.ts +3 -0
  377. package/lib/typescript/i18n/strings/en.d.ts.map +1 -0
  378. package/lib/typescript/i18n/strings/es.d.ts +297 -0
  379. package/lib/typescript/i18n/strings/es.d.ts.map +1 -0
  380. package/lib/typescript/index.d.ts +26 -0
  381. package/lib/typescript/index.d.ts.map +1 -0
  382. package/lib/typescript/steps/AddressInfoStep.d.ts +26 -0
  383. package/lib/typescript/steps/AddressInfoStep.d.ts.map +1 -0
  384. package/lib/typescript/steps/DocumentsOcrStep.d.ts +26 -0
  385. package/lib/typescript/steps/DocumentsOcrStep.d.ts.map +1 -0
  386. package/lib/typescript/steps/EconomicActivityStep.d.ts +29 -0
  387. package/lib/typescript/steps/EconomicActivityStep.d.ts.map +1 -0
  388. package/lib/typescript/steps/EmailContactStep.d.ts +15 -0
  389. package/lib/typescript/steps/EmailContactStep.d.ts.map +1 -0
  390. package/lib/typescript/steps/EmailOtpStep.d.ts +21 -0
  391. package/lib/typescript/steps/EmailOtpStep.d.ts.map +1 -0
  392. package/lib/typescript/steps/FaceMatchStep.d.ts +27 -0
  393. package/lib/typescript/steps/FaceMatchStep.d.ts.map +1 -0
  394. package/lib/typescript/steps/FingerprintStep.d.ts +25 -0
  395. package/lib/typescript/steps/FingerprintStep.d.ts.map +1 -0
  396. package/lib/typescript/steps/HumanBasicInfoStep.d.ts +25 -0
  397. package/lib/typescript/steps/HumanBasicInfoStep.d.ts.map +1 -0
  398. package/lib/typescript/steps/HumanExtendedInfoStep.d.ts +23 -0
  399. package/lib/typescript/steps/HumanExtendedInfoStep.d.ts.map +1 -0
  400. package/lib/typescript/steps/LegalBasicInfoStep.d.ts +17 -0
  401. package/lib/typescript/steps/LegalBasicInfoStep.d.ts.map +1 -0
  402. package/lib/typescript/steps/LegalExtendedInfoStep.d.ts +17 -0
  403. package/lib/typescript/steps/LegalExtendedInfoStep.d.ts.map +1 -0
  404. package/lib/typescript/steps/LivenessMatchStep.d.ts +26 -0
  405. package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -0
  406. package/lib/typescript/steps/PhoneContactStep.d.ts +15 -0
  407. package/lib/typescript/steps/PhoneContactStep.d.ts.map +1 -0
  408. package/lib/typescript/steps/PhoneOtpStep.d.ts +19 -0
  409. package/lib/typescript/steps/PhoneOtpStep.d.ts.map +1 -0
  410. package/lib/typescript/steps/SwornDeclarationStep.d.ts +20 -0
  411. package/lib/typescript/steps/SwornDeclarationStep.d.ts.map +1 -0
  412. package/lib/typescript/steps/TaxInfoStep.d.ts +19 -0
  413. package/lib/typescript/steps/TaxInfoStep.d.ts.map +1 -0
  414. package/lib/typescript/steps/TermsAndConditionsStep.d.ts +21 -0
  415. package/lib/typescript/steps/TermsAndConditionsStep.d.ts.map +1 -0
  416. package/lib/typescript/steps/_shared.d.ts +22 -0
  417. package/lib/typescript/steps/_shared.d.ts.map +1 -0
  418. package/lib/typescript/steps/types.d.ts +89 -0
  419. package/lib/typescript/steps/types.d.ts.map +1 -0
  420. package/lib/typescript/transport/api.d.ts +35 -0
  421. package/lib/typescript/transport/api.d.ts.map +1 -0
  422. package/lib/typescript/transport/irisWebSocket.d.ts +72 -0
  423. package/lib/typescript/transport/irisWebSocket.d.ts.map +1 -0
  424. package/lib/typescript/transport/secureUrl.d.ts +14 -0
  425. package/lib/typescript/transport/secureUrl.d.ts.map +1 -0
  426. package/lib/typescript/transport/sse.d.ts +54 -0
  427. package/lib/typescript/transport/sse.d.ts.map +1 -0
  428. package/lib/typescript/types/index.d.ts +1219 -0
  429. package/lib/typescript/types/index.d.ts.map +1 -0
  430. package/lib/typescript/ui/MapFallbackBoundary.d.ts +28 -0
  431. package/lib/typescript/ui/MapFallbackBoundary.d.ts.map +1 -0
  432. package/lib/typescript/ui/StepShell.d.ts +29 -0
  433. package/lib/typescript/ui/StepShell.d.ts.map +1 -0
  434. package/lib/typescript/ui/VelionOnboardingScreen.d.ts +26 -0
  435. package/lib/typescript/ui/VelionOnboardingScreen.d.ts.map +1 -0
  436. package/lib/typescript/ui/forms/index.d.ts +3 -0
  437. package/lib/typescript/ui/forms/index.d.ts.map +1 -0
  438. package/lib/typescript/ui/forms/useInlineValidation.d.ts +30 -0
  439. package/lib/typescript/ui/forms/useInlineValidation.d.ts.map +1 -0
  440. package/lib/typescript/ui/forms/validators.d.ts +11 -0
  441. package/lib/typescript/ui/forms/validators.d.ts.map +1 -0
  442. package/lib/typescript/ui/icons/HomeHeartIcon.d.ts +14 -0
  443. package/lib/typescript/ui/icons/HomeHeartIcon.d.ts.map +1 -0
  444. package/lib/typescript/ui/icons/StepIcon.d.ts +26 -0
  445. package/lib/typescript/ui/icons/StepIcon.d.ts.map +1 -0
  446. package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts +24 -0
  447. package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts.map +1 -0
  448. package/lib/typescript/ui/overlays/LoadingOverlay.d.ts +19 -0
  449. package/lib/typescript/ui/overlays/LoadingOverlay.d.ts.map +1 -0
  450. package/lib/typescript/ui/overlays/ProgressBar.d.ts +32 -0
  451. package/lib/typescript/ui/overlays/ProgressBar.d.ts.map +1 -0
  452. package/lib/typescript/ui/overlays/RetryDialog.d.ts +17 -0
  453. package/lib/typescript/ui/overlays/RetryDialog.d.ts.map +1 -0
  454. package/lib/typescript/ui/overlays/index.d.ts +4 -0
  455. package/lib/typescript/ui/overlays/index.d.ts.map +1 -0
  456. package/lib/typescript/ui/primitives/BackButton.d.ts +20 -0
  457. package/lib/typescript/ui/primitives/BackButton.d.ts.map +1 -0
  458. package/lib/typescript/ui/primitives/Banner.d.ts +11 -0
  459. package/lib/typescript/ui/primitives/Banner.d.ts.map +1 -0
  460. package/lib/typescript/ui/primitives/Button.d.ts +27 -0
  461. package/lib/typescript/ui/primitives/Button.d.ts.map +1 -0
  462. package/lib/typescript/ui/primitives/Card.d.ts +10 -0
  463. package/lib/typescript/ui/primitives/Card.d.ts.map +1 -0
  464. package/lib/typescript/ui/primitives/Checkbox.d.ts +25 -0
  465. package/lib/typescript/ui/primitives/Checkbox.d.ts.map +1 -0
  466. package/lib/typescript/ui/primitives/CountrySelect.d.ts +31 -0
  467. package/lib/typescript/ui/primitives/CountrySelect.d.ts.map +1 -0
  468. package/lib/typescript/ui/primitives/DatePicker.d.ts +42 -0
  469. package/lib/typescript/ui/primitives/DatePicker.d.ts.map +1 -0
  470. package/lib/typescript/ui/primitives/Input.d.ts +17 -0
  471. package/lib/typescript/ui/primitives/Input.d.ts.map +1 -0
  472. package/lib/typescript/ui/primitives/SearchableSingleSelectList.d.ts +33 -0
  473. package/lib/typescript/ui/primitives/SearchableSingleSelectList.d.ts.map +1 -0
  474. package/lib/typescript/ui/primitives/Select.d.ts +26 -0
  475. package/lib/typescript/ui/primitives/Select.d.ts.map +1 -0
  476. package/lib/typescript/ui/primitives/Spinner.d.ts +10 -0
  477. package/lib/typescript/ui/primitives/Spinner.d.ts.map +1 -0
  478. package/lib/typescript/ui/primitives/index.d.ts +12 -0
  479. package/lib/typescript/ui/primitives/index.d.ts.map +1 -0
  480. package/lib/typescript/ui/primitives/searchableSingleSelectFilter.d.ts +25 -0
  481. package/lib/typescript/ui/primitives/searchableSingleSelectFilter.d.ts.map +1 -0
  482. package/lib/typescript/ui/theme/ThemeProvider.d.ts +23 -0
  483. package/lib/typescript/ui/theme/ThemeProvider.d.ts.map +1 -0
  484. package/lib/typescript/ui/theme/index.d.ts +3 -0
  485. package/lib/typescript/ui/theme/index.d.ts.map +1 -0
  486. package/lib/typescript/ui/theme/tokens.d.ts +42 -0
  487. package/lib/typescript/ui/theme/tokens.d.ts.map +1 -0
  488. package/lib/typescript/utils/EventEmitter.d.ts +98 -0
  489. package/lib/typescript/utils/EventEmitter.d.ts.map +1 -0
  490. package/lib/typescript/utils/base64.d.ts +19 -0
  491. package/lib/typescript/utils/base64.d.ts.map +1 -0
  492. package/lib/typescript/utils/deviceFingerprint.d.ts +42 -0
  493. package/lib/typescript/utils/deviceFingerprint.d.ts.map +1 -0
  494. package/lib/typescript/utils/documentTypeOptions.d.ts +13 -0
  495. package/lib/typescript/utils/documentTypeOptions.d.ts.map +1 -0
  496. package/lib/typescript/utils/googleMapsPreflight.d.ts +52 -0
  497. package/lib/typescript/utils/googleMapsPreflight.d.ts.map +1 -0
  498. package/lib/typescript/utils/hmac.d.ts +39 -0
  499. package/lib/typescript/utils/hmac.d.ts.map +1 -0
  500. package/lib/typescript/utils/iso3166Countries.d.ts +27 -0
  501. package/lib/typescript/utils/iso3166Countries.d.ts.map +1 -0
  502. package/lib/typescript/utils/jpegFromUri.d.ts +29 -0
  503. package/lib/typescript/utils/jpegFromUri.d.ts.map +1 -0
  504. package/lib/typescript/utils/keepAwake.d.ts +16 -0
  505. package/lib/typescript/utils/keepAwake.d.ts.map +1 -0
  506. package/lib/typescript/utils/log.d.ts +18 -0
  507. package/lib/typescript/utils/log.d.ts.map +1 -0
  508. package/lib/typescript/utils/osGeocoder.d.ts +38 -0
  509. package/lib/typescript/utils/osGeocoder.d.ts.map +1 -0
  510. package/lib/typescript/utils/parseGoogleAddressComponents.d.ts +43 -0
  511. package/lib/typescript/utils/parseGoogleAddressComponents.d.ts.map +1 -0
  512. package/lib/typescript/utils/personNameNormalize.d.ts +10 -0
  513. package/lib/typescript/utils/personNameNormalize.d.ts.map +1 -0
  514. package/lib/typescript/utils/sdkError.d.ts +14 -0
  515. package/lib/typescript/utils/sdkError.d.ts.map +1 -0
  516. package/lib/typescript/utils/sdkVersion.d.ts +7 -0
  517. package/lib/typescript/utils/sdkVersion.d.ts.map +1 -0
  518. package/lib/typescript/utils/stepConfig.d.ts +8 -0
  519. package/lib/typescript/utils/stepConfig.d.ts.map +1 -0
  520. package/lib/typescript/utils/taxInfoConfig.d.ts +7 -0
  521. package/lib/typescript/utils/taxInfoConfig.d.ts.map +1 -0
  522. package/lib/typescript/utils/useSafeAreaInsets.d.ts +26 -0
  523. package/lib/typescript/utils/useSafeAreaInsets.d.ts.map +1 -0
  524. package/lib/typescript/utils/velionExtra.d.ts +24 -0
  525. package/lib/typescript/utils/velionExtra.d.ts.map +1 -0
  526. package/package.json +107 -0
  527. package/src/camera/AddressSearchBar.tsx +363 -0
  528. package/src/camera/DocumentCapture.tsx +514 -0
  529. package/src/camera/LivenessCamera.tsx +706 -0
  530. package/src/camera/MapAddressPicker.tsx +391 -0
  531. package/src/core/VelionOnboarding.ts +1291 -0
  532. package/src/core/retryStepCopy.ts +54 -0
  533. package/src/core/routingCommands.ts +63 -0
  534. package/src/core/sessionDeclinedCopy.ts +76 -0
  535. package/src/core/sessionStateMapper.ts +232 -0
  536. package/src/core/sseReasonMessages.ts +531 -0
  537. package/src/data/iso3166Alpha2Codes.json +1 -0
  538. package/src/data/iso3166CountryNames.json +251 -0
  539. package/src/i18n/index.ts +26 -0
  540. package/src/i18n/strings/en.ts +335 -0
  541. package/src/i18n/strings/es.ts +337 -0
  542. package/src/index.ts +146 -0
  543. package/src/steps/AddressInfoStep.tsx +744 -0
  544. package/src/steps/DocumentsOcrStep.tsx +481 -0
  545. package/src/steps/EconomicActivityStep.tsx +230 -0
  546. package/src/steps/EmailContactStep.tsx +165 -0
  547. package/src/steps/EmailOtpStep.tsx +256 -0
  548. package/src/steps/FaceMatchStep.tsx +176 -0
  549. package/src/steps/FingerprintStep.tsx +99 -0
  550. package/src/steps/HumanBasicInfoStep.tsx +286 -0
  551. package/src/steps/HumanExtendedInfoStep.tsx +362 -0
  552. package/src/steps/LegalBasicInfoStep.tsx +214 -0
  553. package/src/steps/LegalExtendedInfoStep.tsx +184 -0
  554. package/src/steps/LivenessMatchStep.tsx +1351 -0
  555. package/src/steps/PhoneContactStep.tsx +166 -0
  556. package/src/steps/PhoneOtpStep.tsx +255 -0
  557. package/src/steps/SwornDeclarationStep.tsx +237 -0
  558. package/src/steps/TaxInfoStep.tsx +288 -0
  559. package/src/steps/TermsAndConditionsStep.tsx +269 -0
  560. package/src/steps/_shared.ts +69 -0
  561. package/src/steps/types.ts +93 -0
  562. package/src/transport/api.ts +257 -0
  563. package/src/transport/irisWebSocket.ts +186 -0
  564. package/src/transport/secureUrl.ts +47 -0
  565. package/src/transport/sse.ts +310 -0
  566. package/src/types/index.ts +1421 -0
  567. package/src/ui/MapFallbackBoundary.tsx +46 -0
  568. package/src/ui/StepShell.tsx +273 -0
  569. package/src/ui/VelionOnboardingScreen.tsx +297 -0
  570. package/src/ui/forms/index.ts +12 -0
  571. package/src/ui/forms/useInlineValidation.ts +115 -0
  572. package/src/ui/forms/validators.ts +29 -0
  573. package/src/ui/icons/HomeHeartIcon.tsx +34 -0
  574. package/src/ui/icons/StepIcon.tsx +78 -0
  575. package/src/ui/overlays/AnalyzingOverlay.tsx +323 -0
  576. package/src/ui/overlays/LoadingOverlay.tsx +115 -0
  577. package/src/ui/overlays/ProgressBar.tsx +106 -0
  578. package/src/ui/overlays/RetryDialog.tsx +128 -0
  579. package/src/ui/overlays/index.ts +3 -0
  580. package/src/ui/primitives/BackButton.tsx +65 -0
  581. package/src/ui/primitives/Banner.tsx +81 -0
  582. package/src/ui/primitives/Button.tsx +164 -0
  583. package/src/ui/primitives/Card.tsx +55 -0
  584. package/src/ui/primitives/Checkbox.tsx +153 -0
  585. package/src/ui/primitives/CountrySelect.tsx +356 -0
  586. package/src/ui/primitives/DatePicker.tsx +266 -0
  587. package/src/ui/primitives/Input.tsx +110 -0
  588. package/src/ui/primitives/SearchableSingleSelectList.tsx +195 -0
  589. package/src/ui/primitives/Select.tsx +259 -0
  590. package/src/ui/primitives/Spinner.tsx +17 -0
  591. package/src/ui/primitives/index.ts +16 -0
  592. package/src/ui/primitives/searchableSingleSelectFilter.ts +38 -0
  593. package/src/ui/theme/ThemeProvider.tsx +102 -0
  594. package/src/ui/theme/index.ts +17 -0
  595. package/src/ui/theme/tokens.ts +159 -0
  596. package/src/utils/EventEmitter.ts +155 -0
  597. package/src/utils/base64.ts +44 -0
  598. package/src/utils/deviceFingerprint.ts +184 -0
  599. package/src/utils/documentTypeOptions.ts +31 -0
  600. package/src/utils/googleMapsPreflight.ts +89 -0
  601. package/src/utils/hmac.ts +61 -0
  602. package/src/utils/iso3166Countries.ts +111 -0
  603. package/src/utils/jpegFromUri.ts +42 -0
  604. package/src/utils/keepAwake.ts +62 -0
  605. package/src/utils/log.ts +37 -0
  606. package/src/utils/osGeocoder.ts +75 -0
  607. package/src/utils/parseGoogleAddressComponents.ts +123 -0
  608. package/src/utils/personNameNormalize.ts +17 -0
  609. package/src/utils/sdkError.ts +40 -0
  610. package/src/utils/sdkVersion.ts +6 -0
  611. package/src/utils/stepConfig.ts +75 -0
  612. package/src/utils/taxInfoConfig.ts +14 -0
  613. package/src/utils/useSafeAreaInsets.ts +37 -0
  614. package/src/utils/velionExtra.ts +46 -0
@@ -0,0 +1,532 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * @fileoverview Public TypeScript contracts for the Velion Onboarding SDK.
5
+ *
6
+ * Design principle: All types exported from this file constitute the public API.
7
+ * Internal implementation types should live alongside their respective modules.
8
+ */
9
+
10
+ // ─────────────────────────────────────────────────────────────────────────────
11
+ // STEP & FLOW TYPES
12
+ // ─────────────────────────────────────────────────────────────────────────────
13
+
14
+ /**
15
+ * The complete set of onboarding steps the backend can require.
16
+ * The SDK dynamically receives the active subset for each session.
17
+ *
18
+ * @remarks
19
+ * - `DEVICE_FINGERPRINT`: Silently collects device entropy via FingerprintJS.
20
+ * - `DOCUMENTS_OCR`: Renders a UI for ID document image capture and upload.
21
+ * - `LIVENESS_MATCH`: Drives the Velion Iris active-liveness flow over WebSocket (HUMAN only).
22
+ * - `EMAIL_OTP` / `PHONE_OTP`: Contact verification via one-time passwords.
23
+ * - `HUMAN_BASIC_INFO`: Natural-person identification data (HUMAN only).
24
+ * - `LEGAL_BASIC_INFO`: Legal-entity identification data (LEGAL only).
25
+ * - `EMAIL_CONTACT` / `PHONE_CONTACT`: contact collection without OTP.
26
+ * - `TAX_INFO`, `HUMAN_EXTENDED_INFO`, `LEGAL_EXTENDED_INFO`, `ADDRESS_INFO`, `SWORN_DECLARATION`: form steps.
27
+ * - `ECONOMIC_ACTIVITY_DECLARATION`: pick exactly one economic activity from a searchable list.
28
+ * - `TERMS_AND_CONDITIONS`: accept configured T&C items.
29
+ * - `FACE_MATCH`: server-side face comparison after liveness (no user input; SDK waits).
30
+ */
31
+
32
+ /**
33
+ * Status of an individual onboarding step (matches backend OnboardingStepStatus).
34
+ */
35
+
36
+ /**
37
+ * Type of onboarding session (matches backend OnboardingType).
38
+ * Constrains which steps are valid: HUMAN allows biometric steps, LEGAL uses entity data.
39
+ */
40
+
41
+ /** Which face of the ID document is being captured. */
42
+
43
+ /**
44
+ * How the user can provide document images in the DOCUMENTS_OCR step.
45
+ * - `'camera'`: Only "Take photo" (opens camera on supported devices).
46
+ * - `'file'`: Only "Choose file" (file picker).
47
+ * - `'both'`: Both options; implementer can style via theme.
48
+ *
49
+ * @default 'both'
50
+ */
51
+
52
+ /**
53
+ * Orientation of the document capture cutout / crop frame.
54
+ * - `'landscape'`: Horizontal card (default — standard ID-1 cards).
55
+ * - `'portrait'`: Vertical card (e.g. some passports, residence permits).
56
+ *
57
+ * @default 'landscape'
58
+ */
59
+
60
+ /** Generic visible/required field toggle used by workflow step configs. */
61
+
62
+ /** Select option used by configurable step fields (e.g. HUMAN_EXTENDED_INFO gender/civil_status). */
63
+
64
+ /** Field rule with optional selectable options. */
65
+
66
+ /** STEP config for HUMAN_BASIC_INFO. */
67
+
68
+ /**
69
+ * One selectable option row from TAX_INFO `accepted_tax_information` (backend GET session).
70
+ * Prefer `code` as the value sent in POST tax-info; `id` is supported for older payloads.
71
+ */
72
+
73
+ /** One country block in TAX_INFO step config (GET session `current_step.config`). */
74
+
75
+ /** STEP config for TAX_INFO. */
76
+
77
+ /** STEP config for HUMAN_EXTENDED_INFO. */
78
+
79
+ /** STEP config for ADDRESS_INFO. */
80
+
81
+ /** STEP config for SWORN_DECLARATION. */
82
+
83
+ /**
84
+ * A single selectable economic activity presented in the
85
+ * `ECONOMIC_ACTIVITY_DECLARATION` step. Mirrors the backend `EconomicActivityItem`
86
+ * (`code` + `display_name`); `code` is unique within the list and is what the SDK
87
+ * submits. There is no global catalog — each workflow declares its own list.
88
+ */
89
+
90
+ /** STEP config for ECONOMIC_ACTIVITY_DECLARATION (`current_step.config`). */
91
+
92
+ /** STEP config for DOCUMENTS_OCR. */
93
+
94
+ /** STEP config for TERMS_AND_CONDITIONS. */
95
+
96
+ /** Generic per-step runtime config map carried by session state and SSE. */
97
+
98
+ /**
99
+ * Request body for POST /sessions/:sessionId/documents-init.
100
+ * Allowed values are defined by the backend; the SDK currently sends a fixed type until
101
+ * the session exposes selectable document types.
102
+ */
103
+
104
+ /**
105
+ * Response from POST /sessions/:sessionId/documents-init.
106
+ * Backend returns signed upload URLs so the SDK can PUT each document side
107
+ * directly to storage (e.g. GCS) without routing bytes through the backend.
108
+ */
109
+
110
+ // ─────────────────────────────────────────────────────────────────────────────
111
+ // ERROR TYPES
112
+ // ─────────────────────────────────────────────────────────────────────────────
113
+
114
+ /**
115
+ * Granular error codes for camera/hardware failures.
116
+ * Allows consumers to display localized, actionable messages to end-users.
117
+ */
118
+ export let CameraErrorCode = /*#__PURE__*/function (CameraErrorCode) {
119
+ /** User explicitly denied camera access in the browser permission dialog. */
120
+ CameraErrorCode["PERMISSION_DENIED"] = "CAMERA_PERMISSION_DENIED";
121
+ /** No camera device was detected on the system. */
122
+ CameraErrorCode["DEVICE_NOT_FOUND"] = "CAMERA_DEVICE_NOT_FOUND";
123
+ /**
124
+ * The camera could not be opened for reading (often in use by another app,
125
+ * or blocked at the OS level). Maps to `NotReadableError` / `TrackStartError`.
126
+ */
127
+ CameraErrorCode["DEVICE_NOT_READABLE"] = "CAMERA_DEVICE_NOT_READABLE";
128
+ /**
129
+ * The page is served over HTTP (not HTTPS) in a production environment.
130
+ * `getUserMedia` is blocked by the browser's Secure Context policy.
131
+ */
132
+ CameraErrorCode["INSECURE_CONTEXT"] = "CAMERA_INSECURE_CONTEXT";
133
+ /**
134
+ * Browser policy blocked camera (e.g. cross-origin iframe without permission,
135
+ * or `Permissions-Policy` / Feature-Policy denying camera). Maps to `SecurityError`
136
+ * from `getUserMedia` — distinct from {@link INSECURE_CONTEXT} (non-HTTPS).
137
+ */
138
+ CameraErrorCode["POLICY_BLOCKED"] = "CAMERA_POLICY_BLOCKED";
139
+ /** The browser or WebView does not support the `getUserMedia` API. */
140
+ CameraErrorCode["NOT_SUPPORTED"] = "CAMERA_NOT_SUPPORTED";
141
+ /**
142
+ * Camera access is blocked by a WebView policy (common in in-app browsers
143
+ * on iOS/Android that restrict hardware access).
144
+ */
145
+ CameraErrorCode["WEBVIEW_BLOCKED"] = "CAMERA_WEBVIEW_BLOCKED";
146
+ /** The requested video constraints (resolution, facing mode) are not satisfiable. */
147
+ CameraErrorCode["CONSTRAINT_ERROR"] = "CAMERA_CONSTRAINT_ERROR";
148
+ /** An unclassified camera error occurred. Check `cause` for details. */
149
+ CameraErrorCode["UNKNOWN"] = "CAMERA_UNKNOWN_ERROR";
150
+ return CameraErrorCode;
151
+ }({});
152
+
153
+ /**
154
+ * Top-level SDK error codes covering all failure scenarios in the onboarding flow.
155
+ */
156
+ export let SdkErrorCode = /*#__PURE__*/function (SdkErrorCode) {
157
+ // ── Session ──────────────────────────────────────────────────────────────
158
+ /** The sessionToken was rejected by the backend (401/403). */
159
+ SdkErrorCode["SESSION_INVALID"] = "SESSION_INVALID";
160
+ /** The sessionToken has expired (typically a 401 after initial validation). */
161
+ SdkErrorCode["SESSION_EXPIRED"] = "SESSION_EXPIRED";
162
+ /** Could not fetch the initial session state from the backend. */
163
+ SdkErrorCode["SESSION_FETCH_FAILED"] = "SESSION_FETCH_FAILED";
164
+ /** Backend sent SESSION_DECLINED over SSE; session ended before completion. */
165
+ SdkErrorCode["SESSION_DECLINED"] = "SESSION_DECLINED";
166
+ // ── Modules ──────────────────────────────────────────────────────────────
167
+ /** FingerprintJS failed to generate the visitor ID. */
168
+ SdkErrorCode["FINGERPRINT_FAILED"] = "FINGERPRINT_FAILED";
169
+ /** One or more document images failed to upload successfully. */
170
+ SdkErrorCode["DOCUMENT_UPLOAD_FAILED"] = "DOCUMENT_UPLOAD_FAILED";
171
+ /** The liveness check did not pass or returned an unexpected result. */
172
+ SdkErrorCode["LIVENESS_FAILED"] = "LIVENESS_FAILED";
173
+ /** The Liveness module failed to initialize (e.g., could not create the Iris session). */
174
+ SdkErrorCode["LIVENESS_INIT_FAILED"] = "LIVENESS_INIT_FAILED";
175
+ // ── Camera ───────────────────────────────────────────────────────────────
176
+ /**
177
+ * A camera-related error occurred. Inspect `cameraCode` for the specific reason.
178
+ * @see CameraErrorCode
179
+ */
180
+ SdkErrorCode["CAMERA_ERROR"] = "CAMERA_ERROR";
181
+ // ── Network & API ────────────────────────────────────────────────────────
182
+ /** A network-level failure (no internet, CORS, DNS). */
183
+ SdkErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR";
184
+ /** The backend returned a non-2xx HTTP status. */
185
+ SdkErrorCode["API_ERROR"] = "API_ERROR";
186
+ // ── Configuration ────────────────────────────────────────────────────────
187
+ /** The `containerId` provided in the config does not exist in the DOM. */
188
+ SdkErrorCode["CONTAINER_NOT_FOUND"] = "CONTAINER_NOT_FOUND";
189
+ /** `start()` was called on an SDK instance that is already running. */
190
+ SdkErrorCode["ALREADY_STARTED"] = "ALREADY_STARTED";
191
+ /** `start()` was called after `destroy()`. The instance is no longer usable. */
192
+ SdkErrorCode["INSTANCE_DESTROYED"] = "INSTANCE_DESTROYED";
193
+ /**
194
+ * The page is running inside an iframe and embedding was not explicitly allowed.
195
+ * Configure Content-Security-Policy: frame-ancestors or X-Frame-Options on the
196
+ * page that hosts the SDK, or set allowEmbedded: true if embedding is intentional.
197
+ */
198
+ SdkErrorCode["INSECURE_EMBED"] = "INSECURE_EMBED";
199
+ /**
200
+ * The CDN-served manifest could not be downloaded or its Ed25519 signature did
201
+ * not verify against the loader's embedded public key. The loader refuses to
202
+ * mount the iframe to prevent execution of tampered/unsigned bundles.
203
+ */
204
+ SdkErrorCode["INTEGRITY_FAILED"] = "INTEGRITY_FAILED";
205
+ SdkErrorCode["UNKNOWN"] = "UNKNOWN";
206
+ return SdkErrorCode;
207
+ }({});
208
+
209
+ /**
210
+ * A structured, machine-readable error object emitted by the SDK.
211
+ *
212
+ * @example
213
+ * ```typescript
214
+ * const sdk = new VelionOnboarding({
215
+ * onError: (err) => {
216
+ * if (err.code === SdkErrorCode.CAMERA_ERROR &&
217
+ * err.cameraCode === CameraErrorCode.PERMISSION_DENIED) {
218
+ * showCameraPermissionDialog();
219
+ * }
220
+ * }
221
+ * });
222
+ * ```
223
+ */
224
+
225
+ // ─────────────────────────────────────────────────────────────────────────────
226
+ // THEMING
227
+ // ─────────────────────────────────────────────────────────────────────────────
228
+
229
+ /**
230
+ * White-labeling theme configuration.
231
+ * Each property maps to a CSS custom property injected on the SDK container,
232
+ * making all SDK UI elements styleable via `--vl-*` variables.
233
+ *
234
+ * @example
235
+ * ```typescript
236
+ * const theme: VelionTheme = {
237
+ * primaryColor: '#0052CC', // → --vl-primary-color
238
+ * borderRadius: '12px', // → --vl-border-radius
239
+ * fontFamily: 'Inter, sans-serif'// → --vl-font-family
240
+ * };
241
+ * ```
242
+ */
243
+
244
+ /**
245
+ * Optional title and body for one terminal verdict on the final result screen.
246
+ */
247
+
248
+ /**
249
+ * Configurable copy for the built-in final result screen (`showFinalResultScreen`).
250
+ * Omitted fields fall back to SDK defaults for the active `locale`.
251
+ */
252
+
253
+ /**
254
+ * Localized title/body for one `reason` on the SESSION_DECLINED screen.
255
+ * Keys match backend `reason` (e.g. `TAX_INFO_FAILED`).
256
+ */
257
+
258
+ /**
259
+ * Per-reason overrides for the built-in SESSION_DECLINED screen (`showFinalResultScreen` not false).
260
+ * Unspecified reasons fall back to SDK defaults when available, then generic copy.
261
+ */
262
+
263
+ /**
264
+ * Per-step overrides for the retry dialog shown when the backend emits a
265
+ * `ROUTING_COMMAND / RETRY_STEP` (the step failed but the retry quota is not
266
+ * exhausted). Keyed by step code (e.g. `LIVENESS_MATCH`, `DOCUMENTS_OCR`).
267
+ * Unspecified steps fall back to SDK per-step defaults, then generic copy.
268
+ *
269
+ * Note: the SDK intentionally ignores the backend `reason` for this dialog —
270
+ * it is a diagnostic string (e.g. `"STEP_FAILED_RETRY_ALLOWED (attempt 1/3)"`),
271
+ * not user-facing localized copy. The copy is derived from the step instead.
272
+ */
273
+
274
+ // ─────────────────────────────────────────────────────────────────────────────
275
+ // CALLBACKS
276
+ // ─────────────────────────────────────────────────────────────────────────────
277
+
278
+ /**
279
+ * The complete set of lifecycle callbacks the host application can subscribe to.
280
+ * All callbacks are optional. The SDK is still functional without any of them,
281
+ * but `onError` and `onSuccess` are strongly recommended for production.
282
+ */
283
+
284
+ // ─────────────────────────────────────────────────────────────────────────────
285
+ // MAIN CONFIGURATION
286
+ // ─────────────────────────────────────────────────────────────────────────────
287
+
288
+ /**
289
+ * Root configuration object for the `VelionOnboarding` class.
290
+ *
291
+ * @example
292
+ * ```typescript
293
+ * const sdk = new VelionOnboarding({
294
+ * containerId: 'velion-root',
295
+ * sessionId: 'ses_abc123',
296
+ * sessionToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
297
+ * apiUrl: 'https://api.velion.la/v1',
298
+ * theme: { primaryColor: '#0052CC' },
299
+ * onSuccess: (result) => console.log('Done!', result),
300
+ * onError: (err) => console.error('SDK Error:', err),
301
+ * });
302
+ *
303
+ * await sdk.start();
304
+ * ```
305
+ */
306
+
307
+ // ─────────────────────────────────────────────────────────────────────────────
308
+ // BACKEND RESPONSE SHAPES
309
+ // ─────────────────────────────────────────────────────────────────────────────
310
+
311
+ /**
312
+ * Backend step DTO (OnboardingStepDto). GET session returns an array of these.
313
+ */
314
+
315
+ /**
316
+ * Backend session/onboarding DTO (OnboardingDto). Returned by GET /sessions/:sessionId.
317
+ * The SDK maps this to SessionState for the step machine.
318
+ */
319
+
320
+ /**
321
+ * Session state used by the SDK step machine. Derived from GET /sessions/:sessionId
322
+ * (OnboardingDto): steps sorted by order → requiredSteps, first non-completed index → currentStepIndex.
323
+ */
324
+
325
+ /**
326
+ * Emitted when the user leaves the onboarding flow without a backend verdict.
327
+ *
328
+ * Triggers:
329
+ * - `BACK_EXIT`: the user tapped "back" on the first reversible step, where
330
+ * there is no earlier step to return to, so the backend instructs the SDK to
331
+ * exit.
332
+ * - `RETRY_CANCELLED`: the user tapped "Cancel" on the retry dialog shown after
333
+ * a `ROUTING_COMMAND / RETRY_STEP`. The backend session stays `IN_PROGRESS`
334
+ * (there is no cancellation endpoint); the host may re-open it later via
335
+ * `GET /sessions/:id`.
336
+ *
337
+ * This is neither success nor error — the host should dismiss the SDK screen and
338
+ * return the user to wherever they came from. See {@link VelionCallbacks.onExit}.
339
+ */
340
+
341
+ /**
342
+ * A single T&C line item (matches backend TermsAndConditionsItemDto / domain record).
343
+ */
344
+
345
+ /**
346
+ * Response from session creation (POST from your backend). Use sessionId and
347
+ * sessionToken when instantiating VelionOnboarding; pass expiresAt for optional
348
+ * client-side expiration checks.
349
+ */
350
+
351
+ /**
352
+ * Shape of the final result returned by `GET /sessions/:sessionId/result`
353
+ * once all steps are complete.
354
+ */
355
+
356
+ /**
357
+ * Response from `POST /sessions/:sessionId/liveness-init`.
358
+ * The backend returns the Iris session details the SDK needs to open the WebSocket
359
+ * and stream frames. Credentials are not used: Iris owns the session lifecycle.
360
+ */
361
+
362
+ /**
363
+ * Signed-upload payload returned by `POST /liveness-init`. Mirrors the backend
364
+ * `LivenessInitResponseDto.VideoUpload`. The SDK PUTs the recorded mp4 bytes
365
+ * to `upload_url` (Content-Type matching `video/mp4`) before calling
366
+ * `POST /liveness-verify` with the resulting metadata.
367
+ */
368
+
369
+ /**
370
+ * Optional body of `POST /liveness-verify`. The SDK only includes it when the
371
+ * recorded video uploaded successfully (HTTP 200 from GCS). When omitted, the
372
+ * backend completes liveness based on the Iris score only.
373
+ */
374
+
375
+ /**
376
+ * Payload delivered to the optional `onLivenessVideoUploaded` callback after a
377
+ * successful upload of the liveness video. Best-effort: the callback only
378
+ * fires when the GCS PUT returned 200.
379
+ */
380
+
381
+ /**
382
+ * Payload for POST /sessions/:sessionId/basic-info/human (HUMAN_BASIC_INFO step).
383
+ * Matches backend SubmitHumanBasicInfoRequestDto (snake_case in JSON).
384
+ */
385
+
386
+ /**
387
+ * Payload for POST /sessions/:sessionId/basic-info/legal (LEGAL_BASIC_INFO step).
388
+ * Matches backend SubmitLegalBasicInfoRequestDto (snake_case in JSON).
389
+ */
390
+
391
+ /**
392
+ * Single selectable option for tax category or fiscal identifier type (TAX_INFO step).
393
+ * `id` is submitted to the API; `description` is the user-visible label.
394
+ */
395
+
396
+ /**
397
+ * Resolved selectable lists for the TAX_INFO step UI (from `accepted_tax_information` only; no SDK defaults).
398
+ */
399
+
400
+ /** POST /sessions/:id/tax-info — SubmitTaxInfoRequestDto. */
401
+
402
+ /** POST /sessions/:id/extended-info/human — SubmitHumanExtendedInfoRequestDto. */
403
+
404
+ /** POST /sessions/:id/extended-info/legal — SubmitLegalExtendedInfoRequestDto. */
405
+
406
+ /** POST /sessions/:id/address-info — SubmitAddressInfoRequestDto. */
407
+
408
+ /** POST /sessions/:id/sworn-declaration — SubmitSwornDeclarationRequestDto. */
409
+
410
+ /**
411
+ * POST /sessions/:id/economic-activity — EconomicActivitySelectionDto.
412
+ *
413
+ * Fire-and-forget on the backend: the POST returns 200 immediately and the Worker
414
+ * validates `code` asynchronously against the configured items. An invalid code is
415
+ * reported back over SSE as `RETRY_STEP` (or `SESSION_DECLINED` once retries are
416
+ * exhausted), not as an HTTP error.
417
+ */
418
+
419
+ /** POST /sessions/:id/contact/email — SubmitEmailContactRequestDto. */
420
+
421
+ /** POST /sessions/:id/contact/phone — SubmitPhoneContactRequestDto. */
422
+
423
+ /** POST /sessions/:id/terms-and-conditions — SubmitTermsAndConditionsRequestDto. */
424
+
425
+ /**
426
+ * SSE event payload (OnboardingSessionEvent). Matches the backend record
427
+ * la.velion.onboarding.api...sdk.OnboardingSessionEventDto (snake_case in JSON).
428
+ *
429
+ * Received on GET /public/sdk/sessions/:sessionId/events. The backend sends
430
+ * ServerSentEvent with id = event_id (epoch millis) for Last-Event-ID replay.
431
+ *
432
+ * Event types (event_type):
433
+ * - STEP_UPDATED — a workflow step changed status (step_code, step_status)
434
+ * - ROUTING_COMMAND — next/previous/retry/terminate instruction
435
+ * (action: NEXT_STEP | PREVIOUS_STEP | RETRY_STEP | TERMINATE)
436
+ * - SESSION_APPROVED — all checks passed; session_status = APPROVED
437
+ * - SESSION_MANUAL_REVIEW — manual review required; session_status = MANUAL_REVIEW
438
+ * - SESSION_DECLINED — session ended with decline (step_code, session_status DECLINED, reason)
439
+ *
440
+ * Reverse navigation ("back") arrives as a STEP_UPDATED (the re-opened step
441
+ * moves to IN_PROGRESS) followed by a ROUTING_COMMAND with action PREVIOUS_STEP
442
+ * carrying `step_config` and `step_result` (prefill) for the re-opened step.
443
+ *
444
+ * Tapping "back" on the first interactive (reversible) step instead yields a
445
+ * ROUTING_COMMAND with action BACK_EXIT (`step_code` = the step exited from):
446
+ * there is no earlier reversible step, so the SDK leaves the flow and returns
447
+ * control to the host (see {@link VelionCallbacks.onExit}).
448
+ */
449
+
450
+ // ─────────────────────────────────────────────────────────────────────────────
451
+ // BACKEND COMMANDS (Listen & Obey)
452
+ // ─────────────────────────────────────────────────────────────────────────────
453
+
454
+ /**
455
+ * Backend command: advance to a specific step. The SDK must render that step's
456
+ * screen without evaluating business rules locally.
457
+ */
458
+
459
+ /**
460
+ * Backend command: show an error message to the user. The SDK displays the
461
+ * message and does not advance (backend owns the decision).
462
+ */
463
+
464
+ /**
465
+ * Backend command: flow is complete. SDK should fetch final result and fire onSuccess.
466
+ */
467
+
468
+ /**
469
+ * Backend command: retry the current step (e.g. after transient failure).
470
+ */
471
+
472
+ /**
473
+ * Strict command payload the backend may return in a synchronous HTTP response
474
+ * or send via SSE. The SDK never makes routing decisions; it only obeys these commands.
475
+ */
476
+
477
+ /**
478
+ * Raw response body that may contain a backend command (e.g. POST submit response).
479
+ */
480
+
481
+ // ─────────────────────────────────────────────────────────────────────────────
482
+ // INTERNAL STATE MACHINE TYPES (exported for module authors)
483
+ // ─────────────────────────────────────────────────────────────────────────────
484
+
485
+ /**
486
+ * All possible states of the SDK's internal lifecycle.
487
+ * Transitions are strictly unidirectional (no going back to IDLE once started).
488
+ *
489
+ * @internal
490
+ */
491
+
492
+ // destroy() was called, instance is a no-op
493
+
494
+ /**
495
+ * Internal event bus event names. Typed via `SdkEventMap`.
496
+ * @internal
497
+ */
498
+
499
+ /**
500
+ * Maps each internal event name to its payload type.
501
+ * Used by the `TypedEventEmitter` for compile-time safety.
502
+ * @internal
503
+ */
504
+
505
+ // ─────────────────────────────────────────────────────────────────────────────
506
+ // LOADER ↔ CDN APP POSTMESSAGE PROTOCOL (Sumsub-style)
507
+ // ─────────────────────────────────────────────────────────────────────────────
508
+
509
+ /** Message type: parent (loader) sends config to iframe (CDN app). */
510
+ export const VELION_MSG_INIT = 'VELION_INIT';
511
+
512
+ /** Message types: iframe (CDN app) sends to parent (loader). */
513
+ export const VELION_MSG_READY = 'VELION_READY';
514
+ export const VELION_MSG_SUCCESS = 'VELION_SUCCESS';
515
+ export const VELION_MSG_ERROR = 'VELION_ERROR';
516
+ export const VELION_MSG_STEP_CHANGE = 'VELION_STEP_CHANGE';
517
+ export const VELION_MSG_STEP_COMPLETE = 'VELION_STEP_COMPLETE';
518
+ export const VELION_MSG_TOKEN_EXPIRED = 'VELION_TOKEN_EXPIRED';
519
+
520
+ /** Message type: parent sends new token to iframe after VELION_TOKEN_EXPIRED. */
521
+ export const VELION_MSG_TOKEN = 'VELION_TOKEN';
522
+
523
+ /** Envelope for all loader ↔ iframe messages. Both sides must validate origin. */
524
+
525
+ /** Payload for VELION_INIT: full config (iframe runs with containerId overwritten to root id). */
526
+
527
+ /** Payload for VELION_STEP_CHANGE. */
528
+
529
+ /** Payload for VELION_STEP_COMPLETE. */
530
+
531
+ /** Payload for VELION_TOKEN (token refresh response from parent to iframe). */
532
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CameraErrorCode","SdkErrorCode","VELION_MSG_INIT","VELION_MSG_READY","VELION_MSG_SUCCESS","VELION_MSG_ERROR","VELION_MSG_STEP_CHANGE","VELION_MSG_STEP_COMPLETE","VELION_MSG_TOKEN_EXPIRED","VELION_MSG_TOKEN"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAGA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;;AAMA;;AAMA;;AAKA;;AAQA;AACA;AACA;AACA;;AAQA;;AAQA;;AAMA;;AAaA;;AAiBA;;AAYA;AACA;AACA;AACA;AACA;AACA;;AAQA;;AAMA;;AAaA;;AAKA;;AAGA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAYA,eAAe,0BAAfA,eAAe;EACzB;EADUA,eAAe;EAGzB;EAHUA,eAAe;EAKzB;AACF;AACA;AACA;EARYA,eAAe;EAUzB;AACF;AACA;AACA;EAbYA,eAAe;EAezB;AACF;AACA;AACA;AACA;EAnBYA,eAAe;EAqBzB;EArBUA,eAAe;EAuBzB;AACF;AACA;AACA;EA1BYA,eAAe;EA4BzB;EA5BUA,eAAe;EA8BzB;EA9BUA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAkC3B;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EACtB;EACA;EAFUA,YAAY;EAItB;EAJUA,YAAY;EAMtB;EANUA,YAAY;EAQtB;EARUA,YAAY;EAWtB;EACA;EAZUA,YAAY;EActB;EAdUA,YAAY;EAgBtB;EAhBUA,YAAY;EAkBtB;EAlBUA,YAAY;EAqBtB;EACA;AACF;AACA;AACA;EAzBYA,YAAY;EA4BtB;EACA;EA7BUA,YAAY;EA+BtB;EA/BUA,YAAY;EAkCtB;EACA;EAnCUA,YAAY;EAqCtB;EArCUA,YAAY;EAuCtB;EAvCUA,YAAY;EA0CtB;AACF;AACA;AACA;AACA;EA9CYA,YAAY;EAiDtB;AACF;AACA;AACA;AACA;EArDYA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;;AA2DxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA6CA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AA6EA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2MA;AACA;AACA;;AAEA;AACA;AACA;;AAoBA;AACA;AACA;AACA;;AAyCA;AACA;AACA;AACA;;AAsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAuBA;AACA;AACA;AACA;AACA;;AA2BA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAMA;AACA;AACA;;AAYA;;AAUA;;AAUA;;AAMA;;AAkBA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;;AAKA;;AAKA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuCA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAMA;AACA;AACA;;AAKA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AASqB;;AAErB;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;;AAEA;AACA,OAAO,MAAMC,eAAe,GAAG,aAAsB;;AAErD;AACA,OAAO,MAAMC,gBAAgB,GAAG,cAAuB;AACvD,OAAO,MAAMC,kBAAkB,GAAG,gBAAyB;AAC3D,OAAO,MAAMC,gBAAgB,GAAG,cAAuB;AACvD,OAAO,MAAMC,sBAAsB,GAAG,oBAA6B;AACnE,OAAO,MAAMC,wBAAwB,GAAG,sBAA+B;AACvE,OAAO,MAAMC,wBAAwB,GAAG,sBAA+B;;AAEvE;AACA,OAAO,MAAMC,gBAAgB,GAAG,cAAuB;;AAYvD;;AAMA;;AAGA;;AAMA;;AAKA","ignoreList":[]}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Error boundary that catches render failures from `react-native-maps` and
5
+ * lets the parent fall back to the manual address form.
6
+ *
7
+ * Specifically the `AirGoogleMaps` runtime error (`AirGoogleMaps dir must be
8
+ * added to your xCode project to support GoogleMaps on iOS`) only surfaces
9
+ * when the MapView mounts. The preflight check cannot detect it because the
10
+ * native module exists — it's just missing its iOS sub-target.
11
+ */
12
+
13
+ import { Component } from 'react';
14
+ import { log } from '../utils/log';
15
+ export class MapFallbackBoundary extends Component {
16
+ state = {
17
+ hasError: false
18
+ };
19
+ static getDerivedStateFromError() {
20
+ return {
21
+ hasError: true
22
+ };
23
+ }
24
+ componentDidCatch(error) {
25
+ log.warn('[MapFallbackBoundary] map render failed, switching to manual', {
26
+ message: error.message
27
+ });
28
+ this.props.onError(error);
29
+ }
30
+ render() {
31
+ if (this.state.hasError) {
32
+ return this.props.fallback ?? null;
33
+ }
34
+ return this.props.children;
35
+ }
36
+ }
37
+ //# sourceMappingURL=MapFallbackBoundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Component","log","MapFallbackBoundary","state","hasError","getDerivedStateFromError","componentDidCatch","error","warn","message","props","onError","render","fallback","children"],"sourceRoot":"../../../src","sources":["ui/MapFallbackBoundary.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,QAAwB,OAAO;AACjD,SAASC,GAAG,QAAQ,cAAc;AAclC,OAAO,MAAMC,mBAAmB,SAASF,SAAS,CAAe;EAC/DG,KAAK,GAAU;IAAEC,QAAQ,EAAE;EAAM,CAAC;EAElC,OAAOC,wBAAwBA,CAAA,EAAU;IACvC,OAAO;MAAED,QAAQ,EAAE;IAAK,CAAC;EAC3B;EAEAE,iBAAiBA,CAACC,KAAY,EAAQ;IACpCN,GAAG,CAACO,IAAI,CAAC,8DAA8D,EAAE;MACvEC,OAAO,EAAEF,KAAK,CAACE;IACjB,CAAC,CAAC;IACF,IAAI,CAACC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC;EAC3B;EAEAK,MAAMA,CAAA,EAAG;IACP,IAAI,IAAI,CAACT,KAAK,CAACC,QAAQ,EAAE;MACvB,OAAO,IAAI,CAACM,KAAK,CAACG,QAAQ,IAAI,IAAI;IACpC;IACA,OAAO,IAAI,CAACH,KAAK,CAACI,QAAQ;EAC5B;AACF","ignoreList":[]}