@pipelex/mthds-ui 0.12.0 → 0.14.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.
@@ -86,3 +86,204 @@
86
86
  background: var(--border-default);
87
87
  margin: 0 2px;
88
88
  }
89
+
90
+ /* ─── Validation widget ─────────────────────────────────────────────────── */
91
+ /* Lives in GraphToolbar.css on purpose: the VS Code extension copies exactly
92
+ this stylesheet into its webview, so a separate file would need host build
93
+ changes for no benefit. */
94
+
95
+ .graph-toolbar-validation {
96
+ position: relative;
97
+ display: inline-flex;
98
+ }
99
+
100
+ .graph-toolbar-validation-btn {
101
+ position: relative;
102
+ }
103
+
104
+ .graph-toolbar-validation-btn--valid,
105
+ .graph-toolbar-validation-btn--valid:hover {
106
+ color: var(--color-success);
107
+ }
108
+
109
+ .graph-toolbar-validation-btn--invalid,
110
+ .graph-toolbar-validation-btn--invalid:hover {
111
+ color: var(--color-error);
112
+ }
113
+
114
+ .graph-toolbar-validation-btn--error,
115
+ .graph-toolbar-validation-btn--error:hover {
116
+ color: var(--color-warning);
117
+ }
118
+
119
+ .graph-toolbar-validation-spin {
120
+ animation: graph-toolbar-validation-rotate 1s linear infinite;
121
+ }
122
+
123
+ @keyframes graph-toolbar-validation-rotate {
124
+ to {
125
+ transform: rotate(360deg);
126
+ }
127
+ }
128
+
129
+ .graph-toolbar-validation-badge {
130
+ position: absolute;
131
+ top: -5px;
132
+ right: -5px;
133
+ min-width: 14px;
134
+ height: 14px;
135
+ padding: 0 3px;
136
+ box-sizing: border-box;
137
+ border-radius: 7px;
138
+ background: var(--color-error);
139
+ color: var(--text-on-accent);
140
+ font-family: var(--font-sans);
141
+ font-size: 9px;
142
+ line-height: 14px;
143
+ font-weight: 600;
144
+ text-align: center;
145
+ pointer-events: none;
146
+ }
147
+
148
+ .graph-toolbar-validation-btn--valid .graph-toolbar-validation-badge,
149
+ .graph-toolbar-validation-btn--error .graph-toolbar-validation-badge {
150
+ background: var(--color-warning);
151
+ }
152
+
153
+ /* ─── Validation dropdown panel ─────────────────────────────────────────── */
154
+
155
+ .graph-validation-panel {
156
+ position: absolute;
157
+ z-index: 12;
158
+ /* Viewport clamp: narrow webviews (VS Code panels) can be under 260px wide. */
159
+ min-width: min(260px, calc(100vw - 24px));
160
+ max-width: min(360px, calc(100vw - 24px));
161
+ max-height: 320px;
162
+ overflow-y: auto;
163
+ padding: 6px;
164
+ border-radius: 8px;
165
+ background: var(--surface-overlay);
166
+ border: 1px solid var(--border-default);
167
+ box-shadow: var(--shadow-md);
168
+ backdrop-filter: blur(6px);
169
+ pointer-events: auto;
170
+ font-family: var(--font-sans);
171
+ cursor: default;
172
+ }
173
+
174
+ /* Placement relative to the widget button — always unfolds toward the graph. */
175
+ .graph-validation-panel--down-start {
176
+ top: calc(100% + 6px);
177
+ left: 0;
178
+ }
179
+ .graph-validation-panel--down-end {
180
+ top: calc(100% + 6px);
181
+ right: 0;
182
+ }
183
+ .graph-validation-panel--up-start {
184
+ bottom: calc(100% + 6px);
185
+ left: 0;
186
+ }
187
+ .graph-validation-panel--up-end {
188
+ bottom: calc(100% + 6px);
189
+ right: 0;
190
+ }
191
+ .graph-validation-panel--side-end {
192
+ left: calc(100% + 6px);
193
+ top: 0;
194
+ }
195
+ .graph-validation-panel--side-start {
196
+ right: calc(100% + 6px);
197
+ top: 0;
198
+ }
199
+
200
+ .graph-validation-panel-header {
201
+ padding: 4px 6px 6px;
202
+ font-size: 11px;
203
+ font-weight: 600;
204
+ color: var(--text-secondary);
205
+ }
206
+
207
+ .graph-validation-empty {
208
+ padding: 2px 6px 6px;
209
+ font-size: 12px;
210
+ color: var(--text-secondary);
211
+ }
212
+
213
+ .graph-validation-issues {
214
+ list-style: none;
215
+ margin: 0;
216
+ padding: 0;
217
+ display: flex;
218
+ flex-direction: column;
219
+ gap: 4px;
220
+ }
221
+
222
+ .graph-validation-issue {
223
+ padding: 6px 8px;
224
+ border-radius: 6px;
225
+ border-left: 3px solid var(--color-error);
226
+ background: var(--color-error-bg);
227
+ font-size: 12px;
228
+ color: var(--text-primary);
229
+ }
230
+
231
+ /* The focusable/clickable element inside each <li> (keeps listitem semantics). */
232
+ .graph-validation-issue-body {
233
+ display: flex;
234
+ flex-direction: column;
235
+ gap: 2px;
236
+ }
237
+
238
+ .graph-validation-issue--warning {
239
+ border-left-color: var(--color-warning);
240
+ background: var(--surface-sunken);
241
+ }
242
+
243
+ .graph-validation-issue--clickable {
244
+ cursor: pointer;
245
+ }
246
+
247
+ .graph-validation-issue--clickable:hover {
248
+ filter: brightness(1.1);
249
+ }
250
+
251
+ .graph-validation-issue-body:focus-visible {
252
+ outline: 2px solid var(--focus-ring);
253
+ outline-offset: 1px;
254
+ border-radius: 4px;
255
+ }
256
+
257
+ .graph-validation-issue-meta {
258
+ display: flex;
259
+ align-items: baseline;
260
+ gap: 6px;
261
+ flex-wrap: wrap;
262
+ }
263
+
264
+ .graph-validation-issue-context {
265
+ font-family: var(--font-mono);
266
+ font-size: 11px;
267
+ font-weight: 600;
268
+ color: var(--text-secondary);
269
+ }
270
+
271
+ .graph-validation-issue-file {
272
+ font-size: 10px;
273
+ color: var(--text-dim);
274
+ }
275
+
276
+ .graph-validation-issue-message {
277
+ white-space: pre-wrap;
278
+ overflow-wrap: anywhere;
279
+ }
280
+
281
+ .graph-validation-issue-fix {
282
+ font-size: 11px;
283
+ color: var(--text-secondary);
284
+ }
285
+
286
+ .graph-validation-issue-fix::before {
287
+ content: "Fix: ";
288
+ font-weight: 600;
289
+ }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { A as ARROW_CLOSED_MARKER, s as CONTROLLER_PADDING_BOTTOM, t as CONTROLLER_PADDING_TOP, u as CONTROLLER_PADDING_X, C as ConceptInfo, D as DataflowAnalysis, E as EDGE_TYPE, v as EdgeType, w as FOLD_MODE, x as FieldResolution, F as FoldMode, i as FoldToggleOptions, y as GRAPH_DIRECTION, z as GRAPH_THEME, B as GRAPH_THEME_MODE, d as GraphConfig, p as GraphData, e as GraphDirection, a as GraphEdge, b as GraphNode, G as GraphNodeData, c as GraphSpec, H as GraphSpecEdge, I as GraphSpecEdgeKind, k as GraphSpecNode, J as GraphSpecNodeError, K as GraphSpecNodeIo, l as GraphSpecNodeIoItem, M as GraphSpecNodeTiming, g as GraphTheme, f as GraphThemeMode, N as KNOWN_PIPE_TYPES, L as LabelDescriptor, r as LayoutConfig, O as NODE_TYPE_CONTROLLER, Q as NODE_TYPE_PIPE_CARD, R as NODE_TYPE_STUFF, S as NodeKind, U as PipeBatchBlueprint, V as PipeBlueprintBase, o as PipeBlueprintUnion, n as PipeCallNode, q as PipeCardPayload, W as PipeComposeBlueprint, X as PipeComposeConstructBlueprint, Y as PipeComposeConstructField, Z as PipeConditionBlueprint, h as PipeControllerType, _ as PipeExtractBlueprint, $ as PipeFuncBlueprint, a0 as PipeImgGenBlueprint, a1 as PipeLLMBlueprint, m as PipeOperatorType, a2 as PipeParallelBlueprint, a3 as PipeSearchBlueprint, a4 as PipeSequenceBlueprint, a5 as PipeSignatureBlueprint, P as PipeStatus, a6 as PipeStructureBlueprint, j as PipeType, a7 as STUFF_ID_PREFIX, a8 as StuffRole, a9 as StuffSpecInfo, aa as SubPipeSpec, ab as TOOLBAR_POSITION, ac as TemplateBlueprint, ad as ToolbarOrientation, T as ToolbarPosition, ae as ToolbarSide, af as isStuffNodeId, ag as nodeHeight, ah as nodeWidth, ai as stuffDigestFromId, aj as stuffNodeId, ak as toolbarOrientation, al as toolbarSide } from './types-B3nefYpV.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';
1
+ export { A as ARROW_CLOSED_MARKER, u as CONTROLLER_PADDING_BOTTOM, v as CONTROLLER_PADDING_TOP, w as CONTROLLER_PADDING_X, C as ConceptInfo, D as DataflowAnalysis, E as EDGE_TYPE, x as EdgeType, y as FOLD_MODE, z as FieldResolution, F as FoldMode, k as FoldToggleOptions, B as GRAPH_DIRECTION, H as GRAPH_SPEC_MODE, I as GRAPH_THEME, J as GRAPH_THEME_MODE, d as GraphConfig, r as GraphData, e as GraphDirection, b as GraphEdge, c as GraphNode, a as GraphNodeData, G as GraphSpec, K as GraphSpecEdge, M as GraphSpecEdgeKind, O as GraphSpecMeta, m as GraphSpecMode, n as GraphSpecNode, Q as GraphSpecNodeError, R as GraphSpecNodeIo, o as GraphSpecNodeIoItem, S as GraphSpecNodeTiming, g as GraphTheme, f as GraphThemeMode, U as KNOWN_PIPE_TYPES, L as LabelDescriptor, t as LayoutConfig, W as NODE_TYPE_CONTROLLER, X as NODE_TYPE_PIPE_CARD, Y as NODE_TYPE_STUFF, Z as NodeKind, N as NodeValidationSummary, _ as PipeBatchBlueprint, $ as PipeBlueprintBase, P as PipeBlueprintUnion, q as PipeCallNode, s as PipeCardPayload, a0 as PipeComposeBlueprint, a1 as PipeComposeConstructBlueprint, a2 as PipeComposeConstructField, a3 as PipeConditionBlueprint, j as PipeControllerType, a4 as PipeExtractBlueprint, a5 as PipeFuncBlueprint, a6 as PipeImgGenBlueprint, a7 as PipeLLMBlueprint, p as PipeOperatorType, a8 as PipeParallelBlueprint, a9 as PipeSearchBlueprint, aa as PipeSequenceBlueprint, ab as PipeSignatureBlueprint, h as PipeStatus, ac as PipeStructureBlueprint, l as PipeType, ad as STUFF_ID_PREFIX, ae as StuffRole, af as StuffSpecInfo, ag as SubPipeSpec, ah as TOOLBAR_POSITION, ai as TemplateBlueprint, aj as ToolbarOrientation, T as ToolbarPosition, ak as ToolbarSide, al as VALIDATION_STATE, V as ValidationIssue, i as ValidationState, am as graphSpecMode, an as isDryGraphSpec, ao as isStaticGraphSpec, ap as isStuffNodeId, aq as nodeHeight, ar as nodeWidth, as as stuffDigestFromId, at as stuffNodeId, au as toolbarOrientation, av as toolbarSide } from './types-CIH1Ae16.js';
2
+ export { ControllerRect, DARK_PALETTE_COLORS, DEFAULT_GRAPH_CONFIG, ElkPositionResult, GraphSpecValidationError, LIGHT_PALETTE_COLORS, LayoutResult, MAX_VISIBLE_CONTROLLER_CHILDREN, applyControllers, applyFolds, applyValidationDecorations, asPipeCallNode, buildChildToControllerMap, buildContainmentChain, buildControllerNodes, buildDataflowAnalysis, buildDataflowGraph, buildElkGraph, buildGraph, buildPipeCardPayload, buildValidationDecorations, estimateNodeDimensions, extractAbsolutePositions, findCousinControllers, getConceptInfo, getLayoutedElements, getPaletteColors, getPaletteForTheme, getPipeBlueprint, inputPortId, outermostFoldedAncestor, outputPortId, resolveConceptRef, resolveIssueTargetNodeId, validateGraphSpec } from './graph/index.js';
3
3
  import 'elkjs/lib/elk-api';
