scandoc-ai-components 0.0.77 → 0.0.78

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 +23 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11191,7 +11191,6 @@ class ExtractorVideo {
11191
11191
  this.scanStartTime = null;
11192
11192
  this.unsupportedDocCount = 0;
11193
11193
  this.video = null;
11194
- this.updateOverlayTimeout = null;
11195
11194
  }
11196
11195
  reset() {
11197
11196
  this.stopVideo();
@@ -11404,8 +11403,8 @@ class ExtractorVideo {
11404
11403
  }
11405
11404
  adjustOverlayPosition() {
11406
11405
  const video = this.video;
11407
- const overlay = document.querySelector(".desktopRectangle");
11408
- if (!video || !overlay || video.videoWidth === 0 || video.videoHeight === 0) return;
11406
+ const dot = document.querySelector(".centerGuideDot");
11407
+ if (!video || !dot || video.videoWidth === 0 || video.videoHeight === 0) return;
11409
11408
  const videoRatio = video.videoWidth / video.videoHeight;
11410
11409
  const container = video.parentElement;
11411
11410
  const containerRatio = container.clientWidth / container.clientHeight;
@@ -11419,14 +11418,11 @@ class ExtractorVideo {
11419
11418
  }
11420
11419
  const offsetX = (container.clientWidth - scaleWidth) / 2;
11421
11420
  const offsetY = (container.clientHeight - scaleHeight) / 2;
11422
- const paddingRatio = 0.05;
11423
- const minPadding = 16;
11424
- const padX = Math.max(scaleWidth * paddingRatio, minPadding);
11425
- const padY = Math.max(scaleHeight * paddingRatio, minPadding);
11426
- overlay.style.left = `${offsetX + padX}px`;
11427
- overlay.style.top = `${offsetY + padY}px`;
11428
- overlay.style.width = `${scaleWidth - padX * 2}px`;
11429
- overlay.style.height = `${scaleHeight - padY * 2}px`;
11421
+ const centerX = offsetX + scaleWidth / 2;
11422
+ const centerY = offsetY + scaleHeight / 2;
11423
+ dot.style.display = "block";
11424
+ dot.style.left = `${centerX - 8}px`; // center minus half dot size
11425
+ dot.style.top = `${centerY - 8}px`;
11430
11426
  }
11431
11427
  getHTML() {
11432
11428
  const cfgValues = (0,_config__WEBPACK_IMPORTED_MODULE_1__.getScanDocAIConfigValues)();
@@ -11438,7 +11434,7 @@ class ExtractorVideo {
11438
11434
  <div class="desktopVideoHolder">
11439
11435
  <video id="ScanDocAIVideoElement" class="desktopVideo" autoPlay muted playsInline></video>
11440
11436
  <div class="backgroundOverlay"></div>
11441
- <div class="desktopRectangle dashedRectangle"></div>
11437
+ <div class="centerGuideDot"></div>
11442
11438
  </div>
11443
11439
  </div>
11444
11440
 
@@ -11468,13 +11464,23 @@ class ExtractorVideo {
11468
11464
  height: 100%;
11469
11465
  object-fit: cover;
11470
11466
  }
11471
-
11472
- .desktopRectangle {
11467
+
11468
+ .centerGuideDot {
11473
11469
  position: absolute;
11474
- border: 5px dashed ${borderColor};
11475
- border-radius: 30px;
11470
+ width: 16px;
11471
+ height: 16px;
11472
+ background-color: #00ff55;
11473
+ border-radius: 50%;
11474
+ box-shadow: 0 0 8px 2px rgba(0, 255, 100, 0.8);
11475
+ z-index: 4;
11476
+ animation: flicker 1s infinite;
11476
11477
  pointer-events: none;
11477
- z-index: 3;
11478
+ display: none; /* Hidden until video is ready */
11479
+ }
11480
+
11481
+ @keyframes flicker {
11482
+ 0%, 100% { opacity: 1; }
11483
+ 50% { opacity: 0.3; }
11478
11484
  }
11479
11485
 
11480
11486
  .backgroundOverlay {
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.77",
4
+ "version": "0.0.78",
5
5
  "private": false,
6
6
  "description": "Pure JavaScript package for integrating ScanDoc-AI services.",
7
7
  "keywords": [