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#

  1. An Expand button appears in the node detail panel.
  2. On click, the runtime reads the package.json — inside the project directory only.
  3. It parses dependencies and devDependencies.
  4. 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

Mini Map
🥟

Nothing selected

Click a node or edge to inspect it. Connected nodes light up, the rest dim.