@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.
@@ -9457,7 +9457,6 @@ class Screenshot {
9457
9457
  // Capture only the current viewport
9458
9458
  canvas = await html2canvas(document.body, {
9459
9459
  // foreignObjectRendering: true,
9460
- imageTimeout: 40000,
9461
9460
  useCORS: true,
9462
9461
  allowTaint: false,
9463
9462
  logging: true,
@@ -10202,7 +10201,7 @@ class Reportly {
10202
10201
  }
10203
10202
  init(userConfig = {}) {
10204
10203
  // Check if we're in a browser environment
10205
- if (typeof window === 'undefined' || typeof document === 'undefined') {
10204
+ if (typeof window === "undefined" || typeof document === "undefined") {
10206
10205
  console.warn("Uxbert Reportly can only be initialized in a browser environment");
10207
10206
  return;
10208
10207
  }
@@ -10269,7 +10268,7 @@ class Reportly {
10269
10268
  try {
10270
10269
  this.state?.setState(STATE.CAPTURING);
10271
10270
  // Get capture mode from modal
10272
- const captureMode = this.modal?.getCaptureMode() || 'viewport';
10271
+ const captureMode = this.modal?.getCaptureMode() || "viewport";
10273
10272
  // Save capture mode in state
10274
10273
  this.state?.setCaptureMode(captureMode);
10275
10274
  // Capture screenshot
@@ -10289,7 +10288,7 @@ class Reportly {
10289
10288
  this.state?.setState(STATE.ANNOTATING);
10290
10289
  this.modal?.close();
10291
10290
  this.button?.hide();
10292
- const captureMode = this.state?.getCaptureMode() || 'viewport';
10291
+ const captureMode = this.state?.getCaptureMode() || "viewport";
10293
10292
  this.annotation?.show(captureMode);
10294
10293
  this.toolbar?.show();
10295
10294
  }
@@ -10326,16 +10325,13 @@ class Reportly {
10326
10325
  }
10327
10326
  async retakeScreenshot() {
10328
10327
  try {
10329
- // Get the current capture mode from modal before closing
10330
- const captureMode = this.modal?.getCaptureMode() || 'viewport';
10331
10328
  this.modal?.close();
10332
10329
  this.state?.setState(STATE.CAPTURING);
10333
10330
  // Clear previous annotations
10334
10331
  this.annotation?.clear();
10335
- // Capture new screenshot with the same mode
10336
- const screenshot = await this.screenshot.capture(captureMode);
10332
+ // Capture new screenshot
10333
+ const screenshot = await this.screenshot.capture();
10337
10334
  this.state?.setScreenshot(screenshot);
10338
- this.state?.setCaptureMode(captureMode);
10339
10335
  // Show modal with new screenshot
10340
10336
  this.modal?.setScreenshot(screenshot);
10341
10337
  this.modal?.open();
@@ -10352,7 +10348,7 @@ class Reportly {
10352
10348
  // Create complete issue package
10353
10349
  const completeIssue = {
10354
10350
  ...issueData,
10355
- screenshot: this.state?.getScreenshot() || '',
10351
+ screenshot: this.state?.getScreenshot() || "",
10356
10352
  deviceInfo: this.deviceInfo.get(),
10357
10353
  createdAt: new Date().toISOString(),
10358
10354
  };