@newco-ai-platform/ui 0.1.0 → 0.2.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/demo.html CHANGED
@@ -8,6 +8,7 @@
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
9
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Manrope:wght@400;500;600;700;800&display=swap" rel="stylesheet">
10
10
  <link rel="stylesheet" href="./src/tokens.css">
11
+ <link rel="stylesheet" href="./src/components.css">
11
12
  <style>
12
13
  * { box-sizing: border-box; }
13
14
  html, body { margin: 0; padding: 0; background: var(--surface); color: var(--on-surface); -webkit-font-smoothing: antialiased; }
@@ -433,8 +434,60 @@
433
434
  </div>
434
435
  </section>
435
436
 
437
+ <section class="section">
438
+ <div class="section-head">
439
+ <h2>Components (v0.2)</h2>
440
+ <span class="meta">From <code style="font-family:var(--font-mono); font-size:13px">@newco-ai-platform/ui/components.css</code> — for NEURON's hero screen (NEU-1.3 / NEW-11)</span>
441
+ </div>
442
+ <p class="lead">Two classes shipped in v0.2 for NEURON's <code style="font-family:var(--font-mono); font-size:13px">/runs/[id]</code> page. Every value reads from the tokens above — no hard-coded colors, spacing, or motion.</p>
443
+
444
+ <div style="background: var(--surface-card); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 24px;">
445
+ <div>
446
+ <div class="type-label-sm" style="margin-bottom: 12px;">.p-step-bar — 7-layer middleware indicator</div>
447
+ <div class="p-step-bar" role="progressbar" aria-valuenow="3" aria-valuemax="7" aria-label="Agent middleware progress">
448
+ <div class="p-step-bar__cell p-step-bar__cell--done">Input</div>
449
+ <div class="p-step-bar__cell p-step-bar__cell--done">Kill</div>
450
+ <div class="p-step-bar__cell p-step-bar__cell--done">Audit</div>
451
+ <div class="p-step-bar__cell p-step-bar__cell--active">Output</div>
452
+ <div class="p-step-bar__cell">Orchestrator</div>
453
+ <div class="p-step-bar__cell">Tool</div>
454
+ <div class="p-step-bar__cell p-step-bar__cell--skipped">Emit</div>
455
+ </div>
456
+ <div class="type-body-sm" style="margin-top: 10px; color: var(--on-surface-muted)">
457
+ States in order: done · done · done · active (pulse) · pending · pending · skipped. Add <code style="font-family:var(--font-mono); font-size:13px">--failed</code> for the err state (red is reserved).
458
+ </div>
459
+ </div>
460
+
461
+ <div>
462
+ <div class="type-label-sm" style="margin-bottom: 12px;">.p-console — streamed thinking_step log</div>
463
+ <div class="p-console" role="log" aria-live="polite" aria-label="Agent thinking steps" style="max-height: 200px;">
464
+ <div class="p-console__line">
465
+ <span class="p-console__step-number">#0</span>
466
+ <span class="p-console__timestamp">16:03:21</span>
467
+ <span class="p-console__content">Parsing user request — claims-triage workflow.</span>
468
+ </div>
469
+ <div class="p-console__line">
470
+ <span class="p-console__step-number">#1</span>
471
+ <span class="p-console__timestamp">16:03:21</span>
472
+ <span class="p-console__content">Retrieving policy doc s3://kintsugi/policies/2026-Q2.pdf</span>
473
+ </div>
474
+ <div class="p-console__line">
475
+ <span class="p-console__step-number">#2</span>
476
+ <span class="p-console__timestamp">16:03:22</span>
477
+ <span class="p-console__content">Classifying severity → tier-2 (medium impact, ≤ $50k exposure).</span>
478
+ </div>
479
+ <div class="p-console__line">
480
+ <span class="p-console__step-number">#3</span>
481
+ <span class="p-console__timestamp">16:03:22</span>
482
+ <span class="p-console__content">Drafting response — calling tool: ledger.write_audit_entry</span>
483
+ </div>
484
+ </div>
485
+ </div>
486
+ </div>
487
+ </section>
488
+
436
489
  <footer class="foot">
437
- <strong>@newco-ai-platform/ui</strong> v0.1.0 · Luminous Multi-Signal · staged for npm publish ·
490
+ <strong>@newco-ai-platform/ui</strong> v0.2.0 · Luminous Multi-Signal · staged for npm publish ·
438
491
  See <a href="../../../DESIGN.md">platform/DESIGN.md</a> for the full spec.
439
492
  Hard rules: one accent per product · no 1px borders for sectioning · body ≥ 14px on data ·
440
493
  kill switches use product accent (never red) · <code style="font-family:var(--font-mono); font-size:11px">prefers-reduced-motion</code> always honored.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newco-ai-platform/ui",
3
- "version": "0.1.0",
4
- "description": "NewCo Suite design tokens Luminous Multi-Signal (v0.5 tokens-only)",
3
+ "version": "0.2.0",
4
+ "description": "NewCo Suite design tokens (Luminous Multi-Signal, frozen v1.0) + the component CSS surface that consumes them",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
7
7
  "type": "module",
@@ -21,11 +21,13 @@
21
21
  "require": "./dist/tokens/index.cjs"
22
22
  },
23
23
  "./tokens.css": "./src/tokens.css",
24
+ "./components.css": "./src/components.css",
24
25
  "./demo": "./demo.html"
25
26
  },
