veryfi-lens-wasm 2.0.0 → 2.0.1

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.
@@ -47,7 +47,6 @@ export const createCroppedImage = (container) => {
47
47
  return Object.assign(cropImgCanvas, {
48
48
  cleanup,
49
49
  showBorder: () => {
50
- console.log("Showing border");
51
50
  cropImgCanvas.style.border = '3px solid red';
52
51
  cropImgCanvas.style.borderRadius = '10px';
53
52
  },
@@ -1,5 +1,4 @@
1
1
  export const createOverlayContainer = () => {
2
- console.log("Creating overlay container");
3
2
  // Create and append a style element with reset CSS
4
3
  const style = document.createElement('style');
5
4
  style.textContent = `
@@ -20,7 +20,7 @@ export const createVideo = (container) => {
20
20
  const isMobile = window.innerWidth <= 768 || window.innerHeight <= 768;
21
21
 
22
22
  if (!isMobile) {
23
- console.log('desktop');
23
+ // console.log('desktop');
24
24
  video.style.position = 'absolute';
25
25
  video.style.width = '100%';
26
26
  video.style.height = 'auto';
@@ -28,7 +28,7 @@ export const createVideo = (container) => {
28
28
  video.style.top = '';
29
29
  video.style.left = '';
30
30
  } else {
31
- console.log('mobile');
31
+ // console.log('mobile');
32
32
  video.style.position = 'fixed';
33
33
  video.style.top = '0';
34
34
  video.style.left = '0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfi-lens-wasm",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Lens For Web SDK with WASM",
5
5
  "main": "veryfi-lens.js",
6
6
  "type": "module",
package/veryfi-lens.js CHANGED
@@ -28,12 +28,7 @@ import { createCardDataButton } from './components/cardDataButton.js';
28
28
 
29
29
 
30
30
  const VeryfiLens = (function () {
31
- const DEFAULT_BOX_COlOR = "rgba(84, 192, 139, 0.6)";
32
- const INTERVAL = 250;
33
- // const VALIDATE_URL = "https://lens.veryfi.com/rest/validate_partner";
34
- const VALIDATE_URL = "https://lens.veryfi.com/rest/validate_partner";
35
31
  let wasmWrapper = null;
36
- let creditCardStatus = "AutoCaptureResultWaiting";
37
32
 
38
33
  const state = {
39
34
  // Camera and processing state
@@ -721,7 +716,7 @@ const VeryfiLens = (function () {
721
716
  const ctx = cropImgCanvas.getContext("2d");
722
717
  const imageData = new ImageData(data, width, height);
723
718
  ctx.putImageData(imageData, 0, 0);
724
- console.log(blurLevel)
719
+ state.debug_mode && console.log(blurLevel)
725
720
  setBlurStatus(blurLevel);
726
721
  stopWasm();
727
722
 
@@ -884,7 +879,7 @@ const VeryfiLens = (function () {
884
879
  }
885
880
  !state.cardOverlay && (state.cardOverlay = createCreditCardComponent(state.container));
886
881
  if (state.exitButton) {
887
- createExitButton(state.container, {
882
+ createExitButton(state.cardOverlay.element, {
888
883
  setter: state.onClose,
889
884
  redirectUrl: state.onCloseRedirectUrl,
890
885
  }, removeOverlay);
@@ -1183,7 +1178,7 @@ const VeryfiLens = (function () {
1183
1178
  if (state.resultSetter && typeof state.resultSetter === 'function') {
1184
1179
  state.resultSetter({ ...state.docReadyResult, image: state.finalImage });
1185
1180
  }
1186
- state.estate.submitButton = createSubmitButton(state.videoOverlay.overlay, () => {
1181
+ state.submitButton = createSubmitButton(state.videoOverlay.overlay, () => {
1187
1182
  handleSubmit(state.finalImage);
1188
1183
  }, removeOverlay);
1189
1184
  state.enableSubmit && state.submitButton.show();