@pipelex/mthds-ui 0.6.3 → 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,16 +1,21 @@
1
1
  /* ─── StuffViewer component styles ────────────────────────────────────────── */
2
- /* Uses CSS custom properties for consumer theming. Defaults match graph-core.css. */
2
+ /* StuffViewer is also exported standalone (used outside GraphViewer e.g.
3
+ * docs pages, embedded previews). The theme tokens are normally applied to
4
+ * the GraphViewer container, but when this component is rendered on its own
5
+ * those tokens may not be set. The fallbacks below match the dark palette
6
+ * from `graphConfig.ts` (DARK_PALETTE_COLORS) so the component always
7
+ * renders with valid colors and fonts. */
3
8
 
4
9
  .stuff-viewer {
5
- --sv-bg: var(--color-bg, #0a0a0a);
6
- --sv-surface: var(--color-surface, #16213e);
7
- --sv-surface-hover: var(--color-surface-hover, #1f2b47);
8
- --sv-border: var(--color-border, #2a3a5a);
9
- --sv-text: var(--color-text, #e2e8f0);
10
- --sv-text-muted: var(--color-text-muted, #94a3b8);
11
- --sv-accent: var(--color-accent, #3b82f6);
12
- --sv-success: #10b981;
13
- --sv-success-bg: rgba(16, 185, 129, 0.2);
10
+ --sv-bg: var(--surface-page, #0a0a0a);
11
+ --sv-surface: var(--surface-panel, #111118);
12
+ --sv-surface-hover: var(--surface-elevated, rgba(255, 255, 255, 0.06));
13
+ --sv-border: var(--border-default, rgba(255, 255, 255, 0.1));
14
+ --sv-text: var(--text-default, #e2e8f0);
15
+ --sv-text-muted: var(--text-muted, #94a3b8);
16
+ --sv-accent: var(--color-accent, #8be9fd);
17
+ --sv-success: var(--color-success, #50fa7b);
18
+ --sv-success-bg: var(--color-success-bg, rgba(80, 250, 123, 0.15));
14
19
  --sv-radius: 4px;
15
20
  --sv-font-sans: var(
16
21
  --font-sans,
@@ -90,7 +95,7 @@
90
95
 
91
96
  .stuff-viewer-tab--active {
92
97
  background: var(--sv-accent);
93
- color: #fff;
98
+ color: var(--text-on-accent, #0e0e0e);
94
99
  }
95
100
 
96
101
  /* ─── Action buttons ─────────────────────────────────────────────────────── */
@@ -305,3 +310,25 @@ button.stuff-viewer-local-file--button:focus-visible {
305
310
  font-style: italic;
306
311
  font-size: 13px;
307
312
  }
313
+
314
+ .stuff-viewer-error {
315
+ border: 1px solid var(--color-status-failed, #ff5555);
316
+ border-radius: 6px;
317
+ padding: 12px;
318
+ background: rgba(255, 85, 85, 0.08);
319
+ }
320
+
321
+ .stuff-viewer-error-title {
322
+ color: var(--color-status-failed, #ff5555);
323
+ font-weight: 600;
324
+ font-size: 13px;
325
+ margin-bottom: 4px;
326
+ }
327
+
328
+ .stuff-viewer-error-detail {
329
+ color: var(--sv-text-muted);
330
+ font-family: var(--font-mono, monospace);
331
+ font-size: 12px;
332
+ white-space: pre-wrap;
333
+ word-break: break-word;
334
+ }
@@ -1,4 +1,6 @@
1
1
  /* ─── Graph Toolbar — floating controls over the graph background ─────── */
2
+ /* Token-only styling: theme switching happens by swapping `--surface-*`, */
3
+ /* `--text-*`, `--border-*`, and `--color-accent` values on the container. */
2
4
 
3
5
  .graph-toolbar {
4
6
  position: absolute;
@@ -20,9 +22,9 @@
20
22
  align-items: center;
21
23
  justify-content: center;
22
24
  border-radius: 6px;
23
- background: rgba(17, 17, 24, 0.8);
24
- border: 1px solid rgba(255, 255, 255, 0.1);
25
- color: #cbd5e1;
25
+ background: var(--surface-overlay);
26
+ border: 1px solid var(--border-default);
27
+ color: var(--text-secondary);
26
28
  backdrop-filter: blur(6px);
27
29
  transition:
28
30
  background 0.15s,
@@ -31,45 +33,41 @@
31
33
  }
32
34
 
33
35
  .graph-toolbar-btn:hover {
34
- background: rgba(30, 30, 40, 0.9);
35
- color: #f1f5f9;
36
- border-color: rgba(255, 255, 255, 0.18);
36
+ background: var(--surface-overlay-hover);
37
+ color: var(--text-primary);
38
+ border-color: var(--border-strong);
37
39
  }
38
40
 
39
41
  .graph-toolbar-btn:focus-visible {
40
- outline: 2px solid rgba(59, 130, 246, 0.6);
42
+ outline: 2px solid var(--focus-ring);
41
43
  outline-offset: 1px;
42
44
  }
43
45
 
44
46
  .graph-toolbar-btn--active {
45
- background: #3b82f6;
46
- border-color: #3b82f6;
47
- color: #ffffff;
47
+ background: var(--color-accent);
48
+ border-color: var(--color-accent);
49
+ color: var(--text-on-accent);
48
50
  }
49
51
 
50
52
  .graph-toolbar-btn--active:hover {
51
- background: #2563eb;
52
- border-color: #2563eb;
53
- color: #ffffff;
53
+ background: var(--color-accent);
54
+ border-color: var(--color-accent);
55
+ color: var(--text-on-accent);
56
+ filter: brightness(1.1);
54
57
  }
55
58
 
56
- .graph-toolbar-btn:disabled {
59
+ .graph-toolbar-btn:disabled,
60
+ .graph-toolbar-btn:disabled:hover {
57
61
  opacity: 0.4;
58
62
  cursor: not-allowed;
59
- background: rgba(17, 17, 24, 0.6);
60
- color: #64748b;
61
- border-color: rgba(255, 255, 255, 0.06);
62
- }
63
-
64
- .graph-toolbar-btn:disabled:hover {
65
- background: rgba(17, 17, 24, 0.6);
66
- color: #64748b;
67
- border-color: rgba(255, 255, 255, 0.06);
63
+ background: var(--surface-overlay-disabled);
64
+ color: var(--text-dim);
65
+ border-color: var(--border-subtle);
68
66
  }
69
67
 
70
68
  .graph-toolbar-separator {
71
69
  width: 1px;
72
70
  height: 18px;
73
- background: rgba(255, 255, 255, 0.12);
71
+ background: var(--border-default);
74
72
  margin: 0 2px;
75
73
  }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { A as ARROW_CLOSED_MARKER, p as CONTROLLER_PADDING_BOTTOM, q as CONTROLLER_PADDING_TOP, r as CONTROLLER_PADDING_X, C as ConceptInfo, D as DataflowAnalysis, E as EDGE_TYPE, s as EdgeType, t as FOLD_MODE, u as FieldResolution, F as FoldMode, g as FoldToggleOptions, v as GRAPH_DIRECTION, d as GraphConfig, m as GraphData, e as GraphDirection, a as GraphEdge, b as GraphNode, G as GraphNodeData, c as GraphSpec, w as GraphSpecEdge, x as GraphSpecEdgeKind, i as GraphSpecNode, y as GraphSpecNodeError, z as GraphSpecNodeIo, j as GraphSpecNodeIoItem, B as GraphSpecNodeTiming, L as LabelDescriptor, o as LayoutConfig, N as NODE_TYPE_CONTROLLER, H as NODE_TYPE_PIPE_CARD, I as NODE_TYPE_STUFF, J as NodeKind, K as PipeBatchBlueprint, M as PipeBlueprintBase, l as PipeBlueprintUnion, n as PipeCardPayload, O as PipeComposeBlueprint, Q as PipeComposeConstructBlueprint, R as PipeComposeConstructField, S as PipeConditionBlueprint, f as PipeControllerType, T as PipeExtractBlueprint, U as PipeFuncBlueprint, V as PipeImgGenBlueprint, W as PipeLLMBlueprint, k as PipeOperatorType, X as PipeParallelBlueprint, Y as PipeSearchBlueprint, Z as PipeSequenceBlueprint, P as PipeStatus, h as PipeType, _ as STUFF_ID_PREFIX, $ as StuffRole, a0 as StuffSpecInfo, a1 as SubPipeSpec, a2 as TemplateBlueprint, a3 as isStuffNodeId, a4 as nodeHeight, a5 as nodeWidth, a6 as stuffDigestFromId, a7 as stuffNodeId } from './types-C7rr1Egj.js';
2
- export { ControllerRect, DEFAULT_GRAPH_CONFIG, ElkPositionResult, LayoutResult, MAX_VISIBLE_CONTROLLER_CHILDREN, applyControllers, applyFolds, buildChildToControllerMap, buildContainmentChain, buildControllerNodes, buildDataflowAnalysis, buildDataflowGraph, buildElkGraph, buildGraph, buildPipeCardPayload, estimateNodeDimensions, extractAbsolutePositions, findCousinControllers, getConceptInfo, getLayoutedElements, getPaletteColors, getPipeBlueprint, inputPortId, outermostFoldedAncestor, outputPortId, resolveConceptRef } from './graph/index.js';
1
+ export { A as ARROW_CLOSED_MARKER, r as CONTROLLER_PADDING_BOTTOM, s as CONTROLLER_PADDING_TOP, t as CONTROLLER_PADDING_X, C as ConceptInfo, D as DataflowAnalysis, E as EDGE_TYPE, u as EdgeType, v as FOLD_MODE, w as FieldResolution, F as FoldMode, h as FoldToggleOptions, x as GRAPH_DIRECTION, y as GRAPH_THEME, d as GraphConfig, o as GraphData, e as GraphDirection, a as GraphEdge, b as GraphNode, G as GraphNodeData, c as GraphSpec, z as GraphSpecEdge, B as GraphSpecEdgeKind, j as GraphSpecNode, H as GraphSpecNodeError, I as GraphSpecNodeIo, k as GraphSpecNodeIoItem, J as GraphSpecNodeTiming, f as GraphTheme, K as KNOWN_PIPE_TYPES, L as LabelDescriptor, q as LayoutConfig, N as NODE_TYPE_CONTROLLER, M as NODE_TYPE_PIPE_CARD, O as NODE_TYPE_STUFF, Q as NodeKind, R as PipeBatchBlueprint, S as PipeBlueprintBase, n as PipeBlueprintUnion, m as PipeCallNode, p as PipeCardPayload, T as PipeComposeBlueprint, U as PipeComposeConstructBlueprint, V as PipeComposeConstructField, W as PipeConditionBlueprint, g as PipeControllerType, X as PipeExtractBlueprint, Y as PipeFuncBlueprint, Z as PipeImgGenBlueprint, _ as PipeLLMBlueprint, l as PipeOperatorType, $ as PipeParallelBlueprint, a0 as PipeSearchBlueprint, a1 as PipeSequenceBlueprint, P as PipeStatus, i as PipeType, a2 as STUFF_ID_PREFIX, a3 as StuffRole, a4 as StuffSpecInfo, a5 as SubPipeSpec, a6 as TemplateBlueprint, a7 as isStuffNodeId, a8 as nodeHeight, a9 as nodeWidth, aa as stuffDigestFromId, ab as stuffNodeId } from './types-DJTrDxjV.js';
2
+ export { ControllerRect, DARK_PALETTE_COLORS, DEFAULT_GRAPH_CONFIG, ElkPositionResult, GraphSpecValidationError, LIGHT_PALETTE_COLORS, LayoutResult, MAX_VISIBLE_CONTROLLER_CHILDREN, applyControllers, applyFolds, asPipeCallNode, buildChildToControllerMap, buildContainmentChain, buildControllerNodes, buildDataflowAnalysis, buildDataflowGraph, buildElkGraph, buildGraph, buildPipeCardPayload, estimateNodeDimensions, extractAbsolutePositions, findCousinControllers, getConceptInfo, getLayoutedElements, getPaletteColors, getPaletteForTheme, getPipeBlueprint, inputPortId, outermostFoldedAncestor, outputPortId, resolveConceptRef, validateGraphSpec } from './graph/index.js';
3
3
  import 'elkjs/lib/elk-api';
package/dist/index.js CHANGED
@@ -1,13 +1,18 @@
1
- import "./chunk-IZ4FH2WM.js";
1
+ import "./chunk-L24K3TZU.js";
2
2
  import {
3
3
  ARROW_CLOSED_MARKER,
4
4
  CONTROLLER_PADDING_BOTTOM,
5
5
  CONTROLLER_PADDING_TOP,
6
6
  CONTROLLER_PADDING_X,
7
+ DARK_PALETTE_COLORS,
7
8
  DEFAULT_GRAPH_CONFIG,
8
9
  EDGE_TYPE,
9
10
  FOLD_MODE,
10
11
  GRAPH_DIRECTION,
12
+ GRAPH_THEME,
13
+ GraphSpecValidationError,
14
+ KNOWN_PIPE_TYPES,
15
+ LIGHT_PALETTE_COLORS,
11
16
  MAX_VISIBLE_CONTROLLER_CHILDREN,
12
17
  NODE_TYPE_CONTROLLER,
13
18
  NODE_TYPE_PIPE_CARD,
@@ -15,6 +20,7 @@ import {
15
20
  STUFF_ID_PREFIX,
16
21
  applyControllers,
17
22
  applyFolds,
23
+ asPipeCallNode,
18
24
  buildChildToControllerMap,
19
25
  buildContainmentChain,
20
26
  buildControllerNodes,
@@ -29,6 +35,7 @@ import {
29
35
  getConceptInfo,
30
36
  getLayoutedElements,
31
37
  getPaletteColors,
38
+ getPaletteForTheme,
32
39
  getPipeBlueprint,
33
40
  inputPortId,
34
41
  isStuffNodeId,
@@ -38,18 +45,24 @@ import {
38
45
  outputPortId,
39
46
  resolveConceptRef,
40
47
  stuffDigestFromId,
41
- stuffNodeId
42
- } from "./chunk-FHRUYFGV.js";
48
+ stuffNodeId,
49
+ validateGraphSpec
50
+ } from "./chunk-ILX53OYM.js";
43
51
  import "./chunk-2NMEKWO5.js";
44
52
  export {
45
53
  ARROW_CLOSED_MARKER,
46
54
  CONTROLLER_PADDING_BOTTOM,
47
55
  CONTROLLER_PADDING_TOP,
48
56
  CONTROLLER_PADDING_X,
57
+ DARK_PALETTE_COLORS,
49
58
  DEFAULT_GRAPH_CONFIG,
50
59
  EDGE_TYPE,
51
60
  FOLD_MODE,
52
61
  GRAPH_DIRECTION,
62
+ GRAPH_THEME,
63
+ GraphSpecValidationError,
64
+ KNOWN_PIPE_TYPES,
65
+ LIGHT_PALETTE_COLORS,
53
66
  MAX_VISIBLE_CONTROLLER_CHILDREN,
54
67
  NODE_TYPE_CONTROLLER,
55
68
  NODE_TYPE_PIPE_CARD,
@@ -57,6 +70,7 @@ export {
57
70
  STUFF_ID_PREFIX,
58
71
  applyControllers,
59
72
  applyFolds,
73
+ asPipeCallNode,
60
74
  buildChildToControllerMap,
61
75
  buildContainmentChain,
62
76
  buildControllerNodes,
@@ -71,6 +85,7 @@ export {
71
85
  getConceptInfo,
72
86
  getLayoutedElements,
73
87
  getPaletteColors,
88
+ getPaletteForTheme,
74
89
  getPipeBlueprint,
75
90
  inputPortId,
76
91
  isStuffNodeId,
@@ -80,6 +95,7 @@ export {
80
95
  outputPortId,
81
96
  resolveConceptRef,
82
97
  stuffDigestFromId,
83
- stuffNodeId
98
+ stuffNodeId,
99
+ validateGraphSpec
84
100
  };
85
101
  //# sourceMappingURL=index.js.map