Compress agent skills
This commit is contained in:
159
tldraw-file/references/record-templates.md
Normal file
159
tldraw-file/references/record-templates.md
Normal file
@@ -0,0 +1,159 @@
|
||||
# tldraw Record Templates
|
||||
|
||||
## Required Base Records
|
||||
|
||||
```json
|
||||
{
|
||||
"gridSize": 10,
|
||||
"name": "",
|
||||
"meta": {},
|
||||
"id": "document:document",
|
||||
"typeName": "document"
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "page:page",
|
||||
"name": "Page",
|
||||
"index": "a1",
|
||||
"meta": {},
|
||||
"typeName": "page"
|
||||
}
|
||||
```
|
||||
|
||||
Every shape should include:
|
||||
|
||||
```json
|
||||
{
|
||||
"parentId": "page:page",
|
||||
"index": "a2",
|
||||
"typeName": "shape"
|
||||
}
|
||||
```
|
||||
|
||||
## Rich Text Helper
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "doc",
|
||||
"content": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Label"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Also include legacy `text` with the same plain text.
|
||||
|
||||
## Geo Shape
|
||||
|
||||
Use geo shapes for most boxes.
|
||||
|
||||
```json
|
||||
{
|
||||
"x": 100,
|
||||
"y": 100,
|
||||
"rotation": 0,
|
||||
"isLocked": false,
|
||||
"opacity": 1,
|
||||
"meta": {},
|
||||
"id": "shape:box",
|
||||
"type": "geo",
|
||||
"props": {
|
||||
"geo": "rectangle",
|
||||
"w": 260,
|
||||
"h": 90,
|
||||
"color": "blue",
|
||||
"labelColor": "black",
|
||||
"fill": "solid",
|
||||
"dash": "solid",
|
||||
"size": "m",
|
||||
"font": "sans",
|
||||
"align": "middle",
|
||||
"verticalAlign": "middle",
|
||||
"growY": 0,
|
||||
"url": "",
|
||||
"scale": 1,
|
||||
"richText": {"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"My box"}]}]},
|
||||
"text": "My box"
|
||||
},
|
||||
"parentId": "page:page",
|
||||
"index": "a2",
|
||||
"typeName": "shape"
|
||||
}
|
||||
```
|
||||
|
||||
## Text Shape
|
||||
|
||||
```json
|
||||
{
|
||||
"x": 100,
|
||||
"y": 40,
|
||||
"rotation": 0,
|
||||
"isLocked": false,
|
||||
"opacity": 1,
|
||||
"meta": {},
|
||||
"id": "shape:title",
|
||||
"type": "text",
|
||||
"props": {
|
||||
"color": "black",
|
||||
"size": "xl",
|
||||
"font": "sans",
|
||||
"textAlign": "start",
|
||||
"autoSize": true,
|
||||
"w": 900,
|
||||
"scale": 1,
|
||||
"richText": {"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Diagram Title"}]}]},
|
||||
"text": "Diagram Title"
|
||||
},
|
||||
"parentId": "page:page",
|
||||
"index": "a1",
|
||||
"typeName": "shape"
|
||||
}
|
||||
```
|
||||
|
||||
## Arrow Shape
|
||||
|
||||
Arrows require `labelColor`.
|
||||
|
||||
```json
|
||||
{
|
||||
"x": 400,
|
||||
"y": 200,
|
||||
"rotation": 0,
|
||||
"isLocked": false,
|
||||
"opacity": 1,
|
||||
"meta": {},
|
||||
"id": "shape:arrow",
|
||||
"type": "arrow",
|
||||
"props": {
|
||||
"kind": "arc",
|
||||
"color": "black",
|
||||
"labelColor": "black",
|
||||
"fill": "none",
|
||||
"dash": "solid",
|
||||
"size": "m",
|
||||
"arrowheadStart": "none",
|
||||
"arrowheadEnd": "arrow",
|
||||
"bend": 0,
|
||||
"start": {"x": 0, "y": 0},
|
||||
"end": {"x": 120, "y": 0},
|
||||
"labelPosition": 0.5,
|
||||
"font": "sans",
|
||||
"scale": 1,
|
||||
"richText": {"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"label"}]}]},
|
||||
"text": "label"
|
||||
},
|
||||
"parentId": "page:page",
|
||||
"index": "a3",
|
||||
"typeName": "shape"
|
||||
}
|
||||
```
|
||||
61
tldraw-file/references/schema-notes.md
Normal file
61
tldraw-file/references/schema-notes.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# tldraw Schema Notes
|
||||
|
||||
Current `.tldr` files use this top-level shape:
|
||||
|
||||
```json
|
||||
{
|
||||
"tldrawFileFormatVersion": 1,
|
||||
"schema": {
|
||||
"schemaVersion": 2,
|
||||
"sequences": {
|
||||
"com.tldraw.store": 5,
|
||||
"com.tldraw.asset": 1,
|
||||
"com.tldraw.camera": 1,
|
||||
"com.tldraw.document": 2,
|
||||
"com.tldraw.instance": 26,
|
||||
"com.tldraw.instance_page_state": 5,
|
||||
"com.tldraw.page": 1,
|
||||
"com.tldraw.instance_presence": 6,
|
||||
"com.tldraw.pointer": 1,
|
||||
"com.tldraw.shape": 4,
|
||||
"com.tldraw.user": 1,
|
||||
"com.tldraw.asset.image": 6,
|
||||
"com.tldraw.asset.video": 5,
|
||||
"com.tldraw.asset.bookmark": 2,
|
||||
"com.tldraw.shape.arrow": 8,
|
||||
"com.tldraw.shape.bookmark": 2,
|
||||
"com.tldraw.shape.draw": 4,
|
||||
"com.tldraw.shape.embed": 4,
|
||||
"com.tldraw.shape.frame": 1,
|
||||
"com.tldraw.shape.geo": 11,
|
||||
"com.tldraw.shape.group": 0,
|
||||
"com.tldraw.shape.highlight": 3,
|
||||
"com.tldraw.shape.image": 5,
|
||||
"com.tldraw.shape.line": 5,
|
||||
"com.tldraw.shape.note": 12,
|
||||
"com.tldraw.shape.text": 4,
|
||||
"com.tldraw.shape.video": 4,
|
||||
"com.tldraw.binding.arrow": 1
|
||||
}
|
||||
},
|
||||
"records": []
|
||||
}
|
||||
```
|
||||
|
||||
Valid `color` and `labelColor` values:
|
||||
|
||||
- `black`
|
||||
- `grey`
|
||||
- `light-violet`
|
||||
- `violet`
|
||||
- `blue`
|
||||
- `light-blue`
|
||||
- `yellow`
|
||||
- `orange`
|
||||
- `green`
|
||||
- `light-green`
|
||||
- `light-red`
|
||||
- `red`
|
||||
- `white`
|
||||
|
||||
Invalid or missing `labelColor` can corrupt the file.
|
||||
Reference in New Issue
Block a user