@statelyai/layout 0.3.0 → 0.4.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.
Files changed (110) hide show
  1. package/NOTICE.md +4 -2
  2. package/README.md +150 -11
  3. package/dist/elkjs/index.cjs +2 -2
  4. package/dist/elkjs/index.d.cts +2 -0
  5. package/dist/elkjs/index.d.mts +2 -0
  6. package/dist/elkjs/index.mjs +2 -2
  7. package/dist/elkjs/main.cjs +1 -1
  8. package/dist/elkjs/main.mjs +1 -1
  9. package/dist/elkjs/worker.cjs +2 -2
  10. package/dist/elkjs/worker.mjs +2 -2
  11. package/dist/elkjs-UciYx7lD.mjs +2973 -0
  12. package/dist/elkjs-ggjsBuVP.cjs +3002 -0
  13. package/dist/{index-BEA_pzeT.d.cts → index-B6cWNrMw.d.cts} +9 -1
  14. package/dist/{index-DNTLRsDl.d.mts → index-CJQLUKD9.d.mts} +9 -1
  15. package/dist/{index-DNixtE3h.d.mts → index-DT6lPMfS.d.cts} +85 -5
  16. package/dist/{index-D9dhxrRl.d.cts → index-F1U-fCTu.d.mts} +85 -5
  17. package/dist/index.cjs +6 -3
  18. package/dist/index.d.cts +3 -3
  19. package/dist/index.d.mts +3 -3
  20. package/dist/index.mjs +4 -4
  21. package/dist/layered/index.cjs +3 -1
  22. package/dist/layered/index.d.cts +2 -2
  23. package/dist/layered/index.d.mts +2 -2
  24. package/dist/layered/index.mjs +2 -2
  25. package/dist/{layered-DGFTeQSl.mjs → layered-C7ERzZjR.mjs} +9605 -1655
  26. package/dist/{layered-B2buJqMf.cjs → layered-CBPg6_6_.cjs} +12481 -4435
  27. package/dist/{layout-engine-Dn1PiFwP.cjs → layout-engine-DAw06RhN.cjs} +5 -18
  28. package/dist/{layout-engine-Cs5tatA6.mjs → layout-engine-DC3IYkIy.mjs} +3 -10
  29. package/dist/routing/index.cjs +2 -1
  30. package/dist/routing/index.d.cts +2 -2
  31. package/dist/routing/index.d.mts +2 -2
  32. package/dist/routing/index.mjs +2 -2
  33. package/dist/{routing-A2hrK9MP.mjs → routing-CR8flv8b.mjs} +977 -593
  34. package/dist/{routing-ujEP7Qh6.cjs → routing-QIdGGFBe.cjs} +986 -596
  35. package/package.json +8 -2
  36. package/src/authoring/coordinates.ts +28 -8
  37. package/src/authoring/partial.ts +7 -2
  38. package/src/authoring/routing.ts +4 -1
  39. package/src/constraints.ts +174 -6
  40. package/src/elkjs/index.ts +1392 -449
  41. package/src/elkjs/layout-quality.ts +219 -0
  42. package/src/elkjs/opposing-tracks.ts +161 -0
  43. package/src/elkjs/orthogonal-junctions.ts +174 -0
  44. package/src/elkjs/statechart.ts +9 -3
  45. package/src/elkjs/types.ts +2 -0
  46. package/src/index.ts +2 -0
  47. package/src/internal/elkjs-compatibility.ts +4 -1
  48. package/src/internal/layered-trace.ts +48 -0
  49. package/src/internal/layout-engine.ts +2 -1
  50. package/src/java-random.ts +6 -0
  51. package/src/layered/bk-node-placement.ts +403 -92
  52. package/src/layered/center-labels.ts +398 -0
  53. package/src/layered/compaction-bounds.ts +26 -0
  54. package/src/layered/compaction-errors.ts +2 -0
  55. package/src/layered/compaction-scanline.ts +63 -0
  56. package/src/layered/compound-boundaries.ts +99 -0
  57. package/src/layered/compound.ts +35 -7
  58. package/src/layered/constraint-orientation.ts +141 -0
  59. package/src/layered/crossing-constraints.ts +243 -0
  60. package/src/layered/crossing-counter.ts +221 -0
  61. package/src/layered/crossing-graph.ts +401 -0
  62. package/src/layered/cycle-random.ts +22 -0
  63. package/src/layered/elk-port-lists.ts +243 -0
  64. package/src/layered/end-labels.ts +124 -0
  65. package/src/layered/external-port-dummy.ts +137 -0
  66. package/src/layered/feedback-chains.ts +114 -0
  67. package/src/layered/fixed-self-loop.ts +150 -0
  68. package/src/layered/greedy-switch-decider.ts +356 -0
  69. package/src/layered/grouped-compaction.ts +787 -0
  70. package/src/layered/gwt-sort.ts +53 -0
  71. package/src/layered/hierarchical-port-phases.ts +242 -0
  72. package/src/layered/hierarchical-port-restoration.ts +233 -0
  73. package/src/layered/hierarchical-port-routing.ts +179 -0
  74. package/src/layered/hierarchy-crossing.ts +121 -0
  75. package/src/layered/hierarchy-sweepiness.ts +83 -0
  76. package/src/layered/hints.ts +371 -0
  77. package/src/layered/hyperedge-dummy-merger.ts +195 -0
  78. package/src/layered/index.ts +886 -161
  79. package/src/layered/initial-model-order.ts +404 -0
  80. package/src/layered/inverted-ports.ts +207 -0
  81. package/src/layered/label-dummy-switcher.ts +200 -0
  82. package/src/layered/long-edges.ts +135 -44
  83. package/src/layered/loop-envelopes.ts +184 -0
  84. package/src/layered/native-routing.ts +275 -0
  85. package/src/layered/network-simplex.ts +11 -15
  86. package/src/layered/node-margins.ts +59 -0
  87. package/src/layered/north-south-ports.ts +271 -0
  88. package/src/layered/opposing-tracks.ts +944 -0
  89. package/src/layered/orthogonal-cycle-order.ts +106 -0
  90. package/src/layered/orthogonal-hypersegments.ts +92 -0
  91. package/src/layered/orthogonal-junctions.ts +202 -0
  92. package/src/layered/orthogonal-segments.ts +243 -0
  93. package/src/layered/placement-orientation.ts +22 -0
  94. package/src/layered/port-distributor.ts +192 -0
  95. package/src/layered/port-edge-order.ts +20 -0
  96. package/src/layered/replace-routing.ts +45 -0
  97. package/src/layered/routing-coordinates.ts +32 -0
  98. package/src/layered/separate-exterior-labels.ts +24 -6
  99. package/src/layered/spacing.ts +34 -12
  100. package/src/layered/splitter-order.ts +106 -0
  101. package/src/layered/strategies.ts +2024 -883
  102. package/src/layered/types.ts +13 -0
  103. package/src/layered/weighted-compaction.ts +84 -0
  104. package/src/routing/adapters.ts +32 -0
  105. package/src/routing/algorithms.ts +433 -21
  106. package/src/routing/coordination.ts +8 -3
  107. package/src/routing/index.ts +1 -0
  108. package/src/routing/search.ts +93 -11
  109. package/dist/elkjs-DaHMISnQ.mjs +0 -1677
  110. package/dist/elkjs-dMghiiWW.cjs +0 -1706
