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.
- package/dist/index.js +23 -17
- 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
|
|
11408
|
-
if (!video || !
|
|
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
|
|
11423
|
-
const
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
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="
|
|
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
|
-
|
|
11467
|
+
|
|
11468
|
+
.centerGuideDot {
|
|
11473
11469
|
position: absolute;
|
|
11474
|
-
|
|
11475
|
-
|
|
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
|
-
|
|
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 {
|