@statelyai/layout 0.1.3 → 0.3.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/NOTICE.md +43 -0
- package/README.md +153 -6
- package/dist/elkjs/index.cjs +9 -0
- package/dist/elkjs/index.d.cts +155 -0
- package/dist/elkjs/index.d.mts +51 -39
- package/dist/elkjs/index.mjs +3 -1484
- package/dist/elkjs/main.cjs +17 -0
- package/dist/elkjs/main.d.cts +10 -0
- package/dist/elkjs/main.d.mts +11 -0
- package/dist/elkjs/main.mjs +17 -0
- package/dist/elkjs/worker-api.cjs +3 -0
- package/dist/elkjs/worker-api.d.cts +3 -0
- package/dist/elkjs/worker-api.d.mts +3 -0
- package/dist/elkjs/worker-api.mjs +3 -0
- package/dist/elkjs/worker.cjs +86 -0
- package/dist/elkjs/worker.d.cts +17 -0
- package/dist/elkjs/worker.d.mts +17 -0
- package/dist/elkjs/worker.mjs +86 -0
- package/dist/elkjs-DaHMISnQ.mjs +1677 -0
- package/dist/elkjs-dMghiiWW.cjs +1706 -0
- package/dist/index-BEA_pzeT.d.cts +72 -0
- package/dist/{index-8xYkohbz.d.mts → index-D9dhxrRl.d.cts} +111 -5
- package/dist/index-DNTLRsDl.d.mts +72 -0
- package/dist/index-DNixtE3h.d.mts +1318 -0
- package/dist/index.cjs +215 -0
- package/dist/index.d.cts +78 -0
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +25 -25
- package/dist/layered/index.cjs +38 -0
- package/dist/layered/index.d.cts +3 -0
- package/dist/layered/index.d.mts +3 -2
- package/dist/layered/index.mjs +1 -1
- package/dist/layered-B2buJqMf.cjs +12009 -0
- package/dist/{layered-CoeH9LRO.mjs → layered-DGFTeQSl.mjs} +2323 -149
- package/dist/{spore-BtTSZbb6.mjs → layout-engine-Cs5tatA6.mjs} +159 -5
- package/dist/layout-engine-Dn1PiFwP.cjs +712 -0
- package/dist/public-types-9NCPoqbp.d.mts +109 -0
- package/dist/public-types-BcRZoJE3.d.cts +109 -0
- package/dist/routing/index.cjs +28 -0
- package/dist/routing/index.d.cts +3 -0
- package/dist/routing/index.d.mts +3 -0
- package/dist/routing/index.mjs +3 -0
- package/dist/routing-A2hrK9MP.mjs +2396 -0
- package/dist/routing-ujEP7Qh6.cjs +2606 -0
- package/dist/types-CT2akdK0.d.mts +133 -0
- package/dist/types-uxPlGRof.d.cts +133 -0
- package/dist/worker-client-BNjwT1AJ.mjs +92 -0
- package/dist/worker-client-BwGGRD5y.d.mts +19 -0
- package/dist/worker-client-D4oEvhAl.cjs +98 -0
- package/dist/worker-client-D4zNyPEI.d.cts +19 -0
- package/package.json +45 -10
- package/src/authoring/coordinates.ts +114 -0
- package/src/authoring/partial.ts +584 -0
- package/src/authoring/routing.ts +211 -0
- package/src/box.ts +22 -0
- package/src/constraints.ts +222 -0
- package/src/elkjs/index.ts +104 -39
- package/src/elkjs/main.ts +19 -0
- package/src/elkjs/public-types.ts +125 -0
- package/src/elkjs/routes.ts +147 -0
- package/src/elkjs/worker-api.ts +29 -0
- package/src/elkjs/worker-client.ts +138 -0
- package/src/elkjs/worker.ts +117 -0
- package/src/index.ts +19 -0
- package/src/internal/elkjs-compatibility.ts +17 -0
- package/src/internal/layout-engine.ts +126 -0
- package/src/layered/compound.ts +417 -0
- package/src/layered/index.ts +58 -105
- package/src/layered/types.ts +21 -0
- package/src/layout.ts +35 -28
- package/src/packing.ts +22 -0
- package/src/random.ts +75 -3
- package/src/routing/adapters.ts +111 -0
- package/src/routing/algorithms.ts +676 -0
- package/src/routing/coordination.ts +86 -0
- package/src/routing/engine.ts +473 -0
- package/src/routing/index.ts +68 -0
- package/src/routing/layout-cache.ts +65 -0
- package/src/routing/model.ts +218 -0
- package/src/routing/path.ts +324 -0
- package/src/routing/persistent.ts +117 -0
- package/src/routing/search.ts +276 -0
- package/src/routing/spatial.ts +78 -0
- package/src/routing/types.ts +146 -0
- package/src/types.ts +17 -2
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
const require_routing = require('./routing-ujEP7Qh6.cjs');
|
|
2
|
+
const require_layered = require('./layered-B2buJqMf.cjs');
|
|
3
|
+
const require_layout_engine = require('./layout-engine-Dn1PiFwP.cjs');
|
|
4
|
+
let _statelyai_graph = require("@statelyai/graph");
|
|
5
|
+
|
|
6
|
+
//#region src/layout.ts
|
|
7
|
+
const algorithms = new Map(Object.entries(require_layout_engine.builtInLayoutAlgorithms).map(([id, algorithm]) => [id, algorithm]));
|
|
8
|
+
function supportsScope(algorithm, scope) {
|
|
9
|
+
switch (scope.mode) {
|
|
10
|
+
case "full": return algorithm.capabilities.full;
|
|
11
|
+
case "incremental": return algorithm.capabilities.incremental;
|
|
12
|
+
case "partial": return algorithm.capabilities.partial;
|
|
13
|
+
case "route-only": return algorithm.capabilities.routeOnly;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function samePoints(a, b) {
|
|
17
|
+
if (a === b) return true;
|
|
18
|
+
if (!a || !b || a.length !== b.length) return false;
|
|
19
|
+
return a.every((point, index) => {
|
|
20
|
+
const other = b[index];
|
|
21
|
+
return other !== void 0 && point.x === other.x && point.y === other.y;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function getLayoutPatches(input, output) {
|
|
25
|
+
const patches = [];
|
|
26
|
+
const outputNodes = new Map(output.nodes.map((node) => [node.id, node]));
|
|
27
|
+
const outputEdges = new Map(output.edges.map((edge) => [edge.id, edge]));
|
|
28
|
+
for (const node of input.nodes) {
|
|
29
|
+
const next = outputNodes.get(node.id);
|
|
30
|
+
if (!next) continue;
|
|
31
|
+
if (node.x !== next.x || node.y !== next.y || node.width !== next.width || node.height !== next.height || node.ports !== next.ports) patches.push({
|
|
32
|
+
op: "updateNode",
|
|
33
|
+
id: node.id,
|
|
34
|
+
data: {
|
|
35
|
+
...node.x === next.x ? {} : { x: next.x ?? null },
|
|
36
|
+
...node.y === next.y ? {} : { y: next.y ?? null },
|
|
37
|
+
...node.width === next.width ? {} : { width: next.width ?? null },
|
|
38
|
+
...node.height === next.height ? {} : { height: next.height ?? null },
|
|
39
|
+
...node.ports === next.ports ? {} : { ports: next.ports ?? null }
|
|
40
|
+
},
|
|
41
|
+
description: "Apply layout geometry"
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
for (const edge of input.edges) {
|
|
45
|
+
const next = outputEdges.get(edge.id);
|
|
46
|
+
if (!next) continue;
|
|
47
|
+
if (edge.x !== next.x || edge.y !== next.y || edge.width !== next.width || edge.height !== next.height || edge.routing !== next.routing || !samePoints(edge.points, next.points)) patches.push({
|
|
48
|
+
op: "updateEdge",
|
|
49
|
+
id: edge.id,
|
|
50
|
+
data: {
|
|
51
|
+
...edge.x === next.x ? {} : { x: next.x ?? null },
|
|
52
|
+
...edge.y === next.y ? {} : { y: next.y ?? null },
|
|
53
|
+
...edge.width === next.width ? {} : { width: next.width ?? null },
|
|
54
|
+
...edge.height === next.height ? {} : { height: next.height ?? null },
|
|
55
|
+
...edge.routing === next.routing ? {} : { routing: next.routing ?? null },
|
|
56
|
+
...samePoints(edge.points, next.points) ? {} : { points: next.points ?? null }
|
|
57
|
+
},
|
|
58
|
+
description: "Apply layout geometry"
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return patches;
|
|
62
|
+
}
|
|
63
|
+
/** Register or replace a layout algorithm for subsequent `getLayout` calls. */
|
|
64
|
+
function registerLayoutAlgorithm(algorithm) {
|
|
65
|
+
const previous = algorithms.get(algorithm.id);
|
|
66
|
+
algorithms.set(algorithm.id, algorithm);
|
|
67
|
+
return () => {
|
|
68
|
+
if (previous) algorithms.set(algorithm.id, previous);
|
|
69
|
+
else algorithms.delete(algorithm.id);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function getLayoutAlgorithm(id) {
|
|
73
|
+
return algorithms.get(id) ?? require_layout_engine.getBuiltInLayoutAlgorithm(id);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Run a registered or inline algorithm against an `@statelyai/graph` graph.
|
|
77
|
+
* The input is not mutated.
|
|
78
|
+
*/
|
|
79
|
+
async function getLayout(request) {
|
|
80
|
+
const startedAt = performance.now();
|
|
81
|
+
const scope = request.scope ?? { mode: "full" };
|
|
82
|
+
const diagnostics = [];
|
|
83
|
+
const phases = [];
|
|
84
|
+
const algorithm = typeof request.algorithm === "object" ? request.algorithm : getLayoutAlgorithm(request.algorithm ?? "layered");
|
|
85
|
+
if (!algorithm) throw new require_routing.LayoutError(`Unknown layout algorithm: ${request.algorithm ?? "layered"}`, "UNKNOWN_ALGORITHM");
|
|
86
|
+
if (!supportsScope(algorithm, scope)) throw new require_routing.UnsupportedLayoutError(`${algorithm.id} does not support ${scope.mode} layout yet`);
|
|
87
|
+
if (request.constraints?.length && !algorithm.capabilities.constraints) throw new require_routing.UnsupportedLayoutError(`${algorithm.id} does not support geometry constraints`);
|
|
88
|
+
const issues = (0, _statelyai_graph.getGraphIssues)(request.graph);
|
|
89
|
+
if (issues.length > 0) throw new require_routing.LayoutError(issues.map((issue) => issue.message).join("; "), "INVALID_GRAPH");
|
|
90
|
+
const context = {
|
|
91
|
+
scope,
|
|
92
|
+
constraints: request.constraints,
|
|
93
|
+
diagnostics,
|
|
94
|
+
...request.signal === void 0 ? {} : { signal: request.signal },
|
|
95
|
+
measurePhase(id, run) {
|
|
96
|
+
const phaseStartedAt = performance.now();
|
|
97
|
+
const record = () => {
|
|
98
|
+
phases.push({
|
|
99
|
+
id,
|
|
100
|
+
durationMs: performance.now() - phaseStartedAt
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
try {
|
|
104
|
+
const result = run();
|
|
105
|
+
if (result instanceof Promise) return result.finally(record);
|
|
106
|
+
record();
|
|
107
|
+
return result;
|
|
108
|
+
} catch (error) {
|
|
109
|
+
record();
|
|
110
|
+
throw error;
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
throwIfAborted() {
|
|
114
|
+
if (request.signal?.aborted) throw request.signal.reason ?? /* @__PURE__ */ new Error("Layout aborted");
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
context.throwIfAborted();
|
|
118
|
+
const graph = await require_layout_engine.executeLayoutAlgorithm({
|
|
119
|
+
algorithm,
|
|
120
|
+
graph: request.graph,
|
|
121
|
+
options: request.options,
|
|
122
|
+
context
|
|
123
|
+
});
|
|
124
|
+
context.throwIfAborted();
|
|
125
|
+
return {
|
|
126
|
+
graph,
|
|
127
|
+
patches: getLayoutPatches(request.graph, graph),
|
|
128
|
+
diagnostics,
|
|
129
|
+
metrics: {
|
|
130
|
+
durationMs: performance.now() - startedAt,
|
|
131
|
+
nodeCount: graph.nodes.length,
|
|
132
|
+
edgeCount: graph.edges.length,
|
|
133
|
+
phases
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//#endregion
|
|
139
|
+
exports.LayoutError = require_routing.LayoutError;
|
|
140
|
+
exports.UnsupportedLayoutError = require_routing.UnsupportedLayoutError;
|
|
141
|
+
exports.applyRoutePatches = require_routing.applyRoutePatches;
|
|
142
|
+
exports.assignLayersByBreadthFirstModelOrder = require_layered.assignLayersByBreadthFirstModelOrder;
|
|
143
|
+
exports.assignLayersByDepthFirstModelOrder = require_layered.assignLayersByDepthFirstModelOrder;
|
|
144
|
+
exports.assignLayersByLongestPath = require_layered.assignLayersByLongestPath;
|
|
145
|
+
exports.assignLayersByLongestPathToSink = require_layered.assignLayersByLongestPathToSink;
|
|
146
|
+
exports.assignLayersInteractively = require_layered.assignLayersInteractively;
|
|
147
|
+
exports.assignLayersWithCoffmanGraham = require_layered.assignLayersWithCoffmanGraham;
|
|
148
|
+
exports.assignLayersWithMinWidth = require_layered.assignLayersWithMinWidth;
|
|
149
|
+
exports.assignLayersWithNetworkSimplex = require_layered.assignLayersWithNetworkSimplex;
|
|
150
|
+
exports.assignLayersWithStretchWidth = require_layered.assignLayersWithStretchWidth;
|
|
151
|
+
exports.bezierRouting = require_routing.bezierRouting;
|
|
152
|
+
exports.boxAlgorithm = require_layout_engine.boxAlgorithm;
|
|
153
|
+
exports.breakCyclesByModelOrder = require_layered.breakCyclesByModelOrder;
|
|
154
|
+
exports.breakCyclesByStronglyConnectedConnectivity = require_layered.breakCyclesByStronglyConnectedConnectivity;
|
|
155
|
+
exports.breakCyclesByStronglyConnectedNodeType = require_layered.breakCyclesByStronglyConnectedNodeType;
|
|
156
|
+
exports.breakCyclesGreedily = require_layered.breakCyclesGreedily;
|
|
157
|
+
exports.breakCyclesGreedilyByModelOrder = require_layered.breakCyclesGreedilyByModelOrder;
|
|
158
|
+
exports.breakCyclesInteractively = require_layered.breakCyclesInteractively;
|
|
159
|
+
exports.breakCyclesWithDepthFirstSearch = require_layered.breakCyclesWithDepthFirstSearch;
|
|
160
|
+
exports.breakCyclesWithModelOrderBreadthFirstSearch = require_layered.breakCyclesWithModelOrderBreadthFirstSearch;
|
|
161
|
+
exports.breakCyclesWithModelOrderDepthFirstSearch = require_layered.breakCyclesWithModelOrderDepthFirstSearch;
|
|
162
|
+
exports.bundleRouting = require_routing.bundleRouting;
|
|
163
|
+
exports.busRouting = require_routing.busRouting;
|
|
164
|
+
exports.c = require_layered.c;
|
|
165
|
+
exports.curvedRouting = require_routing.curvedRouting;
|
|
166
|
+
exports.elkLayeredEnumValues = require_layered.elkLayeredEnumValues;
|
|
167
|
+
exports.elkLayeredOptionDefinitions = require_layered.elkLayeredOptionDefinitions;
|
|
168
|
+
exports.fanRouting = require_routing.fanRouting;
|
|
169
|
+
exports.fixedAlgorithm = require_layout_engine.fixedAlgorithm;
|
|
170
|
+
exports.flattenPath = require_routing.flattenPath;
|
|
171
|
+
exports.fromElkLayeredOptionId = require_layered.fromElkLayeredOptionId;
|
|
172
|
+
exports.getBoxLayout = require_layout_engine.getBoxLayout;
|
|
173
|
+
exports.getFixedLayout = require_layout_engine.getFixedLayout;
|
|
174
|
+
exports.getLayeredLayout = require_layered.getLayeredLayout;
|
|
175
|
+
exports.getLayout = getLayout;
|
|
176
|
+
exports.getLayoutAlgorithm = getLayoutAlgorithm;
|
|
177
|
+
exports.getLayoutRoutes = require_routing.getLayoutRoutes;
|
|
178
|
+
exports.getPathBounds = require_routing.getPathBounds;
|
|
179
|
+
exports.getPathLength = require_routing.getPathLength;
|
|
180
|
+
exports.getPointAtLength = require_routing.getPointAtLength;
|
|
181
|
+
exports.getRandomLayout = require_layout_engine.getRandomLayout;
|
|
182
|
+
exports.getRectanglePackingLayout = require_layout_engine.getRectanglePackingLayout;
|
|
183
|
+
exports.getSporeCompactionLayout = require_layout_engine.getSporeCompactionLayout;
|
|
184
|
+
exports.getSporeOverlapRemovalLayout = require_layout_engine.getSporeOverlapRemovalLayout;
|
|
185
|
+
exports.getTangentAtLength = require_routing.getTangentAtLength;
|
|
186
|
+
exports.layeredAlgorithm = require_layered.layeredAlgorithm;
|
|
187
|
+
exports.minimizeCrossingsInteractively = require_layered.minimizeCrossingsInteractively;
|
|
188
|
+
exports.minimizeCrossingsWithBarycenter = require_layered.minimizeCrossingsWithBarycenter;
|
|
189
|
+
exports.minimizeCrossingsWithMedian = require_layered.minimizeCrossingsWithMedian;
|
|
190
|
+
exports.minimizeCrossingsWithModelOrder = require_layered.minimizeCrossingsWithModelOrder;
|
|
191
|
+
exports.octilinearRouting = require_routing.octilinearRouting;
|
|
192
|
+
exports.organicRouting = require_routing.organicRouting;
|
|
193
|
+
exports.orthogonalRouting = require_routing.orthogonalRouting;
|
|
194
|
+
exports.parallelRouting = require_routing.parallelRouting;
|
|
195
|
+
exports.pathFromPoints = require_routing.pathFromPoints;
|
|
196
|
+
exports.pathFromSplinePoints = require_routing.pathFromSplinePoints;
|
|
197
|
+
exports.placeNodesInLayers = require_layered.placeNodesInLayers;
|
|
198
|
+
exports.placeNodesInteractively = require_layered.placeNodesInteractively;
|
|
199
|
+
exports.polylineRouting = require_routing.polylineRouting;
|
|
200
|
+
exports.randomAlgorithm = require_layout_engine.randomAlgorithm;
|
|
201
|
+
exports.rectanglePackingAlgorithm = require_layout_engine.rectanglePackingAlgorithm;
|
|
202
|
+
exports.registerLayoutAlgorithm = registerLayoutAlgorithm;
|
|
203
|
+
exports.roundCorners = require_routing.roundCorners;
|
|
204
|
+
exports.routeEdgesOrthogonally = require_layered.routeEdgesOrthogonally;
|
|
205
|
+
exports.routeEdgesWithPolylines = require_layered.routeEdgesWithPolylines;
|
|
206
|
+
exports.routeEdgesWithSplines = require_layered.routeEdgesWithSplines;
|
|
207
|
+
exports.routeToGraphPatch = require_routing.routeToGraphPatch;
|
|
208
|
+
exports.routeToPolylines = require_routing.routeToPolylines;
|
|
209
|
+
exports.routingStrategies = require_routing.routingStrategies;
|
|
210
|
+
exports.selfLoopRouting = require_routing.selfLoopRouting;
|
|
211
|
+
exports.sporeCompactionAlgorithm = require_layout_engine.sporeCompactionAlgorithm;
|
|
212
|
+
exports.sporeOverlapRemovalAlgorithm = require_layout_engine.sporeOverlapRemovalAlgorithm;
|
|
213
|
+
exports.straightRouting = require_routing.straightRouting;
|
|
214
|
+
exports.toElkLayeredOptions = require_layered.toElkLayeredOptions;
|
|
215
|
+
exports.toSvgPath = require_routing.toSvgPath;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { _ as RoutingMetrics, a as RouteBounds, b as RoutingStrategy, c as RoutePath, d as RouteSegment, f as RouteSide, g as RoutingGraph, h as RoutingDiagnosticCode, i as RouteAttachment, l as RoutePoint, m as RoutingDiagnostic, n as NativeRoutingStrategy, o as RouteEndpoint, p as RouteStyle, r as Route, s as RoutePatch, t as EdgeRoutingSettings, u as RouteSection, v as RoutingSettings, x as RoutingUpdate, y as RoutingSnapshot } from "./types-uxPlGRof.cjs";
|
|
2
|
+
import { $ as CrossingMinimizationStrategy, A as routeEdgesOrthogonally, At as PinConstraint, B as EdgeRouter, C as breakCyclesWithModelOrderDepthFirstSearch, Ct as AlignConstraint, D as minimizeCrossingsWithModelOrder, Dt as GeometryReference, E as minimizeCrossingsWithMedian, Et as GeometryAttribute, F as CompoundEdgeAttachment, G as LayeredLayoutOptions, H as LayerAssigner, I as CompoundLayoutGeometry, J as LayeredStrategies, K as LayeredPhaseInput, L as CompoundLayoutOptions, M as routeEdgesWithSplines, Mt as c, N as CompoundVisualGraph, O as placeNodesInLayers, Ot as LayoutConstraint, P as AcyclicOrientation, Q as NodeSize, R as CrossingMinimizer, S as breakCyclesWithModelOrderBreadthFirstSearch, St as LayoutScope, T as minimizeCrossingsWithBarycenter, Tt as DistributeConstraint, U as LayerAssignment, V as EdgeRoutes, W as LayerOrder, X as NodePlacement, Y as LayoutPadding, Z as NodePlacer, _ as breakCyclesByStronglyConnectedNodeType, _t as LayoutExecutionContext, at as fromElkLayeredOptionId, b as breakCyclesInteractively, bt as LayoutRequest, c as assignLayersWithNetworkSimplex, ct as ElkLayeredOptionId, d as assignLayersByLongestPath, dt as elkLayeredOptionDefinitions, et as CycleBreakingStrategy, f as assignLayersByLongestPathToSink, ft as AnyGraph, g as breakCyclesByStronglyConnectedConnectivity, gt as LayoutDirection, h as breakCyclesByModelOrder, ht as LayoutDiagnostic, it as NodePlacementStrategy, j as routeEdgesWithPolylines, jt as WaypointConstraint, k as placeNodesInteractively, kt as LinearConstraint, l as assignLayersByBreadthFirstModelOrder, lt as ElkLayeredOptionName, m as assignLayersWithCoffmanGraham, mt as LayoutCapabilities, n as layeredAlgorithm, nt as LayeredAdvancedOptions, o as assignLayersWithStretchWidth, ot as toElkLayeredOptions, p as assignLayersInteractively, pt as LayoutAlgorithm, q as LayeredSpacing, rt as LayeringStrategy, s as assignLayersWithMinWidth, st as elkLayeredEnumValues, t as getLayeredLayout, tt as EdgeRoutingStyle, u as assignLayersByDepthFirstModelOrder, ut as ElkLayeredOptionValueByName, v as breakCyclesGreedily, vt as LayoutMetrics, w as minimizeCrossingsInteractively, wt as ConstraintStrength, x as breakCyclesWithDepthFirstSearch, xt as LayoutResult, y as breakCyclesGreedilyByModelOrder, yt as LayoutPhaseMetrics, z as CycleBreaker } from "./index-D9dhxrRl.cjs";
|
|
3
|
+
import { C as getTangentAtLength, D as applyRoutePatches, E as toSvgPath, S as getPointAtLength, T as roundCorners, _ as routeToPolylines, a as fanRouting, b as getPathBounds, c as orthogonalRouting, d as routingStrategies, f as selfLoopRouting, g as routeToGraphPatch, h as pathFromSplinePoints, i as curvedRouting, l as parallelRouting, m as getLayoutRoutes, n as bundleRouting, o as octilinearRouting, p as straightRouting, r as busRouting, s as organicRouting, t as bezierRouting, u as polylineRouting, v as FlattenPathOptions, w as pathFromPoints, x as getPathLength, y as flattenPath } from "./index-BEA_pzeT.cjs";
|
|
4
|
+
import { Graph, GraphNode, VisualGraph } from "@statelyai/graph";
|
|
5
|
+
import { LayoutOptions } from "@statelyai/graph/layout";
|
|
6
|
+
|
|
7
|
+
//#region src/errors.d.ts
|
|
8
|
+
declare class LayoutError extends Error {
|
|
9
|
+
readonly code: string;
|
|
10
|
+
constructor(message: string, code: string);
|
|
11
|
+
}
|
|
12
|
+
declare class UnsupportedLayoutError extends LayoutError {
|
|
13
|
+
constructor(message: string);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/box.d.ts
|
|
17
|
+
interface BoxLayoutOptions extends Pick<LayoutOptions, "direction" | "measure"> {
|
|
18
|
+
spacing?: number;
|
|
19
|
+
padding?: number | Partial<LayoutPadding>;
|
|
20
|
+
aspectRatio?: number;
|
|
21
|
+
interactive?: boolean;
|
|
22
|
+
expandNodes?: boolean;
|
|
23
|
+
priority?: (node: GraphNode) => number | undefined;
|
|
24
|
+
}
|
|
25
|
+
/** ELK Box SIMPLE packing translated onto `@statelyai/graph`. */
|
|
26
|
+
declare function getBoxLayout<N, E, G, P>(graph: Graph<N, E, G, P> | VisualGraph<N, E, G, P>, options?: BoxLayoutOptions): VisualGraph<N, E, G, P>;
|
|
27
|
+
declare const boxAlgorithm: LayoutAlgorithm<BoxLayoutOptions>;
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/fixed.d.ts
|
|
30
|
+
interface FixedLayoutOptions extends Pick<LayoutOptions, "direction" | "measure"> {}
|
|
31
|
+
/** Preserve authored positions and routes while completing visual geometry. */
|
|
32
|
+
declare function getFixedLayout<N, E, G, P>(graph: Graph<N, E, G, P> | VisualGraph<N, E, G, P>, options?: FixedLayoutOptions): VisualGraph<N, E, G, P>;
|
|
33
|
+
declare const fixedAlgorithm: LayoutAlgorithm<FixedLayoutOptions>;
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/packing.d.ts
|
|
36
|
+
interface RectanglePackingLayoutOptions extends Pick<LayoutOptions, "direction" | "measure"> {
|
|
37
|
+
spacing?: number;
|
|
38
|
+
padding?: number | Partial<LayoutPadding>;
|
|
39
|
+
targetWidth?: number;
|
|
40
|
+
}
|
|
41
|
+
/** Deterministic shelf-based rectangle packing for `@statelyai/graph`. */
|
|
42
|
+
declare function getRectanglePackingLayout<N, E, G, P>(graph: Graph<N, E, G, P> | VisualGraph<N, E, G, P>, options?: RectanglePackingLayoutOptions): VisualGraph<N, E, G, P>;
|
|
43
|
+
declare const rectanglePackingAlgorithm: LayoutAlgorithm<RectanglePackingLayoutOptions>;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/random.d.ts
|
|
46
|
+
interface RandomLayoutOptions extends Pick<LayoutOptions, "direction" | "measure"> {
|
|
47
|
+
spacing?: number;
|
|
48
|
+
padding?: number | Partial<LayoutPadding>;
|
|
49
|
+
aspectRatio?: number;
|
|
50
|
+
seed?: number;
|
|
51
|
+
}
|
|
52
|
+
/** Seeded random distribution using Java's 48-bit `Random` sequence. */
|
|
53
|
+
declare function getRandomLayout<N, E, G, P>(graph: Graph<N, E, G, P> | VisualGraph<N, E, G, P>, options?: RandomLayoutOptions): VisualGraph<N, E, G, P>;
|
|
54
|
+
declare const randomAlgorithm: LayoutAlgorithm<RandomLayoutOptions>;
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/spore.d.ts
|
|
57
|
+
interface SporeLayoutOptions extends Pick<LayoutOptions, "direction" | "measure"> {
|
|
58
|
+
spacing?: number;
|
|
59
|
+
padding?: number | Partial<LayoutPadding>;
|
|
60
|
+
}
|
|
61
|
+
/** Compact an existing layout while preserving its relative directions. */
|
|
62
|
+
declare function getSporeCompactionLayout<N, E, G, P>(graph: Graph<N, E, G, P> | VisualGraph<N, E, G, P>, options?: SporeLayoutOptions): VisualGraph<N, E, G, P>;
|
|
63
|
+
/** Remove overlap while preserving existing distances that already fit. */
|
|
64
|
+
declare function getSporeOverlapRemovalLayout<N, E, G, P>(graph: Graph<N, E, G, P> | VisualGraph<N, E, G, P>, options?: SporeLayoutOptions): VisualGraph<N, E, G, P>;
|
|
65
|
+
declare const sporeCompactionAlgorithm: LayoutAlgorithm<SporeLayoutOptions>;
|
|
66
|
+
declare const sporeOverlapRemovalAlgorithm: LayoutAlgorithm<SporeLayoutOptions>;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/layout.d.ts
|
|
69
|
+
/** Register or replace a layout algorithm for subsequent `getLayout` calls. */
|
|
70
|
+
declare function registerLayoutAlgorithm<O>(algorithm: LayoutAlgorithm<O>): () => void;
|
|
71
|
+
declare function getLayoutAlgorithm(id: string): LayoutAlgorithm<unknown> | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Run a registered or inline algorithm against an `@statelyai/graph` graph.
|
|
74
|
+
* The input is not mutated.
|
|
75
|
+
*/
|
|
76
|
+
declare function getLayout<N, E, G, P, O = unknown>(request: LayoutRequest<N, E, G, P, O>): Promise<LayoutResult<N, E, G, P>>;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { type AcyclicOrientation, type AlignConstraint, type AnyGraph, type BoxLayoutOptions, type CompoundEdgeAttachment, type CompoundLayoutGeometry, type CompoundLayoutOptions, type CompoundVisualGraph, type ConstraintStrength, type CrossingMinimizationStrategy, type CrossingMinimizer, type CycleBreaker, type CycleBreakingStrategy, type DistributeConstraint, type EdgeRouter, type EdgeRoutes, EdgeRoutingSettings, type EdgeRoutingStyle, type ElkLayeredOptionId, type ElkLayeredOptionName, type ElkLayeredOptionValueByName, type FixedLayoutOptions, FlattenPathOptions, type GeometryAttribute, type GeometryReference, type LayerAssigner, type LayerAssignment, type LayerOrder, type LayeredAdvancedOptions, type LayeredLayoutOptions, type LayeredPhaseInput, type LayeredSpacing, type LayeredStrategies, type LayeringStrategy, type LayoutAlgorithm, type LayoutCapabilities, type LayoutConstraint, type LayoutDiagnostic, type LayoutDirection, LayoutError, type LayoutExecutionContext, type LayoutMetrics, type LayoutPadding, type LayoutPhaseMetrics, type LayoutRequest, type LayoutResult, type LayoutScope, type LinearConstraint, NativeRoutingStrategy, type NodePlacement, type NodePlacementStrategy, type NodePlacer, type NodeSize, type PinConstraint, type RandomLayoutOptions, type RectanglePackingLayoutOptions, Route, RouteAttachment, RouteBounds, RouteEndpoint, RoutePatch, RoutePath, RoutePoint, RouteSection, RouteSegment, RouteSide, RouteStyle, RoutingDiagnostic, RoutingDiagnosticCode, RoutingGraph, RoutingMetrics, RoutingSettings, RoutingSnapshot, RoutingStrategy, RoutingUpdate, type SporeLayoutOptions, UnsupportedLayoutError, type WaypointConstraint, applyRoutePatches, assignLayersByBreadthFirstModelOrder, assignLayersByDepthFirstModelOrder, assignLayersByLongestPath, assignLayersByLongestPathToSink, assignLayersInteractively, assignLayersWithCoffmanGraham, assignLayersWithMinWidth, assignLayersWithNetworkSimplex, assignLayersWithStretchWidth, bezierRouting, boxAlgorithm, breakCyclesByModelOrder, breakCyclesByStronglyConnectedConnectivity, breakCyclesByStronglyConnectedNodeType, breakCyclesGreedily, breakCyclesGreedilyByModelOrder, breakCyclesInteractively, breakCyclesWithDepthFirstSearch, breakCyclesWithModelOrderBreadthFirstSearch, breakCyclesWithModelOrderDepthFirstSearch, bundleRouting, busRouting, c, curvedRouting, elkLayeredEnumValues, elkLayeredOptionDefinitions, fanRouting, fixedAlgorithm, flattenPath, fromElkLayeredOptionId, getBoxLayout, getFixedLayout, getLayeredLayout, getLayout, getLayoutAlgorithm, getLayoutRoutes, getPathBounds, getPathLength, getPointAtLength, getRandomLayout, getRectanglePackingLayout, getSporeCompactionLayout, getSporeOverlapRemovalLayout, getTangentAtLength, layeredAlgorithm, minimizeCrossingsInteractively, minimizeCrossingsWithBarycenter, minimizeCrossingsWithMedian, minimizeCrossingsWithModelOrder, octilinearRouting, organicRouting, orthogonalRouting, parallelRouting, pathFromPoints, pathFromSplinePoints, placeNodesInLayers, placeNodesInteractively, polylineRouting, randomAlgorithm, rectanglePackingAlgorithm, registerLayoutAlgorithm, roundCorners, routeEdgesOrthogonally, routeEdgesWithPolylines, routeEdgesWithSplines, routeToGraphPatch, routeToPolylines, routingStrategies, selfLoopRouting, sporeCompactionAlgorithm, sporeOverlapRemovalAlgorithm, straightRouting, toElkLayeredOptions, toSvgPath };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as RoutingMetrics, a as RouteBounds, b as RoutingStrategy, c as RoutePath, d as RouteSegment, f as RouteSide, g as RoutingGraph, h as RoutingDiagnosticCode, i as RouteAttachment, l as RoutePoint, m as RoutingDiagnostic, n as NativeRoutingStrategy, o as RouteEndpoint, p as RouteStyle, r as Route, s as RoutePatch, t as EdgeRoutingSettings, u as RouteSection, v as RoutingSettings, x as RoutingUpdate, y as RoutingSnapshot } from "./types-CT2akdK0.mjs";
|
|
2
|
+
import { $ as CrossingMinimizationStrategy, A as routeEdgesOrthogonally, At as PinConstraint, B as EdgeRouter, C as breakCyclesWithModelOrderDepthFirstSearch, Ct as AlignConstraint, D as minimizeCrossingsWithModelOrder, Dt as GeometryReference, E as minimizeCrossingsWithMedian, Et as GeometryAttribute, F as CompoundEdgeAttachment, G as LayeredLayoutOptions, H as LayerAssigner, I as CompoundLayoutGeometry, J as LayeredStrategies, K as LayeredPhaseInput, L as CompoundLayoutOptions, M as routeEdgesWithSplines, Mt as c, N as CompoundVisualGraph, O as placeNodesInLayers, Ot as LayoutConstraint, P as AcyclicOrientation, Q as NodeSize, R as CrossingMinimizer, S as breakCyclesWithModelOrderBreadthFirstSearch, St as LayoutScope, T as minimizeCrossingsWithBarycenter, Tt as DistributeConstraint, U as LayerAssignment, V as EdgeRoutes, W as LayerOrder, X as NodePlacement, Y as LayoutPadding, Z as NodePlacer, _ as breakCyclesByStronglyConnectedNodeType, _t as LayoutExecutionContext, at as fromElkLayeredOptionId, b as breakCyclesInteractively, bt as LayoutRequest, c as assignLayersWithNetworkSimplex, ct as ElkLayeredOptionId, d as assignLayersByLongestPath, dt as elkLayeredOptionDefinitions, et as CycleBreakingStrategy, f as assignLayersByLongestPathToSink, ft as AnyGraph, g as breakCyclesByStronglyConnectedConnectivity, gt as LayoutDirection, h as breakCyclesByModelOrder, ht as LayoutDiagnostic, it as NodePlacementStrategy, j as routeEdgesWithPolylines, jt as WaypointConstraint, k as placeNodesInteractively, kt as LinearConstraint, l as assignLayersByBreadthFirstModelOrder, lt as ElkLayeredOptionName, m as assignLayersWithCoffmanGraham, mt as LayoutCapabilities, n as layeredAlgorithm, nt as LayeredAdvancedOptions, o as assignLayersWithStretchWidth, ot as toElkLayeredOptions, p as assignLayersInteractively, pt as LayoutAlgorithm, q as LayeredSpacing, rt as LayeringStrategy, s as assignLayersWithMinWidth, st as elkLayeredEnumValues, t as getLayeredLayout, tt as EdgeRoutingStyle, u as assignLayersByDepthFirstModelOrder, ut as ElkLayeredOptionValueByName, v as breakCyclesGreedily, vt as LayoutMetrics, w as minimizeCrossingsInteractively, wt as ConstraintStrength, x as breakCyclesWithDepthFirstSearch, xt as LayoutResult, y as breakCyclesGreedilyByModelOrder, yt as LayoutPhaseMetrics, z as CycleBreaker } from "./index-DNixtE3h.mjs";
|
|
3
|
+
import { C as getTangentAtLength, D as applyRoutePatches, E as toSvgPath, S as getPointAtLength, T as roundCorners, _ as routeToPolylines, a as fanRouting, b as getPathBounds, c as orthogonalRouting, d as routingStrategies, f as selfLoopRouting, g as routeToGraphPatch, h as pathFromSplinePoints, i as curvedRouting, l as parallelRouting, m as getLayoutRoutes, n as bundleRouting, o as octilinearRouting, p as straightRouting, r as busRouting, s as organicRouting, t as bezierRouting, u as polylineRouting, v as FlattenPathOptions, w as pathFromPoints, x as getPathLength, y as flattenPath } from "./index-DNTLRsDl.mjs";
|
|
2
4
|
import { LayoutOptions } from "@statelyai/graph/layout";
|
|
3
5
|
import { Graph, GraphNode, VisualGraph } from "@statelyai/graph";
|
|
4
6
|
|
|
@@ -12,7 +14,6 @@ declare class UnsupportedLayoutError extends LayoutError {
|
|
|
12
14
|
}
|
|
13
15
|
//#endregion
|
|
14
16
|
//#region src/box.d.ts
|
|
15
|
-
|
|
16
17
|
interface BoxLayoutOptions extends Pick<LayoutOptions, "direction" | "measure"> {
|
|
17
18
|
spacing?: number;
|
|
18
19
|
padding?: number | Partial<LayoutPadding>;
|
|
@@ -74,4 +75,4 @@ declare function getLayoutAlgorithm(id: string): LayoutAlgorithm<unknown> | unde
|
|
|
74
75
|
*/
|
|
75
76
|
declare function getLayout<N, E, G, P, O = unknown>(request: LayoutRequest<N, E, G, P, O>): Promise<LayoutResult<N, E, G, P>>;
|
|
76
77
|
//#endregion
|
|
77
|
-
export { type AcyclicOrientation, type AnyGraph, type BoxLayoutOptions, type CrossingMinimizationStrategy, type CrossingMinimizer, type CycleBreaker, type CycleBreakingStrategy, type EdgeRouter, type EdgeRoutes, type EdgeRoutingStyle, type ElkLayeredOptionId, type ElkLayeredOptionName, type ElkLayeredOptionValueByName, type FixedLayoutOptions, type LayerAssigner, type LayerAssignment, type LayerOrder, type LayeredAdvancedOptions, type LayeredLayoutOptions, type LayeredPhaseInput, type LayeredSpacing, type LayeredStrategies, type LayeringStrategy, type LayoutAlgorithm, type LayoutCapabilities, type LayoutDiagnostic, type LayoutDirection, LayoutError, type LayoutExecutionContext, type LayoutMetrics, type LayoutPadding, type LayoutPhaseMetrics, type LayoutRequest, type LayoutResult, type LayoutScope, type NodePlacement, type NodePlacementStrategy, type NodePlacer, type NodeSize, type RandomLayoutOptions, type RectanglePackingLayoutOptions, type SporeLayoutOptions, UnsupportedLayoutError, assignLayersByBreadthFirstModelOrder, assignLayersByDepthFirstModelOrder, assignLayersByLongestPath, assignLayersByLongestPathToSink, assignLayersInteractively, assignLayersWithCoffmanGraham, assignLayersWithMinWidth, assignLayersWithNetworkSimplex, assignLayersWithStretchWidth, boxAlgorithm, breakCyclesByModelOrder, breakCyclesByStronglyConnectedConnectivity, breakCyclesByStronglyConnectedNodeType, breakCyclesGreedily, breakCyclesGreedilyByModelOrder, breakCyclesInteractively, breakCyclesWithDepthFirstSearch, breakCyclesWithModelOrderBreadthFirstSearch, breakCyclesWithModelOrderDepthFirstSearch, elkLayeredEnumValues, elkLayeredOptionDefinitions, fixedAlgorithm, fromElkLayeredOptionId, getBoxLayout, getFixedLayout, getLayeredLayout, getLayout, getLayoutAlgorithm, getRandomLayout, getRectanglePackingLayout, getSporeCompactionLayout, getSporeOverlapRemovalLayout, layeredAlgorithm, minimizeCrossingsInteractively, minimizeCrossingsWithBarycenter, minimizeCrossingsWithMedian, minimizeCrossingsWithModelOrder, placeNodesInLayers, placeNodesInteractively, randomAlgorithm, rectanglePackingAlgorithm, registerLayoutAlgorithm, routeEdgesOrthogonally, routeEdgesWithPolylines, routeEdgesWithSplines, sporeCompactionAlgorithm, sporeOverlapRemovalAlgorithm, toElkLayeredOptions };
|
|
78
|
+
export { type AcyclicOrientation, type AlignConstraint, type AnyGraph, type BoxLayoutOptions, type CompoundEdgeAttachment, type CompoundLayoutGeometry, type CompoundLayoutOptions, type CompoundVisualGraph, type ConstraintStrength, type CrossingMinimizationStrategy, type CrossingMinimizer, type CycleBreaker, type CycleBreakingStrategy, type DistributeConstraint, type EdgeRouter, type EdgeRoutes, EdgeRoutingSettings, type EdgeRoutingStyle, type ElkLayeredOptionId, type ElkLayeredOptionName, type ElkLayeredOptionValueByName, type FixedLayoutOptions, FlattenPathOptions, type GeometryAttribute, type GeometryReference, type LayerAssigner, type LayerAssignment, type LayerOrder, type LayeredAdvancedOptions, type LayeredLayoutOptions, type LayeredPhaseInput, type LayeredSpacing, type LayeredStrategies, type LayeringStrategy, type LayoutAlgorithm, type LayoutCapabilities, type LayoutConstraint, type LayoutDiagnostic, type LayoutDirection, LayoutError, type LayoutExecutionContext, type LayoutMetrics, type LayoutPadding, type LayoutPhaseMetrics, type LayoutRequest, type LayoutResult, type LayoutScope, type LinearConstraint, NativeRoutingStrategy, type NodePlacement, type NodePlacementStrategy, type NodePlacer, type NodeSize, type PinConstraint, type RandomLayoutOptions, type RectanglePackingLayoutOptions, Route, RouteAttachment, RouteBounds, RouteEndpoint, RoutePatch, RoutePath, RoutePoint, RouteSection, RouteSegment, RouteSide, RouteStyle, RoutingDiagnostic, RoutingDiagnosticCode, RoutingGraph, RoutingMetrics, RoutingSettings, RoutingSnapshot, RoutingStrategy, RoutingUpdate, type SporeLayoutOptions, UnsupportedLayoutError, type WaypointConstraint, applyRoutePatches, assignLayersByBreadthFirstModelOrder, assignLayersByDepthFirstModelOrder, assignLayersByLongestPath, assignLayersByLongestPathToSink, assignLayersInteractively, assignLayersWithCoffmanGraham, assignLayersWithMinWidth, assignLayersWithNetworkSimplex, assignLayersWithStretchWidth, bezierRouting, boxAlgorithm, breakCyclesByModelOrder, breakCyclesByStronglyConnectedConnectivity, breakCyclesByStronglyConnectedNodeType, breakCyclesGreedily, breakCyclesGreedilyByModelOrder, breakCyclesInteractively, breakCyclesWithDepthFirstSearch, breakCyclesWithModelOrderBreadthFirstSearch, breakCyclesWithModelOrderDepthFirstSearch, bundleRouting, busRouting, c, curvedRouting, elkLayeredEnumValues, elkLayeredOptionDefinitions, fanRouting, fixedAlgorithm, flattenPath, fromElkLayeredOptionId, getBoxLayout, getFixedLayout, getLayeredLayout, getLayout, getLayoutAlgorithm, getLayoutRoutes, getPathBounds, getPathLength, getPointAtLength, getRandomLayout, getRectanglePackingLayout, getSporeCompactionLayout, getSporeOverlapRemovalLayout, getTangentAtLength, layeredAlgorithm, minimizeCrossingsInteractively, minimizeCrossingsWithBarycenter, minimizeCrossingsWithMedian, minimizeCrossingsWithModelOrder, octilinearRouting, organicRouting, orthogonalRouting, parallelRouting, pathFromPoints, pathFromSplinePoints, placeNodesInLayers, placeNodesInteractively, polylineRouting, randomAlgorithm, rectanglePackingAlgorithm, registerLayoutAlgorithm, roundCorners, routeEdgesOrthogonally, routeEdgesWithPolylines, routeEdgesWithSplines, routeToGraphPatch, routeToPolylines, routingStrategies, selfLoopRouting, sporeCompactionAlgorithm, sporeOverlapRemovalAlgorithm, straightRouting, toElkLayeredOptions, toSvgPath };
|
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { a as
|
|
1
|
+
import { A as toSvgPath, C as flattenPath, D as getTangentAtLength, E as getPointAtLength, F as UnsupportedLayoutError, O as pathFromPoints, P as LayoutError, T as getPathLength, _ as routeToPolylines, a as fanRouting, c as orthogonalRouting, d as routingStrategies, f as selfLoopRouting, g as routeToGraphPatch, h as pathFromSplinePoints, i as curvedRouting, k as roundCorners, l as parallelRouting, m as getLayoutRoutes, n as bundleRouting, o as octilinearRouting, p as straightRouting, r as busRouting, s as organicRouting, t as bezierRouting, u as polylineRouting, w as getPathBounds, x as applyRoutePatches } from "./routing-A2hrK9MP.mjs";
|
|
2
|
+
import { A as minimizeCrossingsInteractively, C as breakCyclesGreedily, D as breakCyclesWithModelOrderBreadthFirstSearch, E as breakCyclesWithDepthFirstSearch, F as placeNodesInteractively, L as routeEdgesOrthogonally, M as minimizeCrossingsWithMedian, N as minimizeCrossingsWithModelOrder, O as breakCyclesWithModelOrderDepthFirstSearch, P as placeNodesInLayers, R as routeEdgesWithPolylines, S as breakCyclesByStronglyConnectedNodeType, T as breakCyclesInteractively, _ as assignLayersByLongestPathToSink, a as elkLayeredEnumValues, b as breakCyclesByModelOrder, d as assignLayersWithMinWidth, f as assignLayersWithNetworkSimplex, g as assignLayersByLongestPath, h as assignLayersByDepthFirstModelOrder, i as toElkLayeredOptions, j as minimizeCrossingsWithBarycenter, m as assignLayersByBreadthFirstModelOrder, n as layeredAlgorithm, o as elkLayeredOptionDefinitions, p as c, r as fromElkLayeredOptionId, t as getLayeredLayout, u as assignLayersWithStretchWidth, v as assignLayersInteractively, w as breakCyclesGreedilyByModelOrder, x as breakCyclesByStronglyConnectedConnectivity, y as assignLayersWithCoffmanGraham, z as routeEdgesWithSplines } from "./layered-DGFTeQSl.mjs";
|
|
3
|
+
import { _ as getFixedLayout, a as getSporeCompactionLayout, c as sporeOverlapRemovalAlgorithm, d as getRectanglePackingLayout, f as rectanglePackingAlgorithm, g as fixedAlgorithm, i as getBuiltInLayoutAlgorithm, l as getRandomLayout, m as getBoxLayout, o as getSporeOverlapRemovalLayout, p as boxAlgorithm, r as executeLayoutAlgorithm, s as sporeCompactionAlgorithm, t as builtInLayoutAlgorithms, u as randomAlgorithm } from "./layout-engine-Cs5tatA6.mjs";
|
|
3
4
|
import { getGraphIssues } from "@statelyai/graph";
|
|
4
5
|
|
|
5
6
|
//#region src/layout.ts
|
|
6
|
-
const algorithms = new Map([
|
|
7
|
-
["box", boxAlgorithm],
|
|
8
|
-
["layered", layeredAlgorithm],
|
|
9
|
-
["fixed", fixedAlgorithm],
|
|
10
|
-
["rectpacking", rectanglePackingAlgorithm],
|
|
11
|
-
["random", randomAlgorithm],
|
|
12
|
-
["sporeCompaction", sporeCompactionAlgorithm],
|
|
13
|
-
["sporeOverlap", sporeOverlapRemovalAlgorithm]
|
|
14
|
-
]);
|
|
7
|
+
const algorithms = new Map(Object.entries(builtInLayoutAlgorithms).map(([id, algorithm]) => [id, algorithm]));
|
|
15
8
|
function supportsScope(algorithm, scope) {
|
|
16
9
|
switch (scope.mode) {
|
|
17
10
|
case "full": return algorithm.capabilities.full;
|
|
@@ -39,11 +32,11 @@ function getLayoutPatches(input, output) {
|
|
|
39
32
|
op: "updateNode",
|
|
40
33
|
id: node.id,
|
|
41
34
|
data: {
|
|
42
|
-
x: next.x,
|
|
43
|
-
y: next.y,
|
|
44
|
-
width: next.width,
|
|
45
|
-
height: next.height,
|
|
46
|
-
...
|
|
35
|
+
...node.x === next.x ? {} : { x: next.x ?? null },
|
|
36
|
+
...node.y === next.y ? {} : { y: next.y ?? null },
|
|
37
|
+
...node.width === next.width ? {} : { width: next.width ?? null },
|
|
38
|
+
...node.height === next.height ? {} : { height: next.height ?? null },
|
|
39
|
+
...node.ports === next.ports ? {} : { ports: next.ports ?? null }
|
|
47
40
|
},
|
|
48
41
|
description: "Apply layout geometry"
|
|
49
42
|
});
|
|
@@ -55,12 +48,12 @@ function getLayoutPatches(input, output) {
|
|
|
55
48
|
op: "updateEdge",
|
|
56
49
|
id: edge.id,
|
|
57
50
|
data: {
|
|
58
|
-
x: next.x,
|
|
59
|
-
y: next.y,
|
|
60
|
-
width: next.width,
|
|
61
|
-
height: next.height,
|
|
62
|
-
...
|
|
63
|
-
...next.points
|
|
51
|
+
...edge.x === next.x ? {} : { x: next.x ?? null },
|
|
52
|
+
...edge.y === next.y ? {} : { y: next.y ?? null },
|
|
53
|
+
...edge.width === next.width ? {} : { width: next.width ?? null },
|
|
54
|
+
...edge.height === next.height ? {} : { height: next.height ?? null },
|
|
55
|
+
...edge.routing === next.routing ? {} : { routing: next.routing ?? null },
|
|
56
|
+
...samePoints(edge.points, next.points) ? {} : { points: next.points ?? null }
|
|
64
57
|
},
|
|
65
58
|
description: "Apply layout geometry"
|
|
66
59
|
});
|
|
@@ -77,7 +70,7 @@ function registerLayoutAlgorithm(algorithm) {
|
|
|
77
70
|
};
|
|
78
71
|
}
|
|
79
72
|
function getLayoutAlgorithm(id) {
|
|
80
|
-
return algorithms.get(id);
|
|
73
|
+
return algorithms.get(id) ?? getBuiltInLayoutAlgorithm(id);
|
|
81
74
|
}
|
|
82
75
|
/**
|
|
83
76
|
* Run a registered or inline algorithm against an `@statelyai/graph` graph.
|
|
@@ -91,10 +84,12 @@ async function getLayout(request) {
|
|
|
91
84
|
const algorithm = typeof request.algorithm === "object" ? request.algorithm : getLayoutAlgorithm(request.algorithm ?? "layered");
|
|
92
85
|
if (!algorithm) throw new LayoutError(`Unknown layout algorithm: ${request.algorithm ?? "layered"}`, "UNKNOWN_ALGORITHM");
|
|
93
86
|
if (!supportsScope(algorithm, scope)) throw new UnsupportedLayoutError(`${algorithm.id} does not support ${scope.mode} layout yet`);
|
|
87
|
+
if (request.constraints?.length && !algorithm.capabilities.constraints) throw new UnsupportedLayoutError(`${algorithm.id} does not support geometry constraints`);
|
|
94
88
|
const issues = getGraphIssues(request.graph);
|
|
95
89
|
if (issues.length > 0) throw new LayoutError(issues.map((issue) => issue.message).join("; "), "INVALID_GRAPH");
|
|
96
90
|
const context = {
|
|
97
91
|
scope,
|
|
92
|
+
constraints: request.constraints,
|
|
98
93
|
diagnostics,
|
|
99
94
|
...request.signal === void 0 ? {} : { signal: request.signal },
|
|
100
95
|
measurePhase(id, run) {
|
|
@@ -120,7 +115,12 @@ async function getLayout(request) {
|
|
|
120
115
|
}
|
|
121
116
|
};
|
|
122
117
|
context.throwIfAborted();
|
|
123
|
-
const graph = await
|
|
118
|
+
const graph = await executeLayoutAlgorithm({
|
|
119
|
+
algorithm,
|
|
120
|
+
graph: request.graph,
|
|
121
|
+
options: request.options,
|
|
122
|
+
context
|
|
123
|
+
});
|
|
124
124
|
context.throwIfAborted();
|
|
125
125
|
return {
|
|
126
126
|
graph,
|
|
@@ -136,4 +136,4 @@ async function getLayout(request) {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
//#endregion
|
|
139
|
-
export { LayoutError, UnsupportedLayoutError, assignLayersByBreadthFirstModelOrder, assignLayersByDepthFirstModelOrder, assignLayersByLongestPath, assignLayersByLongestPathToSink, assignLayersInteractively, assignLayersWithCoffmanGraham, assignLayersWithMinWidth, assignLayersWithNetworkSimplex, assignLayersWithStretchWidth, boxAlgorithm, breakCyclesByModelOrder, breakCyclesByStronglyConnectedConnectivity, breakCyclesByStronglyConnectedNodeType, breakCyclesGreedily, breakCyclesGreedilyByModelOrder, breakCyclesInteractively, breakCyclesWithDepthFirstSearch, breakCyclesWithModelOrderBreadthFirstSearch, breakCyclesWithModelOrderDepthFirstSearch, elkLayeredEnumValues, elkLayeredOptionDefinitions, fixedAlgorithm, fromElkLayeredOptionId, getBoxLayout, getFixedLayout, getLayeredLayout, getLayout, getLayoutAlgorithm, getRandomLayout, getRectanglePackingLayout, getSporeCompactionLayout, getSporeOverlapRemovalLayout, layeredAlgorithm, minimizeCrossingsInteractively, minimizeCrossingsWithBarycenter, minimizeCrossingsWithMedian, minimizeCrossingsWithModelOrder, placeNodesInLayers, placeNodesInteractively, randomAlgorithm, rectanglePackingAlgorithm, registerLayoutAlgorithm, routeEdgesOrthogonally, routeEdgesWithPolylines, routeEdgesWithSplines, sporeCompactionAlgorithm, sporeOverlapRemovalAlgorithm, toElkLayeredOptions };
|
|
139
|
+
export { LayoutError, UnsupportedLayoutError, applyRoutePatches, assignLayersByBreadthFirstModelOrder, assignLayersByDepthFirstModelOrder, assignLayersByLongestPath, assignLayersByLongestPathToSink, assignLayersInteractively, assignLayersWithCoffmanGraham, assignLayersWithMinWidth, assignLayersWithNetworkSimplex, assignLayersWithStretchWidth, bezierRouting, boxAlgorithm, breakCyclesByModelOrder, breakCyclesByStronglyConnectedConnectivity, breakCyclesByStronglyConnectedNodeType, breakCyclesGreedily, breakCyclesGreedilyByModelOrder, breakCyclesInteractively, breakCyclesWithDepthFirstSearch, breakCyclesWithModelOrderBreadthFirstSearch, breakCyclesWithModelOrderDepthFirstSearch, bundleRouting, busRouting, c, curvedRouting, elkLayeredEnumValues, elkLayeredOptionDefinitions, fanRouting, fixedAlgorithm, flattenPath, fromElkLayeredOptionId, getBoxLayout, getFixedLayout, getLayeredLayout, getLayout, getLayoutAlgorithm, getLayoutRoutes, getPathBounds, getPathLength, getPointAtLength, getRandomLayout, getRectanglePackingLayout, getSporeCompactionLayout, getSporeOverlapRemovalLayout, getTangentAtLength, layeredAlgorithm, minimizeCrossingsInteractively, minimizeCrossingsWithBarycenter, minimizeCrossingsWithMedian, minimizeCrossingsWithModelOrder, octilinearRouting, organicRouting, orthogonalRouting, parallelRouting, pathFromPoints, pathFromSplinePoints, placeNodesInLayers, placeNodesInteractively, polylineRouting, randomAlgorithm, rectanglePackingAlgorithm, registerLayoutAlgorithm, roundCorners, routeEdgesOrthogonally, routeEdgesWithPolylines, routeEdgesWithSplines, routeToGraphPatch, routeToPolylines, routingStrategies, selfLoopRouting, sporeCompactionAlgorithm, sporeOverlapRemovalAlgorithm, straightRouting, toElkLayeredOptions, toSvgPath };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const require_layered = require('../layered-B2buJqMf.cjs');
|
|
2
|
+
|
|
3
|
+
exports.assignLayersByBreadthFirstModelOrder = require_layered.assignLayersByBreadthFirstModelOrder;
|
|
4
|
+
exports.assignLayersByDepthFirstModelOrder = require_layered.assignLayersByDepthFirstModelOrder;
|
|
5
|
+
exports.assignLayersByLongestPath = require_layered.assignLayersByLongestPath;
|
|
6
|
+
exports.assignLayersByLongestPathToSink = require_layered.assignLayersByLongestPathToSink;
|
|
7
|
+
exports.assignLayersInteractively = require_layered.assignLayersInteractively;
|
|
8
|
+
exports.assignLayersWithCoffmanGraham = require_layered.assignLayersWithCoffmanGraham;
|
|
9
|
+
exports.assignLayersWithMinWidth = require_layered.assignLayersWithMinWidth;
|
|
10
|
+
exports.assignLayersWithNetworkSimplex = require_layered.assignLayersWithNetworkSimplex;
|
|
11
|
+
exports.assignLayersWithStretchWidth = require_layered.assignLayersWithStretchWidth;
|
|
12
|
+
exports.breakCyclesByModelOrder = require_layered.breakCyclesByModelOrder;
|
|
13
|
+
exports.breakCyclesByStronglyConnectedConnectivity = require_layered.breakCyclesByStronglyConnectedConnectivity;
|
|
14
|
+
exports.breakCyclesByStronglyConnectedNodeType = require_layered.breakCyclesByStronglyConnectedNodeType;
|
|
15
|
+
exports.breakCyclesGreedily = require_layered.breakCyclesGreedily;
|
|
16
|
+
exports.breakCyclesGreedilyByModelOrder = require_layered.breakCyclesGreedilyByModelOrder;
|
|
17
|
+
exports.breakCyclesInteractively = require_layered.breakCyclesInteractively;
|
|
18
|
+
exports.breakCyclesWithDepthFirstSearch = require_layered.breakCyclesWithDepthFirstSearch;
|
|
19
|
+
exports.breakCyclesWithModelOrderBreadthFirstSearch = require_layered.breakCyclesWithModelOrderBreadthFirstSearch;
|
|
20
|
+
exports.breakCyclesWithModelOrderDepthFirstSearch = require_layered.breakCyclesWithModelOrderDepthFirstSearch;
|
|
21
|
+
exports.elkLayeredEnumValues = require_layered.elkLayeredEnumValues;
|
|
22
|
+
exports.elkLayeredOptionDefinitions = require_layered.elkLayeredOptionDefinitions;
|
|
23
|
+
exports.fromElkLayeredOptionId = require_layered.fromElkLayeredOptionId;
|
|
24
|
+
exports.getLayeredLayout = require_layered.getLayeredLayout;
|
|
25
|
+
exports.layeredAlgorithm = require_layered.layeredAlgorithm;
|
|
26
|
+
exports.minimizeCrossingsInteractively = require_layered.minimizeCrossingsInteractively;
|
|
27
|
+
exports.minimizeCrossingsWithBarycenter = require_layered.minimizeCrossingsWithBarycenter;
|
|
28
|
+
exports.minimizeCrossingsWithMedian = require_layered.minimizeCrossingsWithMedian;
|
|
29
|
+
exports.minimizeCrossingsWithModelOrder = require_layered.minimizeCrossingsWithModelOrder;
|
|
30
|
+
exports.placeNodesInLayers = require_layered.placeNodesInLayers;
|
|
31
|
+
exports.placeNodesInteractively = require_layered.placeNodesInteractively;
|
|
32
|
+
exports.placeNodesWithBrandesKoepf = require_layered.placeNodesWithBrandesKoepf;
|
|
33
|
+
exports.placeNodesWithLinearSegments = require_layered.placeNodesWithLinearSegments;
|
|
34
|
+
exports.placeNodesWithNetworkSimplex = require_layered.placeNodesWithNetworkSimplex;
|
|
35
|
+
exports.routeEdgesOrthogonally = require_layered.routeEdgesOrthogonally;
|
|
36
|
+
exports.routeEdgesWithPolylines = require_layered.routeEdgesWithPolylines;
|
|
37
|
+
exports.routeEdgesWithSplines = require_layered.routeEdgesWithSplines;
|
|
38
|
+
exports.toElkLayeredOptions = require_layered.toElkLayeredOptions;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "../types-uxPlGRof.cjs";
|
|
2
|
+
import { $ as CrossingMinimizationStrategy, A as routeEdgesOrthogonally, B as EdgeRouter, C as breakCyclesWithModelOrderDepthFirstSearch, D as minimizeCrossingsWithModelOrder, E as minimizeCrossingsWithMedian, F as CompoundEdgeAttachment, G as LayeredLayoutOptions, H as LayerAssigner, I as CompoundLayoutGeometry, J as LayeredStrategies, K as LayeredPhaseInput, L as CompoundLayoutOptions, M as routeEdgesWithSplines, N as CompoundVisualGraph, O as placeNodesInLayers, P as AcyclicOrientation, Q as NodeSize, R as CrossingMinimizer, S as breakCyclesWithModelOrderBreadthFirstSearch, T as minimizeCrossingsWithBarycenter, U as LayerAssignment, V as EdgeRoutes, W as LayerOrder, X as NodePlacement, Y as LayoutPadding, Z as NodePlacer, _ as breakCyclesByStronglyConnectedNodeType, a as placeNodesWithBrandesKoepf, at as fromElkLayeredOptionId, b as breakCyclesInteractively, c as assignLayersWithNetworkSimplex, ct as ElkLayeredOptionId, d as assignLayersByLongestPath, dt as elkLayeredOptionDefinitions, et as CycleBreakingStrategy, f as assignLayersByLongestPathToSink, g as breakCyclesByStronglyConnectedConnectivity, h as breakCyclesByModelOrder, i as placeNodesWithLinearSegments, it as NodePlacementStrategy, j as routeEdgesWithPolylines, k as placeNodesInteractively, l as assignLayersByBreadthFirstModelOrder, lt as ElkLayeredOptionName, m as assignLayersWithCoffmanGraham, n as layeredAlgorithm, nt as LayeredAdvancedOptions, o as assignLayersWithStretchWidth, ot as toElkLayeredOptions, p as assignLayersInteractively, q as LayeredSpacing, r as placeNodesWithNetworkSimplex, rt as LayeringStrategy, s as assignLayersWithMinWidth, st as elkLayeredEnumValues, t as getLayeredLayout, tt as EdgeRoutingStyle, u as assignLayersByDepthFirstModelOrder, ut as ElkLayeredOptionValueByName, v as breakCyclesGreedily, w as minimizeCrossingsInteractively, x as breakCyclesWithDepthFirstSearch, y as breakCyclesGreedilyByModelOrder, z as CycleBreaker } from "../index-D9dhxrRl.cjs";
|
|
3
|
+
export { AcyclicOrientation, CompoundEdgeAttachment, CompoundLayoutGeometry, CompoundLayoutOptions, CompoundVisualGraph, CrossingMinimizationStrategy, CrossingMinimizer, CycleBreaker, CycleBreakingStrategy, EdgeRouter, EdgeRoutes, EdgeRoutingStyle, ElkLayeredOptionId, ElkLayeredOptionName, ElkLayeredOptionValueByName, LayerAssigner, LayerAssignment, LayerOrder, LayeredAdvancedOptions, LayeredLayoutOptions, LayeredPhaseInput, LayeredSpacing, LayeredStrategies, LayeringStrategy, LayoutPadding, NodePlacement, NodePlacementStrategy, NodePlacer, NodeSize, assignLayersByBreadthFirstModelOrder, assignLayersByDepthFirstModelOrder, assignLayersByLongestPath, assignLayersByLongestPathToSink, assignLayersInteractively, assignLayersWithCoffmanGraham, assignLayersWithMinWidth, assignLayersWithNetworkSimplex, assignLayersWithStretchWidth, breakCyclesByModelOrder, breakCyclesByStronglyConnectedConnectivity, breakCyclesByStronglyConnectedNodeType, breakCyclesGreedily, breakCyclesGreedilyByModelOrder, breakCyclesInteractively, breakCyclesWithDepthFirstSearch, breakCyclesWithModelOrderBreadthFirstSearch, breakCyclesWithModelOrderDepthFirstSearch, elkLayeredEnumValues, elkLayeredOptionDefinitions, fromElkLayeredOptionId, getLayeredLayout, layeredAlgorithm, minimizeCrossingsInteractively, minimizeCrossingsWithBarycenter, minimizeCrossingsWithMedian, minimizeCrossingsWithModelOrder, placeNodesInLayers, placeNodesInteractively, placeNodesWithBrandesKoepf, placeNodesWithLinearSegments, placeNodesWithNetworkSimplex, routeEdgesOrthogonally, routeEdgesWithPolylines, routeEdgesWithSplines, toElkLayeredOptions };
|
package/dist/layered/index.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import "../types-CT2akdK0.mjs";
|
|
2
|
+
import { $ as CrossingMinimizationStrategy, A as routeEdgesOrthogonally, B as EdgeRouter, C as breakCyclesWithModelOrderDepthFirstSearch, D as minimizeCrossingsWithModelOrder, E as minimizeCrossingsWithMedian, F as CompoundEdgeAttachment, G as LayeredLayoutOptions, H as LayerAssigner, I as CompoundLayoutGeometry, J as LayeredStrategies, K as LayeredPhaseInput, L as CompoundLayoutOptions, M as routeEdgesWithSplines, N as CompoundVisualGraph, O as placeNodesInLayers, P as AcyclicOrientation, Q as NodeSize, R as CrossingMinimizer, S as breakCyclesWithModelOrderBreadthFirstSearch, T as minimizeCrossingsWithBarycenter, U as LayerAssignment, V as EdgeRoutes, W as LayerOrder, X as NodePlacement, Y as LayoutPadding, Z as NodePlacer, _ as breakCyclesByStronglyConnectedNodeType, a as placeNodesWithBrandesKoepf, at as fromElkLayeredOptionId, b as breakCyclesInteractively, c as assignLayersWithNetworkSimplex, ct as ElkLayeredOptionId, d as assignLayersByLongestPath, dt as elkLayeredOptionDefinitions, et as CycleBreakingStrategy, f as assignLayersByLongestPathToSink, g as breakCyclesByStronglyConnectedConnectivity, h as breakCyclesByModelOrder, i as placeNodesWithLinearSegments, it as NodePlacementStrategy, j as routeEdgesWithPolylines, k as placeNodesInteractively, l as assignLayersByBreadthFirstModelOrder, lt as ElkLayeredOptionName, m as assignLayersWithCoffmanGraham, n as layeredAlgorithm, nt as LayeredAdvancedOptions, o as assignLayersWithStretchWidth, ot as toElkLayeredOptions, p as assignLayersInteractively, q as LayeredSpacing, r as placeNodesWithNetworkSimplex, rt as LayeringStrategy, s as assignLayersWithMinWidth, st as elkLayeredEnumValues, t as getLayeredLayout, tt as EdgeRoutingStyle, u as assignLayersByDepthFirstModelOrder, ut as ElkLayeredOptionValueByName, v as breakCyclesGreedily, w as minimizeCrossingsInteractively, x as breakCyclesWithDepthFirstSearch, y as breakCyclesGreedilyByModelOrder, z as CycleBreaker } from "../index-DNixtE3h.mjs";
|
|
3
|
+
export { AcyclicOrientation, CompoundEdgeAttachment, CompoundLayoutGeometry, CompoundLayoutOptions, CompoundVisualGraph, CrossingMinimizationStrategy, CrossingMinimizer, CycleBreaker, CycleBreakingStrategy, EdgeRouter, EdgeRoutes, EdgeRoutingStyle, ElkLayeredOptionId, ElkLayeredOptionName, ElkLayeredOptionValueByName, LayerAssigner, LayerAssignment, LayerOrder, LayeredAdvancedOptions, LayeredLayoutOptions, LayeredPhaseInput, LayeredSpacing, LayeredStrategies, LayeringStrategy, LayoutPadding, NodePlacement, NodePlacementStrategy, NodePlacer, NodeSize, assignLayersByBreadthFirstModelOrder, assignLayersByDepthFirstModelOrder, assignLayersByLongestPath, assignLayersByLongestPathToSink, assignLayersInteractively, assignLayersWithCoffmanGraham, assignLayersWithMinWidth, assignLayersWithNetworkSimplex, assignLayersWithStretchWidth, breakCyclesByModelOrder, breakCyclesByStronglyConnectedConnectivity, breakCyclesByStronglyConnectedNodeType, breakCyclesGreedily, breakCyclesGreedilyByModelOrder, breakCyclesInteractively, breakCyclesWithDepthFirstSearch, breakCyclesWithModelOrderBreadthFirstSearch, breakCyclesWithModelOrderDepthFirstSearch, elkLayeredEnumValues, elkLayeredOptionDefinitions, fromElkLayeredOptionId, getLayeredLayout, layeredAlgorithm, minimizeCrossingsInteractively, minimizeCrossingsWithBarycenter, minimizeCrossingsWithMedian, minimizeCrossingsWithModelOrder, placeNodesInLayers, placeNodesInteractively, placeNodesWithBrandesKoepf, placeNodesWithLinearSegments, placeNodesWithNetworkSimplex, routeEdgesOrthogonally, routeEdgesWithPolylines, routeEdgesWithSplines, toElkLayeredOptions };
|
package/dist/layered/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as minimizeCrossingsInteractively, C as breakCyclesGreedily, D as breakCyclesWithModelOrderBreadthFirstSearch, E as breakCyclesWithDepthFirstSearch, F as placeNodesInteractively, L as routeEdgesOrthogonally, M as minimizeCrossingsWithMedian, N as minimizeCrossingsWithModelOrder, O as breakCyclesWithModelOrderDepthFirstSearch, P as placeNodesInLayers, R as routeEdgesWithPolylines, S as breakCyclesByStronglyConnectedNodeType, T as breakCyclesInteractively, _ as assignLayersByLongestPathToSink, a as elkLayeredEnumValues, b as breakCyclesByModelOrder, c as placeNodesWithLinearSegments, d as assignLayersWithMinWidth, f as assignLayersWithNetworkSimplex, g as assignLayersByLongestPath, h as assignLayersByDepthFirstModelOrder, i as toElkLayeredOptions, j as minimizeCrossingsWithBarycenter, l as placeNodesWithBrandesKoepf, m as assignLayersByBreadthFirstModelOrder, n as layeredAlgorithm, o as elkLayeredOptionDefinitions, r as fromElkLayeredOptionId, s as placeNodesWithNetworkSimplex, t as getLayeredLayout, u as assignLayersWithStretchWidth, v as assignLayersInteractively, w as breakCyclesGreedilyByModelOrder, x as breakCyclesByStronglyConnectedConnectivity, y as assignLayersWithCoffmanGraham, z as routeEdgesWithSplines } from "../layered-DGFTeQSl.mjs";
|
|
2
2
|
|
|
3
3
|
export { assignLayersByBreadthFirstModelOrder, assignLayersByDepthFirstModelOrder, assignLayersByLongestPath, assignLayersByLongestPathToSink, assignLayersInteractively, assignLayersWithCoffmanGraham, assignLayersWithMinWidth, assignLayersWithNetworkSimplex, assignLayersWithStretchWidth, breakCyclesByModelOrder, breakCyclesByStronglyConnectedConnectivity, breakCyclesByStronglyConnectedNodeType, breakCyclesGreedily, breakCyclesGreedilyByModelOrder, breakCyclesInteractively, breakCyclesWithDepthFirstSearch, breakCyclesWithModelOrderBreadthFirstSearch, breakCyclesWithModelOrderDepthFirstSearch, elkLayeredEnumValues, elkLayeredOptionDefinitions, fromElkLayeredOptionId, getLayeredLayout, layeredAlgorithm, minimizeCrossingsInteractively, minimizeCrossingsWithBarycenter, minimizeCrossingsWithMedian, minimizeCrossingsWithModelOrder, placeNodesInLayers, placeNodesInteractively, placeNodesWithBrandesKoepf, placeNodesWithLinearSegments, placeNodesWithNetworkSimplex, routeEdgesOrthogonally, routeEdgesWithPolylines, routeEdgesWithSplines, toElkLayeredOptions };
|