package/NOTICE.md CHANGED
@@ -7,8 +7,10 @@ The project intends to implement algorithms available in the Eclipse Layout
7
7
  Kernel. Eclipse Layout Kernel is maintained by the ELK contributors and is a
8
8
  trademark of the Eclipse Foundation. See https://github.com/eclipse-elk/elk.
9
9
 
10
- No Eclipse Layout Kernel implementation source has been copied into the native
11
- layout implementation.
10
+ Some native TypeScript phases are translated or derived from Eclipse Layout
11
+ Kernel v0.11.0 implementation sources. Those files retain upstream copyright
12
+ notices and EPL-2.0 identifiers. The native runtime does not depend on elkjs;
13
+ elkjs is used as a development oracle for differential testing.
12
14
 
13
15
  The demo includes example models derived from the Eclipse ELK Models repository
14
16
  at revision ac5af2ba511c0037e4f347e8bd91f013950951c7:
package/README.md CHANGED
@@ -12,14 +12,29 @@ immutable structured routes and incremental patches alongside the existing
12
12
 
13
13
  <!-- layered compatibility coverage from test/oracle*.test.ts -->
14
14
 
15
- The native layered implementation covers the complete 152-option elkjs 0.11.1
16
- layered inventory with one simplified typed name per ELK option. Flat and
17
- compound graphs, cross-hierarchy edges, ports, labels, self-loops, wrapping,
18
- four directions, constraints, and replaceable phases are differential-tested
19
- against elkjs, including a curated complex state-machine corpus in both primary
20
- layout orientations. Native layered layout also supports partial selection,
21
- route-only execution, and geometric constraints. Incremental layout remains
22
- explicitly unsupported.
15
+ The native layered implementation reimplements ELK-derived phases and maps the
16
+ complete 152-option elkjs 0.11.1 layered inventory to simplified typed names.
17
+ Focused differential tests cover flat/compound graphs, cross-hierarchy edges,
18
+ ports, labels, self-loops, wrapping, directions, constraints, and phase overrides.
19
+ A development-only oracle compares native constraint-group resolution against
20
+ unmodified elkjs internals on 512 seeded intermediate graphs, including complete
21
+ node order and barycenters. This validates that phase independently of the
22
+ unfinished pipeline integration. Ordered barycenter traversal has 512 seeded
23
+ port-graph comparisons; cross-port layer and associate order has 256 seeded
24
+ mixed-role comparisons. External-port dummy construction matches every real
25
+ ELK factory field on 1,536 seeded boundaries; four direction regressions preserve
26
+ the selected descendant port across a compound boundary.
27
+ Initial model ordering and port-helper alignment have seven retained random
28
+ full-geometry regressions across independent seed ranges. Mixed-port junction
29
+ restoration has nineteen more, covering direct and joined routes in all directions.
30
+ Nested helper bounds have twelve complete-geometry regressions, including parent placement/routing after child resizing. Hierarchy boundary-side preparation and canonical port sorting add a 48-case constraint matrix and fifteen retained direction regressions. Coincident cross-port restoration retains both physical endpoints. Preserving authored compound constraints and transforming boundary-helper placement raises the matrix to 36 matches, with twelve failures retained. A separate frozen random corpus covers compound constraints and authored compound ports; see [compound helper evidence](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/compound-helper-orientation/README.md). Authored and implicit ancestor endpoints have a further 320-case strict gate: 320 complete matches after perpendicular-port pipeline integration. See [compound endpoint evidence](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/authored-compound-port-scope/README.md). Internal perpendicular boundary processors pass 800 phase/direction checks against the real worker; public pipeline integration now passes the strict endpoint gate. See [phase evidence](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/hierarchical-port-phases/README.md) and [integration evidence](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/integrated-boundary-routing/README.md). Child-scope junction transfer adds two exact random compound matches; broader random parity remains incomplete. See [junction evidence](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/compound-junction-transfer/README.md).
31
+ A deeper random corpus adds three levels of nesting, bounded ports, cycles, loops and cross-boundary edges. Physical hierarchy boundaries now survive feedback reversal; complete comparisons still expose substantial geometry differences.
32
+ That coverage does not establish broad geometry or aesthetic parity: native
33
+ hierarchy placement and routing still diverge materially from real ELK. The
34
+ [side-by-side random corpus](docs/heuristics/README.md) uses the actual elkjs
35
+ runtime and one shared scorer to track that gap. Native layered layout also
36
+ supports partial selection, route-only execution, and geometric constraints.
37
+ Incremental layout remains explicitly unsupported.
23
38
 
