scandoc-ai-components 0.0.76 → 0.0.77

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 +9 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11369,6 +11369,7 @@ class ExtractorVideo {
11369
11369
  this.adjustOverlayPosition();
11370
11370
  });
11371
11371
  window.addEventListener('resize', () => this.adjustOverlayPosition());
11372
+ setTimeout(() => this.adjustOverlayPosition(), 500);
11372
11373
  this.scanStartTime = Date.now(); // Reset timer
11373
11374
  setTimeout(() => this.analyzeVideoStream(), ExtractorVideo.FREQUENCY_MS);
11374
11375
  this.showMessage("Starting scanning");
@@ -11418,10 +11419,14 @@ class ExtractorVideo {
11418
11419
  }
11419
11420
  const offsetX = (container.clientWidth - scaleWidth) / 2;
11420
11421
  const offsetY = (container.clientHeight - scaleHeight) / 2;
11421
- overlay.style.left = `${offsetX + scaleWidth * 0.05}px`;
11422
- overlay.style.top = `${offsetY + scaleHeight * 0.05}px`;
11423
- overlay.style.width = `${scaleWidth * 0.90}px`;
11424
- overlay.style.height = `${scaleHeight * 0.90}px`;
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`;
11425
11430
  }
11426
11431
  getHTML() {
11427
11432
  const cfgValues = (0,_config__WEBPACK_IMPORTED_MODULE_1__.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.76",
4
+ "version": "0.0.77",
5
5
  "private": false,
6
6
  "description": "Pure JavaScript package for integrating ScanDoc-AI services.",
7
7
  "keywords": [