@pipelex/mthds-ui 0.36.0 → 0.38.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.
- package/README.md +12 -1
- package/dist/form/brand/index.d.ts +1 -0
- package/dist/form/brand/index.js +3 -0
- package/dist/form/brand/index.js.map +1 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/form/react/RunPanel.css +12 -0
- package/dist/form/react/index.d.ts +57 -6
- package/dist/form/react/index.js +64 -8
- package/dist/form/react/index.js.map +1 -1
- package/dist/graph/react/graph-core.css +80 -0
- package/dist/graph/react/index.d.ts +15 -0
- package/dist/graph/react/index.js +604 -417
- package/dist/graph/react/index.js.map +1 -1
- package/dist/standalone/graph-standalone.html +232 -152
- package/dist/standalone/graph-viewer.css +81 -1
- package/dist/standalone/graph-viewer.js +150 -150
- package/dist/timeline/react/index.js +3 -3
- package/package.json +6 -2
|
@@ -118,6 +118,86 @@
|
|
|
118
118
|
background: transparent;
|
|
119
119
|
pointer-events: none;
|
|
120
120
|
}
|
|
121
|
+
/* The error state (`GraphErrorState`), drawn in place of the graph when the
|
|
122
|
+
viewer cannot draw the spec it was given. It fills the canvas's area, centred,
|
|
123
|
+
and scrolls when its message does not fit. In the still presentation it flows
|
|
124
|
+
at the height of its message, and takes the pointer, so its text can be
|
|
125
|
+
selected and copied. Colours come from the tokens alone, so the theme and a
|
|
126
|
+
host's `paletteColors` reach it. */
|
|
127
|
+
.react-flow-container--failed {
|
|
128
|
+
/* Centred by the message's auto margins rather than by alignment, which would
|
|
129
|
+
push the top of a message taller than the area out of reach of the scroll. */
|
|
130
|
+
display: flex;
|
|
131
|
+
box-sizing: border-box;
|
|
132
|
+
padding: 16px;
|
|
133
|
+
overflow: auto;
|
|
134
|
+
font-family: var(--font-sans);
|
|
135
|
+
}
|
|
136
|
+
.react-flow-container--failed.react-flow-container--still {
|
|
137
|
+
pointer-events: auto;
|
|
138
|
+
}
|
|
139
|
+
.graph-error-state {
|
|
140
|
+
box-sizing: border-box;
|
|
141
|
+
width: 100%;
|
|
142
|
+
max-width: 560px;
|
|
143
|
+
margin: auto;
|
|
144
|
+
padding: 12px 14px;
|
|
145
|
+
border: 1px solid var(--color-error-border);
|
|
146
|
+
border-left: 3px solid var(--color-error);
|
|
147
|
+
border-radius: 6px;
|
|
148
|
+
background: var(--color-error-bg);
|
|
149
|
+
color: var(--text-default);
|
|
150
|
+
font-size: 13px;
|
|
151
|
+
line-height: 1.5;
|
|
152
|
+
}
|
|
153
|
+
.graph-error-state-title {
|
|
154
|
+
margin: 0 0 4px;
|
|
155
|
+
font-weight: 600;
|
|
156
|
+
color: var(--text-primary);
|
|
157
|
+
}
|
|
158
|
+
.graph-error-state-detail {
|
|
159
|
+
margin: 0;
|
|
160
|
+
font-family: var(--font-mono);
|
|
161
|
+
font-size: 12px;
|
|
162
|
+
color: var(--text-secondary);
|
|
163
|
+
white-space: pre-wrap;
|
|
164
|
+
overflow-wrap: anywhere;
|
|
165
|
+
}
|
|
166
|
+
.graph-error-state-hint {
|
|
167
|
+
margin: 8px 0 0;
|
|
168
|
+
color: var(--text-secondary);
|
|
169
|
+
}
|
|
170
|
+
/* A relayout's failure (`GraphRelayoutFailure`): a spec already drawn that a
|
|
171
|
+
change of direction, folds or style failed to redraw. The alert floats over
|
|
172
|
+
the flow, inside it and beneath the toolbar's panel (z-index 11), so the
|
|
173
|
+
toolbar stays on top and usable. The layer lets the pointer through to the
|
|
174
|
+
drawing beneath, which is dimmed: it is the view the reader changed from,
|
|
175
|
+
not the one they asked for. */
|
|
176
|
+
.react-flow-container--relayout-failed .react-flow__renderer {
|
|
177
|
+
opacity: 0.35;
|
|
178
|
+
}
|
|
179
|
+
.graph-relayout-failure {
|
|
180
|
+
position: absolute;
|
|
181
|
+
inset: 0;
|
|
182
|
+
z-index: 6;
|
|
183
|
+
display: flex;
|
|
184
|
+
box-sizing: border-box;
|
|
185
|
+
padding: 16px;
|
|
186
|
+
overflow: hidden;
|
|
187
|
+
pointer-events: none;
|
|
188
|
+
font-family: var(--font-sans);
|
|
189
|
+
}
|
|
190
|
+
.graph-error-state--floating {
|
|
191
|
+
max-height: 100%;
|
|
192
|
+
overflow: auto;
|
|
193
|
+
pointer-events: auto;
|
|
194
|
+
/* The error tint laid over the opaque panel surface, so the drawing beneath
|
|
195
|
+
never shows through the text. */
|
|
196
|
+
background:
|
|
197
|
+
linear-gradient(var(--color-error-bg), var(--color-error-bg)),
|
|
198
|
+
var(--surface-panel);
|
|
199
|
+
box-shadow: var(--shadow-md);
|
|
200
|
+
}
|
|
121
201
|
.react-flow__node {
|
|
122
202
|
font-family: var(--font-sans);
|
|
123
203
|
cursor: pointer;
|
|
@@ -110,6 +110,11 @@ interface GraphViewerProps {
|
|
|
110
110
|
* all four from ONE source: a run's results, or a method's validate report
|
|
111
111
|
* beside the dry or static graph of that same method. `null` draws nothing.
|
|
112
112
|
*
|
|
113
|
+
* A spec `validateGraphSpec` refuses, or one the viewer otherwise fails to
|
|
114
|
+
* draw, draws an error state in place of the graph, naming what was refused,
|
|
115
|
+
* and is never thrown out of render: the host's page stays up. The next spec
|
|
116
|
+
* the host passes is drawn afresh.
|
|
117
|
+
*
|
|
113
118
|
* One object rather than a spec prop and three descriptor props, because the
|
|
114
119
|
* detail panel looks a data node's descriptor up by the `pipe_ref` of the pipe
|
|
115
120
|
* that produced it IN THIS GRAPH. A graph paired with another source's
|
|
@@ -292,6 +297,16 @@ interface GraphViewerProps {
|
|
|
292
297
|
}
|
|
293
298
|
/** Apply Layer 2 execution state overrides to rendered nodes. */
|
|
294
299
|
declare function applyStatusOverrides(nodes: AppNode[], statusMap: Record<string, PipeStatus> | undefined): AppNode[];
|
|
300
|
+
/**
|
|
301
|
+
* The viewer. A spec `validateGraphSpec` refuses is drawn as an error state by
|
|
302
|
+
* the canvas itself, which reads the spec as a value (`readGraphSpec`); anything
|
|
303
|
+
* else the canvas throws or reports is caught by the boundary around it, which
|
|
304
|
+
* draws the same error state, so no failure of the graph unmounts the host's
|
|
305
|
+
* tree. A new spec clears either. A layout that fails to redraw a spec already
|
|
306
|
+
* drawn, after a change of direction, folds or style, reaches neither: the
|
|
307
|
+
* canvas draws it over the flow and keeps the toolbar, so the reader can change
|
|
308
|
+
* the view back (`routeLayoutFailure`).
|
|
309
|
+
*/
|
|
295
310
|
declare function GraphViewer(props: GraphViewerProps): react_jsx_runtime.JSX.Element;
|
|
296
311
|
|
|
297
312
|
declare function renderLabel(desc: LabelDescriptor): React.ReactNode;
|