scandoc-ai-components 0.0.80 → 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.
Files changed (2) hide show
  1. package/dist/index.js +146 -79
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11427,85 +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
- return `
11431
- <div class="desktopFeedback" id="ScanDocAIMessage"></div>
11432
- <div class="desktopVideoArea">
11433
- <div class="desktopVideoHolder">
11434
- <video id="ScanDocAIVideoElement" class="desktopVideo" autoPlay muted playsInline></video>
11435
- <div class="backgroundOverlay"></div>
11436
- <div class="centerGuideDot"></div>
11437
- </div>
11438
- </div>
11439
-
11440
- <style>
11441
- .desktopVideoArea {
11442
- display: flex;
11443
- flex-direction: column;
11444
- gap: 8px;
11445
- padding: 16px;
11446
- background-color: rgba(255, 255, 255, 0.05);
11447
- border: 1px solid ${borderColor};
11448
- border-radius: 15px;
11449
- margin-left: 20%;
11450
- margin-right: 20%;
11451
- }
11452
-
11453
- .desktopVideoHolder {
11454
- position: relative;
11455
- width: 100%;
11456
- overflow: hidden;
11457
- }
11458
-
11459
- .desktopVideo {
11460
- width: 100%;
11461
- height: auto;
11462
- margin-left: auto;
11463
- margin-right: auto;
11464
- max-width: 100vw;
11465
- max-height: 100vh;
11466
- }
11467
-
11468
- .centerGuideDot {
11469
- position: absolute;
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;
11477
- pointer-events: none;
11478
- display: none; /* Hidden until video is ready */
11479
- }
11480
-
11481
- @keyframes flicker {
11482
- 0%, 100% { opacity: 1; }
11483
- 50% { opacity: 0.3; }
11484
- }
11485
-
11486
- .backgroundOverlay {
11487
- position: absolute;
11488
- top: 0;
11489
- left: 0;
11490
- width: 100%;
11491
- height: 100%;
11492
- background-color: rgba(0, 0, 0, 0.051);
11493
- z-index: 2;
11494
- pointer-events: none;
11495
- }
11496
-
11497
- .desktopFeedback {
11498
- position: relative;
11499
- display: flex;
11500
- font-size: 22px;
11501
- font-weight: 600;
11502
- min-height: 36px;
11503
- justify-content: center;
11504
- align-items: center;
11505
- color: ${messageColor};
11506
- }
11507
- </style>
11508
- `;
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
+ }
11509
11576
  }
11510
11577
  }
11511
11578
  let EXTRACTION_VIDEO = undefined;
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.80",
4
+ "version": "0.0.81",
5
5
  "private": false,
6
6
  "description": "Pure JavaScript package for integrating ScanDoc-AI services.",
7
7
  "keywords": [