@uxbertlabs/reportly 1.0.43 → 1.0.45
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/features/screenshot.d.ts.map +1 -1
- package/dist/index.cjs.js +3 -30
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -30
- package/dist/index.esm.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
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;IAuM1E,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,MAAM;IAIzB;;;OAGG;IACH,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
|
@@ -9446,14 +9446,15 @@ class Screenshot {
|
|
|
9446
9446
|
// Increased timeout for slow-loading images
|
|
9447
9447
|
removeContainer: true,
|
|
9448
9448
|
scale: window.devicePixelRatio || 1,
|
|
9449
|
-
onclone: clonedDoc => {
|
|
9449
|
+
onclone: async clonedDoc => {
|
|
9450
|
+
await this.wait(3000);
|
|
9450
9451
|
// Ensure all styles are applied in the cloned document
|
|
9451
9452
|
const clonedBody = clonedDoc.body;
|
|
9452
9453
|
// Force all animations to their final state
|
|
9453
9454
|
const animatedElements = clonedBody.querySelectorAll("*");
|
|
9454
9455
|
animatedElements.forEach(el => {
|
|
9455
9456
|
const element = el;
|
|
9456
|
-
// Pause all animations
|
|
9457
|
+
// Pause all animations at their end state
|
|
9457
9458
|
element.style.animationPlayState = "paused";
|
|
9458
9459
|
element.style.animationDelay = "-9999s";
|
|
9459
9460
|
element.style.animationIterationCount = "1";
|
|
@@ -9527,34 +9528,6 @@ class Screenshot {
|
|
|
9527
9528
|
// Increased timeout for slow-loading images
|
|
9528
9529
|
removeContainer: true,
|
|
9529
9530
|
scale: window.devicePixelRatio || 1,
|
|
9530
|
-
ignoreElements: element => {
|
|
9531
|
-
// Ignore loading screen by ID
|
|
9532
|
-
if (element.id === "uxbert-screenshot-loading") {
|
|
9533
|
-
return true;
|
|
9534
|
-
}
|
|
9535
|
-
// Ignore Uxbert elements
|
|
9536
|
-
if (element.getAttribute("data-uxbert-reportly") !== null || element.className?.toString().includes("uxbert-") || element.id?.includes("uxbert-")) {
|
|
9537
|
-
return true;
|
|
9538
|
-
}
|
|
9539
|
-
// Skip cross-origin images that might cause issues
|
|
9540
|
-
if (element.tagName === "IMG") {
|
|
9541
|
-
const img = element;
|
|
9542
|
-
try {
|
|
9543
|
-
// Test if image is accessible
|
|
9544
|
-
const testCanvas = document.createElement("canvas");
|
|
9545
|
-
const ctx = testCanvas.getContext("2d");
|
|
9546
|
-
testCanvas.width = 1;
|
|
9547
|
-
testCanvas.height = 1;
|
|
9548
|
-
ctx?.drawImage(img, 0, 0, 1, 1);
|
|
9549
|
-
testCanvas.toDataURL();
|
|
9550
|
-
return false; // Include the image
|
|
9551
|
-
} catch (e) {
|
|
9552
|
-
console.warn("Skipping cross-origin image:", img.src);
|
|
9553
|
-
return true;
|
|
9554
|
-
}
|
|
9555
|
-
}
|
|
9556
|
-
return false;
|
|
9557
|
-
},
|
|
9558
9531
|
scrollY: 0,
|
|
9559
9532
|
scrollX: 0
|
|
9560
9533
|
});
|