skip to content
$worker

canvas

v0.1.13

Create, edit and render diagrams in the console — stored as editable source, drawn live in chat and on a canvas page.

iiiverified
19 installs1 in 7d0 today
install
$iii trigger compose::add worker=canvas@0.1.13
  • macOS: arm64
  • Linux: arm64 · armv7 · x64
  • Windows: arm64 · x64

exact versions are immutable; binary and bundle artifacts are digest-pinned.

functions

1

canvas::create

function

Create a new canvas from mermaid text or an excalidraw scene JSON. Returns the stored record, including the minted stable id and, for mermaid, the diagram family derived from the source.

request
  • formatany of

    Diagram format: `mermaid` or `freeform`. Defaults to `mermaid`.

    any of (2)
    variant 1
    one of (2)
    variant 1
    valuestringenum: mermaid
    variant 2
    valuestringenum: freeform
    variant 2
    valuenull
  • namestring

    Human-readable canvas name. Omit for a name derived from the detected diagram family (`Untitled flowchart`, `Untitled whiteboard`, …).

  • sourcestringrequired

    The editable source: mermaid text for `mermaid`, an excalidraw scene JSON string for `freeform`.

response
  • created_atinteger· int64required

    Creation time, unix seconds.

  • familystring

    Mermaid diagram family (`flowchart`, `sequenceDiagram`, …), derived from the source. `null` for a freeform canvas.

  • formatall ofrequired

    Diagram format: `mermaid` or `freeform`.

    all of (1)
    variant 1
    one of (2)
    variant 1
    valuestringenum: mermaid
    variant 2
    valuestringenum: freeform
  • idstringrequired

    Stable 8-character slug identifying this canvas. Never changes across updates.

  • namestringrequired

    Human-readable canvas name.

  • sourcestringrequired

    The editable source of truth: mermaid text for `mermaid`, the excalidraw scene JSON for `freeform`.

  • updated_atinteger· int64required

    Last update time, unix seconds.

triggers

0
no triggers registered