@pipelex/mthds-ui 0.11.0 → 0.13.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.
@@ -210,6 +210,18 @@
210
210
  margin: 0;
211
211
  }
212
212
 
213
+ /* Native `Html` concept — rendered in a sandboxed iframe so the document's own
214
+ <style>/layout is faithful and isolated from the host. White backdrop because
215
+ these documents (invoices, quotes, reports) are authored for print/light. */
216
+ .stuff-viewer-html-frame {
217
+ width: 100%;
218
+ height: 100%;
219
+ min-height: 480px;
220
+ border: none;
221
+ border-radius: var(--sv-radius);
222
+ background: #fff;
223
+ }
224
+
213
225
  /* PDF embed */
214
226
  .stuff-viewer-pdf {
215
227
  min-height: 400px;
@@ -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';
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, N as GraphSpecMeta, m as GraphSpecMode, n as GraphSpecNode, O as GraphSpecNodeError, Q as GraphSpecNodeIo, o as GraphSpecNodeIoItem, R as GraphSpecNodeTiming, g as GraphTheme, f as GraphThemeMode, S as KNOWN_PIPE_TYPES, L as LabelDescriptor, t as LayoutConfig, U as NODE_TYPE_CONTROLLER, W as NODE_TYPE_PIPE_CARD, X as NODE_TYPE_STUFF, Y as NodeKind, Z as PipeBatchBlueprint, _ as PipeBlueprintBase, P as PipeBlueprintUnion, q as PipeCallNode, s as PipeCardPayload, $ as PipeComposeBlueprint, a0 as PipeComposeConstructBlueprint, a1 as PipeComposeConstructField, a2 as PipeConditionBlueprint, j as PipeControllerType, a3 as PipeExtractBlueprint, a4 as PipeFuncBlueprint, a5 as PipeImgGenBlueprint, a6 as PipeLLMBlueprint, p as PipeOperatorType, a7 as PipeParallelBlueprint, a8 as PipeSearchBlueprint, a9 as PipeSequenceBlueprint, aa as PipeSignatureBlueprint, h as PipeStatus, ab as PipeStructureBlueprint, l as PipeType, ac as STUFF_ID_PREFIX, ad as StuffRole, ae as StuffSpecInfo, af as SubPipeSpec, ag as TOOLBAR_POSITION, ah as TemplateBlueprint, ai as ToolbarOrientation, T as ToolbarPosition, aj as ToolbarSide, ak as VALIDATION_STATE, V as ValidationIssue, i as ValidationState, al as graphSpecMode, am as isDryGraphSpec, an as isStaticGraphSpec, ao as isStuffNodeId, ap as nodeHeight, aq as nodeWidth, ar as stuffDigestFromId, as as stuffNodeId, at as toolbarOrientation, au as toolbarSide } from './types-Cm4147S5.js';
2
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,25 +1,10 @@
1
1
  import "./chunk-L24K3TZU.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,
25
10
  asPipeCallNode,
@@ -40,18 +25,40 @@ import {
40
25
  getPaletteForTheme,
41
26
  getPipeBlueprint,
42
27
  inputPortId,
43
- isStuffNodeId,
44
- nodeHeight,
45
- nodeWidth,
46
28
  outermostFoldedAncestor,
47
29
  outputPortId,
48
30
  resolveConceptRef,
31
+ validateGraphSpec
32
+ } from "./chunk-XCZLRCEJ.js";
33
+ import {
34
+ ARROW_CLOSED_MARKER,
35
+ CONTROLLER_PADDING_BOTTOM,
36
+ CONTROLLER_PADDING_TOP,
37
+ CONTROLLER_PADDING_X,
38
+ EDGE_TYPE,
39
+ FOLD_MODE,
40
+ GRAPH_DIRECTION,
41
+ GRAPH_SPEC_MODE,
42
+ GRAPH_THEME,
43
+ GRAPH_THEME_MODE,
44
+ KNOWN_PIPE_TYPES,
45
+ NODE_TYPE_CONTROLLER,
46
+ NODE_TYPE_PIPE_CARD,
47
+ NODE_TYPE_STUFF,
48
+ STUFF_ID_PREFIX,
49
+ TOOLBAR_POSITION,
50
+ VALIDATION_STATE,
51
+ graphSpecMode,
52
+ isDryGraphSpec,
53
+ isStaticGraphSpec,
54
+ isStuffNodeId,
55
+ nodeHeight,
56
+ nodeWidth,
49
57
  stuffDigestFromId,
50
58
  stuffNodeId,
51
59
  toolbarOrientation,
52
- toolbarSide,
53
- validateGraphSpec
54
- } from "./chunk-R34J4GFM.js";
60
+ toolbarSide
61
+ } from "./chunk-IMQ7MVYL.js";
55
62
  import "./chunk-2NMEKWO5.js";
56
63
  export {
57
64
  ARROW_CLOSED_MARKER,
@@ -63,6 +70,7 @@ export {
63
70
  EDGE_TYPE,
64
71
  FOLD_MODE,
65
72
  GRAPH_DIRECTION,
73
+ GRAPH_SPEC_MODE,
66
74
  GRAPH_THEME,
67
75
  GRAPH_THEME_MODE,
68
76
  GraphSpecValidationError,
@@ -74,6 +82,7 @@ export {
74
82
  NODE_TYPE_STUFF,
75
83
  STUFF_ID_PREFIX,
76
84
  TOOLBAR_POSITION,
85
+ VALIDATION_STATE,
77
86
  applyControllers,
78
87
  applyFolds,
79
88
  asPipeCallNode,
@@ -93,7 +102,10 @@ export {
93
102
  getPaletteColors,
94
103
  getPaletteForTheme,
95
104
  getPipeBlueprint,
105
+ graphSpecMode,
96
106
  inputPortId,
107
+ isDryGraphSpec,
108
+ isStaticGraphSpec,
97
109
  isStuffNodeId,
98
110
  nodeHeight,
99
111
  nodeWidth,