@smileid/usesmileid 12.0.0-beta01 → 12.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (556) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +701 -89
  3. package/dist/camera/camera_defaults.d.ts +14 -9
  4. package/dist/camera/camera_defaults.d.ts.map +1 -1
  5. package/dist/camera/camera_defaults.js +11 -9
  6. package/dist/camera/camera_defaults.js.map +1 -1
  7. package/dist/camera/orientation_degrees.d.ts +5 -6
  8. package/dist/camera/orientation_degrees.d.ts.map +1 -1
  9. package/dist/camera/orientation_degrees.js +5 -6
  10. package/dist/camera/orientation_degrees.js.map +1 -1
  11. package/dist/core/exception/agent_mode_with_enhanced_liveness_exception.d.ts +11 -0
  12. package/dist/core/exception/agent_mode_with_enhanced_liveness_exception.d.ts.map +1 -0
  13. package/dist/core/exception/agent_mode_with_enhanced_liveness_exception.js +17 -0
  14. package/dist/core/exception/agent_mode_with_enhanced_liveness_exception.js.map +1 -0
  15. package/dist/core/exception/capture_validation_exceptions.d.ts +1 -0
  16. package/dist/core/exception/capture_validation_exceptions.d.ts.map +1 -1
  17. package/dist/core/exception/capture_validation_exceptions.js +1 -0
  18. package/dist/core/exception/capture_validation_exceptions.js.map +1 -1
  19. package/dist/core/exception/index.d.ts +1 -0
  20. package/dist/core/exception/index.d.ts.map +1 -1
  21. package/dist/core/exception/index.js +1 -0
  22. package/dist/core/exception/index.js.map +1 -1
  23. package/dist/core/exception/use_smile_id_error_code.d.ts +1 -0
  24. package/dist/core/exception/use_smile_id_error_code.d.ts.map +1 -1
  25. package/dist/core/exception/use_smile_id_error_code.js +1 -0
  26. package/dist/core/exception/use_smile_id_error_code.js.map +1 -1
  27. package/dist/core/models/config.d.ts +19 -0
  28. package/dist/core/models/config.d.ts.map +1 -1
  29. package/dist/core/models/document_capture_mode.d.ts +8 -0
  30. package/dist/core/models/document_capture_mode.d.ts.map +1 -1
  31. package/dist/core/models/document_capture_mode.js +24 -0
  32. package/dist/core/models/document_capture_mode.js.map +1 -1
  33. package/dist/core/models/document_type.d.ts +2 -2
  34. package/dist/core/models/document_type.d.ts.map +1 -1
  35. package/dist/core/models/document_type.js +7 -5
  36. package/dist/core/models/document_type.js.map +1 -1
  37. package/dist/core/models/global_privacy_control.d.ts +36 -0
  38. package/dist/core/models/global_privacy_control.d.ts.map +1 -0
  39. package/dist/core/models/global_privacy_control.js +39 -0
  40. package/dist/core/models/global_privacy_control.js.map +1 -0
  41. package/dist/core/models/network_config.d.ts +2 -2
  42. package/dist/core/models/network_config.js +2 -2
  43. package/dist/core/models/result.d.ts +9 -8
  44. package/dist/core/models/result.d.ts.map +1 -1
  45. package/dist/core/models/result.js +5 -6
  46. package/dist/core/models/result.js.map +1 -1
  47. package/dist/data/api/interceptors/smile_auth_interceptor.d.ts.map +1 -1
  48. package/dist/data/api/interceptors/smile_auth_interceptor.js +3 -17
  49. package/dist/data/api/interceptors/smile_auth_interceptor.js.map +1 -1
  50. package/dist/data/api/interceptors/smile_integrity_interceptor.d.ts +11 -0
  51. package/dist/data/api/interceptors/smile_integrity_interceptor.d.ts.map +1 -1
  52. package/dist/data/api/interceptors/smile_integrity_interceptor.js +13 -0
  53. package/dist/data/api/interceptors/smile_integrity_interceptor.js.map +1 -1
  54. package/dist/data/api/interceptors/smile_request_mac_interceptor.d.ts +8 -0
  55. package/dist/data/api/interceptors/smile_request_mac_interceptor.d.ts.map +1 -1
  56. package/dist/data/api/interceptors/smile_request_mac_interceptor.js +11 -0
  57. package/dist/data/api/interceptors/smile_request_mac_interceptor.js.map +1 -1
  58. package/dist/data/api/smile_id_api.d.ts +1 -1
  59. package/dist/data/api/smile_id_api.d.ts.map +1 -1
  60. package/dist/data/compression/compressible_asset.d.ts +41 -0
  61. package/dist/data/compression/compressible_asset.d.ts.map +1 -0
  62. package/dist/data/compression/compressible_asset.js +34 -0
  63. package/dist/data/compression/compressible_asset.js.map +1 -0
  64. package/dist/data/compression/payload_compression_config.d.ts +36 -0
  65. package/dist/data/compression/payload_compression_config.d.ts.map +1 -0
  66. package/dist/data/compression/payload_compression_config.js +52 -0
  67. package/dist/data/compression/payload_compression_config.js.map +1 -0
  68. package/dist/data/compression/payload_compression_runner.d.ts +29 -0
  69. package/dist/data/compression/payload_compression_runner.d.ts.map +1 -0
  70. package/dist/data/compression/payload_compression_runner.js +55 -0
  71. package/dist/data/compression/payload_compression_runner.js.map +1 -0
  72. package/dist/data/compression/payload_compressor.d.ts +40 -0
  73. package/dist/data/compression/payload_compressor.d.ts.map +1 -0
  74. package/dist/data/compression/payload_compressor.js +126 -0
  75. package/dist/data/compression/payload_compressor.js.map +1 -0
  76. package/dist/data/compression/uri_compressible_asset.d.ts +23 -0
  77. package/dist/data/compression/uri_compressible_asset.d.ts.map +1 -0
  78. package/dist/data/compression/uri_compressible_asset.js +77 -0
  79. package/dist/data/compression/uri_compressible_asset.js.map +1 -0
  80. package/dist/data/dsl/builder/cache_config_builder.d.ts +2 -1
  81. package/dist/data/dsl/builder/cache_config_builder.d.ts.map +1 -1
  82. package/dist/data/dsl/builder/cache_config_builder.js +2 -1
  83. package/dist/data/dsl/builder/cache_config_builder.js.map +1 -1
  84. package/dist/data/dsl/builder/config_builder.d.ts +40 -14
  85. package/dist/data/dsl/builder/config_builder.d.ts.map +1 -1
  86. package/dist/data/dsl/builder/config_builder.js +40 -14
  87. package/dist/data/dsl/builder/config_builder.js.map +1 -1
  88. package/dist/data/dsl/builder/interceptor_config_builder.d.ts +9 -7
  89. package/dist/data/dsl/builder/interceptor_config_builder.d.ts.map +1 -1
  90. package/dist/data/dsl/builder/interceptor_config_builder.js +9 -7
  91. package/dist/data/dsl/builder/interceptor_config_builder.js.map +1 -1
  92. package/dist/data/dsl/builder/retry_config_builder.d.ts +19 -4
  93. package/dist/data/dsl/builder/retry_config_builder.d.ts.map +1 -1
  94. package/dist/data/dsl/builder/retry_config_builder.js +21 -6
  95. package/dist/data/dsl/builder/retry_config_builder.js.map +1 -1
  96. package/dist/data/dsl/builder/timeout_config_builder.d.ts +4 -0
  97. package/dist/data/dsl/builder/timeout_config_builder.d.ts.map +1 -1
  98. package/dist/data/dsl/builder/timeout_config_builder.js +4 -0
  99. package/dist/data/dsl/builder/timeout_config_builder.js.map +1 -1
  100. package/dist/data/dsl/use_smile_id_network_builder.d.ts +17 -0
  101. package/dist/data/dsl/use_smile_id_network_builder.d.ts.map +1 -1
  102. package/dist/data/dsl/use_smile_id_network_builder.js +17 -0
  103. package/dist/data/dsl/use_smile_id_network_builder.js.map +1 -1
  104. package/dist/data/factory/networking_factory.d.ts.map +1 -1
  105. package/dist/data/factory/networking_factory.js +11 -1
  106. package/dist/data/factory/networking_factory.js.map +1 -1
  107. package/dist/data/repository/use_smile_id_repository_impl.d.ts +6 -0
  108. package/dist/data/repository/use_smile_id_repository_impl.d.ts.map +1 -1
  109. package/dist/data/repository/use_smile_id_repository_impl.js +82 -8
  110. package/dist/data/repository/use_smile_id_repository_impl.js.map +1 -1
  111. package/dist/data/security/request_canonicalizer.d.ts.map +1 -1
  112. package/dist/data/security/request_canonicalizer.js +14 -2
  113. package/dist/data/security/request_canonicalizer.js.map +1 -1
  114. package/dist/data/security/security_policy.d.ts +43 -0
  115. package/dist/data/security/security_policy.d.ts.map +1 -0
  116. package/dist/data/security/security_policy.js +61 -0
  117. package/dist/data/security/security_policy.js.map +1 -0
  118. package/dist/data/smile_id_urls.d.ts +1 -1
  119. package/dist/data/smile_id_urls.js +1 -1
  120. package/dist/data/smile_id_urls.js.map +1 -1
  121. package/dist/data/util/retry_util.d.ts +2 -2
  122. package/dist/data/util/retry_util.d.ts.map +1 -1
  123. package/dist/data/util/retry_util.js +7 -1
  124. package/dist/data/util/retry_util.js.map +1 -1
  125. package/dist/data/util/use_smile_id_token_decoder.d.ts +22 -0
  126. package/dist/data/util/use_smile_id_token_decoder.d.ts.map +1 -1
  127. package/dist/data/util/use_smile_id_token_decoder.js +58 -24
  128. package/dist/data/util/use_smile_id_token_decoder.js.map +1 -1
  129. package/dist/index.d.ts +2 -2
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.js +2 -2
  132. package/dist/index.js.map +1 -1
  133. package/dist/l10n/strings_en.d.ts +2 -1
  134. package/dist/l10n/strings_en.d.ts.map +1 -1
  135. package/dist/l10n/strings_en.js +2 -1
  136. package/dist/l10n/strings_en.js.map +1 -1
  137. package/dist/l10n/use_smile_id_localizations.d.ts +1 -0
  138. package/dist/l10n/use_smile_id_localizations.d.ts.map +1 -1
  139. package/dist/l10n/use_smile_id_localizations.js +3 -0
  140. package/dist/l10n/use_smile_id_localizations.js.map +1 -1
  141. package/dist/metadata/builder_configuration.d.ts +44 -0
  142. package/dist/metadata/builder_configuration.d.ts.map +1 -0
  143. package/dist/metadata/builder_configuration.js +35 -0
  144. package/dist/metadata/builder_configuration.js.map +1 -0
  145. package/dist/metadata/captured_image_properties.d.ts +11 -0
  146. package/dist/metadata/captured_image_properties.d.ts.map +1 -0
  147. package/dist/metadata/captured_image_properties.js +11 -0
  148. package/dist/metadata/captured_image_properties.js.map +1 -0
  149. package/dist/metadata/device_orientation_collector.d.ts +17 -0
  150. package/dist/metadata/device_orientation_collector.d.ts.map +1 -0
  151. package/dist/metadata/device_orientation_collector.js +66 -0
  152. package/dist/metadata/device_orientation_collector.js.map +1 -0
  153. package/dist/metadata/geolocation.d.ts +20 -0
  154. package/dist/metadata/geolocation.d.ts.map +1 -0
  155. package/dist/metadata/geolocation.js +40 -0
  156. package/dist/metadata/geolocation.js.map +1 -0
  157. package/dist/metadata/metadata_configuration_mappers.d.ts +47 -0
  158. package/dist/metadata/metadata_configuration_mappers.d.ts.map +1 -0
  159. package/dist/metadata/metadata_configuration_mappers.js +178 -0
  160. package/dist/metadata/metadata_configuration_mappers.js.map +1 -0
  161. package/dist/metadata/model_configuration.d.ts +41 -0
  162. package/dist/metadata/model_configuration.d.ts.map +1 -0
  163. package/dist/metadata/model_configuration.js +44 -0
  164. package/dist/metadata/model_configuration.js.map +1 -0
  165. package/dist/metadata/optional_native_modules.d.ts +79 -3
  166. package/dist/metadata/optional_native_modules.d.ts.map +1 -1
  167. package/dist/metadata/optional_native_modules.js +108 -3
  168. package/dist/metadata/optional_native_modules.js.map +1 -1
  169. package/dist/metadata/use_smile_id_metadata.d.ts +45 -7
  170. package/dist/metadata/use_smile_id_metadata.d.ts.map +1 -1
  171. package/dist/metadata/use_smile_id_metadata.js +85 -13
  172. package/dist/metadata/use_smile_id_metadata.js.map +1 -1
  173. package/dist/metadata/use_smile_id_metadata_factory.d.ts +37 -0
  174. package/dist/metadata/use_smile_id_metadata_factory.d.ts.map +1 -1
  175. package/dist/metadata/use_smile_id_metadata_factory.js +197 -16
  176. package/dist/metadata/use_smile_id_metadata_factory.js.map +1 -1
  177. package/dist/presentation/assets/svg/document_shimmer_strings.d.ts +14 -0
  178. package/dist/presentation/assets/svg/document_shimmer_strings.d.ts.map +1 -0
  179. package/dist/presentation/assets/svg/document_shimmer_strings.js +14 -0
  180. package/dist/presentation/assets/svg/document_shimmer_strings.js.map +1 -0
  181. package/dist/presentation/assets/svg/instruction_svg_strings.d.ts +12 -4
  182. package/dist/presentation/assets/svg/instruction_svg_strings.d.ts.map +1 -1
  183. package/dist/presentation/assets/svg/instruction_svg_strings.js +19 -8
  184. package/dist/presentation/assets/svg/instruction_svg_strings.js.map +1 -1
  185. package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.d.ts +0 -5
  186. package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.d.ts.map +1 -1
  187. package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.js +0 -5
  188. package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.js.map +1 -1
  189. package/dist/presentation/components/icons/index.d.ts +24 -8
  190. package/dist/presentation/components/icons/index.d.ts.map +1 -1
  191. package/dist/presentation/components/icons/index.js +31 -11
  192. package/dist/presentation/components/icons/index.js.map +1 -1
  193. package/dist/presentation/components/use_smile_id_attribution.d.ts +1 -1
  194. package/dist/presentation/components/use_smile_id_button.d.ts +2 -2
  195. package/dist/presentation/components/use_smile_id_button.js +4 -4
  196. package/dist/presentation/components/use_smile_id_button.js.map +1 -1
  197. package/dist/presentation/components/use_smile_id_capture_content.d.ts +13 -0
  198. package/dist/presentation/components/use_smile_id_capture_content.d.ts.map +1 -1
  199. package/dist/presentation/components/use_smile_id_capture_content.js +15 -9
  200. package/dist/presentation/components/use_smile_id_capture_content.js.map +1 -1
  201. package/dist/presentation/components/use_smile_id_captured_document_image.d.ts +2 -3
  202. package/dist/presentation/components/use_smile_id_captured_document_image.d.ts.map +1 -1
  203. package/dist/presentation/components/use_smile_id_captured_document_image.js +1 -3
  204. package/dist/presentation/components/use_smile_id_captured_document_image.js.map +1 -1
  205. package/dist/presentation/components/use_smile_id_document_capture_controls.d.ts +12 -6
  206. package/dist/presentation/components/use_smile_id_document_capture_controls.d.ts.map +1 -1
  207. package/dist/presentation/components/use_smile_id_document_capture_controls.js +59 -16
  208. package/dist/presentation/components/use_smile_id_document_capture_controls.js.map +1 -1
  209. package/dist/presentation/components/use_smile_id_document_overlay.d.ts +22 -5
  210. package/dist/presentation/components/use_smile_id_document_overlay.d.ts.map +1 -1
  211. package/dist/presentation/components/use_smile_id_document_overlay.js +80 -40
  212. package/dist/presentation/components/use_smile_id_document_overlay.js.map +1 -1
  213. package/dist/presentation/components/use_smile_id_document_shimmer.d.ts +15 -0
  214. package/dist/presentation/components/use_smile_id_document_shimmer.d.ts.map +1 -0
  215. package/dist/presentation/components/use_smile_id_document_shimmer.js +23 -0
  216. package/dist/presentation/components/use_smile_id_document_shimmer.js.map +1 -0
  217. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.d.ts +5 -2
  218. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.d.ts.map +1 -1
  219. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.js +9 -6
  220. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.js.map +1 -1
  221. package/dist/presentation/components/use_smile_id_guideline_thumbnail.d.ts.map +1 -1
  222. package/dist/presentation/components/use_smile_id_guideline_thumbnail.js +84 -1
  223. package/dist/presentation/components/use_smile_id_guideline_thumbnail.js.map +1 -1
  224. package/dist/presentation/components/use_smile_id_instructions_hero.d.ts +3 -1
  225. package/dist/presentation/components/use_smile_id_instructions_hero.d.ts.map +1 -1
  226. package/dist/presentation/components/use_smile_id_instructions_hero.js +25 -5
  227. package/dist/presentation/components/use_smile_id_instructions_hero.js.map +1 -1
  228. package/dist/presentation/components/use_smile_id_oval_border_palette.d.ts.map +1 -1
  229. package/dist/presentation/components/use_smile_id_oval_border_palette.js +7 -3
  230. package/dist/presentation/components/use_smile_id_oval_border_palette.js.map +1 -1
  231. package/dist/presentation/flow/dsl/builder/config_builder.d.ts +28 -0
  232. package/dist/presentation/flow/dsl/builder/config_builder.d.ts.map +1 -1
  233. package/dist/presentation/flow/dsl/builder/config_builder.js +30 -0
  234. package/dist/presentation/flow/dsl/builder/config_builder.js.map +1 -1
  235. package/dist/presentation/flow/dsl/builder/ml_builder.d.ts +13 -4
  236. package/dist/presentation/flow/dsl/builder/ml_builder.d.ts.map +1 -1
  237. package/dist/presentation/flow/dsl/builder/ml_builder.js +3 -2
  238. package/dist/presentation/flow/dsl/builder/ml_builder.js.map +1 -1
  239. package/dist/presentation/flow/dsl/builder/screens_builder.d.ts +110 -12
  240. package/dist/presentation/flow/dsl/builder/screens_builder.d.ts.map +1 -1
  241. package/dist/presentation/flow/dsl/builder/screens_builder.js +110 -12
  242. package/dist/presentation/flow/dsl/builder/screens_builder.js.map +1 -1
  243. package/dist/presentation/flow/dsl/builder/theme_builder.d.ts +15 -2
  244. package/dist/presentation/flow/dsl/builder/theme_builder.d.ts.map +1 -1
  245. package/dist/presentation/flow/dsl/builder/theme_builder.js +15 -2
  246. package/dist/presentation/flow/dsl/builder/theme_builder.js.map +1 -1
  247. package/dist/presentation/flow/dsl/use_smile_id_builder.d.ts +6 -4
  248. package/dist/presentation/flow/dsl/use_smile_id_builder.d.ts.map +1 -1
  249. package/dist/presentation/flow/dsl/use_smile_id_builder.js.map +1 -1
  250. package/dist/presentation/flow/dsl/use_smile_id_flow_builder.d.ts +62 -36
  251. package/dist/presentation/flow/dsl/use_smile_id_flow_builder.d.ts.map +1 -1
  252. package/dist/presentation/flow/dsl/use_smile_id_flow_builder.js +62 -36
  253. package/dist/presentation/flow/dsl/use_smile_id_flow_builder.js.map +1 -1
  254. package/dist/presentation/flow/flow_navigation_manager.d.ts +44 -5
  255. package/dist/presentation/flow/flow_navigation_manager.d.ts.map +1 -1
  256. package/dist/presentation/flow/flow_navigation_manager.js +148 -11
  257. package/dist/presentation/flow/flow_navigation_manager.js.map +1 -1
  258. package/dist/presentation/flow/model/instruction_guideline.d.ts +9 -0
  259. package/dist/presentation/flow/model/instruction_guideline.d.ts.map +1 -1
  260. package/dist/presentation/flow/model/instructions_defaults.d.ts +11 -2
  261. package/dist/presentation/flow/model/instructions_defaults.d.ts.map +1 -1
  262. package/dist/presentation/flow/model/instructions_defaults.js +74 -26
  263. package/dist/presentation/flow/model/instructions_defaults.js.map +1 -1
  264. package/dist/presentation/flow/screen/orchestrated_capture_screen.d.ts.map +1 -1
  265. package/dist/presentation/flow/screen/orchestrated_capture_screen.js +48 -14
  266. package/dist/presentation/flow/screen/orchestrated_capture_screen.js.map +1 -1
  267. package/dist/presentation/flow/screen/orchestrated_consent_screen.d.ts.map +1 -1
  268. package/dist/presentation/flow/screen/orchestrated_consent_screen.js +3 -1
  269. package/dist/presentation/flow/screen/orchestrated_consent_screen.js.map +1 -1
  270. package/dist/presentation/flow/screen/orchestrated_instructions_screen.js +1 -1
  271. package/dist/presentation/flow/screen/orchestrated_instructions_screen.js.map +1 -1
  272. package/dist/presentation/flow/screen/orchestrated_preview_screen.d.ts.map +1 -1
  273. package/dist/presentation/flow/screen/orchestrated_preview_screen.js +3 -9
  274. package/dist/presentation/flow/screen/orchestrated_preview_screen.js.map +1 -1
  275. package/dist/presentation/flow/screen/orchestrated_processing_screen.js +3 -3
  276. package/dist/presentation/flow/screen/orchestrated_processing_screen.js.map +1 -1
  277. package/dist/presentation/flow/use_smile_id_flow.d.ts.map +1 -1
  278. package/dist/presentation/flow/use_smile_id_flow.js +10 -4
  279. package/dist/presentation/flow/use_smile_id_flow.js.map +1 -1
  280. package/dist/presentation/flow/validation/flow_validator.d.ts.map +1 -1
  281. package/dist/presentation/flow/validation/flow_validator.js +42 -20
  282. package/dist/presentation/flow/validation/flow_validator.js.map +1 -1
  283. package/dist/presentation/flow/validation/job_type_validator.d.ts.map +1 -1
  284. package/dist/presentation/flow/validation/job_type_validator.js +14 -0
  285. package/dist/presentation/flow/validation/job_type_validator.js.map +1 -1
  286. package/dist/presentation/screen/helpers/capture_screen_helpers.d.ts.map +1 -1
  287. package/dist/presentation/screen/helpers/capture_screen_helpers.js +1 -0
  288. package/dist/presentation/screen/helpers/capture_screen_helpers.js.map +1 -1
  289. package/dist/presentation/screen/helpers/capture_ui_state.d.ts +6 -6
  290. package/dist/presentation/screen/helpers/capture_ui_state.d.ts.map +1 -1
  291. package/dist/presentation/screen/helpers/capture_ui_state.js +19 -19
  292. package/dist/presentation/screen/helpers/capture_ui_state.js.map +1 -1
  293. package/dist/presentation/screen/helpers/ess_turn_haptics.d.ts +2 -2
  294. package/dist/presentation/screen/helpers/ess_turn_haptics.d.ts.map +1 -1
  295. package/dist/presentation/screen/helpers/ess_turn_haptics.js +6 -6
  296. package/dist/presentation/screen/helpers/ess_turn_haptics.js.map +1 -1
  297. package/dist/presentation/screen/helpers/instructions_screen_helpers.d.ts +1 -0
  298. package/dist/presentation/screen/helpers/instructions_screen_helpers.d.ts.map +1 -1
  299. package/dist/presentation/screen/helpers/instructions_screen_helpers.js +6 -2
  300. package/dist/presentation/screen/helpers/instructions_screen_helpers.js.map +1 -1
  301. package/dist/presentation/screen/helpers/scan_state_to_overlay_state.d.ts +5 -5
  302. package/dist/presentation/screen/helpers/scan_state_to_overlay_state.d.ts.map +1 -1
  303. package/dist/presentation/screen/helpers/scan_state_to_overlay_state.js +14 -11
  304. package/dist/presentation/screen/helpers/scan_state_to_overlay_state.js.map +1 -1
  305. package/dist/presentation/screen/helpers/use_capture_orientation_lock.d.ts +13 -3
  306. package/dist/presentation/screen/helpers/use_capture_orientation_lock.d.ts.map +1 -1
  307. package/dist/presentation/screen/helpers/use_capture_orientation_lock.js +48 -6
  308. package/dist/presentation/screen/helpers/use_capture_orientation_lock.js.map +1 -1
  309. package/dist/presentation/screen/use_smile_id_capture_screen.d.ts +21 -3
  310. package/dist/presentation/screen/use_smile_id_capture_screen.d.ts.map +1 -1
  311. package/dist/presentation/screen/use_smile_id_capture_screen.js +188 -32
  312. package/dist/presentation/screen/use_smile_id_capture_screen.js.map +1 -1
  313. package/dist/presentation/screen/use_smile_id_consent_screen.d.ts +7 -0
  314. package/dist/presentation/screen/use_smile_id_consent_screen.d.ts.map +1 -1
  315. package/dist/presentation/screen/use_smile_id_consent_screen.js +6 -5
  316. package/dist/presentation/screen/use_smile_id_consent_screen.js.map +1 -1
  317. package/dist/presentation/screen/use_smile_id_document_back_instructions.d.ts.map +1 -1
  318. package/dist/presentation/screen/use_smile_id_document_back_instructions.js +5 -13
  319. package/dist/presentation/screen/use_smile_id_document_back_instructions.js.map +1 -1
  320. package/dist/presentation/screen/use_smile_id_document_preview_screen.d.ts +2 -3
  321. package/dist/presentation/screen/use_smile_id_document_preview_screen.d.ts.map +1 -1
  322. package/dist/presentation/screen/use_smile_id_document_preview_screen.js +17 -12
  323. package/dist/presentation/screen/use_smile_id_document_preview_screen.js.map +1 -1
  324. package/dist/presentation/screen/use_smile_id_instructions_screen.d.ts +2 -0
  325. package/dist/presentation/screen/use_smile_id_instructions_screen.d.ts.map +1 -1
  326. package/dist/presentation/screen/use_smile_id_instructions_screen.js +2 -1
  327. package/dist/presentation/screen/use_smile_id_instructions_screen.js.map +1 -1
  328. package/dist/presentation/screen/use_smile_id_preview_screen.d.ts +7 -26
  329. package/dist/presentation/screen/use_smile_id_preview_screen.d.ts.map +1 -1
  330. package/dist/presentation/screen/use_smile_id_preview_screen.js +10 -20
  331. package/dist/presentation/screen/use_smile_id_preview_screen.js.map +1 -1
  332. package/dist/presentation/screen/use_smile_id_processing_screen.d.ts +2 -3
  333. package/dist/presentation/screen/use_smile_id_processing_screen.d.ts.map +1 -1
  334. package/dist/presentation/screen/use_smile_id_processing_screen.js +4 -3
  335. package/dist/presentation/screen/use_smile_id_processing_screen.js.map +1 -1
  336. package/dist/presentation/theme/theme.d.ts +1 -1
  337. package/dist/presentation/theme/theme.d.ts.map +1 -1
  338. package/dist/presentation/theme/theme.js +20 -18
  339. package/dist/presentation/theme/theme.js.map +1 -1
  340. package/dist/presentation/utils/force_max_brightness.d.ts +4 -4
  341. package/dist/presentation/utils/locale_utils.d.ts +10 -4
  342. package/dist/presentation/utils/locale_utils.d.ts.map +1 -1
  343. package/dist/presentation/utils/locale_utils.js +13 -5
  344. package/dist/presentation/utils/locale_utils.js.map +1 -1
  345. package/dist/testing/fake_face_analyzer.d.ts +43 -0
  346. package/dist/testing/fake_face_analyzer.d.ts.map +1 -0
  347. package/dist/testing/fake_face_analyzer.js +52 -0
  348. package/dist/testing/fake_face_analyzer.js.map +1 -0
  349. package/dist/testing/index.d.ts +5 -0
  350. package/dist/testing/index.d.ts.map +1 -0
  351. package/dist/testing/index.js +7 -0
  352. package/dist/testing/index.js.map +1 -0
  353. package/dist/testing/scenario_expectations.d.ts +28 -0
  354. package/dist/testing/scenario_expectations.d.ts.map +1 -0
  355. package/dist/testing/scenario_expectations.js +65 -0
  356. package/dist/testing/scenario_expectations.js.map +1 -0
  357. package/dist/testing/scenario_loader.d.ts +11 -0
  358. package/dist/testing/scenario_loader.d.ts.map +1 -0
  359. package/dist/testing/scenario_loader.js +64 -0
  360. package/dist/testing/scenario_loader.js.map +1 -0
  361. package/dist/testing/scripted_scan_results.d.ts +17 -0
  362. package/dist/testing/scripted_scan_results.d.ts.map +1 -0
  363. package/dist/testing/scripted_scan_results.js +52 -0
  364. package/dist/testing/scripted_scan_results.js.map +1 -0
  365. package/package.json +34 -7
  366. package/src/__tests__/dsl.test.ts +51 -1
  367. package/src/__tests__/react_native_mock.tsx +8 -0
  368. package/src/__tests__/setup_react_native.ts +17 -2
  369. package/src/__tests__/snapshots/__snapshots__/screens_structural.test.tsx.snap +5261 -0
  370. package/src/__tests__/snapshots/screens_structural.test.tsx +230 -0
  371. package/src/camera/__tests__/use_smile_id_camera_system.test.ts +103 -0
  372. package/src/camera/camera_defaults.ts +11 -9
  373. package/src/camera/orientation_degrees.ts +5 -6
  374. package/src/core/exception/__tests__/builder_validation_exceptions.test.ts +67 -0
  375. package/src/core/exception/agent_mode_with_enhanced_liveness_exception.ts +20 -0
  376. package/src/core/exception/capture_validation_exceptions.ts +1 -0
  377. package/src/core/exception/index.ts +1 -0
  378. package/src/core/exception/use_smile_id_error_code.ts +1 -0
  379. package/src/core/models/__tests__/document_type.test.ts +7 -5
  380. package/src/core/models/__tests__/flow_models.test.ts +26 -0
  381. package/src/core/models/config.ts +22 -0
  382. package/src/core/models/document_capture_mode.ts +27 -0
  383. package/src/core/models/document_type.ts +7 -5
  384. package/src/core/models/global_privacy_control.ts +45 -0
  385. package/src/core/models/network_config.ts +2 -2
  386. package/src/core/models/result.ts +9 -8
  387. package/src/data/api/__tests__/smile_id_api.test.ts +1 -1
  388. package/src/data/api/interceptors/__tests__/gzip_interceptor.test.ts +83 -0
  389. package/src/data/api/interceptors/__tests__/smile_integrity_interceptor.test.ts +37 -1
  390. package/src/data/api/interceptors/__tests__/smile_request_mac_interceptor.test.ts +59 -1
  391. package/src/data/api/interceptors/smile_auth_interceptor.ts +3 -18
  392. package/src/data/api/interceptors/smile_integrity_interceptor.ts +20 -0
  393. package/src/data/api/interceptors/smile_request_mac_interceptor.ts +13 -0
  394. package/src/data/compression/__tests__/payload_compressor.test.ts +200 -0
  395. package/src/data/compression/__tests__/payload_compressor_real_jpeg.test.ts +226 -0
  396. package/src/data/compression/compressible_asset.ts +62 -0
  397. package/src/data/compression/payload_compression_config.ts +53 -0
  398. package/src/data/compression/payload_compression_runner.ts +102 -0
  399. package/src/data/compression/payload_compressor.ts +164 -0
  400. package/src/data/compression/uri_compressible_asset.ts +85 -0
  401. package/src/data/dsl/builder/__tests__/config_builders.test.ts +62 -0
  402. package/src/data/dsl/builder/cache_config_builder.ts +3 -1
  403. package/src/data/dsl/builder/config_builder.ts +45 -14
  404. package/src/data/dsl/builder/interceptor_config_builder.ts +9 -7
  405. package/src/data/dsl/builder/retry_config_builder.ts +27 -6
  406. package/src/data/dsl/builder/timeout_config_builder.ts +7 -0
  407. package/src/data/dsl/use_smile_id_network_builder.ts +17 -0
  408. package/src/data/factory/__tests__/retry_gzip_mac_composition.test.ts +163 -0
  409. package/src/data/factory/__tests__/signed_job_submission_headers.test.ts +1 -1
  410. package/src/data/factory/networking_factory.ts +14 -1
  411. package/src/data/repository/__tests__/network_retries.test.ts +117 -0
  412. package/src/data/repository/__tests__/use_smile_id_repository.test.ts +1 -1
  413. package/src/data/repository/use_smile_id_repository_impl.ts +96 -9
  414. package/src/data/security/__tests__/request_canonicalizer.test.ts +132 -0
  415. package/src/data/security/__tests__/security_policy.test.ts +96 -0
  416. package/src/data/security/__tests__/smile_id_crypto_manager.test.ts +18 -0
  417. package/src/data/security/request_canonicalizer.ts +15 -2
  418. package/src/data/security/security_policy.ts +70 -0
  419. package/src/data/smile_id_urls.ts +1 -1
  420. package/src/data/util/__tests__/retry_util.test.ts +25 -0
  421. package/src/data/util/__tests__/use_smile_id_token_decoder.test.ts +57 -1
  422. package/src/data/util/retry_util.ts +12 -3
  423. package/src/data/util/use_smile_id_token_decoder.ts +76 -28
  424. package/src/index.ts +6 -4
  425. package/src/l10n/strings_en.ts +2 -1
  426. package/src/l10n/use_smile_id_localizations.ts +3 -0
  427. package/src/metadata/__tests__/device_orientation_collector.test.ts +15 -0
  428. package/src/metadata/__tests__/metadata_configuration_mappers.test.ts +254 -0
  429. package/src/metadata/__tests__/metadata_configuration_objects.test.ts +86 -0
  430. package/src/metadata/__tests__/metadata_device_context.test.ts +147 -0
  431. package/src/metadata/__tests__/metadata_device_os_android.test.ts +18 -0
  432. package/src/metadata/__tests__/metadata_golden_fixture.json +13 -0
  433. package/src/metadata/__tests__/metadata_payload_golden.test.ts +193 -0
  434. package/src/metadata/__tests__/use_smile_id_metadata.test.ts +19 -25
  435. package/src/metadata/builder_configuration.ts +69 -0
  436. package/src/metadata/captured_image_properties.ts +10 -0
  437. package/src/metadata/device_orientation_collector.ts +75 -0
  438. package/src/metadata/geolocation.ts +46 -0
  439. package/src/metadata/metadata_configuration_mappers.ts +248 -0
  440. package/src/metadata/model_configuration.ts +68 -0
  441. package/src/metadata/optional_native_modules.ts +157 -3
  442. package/src/metadata/use_smile_id_metadata.ts +140 -17
  443. package/src/metadata/use_smile_id_metadata_factory.ts +211 -16
  444. package/src/presentation/assets/si_document_green_book_hero_animation.json +1 -4668
  445. package/src/presentation/assets/si_document_hero_animation.json +1 -4799
  446. package/src/presentation/assets/si_document_hero_back_animation.json +1 -2039
  447. package/src/presentation/assets/si_document_passport_hero_animation.json +1 -14491
  448. package/src/presentation/assets/si_ess_all_directions_hero_animation.json +1 -0
  449. package/src/presentation/assets/si_ess_animation_all_directions.json +1 -5575
  450. package/src/presentation/assets/si_selfie_hero_animation.json +1 -1439
  451. package/src/presentation/assets/si_smile_to_capture_animation.json +1 -1439
  452. package/src/presentation/assets/svg/document_shimmer_strings.ts +17 -0
  453. package/src/presentation/assets/svg/instruction_svg_strings.ts +34 -12
  454. package/src/presentation/components/__tests__/enhanced_smart_selfie_animation_frames.test.ts +1 -3
  455. package/src/presentation/components/__tests__/use_smile_id_enhanced_smart_selfie_clip.test.tsx +12 -8
  456. package/src/presentation/components/__tests__/use_smile_id_guideline_thumbnail.test.tsx +34 -1
  457. package/src/presentation/components/__tests__/use_smile_id_instructions_hero.test.tsx +71 -0
  458. package/src/presentation/components/__tests__/use_smile_id_oval_border_palette.test.ts +7 -5
  459. package/src/presentation/components/helpers/enhanced_smart_selfie_animation_frames.ts +0 -6
  460. package/src/presentation/components/icons/index.tsx +65 -18
  461. package/src/presentation/components/use_smile_id_attribution.tsx +1 -1
  462. package/src/presentation/components/use_smile_id_button.tsx +4 -4
  463. package/src/presentation/components/use_smile_id_capture_content.tsx +36 -12
  464. package/src/presentation/components/use_smile_id_captured_document_image.tsx +3 -8
  465. package/src/presentation/components/use_smile_id_document_capture_controls.tsx +103 -39
  466. package/src/presentation/components/use_smile_id_document_overlay.tsx +134 -44
  467. package/src/presentation/components/use_smile_id_document_shimmer.tsx +51 -0
  468. package/src/presentation/components/use_smile_id_enhanced_smart_selfie_clip.tsx +9 -6
  469. package/src/presentation/components/use_smile_id_guideline_thumbnail.tsx +131 -2
  470. package/src/presentation/components/use_smile_id_instructions_hero.tsx +111 -60
  471. package/src/presentation/components/use_smile_id_oval_border_palette.ts +7 -3
  472. package/src/presentation/flow/__tests__/document_flow_navigation.test.ts +203 -4
  473. package/src/presentation/flow/__tests__/flow_navigation_manager.test.ts +49 -0
  474. package/src/presentation/flow/dsl/builder/__tests__/config_builder.test.ts +25 -0
  475. package/src/presentation/flow/dsl/builder/config_builder.ts +35 -0
  476. package/src/presentation/flow/dsl/builder/ml_builder.ts +13 -4
  477. package/src/presentation/flow/dsl/builder/screens_builder.ts +110 -12
  478. package/src/presentation/flow/dsl/builder/theme_builder.ts +19 -2
  479. package/src/presentation/flow/dsl/use_smile_id_builder.tsx +6 -4
  480. package/src/presentation/flow/dsl/use_smile_id_flow_builder.ts +62 -36
  481. package/src/presentation/flow/flow_navigation_manager.ts +185 -14
  482. package/src/presentation/flow/model/instruction_guideline.ts +6 -0
  483. package/src/presentation/flow/model/instructions_defaults.ts +104 -26
  484. package/src/presentation/flow/screen/orchestrated_capture_screen.tsx +60 -12
  485. package/src/presentation/flow/screen/orchestrated_consent_screen.tsx +5 -0
  486. package/src/presentation/flow/screen/orchestrated_instructions_screen.tsx +1 -0
  487. package/src/presentation/flow/screen/orchestrated_preview_screen.tsx +4 -14
  488. package/src/presentation/flow/screen/orchestrated_processing_screen.tsx +3 -3
  489. package/src/presentation/flow/use_smile_id_flow.tsx +11 -4
  490. package/src/presentation/flow/validation/__tests__/flow_validator.test.ts +61 -1
  491. package/src/presentation/flow/validation/__tests__/job_type_validator.test.ts +64 -0
  492. package/src/presentation/flow/validation/flow_validator.ts +55 -26
  493. package/src/presentation/flow/validation/job_type_validator.ts +24 -0
  494. package/src/presentation/screen/__tests__/capture_ui_state.test.ts +66 -47
  495. package/src/presentation/screen/__tests__/ess_turn_haptics.test.ts +15 -11
  496. package/src/presentation/screen/__tests__/instructions_screen_helpers.test.ts +15 -3
  497. package/src/presentation/screen/__tests__/scan_state_to_overlay_state.test.ts +47 -27
  498. package/src/presentation/screen/__tests__/use_smile_id_capture_screen.test.tsx +182 -18
  499. package/src/presentation/screen/__tests__/use_smile_id_document_back_instructions.test.tsx +1 -1
  500. package/src/presentation/screen/__tests__/use_smile_id_preview_screen.test.tsx +10 -40
  501. package/src/presentation/screen/helpers/__tests__/use_capture_orientation_lock.test.tsx +212 -0
  502. package/src/presentation/screen/helpers/capture_screen_helpers.ts +1 -0
  503. package/src/presentation/screen/helpers/capture_ui_state.ts +27 -27
  504. package/src/presentation/screen/helpers/ess_turn_haptics.ts +9 -9
  505. package/src/presentation/screen/helpers/instructions_screen_helpers.ts +7 -2
  506. package/src/presentation/screen/helpers/scan_state_to_overlay_state.ts +16 -13
  507. package/src/presentation/screen/helpers/use_capture_orientation_lock.ts +69 -7
  508. package/src/presentation/screen/use_smile_id_capture_screen.tsx +280 -54
  509. package/src/presentation/screen/use_smile_id_consent_screen.tsx +16 -5
  510. package/src/presentation/screen/use_smile_id_document_back_instructions.tsx +14 -23
  511. package/src/presentation/screen/use_smile_id_document_preview_screen.tsx +33 -23
  512. package/src/presentation/screen/use_smile_id_instructions_screen.tsx +4 -0
  513. package/src/presentation/screen/use_smile_id_preview_screen.tsx +21 -53
  514. package/src/presentation/screen/use_smile_id_processing_screen.tsx +8 -8
  515. package/src/presentation/theme/theme.ts +21 -19
  516. package/src/presentation/utils/__tests__/locale_utils.test.ts +46 -5
  517. package/src/presentation/utils/force_max_brightness.tsx +4 -4
  518. package/src/presentation/utils/locale_utils.ts +13 -4
  519. package/src/testing/__tests__/fake_face_analyzer.test.ts +42 -0
  520. package/src/testing/__tests__/scenario_expectations.test.ts +110 -0
  521. package/src/testing/__tests__/scenario_loader.test.ts +64 -0
  522. package/src/testing/fake_face_analyzer.ts +82 -0
  523. package/src/testing/index.ts +15 -0
  524. package/src/testing/scenario_expectations.ts +87 -0
  525. package/src/testing/scenario_loader.ts +83 -0
  526. package/src/testing/scripted_scan_results.ts +66 -0
  527. package/dist/camera/frame_processor_plugin.d.ts +0 -28
  528. package/dist/camera/frame_processor_plugin.d.ts.map +0 -1
  529. package/dist/camera/frame_processor_plugin.js +0 -21
  530. package/dist/camera/frame_processor_plugin.js.map +0 -1
  531. package/dist/camera/use_smile_id_frame_processor.d.ts +0 -38
  532. package/dist/camera/use_smile_id_frame_processor.d.ts.map +0 -1
  533. package/dist/camera/use_smile_id_frame_processor.js +0 -2
  534. package/dist/camera/use_smile_id_frame_processor.js.map +0 -1
  535. package/dist/presentation/components/use_smile_id_document_frame_glyph.d.ts +0 -17
  536. package/dist/presentation/components/use_smile_id_document_frame_glyph.d.ts.map +0 -1
  537. package/dist/presentation/components/use_smile_id_document_frame_glyph.js +0 -17
  538. package/dist/presentation/components/use_smile_id_document_frame_glyph.js.map +0 -1
  539. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.d.ts +0 -24
  540. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.d.ts.map +0 -1
  541. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.js +0 -91
  542. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.js.map +0 -1
  543. package/dist/presentation/components/use_smile_id_face_silhouette_overlay.d.ts +0 -15
  544. package/dist/presentation/components/use_smile_id_face_silhouette_overlay.d.ts.map +0 -1
  545. package/dist/presentation/components/use_smile_id_face_silhouette_overlay.js +0 -19
  546. package/dist/presentation/components/use_smile_id_face_silhouette_overlay.js.map +0 -1
  547. package/dist/presentation/components/use_smile_id_instruction_card.d.ts +0 -31
  548. package/dist/presentation/components/use_smile_id_instruction_card.d.ts.map +0 -1
  549. package/dist/presentation/components/use_smile_id_instruction_card.js +0 -43
  550. package/dist/presentation/components/use_smile_id_instruction_card.js.map +0 -1
  551. package/dist/presentation/screen/helpers/use_document_orientation_lock.d.ts +0 -24
  552. package/dist/presentation/screen/helpers/use_document_orientation_lock.d.ts.map +0 -1
  553. package/dist/presentation/screen/helpers/use_document_orientation_lock.js +0 -47
  554. package/dist/presentation/screen/helpers/use_document_orientation_lock.js.map +0 -1
  555. package/src/presentation/components/use_smile_id_document_frame_glyph.tsx +0 -162
  556. package/src/presentation/components/use_smile_id_face_silhouette_overlay.tsx +0 -27
