@uxbertlabs/reportly 1.0.7 → 1.0.8

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,18 +9450,20 @@ var Reportly = (function () {
9450
9450
  constructor() {
9451
9451
  this.currentScreenshot = null;
9452
9452
  }
9453
- async capture(mode = 'fullpage') {
9453
+ async capture(mode = "fullpage") {
9454
9454
  try {
9455
9455
  // Hide UXbert UI elements before capturing
9456
9456
  this.hideUXbertElements();
9457
9457
  const originalScrollY = window.scrollY;
9458
9458
  let canvas;
9459
- if (mode === 'viewport') {
9459
+ if (mode === "viewport") {
9460
9460
  // Capture only the current viewport
9461
9461
  canvas = await html2canvas(document.body, {
9462
+ // foreignObjectRendering: true,
9463
+ imageTimeout: 40000,
9462
9464
  useCORS: true,
9463
9465
  allowTaint: false,
9464
- logging: false,
9466
+ logging: true,
9465
9467
  width: window.innerWidth,
9466
9468
  height: window.innerHeight,
9467
9469
  windowWidth: window.innerWidth,
@@ -9470,12 +9472,12 @@ var Reportly = (function () {
9470
9472
  y: window.scrollY,
9471
9473
  ignoreElements: (element) => {
9472
9474
  // Skip cross-origin images that might cause issues
9473
- if (element.tagName === 'IMG') {
9475
+ if (element.tagName === "IMG") {
9474
9476
  const img = element;
9475
9477
  try {
9476
9478
  // Test if image is accessible
9477
- const canvas = document.createElement('canvas');
9478
- const ctx = canvas.getContext('2d');
9479
+ const canvas = document.createElement("canvas");
9480
+ const ctx = canvas.getContext("2d");
9479
9481
  canvas.width = 1;
9480
9482
  canvas.height = 1;
9481
9483
  ctx?.drawImage(img, 0, 0, 1, 1);
@@ -9484,7 +9486,7 @@ var Reportly = (function () {
9484
9486
  }
9485
9487
  catch (e) {
9486
9488
  // Image is tainted, skip it
9487
- console.warn('Skipping cross-origin image:', img.src);
9489
+ console.warn("Skipping cross-origin image:", img.src);
9488
9490
  return true;
9489
9491
  }
9490
9492
  }
@@ -9507,12 +9509,12 @@ var Reportly = (function () {
9507
9509
  height: fullPageHeight,
9508
9510
  ignoreElements: (element) => {
9509
9511
  // Skip cross-origin images that might cause issues
9510
- if (element.tagName === 'IMG') {
9512
+ if (element.tagName === "IMG") {
9511
9513
  const img = element;
9512
9514
  try {
9513
9515
  // Test if image is accessible
9514
- const canvas = document.createElement('canvas');
9515
- const ctx = canvas.getContext('2d');
9516
+ const canvas = document.createElement("canvas");
9517
+ const ctx = canvas.getContext("2d");
9516
9518
  canvas.width = 1;
9517
9519
  canvas.height = 1;
9518
9520
  ctx?.drawImage(img, 0, 0, 1, 1);
@@ -9521,7 +9523,7 @@ var Reportly = (function () {
9521
9523
  }
9522
9524
  catch (e) {
9523
9525
  // Image is tainted, skip it
9524
- console.warn('Skipping cross-origin image:', img.src);
9526
+ console.warn("Skipping cross-origin image:", img.src);
9525
9527
  return true;
9526
9528
  }
9527
9529
  }