@synergenius/flow-weaver 0.4.2 → 0.4.3
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/cli/flow-weaver.mjs +1 -16
- package/dist/diagram/geometry.js +1 -4
- package/package.json +1 -1
package/dist/cli/flow-weaver.mjs
CHANGED
|
@@ -59388,20 +59388,6 @@ function assignUnpositionedNodes(layers, diagramNodes, explicitPositions) {
|
|
|
59388
59388
|
}
|
|
59389
59389
|
}
|
|
59390
59390
|
}
|
|
59391
|
-
function resolveHorizontalOverlaps(diagramNodes) {
|
|
59392
|
-
const nodes = [...diagramNodes.values()].sort((a, b) => a.x - b.x);
|
|
59393
|
-
for (let i = 1; i < nodes.length; i++) {
|
|
59394
|
-
const prev = nodes[i - 1];
|
|
59395
|
-
const curr = nodes[i];
|
|
59396
|
-
const prevRightExtent = maxPortLabelExtent(prev.outputs);
|
|
59397
|
-
const currLeftExtent = maxPortLabelExtent(curr.inputs);
|
|
59398
|
-
const minGap = Math.max(prevRightExtent + LABEL_CLEARANCE + currLeftExtent, MIN_EDGE_GAP);
|
|
59399
|
-
const actualGap = curr.x - (prev.x + prev.width);
|
|
59400
|
-
if (actualGap < minGap) {
|
|
59401
|
-
curr.x = prev.x + prev.width + minGap;
|
|
59402
|
-
}
|
|
59403
|
-
}
|
|
59404
|
-
}
|
|
59405
59391
|
function buildDiagramGraph(ast, options = {}) {
|
|
59406
59392
|
const themeName = options.theme ?? "dark";
|
|
59407
59393
|
const nodeTypeMap = /* @__PURE__ */ new Map();
|
|
@@ -59510,7 +59496,6 @@ function buildDiagramGraph(ast, options = {}) {
|
|
|
59510
59496
|
node.y = pos.y;
|
|
59511
59497
|
}
|
|
59512
59498
|
}
|
|
59513
|
-
resolveHorizontalOverlaps(diagramNodes);
|
|
59514
59499
|
} else if (nonePositioned) {
|
|
59515
59500
|
const { layers } = layoutWorkflow(ast);
|
|
59516
59501
|
assignLayerCoordinates(layers, diagramNodes);
|
|
@@ -94435,7 +94420,7 @@ function displayInstalledPackage(pkg) {
|
|
|
94435
94420
|
}
|
|
94436
94421
|
|
|
94437
94422
|
// src/cli/index.ts
|
|
94438
|
-
var version2 = true ? "0.4.
|
|
94423
|
+
var version2 = true ? "0.4.3" : "0.0.0-dev";
|
|
94439
94424
|
var program2 = new Command();
|
|
94440
94425
|
program2.name("flow-weaver").description("Flow Weaver Annotations - Compile and validate workflow files").version(version2, "-v, --version", "Output the current version");
|
|
94441
94426
|
program2.configureOutput({
|
package/dist/diagram/geometry.js
CHANGED
|
@@ -744,7 +744,7 @@ export function buildDiagramGraph(ast, options = {}) {
|
|
|
744
744
|
const allPositioned = [...diagramNodes.keys()].every(id => explicitPositions.has(id));
|
|
745
745
|
const nonePositioned = ![...diagramNodes.keys()].some(id => explicitPositions.has(id));
|
|
746
746
|
if (allPositioned) {
|
|
747
|
-
// All nodes have explicit positions — apply them
|
|
747
|
+
// All nodes have explicit positions — apply them as-is
|
|
748
748
|
for (const [id, pos] of explicitPositions) {
|
|
749
749
|
const node = diagramNodes.get(id);
|
|
750
750
|
if (node) {
|
|
@@ -752,9 +752,6 @@ export function buildDiagramGraph(ast, options = {}) {
|
|
|
752
752
|
node.y = pos.y;
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
|
-
// Resolve horizontal overlaps: scope nodes may be wider than the
|
|
756
|
-
// original positions anticipated, so push downstream nodes apart.
|
|
757
|
-
resolveHorizontalOverlaps(diagramNodes);
|
|
758
755
|
}
|
|
759
756
|
else if (nonePositioned) {
|
|
760
757
|
// No positions — full auto-layout (original behavior)
|
package/package.json
CHANGED