# Canvases

> Text, files, links, web pages and other entries laid out freely and joined by edges.

A canvas is a board without columns: cards placed anywhere, joined by edges.
**File › New Canvas** makes one, and **File › Import Canvas…** reads a
[JSON Canvas](https://jsoncanvas.org) file with the local files it names.
Canvases are on unless `canvases` is off in [Features](https://cydonia.sh/docs/general/features.md).

A canvas is a file in the project, `.cydonia/canvases/<id>/content.canvas`, in
the JSON Canvas format.

## Tools

The dock at the bottom of a canvas holds its tools. A tool that puts something
down takes the next press, then goes back to Select; Esc goes back without
putting anything down.

| Tool | Key | A press |
| --- | --- | --- |
| Select | V | Selects and moves cards |
| Hand | H | Drags the view anywhere, over cards too |
| Note | N | A yellow text card: a click puts one down, a drag sizes it |
| Shape | R | A text card with the outline picked under the tool; press it again to pick |
| Arrow | A | An edge, dragged from one card to another |
| Text | T | Plain text where you click |
| Frame | F | A group dragged out, holding the cards it covers whole |

A read-only canvas shows only Select and Hand. The zoom in the top right
corner reads the zoom and opens its menu.

## Cards

| Card | What it holds |
| --- | --- |
| Text | Markdown, as a document card or as plain text: an unboxed label that grows as it wraps |
| File | A file of the project, shown as a preview |
| Link | A web address, with the preview its page supplies |
| Web page | A live page at a set viewport size, from a URL or an HTML file in the project |
| Entry | An article, board, session or other entry of the project, previewed by its kind |
| Group | A labelled region that holds other cards |

**Add** in the canvas's context menu puts each kind down. An article on an
entry card is the same document as in its own pane: editing it on the canvas
edits the article. **Convert to article** on a text card makes a new article of
its text and puts a link to it in the card's place.

Text cards and edges take a text size and a colour. Any card takes a
**Shape**: rectangle, rounded, stadium, circle, diamond, hexagon,
parallelogram or cylinder. A web page card reloads when its HTML file is saved,
and keeps a development server's hot reload.

## Edges

An edge joins two cards, from a side of one to a side of the other. It can
carry a label and a colour, and its direction is nondirectional, one way or
both ways. **Start mark** and **End mark** set what each end is drawn with:
nothing, an arrow, a circle or a cross.

## Arranging

With several cards selected, **Align and arrange** aligns their edges or
centres, distributes or justifies them, or arranges them in a row, a column or
a grid. **Group selection** puts them in a group. **Snap to grid** and **Snap to
objects** are in the canvas's options; snapping to objects is off until you
turn it on.

**Fit to content** and **Zoom to selection** frame the view, and a canvas
reopens where you last looked at it.

## Export

**Export** writes a JSON Canvas file with its local files, or a PNG of the full
canvas or of the current viewport at a scale you pick.

## Agents

Agents create, read and edit canvases with `canvas_add`, `canvas_read` and
`canvas_edit`. An edit carries the version it read, and is refused whole when
the canvas changed since; nothing of a refused edit is saved.

When a save of yours fails, the canvas says why and stops taking the file's
changes. **Reload saved canvas** drops yours for what is on disk; **Save my
version** writes yours over it.

The browser tools reach a web page card by the canvas and the card — see
[MCP](https://cydonia.sh/docs/agents/mcp.md).
