tldraw/apps/vscode/extension/examples/3.tldr

1104 lines
24 KiB
Text
Raw Normal View History

Create VS Code Extension (#4) * Start of vscode extension. Current code is copy/paste from custom editor samples from Microsoft. We need to evaluate if using their text based customer editor or full on new custom editor is the way to go * Not sure how I missed these files. Adding them * Have a custom editor triggering off of .tldr files. Added gitignores for generated folder. Have iframed tldraw loading and security policies set to do so * Can now load a .tldr file. No saving support yet. Load times are slow, mostly from editor loading up I think * Have temporary solution for saving working now too. * Missed af ile * Backing up progress in syncing tldraw editor history changes * Removed console * ... * ... * Cleanup * Have save working well now. * Moved extension into 'integrations' folder * Trying out WebviewPanelOptions.retainContextWhenHidden=true and it's looking promising * Some cleanup * Trying out new @tldraw/editor module * Have prototype loading using new embedded editor * ... * Shaved off 1 second from editor loadtime * Got save working again. Had to manually fixuppreviously created .tldr files as the format changed a bit * More tuning * Starting work to get new tldraw/tldraw working. * Added example tldr files to vscode package * Removed old editor package * Have onChange working with latest fix. Back to iframed for a few mom * Fixed up .tldr files * Have iframe free extension working, but requiring hand crafted building * ... * Better handling of empty .tldr files. Still an issue with freshly created files trying to save as .js or .json * Thoroughly added comments for the extension code. Need to add diagrams though and now will document/comment/diagram the editor src code * Added comments to all of the editor side of the VS Code Extension. Also cleaned up the code * More cleanup of VS Code Extension code and have script automating generating the initial webview's html content from the cra editor static build * Tweaks to watch logic * Improved scripts for publishing to VS Code Marketplace * Improved name * Made the smiley angry * Reverted * Turned smiley mad * Turned smiley mad * Made smiley sad * Have a lot of plumbing working for Github codespaces and github.dev support * Imported new tldraw vs code extension code. Added instructions for workflows * Quick fix * Fix for corrupted arrows files * Updated editor build step to new location * Merge branch 'main' into vscode-extension-v1, add local file updating * Update App.tsx * Cleanup, bumped to 0.0.124 @tldraw/tdlraw and published a 0.10.0 version of hte extension * Added Trello/Kanban style file * Finished video * brings up to date * Fix scripts * Update README.md * Update .babelrc Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-06 16:49:53 +00:00
{
"name": "New Document",
"fileHandle": {},
"document": {
"id": "doc",
"name": "New Document",
Create VS Code Extension (#4) * Start of vscode extension. Current code is copy/paste from custom editor samples from Microsoft. We need to evaluate if using their text based customer editor or full on new custom editor is the way to go * Not sure how I missed these files. Adding them * Have a custom editor triggering off of .tldr files. Added gitignores for generated folder. Have iframed tldraw loading and security policies set to do so * Can now load a .tldr file. No saving support yet. Load times are slow, mostly from editor loading up I think * Have temporary solution for saving working now too. * Missed af ile * Backing up progress in syncing tldraw editor history changes * Removed console * ... * ... * Cleanup * Have save working well now. * Moved extension into 'integrations' folder * Trying out WebviewPanelOptions.retainContextWhenHidden=true and it's looking promising * Some cleanup * Trying out new @tldraw/editor module * Have prototype loading using new embedded editor * ... * Shaved off 1 second from editor loadtime * Got save working again. Had to manually fixuppreviously created .tldr files as the format changed a bit * More tuning * Starting work to get new tldraw/tldraw working. * Added example tldr files to vscode package * Removed old editor package * Have onChange working with latest fix. Back to iframed for a few mom * Fixed up .tldr files * Have iframe free extension working, but requiring hand crafted building * ... * Better handling of empty .tldr files. Still an issue with freshly created files trying to save as .js or .json * Thoroughly added comments for the extension code. Need to add diagrams though and now will document/comment/diagram the editor src code * Added comments to all of the editor side of the VS Code Extension. Also cleaned up the code * More cleanup of VS Code Extension code and have script automating generating the initial webview's html content from the cra editor static build * Tweaks to watch logic * Improved scripts for publishing to VS Code Marketplace * Improved name * Made the smiley angry * Reverted * Turned smiley mad * Turned smiley mad * Made smiley sad * Have a lot of plumbing working for Github codespaces and github.dev support * Imported new tldraw vs code extension code. Added instructions for workflows * Quick fix * Fix for corrupted arrows files * Updated editor build step to new location * Merge branch 'main' into vscode-extension-v1, add local file updating * Update App.tsx * Cleanup, bumped to 0.0.124 @tldraw/tdlraw and published a 0.10.0 version of hte extension * Added Trello/Kanban style file * Finished video * brings up to date * Fix scripts * Update README.md * Update .babelrc Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-06 16:49:53 +00:00
"version": 13,
"pages": {
"page": {
"id": "page",
"name": "Page 1",
"childIndex": 1,
"shapes": {
"60a83a6a-6477-45ff-3cd9-5c705c210c3a": {
"id": "60a83a6a-6477-45ff-3cd9-5c705c210c3a",
"type": "draw",
"name": "Draw",
"parentId": "page",
"childIndex": 1,
"point": [
268.18,
247.52
Create VS Code Extension (#4) * Start of vscode extension. Current code is copy/paste from custom editor samples from Microsoft. We need to evaluate if using their text based customer editor or full on new custom editor is the way to go * Not sure how I missed these files. Adding them * Have a custom editor triggering off of .tldr files. Added gitignores for generated folder. Have iframed tldraw loading and security policies set to do so * Can now load a .tldr file. No saving support yet. Load times are slow, mostly from editor loading up I think * Have temporary solution for saving working now too. * Missed af ile * Backing up progress in syncing tldraw editor history changes * Removed console * ... * ... * Cleanup * Have save working well now. * Moved extension into 'integrations' folder * Trying out WebviewPanelOptions.retainContextWhenHidden=true and it's looking promising * Some cleanup * Trying out new @tldraw/editor module * Have prototype loading using new embedded editor * ... * Shaved off 1 second from editor loadtime * Got save working again. Had to manually fixuppreviously created .tldr files as the format changed a bit * More tuning * Starting work to get new tldraw/tldraw working. * Added example tldr files to vscode package * Removed old editor package * Have onChange working with latest fix. Back to iframed for a few mom * Fixed up .tldr files * Have iframe free extension working, but requiring hand crafted building * ... * Better handling of empty .tldr files. Still an issue with freshly created files trying to save as .js or .json * Thoroughly added comments for the extension code. Need to add diagrams though and now will document/comment/diagram the editor src code * Added comments to all of the editor side of the VS Code Extension. Also cleaned up the code * More cleanup of VS Code Extension code and have script automating generating the initial webview's html content from the cra editor static build * Tweaks to watch logic * Improved scripts for publishing to VS Code Marketplace * Improved name * Made the smiley angry * Reverted * Turned smiley mad * Turned smiley mad * Made smiley sad * Have a lot of plumbing working for Github codespaces and github.dev support * Imported new tldraw vs code extension code. Added instructions for workflows * Quick fix * Fix for corrupted arrows files * Updated editor build step to new location * Merge branch 'main' into vscode-extension-v1, add local file updating * Update App.tsx * Cleanup, bumped to 0.0.124 @tldraw/tdlraw and published a 0.10.0 version of hte extension * Added Trello/Kanban style file * Finished video * brings up to date * Fix scripts * Update README.md * Update .babelrc Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-06 16:49:53 +00:00
],
"rotation": 0,
"style": {
"color": "black",
"size": "large",
"isFilled": false,
"dash": "draw"
},
"points": [
[
0,
52.7,
0.5
],
[
0.13,
52.84,
0.5
],
[
3.52,
52.84,
0.5
],
[
7.92,
52.84,
0.5
],
[
15.31,
52.84,
0.5
],
[
21.36,
51.75,
0.5
],
[
29.47,
49.7,
0.5
],
[
37.15,
46.05,
0.5
],
[
45.79,
41.73,
0.5
],
[
52.8,
38.24,
0.5
],
[
58.99,
33.97,
0.5
],
[
62.97,
30.31,
0.5
],
[
67.09,
22.39,
0.5
],
[
67.69,
18.33,
0.5
],
[
68,
12.74,
0.5
],
[
68,
10.09,
0.5
],
[
66.16,
5.89,
0.5
],
[
62.82,
3.46,
0.5
],
[
59.09,
1.82,
0.5
],
[
54.8,
0.32,
0.5
],
[
50.88,
0,
0.5
],
[
48.22,
1.4210854715202004e-14,
0.5
],
[
45.85,
1.15000000000002,
0.5
],
[
44.96,
5.100000000000016,
0.5
],
[
44.61,
12.610000000000014,
0.5
],
[
44.61,
22.87000000000002,
0.5
],
[
44.61,
40.65000000000002,
0.5
],
[
44.61,
52.83000000000002,
0.5
],
[
44.61,
74.87000000000002,
0.5
],
[
48.07,
93.28000000000002,
0.5
],
[
51.16,
106.48000000000002,
0.5
],
[
55.96,
129.24,
0.5
],
[
56.48,
142.85000000000002,
0.5
],
[
54.22,
153.35000000000002,
0.5
],
[
48.41,
160.48000000000002,
0.5
],
[
39.35,
164.79000000000002,
0.5
],
[
29.17,
165.25,
0.5
],
[
20.42,
164.45000000000002,
0.5
],
[
14.19,
159.81,
0.5
],
[
8.95,
152.96000000000004,
0.5
],
[
6.37,
146.16000000000003,
0.5
],
[
5.96,
134.95000000000002,
0.5
],
[
8.89,
124.33000000000001,
0.5
],
[
20.38,
111.74000000000001,
0.5
],
[
36.82,
100.57000000000002,
0.5
],
[
56.64,
90.02000000000001,
0.5
],
[
78.06,
78.35000000000002,
0.5
],
[
89.74,
70.75000000000001,
0.5
],
[
100.34,
61.68000000000002,
0.5
],
[
105.51,
53.48000000000002,
0.5
],
[
107.1,
45.490000000000016,
0.5
],
[
107.1,
38.750000000000014,
0.5
],
[
104.94,
33.73000000000002,
0.5
],
[
103.78,
32.29000000000002,
0.5
],
[
102.13,
31.020000000000017,
0.5
],
[
101.84,
30.87000000000002,
0.5
],
[
101.49,
31.790000000000017,
0.5
],
[
101.17,
38.04000000000002,
0.5
],
[
100.76,
47.58000000000002,
0.5
],
[
99,
66.05000000000001,
0.5
],
[
98.08,
77.33000000000001,
0.5
],
[
97.59,
89.22000000000003,
0.5
],
[
97.59,
101.08000000000001,
0.5
],
[
97.59,
109.85000000000002,
0.5
],
[
99.32,
115.17000000000002,
0.5
],
[
101.97,
119.49000000000002,
0.5
],
[
104.27,
122.43000000000002,
0.5
],
[
108.42,
124.10000000000002,
0.5
],
[
112.36,
124.10000000000002,
0.5
],
[
117.77,
120.96000000000002,
0.5
],
[
123.7,
113.29000000000002,
0.5
],
[
129.05,
103.90000000000002,
0.5
],
[
132.64,
94.09000000000002,
0.5
],
[
133.82,
86.70000000000002,
0.5
],
[
133.82,
82.64000000000001,
0.5
],
[
132.32,
78.95000000000002,
0.5
],
[
130.46,
78.48000000000002,
0.5
],
[
128.62,
78.48000000000002,
0.5
],
[
126.02,
80.21000000000002,
0.5
],
[
124.75,
84.70000000000002,
0.5
],
[
124.4,
90.23000000000002,
0.5
],
[
124.4,
97.56000000000002,
0.5
],
[
124.4,
104.29000000000002,
0.5
],
[
127.34,
109.91000000000003,
0.5
],
[
129.95,
112.26000000000002,
0.5
],
[
134.75,
114.79000000000002,
0.5
],
[
139.73,
115.11000000000001,
0.5
],
[
148.71,
110.61000000000001,
0.5
],
[
154.63,
103.39000000000001,
0.5
],
[
164.71,
87.14000000000001,
0.5
],
[
168.65,
74.91000000000003,
0.5
],
[
170.72,
60.40000000000002,
0.5
],
[
171.24,
45.890000000000015,
0.5
],
[
171.24,
35.62000000000002,
0.5
],
[
168.68,
28.80000000000002,
0.5
],
[
167.9,
27.500000000000018,
0.5
],
[
167.15,
25.87000000000002,
0.5
],
[
167.01,
25.87000000000002,
0.5
],
[
167.01,
28.71000000000002,
0.5
],
[
167.01,
39.33000000000002,
0.5
],
[
167.01,
53.890000000000015,
0.5
],
[
167.93,
65.17000000000002,
0.5
],
[
169.94,
78.78000000000002,
0.5
],
[
172.08,
88.18,
0.5
],
[
173.7,
92.67000000000002,
0.5
],
[
175.89,
96.87000000000002,
0.5
],
[
178.82,
99.18,
0.5
],
[
181.84,
99.18,
0.5
],
[
184.49,
96.29000000000002,
0.5
],
[
189.09,
85.41000000000003,
0.5
],
[
191.96,
74.21000000000002,
0.5
],
[
195.5,
54.350000000000016,
0.5
],
[
197.4,
42.12000000000002,
0.5
],
[
198.98,
26.650000000000016,
0.5
],
[
199.78,
18.08000000000002,
0.5
],
[
200.13,
11.310000000000016,
0.5
],
[
200.13,
8.100000000000016,
0.5
],
[
200.13,
7.960000000000015,
0.5
],
[
200.13,
13.40000000000002,
0.5
],
[
200.13,
20.880000000000017,
0.5
],
[
199.15,
33.490000000000016,
0.5
],
[
198.63,
47.990000000000016,
0.5
],
[
198.63,
62.500000000000014,
0.5
],
[
198.63,
74.38000000000002,
0.5
],
[
198.63,
84.57000000000002,
0.5
],
[
200.24,
89.06000000000002,
0.5
],
[
202.34,
92.71000000000001,
0.5
],
[
205.37,
94.09000000000002,
0.5
],
[
208.82,
94.09000000000002,
0.5
],
[
213.66,
91.21000000000001,
0.5
],
[
220.56,
84.25000000000001,
0.5
],
[
227.93,
75.50000000000001,
0.5
],
[
233.45,
65.37000000000002,
0.5
],
[
235.86,
59.38000000000002,
0.5
],
[
237.24,
53.84000000000002,
0.5
],
[
237.24,
51.19000000000002,
0.5
],
[
236.9,
50.09000000000002,
0.5
],
[
234.67,
49.570000000000014,
0.5
],
[
232.08,
50.09000000000002,
0.5
],
[
228.75,
57.54000000000002,
0.5
],
[
228,
60.890000000000015,
0.5
],
[
227.26,
70.96000000000002,
0.5
],
[
227.26,
77.66000000000003,
0.5
],
[
229.33,
82.84000000000002,
0.5
],
[
232.81,
85.69000000000003,
0.5
],
[
237.24,
86.96000000000001,
0.5
],
[
243.37,
86.96000000000001,
0.5
],
[
249.36,
83.10000000000002,
0.5
],
[
253.78,
76.25000000000001,
0.5
],
[
256.24,
67.50000000000001,
0.5
],
[
256.24,
58.01000000000002,
0.5
],
[
254.74,
50.610000000000014,
0.5
],
[
250.43,
45.920000000000016,
0.5
],
[
245.25,
43.850000000000016,
0.5
],
[
239.18,
43.850000000000016,
0.5
],
[
233.05,
44.22000000000001,
0.5
],
[
229.61,
46.97000000000001,
0.5
],
[
226.55,
49.990000000000016,
0.5
],
[
224.69,
53.58000000000002,
0.5
]
],
"isComplete": true
},
"983edee8-07e8-4d06-37ef-8244cd661c4a": {
"id": "983edee8-07e8-4d06-37ef-8244cd661c4a",
"type": "draw",
"name": "Draw",
"parentId": "page",
"childIndex": 2,
"point": [
553.77,
248.23
],
"rotation": 0,
"style": {
"color": "black",
"size": "large",
"isFilled": false,
"dash": "draw"
},
"points": [
[
10.69,
0.14,
0.5
],
[
10.69,
0,
0.5
],
[
10.69,
0.65,
0.5
],
[
8.88,
9,
0.5
],
[
6.21,
15.94,
0.5
],
[
4.84,
21.4,
0.5
],
[
0,
51.82,
0.5
],
[
5.5067062021407764e-14,
59.930000000000014,
0.5
],
[
5.5067062021407764e-14,
65.52000000000001,
0.5
],
[
5.5067062021407764e-14,
70.61000000000001,
0.5
]
],
"isComplete": true
},
"6104b61b-45cb-4425-2c60-79a43467fbd7": {
"id": "6104b61b-45cb-4425-2c60-79a43467fbd7",
"type": "draw",
"name": "Draw",
"parentId": "page",
"childIndex": 3,
"point": [
551.74,
346.04,
0.5
],
"rotation": 0,
"style": {
"color": "black",
"size": "large",
"isFilled": false,
"dash": "draw"
},
"points": [],
"isComplete": true
},
"3a0ccf5e-8e12-4780-38ff-1cdc9c1ed0e3": {
"id": "3a0ccf5e-8e12-4780-38ff-1cdc9c1ed0e3",
"type": "draw",
"name": "Draw",
"parentId": "page",
"childIndex": 4,
"point": [
456.82,
377.32,
0.5
],
"rotation": 0,
"style": {
"color": "black",
"size": "small",
"isFilled": false,
"dash": "draw"
},
"points": [],
"isComplete": true
},
"efc863d7-6489-4142-32f8-9534fdceaa2b": {
"id": "efc863d7-6489-4142-32f8-9534fdceaa2b",
"type": "draw",
"name": "Draw",
"parentId": "page",
"childIndex": 5,
"point": [
488.26,
369.22,
0.5
],
"rotation": 0,
"style": {
"color": "black",
"size": "small",
"isFilled": false,
"dash": "draw"
},
"points": [],
"isComplete": true
},
"250460f4-f56e-4c2f-23ba-91bd98303837": {
"id": "250460f4-f56e-4c2f-23ba-91bd98303837",
"type": "draw",
"name": "Draw",
"parentId": "page",
"childIndex": 6,
"point": [
460.44,
374.14
],
"rotation": 0,
"style": {
"color": "black",
"size": "small",
"isFilled": false,
"dash": "draw"
},
"points": [
[
0,
14.37,
0.5
],
[
0.73,
15.7,
0.5
],
[
1.54,
16.05,
0.5
],
[
2.53,
16.89,
0.5
],
[
3.98,
17.24,
0.5
],
[
6.01,
17.46,
0.5
],
[
8.57,
17.46,
0.5
],
[
11.21,
17.46,
0.5
],
[
15.42,
17.46,
0.5
],
[
19.63,
17.19,
0.5
],
[
24.02,
14.71,
0.5
],
[
28,
11.3,
0.5
],
[
30.3,
8.51,
0.5
],
[
33.21,
3.9,
0.5
],
[
34.4,
1.92,
0.5
],
[
34.88,
0.75,
0.5
],
[
35.14,
0.22,
0.5
],
[
35.14,
0.11,
0.5
],
[
35.14,
0,
0.5
],
[
35.24,
5.329070518200751e-15,
0.5
]
],
"isComplete": true
}
},
"bindings": {}
}
},
"pageStates": {
"page": {
"id": "page",
"selectedIds": [],
"camera": {
"point": [
-219.13,
-220.86
],
"zoom": 2.462934947049924
}
Create VS Code Extension (#4) * Start of vscode extension. Current code is copy/paste from custom editor samples from Microsoft. We need to evaluate if using their text based customer editor or full on new custom editor is the way to go * Not sure how I missed these files. Adding them * Have a custom editor triggering off of .tldr files. Added gitignores for generated folder. Have iframed tldraw loading and security policies set to do so * Can now load a .tldr file. No saving support yet. Load times are slow, mostly from editor loading up I think * Have temporary solution for saving working now too. * Missed af ile * Backing up progress in syncing tldraw editor history changes * Removed console * ... * ... * Cleanup * Have save working well now. * Moved extension into 'integrations' folder * Trying out WebviewPanelOptions.retainContextWhenHidden=true and it's looking promising * Some cleanup * Trying out new @tldraw/editor module * Have prototype loading using new embedded editor * ... * Shaved off 1 second from editor loadtime * Got save working again. Had to manually fixuppreviously created .tldr files as the format changed a bit * More tuning * Starting work to get new tldraw/tldraw working. * Added example tldr files to vscode package * Removed old editor package * Have onChange working with latest fix. Back to iframed for a few mom * Fixed up .tldr files * Have iframe free extension working, but requiring hand crafted building * ... * Better handling of empty .tldr files. Still an issue with freshly created files trying to save as .js or .json * Thoroughly added comments for the extension code. Need to add diagrams though and now will document/comment/diagram the editor src code * Added comments to all of the editor side of the VS Code Extension. Also cleaned up the code * More cleanup of VS Code Extension code and have script automating generating the initial webview's html content from the cra editor static build * Tweaks to watch logic * Improved scripts for publishing to VS Code Marketplace * Improved name * Made the smiley angry * Reverted * Turned smiley mad * Turned smiley mad * Made smiley sad * Have a lot of plumbing working for Github codespaces and github.dev support * Imported new tldraw vs code extension code. Added instructions for workflows * Quick fix * Fix for corrupted arrows files * Updated editor build step to new location * Merge branch 'main' into vscode-extension-v1, add local file updating * Update App.tsx * Cleanup, bumped to 0.0.124 @tldraw/tdlraw and published a 0.10.0 version of hte extension * Added Trello/Kanban style file * Finished video * brings up to date * Fix scripts * Update README.md * Update .babelrc Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-06 16:49:53 +00:00
}
}
},
"assets": {}
}