@pipelex/mthds-ui 0.6.4 → 0.6.5

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.
@@ -1,17 +1,103 @@
1
1
  /* ReactFlow base styles — resolved by the consumer's bundler */
2
2
  @import "@xyflow/react/dist/style.css";
3
3
 
4
- /* Default theme — consumers can override any var on an ancestor element */
4
+ /**
5
+ * Tokens (--surface-*, --text-*, --border-*, --shadow-*, --color-*) are
6
+ * applied to `.react-flow-container` inline by `GraphViewer` based on the
7
+ * active theme (dark / light). Component CSS only references those tokens —
8
+ * never raw hex/rgba — so a new theme is just a new set of values.
9
+ *
10
+ * The block below provides STATIC dark-palette defaults so that any of these
11
+ * cases still render with valid colors / fonts / shadows:
12
+ * - first paint before the React inline-palette effect runs
13
+ * - SSR / hydration mismatches
14
+ * - a consumer rendering a graph subcomponent outside `GraphViewer`
15
+ * - JS disabled / failed
16
+ * Values mirror `DARK_PALETTE_COLORS` in `graphConfig.ts`. The runtime
17
+ * palette (dark or light) is applied as higher-specificity inline styles
18
+ * and wins automatically.
19
+ */
5
20
  .react-flow-container {
21
+ /* Surfaces */
22
+ --surface-page: #0a0a0a;
23
+ --surface-panel: #111118;
24
+ --surface-overlay: rgba(17, 17, 24, 0.8);
25
+ --surface-overlay-hover: rgba(30, 30, 40, 0.9);
26
+ --surface-overlay-disabled: rgba(17, 17, 24, 0.6);
27
+ --surface-elevated: rgba(255, 255, 255, 0.06);
28
+ --surface-elevated-hover: rgba(255, 255, 255, 0.1);
29
+ --surface-sunken: rgba(255, 255, 255, 0.03);
30
+ --surface-pill: rgba(255, 255, 255, 0.06);
31
+ --surface-pill-border: rgba(255, 255, 255, 0.08);
32
+
33
+ /* Borders */
34
+ --border-subtle: rgba(255, 255, 255, 0.06);
35
+ --border-default: rgba(255, 255, 255, 0.1);
36
+ --border-strong: rgba(255, 255, 255, 0.18);
37
+ --border-dashed: rgba(255, 255, 255, 0.15);
38
+
39
+ /* Text */
40
+ --text-primary: #f8fafc;
41
+ --text-default: #e2e8f0;
42
+ --text-secondary: #cbd5e1;
43
+ --text-muted: #94a3b8;
44
+ --text-dim: #64748b;
45
+ --text-on-accent: #0e0e0e;
46
+
47
+ /* Effects */
48
+ --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
49
+ --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
50
+ --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
51
+ --focus-ring: rgba(59, 130, 246, 0.6);
52
+
53
+ /* Domain-semantic colors */
54
+ --color-pipe: #ff6b6b;
55
+ --color-pipe-bg: rgba(224, 108, 117, 0.18);
56
+ --color-pipe-text: #ffffff;
57
+ --color-stuff: #4ecdc4;
58
+ --color-stuff-bg: rgba(78, 205, 196, 0.12);
59
+ --color-stuff-border: #9ddcfd;
60
+ --color-stuff-text: #98fb98;
61
+ --color-stuff-text-dim: #9ddcfd;
62
+ --color-edge: #fffacd;
63
+ --color-batch-item: #bd93f9;
64
+ --color-batch-aggregate: #50fa7b;
65
+ --color-parallel-combine: #d6a4ff;
66
+ --color-success: #50fa7b;
67
+ --color-success-bg: rgba(80, 250, 123, 0.15);
68
+ --color-error: #ff5555;
69
+ --color-error-bg: rgba(255, 85, 85, 0.15);
70
+ --color-error-border: rgba(255, 85, 85, 0.2);
71
+ --color-accent: #8be9fd;
72
+ --color-accent-strong: #3b82f6;
73
+ --color-warning: #ffb86c;
74
+
75
+ /* Controller-group palette */
76
+ --ctrl-sequence-border: rgba(148, 163, 184, 0.25);
77
+ --ctrl-sequence-bg: rgba(148, 163, 184, 0.03);
78
+ --ctrl-sequence-text: #94a3b8;
79
+ --ctrl-parallel-border: rgba(139, 233, 253, 0.35);
80
+ --ctrl-parallel-bg: rgba(139, 233, 253, 0.03);
81
+ --ctrl-parallel-text: #8be9fd;
82
+ --ctrl-condition-border: rgba(251, 191, 36, 0.35);
83
+ --ctrl-condition-bg: rgba(251, 191, 36, 0.03);
84
+ --ctrl-condition-text: #fbbf24;
85
+ --ctrl-batch-border: rgba(167, 139, 250, 0.35);
86
+ --ctrl-batch-bg: rgba(167, 139, 250, 0.03);
87
+ --ctrl-batch-text: #a78bfa;
88
+ --ctrl-folded-bg: rgba(148, 163, 184, 0.25);
89
+ --ctrl-folded-border: rgba(148, 163, 184, 0.4);
90
+
91
+ /* Legacy aliases — still consumed by some inline styles in graph builders */
6
92
  --color-bg: #0a0a0a;
7
93
  --color-bg-dots: rgba(255, 255, 255, 0.35);
8
94
  --color-text-muted: #94a3b8;
9
95
  --color-controller-text: #94a3b8;
96
+
97
+ /* Fonts */
10
98
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
11
99
  --font-mono: "JetBrains Mono", "Monaco", "Menlo", monospace;
12
- --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
13
- }
14
- .react-flow-container {
100
+
15
101
  position: absolute;
16
102
  inset: 0;
17
103
  background: var(--color-bg);
@@ -21,17 +107,17 @@
21
107
  cursor: pointer;
22
108
  }
