@idmission/websdk-ui 0.1.0-rc.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 (500) hide show
  1. package/README.md +189 -0
  2. package/dist/DocumentCaptureView.d.ts +111 -0
  3. package/dist/DocumentCaptureView.d.ts.map +1 -0
  4. package/dist/DocumentCaptureView.js +225 -0
  5. package/dist/FaceLivenessView.d.ts +88 -0
  6. package/dist/FaceLivenessView.d.ts.map +1 -0
  7. package/dist/FaceLivenessView.js +298 -0
  8. package/dist/IdCaptureView.d.ts +271 -0
  9. package/dist/IdCaptureView.d.ts.map +1 -0
  10. package/dist/IdCaptureView.js +454 -0
  11. package/dist/SelfieCaptureView.d.ts +119 -0
  12. package/dist/SelfieCaptureView.d.ts.map +1 -0
  13. package/dist/SelfieCaptureView.js +168 -0
  14. package/dist/SignatureCaptureView.d.ts +136 -0
  15. package/dist/SignatureCaptureView.d.ts.map +1 -0
  16. package/dist/SignatureCaptureView.js +521 -0
  17. package/dist/VideoIdCaptureView.d.ts +104 -0
  18. package/dist/VideoIdCaptureView.d.ts.map +1 -0
  19. package/dist/VideoIdCaptureView.js +253 -0
  20. package/dist/bindings/useDocumentCapture.d.ts +3 -0
  21. package/dist/bindings/useDocumentCapture.d.ts.map +1 -0
  22. package/dist/bindings/useDocumentCapture.js +6 -0
  23. package/dist/bindings/useIdCapture.d.ts +5 -0
  24. package/dist/bindings/useIdCapture.d.ts.map +1 -0
  25. package/dist/bindings/useIdCapture.js +53 -0
  26. package/dist/bindings/useSelfieCapture.d.ts +5 -0
  27. package/dist/bindings/useSelfieCapture.d.ts.map +1 -0
  28. package/dist/bindings/useSelfieCapture.js +53 -0
  29. package/dist/bindings/useSignatureCapture.d.ts +3 -0
  30. package/dist/bindings/useSignatureCapture.d.ts.map +1 -0
  31. package/dist/bindings/useSignatureCapture.js +6 -0
  32. package/dist/bindings/useVideoIdCapture.d.ts +3 -0
  33. package/dist/bindings/useVideoIdCapture.d.ts.map +1 -0
  34. package/dist/bindings/useVideoIdCapture.js +6 -0
  35. package/dist/components/CameraFeed.d.ts +36 -0
  36. package/dist/components/CameraFeed.d.ts.map +1 -0
  37. package/dist/components/CameraFeed.js +74 -0
  38. package/dist/components/ExitCaptureButton.d.ts +6 -0
  39. package/dist/components/ExitCaptureButton.d.ts.map +1 -0
  40. package/dist/components/ExitCaptureButton.js +32 -0
  41. package/dist/components/GuidanceMessage.d.ts +25 -0
  42. package/dist/components/GuidanceMessage.d.ts.map +1 -0
  43. package/dist/components/GuidanceMessage.js +39 -0
  44. package/dist/components/OverrideWrongDocumentTypeDialog.d.ts +20 -0
  45. package/dist/components/OverrideWrongDocumentTypeDialog.d.ts.map +1 -0
  46. package/dist/components/OverrideWrongDocumentTypeDialog.js +55 -0
  47. package/dist/components/additional_documents/AdditionalDocumentCapture.d.ts +41 -0
  48. package/dist/components/additional_documents/AdditionalDocumentCapture.d.ts.map +1 -0
  49. package/dist/components/additional_documents/AdditionalDocumentCapture.js +118 -0
  50. package/dist/components/additional_documents/AdditionalDocumentCaptureWizard.d.ts +18 -0
  51. package/dist/components/additional_documents/AdditionalDocumentCaptureWizard.d.ts.map +1 -0
  52. package/dist/components/additional_documents/AdditionalDocumentCaptureWizard.js +93 -0
  53. package/dist/components/additional_documents/sequence.d.ts +10 -0
  54. package/dist/components/additional_documents/sequence.d.ts.map +1 -0
  55. package/dist/components/additional_documents/sequence.js +11 -0
  56. package/dist/components/additional_documents/types.d.ts +15 -0
  57. package/dist/components/additional_documents/types.d.ts.map +1 -0
  58. package/dist/components/additional_documents/types.js +1 -0
  59. package/dist/components/barcode/BarcodeGuideOverlay.d.ts +23 -0
  60. package/dist/components/barcode/BarcodeGuideOverlay.d.ts.map +1 -0
  61. package/dist/components/barcode/BarcodeGuideOverlay.js +157 -0
  62. package/dist/components/barcode/BarcodeSuccessOverlay.d.ts +7 -0
  63. package/dist/components/barcode/BarcodeSuccessOverlay.d.ts.map +1 -0
  64. package/dist/components/barcode/BarcodeSuccessOverlay.js +58 -0
  65. package/dist/components/common/ButtonsRow.d.ts +2 -0
  66. package/dist/components/common/ButtonsRow.d.ts.map +1 -0
  67. package/dist/components/common/ButtonsRow.js +7 -0
  68. package/dist/components/common/CapturedDocumentImg.d.ts +7 -0
  69. package/dist/components/common/CapturedDocumentImg.d.ts.map +1 -0
  70. package/dist/components/common/CapturedDocumentImg.js +31 -0
  71. package/dist/components/common/Card.d.ts +9 -0
  72. package/dist/components/common/Card.d.ts.map +1 -0
  73. package/dist/components/common/Card.js +16 -0
  74. package/dist/components/common/LoaderButton.d.ts +31 -0
  75. package/dist/components/common/LoaderButton.d.ts.map +1 -0
  76. package/dist/components/common/LoaderButton.js +444 -0
  77. package/dist/components/common/LoadingListItemIndicator.d.ts +5 -0
  78. package/dist/components/common/LoadingListItemIndicator.d.ts.map +1 -0
  79. package/dist/components/common/LoadingListItemIndicator.js +8 -0
  80. package/dist/components/common/animation.d.ts +5 -0
  81. package/dist/components/common/animation.d.ts.map +1 -0
  82. package/dist/components/common/animation.js +35 -0
  83. package/dist/components/common/downloadingLabel.d.ts +10 -0
  84. package/dist/components/common/downloadingLabel.d.ts.map +1 -0
  85. package/dist/components/common/downloadingLabel.js +15 -0
  86. package/dist/components/common/overlay.d.ts +142 -0
  87. package/dist/components/common/overlay.d.ts.map +1 -0
  88. package/dist/components/common/overlay.js +183 -0
  89. package/dist/components/customer_match/CustomerMatchFailure.d.ts +37 -0
  90. package/dist/components/customer_match/CustomerMatchFailure.d.ts.map +1 -0
  91. package/dist/components/customer_match/CustomerMatchFailure.js +38 -0
  92. package/dist/components/customer_match/CustomerMatchSuccess.d.ts +35 -0
  93. package/dist/components/customer_match/CustomerMatchSuccess.d.ts.map +1 -0
  94. package/dist/components/customer_match/CustomerMatchSuccess.js +44 -0
  95. package/dist/components/debug/debug.d.ts +91 -0
  96. package/dist/components/debug/debug.d.ts.map +1 -0
  97. package/dist/components/debug/debug.js +270 -0
  98. package/dist/components/document/DocumentCaptureGuideOverlay.d.ts +15 -0
  99. package/dist/components/document/DocumentCaptureGuideOverlay.d.ts.map +1 -0
  100. package/dist/components/document/DocumentCaptureGuideOverlay.js +148 -0
  101. package/dist/components/document/guideRect.d.ts +11 -0
  102. package/dist/components/document/guideRect.d.ts.map +1 -0
  103. package/dist/components/document/guideRect.js +25 -0
  104. package/dist/components/document/types.d.ts +25 -0
  105. package/dist/components/document/types.d.ts.map +1 -0
  106. package/dist/components/document/types.js +1 -0
  107. package/dist/components/error/CameraAccessDeniedOverlay.d.ts +31 -0
  108. package/dist/components/error/CameraAccessDeniedOverlay.d.ts.map +1 -0
  109. package/dist/components/error/CameraAccessDeniedOverlay.js +45 -0
  110. package/dist/components/error/ErrorScreen.d.ts +60 -0
  111. package/dist/components/error/ErrorScreen.d.ts.map +1 -0
  112. package/dist/components/error/ErrorScreen.js +150 -0
  113. package/dist/components/face_liveness/FaceLivenessFailure.d.ts +35 -0
  114. package/dist/components/face_liveness/FaceLivenessFailure.d.ts.map +1 -0
  115. package/dist/components/face_liveness/FaceLivenessFailure.js +30 -0
  116. package/dist/components/face_liveness/FaceLivenessSuccess.d.ts +31 -0
  117. package/dist/components/face_liveness/FaceLivenessSuccess.d.ts.map +1 -0
  118. package/dist/components/face_liveness/FaceLivenessSuccess.js +56 -0
  119. package/dist/components/fallback/IdCaptureFallback.d.ts +58 -0
  120. package/dist/components/fallback/IdCaptureFallback.d.ts.map +1 -0
  121. package/dist/components/fallback/IdCaptureFallback.js +128 -0
  122. package/dist/components/fallback/IdCaptureOrUploadScreen.d.ts +75 -0
  123. package/dist/components/fallback/IdCaptureOrUploadScreen.d.ts.map +1 -0
  124. package/dist/components/fallback/IdCaptureOrUploadScreen.js +205 -0
  125. package/dist/components/fallback/SelfieCaptureFallback.d.ts +54 -0
  126. package/dist/components/fallback/SelfieCaptureFallback.d.ts.map +1 -0
  127. package/dist/components/fallback/SelfieCaptureFallback.js +106 -0
  128. package/dist/components/fallback/fallbackInstructionStep.d.ts +5 -0
  129. package/dist/components/fallback/fallbackInstructionStep.d.ts.map +1 -0
  130. package/dist/components/fallback/fallbackInstructionStep.js +18 -0
  131. package/dist/components/fallback/readFile.d.ts +2 -0
  132. package/dist/components/fallback/readFile.d.ts.map +1 -0
  133. package/dist/components/fallback/readFile.js +14 -0
  134. package/dist/components/guide_images/backToFront.d.ts +3 -0
  135. package/dist/components/guide_images/backToFront.d.ts.map +1 -0
  136. package/dist/components/guide_images/backToFront.js +17 -0
  137. package/dist/components/guide_images/byUrl.d.ts +3 -0
  138. package/dist/components/guide_images/byUrl.d.ts.map +1 -0
  139. package/dist/components/guide_images/byUrl.js +6 -0
  140. package/dist/components/guide_images/defaults.d.ts +37 -0
  141. package/dist/components/guide_images/defaults.d.ts.map +1 -0
  142. package/dist/components/guide_images/defaults.js +37 -0
  143. package/dist/components/guide_images/index.d.ts +7 -0
  144. package/dist/components/guide_images/index.d.ts.map +1 -0
  145. package/dist/components/guide_images/index.js +5 -0
  146. package/dist/components/guide_images/orientation.d.ts +2 -0
  147. package/dist/components/guide_images/orientation.d.ts.map +1 -0
  148. package/dist/components/guide_images/orientation.js +5 -0
  149. package/dist/components/guide_images/types.d.ts +15 -0
  150. package/dist/components/guide_images/types.d.ts.map +1 -0
  151. package/dist/components/guide_images/types.js +1 -0
  152. package/dist/components/guide_images/useGuideImages.d.ts +3 -0
  153. package/dist/components/guide_images/useGuideImages.d.ts.map +1 -0
  154. package/dist/components/guide_images/useGuideImages.js +19 -0
  155. package/dist/components/guides/FlipIdPrompt.d.ts +28 -0
  156. package/dist/components/guides/FlipIdPrompt.d.ts.map +1 -0
  157. package/dist/components/guides/FlipIdPrompt.js +54 -0
  158. package/dist/components/guides/IdCaptureFitGuide.d.ts +51 -0
  159. package/dist/components/guides/IdCaptureFitGuide.d.ts.map +1 -0
  160. package/dist/components/guides/IdCaptureFitGuide.js +199 -0
  161. package/dist/components/guides/IdCaptureGuideOverlay.d.ts +100 -0
  162. package/dist/components/guides/IdCaptureGuideOverlay.d.ts.map +1 -0
  163. package/dist/components/guides/IdCaptureGuideOverlay.js +137 -0
  164. package/dist/components/guides/IdCaptureGuides.d.ts +47 -0
  165. package/dist/components/guides/IdCaptureGuides.d.ts.map +1 -0
  166. package/dist/components/guides/IdCaptureGuides.js +136 -0
  167. package/dist/components/guides/IdCaptureGuidesCommon.d.ts +136 -0
  168. package/dist/components/guides/IdCaptureGuidesCommon.d.ts.map +1 -0
  169. package/dist/components/guides/IdCaptureGuidesCommon.js +123 -0
  170. package/dist/components/loading/IdCaptureLoadingGraphic.d.ts +9 -0
  171. package/dist/components/loading/IdCaptureLoadingGraphic.d.ts.map +1 -0
  172. package/dist/components/loading/IdCaptureLoadingGraphic.js +76 -0
  173. package/dist/components/loading/IdCaptureLoadingOverlay.d.ts +134 -0
  174. package/dist/components/loading/IdCaptureLoadingOverlay.d.ts.map +1 -0
  175. package/dist/components/loading/IdCaptureLoadingOverlay.js +13 -0
  176. package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts +3 -0
  177. package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts.map +1 -0
  178. package/dist/components/loading/IdCaptureLoadingOverlayDefault.js +196 -0
  179. package/dist/components/loading/IdCaptureLoadingOverlayLegacy.d.ts +4 -0
  180. package/dist/components/loading/IdCaptureLoadingOverlayLegacy.d.ts.map +1 -0
  181. package/dist/components/loading/IdCaptureLoadingOverlayLegacy.js +69 -0
  182. package/dist/components/loading/IdCaptureLoadingOverlayRing.d.ts +3 -0
  183. package/dist/components/loading/IdCaptureLoadingOverlayRing.d.ts.map +1 -0
  184. package/dist/components/loading/IdCaptureLoadingOverlayRing.js +260 -0
  185. package/dist/components/loading/RingIntroScreen.d.ts +39 -0
  186. package/dist/components/loading/RingIntroScreen.d.ts.map +1 -0
  187. package/dist/components/loading/RingIntroScreen.js +216 -0
  188. package/dist/components/loading/RingProgress.d.ts +9 -0
  189. package/dist/components/loading/RingProgress.d.ts.map +1 -0
  190. package/dist/components/loading/RingProgress.js +24 -0
  191. package/dist/components/loading/RingStageTransition.d.ts +27 -0
  192. package/dist/components/loading/RingStageTransition.d.ts.map +1 -0
  193. package/dist/components/loading/RingStageTransition.js +145 -0
  194. package/dist/components/loading/customerSpinner.d.ts +58 -0
  195. package/dist/components/loading/customerSpinner.d.ts.map +1 -0
  196. package/dist/components/loading/customerSpinner.js +69 -0
  197. package/dist/components/loading/ringIntro.d.ts +15 -0
  198. package/dist/components/loading/ringIntro.d.ts.map +1 -0
  199. package/dist/components/loading/ringIntro.js +5 -0
  200. package/dist/components/loading/ringStatus.d.ts +8 -0
  201. package/dist/components/loading/ringStatus.d.ts.map +1 -0
  202. package/dist/components/loading/ringStatus.js +13 -0
  203. package/dist/components/loading/useAutoContinueWhenReady.d.ts +8 -0
  204. package/dist/components/loading/useAutoContinueWhenReady.d.ts.map +1 -0
  205. package/dist/components/loading/useAutoContinueWhenReady.js +25 -0
  206. package/dist/components/review/ReviewDiagnosticsPanel.d.ts +27 -0
  207. package/dist/components/review/ReviewDiagnosticsPanel.d.ts.map +1 -0
  208. package/dist/components/review/ReviewDiagnosticsPanel.js +475 -0
  209. package/dist/components/review/ReviewScreen.d.ts +34 -0
  210. package/dist/components/review/ReviewScreen.d.ts.map +1 -0
  211. package/dist/components/review/ReviewScreen.js +91 -0
  212. package/dist/components/ring/RingFailureScreen.d.ts +41 -0
  213. package/dist/components/ring/RingFailureScreen.d.ts.map +1 -0
  214. package/dist/components/ring/RingFailureScreen.js +384 -0
  215. package/dist/components/ring/RingFinishingScreen.d.ts +27 -0
  216. package/dist/components/ring/RingFinishingScreen.d.ts.map +1 -0
  217. package/dist/components/ring/RingFinishingScreen.js +184 -0
  218. package/dist/components/ring/RingSuccessScreen.d.ts +33 -0
  219. package/dist/components/ring/RingSuccessScreen.d.ts.map +1 -0
  220. package/dist/components/ring/RingSuccessScreen.js +185 -0
  221. package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts +17 -0
  222. package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts.map +1 -0
  223. package/dist/components/selfie/FaceCaptureGuideOverlay.js +39 -0
  224. package/dist/components/selfie/SelfieCameraFeed.d.ts +8 -0
  225. package/dist/components/selfie/SelfieCameraFeed.d.ts.map +1 -0
  226. package/dist/components/selfie/SelfieCameraFeed.js +16 -0
  227. package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts +15 -0
  228. package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts.map +1 -0
  229. package/dist/components/selfie/SelfieCaptureAnimatedMask.js +111 -0
  230. package/dist/components/selfie/SelfieCaptureLoadingGraphic.d.ts +4 -0
  231. package/dist/components/selfie/SelfieCaptureLoadingGraphic.d.ts.map +1 -0
  232. package/dist/components/selfie/SelfieCaptureLoadingGraphic.js +28 -0
  233. package/dist/components/selfie/SelfieCaptureSurface.d.ts +126 -0
  234. package/dist/components/selfie/SelfieCaptureSurface.d.ts.map +1 -0
  235. package/dist/components/selfie/SelfieCaptureSurface.js +248 -0
  236. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlay.d.ts +136 -0
  237. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlay.d.ts.map +1 -0
  238. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlay.js +13 -0
  239. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts +3 -0
  240. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -0
  241. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.js +181 -0
  242. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayLegacy.d.ts +3 -0
  243. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayLegacy.d.ts.map +1 -0
  244. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayLegacy.js +67 -0
  245. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayRing.d.ts +3 -0
  246. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayRing.d.ts.map +1 -0
  247. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayRing.js +265 -0
  248. package/dist/components/videoId/VideoIdCaptureGuides.d.ts +42 -0
  249. package/dist/components/videoId/VideoIdCaptureGuides.d.ts.map +1 -0
  250. package/dist/components/videoId/VideoIdCaptureGuides.js +173 -0
  251. package/dist/flows/AuthStateContext.d.ts +33 -0
  252. package/dist/flows/AuthStateContext.d.ts.map +1 -0
  253. package/dist/flows/AuthStateContext.js +47 -0
  254. package/dist/flows/CompositeWizard.d.ts +76 -0
  255. package/dist/flows/CompositeWizard.d.ts.map +1 -0
  256. package/dist/flows/CompositeWizard.js +200 -0
  257. package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts +28 -0
  258. package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts.map +1 -0
  259. package/dist/flows/CustomerBiometricsEnrollmentFlow.js +138 -0
  260. package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts +47 -0
  261. package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts.map +1 -0
  262. package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.js +231 -0
  263. package/dist/flows/CustomerIdentificationFlow.d.ts +4 -0
  264. package/dist/flows/CustomerIdentificationFlow.d.ts.map +1 -0
  265. package/dist/flows/CustomerIdentificationFlow.js +11 -0
  266. package/dist/flows/CustomerVerificationFlow.d.ts +9 -0
  267. package/dist/flows/CustomerVerificationFlow.d.ts.map +1 -0
  268. package/dist/flows/CustomerVerificationFlow.js +17 -0
  269. package/dist/flows/DocumentCaptureFlow.d.ts +23 -0
  270. package/dist/flows/DocumentCaptureFlow.d.ts.map +1 -0
  271. package/dist/flows/DocumentCaptureFlow.js +116 -0
  272. package/dist/flows/FaceValidationFlow.d.ts +12 -0
  273. package/dist/flows/FaceValidationFlow.d.ts.map +1 -0
  274. package/dist/flows/FaceValidationFlow.js +53 -0
  275. package/dist/flows/FlowChassis.d.ts +39 -0
  276. package/dist/flows/FlowChassis.d.ts.map +1 -0
  277. package/dist/flows/FlowChassis.js +69 -0
  278. package/dist/flows/IdAndFaceValidationFlow.d.ts +36 -0
  279. package/dist/flows/IdAndFaceValidationFlow.d.ts.map +1 -0
  280. package/dist/flows/IdAndFaceValidationFlow.js +168 -0
  281. package/dist/flows/IdValidationFlow.d.ts +29 -0
  282. package/dist/flows/IdValidationFlow.d.ts.map +1 -0
  283. package/dist/flows/IdValidationFlow.js +106 -0
  284. package/dist/flows/OrbStatusScreen.d.ts +14 -0
  285. package/dist/flows/OrbStatusScreen.d.ts.map +1 -0
  286. package/dist/flows/OrbStatusScreen.js +60 -0
  287. package/dist/flows/RemoteDiagnosticsMount.d.ts +6 -0
  288. package/dist/flows/RemoteDiagnosticsMount.d.ts.map +1 -0
  289. package/dist/flows/RemoteDiagnosticsMount.js +57 -0
  290. package/dist/flows/SignatureKYCFlow.d.ts +33 -0
  291. package/dist/flows/SignatureKYCFlow.d.ts.map +1 -0
  292. package/dist/flows/SignatureKYCFlow.js +228 -0
  293. package/dist/flows/SubmissionProvider.d.ts +40 -0
  294. package/dist/flows/SubmissionProvider.d.ts.map +1 -0
  295. package/dist/flows/SubmissionProvider.js +136 -0
  296. package/dist/flows/SubmissionSuccess.d.ts +48 -0
  297. package/dist/flows/SubmissionSuccess.d.ts.map +1 -0
  298. package/dist/flows/SubmissionSuccess.js +488 -0
  299. package/dist/flows/VideoIdValidationFlow.d.ts +61 -0
  300. package/dist/flows/VideoIdValidationFlow.d.ts.map +1 -0
  301. package/dist/flows/VideoIdValidationFlow.js +171 -0
  302. package/dist/flows/additionalDocuments.d.ts +5 -0
  303. package/dist/flows/additionalDocuments.d.ts.map +1 -0
  304. package/dist/flows/additionalDocuments.js +26 -0
  305. package/dist/flows/artifacts.d.ts +8 -0
  306. package/dist/flows/artifacts.d.ts.map +1 -0
  307. package/dist/flows/artifacts.js +80 -0
  308. package/dist/flows/customerMatch/CustomerMatchCapture.d.ts +53 -0
  309. package/dist/flows/customerMatch/CustomerMatchCapture.d.ts.map +1 -0
  310. package/dist/flows/customerMatch/CustomerMatchCapture.js +211 -0
  311. package/dist/flows/customerMatch/CustomerMatchFlow.d.ts +94 -0
  312. package/dist/flows/customerMatch/CustomerMatchFlow.d.ts.map +1 -0
  313. package/dist/flows/customerMatch/CustomerMatchFlow.js +209 -0
  314. package/dist/flows/customerMatch/adapters.d.ts +34 -0
  315. package/dist/flows/customerMatch/adapters.d.ts.map +1 -0
  316. package/dist/flows/customerMatch/adapters.js +63 -0
  317. package/dist/flows/customerMatch/identificationReducer.d.ts +34 -0
  318. package/dist/flows/customerMatch/identificationReducer.d.ts.map +1 -0
  319. package/dist/flows/customerMatch/identificationReducer.js +75 -0
  320. package/dist/flows/customerMatch/verificationReducer.d.ts +34 -0
  321. package/dist/flows/customerMatch/verificationReducer.d.ts.map +1 -0
  322. package/dist/flows/customerMatch/verificationReducer.js +77 -0
  323. package/dist/flows/documentCapture.d.ts +5 -0
  324. package/dist/flows/documentCapture.d.ts.map +1 -0
  325. package/dist/flows/documentCapture.js +8 -0
  326. package/dist/flows/jsonHighlight.d.ts +19 -0
  327. package/dist/flows/jsonHighlight.d.ts.map +1 -0
  328. package/dist/flows/jsonHighlight.js +90 -0
  329. package/dist/flows/overlays.d.ts +91 -0
  330. package/dist/flows/overlays.d.ts.map +1 -0
  331. package/dist/flows/overlays.js +150 -0
  332. package/dist/flows/ringIntroImplications.d.ts +30 -0
  333. package/dist/flows/ringIntroImplications.d.ts.map +1 -0
  334. package/dist/flows/ringIntroImplications.js +58 -0
  335. package/dist/flows/ringScreens.d.ts +27 -0
  336. package/dist/flows/ringScreens.d.ts.map +1 -0
  337. package/dist/flows/ringScreens.js +18 -0
  338. package/dist/flows/sequencer.d.ts +12 -0
  339. package/dist/flows/sequencer.d.ts.map +1 -0
  340. package/dist/flows/sequencer.js +18 -0
  341. package/dist/flows/sharedCamera.d.ts +23 -0
  342. package/dist/flows/sharedCamera.d.ts.map +1 -0
  343. package/dist/flows/sharedCamera.js +64 -0
  344. package/dist/flows/signatureStep.d.ts +25 -0
  345. package/dist/flows/signatureStep.d.ts.map +1 -0
  346. package/dist/flows/signatureStep.js +99 -0
  347. package/dist/flows/types.d.ts +106 -0
  348. package/dist/flows/types.d.ts.map +1 -0
  349. package/dist/flows/types.js +1 -0
  350. package/dist/flows/useGeolocation.d.ts +24 -0
  351. package/dist/flows/useGeolocation.d.ts.map +1 -0
  352. package/dist/flows/useGeolocation.js +82 -0
  353. package/dist/flows/useShowSuccessScreen.d.ts +3 -0
  354. package/dist/flows/useShowSuccessScreen.d.ts.map +1 -0
  355. package/dist/flows/useShowSuccessScreen.js +51 -0
  356. package/dist/flows/useTimeout.d.ts +7 -0
  357. package/dist/flows/useTimeout.d.ts.map +1 -0
  358. package/dist/flows/useTimeout.js +68 -0
  359. package/dist/flows/videoIdSteps.d.ts +33 -0
  360. package/dist/flows/videoIdSteps.d.ts.map +1 -0
  361. package/dist/flows/videoIdSteps.js +54 -0
  362. package/dist/guidance/selfieStrings.d.ts +18 -0
  363. package/dist/guidance/selfieStrings.d.ts.map +1 -0
  364. package/dist/guidance/selfieStrings.js +97 -0
  365. package/dist/guidance/strings.d.ts +4 -0
  366. package/dist/guidance/strings.d.ts.map +1 -0
  367. package/dist/guidance/strings.js +43 -0
  368. package/dist/guidance/videoIdStrings.d.ts +23 -0
  369. package/dist/guidance/videoIdStrings.d.ts.map +1 -0
  370. package/dist/guidance/videoIdStrings.js +23 -0
  371. package/dist/i18n/index.d.ts +1221 -0
  372. package/dist/i18n/index.d.ts.map +1 -0
  373. package/dist/i18n/index.js +92 -0
  374. package/dist/i18n/locales/de.d.ts +149 -0
  375. package/dist/i18n/locales/de.d.ts.map +1 -0
  376. package/dist/i18n/locales/de.js +147 -0
  377. package/dist/i18n/locales/en.d.ts +3 -0
  378. package/dist/i18n/locales/en.d.ts.map +1 -0
  379. package/dist/i18n/locales/en.js +1 -0
  380. package/dist/i18n/locales/es.d.ts +149 -0
  381. package/dist/i18n/locales/es.d.ts.map +1 -0
  382. package/dist/i18n/locales/es.js +147 -0
  383. package/dist/i18n/locales/fr.d.ts +149 -0
  384. package/dist/i18n/locales/fr.d.ts.map +1 -0
  385. package/dist/i18n/locales/fr.js +147 -0
  386. package/dist/i18n/locales/it.d.ts +149 -0
  387. package/dist/i18n/locales/it.d.ts.map +1 -0
  388. package/dist/i18n/locales/it.js +147 -0
  389. package/dist/i18n/locales/ja.d.ts +149 -0
  390. package/dist/i18n/locales/ja.d.ts.map +1 -0
  391. package/dist/i18n/locales/ja.js +147 -0
  392. package/dist/i18n/locales/pt.d.ts +149 -0
  393. package/dist/i18n/locales/pt.d.ts.map +1 -0
  394. package/dist/i18n/locales/pt.js +147 -0
  395. package/dist/i18n/locales/ru.d.ts +149 -0
  396. package/dist/i18n/locales/ru.d.ts.map +1 -0
  397. package/dist/i18n/locales/ru.js +147 -0
  398. package/dist/i18n/locales/zh.d.ts +149 -0
  399. package/dist/i18n/locales/zh.d.ts.map +1 -0
  400. package/dist/i18n/locales/zh.js +147 -0
  401. package/dist/i18n/render.d.ts +3 -0
  402. package/dist/i18n/render.d.ts.map +1 -0
  403. package/dist/i18n/render.js +7 -0
  404. package/dist/index.d.ts +157 -0
  405. package/dist/index.d.ts.map +1 -0
  406. package/dist/index.js +191 -0
  407. package/dist/layout/GuideLayoutContext.d.ts +24 -0
  408. package/dist/layout/GuideLayoutContext.d.ts.map +1 -0
  409. package/dist/layout/GuideLayoutContext.js +19 -0
  410. package/dist/layout/GuideOrientationContext.d.ts +16 -0
  411. package/dist/layout/GuideOrientationContext.d.ts.map +1 -0
  412. package/dist/layout/GuideOrientationContext.js +40 -0
  413. package/dist/layout/useResizeObserver.d.ts +11 -0
  414. package/dist/layout/useResizeObserver.d.ts.map +1 -0
  415. package/dist/layout/useResizeObserver.js +114 -0
  416. package/dist/testing/alignGlobals.d.ts +2 -0
  417. package/dist/testing/alignGlobals.d.ts.map +1 -0
  418. package/dist/testing/alignGlobals.js +25 -0
  419. package/dist/testing/buildDocumentState.d.ts +4 -0
  420. package/dist/testing/buildDocumentState.d.ts.map +1 -0
  421. package/dist/testing/buildDocumentState.js +19 -0
  422. package/dist/testing/buildSelfieState.d.ts +8 -0
  423. package/dist/testing/buildSelfieState.d.ts.map +1 -0
  424. package/dist/testing/buildSelfieState.js +84 -0
  425. package/dist/testing/buildSignatureState.d.ts +3 -0
  426. package/dist/testing/buildSignatureState.d.ts.map +1 -0
  427. package/dist/testing/buildSignatureState.js +12 -0
  428. package/dist/testing/buildState.d.ts +3 -0
  429. package/dist/testing/buildState.d.ts.map +1 -0
  430. package/dist/testing/buildState.js +34 -0
  431. package/dist/testing/buildVideoIdState.d.ts +3 -0
  432. package/dist/testing/buildVideoIdState.d.ts.map +1 -0
  433. package/dist/testing/buildVideoIdState.js +11 -0
  434. package/dist/testing/classNamesLeaves.d.ts +14 -0
  435. package/dist/testing/classNamesLeaves.d.ts.map +1 -0
  436. package/dist/testing/classNamesLeaves.js +144 -0
  437. package/dist/testing/fakeClient.d.ts +61 -0
  438. package/dist/testing/fakeClient.d.ts.map +1 -0
  439. package/dist/testing/fakeClient.js +142 -0
  440. package/dist/testing/fakeController.d.ts +18 -0
  441. package/dist/testing/fakeController.d.ts.map +1 -0
  442. package/dist/testing/fakeController.js +165 -0
  443. package/dist/testing/fakeDocumentController.d.ts +37 -0
  444. package/dist/testing/fakeDocumentController.d.ts.map +1 -0
  445. package/dist/testing/fakeDocumentController.js +104 -0
  446. package/dist/testing/fakeSelfieController.d.ts +15 -0
  447. package/dist/testing/fakeSelfieController.d.ts.map +1 -0
  448. package/dist/testing/fakeSelfieController.js +154 -0
  449. package/dist/testing/fakeSignatureController.d.ts +12 -0
  450. package/dist/testing/fakeSignatureController.d.ts.map +1 -0
  451. package/dist/testing/fakeSignatureController.js +58 -0
  452. package/dist/testing/fakeVideoIdController.d.ts +12 -0
  453. package/dist/testing/fakeVideoIdController.d.ts.map +1 -0
  454. package/dist/testing/fakeVideoIdController.js +50 -0
  455. package/dist/testing/index.d.ts +15 -0
  456. package/dist/testing/index.d.ts.map +1 -0
  457. package/dist/testing/index.js +18 -0
  458. package/dist/testing/stubSignatureCanvas.d.ts +2 -0
  459. package/dist/testing/stubSignatureCanvas.d.ts.map +1 -0
  460. package/dist/testing/stubSignatureCanvas.js +26 -0
  461. package/dist/testing/stubVideoCaptureDom.d.ts +2 -0
  462. package/dist/testing/stubVideoCaptureDom.d.ts.map +1 -0
  463. package/dist/testing/stubVideoCaptureDom.js +36 -0
  464. package/dist/theme/color.d.ts +14 -0
  465. package/dist/theme/color.d.ts.map +1 -0
  466. package/dist/theme/color.js +1 -0
  467. package/dist/theme/index.d.ts +405 -0
  468. package/dist/theme/index.d.ts.map +1 -0
  469. package/dist/theme/index.js +230 -0
  470. package/dist/utils/canvas.d.ts +3 -0
  471. package/dist/utils/canvas.d.ts.map +1 -0
  472. package/dist/utils/canvas.js +16 -0
  473. package/dist/utils/cdn.d.ts +2 -0
  474. package/dist/utils/cdn.d.ts.map +1 -0
  475. package/dist/utils/cdn.js +3 -0
  476. package/dist/utils/cropping.d.ts +4 -0
  477. package/dist/utils/cropping.d.ts.map +1 -0
  478. package/dist/utils/cropping.js +11 -0
  479. package/dist/utils/flowClock.d.ts +6 -0
  480. package/dist/utils/flowClock.d.ts.map +1 -0
  481. package/dist/utils/flowClock.js +22 -0
  482. package/dist/utils/isMobile.d.ts +3 -0
  483. package/dist/utils/isMobile.d.ts.map +1 -0
  484. package/dist/utils/isMobile.js +35 -0
  485. package/dist/utils/loadProgressHooks.d.ts +25 -0
  486. package/dist/utils/loadProgressHooks.d.ts.map +1 -0
  487. package/dist/utils/loadProgressHooks.js +79 -0
  488. package/dist/utils/logger.d.ts +18 -0
  489. package/dist/utils/logger.d.ts.map +1 -0
  490. package/dist/utils/logger.js +38 -0
  491. package/dist/utils/merge.d.ts +3 -0
  492. package/dist/utils/merge.d.ts.map +1 -0
  493. package/dist/utils/merge.js +23 -0
  494. package/dist/utils/signaturePadStrokeGuard.d.ts +16 -0
  495. package/dist/utils/signaturePadStrokeGuard.d.ts.map +1 -0
  496. package/dist/utils/signaturePadStrokeGuard.js +70 -0
  497. package/dist/version.d.ts +2 -0
  498. package/dist/version.d.ts.map +1 -0
  499. package/dist/version.js +3 -0
  500. package/package.json +71 -0