@@ -24,54 +24,119 @@ export type ButtonSlot = (props: {
24
24
  enabled: boolean;
25
25
  }) => ReactNode;
26
26
  export declare class ConsentConfigBuilder {
27
+ /** Your company name, shown in the consent copy. */
27
28
  partnerName: string;
28
- /** Partner brand mark rendered next to the Smile ID icon at the top of the consent screen. */
29
+ /**
30
+ * Optional partner logo shown on the consent screen, rendered next to
31
+ * the Smile ID icon at the top.
32
+ */
29
33
  partnerIcon?: ReactNode;
34
+ /** URL of your privacy policy, linked from the consent screen. */
30
35
  partnerPrivacyPolicyUrl?: string;
36
+ /**
37
+ * Whether to show the "Powered by Smile ID" attribution. Defaults to
38
+ * true.
39
+ */
31
40
  showAttribution: boolean;
41
+ /**
42
+ * Callback invoked with the `ConsentInformation` when the user grants
43
+ * consent.
44
+ */
32
45
  onConsentGranted?: (info: ConsentInformation) => void;
46
+ /** Provides a custom allow/agree button in place of the default. */
33
47
  allowButton?: ButtonSlot;
48
+ /** Provides a custom deny/cancel button in place of the default. */
34
49
  denyButton?: ButtonSlot;
35
50
  }
