moonrockz/diagrams-svg/swimlane-layout
Types
Connection
pub struct Connection {
connection : @moonrockz/diagrams/swimlane.Connection
index : Int
source : String
target : String
line : ReadOnlyArray[Point]
label : Label?
} derive(Eq, @moonbitlang/core/debug.Debug)Connection::equal
fn Connection::equal(Connection, Connection) -> BoolConnection::not_equal
fn Connection::not_equal(x : Connection, y : Connection) -> BoolConnection::to_repr
fn Connection::to_repr(Connection) -> @moonbitlang/core/debug.ReprConnectionNote
pub struct ConnectionNote {
id : String
connection : String
note : String
}A note attached to an actual drawn connection rather than a control node.
ConnectionNote::new
fn ConnectionNote::new(id : String, connection : String, note : String) -> ConnectionNoteFinding
pub struct Finding {
rule : Rule
identities : ReadOnlyArray[String]
message : String
} derive(Eq, @moonbitlang/core/debug.Debug)Finding::equal
fn Finding::equal(Finding, Finding) -> BoolFinding::not_equal
fn Finding::not_equal(x : Finding, y : Finding) -> BoolFinding::to_repr
fn Finding::to_repr(Finding) -> @moonbitlang/core/debug.ReprGeometry
pub struct Geometry {
view : @moonrockz/diagrams/swimlane.Swimlane
shapes : ReadOnlyArray[Shape]
connections : ReadOnlyArray[Connection]
width : Int
height : Int
} derive(Eq, @moonbitlang/core/debug.Debug)Geometry::annotate
fn Geometry::annotate(self : Geometry, notes : ArrayView[ConnectionNote], limits? : Limits) -> ResultGeometry::equal
fn Geometry::equal(Geometry, Geometry) -> BoolGeometry::not_equal
fn Geometry::not_equal(x : Geometry, y : Geometry) -> BoolGeometry::overlay
fn Geometry::overlay(self : Geometry, definitions : ArrayView[Overlay], limits? : Limits, direction_hints? : ArrayView[(String, @moonrockz/diagrams/swimlane.Direction)], boundaries? : ArrayView[(String, String)]) -> ResultReframe crossing containers, then route using the same bounded geometry engine. Ordinary layouts do not use this path and retain their canonical geometry.
Geometry::to_repr
fn Geometry::to_repr(Geometry) -> @moonbitlang/core/debug.ReprKind
pub(all) enum Kind {
Lane
Group
Node
} derive(Eq, @moonbitlang/core/debug.Debug)Kind::equal
fn Kind::equal(Kind, Kind) -> BoolKind::not_equal
fn Kind::not_equal(x : Kind, y : Kind) -> BoolKind::to_repr
fn Kind::to_repr(Kind) -> @moonbitlang/core/debug.ReprLabel
pub struct Label {
text : String
box : Rect
size : Double
weight : Int
owner : String
family : @moonrockz/diagrams-svg/theme.Family?
} derive(Eq, @moonbitlang/core/debug.Debug)Label::equal
fn Label::equal(Label, Label) -> BoolLabel::not_equal
fn Label::not_equal(x : Label, y : Label) -> BoolLabel::to_repr
fn Label::to_repr(Label) -> @moonbitlang/core/debug.ReprLimits
pub struct Limits {
nodes : Int
edges : Int
depth : Int
work : Int
output_units : Int
minimum_approach : Double
} derive(Eq, @moonbitlang/core/debug.Debug)Pure swimlane geometry has no dependency on BPMN document or geometry types.
Limits::equal
fn Limits::equal(Limits, Limits) -> BoolLimits::new
fn Limits::new(nodes? : Int, edges? : Int, depth? : Int, work? : Int, output_units? : Int, minimum_approach? : Double) -> LimitsLimits::not_equal
fn Limits::not_equal(x : Limits, y : Limits) -> BoolLimits::to_repr
fn Limits::to_repr(Limits) -> @moonbitlang/core/debug.ReprLimits::with_minimum_approach
fn Limits::with_minimum_approach(self : Limits, minimum_approach : Double) -> LimitsRetain resource limits while selecting the marked terminal reservation.
Overlay
pub struct Overlay {
id : String
members : ReadOnlyArray[String]
parent : String?
}A display container whose membership crosses the primary layout hierarchy. The caller supplies inner containers before their outer containers.
Overlay::new
fn Overlay::new(id : String, members : ArrayView[String], parent? : String) -> OverlayPoint
pub(all) struct Point {
x : Double
y : Double
} derive(Eq, @moonbitlang/core/debug.Debug)Point::equal
fn Point::equal(Point, Point) -> BoolPoint::not_equal
fn Point::not_equal(x : Point, y : Point) -> BoolPoint::to_repr
fn Point::to_repr(Point) -> @moonbitlang/core/debug.ReprRect
pub(all) struct Rect {
x : Double
y : Double
width : Double
height : Double
} derive(Eq, @moonbitlang/core/debug.Debug)Rect::contains
fn Rect::contains(self : Rect, other : Rect, tolerance? : Double) -> BoolRect::equal
fn Rect::equal(Rect, Rect) -> BoolRect::not_equal
fn Rect::not_equal(x : Rect, y : Rect) -> BoolRect::overlaps
fn Rect::overlaps(self : Rect, other : Rect) -> BoolRect::to_repr
fn Rect::to_repr(Rect) -> @moonbitlang/core/debug.ReprResult
pub struct Result {
geometry : Geometry?
diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
} derive(Eq, @moonbitlang/core/debug.Debug)Result::equal
fn Result::equal(Result, Result) -> BoolResult::not_equal
fn Result::not_equal(x : Result, y : Result) -> BoolResult::to_repr
fn Result::to_repr(Result) -> @moonbitlang/core/debug.ReprRule
pub(all) enum Rule {
Overlap
Fit
Size
Contrast
Containment
Endpoint
Limit
} derive(Eq, @moonbitlang/core/debug.Debug)Rule::equal
fn Rule::equal(Rule, Rule) -> BoolRule::not_equal
fn Rule::not_equal(x : Rule, y : Rule) -> BoolRule::to_repr
fn Rule::to_repr(Rule) -> @moonbitlang/core/debug.ReprShape
pub struct Shape {
id : String
index : Int
kind : Kind
shape : String
box : Rect
outline_box : Rect
label : Label?
parent : String?
lane : String?
expanded : Bool
} derive(Eq, @moonbitlang/core/debug.Debug)Shape::equal
fn Shape::equal(Shape, Shape) -> BoolShape::not_equal
fn Shape::not_equal(x : Shape, y : Shape) -> BoolShape::to_repr
fn Shape::to_repr(Shape) -> @moonbitlang/core/debug.ReprValues
check
fn check(geometry : Geometry, palette : @moonrockz/diagrams-svg/theme.Palette, work_limit? : Int, intentional_containment? : ArrayView[(String, String)], boundary_attachments? : ArrayView[(String, String)]) -> ReadOnlyArray[Finding]Check measured geometry independently of its painter. Intended nested containment is allowed; ownership, labels, true outline ports and unrelated line intersections are inspected under one explicit work/finding budget.
family
fn family(shape : String) -> @moonrockz/diagrams-svg/theme.Familylabel_text
fn label_text(text : String) -> StringAn inert plain-text projection. Source HTML is never inserted into SVG.
layout
fn layout(view : @moonrockz/diagrams/swimlane.Swimlane, limits? : Limits, flowchart? : Bool, ordered_scopes? : ArrayView[(String, @moonrockz/diagrams/swimlane.Direction)], region_directions? : ArrayView[(String, @moonrockz/diagrams/swimlane.Direction)], scope_padding? : Double, direction_hints? : ArrayView[(String, @moonrockz/diagrams/swimlane.Direction)]) -> ResultMeasured responsibility bands, built bottom-up without recursive ownership walks.
outline
fn outline(shape : String, box : Rect) -> ReadOnlyArray[Point]Each painted outer boundary and its edge attachment use this same vector. Curves use fixed sampled segments, so path bytes and clipping agree on all targets.
palette
fn palette(p : @moonrockz/diagrams-svg/theme.Palette) -> @moonrockz/diagrams-svg/theme.PalettePreserve palette hues while making ink readable on opaque canvas and fills.
project_label
fn project_label(text : String, kind : @moonrockz/diagrams/swimlane.LabelKind) -> StringLabel kind selects presentation projection explicitly. Plain labels keep operators and formatting-like punctuation; source metadata remains inert.
svg_number
fn svg_number(value : Double) -> StringCanonical coordinates have three fractional digits and never use exponent notation.