@pipelex/mthds-ui 0.27.0 → 0.28.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 +19 -5
- package/dist/{chunk-XBHDA3PQ.js → chunk-7WJYQHYF.js} +2 -2
- package/dist/{chunk-VCO4GZDZ.js → chunk-AE7AA5XC.js} +1 -1
- package/dist/{chunk-VCO4GZDZ.js.map → chunk-AE7AA5XC.js.map} +1 -1
- package/dist/{chunk-K3BWHQVX.js → chunk-I7Z5TTQI.js} +2 -2
- package/dist/form/react/RunPanel.css +1 -3
- package/dist/form/react/index.d.ts +5 -5
- package/dist/form/react/index.js +2 -2
- package/dist/form/react/index.js.map +1 -1
- package/dist/graph/index.d.ts +2 -2
- package/dist/graph/index.js +3 -3
- package/dist/graph/react/index.d.ts +107 -43
- package/dist/graph/react/index.js +37 -24
- package/dist/graph/react/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/standalone/graph-standalone.html +408 -114
- package/dist/standalone/graph-viewer.css +1 -1
- package/dist/standalone/graph-viewer.js +406 -112
- package/dist/static-graph/index.d.ts +1 -1
- package/dist/static-graph/index.js +1 -1
- package/dist/static-graph/index.js.map +1 -1
- package/dist/{types-DgqW3Jg4.d.ts → types-DvhUuMHz.d.ts} +1 -1
- package/package.json +2 -2
- /package/dist/{chunk-XBHDA3PQ.js.map → chunk-7WJYQHYF.js.map} +0 -0
- /package/dist/{chunk-K3BWHQVX.js.map → chunk-I7Z5TTQI.js.map} +0 -0
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
resolveConceptRef,
|
|
15
15
|
resolveIssueTargetNodeId,
|
|
16
16
|
validateGraphSpec
|
|
17
|
-
} from "../../chunk-
|
|
17
|
+
} from "../../chunk-I7Z5TTQI.js";
|
|
18
18
|
import {
|
|
19
19
|
parsePipeRef
|
|
20
20
|
} from "../../chunk-2N65P32H.js";
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_GRAPH_CONFIG,
|
|
23
23
|
getPaletteForTheme
|
|
24
|
-
} from "../../chunk-
|
|
24
|
+
} from "../../chunk-7WJYQHYF.js";
|
|
25
25
|
import {
|
|
26
26
|
EDGE_TYPE,
|
|
27
27
|
FOLD_MODE,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
stuffDigestFromId,
|
|
40
40
|
toolbarOrientation,
|
|
41
41
|
toolbarSide
|
|
42
|
-
} from "../../chunk-
|
|
42
|
+
} from "../../chunk-AE7AA5XC.js";
|
|
43
43
|
import {
|
|
44
44
|
__spreadProps,
|
|
45
45
|
__spreadValues
|
|
@@ -121,7 +121,7 @@ import {
|
|
|
121
121
|
} from "@pipelex/mthds-form/react";
|
|
122
122
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
123
123
|
function StuffResultPanel({
|
|
124
|
-
|
|
124
|
+
pipeIoContracts,
|
|
125
125
|
outputForm,
|
|
126
126
|
inputForm,
|
|
127
127
|
stuff,
|
|
@@ -135,9 +135,9 @@ function StuffResultPanel({
|
|
|
135
135
|
const field = React2.useMemo(
|
|
136
136
|
() => {
|
|
137
137
|
var _a;
|
|
138
|
-
return (_a = fromProducer(
|
|
138
|
+
return (_a = fromProducer(pipeIoContracts, outputForm, producerPipeRef)) != null ? _a : fromConsumer(pipeIoContracts, inputForm, consumer);
|
|
139
139
|
},
|
|
140
|
-
[
|
|
140
|
+
[pipeIoContracts, outputForm, inputForm, producerPipeRef, consumer]
|
|
141
141
|
);
|
|
142
142
|
if (field) {
|
|
143
143
|
const panel = /* @__PURE__ */ jsx(StuffViewer, { field, value: stuff.data, name: stuff.name });
|
|
@@ -186,6 +186,25 @@ function fromConsumer(contracts, inputForm, consumer) {
|
|
|
186
186
|
return buildResultField({ field: node }, slot.json_schema);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
// src/graph/react/viewer/graphArtifacts.ts
|
|
190
|
+
function graphArtifactsFrom(source) {
|
|
191
|
+
var _a, _b, _c;
|
|
192
|
+
if (source.graph_spec === void 0 || source.graph_spec === null) return null;
|
|
193
|
+
return {
|
|
194
|
+
graphSpec: source.graph_spec,
|
|
195
|
+
pipeIoContracts: (_a = source.pipe_io_contracts) != null ? _a : null,
|
|
196
|
+
outputForm: (_b = source.output_form) != null ? _b : null,
|
|
197
|
+
inputForm: (_c = source.input_form) != null ? _c : null
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function resultDescriptors(graph) {
|
|
201
|
+
const pipeIoContracts = graph == null ? void 0 : graph.pipeIoContracts;
|
|
202
|
+
const outputForm = graph == null ? void 0 : graph.outputForm;
|
|
203
|
+
if (!pipeIoContracts || !outputForm) return null;
|
|
204
|
+
const inputForm = graph == null ? void 0 : graph.inputForm;
|
|
205
|
+
return inputForm ? { pipeIoContracts, outputForm, inputForm } : { pipeIoContracts, outputForm };
|
|
206
|
+
}
|
|
207
|
+
|
|
189
208
|
// src/graph/react/detail/DetailPanel.tsx
|
|
190
209
|
import React3 from "react";
|
|
191
210
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -2521,10 +2540,8 @@ function StuffNodeDetail({
|
|
|
2521
2540
|
producerPipeRef,
|
|
2522
2541
|
consumer,
|
|
2523
2542
|
graphspec,
|
|
2543
|
+
artifacts,
|
|
2524
2544
|
theme,
|
|
2525
|
-
contracts,
|
|
2526
|
-
outputForm,
|
|
2527
|
-
inputForm,
|
|
2528
2545
|
resolveUrl,
|
|
2529
2546
|
resolveShareUrl,
|
|
2530
2547
|
saveFiles,
|
|
@@ -2533,12 +2550,10 @@ function StuffNodeDetail({
|
|
|
2533
2550
|
var _a;
|
|
2534
2551
|
const conceptInfo = stuffData.concept && graphspec ? resolveConceptRef(graphspec, stuffData.concept) : void 0;
|
|
2535
2552
|
const isDryRun = graphSpecMode(graphspec) === GRAPH_SPEC_MODE.DRY;
|
|
2536
|
-
const
|
|
2553
|
+
const descriptors = resultDescriptors(artifacts);
|
|
2554
|
+
const renderData = descriptors ? () => /* @__PURE__ */ jsx24(
|
|
2537
2555
|
StuffResultPanel,
|
|
2538
|
-
__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({
|
|
2539
|
-
contracts,
|
|
2540
|
-
outputForm
|
|
2541
|
-
}, inputForm ? { inputForm } : {}), {
|
|
2556
|
+
__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, descriptors), {
|
|
2542
2557
|
stuff: stuffData
|
|
2543
2558
|
}), conceptInfo ? { concept: conceptInfo } : {}), producerPipeRef ? { producerPipeRef } : {}), consumer ? { consumer } : {}), resolveUrl ? { resolveUrl } : {}), resolveShareUrl ? { resolveShareUrl } : {}), saveFiles ? { saveFiles } : {}), downloads ? { downloads } : {}), {
|
|
2544
2559
|
theme
|
|
@@ -2604,9 +2619,9 @@ function applyStatusOverrides(nodes, statusMap) {
|
|
|
2604
2619
|
});
|
|
2605
2620
|
}
|
|
2606
2621
|
function GraphViewer(props) {
|
|
2607
|
-
var _a, _b, _c;
|
|
2622
|
+
var _a, _b, _c, _d;
|
|
2608
2623
|
const {
|
|
2609
|
-
|
|
2624
|
+
graph,
|
|
2610
2625
|
config = DEFAULT_GRAPH_CONFIG,
|
|
2611
2626
|
initialDirection,
|
|
2612
2627
|
initialShowControllers,
|
|
@@ -2624,9 +2639,6 @@ function GraphViewer(props) {
|
|
|
2624
2639
|
onNodeSelect,
|
|
2625
2640
|
onPaneClick,
|
|
2626
2641
|
renderDetailExtra,
|
|
2627
|
-
contracts,
|
|
2628
|
-
outputForm,
|
|
2629
|
-
inputForm,
|
|
2630
2642
|
resolveUrl,
|
|
2631
2643
|
resolveShareUrl,
|
|
2632
2644
|
saveFiles,
|
|
@@ -2635,6 +2647,7 @@ function GraphViewer(props) {
|
|
|
2635
2647
|
validationIssues,
|
|
2636
2648
|
onValidationIssueClick
|
|
2637
2649
|
} = props;
|
|
2650
|
+
const graphspecProp = (_a = graph == null ? void 0 : graph.graphSpec) != null ? _a : null;
|
|
2638
2651
|
const graphspec = React10.useMemo(
|
|
2639
2652
|
() => graphspecProp === null ? null : validateGraphSpec(graphspecProp),
|
|
2640
2653
|
[graphspecProp]
|
|
@@ -2670,7 +2683,7 @@ function GraphViewer(props) {
|
|
|
2670
2683
|
(_a2 = onThemeChangeRef.current) == null ? void 0 : _a2.call(onThemeChangeRef, mode, resolvedTheme);
|
|
2671
2684
|
}
|
|
2672
2685
|
}, [mode, resolvedTheme]);
|
|
2673
|
-
const effectiveFoldMode = (
|
|
2686
|
+
const effectiveFoldMode = (_c = (_b = initialFoldMode != null ? initialFoldMode : config.foldMode) != null ? _b : DEFAULT_GRAPH_CONFIG.foldMode) != null ? _c : FOLD_MODE.EXPANDED;
|
|
2674
2687
|
const [showControllers, setShowControllers] = React10.useState(() => {
|
|
2675
2688
|
var _a2, _b2;
|
|
2676
2689
|
if (effectiveFoldMode === FOLD_MODE.FOLDED) return true;
|
|
@@ -3190,7 +3203,7 @@ function GraphViewer(props) {
|
|
|
3190
3203
|
toolbarPositionProp,
|
|
3191
3204
|
config.toolbarPosition
|
|
3192
3205
|
);
|
|
3193
|
-
const rawAnalysis = (
|
|
3206
|
+
const rawAnalysis = (_d = rawGraphDataRef.current) == null ? void 0 : _d.analysis;
|
|
3194
3207
|
const allControllerIds = rawAnalysis == null ? void 0 : rawAnalysis.controllerNodeIds;
|
|
3195
3208
|
const foldAllProps = React10.useMemo(() => {
|
|
3196
3209
|
if (!showControllers || !allControllerIds || allControllerIds.size === 0) {
|
|
@@ -3304,9 +3317,7 @@ function GraphViewer(props) {
|
|
|
3304
3317
|
consumer: detailSelection.consumer,
|
|
3305
3318
|
graphspec,
|
|
3306
3319
|
theme: resolvedTheme,
|
|
3307
|
-
|
|
3308
|
-
outputForm,
|
|
3309
|
-
inputForm,
|
|
3320
|
+
artifacts: graph,
|
|
3310
3321
|
resolveUrl,
|
|
3311
3322
|
resolveShareUrl,
|
|
3312
3323
|
saveFiles,
|
|
@@ -3334,8 +3345,10 @@ export {
|
|
|
3334
3345
|
applyStatusOverrides,
|
|
3335
3346
|
controllerNodeTypes,
|
|
3336
3347
|
detectSystemTheme,
|
|
3348
|
+
graphArtifactsFrom,
|
|
3337
3349
|
hydrateLabels,
|
|
3338
3350
|
renderLabel,
|
|
3351
|
+
resultDescriptors,
|
|
3339
3352
|
toAppEdges,
|
|
3340
3353
|
toAppNodes,
|
|
3341
3354
|
useResizable,
|