@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.
@@ -1,6 +1,7 @@
1
1
  declare class Screenshot {
2
2
  private currentScreenshot;
3
3
  constructor();
4
+ private wait;
4
5
  capture(mode?: "viewport" | "fullpage"): Promise<string>;
5
6
  private hideUXbertElements;
6
7
  private showUXbertElements;
@@ -1 +1 @@
1
- {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../src/features/screenshot.ts"],"names":[],"mappings":"AAGA,cAAM,UAAU;IACd,OAAO,CAAC,iBAAiB,CAAgB;;IAMnC,OAAO,CAAC,IAAI,GAAE,UAAU,GAAG,UAAuB,GAAG,OAAO,CAAC,MAAM,CAAC;IAgH1E,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,kBAAkB;IAY1B,aAAa,IAAI,MAAM,GAAG,IAAI;IAI9B,KAAK,IAAI,IAAI;CAGd;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../src/features/screenshot.ts"],"names":[],"mappings":"AAGA,cAAM,UAAU;IACd,OAAO,CAAC,iBAAiB,CAAgB;;IAKzC,OAAO,CAAC,IAAI;IAGN,OAAO,CAAC,IAAI,GAAE,UAAU,GAAG,UAAuB,GAAG,OAAO,CAAC,MAAM,CAAC;IA8H1E,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,kBAAkB;IAY1B,aAAa,IAAI,MAAM,GAAG,IAAI;IAI9B,KAAK,IAAI,IAAI;CAGd;AAED,eAAe,UAAU,CAAC"}
@@ -9449,6 +9449,9 @@ class Screenshot {
9449
9449
  constructor() {
9450
9450
  this.currentScreenshot = null;
9451
9451
  }
9452
+ wait(ms) {
9453
+ return new Promise((resolve) => setTimeout(resolve, ms));
9454
+ }
9452
9455
  async capture(mode = "fullpage") {
9453
9456
  try {
9454
9457
  // Hide UXbert UI elements before capturing
@@ -9468,6 +9471,10 @@ class Screenshot {
9468
9471
  windowHeight: window.innerHeight,
9469
9472
  x: window.scrollX,
9470
9473
  y: window.scrollY,
9474
+ onclone: async () => {
9475
+ // Wait 1 second after cloning to let animations complete
9476
+ await this.wait(1000);
9477
+ },
9471
9478
  ignoreElements: (element) => {
9472
9479
  // Skip cross-origin images that might cause issues
9473
9480
  if (element.tagName === "IMG") {
@@ -9505,6 +9512,16 @@ class Screenshot {
9505
9512
  logging: false,
9506
9513
  width: fullPageWidth,
9507
9514
  height: fullPageHeight,
9515
+ onclone: async (domDoc) => {
9516
+ // Wait 1 second after cloning to let animations complete
9517
+ await this.wait(1000);
9518
+ // scroll over the dome from top to bottom
9519
+ domDoc.defaultView?.scrollTo(0, 0);
9520
+ await this.wait(500);
9521
+ domDoc.defaultView?.scrollTo(0, fullPageHeight);
9522
+ await this.wait(500);
9523
+ domDoc.defaultView?.scrollTo(0, 0);
9524
+ },
9508
9525
  ignoreElements: (element) => {
9509
9526
  // Skip cross-origin images that might cause issues
9510
9527
  if (element.tagName === "IMG") {