idmission-web-sdk 1.0.252 → 1.0.254

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.
@@ -26,6 +26,7 @@ export type IdCaptureLoadingOverlayColors = {
26
26
  export type IdCaptureLoadingOverlayVerbiage = {
27
27
  headingText?: CustomerSuppliedVerbiage;
28
28
  useContinuityCameraText?: CustomerSuppliedVerbiage;
29
+ downloadingText?: CustomerSuppliedVerbiage;
29
30
  modelsWarmingUpText?: CustomerSuppliedVerbiage;
30
31
  cameraInitializingText?: CustomerSuppliedVerbiage;
31
32
  continueText?: CustomerSuppliedVerbiage;
@@ -44,6 +44,7 @@ export type BestFrame = {
44
44
  };
45
45
  export type IdCaptureModelsState = {
46
46
  ready: boolean;
47
+ modelDownloadProgress: number;
47
48
  working: MutableRefObject<boolean>;
48
49
  error: Error | null;
49
50
  thresholds: IdCaptureThresholds;
@@ -1,6 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { MutableRefObject, ReactElement, ReactNode } from 'react';
3
3
  import { FaceDetector } from '@mediapipe/tasks-vision';
4
+ export declare const visionTasksBasePath = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.7/wasm";
5
+ export declare const faceDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/blazeface20240207/blaze_face_short_range.tflite";
4
6
  export type FaceKeypoint = {
5
7
  x: number;
6
8
  y: number;
@@ -26,6 +28,7 @@ type HighPerformanceSelfieGuidanceModelsState = {
26
28
  canvasRef: MutableRefObject<HTMLCanvasElement | null>;
27
29
  ready: boolean;
28
30
  error: Error | null;
31
+ modelDownloadProgress: number;
29
32
  };
30
33
  export declare const HighPerformanceSelfieGuidanceModelsContext: React.Context<HighPerformanceSelfieGuidanceModelsState>;
31
34
  export declare const HighPerformanceSelfieGuidanceModelsProvider: ({ autoStart, children, throttleMs, }: {
@@ -27,6 +27,7 @@ export type SelfieCaptureLoadingOverlayVerbiage = {
27
27
  avoidExcessiveBacklightingText?: CustomerSuppliedVerbiage;
28
28
  continueText?: CustomerSuppliedVerbiage;
29
29
  cameraInitializingText?: CustomerSuppliedVerbiage;
30
+ downloadingText?: CustomerSuppliedVerbiage;
30
31
  modelsWarmingUpText?: CustomerSuppliedVerbiage;
31
32
  cameraAccessDenied?: CameraAccessDeniedOverlayVerbiage;
32
33
  };
@@ -80,5 +80,6 @@ declare const _default: {
80
80
  'On-device capture guidance failed, please capture a photo of your passport manually.': string;
81
81
  'On-device capture guidance failed, please capture photos of your ID card and passport manually.': string;
82
82
  'On-device capture guidance failed, please capture photos of your ID card or passport manually.': string;
83
+ 'Downloading...': string;
83
84
  };
84
85
  export default _default;
@@ -88,6 +88,7 @@ export declare const resources: {
88
88
  'On-device capture guidance failed, please capture a photo of your passport manually.': string;
89
89
  'On-device capture guidance failed, please capture photos of your ID card and passport manually.': string;
90
90
  'On-device capture guidance failed, please capture photos of your ID card or passport manually.': string;
91
+ 'Downloading...': string;
91
92
  };
92
93
  };
93
94
  };
@@ -3,3 +3,12 @@ export declare const preloadModels: ({ documentDetectionModel, focusModel, faceD
3
3
  focusModel?: string | boolean | undefined;
4
4
  faceDetectionModel?: boolean | undefined;
5
5
  }) => Promise<void>;
6
+ export type PreloadProgress = {
7
+ loaded: number;
8
+ total: number;
9
+ };
10
+ export declare function preloadDependency(url: string): Promise<unknown>;
11
+ export declare function preloadIdCaptureDependencies(): Promise<void>;
12
+ export declare function preloadFaceDetectorDependencies(): Promise<void>;
13
+ export declare function getTfjsModelDependencies(url: string): Promise<string[]>;
14
+ export declare function progressToPercentage(progress: PreloadProgress): number;