@incodetech/core 0.0.0-dev-20260224-fd86d93 → 0.0.0-dev-20260224-54eec90

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.
@@ -5,7 +5,7 @@ import { a as fromPromise, o as createActor, r as assign, t as endpoints } from
5
5
  import "./deepsightService-Bn05rSAa.esm.js";
6
6
  import { t as api } from "./api-DlSxxyGw.esm.js";
7
7
  import "./stats-GJMiTm5k.esm.js";
8
- import { a as FACE_ERROR_CODES, n as faceCaptureMachine, o as createFaceCaptureManager, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-Dx-uEurp.esm.js";
8
+ import { a as FACE_ERROR_CODES, n as faceCaptureMachine, o as createFaceCaptureManager, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-CdGC6c86.esm.js";
9
9
 
10
10
  //#region src/modules/authentication/authenticationErrorUtils.ts
11
11
  const AUTH_ERROR_MAP = {
@@ -547,6 +547,13 @@ const _faceCaptureMachine = setup({
547
547
  });
548
548
  return () => {};
549
549
  }
550
+ if (input.manualCaptureTriggered) {
551
+ sendBack({
552
+ type: "DETECTION_UPDATE",
553
+ status: "manualCapture"
554
+ });
555
+ return () => {};
556
+ }
550
557
  const { cleanup, reset } = startDetection({
551
558
  config: input.config,
552
559
  capturer: input.frameCapturer,
@@ -663,7 +670,8 @@ const _faceCaptureMachine = setup({
663
670
  uploadError: void 0,
664
671
  permissionResult: void 0,
665
672
  resetDetection: void 0,
666
- deepsightService: void 0
673
+ deepsightService: void 0,
674
+ manualCaptureTriggered: false
667
675
  })),
668
676
  resetDetection: ({ context }) => {
669
677
  context.resetDetection?.();
@@ -703,11 +711,15 @@ const _faceCaptureMachine = setup({
703
711
  setPermissionRefresh: assign({ permissionResult: () => "refresh" }),
704
712
  setDeepsightServiceFromEvent: assign({ deepsightService: ({ event }) => event.output }),
705
713
  setErrorFromEvent: assign({ error: ({ event }) => String(event.error) }),
706
- setDetectionStatusDetecting: assign({ detectionStatus: () => "detecting" }),
714
+ setDetectionStatusDetecting: assign({ detectionStatus: ({ context }) => context.manualCaptureTriggered ? "manualCapture" : "detecting" }),
707
715
  setRecordingServiceFromEvent: assign({ recordingService: ({ context, event }) => {
708
716
  return event.output ?? context.recordingService;
709
717
  } }),
710
718
  setDetectionStatusFromEvent: assign({ detectionStatus: ({ event }) => event.status }),
719
+ setManualCaptureTriggered: assign({ manualCaptureTriggered: ({ context, event }) => {
720
+ const status = event.status;
721
+ return context.manualCaptureTriggered || status === "manualCapture";
722
+ } }),
711
723
  setDebugFrameFromEvent: assign({ debugFrame: ({ event }) => event.frame }),
712
724
  setResetDetectionFromEvent: assign({ resetDetection: ({ event }) => event.reset }),
713
725
  setCapturedImageFromEvent: assign({
@@ -773,7 +785,8 @@ const _faceCaptureMachine = setup({
773
785
  resetDetection: void 0,
774
786
  deepsightService: void 0,
775
787
  encryptedBase64Image: void 0,
776
- uploadRecordingId: void 0
788
+ uploadRecordingId: void 0,
789
+ manualCaptureTriggered: false
777
790
  }),
778
791
  on: { QUIT: { target: "#faceCapture.closed" } },
779
792
  states: {
@@ -1073,12 +1086,13 @@ const _faceCaptureMachine = setup({
1073
1086
  input: ({ context }) => ({
1074
1087
  frameCapturer: context.frameCapturer,
1075
1088
  provider: context.provider,
1076
- config: context.config
1089
+ config: context.config,
1090
+ manualCaptureTriggered: context.manualCaptureTriggered
1077
1091
  })
1078
1092
  }
1079
1093
  ],
1080
1094
  on: {
1081
- DETECTION_UPDATE: { actions: "setDetectionStatusFromEvent" },
1095
+ DETECTION_UPDATE: { actions: ["setDetectionStatusFromEvent", "setManualCaptureTriggered"] },
1082
1096
  DETECTION_FRAME: { actions: "setDebugFrameFromEvent" },
1083
1097
  DETECTION_RESET_READY: { actions: "setResetDetectionFromEvent" },
1084
1098
  DETECTION_SUCCESS: {
package/dist/selfie.d.ts CHANGED
@@ -301,6 +301,7 @@ type FaceCaptureContext = {
301
301
  deepsightService: DeepsightService | undefined;
302
302
  encryptedBase64Image: string | undefined;
303
303
  uploadRecordingId: string | null | undefined;
304
+ manualCaptureTriggered: boolean;
304
305
  };
305
306
  type FaceCaptureEvent = {
306
307
  type: 'LOAD';
@@ -5,7 +5,7 @@ import { a as fromPromise, o as createActor, r as assign } from "./endpoints-DXp
5
5
  import "./deepsightService-Bn05rSAa.esm.js";
6
6
  import "./api-DlSxxyGw.esm.js";
7
7
  import "./stats-GJMiTm5k.esm.js";
8
- import { a as FACE_ERROR_CODES, i as uploadSelfie, n as faceCaptureMachine, o as createFaceCaptureManager, r as processFace, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-Dx-uEurp.esm.js";
8
+ import { a as FACE_ERROR_CODES, i as uploadSelfie, n as faceCaptureMachine, o as createFaceCaptureManager, r as processFace, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-CdGC6c86.esm.js";
9
9
 
10
10
  //#region src/modules/selfie/selfieErrorUtils.ts
11
11
  const FACE_ERROR_CODE_VALUES = Object.values(FACE_ERROR_CODES);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/core",
3
- "version": "0.0.0-dev-20260224-fd86d93",
3
+ "version": "0.0.0-dev-20260224-54eec90",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",