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)Branch::equal
fn Branch::equal(Branch, Branch) -> BoolBranch::new
fn Branch::new(id : String, label? : String, members? : ArrayView[String], condition? : String, origin? : SourceBinding) -> BranchBranch::not_equal
fn Branch::not_equal(x : Branch, y : Branch) -> BoolBranch::to_repr
fn Branch::to_repr(Branch) -> @moonbitlang/core/debug.ReprConnection
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)Connection::equal
fn Connection::equal(Connection, Connection) -> BoolConnection::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) -> ConnectionConnection::not_equal
fn Connection::not_equal(x : Connection, y : Connection) -> BoolConnection::to_repr
fn Connection::to_repr(Connection) -> @moonbitlang/core/debug.ReprConnectionRole
pub(all) enum ConnectionRole {
Flow
Branch
LoopBack
LoopExit
Parallel
NoteAttachment
Layout
} derive(Eq, @moonbitlang/core/debug.Debug)ConnectionRole::equal
fn ConnectionRole::equal(ConnectionRole, ConnectionRole) -> BoolConnectionRole::not_equal
fn ConnectionRole::not_equal(x : ConnectionRole, y : ConnectionRole) -> BoolConnectionRole::to_repr
fn ConnectionRole::to_repr(ConnectionRole) -> @moonbitlang/core/debug.ReprDirection
pub(all) enum Direction {
TB
BT
LR
RL
} derive(Eq, @moonbitlang/core/debug.Debug)Direction::equal
fn Direction::equal(Direction, Direction) -> BoolDirection::not_equal
fn Direction::not_equal(x : Direction, y : Direction) -> BoolDirection::to_repr
fn Direction::to_repr(Direction) -> @moonbitlang/core/debug.ReprFlowDirection
pub(all) enum FlowDirection {
Forward
Backward
Both
Undirected
Invisible
} derive(Eq, @moonbitlang/core/debug.Debug)FlowDirection::equal
fn FlowDirection::equal(FlowDirection, FlowDirection) -> BoolFlowDirection::not_equal
fn FlowDirection::not_equal(x : FlowDirection, y : FlowDirection) -> BoolFlowDirection::to_repr
fn FlowDirection::to_repr(FlowDirection) -> @moonbitlang/core/debug.ReprFlowchart
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)Flowchart::equal
fn Flowchart::equal(Flowchart, Flowchart) -> BoolFlowchart::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]) -> FlowchartFlowchart::not_equal
fn Flowchart::not_equal(x : Flowchart, y : Flowchart) -> BoolFlowchart::to_repr
fn Flowchart::to_repr(Flowchart) -> @moonbitlang/core/debug.ReprFlowchart::with_nodes
fn Flowchart::with_nodes(self : Flowchart, nodes : ArrayView[Node]) -> FlowchartReplace the ordered nodes, copying the caller's collection.
Group
pub struct Group {
id : String
label : String
parent : String?
lane : String?
direction : Direction?
expanded : Bool
} derive(Eq, @moonbitlang/core/debug.Debug)Group::equal
fn Group::equal(Group, Group) -> BoolGroup::new
fn Group::new(id : String, label? : String, parent? : String, lane? : String, direction? : Direction, expanded? : Bool) -> GroupGroup::not_equal
fn Group::not_equal(x : Group, y : Group) -> BoolGroup::to_repr
fn Group::to_repr(Group) -> @moonbitlang/core/debug.ReprLabelKind
pub(all) enum LabelKind {
Text
Markdown
Html
} derive(Eq, @moonbitlang/core/debug.Debug)LabelKind::equal
fn LabelKind::equal(LabelKind, LabelKind) -> BoolLabelKind::not_equal
fn LabelKind::not_equal(x : LabelKind, y : LabelKind) -> BoolLabelKind::to_repr
fn LabelKind::to_repr(LabelKind) -> @moonbitlang/core/debug.ReprLane
pub struct Lane {
id : String
label : String
direction : Direction?
expanded : Bool
} derive(Eq, @moonbitlang/core/debug.Debug)Lane::equal
fn Lane::equal(Lane, Lane) -> BoolLane::new
fn Lane::new(id : String, label? : String, direction? : Direction, expanded? : Bool) -> LaneLane::not_equal
fn Lane::not_equal(x : Lane, y : Lane) -> BoolLane::to_repr
fn Lane::to_repr(Lane) -> @moonbitlang/core/debug.ReprLineStyle
pub(all) enum LineStyle {
Solid
Dotted
Thick
Invisible
} derive(Eq, @moonbitlang/core/debug.Debug)LineStyle::equal
fn LineStyle::equal(LineStyle, LineStyle) -> BoolLineStyle::not_equal
fn LineStyle::not_equal(x : LineStyle, y : LineStyle) -> BoolLineStyle::to_repr
fn LineStyle::to_repr(LineStyle) -> @moonbitlang/core/debug.ReprMarker
pub(all) enum Marker {
None
Arrow
Circle
Cross
} derive(Eq, @moonbitlang/core/debug.Debug)Marker::equal
fn Marker::equal(Marker, Marker) -> BoolMarker::not_equal
fn Marker::not_equal(x : Marker, y : Marker) -> BoolMarker::to_repr
fn Marker::to_repr(Marker) -> @moonbitlang/core/debug.ReprNode
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)Node::equal
fn Node::equal(Node, Node) -> BoolNode::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) -> NodeNode::not_equal
fn Node::not_equal(x : Node, y : Node) -> BoolNode::to_repr
fn Node::to_repr(Node) -> @moonbitlang/core/debug.ReprNode::with_label
fn Node::with_label(self : Node, label : String) -> NodeReplace a label while preserving identity, control role and source binding.
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)Note::equal
fn Note::equal(Note, Note) -> BoolNote::new
fn Note::new(id : String, text : String, targets? : ArrayView[String], connection_targets? : ArrayView[String], placement? : String, groups? : ArrayView[String], lane? : String, origin? : SourceBinding) -> NoteNote::not_equal
fn Note::not_equal(x : Note, y : Note) -> BoolNote::to_repr
fn Note::to_repr(Note) -> @moonbitlang/core/debug.ReprRegion
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)Region::equal
fn Region::equal(Region, Region) -> BoolRegion::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) -> RegionRegion::not_equal
fn Region::not_equal(x : Region, y : Region) -> BoolRegion::to_repr
fn Region::to_repr(Region) -> @moonbitlang/core/debug.ReprRegionKind
pub(all) enum RegionKind {
Conditional
Loop
Parallel
Split
} derive(Eq, @moonbitlang/core/debug.Debug)RegionKind::equal
fn RegionKind::equal(RegionKind, RegionKind) -> BoolRegionKind::not_equal
fn RegionKind::not_equal(x : RegionKind, y : RegionKind) -> BoolRegionKind::to_repr
fn RegionKind::to_repr(RegionKind) -> @moonbitlang/core/debug.ReprRenderProperties
pub struct RenderProperties {
link : String?
metadata : ReadOnlyArray[(String, String)]
} derive(Eq, @moonbitlang/core/debug.Debug)RenderProperties::equal
fn RenderProperties::equal(RenderProperties, RenderProperties) -> BoolRenderProperties::new
fn RenderProperties::new(link? : String, metadata? : ArrayView[(String, String)]) -> RenderPropertiesRenderProperties::not_equal
fn RenderProperties::not_equal(x : RenderProperties, y : RenderProperties) -> BoolRenderProperties::to_repr
fn RenderProperties::to_repr(RenderProperties) -> @moonbitlang/core/debug.ReprRole
pub(all) enum Role {
Generic
Action
Decision
Merge
Fork
Join
Start
ActivityFinal
FlowFinal
Connector
} derive(Eq, @moonbitlang/core/debug.Debug)Role::equal
fn Role::equal(Role, Role) -> BoolRole::not_equal
fn Role::not_equal(x : Role, y : Role) -> BoolRole::to_repr
fn Role::to_repr(Role) -> @moonbitlang/core/debug.ReprSourceBinding
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.
SourceBinding::equal
fn SourceBinding::equal(SourceBinding, SourceBinding) -> BoolSourceBinding::new
fn SourceBinding::new(format : String, path : String, span? : @moonrockz/diagrams.Span) -> SourceBindingSourceBinding::not_equal
fn SourceBinding::not_equal(x : SourceBinding, y : SourceBinding) -> BoolSourceBinding::to_repr
fn SourceBinding::to_repr(SourceBinding) -> @moonbitlang/core/debug.ReprValues
built_in_shapes
let built_in_shapes : ReadOnlyArray[String]canonical_shape
fn canonical_shape(value : String) -> Stringdiagnostic_codes
let diagnostic_codes : ReadOnlyArray[String]direction
fn direction(value : String) -> Direction?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.
validate
fn validate(model : Flowchart, nodes_limit? : Int, edges_limit? : Int, depth_limit? : Int, work_limit? : Int) -> ReadOnlyArray[@moonrockz/diagrams.Diagnostic]