Build valid, crop-free
.canvasknowledge maps for this forkβscanvas-pageplugin. Canon: π SSOT Bible. Live example: πΊοΈ Site Map.
1. π― When
Use a canvas when layout carries meaning β module maps, dependency graphs, mind maps, migration funnels, kanban boards. For inline flow inside a doc, prefer π§ MermaidGuru.
2. π§© Nodes
Document is { "nodes": [...], "edges": [...] }. Four node types, all need id, x, y, width, height:
| Type | Extra field | Renders as |
|---|---|---|
text | text | Inline GFM markdown |
file | file | Clickable page + hover popover |
link | url | Card (this fork β no iframe) |
group | label, background? | Dashed container |
- π
filepaths are CONTENT-ROOT-RELATIVE:"file": "skills/gurus/MermaidGuru.md", never absolute, never vault-root. Label = filename minus extension. - π External
linknodes render as cards in this fork (the old iframe embed is gone), so they no longer need 300px of iframe height β size them like a wide text node.
3. π Sizing
Crop is invisible in JSON and only shows in the viewport β oversize on purpose.
| Node | Width | Height |
|---|---|---|
| File | 400β460 | 60β80 |
| Text (multi-line) | 250β500 | 80β200, scale to content |
| Link (card) | 400 | 120β160 |
| Group | content + 80 | content + 120 |
- βοΈ β₯100px vertical pitch between stacked nodes (node height + β₯20px gap; 100px grid for groups).
- π² All coordinates snap to multiples of 20; groups round to 100.
- π§± First node inside a group sits at
group_y + 40 (pad) + 60 (label area)β skipping the label area overlaps the title. - βοΈ Groups β₯200px apart; never nest groups (spec 1.0 has no nesting).
4. π¨ Colors
Preset 1β6 (or #hex) β assign meaning, not aesthetics:
| # | Color | Meaning |
|---|---|---|
1 π΄ | Red | Critical / deprecated |
2 π | Orange | Reference / outputs |
3 π‘ | Yellow | In-progress / plans |
4 π’ | Green | Stable / infra |
5 π΅ | Cyan | Core / hub |
6 π£ | Purple | Knowledge / skills |
5. π§· Edges & Order
- π§ Always set
fromSide/toSidefacing the target; addtoEnd: "arrow"for direction; labels 1β2 verb words. - πͺ Z-order = array order: groups FIRST (background), then text, then file/link (foreground, clickable). Containment is geometry-only β a node belongs to a group when it falls fully inside its bounds.
- π IDs kebab-case:
grp-*,f-*,txt-*,lnk-*,e-from-to.
6. β Verify
- Every
fromNode/toNodereferences a real node id. - Groups precede their contained nodes in the array.
- Coordinates are multiples of 20; no unintended overlap.
-
filepaths are content-root-relative and exist. - Colors encode meaning; JSON valid, 2-space indent, no
//comments.
The deploy β screenshot β evaluate loop is the main agentβs job; author the JSON to pass it first time. Diagram form instead β π§ MermaidGuru.