moonrockz/diagrams/flowchart

Types

Branch

pub struct Branch {
  id : String
  label : String
  members : ReadOnlyArray[String]
  condition : String?
  origin : SourceBinding?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Branch::equal

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

Source

Branch::new

fn Branch::new(id : String, label? : String, members? : ArrayView[String], condition? : String, origin? : SourceBinding) -> Branch

Source

Branch::not_equal

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

Source

Branch::to_repr

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

Source

Connection

pub struct Connection {
  id : String
  source : String
  target : String
  label : String
  label_kind : LabelKind
  style : LineStyle
  source_marker : Marker
  target_marker : Marker
  min_length : Int
  direction : FlowDirection
  direction_hint : Direction?
  role : ConnectionRole
  origin : SourceBinding?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Connection::equal

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

Source

Connection::new

fn Connection::new(id : String, source : String, target : String, label? : String, label_kind? : LabelKind, style? : LineStyle, source_marker? : Marker, target_marker? : Marker, min_length? : Int, direction_hint? : Direction, role? : ConnectionRole, origin? : SourceBinding) -> Connection

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

ConnectionRole

pub(all) enum ConnectionRole {
  Flow
  Branch
  LoopBack
  LoopExit
  Parallel
  NoteAttachment
  Layout
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

ConnectionRole::equal

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

Source

ConnectionRole::not_equal

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

Source

ConnectionRole::to_repr

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

Source

Direction

pub(all) enum Direction {
  TB
  BT
  LR
  RL
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Direction::equal

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

Source

Direction::not_equal

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

Source

Direction::to_repr

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

Source

FlowDirection

pub(all) enum FlowDirection {
  Forward
  Backward
  Both
  Undirected
  Invisible
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

FlowDirection::equal

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

Source

FlowDirection::not_equal

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

Source

FlowDirection::to_repr

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

Source

Flowchart

pub struct Flowchart {
  notes : ReadOnlyArray[Note]
  regions : ReadOnlyArray[Region]
  id : String
  direction : Direction
  lanes : ReadOnlyArray[Lane]
  groups : ReadOnlyArray[Group]
  nodes : ReadOnlyArray[Node]
  connections : ReadOnlyArray[Connection]
  title : String?
  accessibility_title : String?
  accessibility_description : String?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Flowchart::equal

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

Source

Flowchart::new

fn Flowchart::new(id : String, nodes : ArrayView[Node], connections : ArrayView[Connection], direction? : Direction, lanes? : ArrayView[Lane], groups? : ArrayView[Group], title? : String, accessibility_title? : String, accessibility_description? : String, notes? : ArrayView[Note], regions? : ArrayView[Region]) -> Flowchart

Source

Flowchart::not_equal

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

Source

Flowchart::to_repr

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

Source

Flowchart::with_nodes

fn Flowchart::with_nodes(self : Flowchart, nodes : ArrayView[Node]) -> Flowchart

Replace the ordered nodes, copying the caller's collection.

Source

Group

pub struct Group {
  id : String
  label : String
  parent : String?
  lane : String?
  direction : Direction?
  expanded : Bool
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Group::equal

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

Source

Group::new

fn Group::new(id : String, label? : String, parent? : String, lane? : String, direction? : Direction, expanded? : Bool) -> Group

Source

Group::not_equal

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

Source

Group::to_repr

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

Source

LabelKind

pub(all) enum LabelKind {
  Text
  Markdown
  Html
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

LabelKind::equal

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

Source

LabelKind::not_equal

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

Source

LabelKind::to_repr

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

Source

Lane

pub struct Lane {
  id : String
  label : String
  direction : Direction?
  expanded : Bool
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Lane::equal

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

Source

Lane::new

fn Lane::new(id : String, label? : String, direction? : Direction, expanded? : Bool) -> Lane

Source

Lane::not_equal

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

Source

Lane::to_repr

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

Source

LineStyle

pub(all) enum LineStyle {
  Solid
  Dotted
  Thick
  Invisible
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

LineStyle::equal

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

Source

LineStyle::not_equal

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

Source

LineStyle::to_repr

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

Source

Marker

pub(all) enum Marker {
  None
  Arrow
  Circle
  Cross
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Marker::equal

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

Source

Marker::not_equal

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

Source

Marker::to_repr

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

Source

Node

pub struct Node {
  id : String
  label : String
  label_kind : LabelKind
  shape : String
  metadata : ReadOnlyArray[(String, String)]
  lane : String?
  groups : ReadOnlyArray[String]
  properties : RenderProperties?
  role : Role
  regions : ReadOnlyArray[String]
  origin : SourceBinding?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Node::equal

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

Source

Node::new

fn Node::new(id : String, label? : String, label_kind? : LabelKind, shape? : String, metadata? : ArrayView[(String, String)], lane? : String, groups? : ArrayView[String], properties? : RenderProperties, role? : Role, regions? : ArrayView[String], origin? : SourceBinding) -> Node

Source

Node::not_equal

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

Source

Node::to_repr

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

Source

Node::with_label

fn Node::with_label(self : Node, label : String) -> Node

Replace a label while preserving identity, control role and source binding.

Source

Note

pub struct Note {
  id : String
  text : String
  targets : ReadOnlyArray[String]
  connection_targets : ReadOnlyArray[String]
  placement : String
  groups : ReadOnlyArray[String]
  lane : String?
  origin : SourceBinding?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Note::equal

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

Source

Note::new

fn Note::new(id : String, text : String, targets? : ArrayView[String], connection_targets? : ArrayView[String], placement? : String, groups? : ArrayView[String], lane? : String, origin? : SourceBinding) -> Note

Source

Note::not_equal

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

Source

Note::to_repr

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

Source

Region

pub struct Region {
  id : String
  kind : RegionKind
  parent : String?
  entry : String?
  exit : String?
  members : ReadOnlyArray[String]
  branches : ReadOnlyArray[Branch]
  condition : String?
  join_specification : String?
  origin : SourceBinding?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Region::equal

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

Source

Region::new

fn Region::new(id : String, kind : RegionKind, parent? : String, entry? : String, exit? : String, members? : ArrayView[String], branches? : ArrayView[Branch], condition? : String, join_specification? : String, origin? : SourceBinding) -> Region

Source

Region::not_equal

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

Source

Region::to_repr

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

Source

RegionKind

pub(all) enum RegionKind {
  Conditional
  Loop
  Parallel
  Split
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

RegionKind::equal

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

Source

RegionKind::not_equal

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

Source

RegionKind::to_repr

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

Source

RenderProperties

pub struct RenderProperties {
  link : String?
  metadata : ReadOnlyArray[(String, String)]
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

RenderProperties::equal

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

Source

RenderProperties::new

fn RenderProperties::new(link? : String, metadata? : ArrayView[(String, String)]) -> RenderProperties

Source

RenderProperties::not_equal

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

Source

RenderProperties::to_repr

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

Source

Role

pub(all) enum Role {
  Generic
  Action
  Decision
  Merge
  Fork
  Join
  Start
  ActivityFinal
  FlowFinal
  Connector
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Role::equal

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

Source

Role::not_equal

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

Source

Role::to_repr

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

Source

SourceBinding

pub struct SourceBinding {
  format : String
  path : String
  span : @moonrockz/diagrams.Span?
} derive(Eq, @moonbitlang/core/debug.Debug)

Explicit source binding; positions use the library UTF-16 span contract.

Source

SourceBinding::equal

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

Source

SourceBinding::new

fn SourceBinding::new(format : String, path : String, span? : @moonrockz/diagrams.Span) -> SourceBinding

Source

SourceBinding::not_equal

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

Source

SourceBinding::to_repr

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

Source

Values

built_in_shapes

let built_in_shapes : ReadOnlyArray[String]

Source

canonical_shape

fn canonical_shape(value : String) -> String

Source

diagnostic_codes

let diagnostic_codes : ReadOnlyArray[String]

Source

direction

fn direction(value : String) -> Direction?

Source

fresh_id

fn fresh_id(stem : String, used : ArrayView[String], work_limit? : Int) -> Result[String, @moonrockz/diagrams.Diagnostic]

Allocate a deterministic identity without colliding with authored identities.

Source

validate

fn validate(model : Flowchart, nodes_limit? : Int, edges_limit? : Int, depth_limit? : Int, work_limit? : Int) -> ReadOnlyArray[@moonrockz/diagrams.Diagnostic]

Source