@incodetech/core 0.0.0-dev-20260908-9c122b5c → 0.0.0-dev-20260909-c7e1af86
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/THIRD_PARTY_NOTICES.txt +281 -0
- package/dist/{BrowserDiagnosticsCryptoProvider-CD-46IAf.esm.js → BrowserDiagnosticsCryptoProvider-tYwCiTWK.esm.js} +1 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-B_B1weL6.esm.js → apiError-CgxCfUOj.esm.js} +1 -1
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-DBmtZKuz.esm.js → authenticationManager-DLH3lVkF.esm.js} +3 -3
- package/dist/{authenticationStateMachine-DaYRxSqo.esm.js → authenticationStateMachine-DEYQMRHn.esm.js} +2 -2
- package/dist/{deepsightLoader-D1G-VFbn.esm.js → deepsightLoader-_iYfQ8VD.esm.js} +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-DBjczXv8.esm.js → dynamicFormsManager-vZ9zl5Da.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-ASNJ5S61.esm.js → dynamicFormsStateMachine-COjEnxHm.esm.js} +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-D51d-h0F.esm.js → ekybManager-D9XKsvBj.esm.js} +1 -1
- package/dist/{ekybStateMachine-B31-dhZA.esm.js → ekybStateMachine-ilElueA-.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-Ct5sW4HO.esm.js → electronicSignatureManager-CdhcZbC9.esm.js} +1 -1
- package/dist/extensibility.d.ts +2 -2
- package/dist/extensibility.esm.js +11 -11
- package/dist/{faceCaptureManagerFactory-D53tSJxt.esm.js → faceCaptureManagerFactory-D_IjIhxl.esm.js} +1 -1
- package/dist/{faceCaptureSetup-DsKZumna.esm.js → faceCaptureSetup-awUh8VCl.esm.js} +1 -1
- package/dist/{feature-management-D0248lYa.esm.js → feature-management-Du9xdX7M.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/fiscalQrManager-DI6uOffY.esm.js +34131 -0
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-CsYeXBv6.esm.js → flowCompletionService-3GtJn2zR.esm.js} +1 -1
- package/dist/{flowServices-DmegoCr4.esm.js → flowServices-YfL1EKuW.esm.js} +4 -4
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-Bcxe0F86.esm.js → geolocationManager-CC9UFnQ2.esm.js} +1 -1
- package/dist/{geolocationStateMachine-L4bDZPIN.esm.js → geolocationStateMachine-rygBXNNf.esm.js} +1 -1
- package/dist/id-selfie-flow.esm.js +7 -7
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-BKboAo2k.esm.js → idCaptureDefaults-Cqjr4IeT.esm.js} +1 -1
- package/dist/{idCaptureManager-Dc7qF-K9.esm.js → idCaptureManager-BgYtCEme.esm.js} +3 -3
- package/dist/{idCaptureServices-poLpPyW1.esm.js → idCaptureServices-BnKpn5Mo.esm.js} +3 -3
- package/dist/{idCaptureStateMachine-B10TdDdp.esm.js → idCaptureStateMachine-Ds1h9I5e.esm.js} +7 -7
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/{identityReuseManager-BFDI7iFK.d.ts → identityReuseManager-v2TH5g7e.d.ts} +4 -4
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +1 -1
- package/dist/{mandatoryConsentManager-CSh8HjSF.d.ts → mandatoryConsentManager-BxrRrlBs.d.ts} +4 -4
- package/dist/{onDeviceFaceResults-B1cbeiRv.esm.js → onDeviceFaceResults-DX_w8IU6.esm.js} +4 -4
- package/dist/personhood.esm.js +4 -4
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{runChildModule-6B5waNIV.esm.js → runChildModule-D5YlnMvI.esm.js} +1 -1
- package/dist/{sdkVersion-DkRFyTPd.esm.js → sdkVersion-D8h4q4Nh.esm.js} +1 -1
- package/dist/selfie.esm.js +5 -5
- package/dist/{selfieManager-CnO_5TQL.esm.js → selfieManager-cGmMWvpW.esm.js} +3 -3
- package/dist/{selfieStateMachine-BiINbU9P.esm.js → selfieStateMachine-k6Bq7J4P.esm.js} +2 -2
- package/dist/{session-BXB1i4lk.esm.js → session-BV5WiMdu.esm.js} +3 -3
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-D6T8BS_U.esm.js → sessionInitializer-CkjAjwEA.esm.js} +3 -3
- package/dist/{setup-BYFxYz35.esm.js → setup-BITXhKBQ.esm.js} +4 -4
- package/dist/{trueSightService-Z_tJ_oDu.esm.js → trueSightService-Dw2EyxWk.esm.js} +2 -2
- package/dist/video-selfie.esm.js +4 -4
- package/dist/{videoSelfieCameraWarmer-9BspjWGC.esm.js → videoSelfieCameraWarmer-Bir2h5bj.esm.js} +3 -3
- package/dist/wasm.esm.js +1 -1
- package/dist/workflow.esm.js +14 -14
- package/package.json +4 -5
- package/dist/fiscalQrManager-VkhU2SxS.esm.js +0 -311
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/core",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260909-c7e1af86",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -267,13 +267,12 @@
|
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
269
|
"files": [
|
|
270
|
-
"dist"
|
|
270
|
+
"dist",
|
|
271
|
+
"THIRD_PARTY_NOTICES.txt"
|
|
271
272
|
],
|
|
272
|
-
"dependencies": {
|
|
273
|
-
"@zxing/browser": "0.1.5"
|
|
274
|
-
},
|
|
275
273
|
"devDependencies": {
|
|
276
274
|
"@vitest/coverage-v8": "4.1.10",
|
|
275
|
+
"@zxing/browser": "0.1.5",
|
|
277
276
|
"tsdown": "^0.22.8",
|
|
278
277
|
"typescript": "^5.9.3",
|
|
279
278
|
"vitest": "4.1.10",
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
2
|
-
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
3
|
-
import { n as eventModuleNames, o as createManagerInstrumentation, v as addEvent } from "./events-ijlbX_Wx.esm.js";
|
|
4
|
-
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
5
|
-
import { i as assign, s as createActor, t as setup, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
6
|
-
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
7
|
-
import { a as stopCameraStream } from "./camera-_2sXMXiF.esm.js";
|
|
8
|
-
import { n as getBackCameraStream } from "./backCameraStream-DE_5qY04.esm.js";
|
|
9
|
-
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
|
|
10
|
-
import { BrowserQRCodeReader } from "@zxing/browser";
|
|
11
|
-
//#region src/modules/fiscal-qr/fiscalQrConstants.ts
|
|
12
|
-
const SUCCESS_DISPLAY_MS = 1500;
|
|
13
|
-
const PROCESSING_DISPLAY_MS = 3e3;
|
|
14
|
-
const ERROR_DISPLAY_MS = 3e3;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/modules/fiscal-qr/qrCodeDecoder.ts
|
|
17
|
-
function createQrCodeDecoder() {
|
|
18
|
-
const reader = new BrowserQRCodeReader();
|
|
19
|
-
return { decode(canvas) {
|
|
20
|
-
try {
|
|
21
|
-
const text = reader.decodeFromCanvas(canvas.canvas).getText().trim();
|
|
22
|
-
return text.length > 0 ? text : void 0;
|
|
23
|
-
} catch {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
} };
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/modules/fiscal-qr/fiscalQrUtils.ts
|
|
30
|
-
/**
|
|
31
|
-
* Continuously decodes QR codes from an existing frame capturer until the first
|
|
32
|
-
* hit.
|
|
33
|
-
*
|
|
34
|
-
* When `applyFocusDelay` is true, waits {@link INITIAL_FOCUS_DELAY_MS} (camera
|
|
35
|
-
* focus) before the first attempt; otherwise scans immediately. Either way it
|
|
36
|
-
* then retries every {@link SCAN_INTERVAL_MS}. `onDetected` fires at most once.
|
|
37
|
-
*
|
|
38
|
-
* Takes a shared {@link StreamCanvasCapture} rather than a stream on purpose:
|
|
39
|
-
* the capturer (and its hidden video) is created once for the camera session
|
|
40
|
-
* and reused across scan restarts, so re-entering scanning never spins up a new
|
|
41
|
-
* stream consumer — which would briefly disturb the visible camera feed.
|
|
42
|
-
*
|
|
43
|
-
* @returns a cleanup function that stops the scan loop. It does NOT dispose the
|
|
44
|
-
* capturer or stop the camera — the caller owns those lifecycles.
|
|
45
|
-
*/
|
|
46
|
-
function startQrScan(frameCapturer, onDetected, applyFocusDelay = true) {
|
|
47
|
-
const decoder = createQrCodeDecoder();
|
|
48
|
-
const timer = BrowserTimerProvider.getInstance();
|
|
49
|
-
let disposed = false;
|
|
50
|
-
let hasDetected = false;
|
|
51
|
-
let scanInterval;
|
|
52
|
-
let focusDelay;
|
|
53
|
-
const scan = () => {
|
|
54
|
-
if (disposed || hasDetected) return;
|
|
55
|
-
const canvas = frameCapturer.getLatestCanvas();
|
|
56
|
-
if (!canvas) return;
|
|
57
|
-
try {
|
|
58
|
-
const link = decoder.decode(canvas);
|
|
59
|
-
if (link && !disposed && !hasDetected) {
|
|
60
|
-
hasDetected = true;
|
|
61
|
-
onDetected(link);
|
|
62
|
-
}
|
|
63
|
-
} finally {
|
|
64
|
-
canvas.dispose();
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
const beginScanning = () => {
|
|
68
|
-
scan();
|
|
69
|
-
scanInterval = timer.setInterval(scan, 500);
|
|
70
|
-
};
|
|
71
|
-
if (applyFocusDelay) focusDelay = timer.setTimeout(beginScanning, 800);
|
|
72
|
-
else beginScanning();
|
|
73
|
-
return () => {
|
|
74
|
-
disposed = true;
|
|
75
|
-
if (focusDelay !== void 0) timer.clearTimeout(focusDelay);
|
|
76
|
-
if (scanInterval !== void 0) timer.clearInterval(scanInterval);
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/modules/fiscal-qr/fiscalQrServices.ts
|
|
81
|
-
/**
|
|
82
|
-
* Submits a scanned Fiscal QR link to the backend.
|
|
83
|
-
*
|
|
84
|
-
* Throws when the request fails OR when the backend rejects the link
|
|
85
|
-
* (`success === false`), so callers can retry/skip — matching the legacy SDK
|
|
86
|
-
* which only advanced when `postResp.success` was truthy.
|
|
87
|
-
*/
|
|
88
|
-
async function submitFiscalQrLink(params, signal) {
|
|
89
|
-
const res = await api.post(endpoints.addFiscalQrLink, params, { signal });
|
|
90
|
-
if (!res.ok) throw new Error(`POST failed: ${res.status}`);
|
|
91
|
-
if (res.data?.success !== true) throw new Error("Fiscal QR link was not accepted");
|
|
92
|
-
return res.data;
|
|
93
|
-
}
|
|
94
|
-
//#endregion
|
|
95
|
-
//#region src/modules/fiscal-qr/fiscalQrStateMachine.ts
|
|
96
|
-
const fiscalQrMachine = setup({
|
|
97
|
-
types: {
|
|
98
|
-
context: {},
|
|
99
|
-
events: {},
|
|
100
|
-
input: {}
|
|
101
|
-
},
|
|
102
|
-
actors: {
|
|
103
|
-
initCamera: fromPromise(async () => {
|
|
104
|
-
const { stream } = await getBackCameraStream(void 0);
|
|
105
|
-
return {
|
|
106
|
-
stream,
|
|
107
|
-
frameCapturer: new StreamCanvasCapture(stream, { fps: 10 })
|
|
108
|
-
};
|
|
109
|
-
}),
|
|
110
|
-
submitFiscalQrLink: fromPromise(async ({ input, signal }) => {
|
|
111
|
-
await submitFiscalQrLink({ poaUrl: input.link }, signal);
|
|
112
|
-
}),
|
|
113
|
-
detectQrCode: fromCallback(({ input, sendBack }) => {
|
|
114
|
-
if (!input.frameCapturer) return () => {};
|
|
115
|
-
return startQrScan(input.frameCapturer, (link) => {
|
|
116
|
-
sendBack({
|
|
117
|
-
type: "QR_DETECTED",
|
|
118
|
-
link
|
|
119
|
-
});
|
|
120
|
-
}, input.applyFocusDelay);
|
|
121
|
-
})
|
|
122
|
-
},
|
|
123
|
-
actions: {
|
|
124
|
-
setLink: assign(({ event }) => {
|
|
125
|
-
if (event.type !== "QR_DETECTED") return {};
|
|
126
|
-
return {
|
|
127
|
-
link: event.link,
|
|
128
|
-
error: void 0
|
|
129
|
-
};
|
|
130
|
-
}),
|
|
131
|
-
setError: assign(({ event }) => ({ error: event.error?.message ?? "Submit failed" })),
|
|
132
|
-
setStream: assign(({ event }) => {
|
|
133
|
-
const { stream, frameCapturer } = event.output;
|
|
134
|
-
return {
|
|
135
|
-
stream,
|
|
136
|
-
frameCapturer,
|
|
137
|
-
error: void 0
|
|
138
|
-
};
|
|
139
|
-
}),
|
|
140
|
-
stopStream: assign(({ context }) => {
|
|
141
|
-
context.frameCapturer?.dispose();
|
|
142
|
-
if (context.stream) stopCameraStream(context.stream);
|
|
143
|
-
return {
|
|
144
|
-
stream: void 0,
|
|
145
|
-
frameCapturer: void 0
|
|
146
|
-
};
|
|
147
|
-
}),
|
|
148
|
-
incrementAttempts: assign(({ context }) => ({ attempts: context.attempts + 1 })),
|
|
149
|
-
resetSession: assign(() => ({
|
|
150
|
-
link: "",
|
|
151
|
-
error: void 0,
|
|
152
|
-
attempts: 0
|
|
153
|
-
})),
|
|
154
|
-
trackSuccess: () => addEvent({
|
|
155
|
-
code: "complete",
|
|
156
|
-
module: eventModuleNames.fiscalQr
|
|
157
|
-
})
|
|
158
|
-
},
|
|
159
|
-
guards: { isMaxAttemptsReached: ({ context }) => context.attempts + 1 >= 3 }
|
|
160
|
-
}).createMachine({
|
|
161
|
-
id: "fiscalQr",
|
|
162
|
-
initial: "idle",
|
|
163
|
-
context: ({ input }) => ({
|
|
164
|
-
config: input.config,
|
|
165
|
-
link: "",
|
|
166
|
-
stream: void 0,
|
|
167
|
-
error: void 0,
|
|
168
|
-
attempts: 0
|
|
169
|
-
}),
|
|
170
|
-
on: { SKIP: ".finished" },
|
|
171
|
-
states: {
|
|
172
|
-
idle: { on: {
|
|
173
|
-
LOAD: "idle",
|
|
174
|
-
CONTINUE: {
|
|
175
|
-
target: "initCamera",
|
|
176
|
-
actions: "resetSession"
|
|
177
|
-
}
|
|
178
|
-
} },
|
|
179
|
-
initCamera: { invoke: {
|
|
180
|
-
id: "initCamera",
|
|
181
|
-
src: "initCamera",
|
|
182
|
-
input: void 0,
|
|
183
|
-
onDone: {
|
|
184
|
-
target: "scanning",
|
|
185
|
-
actions: "setStream"
|
|
186
|
-
},
|
|
187
|
-
onError: {
|
|
188
|
-
target: "scanning",
|
|
189
|
-
actions: "setError"
|
|
190
|
-
}
|
|
191
|
-
} },
|
|
192
|
-
scanning: {
|
|
193
|
-
invoke: {
|
|
194
|
-
id: "detectQrCode",
|
|
195
|
-
src: "detectQrCode",
|
|
196
|
-
input: ({ context }) => ({
|
|
197
|
-
frameCapturer: context.frameCapturer,
|
|
198
|
-
applyFocusDelay: context.attempts === 0
|
|
199
|
-
})
|
|
200
|
-
},
|
|
201
|
-
on: {
|
|
202
|
-
QR_DETECTED: {
|
|
203
|
-
target: "submitting",
|
|
204
|
-
actions: "setLink"
|
|
205
|
-
},
|
|
206
|
-
RESET: {
|
|
207
|
-
target: "idle",
|
|
208
|
-
actions: "stopStream"
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
submitting: { invoke: {
|
|
213
|
-
id: "submitFiscalQrLink",
|
|
214
|
-
src: "submitFiscalQrLink",
|
|
215
|
-
input: ({ context }) => ({ link: context.link }),
|
|
216
|
-
onDone: {
|
|
217
|
-
target: "success",
|
|
218
|
-
actions: "trackSuccess"
|
|
219
|
-
},
|
|
220
|
-
onError: [{
|
|
221
|
-
target: "finished",
|
|
222
|
-
guard: "isMaxAttemptsReached",
|
|
223
|
-
actions: ["incrementAttempts", "setError"]
|
|
224
|
-
}, {
|
|
225
|
-
target: "error",
|
|
226
|
-
actions: ["incrementAttempts", "setError"]
|
|
227
|
-
}]
|
|
228
|
-
} },
|
|
229
|
-
success: { after: { [SUCCESS_DISPLAY_MS]: "processing" } },
|
|
230
|
-
processing: {
|
|
231
|
-
entry: "stopStream",
|
|
232
|
-
after: { [PROCESSING_DISPLAY_MS]: "verified" }
|
|
233
|
-
},
|
|
234
|
-
verified: { after: { [PROCESSING_DISPLAY_MS]: "finished" } },
|
|
235
|
-
error: { after: { [ERROR_DISPLAY_MS]: "scanning" } },
|
|
236
|
-
finished: {
|
|
237
|
-
type: "final",
|
|
238
|
-
entry: "stopStream"
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
//#endregion
|
|
243
|
-
//#region src/modules/fiscal-qr/fiscalQrActor.ts
|
|
244
|
-
/**
|
|
245
|
-
* Creates and starts a Fiscal QR actor.
|
|
246
|
-
* The actor begins in 'idle' state, ready to receive events.
|
|
247
|
-
*/
|
|
248
|
-
function createFiscalQrActor(options) {
|
|
249
|
-
return createActor(fiscalQrMachine, { input: { config: options.config } }).start();
|
|
250
|
-
}
|
|
251
|
-
//#endregion
|
|
252
|
-
//#region src/modules/fiscal-qr/fiscalQrManager.ts
|
|
253
|
-
function mapState(snapshot) {
|
|
254
|
-
const typedSnapshot = snapshot;
|
|
255
|
-
const { stream, error, attempts } = typedSnapshot.context;
|
|
256
|
-
if (typedSnapshot.matches("idle")) return { status: "idle" };
|
|
257
|
-
if (typedSnapshot.matches("initCamera") || typedSnapshot.matches("scanning")) return {
|
|
258
|
-
status: "scanning",
|
|
259
|
-
stream,
|
|
260
|
-
error
|
|
261
|
-
};
|
|
262
|
-
if (typedSnapshot.matches("submitting")) return {
|
|
263
|
-
status: "capturing",
|
|
264
|
-
stream
|
|
265
|
-
};
|
|
266
|
-
if (typedSnapshot.matches("success")) return {
|
|
267
|
-
status: "success",
|
|
268
|
-
stream
|
|
269
|
-
};
|
|
270
|
-
if (typedSnapshot.matches("processing")) return { status: "processing" };
|
|
271
|
-
if (typedSnapshot.matches("verified")) return { status: "verified" };
|
|
272
|
-
if (typedSnapshot.matches("error")) return {
|
|
273
|
-
status: "error",
|
|
274
|
-
error,
|
|
275
|
-
attempts,
|
|
276
|
-
stream
|
|
277
|
-
};
|
|
278
|
-
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
279
|
-
return { status: "idle" };
|
|
280
|
-
}
|
|
281
|
-
function createApi({ actor, trackElementClicked }) {
|
|
282
|
-
return {
|
|
283
|
-
load() {
|
|
284
|
-
actor.send({ type: "LOAD" });
|
|
285
|
-
},
|
|
286
|
-
continue() {
|
|
287
|
-
trackElementClicked?.("continue");
|
|
288
|
-
actor.send({ type: "CONTINUE" });
|
|
289
|
-
},
|
|
290
|
-
skip() {
|
|
291
|
-
trackElementClicked?.("skip");
|
|
292
|
-
actor.send({ type: "SKIP" });
|
|
293
|
-
},
|
|
294
|
-
reset() {
|
|
295
|
-
actor.send({ type: "RESET" });
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
function createFiscalQrManager(options) {
|
|
300
|
-
return createFiscalQrManagerFromActor(createFiscalQrActor(options));
|
|
301
|
-
}
|
|
302
|
-
function createFiscalQrManagerFromActor(actor) {
|
|
303
|
-
return createManager({
|
|
304
|
-
actor,
|
|
305
|
-
mapState,
|
|
306
|
-
createApi,
|
|
307
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.fiscalQr)
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
//#endregion
|
|
311
|
-
export { createFiscalQrManagerFromActor as n, fiscalQrMachine as r, createFiscalQrManager as t };
|