@djangocfg/devtools 2.1.542 → 2.1.543
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/devtools",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.543",
|
|
4
4
|
"description": "Frontend devtools for django-cfg apps: error/console capture with backend ingest, plus a floating debug panel. One package, one event stream.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"django",
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
"lint": "eslint ."
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@djangocfg/ui-core": "^2.1.
|
|
52
|
+
"@djangocfg/ui-core": "^2.1.543",
|
|
53
53
|
"lucide-react": ">=0.400.0",
|
|
54
54
|
"react": "^19.0.0",
|
|
55
55
|
"react-dom": "^19.0.0",
|
|
56
56
|
"zustand": "^5.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@djangocfg/eslint-config": "^2.1.
|
|
60
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
61
|
-
"@djangocfg/ui-core": "^2.1.
|
|
59
|
+
"@djangocfg/eslint-config": "^2.1.543",
|
|
60
|
+
"@djangocfg/typescript-config": "^2.1.543",
|
|
61
|
+
"@djangocfg/ui-core": "^2.1.543",
|
|
62
62
|
"@storybook/react-vite": "^10.5.0",
|
|
63
63
|
"@types/node": "^25.9.5",
|
|
64
64
|
"@types/react": "19.2.15",
|
|
@@ -104,6 +104,13 @@ export function DevtoolsButton({ className, panel = {}, enabled }: DevtoolsButto
|
|
|
104
104
|
'shadow-[0_0_0_1px_#171717,inset_0_0_0_1px_hsla(0,0%,100%,0.14),0px_16px_32px_-8px_rgba(0,0,0,0.24)]',
|
|
105
105
|
'transition-all duration-150 hover:scale-105',
|
|
106
106
|
'focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50',
|
|
107
|
+
// This button deliberately sits OUTSIDE the app's theme: it
|
|
108
|
+
// mimics the Next.js dev indicator it sits beside (hence
|
|
109
|
+
// `bg-black/80` and the hardcoded `#171717` ring above), and
|
|
110
|
+
// must look the same in light and dark. `bg-destructive`
|
|
111
|
+
// would follow the host's palette and stop matching its
|
|
112
|
+
// neighbour.
|
|
113
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
107
114
|
errorCount > 0 && 'bg-red-600/90',
|
|
108
115
|
className,
|
|
109
116
|
)}
|
|
@@ -111,7 +118,15 @@ export function DevtoolsButton({ className, panel = {}, enabled }: DevtoolsButto
|
|
|
111
118
|
>
|
|
112
119
|
<Bug className={cn('h-4 w-4', errorCount > 0 ? 'text-white' : 'text-white/80')} />
|
|
113
120
|
{errorCount > 0 && (
|
|
114
|
-
|
|
121
|
+
// Same reason as the button fill: this badge is part of the
|
|
122
|
+
// off-theme dev-indicator styling, and its red must match the
|
|
123
|
+
// fill above.
|
|
124
|
+
<span
|
|
125
|
+
className={
|
|
126
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
127
|
+
'absolute -right-1 -top-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-white text-[10px] font-semibold text-red-600 shadow-sm'
|
|
128
|
+
}
|
|
129
|
+
>
|
|
115
130
|
{errorCount}
|
|
116
131
|
</span>
|
|
117
132
|
)}
|
package/src/panel/LogsTab.tsx
CHANGED
|
@@ -12,12 +12,14 @@ import type { LogEntry, LogLevel } from '../types'
|
|
|
12
12
|
|
|
13
13
|
const LEVELS: LogLevel[] = ['debug', 'info', 'success', 'warn', 'error']
|
|
14
14
|
|
|
15
|
+
// Log levels ARE the status vocabulary, so they read from status tokens: a
|
|
16
|
+
// preset that retunes "warning" retunes the warn line with it.
|
|
15
17
|
const LEVEL_COLORS: Record<LogLevel, string> = {
|
|
16
18
|
debug: 'text-muted-foreground',
|
|
17
|
-
info: 'text-
|
|
18
|
-
success: 'text-
|
|
19
|
-
warn: 'text-
|
|
20
|
-
error: 'text-
|
|
19
|
+
info: 'text-info',
|
|
20
|
+
success: 'text-success',
|
|
21
|
+
warn: 'text-warning',
|
|
22
|
+
error: 'text-destructive',
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
function formatTime(d: Date): string {
|
|
@@ -54,7 +56,7 @@ function Row({ entry }: { entry: LogEntry }) {
|
|
|
54
56
|
</pre>
|
|
55
57
|
)}
|
|
56
58
|
{entry.stack && (
|
|
57
|
-
<pre className="overflow-x-auto rounded bg-muted/60 p-2 text-[11px] text-
|
|
59
|
+
<pre className="overflow-x-auto rounded bg-muted/60 p-2 text-[11px] text-destructive/90">
|
|
58
60
|
{entry.stack}
|
|
59
61
|
</pre>
|
|
60
62
|
)}
|