@@ -0,0 +1,168 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Task 7 (iteration-4 selfie/liveness engine plan-4): the phase-switched
3
+ // assembly for the plain selfie-capture flow — the selfie-side analog of
4
+ // IdCaptureView.tsx (Task 12). Mirrors that file's structure and
5
+ // conventions throughout (see its own header comment for the general
6
+ // approach); deltas from that template are called out below.
7
+ //
8
+ // Deltas from IdCaptureView (documented, not accidental):
9
+ // - No view-local "overlay dismissed" state. IdCaptureView's loading
10
+ // overlay stays up until BOTH ready AND a Continue click, tracked as
11
+ // local state because sdk2's wizard treats dismissal as separate from
12
+ // capture-phase entry. The selfie controller's own `start()` action IS
13
+ // the dismiss — it moves phase 'loading' -> 'capturing' (controller.ts's
14
+ // own doc comment: "This is ALSO sdk2's overlay-dismiss"). So the
15
+ // overlay's visibility is a pure function of `state.phase` with nothing
16
+ // extra to track: visible for 'initializing'/'loading', gone the moment
17
+ // `actions.start()` lands.
18
+ // - No guide-box status override / GuideLayoutContext. ID's guide tree has
19
+ // a measured guide-box rect the camera feed snaps to and a `disabled`
20
+ // status the view forces while its overlay is up; selfie's mask
21
+ // (FaceCaptureGuideOverlay) is a fixed full-bleed oval with no geometry
22
+ // to snap to and no separate "disabled" visual state — it simply isn't
23
+ // rendered outside the capture-surface phases (below).
24
+ // - No submit/review step. The selfie controller has no submit() action
25
+ // (see controller.ts's own note) — this view's terminal signal is
26
+ // `onCaptured`, fired once per new `state.capturedSelfie`, not a
27
+ // ReviewScreen + onSubmitted round trip.
28
+ // - Guidance-pill text supports customer overrides
29
+ // (`verbiage.guidance`, mirroring sdk2's `SelfieCaptureVerbiage` fields
30
+ // minus the manual-capture ones — this plan's flow has no manual
31
+ // capture button). ID's single held-code pill has no per-code override
32
+ // surface at all; selfie's does, so the resolution goes through
33
+ // `useVerbiage` (this package's single-key CustomerSuppliedVerbiage
34
+ // resolver — the same resolution helper `useTranslations` is built on,
35
+ // used everywhere else in this package that needs override-or-fallback
36
+ // text) instead of a bare `t(key)` call.
37
+ // - `ErrorScreen`'s retry routes by code (plan-3 ruling, baked into this
38
+ // task's brief): `CAMERA_UNAVAILABLE`/`CAMERA_PERMISSION_DENIED` calls
39
+ // `requestCamera()` (selfie's recovery path for camera-acquisition
40
+ // errors — `retry()` explicitly excludes these per controller.ts's own
41
+ // doc comment); every other code calls `retry()`. This holds in EVERY
42
+ // `loadingOverlayMode`, including 'ring': the ring overlay's own intro
43
+ // screen has its OWN local retry-from-intro path
44
+ // (`SelfieCaptureLoadingOverlayRing.tsx`'s `startFailed` state) for a
45
+ // denial that happens WHILE the overlay is still up, but a denial that
46
+ // lands in `state.error` always flips `phase` to 'error' (derivedPhase,
47
+ // controller.ts) — which swaps the overlay out for `ErrorScreen`
48
+ // regardless of mode, so ErrorScreen is the single, unconditional owner
49
+ // of denial recovery once that phase transition happens.
50
+ import { useEffect, useRef, } from 'react';
51
+ import { styled } from 'styled-components';
52
+ import { SelfieGuidanceCode, } from '@idmission/websdk-core/selfieCapture';
53
+ import { useSelfieCapture } from './bindings/useSelfieCapture';
54
+ import { useLanguage, useVerbiage, } from './i18n';
55
+ import { SelfieCaptureSurface, } from './components/selfie/SelfieCaptureSurface';
56
+ import { selfieGuidanceMessageKey, selfieGuidanceVariant, } from './guidance/selfieStrings';
57
+ import { useSessionReady } from './flows/AuthStateContext';
58
+ // `state.guidance.code` -> the SelfieGuidanceVerbiage field that overrides
59
+ // it. Keyed off the same `SelfieGuidanceCode` values selfieGuidanceMessageKey
60
+ // switches on (guidance/selfieStrings.ts) — NONE has no field (the pill is
61
+ // hidden for NONE, see `showCaptureSurface`/`guidanceKey` below). Exported
62
+ // (task-8): FaceLivenessView's plain-guidance ladder fallback branch reuses
63
+ // this exact map rather than duplicating it.
64
+ export const GUIDANCE_VERBIAGE_FIELD = {
65
+ [SelfieGuidanceCode.HOLD_STILL]: 'guidanceHoldStillText',
66
+ [SelfieGuidanceCode.LOOK_STRAIGHT]: 'guidanceLookStraightText',
67
+ [SelfieGuidanceCode.MOVE_BACK]: 'guidanceMoveBackText',
68
+ [SelfieGuidanceCode.MOVE_FORWARD]: 'guidanceMoveForwardText',
69
+ [SelfieGuidanceCode.MOVE_TO_CENTER]: 'guidanceMoveToCenterText',
70
+ [SelfieGuidanceCode.NO_FACE_DETECTED]: 'guidanceNoFaceDetectedText',
71
+ [SelfieGuidanceCode.VISIBILITY_TOO_LOW]: 'guidanceVisibilityTooLowText',
72
+ [SelfieGuidanceCode.NOT_STABLE]: 'guidanceNotStableText',
73
+ };
74
+ // Phases where the camera feed's mask + guidance pill render. Positive list
75
+ // (mirrors IdCaptureView's `GUIDE_PHASES` convention) rather than "not
76
+ // initializing/loading": explicitly excludes 'error' too, same as ID's guide
77
+ // tree (GUIDE_PHASES omits 'error') — ErrorScreen is the sole full-bleed
78
+ // surface once an error lands, the mask/pill underneath would be visual
79
+ // noise. The camera feed itself (`SelfieCameraFeed`) is NOT gated by this
80
+ // set — it mounts unconditionally from the very first render, same
81
+ // still-mounted-through-error rationale as IdCaptureView's ScalingCameraFeed
82
+ // (a successful retry()/requestCamera() re-attaches into the SAME element).
83
+ const CAPTURE_SURFACE_PHASES = new Set([
84
+ 'capturing',
85
+ 'challenge',
86
+ 'processing',
87
+ 'checking',
88
+ 'completed',
89
+ 'failed',
90
+ ]);
91
+ const Container = styled.div `
92
+ position: relative;
93
+ width: 100%;
94
+ height: 100%;
95
+ /* sdk2 applied theme.fontFamily at the flow-level SdkPage wrapper
96
+ (SdkPage.tsx:59: a font-family declaration reading props.theme.fontFamily,
97
+ conditional on it being set) -- SdkPage itself is flow-level and was
98
+ never ported to this package, so this view's own root carries it
99
+ instead. */
100
+ ${(props) => props.theme?.fontFamily ? `font-family: ${props.theme.fontFamily};` : ''}
101
+ `;
102
+ export function SelfieCaptureView({ controller, loadingOverlayMode = 'default', sessionReady: sessionReadyProp, lang = 'auto', autoContinueAfterLoading = false, showIntroScreen = false, transitionFromIdCapture = false, debugMode = false, showFaceLandmarks = false, debugShowSamplePoints, onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onLoadingOverlayDismissed, onCameraAccessDenied, onModelError, onCameraTamperingDetected, onExitAfterTamperSealPopped, onUserCancel, customOverlayContent, allowManualSelfieCaptureOnLoadingError = false, fallbackCapture = true, silentFallback = false, videoRef, renderCameraFeed = true, renderFaceGuide = true, onExit, onCaptured, verbiage = {}, classNames = {}, colors = {}, assets = {}, }) {
103
+ // Omitted means "follow the session": mounted inside a flow this view now
104
+ // renders during session validation, so its own loading overlay is the one
105
+ // loading surface (2.x behaviour — see useSessionReady). An explicit prop
106
+ // still wins, which is what Storybook and the headless demo pass.
107
+ const sessionFromContext = useSessionReady();
108
+ const sessionReady = sessionReadyProp ?? sessionFromContext;
109
+ useLanguage(lang);
110
+ const state = useSelfieCapture(controller);
111
+ const showCaptureSurface = CAPTURE_SURFACE_PHASES.has(state.phase);
112
+ // BINDING ruling (task-7 brief): keyed off the LIVE prediction, not
113
+ // `guidance.satisfied` — the held HOLD_STILL code is rarely reachable in
114
+ // the auto flow (the capture fires before the stabilizer's min-hold
115
+ // elapses in most real frame sequences), so gating the mask on it would
116
+ // leave it stuck on 'ready' through most of a real capture.
117
+ //
118
+ // Phase 'processing' also counts. A landed capture parks the controller
119
+ // there while its consumer does something async with the selfie (the
120
+ // customer identification/verification flows run a /live-check and then the
121
+ // matching submission), and the reducer both clears the prediction on
122
+ // capture and ignores `frameAnalyzed` outside 'capturing'/'challenge' — so
123
+ // the faceReady derivation alone leaves the oval sitting idle for the whole
124
+ // request, making a working flow look frozen. FaceLivenessView has always
125
+ // had this via its own CAPTURED/IN_PROGRESS mapping; the plain view needs
126
+ // the phase instead, having no liveness machine to read.
127
+ const maskStatus = state.phase === 'processing' || state.prediction?.faceReady
128
+ ? 'processing'
129
+ : 'ready';
130
+ const guidanceKey = selfieGuidanceMessageKey(state.guidance.code);
131
+ const guidanceOverride = state.guidance.code === SelfieGuidanceCode.NONE
132
+ ? undefined
133
+ : verbiage.guidance?.[GUIDANCE_VERBIAGE_FIELD[state.guidance.code]];
134
+ // useVerbiage (not useTranslations): a single code drives one message at a
135
+ // time, same "held event -> one resolved string" shape as IdCaptureView's
136
+ // pill, just resolved through the CustomerSuppliedVerbiage-aware helper
137
+ // instead of a bare `t()` call since this pill (unlike ID's) accepts
138
+ // per-code overrides.
139
+ const guidanceText = useVerbiage(guidanceOverride, guidanceKey);
140
+ const manualCaptureText = useVerbiage(verbiage.guidance?.guidanceManualCaptureText, 'Position your face in the circle and click to capture.');
141
+ const manualCaptureButtonText = useVerbiage(verbiage.guidance?.manualCaptureBtnText, 'Capture');
142
+ const showGuidancePill = showCaptureSurface && guidanceKey !== '';
143
+ const guidanceVariant = selfieGuidanceVariant({
144
+ satisfied: Boolean(state.prediction?.faceReady),
145
+ negative: false,
146
+ });
147
+ // Fires onCaptured once per new capturedSelfie, identified by `capturedAt`
148
+ // (a fresh Date instance every real capture — reference equality on the
149
+ // object itself would also work here since controller.ts/the fake both
150
+ // publish a brand-new snapshot per setState, but comparing the timestamp
151
+ // is the more direct expression of "a NEW capture landed" and survives a
152
+ // hypothetical future snapshot-memoization change that reuses the outer
153
+ // object).
154
+ const lastCapturedAtRef = useRef(null);
155
+ useEffect(() => {
156
+ const captured = state.capturedSelfie;
157
+ if (!captured) {
158
+ lastCapturedAtRef.current = null;
159
+ return;
160
+ }
161
+ const capturedAtMs = captured.capturedAt.getTime();
162
+ if (lastCapturedAtRef.current === capturedAtMs)
163
+ return;
164
+ lastCapturedAtRef.current = capturedAtMs;
165
+ onCaptured?.(captured.dataUrl);
166
+ }, [state.capturedSelfie, onCaptured]);
167
+ return (_jsx(Container, { className: classNames.container, children: _jsx(SelfieCaptureSurface, { controller: controller, state: state, loadingOverlayMode: loadingOverlayMode, sessionReady: sessionReady, autoContinueAfterLoading: autoContinueAfterLoading, showIntroScreen: showIntroScreen, transitionFromIdCapture: transitionFromIdCapture, onExit: onExit, onLoadingStarted: onLoadingStarted, onLoadingProgress: onLoadingProgress, onLoadingCompleted: onLoadingCompleted, onLoadingFailed: onLoadingFailed, onLoadingOverlayDismissed: onLoadingOverlayDismissed, onCameraAccessDenied: onCameraAccessDenied, onModelError: onModelError, onCameraTamperingDetected: onCameraTamperingDetected, onExitAfterTamperSealPopped: onExitAfterTamperSealPopped, onUserCancel: onUserCancel, customOverlayContent: customOverlayContent, allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError, fallbackCapture: fallbackCapture, silentFallback: silentFallback, manualCaptureText: manualCaptureText, manualCaptureButtonText: manualCaptureButtonText, videoRef: videoRef, renderCameraFeed: renderCameraFeed, renderFaceGuide: renderFaceGuide, showCaptureSurface: showCaptureSurface, maskStatus: maskStatus, showGuidancePill: showGuidancePill, guidanceText: guidanceText, guidanceVariant: guidanceVariant, debugMode: debugMode, showFaceLandmarks: showFaceLandmarks, debugShowSamplePoints: debugShowSamplePoints, verbiage: verbiage, classNames: classNames, colors: colors, assets: assets }) }));
168
+ }
@@ -0,0 +1,136 @@
1
+ import { type ComponentType, type RefObject } from "react";
2
+ import { type SignatureCaptureController } from "@idmission/websdk-core/signatureCapture";
3
+ import { type FaceGuideStatus } from "./components/selfie/FaceCaptureGuideOverlay";
4
+ import { type CustomerSuppliedVerbiage, type LangOption } from "./i18n";
5
+ import { type SkipSuccessScreen } from "./flows/useShowSuccessScreen";
6
+ import { type FlowOverlayClassNames, type FlowOverlayVerbiage } from "./flows/overlays";
7
+ export type SignatureCaptureViewVerbiage = {
8
+ headingText?: CustomerSuppliedVerbiage;
9
+ signHereText?: CustomerSuppliedVerbiage;
10
+ keepSigningText?: CustomerSuppliedVerbiage;
11
+ readyText?: CustomerSuppliedVerbiage;
12
+ processingText?: CustomerSuppliedVerbiage;
13
+ acceptBtnText?: CustomerSuppliedVerbiage;
14
+ clearBtnText?: CustomerSuppliedVerbiage;
15
+ retryBtnText?: CustomerSuppliedVerbiage;
16
+ doneBtnText?: CustomerSuppliedVerbiage;
17
+ successHeadingText?: CustomerSuppliedVerbiage;
18
+ capturedSignatureAltText?: CustomerSuppliedVerbiage;
19
+ errorHeadingText?: CustomerSuppliedVerbiage;
20
+ /** The screen shown when the recording died mid-signature. Deliberately does
21
+ * not name a phone call: a call, an app switch and a dropped track are
22
+ * indistinguishable here, and guessing wrong reads as broken. */
23
+ recordingInterruptedHeadingText?: CustomerSuppliedVerbiage;
24
+ recordingInterruptedText?: CustomerSuppliedVerbiage;
25
+ /** Sets the expectation that a fresh face capture comes before signing.
26
+ * Rendered only when a flow supplied `onRestartRequested`, since that is
27
+ * what makes the promise true. */
28
+ recordingInterruptedHintText?: CustomerSuppliedVerbiage;
29
+ startOverBtnText?: CustomerSuppliedVerbiage;
30
+ /** The microphone-denied screen, reachable with `captureAudio`. */
31
+ microphoneAccessDenied?: FlowOverlayVerbiage;
32
+ signaturePadEmptyText?: CustomerSuppliedVerbiage;
33
+ headTrackingUnsatisfiedText?: CustomerSuppliedVerbiage;
34
+ };
35
+ export type SignatureCaptureViewClassNames = {
36
+ container?: string;
37
+ cameraFeed?: string;
38
+ exitBtn?: string;
39
+ heading?: string;
40
+ guidance?: string;
41
+ guidesContainer?: string;
42
+ guidesInner?: string;
43
+ faceGuideContainer?: string;
44
+ faceGuide?: string;
45
+ signaturePadContainer?: string;
46
+ signatureCanvasContainer?: string;
47
+ signatureCanvasContainerDisabled?: string;
48
+ signaturePanel?: string;
49
+ canvas?: string;
50
+ buttonsRow?: string;
51
+ clearBtn?: string;
52
+ acceptBtn?: string;
53
+ review?: string;
54
+ successHeading?: string;
55
+ /** The captured signature on the review screen — a video, or a still. */
56
+ reviewMedia?: string;
57
+ retryBtn?: string;
58
+ doneBtn?: string;
59
+ error?: string;
60
+ recordingInterruptedIcon?: string;
61
+ recordingInterruptedHeading?: string;
62
+ recordingInterruptedText?: string;
63
+ recordingInterruptedHint?: string;
64
+ startOverBtn?: string;
65
+ microphoneAccessDenied?: FlowOverlayClassNames;
66
+ emptyContentContainer?: string;
67
+ emptyContentInner?: string;
68
+ headTrackingUnsatisfiedContentContainer?: string;
69
+ headTrackingUnsatisfiedContentInner?: string;
70
+ };
71
+ /**
72
+ * Props handed to a customer-supplied interrupted-recording screen.
73
+ *
74
+ * The SDK keeps the container, the stacking, and the decision about WHEN this
75
+ * shows — a replacement supplies only what goes inside it. `onStartOver` is
76
+ * the SDK's own restart, not a hook to reimplement: it wipes the ink the
77
+ * recording never captured and, where the flow owns a face stage, sends the
78
+ * user back for a selfie taken AFTER the interruption. Wiring a button to
79
+ * anything else would quietly reintroduce the pre-gap selfie this screen
80
+ * exists to prevent.
81
+ */
82
+ export type RecordingInterruptedScreenProps = {
83
+ onStartOver: () => void;
84
+ /** Whether the restart goes back through the face stage for a fresh selfie,
85
+ * so a replacement can make (or omit) the same promise the default does. */
86
+ willCaptureSelfie: boolean;
87
+ };
88
+ export type SignatureCaptureViewAssets = {
89
+ successIcon?: string;
90
+ };
91
+ export type SignatureCaptureViewProps = {
92
+ controller: SignatureCaptureController;
93
+ sessionReady?: boolean;
94
+ lang?: LangOption;
95
+ autoStart?: boolean;
96
+ /** Skips the signature review and completes automatically. Defaults to false. */
97
+ skipSuccessScreen?: SkipSuccessScreen;
98
+ onExit?: () => void;
99
+ onCompleted?: (artifacts: ReturnType<SignatureCaptureController["collectArtifacts"]>) => void;
100
+ verbiage?: SignatureCaptureViewVerbiage;
101
+ classNames?: SignatureCaptureViewClassNames;
102
+ assets?: SignatureCaptureViewAssets;
103
+ /** Reuses a video element across consecutive capture stages. */
104
+ videoRef?: RefObject<HTMLVideoElement | null>;
105
+ /** Notifies a coordinating flow whenever the rendered video node changes. */
106
+ onVideoElementChange?: (video: HTMLVideoElement | null) => void;
107
+ /** Keeps the shared camera feed visible while a preceding stage is active. */
108
+ forceCameraFeed?: boolean;
109
+ /** Whether the live face is inside the legacy signature-stage boundary. */
110
+ headTrackingSatisfied?: boolean;
111
+ /** Shows the face guide first, then reveals the signature pad. */
112
+ showFaceGuideThenSignaturePad?: boolean;
113
+ /** Uses the sdk2 video-signature guide geometry and theme contract. */
114
+ legacyVideoLayout?: boolean;
115
+ /** Live status for the sdk2-compatible face guide. */
116
+ faceGuideStatus?: FaceGuideStatus;
117
+ /**
118
+ * Restarts the whole attempt rather than just the signature, for the
119
+ * interrupted-recording screen. Supplied by a flow that owns a face stage:
120
+ * an interruption is an unsupervised gap, so the selfie that binds a person
121
+ * to the signature has to be captured after it, not before. Absent — a
122
+ * standalone view, or a host-supplied precaptured selfie — restarts the
123
+ * signature in place instead.
124
+ */
125
+ onRestartRequested?: () => void;
126
+ /**
127
+ * Replaces the CONTENTS of the interrupted-recording screen, for hosts with
128
+ * their own approved design. The SDK still owns the container and when the
129
+ * screen appears; `classNames.error` and the theme restyle the container
130
+ * itself. Text-only changes do not need this — every string on the default
131
+ * screen already accepts a component through `verbiage`.
132
+ */
133
+ recordingInterruptedComponent?: ComponentType<RecordingInterruptedScreenProps>;
134
+ };
135
+ export declare function SignatureCaptureView({ controller, sessionReady, lang, autoStart, skipSuccessScreen, onExit, onCompleted, verbiage, classNames, assets, videoRef: providedVideoRef, onVideoElementChange, forceCameraFeed, headTrackingSatisfied, showFaceGuideThenSignaturePad, legacyVideoLayout, faceGuideStatus, onRestartRequested, recordingInterruptedComponent: RecordingInterruptedScreen, }: SignatureCaptureViewProps): import("react/jsx-runtime").JSX.Element;
136
+ //# sourceMappingURL=SignatureCaptureView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignatureCaptureView.d.ts","sourceRoot":"","sources":["../src/SignatureCaptureView.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,0BAA0B,EAGhC,MAAM,yCAAyC,CAAC;AAMjD,OAAO,EAEL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