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