26
27
  "files": [
27
28
  "dist",
28
29
  "src/tokens.css",
30
+ "src/components.css",
29
31
  "demo.html",
30
32
  "README.md"
31
33
  ],
@@ -0,0 +1,139 @@
1
+ /*
2
+ * Luminous Multi-Signal — Component classes
3
+ * @newco-ai-platform/ui@0.2.0
4
+ *
5
+ * Import once at app root, after tokens.css:
6
+ * @import '@newco-ai-platform/ui/tokens.css';
7
+ * @import '@newco-ai-platform/ui/components.css';
8
+ *
9
+ * v0.2 ships the two classes NEURON's hero screen needs (NEU-1.3 / NEW-11):
10
+ * `.p-step-bar` for the 7-layer middleware indicator, and `.p-console` for
11
+ * the streamed thinking-step log. Every value sources from tokens.css —
12
+ * no hard-coded colors, spacing, or motion.
13
+ *
14
+ * Consumers add ARIA per their semantics:
15
+ * role="progressbar" + aria-valuenow / aria-valuemax on .p-step-bar
16
+ * role="log" + aria-live="polite" on .p-console
17
+ *
18
+ * Future component classes for non-NEU-1.3 surfaces (HITL gate, audit
19
+ * ledger, MERIDIAN review board) land alongside their respective tickets.
20
+ */
21
+
22
+ /* ───────────────────────────────────────────────────────────────────────
23
+ * .p-step-bar — 7-cell horizontal indicator for the agent's 7-layer
24
+ * middleware (input guardrail → kill switch → audit → output guardrail
25
+ * → orchestrator → tool dispatch → output). Default cell is "pending"
26
+ * (neutral); set per-cell state with modifier classes.
27
+ *
28
+ * The pulse animation on --active uses the "calm vigilance" tone from
29
+ * the design memory — opacity-only, never burst/rotation/scale-zero.
30
+ * prefers-reduced-motion: reduce disables it.
31
+ * ─────────────────────────────────────────────────────────────────── */
32
+
33
+ .p-step-bar {
34
+ display: grid;
35
+ grid-template-columns: repeat(7, 1fr);
36
+ gap: 6px;
37
+ width: 100%;
38
+ font-family: var(--font-body);
39
+ font-size: var(--fs-label-sm);
40
+ }
41
+
42
+ .p-step-bar__cell {
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ height: 28px;
47
+ padding: 0 10px;
48
+ border-radius: var(--radius);
49
+ background: var(--surface-card);
50
+ color: var(--on-surface-muted);
51
+ box-shadow: var(--shadow-card);
52
+ transition:
53
+ background var(--duration-base) var(--easing-standard),
54
+ color var(--duration-base) var(--easing-standard);
55
+ text-align: center;
56
+ white-space: nowrap;
57
+ overflow: hidden;
58
+ text-overflow: ellipsis;
59
+ }
60
+
61
+ .p-step-bar__cell--active {
62
+ background: var(--neuron-strong);
63
+ color: var(--on-surface);
64
+ animation: p-step-bar-pulse 1.6s var(--easing-standard) infinite;
65
+ }
66
+
67
+ .p-step-bar__cell--done {
68
+ background: var(--neuron);
69
+ color: #ffffff;
70
+ }
71
+
72
+ .p-step-bar__cell--failed {
73
+ background: var(--err);
74
+ color: #ffffff;
75
+ }
76
+
77
+ .p-step-bar__cell--skipped {
78
+ background: var(--surface-card);
79
+ color: var(--on-surface-dim);
80
+ text-decoration: line-through;
81
+ }
82
+
83
+ @keyframes p-step-bar-pulse {
84
+ 0%,
85
+ 100% {
86
+ opacity: 1;
87
+ }
88
+ 50% {
89
+ opacity: 0.65;
90
+ }
91
+ }
92
+
93
+ @media (prefers-reduced-motion: reduce) {
94
+ .p-step-bar__cell {
95
+ transition: none;
96
+ }
97
+ .p-step-bar__cell--active {
98
+ animation: none;
99
+ }
100
+ }
101
+
102
+ /* ───────────────────────────────────────────────────────────────────────
103
+ * .p-console — streamed-thinking-step log. JetBrains Mono at NEURON row
104
+ * density (22px line-height). No 1px row dividers — vertical breathing
105
+ * room via padding (No-Line Rule). The container scrolls; consumers
106
+ * scroll-to-bottom on new lines if they want a follow-tail UX.
107
+ * ─────────────────────────────────────────────────────────────────── */
108
+
109
+ .p-console {
110
+ font-family: var(--font-mono);
111
+ font-size: var(--fs-mono);
112
+ line-height: var(--lh-mono);
113
+ color: var(--on-surface);
114
+ background: var(--surface-card);
115
+ border-radius: var(--radius-lg);
116
+ padding: 16px 20px;
117
+ box-shadow: var(--shadow-card);
118
+ overflow-y: auto;
119
+ max-height: 60vh;
120
+ white-space: pre-wrap;
121
+ word-break: break-word;
122
+ }
123
+
124
+ .p-console__line {
125
+ display: block;
126
+ padding: 6px 0;
127
+ }
128
+
129
+ .p-console__step-number,
130
+ .p-console__timestamp {
131
+ color: var(--on-surface-dim);
132
+ font-size: var(--fs-mono-sm);
133
+ margin-right: 10px;
134
+ user-select: none;
135
+ }
136
+
137
+ .p-console__content {
138
+ color: var(--on-surface);
139
+ }