@incodetech/core 0.0.0-dev-20260219-f9d9707 → 0.0.0-dev-20260219-dfbf2ff

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.
@@ -0,0 +1,2 @@
1
+ import { AnyStateMachine, StateMachine } from "xstate";
2
+ export { StateMachine as n, AnyStateMachine as t };
@@ -1,9 +1,10 @@
1
1
  import "./types-Dl8aaniO.js";
2
- import { t as AnyStateMachine } from "./StateMachine-CvjqRbSg.js";
3
- import { a as FaceCaptureDependencies, n as FaceCaptureManagerState, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-DrUCn7LS.js";
2
+ import "./warmup-oXQm8EFM.js";
3
+ import { a as FaceCaptureDependencies, n as FaceCaptureManagerState, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-BqvUNJXR.js";
4
4
  import { t as Manager } from "./Manager-DZLpIRan.js";
5
5
  import { t as ActorRefFrom } from "./Actor-DniIAF8X.js";
6
- import { r as FlowModuleConfig } from "./types-DFgUJtIJ.js";
6
+ import { t as AnyStateMachine } from "./StateMachine-DKxvdEuI.js";
7
+ import { r as FlowModuleConfig } from "./types-DeUPfNsF.js";
7
8
 
8
9
  //#region src/modules/authentication/authenticationStateMachine.d.ts
9
10
  declare const _authenticationMachine: AnyStateMachine;
@@ -1,5 +1,5 @@
1
1
  import { t as Manager } from "./Manager-DZLpIRan.js";
2
- import { r as FlowModuleConfig } from "./types-DFgUJtIJ.js";
2
+ import { r as FlowModuleConfig } from "./types-DeUPfNsF.js";
3
3
 
4
4
  //#region src/modules/curp-validation/types.d.ts
5
5
  type CurpValidationConfig = FlowModuleConfig['CURP_VALIDATION'] & {
@@ -1,5 +1,4 @@
1
1
  import { r as CameraStream } from "./types-Dl8aaniO.js";
2
- import { r as WasmPipeline } from "./StateMachine-CvjqRbSg.js";
3
2
 
4
3
  //#region ../infra/src/media/canvas.d.ts
5
4
  /**
@@ -163,83 +162,6 @@ declare class StreamCanvasCapture {
163
162
  private tick;
164
163
  }
165
164
  //#endregion
166
- //#region ../infra/src/wasm/WasmPipelineType.d.ts
167
- declare enum WasmPipelineType {
168
- IdBlurGlarePipeline = 0,
169
- IdBarcodeAndTextQualityPipeline = 1,
170
- IdVideoSelfiePipeline = 2,
171
- SelfieWithAggregationMetrics = 3,
172
- SelfieWithQualityMetrics = 4,
173
- IdFaceDetectionPipeline = 5,
174
- }
175
- //#endregion
176
- //#region ../infra/src/providers/wasm/BaseWasmProvider.d.ts
177
- /**
178
- * Base configuration for WASM providers
179
- */
180
- interface BaseWasmConfig {
181
- /** Path to the WASM binary */
182
- wasmPath?: string;
183
- /** Path to the SIMD-optimized WASM binary (optional) */
184
- wasmSimdPath?: string;
185
- /** Path to the WASM glue code */
186
- glueCodePath?: string;
187
- /** Whether to use SIMD optimizations (default: true) */
188
- useSimd?: boolean;
189
- /**
190
- * Base path for ML model files. Models will be loaded from `${modelsBasePath}/${modelFileName}`.
191
- * If not provided, models are expected in a 'models' subdirectory relative to the WASM binary.
192
- */
193
- modelsBasePath?: string;
194
- }
195
- /**
196
- * Base provider class that abstracts common WASM functionality.
197
- * This serves as a foundation for specific ML capability providers
198
- * like FaceDetectionProvider and IdCaptureProvider.
199
- */
200
- declare abstract class BaseWasmProvider {
201
- private _isInitialized;
202
- protected pipelineType: WasmPipelineType | undefined;
203
- /**
204
- * Creates a new BaseWasmProvider
205
- * @param pipelineType - The WASM pipeline type this provider uses
206
- */
207
- constructor(pipelineType?: WasmPipelineType);
208
- /**
209
- * Returns whether this provider has been initialized.
210
- */
211
- get initialized(): boolean;
212
- protected getPipelineType(): WasmPipelineType;
213
- /**
214
- * Initializes the provider by ensuring WASM is loaded
215
- * @param config - Provider configuration
216
- * @param pipeline - The pipeline type to warm up ('selfie', 'idCapture', etc.)
217
- */
218
- protected initializeBase(config: BaseWasmConfig, pipeline: WasmPipeline): Promise<void>;
219
- /**
220
- * Ensures the provider is initialized before performing operations.
221
- * @throws Error if not initialized
222
- */
223
- protected ensureInitialized(): void;
224
- /**
225
- * Processes a frame through the WASM pipeline
226
- * @param image - Image data to process
227
- * @returns The pipeline result (type depends on pipeline - WASM returns any)
228
- */
229
- protected processFrameWasm(image: ImageData): Promise<any>;
230
- abstract processFrame(image: ImageData): Promise<void>;
231
- /**
232
- * Resets the pipeline to its initial state.
233
- * Safe to call even if not initialized (no-op in that case).
234
- */
235
- reset(): void;
236
- /**
237
- * Disposes of resources and resets initialization state.
238
- * Safe to call even if not initialized.
239
- */
240
- dispose(): Promise<void>;
241
- }
242
- //#endregion
243
165
  //#region src/internal/deepsight/metadataService.d.ts
244
166
  type MetadataService = {
245
167
  initialize(sdkVersion: string, disableIpify?: boolean): Promise<void>;
@@ -300,4 +222,4 @@ type DeepsightPrcCheckParams = {
300
222
  constraints: MediaStreamConstraints;
301
223
  };
302
224
  //#endregion
303
- export { IncodeCanvas as a, IMotionSensorCapability as i, BaseWasmProvider as n, StreamCanvasCapture as r, DeepsightService as t };
225
+ export { IncodeCanvas as i, StreamCanvasCapture as n, IMotionSensorCapability as r, DeepsightService as t };
@@ -1,7 +1,7 @@
1
1
  import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, r as CameraStream } from "./types-Dl8aaniO.js";
2
- import { r as WasmPipeline } from "./StateMachine-CvjqRbSg.js";
2
+ import { t as WasmPipeline } from "./warmup-oXQm8EFM.js";
3
3
  import { t as Manager } from "./Manager-DZLpIRan.js";
4
- import { t as Flow } from "./types-DFgUJtIJ.js";
4
+ import { t as Flow } from "./types-DeUPfNsF.js";
5
5
 
6
6
  //#region ../infra/src/capabilities/IWasmUtilCapability.d.ts
7
7
  type WasmUtilConfig = MLProviderConfig & {
package/dist/flow.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { r as WasmPipeline, t as AnyStateMachine } from "./StateMachine-CvjqRbSg.js";
1
+ import { t as WasmPipeline } from "./warmup-oXQm8EFM.js";
2
2
  import { t as Manager } from "./Manager-DZLpIRan.js";
3
- import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-DFgUJtIJ.js";
3
+ import { t as AnyStateMachine } from "./StateMachine-DKxvdEuI.js";
4
+ import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-DeUPfNsF.js";
4
5
 
5
6
  //#region src/modules/flow/flowUtils.d.ts
6
7
 
@@ -1,6 +1,6 @@
1
1
  import { d as addEvent, m as revokeObjectURL, n as eventModuleNames } from "./events-mFVnFpqq.esm.js";
2
2
  import { a as stopRecording$1, c as requestPermission, i as startRecording, l as getDeviceClass, n as streamingEvents, r as createRecordingSession, s as checkPermission, t as getBackCameraStream } from "./backCameraStream-DhKbn3gt.esm.js";
3
- import { E as createManager, M as isDesktop, _ as StreamCanvasProcessingSession, c as OpenViduRecordingProvider, d as IpifyProvider, f as FingerprintProvider, g as BrowserEnvironmentProvider, h as BrowserInfoProvider, k as getWindowDimensions, m as BrowserStorageProvider, n as DEFAULT_ID_CAPTURE_THRESHOLDS, p as BrowserTimerProvider, t as DEFAULT_ID_CAPTURE_MODEL_VERSION, v as StreamCanvasCapture, x as IncodeCanvas } from "./src-CKB3MNL0.esm.js";
3
+ import { E as createManager, M as isDesktop, _ as StreamCanvasProcessingSession, c as OpenViduRecordingProvider, d as IpifyProvider, f as FingerprintProvider, g as BrowserEnvironmentProvider, h as BrowserInfoProvider, i as IdCaptureProvider, k as getWindowDimensions, m as BrowserStorageProvider, n as DEFAULT_ID_CAPTURE_THRESHOLDS, p as BrowserTimerProvider, t as DEFAULT_ID_CAPTURE_MODEL_VERSION, v as StreamCanvasCapture, x as IncodeCanvas } from "./src-CKB3MNL0.esm.js";
4
4
  import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-CAXIQnl3.esm.js";
5
5
  import { n as isBrowserSimulation } from "./deepsightService-CZC8YaHN.esm.js";
6
6
  import { n as getApi, r as getToken, t as api } from "./api-Cqrn4bGi.esm.js";
@@ -300,7 +300,8 @@ const DEFAULT_ID_CAPTURE_SETTINGS = {
300
300
  iouCheckEnabled: true
301
301
  };
302
302
  async function initializeIdCapture(params) {
303
- const { provider, config, deepsightService } = params;
303
+ const { config, deepsightService } = params;
304
+ const provider = new IdCaptureProvider();
304
305
  await provider.initialize({});
305
306
  provider.setThresholds({
306
307
  ...DEFAULT_ID_CAPTURE_THRESHOLDS$1,
@@ -1334,7 +1335,7 @@ const _idCaptureMachine = setup({
1334
1335
  currentMode,
1335
1336
  selectedDocumentType: void 0,
1336
1337
  stream: void 0,
1337
- provider: input.provider,
1338
+ provider: void 0,
1338
1339
  frameCapturer: void 0,
1339
1340
  error: void 0,
1340
1341
  detectionStatus: "idle",
@@ -1491,14 +1492,10 @@ const _idCaptureMachine = setup({
1491
1492
  initializingStream: { invoke: {
1492
1493
  id: "tutorialInitCamera",
1493
1494
  src: "initializeCamera",
1494
- input: ({ context }) => {
1495
- if (!context.provider) throw new Error("Provider is required");
1496
- return {
1497
- provider: context.provider,
1498
- config: context.config,
1499
- deepsightService: context.deepsightService
1500
- };
1501
- },
1495
+ input: ({ context }) => ({
1496
+ config: context.config,
1497
+ deepsightService: context.deepsightService
1498
+ }),
1502
1499
  onDone: {
1503
1500
  target: "ready",
1504
1501
  actions: "setStreamAndCapturer"
@@ -1666,14 +1663,10 @@ const _idCaptureMachine = setup({
1666
1663
  initializing: { invoke: {
1667
1664
  id: "initializeCamera",
1668
1665
  src: "initializeCamera",
1669
- input: ({ context }) => {
1670
- if (!context.provider) throw new Error("Provider is required");
1671
- return {
1672
- provider: context.provider,
1673
- config: context.config,
1674
- deepsightService: context.deepsightService
1675
- };
1676
- },
1666
+ input: ({ context }) => ({
1667
+ config: context.config,
1668
+ deepsightService: context.deepsightService
1669
+ }),
1677
1670
  onDone: {
1678
1671
  target: "detecting",
1679
1672
  actions: "setStreamAndCapturer"
@@ -1856,14 +1849,10 @@ const _idCaptureMachine = setup({
1856
1849
  initializingStream: { invoke: {
1857
1850
  id: "frontFinishedInitCamera",
1858
1851
  src: "initializeCamera",
1859
- input: ({ context }) => {
1860
- if (!context.provider) throw new Error("Provider is required");
1861
- return {
1862
- provider: context.provider,
1863
- config: context.config,
1864
- deepsightService: context.deepsightService
1865
- };
1866
- },
1852
+ input: ({ context }) => ({
1853
+ config: context.config,
1854
+ deepsightService: context.deepsightService
1855
+ }),
1867
1856
  onDone: {
1868
1857
  target: "ready",
1869
1858
  actions: "setStreamAndCapturer"
@@ -1963,7 +1952,6 @@ function createIdCaptureActor(options) {
1963
1952
  const dependencies = options.dependencies ?? { storage: new BrowserStorageProvider() };
1964
1953
  return createActor(idCaptureMachine, { input: {
1965
1954
  config: options.config,
1966
- provider: options.provider,
1967
1955
  dependencies
1968
1956
  } }).start();
1969
1957
  }
package/dist/id.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { A as IdCaptureGeometry, B as IdCaptureProvider, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, H as IIdCaptureCapability, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, U as IdCaptureSettings, V as DetectionOrientation, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-DDMN1YD_.js";
2
- import "./deepsightService-B3FfuHt1.js";
1
+ import { A as IdCaptureGeometry, B as DetectionOrientation, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, V as IdCaptureSettings, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-D0Zj8bRR.js";
2
+ import "./deepsightService-BLejzhoL.js";
3
3
  import { n as PermissionStatus, r as CameraStream, t as PermissionResult } from "./types-Dl8aaniO.js";
4
- import "./StateMachine-CvjqRbSg.js";
5
4
  import "./Manager-DZLpIRan.js";
6
5
  import "./Actor-DniIAF8X.js";
7
- import "./types-DFgUJtIJ.js";
8
- export { CameraStream, CaptureIdResponse, CapturedImage, CreateIdCaptureActorOptions, DetectionArea, DetectionOrientation, DetectionStatus, ID_ERROR_CODES, IIdCaptureCapability, IdCaptureActor, IdCaptureConfig, IdCaptureContext, IdCaptureDependencies, IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, IdCaptureInput, IdCaptureMachine, IdCaptureManager, IdCaptureMode, IdCaptureProvider, IdCaptureSettings, IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
6
+ import "./StateMachine-DKxvdEuI.js";
7
+ import "./types-DeUPfNsF.js";
8
+ export { CameraStream, CaptureIdResponse, CapturedImage, CreateIdCaptureActorOptions, DetectionArea, DetectionOrientation, DetectionStatus, ID_ERROR_CODES, IdCaptureActor, IdCaptureConfig, IdCaptureContext, IdCaptureDependencies, IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, IdCaptureInput, IdCaptureMachine, IdCaptureManager, IdCaptureMode, IdCaptureSettings, IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
package/dist/id.esm.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import "./events-mFVnFpqq.esm.js";
2
2
  import "./backCameraStream-DhKbn3gt.esm.js";
3
- import { i as IdCaptureProvider } from "./src-CKB3MNL0.esm.js";
3
+ import "./src-CKB3MNL0.esm.js";
4
4
  import "./endpoints-CAXIQnl3.esm.js";
5
5
  import "./deepsightService-CZC8YaHN.esm.js";
6
6
  import "./api-Cqrn4bGi.esm.js";
7
- 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-DZsKpBfe.esm.js";
7
+ 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-DHFXeDku.esm.js";
8
8
  import "./stats-C0Z_4KzW.esm.js";
9
9
 
10
- export { ID_ERROR_CODES, IdCaptureProvider, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
10
+ export { ID_ERROR_CODES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
@@ -1,9 +1,9 @@
1
- import { a as IncodeCanvas, i as IMotionSensorCapability, n as BaseWasmProvider, r as StreamCanvasCapture, t as DeepsightService } from "./deepsightService-B3FfuHt1.js";
1
+ import { i as IncodeCanvas, n as StreamCanvasCapture, r as IMotionSensorCapability, t as DeepsightService } from "./deepsightService-BLejzhoL.js";
2
2
  import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, o as RecordingConnection, r as CameraStream, s as IMLProviderCapability, t as PermissionResult } from "./types-Dl8aaniO.js";
3
- import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-CvjqRbSg.js";
4
3
  import { t as Manager } from "./Manager-DZLpIRan.js";
5
4
  import { t as ActorRefFrom } from "./Actor-DniIAF8X.js";
6
- import { i as TutorialIdConfig, t as Flow } from "./types-DFgUJtIJ.js";
5
+ import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-DKxvdEuI.js";
6
+ import { i as TutorialIdConfig, t as Flow } from "./types-DeUPfNsF.js";
7
7
 
8
8
  //#region ../infra/src/capabilities/IAnalyticsCapability.d.ts
9
9
  interface IAnalyticsCapability {
@@ -162,59 +162,6 @@ interface IIdCaptureCapability extends IMLProviderCapability<IdCaptureConfig$1>
162
162
  setCapturedCanvases(original: IncodeCanvas, transformed: IncodeCanvas): void;
163
163
  }
164
164
  //#endregion
165
- //#region ../infra/src/providers/wasm/IdCaptureProvider.d.ts
166
- declare class IdCaptureProvider extends BaseWasmProvider implements IIdCaptureCapability {
167
- private lastProcessResult;
168
- private capturedCanvas;
169
- private originalCapturedCanvas;
170
- constructor();
171
- initialize(config: IdCaptureConfig$1): Promise<void>;
172
- setCallbacks(callbacks: IdCaptureCallbacks): void;
173
- setThresholds(thresholds: IdCaptureThresholds$1): void;
174
- setGeometry(geometry: IdCaptureGeometry$1): void;
175
- setSettings(settings: IdCaptureSettings): void;
176
- setModelType(modelType: 'v1' | 'v2' | 'v3'): void;
177
- /**
178
- * Processes a frame through the WASM pipeline and stores the result.
179
- */
180
- processFrame(image: ImageData): Promise<void>;
181
- /**
182
- * Gets the last process result from the most recent frame processing.
183
- * @returns The last process result with quad coordinates, or null if not available
184
- */
185
- getLastProcessResult(): IdCaptureProcessResult | null;
186
- transformPerspective(canvas: IncodeCanvas, frameRect: {
187
- x: number;
188
- y: number;
189
- w: number;
190
- h: number;
191
- }): IncodeCanvas;
192
- /**
193
- * Crops a canvas to the specified rectangle region.
194
- * @param canvas - The canvas to crop
195
- * @param rect - The rectangle to crop to (x, y, w, h)
196
- * @returns A new IncodeCanvas with the cropped region, or null if cropping fails
197
- */
198
- private cropCanvasToRect;
199
- /**
200
- * Gets the captured canvas (transformed for preview).
201
- * @returns The captured canvas, or null if not available
202
- */
203
- getCapturedCanvas(): IncodeCanvas | null;
204
- /**
205
- * Gets the original captured canvas (full frame for upload).
206
- * @returns The original captured canvas, or null if not available
207
- */
208
- getOriginalCapturedCanvas(): IncodeCanvas | null;
209
- /**
210
- * Sets the captured canvases (original and transformed).
211
- * @param original - The original full-frame canvas (for upload)
212
- * @param transformed - The transformed canvas (for preview)
213
- */
214
- setCapturedCanvases(original: IncodeCanvas, transformed: IncodeCanvas): void;
215
- reset(): void;
216
- }
217
- //#endregion
218
165
  //#region src/modules/id/types.d.ts
219
166
  type IdCaptureMode = 'front' | 'back' | 'passport';
220
167
  type IdDocumentType = 'id' | 'passport';
@@ -475,7 +422,6 @@ type IdCaptureDependencies = {
475
422
  };
476
423
  type IdCaptureInput = {
477
424
  config: IdCaptureConfig;
478
- provider: IIdCaptureCapability;
479
425
  motionProvider?: IMotionSensorCapability;
480
426
  analyticsProvider?: IAnalyticsCapability;
481
427
  dependencies?: IdCaptureDependencies;
@@ -488,7 +434,6 @@ type IdCaptureMachine = StateMachine<IdCaptureContext, IdCaptureEvent, any, any,
488
434
  //#region src/modules/id/idCaptureActor.d.ts
489
435
  type CreateIdCaptureActorOptions = {
490
436
  config: IdCaptureConfig;
491
- provider: IIdCaptureCapability;
492
437
  dependencies?: IdCaptureDependencies;
493
438
  };
494
439
  type IdCaptureActor = ActorRefFrom<IdCaptureMachine>;
@@ -500,7 +445,6 @@ type IdCaptureInitResult = {
500
445
  provider: IIdCaptureCapability;
501
446
  };
502
447
  type InitializeIdCaptureParams = {
503
- provider: IIdCaptureCapability;
504
448
  config: IdCaptureConfig;
505
449
  deepsightService?: DeepsightService;
506
450
  };
@@ -635,4 +579,4 @@ declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): M
635
579
  };
636
580
  type IdCaptureManager = ReturnType<typeof createIdCaptureManager>;
637
581
  //#endregion
638
- export { IdCaptureGeometry as A, IdCaptureProvider as B, DetectionArea as C, IdCaptureContext as D, IdCaptureConfig as E, IdError as F, IIdCaptureCapability as H, IdErrorCode as I, IdFlowStep as L, IdCaptureMode as M, IdCaptureThresholds as N, IdCaptureDependencies as O, IdDocumentType as P, RecordingSession as R, CapturedImage as S, ID_ERROR_CODES as T, IdCaptureSettings as U, DetectionOrientation as V, IdCaptureActor as _, InitializeIdCaptureParams as a, idCaptureMachine as b, ValidationError as c, startRecordingSession as d, stopRecording as f, CreateIdCaptureActorOptions as g, validateUploadResponse as h, IdCaptureInitResult as i, IdCaptureInput as j, IdCaptureEvent as k, initializeIdCapture as l, uploadIdImage as m, IdCaptureState as n, StartRecordingParams as o, stopStream as p, createIdCaptureManager as r, UploadIdImageParams as s, IdCaptureManager as t, processId as u, createIdCaptureActor as v, DetectionStatus as w, CaptureIdResponse as x, IdCaptureMachine as y, UploadIdResponse as z };
582
+ export { IdCaptureGeometry as A, DetectionOrientation as B, DetectionArea as C, IdCaptureContext as D, IdCaptureConfig as E, IdError as F, IdErrorCode as I, IdFlowStep as L, IdCaptureMode as M, IdCaptureThresholds as N, IdCaptureDependencies as O, IdDocumentType as P, RecordingSession as R, CapturedImage as S, ID_ERROR_CODES as T, IdCaptureSettings as V, IdCaptureActor as _, InitializeIdCaptureParams as a, idCaptureMachine as b, ValidationError as c, startRecordingSession as d, stopRecording as f, CreateIdCaptureActorOptions as g, validateUploadResponse as h, IdCaptureInitResult as i, IdCaptureInput as j, IdCaptureEvent as k, initializeIdCapture as l, uploadIdImage as m, IdCaptureState as n, StartRecordingParams as o, stopStream as p, createIdCaptureManager as r, UploadIdImageParams as s, IdCaptureManager as t, processId as u, createIdCaptureActor as v, DetectionStatus as w, CaptureIdResponse as x, IdCaptureMachine as y, UploadIdResponse as z };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { A as IdCaptureGeometry, B as IdCaptureProvider, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, H as IIdCaptureCapability, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, U as IdCaptureSettings, V as DetectionOrientation, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-DDMN1YD_.js";
2
- import "./deepsightService-B3FfuHt1.js";
1
+ import { A as IdCaptureGeometry, B as DetectionOrientation, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, V as IdCaptureSettings, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-D0Zj8bRR.js";
2
+ import "./deepsightService-BLejzhoL.js";
3
3
  import { n as PermissionStatus, r as CameraStream, t as PermissionResult } from "./types-Dl8aaniO.js";
4
- import { i as warmupWasm, r as WasmPipeline } from "./StateMachine-CvjqRbSg.js";
4
+ import { n as warmupWasm, t as WasmPipeline } from "./warmup-oXQm8EFM.js";
5
5
  import "./Manager-DZLpIRan.js";
6
6
  import "./Actor-DniIAF8X.js";
7
- import "./types-DFgUJtIJ.js";
7
+ import "./StateMachine-DKxvdEuI.js";
8
+ import "./types-DeUPfNsF.js";
8
9
 
9
10
  //#region ../infra/src/http/types.d.ts
10
11
  type CreateApiConfig = {
@@ -520,4 +521,4 @@ declare function moduleClosed(module: EventModule | string, screen?: EventScreen
520
521
  declare function screenOpened(module: EventModule | string, screen: EventScreen | string, payload?: Record<string, unknown>): void;
521
522
  declare function screenClosed(module: EventModule | string, screen: EventScreen | string, payload?: Record<string, unknown>): void;
522
523
  //#endregion
523
- export { type Browser, CameraStream, CaptureIdResponse, CapturedImage, CreateIdCaptureActorOptions, type CreateSessionOptions, DetectionArea, DetectionOrientation, DetectionStatus, type DeviceClass, type Event, type EventModule, type EventScreen, type HttpClient, ID_ERROR_CODES, IIdCaptureCapability, IdCaptureActor, IdCaptureConfig, IdCaptureContext, IdCaptureDependencies, IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, IdCaptureInput, IdCaptureMachine, IdCaptureManager, IdCaptureMode, IdCaptureProvider, IdCaptureSettings, IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, type PermissionResult, type PermissionStatus, RecordingSession, type Session, type SessionInitOptions, type SessionInitResult, type SetupOptions, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, type WasmConfig, type WasmPipeline, addEvent, api, cameraScreenNamesMapper, checkPermission as checkCameraPermission, createApi, createIdCaptureActor, createIdCaptureManager, createSession, eventModuleNames, eventScreenNames, flushEventQueue, getApi, getBrowser, getDeviceClass, getDisableIpify, getSessionFeatures, idCaptureMachine, initializeIdCapture, initializeSession, initializeWasmUtil, isConfigured, isSessionInitialized, moduleClosed, moduleOpened, processId, requestPermission as requestCameraPermission, reset, resetSessionInit, screenClosed, screenEvent, screenOpened, setWasmConfig, setup, startRecordingSession, stopRecording, stopStream, subscribeEvent, tutorialScreenNamesMapper, uploadIdImage, validateUploadResponse, videoSelfieEvents, warmupWasm };
524
+ export { type Browser, CameraStream, CaptureIdResponse, CapturedImage, CreateIdCaptureActorOptions, type CreateSessionOptions, DetectionArea, DetectionOrientation, DetectionStatus, type DeviceClass, type Event, type EventModule, type EventScreen, type HttpClient, ID_ERROR_CODES, IdCaptureActor, IdCaptureConfig, IdCaptureContext, IdCaptureDependencies, IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, IdCaptureInput, IdCaptureMachine, IdCaptureManager, IdCaptureMode, IdCaptureSettings, IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, type PermissionResult, type PermissionStatus, RecordingSession, type Session, type SessionInitOptions, type SessionInitResult, type SetupOptions, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, type WasmConfig, type WasmPipeline, addEvent, api, cameraScreenNamesMapper, checkPermission as checkCameraPermission, createApi, createIdCaptureActor, createIdCaptureManager, createSession, eventModuleNames, eventScreenNames, flushEventQueue, getApi, getBrowser, getDeviceClass, getDisableIpify, getSessionFeatures, idCaptureMachine, initializeIdCapture, initializeSession, initializeWasmUtil, isConfigured, isSessionInitialized, moduleClosed, moduleOpened, processId, requestPermission as requestCameraPermission, reset, resetSessionInit, screenClosed, screenEvent, screenOpened, setWasmConfig, setup, startRecordingSession, stopRecording, stopStream, subscribeEvent, tutorialScreenNamesMapper, uploadIdImage, validateUploadResponse, videoSelfieEvents, warmupWasm };
package/dist/index.esm.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { a as videoSelfieEvents, c as screenClosed, d as addEvent, f as flushEventQueue, i as tutorialScreenNamesMapper, l as screenEvent, n as eventModuleNames, o as moduleClosed, p as subscribeEvent, r as eventScreenNames, s as moduleOpened, t as cameraScreenNamesMapper, u as screenOpened } from "./events-mFVnFpqq.esm.js";
2
2
  import { c as requestPermission, l as getDeviceClass, s as checkPermission, u as getBrowser } from "./backCameraStream-DhKbn3gt.esm.js";
3
- import { D as createApi_default, i as IdCaptureProvider, o as warmupWasm, r as WasmUtilProvider } from "./src-CKB3MNL0.esm.js";
3
+ import { D as createApi_default, o as warmupWasm, r as WasmUtilProvider } from "./src-CKB3MNL0.esm.js";
4
4
  import "./endpoints-CAXIQnl3.esm.js";
5
5
  import "./deepsightService-CZC8YaHN.esm.js";
6
6
  import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-Cqrn4bGi.esm.js";
7
- import { _ as createSession, a as processId, c as stopStream, d as ID_ERROR_CODES, f as getDisableIpify, g as resetSessionInit, h as isSessionInitialized, i as initializeIdCapture, l as uploadIdImage, m as initializeSession, n as createIdCaptureActor, o as startRecordingSession, p as getSessionFeatures, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-DZsKpBfe.esm.js";
7
+ import { _ as createSession, a as processId, c as stopStream, d as ID_ERROR_CODES, f as getDisableIpify, g as resetSessionInit, h as isSessionInitialized, i as initializeIdCapture, l as uploadIdImage, m as initializeSession, n as createIdCaptureActor, o as startRecordingSession, p as getSessionFeatures, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-DHFXeDku.esm.js";
8
8
  import "./stats-C0Z_4KzW.esm.js";
9
9
 
10
10
  //#region src/setup.ts
@@ -126,4 +126,4 @@ function reset() {
126
126
  }
127
127
 
128
128
  //#endregion
129
- export { ID_ERROR_CODES, IdCaptureProvider, addEvent, api, cameraScreenNamesMapper, checkPermission as checkCameraPermission, createApi_default as createApi, createIdCaptureActor, createIdCaptureManager, createSession, eventModuleNames, eventScreenNames, flushEventQueue, getApi, getBrowser, getDeviceClass, getDisableIpify, getSessionFeatures, idCaptureMachine, initializeIdCapture, initializeSession, initializeWasmUtil, isConfigured, isSessionInitialized, moduleClosed, moduleOpened, processId, requestPermission as requestCameraPermission, reset, resetSessionInit, screenClosed, screenEvent, screenOpened, setWasmConfig, setup, startRecordingSession, stopRecording, stopStream, subscribeEvent, tutorialScreenNamesMapper, uploadIdImage, validateUploadResponse, videoSelfieEvents, warmupWasm };
129
+ export { ID_ERROR_CODES, addEvent, api, cameraScreenNamesMapper, checkPermission as checkCameraPermission, createApi_default as createApi, createIdCaptureActor, createIdCaptureManager, createSession, eventModuleNames, eventScreenNames, flushEventQueue, getApi, getBrowser, getDeviceClass, getDisableIpify, getSessionFeatures, idCaptureMachine, initializeIdCapture, initializeSession, initializeWasmUtil, isConfigured, isSessionInitialized, moduleClosed, moduleOpened, processId, requestPermission as requestCameraPermission, reset, resetSessionInit, screenClosed, screenEvent, screenOpened, setWasmConfig, setup, startRecordingSession, stopRecording, stopStream, subscribeEvent, tutorialScreenNamesMapper, uploadIdImage, validateUploadResponse, videoSelfieEvents, warmupWasm };
package/dist/selfie.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { a as IncodeCanvas, n as BaseWasmProvider, r as StreamCanvasCapture, t as DeepsightService } from "./deepsightService-B3FfuHt1.js";
1
+ import { i as IncodeCanvas, n as StreamCanvasCapture, t as DeepsightService } from "./deepsightService-BLejzhoL.js";
2
2
  import { c as MLProviderConfig, n as PermissionStatus, r as CameraStream, s as IMLProviderCapability, t as PermissionResult } from "./types-Dl8aaniO.js";
3
- import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-CvjqRbSg.js";
4
- import { a as FaceCaptureDependencies, i as DetectionStatus, n as FaceCaptureManagerState, o as FaceErrorCode, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-DrUCn7LS.js";
3
+ import { t as WasmPipeline } from "./warmup-oXQm8EFM.js";
4
+ import { a as FaceCaptureDependencies, i as DetectionStatus, n as FaceCaptureManagerState, o as FaceErrorCode, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-BqvUNJXR.js";
5
5
  import { t as Manager } from "./Manager-DZLpIRan.js";
6
- import { r as FlowModuleConfig } from "./types-DFgUJtIJ.js";
6
+ import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-DKxvdEuI.js";
7
+ import { r as FlowModuleConfig } from "./types-DeUPfNsF.js";
7
8
 
8
9
  //#region ../infra/src/capabilities/IFaceDetectionCapability.d.ts
9
10
  /**
@@ -145,6 +146,83 @@ interface IFaceDetectionCapability extends IMLProviderCapability<FaceDetectionCo
145
146
  setVideoSelfieMode(enabled: boolean): void;
146
147
  }
147
148
  //#endregion
149
+ //#region ../infra/src/wasm/WasmPipelineType.d.ts
150
+ declare enum WasmPipelineType {
151
+ IdBlurGlarePipeline = 0,
152
+ IdBarcodeAndTextQualityPipeline = 1,
153
+ IdVideoSelfiePipeline = 2,
154
+ SelfieWithAggregationMetrics = 3,
155
+ SelfieWithQualityMetrics = 4,
156
+ IdFaceDetectionPipeline = 5,
157
+ }
158
+ //#endregion
159
+ //#region ../infra/src/providers/wasm/BaseWasmProvider.d.ts
160
+ /**
161
+ * Base configuration for WASM providers
162
+ */
163
+ interface BaseWasmConfig {
164
+ /** Path to the WASM binary */
165
+ wasmPath?: string;
166
+ /** Path to the SIMD-optimized WASM binary (optional) */
167
+ wasmSimdPath?: string;
168
+ /** Path to the WASM glue code */
169
+ glueCodePath?: string;
170
+ /** Whether to use SIMD optimizations (default: true) */
171
+ useSimd?: boolean;
172
+ /**
173
+ * Base path for ML model files. Models will be loaded from `${modelsBasePath}/${modelFileName}`.
174
+ * If not provided, models are expected in a 'models' subdirectory relative to the WASM binary.
175
+ */
176
+ modelsBasePath?: string;
177
+ }
178
+ /**
179
+ * Base provider class that abstracts common WASM functionality.
180
+ * This serves as a foundation for specific ML capability providers
181
+ * like FaceDetectionProvider and IdCaptureProvider.
182
+ */
183
+ declare abstract class BaseWasmProvider {
184
+ private _isInitialized;
185
+ protected pipelineType: WasmPipelineType | undefined;
186
+ /**
187
+ * Creates a new BaseWasmProvider
188
+ * @param pipelineType - The WASM pipeline type this provider uses
189
+ */
190
+ constructor(pipelineType?: WasmPipelineType);
191
+ /**
192
+ * Returns whether this provider has been initialized.
193
+ */
194
+ get initialized(): boolean;
195
+ protected getPipelineType(): WasmPipelineType;
196
+ /**
197
+ * Initializes the provider by ensuring WASM is loaded
198
+ * @param config - Provider configuration
199
+ * @param pipeline - The pipeline type to warm up ('selfie', 'idCapture', etc.)
200
+ */
201
+ protected initializeBase(config: BaseWasmConfig, pipeline: WasmPipeline): Promise<void>;
202
+ /**
203
+ * Ensures the provider is initialized before performing operations.
204
+ * @throws Error if not initialized
205
+ */
206
+ protected ensureInitialized(): void;
207
+ /**
208
+ * Processes a frame through the WASM pipeline
209
+ * @param image - Image data to process
210
+ * @returns The pipeline result (type depends on pipeline - WASM returns any)
211
+ */
212
+ protected processFrameWasm(image: ImageData): Promise<any>;
213
+ abstract processFrame(image: ImageData): Promise<void>;
214
+ /**
215
+ * Resets the pipeline to its initial state.
216
+ * Safe to call even if not initialized (no-op in that case).
217
+ */
218
+ reset(): void;
219
+ /**
220
+ * Disposes of resources and resets initialization state.
221
+ * Safe to call even if not initialized.
222
+ */
223
+ dispose(): Promise<void>;
224
+ }
225
+ //#endregion
148
226
  //#region ../infra/src/providers/wasm/FaceDetectionProvider.d.ts
149
227
  declare class FaceDetectionProvider extends BaseWasmProvider implements IFaceDetectionCapability {
150
228
  private defaultThresholds;
@@ -1,7 +1,4 @@
1
- import { AnyStateMachine, StateMachine } from "xstate";
2
-
3
1
  //#region ../infra/src/wasm/warmup.d.ts
4
-
5
2
  /**
6
3
  * All available ML pipelines in the SDK.
7
4
  * - 'selfie' - Face detection for selfie capture
@@ -55,4 +52,4 @@ interface WarmupConfig {
55
52
  */
56
53
  declare function warmupWasm(config: WarmupConfig): Promise<void>;
57
54
  //#endregion
58
- export { warmupWasm as i, StateMachine as n, WasmPipeline as r, AnyStateMachine as t };
55
+ export { warmupWasm as n, WasmPipeline as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/core",
3
- "version": "0.0.0-dev-20260219-f9d9707",
3
+ "version": "0.0.0-dev-20260219-dfbf2ff",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",