tldraw/__tests__/__mocks__/data.json

327 lines
9.9 KiB
JSON
Raw Normal View History

{
"isReadOnly": false,
"settings": {
"fontSize": 13,
"isDarkMode": false,
"isCodeOpen": false,
2021-07-07 13:53:03 +00:00
"isDebugMode": false,
"isDebugOpen": false,
"isStyleOpen": false,
"isToolLocked": false,
"isPenLocked": false,
"nudgeDistanceLarge": 10,
"nudgeDistanceSmall": 1
},
"currentStyle": {
"size": "Medium",
"color": "Black",
2021-07-07 13:53:03 +00:00
"dash": "Draw",
"isFilled": false
},
"activeTool": "select",
"editingId": null,
2021-07-07 13:53:03 +00:00
"boundsRotation": 0,
"currentPageId": "page1",
"currentParentId": "page1",
"currentCodeFileId": "file0",
"codeControls": {},
"document": {
2021-07-14 11:39:34 +00:00
"id": "TESTING",
"name": "My Document",
"pages": {
"page1": {
"id": "page1",
"type": "page",
"name": "Page 1",
"childIndex": 0,
"shapes": {
2021-07-07 13:53:03 +00:00
"e43559cb-6f41-4ae4-9c49-158ed1ad2f72": {
"id": "e43559cb-6f41-4ae4-9c49-158ed1ad2f72",
"type": "rectangle",
"name": "Rectangle",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 3,
2021-07-14 11:40:18 +00:00
"point": [171.47, 288.63],
"size": [176.22, 192.26],
2021-07-07 13:53:03 +00:00
"radius": 2,
"rotation": 0,
"style": {
"color": "Black",
2021-07-07 13:53:03 +00:00
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
}
},
2021-07-07 13:53:03 +00:00
"13448777-d8f5-46cd-8a70-a4259211902e": {
"id": "13448777-d8f5-46cd-8a70-a4259211902e",
"type": "rectangle",
"name": "Rectangle",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 4,
2021-07-14 11:40:18 +00:00
"point": [511.7, 404.19],
"size": [181.08999999999992, 150.40999999999997],
2021-07-07 13:53:03 +00:00
"radius": 2,
"rotation": 0,
"style": {
"color": "Black",
2021-07-07 13:53:03 +00:00
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
}
},
2021-07-07 13:53:03 +00:00
"75010635-8dfb-48ea-9250-719e50e58f02": {
"id": "75010635-8dfb-48ea-9250-719e50e58f02",
"type": "rectangle",
"name": "Rectangle",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 5,
2021-07-14 11:40:18 +00:00
"point": [384.09, 378.45],
"size": [95.20999999999992, 91.1799999999999],
2021-07-07 13:53:03 +00:00
"radius": 2,
"rotation": 0,
"style": {
"color": "Black",
2021-07-07 13:53:03 +00:00
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
}
},
2021-07-07 13:53:03 +00:00
"c892d665-3311-4e25-a0bf-c4632d777f7e": {
"id": "c892d665-3311-4e25-a0bf-c4632d777f7e",
"type": "ellipse",
"name": "Ellipse",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 6,
2021-07-14 11:40:18 +00:00
"point": [162.45, 679.23],
2021-07-07 13:53:03 +00:00
"radiusX": 102.99999999999997,
"radiusY": 102.99999999999994,
"rotation": 0,
"style": {
"color": "Black",
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
}
},
2021-07-07 13:53:03 +00:00
"51641de1-9787-41b8-afcc-2c85fd1b24c7": {
"id": "51641de1-9787-41b8-afcc-2c85fd1b24c7",
"type": "ellipse",
"name": "Ellipse",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 7,
2021-07-14 11:40:18 +00:00
"point": [517.18, 783.54],
2021-07-07 13:53:03 +00:00
"radiusX": 102.99999999999997,
"radiusY": 102.99999999999994,
"rotation": 0,
"style": {
"color": "Black",
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
}
},
2021-07-07 13:53:03 +00:00
"e08c415e-3db3-4d3b-878e-28ce693ec1b0": {
"id": "e08c415e-3db3-4d3b-878e-28ce693ec1b0",
"type": "ellipse",
"name": "Ellipse",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 8,
2021-07-14 11:40:18 +00:00
"point": [398.99, 810.79],
2021-07-07 13:53:03 +00:00
"radiusX": 45.484999999999985,
"radiusY": 45.48499999999996,
"rotation": 0,
"style": {
"color": "Black",
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
}
},
2021-07-07 13:53:03 +00:00
"fee77127-e779-4576-882b-b1bf7c7e132f": {
"id": "fee77127-e779-4576-882b-b1bf7c7e132f",
"type": "arrow",
"name": "Arrow",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 9,
2021-07-14 11:40:18 +00:00
"point": [252.85, 1057.5],
"rotation": 0,
"bend": 0,
"handles": {
"start": {
"id": "start",
"index": 0,
2021-07-14 11:40:18 +00:00
"point": [0, 0]
},
"end": {
"id": "end",
"index": 1,
2021-07-14 11:40:18 +00:00
"point": [0.09000000000000341, 208]
},
"bend": {
"id": "bend",
"index": 2,
2021-07-14 11:40:18 +00:00
"point": [0.045000000000001705, 104]
}
},
"decorations": {
"start": null,
2021-07-07 13:53:03 +00:00
"middle": null,
"end": "Arrow"
},
"style": {
"color": "Black",
2021-07-07 13:53:03 +00:00
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
}
},
2021-07-07 13:53:03 +00:00
"2d842ace-ebc5-4e83-acdf-de29352e5e62": {
"id": "2d842ace-ebc5-4e83-acdf-de29352e5e62",
"type": "arrow",
"name": "Arrow",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 10,
2021-07-14 11:40:18 +00:00
"point": [616.9, 1124.3],
"rotation": 0,
"bend": 0,
"handles": {
"start": {
"id": "start",
"index": 0,
2021-07-14 11:40:18 +00:00
"point": [0, 0]
},
"end": {
"id": "end",
"index": 1,
2021-07-14 11:40:18 +00:00
"point": [2.4500000000000455, 185.20000000000005]
},
"bend": {
"id": "bend",
"index": 2,
2021-07-14 11:40:18 +00:00
"point": [1.2250000000000227, 92.60000000000002]
}
},
"decorations": {
"start": null,
2021-07-07 13:53:03 +00:00
"middle": null,
"end": "Arrow"
},
"style": {
"color": "Black",
2021-07-07 13:53:03 +00:00
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
}
},
2021-07-07 13:53:03 +00:00
"b8e4e2c5-c662-4587-bf80-b9820ad8ad7f": {
"id": "b8e4e2c5-c662-4587-bf80-b9820ad8ad7f",
"type": "arrow",
"name": "Arrow",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 11,
2021-07-14 11:40:18 +00:00
"point": [425.18, 1143.2],
2021-07-07 13:53:03 +00:00
"rotation": 0,
"bend": 0,
"handles": {
"start": {
"id": "start",
"index": 0,
2021-07-14 11:40:18 +00:00
"point": [0, 0]
},
"end": {
"id": "end",
"index": 1,
2021-07-14 11:40:18 +00:00
"point": [1.8500000000000227, 95.70000000000005]
},
"bend": {
"id": "bend",
"index": 2,
2021-07-14 11:40:18 +00:00
"point": [0.9250000000000114, 47.85000000000002]
}
},
"decorations": {
"start": null,
2021-07-07 13:53:03 +00:00
"middle": null,
"end": "Arrow"
},
"style": {
"color": "Black",
2021-07-07 13:53:03 +00:00
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
}
},
2021-07-07 13:53:03 +00:00
"38e9e750-16c2-4476-93ab-21aeb5f8858f": {
"id": "38e9e750-16c2-4476-93ab-21aeb5f8858f",
"type": "text",
"name": "Text",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 12,
2021-07-14 11:40:18 +00:00
"point": [207.16, 1422.4],
"rotation": 0,
"style": {
"color": "Black",
"size": "Medium",
2021-07-07 13:53:03 +00:00
"isFilled": false,
"dash": "Draw"
},
"text": "Hello",
"scale": 1
},
2021-07-07 13:53:03 +00:00
"5ba998df-c036-447a-9b88-d96c71394f52": {
"id": "5ba998df-c036-447a-9b88-d96c71394f52",
"type": "text",
"name": "Text",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 13,
2021-07-14 11:40:18 +00:00
"point": [389.57, 1496.5],
2021-07-07 13:53:03 +00:00
"rotation": 0,
"style": {
"color": "Black",
2021-07-07 13:53:03 +00:00
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
},
"text": "Hello",
"scale": 1
},
2021-07-07 13:53:03 +00:00
"3c688979-b190-4270-915b-7d8dd22a2bb7": {
"id": "3c688979-b190-4270-915b-7d8dd22a2bb7",
"type": "text",
"name": "Text",
"parentId": "page1",
2021-07-07 13:53:03 +00:00
"childIndex": 14,
2021-07-14 11:40:18 +00:00
"point": [564.06, 1558.1],
2021-07-07 13:53:03 +00:00
"rotation": 0,
"style": {
"color": "Black",
2021-07-07 13:53:03 +00:00
"size": "Medium",
"isFilled": false,
2021-07-07 13:53:03 +00:00
"dash": "Draw"
},
2021-07-07 13:53:03 +00:00
"text": "Hello",
"scale": 1
}
}
}
},
"code": {
"file0": {
"id": "file0",
"name": "index.ts",
2021-07-07 13:53:03 +00:00
"code": "\nconst draw = new Draw({\n points: [\n ...Utils.getPointsBetween([0, 0], [20, 50]),\n ...Utils.getPointsBetween([20, 50], [100, 20], 3),\n ...Utils.getPointsBetween([100, 20], [100, 100], 10),\n [100, 100],\n ],\n})\n\nconst rectangle = new Rectangle({\n point: [200, 0],\n style: {\n color: ColorStyle.Blue,\n },\n})\n\nconst ellipse = new Ellipse({\n point: [400, 0],\n})\n\nconst arrow = new Arrow({\n start: [600, 0],\n end: [700, 100],\n})\n\nconst radius = 1000\nconst count = 100\nconst center = [350, 50]\n\nfor (let i = 0; i < count; i++) {\n const point = Vec.rotWith(\n Vec.add(center, [radius, 0]),\n center,\n (Math.PI * 2 * i) / count\n )\n\n const dot = new Dot({\n point,\n })\n}\n "
}
}
},
"pageStates": {
"page1": {
"id": "page1",
"camera": {
2021-07-14 11:40:18 +00:00
"point": [0, -145],
"zoom": 1
2021-07-07 13:53:03 +00:00
},
"selectedIds": {}
}
}
2021-07-14 11:40:18 +00:00
}