24
39
  ## Install
25
40
 
@@ -92,6 +107,32 @@ These options belong to the native contract; they do not change the pinned
92
107
  ELK compatibility contract. The existing simplified advanced options still
93
108
  map to ELK option IDs, but identical geometry is not guaranteed between contracts.
94
109
 
110
+ ## Replace initial routes
111
+
112
+ <!-- layered post-layout routing option from src/layered/types.ts and src/layered/replace-routing.ts -->
113
+
114
+ Initial layered layout computes placement, labels, ports, and routes. An optional
115
+ replacement router then discards those routes and computes new ones on the finalized
116
+ geometry:
117
+
118
+ ```ts
119
+ import { getLayeredLayout } from "@statelyai/layout";
120
+ import { bezierRouting } from "@statelyai/layout/routing";
121
+
122
+ const result = getLayeredLayout(graph, {
123
+ routing: { strategy: bezierRouting, settings: { clearance: 8 } },
124
+ });
125
+ ```
126
+
127
+ The replacement receives world-space nodes and labels, without initial paths or
128
+ route caches. It must synchronously return one route per edge. Node, port, label,
129
+ and compound geometry remain unchanged; render `getLayoutRoutes(result)` to retain
130
+ curves and disconnected sections. Async routers can be run separately after layout.
131
+ `strategies.routeEdges` remains an initial layout phase override; `routing` runs after
132
+ initial layout. Neither this separation nor API compatibility establishes ELK quality parity.
133
+
134
+ Post-layout replacement currently requires unconstrained full layout through `getLayout`. For scoped or constrained geometry, run standalone routing after applying the layout result.
135
+
95
136
  ## Standalone incremental routing
