@mahmulp/feedback-sdk 0.0.2 → 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/README.md CHANGED
@@ -11,7 +11,7 @@ Designed for **self-hosted** setups: pair this SDK with a backend (we ship one i
11
11
  - Floating launcher widget built in (toggle feedback mode, hide pins, hide launcher)
12
12
  - Stable DOM selectors that survive layout changes
13
13
  - Drag-to-move pins with optimistic update
14
- - Screenshot capture via dynamically loaded `html2canvas` (bundled as a direct dependency)
14
+ - Screenshot capture via dynamically loaded `html2canvas-pro` (bundled as a direct dependency)
15
15
  - Svelte adapter for ergonomic SvelteKit integration
16
16
  - Works in React, Vue, and plain HTML via the same core API
17
17
 
package/dist/index.cjs CHANGED
@@ -1192,7 +1192,10 @@ async function captureViewport(options = {}) {
1192
1192
  allowTaint: false
1193
1193
  });
1194
1194
  return await canvasToBlob(canvas, opts.mimeType, opts.quality);
1195
- } catch {
1195
+ } catch (err) {
1196
+ if (typeof console !== "undefined") {
1197
+ console.warn("[feedback-sdk] screenshot capture failed:", err);
1198
+ }
1196
1199
  return null;
1197
1200
  } finally {
1198
1201
  if (host) host.style.visibility = previousVisibility;
@@ -1204,13 +1207,13 @@ async function loadHtml2Canvas() {
1204
1207
  if (html2canvasPromise) return html2canvasPromise;
1205
1208
  html2canvasPromise = (async () => {
1206
1209
  try {
1207
- const mod = await import('html2canvas');
1210
+ const mod = await import('html2canvas-pro');
1208
1211
  return mod.default ?? mod ?? null;
1209
1212
  } catch (err) {
1210
1213
  if (!html2canvasMissingWarned && typeof console !== "undefined") {
1211
1214
  html2canvasMissingWarned = true;
1212
1215
  console.warn(
1213
- "[feedback-sdk] screenshot capture disabled: failed to load `html2canvas`. This shouldn't normally happen \u2014 html2canvas is a direct dependency of the SDK. Pass `captureScreenshots: false` to silence this warning if intended.",
1216
+ "[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.",
1214
1217
  err
1215
1218
  );
1216
1219
  }