@hahlex/millar-mcp 0.0.0-stage → 0.1.0-draft.1

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.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/dist/docs/CHANGELOG.md +21 -0
  3. package/dist/docs/GLOSSARY.md +77 -0
  4. package/dist/http.d.ts +3 -0
  5. package/dist/http.d.ts.map +1 -0
  6. package/dist/http.js +39566 -0
  7. package/dist/http.js.map +1 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +2 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/server.d.ts +6 -0
  13. package/dist/server.d.ts.map +1 -0
  14. package/dist/server.js +1115 -0
  15. package/dist/server.js.map +1 -0
  16. package/dist/skills/millar-animation/SKILL.md +66 -0
  17. package/dist/skills/millar-animation/references/animation-research-patterns.md +28 -0
  18. package/dist/skills/millar-animation/references/motion-choreography.md +80 -0
  19. package/dist/skills/millar-build-web/SKILL.md +59 -0
  20. package/dist/skills/millar-build-web/references/seo-cwv-and-copy.md +24 -0
  21. package/dist/skills/millar-build-web/references/web-architecture-checklist.md +47 -0
  22. package/dist/skills/millar-create-image/SKILL.md +62 -0
  23. package/dist/skills/millar-create-image/references/human-editorial-photography.md +74 -0
  24. package/dist/skills/millar-create-image/references/hybrid-plate-compositing.md +43 -0
  25. package/dist/skills/millar-create-image/references/image-art-direction.md +74 -0
  26. package/dist/skills/millar-create-image/references/multi-page-asset-map.md +27 -0
  27. package/dist/skills/millar-create-image/references/natural-editorial-illustration.md +57 -0
  28. package/dist/skills/millar-create-image/references/procedural-gallery-craft.md +84 -0
  29. package/dist/skills/millar-create-image/scripts/embed-provenance.mjs +185 -0
  30. package/dist/skills/millar-deep-research/SKILL.md +62 -0
  31. package/dist/skills/millar-deep-research/references/visual-extraction-protocol.md +36 -0
  32. package/dist/skills/millar-deep-research/references/world-class-benchmarks.md +30 -0
  33. package/dist/skills/millar-design/SKILL.md +83 -0
  34. package/dist/skills/millar-design/references/aesthetic-movements.md +49 -0
  35. package/dist/skills/millar-design/references/cross-page-sync-audit.md +25 -0
  36. package/dist/skills/millar-design/references/style-dna-contract.md +89 -0
  37. package/dist/skills/millar-verify-web/SKILL.md +76 -0
  38. package/dist/skills/millar-verify-web/references/five-layer-qa-gate.md +104 -0
  39. package/dist/skills/millar-verify-web/references/two-axis-review-rubric.md +23 -0
  40. package/dist/skills/millar-verify-web/scripts/millar-audit.mjs +617 -0
  41. package/dist/skills/millar-web-workflow/SKILL.md +60 -0
  42. package/dist/skills/millar-web-workflow/references/creative-divergence-protocol.md +52 -0
  43. package/dist/skills/millar-web-workflow/references/track-routing-and-gates.md +32 -0
  44. package/dist/skills-loader.d.ts +47 -0
  45. package/dist/skills-loader.d.ts.map +1 -0
  46. package/dist/skills-loader.js +204 -0
  47. package/dist/skills-loader.js.map +1 -0
  48. package/dist/sources/packages/marketing/src/assets/BrandAndGeometricAssets.tsx +373 -0
  49. package/dist/sources/packages/marketing/src/assets/SchematicAndProductAssets.tsx +497 -0
  50. package/dist/sources/packages/marketing/src/sections/MarketingSections.tsx +946 -0
  51. package/dist/sources/packages/marketing/src/templates/PageTemplates.tsx +304 -0
  52. package/dist/sources/packages/ui/src/components/Button.tsx +162 -0
  53. package/dist/sources/packages/ui/src/components/FormControls.tsx +476 -0
  54. package/dist/sources/packages/ui/src/components/Layout.tsx +176 -0
  55. package/dist/sources/packages/ui/src/components/OverlaysAndFeedback.tsx +291 -0
  56. package/dist/sources/packages/ui/src/components/SurfacesAndData.tsx +564 -0
  57. package/dist/stdio.d.ts +3 -0
  58. package/dist/stdio.d.ts.map +1 -0
  59. package/dist/stdio.js +37380 -0
  60. package/dist/stdio.js.map +1 -0
  61. package/package.json +48 -3
  62. package/README.md +0 -3
