idmission-web-sdk 2.1.50 → 2.1.52

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.
@@ -1,5 +1,5 @@
1
1
  import { ObjectDetector, ObjectDetectorResult } from '@mediapipe/tasks-vision';
2
- export declare const defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/docdetectmp20240825/model_fp16.tflite";
2
+ export * from './defaults/DocumentDetector';
3
3
  export declare const defaultDocumentDetectionScoreThreshold = 0.1;
4
4
  export declare const defaultDocumentDetectionModelLoadTimeoutMs = 45000;
5
5
  export declare const defaultDocumentDetectionThresholds: DocumentDetectionThresholds;
@@ -1,7 +1,7 @@
1
1
  import '@mediapipe/face_detection';
2
2
  import { FaceDetector, FaceDetectorResult } from '@mediapipe/tasks-vision';
3
3
  import { Frame } from '../utils/getFrameDimensions';
4
- export declare const defaultFaceDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/blazeface20240207/blaze_face_short_range.tflite";
4
+ export * from './defaults/FaceDetector';
5
5
  export declare const defaultSelfieCaptureModelLoadTimeoutMs = 45000;
6
6
  export type FaceKeypoint = {
7
7
  x: number;
@@ -1,7 +1,7 @@
1
1
  import { ImageClassifier } from '@mediapipe/tasks-vision';
2
2
  import { Frame } from '../utils/getFrameDimensions';
3
3
  import { DetectedObjectBox } from './DocumentDetection';
4
- export declare const defaultFocusModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/focusmp20240619/model_fp16.tflite";
4
+ export * from './defaults/Focus';
5
5
  export declare const defaultFocusModelLoadTimeoutMs = 45000;
6
6
  export type FocusPrediction = {
7
7
  score: number;
@@ -0,0 +1 @@
1
+ export declare const defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/docdetectmp20240825/model_fp16.tflite";
@@ -0,0 +1 @@
1
+ export declare const defaultFaceDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/blazeface20240207/blaze_face_short_range.tflite";
@@ -0,0 +1 @@
1
+ export declare const defaultFocusModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/Focus/Focus-20240920_141944.tflite";
@@ -0,0 +1,3 @@
1
+ export * from './DocumentDetector';
2
+ export * from './Focus';
3
+ export * from './FaceDetector';
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
234
234
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
235
235
  };
236
236
 
237
- var webSdkVersion = '2.1.50';
237
+ var webSdkVersion = '2.1.52';
238
238
 
239
239
  function getPlatform() {
240
240
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2691,7 +2691,14 @@ function waitForVideoReady(videoRef, checkEveryMs) {
2691
2691
  });
2692
2692
  }
2693
2693
 
2694
- var defaultFocusModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/focusmp20240619/model_fp16.tflite";
2694
+ var DEFAULT_CDN_URL = 'https://websdk-cdn-dev.idmission.com/assets';
2695
+
2696
+ var defaultDocumentDetectorModelPath = "".concat(DEFAULT_CDN_URL, "/models/docdetectmp20240825/model_fp16.tflite");
2697
+
2698
+ var defaultFocusModelPath = "".concat(DEFAULT_CDN_URL, "/models/Focus/Focus-20240920_141944.tflite");
2699
+
2700
+ var defaultFaceDetectorModelPath = "".concat(DEFAULT_CDN_URL, "/models/blazeface20240207/blaze_face_short_range.tflite");
2701
+
2695
2702
  var defaultFocusModelLoadTimeoutMs = 45000;
2696
2703
  var defaultFocusThresholds = {
2697
2704
  idCardFront: {
@@ -5023,7 +5030,6 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof win
5023
5030
  K("VERSION", "0.4.1646425229");
5024
5031
  }).call(commonjsGlobal);
5025
5032
 
5026
- var defaultFaceDetectorModelPath = 'https://websdk-cdn-dev.idmission.com/assets/models/blazeface20240207/blaze_face_short_range.tflite';
5027
5033
  var defaultSelfieCaptureModelLoadTimeoutMs = 45000;
5028
5034
  var detector;
5029
5035
  function loadFaceDetector() {
@@ -5370,7 +5376,6 @@ function sumUpProgressForDependencies(dependencies) {
5370
5376
  });
5371
5377
  }
5372
5378
 
5373
- var defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/docdetectmp20240825/model_fp16.tflite";
5374
5379
  var defaultDocumentDetectionScoreThreshold = 0.1;
5375
5380
  var defaultDocumentDetectionModelLoadTimeoutMs = 45000;
5376
5381
  var defaultDocumentDetectionThresholds = {
@@ -7108,8 +7113,6 @@ var timeSince = function timeSince(t) {
7108
7113
  return Math.abs(new Date().getTime() - t.getTime());
7109
7114
  };
7110
7115
 
7111
- var DEFAULT_CDN_URL = 'https://websdk-cdn-dev.idmission.com/assets';
7112
-
7113
7116
  var CameraAccessDeniedOverlay = function CameraAccessDeniedOverlay(_a) {
7114
7117
  var _b;
7115
7118
  var _c = _a.assets,
@@ -8337,16 +8340,16 @@ function IdCardBorderSvg(_a) {
8337
8340
  }, /*#__PURE__*/React__namespace.default.createElement("rect", {
8338
8341
  x: "0",
8339
8342
  y: "0",
8340
- width: "100%",
8341
- height: "100%",
8343
+ width: props.width || '100%',
8344
+ height: props.height || '100%',
8342
8345
  rx: borderRadius,
8343
8346
  ry: borderRadius
8344
8347
  }))), /*#__PURE__*/React__namespace.default.createElement(IdCardBorderRect, {
8345
8348
  ref: rectRef,
8346
8349
  x: "0",
8347
8350
  y: "0",
8348
- width: "100%",
8349
- height: "100%",
8351
+ width: props.width || '100%',
8352
+ height: props.height || '100%',
8350
8353
  rx: borderRadius,
8351
8354
  ry: borderRadius,
8352
8355
  clipPath: "url(#round-corner)",
@@ -8360,7 +8363,7 @@ function IdCardBorderSvg(_a) {
8360
8363
  }
8361
8364
  var IdCardBorderContainer = styled__default.default.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n & > .pulse {\n position: absolute;\n animation: glow-grow 2s ease-out infinite;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n\n @keyframes glow-grow {\n 0% {\n opacity: 0;\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n }\n"], ["\n & > .pulse {\n position: absolute;\n animation: glow-grow 2s ease-out infinite;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n\n @keyframes glow-grow {\n 0% {\n opacity: 0;\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n }\n"])));
8362
8365
  var SvgOverlay = styled__default.default.svg(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"])));
8363
- var IdCardBorderRect = styled__default.default.rect(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n &.progress {\n animation: dash ", "\n ", ";\n }\n\n &.paused {\n animation-play-state: paused;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n"], ["\n &.progress {\n animation: dash ", "\n ", ";\n }\n\n &.paused {\n animation-play-state: paused;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n"])), function (props) {
8366
+ var IdCardBorderRect = styled__default.default.rect(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n &.progress {\n width: 100%;\n height: 100%;\n animation: dash ", "\n ", ";\n }\n\n &.paused {\n animation-play-state: paused;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n"], ["\n &.progress {\n width: 100%;\n height: 100%;\n animation: dash ", "\n ", ";\n }\n\n &.paused {\n animation-play-state: paused;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n"])), function (props) {
8364
8367
  var _a;
8365
8368
  return (_a = props.$speed) !== null && _a !== void 0 ? _a : '3s';
8366
8369
  }, function (props) {