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)

Source

Connection::equal

fn Connection::equal(Connection, Connection) -> Bool

Source

Connection::not_equal

fn Connection::not_equal(x : Connection, y : Connection) -> Bool

Source

Connection::to_repr

fn Connection::to_repr(Connection) -> @moonbitlang/core/debug.Repr

Source

ConnectionNote

pub struct ConnectionNote {
  id : String
  connection : String
  note : String
}

A note attached to an actual drawn connection rather than a control node.

Source

ConnectionNote::new

fn ConnectionNote::new(id : String, connection : String, note : String) -> ConnectionNote

Source

Finding

pub struct Finding {
  rule : Rule
  identities : ReadOnlyArray[String]
  message : String
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Finding::equal

fn Finding::equal(Finding, Finding) -> Bool

Source

Finding::not_equal

fn Finding::not_equal(x : Finding, y : Finding) -> Bool

Source

Finding::to_repr

fn Finding::to_repr(Finding) -> @moonbitlang/core/debug.Repr

Source

Geometry

pub struct Geometry {
  view : @moonrockz/diagrams/swimlane.Swimlane
  shapes : ReadOnlyArray[Shape]
  connections : ReadOnlyArray[Connection]
  width : Int
  height : Int
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Geometry::annotate

fn Geometry::annotate(self : Geometry, notes : ArrayView[ConnectionNote], limits? : Limits) -> Result

Source

Geometry::equal

fn Geometry::equal(Geometry, Geometry) -> Bool

Source

Geometry::not_equal

fn Geometry::not_equal(x : Geometry, y : Geometry) -> Bool

Source

Geometry::overlay

fn Geometry::overlay(self : Geometry, definitions : ArrayView[Overlay], limits? : Limits, direction_hints? : ArrayView[(String, @moonrockz/diagrams/swimlane.Direction)], boundaries? : ArrayView[(String, String)]) -> Result

Reframe crossing containers, then route using the same bounded geometry engine. Ordinary layouts do not use this path and retain their canonical geometry.

Source

Geometry::to_repr

fn Geometry::to_repr(Geometry) -> @moonbitlang/core/debug.Repr

Source

Kind

pub(all) enum Kind {
  Lane
  Group
  Node
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Kind::equal

fn Kind::equal(Kind, Kind) -> Bool

Source

Kind::not_equal

fn Kind::not_equal(x : Kind, y : Kind) -> Bool

Source

Kind::to_repr

fn Kind::to_repr(Kind) -> @moonbitlang/core/debug.Repr

Source

Label

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)

Source

Label::equal

fn Label::equal(Label, Label) -> Bool

Source

Label::not_equal

fn Label::not_equal(x : Label, y : Label) -> Bool

Source

Label::to_repr

fn Label::to_repr(Label) -> @moonbitlang/core/debug.Repr

Source

Limits

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.

Source

Limits::equal

fn Limits::equal(Limits, Limits) -> Bool

Source

Limits::new

fn Limits::new(nodes? : Int, edges? : Int, depth? : Int, work? : Int, output_units? : Int, minimum_approach? : Double) -> Limits

Source

Limits::not_equal

fn Limits::not_equal(x : Limits, y : Limits) -> Bool

Source

Limits::to_repr

fn Limits::to_repr(Limits) -> @moonbitlang/core/debug.Repr

Source

Limits::with_minimum_approach

fn Limits::with_minimum_approach(self : Limits, minimum_approach : Double) -> Limits

Retain resource limits while selecting the marked terminal reservation.

Source

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.

Source

Overlay::new

fn Overlay::new(id : String, members : ArrayView[String], parent? : String) -> Overlay

Source

Point

pub(all) struct Point {
  x : Double
  y : Double
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Point::equal

fn Point::equal(Point, Point) -> Bool

Source

Point::not_equal

fn Point::not_equal(x : Point, y : Point) -> Bool

Source

Point::to_repr

fn Point::to_repr(Point) -> @moonbitlang/core/debug.Repr

Source

Rect

pub(all) struct Rect {
  x : Double
  y : Double
  width : Double
  height : Double
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Rect::contains

fn Rect::contains(self : Rect, other : Rect, tolerance? : Double) -> Bool

Source

Rect::equal

fn Rect::equal(Rect, Rect) -> Bool

Source

Rect::not_equal

fn Rect::not_equal(x : Rect, y : Rect) -> Bool

Source

Rect::overlaps

fn Rect::overlaps(self : Rect, other : Rect) -> Bool

Source

Rect::to_repr

fn Rect::to_repr(Rect) -> @moonbitlang/core/debug.Repr

Source

Result

pub struct Result {
  geometry : Geometry?
  diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Result::equal

fn Result::equal(Result, Result) -> Bool

Source

Result::not_equal

fn Result::not_equal(x : Result, y : Result) -> Bool

Source

Result::to_repr

fn Result::to_repr(Result) -> @moonbitlang/core/debug.Repr

Source

Rule

pub(all) enum Rule {
  Overlap
  Fit
  Size
  Contrast
  Containment
  Endpoint
  Limit
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Rule::equal

fn Rule::equal(Rule, Rule) -> Bool

Source

Rule::not_equal

fn Rule::not_equal(x : Rule, y : Rule) -> Bool

Source

Rule::to_repr

fn Rule::to_repr(Rule) -> @moonbitlang/core/debug.Repr

Source

Shape

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)

Source

Shape::equal

fn Shape::equal(Shape, Shape) -> Bool

Source

Shape::not_equal

fn Shape::not_equal(x : Shape, y : Shape) -> Bool

Source

Shape::to_repr

fn Shape::to_repr(Shape) -> @moonbitlang/core/debug.Repr

Source

Values

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.

Source

family

fn family(shape : String) -> @moonrockz/diagrams-svg/theme.Family

Source

label_text

fn label_text(text : String) -> String

An inert plain-text projection. Source HTML is never inserted into SVG.

Source

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)]) -> Result

Measured responsibility bands, built bottom-up without recursive ownership walks.

Source

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.

Source

palette

fn palette(p : @moonrockz/diagrams-svg/theme.Palette) -> @moonrockz/diagrams-svg/theme.Palette

Preserve palette hues while making ink readable on opaque canvas and fills.

Source

project_label

fn project_label(text : String, kind : @moonrockz/diagrams/swimlane.LabelKind) -> String

Label kind selects presentation projection explicitly. Plain labels keep operators and formatting-like punctuation; source metadata remains inert.

Source

svg_number

fn svg_number(value : Double) -> String

Canonical coordinates have three fractional digits and never use exponent notation.

Source