@pipelex/mthds-ui 0.30.1 → 0.32.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/dist/{chunk-GAOBB3UT.js → chunk-K2C5FU4W.js} +2 -2
- package/dist/{chunk-3BXB6HSF.js → chunk-T5Y7KNCZ.js} +58 -31
- package/dist/chunk-T5Y7KNCZ.js.map +1 -0
- package/dist/{chunk-PJTYQURQ.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 +53 -14
- package/dist/graph/index.js +9 -7
- package/dist/graph/react/graph-core.css +16 -0
- package/dist/graph/react/index.d.ts +8 -29
- package/dist/graph/react/index.js +566 -460
- package/dist/graph/react/index.js.map +1 -1
- package/dist/graph/react/styles/simple/SimpleStyle.css +2 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -7
- package/dist/standalone/graph-standalone.html +128 -113
- package/dist/standalone/graph-viewer.css +18 -3
- package/dist/standalone/graph-viewer.js +110 -110
- 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-BNqjYF_x.d.ts → types-MvxsDLCo.d.ts} +34 -8
- package/package.json +2 -2
- package/dist/chunk-3BXB6HSF.js.map +0 -1
- package/dist/chunk-PJTYQURQ.js.map +0 -1
- /package/dist/{chunk-GAOBB3UT.js.map → chunk-K2C5FU4W.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
GRAPH_THEME,
|
|
6
6
|
GRAPH_THEME_MODE,
|
|
7
7
|
TOOLBAR_POSITION
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TMZ2JR2J.js";
|
|
9
9
|
import {
|
|
10
10
|
__spreadProps,
|
|
11
11
|
__spreadValues
|
|
@@ -195,4 +195,4 @@ export {
|
|
|
195
195
|
DEFAULT_GRAPH_CONFIG,
|
|
196
196
|
getPaletteColors
|
|
197
197
|
};
|
|
198
|
-
//# sourceMappingURL=chunk-
|
|
198
|
+
//# sourceMappingURL=chunk-K2C5FU4W.js.map
|
|
@@ -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
|
}
|
|
@@ -2088,9 +2114,12 @@ var STEP_PADDING_Y = 10;
|
|
|
2088
2114
|
var STEP_BORDER = 1.5;
|
|
2089
2115
|
var STEP_HEADER_HEIGHT = 16;
|
|
2090
2116
|
var STEP_GAP = 6;
|
|
2091
|
-
var
|
|
2092
|
-
|
|
2093
|
-
|
|
2117
|
+
var SIMPLE_STEP_TITLE_FITS = [
|
|
2118
|
+
{ boxWidth: SIMPLE_STEP_WIDTH, fontPx: 15, lineHeightPx: 20, maxLines: 3 },
|
|
2119
|
+
{ boxWidth: SIMPLE_STEP_WIDE_WIDTH, fontPx: 15, lineHeightPx: 20, maxLines: 3 },
|
|
2120
|
+
{ boxWidth: SIMPLE_STEP_WIDTH, fontPx: 13, lineHeightPx: 17, maxLines: 5 },
|
|
2121
|
+
{ boxWidth: SIMPLE_STEP_WIDTH, fontPx: 12, lineHeightPx: 16, maxLines: 7 }
|
|
2122
|
+
];
|
|
2094
2123
|
var STEP_MARKER_HEIGHT = 18;
|
|
2095
2124
|
var STEP_INNER_HEIGHT = 22;
|
|
2096
2125
|
var EDGE_LABEL_FONT_PX = 11;
|
|
@@ -2108,6 +2137,7 @@ var TERMINAL_MIN_HEIGHT = 52;
|
|
|
2108
2137
|
var SIMPLE_DECISION_WIDTHS = [188, 220, 252, 284];
|
|
2109
2138
|
var DECISION_TITLE_FONT_PX = 13;
|
|
2110
2139
|
var DECISION_TITLE_LINE_HEIGHT = 16;
|
|
2140
|
+
var DECISION_TITLE_MAX_LINES = 3;
|
|
2111
2141
|
var DECISION_TEXT_WIDTH_SHARE = 0.56;
|
|
2112
2142
|
var DECISION_TEXT_HEIGHT_SHARE = 0.4;
|
|
2113
2143
|
var DECISION_MIN_HEIGHT = 84;
|
|
@@ -2153,20 +2183,20 @@ var STEP_CATEGORY_WORDS = {
|
|
|
2153
2183
|
repeat: "For each",
|
|
2154
2184
|
pick: "Pick"
|
|
2155
2185
|
};
|
|
2156
|
-
function
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
const wide = simpleTitleWrap(title, SIMPLE_STEP_WIDE_WIDTH);
|
|
2161
|
-
if (!wide.clamped) {
|
|
2162
|
-
width = SIMPLE_STEP_WIDE_WIDTH;
|
|
2163
|
-
wrap = wide;
|
|
2164
|
-
}
|
|
2186
|
+
function simpleTitleFit(title) {
|
|
2187
|
+
for (const fit of SIMPLE_STEP_TITLE_FITS) {
|
|
2188
|
+
const wrap = simpleTitleWrap(title, fit);
|
|
2189
|
+
if (!wrap.clamped) return { fit, wrap };
|
|
2165
2190
|
}
|
|
2166
|
-
|
|
2191
|
+
const floor = SIMPLE_STEP_TITLE_FITS[SIMPLE_STEP_TITLE_FITS.length - 1];
|
|
2192
|
+
return { fit: floor, wrap: simpleTitleWrap(title, floor) };
|
|
2193
|
+
}
|
|
2194
|
+
function simpleStepSize(title, options = {}) {
|
|
2195
|
+
const { fit, wrap } = simpleTitleFit(title);
|
|
2196
|
+
let height = 2 * STEP_PADDING_Y + STEP_HEADER_HEIGHT + STEP_GAP + Math.max(1, wrap.drawnLines) * fit.lineHeightPx;
|
|
2167
2197
|
if (options.forEach) height += STEP_GAP + STEP_MARKER_HEIGHT;
|
|
2168
2198
|
if (options.innerSteps) height += STEP_GAP + STEP_INNER_HEIGHT;
|
|
2169
|
-
return { width, height: Math.ceil(height + 2 * STEP_BORDER) };
|
|
2199
|
+
return { width: fit.boxWidth, height: Math.ceil(height + 2 * STEP_BORDER) };
|
|
2170
2200
|
}
|
|
2171
2201
|
function simpleTerminalSize(title, hasSubtitle) {
|
|
2172
2202
|
const wrap = estimateWrap(
|
|
@@ -2184,7 +2214,7 @@ function simpleDecisionSize(title) {
|
|
|
2184
2214
|
title,
|
|
2185
2215
|
decisionTextWidth(width),
|
|
2186
2216
|
DECISION_TITLE_FONT_PX,
|
|
2187
|
-
|
|
2217
|
+
DECISION_TITLE_MAX_LINES
|
|
2188
2218
|
);
|
|
2189
2219
|
for (const candidate of SIMPLE_DECISION_WIDTHS.slice(1)) {
|
|
2190
2220
|
if (!wrap.clamped) break;
|
|
@@ -2193,20 +2223,15 @@ function simpleDecisionSize(title) {
|
|
|
2193
2223
|
title,
|
|
2194
2224
|
decisionTextWidth(width),
|
|
2195
2225
|
DECISION_TITLE_FONT_PX,
|
|
2196
|
-
|
|
2226
|
+
DECISION_TITLE_MAX_LINES
|
|
2197
2227
|
);
|
|
2198
2228
|
}
|
|
2199
2229
|
const textHeight = Math.max(1, wrap.drawnLines) * DECISION_TITLE_LINE_HEIGHT;
|
|
2200
2230
|
const height = Math.max(DECISION_MIN_HEIGHT, Math.ceil(textHeight / DECISION_TEXT_HEIGHT_SHARE));
|
|
2201
2231
|
return { width, height };
|
|
2202
2232
|
}
|
|
2203
|
-
function simpleTitleWrap(title,
|
|
2204
|
-
return estimateWrap(
|
|
2205
|
-
title,
|
|
2206
|
-
stepTitleWidth(boxWidth),
|
|
2207
|
-
SIMPLE_STEP_TITLE_FONT_PX,
|
|
2208
|
-
SIMPLE_TITLE_MAX_LINES
|
|
2209
|
-
);
|
|
2233
|
+
function simpleTitleWrap(title, fit) {
|
|
2234
|
+
return estimateWrap(title, stepTitleWidth(fit.boxWidth), fit.fontPx, fit.maxLines);
|
|
2210
2235
|
}
|
|
2211
2236
|
var STATUS_PRECEDENCE = [
|
|
2212
2237
|
"failed",
|
|
@@ -2655,6 +2680,7 @@ function projectSimpleGraph(input) {
|
|
|
2655
2680
|
const simple = __spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
2656
2681
|
kind: "step",
|
|
2657
2682
|
title,
|
|
2683
|
+
titleFit: simpleTitleFit(title).fit,
|
|
2658
2684
|
category: STEP_CATEGORY_BY_PIPE_TYPE[pipeType],
|
|
2659
2685
|
status: stepStatus(spec)
|
|
2660
2686
|
}, graphMode !== void 0 ? { graphMode } : {}), forEach ? { forEach } : {}), innerStepCount !== void 0 ? { innerStepCount } : {}), onExpand ? { onExpand } : {});
|
|
@@ -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,
|
|
@@ -2965,13 +2992,13 @@ export {
|
|
|
2965
2992
|
estimateWrap,
|
|
2966
2993
|
SIMPLE_STEP_WIDTH,
|
|
2967
2994
|
SIMPLE_STEP_WIDE_WIDTH,
|
|
2968
|
-
|
|
2969
|
-
SIMPLE_TITLE_MAX_LINES,
|
|
2995
|
+
SIMPLE_STEP_TITLE_FITS,
|
|
2970
2996
|
SIMPLE_TERMINAL_WIDTH,
|
|
2971
2997
|
SIMPLE_DECISION_WIDTHS,
|
|
2972
2998
|
SIMPLE_FOLD_DEPTH,
|
|
2973
2999
|
STEP_CATEGORY_BY_PIPE_TYPE,
|
|
2974
3000
|
STEP_CATEGORY_WORDS,
|
|
3001
|
+
simpleTitleFit,
|
|
2975
3002
|
simpleStepSize,
|
|
2976
3003
|
simpleTerminalSize,
|
|
2977
3004
|
simpleDecisionSize,
|
|
@@ -2983,4 +3010,4 @@ export {
|
|
|
2983
3010
|
applySimpleFrames,
|
|
2984
3011
|
GRAPH_STYLE_PIPELINES
|
|
2985
3012
|
};
|
|
2986
|
-
//# sourceMappingURL=chunk-
|
|
3013
|
+
//# sourceMappingURL=chunk-T5Y7KNCZ.js.map
|