@spunto/design-system 0.66.0 → 0.68.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 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`, `/observability`
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,6 +202,7 @@ 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
205
206
  import { Section, ProductHeader } from "@spunto/design-system/marketing" // not a domain — see below
206
207
  ```
207
208
 
@@ -342,6 +343,36 @@ review. Every surface that shows one:
342
343
  Same rules as `/workers`: nothing fetches, types are structural and lax
343
344
  (`TaskItem`, `TaskEvent`, `TaskDiff`…), links go through `render.link`.
344
345
 
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
+
345
376
  ### `@spunto/design-system/projects`
346
377
 
347
378
  - **`ProjectForm`** — the whole "compose a dev environment" screen: identity,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spunto/design-system",
3
- "version": "0.66.0",
3
+ "version": "0.68.0",
4
4
  "description": "Spunto's shared design system — green tokens (conservatory + sprout), color constants, and UI primitives.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -45,6 +45,10 @@
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
+ },
48
52
  "./projects": {
49
53
  "types": "./src/components/projects/index.ts",
50
54
  "import": "./src/components/projects/index.ts"
@@ -61,17 +65,24 @@
61
65
  "types": "./src/components/fonts.tsx",
62
66
  "import": "./src/components/fonts.tsx"
63
67
  },
64
- "./styles.css": "./styles.css"
68
+ "./palettes": {
69
+ "types": "./src/palettes.ts",
70
+ "import": "./src/palettes.ts"
71
+ },
72
+ "./styles.css": "./styles.css",
73
+ "./palettes.css": "./palettes.css"
65
74
  },
66
75
  "files": [
67
76
  "src",
68
77
  "styles.css",
78
+ "palettes.css",
69
79
  "README.md"
70
80
  ],
71
81
  "scripts": {
72
82
  "typecheck": "tsc --noEmit",
73
83
  "test": "vitest run",
74
- "brand:export": "node scripts/export-logo.ts"
84
+ "brand:export": "node scripts/export-logo.ts",
85
+ "palettes": "node scripts/generate-palettes.ts"
75
86
  },
76
87
  "dependencies": {
77
88
  "@legendapp/list": "3.3.5",