@uxbertlabs/reportly 1.0.41 → 1.0.42

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.
@@ -22,10 +22,6 @@ declare class Screenshot {
22
22
  * Wait for fonts to load
23
23
  */
24
24
  private waitForFonts;
25
- /**
26
- * Force a reflow to ensure styles are applied
27
- */
28
- private forceReflow;
29
25
  capture(mode?: "viewport" | "fullpage"): Promise<string>;
30
26
  private hideUXbertElements;
31
27
  private showUXbertElements;
@@ -1 +1 @@
1
- {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../src/features/screenshot.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,UAAU,CAAC;AAEvE,cAAM,UAAU;IACd,OAAO,CAAC,iBAAiB,CAAgB;IACzC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,MAAM,CAAkC;gBAEpC,KAAK,CAAC,EAAE,eAAe,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM;IAS9G;;OAEG;IACH,OAAO,CAAC,IAAI;IAIZ;;OAEG;YACW,gBAAgB;IAmB9B;;OAEG;YACW,aAAa;IA+C3B;;OAEG;YACW,YAAY;IAc1B;;OAEG;IACH,OAAO,CAAC,WAAW;IAKb,OAAO,CAAC,IAAI,GAAE,UAAU,GAAG,UAAuB,GAAG,OAAO,CAAC,MAAM,CAAC;IA+Q1E,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,iBAAiB;IA6DzB,OAAO,CAAC,iBAAiB;IAOzB;;;OAGG;IACH,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAIjC;;OAEG;IACH,eAAe,IAAI,MA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ACH,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAWtC;;OAEG;IACH,QAAQ,IAAI,eAAe;IAI3B;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI;IAIhD;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC,aAAa,IAAI,MAAM,GAAG,IAAI;IAI9B,KAAK,IAAI,IAAI;CAGd;AAED,eAAe,UAAU,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -9397,13 +9397,6 @@ class Screenshot {
9397
9397
  }
9398
9398
  }
9399
9399
  }
9400
- /**
9401
- * Force a reflow to ensure styles are applied
9402
- */
9403
- forceReflow() {
9404
- // Reading offsetHeight forces a reflow
9405
- document.body.offsetHeight;
9406
- }
9407
9400
  async capture(mode = "fullpage") {
9408
9401
  const context = {
9409
9402
  mode,
@@ -9421,8 +9414,6 @@ class Screenshot {
9421
9414
  // Hide loading screen and UXbert UI elements BEFORE capturing
9422
9415
  this.hideLoadingScreen();
9423
9416
  this.hideUXbertElements();
9424
- // Force a reflow to ensure all styles are computed
9425
- this.forceReflow();
9426
9417
  // Hook: beforeCapture - allow developers to modify DOM before capture
9427
9418
  if (this.hooks.beforeCapture) {
9428
9419
  await Promise.resolve(this.hooks.beforeCapture(context));
@@ -9527,41 +9518,6 @@ class Screenshot {
9527
9518
  // Increased timeout for slow-loading images
9528
9519
  removeContainer: true,
9529
9520
  scale: window.devicePixelRatio || 1,
9530
- onclone: clonedDoc => {
9531
- // Ensure all styles are applied in the cloned document
9532
- const clonedBody = clonedDoc.body;
9533
- // Force all animations to their final state
9534
- const animatedElements = clonedBody.querySelectorAll("*");
9535
- animatedElements.forEach(el => {
9536
- const element = el;
9537
- // Pause all animations at their end state
9538
- element.style.animationPlayState = "paused";
9539
- element.style.animationDelay = "-9999s";
9540
- element.style.animationIterationCount = "1";
9541
- // Disable transitions
9542
- element.style.transition = "none";
9543
- });
9544
- // Process images in the cloned document
9545
- const originalImages = document.body.querySelectorAll("img");
9546
- const clonedImages = clonedBody.querySelectorAll("img");
9547
- clonedImages.forEach((clonedImg, index) => {
9548
- const originalImg = originalImages[index];
9549
- if (originalImg) {
9550
- // Copy the current src from original to ensure it loads
9551
- clonedImg.src = originalImg.currentSrc || originalImg.src;
9552
- // Force visibility
9553
- clonedImg.style.opacity = "1";
9554
- clonedImg.style.visibility = "visible";
9555
- clonedImg.style.display = originalImg.style.display || "inline";
9556
- if (originalImg.width) clonedImg.width = originalImg.width;
9557
- if (originalImg.height) clonedImg.height = originalImg.height;
9558
- // Remove lazy loading attributes that might interfere
9559
- clonedImg.removeAttribute("loading");
9560
- clonedImg.removeAttribute("data-src");
9561
- clonedImg.removeAttribute("data-srcset");
9562
- }
9563
- });
9564
- },
9565
9521
  ignoreElements: element => {
9566
9522
  // Ignore loading screen by ID
9567
9523
  if (element.id === "uxbert-screenshot-loading") {