@mahmulp/feedback-sdk 0.0.1 → 0.0.3

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/svelte.js CHANGED
@@ -234,6 +234,7 @@ var LauncherManager = class {
234
234
  /** True when an event originated from the launcher's own UI. */
235
235
  ownsNode(node) {
236
236
  if (!node) return false;
237
+ if (typeof Node === "undefined" || !(node instanceof Node)) return false;
237
238
  return this.launcherEl.contains(node) || this.revealEl.contains(node);
238
239
  }
239
240
  destroy() {
@@ -1189,20 +1190,31 @@ async function captureViewport(options = {}) {
1189
1190
  allowTaint: false
1190
1191
  });
1191
1192
  return await canvasToBlob(canvas, opts.mimeType, opts.quality);
1192
- } catch {
1193
+ } catch (err) {
1194
+ if (typeof console !== "undefined") {
1195
+ console.warn("[feedback-sdk] screenshot capture failed:", err);
1196
+ }
1193
1197
  return null;
1194
1198
  } finally {
1195
1199
  if (host) host.style.visibility = previousVisibility;
1196
1200
  }
1197
1201
  }
1198
1202
  var html2canvasPromise = null;
1203
+ var html2canvasMissingWarned = false;
1199
1204
  async function loadHtml2Canvas() {
1200
1205
  if (html2canvasPromise) return html2canvasPromise;
1201
1206
  html2canvasPromise = (async () => {
1202
1207
  try {
1203
- const mod = await import('html2canvas');
1208
+ const mod = await import('html2canvas-pro');
1204
1209
  return mod.default ?? mod ?? null;
1205
- } catch {
1210
+ } catch (err) {
1211
+ if (!html2canvasMissingWarned && typeof console !== "undefined") {
1212
+ html2canvasMissingWarned = true;
1213
+ console.warn(
1214
+ "[feedback-sdk] screenshot capture disabled: failed to load `html2canvas-pro`. This shouldn't normally happen \u2014 html2canvas-pro is a direct dependency of the SDK. Pass `captureScreenshots: false` to silence this warning if intended.",
1215
+ err
1216
+ );
1217
+ }
1206
1218
  return null;
1207
1219
  }
1208
1220
  })();