36
51
  export declare class InstructionsConfigBuilder {
37
- /** Leading title text (title-text colour). Defaults to the localized prefix. */
52
+ /**
53
+ * The leading, non-emphasized part of the instructions screen title.
54
+ * Defaults to the localized prefix.
55
+ */
38
56
  titlePrefix?: string;
39
- /** Emphasized word (primary colour, own line). Defaults to the localized "selfie". */
57
+ /**
58
+ * The emphasized (highlighted) part of the instructions screen title.
59
+ * Defaults to the localized "selfie".
60
+ */
40
61
  titleEmphasis?: string;
41
- /** Lottie hero. Unset uses the selfie hero (or the ESS hero when enhanced liveness is on). */
62
+ /**
63
+ * Name of the hero animation asset shown at the top of the
64
+ * instructions screen. Unset uses the selfie hero (or the ESS hero
65
+ * when enhanced liveness is on).
66
+ */
42
67
  heroAnimation?: HeroAnimationSource;
43
- /** Capture-guidelines section title (rendered uppercase). */
68
+ /** Heading for the list of capture guidelines (rendered uppercase). */
44
69
  guidelinesSectionTitle?: string;
45
- /** Capture-guideline tiles; push to customize. Empty uses the defaults. */
70
+ /** The list of guideline items shown to the user. Empty uses the defaults. */
46
71
  guidelines: InstructionGuideline[];
72
+ /**
73
+ * Whether to show the "Powered by Smile ID" attribution. Defaults to
74
+ * true.
75
+ */
47
76
  showAttribution: boolean;
48
- /** Draw the face-oval ring around the hero animation. */
77
+ /** When true, draws the face-oval ring around the hero animation. */
49
78
  showHeroOval: boolean;
79
+ /** Provides a custom continue button in place of the default. */
50
80
  continueButton?: ButtonSlot;
51
81
  }
