@alliance-droid/status-feedback-system 1.3.2 → 1.3.4
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.
|
@@ -284,10 +284,10 @@
|
|
|
284
284
|
<!-- Form modal -->
|
|
285
285
|
{#if formOpen}
|
|
286
286
|
<div
|
|
287
|
-
class="sf-modal fixed
|
|
287
|
+
class="sf-modal fixed w-full max-w-lg flex flex-col"
|
|
288
288
|
style={modalPositioned
|
|
289
|
-
? `left: ${modalX}px; top: ${modalY}px;`
|
|
290
|
-
: 'left: 50%; top: 50%; transform: translate(-50%, -50%);'
|
|
289
|
+
? `left: ${modalX}px; top: ${modalY}px; z-index: 99998;`
|
|
290
|
+
: 'left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 99998;'
|
|
291
291
|
}
|
|
292
292
|
>
|
|
293
293
|
<Card variant="elevated" padding="none" class="flex flex-col max-h-[calc(100vh-2rem)] overflow-hidden">
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
|
|
33
33
|
<!-- svelte-ignore a11y_no_static_element_interactions — context menu positioned at cursor -->
|
|
34
34
|
<div
|
|
35
|
-
class="fixed
|
|
36
|
-
style="left: {adjustedX}px; top: {adjustedY}px;"
|
|
35
|
+
class="fixed"
|
|
36
|
+
style="left: {adjustedX}px; top: {adjustedY}px; z-index: 99999;"
|
|
37
37
|
onmousedown={(e) => e.stopPropagation()}
|
|
38
38
|
>
|
|
39
39
|
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
let { onDismiss }: Props = $props();
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
-
<div class="fixed bottom-4 right-4
|
|
9
|
+
<div class="fixed bottom-4 right-4 animate-fade-in" style="z-index: 99997;">
|
|
10
10
|
<div class="sf-toast">
|
|
11
11
|
<i class="fa-solid fa-computer-mouse sf-toast-icon"></i>
|
|
12
12
|
<div>
|
|
@@ -14,12 +14,25 @@ export async function captureScreenshot() {
|
|
|
14
14
|
height: window.innerHeight,
|
|
15
15
|
windowWidth: window.innerWidth,
|
|
16
16
|
windowHeight: window.innerHeight,
|
|
17
|
+
ignoreElements: (element) => {
|
|
18
|
+
// Skip elements that might have unsupported CSS (oklab, oklch, color-mix)
|
|
19
|
+
const style = window.getComputedStyle(element);
|
|
20
|
+
const hasUnsupportedColor = [
|
|
21
|
+
style.color,
|
|
22
|
+
style.backgroundColor,
|
|
23
|
+
style.borderColor,
|
|
24
|
+
].some(color => color && (color.includes('oklab') || color.includes('oklch') || color.includes('color-mix')));
|
|
25
|
+
return hasUnsupportedColor;
|
|
26
|
+
},
|
|
17
27
|
});
|
|
18
28
|
return canvas.toDataURL('image/png');
|
|
19
29
|
}
|
|
20
30
|
catch (err) {
|
|
21
31
|
console.error('[DevFeedback] Screenshot capture failed:', err);
|
|
22
|
-
|
|
32
|
+
if (err instanceof Error && err.message.includes('oklab')) {
|
|
33
|
+
console.warn('[DevFeedback] Your CSS uses oklab/oklch colors which html2canvas doesn\'t support. Screenshot skipped.');
|
|
34
|
+
}
|
|
35
|
+
// html2canvas failed (unsupported CSS, cross-origin iframe, etc.)
|
|
23
36
|
return null;
|
|
24
37
|
}
|
|
25
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alliance-droid/status-feedback-system",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Drop-in system status pages and user feedback forms for SvelteKit apps",
|
|
6
6
|
"svelte": "./dist/index.js",
|
|
@@ -24,19 +24,15 @@
|
|
|
24
24
|
"test:watch": "vitest",
|
|
25
25
|
"prepublishOnly": "npm run build"
|
|
26
26
|
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"html2canvas": "^1.4.1"
|
|
29
|
+
},
|
|
27
30
|
"peerDependencies": {
|
|
28
31
|
"@alliance-droid/svelte-component-library": ">=1.0.0",
|
|
29
|
-
"html2canvas": "^1.4.1",
|
|
30
32
|
"svelte": "^5.0.0"
|
|
31
33
|
},
|
|
32
|
-
"peerDependenciesMeta": {
|
|
33
|
-
"html2canvas": {
|
|
34
|
-
"optional": true
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
34
|
"devDependencies": {
|
|
38
35
|
"@alliance-droid/svelte-component-library": "^1.0.5",
|
|
39
|
-
"html2canvas": "^1.4.1",
|
|
40
36
|
"@sveltejs/package": "^2.3.0",
|
|
41
37
|
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
|
42
38
|
"@testing-library/jest-dom": "^6.9.1",
|