@incodetech/core 2.1.0-rc.2 → 2.1.0-rc.3
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/dist/3dAvatarProvider-ChciZmjE.esm.js +28214 -0
- package/dist/{BrowserStorageProvider-D5xc7Lqo.esm.js → BrowserStorageProvider-CrrN540a.esm.js} +1 -25
- package/dist/BrowserVisibilityObserverProvider-rim9Jrz-.esm.js +25 -0
- package/dist/Face2DProvider-BeLlYBbB.esm.js +824 -0
- package/dist/FaceDetectionProvider-B78455D4.d.ts +119 -0
- package/dist/IVisibilityObserverCapability-BbWjgpiF.d.ts +12 -0
- package/dist/IWasmUtilCapability-d2XvzaCk.d.ts +145 -0
- package/dist/IpifyProvider-BRW14_uo.esm.js +51 -0
- package/dist/{Manager-B2OEDYqf.d.ts → Manager-CJ3G2zqi.d.ts} +1 -4
- package/dist/{OpenViduRecordingProvider-DF7A4ZNJ.esm.js → OpenViduRecordingProvider-B_0GKkzc.esm.js} +1 -1
- package/dist/PrivacyLensProvider-hDzaDzZ6.esm.js +339 -0
- package/dist/StateMachine-C_AY4cs7.d.ts +2 -0
- package/dist/{StreamCanvasCapture-Dr5n_iK1.esm.js → StreamCanvasCapture-Bz17q4FP.esm.js} +1 -1
- package/dist/StreamCanvasCapture-DS1TOoiH.d.ts +42 -0
- package/dist/{WasmUtilProvider-CIu373BZ.esm.js → WasmUtilProvider-ADG54T6M.esm.js} +16 -1
- package/dist/{addressSearch-BH96a3fq.esm.js → addressSearch-DJyNTg5S.esm.js} +4 -4
- package/dist/{ae-signature-CDEN8y-w.esm.js → ae-signature-DlElqFrZ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +4 -3
- package/dist/ae-signature.esm.js +10 -9
- package/dist/antifraud.d.ts +4 -3
- package/dist/antifraud.esm.js +7 -6
- package/dist/{antifraudManager-DZifA5zX.esm.js → antifraudManager-BKdQoMFf.esm.js} +4 -3
- package/dist/{antifraudManager-B7WQTIdu.d.ts → antifraudManager-DpIvbrZP.d.ts} +2 -2
- package/dist/{antifraudStateMachine-DlKrK2hL.esm.js → antifraudStateMachine-C0NGnP9W.esm.js} +3 -3
- package/dist/{api-DUZwyz0o.esm.js → api-DsbUi7TO.esm.js} +21 -2
- package/dist/authentication.d.ts +19 -12
- package/dist/authentication.esm.js +33 -27
- package/dist/{authenticationManager-Dve7mGLe.d.ts → authenticationManager-CdPbNS2H.d.ts} +3 -3
- package/dist/{authenticationManager-BM4LzyV7.esm.js → authenticationManager-Dtl1vcET.esm.js} +6 -6
- package/dist/{authenticationStateMachine-Chx3ySdT.esm.js → authenticationStateMachine-D-hOlg8p.esm.js} +8 -8
- package/dist/avatar.d.ts +3 -0
- package/dist/avatar.esm.js +3 -0
- package/dist/{backCameraStream-iftkf3rd.esm.js → backCameraStream-ZyqrFyjO.esm.js} +3 -3
- package/dist/{browser-DlFgHpoC-7tbRR1aR.esm.js → browser-DlFgHpoC-qLKs75Qp.esm.js} +1 -1
- package/dist/{browserSimulation-CGjpdNA1.esm.js → browserSimulation-TsSoavQv.esm.js} +153 -1216
- package/dist/camera-DUkgmYMo.esm.js +79 -0
- package/dist/camera.d.ts +7 -1
- package/dist/camera.esm.js +4 -4
- package/dist/{StreamCanvasCapture-Ctgyx-oD.d.ts → canvas-CJUmoXSD.d.ts} +1 -41
- package/dist/certificate-issuance.d.ts +31 -30
- package/dist/certificate-issuance.esm.js +8 -7
- package/dist/{certificateIssuanceStateMachine-CLNXtXaC.esm.js → certificateIssuanceStateMachine-C07m7qtP.esm.js} +4 -4
- package/dist/clientLifecycle-Ct7h9uxx.esm.js +534 -0
- package/dist/consent.d.ts +4 -3
- package/dist/consent.esm.js +7 -6
- package/dist/{consentManager-psDCeJ0E.esm.js → consentManager-BtnPZUW4.esm.js} +4 -3
- package/dist/{consentManager-BqUGU_YD.d.ts → consentManager-DufVo9D9.d.ts} +52 -52
- package/dist/{consentStateMachine-DRsFFSHE.esm.js → consentStateMachine-DO2JqoZW.esm.js} +3 -3
- package/dist/cpf-ocr.d.ts +4 -3
- package/dist/cpf-ocr.esm.js +7 -6
- package/dist/{cpfOcrManager-BxcgxvgO.esm.js → cpfOcrManager-C4rLgKsu.esm.js} +6 -5
- package/dist/{cpfOcrManager-B2u9hMzd.d.ts → cpfOcrManager-DqZZ94Gt.d.ts} +19 -19
- package/dist/createFaceAvatar-B8pFpy6o.d.ts +401 -0
- package/dist/createFaceAvatar-BOHDKQRq.esm.js +46 -0
- package/dist/cross-document-data-match.d.ts +2 -1
- package/dist/cross-document-data-match.esm.js +6 -5
- package/dist/curp-validation.d.ts +10 -7
- package/dist/curp-validation.esm.js +7 -6
- package/dist/{curpValidationManager-BgLDw0Ub.esm.js → curpValidationManager-BafobPXC.esm.js} +4 -3
- package/dist/{curpValidationManager-Bt6CVD8b.d.ts → curpValidationManager-Co6LZAHT.d.ts} +3 -3
- package/dist/{curpValidationStateMachine-BK_wJ48C.esm.js → curpValidationStateMachine-DXTPK6vI.esm.js} +3 -3
- package/dist/custom-fields.d.ts +3 -2
- package/dist/custom-fields.esm.js +6 -5
- package/dist/custom-watchlist.d.ts +2 -1
- package/dist/custom-watchlist.esm.js +6 -5
- package/dist/{customWatchlistStateMachine-Bi4P59HM.esm.js → customWatchlistStateMachine-B4G3Chkx.esm.js} +3 -3
- package/dist/{deepsightLoader-BMmvk0X6.esm.js → deepsightLoader-DHSVD776.esm.js} +14 -13
- package/dist/{deepsightService-CEZrdiW0.esm.js → deepsightService-CDahSjGP.esm.js} +9 -38
- package/dist/deepsightService-CMB9XjES.d.ts +69 -0
- package/dist/device.d.ts +9 -1
- package/dist/device.esm.js +5 -5
- package/dist/document-capture.d.ts +175 -174
- package/dist/document-capture.esm.js +14 -13
- package/dist/document-upload.d.ts +48 -47
- package/dist/document-upload.esm.js +9 -8
- package/dist/{documentCaptureStateMachine-MpwpJO7t.esm.js → documentCaptureStateMachine-DSOX2epf.esm.js} +7 -7
- package/dist/dynamic-forms.d.ts +4 -192
- package/dist/dynamic-forms.esm.js +8 -160
- package/dist/dynamicFormsManager-BOefZbyF.esm.js +168 -0
- package/dist/dynamicFormsManager-CUYLOj9g.d.ts +239 -0
- package/dist/{dynamicFormsStateMachine-Do84A4uU.esm.js → dynamicFormsStateMachine-BXHcaocI.esm.js} +4 -4
- package/dist/ekyb.d.ts +9 -6
- package/dist/ekyb.esm.js +20 -17
- package/dist/{ekybStateMachine-nsuPOw3f.esm.js → ekybStateMachine-CCSeqjCt.esm.js} +5 -5
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +9 -8
- package/dist/{ekycStateMachine-DcynX0rj.esm.js → ekycStateMachine-DkLVTOyA.esm.js} +5 -5
- package/dist/electronic-signature.d.ts +4 -3
- package/dist/electronic-signature.esm.js +9 -8
- package/dist/{electronicSignatureManager-B63aAuI5.esm.js → electronicSignatureManager-DjzUzqZj.esm.js} +50 -87
- package/dist/email.d.ts +5 -4
- package/dist/email.esm.js +9 -8
- package/dist/{emailManager-DxHjAe5u.esm.js → emailManager-B_XzEsXH.esm.js} +5 -4
- package/dist/{emailManager-C6D2u4mQ.d.ts → emailManager-fHASH6uo.d.ts} +3 -3
- package/dist/{emailStateMachine-758f34gg.esm.js → emailStateMachine-fqJ42b19.esm.js} +5 -5
- package/dist/{endpoints-BM2_j_IE.esm.js → endpoints-BzMJFAPV.esm.js} +13 -0
- package/dist/{events-DN-u67gb.esm.js → events-CqGY1yMq.esm.js} +2 -188
- package/dist/events.d.ts +2 -0
- package/dist/events.esm.js +3 -2
- package/dist/extensibility.d.ts +37 -26
- package/dist/extensibility.esm.js +74 -59
- package/dist/{externalFetch-crimxkN9.esm.js → externalFetch-CyhBfD-n.esm.js} +1 -1
- package/dist/face-match.d.ts +2 -2
- package/dist/face-match.esm.js +6 -5
- package/dist/{faceCaptureManagerFactory-BNXZchWX.esm.js → faceCaptureManagerFactory-2brKTzMb.esm.js} +25 -16
- package/dist/faceCaptureManagerFactory-CGKbf7zt.d.ts +400 -0
- package/dist/{faceCaptureSetup-Dqb09D24.esm.js → faceCaptureSetup-CDUVU1nl.esm.js} +97 -13
- package/dist/{faceMatchStateMachine-FikRaUZH.esm.js → faceMatchStateMachine-DUeUjEPx.esm.js} +3 -3
- package/dist/field-comparison.d.ts +4 -3
- package/dist/field-comparison.esm.js +6 -5
- package/dist/{fieldComparisonManager-Dic0DVgl.esm.js → fieldComparisonManager-B9W0a9A5.esm.js} +5 -4
- package/dist/{fieldComparisonManager-BXc6-DJv.d.ts → fieldComparisonManager-DdLqDeB2.d.ts} +2 -2
- package/dist/fiscal-qr.d.ts +5 -3
- package/dist/fiscal-qr.esm.js +13 -12
- package/dist/flow-events.d.ts +8 -6
- package/dist/flow.d.ts +21 -13
- package/dist/flow.esm.js +28 -19
- package/dist/{flowCompletionService-CdGDKv0z.d.ts → flowCompletionService-BIqSTZcd.d.ts} +2 -1
- package/dist/{flowCompletionService-D_CsiDZM.esm.js → flowCompletionService-qEqh_g14.esm.js} +3 -3
- package/dist/{flowServices-ar5DXv71.esm.js → flowServices-C4piblgx.esm.js} +24 -9
- package/dist/geolocation.d.ts +4 -127
- package/dist/geolocation.esm.js +8 -115
- package/dist/geolocationManager-BP2Do9O-.esm.js +123 -0
- package/dist/geolocationManager-Cs50eRlC.d.ts +156 -0
- package/dist/{geolocationStateMachine-BWjrMGS_.esm.js → geolocationStateMachine-BYfOOOG0.esm.js} +4 -4
- package/dist/{getDeviceClass-rXKlXywy.esm.js → getDeviceClass-DGGzzfqm.esm.js} +1 -1
- package/dist/getDeviceData-TrKM8NPh.esm.js +101 -0
- package/dist/government-validation.d.ts +4 -3
- package/dist/government-validation.esm.js +8 -7
- package/dist/{governmentValidationStateMachine-BoF7U1of.esm.js → governmentValidationStateMachine-CwoPPO8b.esm.js} +5 -5
- package/dist/home.d.ts +18 -15
- package/dist/home.esm.js +4 -3
- package/dist/http.esm.js +2 -2
- package/dist/id-ocr.d.ts +4 -625
- package/dist/id-ocr.esm.js +8 -84
- package/dist/id-verification.d.ts +28 -27
- package/dist/id-verification.esm.js +6 -5
- package/dist/id.d.ts +16 -11
- package/dist/id.esm.js +39 -32
- package/dist/idCaptureDefaults-DNJON8Xo.esm.js +188 -0
- package/dist/{idCaptureManager-BvGUSN2e.d.ts → idCaptureManager-BVdvfJys.d.ts} +40 -10
- package/dist/{idCaptureManager-Bm6Wm6Qv.esm.js → idCaptureManager-Bo9DCQSU.esm.js} +14 -11
- package/dist/{idCaptureStateMachine-D1YhOj6n.esm.js → idCaptureStateMachine-BeDidMLU.esm.js} +395 -382
- package/dist/idOcrManager-BkRDrpZu.esm.js +92 -0
- package/dist/idOcrManager-CJzrmM91.d.ts +641 -0
- package/dist/{idOcrStateMachine-YMCDGplq.esm.js → idOcrStateMachine-DRZc4FBl.esm.js} +5 -5
- package/dist/{idVerificationStateMachine-Bo1IYuZH.esm.js → idVerificationStateMachine-oqiERKpg.esm.js} +3 -3
- package/dist/identity-reuse.d.ts +4 -3
- package/dist/identity-reuse.esm.js +7 -6
- package/dist/{identityReuseManager-D0knIrOy.esm.js → identityReuseManager-Bu62LToE.esm.js} +4 -3
- package/dist/{identityReuseManager-DcWSvC-A.d.ts → identityReuseManager-TWKbXuvY.d.ts} +33 -33
- package/dist/{identityReuseStateMachine-CSQfZOqD.esm.js → identityReuseStateMachine-BmONeF6B.esm.js} +3 -3
- package/dist/{index-BgxYUYuD.d.ts → index-DtUlD-bz.d.ts} +2 -2
- package/dist/{index-DV134v62.d.ts → index-Icld-cKW.d.ts} +175 -295
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +16 -13
- package/dist/{invokeOnCaptureCallback-Dzemudhk.esm.js → invokeOnCaptureCallback-v_PV_IJz.esm.js} +1 -1
- package/dist/{lib-7ZQ9BdKH.esm.js → lib-B050WTth.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +10 -7
- package/dist/mandatory-consent.esm.js +7 -6
- package/dist/{mandatoryConsentManager-Tzl5Qd35.d.ts → mandatoryConsentManager-Bmdjo14S.d.ts} +50 -50
- package/dist/{mandatoryConsentManager-Lon46nPQ.esm.js → mandatoryConsentManager-CQ3jirlZ.esm.js} +4 -3
- package/dist/{mandatoryConsentStateMachine-D_dZ7IF6.esm.js → mandatoryConsentStateMachine-DkJJLHqC.esm.js} +3 -3
- package/dist/mediaRecorderOptions-C3NAkVgK.esm.js +42 -0
- package/dist/mediapipeShared-CRAKVElv.esm.js +67 -0
- package/dist/{recordingService-CxMJP4tQ.esm.js → onDeviceFaceResults-DVBggeq8.esm.js} +71 -389
- package/dist/{openviduLazy-oAXXI9w_.esm.js → openviduLazy-BTOIauGP.esm.js} +2 -2
- package/dist/openviduLazy-Dov8oKfL.esm.js +3 -0
- package/dist/{permissionGuards-D-Z-lgNj.esm.js → permissionGuards-BR2oN573.esm.js} +1 -1
- package/dist/{permissionServices-CPDboRoE.esm.js → permissionServices-BJhGL13R.esm.js} +7 -4
- package/dist/personhood.d.ts +534 -0
- package/dist/personhood.esm.js +1494 -0
- package/dist/phone.d.ts +5 -4
- package/dist/phone.esm.js +9 -8
- package/dist/{phoneManager-TSq1Ief6.d.ts → phoneManager-BOTcjXgs.d.ts} +3 -3
- package/dist/{phoneManager-Blt4Oc2P.esm.js → phoneManager-BWlxqbyD.esm.js} +5 -4
- package/dist/{phoneStateMachine-W3c6Z8sj.esm.js → phoneStateMachine-B_V9nODs.esm.js} +5 -5
- package/dist/{qe-signature-CQLK6LKE.esm.js → qe-signature-BhFnI9pT.esm.js} +1 -1
- package/dist/qe-signature.d.ts +4 -3
- package/dist/qe-signature.esm.js +10 -9
- package/dist/recordingService-m_1xCthr.esm.js +347 -0
- package/dist/redirect-to-mobile.d.ts +4 -3
- package/dist/redirect-to-mobile.esm.js +9 -8
- package/dist/{redirectToMobileManager-DCvpKdkD.esm.js → redirectToMobileManager-BaAo9rgi.esm.js} +5 -4
- package/dist/{redirectToMobileManager-yOHAmwg-.d.ts → redirectToMobileManager-Br0KZK1G.d.ts} +2 -2
- package/dist/{redirectToMobileStateMachine-DC9z4Vfu.esm.js → redirectToMobileStateMachine-DoAnf2ql.esm.js} +10 -12
- package/dist/{runChildModule-C9G0wfVC.esm.js → runChildModule-0nQfjVVo.esm.js} +3 -3
- package/dist/selfie.d.ts +19 -12
- package/dist/selfie.esm.js +34 -28
- package/dist/{selfieManager-BRL6c_Oc.esm.js → selfieManager-D_ZFERsE.esm.js} +6 -6
- package/dist/{selfieManager-imY2dAcH.d.ts → selfieManager-R0Jw5sjb.d.ts} +3 -3
- package/dist/{selfieStateMachine-D2Q0uwDK.esm.js → selfieStateMachine-CIgeeiN9.esm.js} +4 -4
- package/dist/{session-Be_IA1e0.esm.js → session-9jIfKFCc.esm.js} +3 -3
- package/dist/session.d.ts +7 -5
- package/dist/session.esm.js +16 -14
- package/dist/{sessionInitializer-CaiGA8GP.esm.js → sessionInitializer-C_TYIgyk.esm.js} +11 -107
- package/dist/{setup-BJZAkajt.d.ts → setup-CpRnXxn8.d.ts} +16 -3
- package/dist/setup-DHc6OaHm.esm.js +562 -0
- package/dist/signature.d.ts +3 -2
- package/dist/signature.esm.js +6 -5
- package/dist/{signatureStateMachine-DAxXmMrk.esm.js → signatureStateMachine-DtoiPzys.esm.js} +3 -3
- package/dist/{stats-DntyIiGr.esm.js → stats-CYcScXcO.esm.js} +2 -2
- package/dist/stats.esm.js +3 -3
- package/dist/thumbmarkAdapter-fHBUDlAP.esm.js +1194 -0
- package/dist/{tri-CtxWthxz.esm.js → tri-BG1iJsr4.esm.js} +12 -2
- package/dist/tri.d.ts +1 -1
- package/dist/{tri.esm-CrWAulDi.esm.js → tri.esm-DUC01NgO.esm.js} +27 -23
- package/dist/tri.esm.js +2 -2
- package/dist/trust-graph.d.ts +4 -3
- package/dist/trust-graph.esm.js +4 -3
- package/dist/{types-DpTWgfKY.d.ts → types-BklZ_Wne.d.ts} +1 -1
- package/dist/{types-Dv-9WPJX.d.ts → types-BsYXnC5s.d.ts} +39 -3
- package/dist/types-CxW2e0Ar.d.ts +132 -0
- package/dist/{types-Z9wv19v2.d.ts → types-DgGlgyZT.d.ts} +1 -1
- package/dist/types-ElOJAGaM.esm.js +189 -0
- package/dist/video-C2WIj6TS.esm.js +36 -0
- package/dist/video-selfie.d.ts +351 -0
- package/dist/video-selfie.esm.js +1509 -0
- package/dist/videoSelfieSteps-7M5vxKn-.esm.js +58 -0
- package/dist/{warmup--6HA3yUR.d.ts → warmup-BJZPQIiX.d.ts} +5 -1
- package/dist/wasm.d.ts +4 -4
- package/dist/wasm.esm.js +17 -14
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +6 -5
- package/dist/watchlist.d.ts +2 -1
- package/dist/watchlist.esm.js +6 -5
- package/dist/{watchlistForBusinessStateMachine-DtefJb-D.esm.js → watchlistForBusinessStateMachine-DvEunDxs.esm.js} +3 -3
- package/dist/{watchlistStateMachine-B0aIS2_n.esm.js → watchlistStateMachine-AHXVf-TB.esm.js} +3 -3
- package/dist/workflow.d.ts +230 -98
- package/dist/workflow.esm.js +123 -79
- package/dist/{xstate.esm-Dkm1jy5u.esm.js → xstate.esm-Bomq1a0z.esm.js} +41 -1
- package/package.json +16 -1
- package/dist/IpifyProvider-oZf7Ke1O.esm.js +0 -167
- package/dist/camera-x4LjGTjZ.esm.js +0 -22
- package/dist/deepsightService-ByNKY5Jv.d.ts +0 -276
- package/dist/faceCaptureManagerFactory-CL-7T_vH.d.ts +0 -731
- package/dist/getBrowser-Dv8LZyHE.esm.js +0 -8
- package/dist/openviduLazy-B_s6jnEk.esm.js +0 -3
- package/dist/setup-C7tintPc.esm.js +0 -1064
- /package/dist/{Actor-fIPLXfoi.d.ts → Actor-CGEelYtQ.d.ts} +0 -0
- /package/dist/{BrowserTimerProvider-BVgutW_b.esm.js → BrowserTimerProvider-CHloo0eQ.esm.js} +0 -0
- /package/dist/{ITimerCapability-BvH0pDwp.esm.js → ITimerCapability-pltuG1E8.esm.js} +0 -0
- /package/dist/{MotionSensorProvider-C9fPAJdS.esm.js → MotionSensorProvider-DCbId4De.esm.js} +0 -0
- /package/dist/{apiError-D-GTvFrH.esm.js → apiError-DNS2OCEX.esm.js} +0 -0
- /package/dist/{camera-biGPWlmx.d.ts → camera-CNVUo-bC.d.ts} +0 -0
- /package/dist/{canvas-7uX2izHb.esm.js → canvas-_I95hkPg.esm.js} +0 -0
- /package/dist/{chunk-BK1xu56N.esm.js → chunk-CIKcdghV.esm.js} +0 -0
- /package/dist/{cpf-xBg-DFNn.esm.js → cpf-BKaho0j_.esm.js} +0 -0
- /package/dist/{dateUtils-8dCcuArE.esm.js → dateUtils-7-tQYRNN.esm.js} +0 -0
- /package/dist/{getDeviceClass-C0zrM97a.esm.js → getDeviceClass-DavNdcxh.esm.js} +0 -0
- /package/dist/{http-CfVTgMfU.esm.js → http-BkiUT7EB.esm.js} +0 -0
- /package/dist/{index-52_qi4bd.d.ts → index-XTtxaahe.d.ts} +0 -0
- /package/dist/{otp-D87RTwrx.esm.js → otp-Bfnzf7I3.esm.js} +0 -0
- /package/dist/{otp-BHJnjEEc.d.ts → otp-M4iy57XY.d.ts} +0 -0
- /package/dist/{platform-BfoqeM61.esm.js → platform-uIVQUnJP.esm.js} +0 -0
- /package/dist/{types-BdVOWGGW.esm.js → types-CMcxlSmH.esm.js} +0 -0
- /package/dist/{types-DYZja-k9.d.ts → types-D_IceWxT.d.ts} +0 -0
- /package/dist/{types-F0IXbaCB.d.ts → types-Duy2rDxF.d.ts} +0 -0
- /package/dist/{urlUtils-8RNHyW3x.esm.js → urlUtils-BZqFU9rR.esm.js} +0 -0
package/dist/flow-events.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import "./camera-
|
|
2
|
-
import "./types-
|
|
3
|
-
import "./types-
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
1
|
+
import "./camera-CNVUo-bC.js";
|
|
2
|
+
import "./types-DgGlgyZT.js";
|
|
3
|
+
import "./types-D_IceWxT.js";
|
|
4
|
+
import "./canvas-CJUmoXSD.js";
|
|
5
|
+
import "./createFaceAvatar-B8pFpy6o.js";
|
|
6
|
+
import "./types-BsYXnC5s.js";
|
|
7
|
+
import "./flowCompletionService-BIqSTZcd.js";
|
|
8
|
+
import { a as FlowEventListener, c as FlowModuleStartedEvent, i as FlowEvent, l as FlowReadyEvent, n as FlowCompletedEvent, o as FlowEventSubscribable, r as FlowErrorEvent, s as FlowModuleCompletedEvent, t as FlowClosedEvent, u as FlowStartedEvent } from "./index-DtUlD-bz.js";
|
|
7
9
|
export { FlowClosedEvent, FlowCompletedEvent, FlowErrorEvent, FlowEvent, FlowEventListener, FlowEventSubscribable, FlowModuleCompletedEvent, FlowModuleStartedEvent, FlowReadyEvent, FlowStartedEvent };
|
package/dist/flow.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { n as WasmPipeline } from "./warmup
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./types-
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { n as
|
|
10
|
-
import
|
|
1
|
+
import { n as WasmPipeline } from "./warmup-BJZPQIiX.js";
|
|
2
|
+
import { t as AnyStateMachine } from "./StateMachine-C_AY4cs7.js";
|
|
3
|
+
import { t as Manager } from "./Manager-CJ3G2zqi.js";
|
|
4
|
+
import "./camera-CNVUo-bC.js";
|
|
5
|
+
import "./types-DgGlgyZT.js";
|
|
6
|
+
import "./types-D_IceWxT.js";
|
|
7
|
+
import "./canvas-CJUmoXSD.js";
|
|
8
|
+
import "./createFaceAvatar-B8pFpy6o.js";
|
|
9
|
+
import { i as FlowModuleConfig, n as Flow, r as FlowModule } from "./types-BsYXnC5s.js";
|
|
10
|
+
import { a as TotalScore, c as getTotalScoreStatus, n as FinishStatus, o as classifyScoreStatus, r as GetFinishStatusFn, t as FinishScreenVariant } from "./flowCompletionService-BIqSTZcd.js";
|
|
11
|
+
import { o as FlowEventSubscribable } from "./index-DtUlD-bz.js";
|
|
12
|
+
import { n as ModuleRegistry } from "./types-BklZ_Wne.js";
|
|
13
|
+
import * as xstate1068 from "xstate";
|
|
11
14
|
|
|
12
15
|
//#region src/modules/flow/flowUtils.d.ts
|
|
13
16
|
type NormalizeFlowModulesOptions = {
|
|
@@ -59,7 +62,7 @@ type GetFlow = (signal: AbortSignal, options?: GetFlowOptions) => Promise<Flow>;
|
|
|
59
62
|
declare const getFlow: GetFlow;
|
|
60
63
|
//#endregion
|
|
61
64
|
//#region src/modules/flow/noOpFlowModuleMachine.d.ts
|
|
62
|
-
declare const noOpFlowModuleMachine:
|
|
65
|
+
declare const noOpFlowModuleMachine: xstate1068.StateMachine<xstate1068.MachineContext, xstate1068.AnyEventObject, {}, never, never, never, never, "finished", string, xstate1068.NonReducibleUnknown, xstate1068.NonReducibleUnknown, xstate1068.EventObject, xstate1068.MetaObject, {
|
|
63
66
|
readonly id: "noOpFlowModule";
|
|
64
67
|
readonly initial: "finished";
|
|
65
68
|
readonly states: {
|
|
@@ -261,6 +264,11 @@ type OrchestratedFlowLoadingState = {
|
|
|
261
264
|
homeScreen: OrchestratedFlowHomeScreen;
|
|
262
265
|
presentation: OrchestratedFlowPresentation;
|
|
263
266
|
};
|
|
267
|
+
type OrchestratedFlowCompletingState = {
|
|
268
|
+
status: 'completing';
|
|
269
|
+
homeScreen: OrchestratedFlowHomeScreen;
|
|
270
|
+
presentation: OrchestratedFlowPresentation;
|
|
271
|
+
};
|
|
264
272
|
type OrchestratedFlowReadyState = {
|
|
265
273
|
status: 'ready';
|
|
266
274
|
flow: Flow;
|
|
@@ -293,7 +301,7 @@ type OrchestratedFlowErrorState = {
|
|
|
293
301
|
homeScreen: OrchestratedFlowHomeScreen;
|
|
294
302
|
presentation: OrchestratedFlowPresentation;
|
|
295
303
|
};
|
|
296
|
-
type OrchestratedFlowState = OrchestratedFlowIdleState | OrchestratedFlowLoadingState | OrchestratedFlowReadyState | OrchestratedFlowFinishedState | OrchestratedFlowErrorState;
|
|
304
|
+
type OrchestratedFlowState = OrchestratedFlowIdleState | OrchestratedFlowLoadingState | OrchestratedFlowCompletingState | OrchestratedFlowReadyState | OrchestratedFlowFinishedState | OrchestratedFlowErrorState;
|
|
297
305
|
type CreateOrchestratedFlowActorOptions = {
|
|
298
306
|
getFlow?: GetFlowFn;
|
|
299
307
|
modules?: ModuleRegistry;
|
|
@@ -373,4 +381,4 @@ declare function createOrchestratedFlowManager(options: CreateOrchestratedFlowAc
|
|
|
373
381
|
continueFromHome(): Promise<void>;
|
|
374
382
|
} & FlowEventSubscribable;
|
|
375
383
|
//#endregion
|
|
376
|
-
export { type FinishScreenVariant, type FinishStatus, type Flow, type FlowModule, type FlowModuleConfig, type FlowReadyState, type FlowState, type LazyModule, type LazyModuleRegistry, type ModuleLoader, type ModuleLoaderRegistry, type ModuleRegistry, type OrchestratedFlowFinishedState, type OrchestratedFlowHomeScreen, type OrchestratedFlowInput, type OrchestratedFlowPresentation, type OrchestratedFlowReadyState, type OrchestratedFlowState, type TotalScore, classifyScoreStatus, createFlowManager, createModuleLoader, createOrchestratedFlowManager, getFlow, getRequiredWasmPipelines, getTotalScoreStatus, noOpFlowModuleMachine, normalizeFlowModules };
|
|
384
|
+
export { type FinishScreenVariant, type FinishStatus, type Flow, type FlowModule, type FlowModuleConfig, type FlowReadyState, type FlowState, type LazyModule, type LazyModuleRegistry, type ModuleLoader, type ModuleLoaderRegistry, type ModuleRegistry, type OrchestratedFlowCompletingState, type OrchestratedFlowFinishedState, type OrchestratedFlowHomeScreen, type OrchestratedFlowInput, type OrchestratedFlowPresentation, type OrchestratedFlowReadyState, type OrchestratedFlowState, type TotalScore, classifyScoreStatus, createFlowManager, createModuleLoader, createOrchestratedFlowManager, getFlow, getRequiredWasmPipelines, getTotalScoreStatus, noOpFlowModuleMachine, normalizeFlowModules };
|
package/dist/flow.esm.js
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import "./BrowserTimerProvider-
|
|
2
|
-
import "./api-
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./browserSimulation-
|
|
8
|
-
import "./sessionInitializer-
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
1
|
+
import "./BrowserTimerProvider-CHloo0eQ.esm.js";
|
|
2
|
+
import "./api-DsbUi7TO.esm.js";
|
|
3
|
+
import { d as addEvent } from "./events-CqGY1yMq.esm.js";
|
|
4
|
+
import "./types-ElOJAGaM.esm.js";
|
|
5
|
+
import "./endpoints-BzMJFAPV.esm.js";
|
|
6
|
+
import "./stats-CYcScXcO.esm.js";
|
|
7
|
+
import "./browserSimulation-TsSoavQv.esm.js";
|
|
8
|
+
import "./sessionInitializer-C_TYIgyk.esm.js";
|
|
9
|
+
import "./getDeviceData-TrKM8NPh.esm.js";
|
|
10
|
+
import "./thumbmarkAdapter-fHBUDlAP.esm.js";
|
|
11
|
+
import "./IpifyProvider-BRW14_uo.esm.js";
|
|
12
|
+
import "./platform-uIVQUnJP.esm.js";
|
|
13
|
+
import "./tri-BG1iJsr4.esm.js";
|
|
14
|
+
import { a as fromPromise, l as createManager, r as assign, s as createActor, t as setup } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
15
|
+
import "./apiError-DNS2OCEX.esm.js";
|
|
16
|
+
import "./types-CMcxlSmH.esm.js";
|
|
17
|
+
import "./session-9jIfKFCc.esm.js";
|
|
18
|
+
import "./videoSelfieSteps-7M5vxKn-.esm.js";
|
|
19
|
+
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-C4piblgx.esm.js";
|
|
20
|
+
import { n as getFinishStatus, r as getTotalScoreStatus, t as classifyScoreStatus } from "./flowCompletionService-qEqh_g14.esm.js";
|
|
21
|
+
import { n as isAdvanceableError, r as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-0nQfjVVo.esm.js";
|
|
19
22
|
|
|
20
23
|
//#region src/modules/flow/noOpFlowModuleMachine.ts
|
|
21
24
|
const noOpFlowModuleMachine = setup({}).createMachine({
|
|
@@ -681,7 +684,8 @@ function deriveUiModel(snapshot, mappedStatus, isHomePhase, options) {
|
|
|
681
684
|
function getMappedStatus(snapshot) {
|
|
682
685
|
const { value } = snapshot;
|
|
683
686
|
if (value === "idle") return "idle";
|
|
684
|
-
if (value === "
|
|
687
|
+
if (value === "completing") return "completing";
|
|
688
|
+
if (value === "loading" || value === "resolvingModule" || typeof value === "object") return "loading";
|
|
685
689
|
if (value === "finished") return "finished";
|
|
686
690
|
if (value === "error") return "error";
|
|
687
691
|
return "ready";
|
|
@@ -700,6 +704,11 @@ function mapOrchestratedFlowState(snapshot, uiOptions) {
|
|
|
700
704
|
homeScreen: uiModel.homeScreen,
|
|
701
705
|
presentation: uiModel.presentation
|
|
702
706
|
};
|
|
707
|
+
if (mappedStatus === "completing") return {
|
|
708
|
+
status: "completing",
|
|
709
|
+
homeScreen: uiModel.homeScreen,
|
|
710
|
+
presentation: uiModel.presentation
|
|
711
|
+
};
|
|
703
712
|
if (mappedStatus === "finished") return {
|
|
704
713
|
status: "finished",
|
|
705
714
|
flow: context.flow ?? {},
|
|
@@ -21,7 +21,8 @@ type TotalScore = 'OK' | 'WARN' | 'MANUAL_OK' | 'FAIL' | 'UNKNOWN' | 'MANUAL_FAI
|
|
|
21
21
|
type FinishScreenVariant = 'success' | 'error' | 'review';
|
|
22
22
|
/** Maps a session's `TotalScore` to the finish-screen variant; unknown or absent → `error`. */
|
|
23
23
|
declare function classifyScoreStatus(score: TotalScore | undefined): FinishScreenVariant;
|
|
24
|
+
type GetTotalScoreStatusFn = (signal?: AbortSignal) => Promise<TotalScore>;
|
|
24
25
|
/** Fetches the session's overall score status via a lighter read-only GET. */
|
|
25
26
|
declare function getTotalScoreStatus(signal?: AbortSignal): Promise<TotalScore>;
|
|
26
27
|
//#endregion
|
|
27
|
-
export {
|
|
28
|
+
export { TotalScore as a, getTotalScoreStatus as c, GetTotalScoreStatusFn as i, FinishStatus as n, classifyScoreStatus as o, GetFinishStatusFn as r, getFinishStatus as s, FinishScreenVariant as t };
|
package/dist/{flowCompletionService-D_CsiDZM.esm.js → flowCompletionService-qEqh_g14.esm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { n as toIncodeApiError } from "./apiError-
|
|
1
|
+
import { t as api } from "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-BzMJFAPV.esm.js";
|
|
3
|
+
import { n as toIncodeApiError } from "./apiError-DNS2OCEX.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/flow/flowCompletionService.ts
|
|
6
6
|
const getFinishStatus = async (flowId, signal) => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { n as getSessionFingerprintResult, r as initializeSession } from "./sessionInitializer-
|
|
4
|
-
import { n as toIncodeApiError } from "./apiError-
|
|
1
|
+
import { t as api } from "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-BzMJFAPV.esm.js";
|
|
3
|
+
import { n as getSessionFingerprintResult, r as initializeSession } from "./sessionInitializer-C_TYIgyk.esm.js";
|
|
4
|
+
import { n as toIncodeApiError } from "./apiError-DNS2OCEX.esm.js";
|
|
5
|
+
import { r as videoSelfieWasmPipelines } from "./videoSelfieSteps-7M5vxKn-.esm.js";
|
|
5
6
|
|
|
6
7
|
//#region src/modules/flow/flowUtils.ts
|
|
7
8
|
const WASM_MODULE_PIPELINES = {
|
|
8
9
|
SELFIE: "selfie",
|
|
9
10
|
AUTHENTICATION: "selfie",
|
|
10
11
|
FACE_MATCH: "selfie",
|
|
11
|
-
VIDEO_ONBOARDING: "selfie",
|
|
12
12
|
ID: "idCapture",
|
|
13
13
|
TUTORIAL_ID: "idCapture",
|
|
14
14
|
SECOND_ID: "idCapture"
|
|
@@ -18,6 +18,9 @@ function isOnDeviceFaceModule(module) {
|
|
|
18
18
|
if (!FACE_MODULES_WITH_ON_DEVICE_VARIANT.has(module.key)) return false;
|
|
19
19
|
return module.configuration?.onDeviceFaceResultsSubmissionEnabled === true;
|
|
20
20
|
}
|
|
21
|
+
function isVideoOnboardingModule(module) {
|
|
22
|
+
return module.key === "VIDEO_ONBOARDING";
|
|
23
|
+
}
|
|
21
24
|
/**
|
|
22
25
|
* Analyzes a flow configuration and returns the WASM pipelines needed.
|
|
23
26
|
* Use this to conditionally warmup WASM only when required by the flow.
|
|
@@ -44,6 +47,10 @@ function getRequiredWasmPipelines(flow) {
|
|
|
44
47
|
pipelines.add("onDeviceSelfie");
|
|
45
48
|
continue;
|
|
46
49
|
}
|
|
50
|
+
if (isVideoOnboardingModule(module)) {
|
|
51
|
+
for (const p of videoSelfieWasmPipelines(module.configuration)) pipelines.add(p);
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
47
54
|
const pipeline = WASM_MODULE_PIPELINES[module.key];
|
|
48
55
|
if (pipeline) pipelines.add(pipeline);
|
|
49
56
|
}
|
|
@@ -62,6 +69,7 @@ function normalizeFlowModules(flow, options = {}) {
|
|
|
62
69
|
let modules = normalizeIdModules(flow.flowModules);
|
|
63
70
|
modules = normalizeCpfModules(modules, options);
|
|
64
71
|
modules = dropWatchlistBusinessIfEkyb(modules);
|
|
72
|
+
modules = dropSelfieIfVideoSelfieUsesAsSelfie(modules);
|
|
65
73
|
if (shouldInjectRedirect(flow, modules, options)) modules = addRedirect(flow, modules, options);
|
|
66
74
|
return modules;
|
|
67
75
|
}
|
|
@@ -74,6 +82,17 @@ function dropWatchlistBusinessIfEkyb(modules) {
|
|
|
74
82
|
if (!hasModule(modules, "EKYB")) return modules;
|
|
75
83
|
return modules.filter((m) => m.key !== "WATCHLIST_BUSINESS");
|
|
76
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Drops standalone SELFIE modules when a VIDEO_ONBOARDING module has
|
|
87
|
+
* `useAsSelfie: true`. The video-selfie sequence captures the onboarding selfie
|
|
88
|
+
* itself (its own `selfie` step), so a separate SELFIE step would be redundant.
|
|
89
|
+
* Only SELFIE is removed (not AUTHENTICATION / FACE_MATCH). Mirrors legacy
|
|
90
|
+
* flowService `removeSelfie`.
|
|
91
|
+
*/
|
|
92
|
+
function dropSelfieIfVideoSelfieUsesAsSelfie(modules) {
|
|
93
|
+
if (!modules.some((m) => m.key === "VIDEO_ONBOARDING" && m.configuration.useAsSelfie === true)) return modules;
|
|
94
|
+
return modules.filter((m) => m.key !== "SELFIE");
|
|
95
|
+
}
|
|
77
96
|
function normalizeIdModules(modules) {
|
|
78
97
|
return modules.flatMap((module, idx, arr) => {
|
|
79
98
|
if (module.key === "TUTORIAL_ID") {
|
|
@@ -179,10 +198,6 @@ const getFlow = async (signal, options = {}) => {
|
|
|
179
198
|
if (data.mandatoryConsentCheck !== false) await sessionPromise;
|
|
180
199
|
const flow = prependMandatoryConsent(data);
|
|
181
200
|
const normalizedModules = normalizeFlowModules(flow, options);
|
|
182
|
-
console.log({
|
|
183
|
-
...flow,
|
|
184
|
-
flowModules: normalizedModules
|
|
185
|
-
});
|
|
186
201
|
return {
|
|
187
202
|
...flow,
|
|
188
203
|
flowModules: normalizedModules
|
package/dist/geolocation.d.ts
CHANGED
|
@@ -1,128 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type GeolocationCoords = {
|
|
6
|
-
latitude: number;
|
|
7
|
-
longitude: number;
|
|
8
|
-
};
|
|
9
|
-
type IGeolocationCapability = {
|
|
10
|
-
getCurrentPosition(): Promise<GeolocationCoords>;
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/modules/geolocation/types.d.ts
|
|
14
|
-
/**
|
|
15
|
-
* Configuration options for the Geolocation module.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const config: GeolocationConfig = {
|
|
20
|
-
* allowUserToSkipGeolocation: true,
|
|
21
|
-
* };
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
type GeolocationConfig = {
|
|
25
|
-
/**
|
|
26
|
-
* Whether the user is allowed to skip geolocation capture.
|
|
27
|
-
* When true, a skip button is shown on the permission-denied screen.
|
|
28
|
-
* Backend field name from flow/workflow configuration.
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
allowUserToSkipGeolocation?: boolean;
|
|
32
|
-
};
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region src/modules/geolocation/geolocationStateMachine.d.ts
|
|
35
|
-
type GeolocationDeviceType = 'ios' | 'android' | 'desktop';
|
|
36
|
-
declare const geolocationMachine: any;
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/modules/geolocation/geolocationActor.d.ts
|
|
39
|
-
type CreateGeolocationActorOptions = {
|
|
40
|
-
config: GeolocationConfig;
|
|
41
|
-
geolocation?: IGeolocationCapability;
|
|
42
|
-
};
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/modules/geolocation/geolocationManager.d.ts
|
|
45
|
-
|
|
46
|
-
/** Geolocation manager is in initial state, waiting for `request()` to be called */
|
|
47
|
-
type GeolocationIdleState = {
|
|
48
|
-
status: 'idle';
|
|
49
|
-
};
|
|
50
|
-
/** Browser geolocation permission prompt is active */
|
|
51
|
-
type GeolocationRequestingState = {
|
|
52
|
-
status: 'requestingLocation';
|
|
53
|
-
};
|
|
54
|
-
/** Coordinates are being submitted to the backend */
|
|
55
|
-
type GeolocationSubmittingState = {
|
|
56
|
-
status: 'submitting';
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Location successfully acquired — call `continue()` to proceed
|
|
60
|
-
* @property location - Location name returned from backend, or null
|
|
61
|
-
*/
|
|
62
|
-
type GeolocationAcquiredState = {
|
|
63
|
-
status: 'locationAcquired';
|
|
64
|
-
location: string | null;
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* User denied geolocation permission — shows device-specific instructions
|
|
68
|
-
* @property deviceType - Used by UI to render the correct instruction panel
|
|
69
|
-
* @property canSkip - Whether the skip button should be shown
|
|
70
|
-
*/
|
|
71
|
-
type GeolocationPermissionDeniedState = {
|
|
72
|
-
status: 'permissionDenied';
|
|
73
|
-
deviceType: GeolocationDeviceType;
|
|
74
|
-
canSkip: boolean;
|
|
75
|
-
};
|
|
76
|
-
/** Geolocation flow completed successfully */
|
|
77
|
-
type GeolocationFinishedState = {
|
|
78
|
-
status: 'finished';
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Union of all possible geolocation manager states.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```typescript
|
|
85
|
-
* const state = geolocationManager.getState();
|
|
86
|
-
* if (state.status === 'locationAcquired') {
|
|
87
|
-
* console.log(state.location);
|
|
88
|
-
* }
|
|
89
|
-
* if (state.status === 'permissionDenied') {
|
|
90
|
-
* console.log(state.deviceType); // 'ios' | 'android' | 'desktop'
|
|
91
|
-
* }
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
type GeolocationState = GeolocationIdleState | GeolocationRequestingState | GeolocationSubmittingState | GeolocationAcquiredState | GeolocationPermissionDeniedState | GeolocationFinishedState;
|
|
95
|
-
/**
|
|
96
|
-
* Creates a geolocation manager for headless or UI-driven usage.
|
|
97
|
-
*
|
|
98
|
-
* @example Headless usage
|
|
99
|
-
* ```typescript
|
|
100
|
-
* const manager = createGeolocationManager({ config: { allowUserToSkipGeolocation: true } });
|
|
101
|
-
* manager.subscribe((state) => console.log(state.status));
|
|
102
|
-
* manager.request();
|
|
103
|
-
* ```
|
|
104
|
-
*/
|
|
105
|
-
declare function createGeolocationManager(options: CreateGeolocationActorOptions): Manager<GeolocationState> & {
|
|
106
|
-
/**
|
|
107
|
-
* Initiates the browser geolocation permission request.
|
|
108
|
-
* Transitions from 'idle' to 'requestingLocation'.
|
|
109
|
-
*/
|
|
110
|
-
request(): void;
|
|
111
|
-
/**
|
|
112
|
-
* Confirms the acquired location and completes the module.
|
|
113
|
-
* Should be called when state is 'locationAcquired'.
|
|
114
|
-
*/
|
|
115
|
-
continue(): void;
|
|
116
|
-
/**
|
|
117
|
-
* Skips geolocation when the user has denied permission.
|
|
118
|
-
* Only works when `config.allowUserToSkipGeolocation` is true.
|
|
119
|
-
*/
|
|
120
|
-
skip(): void;
|
|
121
|
-
/**
|
|
122
|
-
* Resets the manager back to initial state.
|
|
123
|
-
*/
|
|
124
|
-
reset(): void;
|
|
125
|
-
};
|
|
126
|
-
type GeolocationManager = ReturnType<typeof createGeolocationManager>;
|
|
127
|
-
//#endregion
|
|
1
|
+
import "./StateMachine-C_AY4cs7.js";
|
|
2
|
+
import "./Manager-CJ3G2zqi.js";
|
|
3
|
+
import "./Actor-CGEelYtQ.js";
|
|
4
|
+
import { n as GeolocationState, o as geolocationMachine, r as createGeolocationManager, s as GeolocationConfig, t as GeolocationManager } from "./geolocationManager-Cs50eRlC.js";
|
|
128
5
|
export { type GeolocationConfig, type GeolocationManager, type GeolocationState, createGeolocationManager, geolocationMachine };
|
package/dist/geolocation.esm.js
CHANGED
|
@@ -1,117 +1,10 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import "./events-CqGY1yMq.esm.js";
|
|
3
|
+
import "./types-ElOJAGaM.esm.js";
|
|
4
|
+
import "./endpoints-BzMJFAPV.esm.js";
|
|
5
|
+
import "./platform-uIVQUnJP.esm.js";
|
|
6
|
+
import "./xstate.esm-Bomq1a0z.esm.js";
|
|
7
|
+
import { t as createGeolocationManager } from "./geolocationManager-BP2Do9O-.esm.js";
|
|
8
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-BYfOOOG0.esm.js";
|
|
7
9
|
|
|
8
|
-
//#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
|
|
9
|
-
var BrowserGeolocationProvider = class {
|
|
10
|
-
getCurrentPosition() {
|
|
11
|
-
return new Promise((resolve, reject) => {
|
|
12
|
-
navigator.geolocation.getCurrentPosition((pos) => resolve({
|
|
13
|
-
latitude: pos.coords.latitude,
|
|
14
|
-
longitude: pos.coords.longitude
|
|
15
|
-
}), reject);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/modules/geolocation/geolocationActor.ts
|
|
22
|
-
function createGeolocationActor(options) {
|
|
23
|
-
const geolocation = options.geolocation ?? new BrowserGeolocationProvider();
|
|
24
|
-
return createActor(geolocationMachine, { input: {
|
|
25
|
-
config: options.config,
|
|
26
|
-
geolocation
|
|
27
|
-
} }).start();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/modules/geolocation/geolocationManager.ts
|
|
32
|
-
/**
|
|
33
|
-
* Maps a Geolocation state-machine snapshot to the exact Figma "Tracked
|
|
34
|
-
* Events" screen name. Returned strings are the absolute analytics screen
|
|
35
|
-
* (module prefix included) and are emitted verbatim by
|
|
36
|
-
* `createManagerInstrumentation`'s `getEventScreenName` short-circuit.
|
|
37
|
-
*
|
|
38
|
-
* Source of truth: Geolocation Figma file → Tracked Events canvas
|
|
39
|
-
* (`https://www.figma.com/design/xg1t3GnUS95A4bLrM3lyOG/Geolocation---Latest-Design?node-id=2652-17008`).
|
|
40
|
-
*
|
|
41
|
-
* Deferred Figma screens that have no state-machine counterpart yet:
|
|
42
|
-
* `Geolocation.error.locationUnavailable` and `Geolocation.error.noNetwork`.
|
|
43
|
-
* Both kinds of failure currently collapse into `permissionDenied`
|
|
44
|
-
* (`requestPosition` `onError`) or `locationAcquired` with `location: null`
|
|
45
|
-
* (`submitPosition` `onError`), so the machine cannot distinguish them today.
|
|
46
|
-
*/
|
|
47
|
-
function getGeolocationScreenName(snapshot) {
|
|
48
|
-
const { value } = snapshot;
|
|
49
|
-
if (typeof value !== "string") return void 0;
|
|
50
|
-
switch (value) {
|
|
51
|
-
case "idle": return "Geolocation.default";
|
|
52
|
-
case "requestingLocation":
|
|
53
|
-
case "submitting": return "Geolocation.permission";
|
|
54
|
-
case "locationAcquired":
|
|
55
|
-
case "finished": return "Geolocation.continue";
|
|
56
|
-
case "permissionDenied": return "Geolocation.allowLocation";
|
|
57
|
-
default: return;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function mapState(snapshot) {
|
|
61
|
-
const typedSnapshot = snapshot;
|
|
62
|
-
const { context } = typedSnapshot;
|
|
63
|
-
if (typedSnapshot.matches("idle")) return { status: "idle" };
|
|
64
|
-
if (typedSnapshot.matches("requestingLocation")) return { status: "requestingLocation" };
|
|
65
|
-
if (typedSnapshot.matches("submitting")) return { status: "submitting" };
|
|
66
|
-
if (typedSnapshot.matches("locationAcquired")) return {
|
|
67
|
-
status: "locationAcquired",
|
|
68
|
-
location: context.location ?? null
|
|
69
|
-
};
|
|
70
|
-
if (typedSnapshot.matches("permissionDenied")) return {
|
|
71
|
-
status: "permissionDenied",
|
|
72
|
-
deviceType: context.deviceType,
|
|
73
|
-
canSkip: context.config.allowUserToSkipGeolocation === true
|
|
74
|
-
};
|
|
75
|
-
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
76
|
-
return { status: "idle" };
|
|
77
|
-
}
|
|
78
|
-
function createApi({ actor, trackElementClicked }) {
|
|
79
|
-
return {
|
|
80
|
-
request() {
|
|
81
|
-
trackElementClicked?.("request");
|
|
82
|
-
actor.send({ type: "REQUEST" });
|
|
83
|
-
},
|
|
84
|
-
continue() {
|
|
85
|
-
trackElementClicked?.("continue");
|
|
86
|
-
actor.send({ type: "CONTINUE" });
|
|
87
|
-
},
|
|
88
|
-
skip() {
|
|
89
|
-
trackElementClicked?.("skip");
|
|
90
|
-
actor.send({ type: "SKIP" });
|
|
91
|
-
},
|
|
92
|
-
reset() {
|
|
93
|
-
actor.send({ type: "RESET" });
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Creates a geolocation manager for headless or UI-driven usage.
|
|
99
|
-
*
|
|
100
|
-
* @example Headless usage
|
|
101
|
-
* ```typescript
|
|
102
|
-
* const manager = createGeolocationManager({ config: { allowUserToSkipGeolocation: true } });
|
|
103
|
-
* manager.subscribe((state) => console.log(state.status));
|
|
104
|
-
* manager.request();
|
|
105
|
-
* ```
|
|
106
|
-
*/
|
|
107
|
-
function createGeolocationManager(options) {
|
|
108
|
-
return createManager({
|
|
109
|
-
actor: createGeolocationActor(options),
|
|
110
|
-
mapState,
|
|
111
|
-
createApi,
|
|
112
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.geolocation, { getEventScreenName: getGeolocationScreenName })
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
//#endregion
|
|
117
10
|
export { createGeolocationManager, geolocationMachine };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { n as createManagerInstrumentation } from "./events-CqGY1yMq.esm.js";
|
|
2
|
+
import { n as eventModuleNames } from "./types-ElOJAGaM.esm.js";
|
|
3
|
+
import { l as createManager, s as createActor } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
4
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-BYfOOOG0.esm.js";
|
|
5
|
+
|
|
6
|
+
//#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
|
|
7
|
+
var BrowserGeolocationProvider = class {
|
|
8
|
+
getCurrentPosition() {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
navigator.geolocation.getCurrentPosition((pos) => resolve({
|
|
11
|
+
latitude: pos.coords.latitude,
|
|
12
|
+
longitude: pos.coords.longitude
|
|
13
|
+
}), reject);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/modules/geolocation/geolocationActor.ts
|
|
20
|
+
function createGeolocationActor(options) {
|
|
21
|
+
const geolocation = options.geolocation ?? new BrowserGeolocationProvider();
|
|
22
|
+
return createActor(geolocationMachine, { input: {
|
|
23
|
+
config: options.config,
|
|
24
|
+
geolocation
|
|
25
|
+
} }).start();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/modules/geolocation/geolocationManager.ts
|
|
30
|
+
/**
|
|
31
|
+
* Maps a Geolocation state-machine snapshot to the exact Figma "Tracked
|
|
32
|
+
* Events" screen name. Returned strings are the absolute analytics screen
|
|
33
|
+
* (module prefix included) and are emitted verbatim by
|
|
34
|
+
* `createManagerInstrumentation`'s `getEventScreenName` short-circuit.
|
|
35
|
+
*
|
|
36
|
+
* Source of truth: Geolocation Figma file → Tracked Events canvas
|
|
37
|
+
* (`https://www.figma.com/design/xg1t3GnUS95A4bLrM3lyOG/Geolocation---Latest-Design?node-id=2652-17008`).
|
|
38
|
+
*
|
|
39
|
+
* Deferred Figma screens that have no state-machine counterpart yet:
|
|
40
|
+
* `Geolocation.error.locationUnavailable` and `Geolocation.error.noNetwork`.
|
|
41
|
+
* Both kinds of failure currently collapse into `permissionDenied`
|
|
42
|
+
* (`requestPosition` `onError`) or `locationAcquired` with `location: null`
|
|
43
|
+
* (`submitPosition` `onError`), so the machine cannot distinguish them today.
|
|
44
|
+
*/
|
|
45
|
+
function getGeolocationScreenName(snapshot) {
|
|
46
|
+
const { value } = snapshot;
|
|
47
|
+
if (typeof value !== "string") return void 0;
|
|
48
|
+
switch (value) {
|
|
49
|
+
case "idle": return "Geolocation.default";
|
|
50
|
+
case "requestingLocation":
|
|
51
|
+
case "submitting": return "Geolocation.permission";
|
|
52
|
+
case "locationAcquired":
|
|
53
|
+
case "finished": return "Geolocation.continue";
|
|
54
|
+
case "permissionDenied": return "Geolocation.allowLocation";
|
|
55
|
+
default: return;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function mapState(snapshot) {
|
|
59
|
+
const typedSnapshot = snapshot;
|
|
60
|
+
const { context } = typedSnapshot;
|
|
61
|
+
if (typedSnapshot.matches("idle")) return { status: "idle" };
|
|
62
|
+
if (typedSnapshot.matches("requestingLocation")) return { status: "requestingLocation" };
|
|
63
|
+
if (typedSnapshot.matches("submitting")) return { status: "submitting" };
|
|
64
|
+
if (typedSnapshot.matches("locationAcquired")) return {
|
|
65
|
+
status: "locationAcquired",
|
|
66
|
+
location: context.location ?? null
|
|
67
|
+
};
|
|
68
|
+
if (typedSnapshot.matches("permissionDenied")) return {
|
|
69
|
+
status: "permissionDenied",
|
|
70
|
+
deviceType: context.deviceType,
|
|
71
|
+
canSkip: context.config.allowUserToSkipGeolocation === true
|
|
72
|
+
};
|
|
73
|
+
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
74
|
+
return { status: "idle" };
|
|
75
|
+
}
|
|
76
|
+
function createApi({ actor, trackElementClicked }) {
|
|
77
|
+
return {
|
|
78
|
+
request() {
|
|
79
|
+
trackElementClicked?.("request");
|
|
80
|
+
actor.send({ type: "REQUEST" });
|
|
81
|
+
},
|
|
82
|
+
continue() {
|
|
83
|
+
trackElementClicked?.("continue");
|
|
84
|
+
actor.send({ type: "CONTINUE" });
|
|
85
|
+
},
|
|
86
|
+
skip() {
|
|
87
|
+
trackElementClicked?.("skip");
|
|
88
|
+
actor.send({ type: "SKIP" });
|
|
89
|
+
},
|
|
90
|
+
reset() {
|
|
91
|
+
actor.send({ type: "RESET" });
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Creates a geolocation manager for headless or UI-driven usage.
|
|
97
|
+
*
|
|
98
|
+
* @example Headless usage
|
|
99
|
+
* ```typescript
|
|
100
|
+
* const manager = createGeolocationManager({ config: { allowUserToSkipGeolocation: true } });
|
|
101
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
102
|
+
* manager.request();
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
function createGeolocationManager(options) {
|
|
106
|
+
return createGeolocationManagerFromActor(createGeolocationActor(options));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Creates a geolocation manager from a pre-built actor.
|
|
110
|
+
* Use this when overriding the machine via `.provide()` for custom backends
|
|
111
|
+
* or for story-isolation testing.
|
|
112
|
+
*/
|
|
113
|
+
function createGeolocationManagerFromActor(actor) {
|
|
114
|
+
return createManager({
|
|
115
|
+
actor,
|
|
116
|
+
mapState,
|
|
117
|
+
createApi,
|
|
118
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.geolocation, { getEventScreenName: getGeolocationScreenName })
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
//#endregion
|
|
123
|
+
export { createGeolocationManagerFromActor as n, createGeolocationManager as t };
|