52
82
  export declare class SelfieCaptureConfigBuilder {
83
+ /**
84
+ * When true, the whole selfie session captures on the rear camera so an
85
+ * assisting agent can point it at the subject. Cannot be combined with
86
+ * {@link enableEnhancedLiveness}.
87
+ */
53
88
  allowAgentMode: boolean;
89
+ /**
90
+ * When true, uses the enhanced active-liveness capture path. Defaults
91
+ * to false.
92
+ */
54
93
  enableEnhancedLiveness: boolean;
55
94
  }
56
95
  export declare class DocumentCaptureConfigBuilder {
57
- /** The document being captured. **Required** — missing it fails validation. */
96
+ /**
97
+ * The kind of document being captured, which drives the capture
98
+ * framing and aspect ratio. **Required** — missing it fails validation.
99
+ */
58
100
  documentType?: DocumentType;
59
- /** When the photo is taken. Defaults to auto-capture with a 10s manual fallback. */
101
+ /**
102
+ * Whether the document is captured automatically when held steady, or
103
+ * manually by shutter. Defaults to auto-capture with a 10s manual
104
+ * fallback.
105
+ */
60
106
  captureMode: DocumentCaptureMode;
107
+ /**
108
+ * When true, lets the user pick an existing document image from the
109
+ * gallery. Defaults to false.
110
+ */
61
111
  allowGalleryUpload: boolean;
112
+ /** When true, captures both the front and back of the document. Defaults to true. */
62
113
  captureBothSides: boolean;
114
+ /** When true, lets the user skip capturing the back side. Defaults to false. */
63
115
  allowSkipBack: boolean;
64
- /** Optional aspect ratio hint — e.g. CR-80 ID card = 1.586. */
116
+ /**
117
+ * Optional fixed aspect ratio for the document frame when the ID's
118
+ * dimensions are known in advance — e.g. CR-80 ID card = 1.586.
119
+ */
65
120
  knownIdAspectRatio?: number;
66
121
  /** The `documentType`'s aspect ratio when present, otherwise `knownIdAspectRatio`. */
67
122
  get resolvedAspectRatio(): number | undefined;
68
123
  }
