@hanzo/dashboard 0.2.2 → 0.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/dashboard",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hanzo Dashboard — the reusable dashboard layer on @hanzo/gui: monochrome SVG charts, a videogame-like LivingOverview (count-up KPIs, live sparklines, streaming feed, health), the ProductLanding kit, and a Pipeline deploy animation. Pure (data via props/loaders), typed, reduced-motion-guarded. Extracted from the Hanzo Cloud Console so every Hanzo app composes ONE dashboard system.",
|
|
6
6
|
"exports": {
|
package/src/charts/Charts.tsx
CHANGED
|
@@ -24,13 +24,13 @@ import { Text, XStack, YStack, useTheme } from '@hanzo/gui'
|
|
|
24
24
|
|
|
25
25
|
/** Distinct hues for categorical series (e.g. spend-by-model donut), dark-tuned. */
|
|
26
26
|
export const CHART_PALETTE = [
|
|
27
|
-
'#
|
|
27
|
+
'#e4e4e7',
|
|
28
28
|
'#23c562',
|
|
29
29
|
'#ff9f45',
|
|
30
30
|
'#3aa0ff',
|
|
31
31
|
'#ff5d8f',
|
|
32
32
|
'#16c0c8',
|
|
33
|
-
'#
|
|
33
|
+
'#a1a1aa',
|
|
34
34
|
'#f4c245',
|
|
35
35
|
]
|
|
36
36
|
export const CHART_OTHER = '#64748b'
|
package/src/landing/Hero.tsx
CHANGED
|
@@ -96,7 +96,7 @@ function HeroGraphic({ size = 170, accent = CHART_PALETTE[0] }: { size?: number;
|
|
|
96
96
|
<stop offset="100%" stopColor={accent} stopOpacity="0" />
|
|
97
97
|
</radialGradient>
|
|
98
98
|
<linearGradient id="hz-hero-cube" x1="0" y1="0" x2="1" y2="1">
|
|
99
|
-
<stop offset="0%" stopColor="#
|
|
99
|
+
<stop offset="0%" stopColor="#e4e4e7" />
|
|
100
100
|
<stop offset="100%" stopColor={accent} />
|
|
101
101
|
</linearGradient>
|
|
102
102
|
</defs>
|
|
@@ -106,9 +106,9 @@ function HeroGraphic({ size = 170, accent = CHART_PALETTE[0] }: { size?: number;
|
|
|
106
106
|
))}
|
|
107
107
|
<g transform="translate(100 96)">
|
|
108
108
|
<polygon points="0,-34 30,-17 30,17 0,34 -30,17 -30,-17" fill="url(#hz-hero-cube)" fillOpacity="0.9" />
|
|
109
|
-
<polygon points="0,-34 30,-17 0,0 -30,-17" fill="#
|
|
109
|
+
<polygon points="0,-34 30,-17 0,0 -30,-17" fill="#f4f4f5" fillOpacity="0.85" />
|
|
110
110
|
<polygon points="0,0 30,-17 30,17 0,34" fill={accent} fillOpacity="0.7" />
|
|
111
|
-
<polygon points="0,0 -30,-17 -30,17 0,34" fill="#
|
|
111
|
+
<polygon points="0,0 -30,-17 -30,17 0,34" fill="#52525b" fillOpacity="0.7" />
|
|
112
112
|
</g>
|
|
113
113
|
</svg>
|
|
114
114
|
)
|
|
@@ -16,7 +16,7 @@ import { useReducedMotion } from '../motion/hooks'
|
|
|
16
16
|
import type { PipelineStage, StageState } from './stages'
|
|
17
17
|
import { Text, XStack, YStack } from '@hanzo/gui'
|
|
18
18
|
|
|
19
|
-
const ACCENT = '#
|
|
19
|
+
const ACCENT = '#e4e4e7'
|
|
20
20
|
const GREEN = '#23c562'
|
|
21
21
|
const RED = '#ff5d8f'
|
|
22
22
|
const MUTED = 'rgba(148,163,184,0.28)'
|
|
@@ -26,7 +26,7 @@ export interface PipelineProps {
|
|
|
26
26
|
stages: PipelineStage[]
|
|
27
27
|
/** A short status label shown above the track (e.g. `pipelineModel(...).label`). */
|
|
28
28
|
label?: string
|
|
29
|
-
/** Accent tone for the filled track + active stage. Defaults by state (green live / red error /
|
|
29
|
+
/** Accent tone for the filled track + active stage. Defaults by state (green live / red error / ink). */
|
|
30
30
|
tone?: string
|
|
31
31
|
/** Animate the active leg + pulse. Default true; reduced motion still forces static. */
|
|
32
32
|
animate?: boolean
|
package/src/pipeline/stages.ts
CHANGED
|
@@ -151,6 +151,6 @@ export function pipelineModel(status?: string | null, furthestReached = -1): Pip
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
/** The accent tone for a model: red on failure, green on live, else the accent. */
|
|
154
|
-
export function pipelineTone(model: Pick<PipelineModel, 'live' | 'errored'>, accent = '#
|
|
154
|
+
export function pipelineTone(model: Pick<PipelineModel, 'live' | 'errored'>, accent = '#e4e4e7'): string {
|
|
155
155
|
return model.errored ? '#ff5d8f' : model.live ? '#23c562' : accent
|
|
156
156
|
}
|