diff --git a/docs/features/Canvas.canvas b/docs/features/Canvas.canvas index 86f693eff..f89953742 100644 --- a/docs/features/Canvas.canvas +++ b/docs/features/Canvas.canvas @@ -1,6 +1,12 @@ { "nodes":[ - {"id":"f5769d77556ecdca","x":-199,"y":-178,"width":400,"height":400,"type":"file","file":"features/Canvas.md"} + {"id":"a85fff7a7493ef52","x":-600,"y":-240,"width":1340,"height":980,"color":"4","type":"group","label":"Canvas Group"}, + {"id":"f5769d77556ecdca","type":"file","file":"features/Canvas.md","x":-200,"y":-200,"width":400,"height":400,"color":"1"}, + {"id":"05e0c45c85417543","x":300,"y":300,"width":401,"height":400,"color":"3","type":"link","url":"https://jsoncanvas.org/spec/1.0/"}, + {"id":"5997bc7558e18f0b","x":-560,"y":470,"width":250,"height":60,"color":"5","type":"text","text":"Plain text note"} ], - "edges":[] -} \ No newline at end of file + "edges":[ + {"id":"d63d107e865d06ec","fromNode":"f5769d77556ecdca","fromSide":"right","toNode":"05e0c45c85417543","toSide":"top","color":"2","label":"Specification"}, + {"id":"4dcf493fa007b200","fromNode":"f5769d77556ecdca","fromSide":"bottom","toNode":"5997bc7558e18f0b","toSide":"top","color":"6"} + ] +} diff --git a/quartz/components/types.ts b/quartz/components/types.ts index a3d0871e5..bba709151 100644 --- a/quartz/components/types.ts +++ b/quartz/components/types.ts @@ -44,19 +44,23 @@ export type CanvasNode = { } export type CanvasTextNode = CanvasNode & { + type: "text" text: string } export type CanvasFileNode = CanvasNode & { + type: "file" file: string subpath?: string } export type CanvasLinkNode = CanvasNode & { + type: "link" url: string } export type CanvasGroupNode = CanvasNode & { + type: "group" label?: string background?: string backgroundStyle?: "cover" | "ratio" | "repeat"