scandoc-ai-components 0.0.79 → 0.0.81
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 +146 -78
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11427,84 +11427,152 @@ class ExtractorVideo {
|
|
|
11427
11427
|
const cfgValues = (0,_config__WEBPACK_IMPORTED_MODULE_1__.getScanDocAIConfigValues)();
|
|
11428
11428
|
const borderColor = cfgValues.VIDEO_COLORS?.borderColor;
|
|
11429
11429
|
const messageColor = cfgValues.VIDEO_COLORS?.messageColor;
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
<
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11430
|
+
const isMobile = window.innerWidth < 768 || window.innerHeight > window.innerWidth;
|
|
11431
|
+
window.innerWidth < 768 || window.innerHeight > window.innerWidth && window.innerWidth < 1024;
|
|
11432
|
+
if (isMobile) {
|
|
11433
|
+
// ✅ Mobile version with overlay feedback
|
|
11434
|
+
return `
|
|
11435
|
+
<div class="mobileVideoArea">
|
|
11436
|
+
<video id="ScanDocAIVideoElement" class="mobileVideo" autoplay muted playsinline></video>
|
|
11437
|
+
<div class="mobileOverlay">
|
|
11438
|
+
<div class="mobileFeedback" id="ScanDocAIMessage"></div>
|
|
11439
|
+
<div class="centerGuideDot"></div>
|
|
11440
|
+
</div>
|
|
11441
|
+
</div>
|
|
11442
|
+
|
|
11443
|
+
<style>
|
|
11444
|
+
.mobileVideoArea {
|
|
11445
|
+
position: relative;
|
|
11446
|
+
width: 100vw;
|
|
11447
|
+
height: 100vh;
|
|
11448
|
+
overflow: hidden;
|
|
11449
|
+
}
|
|
11450
|
+
.mobileVideo {
|
|
11451
|
+
width: 100%;
|
|
11452
|
+
height: 100%;
|
|
11453
|
+
object-fit: cover;
|
|
11454
|
+
pointer-events: none;
|
|
11455
|
+
}
|
|
11456
|
+
.mobileOverlay {
|
|
11457
|
+
position: absolute;
|
|
11458
|
+
inset: 0;
|
|
11459
|
+
display: flex;
|
|
11460
|
+
flex-direction: column;
|
|
11461
|
+
justify-content: flex-start;
|
|
11462
|
+
align-items: center;
|
|
11463
|
+
pointer-events: none;
|
|
11464
|
+
z-index: 10;
|
|
11465
|
+
}
|
|
11466
|
+
.mobileFeedback {
|
|
11467
|
+
margin-top: 16px;
|
|
11468
|
+
padding: 8px 16px;
|
|
11469
|
+
border-radius: 8px;
|
|
11470
|
+
background: rgba(15, 33, 63, 0.75);
|
|
11471
|
+
color: ${messageColor};
|
|
11472
|
+
font-weight: 600;
|
|
11473
|
+
font-size: 16px;
|
|
11474
|
+
text-align: center;
|
|
11475
|
+
max-width: 90%;
|
|
11476
|
+
}
|
|
11477
|
+
.centerGuideDot {
|
|
11478
|
+
width: 16px;
|
|
11479
|
+
height: 16px;
|
|
11480
|
+
border-radius: 50%;
|
|
11481
|
+
background-color: #00ff55;
|
|
11482
|
+
box-shadow: 0 0 8px 2px rgba(0, 255, 100, 0.8);
|
|
11483
|
+
animation: flicker 1s infinite;
|
|
11484
|
+
position: absolute;
|
|
11485
|
+
top: 50%;
|
|
11486
|
+
left: 50%;
|
|
11487
|
+
transform: translate(-50%, -50%);
|
|
11488
|
+
}
|
|
11489
|
+
@keyframes flicker {
|
|
11490
|
+
0%, 100% { opacity: 1; }
|
|
11491
|
+
50% { opacity: 0.3; }
|
|
11492
|
+
}
|
|
11493
|
+
</style>
|
|
11494
|
+
`;
|
|
11495
|
+
} else {
|
|
11496
|
+
return `
|
|
11497
|
+
<div class="desktopFeedback" id="ScanDocAIMessage"></div>
|
|
11498
|
+
<div class="desktopVideoArea">
|
|
11499
|
+
<div class="desktopVideoHolder">
|
|
11500
|
+
<video id="ScanDocAIVideoElement" class="desktopVideo" autoPlay muted playsInline></video>
|
|
11501
|
+
<div class="backgroundOverlay"></div>
|
|
11502
|
+
<div class="centerGuideDot"></div>
|
|
11503
|
+
</div>
|
|
11504
|
+
</div>
|
|
11505
|
+
|
|
11506
|
+
<style>
|
|
11507
|
+
.desktopVideoArea {
|
|
11508
|
+
display: flex;
|
|
11509
|
+
flex-direction: column;
|
|
11510
|
+
gap: 8px;
|
|
11511
|
+
padding: 16px;
|
|
11512
|
+
background-color: rgba(255, 255, 255, 0.05);
|
|
11513
|
+
border: 1px solid ${borderColor};
|
|
11514
|
+
border-radius: 15px;
|
|
11515
|
+
margin-left: 20%;
|
|
11516
|
+
margin-right: 20%;
|
|
11517
|
+
}
|
|
11518
|
+
|
|
11519
|
+
.desktopVideoHolder {
|
|
11520
|
+
position: relative;
|
|
11521
|
+
width: 100%;
|
|
11522
|
+
overflow: hidden;
|
|
11523
|
+
}
|
|
11524
|
+
|
|
11525
|
+
.desktopVideo {
|
|
11526
|
+
width: 100%;
|
|
11527
|
+
height: auto;
|
|
11528
|
+
margin-left: auto;
|
|
11529
|
+
margin-right: auto;
|
|
11530
|
+
max-width: 100vw;
|
|
11531
|
+
max-height: 100vh;
|
|
11532
|
+
}
|
|
11533
|
+
|
|
11534
|
+
.centerGuideDot {
|
|
11535
|
+
position: absolute;
|
|
11536
|
+
width: 16px;
|
|
11537
|
+
height: 16px;
|
|
11538
|
+
background-color: #00ff55;
|
|
11539
|
+
border-radius: 50%;
|
|
11540
|
+
box-shadow: 0 0 8px 2px rgba(0, 255, 100, 0.8);
|
|
11541
|
+
z-index: 4;
|
|
11542
|
+
animation: flicker 1s infinite;
|
|
11543
|
+
pointer-events: none;
|
|
11544
|
+
display: none; /* Hidden until video is ready */
|
|
11545
|
+
}
|
|
11546
|
+
|
|
11547
|
+
@keyframes flicker {
|
|
11548
|
+
0%, 100% { opacity: 1; }
|
|
11549
|
+
50% { opacity: 0.3; }
|
|
11550
|
+
}
|
|
11551
|
+
|
|
11552
|
+
.backgroundOverlay {
|
|
11553
|
+
position: absolute;
|
|
11554
|
+
top: 0;
|
|
11555
|
+
left: 0;
|
|
11556
|
+
width: 100%;
|
|
11557
|
+
height: 100%;
|
|
11558
|
+
background-color: rgba(0, 0, 0, 0.051);
|
|
11559
|
+
z-index: 2;
|
|
11560
|
+
pointer-events: none;
|
|
11561
|
+
}
|
|
11562
|
+
|
|
11563
|
+
.desktopFeedback {
|
|
11564
|
+
position: relative;
|
|
11565
|
+
display: flex;
|
|
11566
|
+
font-size: 22px;
|
|
11567
|
+
font-weight: 600;
|
|
11568
|
+
min-height: 36px;
|
|
11569
|
+
justify-content: center;
|
|
11570
|
+
align-items: center;
|
|
11571
|
+
color: ${messageColor};
|
|
11572
|
+
}
|
|
11573
|
+
</style>
|
|
11574
|
+
`;
|
|
11575
|
+
}
|
|
11508
11576
|
}
|
|
11509
11577
|
}
|
|
11510
11578
|
let EXTRACTION_VIDEO = undefined;
|