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

1026 lines
23 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",
"version": 13,
"pages": {
"page": {
"id": "page",
"name": "Page 1",
"childIndex": 1,
"shapes": {
"d8f1475a-d37a-402c-3669-01944f9b84e8": {
"id": "d8f1475a-d37a-402c-3669-01944f9b84e8",
"type": "draw",
"name": "Draw",
"parentId": "page",
"childIndex": 1,
"point": [
313.77,
287.84
],
"rotation": 0,
"style": {
"color": "black",
"size": "large",
"isFilled": false,
"dash": "draw"
},
"points": [
[
0,
38.91,
0.5
],
[
0,
37.08,
0.5
],
[
0,
35.36,
0.5
],
[
6.19,
25.33,
0.5
],
[
12.4,
17.21,
0.5
],
[
20.18,
9.42,
0.5
],
[
26.19,
4.98,
0.5
],
[
32.68,
1.73,
0.5
],
[
40.09,
0,
0.5
],
[
48.14,
0,
0.5
],
[
56.18,
0,
0.5
],
[
63.05,
2.1599999999999966,
0.5
],
[
70.5,
8.429999999999996,
0.5
],
[
74.77,
15.179999999999996,
0.5
],
[
76.5,
23.619999999999997,
0.5
],
[
76.5,
38.91,
0.5
],
[
68.56,
58.839999999999996,
0.5
],
[
57.59,
75.91,
0.5
],
[
42.45,
97.68,
0.5
],
[
30.36,
115.05,
0.5
],
[
25.65,
122.03,
0.5
],
[
21.21,
128.03,
0.5
],
[
19.68,
130.31,
0.5
],
[
19.13,
131.13,
0.5
],
[
19.13,
131.41,
0.5
],
[
21.29,
129.5,
0.5
],
[
25.29,
126.02,
0.5
],
[
32.08,
122.03,
0.5
],
[
41.43,
118.28999999999999,
0.5
],
[
52.94,
116.24,
0.5
],
[
64.4,
115.53999999999999,
0.5
],
[
76.53,
115.53999999999999,
0.5
],
[
86.91,
115.53999999999999,
0.5
],
[
97.28,
117.47999999999999,
0.5
],
[
104.2,
118.56,
0.5
],
[
111.61,
120.28999999999999,
0.5
],
[
115.79,
121.21,
0.5
],
[
118.34,
121.97,
0.5
],
[
118.89,
122.24,
0.5
],
[
119.16,
122.24,
0.5
]
],
"isComplete": true
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
},
"4a8c1095-335e-42d6-30c9-ff4171dd364e": {
"id": "4a8c1095-335e-42d6-30c9-ff4171dd364e",
"type": "draw",
"name": "Draw",
"parentId": "page",
"childIndex": 2,
"point": [
239.55,
166.36
],
"rotation": 0.0759349816929582,
"style": {
"color": "black",
"size": "large",
"isFilled": false,
"dash": "draw"
},
"points": [
[
72.8938650204388,
14.590000000000002,
0.5
],
[
68.8781905397514,
19.51,
0.5
],
[
61.84336030699925,
27.34,
0.5
],
[
54.16720613998498,
35.12,
0.5
],
[
44.458548427463086,
44.24,
0.5
],
[
23.92631600900976,
62.11,
0.5
],
[
17.207214482355887,
67.74,
0.5
],
[
8.31747810127638,
73.53,
0.5
],
[
3.7196788187202796,
77.64,
0.5
],
[
1.4701117877700842,
79.15,
0.5
],
[
0.552525235671978,
79.75,
0.5
],
[
0,
80.29,
0.5
],
[
0,
80.57,
0.5
],
[
1.9338383248519229,
80.57,
0.5
],
[
7.547889380161841,
80.57,
0.5
],
[
15.756835738716942,
81.75,
0.5
],
[
26.99480437140235,
83.09,
0.5
],
[
40.689536998414944,
83.09,
0.5
],
[
51.35524735129723,
83.09,
0.5
],
[
62.71161424876949,
83.09,
0.5
],
[
70.9205606073246,
83.09,
0.5
],
[
76.5346116626345,
83.09,
0.5
],
[
80.6292183198465,
83.09,
0.5
],
[
82.98731709351797,
83.09,
0.5
],
[
84.26996496204221,
83.41,
0.5
],
[
84.81262367564861,
83.41,
0.5
],
[
85.07901977141903,
83.41,
0.5
],
[
84.32916409443563,
82.04,
0.5
],
[
82.82945274046884,
77.05,
0.5
],
[
80.68841745223992,
70.45,
0.5
],
[
78.12312171519146,
60.059999999999995,
0.5
],
[
75.83408859597897,
44.82,
0.5
],
[
75.02503378660215,
28.34,
0.5
],
[
75.02503378660215,
16.24,
0.5
],
[
74.38370985234003,
6.879999999999999,
0.5
],
[
74.38370985234003,
2.73,
0.5
],
[
74.00878201384833,
0.93,
0.5
],
[
74.00878201384833,
0,
0.5
],
[
74.22584549929091,
3.552713678800501e-15,
0.5
],
[
78.34018520063404,
0.9100000000000037,
0.5
],
[
84.84222324184536,
1.9900000000000038,
0.5
],
[
97.31350713272714,
2.690000000000003,
0.5
],
[
113.48473679819806,
3.450000000000003,
0.5
],
[
133.957770084258,
3.450000000000003,
0.5
],
[
157.27236172520233,
3.450000000000003,
0.5
],
[
177.74539501126222,
3.450000000000003,
0.5
],
[
195.16967297906066,
3.450000000000003,
0.5
],
[
204.61193459581213,
3.450000000000003,
0.5
],
[
212.92941269708854,
2.9000000000000044,
0.5
],
[
217.0240193543005,
2.9000000000000044,
0.5
],
[
219.05652289980813,
2.9000000000000044,
0.5
],
[
219.58931509134896,
2.9000000000000044,
0.5
],
[
219.86557770918498,
2.9000000000000044,
0.5
],
[
219.86557770918498,
3.780000000000003,
0.5
],
[
219.86557770918498,
7.930000000000003,
0.5
],
[
219.86557770918498,
16.260000000000005,
0.5
],
[
219.86557770918498,
28.90000000000001,
0.5
],
[
219.86557770918498,
44.03,
0.5
],
[
220.6055668641028,
57.87,
0.5
],
[
222.1447443063319,
74.34,
0.5
],
[
223.69378827062653,
90.82000000000001,
0.5
],
[
225.34149745557687,
110.10000000000001,
0.5
],
[
227.82786101610077,
139.69,
0.5
],
[
229.58410194377242,
161.95000000000002,
0.5
],
[
231.27127721698508,
182.52,
0.5
],
[
232.07046550429635,
201.8,
0.5
],
[
232.91898640193543,
222.33,
0.5
],
[
233.7181746892467,
240.09,
0.5
],
[
233.7181746892467,
257.88,
0.5
],
[
233.7181746892467,
274.36,
0.5
],
[
234.57656210895138,
293.6,
0.5
],
[
234.57656210895138,
311.41999999999996,
0.5
],
[
235.10935430049219,
320.99,
0.5
],
[
235.8000108450822,
331.47,
0.5
],
[
236.2736039042296,
337.14,
0.5
],
[
236.2736039042296,
339.52,
0.5
],
[
236.54000000000002,
340.45000000000005,
0.5
],
[
236.54000000000002,
341,
0.5
],
[
236.54000000000002,
341.27,
0.5
],
[
236.32293651455745,
341.27,
0.5
],
[
232.19873029114876,
341.27,
0.5
],
[
222.96366563777426,
341.27,
0.5
],
[
210.4825152248269,
343.37,
0.5
],
[
195.5643338616835,
346.39,
0.5
],
[
177.97232501877033,
348.82000000000005,
0.5
],
[
160.38031617585716,
350.42999999999995,
0.5
],
[
142.857372987403,
351.23,
0.5
],
[
122.38433970134314,
352.1,
0.5
],
[
101.91130641528324,
352.1,
0.5
],
[
85.66114457328774,
352.90999999999997,
0.5
],
[
74.99543422040544,
353.45000000000005,
0.5
],
[
65.76036956703096,
354.09000000000003,
0.5
],
[
60.146318511721056,
354.63,
0.5
],
[
57.79808626011515,
355.06000000000006,
0.5
],
[
56.39704012680406,
355.06000000000006,
0.5
],
[
56.13064403103365,
355.06000000000006,
0.5
],
[
55.88398097939437,
355.06000000000006,
0.5
],
[
55.65705097188623,
355.06000000000006,
0.5
],
[
55.420254442312526,
355.06000000000006,
0.5
],
[
55.420254442312526,
354.83000000000004,
0.5
],
[
55.420254442312526,
354.28,
0.5
],
[
55.420254442312526,
352.58000000000004,
0.5
],
[
55.420254442312526,
351.91999999999996,
0.5
],
[
53.14108784516562,
345.85,
0.5
],
[
51.64137649119882,
340.86,
0.5
],
[
49.766737298740324,
331.5,
0.5
],
[
47.94143071660968,
322.14,
0.5
],
[
46.65878284808544,
311.76,
0.5
],
[
44.68547843497124,
300.24,
0.5
],
[
43.560694919496136,
292.61,
0.5
],
[
41.47885876366065,
281.25,
0.5
],
[
38.07490865103865,
269.57,
0.5
],
[
36.46666555435057,
263.65999999999997,
0.5
],
[
34.21709852340037,
256.25,
0.5
],
[
32.07606323517146,
249.75,
0.5
],
[
30.477686660548947,
243.28,
0.5
],
[
28.020922666221765,
233.93,
0.5
],
[
26.146283473763262,
224.57,
0.5
],
[
24.86363560523903,
214.25,
0.5
],
[
22.84099858179697,
202.72999999999996,
0.5
],
[
20.759162425961478,
191.43,
0.5
],
[
18.04586885792944,
181.42000000000002,
0.5
],
[
15.579238341536684,
172.06,
0.5
],
[
13.467802619504488,
165.54,
0.5
],
[
10.053985984816912,
154.01,
0.5
],
[
7.912950696587994,
147.51,
0.5
],
[
6.788167181112896,
140.09,
0.5
],
[
6.255374989572053,
133.62,
0.5
],
[
5.712716275965649,
127.13,
0.5
],
[
5.712716275965649,
122.97,
0.5
],
[
5.712716275965649,
120.09,
0.5
],
[
5.712716275965649,
118.77000000000002,
0.5
],
[
5.712716275965649,
118.22,
0.5
],
[
5.712716275965649,
117.94,
0.5
],
[
5.712716275965649,
117.69999999999999,
0.5
],
[
5.712716275965649,
117.45,
0.5
],
[
5.712716275965649,
114.57000000000001,
0.5
],
[
5.712716275965649,
109.69999999999999,
0.5
],
[
5.712716275965649,
101.36,
0.5
],
[
5.712716275965649,
96.37,
0.5
],
[
5.712716275965649,
92.81,
0.5
],
[
5.712716275965649,
90.52,
0.5
],
[
5.712716275965649,
89.97,
0.5
],
[
5.712716275965649,
89.68999999999998,
0.5
],
[
5.712716275965649,
89.46000000000001,
0.5
],
[
6.2060423792442005,
89.46000000000001,
0.5
]
],
"isComplete": true
},
"9fa6dcc1-3d5e-4b7b-1afd-e9f5dd8742aa": {
"id": "9fa6dcc1-3d5e-4b7b-1afd-e9f5dd8742aa",
"type": "text",
"name": "Text",
"parentId": "page",
"childIndex": 3,
"point": [
509.18,
262.72
],
"rotation": 0,
"text": "Save files!",
"style": {
"color": "black",
"size": "large",
"isFilled": false,
"dash": "draw"
}
}
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
},
"bindings": {}
}
},
"pageStates": {
"page": {
"id": "page",
"selectedIds": [
"9fa6dcc1-3d5e-4b7b-1afd-e9f5dd8742aa"
],
"camera": {
"point": [
-130.08,
-111.66
],
"zoom": 1.1462851349067762
}
}
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": {}
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
}