Runtime
Dependency expansion
Diagrams can grow at runtime. The on expand binding adds a button
that safely reads a package.json and adds dependency nodes.
Syntax#
mantou
on expand WebApp {
add dependencies from "package.json" depth 1
}Behavior#
- An Expand button appears in the node detail panel.
- On click, the runtime reads the
package.json— inside the project directory only. - It parses
dependenciesanddevDependencies. - Dependency nodes and edges are added, then the graph relayouts.
▲
Scoped & manual
Expansion never happens automatically, and the path is resolved strictly within the project directory — traversal and absolute paths are rejected.
Select WebApp below and click Expand dependencies:
🥟
Live expansion
🥟
Nothing selected
Click a node or edge to inspect it. Connected nodes light up, the rest dim.