@statelyai/layout 0.0.1 → 0.0.2
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 +1 -3
- package/dist/elkjs/index.mjs +10 -7
- package/dist/{index-D2RodsZY.d.mts → index-8xYkohbz.d.mts} +2 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/layered/index.d.mts +1 -1
- package/dist/layered/index.mjs +1 -1
- package/dist/{layered-Dd868WZY.mjs → layered-QwJn2gb2.mjs} +399 -53
- package/dist/{spore-fTgSoRLP.mjs → spore-D15xIQKj.mjs} +1 -1
- package/package.json +16 -6
- package/src/box.ts +135 -0
- package/src/elkjs/index.ts +1825 -0
- package/src/elkjs/types.ts +103 -0
- package/src/errors.ts +16 -0
- package/src/fixed.ts +80 -0
- package/src/index.ts +92 -0
- package/src/java-random.ts +46 -0
- package/src/layered/bk-node-placement.ts +715 -0
- package/src/layered/elk-enum-values.ts +171 -0
- package/src/layered/elk-options.generated.ts +315 -0
- package/src/layered/elk-options.ts +98 -0
- package/src/layered/flexible-ports.ts +11 -0
- package/src/layered/high-degree.ts +127 -0
- package/src/layered/index.ts +2138 -0
- package/src/layered/layer-unzipping.ts +217 -0
- package/src/layered/linear-segments-node-placement.ts +447 -0
- package/src/layered/long-edges.ts +405 -0
- package/src/layered/min-width.ts +159 -0
- package/src/layered/multi-edge-wrapping.ts +460 -0
- package/src/layered/network-simplex-node-placement.ts +500 -0
- package/src/layered/network-simplex.ts +346 -0
- package/src/layered/node-promotion.ts +197 -0
- package/src/layered/spacing.ts +37 -0
- package/src/layered/spline-bezier.ts +102 -0
- package/src/layered/strategies.ts +5343 -0
- package/src/layered/stretch-width.ts +136 -0
- package/src/layered/types.ts +111 -0
- package/src/layout.ts +202 -0
- package/src/packing.ts +74 -0
- package/src/random.ts +142 -0
- package/src/spore.ts +103 -0
- package/src/types.ts +84 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { ElkLayeredOptionName } from "./elk-options.generated";
|
|
2
|
+
|
|
3
|
+
/** Every ELK 0.11.1 enum constant, source-locked to its Java declaration. */
|
|
4
|
+
export const elkLayeredEnumValues = {
|
|
5
|
+
"wrapping.strategy": ["OFF", "SINGLE_EDGE", "MULTI_EDGE"],
|
|
6
|
+
"wrapping.cutting.strategy": ["ARD", "MSD", "MANUAL"],
|
|
7
|
+
"wrapping.validify.strategy": ["NO", "GREEDY", "LOOK_BACK"],
|
|
8
|
+
"layerUnzipping.strategy": ["NONE", "ALTERNATING"],
|
|
9
|
+
"nodePlacement.networkSimplex.nodeFlexibility": [
|
|
10
|
+
"NONE",
|
|
11
|
+
"PORT_POSITION",
|
|
12
|
+
"NODE_SIZE_WHERE_SPACE_PERMITS",
|
|
13
|
+
"NODE_SIZE",
|
|
14
|
+
],
|
|
15
|
+
"nodePlacement.networkSimplex.nodeFlexibility.default": [
|
|
16
|
+
"NONE",
|
|
17
|
+
"PORT_POSITION",
|
|
18
|
+
"NODE_SIZE_WHERE_SPACE_PERMITS",
|
|
19
|
+
"NODE_SIZE",
|
|
20
|
+
],
|
|
21
|
+
"edgeRouting.splines.mode": ["CONSERVATIVE", "CONSERVATIVE_SOFT", "SLOPPY"],
|
|
22
|
+
"topdown.nodeType": ["PARALLEL_NODE", "HIERARCHICAL_NODE", "ROOT_NODE"],
|
|
23
|
+
edgeRouting: ["UNDEFINED", "POLYLINE", "ORTHOGONAL", "SPLINES"],
|
|
24
|
+
portConstraints: ["UNDEFINED", "FREE", "FIXED_SIDE", "FIXED_ORDER", "FIXED_RATIO", "FIXED_POS"],
|
|
25
|
+
"port.side": ["UNDEFINED", "NORTH", "EAST", "SOUTH", "WEST"],
|
|
26
|
+
alignment: ["AUTOMATIC", "LEFT", "RIGHT", "TOP", "BOTTOM", "CENTER"],
|
|
27
|
+
hierarchyHandling: ["INHERIT", "INCLUDE_CHILDREN", "SEPARATE_CHILDREN"],
|
|
28
|
+
"nodeSize.constraints": ["PORTS", "PORT_LABELS", "NODE_LABELS", "MINIMUM_SIZE"],
|
|
29
|
+
"nodeSize.options": [
|
|
30
|
+
"DEFAULT_MINIMUM_SIZE",
|
|
31
|
+
"MINIMUM_SIZE_ACCOUNTS_FOR_PADDING",
|
|
32
|
+
"COMPUTE_PADDING",
|
|
33
|
+
"OUTSIDE_NODE_LABELS_OVERHANG",
|
|
34
|
+
"PORTS_OVERHANG",
|
|
35
|
+
"UNIFORM_PORT_SPACING",
|
|
36
|
+
"SPACE_EFFICIENT_PORT_LABELS",
|
|
37
|
+
"FORCE_TABULAR_NODE_LABELS",
|
|
38
|
+
"ASYMMETRICAL",
|
|
39
|
+
],
|
|
40
|
+
direction: ["UNDEFINED", "RIGHT", "LEFT", "DOWN", "UP"],
|
|
41
|
+
"nodeLabels.placement": [
|
|
42
|
+
"H_LEFT",
|
|
43
|
+
"H_CENTER",
|
|
44
|
+
"H_RIGHT",
|
|
45
|
+
"V_TOP",
|
|
46
|
+
"V_CENTER",
|
|
47
|
+
"V_BOTTOM",
|
|
48
|
+
"INSIDE",
|
|
49
|
+
"OUTSIDE",
|
|
50
|
+
"H_PRIORITY",
|
|
51
|
+
],
|
|
52
|
+
"portLabels.placement": [
|
|
53
|
+
"OUTSIDE",
|
|
54
|
+
"INSIDE",
|
|
55
|
+
"NEXT_TO_PORT_IF_POSSIBLE",
|
|
56
|
+
"ALWAYS_SAME_SIDE",
|
|
57
|
+
"ALWAYS_OTHER_SAME_SIDE",
|
|
58
|
+
"SPACE_EFFICIENT",
|
|
59
|
+
],
|
|
60
|
+
"portAlignment.default": ["DISTRIBUTED", "JUSTIFIED", "BEGIN", "CENTER", "END"],
|
|
61
|
+
"portAlignment.north": ["DISTRIBUTED", "JUSTIFIED", "BEGIN", "CENTER", "END"],
|
|
62
|
+
"portAlignment.south": ["DISTRIBUTED", "JUSTIFIED", "BEGIN", "CENTER", "END"],
|
|
63
|
+
"portAlignment.west": ["DISTRIBUTED", "JUSTIFIED", "BEGIN", "CENTER", "END"],
|
|
64
|
+
"portAlignment.east": ["DISTRIBUTED", "JUSTIFIED", "BEGIN", "CENTER", "END"],
|
|
65
|
+
"layering.strategy": [
|
|
66
|
+
"NETWORK_SIMPLEX",
|
|
67
|
+
"LONGEST_PATH",
|
|
68
|
+
"LONGEST_PATH_SOURCE",
|
|
69
|
+
"COFFMAN_GRAHAM",
|
|
70
|
+
"INTERACTIVE",
|
|
71
|
+
"STRETCH_WIDTH",
|
|
72
|
+
"MIN_WIDTH",
|
|
73
|
+
"BF_MODEL_ORDER",
|
|
74
|
+
"DF_MODEL_ORDER",
|
|
75
|
+
],
|
|
76
|
+
"layering.nodePromotion.strategy": [
|
|
77
|
+
"NONE",
|
|
78
|
+
"NIKOLOV",
|
|
79
|
+
"NIKOLOV_PIXEL",
|
|
80
|
+
"NIKOLOV_IMPROVED",
|
|
81
|
+
"NIKOLOV_IMPROVED_PIXEL",
|
|
82
|
+
"DUMMYNODE_PERCENTAGE",
|
|
83
|
+
"NODECOUNT_PERCENTAGE",
|
|
84
|
+
"NO_BOUNDARY",
|
|
85
|
+
"MODEL_ORDER_LEFT_TO_RIGHT",
|
|
86
|
+
"MODEL_ORDER_RIGHT_TO_LEFT",
|
|
87
|
+
],
|
|
88
|
+
"layering.layerConstraint": ["NONE", "FIRST", "FIRST_SEPARATE", "LAST", "LAST_SEPARATE"],
|
|
89
|
+
"cycleBreaking.strategy": [
|
|
90
|
+
"GREEDY",
|
|
91
|
+
"DEPTH_FIRST",
|
|
92
|
+
"INTERACTIVE",
|
|
93
|
+
"MODEL_ORDER",
|
|
94
|
+
"GREEDY_MODEL_ORDER",
|
|
95
|
+
"SCC_CONNECTIVITY",
|
|
96
|
+
"SCC_NODE_TYPE",
|
|
97
|
+
"DFS_NODE_ORDER",
|
|
98
|
+
"BFS_NODE_ORDER",
|
|
99
|
+
],
|
|
100
|
+
"crossingMinimization.strategy": ["LAYER_SWEEP", "MEDIAN_LAYER_SWEEP", "INTERACTIVE", "NONE"],
|
|
101
|
+
"crossingMinimization.greedySwitch.type": ["ONE_SIDED", "TWO_SIDED", "OFF"],
|
|
102
|
+
"crossingMinimization.greedySwitchHierarchical.type": ["ONE_SIDED", "TWO_SIDED", "OFF"],
|
|
103
|
+
interactiveReferencePoint: ["CENTER", "TOP_LEFT"],
|
|
104
|
+
"nodePlacement.strategy": [
|
|
105
|
+
"SIMPLE",
|
|
106
|
+
"INTERACTIVE",
|
|
107
|
+
"LINEAR_SEGMENTS",
|
|
108
|
+
"BRANDES_KOEPF",
|
|
109
|
+
"NETWORK_SIMPLEX",
|
|
110
|
+
],
|
|
111
|
+
"nodePlacement.bk.fixedAlignment": [
|
|
112
|
+
"NONE",
|
|
113
|
+
"LEFTUP",
|
|
114
|
+
"RIGHTUP",
|
|
115
|
+
"LEFTDOWN",
|
|
116
|
+
"RIGHTDOWN",
|
|
117
|
+
"BALANCED",
|
|
118
|
+
],
|
|
119
|
+
"edgeRouting.selfLoopDistribution": ["EQUALLY", "NORTH", "NORTH_SOUTH"],
|
|
120
|
+
"edgeRouting.selfLoopOrdering": ["STACKED", "REVERSE_STACKED", "SEQUENCED"],
|
|
121
|
+
contentAlignment: ["V_TOP", "V_CENTER", "V_BOTTOM", "H_LEFT", "H_CENTER", "H_RIGHT"],
|
|
122
|
+
"nodePlacement.bk.edgeStraightening": ["NONE", "IMPROVE_STRAIGHTNESS"],
|
|
123
|
+
"compaction.postCompaction.strategy": [
|
|
124
|
+
"NONE",
|
|
125
|
+
"LEFT",
|
|
126
|
+
"RIGHT",
|
|
127
|
+
"LEFT_RIGHT_CONSTRAINT_LOCKING",
|
|
128
|
+
"LEFT_RIGHT_CONNECTION_LOCKING",
|
|
129
|
+
"EDGE_LENGTH",
|
|
130
|
+
],
|
|
131
|
+
"compaction.postCompaction.constraints": ["QUADRATIC", "SCANLINE"],
|
|
132
|
+
"edgeLabels.placement": ["CENTER", "HEAD", "TAIL"],
|
|
133
|
+
"edgeLabels.sideSelection": [
|
|
134
|
+
"ALWAYS_UP",
|
|
135
|
+
"ALWAYS_DOWN",
|
|
136
|
+
"DIRECTION_UP",
|
|
137
|
+
"DIRECTION_DOWN",
|
|
138
|
+
"SMART_UP",
|
|
139
|
+
"SMART_DOWN",
|
|
140
|
+
],
|
|
141
|
+
"edgeLabels.centerLabelPlacementStrategy": [
|
|
142
|
+
"MEDIAN_LAYER",
|
|
143
|
+
"TAIL_LAYER",
|
|
144
|
+
"HEAD_LAYER",
|
|
145
|
+
"SPACE_EFFICIENT_LAYER",
|
|
146
|
+
"WIDEST_LAYER",
|
|
147
|
+
"CENTER_LAYER",
|
|
148
|
+
],
|
|
149
|
+
directionCongruency: ["READING_DIRECTION", "ROTATION"],
|
|
150
|
+
portSortingStrategy: ["INPUT_ORDER", "PORT_DEGREE"],
|
|
151
|
+
"considerModelOrder.strategy": ["NONE", "NODES_AND_EDGES", "PREFER_EDGES", "PREFER_NODES"],
|
|
152
|
+
"considerModelOrder.longEdgeStrategy": ["DUMMY_NODE_OVER", "DUMMY_NODE_UNDER", "EQUAL"],
|
|
153
|
+
"considerModelOrder.components": [
|
|
154
|
+
"NONE",
|
|
155
|
+
"INSIDE_PORT_SIDE_GROUPS",
|
|
156
|
+
"GROUP_MODEL_ORDER",
|
|
157
|
+
"MODEL_ORDER",
|
|
158
|
+
],
|
|
159
|
+
"considerModelOrder.groupModelOrder.cbGroupOrderStrategy": [
|
|
160
|
+
"ONLY_WITHIN_GROUP",
|
|
161
|
+
"MODEL_ORDER",
|
|
162
|
+
"ENFORCED",
|
|
163
|
+
],
|
|
164
|
+
"considerModelOrder.groupModelOrder.cmGroupOrderStrategy": [
|
|
165
|
+
"ONLY_WITHIN_GROUP",
|
|
166
|
+
"MODEL_ORDER",
|
|
167
|
+
"ENFORCED",
|
|
168
|
+
],
|
|
169
|
+
} as const satisfies Partial<Record<ElkLayeredOptionName, readonly string[]>>;
|
|
170
|
+
|
|
171
|
+
export type ElkLayeredEnumOptionName = keyof typeof elkLayeredEnumValues;
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
// Generated by scripts/generate-elk-layered-options.ts from elkjs 0.11.1.
|
|
2
|
+
// Do not edit manually.
|
|
3
|
+
|
|
4
|
+
export interface ElkLayeredOptionValueByName {
|
|
5
|
+
"spacing.commentComment"?: number;
|
|
6
|
+
"spacing.commentNode"?: number;
|
|
7
|
+
"spacing.componentComponent"?: number;
|
|
8
|
+
"spacing.edgeEdge"?: number;
|
|
9
|
+
"spacing.edgeLabel"?: number;
|
|
10
|
+
"spacing.edgeNode"?: number;
|
|
11
|
+
"spacing.labelLabel"?: number;
|
|
12
|
+
"spacing.labelPortHorizontal"?: number;
|
|
13
|
+
"spacing.labelPortVertical"?: number;
|
|
14
|
+
"spacing.labelNode"?: number;
|
|
15
|
+
"spacing.node"?: number;
|
|
16
|
+
"spacing.nodeSelfLoop"?: number;
|
|
17
|
+
"spacing.portPort"?: number;
|
|
18
|
+
"spacing.individual"?: unknown;
|
|
19
|
+
"spacing.baseValue"?: number;
|
|
20
|
+
"spacing.edgeEdgeBetweenLayers"?: number;
|
|
21
|
+
"spacing.edgeNodeBetweenLayers"?: number;
|
|
22
|
+
"spacing.layer"?: number;
|
|
23
|
+
"priority"?: number;
|
|
24
|
+
"priority.direction"?: number;
|
|
25
|
+
"priority.shortness"?: number;
|
|
26
|
+
"priority.straightness"?: number;
|
|
27
|
+
"wrapping.strategy"?: string;
|
|
28
|
+
"wrapping.additionalEdgeSpacing"?: number;
|
|
29
|
+
"wrapping.correctionFactor"?: number;
|
|
30
|
+
"wrapping.cutting.strategy"?: string;
|
|
31
|
+
"wrapping.cutting.cuts"?: unknown;
|
|
32
|
+
"wrapping.cutting.msd.freedom"?: number;
|
|
33
|
+
"wrapping.validify.strategy"?: string;
|
|
34
|
+
"wrapping.validify.forbiddenIndices"?: unknown;
|
|
35
|
+
"wrapping.multiEdge.improveCuts"?: boolean;
|
|
36
|
+
"wrapping.multiEdge.distancePenalty"?: number;
|
|
37
|
+
"wrapping.multiEdge.improveWrappedEdges"?: boolean;
|
|
38
|
+
"layerUnzipping.strategy"?: string;
|
|
39
|
+
"layerUnzipping.minimizeEdgeLength"?: boolean;
|
|
40
|
+
"layerUnzipping.layerSplit"?: number;
|
|
41
|
+
"layerUnzipping.resetOnLongEdges"?: boolean;
|
|
42
|
+
"nodePlacement.networkSimplex.nodeFlexibility"?: string;
|
|
43
|
+
"nodePlacement.networkSimplex.nodeFlexibility.default"?: string;
|
|
44
|
+
"edgeRouting.splines.mode"?: string;
|
|
45
|
+
"edgeRouting.splines.sloppy.layerSpacingFactor"?: number;
|
|
46
|
+
"topdownLayout"?: boolean;
|
|
47
|
+
"topdown.scaleFactor"?: number;
|
|
48
|
+
"topdown.hierarchicalNodeWidth"?: number;
|
|
49
|
+
"topdown.hierarchicalNodeAspectRatio"?: number;
|
|
50
|
+
"topdown.nodeType"?: string;
|
|
51
|
+
"padding"?: unknown;
|
|
52
|
+
"edgeRouting"?: string;
|
|
53
|
+
"port.borderOffset"?: number;
|
|
54
|
+
"randomSeed"?: number;
|
|
55
|
+
"aspectRatio"?: number;
|
|
56
|
+
"noLayout"?: boolean;
|
|
57
|
+
"portConstraints"?: string;
|
|
58
|
+
"port.side"?: string;
|
|
59
|
+
"debugMode"?: boolean;
|
|
60
|
+
"alignment"?: string;
|
|
61
|
+
"hierarchyHandling"?: string;
|
|
62
|
+
"separateConnectedComponents"?: boolean;
|
|
63
|
+
"insideSelfLoops.activate"?: boolean;
|
|
64
|
+
"insideSelfLoops.yo"?: boolean;
|
|
65
|
+
"nodeSize.constraints"?: string;
|
|
66
|
+
"nodeSize.options"?: string;
|
|
67
|
+
"nodeSize.fixedGraphSize"?: boolean;
|
|
68
|
+
"direction"?: string;
|
|
69
|
+
"nodeLabels.placement"?: string;
|
|
70
|
+
"nodeLabels.padding"?: unknown;
|
|
71
|
+
"portLabels.placement"?: string;
|
|
72
|
+
"portLabels.nextToPortIfPossible"?: boolean;
|
|
73
|
+
"portLabels.treatAsGroup"?: boolean;
|
|
74
|
+
"portAlignment.default"?: string;
|
|
75
|
+
"portAlignment.north"?: string;
|
|
76
|
+
"portAlignment.south"?: string;
|
|
77
|
+
"portAlignment.west"?: string;
|
|
78
|
+
"portAlignment.east"?: string;
|
|
79
|
+
"unnecessaryBendpoints"?: boolean;
|
|
80
|
+
"layering.strategy"?: string;
|
|
81
|
+
"layering.nodePromotion.strategy"?: string;
|
|
82
|
+
"thoroughness"?: number;
|
|
83
|
+
"layering.layerConstraint"?: string;
|
|
84
|
+
"cycleBreaking.strategy"?: string;
|
|
85
|
+
"crossingMinimization.strategy"?: string;
|
|
86
|
+
"crossingMinimization.forceNodeModelOrder"?: boolean;
|
|
87
|
+
"crossingMinimization.greedySwitch.activationThreshold"?: number;
|
|
88
|
+
"crossingMinimization.greedySwitch.type"?: string;
|
|
89
|
+
"crossingMinimization.greedySwitchHierarchical.type"?: string;
|
|
90
|
+
"crossingMinimization.semiInteractive"?: boolean;
|
|
91
|
+
"mergeEdges"?: boolean;
|
|
92
|
+
"mergeHierarchyEdges"?: boolean;
|
|
93
|
+
"interactiveReferencePoint"?: string;
|
|
94
|
+
"nodePlacement.strategy"?: string;
|
|
95
|
+
"nodePlacement.bk.fixedAlignment"?: string;
|
|
96
|
+
"feedbackEdges"?: boolean;
|
|
97
|
+
"nodePlacement.linearSegments.deflectionDampening"?: number;
|
|
98
|
+
"edgeRouting.selfLoopDistribution"?: string;
|
|
99
|
+
"edgeRouting.selfLoopOrdering"?: string;
|
|
100
|
+
"contentAlignment"?: string;
|
|
101
|
+
"nodePlacement.bk.edgeStraightening"?: string;
|
|
102
|
+
"compaction.postCompaction.strategy"?: string;
|
|
103
|
+
"compaction.postCompaction.constraints"?: string;
|
|
104
|
+
"compaction.connectedComponents"?: boolean;
|
|
105
|
+
"highDegreeNodes.treatment"?: boolean;
|
|
106
|
+
"highDegreeNodes.threshold"?: number;
|
|
107
|
+
"highDegreeNodes.treeHeight"?: number;
|
|
108
|
+
"nodeSize.minimum"?: unknown;
|
|
109
|
+
"junctionPoints"?: unknown;
|
|
110
|
+
"edge.thickness"?: number;
|
|
111
|
+
"edgeLabels.placement"?: string;
|
|
112
|
+
"edgeLabels.inline"?: boolean;
|
|
113
|
+
"crossingMinimization.hierarchicalSweepiness"?: number;
|
|
114
|
+
"port.index"?: number;
|
|
115
|
+
"commentBox"?: boolean;
|
|
116
|
+
"hypernode"?: boolean;
|
|
117
|
+
"port.anchor"?: unknown;
|
|
118
|
+
"partitioning.activate"?: boolean;
|
|
119
|
+
"partitioning.partition"?: number;
|
|
120
|
+
"layering.minWidth.upperBoundOnWidth"?: number;
|
|
121
|
+
"layering.minWidth.upperLayerEstimationScalingFactor"?: number;
|
|
122
|
+
"position"?: unknown;
|
|
123
|
+
"allowNonFlowPortsToSwitchSides"?: boolean;
|
|
124
|
+
"layering.nodePromotion.maxIterations"?: number;
|
|
125
|
+
"edgeLabels.sideSelection"?: string;
|
|
126
|
+
"edgeLabels.centerLabelPlacementStrategy"?: string;
|
|
127
|
+
"margins"?: unknown;
|
|
128
|
+
"layering.coffmanGraham.layerBound"?: number;
|
|
129
|
+
"nodePlacement.favorStraightEdges"?: boolean;
|
|
130
|
+
"spacing.portsSurrounding"?: unknown;
|
|
131
|
+
"directionCongruency"?: string;
|
|
132
|
+
"portSortingStrategy"?: string;
|
|
133
|
+
"edgeRouting.polyline.slopedEdgeZoneWidth"?: number;
|
|
134
|
+
"crossingMinimization.inLayerPredOf"?: string;
|
|
135
|
+
"crossingMinimization.inLayerSuccOf"?: string;
|
|
136
|
+
"layering.layerChoiceConstraint"?: number;
|
|
137
|
+
"crossingMinimization.positionChoiceConstraint"?: number;
|
|
138
|
+
"interactiveLayout"?: boolean;
|
|
139
|
+
"layering.layerId"?: number;
|
|
140
|
+
"crossingMinimization.positionId"?: number;
|
|
141
|
+
"considerModelOrder.strategy"?: string;
|
|
142
|
+
"considerModelOrder.longEdgeStrategy"?: string;
|
|
143
|
+
"considerModelOrder.crossingCounterNodeInfluence"?: number;
|
|
144
|
+
"considerModelOrder.crossingCounterPortInfluence"?: number;
|
|
145
|
+
"considerModelOrder.noModelOrder"?: boolean;
|
|
146
|
+
"considerModelOrder.components"?: string;
|
|
147
|
+
"considerModelOrder.portModelOrder"?: boolean;
|
|
148
|
+
"considerModelOrder.groupModelOrder.cycleBreakingId"?: number;
|
|
149
|
+
"considerModelOrder.groupModelOrder.crossingMinimizationId"?: number;
|
|
150
|
+
"considerModelOrder.groupModelOrder.componentGroupId"?: number;
|
|
151
|
+
"considerModelOrder.groupModelOrder.cbGroupOrderStrategy"?: string;
|
|
152
|
+
"considerModelOrder.groupModelOrder.cmGroupOrderStrategy"?: string;
|
|
153
|
+
"considerModelOrder.groupModelOrder.cmEnforcedGroupOrders"?: unknown;
|
|
154
|
+
"considerModelOrder.groupModelOrder.cbPreferredSourceId"?: number;
|
|
155
|
+
"considerModelOrder.groupModelOrder.cbPreferredTargetId"?: number;
|
|
156
|
+
"generatePositionAndLayerIds"?: boolean;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export const elkLayeredOptionDefinitions = [
|
|
160
|
+
{ name: "spacing.commentComment", elkId: "org.eclipse.elk.spacing.commentComment", type: "DOUBLE", targets: ["PARENTS"] },
|
|
161
|
+
{ name: "spacing.commentNode", elkId: "org.eclipse.elk.spacing.commentNode", type: "DOUBLE", targets: ["PARENTS"] },
|
|
162
|
+
{ name: "spacing.componentComponent", elkId: "org.eclipse.elk.spacing.componentComponent", type: "DOUBLE", targets: ["PARENTS"] },
|
|
163
|
+
{ name: "spacing.edgeEdge", elkId: "org.eclipse.elk.spacing.edgeEdge", type: "DOUBLE", targets: ["PARENTS"] },
|
|
164
|
+
{ name: "spacing.edgeLabel", elkId: "org.eclipse.elk.spacing.edgeLabel", type: "DOUBLE", targets: ["PARENTS"] },
|
|
165
|
+
{ name: "spacing.edgeNode", elkId: "org.eclipse.elk.spacing.edgeNode", type: "DOUBLE", targets: ["PARENTS"] },
|
|
166
|
+
{ name: "spacing.labelLabel", elkId: "org.eclipse.elk.spacing.labelLabel", type: "DOUBLE", targets: ["PARENTS"] },
|
|
167
|
+
{ name: "spacing.labelPortHorizontal", elkId: "org.eclipse.elk.spacing.labelPortHorizontal", type: "DOUBLE", targets: ["PARENTS"] },
|
|
168
|
+
{ name: "spacing.labelPortVertical", elkId: "org.eclipse.elk.spacing.labelPortVertical", type: "DOUBLE", targets: ["PARENTS"] },
|
|
169
|
+
{ name: "spacing.labelNode", elkId: "org.eclipse.elk.spacing.labelNode", type: "DOUBLE", targets: ["PARENTS"] },
|
|
170
|
+
{ name: "spacing.node", elkId: "org.eclipse.elk.spacing.nodeNode", type: "DOUBLE", targets: ["PARENTS"] },
|
|
171
|
+
{ name: "spacing.nodeSelfLoop", elkId: "org.eclipse.elk.spacing.nodeSelfLoop", type: "DOUBLE", targets: ["PARENTS"] },
|
|
172
|
+
{ name: "spacing.portPort", elkId: "org.eclipse.elk.spacing.portPort", type: "DOUBLE", targets: ["PARENTS","NODES"] },
|
|
173
|
+
{ name: "spacing.individual", elkId: "org.eclipse.elk.spacing.individual", type: "OBJECT", targets: ["NODES","EDGES","PORTS","LABELS"] },
|
|
174
|
+
{ name: "spacing.baseValue", elkId: "org.eclipse.elk.layered.spacing.baseValue", type: "DOUBLE", targets: ["PARENTS"] },
|
|
175
|
+
{ name: "spacing.edgeEdgeBetweenLayers", elkId: "org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers", type: "DOUBLE", targets: ["PARENTS"] },
|
|
176
|
+
{ name: "spacing.edgeNodeBetweenLayers", elkId: "org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers", type: "DOUBLE", targets: ["PARENTS"] },
|
|
177
|
+
{ name: "spacing.layer", elkId: "org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers", type: "DOUBLE", targets: ["PARENTS"] },
|
|
178
|
+
{ name: "priority", elkId: "org.eclipse.elk.priority", type: "INT", targets: ["NODES","EDGES"] },
|
|
179
|
+
{ name: "priority.direction", elkId: "org.eclipse.elk.layered.priority.direction", type: "INT", targets: ["EDGES"] },
|
|
180
|
+
{ name: "priority.shortness", elkId: "org.eclipse.elk.layered.priority.shortness", type: "INT", targets: ["EDGES"] },
|
|
181
|
+
{ name: "priority.straightness", elkId: "org.eclipse.elk.layered.priority.straightness", type: "INT", targets: ["EDGES"] },
|
|
182
|
+
{ name: "wrapping.strategy", elkId: "org.eclipse.elk.layered.wrapping.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
183
|
+
{ name: "wrapping.additionalEdgeSpacing", elkId: "org.eclipse.elk.layered.wrapping.additionalEdgeSpacing", type: "DOUBLE", targets: ["PARENTS"] },
|
|
184
|
+
{ name: "wrapping.correctionFactor", elkId: "org.eclipse.elk.layered.wrapping.correctionFactor", type: "DOUBLE", targets: ["PARENTS"] },
|
|
185
|
+
{ name: "wrapping.cutting.strategy", elkId: "org.eclipse.elk.layered.wrapping.cutting.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
186
|
+
{ name: "wrapping.cutting.cuts", elkId: "org.eclipse.elk.layered.wrapping.cutting.cuts", type: "OBJECT", targets: ["PARENTS"] },
|
|
187
|
+
{ name: "wrapping.cutting.msd.freedom", elkId: "org.eclipse.elk.layered.wrapping.cutting.msd.freedom", type: "INT", targets: ["PARENTS"] },
|
|
188
|
+
{ name: "wrapping.validify.strategy", elkId: "org.eclipse.elk.layered.wrapping.validify.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
189
|
+
{ name: "wrapping.validify.forbiddenIndices", elkId: "org.eclipse.elk.layered.wrapping.validify.forbiddenIndices", type: "OBJECT", targets: ["PARENTS"] },
|
|
190
|
+
{ name: "wrapping.multiEdge.improveCuts", elkId: "org.eclipse.elk.layered.wrapping.multiEdge.improveCuts", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
191
|
+
{ name: "wrapping.multiEdge.distancePenalty", elkId: "org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty", type: "DOUBLE", targets: ["PARENTS"] },
|
|
192
|
+
{ name: "wrapping.multiEdge.improveWrappedEdges", elkId: "org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
193
|
+
{ name: "layerUnzipping.strategy", elkId: "org.eclipse.elk.layered.layerUnzipping.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
194
|
+
{ name: "layerUnzipping.minimizeEdgeLength", elkId: "org.eclipse.elk.layered.layerUnzipping.minimizeEdgeLength", type: "BOOLEAN", targets: ["NODES"] },
|
|
195
|
+
{ name: "layerUnzipping.layerSplit", elkId: "org.eclipse.elk.layered.layerUnzipping.layerSplit", type: "INT", targets: ["NODES"] },
|
|
196
|
+
{ name: "layerUnzipping.resetOnLongEdges", elkId: "org.eclipse.elk.layered.layerUnzipping.resetOnLongEdges", type: "BOOLEAN", targets: ["NODES"] },
|
|
197
|
+
{ name: "nodePlacement.networkSimplex.nodeFlexibility", elkId: "org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility", type: "ENUM", targets: ["NODES"] },
|
|
198
|
+
{ name: "nodePlacement.networkSimplex.nodeFlexibility.default", elkId: "org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default", type: "ENUM", targets: ["PARENTS"] },
|
|
199
|
+
{ name: "edgeRouting.splines.mode", elkId: "org.eclipse.elk.layered.edgeRouting.splines.mode", type: "ENUM", targets: ["PARENTS"] },
|
|
200
|
+
{ name: "edgeRouting.splines.sloppy.layerSpacingFactor", elkId: "org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor", type: "DOUBLE", targets: ["PARENTS"] },
|
|
201
|
+
{ name: "topdownLayout", elkId: "org.eclipse.elk.topdownLayout", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
202
|
+
{ name: "topdown.scaleFactor", elkId: "org.eclipse.elk.topdown.scaleFactor", type: "DOUBLE", targets: ["PARENTS"] },
|
|
203
|
+
{ name: "topdown.hierarchicalNodeWidth", elkId: "org.eclipse.elk.topdown.hierarchicalNodeWidth", type: "DOUBLE", targets: ["PARENTS","NODES"] },
|
|
204
|
+
{ name: "topdown.hierarchicalNodeAspectRatio", elkId: "org.eclipse.elk.topdown.hierarchicalNodeAspectRatio", type: "DOUBLE", targets: ["PARENTS","NODES"] },
|
|
205
|
+
{ name: "topdown.nodeType", elkId: "org.eclipse.elk.topdown.nodeType", type: "ENUM", targets: ["NODES"] },
|
|
206
|
+
{ name: "padding", elkId: "org.eclipse.elk.padding", type: "OBJECT", targets: ["PARENTS","NODES"] },
|
|
207
|
+
{ name: "edgeRouting", elkId: "org.eclipse.elk.edgeRouting", type: "ENUM", targets: ["PARENTS"] },
|
|
208
|
+
{ name: "port.borderOffset", elkId: "org.eclipse.elk.port.borderOffset", type: "DOUBLE", targets: ["PORTS"] },
|
|
209
|
+
{ name: "randomSeed", elkId: "org.eclipse.elk.randomSeed", type: "INT", targets: ["PARENTS"] },
|
|
210
|
+
{ name: "aspectRatio", elkId: "org.eclipse.elk.aspectRatio", type: "DOUBLE", targets: ["PARENTS"] },
|
|
211
|
+
{ name: "noLayout", elkId: "org.eclipse.elk.noLayout", type: "BOOLEAN", targets: ["NODES","EDGES","PORTS","LABELS"] },
|
|
212
|
+
{ name: "portConstraints", elkId: "org.eclipse.elk.portConstraints", type: "ENUM", targets: ["NODES"] },
|
|
213
|
+
{ name: "port.side", elkId: "org.eclipse.elk.port.side", type: "ENUM", targets: ["PORTS"] },
|
|
214
|
+
{ name: "debugMode", elkId: "org.eclipse.elk.debugMode", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
215
|
+
{ name: "alignment", elkId: "org.eclipse.elk.alignment", type: "ENUM", targets: ["NODES"] },
|
|
216
|
+
{ name: "hierarchyHandling", elkId: "org.eclipse.elk.hierarchyHandling", type: "ENUM", targets: ["PARENTS","NODES"] },
|
|
217
|
+
{ name: "separateConnectedComponents", elkId: "org.eclipse.elk.separateConnectedComponents", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
218
|
+
{ name: "insideSelfLoops.activate", elkId: "org.eclipse.elk.insideSelfLoops.activate", type: "BOOLEAN", targets: ["NODES"] },
|
|
219
|
+
{ name: "insideSelfLoops.yo", elkId: "org.eclipse.elk.insideSelfLoops.yo", type: "BOOLEAN", targets: ["EDGES"] },
|
|
220
|
+
{ name: "nodeSize.constraints", elkId: "org.eclipse.elk.nodeSize.constraints", type: "ENUMSET", targets: ["NODES"] },
|
|
221
|
+
{ name: "nodeSize.options", elkId: "org.eclipse.elk.nodeSize.options", type: "ENUMSET", targets: ["NODES"] },
|
|
222
|
+
{ name: "nodeSize.fixedGraphSize", elkId: "org.eclipse.elk.nodeSize.fixedGraphSize", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
223
|
+
{ name: "direction", elkId: "org.eclipse.elk.direction", type: "ENUM", targets: ["PARENTS"] },
|
|
224
|
+
{ name: "nodeLabels.placement", elkId: "org.eclipse.elk.nodeLabels.placement", type: "ENUMSET", targets: ["NODES","LABELS"] },
|
|
225
|
+
{ name: "nodeLabels.padding", elkId: "org.eclipse.elk.nodeLabels.padding", type: "OBJECT", targets: ["PARENTS"] },
|
|
226
|
+
{ name: "portLabels.placement", elkId: "org.eclipse.elk.portLabels.placement", type: "ENUMSET", targets: ["NODES"] },
|
|
227
|
+
{ name: "portLabels.nextToPortIfPossible", elkId: "org.eclipse.elk.portLabels.nextToPortIfPossible", type: "BOOLEAN", targets: ["NODES"] },
|
|
228
|
+
{ name: "portLabels.treatAsGroup", elkId: "org.eclipse.elk.portLabels.treatAsGroup", type: "BOOLEAN", targets: ["NODES"] },
|
|
229
|
+
{ name: "portAlignment.default", elkId: "org.eclipse.elk.portAlignment.default", type: "ENUM", targets: ["NODES"] },
|
|
230
|
+
{ name: "portAlignment.north", elkId: "org.eclipse.elk.portAlignment.north", type: "ENUM", targets: ["NODES"] },
|
|
231
|
+
{ name: "portAlignment.south", elkId: "org.eclipse.elk.portAlignment.south", type: "ENUM", targets: ["NODES"] },
|
|
232
|
+
{ name: "portAlignment.west", elkId: "org.eclipse.elk.portAlignment.west", type: "ENUM", targets: ["NODES"] },
|
|
233
|
+
{ name: "portAlignment.east", elkId: "org.eclipse.elk.portAlignment.east", type: "ENUM", targets: ["NODES"] },
|
|
234
|
+
{ name: "unnecessaryBendpoints", elkId: "org.eclipse.elk.layered.unnecessaryBendpoints", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
235
|
+
{ name: "layering.strategy", elkId: "org.eclipse.elk.layered.layering.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
236
|
+
{ name: "layering.nodePromotion.strategy", elkId: "org.eclipse.elk.layered.layering.nodePromotion.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
237
|
+
{ name: "thoroughness", elkId: "org.eclipse.elk.layered.thoroughness", type: "INT", targets: ["PARENTS"] },
|
|
238
|
+
{ name: "layering.layerConstraint", elkId: "org.eclipse.elk.layered.layering.layerConstraint", type: "ENUM", targets: ["NODES"] },
|
|
239
|
+
{ name: "cycleBreaking.strategy", elkId: "org.eclipse.elk.layered.cycleBreaking.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
240
|
+
{ name: "crossingMinimization.strategy", elkId: "org.eclipse.elk.layered.crossingMinimization.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
241
|
+
{ name: "crossingMinimization.forceNodeModelOrder", elkId: "org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
242
|
+
{ name: "crossingMinimization.greedySwitch.activationThreshold", elkId: "org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold", type: "INT", targets: ["PARENTS"] },
|
|
243
|
+
{ name: "crossingMinimization.greedySwitch.type", elkId: "org.eclipse.elk.layered.crossingMinimization.greedySwitch.type", type: "ENUM", targets: ["PARENTS"] },
|
|
244
|
+
{ name: "crossingMinimization.greedySwitchHierarchical.type", elkId: "org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type", type: "ENUM", targets: ["PARENTS"] },
|
|
245
|
+
{ name: "crossingMinimization.semiInteractive", elkId: "org.eclipse.elk.layered.crossingMinimization.semiInteractive", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
246
|
+
{ name: "mergeEdges", elkId: "org.eclipse.elk.layered.mergeEdges", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
247
|
+
{ name: "mergeHierarchyEdges", elkId: "org.eclipse.elk.layered.mergeHierarchyEdges", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
248
|
+
{ name: "interactiveReferencePoint", elkId: "org.eclipse.elk.layered.interactiveReferencePoint", type: "ENUM", targets: ["PARENTS"] },
|
|
249
|
+
{ name: "nodePlacement.strategy", elkId: "org.eclipse.elk.layered.nodePlacement.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
250
|
+
{ name: "nodePlacement.bk.fixedAlignment", elkId: "org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment", type: "ENUM", targets: ["PARENTS"] },
|
|
251
|
+
{ name: "feedbackEdges", elkId: "org.eclipse.elk.layered.feedbackEdges", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
252
|
+
{ name: "nodePlacement.linearSegments.deflectionDampening", elkId: "org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening", type: "DOUBLE", targets: ["PARENTS"] },
|
|
253
|
+
{ name: "edgeRouting.selfLoopDistribution", elkId: "org.eclipse.elk.layered.edgeRouting.selfLoopDistribution", type: "ENUM", targets: ["NODES"] },
|
|
254
|
+
{ name: "edgeRouting.selfLoopOrdering", elkId: "org.eclipse.elk.layered.edgeRouting.selfLoopOrdering", type: "ENUM", targets: ["NODES"] },
|
|
255
|
+
{ name: "contentAlignment", elkId: "org.eclipse.elk.contentAlignment", type: "ENUMSET", targets: ["PARENTS"] },
|
|
256
|
+
{ name: "nodePlacement.bk.edgeStraightening", elkId: "org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening", type: "ENUM", targets: ["PARENTS"] },
|
|
257
|
+
{ name: "compaction.postCompaction.strategy", elkId: "org.eclipse.elk.layered.compaction.postCompaction.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
258
|
+
{ name: "compaction.postCompaction.constraints", elkId: "org.eclipse.elk.layered.compaction.postCompaction.constraints", type: "ENUM", targets: ["PARENTS"] },
|
|
259
|
+
{ name: "compaction.connectedComponents", elkId: "org.eclipse.elk.layered.compaction.connectedComponents", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
260
|
+
{ name: "highDegreeNodes.treatment", elkId: "org.eclipse.elk.layered.highDegreeNodes.treatment", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
261
|
+
{ name: "highDegreeNodes.threshold", elkId: "org.eclipse.elk.layered.highDegreeNodes.threshold", type: "INT", targets: ["PARENTS"] },
|
|
262
|
+
{ name: "highDegreeNodes.treeHeight", elkId: "org.eclipse.elk.layered.highDegreeNodes.treeHeight", type: "INT", targets: ["PARENTS"] },
|
|
263
|
+
{ name: "nodeSize.minimum", elkId: "org.eclipse.elk.nodeSize.minimum", type: "OBJECT", targets: ["NODES"] },
|
|
264
|
+
{ name: "junctionPoints", elkId: "org.eclipse.elk.junctionPoints", type: "OBJECT", targets: ["EDGES"] },
|
|
265
|
+
{ name: "edge.thickness", elkId: "org.eclipse.elk.edge.thickness", type: "DOUBLE", targets: ["EDGES"] },
|
|
266
|
+
{ name: "edgeLabels.placement", elkId: "org.eclipse.elk.edgeLabels.placement", type: "ENUM", targets: ["LABELS"] },
|
|
267
|
+
{ name: "edgeLabels.inline", elkId: "org.eclipse.elk.edgeLabels.inline", type: "BOOLEAN", targets: ["LABELS"] },
|
|
268
|
+
{ name: "crossingMinimization.hierarchicalSweepiness", elkId: "org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness", type: "DOUBLE", targets: ["PARENTS"] },
|
|
269
|
+
{ name: "port.index", elkId: "org.eclipse.elk.port.index", type: "INT", targets: ["PORTS"] },
|
|
270
|
+
{ name: "commentBox", elkId: "org.eclipse.elk.commentBox", type: "BOOLEAN", targets: ["NODES"] },
|
|
271
|
+
{ name: "hypernode", elkId: "org.eclipse.elk.hypernode", type: "BOOLEAN", targets: ["NODES"] },
|
|
272
|
+
{ name: "port.anchor", elkId: "org.eclipse.elk.port.anchor", type: "OBJECT", targets: ["PORTS"] },
|
|
273
|
+
{ name: "partitioning.activate", elkId: "org.eclipse.elk.partitioning.activate", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
274
|
+
{ name: "partitioning.partition", elkId: "org.eclipse.elk.partitioning.partition", type: "INT", targets: ["PARENTS","NODES"] },
|
|
275
|
+
{ name: "layering.minWidth.upperBoundOnWidth", elkId: "org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth", type: "INT", targets: ["PARENTS"] },
|
|
276
|
+
{ name: "layering.minWidth.upperLayerEstimationScalingFactor", elkId: "org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor", type: "INT", targets: ["PARENTS"] },
|
|
277
|
+
{ name: "position", elkId: "org.eclipse.elk.position", type: "OBJECT", targets: ["NODES","PORTS","LABELS"] },
|
|
278
|
+
{ name: "allowNonFlowPortsToSwitchSides", elkId: "org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides", type: "BOOLEAN", targets: ["PORTS"] },
|
|
279
|
+
{ name: "layering.nodePromotion.maxIterations", elkId: "org.eclipse.elk.layered.layering.nodePromotion.maxIterations", type: "INT", targets: ["PARENTS"] },
|
|
280
|
+
{ name: "edgeLabels.sideSelection", elkId: "org.eclipse.elk.layered.edgeLabels.sideSelection", type: "ENUM", targets: ["PARENTS"] },
|
|
281
|
+
{ name: "edgeLabels.centerLabelPlacementStrategy", elkId: "org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy", type: "ENUM", targets: ["PARENTS","LABELS"] },
|
|
282
|
+
{ name: "margins", elkId: "org.eclipse.elk.margins", type: "OBJECT", targets: ["NODES"] },
|
|
283
|
+
{ name: "layering.coffmanGraham.layerBound", elkId: "org.eclipse.elk.layered.layering.coffmanGraham.layerBound", type: "INT", targets: ["PARENTS"] },
|
|
284
|
+
{ name: "nodePlacement.favorStraightEdges", elkId: "org.eclipse.elk.layered.nodePlacement.favorStraightEdges", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
285
|
+
{ name: "spacing.portsSurrounding", elkId: "org.eclipse.elk.spacing.portsSurrounding", type: "OBJECT", targets: ["PARENTS"] },
|
|
286
|
+
{ name: "directionCongruency", elkId: "org.eclipse.elk.layered.directionCongruency", type: "ENUM", targets: ["PARENTS"] },
|
|
287
|
+
{ name: "portSortingStrategy", elkId: "org.eclipse.elk.layered.portSortingStrategy", type: "ENUM", targets: ["PARENTS"] },
|
|
288
|
+
{ name: "edgeRouting.polyline.slopedEdgeZoneWidth", elkId: "org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth", type: "DOUBLE", targets: ["PARENTS"] },
|
|
289
|
+
{ name: "crossingMinimization.inLayerPredOf", elkId: "org.eclipse.elk.layered.crossingMinimization.inLayerPredOf", type: "STRING", targets: ["NODES"] },
|
|
290
|
+
{ name: "crossingMinimization.inLayerSuccOf", elkId: "org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf", type: "STRING", targets: ["NODES"] },
|
|
291
|
+
{ name: "layering.layerChoiceConstraint", elkId: "org.eclipse.elk.layered.layering.layerChoiceConstraint", type: "INT", targets: ["NODES"] },
|
|
292
|
+
{ name: "crossingMinimization.positionChoiceConstraint", elkId: "org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint", type: "INT", targets: ["NODES"] },
|
|
293
|
+
{ name: "interactiveLayout", elkId: "org.eclipse.elk.interactiveLayout", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
294
|
+
{ name: "layering.layerId", elkId: "org.eclipse.elk.layered.layering.layerId", type: "INT", targets: ["NODES"] },
|
|
295
|
+
{ name: "crossingMinimization.positionId", elkId: "org.eclipse.elk.layered.crossingMinimization.positionId", type: "INT", targets: ["NODES"] },
|
|
296
|
+
{ name: "considerModelOrder.strategy", elkId: "org.eclipse.elk.layered.considerModelOrder.strategy", type: "ENUM", targets: ["PARENTS"] },
|
|
297
|
+
{ name: "considerModelOrder.longEdgeStrategy", elkId: "org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy", type: "ENUM", targets: ["PARENTS"] },
|
|
298
|
+
{ name: "considerModelOrder.crossingCounterNodeInfluence", elkId: "org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence", type: "DOUBLE", targets: ["PARENTS"] },
|
|
299
|
+
{ name: "considerModelOrder.crossingCounterPortInfluence", elkId: "org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence", type: "DOUBLE", targets: ["PARENTS"] },
|
|
300
|
+
{ name: "considerModelOrder.noModelOrder", elkId: "org.eclipse.elk.layered.considerModelOrder.noModelOrder", type: "BOOLEAN", targets: ["NODES"] },
|
|
301
|
+
{ name: "considerModelOrder.components", elkId: "org.eclipse.elk.layered.considerModelOrder.components", type: "ENUM", targets: ["PARENTS"] },
|
|
302
|
+
{ name: "considerModelOrder.portModelOrder", elkId: "org.eclipse.elk.layered.considerModelOrder.portModelOrder", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
303
|
+
{ name: "considerModelOrder.groupModelOrder.cycleBreakingId", elkId: "org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cycleBreakingId", type: "INT", targets: ["NODES"] },
|
|
304
|
+
{ name: "considerModelOrder.groupModelOrder.crossingMinimizationId", elkId: "org.eclipse.elk.layered.considerModelOrder.groupModelOrder.crossingMinimizationId", type: "INT", targets: ["NODES","EDGES","PORTS"] },
|
|
305
|
+
{ name: "considerModelOrder.groupModelOrder.componentGroupId", elkId: "org.eclipse.elk.layered.considerModelOrder.groupModelOrder.componentGroupId", type: "INT", targets: ["NODES","EDGES","PORTS"] },
|
|
306
|
+
{ name: "considerModelOrder.groupModelOrder.cbGroupOrderStrategy", elkId: "org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cbGroupOrderStrategy", type: "ENUM", targets: ["PARENTS"] },
|
|
307
|
+
{ name: "considerModelOrder.groupModelOrder.cmGroupOrderStrategy", elkId: "org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cmGroupOrderStrategy", type: "ENUM", targets: ["PARENTS"] },
|
|
308
|
+
{ name: "considerModelOrder.groupModelOrder.cmEnforcedGroupOrders", elkId: "org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cmEnforcedGroupOrders", type: "OBJECT", targets: ["PARENTS"] },
|
|
309
|
+
{ name: "considerModelOrder.groupModelOrder.cbPreferredSourceId", elkId: "org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cbPreferredSourceId", type: "INT", targets: ["PARENTS"] },
|
|
310
|
+
{ name: "considerModelOrder.groupModelOrder.cbPreferredTargetId", elkId: "org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cbPreferredTargetId", type: "INT", targets: ["PARENTS"] },
|
|
311
|
+
{ name: "generatePositionAndLayerIds", elkId: "org.eclipse.elk.layered.generatePositionAndLayerIds", type: "BOOLEAN", targets: ["PARENTS"] },
|
|
312
|
+
] as const;
|
|
313
|
+
|
|
314
|
+
export type ElkLayeredOptionName = keyof ElkLayeredOptionValueByName;
|
|
315
|
+
export type ElkLayeredOptionId = (typeof elkLayeredOptionDefinitions)[number]["elkId"];
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { LayoutDirection } from "../types";
|
|
2
|
+
import {
|
|
3
|
+
elkLayeredOptionDefinitions,
|
|
4
|
+
type ElkLayeredOptionId,
|
|
5
|
+
type ElkLayeredOptionName,
|
|
6
|
+
type ElkLayeredOptionValueByName,
|
|
7
|
+
} from "./elk-options.generated";
|
|
8
|
+
import { elkLayeredEnumValues } from "./elk-enum-values";
|
|
9
|
+
import type { LayeredLayoutOptions, LayoutPadding } from "./types";
|
|
10
|
+
export { elkLayeredEnumValues, type ElkLayeredEnumOptionName } from "./elk-enum-values";
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
elkLayeredOptionDefinitions,
|
|
14
|
+
type ElkLayeredOptionId,
|
|
15
|
+
type ElkLayeredOptionName,
|
|
16
|
+
type ElkLayeredOptionValueByName,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type CycleBreakingStrategy = (typeof elkLayeredEnumValues)["cycleBreaking.strategy"][number];
|
|
20
|
+
export type LayeringStrategy = (typeof elkLayeredEnumValues)["layering.strategy"][number];
|
|
21
|
+
export type CrossingMinimizationStrategy =
|
|
22
|
+
(typeof elkLayeredEnumValues)["crossingMinimization.strategy"][number];
|
|
23
|
+
export type NodePlacementStrategy = (typeof elkLayeredEnumValues)["nodePlacement.strategy"][number];
|
|
24
|
+
export type EdgeRoutingStyle = (typeof elkLayeredEnumValues)["edgeRouting"][number];
|
|
25
|
+
|
|
26
|
+
type StrictElkLayeredOptionValueByName = Omit<
|
|
27
|
+
ElkLayeredOptionValueByName,
|
|
28
|
+
keyof typeof elkLayeredEnumValues
|
|
29
|
+
> & {
|
|
30
|
+
[Name in keyof typeof elkLayeredEnumValues]?: (typeof elkLayeredEnumValues)[Name][number];
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type LayeredAdvancedOptions = Omit<
|
|
34
|
+
StrictElkLayeredOptionValueByName,
|
|
35
|
+
| "direction"
|
|
36
|
+
| "padding"
|
|
37
|
+
| "spacing.node"
|
|
38
|
+
| "spacing.layer"
|
|
39
|
+
| "cycleBreaking.strategy"
|
|
40
|
+
| "layering.strategy"
|
|
41
|
+
| "crossingMinimization.strategy"
|
|
42
|
+
| "nodePlacement.strategy"
|
|
43
|
+
| "edgeRouting"
|
|
44
|
+
> & {
|
|
45
|
+
"cycleBreaking.strategy"?: CycleBreakingStrategy;
|
|
46
|
+
"layering.strategy"?: LayeringStrategy;
|
|
47
|
+
"crossingMinimization.strategy"?: CrossingMinimizationStrategy;
|
|
48
|
+
"nodePlacement.strategy"?: NodePlacementStrategy;
|
|
49
|
+
edgeRouting?: EdgeRoutingStyle;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const definitionByName = new Map(
|
|
53
|
+
elkLayeredOptionDefinitions.map((definition) => [definition.name, definition]),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
function formatPadding(padding: number | Partial<LayoutPadding>): string {
|
|
57
|
+
if (typeof padding === "number") {
|
|
58
|
+
return `[top=${padding},right=${padding},bottom=${padding},left=${padding}]`;
|
|
59
|
+
}
|
|
60
|
+
return `[top=${padding.top ?? 0},right=${padding.right ?? 0},bottom=${padding.bottom ?? 0},left=${padding.left ?? 0}]`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function formatDirection(direction: LayoutDirection): Uppercase<LayoutDirection> {
|
|
64
|
+
return direction.toUpperCase() as Uppercase<LayoutDirection>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Translate every simplified layered setting to its exact ELK 0.11.1 option ID. */
|
|
68
|
+
export function toElkLayeredOptions(
|
|
69
|
+
options: LayeredLayoutOptions,
|
|
70
|
+
): Partial<Record<ElkLayeredOptionId, unknown>> {
|
|
71
|
+
const result: Partial<Record<ElkLayeredOptionId, unknown>> = {};
|
|
72
|
+
if (options.direction !== undefined) {
|
|
73
|
+
result["org.eclipse.elk.direction"] = formatDirection(options.direction);
|
|
74
|
+
}
|
|
75
|
+
if (options.padding !== undefined) {
|
|
76
|
+
result["org.eclipse.elk.padding"] = formatPadding(options.padding);
|
|
77
|
+
}
|
|
78
|
+
if (options.spacing?.node !== undefined) {
|
|
79
|
+
result["org.eclipse.elk.spacing.nodeNode"] = options.spacing.node;
|
|
80
|
+
}
|
|
81
|
+
if (options.spacing?.layer !== undefined) {
|
|
82
|
+
result["org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers"] = options.spacing.layer;
|
|
83
|
+
}
|
|
84
|
+
for (const [name, value] of Object.entries(options.settings ?? {})) {
|
|
85
|
+
if (value === undefined) continue;
|
|
86
|
+
const definition = definitionByName.get(name as ElkLayeredOptionName);
|
|
87
|
+
if (!definition) throw new Error(`Unknown layered setting: ${name}`);
|
|
88
|
+
result[definition.elkId] = value;
|
|
89
|
+
}
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Return the simplified public name for an exact ELK layered option ID. */
|
|
94
|
+
export function fromElkLayeredOptionId(id: ElkLayeredOptionId): ElkLayeredOptionName {
|
|
95
|
+
const definition = elkLayeredOptionDefinitions.find((candidate) => candidate.elkId === id);
|
|
96
|
+
if (!definition) throw new Error(`Unknown ELK layered option: ${id}`);
|
|
97
|
+
return definition.name;
|
|
98
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GraphPort } from "@statelyai/graph";
|
|
2
|
+
|
|
3
|
+
const positionByPort = new WeakMap<object, { x: number; y: number }>();
|
|
4
|
+
|
|
5
|
+
export function setFlexiblePortPosition(port: GraphPort, x: number, y: number): void {
|
|
6
|
+
positionByPort.set(port, { x, y });
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function getFlexiblePortPosition(port: GraphPort): { x: number; y: number } | undefined {
|
|
10
|
+
return positionByPort.get(port);
|
|
11
|
+
}
|