Expand description
Optional ELK layout engine integration for merman.
Source-port policy:
- The historical Mermaid adapter derivation is https://github.com/mermaid-js/mermaid/blob/21f72f07ea22c0af48a3149c550654e80d8e40cb/packages/mermaid/src/rendering-util/layout-algorithms/elk/render.ts.
- The historical
elkjs@0.9.3derivation is https://github.com/kieler/elkjs/tree/a8304cf79fde75bc2ab1a89d28320f53f8637436. - The historical Eclipse ELK Java derivation is https://github.com/eclipse-elk/elk/tree/62d5909f96fad541bc101ad52dabaece6b7eab7e,
- Mermaid 12.3.0’s exact engine oracle is elkjs 0.12.0 at
https://github.com/kieler/elkjs/tree/ff5771d7165445c42c408bb8a090c8035272218c,
compared with Eclipse ELK 0.12.0 at
https://github.com/eclipse-elk/elk/tree/323312916048544e4e594eab3303cdb0d01e2929.
elkjs CI clones ELK master, so this tag is not a proven unique npm build input.
The engine crate’s
MERMAID_12_3_DELTA.mdrecords ported deltas and unsupported options.
The crate exposes one Mermaid adapter over the source-backed ELK providers. Additional providers handle flat graphs and recursive containers, including Mermaid’s explicit metadata presets and cross-boundary downgrade. Remaining cross-provider boundary routes are rejected explicitly. New layout behavior must carry a pinned Mermaid or Eclipse ELK source reference.
Structs§
- Container
Node Options - Container
Options - Mermaid resolves container placement independently from root placement in named presets.
- Edge
- Edge
Label Layout - Edge
Layout - ElkOperation
Seed - The nonzero random seed captured by the owner of one render/layout operation.
- Graph
- Graph
Execution - Hierarchy
Sweep Debug Trace - Hierarchy
Sweep Node Debug - Label
- Layered
Options - Layout
Options - Layout
Result - Node
- Node
Layout - Noop
Work Control - Checked no-op control used by compatibility entry points.
- Point
- Source
Phase Diagnostics - A guarded diagnostic session for inspecting the source-backed layered pipeline.
- Spacing
- Terminal
Label
Enums§
- Algorithm
- Resolved ELK provider identity. Root loader names and container metadata have distinct allowlists in Mermaid; callers must resolve those before constructing the graph.
- Cycle
Breaking Strategy - Direction
- Edge
Routing - Error
- Hierarchy
Handling - Layer
Constraint - Layered
Phase - Layering
Strategy - Model
Order Strategy - Node
Kind - Node
Placement Alignment - Node
Placement Strategy - Port
Alignment - Processor
Kind - Self
Loop Distribution Strategy - Self
Loop Ordering Strategy - Terminal
Label Key - Semantic terminal identity survives compound splitting and reversed provider routes.
- Work
Error - Neutral failure returned by caller-provided layout work controls.
Traits§
- Work
Control - Caller-owned work control for one ELK import/layout invocation.
Functions§
- layout
- Executes the selected source-backed ELK provider. Unsupported cross-provider boundary edges return a typed error instead of flattening the graph or substituting the Layered provider.
- layout_
with_ operation_ seed - Executes Mermaid’s ELK adapter using the seed captured by its owning operation.
- layout_
with_ operation_ seed_ and_ work_ control - Executes Mermaid’s ELK adapter with one operation-owned seed and checked work control.
- layout_
with_ work_ control - Executes Mermaid’s ELK adapter with caller-owned checked work control.