96
137
 
97
138
  <!-- routing API and strategy catalog from src/routing/index.ts -->
@@ -162,10 +203,46 @@ and topology remain fixed. Results include field-specific graph patches and
162
203
  repair/conflict diagnostics. Constraints support alignment, distribution, pins,
163
204
  linear equalities/inequalities, and route waypoints.
164
205
 
206
+ Full layouts accept the same constraints on graphs with containers. A moved
207
+ container carries its children; a container grows to keep a moved child
208
+ inside; siblings never overlap. Only edges touching moved geometry are
209
+ re-routed. A required constraint that would need an overlap fails with
210
+ `UNSATISFIED_CONSTRAINT`; weaker strengths are relaxed and reported.
211
+
165
212
  See [authoring layout](docs/authoring-layout.md) for baseline requirements,
166
213
  selection semantics, routing limits, and examples. Existing ELK compatibility
167
214
  behavior is unchanged.
168
215
 
216
+ ## Layout hints
217
+
218
+ <!-- hint constructors and statechartHints from src/layered/hints.ts -->
219
+
220
+ Hints describe what a reader expects; the layered phases apply them during
221
+ layering, ordering and placement:
222
+
223
+ ```ts
224
+ import { getLayeredLayout, hint, statechartHints } from "@statelyai/layout";
225
+
226
+ getLayeredLayout(graph, {
227
+ hints: [
228
+ hint.anchor({ id: "initial", nodeId: "idle", corner: "start" }), // top-left
229
+ hint.chain({ id: "happy-path", nodeIds: ["form", "checking", "done"] }), // one center line
230
+ ],
231
+ });
232
+
233
+ // Statecharts: initial states anchor at the start of their container, and
234
+ // runs of states joined one-to-one form chains.
235
+ getLayeredLayout(graph, { hints: statechartHints(graph) });
236
+ ```
237
+
238
+ Hints never create defects (overlaps, routes through nodes, diagonal
239
+ segments). A hint is `prefer` by default: it is kept only when the layout is no
240
+ worse than one without it in crossings, bends, route length and area, and a
241
+ dropped hint is reported as `HINT_RELAXED`. `strength: "require"` keeps the
242
+ hint even at that cost. `statechartHints` requires initial-state anchors and
243
+ prefers chains. Hints apply to the native API; the elkjs compatibility entry
244
+ point is unchanged.
245
+
169
246
  ## elkjs compatibility
