@pipelex/mthds-ui 0.31.0 → 0.33.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 +3 -0
- package/dist/{chunk-BXRVND2C.js → chunk-ABUDTHWF.js} +34 -7
- package/dist/chunk-ABUDTHWF.js.map +1 -0
- package/dist/{chunk-7H3RHOYA.js → chunk-K2C5FU4W.js} +2 -2
- package/dist/{chunk-QRO3TYZE.js → chunk-TMZ2JR2J.js} +1 -1
- package/dist/chunk-TMZ2JR2J.js.map +1 -0
- package/dist/form/react/index.d.ts +1 -1
- package/dist/form/react/index.js +2 -2
- package/dist/graph/index.d.ts +24 -4
- package/dist/graph/index.js +5 -3
- package/dist/graph/react/graph-core.css +29 -0
- package/dist/graph/react/index.d.ts +22 -29
- package/dist/graph/react/index.js +741 -546
- package/dist/graph/react/index.js.map +1 -1
- package/dist/graph/react/styles/simple/SimpleStyle.css +9 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -3
- package/dist/standalone/graph-standalone.html +160 -122
- package/dist/standalone/graph-viewer.css +38 -0
- package/dist/standalone/graph-viewer.js +122 -122
- package/dist/static-graph/index.d.ts +1 -1
- package/dist/static-graph/index.js +97 -17
- package/dist/static-graph/index.js.map +1 -1
- package/dist/{types-KYRgLdlh.d.ts → types-MvxsDLCo.d.ts} +21 -8
- package/package.json +2 -2
- package/dist/chunk-BXRVND2C.js.map +0 -1
- package/dist/chunk-QRO3TYZE.js.map +0 -1
- /package/dist/{chunk-7H3RHOYA.js.map → chunk-K2C5FU4W.js.map} +0 -0
package/README.md
CHANGED
|
@@ -94,6 +94,7 @@ Without `pipeIoContracts` and `outputForm` the panel shows each concept's struct
|
|
|
94
94
|
| `graphStyle` | `GraphStyleId` | `"detailed"` | The style the graph is drawn in: `detailed` or `simple` |
|
|
95
95
|
| `styleMenu` | `boolean \| GraphStyleId[]` | — | Offer a style menu in the toolbar (opt-in) |
|
|
96
96
|
| `onGraphStyleChange` | `(style: GraphStyleId) => void` | — | Called when the style changes, so the host can keep the choice |
|
|
97
|
+
| `interactive` | `boolean` | `true` | `false` draws a still picture sized to its content |
|
|
97
98
|
|
|
98
99
|
The `simple` style draws the method as a flowchart in plain words: steps titled by their descriptions, only the method's inputs and final output as data, decisions with their outcomes, and loops as "for each". See [docs/graph-styles.md](docs/graph-styles.md).
|
|
99
100
|
|
|
@@ -101,6 +102,8 @@ The `simple` style draws the method as a flowchart in plain words: steps titled
|
|
|
101
102
|
|
|
102
103
|
The graph container uses `position: absolute; inset: 0` to fill its parent. Make sure the parent element has `position: relative` and a defined height (e.g. `h-full`, `flex-1`, or an explicit height).
|
|
103
104
|
|
|
105
|
+
The still presentation (`interactive={false}`) is the exception: its container flows in its parent and takes the height the drawing needs, so the parent gives it a width and no height. See [docs/still-presentation.md](docs/still-presentation.md).
|
|
106
|
+
|
|
104
107
|
## GraphSpec
|
|
105
108
|
|
|
106
109
|
GraphSpec is the data format that describes a pipeline execution graph. It's generated by Pipelex when running or validating MTHDS method bundles.
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-2N65P32H.js";
|
|
5
5
|
import {
|
|
6
6
|
DEFAULT_GRAPH_CONFIG
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-K2C5FU4W.js";
|
|
8
8
|
import {
|
|
9
9
|
ARROW_CLOSED_MARKER,
|
|
10
10
|
BINDING_STEP_TYPE,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
nodeWidth,
|
|
32
32
|
stuffDigestFromId,
|
|
33
33
|
stuffNodeId
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-TMZ2JR2J.js";
|
|
35
35
|
import {
|
|
36
36
|
__objRest,
|
|
37
37
|
__spreadProps,
|
|
@@ -480,6 +480,20 @@ function getPipeBlueprint(spec, pipeRef) {
|
|
|
480
480
|
var _a;
|
|
481
481
|
return (_a = spec.pipe_registry) == null ? void 0 : _a[pipeRef];
|
|
482
482
|
}
|
|
483
|
+
function resolveNodeBlueprint(spec, node) {
|
|
484
|
+
var _a;
|
|
485
|
+
const registry = spec.pipe_registry;
|
|
486
|
+
if (!registry || isBindingNode(node) || !node.pipe_code) return void 0;
|
|
487
|
+
if (node.domain_code) return registry[makePipeRef(node.domain_code, node.pipe_code)];
|
|
488
|
+
const pipelineDomain = (_a = spec.pipeline_ref) == null ? void 0 : _a.domain;
|
|
489
|
+
if (pipelineDomain) {
|
|
490
|
+
const inPipelineDomain = registry[makePipeRef(pipelineDomain, node.pipe_code)];
|
|
491
|
+
if (inPipelineDomain) return inPipelineDomain;
|
|
492
|
+
}
|
|
493
|
+
const suffix = `.${node.pipe_code}`;
|
|
494
|
+
const matches = Object.keys(registry).filter((ref) => ref.endsWith(suffix));
|
|
495
|
+
return matches.length === 1 ? registry[matches[0]] : void 0;
|
|
496
|
+
}
|
|
483
497
|
function getConceptInfo(spec, conceptRef) {
|
|
484
498
|
var _a;
|
|
485
499
|
return (_a = spec.concept_registry) == null ? void 0 : _a[conceptRef];
|
|
@@ -501,7 +515,7 @@ function ioPill(item) {
|
|
|
501
515
|
concept: item.concept ? item.concept + multiplicitySuffix(item.multiplicity) : ""
|
|
502
516
|
};
|
|
503
517
|
}
|
|
504
|
-
function buildPipeCardPayload(node, graphMode) {
|
|
518
|
+
function buildPipeCardPayload(node, graphMode, blueprint) {
|
|
505
519
|
const payload = {
|
|
506
520
|
pipeCode: node.pipe_code,
|
|
507
521
|
pipeType: node.pipe_type,
|
|
@@ -512,6 +526,10 @@ function buildPipeCardPayload(node, graphMode) {
|
|
|
512
526
|
};
|
|
513
527
|
if (graphMode !== void 0) payload.graphMode = graphMode;
|
|
514
528
|
if (node.tags !== void 0) payload.tags = node.tags;
|
|
529
|
+
const docGenFormat = (blueprint == null ? void 0 : blueprint.type) === "PipeDocGen" ? blueprint.doc_gen_format : void 0;
|
|
530
|
+
if (typeof docGenFormat === "string" && docGenFormat.trim() !== "") {
|
|
531
|
+
payload.docGenFormat = docGenFormat.trim();
|
|
532
|
+
}
|
|
515
533
|
return payload;
|
|
516
534
|
}
|
|
517
535
|
|
|
@@ -546,7 +564,11 @@ function buildDataflowGraph(graphspec, analysis, edgeType) {
|
|
|
546
564
|
const pipeNode = asCardNode(node, `nodes[${node.id}]`);
|
|
547
565
|
const isFailed = pipeNode.status === "failed";
|
|
548
566
|
const label = pipeNode.pipe_code;
|
|
549
|
-
const pipeCardData = buildPipeCardPayload(
|
|
567
|
+
const pipeCardData = buildPipeCardPayload(
|
|
568
|
+
pipeNode,
|
|
569
|
+
graphMode,
|
|
570
|
+
resolveNodeBlueprint(graphspec, pipeNode)
|
|
571
|
+
);
|
|
550
572
|
nodes.push({
|
|
551
573
|
id: pipeNode.id,
|
|
552
574
|
type: NODE_TYPE_PIPE_CARD,
|
|
@@ -812,7 +834,11 @@ function applyFolds(graphData, analysis, graphspec, foldedSet, onToggleFold) {
|
|
|
812
834
|
if (outermostFoldedAncestor(folded, childToCtrl, foldedSet)) continue;
|
|
813
835
|
const specNode = findSpecNode(graphspec, folded);
|
|
814
836
|
if (!specNode) continue;
|
|
815
|
-
const payload = buildPipeCardPayload(
|
|
837
|
+
const payload = buildPipeCardPayload(
|
|
838
|
+
asPipeCallNode(specNode, folded),
|
|
839
|
+
graphMode,
|
|
840
|
+
resolveNodeBlueprint(graphspec, specNode)
|
|
841
|
+
);
|
|
816
842
|
if (onToggleFold) {
|
|
817
843
|
payload.onExpand = (options) => onToggleFold(folded, options);
|
|
818
844
|
}
|
|
@@ -2829,7 +2855,7 @@ function simpleEdge(id, source, target, label) {
|
|
|
2829
2855
|
fontWeight: 600,
|
|
2830
2856
|
fill: "var(--ctrl-condition-text)"
|
|
2831
2857
|
};
|
|
2832
|
-
edge.labelBgStyle = { fill: "var(--color-bg)", fillOpacity: 0.92 };
|
|
2858
|
+
edge.labelBgStyle = { fill: "var(--simple-edge-label-bg, var(--color-bg))", fillOpacity: 0.92 };
|
|
2833
2859
|
edge.labelBgPadding = [...EDGE_LABEL_PADDING];
|
|
2834
2860
|
edge.labelBgBorderRadius = 4;
|
|
2835
2861
|
edge.labelSize = simpleEdgeLabelSize(label);
|
|
@@ -2919,6 +2945,7 @@ export {
|
|
|
2919
2945
|
buildDataflowAnalysis,
|
|
2920
2946
|
buildChildToControllerMap,
|
|
2921
2947
|
getPipeBlueprint,
|
|
2948
|
+
resolveNodeBlueprint,
|
|
2922
2949
|
getConceptInfo,
|
|
2923
2950
|
resolveConceptRef,
|
|
2924
2951
|
buildPipeCardPayload,
|
|
@@ -2983,4 +3010,4 @@ export {
|
|
|
2983
3010
|
applySimpleFrames,
|
|
2984
3011
|
GRAPH_STYLE_PIPELINES
|
|
2985
3012
|
};
|
|
2986
|
-
//# sourceMappingURL=chunk-
|
|
3013
|
+
//# sourceMappingURL=chunk-ABUDTHWF.js.map
|