DataViz.Layout.StateMachine.Types
- Package
- purescript-hylograph-layout
- Repository
- afcondon/purescript-hylograph-layout
DataViz.Layout.StateMachine.Types
Types for state machine visualization. A state machine diagram shows states as circles/ovals and transitions as labeled arrows between them.
Both states and transitions carry an extra payload, and the two are
independently parameterised: a state's payload describes a state (a phase,
a liveness flag), a transition's payload describes an edge (the event that
fires it, a guard, a refusal reason). A caller that wants neither uses
Unit for both.
#Transition Source
type Transition extra = { extra :: extra, from :: String, label :: String, to :: String }A transition between states
The extra field carries whatever the caller needs to keep attached to the
edge itself — the triggering event, a guard, a refusal reason — so that a
renderer can style or annotate an arrow without a side table keyed by
from/to/label.
#StateMachine Source
type StateMachine stateExtra transitionExtra = { states :: Array (State stateExtra), transitions :: Array (Transition transitionExtra) }Complete state machine definition
#StatePosition Source
type StatePosition = { cx :: Number, cy :: Number, rx :: Number, ry :: Number }Computed position for a state
#LayoutState Source
type LayoutState extra = { position :: StatePosition, state :: State extra }A state with computed layout
#LayoutTransition Source
type LayoutTransition extra = { path :: TransitionPath, transition :: Transition extra }A transition with computed layout
#StateMachineLayout Source
type StateMachineLayout stateExtra transitionExtra = { height :: Number, initialArrow :: { angle :: Number, x :: Number, y :: Number }, originX :: Number, originY :: Number, states :: Array (LayoutState stateExtra), transitions :: Array (LayoutTransition transitionExtra), width :: Number }Complete layout output ready for rendering
originX/originY are the top-left of the drawing, which is NOT always
(0, 0): a self-loop or a transition label can sit left of or above the
leftmost state, and a viewBox pinned to the origin clips them. Renderers
should use all four as the viewBox.
- Modules
- DataViz.
Layout. Adjacency - DataViz.
Layout. Adjacency. Layout - DataViz.
Layout. Adjacency. Types - DataViz.
Layout. BlockCutTree - DataViz.
Layout. Chord - DataViz.
Layout. Chord. Layout - DataViz.
Layout. Chord. Types - DataViz.
Layout. Hierarchy. Cluster - DataViz.
Layout. Hierarchy. Core - DataViz.
Layout. Hierarchy. EdgeBundle - DataViz.
Layout. Hierarchy. EdgeBundle. Bilink - DataViz.
Layout. Hierarchy. EdgeBundle. BundleCurve - DataViz.
Layout. Hierarchy. EdgeBundle. Hierarchy - DataViz.
Layout. Hierarchy. EdgeBundle. RadialCluster - DataViz.
Layout. Hierarchy. EdgeBundle. Types - DataViz.
Layout. Hierarchy. Link - DataViz.
Layout. Hierarchy. Pack - DataViz.
Layout. Hierarchy. Partition - DataViz.
Layout. Hierarchy. Tree - DataViz.
Layout. Hierarchy. TreeStyle - DataViz.
Layout. Hierarchy. Treemap - DataViz.
Layout. Hierarchy. Types - DataViz.
Layout. Pattern - DataViz.
Layout. Pattern. Adapters - DataViz.
Layout. Pattern. Types - DataViz.
Layout. Sankey. CSV - DataViz.
Layout. Sankey. Compute - DataViz.
Layout. Sankey. ComputeWithSteps - DataViz.
Layout. Sankey. Lanes - DataViz.
Layout. Sankey. Path - DataViz.
Layout. Sankey. Types - DataViz.
Layout. StateMachine - DataViz.
Layout. StateMachine. Layout - DataViz.
Layout. StateMachine. Path - DataViz.
Layout. StateMachine. Tree - DataViz.
Layout. StateMachine. Types - DataViz.
Layout. TidyDag