@uxbertlabs/reportly 1.0.8 → 1.0.10

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
@@ -9460,7 +9460,6 @@ var Reportly = (function () {
9460
9460
  // Capture only the current viewport
9461
9461
  canvas = await html2canvas(document.body, {
9462
9462
  // foreignObjectRendering: true,
9463
- imageTimeout: 40000,
9464
9463
  useCORS: true,
9465
9464
  allowTaint: false,
9466
9465
  logging: true,
@@ -10205,7 +10204,7 @@ var Reportly = (function () {
10205
10204
  }
10206
10205
  init(userConfig = {}) {
10207
10206
  // Check if we're in a browser environment
10208
- if (typeof window === 'undefined' || typeof document === 'undefined') {
10207
+ if (typeof window === "undefined" || typeof document === "undefined") {
10209
10208
  console.warn("Uxbert Reportly can only be initialized in a browser environment");
10210
10209
  return;
10211
10210
  }
@@ -10272,7 +10271,7 @@ var Reportly = (function () {
10272
10271
  try {
10273
10272
  this.state?.setState(STATE.CAPTURING);
10274
10273
  // Get capture mode from modal
10275
- const captureMode = this.modal?.getCaptureMode() || 'viewport';
10274
+ const captureMode = this.modal?.getCaptureMode() || "viewport";
10276
10275
  // Save capture mode in state
10277
10276
  this.state?.setCaptureMode(captureMode);
10278
10277
  // Capture screenshot
@@ -10292,7 +10291,7 @@ var Reportly = (function () {
10292
10291
  this.state?.setState(STATE.ANNOTATING);
10293
10292
  this.modal?.close();
10294
10293
  this.button?.hide();
10295
- const captureMode = this.state?.getCaptureMode() || 'viewport';
10294
+ const captureMode = this.state?.getCaptureMode() || "viewport";
10296
10295
  this.annotation?.show(captureMode);
10297
10296
  this.toolbar?.show();
10298
10297
  }
@@ -10329,16 +10328,13 @@ var Reportly = (function () {
10329
10328
  }
10330
10329
  async retakeScreenshot() {
10331
10330
  try {
10332
- // Get the current capture mode from modal before closing
10333
- const captureMode = this.modal?.getCaptureMode() || 'viewport';
10334
10331
  this.modal?.close();
10335
10332
  this.state?.setState(STATE.CAPTURING);
10336
10333
  // Clear previous annotations
10337
10334
  this.annotation?.clear();
10338
- // Capture new screenshot with the same mode
10339
- const screenshot = await this.screenshot.capture(captureMode);
10335
+ // Capture new screenshot
10336
+ const screenshot = await this.screenshot.capture();
10340
10337
  this.state?.setScreenshot(screenshot);
10341
- this.state?.setCaptureMode(captureMode);
10342
10338
  // Show modal with new screenshot
10343
10339
  this.modal?.setScreenshot(screenshot);
10344
10340
  this.modal?.open();
@@ -10355,7 +10351,7 @@ var Reportly = (function () {
10355
10351
  // Create complete issue package
10356
10352
  const completeIssue = {
10357
10353
  ...issueData,
10358
- screenshot: this.state?.getScreenshot() || '',
10354
+ screenshot: this.state?.getScreenshot() || "",
10359
10355
  deviceInfo: this.deviceInfo.get(),
10360
10356
  createdAt: new Date().toISOString(),
10361
10357
  };