170
247
 
171
248
  <!-- elkjs-compatible entry point and layered mapping exports from package.json#exports and src/layered/index.ts -->
@@ -203,9 +280,9 @@ The compatibility entry's named graph, edge, option, and result types are
203
280
  mutually assignable with the declarations shipped by `elkjs@0.11.1`. Its
204
281
  default class also accepts the library's broader internal graph inputs.
205
282
 
206
- <!-- fixed-port placement and inline center-label guarantees from src/layered/index.ts and src/layered/strategies.ts -->
283
+ <!-- fixed-port placement and inline center-label guarantees from src/layered/index.ts, src/layered/strategies.ts and src/layered/orthogonal-junctions.ts -->
207
284
 
208
- Fixed port sides constrain routes without collapsing fan-out targets onto each other. Port preferences cannot reintroduce cycles before layering. Inline center labels use reserved inter-rank space; orthogonally routed labels use distinct cross-axis lanes that avoid other labels and states. Dedicated label layers and route-track compaction retain their placement strategies. Inline self-loop labels reserve clearance on their assigned sides from both their owner and neighboring nodes. Hierarchy decomposition preserves native self-loop routes for ancestor-to-descendant edges. FIRST/FIRST_SEPARATE nodes may have self-loops.
285
+ Fixed port sides constrain routes without collapsing fan-out targets onto each other. Detached cross-port rows retain incoming adjacency through splitting and inversion for BK straightening. Port preferences cannot reintroduce cycles before layering. Inline center labels use reserved inter-rank space; orthogonally routed labels use distinct cross-axis lanes that avoid other labels and states. Dedicated label layers reserve clearance on both sides of routing tracks; route-track compaction retains their placement strategies. Inline self-loop labels reserve clearance on their assigned sides from both their owner and neighboring nodes. Hierarchy decomposition preserves native self-loop routes for ancestor-to-descendant edges. FIRST/FIRST_SEPARATE nodes may have self-loops. Fixed loops reserve their perimeter clearance before placement and in routing ranks. Track clearance follows physical edge direction through cycle reversal. Orthogonal junctions retain physical routing ownership through joining and compaction. Infeasible post-compaction relations retain the initial finite geometry.
209
286
 
210
287
  Advanced layered settings use shorter names such as
211
288
  `layering.strategy`, `spacing.edgeNode`, and `nodePlacement.strategy`.
@@ -278,6 +355,11 @@ API coverage separately from native algorithm fidelity.
278
355
 
279
356
  ## Development
280
357
 
358
+ <!-- heuristic corpus generation from scripts/generate-heuristic-corpus.mjs -->
359
+
360
+ For seeded native Stately layout examples and aesthetic review notes, see the
361
+ [heuristic review corpus](docs/heuristics/README.md).
362
+
281
363
  <!-- scripts derived from package.json#scripts -->
282
364
 
