@incodetech/core 0.0.0-dev-20260703-464afb8a → 0.0.0-dev-20260703-a5abff33
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-CVwSAzDw.esm.js → 3dAvatarProvider-BkvqkuDS.esm.js} +1 -1
- package/dist/{Face2DProvider-BuWoUgFl.esm.js → Face2DProvider-D1IoZOtw.esm.js} +1 -1
- package/dist/{FaceDetectionProvider-5ODfa48C.d.ts → FaceDetectionProvider-C3hk0vhL.d.ts} +2 -2
- package/dist/{IWasmUtilCapability-D7S5rkSH.d.ts → IWasmUtilCapability-DyiEO2jA.d.ts} +2 -2
- package/dist/{OpenViduRecordingProvider-CK6A5kiU.esm.js → OpenViduRecordingProvider-1QSFdZVL.esm.js} +1 -1
- package/dist/{StreamCanvasCapture-DHaWferF.d.ts → StreamCanvasCapture-DXti432h.d.ts} +2 -2
- package/dist/ae-signature.d.ts +4 -4
- package/dist/antifraud.d.ts +4 -4
- package/dist/{antifraudManager-DCiNI6np.d.ts → antifraudManager-b2LJI3nr.d.ts} +2 -2
- package/dist/authentication.d.ts +19 -19
- package/dist/authentication.esm.js +7 -7
- package/dist/{authenticationManager-B2DqMiXJ.d.ts → authenticationManager-CR6JGCPM.d.ts} +3 -3
- package/dist/{authenticationManager-C3fe4lGI.esm.js → authenticationManager-sPcCh1HP.esm.js} +2 -2
- package/dist/{authenticationStateMachine-CYois9xB.esm.js → authenticationStateMachine-AihNFtXT.esm.js} +2 -2
- package/dist/avatar.d.ts +2 -2
- package/dist/avatar.esm.js +1 -1
- package/dist/camera.d.ts +1 -1
- package/dist/certificate-issuance.d.ts +31 -31
- package/dist/consent.d.ts +4 -4
- package/dist/{consentManager-B9ciAXTR.d.ts → consentManager-3PEfl5_B.d.ts} +49 -49
- package/dist/cpf-ocr.d.ts +4 -4
- package/dist/{cpfOcrManager-OeiEEYoU.d.ts → cpfOcrManager-SYXEpZSH.d.ts} +19 -19
- package/dist/{createFaceAvatar-97WdPBmX.esm.js → createFaceAvatar-CuWRhoKp.esm.js} +3 -3
- package/dist/{createFaceAvatar-CpdYp9Iy.d.ts → createFaceAvatar-DFvWGUts.d.ts} +1 -1
- package/dist/cross-document-data-match.d.ts +2 -2
- package/dist/curp-validation.d.ts +10 -10
- package/dist/{curpValidationManager-CoqODZx5.d.ts → curpValidationManager-GcNPOE9-.d.ts} +3 -3
- package/dist/custom-fields.d.ts +3 -3
- package/dist/custom-watchlist.d.ts +2 -2
- package/dist/document-capture.d.ts +229 -229
- package/dist/document-upload.d.ts +54 -54
- package/dist/dynamic-forms.d.ts +3 -3
- package/dist/ekyb.d.ts +9 -9
- package/dist/ekyb.esm.js +4 -4
- package/dist/{ekybStateMachine-CyzntJzO.esm.js → ekybStateMachine-CoVumHmj.esm.js} +1 -1
- package/dist/ekyc.d.ts +4 -4
- package/dist/electronic-signature.d.ts +4 -4
- package/dist/email.d.ts +5 -5
- package/dist/{emailManager-D1dWWxLM.d.ts → emailManager-t3yQLU9f.d.ts} +3 -3
- package/dist/extensibility.d.ts +35 -34
- package/dist/extensibility.esm.js +16 -14
- package/dist/face-match.d.ts +2 -2
- package/dist/face-match.esm.js +1 -1
- package/dist/{faceCaptureManagerFactory-gdShHivE.d.ts → faceCaptureManagerFactory-BbfxSiGY.d.ts} +13 -13
- package/dist/{faceCaptureManagerFactory-D65wC0Oy.esm.js → faceCaptureManagerFactory-zneUQO62.esm.js} +1 -1
- package/dist/{faceCaptureSetup-DRgLc1RU.esm.js → faceCaptureSetup-CrIhuxN5.esm.js} +3 -3
- package/dist/field-comparison.d.ts +4 -4
- package/dist/{fieldComparisonManager-CSYVU-Vk.d.ts → fieldComparisonManager-BDffIuJm.d.ts} +2 -2
- package/dist/fiscal-qr.d.ts +5 -5
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/flow-events.d.ts +8 -8
- package/dist/flow.d.ts +14 -14
- package/dist/flow.esm.js +5 -5
- package/dist/{flowServices-C_4Yc2kf.esm.js → flowServices-DBOIgXYa.esm.js} +1 -1
- package/dist/geolocation.d.ts +4 -128
- package/dist/geolocation.esm.js +5 -113
- package/dist/geolocationManager-B3iKaTkZ.esm.js +123 -0
- package/dist/geolocationManager-Ba5fKdE5.d.ts +156 -0
- package/dist/government-validation.d.ts +4 -4
- package/dist/government-validation.esm.js +1 -1
- package/dist/home.d.ts +18 -18
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +4 -4
- package/dist/id-verification.d.ts +28 -28
- package/dist/id-verification.esm.js +1 -1
- package/dist/id.d.ts +16 -16
- package/dist/id.esm.js +7 -7
- package/dist/{idCaptureManager-L0JyIaWM.d.ts → idCaptureManager-DEULKa4Q.d.ts} +12 -12
- package/dist/{idCaptureManager-VyxI4Mt1.esm.js → idCaptureManager-G114Uunh.esm.js} +1 -1
- package/dist/{idCaptureStateMachine-BWTVPXMt.esm.js → idCaptureStateMachine-DO_8KmND.esm.js} +5 -5
- package/dist/{idOcrManager-CQCoiHhT.d.ts → idOcrManager-uUuQLtxQ.d.ts} +54 -54
- package/dist/identity-reuse.d.ts +4 -4
- package/dist/{identityReuseManager-DuD39brc.d.ts → identityReuseManager-BmqH-96q.d.ts} +36 -36
- package/dist/{index-BDZhI2V_.d.ts → index-9cOETl_2.d.ts} +169 -169
- package/dist/{index-0PqCAPxK.d.ts → index-Dnkvn5_X.d.ts} +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +3 -3
- package/dist/mandatory-consent.d.ts +10 -10
- package/dist/{mandatoryConsentManager-B4U6GKph.d.ts → mandatoryConsentManager-6VEzgB1P.d.ts} +50 -50
- package/dist/{onDeviceFaceResults-IJDRqtYI.esm.js → onDeviceFaceResults-BiFX_-W5.esm.js} +2 -2
- package/dist/{openviduLazy-wEojM41w.esm.js → openviduLazy-CR7uayMc.esm.js} +1 -1
- package/dist/openviduLazy-Fbht0txL.esm.js +3 -0
- package/dist/personhood.d.ts +16 -16
- package/dist/personhood.esm.js +1 -1
- package/dist/phone.d.ts +5 -5
- package/dist/{phoneManager-DitebgbQ.d.ts → phoneManager-DSyl8tGa.d.ts} +3 -3
- package/dist/qe-signature.d.ts +4 -4
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-4pOlb2SG.esm.js → recordingService-CkE5o82_.esm.js} +3 -3
- package/dist/redirect-to-mobile.d.ts +4 -4
- package/dist/{redirectToMobileManager-kf5afsMm.d.ts → redirectToMobileManager-Bjs3pRzS.d.ts} +2 -2
- package/dist/selfie.d.ts +19 -19
- package/dist/selfie.esm.js +8 -8
- package/dist/{selfieManager-By-EP_q4.esm.js → selfieManager-Bp7WFLAV.esm.js} +2 -2
- package/dist/{selfieManager-B0nFzgeP.d.ts → selfieManager-LHJ4vEQd.d.ts} +3 -3
- package/dist/{selfieStateMachine-Dn3Vh_z_.esm.js → selfieStateMachine-D5pSBFyn.esm.js} +2 -2
- package/dist/session.d.ts +7 -7
- package/dist/session.esm.js +3 -3
- package/dist/{sessionInitializer-hbAgc1U0.esm.js → sessionInitializer-CoArFTzS.esm.js} +2 -2
- package/dist/{setup-Da51UnII.d.ts → setup-ChZ--9XV.d.ts} +2 -2
- package/dist/{setup-Cnj8G6HJ.esm.js → setup-JaAaqeUc.esm.js} +2 -2
- package/dist/signature.d.ts +3 -3
- package/dist/signature.esm.js +1 -1
- package/dist/{tri-QAWxUCoY.esm.js → tri-CtEMMAM6.esm.js} +1 -1
- package/dist/tri.d.ts +1 -1
- package/dist/{tri.esm-B47NPJjh.esm.js → tri.esm--8e_42NO.esm.js} +1 -1
- package/dist/tri.esm.js +1 -1
- package/dist/trust-graph.d.ts +4 -4
- package/dist/{types-CU_aiZL_.d.ts → types-DW5cPsw1.d.ts} +1 -1
- package/dist/{types-DV3wkhQ4.d.ts → types-H9ompebR.d.ts} +1 -1
- package/dist/{types-BUgeB2X6.d.ts → types-bWGcbd3_.d.ts} +2 -2
- package/dist/{types-B1DBrARx.d.ts → types-m3_HUzgU.d.ts} +3 -3
- package/dist/video-selfie.d.ts +14 -14
- package/dist/video-selfie.esm.js +4 -4
- package/dist/wasm.d.ts +3 -3
- package/dist/wasm.esm.js +3 -3
- package/dist/watchlist-for-business.d.ts +2 -2
- package/dist/watchlist-for-business.esm.js +1 -1
- package/dist/watchlist.d.ts +2 -2
- package/dist/watchlist.esm.js +1 -1
- package/dist/workflow.d.ts +167 -167
- package/dist/workflow.esm.js +21 -21
- package/package.json +1 -1
- package/dist/openviduLazy-jPgABwrt.esm.js +0 -3
- /package/dist/{Actor-BwgmOPkb.d.ts → Actor-BYmFPUr7.d.ts} +0 -0
- /package/dist/{IVisibilityObserverCapability-BZ1rE7ly.d.ts → IVisibilityObserverCapability-DaXAeadS.d.ts} +0 -0
- /package/dist/{Manager-goNPc_h_.d.ts → Manager-Cmz78C-6.d.ts} +0 -0
- /package/dist/{PrivacyLensProvider-CZnkF34Z.esm.js → PrivacyLensProvider-DSYMiRJn.esm.js} +0 -0
- /package/dist/{StateMachine-D5WO6lHS.d.ts → StateMachine-CNPJD4wG.d.ts} +0 -0
- /package/dist/{browser-DlFgHpoC-BieMg30k.esm.js → browser-DlFgHpoC-Bc6EUg7K.esm.js} +0 -0
- /package/dist/{camera-CKU96nwJ.d.ts → camera-DLCbUdzy.d.ts} +0 -0
- /package/dist/{canvas-90BqS0NF.d.ts → canvas-lNFq1bim.d.ts} +0 -0
- /package/dist/{deepsightLoader-BrK1yV0-.esm.js → deepsightLoader-oH-UOgvy.esm.js} +0 -0
- /package/dist/{deepsightService-BgdEmIRg.d.ts → deepsightService-DhJ1iwXr.d.ts} +0 -0
- /package/dist/{faceMatchStateMachine-BLL5aQX6.esm.js → faceMatchStateMachine-BOi4dYbB.esm.js} +0 -0
- /package/dist/{flowCompletionService-SXnPwz9I.d.ts → flowCompletionService-BOSTlAWo.d.ts} +0 -0
- /package/dist/{flowCompletionService-C4ciNLxe.esm.js → flowCompletionService-DwNoUhk5.esm.js} +0 -0
- /package/dist/{geolocationStateMachine-Vs5GfQ8l.esm.js → geolocationStateMachine-BKbXdD87.esm.js} +0 -0
- /package/dist/{governmentValidationStateMachine-EKSIq4v9.esm.js → governmentValidationStateMachine-CdU4oRYS.esm.js} +0 -0
- /package/dist/{http-CBbBcnBa.esm.js → http-Dg_LUZCK.esm.js} +0 -0
- /package/dist/{idVerificationStateMachine-BOz1v4AY.esm.js → idVerificationStateMachine-QEZjjPPv.esm.js} +0 -0
- /package/dist/{index-BAyZ8_iI.d.ts → index-DE1C1s0Y.d.ts} +0 -0
- /package/dist/{invokeOnCaptureCallback-uZ42DiUz.esm.js → invokeOnCaptureCallback-Byx0Y09k.esm.js} +0 -0
- /package/dist/{lib-Bjd6nOLG.esm.js → lib-C7yt36-i.esm.js} +0 -0
- /package/dist/{mediapipeShared-Bcmkzs3x.esm.js → mediapipeShared-DGYt_amp.esm.js} +0 -0
- /package/dist/{otp-CETbFjXH.d.ts → otp-B1YeyRXu.d.ts} +0 -0
- /package/dist/{qe-signature-mU2bJh-u.esm.js → qe-signature-DrNTWaUP.esm.js} +0 -0
- /package/dist/{runChildModule-D-rDy5jB.esm.js → runChildModule-3qH_hqiv.esm.js} +0 -0
- /package/dist/{signatureStateMachine-DWob8P45.esm.js → signatureStateMachine-CY41dCkX.esm.js} +0 -0
- /package/dist/{types-BcF-fii5.d.ts → types-CrjOPSFE.d.ts} +0 -0
- /package/dist/{types-BgjMAEXl.d.ts → types-cqeeFcNT.d.ts} +0 -0
- /package/dist/{warmup-CZ80odyW.d.ts → warmup-C4rQk0OB.d.ts} +0 -0
- /package/dist/{watchlistForBusinessStateMachine-Do3drRT5.esm.js → watchlistForBusinessStateMachine-KYgSsRXK.esm.js} +0 -0
- /package/dist/{watchlistStateMachine-D6A4O5rK.esm.js → watchlistStateMachine-DsWQwmlW.esm.js} +0 -0
package/dist/fiscal-qr.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./StateMachine-
|
|
2
|
-
import { t as Manager } from "./Manager-
|
|
3
|
-
import "./camera-
|
|
4
|
-
import "./canvas-
|
|
5
|
-
import "./StreamCanvasCapture-
|
|
1
|
+
import "./StateMachine-CNPJD4wG.js";
|
|
2
|
+
import { t as Manager } from "./Manager-Cmz78C-6.js";
|
|
3
|
+
import "./camera-DLCbUdzy.js";
|
|
4
|
+
import "./canvas-lNFq1bim.js";
|
|
5
|
+
import "./StreamCanvasCapture-DXti432h.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/fiscal-qr/types.d.ts
|
|
8
8
|
/**
|
package/dist/fiscal-qr.esm.js
CHANGED
|
@@ -10,7 +10,7 @@ import "./ITimerCapability-pltuG1E8.esm.js";
|
|
|
10
10
|
import "./canvas-_I95hkPg.esm.js";
|
|
11
11
|
import { n as getBackCameraStream } from "./backCameraStream-ZyqrFyjO.esm.js";
|
|
12
12
|
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-Bz17q4FP.esm.js";
|
|
13
|
-
import "./http-
|
|
13
|
+
import "./http-Dg_LUZCK.esm.js";
|
|
14
14
|
import { BrowserQRCodeReader } from "@zxing/browser";
|
|
15
15
|
|
|
16
16
|
//#region src/modules/fiscal-qr/fiscalQrConstants.ts
|
package/dist/flow-events.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./camera-
|
|
2
|
-
import "./types-
|
|
3
|
-
import "./types-
|
|
4
|
-
import "./canvas-
|
|
5
|
-
import "./createFaceAvatar-
|
|
6
|
-
import "./types-
|
|
7
|
-
import "./flowCompletionService-
|
|
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-
|
|
1
|
+
import "./camera-DLCbUdzy.js";
|
|
2
|
+
import "./types-H9ompebR.js";
|
|
3
|
+
import "./types-cqeeFcNT.js";
|
|
4
|
+
import "./canvas-lNFq1bim.js";
|
|
5
|
+
import "./createFaceAvatar-DFvWGUts.js";
|
|
6
|
+
import "./types-bWGcbd3_.js";
|
|
7
|
+
import "./flowCompletionService-BOSTlAWo.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-Dnkvn5_X.js";
|
|
9
9
|
export { FlowClosedEvent, FlowCompletedEvent, FlowErrorEvent, FlowEvent, FlowEventListener, FlowEventSubscribable, FlowModuleCompletedEvent, FlowModuleStartedEvent, FlowReadyEvent, FlowStartedEvent };
|
package/dist/flow.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { n as WasmPipeline } from "./warmup-
|
|
2
|
-
import { t as AnyStateMachine } from "./StateMachine-
|
|
3
|
-
import { t as Manager } from "./Manager-
|
|
4
|
-
import "./camera-
|
|
5
|
-
import "./types-
|
|
6
|
-
import "./types-
|
|
7
|
-
import "./canvas-
|
|
8
|
-
import "./createFaceAvatar-
|
|
9
|
-
import { i as FlowModuleConfig, n as Flow, r as FlowModule } from "./types-
|
|
10
|
-
import { a as TotalScore, c as getTotalScoreStatus, n as FinishStatus, o as classifyScoreStatus, r as GetFinishStatusFn, t as FinishScreenVariant } from "./flowCompletionService-
|
|
11
|
-
import { o as FlowEventSubscribable } from "./index-
|
|
12
|
-
import { n as ModuleRegistry } from "./types-
|
|
13
|
-
import * as
|
|
1
|
+
import { n as WasmPipeline } from "./warmup-C4rQk0OB.js";
|
|
2
|
+
import { t as AnyStateMachine } from "./StateMachine-CNPJD4wG.js";
|
|
3
|
+
import { t as Manager } from "./Manager-Cmz78C-6.js";
|
|
4
|
+
import "./camera-DLCbUdzy.js";
|
|
5
|
+
import "./types-H9ompebR.js";
|
|
6
|
+
import "./types-cqeeFcNT.js";
|
|
7
|
+
import "./canvas-lNFq1bim.js";
|
|
8
|
+
import "./createFaceAvatar-DFvWGUts.js";
|
|
9
|
+
import { i as FlowModuleConfig, n as Flow, r as FlowModule } from "./types-bWGcbd3_.js";
|
|
10
|
+
import { a as TotalScore, c as getTotalScoreStatus, n as FinishStatus, o as classifyScoreStatus, r as GetFinishStatusFn, t as FinishScreenVariant } from "./flowCompletionService-BOSTlAWo.js";
|
|
11
|
+
import { o as FlowEventSubscribable } from "./index-Dnkvn5_X.js";
|
|
12
|
+
import { n as ModuleRegistry } from "./types-DW5cPsw1.js";
|
|
13
|
+
import * as xstate1114 from "xstate";
|
|
14
14
|
|
|
15
15
|
//#region src/modules/flow/flowUtils.d.ts
|
|
16
16
|
type NormalizeFlowModulesOptions = {
|
|
@@ -62,7 +62,7 @@ type GetFlow = (signal: AbortSignal, options?: GetFlowOptions) => Promise<Flow>;
|
|
|
62
62
|
declare const getFlow: GetFlow;
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/modules/flow/noOpFlowModuleMachine.d.ts
|
|
65
|
-
declare const noOpFlowModuleMachine:
|
|
65
|
+
declare const noOpFlowModuleMachine: xstate1114.StateMachine<xstate1114.MachineContext, xstate1114.AnyEventObject, {}, never, never, never, never, "finished", string, xstate1114.NonReducibleUnknown, xstate1114.NonReducibleUnknown, xstate1114.EventObject, xstate1114.MetaObject, {
|
|
66
66
|
readonly id: "noOpFlowModule";
|
|
67
67
|
readonly initial: "finished";
|
|
68
68
|
readonly states: {
|
package/dist/flow.esm.js
CHANGED
|
@@ -5,20 +5,20 @@ import "./types-ElOJAGaM.esm.js";
|
|
|
5
5
|
import "./endpoints-BzMJFAPV.esm.js";
|
|
6
6
|
import "./stats-CYcScXcO.esm.js";
|
|
7
7
|
import "./browserSimulation-TsSoavQv.esm.js";
|
|
8
|
-
import "./sessionInitializer-
|
|
8
|
+
import "./sessionInitializer-CoArFTzS.esm.js";
|
|
9
9
|
import "./getDeviceData-TrKM8NPh.esm.js";
|
|
10
10
|
import "./thumbmarkAdapter-fHBUDlAP.esm.js";
|
|
11
11
|
import "./IpifyProvider-BRW14_uo.esm.js";
|
|
12
12
|
import "./platform-uIVQUnJP.esm.js";
|
|
13
|
-
import "./tri-
|
|
13
|
+
import "./tri-CtEMMAM6.esm.js";
|
|
14
14
|
import { a as fromPromise, l as createManager, r as assign, s as createActor, t as setup } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
15
15
|
import "./apiError-C7SFQTB2.esm.js";
|
|
16
16
|
import "./types-CMcxlSmH.esm.js";
|
|
17
17
|
import "./session-D4m9r-7U.esm.js";
|
|
18
18
|
import "./videoSelfieSteps-DAky5sq5.esm.js";
|
|
19
|
-
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-
|
|
20
|
-
import { n as getFinishStatus, r as getTotalScoreStatus, t as classifyScoreStatus } from "./flowCompletionService-
|
|
21
|
-
import { n as isAdvanceableError, r as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-
|
|
19
|
+
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-DBOIgXYa.esm.js";
|
|
20
|
+
import { n as getFinishStatus, r as getTotalScoreStatus, t as classifyScoreStatus } from "./flowCompletionService-DwNoUhk5.esm.js";
|
|
21
|
+
import { n as isAdvanceableError, r as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-3qH_hqiv.esm.js";
|
|
22
22
|
|
|
23
23
|
//#region src/modules/flow/noOpFlowModuleMachine.ts
|
|
24
24
|
const noOpFlowModuleMachine = setup({}).createMachine({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-DsbUi7TO.esm.js";
|
|
2
2
|
import { t as endpoints } from "./endpoints-BzMJFAPV.esm.js";
|
|
3
|
-
import { n as getSessionFingerprintResult, r as initializeSession } from "./sessionInitializer-
|
|
3
|
+
import { n as getSessionFingerprintResult, r as initializeSession } from "./sessionInitializer-CoArFTzS.esm.js";
|
|
4
4
|
import { n as toIncodeApiError } from "./apiError-C7SFQTB2.esm.js";
|
|
5
5
|
import { r as videoSelfieWasmPipelines } from "./videoSelfieSteps-DAky5sq5.esm.js";
|
|
6
6
|
|
package/dist/geolocation.d.ts
CHANGED
|
@@ -1,129 +1,5 @@
|
|
|
1
|
-
import "./StateMachine-
|
|
2
|
-
import
|
|
3
|
-
import "./Actor-
|
|
4
|
-
|
|
5
|
-
//#region ../infra/src/capabilities/IGeolocationCapability.d.ts
|
|
6
|
-
type GeolocationCoords = {
|
|
7
|
-
latitude: number;
|
|
8
|
-
longitude: number;
|
|
9
|
-
};
|
|
10
|
-
type IGeolocationCapability = {
|
|
11
|
-
getCurrentPosition(): Promise<GeolocationCoords>;
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/modules/geolocation/types.d.ts
|
|
15
|
-
/**
|
|
16
|
-
* Configuration options for the Geolocation module.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```typescript
|
|
20
|
-
* const config: GeolocationConfig = {
|
|
21
|
-
* allowUserToSkipGeolocation: true,
|
|
22
|
-
* };
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
type GeolocationConfig = {
|
|
26
|
-
/**
|
|
27
|
-
* Whether the user is allowed to skip geolocation capture.
|
|
28
|
-
* When true, a skip button is shown on the permission-denied screen.
|
|
29
|
-
* Backend field name from flow/workflow configuration.
|
|
30
|
-
* @default false
|
|
31
|
-
*/
|
|
32
|
-
allowUserToSkipGeolocation?: boolean;
|
|
33
|
-
};
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/modules/geolocation/geolocationStateMachine.d.ts
|
|
36
|
-
type GeolocationDeviceType = 'ios' | 'android' | 'desktop';
|
|
37
|
-
declare const geolocationMachine: any;
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/modules/geolocation/geolocationActor.d.ts
|
|
40
|
-
type CreateGeolocationActorOptions = {
|
|
41
|
-
config: GeolocationConfig;
|
|
42
|
-
geolocation?: IGeolocationCapability;
|
|
43
|
-
};
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/modules/geolocation/geolocationManager.d.ts
|
|
46
|
-
|
|
47
|
-
/** Geolocation manager is in initial state, waiting for `request()` to be called */
|
|
48
|
-
type GeolocationIdleState = {
|
|
49
|
-
status: 'idle';
|
|
50
|
-
};
|
|
51
|
-
/** Browser geolocation permission prompt is active */
|
|
52
|
-
type GeolocationRequestingState = {
|
|
53
|
-
status: 'requestingLocation';
|
|
54
|
-
};
|
|
55
|
-
/** Coordinates are being submitted to the backend */
|
|
56
|
-
type GeolocationSubmittingState = {
|
|
57
|
-
status: 'submitting';
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Location successfully acquired — call `continue()` to proceed
|
|
61
|
-
* @property location - Location name returned from backend, or null
|
|
62
|
-
*/
|
|
63
|
-
type GeolocationAcquiredState = {
|
|
64
|
-
status: 'locationAcquired';
|
|
65
|
-
location: string | null;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* User denied geolocation permission — shows device-specific instructions
|
|
69
|
-
* @property deviceType - Used by UI to render the correct instruction panel
|
|
70
|
-
* @property canSkip - Whether the skip button should be shown
|
|
71
|
-
*/
|
|
72
|
-
type GeolocationPermissionDeniedState = {
|
|
73
|
-
status: 'permissionDenied';
|
|
74
|
-
deviceType: GeolocationDeviceType;
|
|
75
|
-
canSkip: boolean;
|
|
76
|
-
};
|
|
77
|
-
/** Geolocation flow completed successfully */
|
|
78
|
-
type GeolocationFinishedState = {
|
|
79
|
-
status: 'finished';
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Union of all possible geolocation manager states.
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* ```typescript
|
|
86
|
-
* const state = geolocationManager.getState();
|
|
87
|
-
* if (state.status === 'locationAcquired') {
|
|
88
|
-
* console.log(state.location);
|
|
89
|
-
* }
|
|
90
|
-
* if (state.status === 'permissionDenied') {
|
|
91
|
-
* console.log(state.deviceType); // 'ios' | 'android' | 'desktop'
|
|
92
|
-
* }
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
type GeolocationState = GeolocationIdleState | GeolocationRequestingState | GeolocationSubmittingState | GeolocationAcquiredState | GeolocationPermissionDeniedState | GeolocationFinishedState;
|
|
96
|
-
/**
|
|
97
|
-
* Creates a geolocation manager for headless or UI-driven usage.
|
|
98
|
-
*
|
|
99
|
-
* @example Headless usage
|
|
100
|
-
* ```typescript
|
|
101
|
-
* const manager = createGeolocationManager({ config: { allowUserToSkipGeolocation: true } });
|
|
102
|
-
* manager.subscribe((state) => console.log(state.status));
|
|
103
|
-
* manager.request();
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
declare function createGeolocationManager(options: CreateGeolocationActorOptions): Manager<GeolocationState> & {
|
|
107
|
-
/**
|
|
108
|
-
* Initiates the browser geolocation permission request.
|
|
109
|
-
* Transitions from 'idle' to 'requestingLocation'.
|
|
110
|
-
*/
|
|
111
|
-
request(): void;
|
|
112
|
-
/**
|
|
113
|
-
* Confirms the acquired location and completes the module.
|
|
114
|
-
* Should be called when state is 'locationAcquired'.
|
|
115
|
-
*/
|
|
116
|
-
continue(): void;
|
|
117
|
-
/**
|
|
118
|
-
* Skips geolocation when the user has denied permission.
|
|
119
|
-
* Only works when `config.allowUserToSkipGeolocation` is true.
|
|
120
|
-
*/
|
|
121
|
-
skip(): void;
|
|
122
|
-
/**
|
|
123
|
-
* Resets the manager back to initial state.
|
|
124
|
-
*/
|
|
125
|
-
reset(): void;
|
|
126
|
-
};
|
|
127
|
-
type GeolocationManager = ReturnType<typeof createGeolocationManager>;
|
|
128
|
-
//#endregion
|
|
1
|
+
import "./StateMachine-CNPJD4wG.js";
|
|
2
|
+
import "./Manager-Cmz78C-6.js";
|
|
3
|
+
import "./Actor-BYmFPUr7.js";
|
|
4
|
+
import { n as GeolocationState, o as geolocationMachine, r as createGeolocationManager, s as GeolocationConfig, t as GeolocationManager } from "./geolocationManager-Ba5fKdE5.js";
|
|
129
5
|
export { type GeolocationConfig, type GeolocationManager, type GeolocationState, createGeolocationManager, geolocationMachine };
|
package/dist/geolocation.esm.js
CHANGED
|
@@ -1,118 +1,10 @@
|
|
|
1
1
|
import "./api-DsbUi7TO.esm.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import "./events-CqGY1yMq.esm.js";
|
|
3
|
+
import "./types-ElOJAGaM.esm.js";
|
|
4
4
|
import "./endpoints-BzMJFAPV.esm.js";
|
|
5
5
|
import "./platform-uIVQUnJP.esm.js";
|
|
6
|
-
import
|
|
7
|
-
import { t as
|
|
6
|
+
import "./xstate.esm-Bomq1a0z.esm.js";
|
|
7
|
+
import { t as createGeolocationManager } from "./geolocationManager-B3iKaTkZ.esm.js";
|
|
8
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-BKbXdD87.esm.js";
|
|
8
9
|
|
|
9
|
-
//#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
|
|
10
|
-
var BrowserGeolocationProvider = class {
|
|
11
|
-
getCurrentPosition() {
|
|
12
|
-
return new Promise((resolve, reject) => {
|
|
13
|
-
navigator.geolocation.getCurrentPosition((pos) => resolve({
|
|
14
|
-
latitude: pos.coords.latitude,
|
|
15
|
-
longitude: pos.coords.longitude
|
|
16
|
-
}), reject);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/modules/geolocation/geolocationActor.ts
|
|
23
|
-
function createGeolocationActor(options) {
|
|
24
|
-
const geolocation = options.geolocation ?? new BrowserGeolocationProvider();
|
|
25
|
-
return createActor(geolocationMachine, { input: {
|
|
26
|
-
config: options.config,
|
|
27
|
-
geolocation
|
|
28
|
-
} }).start();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/modules/geolocation/geolocationManager.ts
|
|
33
|
-
/**
|
|
34
|
-
* Maps a Geolocation state-machine snapshot to the exact Figma "Tracked
|
|
35
|
-
* Events" screen name. Returned strings are the absolute analytics screen
|
|
36
|
-
* (module prefix included) and are emitted verbatim by
|
|
37
|
-
* `createManagerInstrumentation`'s `getEventScreenName` short-circuit.
|
|
38
|
-
*
|
|
39
|
-
* Source of truth: Geolocation Figma file → Tracked Events canvas
|
|
40
|
-
* (`https://www.figma.com/design/xg1t3GnUS95A4bLrM3lyOG/Geolocation---Latest-Design?node-id=2652-17008`).
|
|
41
|
-
*
|
|
42
|
-
* Deferred Figma screens that have no state-machine counterpart yet:
|
|
43
|
-
* `Geolocation.error.locationUnavailable` and `Geolocation.error.noNetwork`.
|
|
44
|
-
* Both kinds of failure currently collapse into `permissionDenied`
|
|
45
|
-
* (`requestPosition` `onError`) or `locationAcquired` with `location: null`
|
|
46
|
-
* (`submitPosition` `onError`), so the machine cannot distinguish them today.
|
|
47
|
-
*/
|
|
48
|
-
function getGeolocationScreenName(snapshot) {
|
|
49
|
-
const { value } = snapshot;
|
|
50
|
-
if (typeof value !== "string") return void 0;
|
|
51
|
-
switch (value) {
|
|
52
|
-
case "idle": return "Geolocation.default";
|
|
53
|
-
case "requestingLocation":
|
|
54
|
-
case "submitting": return "Geolocation.permission";
|
|
55
|
-
case "locationAcquired":
|
|
56
|
-
case "finished": return "Geolocation.continue";
|
|
57
|
-
case "permissionDenied": return "Geolocation.allowLocation";
|
|
58
|
-
default: return;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function mapState(snapshot) {
|
|
62
|
-
const typedSnapshot = snapshot;
|
|
63
|
-
const { context } = typedSnapshot;
|
|
64
|
-
if (typedSnapshot.matches("idle")) return { status: "idle" };
|
|
65
|
-
if (typedSnapshot.matches("requestingLocation")) return { status: "requestingLocation" };
|
|
66
|
-
if (typedSnapshot.matches("submitting")) return { status: "submitting" };
|
|
67
|
-
if (typedSnapshot.matches("locationAcquired")) return {
|
|
68
|
-
status: "locationAcquired",
|
|
69
|
-
location: context.location ?? null
|
|
70
|
-
};
|
|
71
|
-
if (typedSnapshot.matches("permissionDenied")) return {
|
|
72
|
-
status: "permissionDenied",
|
|
73
|
-
deviceType: context.deviceType,
|
|
74
|
-
canSkip: context.config.allowUserToSkipGeolocation === true
|
|
75
|
-
};
|
|
76
|
-
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
77
|
-
return { status: "idle" };
|
|
78
|
-
}
|
|
79
|
-
function createApi({ actor, trackElementClicked }) {
|
|
80
|
-
return {
|
|
81
|
-
request() {
|
|
82
|
-
trackElementClicked?.("request");
|
|
83
|
-
actor.send({ type: "REQUEST" });
|
|
84
|
-
},
|
|
85
|
-
continue() {
|
|
86
|
-
trackElementClicked?.("continue");
|
|
87
|
-
actor.send({ type: "CONTINUE" });
|
|
88
|
-
},
|
|
89
|
-
skip() {
|
|
90
|
-
trackElementClicked?.("skip");
|
|
91
|
-
actor.send({ type: "SKIP" });
|
|
92
|
-
},
|
|
93
|
-
reset() {
|
|
94
|
-
actor.send({ type: "RESET" });
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Creates a geolocation manager for headless or UI-driven usage.
|
|
100
|
-
*
|
|
101
|
-
* @example Headless usage
|
|
102
|
-
* ```typescript
|
|
103
|
-
* const manager = createGeolocationManager({ config: { allowUserToSkipGeolocation: true } });
|
|
104
|
-
* manager.subscribe((state) => console.log(state.status));
|
|
105
|
-
* manager.request();
|
|
106
|
-
* ```
|
|
107
|
-
*/
|
|
108
|
-
function createGeolocationManager(options) {
|
|
109
|
-
return createManager({
|
|
110
|
-
actor: createGeolocationActor(options),
|
|
111
|
-
mapState,
|
|
112
|
-
createApi,
|
|
113
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.geolocation, { getEventScreenName: getGeolocationScreenName })
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
//#endregion
|
|
118
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-BKbXdD87.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 };
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-Cmz78C-6.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-BYmFPUr7.js";
|
|
3
|
+
|
|
4
|
+
//#region ../infra/src/capabilities/IGeolocationCapability.d.ts
|
|
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
|
+
type GeolocationMachine = typeof geolocationMachine;
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/modules/geolocation/geolocationActor.d.ts
|
|
40
|
+
type CreateGeolocationActorOptions = {
|
|
41
|
+
config: GeolocationConfig;
|
|
42
|
+
geolocation?: IGeolocationCapability;
|
|
43
|
+
};
|
|
44
|
+
type GeolocationActor = ActorRefFrom<GeolocationMachine>;
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/modules/geolocation/geolocationManager.d.ts
|
|
47
|
+
|
|
48
|
+
/** Geolocation manager is in initial state, waiting for `request()` to be called */
|
|
49
|
+
type GeolocationIdleState = {
|
|
50
|
+
status: 'idle';
|
|
51
|
+
};
|
|
52
|
+
/** Browser geolocation permission prompt is active */
|
|
53
|
+
type GeolocationRequestingState = {
|
|
54
|
+
status: 'requestingLocation';
|
|
55
|
+
};
|
|
56
|
+
/** Coordinates are being submitted to the backend */
|
|
57
|
+
type GeolocationSubmittingState = {
|
|
58
|
+
status: 'submitting';
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Location successfully acquired — call `continue()` to proceed
|
|
62
|
+
* @property location - Location name returned from backend, or null
|
|
63
|
+
*/
|
|
64
|
+
type GeolocationAcquiredState = {
|
|
65
|
+
status: 'locationAcquired';
|
|
66
|
+
location: string | null;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* User denied geolocation permission — shows device-specific instructions
|
|
70
|
+
* @property deviceType - Used by UI to render the correct instruction panel
|
|
71
|
+
* @property canSkip - Whether the skip button should be shown
|
|
72
|
+
*/
|
|
73
|
+
type GeolocationPermissionDeniedState = {
|
|
74
|
+
status: 'permissionDenied';
|
|
75
|
+
deviceType: GeolocationDeviceType;
|
|
76
|
+
canSkip: boolean;
|
|
77
|
+
};
|
|
78
|
+
/** Geolocation flow completed successfully */
|
|
79
|
+
type GeolocationFinishedState = {
|
|
80
|
+
status: 'finished';
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Union of all possible geolocation manager states.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const state = geolocationManager.getState();
|
|
88
|
+
* if (state.status === 'locationAcquired') {
|
|
89
|
+
* console.log(state.location);
|
|
90
|
+
* }
|
|
91
|
+
* if (state.status === 'permissionDenied') {
|
|
92
|
+
* console.log(state.deviceType); // 'ios' | 'android' | 'desktop'
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
type GeolocationState = GeolocationIdleState | GeolocationRequestingState | GeolocationSubmittingState | GeolocationAcquiredState | GeolocationPermissionDeniedState | GeolocationFinishedState;
|
|
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
|
+
declare function createGeolocationManager(options: CreateGeolocationActorOptions): Manager<GeolocationState> & {
|
|
108
|
+
/**
|
|
109
|
+
* Initiates the browser geolocation permission request.
|
|
110
|
+
* Transitions from 'idle' to 'requestingLocation'.
|
|
111
|
+
*/
|
|
112
|
+
request(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Confirms the acquired location and completes the module.
|
|
115
|
+
* Should be called when state is 'locationAcquired'.
|
|
116
|
+
*/
|
|
117
|
+
continue(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Skips geolocation when the user has denied permission.
|
|
120
|
+
* Only works when `config.allowUserToSkipGeolocation` is true.
|
|
121
|
+
*/
|
|
122
|
+
skip(): void;
|
|
123
|
+
/**
|
|
124
|
+
* Resets the manager back to initial state.
|
|
125
|
+
*/
|
|
126
|
+
reset(): void;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Creates a geolocation manager from a pre-built actor.
|
|
130
|
+
* Use this when overriding the machine via `.provide()` for custom backends
|
|
131
|
+
* or for story-isolation testing.
|
|
132
|
+
*/
|
|
133
|
+
declare function createGeolocationManagerFromActor(actor: GeolocationActor): Manager<GeolocationState> & {
|
|
134
|
+
/**
|
|
135
|
+
* Initiates the browser geolocation permission request.
|
|
136
|
+
* Transitions from 'idle' to 'requestingLocation'.
|
|
137
|
+
*/
|
|
138
|
+
request(): void;
|
|
139
|
+
/**
|
|
140
|
+
* Confirms the acquired location and completes the module.
|
|
141
|
+
* Should be called when state is 'locationAcquired'.
|
|
142
|
+
*/
|
|
143
|
+
continue(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Skips geolocation when the user has denied permission.
|
|
146
|
+
* Only works when `config.allowUserToSkipGeolocation` is true.
|
|
147
|
+
*/
|
|
148
|
+
skip(): void;
|
|
149
|
+
/**
|
|
150
|
+
* Resets the manager back to initial state.
|
|
151
|
+
*/
|
|
152
|
+
reset(): void;
|
|
153
|
+
};
|
|
154
|
+
type GeolocationManager = ReturnType<typeof createGeolocationManager>;
|
|
155
|
+
//#endregion
|
|
156
|
+
export { GeolocationActor as a, createGeolocationManagerFromActor as i, GeolocationState as n, geolocationMachine as o, createGeolocationManager as r, GeolocationConfig as s, GeolocationManager as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./StateMachine-
|
|
2
|
-
import { t as Manager } from "./Manager-
|
|
3
|
-
import "./Actor-
|
|
4
|
-
import { t as OtpValidationErrors } from "./otp-
|
|
1
|
+
import "./StateMachine-CNPJD4wG.js";
|
|
2
|
+
import { t as Manager } from "./Manager-Cmz78C-6.js";
|
|
3
|
+
import "./Actor-BYmFPUr7.js";
|
|
4
|
+
import { t as OtpValidationErrors } from "./otp-B1YeyRXu.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/government-validation/types.d.ts
|
|
7
7
|
type GovernmentValidationConfig = {
|