@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.
Files changed (54) hide show
  1. package/dist/ae-signature.d.ts +1 -1
  2. package/dist/authentication.esm.js +12 -12
  3. package/dist/{authenticationManager-CVoZsbJX.esm.js → authenticationManager-D0Yv5R02.esm.js} +1 -1
  4. package/dist/{authenticationStateMachine-DyimpeBS.esm.js → authenticationStateMachine-CFiP6P_V.esm.js} +3 -3
  5. package/dist/{backCameraStream-bztcEWzY.esm.js → backCameraStream-DWZ1cNVA.esm.js} +1 -1
  6. package/dist/camera.d.ts +0 -10
  7. package/dist/camera.esm.js +3 -3
  8. package/dist/consent.d.ts +53 -53
  9. package/dist/cpf-ocr.d.ts +17 -17
  10. package/dist/{deepsightLoader-HPZa6gSA.esm.js → deepsightLoader-CFNSfs2N.esm.js} +5 -5
  11. package/dist/{deepsightService-gNTXZu7Y.esm.js → deepsightService-IxmrmdKl.esm.js} +3 -3
  12. package/dist/device.esm.js +2 -2
  13. package/dist/document-capture.d.ts +74 -74
  14. package/dist/document-capture.esm.js +3 -3
  15. package/dist/document-upload.d.ts +43 -43
  16. package/dist/document-upload.esm.js +2 -2
  17. package/dist/{documentCaptureStateMachine-fpqYHdZV.esm.js → documentCaptureStateMachine-CuanhXvs.esm.js} +2 -2
  18. package/dist/ekyb.esm.js +3 -3
  19. package/dist/{ekybStateMachine-gQoTdfVu.esm.js → ekybStateMachine-Cq7M50sN.esm.js} +1 -1
  20. package/dist/electronic-signature.d.ts +1 -1
  21. package/dist/extensibility.esm.js +17 -17
  22. package/dist/{faceCaptureSetup-D3dirkMC.esm.js → faceCaptureSetup-zLRBv0-5.esm.js} +3 -6
  23. package/dist/flow.d.ts +2 -2
  24. package/dist/flow.esm.js +2 -2
  25. package/dist/{flowServices-DHz5fm4b.esm.js → flowServices-CLnM71N7.esm.js} +1 -1
  26. package/dist/{getDeviceClass-BTVS59zg.esm.js → getDeviceClass-DmoqR7G2.esm.js} +1 -1
  27. package/dist/home.d.ts +10 -10
  28. package/dist/id-ocr.d.ts +55 -55
  29. package/dist/id.esm.js +12 -12
  30. package/dist/{idCaptureManager-Ddv8sncg.esm.js → idCaptureManager-vkJ6QLuk.esm.js} +1 -1
  31. package/dist/{idCaptureStateMachine-CwKipvzM.esm.js → idCaptureStateMachine-C94NHeR2.esm.js} +10 -14
  32. package/dist/identity-reuse.d.ts +40 -40
  33. package/dist/{index-C7cFplmZ.d.ts → index-CNrrk1gH.d.ts} +119 -119
  34. package/dist/index.esm.js +2 -2
  35. package/dist/mandatory-consent.d.ts +50 -50
  36. package/dist/permissionServices-ACBX6sNZ.esm.js +50 -0
  37. package/dist/qe-signature.d.ts +1 -1
  38. package/dist/{recordingService-Dc8qrd2u.esm.js → recordingService-BsYjkILQ.esm.js} +6 -6
  39. package/dist/selfie.esm.js +12 -12
  40. package/dist/{selfieManager-C55Fsp9Q.esm.js → selfieManager-ByCKxpZC.esm.js} +1 -1
  41. package/dist/{selfieStateMachine-CLqNjiIq.esm.js → selfieStateMachine-ecwZ7tWK.esm.js} +2 -2
  42. package/dist/{session-mATfRV08.esm.js → session-DWFMKdX6.esm.js} +1 -1
  43. package/dist/session.esm.js +1 -1
  44. package/dist/{setup-BScIlYqq.esm.js → setup-h75-vL1d.esm.js} +1 -1
  45. package/dist/stats.esm.js +1 -1
  46. package/dist/wasm.esm.js +2 -2
  47. package/dist/workflow.d.ts +123 -123
  48. package/dist/workflow.esm.js +17 -17
  49. package/package.json +1 -1
  50. package/dist/permissionServices-DIxFacTA.esm.js +0 -117
  51. /package/dist/{MotionSensorProvider-DuErU0Pn.esm.js → MotionSensorProvider-DJMsPght.esm.js} +0 -0
  52. /package/dist/{camera-PA2Ljri3.esm.js → camera-Bm3wb89Z.esm.js} +0 -0
  53. /package/dist/{getBrowser-jTObqSyg.esm.js → getBrowser-Y88tNVud.esm.js} +0 -0
  54. /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 };