@incodetech/core 2.0.0-alpha.12 → 2.0.0-alpha.13

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.
@@ -790,7 +790,8 @@ const _idCaptureMachine = setup({
790
790
  glare: input.qualityElements?.glare,
791
791
  sharpness: input.qualityElements?.sharpness,
792
792
  ageAssurance: false,
793
- signal
793
+ signal,
794
+ onProgress: input.onProgress
794
795
  });
795
796
  }),
796
797
  processId: fromPromise(async ({ input, signal }) => {
@@ -1501,13 +1502,19 @@ const _idCaptureMachine = setup({
1501
1502
  invoke: {
1502
1503
  id: "uploadIdImage",
1503
1504
  src: "uploadIdImage",
1504
- input: ({ context }) => {
1505
+ input: ({ context, self }) => {
1505
1506
  const canvas = context.provider?.getOriginalCapturedCanvas();
1506
1507
  if (!canvas) throw new Error(ID_ERROR_CODES.UPLOAD_ERROR);
1507
1508
  return {
1508
1509
  canvas,
1509
1510
  type: context.currentMode === "back" ? "back" : "front",
1510
- qualityElements: context.qualityElements
1511
+ qualityElements: context.qualityElements,
1512
+ onProgress: (progress) => {
1513
+ self.send({
1514
+ type: "UPLOAD_PROGRESS",
1515
+ progress
1516
+ });
1517
+ }
1511
1518
  };
1512
1519
  },
1513
1520
  onDone: {
package/dist/id.esm.js CHANGED
@@ -3,6 +3,6 @@ import "./recordingsRepository-D5MURoVB.esm.js";
3
3
  import "./streamingEvents-B3hNanPl.esm.js";
4
4
  import "./xstate.esm-2hDiAXvZ.esm.js";
5
5
  import "./addEvent-BGKc_lHF.esm.js";
6
- import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-CJKLe8HS.esm.js";
6
+ import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-DHVSW_wJ.esm.js";
7
7
 
8
8
  export { ID_ERROR_CODES, IdCaptureProvider, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
package/dist/index.esm.js CHANGED
@@ -3,7 +3,7 @@ import "./recordingsRepository-D5MURoVB.esm.js";
3
3
  import { a as getBrowser, i as getDeviceClass, n as checkPermission, r as requestPermission } from "./streamingEvents-B3hNanPl.esm.js";
4
4
  import "./xstate.esm-2hDiAXvZ.esm.js";
5
5
  import "./addEvent-BGKc_lHF.esm.js";
6
- import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-CJKLe8HS.esm.js";
6
+ import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-DHVSW_wJ.esm.js";
7
7
 
8
8
  //#region src/internal/session/sessionService.ts
9
9
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/core",
3
- "version": "2.0.0-alpha.12",
3
+ "version": "2.0.0-alpha.13",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",