@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 +1 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.global.js +14 -28
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/svelte.js +6 -3
- package/dist/svelte.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1190,7 +1190,10 @@ async function captureViewport(options = {}) {
|
|
|
1190
1190
|
allowTaint: false
|
|
1191
1191
|
});
|
|
1192
1192
|
return await canvasToBlob(canvas, opts.mimeType, opts.quality);
|
|
1193
|
-
} catch {
|
|
1193
|
+
} catch (err) {
|
|
1194
|
+
if (typeof console !== "undefined") {
|
|
1195
|
+
console.warn("[feedback-sdk] screenshot capture failed:", err);
|
|
1196
|
+
}
|
|
1194
1197
|
return null;
|
|
1195
1198
|
} finally {
|
|
1196
1199
|
if (host) host.style.visibility = previousVisibility;
|
|
@@ -1202,13 +1205,13 @@ async function loadHtml2Canvas() {
|
|
|
1202
1205
|
if (html2canvasPromise) return html2canvasPromise;
|
|
1203
1206
|
html2canvasPromise = (async () => {
|
|
1204
1207
|
try {
|
|
1205
|
-
const mod = await import('html2canvas');
|
|
1208
|
+
const mod = await import('html2canvas-pro');
|
|
1206
1209
|
return mod.default ?? mod ?? null;
|
|
1207
1210
|
} catch (err) {
|
|
1208
1211
|
if (!html2canvasMissingWarned && typeof console !== "undefined") {
|
|
1209
1212
|
html2canvasMissingWarned = true;
|
|
1210
1213
|
console.warn(
|
|
1211
|
-
"[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.",
|
|
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.",
|
|
1212
1215
|
err
|
|
1213
1216
|
);
|
|
1214
1217
|
}
|