283
365
  ```bash
@@ -330,5 +412,62 @@ Publishing uses npm Trusted Publishing through `.github/workflows/release.yml`.
330
412
  The opt-in `layoutStatechart` export from `@statelyai/layout/elkjs` compiles
331
413
  initial-state and preferred-path hints into scoped settings, then selects among
332
414
  at most three fresh layout attempts. It returns all quality scores, including
333
- remaining defects. See [statechart policies](docs/statechart-layout.md) for the
415
+ remaining defects. Path scoring honors inherited compound directions and
416
+ explicit scope overrides. See [statechart policies](docs/statechart-layout.md) for the
334
417
  API, supported controls, tradeoffs and reproducible visual comparison.
418
+
419
+ For the strict seeded hierarchy comparison with real ELK, run
420
+ `pnpm test:parity:compound`. See the
421
+ [compound baseline](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/compound-baseline/README.md) for preserved
422
+ failures and side-by-side diagrams. This finite gate passes; broad native parity
423
+ remains work in progress.
424
+
425
+ For bounded random fixed-port self-loops, run `pnpm test:parity:self-loops`.
426
+ This smaller gate compares complete node/port geometry, routes and junctions
427
+ with real ELK; passing it does not establish broad hierarchy parity.
428
+
429
+ For bounded random flat graphs with cycles, self-loops, fixed-side/fixed-position
430
+ ports and labels, run `pnpm test:parity:flat`. This strict geometry gate preserves
431
+ all mismatches and engine errors; it currently fails. See the
432
+ [flat random proof](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/bk-compaction-thresholds/README.md).
433
+
434
+ For directional compaction on the same bounded random flat/hierarchical families,
435
+ run `pnpm exec tsx scripts/check-directional-compaction-parity.ts`. This additional
436
+ 200-case gate preserves all failures, including real ELK errors; it currently
437
+ fails. See the [directional compaction proof](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/directional-compaction/README.md).
438
+
439
+ For model-order settings on bounded random flat/hierarchical graphs, run
440
+ `pnpm test:parity:model-order`. This strict 200-case gate alternates forced node
441
+ ordering, preserves complete failures and reference exceptions, and currently
442
+ fails. See the [inverted-port model-order proof](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/inverted-port-model-order/README.md). Remaining fixed-port route differences are traced in the
443
+ [helper ordering investigation](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/fixed-port-helper-investigation/README.md).
444
+
445
+ <!-- implementation from src/layered/loop-envelopes.ts, src/layered/strategies.ts, src/layered/index.ts and src/elkjs/index.ts -->
446
+
447
+ Movable self-loop labels reserve clearance before placement and retain directional alignment and stacked routing clearance. Compaction retains their complete label envelopes. See the [native loop label comparison](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/movable-loop-labels/README.md).
448
+
449
+ Routing reuses self-loop envelopes already reserved by placement, keeping neighboring hierarchy helpers in their chosen positions. See the [preplaced loop envelope regression](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/preplaced-loop-envelope/README.md).
450
+
451
+ Orthogonal junction ownership follows physical incident edge order after reversal. See the [junction ownership regression](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/physical-junction-order/README.md).
452
+
453
+ Joining reversed edge chains retains physical routing order for junction points. See the [reversed chain regression](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/reversed-junction-chains/README.md).
454
+
455
+ Crossing minimization starts from ELK's long-edge splitter order: component order, then dummies appended through authored port order. See the [splitter order replay](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/long-edge-splitter-order/README.md).
456
+
457
+ That order walks ELK's per-port edge lists, replayed through reversal history, label dummies and hierarchy segment creation. See the [port edge-list replay](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/elk-port-edge-lists/README.md).
458
+
459
+ Greedy switching decides each swap from ELK's local two-node crossing estimates. See the [greedy switch decider](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/greedy-switch-decider/README.md).
460
+
461
+ Barycenter sweeps visit each port's edges in ELK's list order. See the [port edge visit order](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/port-edge-visit-order/README.md).
462
+
463
+ A north/south port whose dummy ends crossing minimization on the other side of its node moves to that side. See the [north/south port sides](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/north-south-port-sides/README.md).
464
+
465
+ In-layer edges kept by merged hyperedge dummies join their routing hyperedge. See the [merged dummy port faces](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/merged-dummy-port-faces/README.md).
466
+
467
+ Self loops that share a port route on one track. See the [shared self-loop tracks](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/shared-self-loop-tracks/README.md).
468
+
469
+ Orthogonal routing walks port edge lists in ELK order when building hyperedge segments and assigning junctions. See the [orthogonal edge lists](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/orthogonal-edge-lists/README.md).
470
+
471
+ A merged hyperedge dummy that absorbed an inverted-port dummy keeps its in-layer route in the adjacent channel. See [merged inverted routes](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/merged-inverted-routes/README.md).
472
+
473
+ BK edge straightening ignores self loops, and hyperedge dummies merge only when ELK import detects a hyperedge. See [BK hidden self loops](https://github.com/statelyai/layout/blob/heuristics-evidence/docs/heuristics/bk-hidden-self-loops/README.md).
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- require('../layered-B2buJqMf.cjs');
3
- const require_elkjs = require('../elkjs-dMghiiWW.cjs');
2
+ require('../layered-CBPg6_6_.cjs');
3
+ const require_elkjs = require('../elkjs-ggjsBuVP.cjs');
4
4
 
5
5
  exports.compileStatechartLayout = require_elkjs.compileStatechartLayout;
6
6
  exports.default = require_elkjs.ELK;
@@ -32,6 +32,8 @@ interface ElkEdgeSection$1 extends ElkGraphElement$1 {
32
32
  outgoingShape?: ElkId;
33
33
  }
34
34
  interface ElkEdge$1 extends ElkGraphElement$1 {
35
+ /** Node whose coordinate frame contains the exported route. */
36
+ container?: ElkId;
35
37
  sources?: ElkId[];
36
38
  targets?: ElkId[];
37
39
  source?: ElkId;
@@ -32,6 +32,8 @@ interface ElkEdgeSection$1 extends ElkGraphElement$1 {
32
32
  outgoingShape?: ElkId;
33
33
  }
34
34
  interface ElkEdge$1 extends ElkGraphElement$1 {
35
+ /** Node whose coordinate frame contains the exported route. */
36
+ container?: ElkId;
35
37
  sources?: ElkId[];
36
38
  targets?: ElkId[];
37
39
  source?: ElkId;
@@ -1,4 +1,4 @@
1
- import "../layered-DGFTeQSl.mjs";
2
- import { a as scoreStatechartLayout, i as layoutStatechart, n as getElkRoutes, r as compileStatechartLayout, t as ELK } from "../elkjs-DaHMISnQ.mjs";
1
+ import "../layered-C7ERzZjR.mjs";
2
+ import { a as scoreStatechartLayout, i as layoutStatechart, n as getElkRoutes, r as compileStatechartLayout, t as ELK } from "../elkjs-UciYx7lD.mjs";
3
3
 
4
4
  export { compileStatechartLayout, ELK as default, getElkRoutes, layoutStatechart, scoreStatechartLayout };
@@ -1,4 +1,4 @@
1
- require('../layered-B2buJqMf.cjs');
1
+ require('../layered-CBPg6_6_.cjs');
2
2
  const require_elkjs_worker = require('./worker.cjs');
3
3
  const require_worker_client = require('../worker-client-D4oEvhAl.cjs');
4
4
 
@@ -1,4 +1,4 @@
1
- import "../layered-DGFTeQSl.mjs";
1
+ import "../layered-C7ERzZjR.mjs";
2
2
  import { Worker } from "./worker.mjs";
3
3
  import { t as WorkerELK } from "../worker-client-BNjwT1AJ.mjs";
4
4
 
@@ -1,5 +1,5 @@
1
- require('../layered-B2buJqMf.cjs');
2
- const require_elkjs = require('../elkjs-dMghiiWW.cjs');
1
+ require('../layered-CBPg6_6_.cjs');
2
+ const require_elkjs = require('../elkjs-ggjsBuVP.cjs');
3
3
 
4
4
  //#region src/elkjs/worker.ts
5
5
  /*******************************************************************************
@@ -1,5 +1,5 @@
1
- import "../layered-DGFTeQSl.mjs";
2
- import { t as ELK } from "../elkjs-DaHMISnQ.mjs";
1
+ import "../layered-C7ERzZjR.mjs";
2
+ import { t as ELK } from "../elkjs-UciYx7lD.mjs";
3
3
 
4
4
  //#region src/elkjs/worker.ts
5
5
  /*******************************************************************************