The second cut's text forms (spec/02 §11.3, spec/13 §7.3): one Macaw.Frame.TextForm
per diagram, each mermaid-like, read into a design of a layout frame whose node,
edge, lane and grid layers draw the diagram's slots, the slots filled with
static rows (a slot's rows), so the same design bound to sources draws a live
diagram instead.
| Form | First word | Slots | Layout step |
|---|---|---|---|
Flowchart | flowchart | nodes, edges, groups | layered |
State | stateDiagram | nodes, edges, groups | layered |
Class | classDiagram | nodes, edges, members | layered |
Er | erDiagram | nodes, edges, attributes | layered |
Sequence | sequenceDiagram | nodes (participants), messages | sequence |
Gantt | gantt | tasks | gantt |
Timeline | timeline | events | gantt (each event a milestone) |
PageFlow | pageFlow | nodes, edges | layered (spec/13 §7.5) |
Each answers every fault of a text at once, a syntax fault as
{[:text, line, column], {:parse, reason}} (columns in grapheme clusters, from 1), and
makes no atom of the text: names, labels and spellings stay strings. Each prints a
design back canonically where it can (print/1), and parse(print(f)) reads f back.
iex> {:ok, registry} = Macaw.Frame.TextForms.registry()
iex> Map.keys(registry) |> Enum.sort()
["classDiagram", "erDiagram", "flowchart", "gantt", "pageFlow", "sequenceDiagram", "stateDiagram", "timeline"]
Summary
Functions
Every diagram text form, in spec/13 §7.3's order, then §7.5's page flow.
The registry of every diagram text form (Macaw.Frame.TextForm.registry/1).
Functions
@spec all() :: [module()]
Every diagram text form, in spec/13 §7.3's order, then §7.5's page flow.
@spec registry() :: {:ok, Macaw.Frame.TextForm.registry()} | {:error, list()}
The registry of every diagram text form (Macaw.Frame.TextForm.registry/1).