moonrockz/diagrams/animation
Types
Active
pub struct Active {
ordinal : Int
key : String
numerator : Int64
denominator : Int64
concurrent_groups : ReadOnlyArray[Int]
reversed : Bool
visit : Bool
} derive(Eq, @moonbitlang/core/debug.Debug)Active::equal
fn Active::equal(Active, Active) -> BoolActive::not_equal
fn Active::not_equal(x : Active, y : Active) -> BoolActive::to_repr
fn Active::to_repr(Active) -> @moonbitlang/core/debug.ReprCatalog
pub struct Catalog {
view_id : String
source : @moonrockz/diagrams/render.Diagram
occurrences : ReadOnlyArray[Occurrence]
frames : ReadOnlyArray[FrameInfo]
controls : ReadOnlyArray[Control]
graph : Graph
// private fields
}Catalog::architecture
fn Catalog::architecture(view : @moonrockz/diagrams/architecture.Architecture, limits? : Limits) -> CatalogResultAuthored architecture connections define the graph. Groups and alignments add no edges.
Catalog::bpmn
fn Catalog::bpmn(view : @moonrockz/diagrams/bpmn.Bpmn, limits? : Limits) -> CatalogResultCatalog::connection
fn Catalog::connection(self : Catalog, id : String) -> Occurrence?Catalog::data_tree
fn Catalog::data_tree(tree : @moonrockz/diagrams/data-tree.DataTree, limits? : Limits) -> CatalogResultA catalog of a data tree. Every box and member row is a visit target. A connector exists only from a row to a nested container box. The graph has containment edges between values and no other relation.
Catalog::ebnf
fn Catalog::ebnf(grammar : @moonrockz/diagrams/ebnf.Grammar, limits? : Limits) -> CatalogResultA catalog of a grammar railroad. References are inspectable visit targets; they never add an edge to another rule.
Catalog::flow
fn Catalog::flow(self : Catalog, id : String) -> Occurrence?Catalog::flowchart
fn Catalog::flowchart(view : @moonrockz/diagrams/flowchart.Flowchart, limits? : Limits) -> CatalogResultFlowchart paths are structural connections. Containment never adds an arc.
Catalog::motion
fn Catalog::motion(self : Catalog, key : String, duration_ms : Int64, reversed : Bool) -> MotionThe motion for one occurrence: a visit for a node target, or a connection step with the given orientation.
Catalog::occurrence
fn Catalog::occurrence(self : Catalog, key : String) -> Occurrence?Catalog::reference_target
fn Catalog::reference_target(self : Catalog, key : String) -> String?The rule identity that an EBNF reference term resolves to. A reference is an inspectable target; no route edge joins the two rules.
Catalog::regex
fn Catalog::regex(model : @moonrockz/diagrams/regex.Regex, limits? : Limits) -> CatalogResultA catalog of a regex railroad: terms are visits, connectors are paths.
Catalog::sequence
fn Catalog::sequence(sequence : @moonrockz/diagrams/sequence.Sequence, view_id? : String, limits? : Limits) -> CatalogResultMessage vertices are occurrences, not participants. Frame branches remain explicit; a loop contributes one authored structural iteration, never a participant cycle or an inferred unbounded execution.
Catalog::state
fn Catalog::state(view : @moonrockz/diagrams/state.StateDiagram, limits? : Limits) -> CatalogResultA structural state catalog. Ownership, history and descriptions add no arcs.
Catalog::swimlane
fn Catalog::swimlane(view : @moonrockz/diagrams/swimlane.Swimlane, limits? : Limits) -> CatalogResultSwimlane paths are structural connections. Containment never adds an arc.
CatalogResult
pub struct CatalogResult {
catalog : Catalog?
diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
}Choice
pub(all) enum Choice {
Alternative(Int)
Repetitions(Int)
Optional(Bool)
ExceptionSections(ReadOnlyArray[Int])
} derive(Eq, @moonbitlang/core/debug.Debug)Choice::equal
fn Choice::equal(Choice, Choice) -> BoolChoice::not_equal
fn Choice::not_equal(x : Choice, y : Choice) -> BoolChoice::to_repr
fn Choice::to_repr(Choice) -> @moonbitlang/core/debug.ReprControl
pub(all) enum Control {
Message(Int)
Frame(Int)
} derive(Eq, @moonbitlang/core/debug.Debug)Control::equal
fn Control::equal(Control, Control) -> BoolControl::not_equal
fn Control::not_equal(x : Control, y : Control) -> BoolControl::to_repr
fn Control::to_repr(Control) -> @moonbitlang/core/debug.ReprDirection
pub(all) enum Direction {
Forward
Reverse
Both
} 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.ReprEdgeKind
pub(all) enum EdgeKind {
SequenceFlow
MessageFlow
Order
SwimlaneFlow
StateTransition
FlowchartFlow
ArchitectureFlow
Undirected
Railroad
Containment
} derive(Eq, @moonbitlang/core/debug.Debug)EdgeKind::equal
fn EdgeKind::equal(EdgeKind, EdgeKind) -> BoolEdgeKind::not_equal
fn EdgeKind::not_equal(x : EdgeKind, y : EdgeKind) -> BoolEdgeKind::to_repr
fn EdgeKind::to_repr(EdgeKind) -> @moonbitlang/core/debug.ReprFrameInfo
pub struct FrameInfo {
key : String
path : ReadOnlyArray[Int]
kind : @moonrockz/diagrams/sequence.FrameKind
sections : ReadOnlyArray[SectionInfo]
} derive(Eq, @moonbitlang/core/debug.Debug)FrameInfo::equal
fn FrameInfo::equal(FrameInfo, FrameInfo) -> BoolFrameInfo::not_equal
fn FrameInfo::not_equal(x : FrameInfo, y : FrameInfo) -> BoolFrameInfo::to_repr
fn FrameInfo::to_repr(FrameInfo) -> @moonbitlang/core/debug.ReprGraph
pub struct Graph {
view_id : String
nodes : ReadOnlyArray[GraphNode]
edges : ReadOnlyArray[GraphEdge]
// private fields
}Graph::lookup
fn Graph::lookup(self : Graph, id : String, limits? : Limits) -> Result[GraphNode, QueryFailure]Graph::reachable
fn Graph::reachable(self : Graph, start : String, kinds? : ArrayView[EdgeKind], direction? : Direction, limits? : Limits) -> ReachabilityResultBreadth-first discovery includes the selected start once. Associations never become control-flow edges; MessageFlow is explicit opt-in.
Graph::route
fn Graph::route(self : Graph, start : String, target : String, kinds? : ArrayView[EdgeKind], direction? : Direction, limits? : Limits) -> RouteResultOne shortest structural route; authored edge order breaks equal-length ties. Reverse queries keep the original connection direction and identities.
GraphEdge
pub struct GraphEdge {
kind : EdgeKind
source : String
target : String
occurrence : String?
reversed : Bool
} derive(Eq, @moonbitlang/core/debug.Debug)GraphEdge::equal
fn GraphEdge::equal(GraphEdge, GraphEdge) -> BoolGraphEdge::not_equal
fn GraphEdge::not_equal(x : GraphEdge, y : GraphEdge) -> BoolGraphEdge::to_repr
fn GraphEdge::to_repr(GraphEdge) -> @moonbitlang/core/debug.ReprGraphNode
pub struct GraphNode {
id : String
label : String
kind : NodeKind
occurrence : String?
source_node : @moonrockz/diagrams/bpmn.Node?
swimlane_node : @moonrockz/diagrams/swimlane.Node?
} derive(Eq, @moonbitlang/core/debug.Debug)GraphNode::equal
fn GraphNode::equal(GraphNode, GraphNode) -> BoolGraphNode::not_equal
fn GraphNode::not_equal(x : GraphNode, y : GraphNode) -> BoolGraphNode::to_repr
fn GraphNode::to_repr(GraphNode) -> @moonbitlang/core/debug.ReprLimitKind
pub(all) enum LimitKind {
Nodes
Edges
Results
Work
Steps
Depth
} derive(Eq, @moonbitlang/core/debug.Debug)LimitKind::equal
fn LimitKind::equal(LimitKind, LimitKind) -> BoolLimitKind::not_equal
fn LimitKind::not_equal(x : LimitKind, y : LimitKind) -> BoolLimitKind::to_repr
fn LimitKind::to_repr(LimitKind) -> @moonbitlang/core/debug.ReprLimits
pub struct Limits {
nodes : Int
edges : Int
steps : Int
results : Int
work : Int
depth : Int
} derive(Eq, @moonbitlang/core/debug.Debug)Limits::equal
fn Limits::equal(Limits, Limits) -> BoolLimits::new
fn Limits::new(nodes? : Int, edges? : Int, steps? : Int, results? : Int, work? : Int, depth? : Int) -> LimitsLimits::not_equal
fn Limits::not_equal(x : Limits, y : Limits) -> BoolLimits::to_repr
fn Limits::to_repr(Limits) -> @moonbitlang/core/debug.ReprLimits::valid
fn Limits::valid(self : Limits) -> BoolMotion
pub(all) enum Motion {
Step(String, Int64)
OrientedStep(String, Int64, Bool)
Visit(String, Int64)
Serial(ReadOnlyArray[Motion])
Parallel(ReadOnlyArray[Motion])
} derive(Eq, @moonbitlang/core/debug.Debug)Motion::equal
fn Motion::equal(Motion, Motion) -> BoolMotion::not_equal
fn Motion::not_equal(x : Motion, y : Motion) -> BoolMotion::parallel
fn Motion::parallel(children : ArrayView[Motion]) -> MotionMotion::serial
fn Motion::serial(children : ArrayView[Motion]) -> MotionMotion::to_repr
fn Motion::to_repr(Motion) -> @moonbitlang/core/debug.ReprMotionPlan
pub struct MotionPlan {
view_id : String
flow_id : String
duration_ms : Int
} derive(Eq, @moonbitlang/core/debug.Debug)The first-slice pure plan names one authored connection and a duration.
MotionPlan::equal
fn MotionPlan::equal(MotionPlan, MotionPlan) -> BoolMotionPlan::new
fn MotionPlan::new(view_id : String, flow_id : String, duration_ms? : Int) -> MotionPlan?MotionPlan::not_equal
fn MotionPlan::not_equal(x : MotionPlan, y : MotionPlan) -> BoolMotionPlan::sample
fn MotionPlan::sample(self : MotionPlan, elapsed_ms : Int) -> (Int, Int)Exact bounded integer progress; no clock or browser state is read.
MotionPlan::to_repr
fn MotionPlan::to_repr(MotionPlan) -> @moonbitlang/core/debug.ReprNodeKind
pub(all) enum NodeKind {
Bpmn(@moonrockz/diagrams/bpmn.NodeKind)
Message
FrameEnter
FrameExit
Start
End
SwimlaneNode
StateNode(@moonrockz/diagrams/state.State)
StateRegion(@moonrockz/diagrams/state.Region)
StateNote(@moonrockz/diagrams/state.Note)
FlowchartNode(@moonrockz/diagrams/flowchart.Node)
FlowchartGroup
FlowchartLane
FlowchartNote(@moonrockz/diagrams/flowchart.Note)
FlowchartRegion(@moonrockz/diagrams/flowchart.Region, String)
SwimlaneGroup
SwimlaneLane
ArchitectureService
ArchitectureJunction
ArchitectureGroup
RailroadPoint
DataValue
} derive(Eq, @moonbitlang/core/debug.Debug)NodeKind::equal
fn NodeKind::equal(NodeKind, NodeKind) -> BoolNodeKind::not_equal
fn NodeKind::not_equal(x : NodeKind, y : NodeKind) -> BoolNodeKind::to_repr
fn NodeKind::to_repr(NodeKind) -> @moonbitlang/core/debug.ReprOccurrence
pub struct Occurrence {
key : String
index : Int
kind : OccurrenceKind
path : ReadOnlyArray[Int]
source : @moonrockz/diagrams/bpmn.SourceIdentity?
flow : @moonrockz/diagrams/bpmn.Flow?
message : @moonrockz/diagrams/sequence.Message?
swimlane_connection : @moonrockz/diagrams/swimlane.Connection?
railroad_connector : @moonrockz/diagrams/railroad-trace.Connector?
railroad_term : @moonrockz/diagrams/railroad-trace.Term?
data_member : @moonrockz/diagrams/data-tree.Member?
data_node : @moonrockz/diagrams/data-tree.Node?
} derive(Eq, @moonbitlang/core/debug.Debug)Occurrence::equal
fn Occurrence::equal(Occurrence, Occurrence) -> BoolOccurrence::is_visit
fn Occurrence::is_visit(self : Occurrence) -> BoolTrue for a node-visit target, which has no connection path.
Occurrence::not_equal
fn Occurrence::not_equal(x : Occurrence, y : Occurrence) -> BoolOccurrence::to_repr
fn Occurrence::to_repr(Occurrence) -> @moonbitlang/core/debug.ReprOccurrenceKind
pub(all) enum OccurrenceKind {
Bpmn(@moonrockz/diagrams/bpmn.ConnectionKind)
SequenceMessage
Swimlane(@moonrockz/diagrams/swimlane.FlowDirection)
State(@moonrockz/diagrams/state.Transition)
Flowchart(@moonrockz/diagrams/flowchart.Connection)
Architecture(@moonrockz/diagrams/architecture.Connection)
Railroad(@moonrockz/diagrams/railroad-trace.ConnectorRole)
DataConnector
Visit(VisitKind)
} derive(Eq, @moonbitlang/core/debug.Debug)OccurrenceKind::equal
fn OccurrenceKind::equal(OccurrenceKind, OccurrenceKind) -> BoolOccurrenceKind::not_equal
fn OccurrenceKind::not_equal(x : OccurrenceKind, y : OccurrenceKind) -> BoolOccurrenceKind::to_repr
fn OccurrenceKind::to_repr(OccurrenceKind) -> @moonbitlang/core/debug.ReprPlanResult
pub struct PlanResult {
plan : PlaybackPlan?
diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
}PlaybackMode
pub(all) enum PlaybackMode {
Finite
Illustrative
} derive(Eq, @moonbitlang/core/debug.Debug)PlaybackMode::equal
fn PlaybackMode::equal(PlaybackMode, PlaybackMode) -> BoolPlaybackMode::not_equal
fn PlaybackMode::not_equal(x : PlaybackMode, y : PlaybackMode) -> BoolPlaybackMode::to_repr
fn PlaybackMode::to_repr(PlaybackMode) -> @moonbitlang/core/debug.ReprPlaybackPlan
pub struct PlaybackPlan {
view_id : String
mode : PlaybackMode
duration_ms : Int64
steps : ReadOnlyArray[ScheduledStep]
// private fields
} derive(Eq, @moonbitlang/core/debug.Debug)PlaybackPlan::equal
fn PlaybackPlan::equal(PlaybackPlan, PlaybackPlan) -> BoolPlaybackPlan::illustrative
fn PlaybackPlan::illustrative(catalog : Catalog, duration_ms? : Int64, kinds? : ArrayView[@moonrockz/diagrams/bpmn.ConnectionKind], limits? : Limits) -> PlanResultThe authored catalog is an illustration, including separate alternatives. Repeating it never asserts that these connections form a feasible execution.
PlaybackPlan::matches
fn PlaybackPlan::matches(self : PlaybackPlan, catalog : Catalog) -> BoolPlaybackPlan::not_equal
fn PlaybackPlan::not_equal(x : PlaybackPlan, y : PlaybackPlan) -> BoolPlaybackPlan::repeating
fn PlaybackPlan::repeating(self : PlaybackPlan) -> PlanResultRepeat a validated nonempty plan without changing its source or timing.
PlaybackPlan::route
fn PlaybackPlan::route(catalog : Catalog, route : Route, duration_ms? : Int64, limits? : Limits) -> PlanResultPlaybackPlan::sample_at
fn PlaybackPlan::sample_at(self : PlaybackPlan, elapsed_ms : Int64) -> SamplePlaybackPlan::scenario
fn PlaybackPlan::scenario(catalog : Catalog, motion : Motion, limits? : Limits) -> PlanResultValidate a finite, explicit scenario. Parallel children share a start and the following serial item waits for the longest branch, without stage barriers.
PlaybackPlan::sequence
fn PlaybackPlan::sequence(catalog : Catalog, selections? : ArrayView[Selection], duration_ms? : Int64, limits? : Limits) -> PlanResultChoose conditional sections and finite loop counts explicitly. Frame labels remain descriptions; the planner never evaluates their text.
PlaybackPlan::to_repr
fn PlaybackPlan::to_repr(PlaybackPlan) -> @moonbitlang/core/debug.ReprQueryFailure
pub(all) enum QueryFailure {
InvalidEndpoint(String)
OutsideView(String)
InvalidLimits
Limit(LimitKind)
} derive(Eq, @moonbitlang/core/debug.Debug)QueryFailure::equal
fn QueryFailure::equal(QueryFailure, QueryFailure) -> BoolQueryFailure::not_equal
fn QueryFailure::not_equal(x : QueryFailure, y : QueryFailure) -> BoolQueryFailure::to_repr
fn QueryFailure::to_repr(QueryFailure) -> @moonbitlang/core/debug.ReprReachabilityResult
pub(all) enum ReachabilityResult {
Complete(ReadOnlyArray[GraphNode])
Failed(QueryFailure)
} derive(Eq, @moonbitlang/core/debug.Debug)ReachabilityResult::equal
fn ReachabilityResult::equal(ReachabilityResult, ReachabilityResult) -> BoolReachabilityResult::not_equal
fn ReachabilityResult::not_equal(x : ReachabilityResult, y : ReachabilityResult) -> BoolReachabilityResult::to_repr
fn ReachabilityResult::to_repr(ReachabilityResult) -> @moonbitlang/core/debug.ReprRoute
pub struct Route {
view_id : String
direction : Direction
nodes : ReadOnlyArray[GraphNode]
edges : ReadOnlyArray[GraphEdge]
reversed : ReadOnlyArray[Bool]
// private fields
} derive(Eq, @moonbitlang/core/debug.Debug)Route::equal
fn Route::equal(Route, Route) -> BoolRoute::not_equal
fn Route::not_equal(x : Route, y : Route) -> BoolRoute::to_repr
fn Route::to_repr(Route) -> @moonbitlang/core/debug.ReprRouteResult
pub(all) enum RouteResult {
Found(Route)
Unreachable
Failed(QueryFailure)
} derive(Eq, @moonbitlang/core/debug.Debug)RouteResult::equal
fn RouteResult::equal(RouteResult, RouteResult) -> BoolRouteResult::not_equal
fn RouteResult::not_equal(x : RouteResult, y : RouteResult) -> BoolRouteResult::to_repr
fn RouteResult::to_repr(RouteResult) -> @moonbitlang/core/debug.ReprSample
pub struct Sample {
elapsed_ms : Int64
duration_ms : Int64
finished : Bool
active : ReadOnlyArray[Active]
} derive(Eq, @moonbitlang/core/debug.Debug)Sample::equal
fn Sample::equal(Sample, Sample) -> BoolSample::not_equal
fn Sample::not_equal(x : Sample, y : Sample) -> BoolSample::to_repr
fn Sample::to_repr(Sample) -> @moonbitlang/core/debug.ReprScheduledStep
pub struct ScheduledStep {
ordinal : Int
occurrence : Occurrence
start_ms : Int64
duration_ms : Int64
concurrent_groups : ReadOnlyArray[Int]
reversed : Bool
visit : Bool
} derive(Eq, @moonbitlang/core/debug.Debug)ScheduledStep::equal
fn ScheduledStep::equal(ScheduledStep, ScheduledStep) -> BoolScheduledStep::not_equal
fn ScheduledStep::not_equal(x : ScheduledStep, y : ScheduledStep) -> BoolScheduledStep::to_repr
fn ScheduledStep::to_repr(ScheduledStep) -> @moonbitlang/core/debug.ReprSectionInfo
pub struct SectionInfo {
role : @moonrockz/diagrams/sequence.SectionRole
label : String?
controls : ReadOnlyArray[Control]
} derive(Eq, @moonbitlang/core/debug.Debug)SectionInfo::equal
fn SectionInfo::equal(SectionInfo, SectionInfo) -> BoolSectionInfo::not_equal
fn SectionInfo::not_equal(x : SectionInfo, y : SectionInfo) -> BoolSectionInfo::to_repr
fn SectionInfo::to_repr(SectionInfo) -> @moonbitlang/core/debug.ReprSelection
pub struct Selection {
frame_key : String
choice : Choice
} derive(Eq, @moonbitlang/core/debug.Debug)Selection::equal
fn Selection::equal(Selection, Selection) -> BoolSelection::new
fn Selection::new(frame_key : String, choice : Choice) -> SelectionSelection::not_equal
fn Selection::not_equal(x : Selection, y : Selection) -> BoolSelection::to_repr
fn Selection::to_repr(Selection) -> @moonbitlang/core/debug.ReprVisitKind
pub(all) enum VisitKind {
StateNode(@moonrockz/diagrams/state.Role)
StateNote
FlowchartNode(@moonrockz/diagrams/flowchart.Role)
FlowchartNote
RailroadTerm(@moonrockz/diagrams/railroad-trace.TermKind)
DataRow
DataBox
} derive(Eq, @moonbitlang/core/debug.Debug)The kind of a node-visit target.
VisitKind::equal
fn VisitKind::equal(VisitKind, VisitKind) -> BoolVisitKind::not_equal
fn VisitKind::not_equal(x : VisitKind, y : VisitKind) -> BoolVisitKind::to_repr
fn VisitKind::to_repr(VisitKind) -> @moonbitlang/core/debug.ReprValues
data_key
fn data_key(view_id : String, kind : String, id : String) -> StringThe occurrence key of a data member row, data box or data connector.
max_duration_ms
let max_duration_ms : Int64railroad_key
fn railroad_key(view_id : String, id : String) -> StringThe occurrence key of a railroad term or connector identity.