@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.
- package/README.md +189 -0
- package/dist/DocumentCaptureView.d.ts +111 -0
- package/dist/DocumentCaptureView.d.ts.map +1 -0
- package/dist/DocumentCaptureView.js +225 -0
- package/dist/FaceLivenessView.d.ts +88 -0
- package/dist/FaceLivenessView.d.ts.map +1 -0
- package/dist/FaceLivenessView.js +298 -0
- package/dist/IdCaptureView.d.ts +271 -0
- package/dist/IdCaptureView.d.ts.map +1 -0
- package/dist/IdCaptureView.js +454 -0
- package/dist/SelfieCaptureView.d.ts +119 -0
- package/dist/SelfieCaptureView.d.ts.map +1 -0
- package/dist/SelfieCaptureView.js +168 -0
- package/dist/SignatureCaptureView.d.ts +136 -0
- package/dist/SignatureCaptureView.d.ts.map +1 -0
- package/dist/SignatureCaptureView.js +521 -0
- package/dist/VideoIdCaptureView.d.ts +104 -0
- package/dist/VideoIdCaptureView.d.ts.map +1 -0
- package/dist/VideoIdCaptureView.js +253 -0
- package/dist/bindings/useDocumentCapture.d.ts +3 -0
- package/dist/bindings/useDocumentCapture.d.ts.map +1 -0
- package/dist/bindings/useDocumentCapture.js +6 -0
- package/dist/bindings/useIdCapture.d.ts +5 -0
- package/dist/bindings/useIdCapture.d.ts.map +1 -0
- package/dist/bindings/useIdCapture.js +53 -0
- package/dist/bindings/useSelfieCapture.d.ts +5 -0
- package/dist/bindings/useSelfieCapture.d.ts.map +1 -0
- package/dist/bindings/useSelfieCapture.js +53 -0
- package/dist/bindings/useSignatureCapture.d.ts +3 -0
- package/dist/bindings/useSignatureCapture.d.ts.map +1 -0
- package/dist/bindings/useSignatureCapture.js +6 -0
- package/dist/bindings/useVideoIdCapture.d.ts +3 -0
- package/dist/bindings/useVideoIdCapture.d.ts.map +1 -0
- package/dist/bindings/useVideoIdCapture.js +6 -0
- package/dist/components/CameraFeed.d.ts +36 -0
- package/dist/components/CameraFeed.d.ts.map +1 -0
- package/dist/components/CameraFeed.js +74 -0
- package/dist/components/ExitCaptureButton.d.ts +6 -0
- package/dist/components/ExitCaptureButton.d.ts.map +1 -0
- package/dist/components/ExitCaptureButton.js +32 -0
- package/dist/components/GuidanceMessage.d.ts +25 -0
- package/dist/components/GuidanceMessage.d.ts.map +1 -0
- package/dist/components/GuidanceMessage.js +39 -0
- package/dist/components/OverrideWrongDocumentTypeDialog.d.ts +20 -0
- package/dist/components/OverrideWrongDocumentTypeDialog.d.ts.map +1 -0
- package/dist/components/OverrideWrongDocumentTypeDialog.js +55 -0
- package/dist/components/additional_documents/AdditionalDocumentCapture.d.ts +41 -0
- package/dist/components/additional_documents/AdditionalDocumentCapture.d.ts.map +1 -0
- package/dist/components/additional_documents/AdditionalDocumentCapture.js +118 -0
- package/dist/components/additional_documents/AdditionalDocumentCaptureWizard.d.ts +18 -0
- package/dist/components/additional_documents/AdditionalDocumentCaptureWizard.d.ts.map +1 -0
- package/dist/components/additional_documents/AdditionalDocumentCaptureWizard.js +93 -0
- package/dist/components/additional_documents/sequence.d.ts +10 -0
- package/dist/components/additional_documents/sequence.d.ts.map +1 -0
- package/dist/components/additional_documents/sequence.js +11 -0
- package/dist/components/additional_documents/types.d.ts +15 -0
- package/dist/components/additional_documents/types.d.ts.map +1 -0
- package/dist/components/additional_documents/types.js +1 -0
- package/dist/components/barcode/BarcodeGuideOverlay.d.ts +23 -0
- package/dist/components/barcode/BarcodeGuideOverlay.d.ts.map +1 -0
- package/dist/components/barcode/BarcodeGuideOverlay.js +157 -0
- package/dist/components/barcode/BarcodeSuccessOverlay.d.ts +7 -0
- package/dist/components/barcode/BarcodeSuccessOverlay.d.ts.map +1 -0
- package/dist/components/barcode/BarcodeSuccessOverlay.js +58 -0
- package/dist/components/common/ButtonsRow.d.ts +2 -0
- package/dist/components/common/ButtonsRow.d.ts.map +1 -0
- package/dist/components/common/ButtonsRow.js +7 -0
- package/dist/components/common/CapturedDocumentImg.d.ts +7 -0
- package/dist/components/common/CapturedDocumentImg.d.ts.map +1 -0
- package/dist/components/common/CapturedDocumentImg.js +31 -0
- package/dist/components/common/Card.d.ts +9 -0
- package/dist/components/common/Card.d.ts.map +1 -0
- package/dist/components/common/Card.js +16 -0
- package/dist/components/common/LoaderButton.d.ts +31 -0
- package/dist/components/common/LoaderButton.d.ts.map +1 -0
- package/dist/components/common/LoaderButton.js +444 -0
- package/dist/components/common/LoadingListItemIndicator.d.ts +5 -0
- package/dist/components/common/LoadingListItemIndicator.d.ts.map +1 -0
- package/dist/components/common/LoadingListItemIndicator.js +8 -0
- package/dist/components/common/animation.d.ts +5 -0
- package/dist/components/common/animation.d.ts.map +1 -0
- package/dist/components/common/animation.js +35 -0
- package/dist/components/common/downloadingLabel.d.ts +10 -0
- package/dist/components/common/downloadingLabel.d.ts.map +1 -0
- package/dist/components/common/downloadingLabel.js +15 -0
- package/dist/components/common/overlay.d.ts +142 -0
- package/dist/components/common/overlay.d.ts.map +1 -0
- package/dist/components/common/overlay.js +183 -0
- package/dist/components/customer_match/CustomerMatchFailure.d.ts +37 -0
- package/dist/components/customer_match/CustomerMatchFailure.d.ts.map +1 -0
- package/dist/components/customer_match/CustomerMatchFailure.js +38 -0
- package/dist/components/customer_match/CustomerMatchSuccess.d.ts +35 -0
- package/dist/components/customer_match/CustomerMatchSuccess.d.ts.map +1 -0
- package/dist/components/customer_match/CustomerMatchSuccess.js +44 -0
- package/dist/components/debug/debug.d.ts +91 -0
- package/dist/components/debug/debug.d.ts.map +1 -0
- package/dist/components/debug/debug.js +270 -0
- package/dist/components/document/DocumentCaptureGuideOverlay.d.ts +15 -0
- package/dist/components/document/DocumentCaptureGuideOverlay.d.ts.map +1 -0
- package/dist/components/document/DocumentCaptureGuideOverlay.js +148 -0
- package/dist/components/document/guideRect.d.ts +11 -0
- package/dist/components/document/guideRect.d.ts.map +1 -0
- package/dist/components/document/guideRect.js +25 -0
- package/dist/components/document/types.d.ts +25 -0
- package/dist/components/document/types.d.ts.map +1 -0
- package/dist/components/document/types.js +1 -0
- package/dist/components/error/CameraAccessDeniedOverlay.d.ts +31 -0
- package/dist/components/error/CameraAccessDeniedOverlay.d.ts.map +1 -0
- package/dist/components/error/CameraAccessDeniedOverlay.js +45 -0
- package/dist/components/error/ErrorScreen.d.ts +60 -0
- package/dist/components/error/ErrorScreen.d.ts.map +1 -0
- package/dist/components/error/ErrorScreen.js +150 -0
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts +35 -0
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts.map +1 -0
- package/dist/components/face_liveness/FaceLivenessFailure.js +30 -0
- package/dist/components/face_liveness/FaceLivenessSuccess.d.ts +31 -0
- package/dist/components/face_liveness/FaceLivenessSuccess.d.ts.map +1 -0
- package/dist/components/face_liveness/FaceLivenessSuccess.js +56 -0
- package/dist/components/fallback/IdCaptureFallback.d.ts +58 -0
- package/dist/components/fallback/IdCaptureFallback.d.ts.map +1 -0
- package/dist/components/fallback/IdCaptureFallback.js +128 -0
- package/dist/components/fallback/IdCaptureOrUploadScreen.d.ts +75 -0
- package/dist/components/fallback/IdCaptureOrUploadScreen.d.ts.map +1 -0
- package/dist/components/fallback/IdCaptureOrUploadScreen.js +205 -0
- package/dist/components/fallback/SelfieCaptureFallback.d.ts +54 -0
- package/dist/components/fallback/SelfieCaptureFallback.d.ts.map +1 -0
- package/dist/components/fallback/SelfieCaptureFallback.js +106 -0
- package/dist/components/fallback/fallbackInstructionStep.d.ts +5 -0
- package/dist/components/fallback/fallbackInstructionStep.d.ts.map +1 -0
- package/dist/components/fallback/fallbackInstructionStep.js +18 -0
- package/dist/components/fallback/readFile.d.ts +2 -0
- package/dist/components/fallback/readFile.d.ts.map +1 -0
- package/dist/components/fallback/readFile.js +14 -0
- package/dist/components/guide_images/backToFront.d.ts +3 -0
- package/dist/components/guide_images/backToFront.d.ts.map +1 -0
- package/dist/components/guide_images/backToFront.js +17 -0
- package/dist/components/guide_images/byUrl.d.ts +3 -0
- package/dist/components/guide_images/byUrl.d.ts.map +1 -0
- package/dist/components/guide_images/byUrl.js +6 -0
- package/dist/components/guide_images/defaults.d.ts +37 -0
- package/dist/components/guide_images/defaults.d.ts.map +1 -0
- package/dist/components/guide_images/defaults.js +37 -0
- package/dist/components/guide_images/index.d.ts +7 -0
- package/dist/components/guide_images/index.d.ts.map +1 -0
- package/dist/components/guide_images/index.js +5 -0
- package/dist/components/guide_images/orientation.d.ts +2 -0
- package/dist/components/guide_images/orientation.d.ts.map +1 -0
- package/dist/components/guide_images/orientation.js +5 -0
- package/dist/components/guide_images/types.d.ts +15 -0
- package/dist/components/guide_images/types.d.ts.map +1 -0
- package/dist/components/guide_images/types.js +1 -0
- package/dist/components/guide_images/useGuideImages.d.ts +3 -0
- package/dist/components/guide_images/useGuideImages.d.ts.map +1 -0
- package/dist/components/guide_images/useGuideImages.js +19 -0
- package/dist/components/guides/FlipIdPrompt.d.ts +28 -0
- package/dist/components/guides/FlipIdPrompt.d.ts.map +1 -0
- package/dist/components/guides/FlipIdPrompt.js +54 -0
- package/dist/components/guides/IdCaptureFitGuide.d.ts +51 -0
- package/dist/components/guides/IdCaptureFitGuide.d.ts.map +1 -0
- package/dist/components/guides/IdCaptureFitGuide.js +199 -0
- package/dist/components/guides/IdCaptureGuideOverlay.d.ts +100 -0
- package/dist/components/guides/IdCaptureGuideOverlay.d.ts.map +1 -0
- package/dist/components/guides/IdCaptureGuideOverlay.js +137 -0
- package/dist/components/guides/IdCaptureGuides.d.ts +47 -0
- package/dist/components/guides/IdCaptureGuides.d.ts.map +1 -0
- package/dist/components/guides/IdCaptureGuides.js +136 -0
- package/dist/components/guides/IdCaptureGuidesCommon.d.ts +136 -0
- package/dist/components/guides/IdCaptureGuidesCommon.d.ts.map +1 -0
- package/dist/components/guides/IdCaptureGuidesCommon.js +123 -0
- package/dist/components/loading/IdCaptureLoadingGraphic.d.ts +9 -0
- package/dist/components/loading/IdCaptureLoadingGraphic.d.ts.map +1 -0
- package/dist/components/loading/IdCaptureLoadingGraphic.js +76 -0
- package/dist/components/loading/IdCaptureLoadingOverlay.d.ts +134 -0
- package/dist/components/loading/IdCaptureLoadingOverlay.d.ts.map +1 -0
- package/dist/components/loading/IdCaptureLoadingOverlay.js +13 -0
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts +3 -0
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts.map +1 -0
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.js +196 -0
- package/dist/components/loading/IdCaptureLoadingOverlayLegacy.d.ts +4 -0
- package/dist/components/loading/IdCaptureLoadingOverlayLegacy.d.ts.map +1 -0
- package/dist/components/loading/IdCaptureLoadingOverlayLegacy.js +69 -0
- package/dist/components/loading/IdCaptureLoadingOverlayRing.d.ts +3 -0
- package/dist/components/loading/IdCaptureLoadingOverlayRing.d.ts.map +1 -0
- package/dist/components/loading/IdCaptureLoadingOverlayRing.js +260 -0
- package/dist/components/loading/RingIntroScreen.d.ts +39 -0
- package/dist/components/loading/RingIntroScreen.d.ts.map +1 -0
- package/dist/components/loading/RingIntroScreen.js +216 -0
- package/dist/components/loading/RingProgress.d.ts +9 -0
- package/dist/components/loading/RingProgress.d.ts.map +1 -0
- package/dist/components/loading/RingProgress.js +24 -0
- package/dist/components/loading/RingStageTransition.d.ts +27 -0
- package/dist/components/loading/RingStageTransition.d.ts.map +1 -0
- package/dist/components/loading/RingStageTransition.js +145 -0
- package/dist/components/loading/customerSpinner.d.ts +58 -0
- package/dist/components/loading/customerSpinner.d.ts.map +1 -0
- package/dist/components/loading/customerSpinner.js +69 -0
- package/dist/components/loading/ringIntro.d.ts +15 -0
- package/dist/components/loading/ringIntro.d.ts.map +1 -0
- package/dist/components/loading/ringIntro.js +5 -0
- package/dist/components/loading/ringStatus.d.ts +8 -0
- package/dist/components/loading/ringStatus.d.ts.map +1 -0
- package/dist/components/loading/ringStatus.js +13 -0
- package/dist/components/loading/useAutoContinueWhenReady.d.ts +8 -0
- package/dist/components/loading/useAutoContinueWhenReady.d.ts.map +1 -0
- package/dist/components/loading/useAutoContinueWhenReady.js +25 -0
- package/dist/components/review/ReviewDiagnosticsPanel.d.ts +27 -0
- package/dist/components/review/ReviewDiagnosticsPanel.d.ts.map +1 -0
- package/dist/components/review/ReviewDiagnosticsPanel.js +475 -0
- package/dist/components/review/ReviewScreen.d.ts +34 -0
- package/dist/components/review/ReviewScreen.d.ts.map +1 -0
- package/dist/components/review/ReviewScreen.js +91 -0
- package/dist/components/ring/RingFailureScreen.d.ts +41 -0
- package/dist/components/ring/RingFailureScreen.d.ts.map +1 -0
- package/dist/components/ring/RingFailureScreen.js +384 -0
- package/dist/components/ring/RingFinishingScreen.d.ts +27 -0
- package/dist/components/ring/RingFinishingScreen.d.ts.map +1 -0
- package/dist/components/ring/RingFinishingScreen.js +184 -0
- package/dist/components/ring/RingSuccessScreen.d.ts +33 -0
- package/dist/components/ring/RingSuccessScreen.d.ts.map +1 -0
- package/dist/components/ring/RingSuccessScreen.js +185 -0
- package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts +17 -0
- package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts.map +1 -0
- package/dist/components/selfie/FaceCaptureGuideOverlay.js +39 -0
- package/dist/components/selfie/SelfieCameraFeed.d.ts +8 -0
- package/dist/components/selfie/SelfieCameraFeed.d.ts.map +1 -0
- package/dist/components/selfie/SelfieCameraFeed.js +16 -0
- package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts +15 -0
- package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts.map +1 -0
- package/dist/components/selfie/SelfieCaptureAnimatedMask.js +111 -0
- package/dist/components/selfie/SelfieCaptureLoadingGraphic.d.ts +4 -0
- package/dist/components/selfie/SelfieCaptureLoadingGraphic.d.ts.map +1 -0
- package/dist/components/selfie/SelfieCaptureLoadingGraphic.js +28 -0
- package/dist/components/selfie/SelfieCaptureSurface.d.ts +126 -0
- package/dist/components/selfie/SelfieCaptureSurface.d.ts.map +1 -0
- package/dist/components/selfie/SelfieCaptureSurface.js +248 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlay.d.ts +136 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlay.d.ts.map +1 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlay.js +13 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts +3 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.js +181 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayLegacy.d.ts +3 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayLegacy.d.ts.map +1 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayLegacy.js +67 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayRing.d.ts +3 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayRing.d.ts.map +1 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayRing.js +265 -0
- package/dist/components/videoId/VideoIdCaptureGuides.d.ts +42 -0
- package/dist/components/videoId/VideoIdCaptureGuides.d.ts.map +1 -0
- package/dist/components/videoId/VideoIdCaptureGuides.js +173 -0
- package/dist/flows/AuthStateContext.d.ts +33 -0
- package/dist/flows/AuthStateContext.d.ts.map +1 -0
- package/dist/flows/AuthStateContext.js +47 -0
- package/dist/flows/CompositeWizard.d.ts +76 -0
- package/dist/flows/CompositeWizard.d.ts.map +1 -0
- package/dist/flows/CompositeWizard.js +200 -0
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts +28 -0
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts.map +1 -0
- package/dist/flows/CustomerBiometricsEnrollmentFlow.js +138 -0
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts +47 -0
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts.map +1 -0
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.js +231 -0
- package/dist/flows/CustomerIdentificationFlow.d.ts +4 -0
- package/dist/flows/CustomerIdentificationFlow.d.ts.map +1 -0
- package/dist/flows/CustomerIdentificationFlow.js +11 -0
- package/dist/flows/CustomerVerificationFlow.d.ts +9 -0
- package/dist/flows/CustomerVerificationFlow.d.ts.map +1 -0
- package/dist/flows/CustomerVerificationFlow.js +17 -0
- package/dist/flows/DocumentCaptureFlow.d.ts +23 -0
- package/dist/flows/DocumentCaptureFlow.d.ts.map +1 -0
- package/dist/flows/DocumentCaptureFlow.js +116 -0
- package/dist/flows/FaceValidationFlow.d.ts +12 -0
- package/dist/flows/FaceValidationFlow.d.ts.map +1 -0
- package/dist/flows/FaceValidationFlow.js +53 -0
- package/dist/flows/FlowChassis.d.ts +39 -0
- package/dist/flows/FlowChassis.d.ts.map +1 -0
- package/dist/flows/FlowChassis.js +69 -0
- package/dist/flows/IdAndFaceValidationFlow.d.ts +36 -0
- package/dist/flows/IdAndFaceValidationFlow.d.ts.map +1 -0
- package/dist/flows/IdAndFaceValidationFlow.js +168 -0
- package/dist/flows/IdValidationFlow.d.ts +29 -0
- package/dist/flows/IdValidationFlow.d.ts.map +1 -0
- package/dist/flows/IdValidationFlow.js +106 -0
- package/dist/flows/OrbStatusScreen.d.ts +14 -0
- package/dist/flows/OrbStatusScreen.d.ts.map +1 -0
- package/dist/flows/OrbStatusScreen.js +60 -0
- package/dist/flows/RemoteDiagnosticsMount.d.ts +6 -0
- package/dist/flows/RemoteDiagnosticsMount.d.ts.map +1 -0
- package/dist/flows/RemoteDiagnosticsMount.js +57 -0
- package/dist/flows/SignatureKYCFlow.d.ts +33 -0
- package/dist/flows/SignatureKYCFlow.d.ts.map +1 -0
- package/dist/flows/SignatureKYCFlow.js +228 -0
- package/dist/flows/SubmissionProvider.d.ts +40 -0
- package/dist/flows/SubmissionProvider.d.ts.map +1 -0
- package/dist/flows/SubmissionProvider.js +136 -0
- package/dist/flows/SubmissionSuccess.d.ts +48 -0
- package/dist/flows/SubmissionSuccess.d.ts.map +1 -0
- package/dist/flows/SubmissionSuccess.js +488 -0
- package/dist/flows/VideoIdValidationFlow.d.ts +61 -0
- package/dist/flows/VideoIdValidationFlow.d.ts.map +1 -0
- package/dist/flows/VideoIdValidationFlow.js +171 -0
- package/dist/flows/additionalDocuments.d.ts +5 -0
- package/dist/flows/additionalDocuments.d.ts.map +1 -0
- package/dist/flows/additionalDocuments.js +26 -0
- package/dist/flows/artifacts.d.ts +8 -0
- package/dist/flows/artifacts.d.ts.map +1 -0
- package/dist/flows/artifacts.js +80 -0
- package/dist/flows/customerMatch/CustomerMatchCapture.d.ts +53 -0
- package/dist/flows/customerMatch/CustomerMatchCapture.d.ts.map +1 -0
- package/dist/flows/customerMatch/CustomerMatchCapture.js +211 -0
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts +94 -0
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts.map +1 -0
- package/dist/flows/customerMatch/CustomerMatchFlow.js +209 -0
- package/dist/flows/customerMatch/adapters.d.ts +34 -0
- package/dist/flows/customerMatch/adapters.d.ts.map +1 -0
- package/dist/flows/customerMatch/adapters.js +63 -0
- package/dist/flows/customerMatch/identificationReducer.d.ts +34 -0
- package/dist/flows/customerMatch/identificationReducer.d.ts.map +1 -0
- package/dist/flows/customerMatch/identificationReducer.js +75 -0
- package/dist/flows/customerMatch/verificationReducer.d.ts +34 -0
- package/dist/flows/customerMatch/verificationReducer.d.ts.map +1 -0
- package/dist/flows/customerMatch/verificationReducer.js +77 -0
- package/dist/flows/documentCapture.d.ts +5 -0
- package/dist/flows/documentCapture.d.ts.map +1 -0
- package/dist/flows/documentCapture.js +8 -0
- package/dist/flows/jsonHighlight.d.ts +19 -0
- package/dist/flows/jsonHighlight.d.ts.map +1 -0
- package/dist/flows/jsonHighlight.js +90 -0
- package/dist/flows/overlays.d.ts +91 -0
- package/dist/flows/overlays.d.ts.map +1 -0
- package/dist/flows/overlays.js +150 -0
- package/dist/flows/ringIntroImplications.d.ts +30 -0
- package/dist/flows/ringIntroImplications.d.ts.map +1 -0
- package/dist/flows/ringIntroImplications.js +58 -0
- package/dist/flows/ringScreens.d.ts +27 -0
- package/dist/flows/ringScreens.d.ts.map +1 -0
- package/dist/flows/ringScreens.js +18 -0
- package/dist/flows/sequencer.d.ts +12 -0
- package/dist/flows/sequencer.d.ts.map +1 -0
- package/dist/flows/sequencer.js +18 -0
- package/dist/flows/sharedCamera.d.ts +23 -0
- package/dist/flows/sharedCamera.d.ts.map +1 -0
- package/dist/flows/sharedCamera.js +64 -0
- package/dist/flows/signatureStep.d.ts +25 -0
- package/dist/flows/signatureStep.d.ts.map +1 -0
- package/dist/flows/signatureStep.js +99 -0
- package/dist/flows/types.d.ts +106 -0
- package/dist/flows/types.d.ts.map +1 -0
- package/dist/flows/types.js +1 -0
- package/dist/flows/useGeolocation.d.ts +24 -0
- package/dist/flows/useGeolocation.d.ts.map +1 -0
- package/dist/flows/useGeolocation.js +82 -0
- package/dist/flows/useShowSuccessScreen.d.ts +3 -0
- package/dist/flows/useShowSuccessScreen.d.ts.map +1 -0
- package/dist/flows/useShowSuccessScreen.js +51 -0
- package/dist/flows/useTimeout.d.ts +7 -0
- package/dist/flows/useTimeout.d.ts.map +1 -0
- package/dist/flows/useTimeout.js +68 -0
- package/dist/flows/videoIdSteps.d.ts +33 -0
- package/dist/flows/videoIdSteps.d.ts.map +1 -0
- package/dist/flows/videoIdSteps.js +54 -0
- package/dist/guidance/selfieStrings.d.ts +18 -0
- package/dist/guidance/selfieStrings.d.ts.map +1 -0
- package/dist/guidance/selfieStrings.js +97 -0
- package/dist/guidance/strings.d.ts +4 -0
- package/dist/guidance/strings.d.ts.map +1 -0
- package/dist/guidance/strings.js +43 -0
- package/dist/guidance/videoIdStrings.d.ts +23 -0
- package/dist/guidance/videoIdStrings.d.ts.map +1 -0
- package/dist/guidance/videoIdStrings.js +23 -0
- package/dist/i18n/index.d.ts +1221 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +92 -0
- package/dist/i18n/locales/de.d.ts +149 -0
- package/dist/i18n/locales/de.d.ts.map +1 -0
- package/dist/i18n/locales/de.js +147 -0
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/es.d.ts +149 -0
- package/dist/i18n/locales/es.d.ts.map +1 -0
- package/dist/i18n/locales/es.js +147 -0
- package/dist/i18n/locales/fr.d.ts +149 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -0
- package/dist/i18n/locales/fr.js +147 -0
- package/dist/i18n/locales/it.d.ts +149 -0
- package/dist/i18n/locales/it.d.ts.map +1 -0
- package/dist/i18n/locales/it.js +147 -0
- package/dist/i18n/locales/ja.d.ts +149 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -0
- package/dist/i18n/locales/ja.js +147 -0
- package/dist/i18n/locales/pt.d.ts +149 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -0
- package/dist/i18n/locales/pt.js +147 -0
- package/dist/i18n/locales/ru.d.ts +149 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -0
- package/dist/i18n/locales/ru.js +147 -0
- package/dist/i18n/locales/zh.d.ts +149 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -0
- package/dist/i18n/locales/zh.js +147 -0
- package/dist/i18n/render.d.ts +3 -0
- package/dist/i18n/render.d.ts.map +1 -0
- package/dist/i18n/render.js +7 -0
- package/dist/index.d.ts +157 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +191 -0
- package/dist/layout/GuideLayoutContext.d.ts +24 -0
- package/dist/layout/GuideLayoutContext.d.ts.map +1 -0
- package/dist/layout/GuideLayoutContext.js +19 -0
- package/dist/layout/GuideOrientationContext.d.ts +16 -0
- package/dist/layout/GuideOrientationContext.d.ts.map +1 -0
- package/dist/layout/GuideOrientationContext.js +40 -0
- package/dist/layout/useResizeObserver.d.ts +11 -0
- package/dist/layout/useResizeObserver.d.ts.map +1 -0
- package/dist/layout/useResizeObserver.js +114 -0
- package/dist/testing/alignGlobals.d.ts +2 -0
- package/dist/testing/alignGlobals.d.ts.map +1 -0
- package/dist/testing/alignGlobals.js +25 -0
- package/dist/testing/buildDocumentState.d.ts +4 -0
- package/dist/testing/buildDocumentState.d.ts.map +1 -0
- package/dist/testing/buildDocumentState.js +19 -0
- package/dist/testing/buildSelfieState.d.ts +8 -0
- package/dist/testing/buildSelfieState.d.ts.map +1 -0
- package/dist/testing/buildSelfieState.js +84 -0
- package/dist/testing/buildSignatureState.d.ts +3 -0
- package/dist/testing/buildSignatureState.d.ts.map +1 -0
- package/dist/testing/buildSignatureState.js +12 -0
- package/dist/testing/buildState.d.ts +3 -0
- package/dist/testing/buildState.d.ts.map +1 -0
- package/dist/testing/buildState.js +34 -0
- package/dist/testing/buildVideoIdState.d.ts +3 -0
- package/dist/testing/buildVideoIdState.d.ts.map +1 -0
- package/dist/testing/buildVideoIdState.js +11 -0
- package/dist/testing/classNamesLeaves.d.ts +14 -0
- package/dist/testing/classNamesLeaves.d.ts.map +1 -0
- package/dist/testing/classNamesLeaves.js +144 -0
- package/dist/testing/fakeClient.d.ts +61 -0
- package/dist/testing/fakeClient.d.ts.map +1 -0
- package/dist/testing/fakeClient.js +142 -0
- package/dist/testing/fakeController.d.ts +18 -0
- package/dist/testing/fakeController.d.ts.map +1 -0
- package/dist/testing/fakeController.js +165 -0
- package/dist/testing/fakeDocumentController.d.ts +37 -0
- package/dist/testing/fakeDocumentController.d.ts.map +1 -0
- package/dist/testing/fakeDocumentController.js +104 -0
- package/dist/testing/fakeSelfieController.d.ts +15 -0
- package/dist/testing/fakeSelfieController.d.ts.map +1 -0
- package/dist/testing/fakeSelfieController.js +154 -0
- package/dist/testing/fakeSignatureController.d.ts +12 -0
- package/dist/testing/fakeSignatureController.d.ts.map +1 -0
- package/dist/testing/fakeSignatureController.js +58 -0
- package/dist/testing/fakeVideoIdController.d.ts +12 -0
- package/dist/testing/fakeVideoIdController.d.ts.map +1 -0
- package/dist/testing/fakeVideoIdController.js +50 -0
- package/dist/testing/index.d.ts +15 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +18 -0
- package/dist/testing/stubSignatureCanvas.d.ts +2 -0
- package/dist/testing/stubSignatureCanvas.d.ts.map +1 -0
- package/dist/testing/stubSignatureCanvas.js +26 -0
- package/dist/testing/stubVideoCaptureDom.d.ts +2 -0
- package/dist/testing/stubVideoCaptureDom.d.ts.map +1 -0
- package/dist/testing/stubVideoCaptureDom.js +36 -0
- package/dist/theme/color.d.ts +14 -0
- package/dist/theme/color.d.ts.map +1 -0
- package/dist/theme/color.js +1 -0
- package/dist/theme/index.d.ts +405 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +230 -0
- package/dist/utils/canvas.d.ts +3 -0
- package/dist/utils/canvas.d.ts.map +1 -0
- package/dist/utils/canvas.js +16 -0
- package/dist/utils/cdn.d.ts +2 -0
- package/dist/utils/cdn.d.ts.map +1 -0
- package/dist/utils/cdn.js +3 -0
- package/dist/utils/cropping.d.ts +4 -0
- package/dist/utils/cropping.d.ts.map +1 -0
- package/dist/utils/cropping.js +11 -0
- package/dist/utils/flowClock.d.ts +6 -0
- package/dist/utils/flowClock.d.ts.map +1 -0
- package/dist/utils/flowClock.js +22 -0
- package/dist/utils/isMobile.d.ts +3 -0
- package/dist/utils/isMobile.d.ts.map +1 -0
- package/dist/utils/isMobile.js +35 -0
- package/dist/utils/loadProgressHooks.d.ts +25 -0
- package/dist/utils/loadProgressHooks.d.ts.map +1 -0
- package/dist/utils/loadProgressHooks.js +79 -0
- package/dist/utils/logger.d.ts +18 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +38 -0
- package/dist/utils/merge.d.ts +3 -0
- package/dist/utils/merge.d.ts.map +1 -0
- package/dist/utils/merge.js +23 -0
- package/dist/utils/signaturePadStrokeGuard.d.ts +16 -0
- package/dist/utils/signaturePadStrokeGuard.d.ts.map +1 -0
- package/dist/utils/signaturePadStrokeGuard.js +70 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/package.json +71 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function cropToDetectedObjectBox(frame, box, canvas, padding = 0) {
|
|
2
|
+
canvas ||= document.createElement('canvas');
|
|
3
|
+
const ctx = canvas.getContext('2d');
|
|
4
|
+
if (!ctx)
|
|
5
|
+
throw new Error('could not get 2d context');
|
|
6
|
+
const { xMin, yMin, width, height } = box;
|
|
7
|
+
canvas.width = width + padding * 2;
|
|
8
|
+
canvas.height = height + padding * 2;
|
|
9
|
+
ctx.drawImage(frame, xMin - padding, yMin - padding, width + padding * 2, height + padding * 2, 0, 0, canvas.width, canvas.height);
|
|
10
|
+
return canvas;
|
|
11
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Start the clock unless it is already running. */
|
|
2
|
+
export declare const markFlowStart: () => void;
|
|
3
|
+
export declare const resetFlowClock: () => void;
|
|
4
|
+
/** Milliseconds since the flow's first camera request, or null if none. */
|
|
5
|
+
export declare const readFlowElapsedMs: () => number | null;
|
|
6
|
+
//# sourceMappingURL=flowClock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowClock.d.ts","sourceRoot":"","sources":["../../src/utils/flowClock.ts"],"names":[],"mappings":"AAcA,oDAAoD;AACpD,eAAO,MAAM,aAAa,QAAO,IAEhC,CAAA;AAED,eAAO,MAAM,cAAc,QAAO,IAEjC,CAAA;AAED,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,QAAO,MAAM,GAAG,IACc,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Ported verbatim from sdk2/src/lib/utils/flowClock.ts.
|
|
2
|
+
/**
|
|
3
|
+
* Wall clock for the ring success screen's "total time" stat.
|
|
4
|
+
*
|
|
5
|
+
* Module-level on purpose: the camera store is created per capture stage, so
|
|
6
|
+
* a timestamp kept there would be lost when the flow moves from ID capture to
|
|
7
|
+
* selfie capture. The clock starts at the flow's first camera request — the
|
|
8
|
+
* ring intro's "Enable camera & start" tap, or mount for flows that request
|
|
9
|
+
* automatically — and CompositeWizard resets it when a new flow mounts.
|
|
10
|
+
* Flows that never request a camera (fully presupplied documents) leave the
|
|
11
|
+
* clock unset and the stat is simply not shown.
|
|
12
|
+
*/
|
|
13
|
+
let flowStartedAt = null;
|
|
14
|
+
/** Start the clock unless it is already running. */
|
|
15
|
+
export const markFlowStart = () => {
|
|
16
|
+
flowStartedAt ??= Date.now();
|
|
17
|
+
};
|
|
18
|
+
export const resetFlowClock = () => {
|
|
19
|
+
flowStartedAt = null;
|
|
20
|
+
};
|
|
21
|
+
/** Milliseconds since the flow's first camera request, or null if none. */
|
|
22
|
+
export const readFlowElapsedMs = () => flowStartedAt === null ? null : Date.now() - flowStartedAt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isMobile.d.ts","sourceRoot":"","sources":["../../src/utils/isMobile.ts"],"names":[],"mappings":"AAMA,wBAAgB,QAAQ,wBAIvB;AAED,wBAAgB,gBAAgB,CAAC,GAAG,CAAC,EAAE,SAAS,OAgC/C"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function _isNavigatorDefined() {
|
|
2
|
+
return typeof navigator !== 'undefined' && navigator != null;
|
|
3
|
+
}
|
|
4
|
+
let isMobileCache;
|
|
5
|
+
export function isMobile() {
|
|
6
|
+
if (isMobileCache !== undefined)
|
|
7
|
+
return isMobileCache;
|
|
8
|
+
isMobileCache = evaluateIsMobile();
|
|
9
|
+
return isMobileCache;
|
|
10
|
+
}
|
|
11
|
+
export function evaluateIsMobile(nav) {
|
|
12
|
+
if (nav || _isNavigatorDefined()) {
|
|
13
|
+
if (!nav) {
|
|
14
|
+
nav = navigator;
|
|
15
|
+
}
|
|
16
|
+
if (nav.product === 'ReactNative') {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
const a = nav.userAgent ||
|
|
20
|
+
nav.vendor ||
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
(typeof window !== 'undefined' ? window.opera : '');
|
|
24
|
+
if (!a) {
|
|
25
|
+
const navAny = nav;
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
return navAny.userAgentData && navAny.userAgentData.mobile;
|
|
29
|
+
}
|
|
30
|
+
return (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) ||
|
|
31
|
+
// eslint-disable-next-line no-useless-escape -- byte-faithful port of sdk2's UA regex (sdk2 turns this rule off entirely); escapes copied verbatim from the source.
|
|
32
|
+
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)));
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ModelLoadState } from '@idmission/websdk-core/models';
|
|
2
|
+
/**
|
|
3
|
+
* UI-local replacement for sdk2's `modelWarmingStartedAt` context field
|
|
4
|
+
* (IdCaptureModelsProvider.tsx:1226-1228), which core's
|
|
5
|
+
* `IdCaptureControllerState.models` does not publish: measures elapsed
|
|
6
|
+
* warming time locally, starting the clock when `modelLoadState` transitions
|
|
7
|
+
* to 'warming' and resetting it on exit. The consumer replays sdk2's exact
|
|
8
|
+
* progress blend against this value (sdk2
|
|
9
|
+
* IdCaptureLoadingOverlayDefault.tsx:97-104).
|
|
10
|
+
*
|
|
11
|
+
* `now` is an injectable clock (test seam, same pattern as core's `io.now`);
|
|
12
|
+
* production callers pass a stable `() => performance.now()`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useModelWarmingElapsedMs(modelLoadState: ModelLoadState, now: () => number): number;
|
|
15
|
+
export declare function useLoadProgressHooks({ ready, modelLoadState, modelLoadProgress, modelError, onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, }: {
|
|
16
|
+
ready: boolean;
|
|
17
|
+
modelLoadState: ModelLoadState;
|
|
18
|
+
modelLoadProgress: number;
|
|
19
|
+
modelError: Error | null;
|
|
20
|
+
onLoadingStarted?: () => void;
|
|
21
|
+
onLoadingProgress?: (progress: number) => void;
|
|
22
|
+
onLoadingCompleted?: () => void;
|
|
23
|
+
onLoadingFailed?: (error?: Error) => void;
|
|
24
|
+
}): void;
|
|
25
|
+
//# sourceMappingURL=loadProgressHooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadProgressHooks.d.ts","sourceRoot":"","sources":["../../src/utils/loadProgressHooks.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAUnE;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,MAAM,MAAM,GAChB,MAAM,CAgBR;AAED,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,GAChB,EAAE;IACD,KAAK,EAAE,OAAO,CAAA;IACd,cAAc,EAAE,cAAc,CAAA;IAC9B,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,EAAE,KAAK,GAAG,IAAI,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC7B,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9C,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B,eAAe,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAA;CAC1C,QAyCA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Ported dep of IdCaptureLoadingOverlayDefault.tsx (sdk2's own
|
|
2
|
+
// lib/models/loadProgressHooks.ts). Byte-identical logic; the only change is
|
|
3
|
+
// the `modelLoadState` parameter type, narrowed from sdk2's
|
|
4
|
+
// `../../lib/models/helpers`-local `ModelLoadState` to this package's
|
|
5
|
+
// `@idmission/websdk-core/models` re-export of the same union (core's
|
|
6
|
+
// ModelLoadState is the single source of truth post-port).
|
|
7
|
+
import { useEffect, useRef, useState } from 'react';
|
|
8
|
+
// How often the warming clock re-publishes its elapsed time. sdk2 had no
|
|
9
|
+
// explicit tick — its overlay recomputed `performance.now() -
|
|
10
|
+
// modelWarmingStartedAt` on whatever re-renders happened to occur (frequent
|
|
11
|
+
// in sdk2, since the models/camera store values it subscribed to churned).
|
|
12
|
+
// This port's overlay only re-renders when the `state` prop changes, which
|
|
13
|
+
// during warming may be never — so the crawl needs its own re-render source.
|
|
14
|
+
const WARMING_TICK_MS = 250;
|
|
15
|
+
/**
|
|
16
|
+
* UI-local replacement for sdk2's `modelWarmingStartedAt` context field
|
|
17
|
+
* (IdCaptureModelsProvider.tsx:1226-1228), which core's
|
|
18
|
+
* `IdCaptureControllerState.models` does not publish: measures elapsed
|
|
19
|
+
* warming time locally, starting the clock when `modelLoadState` transitions
|
|
20
|
+
* to 'warming' and resetting it on exit. The consumer replays sdk2's exact
|
|
21
|
+
* progress blend against this value (sdk2
|
|
22
|
+
* IdCaptureLoadingOverlayDefault.tsx:97-104).
|
|
23
|
+
*
|
|
24
|
+
* `now` is an injectable clock (test seam, same pattern as core's `io.now`);
|
|
25
|
+
* production callers pass a stable `() => performance.now()`.
|
|
26
|
+
*/
|
|
27
|
+
export function useModelWarmingElapsedMs(modelLoadState, now) {
|
|
28
|
+
const [elapsedMs, setElapsedMs] = useState(0);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (modelLoadState !== 'warming')
|
|
31
|
+
return undefined;
|
|
32
|
+
const startedAt = now();
|
|
33
|
+
const interval = setInterval(() => {
|
|
34
|
+
setElapsedMs(now() - startedAt);
|
|
35
|
+
}, WARMING_TICK_MS);
|
|
36
|
+
return () => {
|
|
37
|
+
clearInterval(interval);
|
|
38
|
+
setElapsedMs(0);
|
|
39
|
+
};
|
|
40
|
+
}, [modelLoadState, now]);
|
|
41
|
+
return elapsedMs;
|
|
42
|
+
}
|
|
43
|
+
export function useLoadProgressHooks({ ready, modelLoadState, modelLoadProgress, modelError, onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, }) {
|
|
44
|
+
const onLoadingStartedRef = useRef(onLoadingStarted);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
onLoadingStartedRef.current = onLoadingStarted;
|
|
47
|
+
}, [onLoadingStarted]);
|
|
48
|
+
const onLoadingProgressRef = useRef(onLoadingProgress);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
onLoadingProgressRef.current = onLoadingProgress;
|
|
51
|
+
}, [onLoadingProgress]);
|
|
52
|
+
const onLoadingCompletedRef = useRef(onLoadingCompleted);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
onLoadingCompletedRef.current = onLoadingCompleted;
|
|
55
|
+
}, [onLoadingCompleted]);
|
|
56
|
+
const onLoadingFailedRef = useRef(onLoadingFailed);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
onLoadingFailedRef.current = onLoadingFailed;
|
|
59
|
+
}, [onLoadingFailed]);
|
|
60
|
+
const loadingStarted = modelLoadState !== 'not-started';
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (loadingStarted)
|
|
63
|
+
onLoadingStartedRef.current?.();
|
|
64
|
+
}, [loadingStarted]);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (modelLoadProgress > 0) {
|
|
67
|
+
onLoadingProgressRef.current?.(modelLoadProgress);
|
|
68
|
+
}
|
|
69
|
+
}, [modelLoadProgress]);
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (ready)
|
|
72
|
+
onLoadingCompletedRef.current?.();
|
|
73
|
+
}, [ready]);
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
if (modelLoadState === 'error') {
|
|
76
|
+
onLoadingFailedRef.current?.(modelError ?? undefined);
|
|
77
|
+
}
|
|
78
|
+
}, [modelLoadState, modelError]);
|
|
79
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const LogLevel: {
|
|
2
|
+
readonly Off: 0;
|
|
3
|
+
readonly Error: 1;
|
|
4
|
+
readonly Warn: 2;
|
|
5
|
+
readonly Info: 3;
|
|
6
|
+
readonly Debug: 4;
|
|
7
|
+
};
|
|
8
|
+
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
9
|
+
export declare function useLogLevel(newLogLevel: LogLevel): void;
|
|
10
|
+
export declare function useDebugLogging(enabled: boolean): void;
|
|
11
|
+
export declare const debug: (...args: unknown[]) => void;
|
|
12
|
+
export declare const log: (...args: unknown[]) => void;
|
|
13
|
+
export declare const warn: (...args: unknown[]) => void;
|
|
14
|
+
export declare const error: (...args: unknown[]) => void;
|
|
15
|
+
export declare const time: (label?: string) => void;
|
|
16
|
+
export declare const timeEnd: (label?: string) => void;
|
|
17
|
+
export default log;
|
|
18
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,QAAQ;;;;;;CAMX,CAAA;AACV,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAA;AAI/D,wBAAgB,WAAW,CAAC,WAAW,EAAE,QAAQ,QAShD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,QAE/C;AAID,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,OAAO,EAAE,SACsB,CAAA;AAE9D,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,OAAO,EAAE,SACqB,CAAA;AAE3D,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,OAAO,EAAE,SACqB,CAAA;AAE5D,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,OAAO,EAAE,SACsB,CAAA;AAE9D,eAAO,MAAM,IAAI,GAAI,QAAQ,MAAM,SACuB,CAAA;AAE1D,eAAO,MAAM,OAAO,GAAI,QAAQ,MAAM,SACuB,CAAA;AAE7D,eAAe,GAAG,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Ported dep of IdCaptureGuidesCommon.tsx (debug, for the SVG-length measure
|
|
2
|
+
// try/catch) and guide_images/useGuideImages.ts (warn, for the
|
|
3
|
+
// missing-dimensions warning). Trimmed transform vs sdk2's
|
|
4
|
+
// lib/utils/logger.ts: `enum LogLevel` -> const-object + type (monorepo's
|
|
5
|
+
// "no TS enum" convention, plan.md Global Constraints); numeric ordering
|
|
6
|
+
// (Off < Error < Warn < Info < Debug) preserved exactly so the `logLevel >=
|
|
7
|
+
// LogLevel.X` comparisons behave identically.
|
|
8
|
+
import { useEffect } from 'react';
|
|
9
|
+
export const LogLevel = {
|
|
10
|
+
Off: 0,
|
|
11
|
+
Error: 1,
|
|
12
|
+
Warn: 2,
|
|
13
|
+
Info: 3,
|
|
14
|
+
Debug: 4,
|
|
15
|
+
};
|
|
16
|
+
let logLevel = LogLevel.Warn;
|
|
17
|
+
export function useLogLevel(newLogLevel) {
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const oldLogLevel = logLevel;
|
|
20
|
+
if (newLogLevel === oldLogLevel)
|
|
21
|
+
return;
|
|
22
|
+
logLevel = newLogLevel;
|
|
23
|
+
return () => {
|
|
24
|
+
logLevel = oldLogLevel;
|
|
25
|
+
};
|
|
26
|
+
}, [newLogLevel]);
|
|
27
|
+
}
|
|
28
|
+
export function useDebugLogging(enabled) {
|
|
29
|
+
useLogLevel(enabled ? LogLevel.Debug : logLevel);
|
|
30
|
+
}
|
|
31
|
+
const noop = () => { };
|
|
32
|
+
export const debug = (...args) => (logLevel >= LogLevel.Debug ? console.debug : noop)(...args); // eslint-disable-line no-console
|
|
33
|
+
export const log = (...args) => (logLevel >= LogLevel.Info ? console.log : noop)(...args); // eslint-disable-line no-console
|
|
34
|
+
export const warn = (...args) => (logLevel >= LogLevel.Warn ? console.warn : noop)(...args); // eslint-disable-line no-console
|
|
35
|
+
export const error = (...args) => (logLevel >= LogLevel.Error ? console.error : noop)(...args); // eslint-disable-line no-console
|
|
36
|
+
export const time = (label) => (logLevel >= LogLevel.Info ? console.time : noop)(label); // eslint-disable-line no-console
|
|
37
|
+
export const timeEnd = (label) => (logLevel >= LogLevel.Info ? console.timeEnd : noop)(label); // eslint-disable-line no-console
|
|
38
|
+
export default log;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../src/utils/merge.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAE/C;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACzD,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,CAAC,GACR,CAAC,CAiBH"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function isObject(item) {
|
|
2
|
+
return !!item && typeof item === 'object' && !Array.isArray(item);
|
|
3
|
+
}
|
|
4
|
+
export default function mergeDeep(target, source) {
|
|
5
|
+
const output = Object.assign({}, target);
|
|
6
|
+
if (isObject(target) && isObject(source)) {
|
|
7
|
+
Object.keys(source).forEach((key) => {
|
|
8
|
+
const keyT = key;
|
|
9
|
+
if (isObject(source[keyT])) {
|
|
10
|
+
if (!(keyT in target))
|
|
11
|
+
Object.assign(output, { [keyT]: source[keyT] });
|
|
12
|
+
else {
|
|
13
|
+
// @ts-expect-error TS2345
|
|
14
|
+
output[keyT] = mergeDeep(target[keyT], source[keyT]);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
Object.assign(output, { [keyT]: source[keyT] });
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return output;
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Guards the pad behind a mounted react-signature-canvas.
|
|
3
|
+
*
|
|
4
|
+
* The module-load patch above covers every pad on its own. This only re-checks
|
|
5
|
+
* the live instance, because a bundler is free to hand react-signature-canvas a
|
|
6
|
+
* different copy of signature_pad than the one imported here — its CommonJS
|
|
7
|
+
* build against this ES module — in which case the two prototypes are different
|
|
8
|
+
* objects and the patch above missed.
|
|
9
|
+
*/
|
|
10
|
+
export declare function guardSignaturePadStrokes(canvas: SignatureCanvasLike): void;
|
|
11
|
+
/** Structural stand-in for a react-signature-canvas instance. */
|
|
12
|
+
type SignatureCanvasLike = {
|
|
13
|
+
getSignaturePad(): unknown;
|
|
14
|
+
} | null;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=signaturePadStrokeGuard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signaturePadStrokeGuard.d.ts","sourceRoot":"","sources":["../../src/utils/signaturePadStrokeGuard.ts"],"names":[],"mappings":"AA4CA;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAK1E;AAED,iEAAiE;AACjE,KAAK,mBAAmB,GAAG;IAAE,eAAe,IAAI,OAAO,CAAA;CAAE,GAAG,IAAI,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import SignaturePad from 'signature_pad';
|
|
2
|
+
/**
|
|
3
|
+
* Backports the signature_pad v4 "open a stroke on demand" guard onto the v2
|
|
4
|
+
* pad that react-signature-canvas builds for us.
|
|
5
|
+
*
|
|
6
|
+
* signature_pad@2.3.2 — pinned by the unmaintained react-signature-canvas@1.0.7
|
|
7
|
+
* — only opens a stroke when a gesture starts as a single touch on the canvas,
|
|
8
|
+
* but moves and lifts run unconditionally:
|
|
9
|
+
*
|
|
10
|
+
* _handleTouchStart: if (event.targetTouches.length === 1) self._strokeBegin(touch)
|
|
11
|
+
* _handleTouchMove: self._strokeMoveUpdate(event.targetTouches[0])
|
|
12
|
+
* _handleTouchEnd: self._strokeEnd(event)
|
|
13
|
+
*
|
|
14
|
+
* `_strokeBegin` is the only thing that pushes a stroke onto `_data`, so any
|
|
15
|
+
* gesture that does not start that way — a second finger or a palm landing with
|
|
16
|
+
* the first, a pinch, or Clear being tapped while a finger is still down —
|
|
17
|
+
* leaves `_data` empty, and every following move throws:
|
|
18
|
+
*
|
|
19
|
+
* TypeError: undefined is not an object
|
|
20
|
+
* (evaluating 'this._data[this._data.length-1].push')
|
|
21
|
+
*
|
|
22
|
+
* The throw lands *after* `_drawCurve`, which is what makes it more than noise:
|
|
23
|
+
* the ink is painted but never recorded. `onBegin` never fires, `toData()` stays
|
|
24
|
+
* empty, and the user is left looking at a signature the pad will not accept.
|
|
25
|
+
* `_strokeEnd` then throws on the same empty `_data` when they lift, because the
|
|
26
|
+
* points the failed moves accumulated are still there.
|
|
27
|
+
*
|
|
28
|
+
* v4 fixed this at the source (`if (this._data.length === 0) { this._strokeBegin(event); return }`),
|
|
29
|
+
* so this applies the same rule: a move with no open stroke opens one. That also
|
|
30
|
+
* settles the lift, which can only reach an empty `_data` by way of a move that
|
|
31
|
+
* did not open a stroke.
|
|
32
|
+
*/
|
|
33
|
+
const guarded = Symbol.for('idmission.websdk.signaturePadStrokeGuard');
|
|
34
|
+
// Patched at module load, which is the whole trick: a pad snapshots
|
|
35
|
+
// `SignaturePad.prototype._strokeUpdate` into its throttle closure when it is
|
|
36
|
+
// constructed, so guarding after the fact leaves that pad's throttled moves
|
|
37
|
+
// running the original. That gap is reachable — tap Clear mid-stroke and the
|
|
38
|
+
// trailing call the throttle already queued lands on an emptied `_data`. This
|
|
39
|
+
// module is imported by the view, so it runs long before any pad is built.
|
|
40
|
+
guardStrokeUpdate(SignaturePad.prototype);
|
|
41
|
+
/**
|
|
42
|
+
* Guards the pad behind a mounted react-signature-canvas.
|
|
43
|
+
*
|
|
44
|
+
* The module-load patch above covers every pad on its own. This only re-checks
|
|
45
|
+
* the live instance, because a bundler is free to hand react-signature-canvas a
|
|
46
|
+
* different copy of signature_pad than the one imported here — its CommonJS
|
|
47
|
+
* build against this ES module — in which case the two prototypes are different
|
|
48
|
+
* objects and the patch above missed.
|
|
49
|
+
*/
|
|
50
|
+
export function guardSignaturePadStrokes(canvas) {
|
|
51
|
+
if (!canvas)
|
|
52
|
+
return;
|
|
53
|
+
const pad = canvas.getSignaturePad();
|
|
54
|
+
guardStrokeUpdate(Object.getPrototypeOf(pad));
|
|
55
|
+
}
|
|
56
|
+
function guardStrokeUpdate(prototype) {
|
|
57
|
+
if (prototype[guarded])
|
|
58
|
+
return;
|
|
59
|
+
const strokeUpdate = prototype._strokeUpdate;
|
|
60
|
+
prototype._strokeUpdate = function (event) {
|
|
61
|
+
if (this._data.length === 0) {
|
|
62
|
+
// `_strokeBegin` pushes the stroke and then calls back into this method,
|
|
63
|
+
// which takes the normal path because `_data` is no longer empty.
|
|
64
|
+
this._strokeBegin(event);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
strokeUpdate.call(this, event);
|
|
68
|
+
};
|
|
69
|
+
Object.defineProperty(prototype, guarded, { value: true });
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,eAAe,CAAA"}
|
package/dist/version.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@idmission/websdk-ui",
|
|
3
|
+
"version": "0.1.0-rc.1",
|
|
4
|
+
"description": "React presentation layer for the IDmission Web SDK",
|
|
5
|
+
"private": false,
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/Idmission-LLC/idmission-web-sdk-2.0.git",
|
|
9
|
+
"directory": "packages/websdk-ui"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"typings": "dist/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"default": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./testing": {
|
|
26
|
+
"types": "./dist/testing/index.d.ts",
|
|
27
|
+
"default": "./dist/testing/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": "^18 || ^19",
|
|
33
|
+
"react-dom": "^18 || ^19",
|
|
34
|
+
"styled-components": "^6"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"i18next": "^23.16.8",
|
|
38
|
+
"i18next-browser-languagedetector": "^7.2.2",
|
|
39
|
+
"ladda": "^2.0.3",
|
|
40
|
+
"react-i18next": "^13.5.0",
|
|
41
|
+
"react-signature-canvas": "1.0.7",
|
|
42
|
+
"signature_pad": "2.3.2",
|
|
43
|
+
"thinking-orbs": "0.1.1",
|
|
44
|
+
"@idmission/websdk-core": "0.1.0-rc.1"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@testing-library/react": "^16.3.0",
|
|
48
|
+
"@types/node": "^20.19.39",
|
|
49
|
+
"@types/react": "^19.2.14",
|
|
50
|
+
"@types/react-dom": "^18.3.1",
|
|
51
|
+
"@types/react-signature-canvas": "^1.0.7",
|
|
52
|
+
"@types/signature_pad": "^2.3.0",
|
|
53
|
+
"global-jsdom": "^26.0.0",
|
|
54
|
+
"jsdom": "^26.1.0",
|
|
55
|
+
"react": "18.3.1",
|
|
56
|
+
"react-dom": "18.3.1",
|
|
57
|
+
"styled-components": "^6.4.1",
|
|
58
|
+
"tsx": "^4.20.0",
|
|
59
|
+
"typescript": "^5.9.3",
|
|
60
|
+
"@idmission/typescript-config": "1.0.0",
|
|
61
|
+
"@idmission/eslint-config": "1.0.0"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
65
|
+
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
|
|
66
|
+
"check-readme": "mkdir -p .readme-check/node_modules/@idmission && ln -sfn ../../../.. .readme-check/node_modules/@idmission/websdk-ui && tsc --noEmit -p .readme-check/tsconfig.json",
|
|
67
|
+
"check-types": "tsc --noEmit",
|
|
68
|
+
"lint": "eslint --max-warnings 0",
|
|
69
|
+
"test": "node --import tsx --import ./test/setup.ts --test 'src/**/*.test.ts' 'src/**/*.test.tsx'"
|
|
70
|
+
}
|
|
71
|
+
}
|