@spunto/design-system 0.49.0 → 0.51.0
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 -32
- package/package.json +2 -6
- package/src/brand/logo.test.tsx +1 -1
- package/src/brand/logo.ts +25 -20
- package/src/colors.ts +9 -9
- package/src/components/fonts.tsx +2 -2
- package/src/components/image-pull.tsx +5 -4
- package/src/components/terminal-panel.tsx +1 -1
- package/src/components/terminal.tsx +4 -4
- package/styles.css +380 -131
- package/src/components/observability/analytics.ts +0 -153
- package/src/components/observability/index.ts +0 -39
- package/src/components/observability/latency.ts +0 -47
- package/src/components/observability/log-lines.tsx +0 -120
- package/src/components/observability/observability.test.tsx +0 -255
- package/src/components/observability/span-waterfall.tsx +0 -493
- package/src/components/observability/trace-filters.tsx +0 -213
- package/src/components/observability/trace-list.tsx +0 -193
- package/src/components/observability/traces-overview.tsx +0 -284
- package/src/components/observability/types.ts +0 -29
package/README.md
CHANGED
|
@@ -188,7 +188,7 @@ const nextConfig = { transpilePackages: ["@spunto/design-system"] }
|
|
|
188
188
|
provider is also the umbrella that mounts the tooltip delay group and the overlay
|
|
189
189
|
portal container the dialogs/selects render into.
|
|
190
190
|
|
|
191
|
-
## Domain components — `/workers`, `/devcontainer`, `/projects`, `/tasks
|
|
191
|
+
## Domain components — `/workers`, `/devcontainer`, `/projects`, `/tasks`
|
|
192
192
|
|
|
193
193
|
Everything above is domain-free: a `Button` knows nothing about Spunto. Components
|
|
194
194
|
that **do** know a Spunto concept live behind their own entry point, so the root
|
|
@@ -202,7 +202,6 @@ import { WorkerCard } from "@spunto/design-system/workers"
|
|
|
202
202
|
import { ImageCard, FeatureCard, ExtensionCard } from "@spunto/design-system/devcontainer" // domain
|
|
203
203
|
import { ProjectForm, ProjectPanel } from "@spunto/design-system/projects" // domain
|
|
204
204
|
import { TaskList, TaskCockpit, TaskEventStream } from "@spunto/design-system/tasks" // domain
|
|
205
|
-
import { SpanWaterfall, TracesOverview } from "@spunto/design-system/observability" // domain
|
|
206
205
|
import { Section, ProductHeader } from "@spunto/design-system/marketing" // not a domain — see below
|
|
207
206
|
```
|
|
208
207
|
|
|
@@ -343,36 +342,6 @@ review. Every surface that shows one:
|
|
|
343
342
|
Same rules as `/workers`: nothing fetches, types are structural and lax
|
|
344
343
|
(`TaskItem`, `TaskEvent`, `TaskDiff`…), links go through `render.link`.
|
|
345
344
|
|
|
346
|
-
### `@spunto/design-system/observability`
|
|
347
|
-
|
|
348
|
-
Traces — what an OpenTelemetry backend hands back, drawn. Every surface that shows one:
|
|
349
|
-
|
|
350
|
-
- **`SpanWaterfall`** — a trace as a tree of spans on a shared time axis (children under
|
|
351
|
-
their parent, not the backend's start-time order), colour by nature (http → build, db →
|
|
352
|
-
ship, agent RPC / job → run, error → destructive), attributes of the clicked span. Any
|
|
353
|
-
span with children folds (chevron, Collapse/Expand all, ←/→; a folded row shows `+N`, red
|
|
354
|
-
when an error is hidden under it; `defaultCollapsedDepth`, or controlled
|
|
355
|
-
`collapsedSpanIds`). Hand it `logs` and a Logs section appears underneath, linked by the
|
|
356
|
-
span id the logger stamped: a line selects its span, unfolding its ancestors if needed.
|
|
357
|
-
`SpanWaterfallSkeleton` for the fetch.
|
|
358
|
-
- **`TraceList`** — one row per request (method, route, latency bar, when), or
|
|
359
|
-
`variant="compact"` for root spans that aren't necessarily HTTP. **`TraceFiltersBar`** next
|
|
360
|
-
to it: window and min latency are meant for the backend query, status / method / route are
|
|
361
|
-
applied client-side by `filterTraces`; `traceFilterOptions` derives the select options.
|
|
362
|
-
- **`TracesOverview`** — stat tiles, requests and p95 over time, per-service cards
|
|
363
|
-
(`showServices`), slowest routes. **`TraceRouteDetail`** — one route's stats and example
|
|
364
|
-
traces. Both are *derived* from the traces they're handed, so a list and its dashboard
|
|
365
|
-
can't disagree and no aggregation endpoint is needed.
|
|
366
|
-
- **`LogLines`** — log records with severity and trace/span ids: under a waterfall
|
|
367
|
-
(`origin`, `onSelectSpan`) or as a service's feed (`onOpenTrace`).
|
|
368
|
-
- Pure helpers: `computeStats`, `byRoute`, `byService`, `timeBuckets`, `exampleTraces`,
|
|
369
|
-
`percentile`, `methodOf`/`routeOf`, `orderSpans`, `spanColor`; and **one** latency scale —
|
|
370
|
-
`formatLatency` (sub-millisecond precise), `latencyTone`/`latencyColor`/`latencyTextClass`.
|
|
371
|
-
|
|
372
|
-
Same rules as `/workers`: nothing fetches (no URL, no query client — the org's traces view,
|
|
373
|
-
a deployment's Observability tab and the admin each pass their own data), types are
|
|
374
|
-
structural and lax (`TraceItem`, `TraceSpan`, `TelemetryLogLine`).
|
|
375
|
-
|
|
376
345
|
### `@spunto/design-system/projects`
|
|
377
346
|
|
|
378
347
|
- **`ProjectForm`** — the whole "compose a dev environment" screen: identity,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spunto/design-system",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Spunto's shared design system —
|
|
3
|
+
"version": "0.51.0",
|
|
4
|
+
"description": "Spunto's shared design system — green tokens (conservatory + sprout), color constants, and UI primitives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://design.spunto.net",
|
|
@@ -45,10 +45,6 @@
|
|
|
45
45
|
"types": "./src/components/tasks/index.ts",
|
|
46
46
|
"import": "./src/components/tasks/index.ts"
|
|
47
47
|
},
|
|
48
|
-
"./observability": {
|
|
49
|
-
"types": "./src/components/observability/index.ts",
|
|
50
|
-
"import": "./src/components/observability/index.ts"
|
|
51
|
-
},
|
|
52
48
|
"./projects": {
|
|
53
49
|
"types": "./src/components/projects/index.ts",
|
|
54
50
|
"import": "./src/components/projects/index.ts"
|
package/src/brand/logo.test.tsx
CHANGED
|
@@ -34,7 +34,7 @@ describe("SpuntoLogo", () => {
|
|
|
34
34
|
const svg = renderToStaticMarkup(<SpuntoLogo tone="flame" paint={{ tile: "#be241f" }} />)
|
|
35
35
|
expect(svg).toContain('fill="#be241f"')
|
|
36
36
|
expect(svg).not.toContain('fill="#ec5100"')
|
|
37
|
-
expect(svg).toContain('fill="#
|
|
37
|
+
expect(svg).toContain('fill="#0a3423"')
|
|
38
38
|
})
|
|
39
39
|
|
|
40
40
|
it("is hidden from assistive tech unless it is given a name", () => {
|
package/src/brand/logo.ts
CHANGED
|
@@ -155,7 +155,7 @@ export interface SpuntoLogoPaint {
|
|
|
155
155
|
/**
|
|
156
156
|
* The declensions. Each is a design-system token turned into a fixed value:
|
|
157
157
|
* a logo is an artefact, not a surface, so it does not follow the theme — the
|
|
158
|
-
*
|
|
158
|
+
* sprout tile is the same sprout at night. The values are the light-theme
|
|
159
159
|
* register of `styles.css` (`--flame`, `--build`, `--ship`, `--run`,
|
|
160
160
|
* `--night`, `--background`) and the sand the marketing pages use for ink on
|
|
161
161
|
* night, converted out of oklch.
|
|
@@ -167,26 +167,31 @@ export interface SpuntoLogoPaint {
|
|
|
167
167
|
* for a hero or a social card, not for a 24 px header.
|
|
168
168
|
*/
|
|
169
169
|
export const SPUNTO_LOGO_TONES = {
|
|
170
|
-
/** The brand:
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
170
|
+
/** The brand — Spunto Cloud: signal tile, field ink. The key keeps its old
|
|
171
|
+
* name so every `tone="flame"` caller follows. */
|
|
172
|
+
flame: { tile: "#bfeb56", ink: "#0a3423" },
|
|
173
|
+
/** Spunto Lite — sky on ink blue. */
|
|
174
|
+
build: { tile: "#83dbff", ink: "#102743" },
|
|
175
|
+
/** Spunto Browser — amber on dusk. */
|
|
176
|
+
ship: { tile: "#fdcd5c", ink: "#281f45" },
|
|
177
|
+
/** Spunto Cloud's mid tone, light ink — for a light page that wants weight. */
|
|
178
|
+
run: { tile: "#006737", ink: "#edf4ee" },
|
|
179
|
+
/** The design system — graphite tile, paper ink. */
|
|
180
|
+
night: { tile: "#161c19", ink: "#edf4ee" },
|
|
181
|
+
/** Paper tile, field ink, the container lit in Cloud's tone — for a light print. */
|
|
182
|
+
cream: { tile: "#f8fbf6", ink: "#0a3423", core: "#006737" },
|
|
183
|
+
/** Spunto CMS — petal on plum. */
|
|
184
|
+
cms: { tile: "#ffb3d7", ink: "#3d1a36" },
|
|
185
|
+
/** Spunto Search — aqua on deep teal. */
|
|
186
|
+
search: { tile: "#7ee9e5", ink: "#002f36" },
|
|
187
|
+
/** Cloud's field, the three pillars lit (night register). */
|
|
183
188
|
pillars: {
|
|
184
|
-
tile: "#
|
|
185
|
-
ink: "#
|
|
186
|
-
fleet: "#
|
|
187
|
-
build: "#
|
|
188
|
-
ship: "#
|
|
189
|
-
run: "#
|
|
189
|
+
tile: "#0a3423",
|
|
190
|
+
ink: "#edf4ee",
|
|
191
|
+
fleet: "#7f9a8c",
|
|
192
|
+
build: "#d4e157",
|
|
193
|
+
ship: "#7ccf8f",
|
|
194
|
+
run: "#bfeb56",
|
|
190
195
|
},
|
|
191
196
|
} as const satisfies Record<string, SpuntoLogoPaint>
|
|
192
197
|
|
package/src/colors.ts
CHANGED
|
@@ -22,18 +22,18 @@ export const cssVar = {
|
|
|
22
22
|
|
|
23
23
|
/** Fixed oklch line colors for time-series charts (recharts strokes, etc.). */
|
|
24
24
|
export const chartColors = {
|
|
25
|
-
cpu: "oklch(0.
|
|
26
|
-
memory: "oklch(0.
|
|
27
|
-
ship: "oklch(0.
|
|
25
|
+
cpu: "oklch(0.66 0.13 160)", // run (bottle, night register)
|
|
26
|
+
memory: "oklch(0.86 0.17 124)", // build (sprout)
|
|
27
|
+
ship: "oklch(0.74 0.15 148)",
|
|
28
28
|
} as const
|
|
29
29
|
|
|
30
|
-
/** Sequential
|
|
30
|
+
/** Sequential green ramp (sprout → pine). Matches --chart-1..5. */
|
|
31
31
|
export const chartRamp = [
|
|
32
|
-
"oklch(0.
|
|
33
|
-
"oklch(0.
|
|
34
|
-
"oklch(0.
|
|
35
|
-
"oklch(0.
|
|
36
|
-
"oklch(0.
|
|
32
|
+
"oklch(0.82 0.16 122)",
|
|
33
|
+
"oklch(0.70 0.16 140)",
|
|
34
|
+
"oklch(0.58 0.14 152)",
|
|
35
|
+
"oklch(0.48 0.11 165)",
|
|
36
|
+
"oklch(0.38 0.08 175)",
|
|
37
37
|
] as const
|
|
38
38
|
|
|
39
39
|
/** Categorical, CVD-validated slots for disk/segment breakdowns. */
|
package/src/components/fonts.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Font preloads for the design-system typefaces (Geist /
|
|
1
|
+
// Font preloads for the design-system typefaces (Geist / Young Serif / JetBrains Mono).
|
|
2
2
|
//
|
|
3
3
|
// Renders the resource hints that let the browser fetch the fonts early instead
|
|
4
4
|
// of discovering them mid-render through the `@font-face` rules in `styles.css`.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
const LATIN_WOFF2 = [
|
|
18
18
|
"https://fonts.gstatic.com/s/geist/v5/gyByhwUxId8gMEwcGFU.woff2",
|
|
19
19
|
"https://fonts.gstatic.com/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2",
|
|
20
|
-
"https://fonts.gstatic.com/s/
|
|
20
|
+
"https://fonts.gstatic.com/s/youngserif/v2/3qTpojO2nS2VtkB3KtkQZ1t93kY.woff2",
|
|
21
21
|
] as const
|
|
22
22
|
|
|
23
23
|
export function FontPreloads() {
|
|
@@ -16,13 +16,14 @@ const pullTheme = {
|
|
|
16
16
|
dim: "#a1a1aa",
|
|
17
17
|
faint: "#71717a",
|
|
18
18
|
/** Tag of the image reference — the part that actually varies, so it's the bright one. */
|
|
19
|
-
tag: "#
|
|
20
|
-
// Phase colors.
|
|
19
|
+
tag: "#d9f99d",
|
|
20
|
+
// Phase colors. Downloading is the main event, in sky (the brand green would
|
|
21
|
+
// read as "done");
|
|
21
22
|
// yellow/green/red come straight from the Terminal's shared ANSI palette so
|
|
22
23
|
// both surfaces agree on what "in progress" / "done" / "failed" look like.
|
|
23
24
|
waiting: "#3f3f46",
|
|
24
|
-
downloading: "#
|
|
25
|
-
verifying: "#
|
|
25
|
+
downloading: "#38bdf8",
|
|
26
|
+
verifying: "#7dd3fc",
|
|
26
27
|
extracting: "#facc15",
|
|
27
28
|
done: "#4ade80",
|
|
28
29
|
error: "#f87171",
|
|
@@ -336,7 +336,7 @@ function bufferToText(term: XTerm): string {
|
|
|
336
336
|
/**
|
|
337
337
|
* Match colors live here, not at the call site: search is a design-system
|
|
338
338
|
* affordance and every terminal in the product should highlight the same way —
|
|
339
|
-
* zinc for the other matches,
|
|
339
|
+
* zinc for the other matches, sprout for the one you're on.
|
|
340
340
|
*/
|
|
341
341
|
function searchOptions(options?: TerminalSearchOptions) {
|
|
342
342
|
return {
|
|
@@ -345,9 +345,9 @@ function searchOptions(options?: TerminalSearchOptions) {
|
|
|
345
345
|
matchBackground: "#3f3f46",
|
|
346
346
|
matchBorder: "#71717a",
|
|
347
347
|
matchOverviewRuler: "#a1a1aa",
|
|
348
|
-
activeMatchBackground: "#
|
|
349
|
-
activeMatchBorder: "#
|
|
350
|
-
activeMatchColorOverviewRuler: "#
|
|
348
|
+
activeMatchBackground: "#3f6212",
|
|
349
|
+
activeMatchBorder: "#a3e635",
|
|
350
|
+
activeMatchColorOverviewRuler: "#a3e635",
|
|
351
351
|
},
|
|
352
352
|
}
|
|
353
353
|
}
|