Canvas Docs as Canvas

This commit is contained in:
saberzero1 2025-02-28 18:50:40 +01:00
parent 289d6cb869
commit b79c955e37
No known key found for this signature in database
GPG Key ID: 19A4886B0F589E55
2 changed files with 13 additions and 3 deletions

View File

@ -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":[]
}
"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"}
]
}

View File

@ -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"