69
124
  export declare class CaptureConfigBuilder {
125
+ /** What this screen captures — a selfie or a document. Required. */
70
126
  captureType?: CaptureType;
127
+ /** Provides a custom start/capture button in place of the default. */
71
128
  startButton?: ButtonSlot;
72
129
  private _selfie?;
73
130
  private _document?;
131
+ /**
132
+ * Configures selfie-specific capture options (agent mode, enhanced
133
+ * liveness).
134
+ */
74
135
  selfie(block: (s: SelfieCaptureConfigBuilder) => void): void;
136
+ /**
137
+ * Configures document-specific capture options (document type, capture
138
+ * mode, gallery upload, two-sided capture).
139
+ */
75
140
  document(block: (d: DocumentCaptureConfigBuilder) => void): void;
76
141
  /** @internal Snapshot used by the orchestrator. */
77
142
  get selfieConfig(): SelfieCaptureConfigBuilder | undefined;
@@ -79,16 +144,30 @@ export declare class CaptureConfigBuilder {
79
144
  get documentConfig(): DocumentCaptureConfigBuilder | undefined;
80
145
  }
81
146
  export declare class PreviewConfigBuilder {
147
+ /** Whether the preview screen offers a retake action. */
82
148
  allowRetake: boolean;
149
+ /**
150
+ * Whether to show the "Powered by Smile ID" attribution. Defaults to
151
+ * true.
152
+ */
83
153
  showAttribution: boolean;
84
- continueButton?: ButtonSlot;
85
- cancelButton?: ButtonSlot;
86
154
  }
87
155
  export declare class ProcessingConfigBuilder {
156
+ /**
157
+ * When true, shows a numeric progress percentage while the job is
158
+ * processing.
159
+ */
88
160
  showProgressPercentage: boolean;
161
+ /**
162
+ * Whether to show the "Powered by Smile ID" attribution. Defaults to
163
+ * true.
164
+ */
89
165
  showAttribution: boolean;
166
+ /** Provides a custom continue button in place of the default. */
90
167
  continueButton?: ButtonSlot;
168
+ /** Provides a custom retry button in place of the default. */
91
169
  retryButton?: ButtonSlot;
170
+ /** Provides a custom exit button in place of the default. */
92
171
  exitButton?: ButtonSlot;
93
172
  }
94
173
  export type ScreenSpec = {
@@ -112,10 +191,29 @@ export type ScreensConfig = {
112
191
  };
113
192
  export declare class ScreensBuilder {
114
193
  private _steps;
194
+ /**
195
+ * Adds a consent screen that collects the user's agreement to
196
+ * biometric data processing before capture.
197
+ */
115
198
  consent(block?: (c: ConsentConfigBuilder) => void): void;
199
+ /**
200
+ * Adds an instructions screen explaining what the user is about to do.
201
+ */
116
202
  instructions(block?: (i: InstructionsConfigBuilder) => void): void;
203
+ /**
204
+ * Adds a capture screen that runs the camera and on-device detection
205
+ * for a selfie or document.
206
+ */
117
207
  capture(block: (c: CaptureConfigBuilder) => void): void;
208
+ /**
209
+ * Adds a preview screen that lets the user review the captured image
210
+ * and optionally retake it.
211
+ */
118
212
  preview(block?: (p: PreviewConfigBuilder) => void): void;
213
+ /**
214
+ * Adds a processing screen shown while the job is submitted, displaying
215
+ * success, failure, or retry states.
216
+ */
119
217
  processing(block?: (p: ProcessingConfigBuilder) => void): void;
120
218
  build(): ScreensConfig;
121
219
  }
@@ -1 +1 @@
1
- {"version":3,"file":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E,CAAC,CAAC,EAAE,oBAAoB,KAAK,IAAI,GAAG,IAAI;IAMvD;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAoB,KAAK,IAAI,GAAG,IAAI;IAMxD;;;OAGG;IACH,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,uBAAuB,KAAK,IAAI,GAAG,IAAI;IAM9D,KAAK,IAAI,aAAa;CAGvB"}
@@ -3,44 +3,99 @@ import { DocumentCaptureMode } from "../../../../core/models/document_capture_mo
3
3
  export { CaptureType };
4
4
  // --- Per-screen builders ---------------------------------------------------
5
5
  export class ConsentConfigBuilder {
6
+ /** Your company name, shown in the consent copy. */
6
7
  partnerName = "";
7
- /** Partner brand mark rendered next to the Smile ID icon at the top of the consent screen. */
8
+ /**
9
+ * Optional partner logo shown on the consent screen, rendered next to
10
+ * the Smile ID icon at the top.
11
+ */
8
12
  partnerIcon;
13
+ /** URL of your privacy policy, linked from the consent screen. */
9
14
  partnerPrivacyPolicyUrl;
15
+ /**
16
+ * Whether to show the "Powered by Smile ID" attribution. Defaults to
17
+ * true.
18
+ */
10
19
  showAttribution = true;
20
+ /**
21
+ * Callback invoked with the `ConsentInformation` when the user grants
22
+ * consent.
23
+ */
11
24
  onConsentGranted;
25
+ /** Provides a custom allow/agree button in place of the default. */
12
26
  allowButton;
27
+ /** Provides a custom deny/cancel button in place of the default. */
13
28
  denyButton;
14
29
  }
15
30
  export class InstructionsConfigBuilder {
16
- /** Leading title text (title-text colour). Defaults to the localized prefix. */
31
+ /**
32
+ * The leading, non-emphasized part of the instructions screen title.
33
+ * Defaults to the localized prefix.
34
+ */
17
35
  titlePrefix;
18
- /** Emphasized word (primary colour, own line). Defaults to the localized "selfie". */
36
+ /**
37
+ * The emphasized (highlighted) part of the instructions screen title.
38
+ * Defaults to the localized "selfie".
39
+ */
19
40
  titleEmphasis;
20
- /** Lottie hero. Unset uses the selfie hero (or the ESS hero when enhanced liveness is on). */
41
+ /**
42
+ * Name of the hero animation asset shown at the top of the
43
+ * instructions screen. Unset uses the selfie hero (or the ESS hero
44
+ * when enhanced liveness is on).
45
+ */
21
46
  heroAnimation;
22
- /** Capture-guidelines section title (rendered uppercase). */
47
+ /** Heading for the list of capture guidelines (rendered uppercase). */
23
48
  guidelinesSectionTitle;
24
- /** Capture-guideline tiles; push to customize. Empty uses the defaults. */
49
+ /** The list of guideline items shown to the user. Empty uses the defaults. */
25
50
  guidelines = [];
51
+ /**
52
+ * Whether to show the "Powered by Smile ID" attribution. Defaults to
53
+ * true.
54
+ */
26
55
  showAttribution = true;
27
- /** Draw the face-oval ring around the hero animation. */
56
+ /** When true, draws the face-oval ring around the hero animation. */
28
57
  showHeroOval = true;
58
+ /** Provides a custom continue button in place of the default. */
29
59
  continueButton;
30
60
  }
31
61
  export class SelfieCaptureConfigBuilder {
62
+ /**
63
+ * When true, the whole selfie session captures on the rear camera so an
64
+ * assisting agent can point it at the subject. Cannot be combined with
65
+ * {@link enableEnhancedLiveness}.
66
+ */
32
67
  allowAgentMode = false;
68
+ /**
69
+ * When true, uses the enhanced active-liveness capture path. Defaults
70
+ * to false.
71
+ */
33
72
  enableEnhancedLiveness = false;
34
73
  }
35
74
  export class DocumentCaptureConfigBuilder {
36
- /** The document being captured. **Required** — missing it fails validation. */
75
+ /**
76
+ * The kind of document being captured, which drives the capture
77
+ * framing and aspect ratio. **Required** — missing it fails validation.
78
+ */
37
79
  documentType;
38
- /** When the photo is taken. Defaults to auto-capture with a 10s manual fallback. */
80
+ /**
81
+ * Whether the document is captured automatically when held steady, or
82
+ * manually by shutter. Defaults to auto-capture with a 10s manual
83
+ * fallback.
84
+ */
39
85
  captureMode = DocumentCaptureMode.AutoCaptureWithManualFallback();
86
+ /**
87
+ * When true, lets the user pick an existing document image from the
88
+ * gallery. Defaults to false.
89
+ */
40
90
  allowGalleryUpload = false;
91
+ /** When true, captures both the front and back of the document. Defaults to true. */
41
92
  captureBothSides = true;
93
+ /** When true, lets the user skip capturing the back side. Defaults to false. */
42
94
  allowSkipBack = false;
43
- /** Optional aspect ratio hint — e.g. CR-80 ID card = 1.586. */
95
+ /**
96
+ * Optional fixed aspect ratio for the document frame when the ID's
97
+ * dimensions are known in advance — e.g. CR-80 ID card = 1.586.
98
+ */
44
99
  knownIdAspectRatio;
45
100
  /** The `documentType`'s aspect ratio when present, otherwise `knownIdAspectRatio`. */
46
101
  get resolvedAspectRatio() {
@@ -48,15 +103,25 @@ export class DocumentCaptureConfigBuilder {
48
103
  }
49
104
  }
50
105
  export class CaptureConfigBuilder {
106
+ /** What this screen captures — a selfie or a document. Required. */
51
107
  captureType;
108
+ /** Provides a custom start/capture button in place of the default. */
52
109
  startButton;
53
110
  _selfie;
54
111
  _document;
112
+ /**
113
+ * Configures selfie-specific capture options (agent mode, enhanced
114
+ * liveness).
115
+ */
55
116
  selfie(block) {
56
117
  if (!this._selfie)
57
118
  this._selfie = new SelfieCaptureConfigBuilder();
58
119
  block(this._selfie);
59
120
  }
121
+ /**
122
+ * Configures document-specific capture options (document type, capture
123
+ * mode, gallery upload, two-sided capture).
124
+ */
60
125
  document(block) {
61
126
  if (!this._document)
62
127
  this._document = new DocumentCaptureConfigBuilder();
@@ -72,41 +137,74 @@ export class CaptureConfigBuilder {
72
137
  }
73
138
  }
74
139
  export class PreviewConfigBuilder {
140
+ /** Whether the preview screen offers a retake action. */
75
141
  allowRetake = true;
142
+ /**
143
+ * Whether to show the "Powered by Smile ID" attribution. Defaults to
144
+ * true.
145
+ */
76
146
  showAttribution = true;
77
- continueButton;
78
- cancelButton;
79
147
  }
80
148
  export class ProcessingConfigBuilder {
149
+ /**
150
+ * When true, shows a numeric progress percentage while the job is
151
+ * processing.
152
+ */
81
153
  showProgressPercentage = true;
154
+ /**
155
+ * Whether to show the "Powered by Smile ID" attribution. Defaults to
156
+ * true.
157
+ */
82
158
  showAttribution = true;
159
+ /** Provides a custom continue button in place of the default. */
83
160
  continueButton;
161
+ /** Provides a custom retry button in place of the default. */
84
162
  retryButton;
163
+ /** Provides a custom exit button in place of the default. */
85
164
  exitButton;
86
165
  }
87
166
  // --- Top-level screens builder ---------------------------------------------
88
167
  export class ScreensBuilder {
89
168
  _steps = [];
169
+ /**
170
+ * Adds a consent screen that collects the user's agreement to
171
+ * biometric data processing before capture.
172
+ */
90
173
  consent(block) {
91
174
  const config = new ConsentConfigBuilder();
92
175
  block?.(config);
93
176
  this._steps.push({ kind: "consent", config });
94
177
  }
178
+ /**
179
+ * Adds an instructions screen explaining what the user is about to do.
180
+ */
95
181
  instructions(block) {
96
182
  const config = new InstructionsConfigBuilder();
97
183
  block?.(config);
98
184
  this._steps.push({ kind: "instructions", config });
99
185
  }
186
+ /**
187
+ * Adds a capture screen that runs the camera and on-device detection
188
+ * for a selfie or document.
189
+ */
100
190
  capture(block) {
101
191
  const config = new CaptureConfigBuilder();
102
192
  block(config);
103
193
  this._steps.push({ kind: "capture", config });
104
194
  }
195
+ /**
196
+ * Adds a preview screen that lets the user review the captured image
197
+ * and optionally retake it.
198
+ */
105
199
  preview(block) {
106
200
  const config = new PreviewConfigBuilder();
107
201
  block?.(config);
108
202
  this._steps.push({ kind: "preview", config });
109
203
  }
204
+ /**
205
+ * Adds a processing screen shown while the job is submitted, displaying
206
+ * success, failure, or retry states.
207
+ */
110
208
  processing(block) {
111
209
  const config = new ProcessingConfigBuilder();
112
210
  block?.(config);
@@ -1 +1 @@
1
- {"version":3,"file":"screens_builder.js","sourceRoot":"","sources":["../../../../../src/presentation/flow/dsl/builder/screens_builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAKpF,OAAO,EAAE,WAAW,EAAE,CAAC;AAqBvB,8EAA8E;AAE9E,MAAM,OAAO,oBAAoB;IAC/B,WAAW,GAAG,EAAE,CAAC;IACjB,8FAA8F;IAC9F,WAAW,CAAa;IACxB,uBAAu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AC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,CAAC,KAAyC;QAC/C,MAAM,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC1C,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;QAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,UAAU,CAAC,KAA4C;QACrD,MAAM,MAAM,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAC7C,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;QAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,KAAK;QACH,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
1
+ {"version":3,"file":"screens_builder.js","sourceRoot":"","sources":["../../../../../src/presentation/flow/dsl/builder/screens_builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAKpF,OAAO,EAAE,WAAW,EAAE,CAAC;AAqBvB,8EAA8E;AAE9E,MAAM,OAAO,oBAAoB;IAC/B,oDAAoD;IACpD,WAAW,GAAG,EAAE,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAa;IACxB,kEAAkE;IAClE,uBAAuB,CAAU;IACjC;;;OAGG;IACH,eAAe,GAAG,IAAI,CAAC;IACvB;;;OAGG;IACH,gBAAgB,CAAsC;IACtD,oEAAoE;IACpE,WAAW,CAAc;IACzB,oEAAoE;IACpE,UAAU,CA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AED;;;OAGG;IACH,OAAO,CAAC,KAAwC;QAC9C,MAAM,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC1C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IAChD,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,KAAyC;QAC/C,MAAM,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC1C,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;QAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IAChD,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,KAA4C;QACrD,MAAM,MAAM,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAC7C,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;QAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,KAAK;QACH,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
@@ -17,17 +17,30 @@ export type ThemeConfiguration = {
17
17
  * picks light or dark at mount time based on the active color scheme.
18
18
  */
19
19
  export declare class ThemeConfigBuilder {
20
+ /** Primary brand color used for key actions and accents. */
20
21
  primaryColor?: AdaptiveColor;
22
+ /**
23
+ * Foreground color used on top of the primary color (for example
24
+ * button text).
25
+ */
21
26
  primaryForeground?: AdaptiveColor;
27
+ /** Secondary color used for less prominent surfaces and actions. */
22
28
  secondaryColor?: AdaptiveColor;
29
+ /** Accent color used for highlights and selected states. */
23
30
  accentColor?: AdaptiveColor;
31
+ /** Optional font family applied to all SDK text. */
24
32
  fontFamily?: string;
33
+ /** Corner radius applied to buttons. */
25
34
  buttonShape?: number;
35
+ /** Corner radius applied to cards and surfaces. */
26
36
  cardShape?: number;
27
- /** Helper to create an `AdaptiveColor` with explicit light/dark values. */
37
+ /**
38
+ * Builds an adaptive color that resolves to the light or dark value
39
+ * based on the active appearance.
40
+ */
28
41
  color(light: string, dark: string): AdaptiveColor;
29
42
  /**
30
- * Helper to create a button/card shape value. Returns the input
43
+ * Builds a corner-shape value from the given radius. Returns the input
31
44
  * radius unchanged — React Native resolves shape at render time via
32
45
  * `borderRadius`, so the `buttonShape` / `cardShape` properties are
33
46
  * plain numbers.
@@ -1 +1 @@
1
- {"version":3,"file":"theme_builder.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/flow/dsl/builder/theme_builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAE9B,iEAAiE;AACjE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,2EAA2E;AAC3E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;CAChC,CAAC;AAEF;;;;;;GAMG;AACH,qBAAa,kBAAkB;IAC7B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,WAAW,CAAC,EAAE,aAAa,CAAC;IAE5B,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,2EAA2E;IAC3E,KAAK,CAAC,KAAK,EAAE,MAAM,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O,CAAC,QAAQ;CAmCjB"}
@@ -7,19 +7,32 @@ import { DEFAULT_FONT_FAMILY, defaultDarkTheme, defaultLightTheme, typographyWit
7
7
  * picks light or dark at mount time based on the active color scheme.
8
8
  */
9
9
  export class ThemeConfigBuilder {
10
+ /** Primary brand color used for key actions and accents. */
10
11
  primaryColor;
12
+ /**
13
+ * Foreground color used on top of the primary color (for example
14
+ * button text).
15
+ */
11
16
  primaryForeground;
17
+ /** Secondary color used for less prominent surfaces and actions. */
12
18
  secondaryColor;
19
+ /** Accent color used for highlights and selected states. */
13
20
  accentColor;
21
+ /** Optional font family applied to all SDK text. */
14
22
  fontFamily;
23
+ /** Corner radius applied to buttons. */
15
24
  buttonShape;
25
+ /** Corner radius applied to cards and surfaces. */
16
26
  cardShape;
17
- /** Helper to create an `AdaptiveColor` with explicit light/dark values. */
27
+ /**
28
+ * Builds an adaptive color that resolves to the light or dark value
29
+ * based on the active appearance.
30
+ */
18
31
  color(light, dark) {
19
32
  return Object.freeze({ light, dark });
20
33
  }
21
34
  /**
22
- * Helper to create a button/card shape value. Returns the input
35
+ * Builds a corner-shape value from the given radius. Returns the input
23
36
  * radius unchanged — React Native resolves shape at render time via
24
37
  * `borderRadius`, so the `buttonShape` / `cardShape` properties are
25
38
  * plain numbers.
@@ -1 +1 @@
1
- {"version":3,"file":"theme_builder.js","sourceRoot":"","sources":["../../../../../src/presentation/flow/dsl/builder/theme_builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,GAGzB,MAAM,sBAAsB,CAAC;AAc9B;;;;;;GAMG;AACH,MAAM,OAAO,kBAAkB;IAC7B,YAAY,CAAiB;IAC7B,iBAAiB,CAAiB;IAClC,cAAc,CAAiB;IAC/B,WAAW,CAAiB;IAE5B,UAAU,CAAU;IAEpB,WAAW,CAAU;IACrB,SAAS,CAAU;IAEnB,2EAA2E;IAC3E,KAAK,CAAC,KAAa,EAAE,IAAY;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C;YACjD,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5C,CAAC;QACF,OAAO,MAAM,CAAC,MAAM,CAAC;YACnB,GAAG,IAAI;YACP,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,cAAc,EAAE;YAC7C,UAAU,EAAE,wBAAwB,CAClC,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,IAAI,mBAAmB,CACvC;YACD,MAAM,EAAE;gBACN,GAAG,IAAI,CAAC,MAAM;gBACd,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS;oBAChC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE;oBACpC,CAAC,CAAC,EAAE,CAAC;gBACP,GAAG,CAAC,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACxE;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"theme_builder.js","sourceRoot":"","sources":["../../../../../src/presentation/flow/dsl/builder/theme_builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,GAGzB,MAAM,sBAAsB,CAAC;AAc9B;;;;;;GAMG;AACH,MAAM,OAAO,kBAAkB;IAC7B,4DAA4D;IAC5D,YAAY,CAAiB;IAE7B;;;OAGG;IACH,iBAAiB,CAAiB;IAElC,oEAAoE;IACpE,cAAc,CAAiB;IAE/B,4DAA4D;IAC5D,WAAW,CAAiB;IAE5B,oDAAoD;IACpD,UAAU,CAAU;IAEpB,wCAAwC;IACxC,WAAW,CAAU;IAErB,mDAAmD;IACnD,SAAS,CAAU;IAEnB;;;OAGG;IACH,KAAK,CAAC,KAAa,EAAE,IAAY;QA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YACjD,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5C,CAAC;QACF,OAAO,MAAM,CAAC,MAAM,CAAC;YACnB,GAAG,IAAI;YACP,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,cAAc,EAAE;YAC7C,UAAU,EAAE,wBAAwB,CAClC,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,IAAI,mBAAmB,CACvC;YACD,MAAM,EAAE;gBACN,GAAG,IAAI,CAAC,MAAM;gBACd,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS;oBAChC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE;oBACpC,CAAC,CAAC,EAAE,CAAC;gBACP,GAAG,CAAC,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACxE;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,10 +1,12 @@
1
1
  import { UseSmileIDFlowBuilder } from "./use_smile_id_flow_builder";
2
2
  import type { FlowBuildResult } from "./flow_build_result";
3
3
  /**
4
- * Top-level partner entry point. Configures the flow declaratively
5
- * via the `builder` closure, then renders the result. The component
6
- * owns the build-and-dispatch lifecycle internally — partners never
7
- * touch the intermediate [FlowBuildResult].
4
+ * Entry point for a UseSmileID identity-verification flow. Host this in
5
+ * your UI and configure the flow inside the builder closure — declare
6
+ * the screens, network credentials, theme, and ML analyzers, then handle
7
+ * the terminal outcome via `onResult`. The component owns the
8
+ * build-and-dispatch lifecycle internally — partners never touch the
9
+ * intermediate [FlowBuildResult].
8
10
  *
9
11
  * export function VerifyScreen({ onComplete }) {
10
12
  * return (
@@ -1 +1 @@
1
- {"version":3,"file":"use_smile_id_builder.d.ts","sourceRoot":"","sources":["../../../../src/presentation/flow/dsl/use_smile_id_builder.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,qBAAqB,EAEtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,sBAAsB,+BAwCpE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,IAAI,GAClD,eAAe,CAIjB;AAED,OAAO,EACL,qBAAqB,EACrB,KAAK,yBAAyB,GAC/B,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"use_smile_id_builder.d.ts","sourceRoot":"","sources":["../../../../src/presentation/flow/dsl/use_smile_id_builder.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,qBAAqB,EAEtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,sBAAsB,+BAwCpE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,IAAI,GAClD,eAAe,CAIjB;AAED,OAAO,EACL,qBAAqB,EACrB,KAAK,yBAAyB,GAC/B,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use_smile_id_builder.js","sourceRoot":"","sources":["../../../../src/presentation/flow/dsl/use_smile_id_builder.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,GAEtB,MAAM,6BAA6B,CAAC;AAgDrC,MAAM,UAAU,iBAAiB,CAAC,EAAE,OAAO,EAA0B;IACnE,2DAA2D;IAC3D,6DAA6D;IAC7D,gBAAgB;IAChB,EAAE;IACF,mEAAmE;IACnE,oEAAoE;IACpE,gEAAgE;IAChE,mEAAmE;IACnE,gEAAgE;IAChE,iEAAiE;IACjE,mDAAmD;IACnD,uDAAuD;IACvD,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE;QAC3C,MAAM,WAAW,GAAG,IAAI,qBAAqB,EAAE,CAAC;QAChD,OAAO,CAAC,WAAW,CAAC,CAAC;QACrB,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,EAAE,CAAC;QAClC,OAAO;YACL,MAAM,EAAE,KAAK;YACb,WAAW,EAAE;gBACX,QAAQ,EAAE,WAAW,CAAC,QAAQ;gBAC9B,eAAe,EAEX,WAGD,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,eAAe,KAAK,IAAI;aAC9C;SACF,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,CACL,KAAC,qBAAqB,IACpB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAC9B,eAAe,EAAE,WAAW,CAAC,eAAe,GAC5C,CACH,CAAC;IACJ,CAAC;IACD,OAAO,KAAC,mBAAmB,IAAC,aAAa,EAAE,MAAM,CAAC,aAAa,GAAI,CAAC;AACtE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAC/B,SAAmD;IAEnD,MAAM,OAAO,GAAG,IAAI,qBAAqB,EAAE,CAAC;IAC5C,SAAS,CAAC,OAAO,CAAC,CAAC;IACnB,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC;AACzB,CAAC;AAED,OAAO,EACL,qBAAqB,GAEtB,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"use_smile_id_builder.js","sourceRoot":"","sources":["../../../../src/presentation/flow/dsl/use_smile_id_builder.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,GAEtB,MAAM,6BAA6B,CAAC;AAkDrC,MAAM,UAAU,iBAAiB,CAAC,EAAE,OAAO,EAA0B;IACnE,2DAA2D;IAC3D,6DAA6D;IAC7D,gBAAgB;IAChB,EAAE;IACF,mEAAmE;IACnE,oEAAoE;IACpE,gEAAgE;IAChE,mEAAmE;IACnE,gEAAgE;IAChE,iEAAiE;IACjE,mDAAmD;IACnD,uDAAuD;IACvD,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE;QAC3C,MAAM,WAAW,GAAG,IAAI,qBAAqB,EAAE,CAAC;QAChD,OAAO,CAAC,WAAW,CAAC,CAAC;QACrB,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,EAAE,CAAC;QAClC,OAAO;YACL,MAAM,EAAE,KAAK;YACb,WAAW,EAAE;gBACX,QAAQ,EAAE,WAAW,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