@rigxyz/canvas
v0.1.2
Published
Canvas — the read/share UI lens for the rig/tap ecosystem.
Readme
@rigxyz/canvas
Canvas — the read/share UI lens for the rig/tap ecosystem.
An infinite canvas that renders a rig's outputs — briefings, tables, maps,
documents — as frosted-glass cards. The board is a file in the rig
(.canvas/<name>.board.toml); each card points at a rig file and picks a render
primitive. Content resolves live from the rig, so edits show up without a reload.
View a rig locally
From inside a rig folder:
npx @rigxyz/canvasThen open http://localhost:3030. The viewer renders whatever rig directory you launch it from. To point it elsewhere:
npx @rigxyz/canvas ../path/to/rig # a specific rig
PORT=4000 npx @rigxyz/canvas # a different portIf the rig has no board yet, create .canvas/<name>.board.toml (see below) and
the canvas picks it up.
Board spec
[board]
name = "my-rig"
theme = "auto" # paper | night | auto
mode = "anchor" # anchor (free placement) | bento (auto-layout)
[[card]]
id = "readme"
title = "Overview"
type = "markdown" # markdown | table | list | metric | timeline | image | code | map | series
source = "README.md" # a path or glob in the rig
x = 40
y = 40
w = 560
h = 420sourceis a path or glob into the rig; content is never embedded in the board.selecttargets a slice of a file:section:Heading,metric:RowLabel, or a glob'slatest.anchormode honoursx/y;bentoauto-packs fromw/h.
The full design and primitive catalog live in
../../docs/canvas-design-doc.md.
Develop
pnpm --filter @rigxyz/canvas dev # Next dev server (set TAP_LOCAL_ROOT to a rig)
pnpm --filter @rigxyz/canvas typecheckTAP_LOCAL_ROOT selects the rig directory; it defaults to the current working
directory. The canvas bin sets it automatically from where you invoke it.