23
109
  .react-flow__background {
24
- background: var(--color-bg) !important;
110
+ background: var(--color-bg, #0a0a0a) !important;
25
111
  }
26
112
  .react-flow__edge-path {
27
113
  stroke-width: 2;
28
114
  }
29
115
  .react-flow__edge-text {
30
116
  font-size: 11px;
31
- fill: var(--color-text-muted);
117
+ fill: var(--text-muted);
32
118
  }
33
119
  .react-flow__edge-textbg {
34
- fill: var(--color-bg);
120
+ fill: var(--color-bg, #0a0a0a);
35
121
  }
36
122
  /* Selected node highlight */
37
123
  .react-flow__node.selected {
@@ -54,8 +140,8 @@
54
140
  }
55
141
  .react-flow__node-pipeCard.selected .pipe-card {
56
142
  box-shadow:
57
- 0 0 0 2px var(--color-accent, #3b82f6),
58
- 0 4px 16px rgba(0, 0, 0, 0.6);
143
+ 0 0 0 2px var(--color-accent),
144
+ var(--shadow-md);
59
145
  }
60
146
  .react-flow__node-controllerGroup.selected {
61
147
  box-shadow:
@@ -67,9 +153,9 @@
67
153
  }
68
154
  /* ─── Controller Group Node ──────────────────────────────────────────── */
69
155
  .controller-group-node {
70
- --controller-border: 2px dashed rgba(148, 163, 184, 0.3);
71
- --controller-bg: rgba(148, 163, 184, 0.04);
72
- --controller-header-color: #64748b;
156
+ --controller-border: 2px dashed var(--ctrl-sequence-border);
157
+ --controller-bg: var(--ctrl-sequence-bg);
158
+ --controller-header-color: var(--ctrl-sequence-text);
73
159
 
74
160
  width: 100%;
75
161
  height: 100%;
@@ -101,13 +187,13 @@
101
187
  text-transform: uppercase;
102
188
  letter-spacing: 0.06em;
103
189
  color: var(--controller-header-color);
104
- font-family: var(--font-mono, "JetBrains Mono", monospace);
190
+ font-family: var(--font-mono);
105
191
  }
106
192
  .controller-group-label {
107
193
  font-size: 11px;
108
- font-family: var(--font-mono, "JetBrains Mono", monospace);
194
+ font-family: var(--font-mono);
109
195
  font-weight: 500;
110
- color: var(--color-controller-text, #94a3b8);
196
+ color: var(--color-controller-text);
111
197
  white-space: nowrap;
112
198
  margin-left: auto;
113
199
  }
@@ -119,23 +205,23 @@
119
205
  bottom: 4px;
120
206
  right: 8px;
121
207
  font-size: 10px;
122
- font-family: var(--font-mono, "JetBrains Mono", monospace);
123
- color: var(--controller-header-color, #94a3b8);
208
+ font-family: var(--font-mono);
209
+ color: var(--controller-header-color);
124
210
  cursor: pointer;
125
211
  padding: 2px 8px;
126
212
  border-radius: 4px;
127
- border: 1px dashed rgba(255, 255, 255, 0.15);
213
+ border: 1px dashed var(--border-dashed);
128
214
  pointer-events: auto;
129
215
  z-index: 10;
130
216
  white-space: nowrap;
131
217
  }
132
218
  .controller-group-collapse:hover {
133
- color: #e2e8f0;
134
- border-color: rgba(255, 255, 255, 0.35);
135
- background: rgba(255, 255, 255, 0.05);
219
+ color: var(--text-primary);
220
+ border-color: var(--border-strong);
221
+ background: var(--surface-elevated);
136
222
  }
137
223
  .controller-group-collapse:focus-visible {
138
- outline: 2px solid var(--controller-header-color, #94a3b8);
224
+ outline: 2px solid var(--controller-header-color);
139
225
  outline-offset: 2px;
140
226
  }
141
227
 
@@ -145,73 +231,64 @@
145
231
  cursor: pointer;
146
232
  font-size: 20px;
147
233
  line-height: 1;
148
- color: var(--controller-header-color, #94a3b8);
234
+ color: var(--controller-header-color);
149
235
  padding: 4px 10px;
150
236
  border-radius: 6px;
151
237
  pointer-events: auto;
152
238
  margin-left: auto;
153
239
  }
154
240
  .controller-group-fold:hover {
155
- color: #e2e8f0;
156
- background: rgba(255, 255, 255, 0.06);
241
+ color: var(--text-primary);
242
+ background: var(--surface-elevated);
157
243
  }
158
244
  .controller-group-fold:focus-visible {
159
- outline: 2px solid var(--controller-header-color, #94a3b8);
245
+ outline: 2px solid var(--controller-header-color);
160
246
  outline-offset: 2px;
161
247
  }
162
248
 
163
249
  /* Sequence — solid thin border, calm flow */
164
250
  .controller-group--sequence {
165
- --controller-border: 1.5px solid rgba(148, 163, 184, 0.25);
166
- --controller-bg: rgba(148, 163, 184, 0.03);
167
- --controller-header-color: #94a3b8;
251
+ --controller-border: 1.5px solid var(--ctrl-sequence-border);
252
+ --controller-bg: var(--ctrl-sequence-bg);
253
+ --controller-header-color: var(--ctrl-sequence-text);
168
254
  }
169
255
 
170
256
  /* Parallel — double border, forking lanes */
171
257
  .controller-group--parallel {
172
- --controller-border: 3px double rgba(139, 233, 253, 0.35);
173
- --controller-bg: rgba(139, 233, 253, 0.03);
174
- --controller-header-color: #8be9fd;
258
+ --controller-border: 3px double var(--ctrl-parallel-border);
259
+ --controller-bg: var(--ctrl-parallel-bg);
260
+ --controller-header-color: var(--ctrl-parallel-text);
175
261
  }
176
262
 
177
263
  /* Condition — dashed with diamond accent */
178
264
  .controller-group--condition {
179
- --controller-border: 2px dashed rgba(251, 191, 36, 0.35);
180
- --controller-bg: rgba(251, 191, 36, 0.03);
181
- --controller-header-color: #fbbf24;
265
+ --controller-border: 2px dashed var(--ctrl-condition-border);
266
+ --controller-bg: var(--ctrl-condition-bg);
267
+ --controller-header-color: var(--ctrl-condition-text);
182
268
  }
183
269
 
184
270
  /* Batch — dotted border, loop/repeat */
185
271
  .controller-group--batch {
186
- --controller-border: 2px dotted rgba(167, 139, 250, 0.35);
187
- --controller-bg: rgba(167, 139, 250, 0.03);
188
- --controller-header-color: #a78bfa;
272
+ --controller-border: 2px dotted var(--ctrl-batch-border);
273
+ --controller-bg: var(--ctrl-batch-bg);
274
+ --controller-header-color: var(--ctrl-batch-text);
189
275
  }
190
276
 
191
277
  /* ─── Pipe Card Node ─────────────────────────────────────────────────── */
192
- /* All tokens overridable via CSS custom properties on an ancestor. */
193
278
  .pipe-card {
194
- --pipe-card-accent: #ff6b6b;
195
- --pipe-card-bg: rgba(148, 163, 184, 0.08);
196
- --pipe-card-text: #e2e8f0;
197
- --pipe-card-text-bright: #f8fafc;
198
- --pipe-card-text-muted: #94a3b8;
199
- --pipe-card-text-dim: #64748b;
200
- --pipe-card-pill-bg: rgba(255, 255, 255, 0.06);
201
- --pipe-card-pill-border: rgba(255, 255, 255, 0.08);
202
- --pipe-card-pill-text: #cbd5e1;
279
+ --pipe-card-accent: var(--color-pipe);
203
280
  --pipe-card-radius: 8px;
204
281
 
205
282
  border-left: 4px solid var(--pipe-card-accent);
206
283
  border-radius: var(--pipe-card-radius);
207
284
  padding: 12px 14px;
208
- background: var(--pipe-card-bg);
209
- font-family: var(--font-sans, "Inter", -apple-system, sans-serif);
210
- color: var(--pipe-card-text);
285
+ background: var(--surface-elevated);
286
+ font-family: var(--font-sans);
287
+ color: var(--text-default);
211
288
  display: flex;
212
289
  flex-direction: column;
213
290
  gap: 8px;
214
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
291
+ box-shadow: var(--shadow-sm);
215
292
  transition: box-shadow 0.2s;
216
293
  /* Fill the ReactFlow wrapper whose size is locked to ELK's layout dimensions */
217
294
  width: 100%;
@@ -220,7 +297,7 @@
220
297
  overflow: hidden;
221
298
  }
222
299
  .pipe-card:hover {
223
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
300
+ box-shadow: var(--shadow-md);
224
301
  }
225
302
 
226
303
  /* Direction-aware sizing: LR = narrow + tall, TB = wide + short */
@@ -249,10 +326,10 @@
249
326
  white-space: nowrap;
250
327
  line-height: 1.4;
251
328
  background: var(--pipe-card-accent);
252
- color: #0e0e0e;
329
+ color: var(--text-on-accent);
253
330
  }
254
331
  .pipe-card-code {
255
- font-family: var(--font-mono, "JetBrains Mono", monospace);
332
+ font-family: var(--font-mono);
256
333
  font-size: 13px;
257
334
  font-weight: 600;
258
335
  color: var(--pipe-card-accent);
@@ -283,29 +360,29 @@
283
360
  cursor: pointer;
284
361
  font-size: 20px;
285
362
  line-height: 1;
286
- color: var(--pipe-card-text-muted);
363
+ color: var(--text-muted);
287
364
  padding: 4px 8px;
288
365
  border-radius: 6px;
289
366
  flex-shrink: 0;
290
367
  }
291
368
  .pipe-card-expand:hover {
292
- color: var(--pipe-card-text-bright);
293
- background: rgba(255, 255, 255, 0.08);
369
+ color: var(--text-primary);
370
+ background: var(--surface-elevated-hover);
294
371
  }
295
372
  .pipe-card-expand:focus-visible {
296
- outline: 2px solid var(--pipe-card-text-bright);
373
+ outline: 2px solid var(--text-primary);
297
374
  outline-offset: 2px;
298
375
  }
299
376
 
300
377
  /* Folded-controller card variant — slightly tinted badge to differentiate
301
378
  from operator cards. */
302
379
  .pipe-card-badge--controller {
303
- background: rgba(148, 163, 184, 0.25);
304
- color: var(--pipe-card-text-bright);
305
- border: 1px solid rgba(148, 163, 184, 0.4);
380
+ background: var(--ctrl-folded-bg);
381
+ color: var(--text-primary);
382
+ border: 1px solid var(--ctrl-folded-border);
306
383
  }
307
384
  .pipe-card--controller {
308
- --pipe-card-accent: #94a3b8;
385
+ --pipe-card-accent: var(--text-muted);
309
386
  }
310
387
  @keyframes pipe-card-pulse {
311
388
  0%,
@@ -333,7 +410,7 @@
333
410
  TB gets 1 line (wide card, horizontal layout). Both truncate with ellipsis. */
334
411
  .pipe-card-description {
335
412
  font-size: 11.5px;
336
- color: var(--pipe-card-text-muted);
413
+ color: var(--text-muted);
337
414
  line-height: 1.4;
338
415
  overflow: hidden;
339
416
  text-overflow: ellipsis;
@@ -354,7 +431,7 @@
354
431
  font-weight: 700;
355
432
  text-transform: uppercase;
356
433
  letter-spacing: 0.06em;
357
- color: var(--pipe-card-text-dim);
434
+ color: var(--text-dim);
358
435
  flex-shrink: 0;
359
436
  }
360
437
  .pipe-card-io-pills {
@@ -367,22 +444,22 @@
367
444
  align-items: center;
368
445
  gap: 3px;
369
446
  font-size: 10px;
370
- background: var(--pipe-card-pill-bg);
371
- border: 1px solid var(--pipe-card-pill-border);
447
+ background: var(--surface-pill);
448
+ border: 1px solid var(--surface-pill-border);
372
449
  border-radius: 4px;
373
450
  padding: 1px 5px;
374
451
  line-height: 1.4;
375
452
  min-width: 0;
376
453
  }
377
454
  .pipe-card-io-pill-name {
378
- font-family: var(--font-mono, "JetBrains Mono", monospace);
379
- color: var(--pipe-card-pill-text);
455
+ font-family: var(--font-mono);
456
+ color: var(--text-secondary);
380
457
  overflow: hidden;
381
458
  text-overflow: ellipsis;
382
459
  white-space: nowrap;
383
460
  }
384
461
  .pipe-card-io-pill-concept {
385
- color: var(--pipe-card-text-dim);
462
+ color: var(--text-dim);
386
463
  font-size: 9px;
387
464
  overflow: hidden;
388
465
  text-overflow: ellipsis;
@@ -391,21 +468,21 @@
391
468
  .pipe-card-io-more {
392
469
  all: unset;
393
470
  font-size: 10px;
394
- font-family: var(--font-mono, "JetBrains Mono", monospace);
395
- color: var(--pipe-card-text-muted);
471
+ font-family: var(--font-mono);
472
+ color: var(--text-muted);
396
473
  cursor: pointer;
397
474
  padding: 2px 6px;
398
475
  border-radius: 4px;
399
- border: 1px dashed rgba(255, 255, 255, 0.12);
476
+ border: 1px dashed var(--border-default);
400
477
  white-space: nowrap;
401
478
  line-height: 1.4;
402
479
  }
403
480
  .pipe-card-io-more:hover {
404
- color: var(--pipe-card-text);
405
- border-color: rgba(255, 255, 255, 0.25);
481
+ color: var(--text-default);
482
+ border-color: var(--border-strong);
406
483
  }
407
484
  .pipe-card-io-more:focus-visible {
408
- outline: 2px solid var(--pipe-card-text);
485
+ outline: 2px solid var(--text-default);
409
486
  outline-offset: 2px;
410
487
  }
411
488