@incodetech/core 0.0.0-dev-20260511-10b1737 → 0.0.0-dev-20260512-e44bacb
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/ae-signature.d.ts +1 -1
- package/dist/authentication.esm.js +12 -12
- package/dist/{authenticationManager-CVoZsbJX.esm.js → authenticationManager-D0Yv5R02.esm.js} +1 -1
- package/dist/{authenticationStateMachine-DyimpeBS.esm.js → authenticationStateMachine-CFiP6P_V.esm.js} +3 -3
- package/dist/{backCameraStream-bztcEWzY.esm.js → backCameraStream-DWZ1cNVA.esm.js} +1 -1
- package/dist/camera.d.ts +0 -10
- package/dist/camera.esm.js +3 -3
- package/dist/consent.d.ts +53 -53
- package/dist/cpf-ocr.d.ts +17 -17
- package/dist/{deepsightLoader-HPZa6gSA.esm.js → deepsightLoader-CFNSfs2N.esm.js} +5 -5
- package/dist/{deepsightService-gNTXZu7Y.esm.js → deepsightService-IxmrmdKl.esm.js} +3 -3
- package/dist/device.esm.js +2 -2
- package/dist/document-capture.d.ts +74 -74
- package/dist/document-capture.esm.js +3 -3
- package/dist/document-upload.d.ts +43 -43
- package/dist/document-upload.esm.js +2 -2
- package/dist/{documentCaptureStateMachine-fpqYHdZV.esm.js → documentCaptureStateMachine-CuanhXvs.esm.js} +2 -2
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybStateMachine-gQoTdfVu.esm.js → ekybStateMachine-Cq7M50sN.esm.js} +1 -1
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/extensibility.esm.js +17 -17
- package/dist/{faceCaptureSetup-D3dirkMC.esm.js → faceCaptureSetup-zLRBv0-5.esm.js} +3 -6
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +2 -2
- package/dist/{flowServices-DHz5fm4b.esm.js → flowServices-CLnM71N7.esm.js} +1 -1
- package/dist/{getDeviceClass-BTVS59zg.esm.js → getDeviceClass-DmoqR7G2.esm.js} +1 -1
- package/dist/home.d.ts +10 -10
- package/dist/id-ocr.d.ts +55 -55
- package/dist/id.esm.js +12 -12
- package/dist/{idCaptureManager-Ddv8sncg.esm.js → idCaptureManager-vkJ6QLuk.esm.js} +1 -1
- package/dist/{idCaptureStateMachine-CwKipvzM.esm.js → idCaptureStateMachine-C94NHeR2.esm.js} +10 -14
- package/dist/identity-reuse.d.ts +40 -40
- package/dist/{index-C7cFplmZ.d.ts → index-CNrrk1gH.d.ts} +119 -119
- package/dist/index.esm.js +2 -2
- package/dist/mandatory-consent.d.ts +50 -50
- package/dist/permissionServices-ACBX6sNZ.esm.js +50 -0
- package/dist/qe-signature.d.ts +1 -1
- package/dist/{recordingService-Dc8qrd2u.esm.js → recordingService-BsYjkILQ.esm.js} +6 -6
- package/dist/selfie.esm.js +12 -12
- package/dist/{selfieManager-C55Fsp9Q.esm.js → selfieManager-ByCKxpZC.esm.js} +1 -1
- package/dist/{selfieStateMachine-CLqNjiIq.esm.js → selfieStateMachine-ecwZ7tWK.esm.js} +2 -2
- package/dist/{session-mATfRV08.esm.js → session-DWFMKdX6.esm.js} +1 -1
- package/dist/session.esm.js +1 -1
- package/dist/{setup-BScIlYqq.esm.js → setup-h75-vL1d.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/wasm.esm.js +2 -2
- package/dist/workflow.d.ts +123 -123
- package/dist/workflow.esm.js +17 -17
- package/package.json +1 -1
- package/dist/permissionServices-DIxFacTA.esm.js +0 -117
- /package/dist/{MotionSensorProvider-DuErU0Pn.esm.js → MotionSensorProvider-DJMsPght.esm.js} +0 -0
- /package/dist/{camera-PA2Ljri3.esm.js → camera-Bm3wb89Z.esm.js} +0 -0
- /package/dist/{getBrowser-jTObqSyg.esm.js → getBrowser-Y88tNVud.esm.js} +0 -0
- /package/dist/{stats-KJxmByg8.esm.js → stats-Bqq9IKre.esm.js} +0 -0
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { i as stopCameraStream, r as requestCameraAccess } from "./camera-PA2Ljri3.esm.js";
|
|
2
|
-
import { t as MotionSensorProvider } from "./MotionSensorProvider-DuErU0Pn.esm.js";
|
|
3
|
-
|
|
4
|
-
//#region ../infra/src/media/permissions.ts
|
|
5
|
-
async function queryPermission(name) {
|
|
6
|
-
try {
|
|
7
|
-
if (typeof navigator === "undefined" || !navigator.permissions) return "prompt";
|
|
8
|
-
return (await navigator.permissions.query({ name })).state;
|
|
9
|
-
} catch {
|
|
10
|
-
return "prompt";
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
async function queryCameraPermission() {
|
|
14
|
-
return queryPermission("camera");
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Session-scoped cache for the camera permission grant.
|
|
18
|
-
*
|
|
19
|
-
* Rationale: `navigator.permissions.query({ name: 'camera' })` is unreliable on
|
|
20
|
-
* Android WebView — it returns `'prompt'` (or throws) even when the host app
|
|
21
|
-
* has already granted camera access for the current session. Without a
|
|
22
|
-
* secondary source of truth, the SDK re-renders its custom "allow camera"
|
|
23
|
-
* screen every time a new capture module starts, even though no system prompt
|
|
24
|
-
* will follow.
|
|
25
|
-
*
|
|
26
|
-
* When `requestPermission()` (or a capture stream acquisition) succeeds, we
|
|
27
|
-
* write `true` to sessionStorage. `checkPermission()` prefers any concrete
|
|
28
|
-
* answer from the Permissions API, and falls back to this cache only when the
|
|
29
|
-
* query returns `'prompt'`. The cache is cleared whenever the browser reports
|
|
30
|
-
* `'denied'` or a capture operation fails with `NotAllowedError`, so a
|
|
31
|
-
* revoked permission self-heals on the next attempt.
|
|
32
|
-
*
|
|
33
|
-
* SessionStorage (not localStorage) is intentional: camera permission in
|
|
34
|
-
* mobile WebViews is typically scoped to the tab/session anyway, and we do not
|
|
35
|
-
* want to imply a persistent grant across app launches.
|
|
36
|
-
*/
|
|
37
|
-
const CAMERA_PERMISSION_CACHE_KEY = "cameraPermissionsGranted";
|
|
38
|
-
function hasSessionStorage() {
|
|
39
|
-
try {
|
|
40
|
-
return typeof sessionStorage !== "undefined";
|
|
41
|
-
} catch {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function isCameraPermissionCached() {
|
|
46
|
-
if (!hasSessionStorage()) return false;
|
|
47
|
-
try {
|
|
48
|
-
return sessionStorage.getItem(CAMERA_PERMISSION_CACHE_KEY) === "true";
|
|
49
|
-
} catch {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function markCameraPermissionGranted() {
|
|
54
|
-
if (!hasSessionStorage()) return;
|
|
55
|
-
try {
|
|
56
|
-
sessionStorage.setItem(CAMERA_PERMISSION_CACHE_KEY, "true");
|
|
57
|
-
} catch {}
|
|
58
|
-
}
|
|
59
|
-
function clearCameraPermissionCache() {
|
|
60
|
-
if (!hasSessionStorage()) return;
|
|
61
|
-
try {
|
|
62
|
-
sessionStorage.removeItem(CAMERA_PERMISSION_CACHE_KEY);
|
|
63
|
-
} catch {}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/internal/permissions/permissionServices.ts
|
|
68
|
-
/**
|
|
69
|
-
* Checks the current camera permission state without prompting the user.
|
|
70
|
-
*
|
|
71
|
-
* On Android WebView, `navigator.permissions.query({ name: 'camera' })` is
|
|
72
|
-
* unreliable and returns `'prompt'` (or throws) even when camera access has
|
|
73
|
-
* already been granted for the session. To avoid re-rendering the custom
|
|
74
|
-
* "allow camera" UI for every capture module, we fall back to a session-scoped
|
|
75
|
-
* cache (written by `requestPermission()` or by a successful capture stream
|
|
76
|
-
* acquisition) when the browser query can't tell us anything concrete.
|
|
77
|
-
*/
|
|
78
|
-
async function checkPermission() {
|
|
79
|
-
const queryResult = await queryCameraPermission();
|
|
80
|
-
if (queryResult === "granted") return "granted";
|
|
81
|
-
if (queryResult === "denied") {
|
|
82
|
-
clearCameraPermissionCache();
|
|
83
|
-
return "denied";
|
|
84
|
-
}
|
|
85
|
-
if (isCameraPermissionCached()) return "granted";
|
|
86
|
-
return "prompt";
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Requests motion sensor permission. Must be called during a user gesture on iOS.
|
|
90
|
-
* Returns the permission result.
|
|
91
|
-
*/
|
|
92
|
-
async function requestMotionPermission() {
|
|
93
|
-
return new MotionSensorProvider().requestPermission();
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Requests camera permission by attempting to access the camera, then immediately
|
|
97
|
-
* stops the obtained stream. Also requests motion sensor permission (required on iOS
|
|
98
|
-
* to be called during a user gesture). This function does not keep or return the stream.
|
|
99
|
-
*/
|
|
100
|
-
async function requestPermission(options = {}) {
|
|
101
|
-
try {
|
|
102
|
-
if (options.requestMotion) await requestMotionPermission();
|
|
103
|
-
stopCameraStream(await requestCameraAccess({ video: true }));
|
|
104
|
-
markCameraPermissionGranted();
|
|
105
|
-
return "granted";
|
|
106
|
-
} catch (error) {
|
|
107
|
-
const name = error instanceof Error ? error.name : void 0;
|
|
108
|
-
if (name === "NotAllowedError" || name === "PermissionDeniedError") {
|
|
109
|
-
clearCameraPermissionCache();
|
|
110
|
-
return "denied";
|
|
111
|
-
}
|
|
112
|
-
return "prompt";
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
//#endregion
|
|
117
|
-
export { requestPermission as n, clearCameraPermissionCache as r, checkPermission as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|