Experimental Livebook-friendly DSL for sketching mind maps.
This Lab DSL compiles to the stable, pipe-first Choreo.MindMap builders and
returns an ordinary %Choreo.MindMap{}. It follows the shared Lab identity rule:
in assignment form, the variable name becomes the node id and the string becomes
the display label; in inline form, the string is slugged into an id and also used
as the label.
Examples
iex> import Choreo.Lab.DSL.MindMap
...> map = mind_map do
...> system = root("System Design")
...> requirements = topic("Requirements")
...> risks = note("Open Risks")
...>
...> system ~> requirements
...> edge requirements ~> risks, "needs review"
...> end
iex> Choreo.MindMap.root(map)
:system
iex> map.graph.nodes[:requirements].label
"Requirements"
iex> map.edge_meta[{:requirements, :risks}].label
"needs review"Branch edges can use ~>, pipe modifiers, explicit edge, or the typed
branch form:
root ~> topic
root ~> topic |> on("expands into")
edge root ~> topic, "expands into"
branch root ~> topic, "expands into"Associative cross-links use the typed associate/association form, a typed
keyword on edge, or a pipe modifier:
associate topic ~> note, "related"
association topic ~> note, "related"
edge topic ~> note, associate: "related"
topic ~> note |> associate("related")
Summary
Functions
Builds a %Choreo.MindMap{} from a compact Lab DSL block.
Returns the vocabulary supported by the mind-map DSL.
Compatibility alias for taxonomy/0.
Types
@type edge_decl() :: %{ from: Yog.node_id(), to: Yog.node_id(), edge_type: :branch | :associate, opts: keyword() }
@type node_decl() :: %{id: Yog.node_id(), builder: atom(), opts: keyword()}
Functions
Builds a %Choreo.MindMap{} from a compact Lab DSL block.
Returns the vocabulary supported by the mind-map DSL.
This is meant as a lightweight Livebook discovery helper when autocomplete is not enough.
iex> taxonomy = Choreo.Lab.DSL.MindMap.taxonomy()
iex> :root in taxonomy.nodes
true
iex> :associate in taxonomy.edges
true
iex> :on in taxonomy.modifiers
true
Compatibility alias for taxonomy/0.