@@ -0,0 +1,497 @@
1
+ import React from "react";
2
+ import { Badge, IconCheck } from "@hahlex/millar-ui";
3
+
4
+ /* ============================================================================
5
+ * 3. Technical Schematic Diagrams (Parametric SVG, Collision-Free, Mobile-Safe)
6
+ * ============================================================================ */
7
+
8
+ export interface OrbitNode {
9
+ id: string;
10
+ label: string;
11
+ }
12
+
13
+ export interface UnifiedOrbitDiagramProps {
14
+ centerLabel?: string;
15
+ nodes?: OrbitNode[];
16
+ tone?: "light" | "dark";
17
+ }
18
+
19
+ const DEFAULT_ORBIT_NODES: OrbitNode[] = [
20
+ { id: "tokens", label: "DTCG Tokens" },
21
+ { id: "foundations", label: "Foundations" },
22
+ { id: "marketing", label: "Marketing" },
23
+ { id: "product", label: "Product UI" },
24
+ { id: "mcp", label: "AI MCP" },
25
+ { id: "a11y", label: "WCAG AA" },
26
+ ];
27
+
28
+ export function UnifiedOrbitDiagram({
29
+ centerLabel = "Millar SSoT",
30
+ nodes = DEFAULT_ORBIT_NODES,
31
+ tone = "light",
32
+ }: UnifiedOrbitDiagramProps) {
33
+ const isDark = tone === "dark";
34
+ const bg = isDark ? "var(--bg-stage-dark)" : "var(--bg-editorial)";
35
+ const border = isDark ? "var(--border-stage-dark)" : "var(--border-default)";
36
+ const ringStroke = isDark ? "rgba(214, 180, 138, 0.34)" : "#D6B48A";
37
+ const nodeBg = isDark ? "var(--bg-stage-dark-card)" : "var(--bg-surface)";
38
+ const nodeFg = isDark ? "var(--fg-on-stage-dark)" : "var(--fg-default)";
39
+
40
+ const cx = 260;
41
+ const cy = 170;
42
+ const rx = 180;
43
+ const ry = 114;
44
+
45
+ return (
46
+ <div
47
+ style={{
48
+ borderRadius: "var(--radius-lg, 16px)",
49
+ border: `1px solid ${border}`,
50
+ backgroundColor: bg,
51
+ padding: 20,
52
+ }}
53
+ >
54
+ <svg
55
+ viewBox="0 0 520 340"
56
+ role="img"
57
+ aria-label={`${centerLabel} connecting ${nodes.map((n) => n.label).join(", ")}`}
58
+ style={{ width: "100%", height: "auto", display: "block" }}
59
+ >
60
+ <ellipse cx={cx} cy={cy} rx={rx} ry={ry} fill="none" stroke={ringStroke} strokeWidth="1.25" strokeDasharray="4 4" />
61
+ <ellipse cx={cx} cy={cy} rx={rx * 0.62} ry={ry * 0.62} fill="none" stroke={ringStroke} strokeWidth="1" opacity="0.6" />
62
+
63
+ {nodes.map((node, idx) => {
64
+ const angle = (idx / nodes.length) * Math.PI * 2 - Math.PI / 2;
65
+ const nx = cx + Math.cos(angle) * rx;
66
+ const ny = cy + Math.sin(angle) * ry;
67
+ return (
68
+ <g key={node.id}>
69
+ <line x1={cx} y1={cy} x2={nx} y2={ny} stroke={ringStroke} strokeWidth="1" opacity="0.7" />
70
+ <rect x={nx - 56} y={ny - 16} width="112" height="32" rx="16" fill={nodeBg} stroke={ringStroke} strokeWidth="1" />
71
+ <text
72
+ x={nx}
73
+ y={ny + 4}
74
+ textAnchor="middle"
75
+ fill={nodeFg}
76
+ style={{ fontFamily: "var(--font-sans)", fontSize: 12, fontWeight: 500 }}
77
+ >
78
+ {node.label}
79
+ </text>
80
+ </g>
81
+ );
82
+ })}
83
+
84
+ <rect x={cx - 66} y={cy - 22} width="132" height="44" rx="22" fill={isDark ? "#6B4D35" : "#4A3022"} />
85
+ <text
86
+ x={cx}
87
+ y={cy + 5}
88
+ textAnchor="middle"
89
+ fill="#FFFFFF"
90
+ style={{ fontFamily: "var(--font-display)", fontSize: 13.5, fontWeight: 600 }}
91
+ >
92
+ {centerLabel}
93
+ </text>
94
+ </svg>
95
+ </div>
96
+ );
97
+ }
98
+
99
+ export interface LoopStep {
100
+ id: string;
101
+ label: string;
102
+ detail: string;
103
+ }
104
+
105
+ export interface ClosedLoopSchematicProps {
106
+ steps?: LoopStep[];
107
+ activeStepId?: string;
108
+ onSelectStep?: (id: string) => void;
109
+ tone?: "light" | "dark";
110
+ }
111
+
112
+ const DEFAULT_LOOP_STEPS: LoopStep[] = [
113
+ { id: "author", label: "Author", detail: "Define DTCG 2025.10 tokens and component specs in one source." },
114
+ { id: "compile", label: "Compile", detail: "Generate CSS, Tailwind v4, literal AntD mirrors, and JSON registry." },
115
+ { id: "compose", label: "Compose", detail: "Build Product and Marketing screens from verified primitives." },
116
+ { id: "validate", label: "Validate", detail: "Run automated WCAG, token, and invariant checks via CLI or MCP." },
117
+ { id: "review", label: "Review", detail: "Apply human aesthetic judgment before promoting Draft to Approved." },
118
+ { id: "ship", label: "Ship", detail: "Publish versioned updates with deprecation runways and changelogs." },
119
+ ];
120
+
121
+ /**
122
+ * Collision-free N-step schematic: places every node in dedicated non-overlapping cells
123
+ * connected by crisp directional rails, never letting labels overlap SVG curves.
124
+ */
125
+ export function ClosedLoopSchematic({
126
+ steps = DEFAULT_LOOP_STEPS,
127
+ activeStepId,
128
+ onSelectStep,
129
+ tone = "dark",
130
+ }: ClosedLoopSchematicProps) {
131
+ const isDark = tone === "dark";
132
+ const bg = isDark ? "var(--bg-stage-dark)" : "var(--bg-editorial)";
133
+ const border = isDark ? "var(--border-stage-dark)" : "var(--border-default)";
134
+ const cardBg = isDark ? "var(--bg-stage-dark-card)" : "var(--bg-surface)";
135
+ const fg = isDark ? "var(--fg-on-stage-dark)" : "var(--fg-default)";
136
+ const muted = isDark ? "var(--fg-muted-on-stage-dark)" : "var(--fg-muted)";
137
+ const accent = isDark ? "var(--fg-accent-on-stage-dark)" : "var(--fg-accent)";
138
+
139
+ return (
140
+ <div
141
+ style={{
142
+ borderRadius: "var(--radius-lg, 16px)",
143
+ border: `1px solid ${border}`,
144
+ backgroundColor: bg,
145
+ padding: 24,
146
+ display: "flex",
147
+ flexDirection: "column",
148
+ gap: 16,
149
+ }}
150
+ >
151
+ <ol
152
+ style={{
153
+ listStyle: "none",
154
+ margin: 0,
155
+ padding: 0,
156
+ display: "grid",
157
+ gridTemplateColumns: "repeat(auto-fit, minmax(175px, 1fr))",
158
+ gap: 12,
159
+ }}
160
+ >
161
+ {steps.map((step, idx) => {
162
+ const isActive = activeStepId ? activeStepId === step.id : idx === 0;
163
+ const Tag = onSelectStep ? "button" : "div";
164
+ return (
165
+ <li key={step.id} style={{ display: "flex" }}>
166
+ <Tag
167
+ type={onSelectStep ? "button" : undefined}
168
+ onClick={onSelectStep ? () => onSelectStep(step.id) : undefined}
169
+ aria-pressed={onSelectStep ? isActive : undefined}
170
+ className={onSelectStep ? "millar-focus" : undefined}
171
+ style={{
172
+ width: "100%",
173
+ textAlign: "left",
174
+ padding: "14px 16px",
175
+ borderRadius: "var(--radius-md, 12px)",
176
+ border: `1px solid ${isActive ? accent : border}`,
177
+ backgroundColor: cardBg,
178
+ color: fg,
179
+ cursor: onSelectStep ? "pointer" : "default",
180
+ display: "flex",
181
+ flexDirection: "column",
182
+ gap: 6,
183
+ }}
184
+ >
185
+ <div style={{ display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 }}>
186
+ <span style={{ fontFamily: "var(--font-mono)", fontSize: "var(--text-micro, 0.75rem)", color: accent }}>
187
+ Step {idx + 1} / {steps.length}
188
+ </span>
189
+ <span aria-hidden="true" style={{ fontFamily: "var(--font-mono)", fontSize: 12, color: muted }}>
190
+ {idx === steps.length - 1 ? "loop" : "->"}
191
+ </span>
192
+ </div>
193
+ <strong style={{ fontFamily: "var(--font-display)", fontSize: "var(--text-card-title, 1rem)", fontWeight: 600 }}>
194
+ {step.label}
195
+ </strong>
196
+ <span style={{ fontSize: "var(--text-meta, 0.8125rem)", color: muted, lineHeight: 1.45 }}>{step.detail}</span>
197
+ </Tag>
198
+ </li>
199
+ );
200
+ })}
201
+ </ol>
202
+ </div>
203
+ );
204
+ }
205
+
206
+ export interface LayerItem {
207
+ name: string;
208
+ scope: string;
209
+ outputs: string;
210
+ }
211
+
212
+ export interface LayerStackDiagramProps {
213
+ layers?: LayerItem[];
214
+ }
215
+
216
+ const DEFAULT_LAYERS: LayerItem[] = [
217
+ { name: "Tier 3: Product & Marketing Registers", scope: "UI Primitives, 6 Composition Patterns, Sections, Templates", outputs: "@hahlex/millar-ui · @hahlex/millar-marketing" },
218
+ { name: "Tier 2: Distribution & Agent Adapters", scope: "Portal UI, MCP Server (Resources + 11 Tools + 3 Prompts), Validator", outputs: "hahlex.com/millar · @hahlex/millar-mcp" },
219
+ { name: "Tier 1: Shared Foundations SSoT", scope: "W3C DTCG 2025.10 OKLCH Tokens, Vector Brand Marks, Geist/Inter/Mono", outputs: "@hahlex/millar-tokens · @hahlex/millar-core" },
220
+ ];
221
+
222
+ export function LayerStackDiagram({ layers = DEFAULT_LAYERS }: LayerStackDiagramProps) {
223
+ return (
224
+ <div style={{ display: "flex", flexDirection: "column", gap: 10 }}>
225
+ {layers.map((layer, idx) => (
226
+ <div
227
+ key={layer.name}
228
+ style={{
229
+ padding: "16px 20px",
230
+ borderRadius: "var(--radius-md, 12px)",
231
+ border: `1px solid ${idx === layers.length - 1 ? "var(--tone-brand-border)" : "var(--border-default)"}`,
232
+ backgroundColor: idx === layers.length - 1 ? "var(--tone-brand-soft)" : "var(--bg-surface)",
233
+ display: "flex",
234
+ flexDirection: "column",
235
+ gap: 4,
236
+ }}
237
+ >
238
+ <div style={{ display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12, flexWrap: "wrap" }}>
239
+ <strong style={{ fontFamily: "var(--font-display)", fontSize: "var(--text-card-title, 1rem)", fontWeight: 600, color: "var(--fg-default)" }}>
240
+ {layer.name}
241
+ </strong>
242
+ <code style={{ fontFamily: "var(--font-mono)", fontSize: "var(--text-micro, 0.75rem)", color: "var(--fg-accent)" }}>
243
+ {layer.outputs}
244
+ </code>
245
+ </div>
246
+ <span style={{ fontSize: "var(--text-body-sm, 0.875rem)", color: "var(--fg-muted)" }}>{layer.scope}</span>
247
+ </div>
248
+ ))}
249
+ </div>
250
+ );
251
+ }
252
+
253
+ export interface LedgerRow {
254
+ criterion: string;
255
+ before: string;
256
+ after: string;
257
+ }
258
+
259
+ export interface BeforeAfterLedgerProps {
260
+ beforeHeading?: string;
261
+ afterHeading?: string;
262
+ rows: LedgerRow[];
263
+ }
264
+
265
+ export function BeforeAfterLedger({
266
+ beforeHeading = "Unstructured default",
267
+ afterHeading = "With Millar SSoT",
268
+ rows,
269
+ }: BeforeAfterLedgerProps) {
270
+ return (
271
+ <div style={{ borderRadius: "var(--radius-lg, 16px)", border: "1px solid var(--border-default)", backgroundColor: "var(--bg-surface)", overflow: "hidden" }}>
272
+ <div
273
+ style={{
274
+ display: "grid",
275
+ gridTemplateColumns: "minmax(120px, 0.8fr) 1fr 1fr",
276
+ gap: 12,
277
+ padding: "12px 16px",
278
+ backgroundColor: "var(--bg-surface-2)",
279
+ borderBottom: "1px solid var(--border-default)",
280
+ fontSize: "var(--text-meta, 0.8125rem)",
281
+ fontWeight: 600,
282
+ }}
283
+ >
284
+ <span style={{ color: "var(--fg-muted)" }}>Dimension</span>
285
+ <span style={{ color: "var(--status-error)" }}>{beforeHeading}</span>
286
+ <span style={{ color: "var(--status-success)" }}>{afterHeading}</span>
287
+ </div>
288
+ {rows.map((row, idx) => (
289
+ <div
290
+ key={row.criterion}
291
+ style={{
292
+ display: "grid",
293
+ gridTemplateColumns: "minmax(120px, 0.8fr) 1fr 1fr",
294
+ gap: 12,
295
+ padding: "12px 16px",
296
+ borderBottom: idx === rows.length - 1 ? "none" : "1px solid var(--border-soft)",
297
+ fontSize: "var(--text-body-sm, 0.875rem)",
298
+ }}
299
+ >
300
+ <strong style={{ fontWeight: 600, color: "var(--fg-default)" }}>{row.criterion}</strong>
301
+ <span style={{ color: "var(--fg-muted)" }}>{row.before}</span>
302
+ <span style={{ color: "var(--fg-default)" }}>{row.after}</span>
303
+ </div>
304
+ ))}
305
+ </div>
306
+ );
307
+ }
308
+
309
+ /* ============================================================================
310
+ * 4. Stylized Product Visualization Frames (Static-First Real Chrome)
311
+ * ============================================================================ */
312
+
313
+ export interface ProductWindowFrameProps {
314
+ title: string;
315
+ badge?: string;
316
+ tone?: "light" | "dark";
317
+ children: React.ReactNode;
318
+ }
319
+
320
+ export function ProductWindowFrame({ title, badge, tone = "light", children }: ProductWindowFrameProps) {
321
+ const isDark = tone === "dark";
322
+ return (
323
+ <div
324
+ style={{
325
+ borderRadius: "var(--radius-lg, 16px)",
326
+ border: `1px solid ${isDark ? "var(--border-stage-dark)" : "var(--border-default)"}`,
327
+ backgroundColor: isDark ? "var(--bg-stage-dark-card)" : "var(--bg-surface)",
328
+ color: isDark ? "var(--fg-on-stage-dark)" : "var(--fg-default)",
329
+ overflow: "hidden",
330
+ }}
331
+ >
332
+ <div
333
+ style={{
334
+ display: "flex",
335
+ alignItems: "center",
336
+ justifyContent: "space-between",
337
+ gap: 12,
338
+ padding: "10px 16px",
339
+ borderBottom: `1px solid ${isDark ? "var(--border-stage-dark)" : "var(--border-soft)"}`,
340
+ backgroundColor: isDark ? "var(--bg-stage-dark)" : "var(--bg-surface-2)",
341
+ }}
342
+ >
343
+ <div style={{ display: "inline-flex", alignItems: "center", gap: 8 }}>
344
+ <span aria-hidden="true" style={{ display: "inline-flex", gap: 5 }}>
345
+ <span style={{ width: 8, height: 8, borderRadius: 9999, backgroundColor: isDark ? "#3E3128" : "#D6B48A" }} />
346
+ <span style={{ width: 8, height: 8, borderRadius: 9999, backgroundColor: isDark ? "#543A28" : "#E4CBAF" }} />
347
+ <span style={{ width: 8, height: 8, borderRadius: 9999, backgroundColor: isDark ? "#6B4D35" : "#EBE3D7" }} />
348
+ </span>
349
+ <span style={{ fontFamily: "var(--font-mono)", fontSize: "var(--text-micro, 0.75rem)", color: isDark ? "var(--fg-muted-on-stage-dark)" : "var(--fg-muted)" }}>
350
+ {title}
351
+ </span>
352
+ </div>
353
+ {badge ? <Badge tone="brand">{badge}</Badge> : null}
354
+ </div>
355
+ <div style={{ padding: 18 }}>{children}</div>
356
+ </div>
357
+ );
358
+ }
359
+
360
+ export interface DataTableSpecimenRow {
361
+ id: string;
362
+ name: string;
363
+ register: string;
364
+ status: "Approved" | "Draft";
365
+ contrast: string;
366
+ }
367
+
368
+ export function DataTableSpecimenFrame({ rows }: { rows?: DataTableSpecimenRow[] }) {
369
+ const data = rows ?? [
370
+ { id: "1", name: "--accent / --fg-on-accent", register: "Shared", status: "Approved", contrast: "12.09:1" },
371
+ { id: "2", name: "--fg-on-accent-soft", register: "Product", status: "Approved", contrast: "7.69:1" },
372
+ { id: "3", name: "--accent-editorial", register: "Marketing", status: "Draft", contrast: "7.17:1" },
373
+ ];
374
+
375
+ return (
376
+ <ProductWindowFrame title="millar / token-audit" badge="80 / 80 AA">
377
+ <div style={{ display: "flex", flexDirection: "column", gap: 8 }}>
378
+ {data.map((row) => (
379
+ <div
380
+ key={row.id}
381
+ style={{
382
+ display: "grid",
383
+ gridTemplateColumns: "minmax(0, 1.6fr) auto auto",
384
+ alignItems: "center",
385
+ gap: 12,
386
+ padding: "10px 12px",
387
+ borderRadius: "var(--radius-sm, 8px)",
388
+ backgroundColor: "var(--bg-surface-2)",
389
+ border: "1px solid var(--border-soft)",
390
+ }}
391
+ >
392
+ <code style={{ fontFamily: "var(--font-mono)", fontSize: "var(--text-micro, 0.75rem)", color: "var(--fg-default)" }}>
393
+ {row.name}
394
+ </code>
395
+ <Badge tone={row.status === "Approved" ? "success" : "brand"}>{row.status}</Badge>
396
+ <span className="tabular-nums" style={{ fontFamily: "var(--font-mono)", fontSize: "var(--text-micro, 0.75rem)", fontWeight: 600, color: "var(--fg-accent)" }}>
397
+ {row.contrast}
398
+ </span>
399
+ </div>
400
+ ))}
401
+ </div>
402
+ </ProductWindowFrame>
403
+ );
404
+ }
405
+
406
+ export function AssistantThreadPreview({
407
+ prompt = "Build a photo-free launch section for Hahlex Analytics.",
408
+ reply = "Selected Spatial Product Stage + WarmHorizonWash (approved visual asset) + DataTableSpecimenFrame. Automated validator passed 11/11 checks.",
409
+ }: {
410
+ prompt?: string;
411
+ reply?: string;
412
+ }) {
413
+ return (
414
+ <ProductWindowFrame title="millar-mcp / validate_design" badge="Live Spec">
415
+ <div style={{ display: "flex", flexDirection: "column", gap: 12 }}>
416
+ <div
417
+ style={{
418
+ alignSelf: "flex-end",
419
+ maxWidth: "85%",
420
+ padding: "10px 14px",
421
+ borderRadius: "var(--radius-lg, 16px)",
422
+ backgroundColor: "var(--tone-brand-soft)",
423
+ border: "1px solid var(--tone-brand-border)",
424
+ color: "var(--fg-default)",
425
+ fontSize: "var(--text-body-sm, 0.875rem)",
426
+ }}
427
+ >
428
+ {prompt}
429
+ </div>
430
+ <div
431
+ style={{
432
+ padding: "12px 14px",
433
+ borderRadius: "var(--radius-md, 12px)",
434
+ backgroundColor: "var(--bg-surface-2)",
435
+ border: "1px solid var(--border-default)",
436
+ color: "var(--fg-default)",
437
+ fontSize: "var(--text-body-sm, 0.875rem)",
438
+ lineHeight: 1.6,
439
+ display: "flex",
440
+ flexDirection: "column",
441
+ gap: 8,
442
+ }}
443
+ >
444
+ <span>{reply}</span>
445
+ <span style={{ display: "inline-flex", alignItems: "center", gap: 6, fontSize: "var(--text-micro, 0.75rem)", color: "var(--status-success)", fontWeight: 500 }}>
446
+ <IconCheck size="sm" />
447
+ <span>0 automated violations · 4 human aesthetic review criteria attached</span>
448
+ </span>
449
+ </div>
450
+ </div>
451
+ </ProductWindowFrame>
452
+ );
453
+ }
454
+
455
+ export interface MetricPlateCardProps {
456
+ value: string;
457
+ label: string;
458
+ detail?: string;
459
+ tone?: "brand" | "espresso" | "error";
460
+ }
461
+
462
+ export function MetricPlateCard({ value, label, detail, tone = "brand" }: MetricPlateCardProps) {
463
+ const isDark = tone === "espresso";
464
+ const isError = tone === "error";
465
+ return (
466
+ <div
467
+ style={{
468
+ padding: "20px 22px",
469
+ borderRadius: "var(--radius-lg, 16px)",
470
+ border: `1px solid ${isDark ? "var(--border-stage-dark)" : isError ? "var(--status-error-border)" : "var(--border-default)"}`,
471
+ backgroundColor: isDark ? "var(--bg-stage-dark)" : isError ? "var(--status-error-soft)" : "var(--bg-editorial-card)",
472
+ color: isDark ? "var(--fg-on-stage-dark)" : "var(--fg-default)",
473
+ display: "flex",
474
+ flexDirection: "column",
475
+ gap: 6,
476
+ }}
477
+ >
478
+ <span
479
+ className="tabular-nums"
480
+ style={{
481
+ fontFamily: "var(--font-display)",
482
+ fontSize: "clamp(1.75rem, 3vw, 2.5rem)",
483
+ fontWeight: 300,
484
+ lineHeight: 1.1,
485
+ letterSpacing: "var(--tracking-display, -0.02em)",
486
+ color: isError ? "var(--status-error)" : isDark ? "var(--fg-accent-on-stage-dark)" : "var(--fg-accent)",
487
+ }}
488
+ >
489
+ {value}
490
+ </span>
491
+ <strong style={{ fontFamily: "var(--font-display)", fontSize: "var(--text-card-title, 1rem)", fontWeight: 600 }}>{label}</strong>
492
+ {detail ? (
493
+ <span style={{ fontSize: "var(--text-meta, 0.8125rem)", color: isDark ? "var(--fg-muted-on-stage-dark)" : "var(--fg-muted)" }}>{detail}</span>
494
+ ) : null}
495
+ </div>
496
+ );
497
+ }