@pipelex/mthds-ui 0.5.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.
@@ -0,0 +1,394 @@
1
+ /* ReactFlow base styles — resolved by the consumer's bundler */
2
+ @import "@xyflow/react/dist/style.css";
3
+
4
+ /* Default theme — consumers can override any var on an ancestor element */
5
+ .react-flow-container {
6
+ --color-bg: #0a0a0a;
7
+ --color-bg-dots: rgba(255, 255, 255, 0.35);
8
+ --color-text-muted: #94a3b8;
9
+ --color-controller-text: #94a3b8;
10
+ --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
11
+ --font-mono: "JetBrains Mono", "Monaco", "Menlo", monospace;
12
+ --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
13
+ }
14
+ .react-flow-container {
15
+ position: absolute;
16
+ inset: 0;
17
+ background: var(--color-bg);
18
+ }
19
+ .react-flow__node {
20
+ font-family: var(--font-sans);
21
+ cursor: pointer;
22
+ }
23
+ .react-flow__background {
24
+ background: var(--color-bg) !important;
25
+ }
26
+ .react-flow__edge-path {
27
+ stroke-width: 2;
28
+ }
29
+ .react-flow__edge-text {
30
+ font-size: 11px;
31
+ fill: var(--color-text-muted);
32
+ }
33
+ .react-flow__edge-textbg {
34
+ fill: var(--color-bg);
35
+ }
36
+ /* Selected node highlight */
37
+ .react-flow__node.selected {
38
+ box-shadow:
39
+ 0 0 0 3px var(--color-accent),
40
+ var(--shadow-lg) !important;
41
+ z-index: 1000 !important;
42
+ }
43
+ /* Pipe cards handle their own selection styling — suppress the wrapper outline */
44
+ .react-flow__node-pipeCard {
45
+ background: transparent !important;
46
+ border: none !important;
47
+ box-shadow: none !important;
48
+ outline: none !important;
49
+ padding: 0 !important;
50
+ }
51
+ .react-flow__node-pipeCard.selected {
52
+ box-shadow: none !important;
53
+ outline: none !important;
54
+ }
55
+ .react-flow__node-pipeCard.selected .pipe-card {
56
+ box-shadow:
57
+ 0 0 0 2px var(--color-accent, #3b82f6),
58
+ 0 4px 16px rgba(0, 0, 0, 0.6);
59
+ }
60
+ .react-flow__node-controllerGroup.selected {
61
+ box-shadow:
62
+ 0 0 0 2px var(--color-accent),
63
+ var(--shadow-lg) !important;
64
+ }
65
+ .react-flow__node-controllerGroup {
66
+ cursor: default !important;
67
+ }
68
+ /* ─── Controller Group Node ──────────────────────────────────────────── */
69
+ .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;
73
+
74
+ width: 100%;
75
+ height: 100%;
76
+ position: relative;
77
+ border: var(--controller-border);
78
+ border-radius: 12px;
79
+ background: var(--controller-bg);
80
+ }
81
+ .controller-group-header {
82
+ position: absolute;
83
+ top: 0;
84
+ left: 0;
85
+ right: 0;
86
+ display: flex;
87
+ align-items: center;
88
+ gap: 6px;
89
+ padding: 6px 12px;
90
+ pointer-events: none;
91
+ user-select: none;
92
+ }
93
+ .controller-group-icon {
94
+ font-size: 13px;
95
+ color: var(--controller-header-color);
96
+ line-height: 1;
97
+ }
98
+ .controller-group-badge {
99
+ font-size: 9px;
100
+ font-weight: 700;
101
+ text-transform: uppercase;
102
+ letter-spacing: 0.06em;
103
+ color: var(--controller-header-color);
104
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
105
+ }
106
+ .controller-group-label {
107
+ font-size: 11px;
108
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
109
+ font-weight: 500;
110
+ color: var(--color-controller-text, #94a3b8);
111
+ white-space: nowrap;
112
+ margin-left: auto;
113
+ }
114
+
115
+ /* Collapse / expand toggle for parallel & batch controllers */
116
+ .controller-group-collapse {
117
+ all: unset;
118
+ position: absolute;
119
+ bottom: 4px;
120
+ right: 8px;
121
+ font-size: 10px;
122
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
123
+ color: var(--controller-header-color, #94a3b8);
124
+ cursor: pointer;
125
+ padding: 2px 8px;
126
+ border-radius: 4px;
127
+ border: 1px dashed rgba(255, 255, 255, 0.15);
128
+ pointer-events: auto;
129
+ z-index: 10;
130
+ white-space: nowrap;
131
+ }
132
+ .controller-group-collapse:hover {
133
+ color: #e2e8f0;
134
+ border-color: rgba(255, 255, 255, 0.35);
135
+ background: rgba(255, 255, 255, 0.05);
136
+ }
137
+
138
+ /* Sequence — solid thin border, calm flow */
139
+ .controller-group--sequence {
140
+ --controller-border: 1.5px solid rgba(148, 163, 184, 0.25);
141
+ --controller-bg: rgba(148, 163, 184, 0.03);
142
+ --controller-header-color: #94a3b8;
143
+ }
144
+
145
+ /* Parallel — double border, forking lanes */
146
+ .controller-group--parallel {
147
+ --controller-border: 3px double rgba(139, 233, 253, 0.35);
148
+ --controller-bg: rgba(139, 233, 253, 0.03);
149
+ --controller-header-color: #8be9fd;
150
+ }
151
+
152
+ /* Condition — dashed with diamond accent */
153
+ .controller-group--condition {
154
+ --controller-border: 2px dashed rgba(251, 191, 36, 0.35);
155
+ --controller-bg: rgba(251, 191, 36, 0.03);
156
+ --controller-header-color: #fbbf24;
157
+ }
158
+
159
+ /* Batch — dotted border, loop/repeat */
160
+ .controller-group--batch {
161
+ --controller-border: 2px dotted rgba(167, 139, 250, 0.35);
162
+ --controller-bg: rgba(167, 139, 250, 0.03);
163
+ --controller-header-color: #a78bfa;
164
+ }
165
+
166
+ /* ─── Pipe Card Node ─────────────────────────────────────────────────── */
167
+ /* All tokens overridable via CSS custom properties on an ancestor. */
168
+ .pipe-card {
169
+ --pipe-card-accent: #ff6b6b;
170
+ --pipe-card-bg: rgba(148, 163, 184, 0.08);
171
+ --pipe-card-text: #e2e8f0;
172
+ --pipe-card-text-bright: #f8fafc;
173
+ --pipe-card-text-muted: #94a3b8;
174
+ --pipe-card-text-dim: #64748b;
175
+ --pipe-card-pill-bg: rgba(255, 255, 255, 0.06);
176
+ --pipe-card-pill-border: rgba(255, 255, 255, 0.08);
177
+ --pipe-card-pill-text: #cbd5e1;
178
+ --pipe-card-radius: 8px;
179
+
180
+ border-left: 4px solid var(--pipe-card-accent);
181
+ border-radius: var(--pipe-card-radius);
182
+ padding: 12px 14px;
183
+ background: var(--pipe-card-bg);
184
+ font-family: var(--font-sans, "Inter", -apple-system, sans-serif);
185
+ color: var(--pipe-card-text);
186
+ display: flex;
187
+ flex-direction: column;
188
+ gap: 8px;
189
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
190
+ transition: box-shadow 0.2s;
191
+ /* Fill the ReactFlow wrapper whose size is locked to ELK's layout dimensions */
192
+ width: 100%;
193
+ height: 100%;
194
+ box-sizing: border-box;
195
+ overflow: hidden;
196
+ }
197
+ .pipe-card:hover {
198
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
199
+ }
200
+
201
+ /* Direction-aware sizing: LR = narrow + tall, TB = wide + short */
202
+ .pipe-card--lr {
203
+ min-width: 180px;
204
+ max-width: 240px;
205
+ }
206
+ .pipe-card--tb {
207
+ min-width: 280px;
208
+ max-width: 400px;
209
+ }
210
+
211
+ /* Header: badge + code + status */
212
+ .pipe-card-header {
213
+ display: flex;
214
+ align-items: center;
215
+ gap: 8px;
216
+ }
217
+ .pipe-card-badge {
218
+ font-size: 10px;
219
+ font-weight: 700;
220
+ text-transform: uppercase;
221
+ letter-spacing: 0.04em;
222
+ padding: 2px 7px;
223
+ border-radius: 4px;
224
+ white-space: nowrap;
225
+ line-height: 1.4;
226
+ background: var(--pipe-card-accent);
227
+ color: #0e0e0e;
228
+ }
229
+ .pipe-card-code {
230
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
231
+ font-size: 13px;
232
+ font-weight: 600;
233
+ color: var(--pipe-card-accent);
234
+ flex: 1;
235
+ overflow: hidden;
236
+ text-overflow: ellipsis;
237
+ white-space: nowrap;
238
+ }
239
+ .pipe-card-status {
240
+ display: flex;
241
+ align-items: center;
242
+ margin-left: auto;
243
+ flex-shrink: 0;
244
+ }
245
+ .pipe-card-status-dot {
246
+ width: 8px;
247
+ height: 8px;
248
+ border-radius: 50%;
249
+ display: inline-block;
250
+ }
251
+ .pipe-card-status-dot--pulse {
252
+ animation: pipe-card-pulse 1.5s ease-in-out infinite;
253
+ }
254
+ @keyframes pipe-card-pulse {
255
+ 0%,
256
+ 100% {
257
+ opacity: 1;
258
+ transform: scale(1);
259
+ }
260
+ 50% {
261
+ opacity: 0.5;
262
+ transform: scale(1.3);
263
+ }
264
+ }
265
+
266
+ /* Description — per-direction clamping. LR gets up to 3 lines (tall/narrow card),
267
+ TB gets 1 line (wide card, horizontal layout). Both truncate with ellipsis. */
268
+ .pipe-card-description {
269
+ font-size: 11.5px;
270
+ color: var(--pipe-card-text-muted);
271
+ line-height: 1.4;
272
+ overflow: hidden;
273
+ text-overflow: ellipsis;
274
+ min-width: 0;
275
+ }
276
+ .pipe-card--lr .pipe-card-description {
277
+ display: -webkit-box;
278
+ -webkit-line-clamp: 3;
279
+ -webkit-box-orient: vertical;
280
+ }
281
+ .pipe-card--tb .pipe-card-description {
282
+ white-space: nowrap;
283
+ }
284
+
285
+ /* I/O section — base (appearance only, layout set per-direction below) */
286
+ .pipe-card-io-label {
287
+ font-size: 9px;
288
+ font-weight: 700;
289
+ text-transform: uppercase;
290
+ letter-spacing: 0.06em;
291
+ color: var(--pipe-card-text-dim);
292
+ flex-shrink: 0;
293
+ }
294
+ .pipe-card-io-pills {
295
+ display: flex;
296
+ gap: 4px;
297
+ min-width: 0;
298
+ }
299
+ .pipe-card-io-pill {
300
+ display: inline-flex;
301
+ align-items: center;
302
+ gap: 3px;
303
+ font-size: 10px;
304
+ background: var(--pipe-card-pill-bg);
305
+ border: 1px solid var(--pipe-card-pill-border);
306
+ border-radius: 4px;
307
+ padding: 1px 5px;
308
+ line-height: 1.4;
309
+ min-width: 0;
310
+ }
311
+ .pipe-card-io-pill-name {
312
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
313
+ color: var(--pipe-card-pill-text);
314
+ overflow: hidden;
315
+ text-overflow: ellipsis;
316
+ white-space: nowrap;
317
+ }
318
+ .pipe-card-io-pill-concept {
319
+ color: var(--pipe-card-text-dim);
320
+ font-size: 9px;
321
+ overflow: hidden;
322
+ text-overflow: ellipsis;
323
+ white-space: nowrap;
324
+ }
325
+ .pipe-card-io-more {
326
+ all: unset;
327
+ font-size: 10px;
328
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
329
+ color: var(--pipe-card-text-muted);
330
+ cursor: pointer;
331
+ padding: 2px 6px;
332
+ border-radius: 4px;
333
+ border: 1px dashed rgba(255, 255, 255, 0.12);
334
+ white-space: nowrap;
335
+ line-height: 1.4;
336
+ }
337
+ .pipe-card-io-more:hover {
338
+ color: var(--pipe-card-text);
339
+ border-color: rgba(255, 255, 255, 0.25);
340
+ }
341
+
342
+ /* ─── LR: label on top, pills stacked vertically, hard-truncated ─────── */
343
+ /* Truncation priority: concept shrinks first → name truncates last. */
344
+ .pipe-card--lr .pipe-card-io {
345
+ display: flex;
346
+ flex-direction: column;
347
+ gap: 4px;
348
+ }
349
+ .pipe-card--lr .pipe-card-io-pills {
350
+ flex-direction: column;
351
+ align-items: flex-start; /* pills size to content, not stretch */
352
+ gap: 4px;
353
+ }
354
+ .pipe-card--lr .pipe-card-io-pill {
355
+ max-width: 100%;
356
+ overflow: hidden;
357
+ }
358
+ .pipe-card--lr .pipe-card-io-pill-name {
359
+ flex: 0 1 auto; /* natural width, shrinks only after concept is gone */
360
+ min-width: 30px;
361
+ }
362
+ .pipe-card--lr .pipe-card-io-pill-concept {
363
+ flex: 0 100 auto; /* natural width, shrinks 100x faster than name */
364
+ min-width: 0; /* allow shrinking to zero */
365
+ }
366
+ .pipe-card--lr .pipe-card-io-more {
367
+ align-self: flex-start;
368
+ }
369
+
370
+ /* ─── TB: label on the left, pills wrap horizontally to the right ────── */
371
+ .pipe-card--tb .pipe-card-io {
372
+ display: flex;
373
+ flex-direction: row;
374
+ align-items: flex-start;
375
+ gap: 6px;
376
+ }
377
+ .pipe-card--tb .pipe-card-io-label {
378
+ padding-top: 4px;
379
+ min-width: 52px;
380
+ }
381
+ .pipe-card--tb .pipe-card-io-pills {
382
+ flex: 1 1 0;
383
+ flex-wrap: wrap;
384
+ min-width: 0;
385
+ }
386
+ .pipe-card--tb .pipe-card-io-pill {
387
+ max-width: 100%;
388
+ }
389
+ .pipe-card--tb .pipe-card-io-pill-name {
390
+ max-width: 140px;
391
+ }
392
+ .pipe-card--tb .pipe-card-io-pill-concept {
393
+ max-width: 100px;
394
+ }