@uxbertlabs/reportly 1.0.10 → 1.0.12

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/reportly.js CHANGED
@@ -9450,6 +9450,9 @@ var Reportly = (function () {
9450
9450
  constructor() {
9451
9451
  this.currentScreenshot = null;
9452
9452
  }
9453
+ wait(ms) {
9454
+ return new Promise((resolve) => setTimeout(resolve, ms));
9455
+ }
9453
9456
  async capture(mode = "fullpage") {
9454
9457
  try {
9455
9458
  // Hide UXbert UI elements before capturing
@@ -9469,6 +9472,10 @@ var Reportly = (function () {
9469
9472
  windowHeight: window.innerHeight,
9470
9473
  x: window.scrollX,
9471
9474
  y: window.scrollY,
9475
+ onclone: async () => {
9476
+ // Wait 1 second after cloning to let animations complete
9477
+ await this.wait(1000);
9478
+ },
9472
9479
  ignoreElements: (element) => {
9473
9480
  // Skip cross-origin images that might cause issues
9474
9481
  if (element.tagName === "IMG") {
@@ -9506,6 +9513,16 @@ var Reportly = (function () {
9506
9513
  logging: false,
9507
9514
  width: fullPageWidth,
9508
9515
  height: fullPageHeight,
9516
+ onclone: async (domDoc) => {
9517
+ // Wait 1 second after cloning to let animations complete
9518
+ await this.wait(1000);
9519
+ // scroll over the dome from top to bottom
9520
+ domDoc.defaultView?.scrollTo(0, 0);
9521
+ await this.wait(500);
9522
+ domDoc.defaultView?.scrollTo(0, fullPageHeight);
9523
+ await this.wait(500);
9524
+ domDoc.defaultView?.scrollTo(0, 0);
9525
+ },
9509
9526
  ignoreElements: (element) => {
9510
9527
  // Skip cross-origin images that might cause issues
9511
9528
  if (element.tagName === "IMG") {