@mahmulp/feedback-sdk 0.0.1 → 0.0.2
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 +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +11 -11
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/svelte.js +10 -1
- package/dist/svelte.js.map +1 -1
- package/package.json +5 -7
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
|
-
-
|
|
14
|
+
- Screenshot capture via dynamically loaded `html2canvas` (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
|
@@ -236,6 +236,7 @@ var LauncherManager = class {
|
|
|
236
236
|
/** True when an event originated from the launcher's own UI. */
|
|
237
237
|
ownsNode(node) {
|
|
238
238
|
if (!node) return false;
|
|
239
|
+
if (typeof Node === "undefined" || !(node instanceof Node)) return false;
|
|
239
240
|
return this.launcherEl.contains(node) || this.revealEl.contains(node);
|
|
240
241
|
}
|
|
241
242
|
destroy() {
|
|
@@ -1198,13 +1199,21 @@ async function captureViewport(options = {}) {
|
|
|
1198
1199
|
}
|
|
1199
1200
|
}
|
|
1200
1201
|
var html2canvasPromise = null;
|
|
1202
|
+
var html2canvasMissingWarned = false;
|
|
1201
1203
|
async function loadHtml2Canvas() {
|
|
1202
1204
|
if (html2canvasPromise) return html2canvasPromise;
|
|
1203
1205
|
html2canvasPromise = (async () => {
|
|
1204
1206
|
try {
|
|
1205
1207
|
const mod = await import('html2canvas');
|
|
1206
1208
|
return mod.default ?? mod ?? null;
|
|
1207
|
-
} catch {
|
|
1209
|
+
} catch (err) {
|
|
1210
|
+
if (!html2canvasMissingWarned && typeof console !== "undefined") {
|
|
1211
|
+
html2canvasMissingWarned = true;
|
|
1212
|
+
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.",
|
|
1214
|
+
err
|
|
1215
|
+
);
|
|
1216
|
+
}
|
|
1208
1217
|
return null;
|
|
1209
1218
|
}
|
|
1210
1219
|
})();
|