This version of the module is deprecated: Moved to moonbit-community/diago. Use moonbit-community/diago@0.4.0 or later and update import paths.
Milky2018/diago/graph does not have a README file
pub(all) enum ArrowheadType {
None
Triangle
Diamond
Circle
Open
Line
CfOne
CfMany
CfOneRequired
CfManyRequired
CfOneOptional
CfManyOptional
}impl Eq for ArrowheadTypeimpl Show for ArrowheadTypepub struct Box {
x : Double
y : Double
width : Double
height : Double
}pub struct EdgeInput {
index : Int
src_id : String
dst_id : String
src_arrow : Bool
dst_arrow : Bool
src_arrowhead : ArrowheadType
dst_arrowhead : ArrowheadType
src_arrowhead_label : String?
dst_arrowhead_label : String?
src_arrowhead_label_color : String?
dst_arrowhead_label_color : String?
src_anchor : String?
dst_anchor : String?
label : String
style : StyleInput
route : Array[Point]
bend_points : Array[Point]?
is_curve : Bool
z_index : Int
reference_count : Int
label_box : Box?
src_column_index : Int?
dst_column_index : Int?
}fn EdgeInput::from_parts(index : Int, src_id : String, dst_id : String, src_arrow : Bool, dst_arrow : Bool, src_arrowhead : ArrowheadType, dst_arrowhead : ArrowheadType, src_arrowhead_label : String?, dst_arrowhead_label : String?, src_arrowhead_label_color : String?, dst_arrowhead_label_color : String?, src_anchor : String?, dst_anchor : String?, label : String, style : StyleInput, route : Array[Point], bend_points : Array[Point]?, is_curve : Bool, z_index : Int, reference_count : Int, label_box : Box?, src_column_index : Int?, dst_column_index : Int?) -> EdgeInputpub struct EdgeModel {
index : Int
src_id : String
dst_id : String
src_arrow : Bool
dst_arrow : Bool
src_arrowhead : ArrowheadType
dst_arrowhead : ArrowheadType
src_arrowhead_label : String?
dst_arrowhead_label : String?
src_arrowhead_label_color : String?
dst_arrowhead_label_color : String?
src_anchor : String?
dst_anchor : String?
label : String
style : StyleModel
route : Array[Point]
bend_points : Array[Point]?
is_curve : Bool
z_index : Int
reference_count : Int
label_box : Box?
src_column_index : Int?
dst_column_index : Int?
}pub struct FragmentOperandInput {
condition : String?
}pub struct FragmentOperandLayout {
condition : String?
separator_y : Double
}pub struct FragmentOperandModel {
condition : String?
separator_y : Double
}impl Show for FragmentOperandModelpub struct GraphInput {
name : String
root : ObjectInput
objects : Array[ObjectInput]
edges : Array[EdgeInput]
sequence_fragments : Array[SequenceFragmentInput]
activation_boxes : Array[(String, Box)]
sequence_notes : Array[(String, String, Box)]
sequence_fragments_layout : Array[SequenceFragmentLayout]
layers : Array[LayerInput]
scenarios : Array[ScenarioInput]
steps : Array[StepInput]
legend : LegendInput?
}impl Show for GraphInputfn GraphInput::from_parts(name : String, root : ObjectInput, objects : Array[ObjectInput], edges : Array[EdgeInput], sequence_fragments : Array[SequenceFragmentInput], activation_boxes : Array[(String, Box)], sequence_notes : Array[(String, String, Box)], sequence_fragments_layout : Array[SequenceFragmentLayout], layers : Array[LayerInput], scenarios : Array[ScenarioInput], steps : Array[StepInput], legend : LegendInput?) -> GraphInputpub struct GraphModel {
name : String
root : ObjectModel
objects : Array[ObjectModel]
edges : Array[EdgeModel]
activation_boxes : Array[(String, Box)]
sequence_notes : Array[(String, String, Box)]
sequence_fragments : Array[SequenceFragmentModel]
layers : Array[LayerModel]
scenarios : Array[ScenarioModel]
steps : Array[StepModel]
legend : LegendModel?
}impl Show for GraphModelpub struct LayoutPatch {
nodes : Map[String, Box]
node_labels : Map[String, Box]
edges : Map[Int, Array[Point]]
edge_bend_points : Map[Int, Array[Point]]
edge_curves : Map[Int, Bool]
edge_labels : Map[Int, Box]
activation_boxes : Array[(String, Box)]
sequence_notes : Array[(String, String, Box)]
sequence_fragments : Array[SequenceFragmentLayout]
}impl Show for LayoutPatchpub struct Legend {
title : String?
position : LegendPosition
entries : Array[LegendEntry]
fill : String?
stroke : String?
padding : Double
entry_gap : Double
icon_size : Double
}fn Legend::add_connection(self : Legend, src_arrow : ArrowheadType, dst_arrow : ArrowheadType, label : String) -> Unitpub(all) enum LegendEntry {
ShapeEntry(ShapeType, String, StyleInput?)
ConnectionEntry(ArrowheadType, ArrowheadType, String, StyleInput?)
CustomEntry(String, String)
Separator
}impl Show for LegendEntryfn LegendEntry::connection(src_arrow : ArrowheadType, dst_arrow : ArrowheadType, label : String, style : StyleInput?) -> LegendEntrypub enum LegendEntryInput {
ShapeEntry(ShapeType, String, StyleInput?)
ConnectionEntry(ArrowheadType, ArrowheadType, String, StyleInput?)
CustomEntry(String, String)
Separator
}impl Show for LegendEntryInputfn LegendEntryInput::connection(src_arrow : ArrowheadType, dst_arrow : ArrowheadType, label : String, style : StyleInput?) -> LegendEntryInputfn LegendEntryInput::shape(shape : ShapeType, label : String, style : StyleInput?) -> LegendEntryInputpub struct LegendInput {
title : String?
position : LegendPosition
entries : Array[LegendEntryInput]
fill : String?
stroke : String?
padding : Double
entry_gap : Double
icon_size : Double
}impl Show for LegendInputfn LegendInput::from_parts(title : String?, position : LegendPosition, entries : Array[LegendEntryInput], fill : String?, stroke : String?, padding : Double, entry_gap : Double, icon_size : Double) -> LegendInputpub struct LegendModel {
title : String?
position : LegendPosition
entries : Array[LegendEntryInput]
fill : String?
stroke : String?
padding : Double
entry_gap : Double
icon_size : Double
}impl Show for LegendModelpub(all) enum LegendPosition {
TopLeft
TopRight
BottomLeft
BottomRight
Hidden
}impl Eq for LegendPositionimpl Show for LegendPositionpub struct ObjectInput {
id : String
label : String
shape_type : ShapeType
style : StyleInput
box : Box?
label_box : Box?
child_ids : Array[String]
z_index : Int
icon : String?
tooltip : String?
link : String?
classes : Array[String]
grid_rows : Int?
grid_columns : Int?
grid_gap : Double?
horizontal_gap : Double?
vertical_gap : Double?
grid_column_span : Int?
grid_row_span : Int?
near : String?
top : Int?
left : Int?
direction : String?
}impl Show for ObjectInputfn ObjectInput::from_parts(id : String, label : String, shape_type : ShapeType, style : StyleInput, box : Box?, label_box : Box?, child_ids : Array[String], z_index : Int, icon : String?, tooltip : String?, link : String?, classes : Array[String], grid_rows : Int?, grid_columns : Int?, grid_gap : Double?, horizontal_gap : Double?, vertical_gap : Double?, grid_column_span : Int?, grid_row_span : Int?, near : String?, top : Int?, left : Int?, direction? : String?) -> ObjectInputpub struct ObjectModel {
id : String
label : String
shape_type : ShapeType
style : StyleModel
box : Box?
label_box : Box?
children : Array[ObjectModel]
z_index : Int
icon : String?
tooltip : String?
link : String?
classes : Array[String]
grid_rows : Int?
grid_columns : Int?
grid_gap : Double?
horizontal_gap : Double?
vertical_gap : Double?
grid_column_span : Int?
grid_row_span : Int?
near : String?
top : Int?
left : Int?
direction : String?
}impl Show for ObjectModelpub struct Point {
x : Double
y : Double
}pub struct Route {
style : RouteStyle
waypoints : Array[Waypoint]
src_arrowhead : ArrowheadType
dst_arrowhead : ArrowheadType
}fn Route::from_points(points : Array[Point], style : RouteStyle, src : ArrowheadType, dst : ArrowheadType) -> Routepub(all) enum RouteStyle {
Straight
Curved
Elbow
Orthogonal
}impl Eq for RouteStyleimpl Show for RouteStylepub struct SequenceFragmentInput {
fragment_type : String
condition : String?
start_index : Int
end_index : Int
operands : Array[FragmentOperandInput]
}impl Show for SequenceFragmentInputfn SequenceFragmentInput::new(fragment_type : String, condition : String?, start_index : Int, end_index : Int, operands : Array[FragmentOperandInput]) -> SequenceFragmentInputpub struct SequenceFragmentLayout {
fragment_type : String
condition : String?
bbox : Box?
start_index : Int
end_index : Int
operands : Array[FragmentOperandLayout]
}impl Show for SequenceFragmentLayoutfn SequenceFragmentLayout::new(fragment_type : String, condition : String?, bbox : Box?, start_index : Int, end_index : Int, operands : Array[FragmentOperandLayout]) -> SequenceFragmentLayoutpub struct SequenceFragmentModel {
fragment_type : String
condition : String?
bbox : Box?
start_index : Int
end_index : Int
operands : Array[FragmentOperandModel]
}impl Show for SequenceFragmentModelfn SequenceFragmentModel::new(fragment_type : String, start_index : Int, end_index : Int) -> SequenceFragmentModelpub(all) enum ShapeType {
Rectangle
Square
Circle
Oval
Diamond
Hexagon
Parallelogram
Cylinder
Queue
Package
Step
Callout
StoredData
Person
Cloud
Page
Document
Class
SqlTable
Text
Code
Image
SequenceDiagram
Octagon
C4Person
C4Container
}pub struct StyleInput {
opacity : StyleValue?
stroke : StyleValue?
fill : StyleValue?
stroke_width : StyleValue?
stroke_dash : StyleValue?
border_radius : StyleValue?
shadow : StyleValue?
three_d : StyleValue?
multiple : StyleValue?
font : StyleValue?
font_size : StyleValue?
font_color : StyleValue?
bold : StyleValue?
italic : StyleValue?
underline : StyleValue?
animated : StyleValue?
filled : StyleValue?
double_border : StyleValue?
text_transform : StyleValue?
font_family : StyleValue?
fill_pattern : StyleValue?
sketch : StyleValue?
curved : StyleValue?
}impl Eq for StyleInputimpl Show for StyleInputfn StyleInput::from_parts(opacity : StyleValue?, stroke : StyleValue?, fill : StyleValue?, stroke_width : StyleValue?, stroke_dash : StyleValue?, border_radius : StyleValue?, shadow : StyleValue?, three_d : StyleValue?, multiple : StyleValue?, font : StyleValue?, font_size : StyleValue?, font_color : StyleValue?, bold : StyleValue?, italic : StyleValue?, underline : StyleValue?, animated : StyleValue?, filled : StyleValue?, double_border : StyleValue?, text_transform : StyleValue?, font_family : StyleValue?, fill_pattern : StyleValue?, sketch : StyleValue?, curved : StyleValue?) -> StyleInputpub struct StyleModel {
opacity : StyleValue?
stroke : StyleValue?
fill : StyleValue?
stroke_width : StyleValue?
stroke_dash : StyleValue?
border_radius : StyleValue?
shadow : StyleValue?
three_d : StyleValue?
multiple : StyleValue?
font : StyleValue?
font_size : StyleValue?
font_color : StyleValue?
bold : StyleValue?
italic : StyleValue?
underline : StyleValue?
animated : StyleValue?
filled : StyleValue?
double_border : StyleValue?
text_transform : StyleValue?
font_family : StyleValue?
fill_pattern : StyleValue?
sketch : StyleValue?
curved : StyleValue?
}impl Eq for StyleModelimpl Show for StyleModelimpl Eq for StyleValueimpl Show for StyleValuepub struct Waypoint {
x : Double
y : Double
control : (Double, Double)?
}Install
Download zipA D2-compatible diagram toolkit for MoonBit with Dagre, ELK, and Railway layout engines, rendering SVG, ASCII, and Unicode outputs.