package/dist/index.js CHANGED
@@ -1,27 +1,13 @@
1
- import "./chunk-L24K3TZU.js";
1
+ import "./chunk-LJQS5ZNA.js";
2
2
  import {
3
- ARROW_CLOSED_MARKER,
4
- CONTROLLER_PADDING_BOTTOM,
5
- CONTROLLER_PADDING_TOP,
6
- CONTROLLER_PADDING_X,
7
3
  DARK_PALETTE_COLORS,
8
4
  DEFAULT_GRAPH_CONFIG,
9
- EDGE_TYPE,
10
- FOLD_MODE,
11
- GRAPH_DIRECTION,
12
- GRAPH_THEME,
13
- GRAPH_THEME_MODE,
14
5
  GraphSpecValidationError,
15
- KNOWN_PIPE_TYPES,
16
6
  LIGHT_PALETTE_COLORS,
17
7
  MAX_VISIBLE_CONTROLLER_CHILDREN,
18
- NODE_TYPE_CONTROLLER,
19
- NODE_TYPE_PIPE_CARD,
20
- NODE_TYPE_STUFF,
21
- STUFF_ID_PREFIX,
22
- TOOLBAR_POSITION,
23
8
  applyControllers,
24
9
  applyFolds,
10
+ applyValidationDecorations,
25
11
  asPipeCallNode,
26
12
  buildChildToControllerMap,
27
13
  buildContainmentChain,
@@ -31,6 +17,7 @@ import {
31
17
  buildElkGraph,
32
18
  buildGraph,
33
19
  buildPipeCardPayload,
20
+ buildValidationDecorations,
34
21
  estimateNodeDimensions,
35
22
  extractAbsolutePositions,
36
23
  findCousinControllers,
@@ -40,18 +27,41 @@ import {
40
27
  getPaletteForTheme,
41
28
  getPipeBlueprint,
42
29
  inputPortId,
43
- isStuffNodeId,
44
- nodeHeight,
45
- nodeWidth,
46
30
  outermostFoldedAncestor,
47
31
  outputPortId,
48
32
  resolveConceptRef,
33
+ resolveIssueTargetNodeId,
34
+ validateGraphSpec
35
+ } from "./chunk-V4FKGLKA.js";
36
+ import {
37
+ ARROW_CLOSED_MARKER,
38
+ CONTROLLER_PADDING_BOTTOM,
39
+ CONTROLLER_PADDING_TOP,
40
+ CONTROLLER_PADDING_X,
41
+ EDGE_TYPE,
42
+ FOLD_MODE,
43
+ GRAPH_DIRECTION,
44
+ GRAPH_SPEC_MODE,
45
+ GRAPH_THEME,
46
+ GRAPH_THEME_MODE,
47
+ KNOWN_PIPE_TYPES,
48
+ NODE_TYPE_CONTROLLER,
49
+ NODE_TYPE_PIPE_CARD,
50
+ NODE_TYPE_STUFF,
51
+ STUFF_ID_PREFIX,
52
+ TOOLBAR_POSITION,
53
+ VALIDATION_STATE,
54
+ graphSpecMode,
55
+ isDryGraphSpec,
56
+ isStaticGraphSpec,
57
+ isStuffNodeId,
58
+ nodeHeight,
59
+ nodeWidth,
49
60
  stuffDigestFromId,
50
61
  stuffNodeId,
51
62
  toolbarOrientation,
52
- toolbarSide,
53
- validateGraphSpec
54
- } from "./chunk-R34J4GFM.js";
63
+ toolbarSide
64
+ } from "./chunk-GS2KODND.js";
55
65
  import "./chunk-2NMEKWO5.js";
56
66
  export {
57
67
  ARROW_CLOSED_MARKER,
@@ -63,6 +73,7 @@ export {
63
73
  EDGE_TYPE,
64
74
  FOLD_MODE,
65
75
  GRAPH_DIRECTION,
76
+ GRAPH_SPEC_MODE,
66
77
  GRAPH_THEME,
67
78
  GRAPH_THEME_MODE,
68
79
  GraphSpecValidationError,
@@ -74,8 +85,10 @@ export {
74
85
  NODE_TYPE_STUFF,
75
86
  STUFF_ID_PREFIX,
76
87
  TOOLBAR_POSITION,
88
+ VALIDATION_STATE,
77
89
  applyControllers,
78
90
  applyFolds,
91
+ applyValidationDecorations,
79
92
  asPipeCallNode,
80
93
  buildChildToControllerMap,
81
94
  buildContainmentChain,
@@ -85,6 +98,7 @@ export {
85
98
  buildElkGraph,
86
99
  buildGraph,
87
100
  buildPipeCardPayload,
101
+ buildValidationDecorations,
88
102
  estimateNodeDimensions,
89
103
  extractAbsolutePositions,
90
104
  findCousinControllers,
@@ -93,13 +107,17 @@ export {
93
107
  getPaletteColors,
94
108
  getPaletteForTheme,
95
109
  getPipeBlueprint,
110
+ graphSpecMode,
96
111
  inputPortId,
112
+ isDryGraphSpec,
113
+ isStaticGraphSpec,
97
114
  isStuffNodeId,
98
115
  nodeHeight,
99
116
  nodeWidth,
100
117
  outermostFoldedAncestor,
101
118
  outputPortId,
102
119
  resolveConceptRef,
120
+ resolveIssueTargetNodeId,
103
121
  stuffDigestFromId,
104
122
  stuffNodeId,
105
123
  toolbarOrientation,