veryfi-lens-wasm 1.2.0-beta.1 → 1.2.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfi-lens-wasm",
3
- "version": "1.2.0-beta.1",
3
+ "version": "1.2.0",
4
4
  "description": "Lens For Web SDK with WASM",
5
5
  "main": "veryfi-lens.js",
6
6
  "type": "module",
package/veryfi-lens.js CHANGED
@@ -2,11 +2,11 @@ import DeviceUUID from "./wasm/device-uuid.js";
2
2
  import { WasmWrapper } from "./wasm/wasm.js";
3
3
  import gatherBrowserData from "./wasm/device-data.js";
4
4
  import UAParser from "./wasm/ua-parser.cjs";
5
-
6
- if (typeof document !== 'undefined') {
7
- const script = document.createElement("script");
8
- script.src = "./wasm/opencv.js";
9
- }
5
+ import cv from "./wasm/opencv.cjs";
6
+ // if (typeof document !== 'undefined') {
7
+ // const script = document.createElement("script");
8
+ // script.src = "./wasm/opencv.js";
9
+ // }
10
10
 
11
11
  const VeryfiLens = (function () {
12
12
  const DEFAULT_BOX_COlOR = "rgba(84, 192, 139, 0.6)";
@@ -717,7 +717,7 @@ const VeryfiLens = (function () {
717
717
  wasmWrapper.resetAutoCapture(false, false, false, true);
718
718
  if (cardData.status == "AutoCaptureResultDone") {
719
719
  ShouldProcessCC = false;
720
- wasmWrapper.resetAutoCapture(true, false, true, true);
720
+ wasmWrapper.resetAutoCapture(true, true, true, true);
721
721
  wasmWrapper.releaseCallback();
722
722
  // wasmWrapper.release();
723
723
  // CCPhase = "ScanningFront";
package/wasm/wasm.js CHANGED
@@ -1,6 +1,5 @@
1
1
  const processMethods = {
2
2
  Document: "findDocument",
3
- // Document: "documentDetectorProcessFrame",
4
3
  Stitcher: "stitchImage",
5
4
  StitcherProcess: "stitchProcessFrame",
6
5
  };
@@ -154,18 +153,6 @@ export class WasmWrapper {
154
153
  return success;
155
154
  }
156
155
 
157
- // creditCardProcessFrame(inputMatAddress, width, height) {
158
- // if (!this.loaded) return;
159
- // // Assuming inputMatAddress is a pointer to the image data in memory.
160
- // this.wasmModule.ccall(
161
- // "creditCardProcessFrame",
162
- // null,
163
- // ["number", "number", "number"],
164
- // [inputMatAddress, width, height]
165
- // );
166
- // }
167
-
168
-
169
156
  setStitcherCallback(callback) {
170
157
  if (!this.loaded || this.stitcherLoaded) return;
171
158
 
@@ -358,11 +345,11 @@ export class WasmWrapper {
358
345
  top = 30,
359
346
  bottom = 80,
360
347
  findNum = true,
361
- findName = false,
348
+ findName = true,
362
349
  findDate = true,
363
350
  findCvv = true,
364
351
  loadNumModel = true,
365
- loadNameModel = false,
352
+ loadNameModel = true,
366
353
  loadDateCvvModel = true,
367
354
  ) {
368
355
  if (bottom - top != 50)
File without changes