@alliance-droid/status-feedback-system 0.3.1 → 0.3.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.
|
@@ -106,11 +106,10 @@
|
|
|
106
106
|
originalConsoleError.apply(console, args);
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
//
|
|
110
|
-
document.addEventListener('
|
|
109
|
+
// Ctrl+Right-click handler
|
|
110
|
+
document.addEventListener('contextmenu', handleContextMenu);
|
|
111
111
|
// Close menu on any other click
|
|
112
112
|
document.addEventListener('click', closeMenu);
|
|
113
|
-
document.addEventListener('contextmenu', closeMenu);
|
|
114
113
|
// Escape closes everything
|
|
115
114
|
document.addEventListener('keydown', handleKeydown);
|
|
116
115
|
|
|
@@ -125,15 +124,14 @@
|
|
|
125
124
|
onDestroy(() => {
|
|
126
125
|
if (!isEnabled) return;
|
|
127
126
|
if (originalConsoleError) console.error = originalConsoleError;
|
|
128
|
-
document.removeEventListener('
|
|
127
|
+
document.removeEventListener('contextmenu', handleContextMenu);
|
|
129
128
|
document.removeEventListener('click', closeMenu);
|
|
130
|
-
document.removeEventListener('contextmenu', closeMenu);
|
|
131
129
|
document.removeEventListener('keydown', handleKeydown);
|
|
132
130
|
});
|
|
133
131
|
|
|
134
|
-
function
|
|
135
|
-
//
|
|
136
|
-
if (e.
|
|
132
|
+
function handleContextMenu(e: MouseEvent) {
|
|
133
|
+
// Only trigger on Ctrl+Right-click
|
|
134
|
+
if (!e.ctrlKey) return;
|
|
137
135
|
e.preventDefault();
|
|
138
136
|
e.stopPropagation();
|
|
139
137
|
|
|
@@ -306,26 +304,17 @@
|
|
|
306
304
|
style="left: {adjustedX}px; top: {adjustedY}px;"
|
|
307
305
|
onmousedown={(e) => e.stopPropagation()}
|
|
308
306
|
>
|
|
309
|
-
<div class="
|
|
310
|
-
<button
|
|
311
|
-
class="flex items-center gap-2.5 w-full px-3 py-2.5 text-sm text-foreground hover:bg-surface-hover transition-colors text-left"
|
|
312
|
-
onclick={() => openForm('bug')}
|
|
313
|
-
>
|
|
307
|
+
<div class="sf-ctx-menu">
|
|
308
|
+
<button class="sf-ctx-item" onclick={() => openForm('bug')}>
|
|
314
309
|
<i class="fa-solid fa-bug text-red-400"></i>
|
|
315
310
|
Report Bug
|
|
316
311
|
</button>
|
|
317
|
-
<button
|
|
318
|
-
class="flex items-center gap-2.5 w-full px-3 py-2.5 text-sm text-foreground hover:bg-surface-hover transition-colors text-left"
|
|
319
|
-
onclick={() => openForm('feature')}
|
|
320
|
-
>
|
|
312
|
+
<button class="sf-ctx-item" onclick={() => openForm('feature')}>
|
|
321
313
|
<i class="fa-solid fa-lightbulb text-amber-400"></i>
|
|
322
314
|
Request Feature
|
|
323
315
|
</button>
|
|
324
|
-
<div class="
|
|
325
|
-
<button
|
|
326
|
-
class="flex items-center gap-2.5 w-full px-3 py-2.5 text-sm text-foreground-secondary hover:bg-surface-hover transition-colors text-left"
|
|
327
|
-
onclick={openBoard}
|
|
328
|
-
>
|
|
316
|
+
<div class="sf-ctx-divider">
|
|
317
|
+
<button class="sf-ctx-item sf-ctx-item-secondary" onclick={openBoard}>
|
|
329
318
|
<i class="fa-solid fa-clipboard-list"></i>
|
|
330
319
|
View Open Issues
|
|
331
320
|
</button>
|
|
@@ -475,16 +464,13 @@
|
|
|
475
464
|
<!-- Onboarding toast -->
|
|
476
465
|
{#if showToast}
|
|
477
466
|
<div class="fixed bottom-4 right-4 z-[99997] animate-fade-in">
|
|
478
|
-
<div class="
|
|
479
|
-
<i class="fa-solid fa-computer-mouse
|
|
467
|
+
<div class="sf-toast">
|
|
468
|
+
<i class="fa-solid fa-computer-mouse" style="color: var(--color-primary, #3b82f6); font-size: 1.125rem;"></i>
|
|
480
469
|
<div>
|
|
481
|
-
<p
|
|
482
|
-
<p
|
|
470
|
+
<p style="font-size: 0.875rem; font-weight: 600; margin: 0;">Ctrl + Right-click anywhere</p>
|
|
471
|
+
<p style="font-size: 0.75rem; color: #94a3b8; margin: 0;">to report bugs or request features</p>
|
|
483
472
|
</div>
|
|
484
|
-
<button
|
|
485
|
-
class="text-foreground-tertiary hover:text-foreground transition-colors bg-transparent border-none cursor-pointer ml-2"
|
|
486
|
-
onclick={() => (showToast = false)}
|
|
487
|
-
>
|
|
473
|
+
<button class="sf-toast-close" onclick={() => (showToast = false)}>
|
|
488
474
|
<i class="fa-solid fa-xmark"></i>
|
|
489
475
|
</button>
|
|
490
476
|
</div>
|
|
@@ -500,4 +486,68 @@
|
|
|
500
486
|
.animate-fade-in {
|
|
501
487
|
animation: fade-in 0.3s ease-out;
|
|
502
488
|
}
|
|
489
|
+
|
|
490
|
+
/* Context menu — hardcoded colors for guaranteed visibility */
|
|
491
|
+
.sf-ctx-menu {
|
|
492
|
+
background: #1e293b;
|
|
493
|
+
border: 1px solid #334155;
|
|
494
|
+
border-radius: 0.5rem;
|
|
495
|
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
|
496
|
+
overflow: hidden;
|
|
497
|
+
min-width: 180px;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.sf-ctx-item {
|
|
501
|
+
display: flex;
|
|
502
|
+
align-items: center;
|
|
503
|
+
gap: 0.625rem;
|
|
504
|
+
width: 100%;
|
|
505
|
+
padding: 0.625rem 0.75rem;
|
|
506
|
+
font-size: 0.875rem;
|
|
507
|
+
color: #e2e8f0;
|
|
508
|
+
background: transparent;
|
|
509
|
+
border: none;
|
|
510
|
+
cursor: pointer;
|
|
511
|
+
text-align: left;
|
|
512
|
+
transition: background 0.15s;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.sf-ctx-item:hover {
|
|
516
|
+
background: #334155;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.sf-ctx-item-secondary {
|
|
520
|
+
color: #94a3b8;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.sf-ctx-divider {
|
|
524
|
+
border-top: 1px solid #334155;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/* Toast */
|
|
528
|
+
.sf-toast {
|
|
529
|
+
background: #1e293b;
|
|
530
|
+
border: 1px solid #334155;
|
|
531
|
+
border-radius: 0.5rem;
|
|
532
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
|
533
|
+
padding: 0.75rem 1rem;
|
|
534
|
+
display: flex;
|
|
535
|
+
align-items: center;
|
|
536
|
+
gap: 0.75rem;
|
|
537
|
+
max-width: 20rem;
|
|
538
|
+
color: #e2e8f0;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.sf-toast-close {
|
|
542
|
+
color: #64748b;
|
|
543
|
+
background: transparent;
|
|
544
|
+
border: none;
|
|
545
|
+
cursor: pointer;
|
|
546
|
+
margin-left: 0.5rem;
|
|
547
|
+
transition: color 0.15s;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.sf-toast-close:hover {
|
|
551
|
+
color: #e2e8f0;
|
|
552
|
+
}
|
|
503
553
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alliance-droid/status-feedback-system",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
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",
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
"@sveltejs/package": "^2.3.0",
|
|
37
37
|
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
|
38
38
|
"@tailwindcss/vite": "^4.1.0",
|
|
39
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
40
|
+
"@testing-library/svelte": "^5.3.1",
|
|
41
|
+
"jsdom": "^29.0.0",
|
|
39
42
|
"publint": "^0.3.0",
|
|
40
43
|
"svelte": "^5.48.0",
|
|
41
44
|
"svelte-check": "^4.3.0",
|