scandoc-ai-components 0.0.50 → 0.0.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.
Files changed (2) hide show
  1. package/dist/index.js +32 -25
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11174,12 +11174,13 @@ class ExtractorVideo {
11174
11174
  static VALIDATION_IMG_HEIGHT = 384;
11175
11175
  static VIDEO_SETTINGS = Object.freeze({
11176
11176
  width: {
11177
- ideal: 1920
11177
+ ideal: 1024
11178
11178
  },
11179
11179
  height: {
11180
- ideal: 1080
11180
+ ideal: 768
11181
11181
  },
11182
- facingMode: "environment"
11182
+ // 4:3
11183
+ facingMode: "user"
11183
11184
  });
11184
11185
  constructor(onExtractedResults) {
11185
11186
  this.candidateImages = [];
@@ -11400,11 +11401,13 @@ class ExtractorVideo {
11400
11401
  <div class="desktopFeedback" id="ScanDocAIMessage"></div>
11401
11402
  <div class="desktopVideoArea">
11402
11403
  <div class="desktopVideoHolder">
11403
- <div class="videoWrapper">
11404
- <video id="ScanDocAIVideoElement" class="desktopVideo" autoPlay muted playsInline></video>
11405
- <div class="backgroundOverlay"></div>
11406
- <div class="desktopRectangle dashedRectangle"></div>
11407
- </div>
11404
+ <img
11405
+ id="ScanDocAIVideoElement"
11406
+ class="desktopVideo"
11407
+ src="/home/helena/scandoc-npm-package/src/lib/images/IMG_2407.jpg"
11408
+ />
11409
+ <div class="backgroundOverlay"></div>
11410
+ <div class="desktopRectangle dashedRectangle"></div>
11408
11411
  </div>
11409
11412
  </div>
11410
11413
 
@@ -11427,30 +11430,25 @@ class ExtractorVideo {
11427
11430
  overflow: hidden;
11428
11431
  }
11429
11432
 
11430
- .videoWrapper {
11431
- position: relative;
11432
- width: 100%;
11433
- aspect-ratio: 16 / 9;
11434
- }
11435
-
11436
11433
  .desktopVideo {
11437
11434
  width: 100%;
11438
- height: 100%;
11439
- object-fit: cover;
11440
- display: block;
11435
+ height: auto;
11436
+ margin-left: auto;
11437
+ margin-right: auto;
11438
+ max-width: 100vw;
11439
+ max-height: 100vh;
11441
11440
  }
11442
-
11441
+
11443
11442
  .desktopRectangle {
11444
11443
  position: absolute;
11445
- top: 5%;
11446
- left: 5%;
11447
- right: 5%;
11448
- bottom: 5%;
11444
+ top: 32px;
11445
+ right: 32px;
11446
+ bottom: 32px;
11447
+ left: 28px;
11449
11448
  border-radius: 30px;
11450
11449
  display: flex;
11451
11450
  justify-content: center;
11452
11451
  align-items: center;
11453
- z-index: 3;
11454
11452
  }
11455
11453
 
11456
11454
  .dashedRectangle {
@@ -11620,13 +11618,22 @@ let internalConfig = {
11620
11618
  FACE_IMAGE_RESIZE: null,
11621
11619
  // timeout settings:
11622
11620
  MAX_SCAN_DURATION_MS: 10000,
11623
- MAX_UNSUPPORTED_ATTEMPTS: 5
11621
+ MAX_UNSUPPORTED_ATTEMPTS: 5,
11622
+ // design settings
11623
+ VIDEO_COLORS: {
11624
+ borderColor: "#5078bb",
11625
+ messageColor: "#5078bb"
11626
+ }
11624
11627
  };
11625
11628
  //
11626
11629
  function setScanDocAIConfig(newConfig = {}) {
11627
11630
  internalConfig = {
11628
11631
  ...internalConfig,
11629
- ...newConfig
11632
+ ...newConfig,
11633
+ COLORS: {
11634
+ ...internalConfig.COLORS,
11635
+ ...newConfig.COLORS
11636
+ }
11630
11637
  };
11631
11638
  }
11632
11639
  function getScanDocAIConfigValues() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "scandoc-ai-components",
3
3
  "author": "ScanDoc-AI",
4
- "version": "0.0.50",
4
+ "version": "0.0.52",
5
5
  "private": false,
6
6
  "description": "Pure JavaScript package for integrating ScanDoc-AI services.",
7
7
  "keywords": [