-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
529 lines (486 loc) · 27.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
<!--
WebChucK IDE, written by Terry Feng
Date: Spring 2023
Special thanks to: Celeste Betancur, Mike Mulshine, Jack Atherton, Chris Chafe, and Ge Wang
-->
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-C31LKZFZ45"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-C31LKZFZ45');
</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- TITLE -->
<title>WebChucK IDE</title>
<meta property="og:description"
content="A web-based integrated development environment (IDE) for ChucK, a programming language for real-time sound synthesis and music creation! It's fun and easy to learn, and offers composers, researchers, and performers a powerful and accessible programming tool for building, experimenting, and sharing complex audio synthesis/analysis programs and real-time interactive music.">
<meta property="og:title" content="WebChucK IDE" />
<meta property="og:url" content="https://chuck.stanford.edu/ide/" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://ccrma.stanford.edu/~tzfeng/webchuck-ide/img/webchuck-ide.jpg" />
<meta property="fb:app_id" content="966242223397117" /> <!--default app id-->
<meta name="keywords"
content="ChucK, WebChucK, IDE, CCRMA, Stanford University, Princeton University, computer music, programming language">
<!-- FAVICON -->
<link rel="apple-touch-icon" sizes="180x180" href="/favicon_io/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon_io/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon_io/favicon-16x16.png">
<link rel="manifest" href="./favicon_io/site.webmanifest">
<link rel="stylesheet" href="./src/styles/index.css" />
<script>
// Set color theme
if (localStorage.theme === "dark") {
document.documentElement.classList.add("dark");
} else {
document.documentElement.classList.remove("dark");
}
</script>
</head>
<body class="h-full w-full">
<!-- WEBCHUCK IDE -->
<div id="webchuck-ide" class="grid w-full h-screen bg-sky-blue dark:bg-dark
text-base text-dark dark:text-light">
<!-- NAVBAR -->
<div id="navbarWrapper" class="w-full relative">
<nav id="navbar" class="flex h-full items-center justify-between md:px-2 px-4 overflow-x-auto">
<!-- Left -->
<div class="flex justify-left items-center">
<!-- ChucK Logo -->
<a href="https://chuck.stanford.edu" class="w-10 md:w-8" target="_blank">
<img src="img/ChonK.svg" class="h-10 md:h-8" alt="ChucK Logo" />
</a>
<!-- Nav Items -->
<div id="menuItems" class="text-dark dark:text-gray-300 w-full px-2 flex items-center">
<!-- File -->
<div id="fileContainer" class="inline-block">
<button id="fileButton" type="button" data-dropdown-toggle="dropdownNavbar" class="dropdownButton">
File
<svg class="w-2.5 h-2.5 ml-1.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m1 1 4 4 4-4"/>
</svg>
</button>
<div id="fileDropdown" class="hidden dropdown w-40">
<ul class="py-2 text-base text-gray-700 dark:text-light" aria-labelledby="dropdownDefaultButton">
<li>
<button id="newFile" type="button" class="dropdownItem">
New
</button>
</li>
<li>
<input id="fileUploader" type="file" multiple hidden />
<button id="uploadFiles" type="button" class="dropdownItem disabled:opacity-50" disabled>
Upload Files
</button>
</li>
<li>
<button id="newProject" type="button" class="dropdownItem">
New Project
</button>
</li>
<li id="exportToContainer" class="relative">
<button id="exportToButton" type="button" class="dropdownItem nestedDropdownButton">
Export to
<svg class="w-2.5 h-2.5 ml-3 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
<path stroke="currentColor" stroke-linecap="" stroke-linejoin="round" stroke-width="1.5" d="m1 9 4-4-4-4"/>
</svg>
</button>
<div id="exportToDropdown" class="nestedDropdown w-36 hidden">
<ul class="py-2 text-base text-gray-700 dark:text-gray-200">
<li>
<button id="exportChuck" type="button" class="dropdownItem">
ChucK
</button>
</li>
<li>
<button id="exportWebchuck" type="button" class="dropdownItem">
WebChucK
</button>
</li>
</ul>
</div>
</li>
<li>
<button id="openSettings" type="button" class="dropdownItem">
Settings
</button>
</li>
</ul>
</div>
</div>
<!-- Edit -->
<div id="editContainer" class="inline-block">
<button id="editButton" type="button" data-dropdown-toggle="dropdownNavbar" class="dropdownButton">
Edit
<svg class="w-2.5 h-2.5 ml-1.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m1 1 4 4 4-4"/>
</svg>
</button>
<div id="editDropdown" class="hidden dropdown w-40">
<ul class="py-2 text-base text-gray-700 dark:text-gray-200" aria-labelledby="dropdownDefaultButton">
<li>
<button id="vimToggle" type="button" class="dropdownItem">
Vim Mode: Off
</button>
</li>
</ul>
</div>
</div>
<!-- View -->
<div id="viewContainer" class="inline-block">
<button id="viewButton" type="button" data-dropdown-toggle="dropdownNavbar" class="dropdownButton">
View
<svg class="w-2.5 h-2.5 ml-1.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m1 1 4 4 4-4"/>
</svg>
</button>
<div id="viewDropdown" class="hidden dropdown w-40">
<ul class="py-2 text-base text-gray-700 dark:text-gray-200" aria-labelledby="dropdownDefaultButton">
<li>
<button id="chuckNowToggle" type="button" class="dropdownItem">
ChucK Time: Off
</button>
</li>
<li class="divider dark:border-t-gray-400" data-content="THEME"></li>
<li>
<button id="darkModeToggle" type="button" class="dropdownItem disabled:opacity-50">
Mode: Light
</button>
</li>
<li>
<button id="colorPreferenceToggle" type="button" class="dropdownItem">
System: On
</button>
</li>
</ul>
</div>
</div>
<!-- Examples -->
<div id="examplesContainer" class="inline-block">
<button id="examplesButton" type="button" data-dropdown-toggle="dropdownNavbar" class="dropdownButton">
Examples
<svg class="w-2.5 h-2.5 ml-1.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m1 1 4 4 4-4"/>
</svg>
</button>
<div id="examplesDropdown" class="hidden dropdown w-48">
<ul id="examplesDropdownContainer" class="py-2 text-base text-gray-700 dark:text-gray-200" aria-labelledby="dropdownDefaultButton">
</ul>
</div>
</div>
<!-- Help -->
<div id="helpContainer" class="inline-block">
<button id="helpButton" type="button" data-dropdown-toggle="dropdownNavbar" class="dropdownButton">
Help
<svg class="w-2.5 h-2.5 ml-1.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m1 1 4 4 4-4"/>
</svg>
</button>
<div id="helpDropdown" class="hidden dropdown w-52">
<ul class="py-2 text-base text-gray-700 dark:text-gray-200" aria-labelledby="dropdownDefaultButton">
<li>
<a href="https://chuck.stanford.edu/doc/reference" target="_blank" class="dropdownItem">ChucK API Reference</a>
</li>
<li>
<a href="https://chuck.stanford.edu/webchuck/" target="_blank" class="dropdownItem">Learn WebChucK</a>
</li>
<li>
<a href="https://discord.gg/ENr3nurrx8" target="_blank" class="dropdownItem">Discord Community</a>
</li>
<li class="divider dark:border-t-gray-400" data-content="GITHUB"></li>
<li>
<a href="https://github.com/ccrma/webchuck-ide" target="_blank" class="dropdownItem">GitHub Repo</a>
</li>
<li>
<a href="https://github.com/ccrma/webchuck-ide/issues/new" target="_blank" class="dropdownItem">Report an Issue</a>
</li>
<li class="divider dark:border-t-gray-400" data-content="ABOUT"></li>
<li>
<button id="about-ide" class="dropdownItem">About IDE...</button>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Right -->
<!-- More Menu Button-->
<div class="flex justify-right items-center text-blue-600 dark:text-blue-200 overflow-none">
<!-- <button id="moreMenu" type="button" class="block text-dark hover:white focus:text-light focus:outline-none">
<svg class="h-7 w-7 fill-current" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="100" height="100" viewBox="0 0 32 32">
<path d="M 16 6 C 14.894531 6 14 6.894531 14 8 C 14 9.105469 14.894531 10 16 10 C 17.105469 10 18 9.105469 18 8 C 18 6.894531 17.105469 6 16 6 Z M 16 14 C 14.894531 14 14 14.894531 14 16 C 14 17.105469 14.894531 18 16 18 C 17.105469 18 18 17.105469 18 16 C 18 14.894531 17.105469 14 16 14 Z M 16 22 C 14.894531 22 14 22.894531 14 24 C 14 25.105469 14.894531 26 16 26 C 17.105469 26 18 25.105469 18 24 C 18 22.894531 17.105469 22 16 22 Z"></path>
</svg>
</button> -->
<button id="shareCode" class="button border-2 border-blue-600 dark:border-blue-200 px-3 py-1 rounded-lg font-medium mr-4">Share</button>
<b class="w-[122px] text-md">WebChucK IDE </b><b><em class="text-3xl">2</em></b>
</div>
</nav>
</div>
<!-- CHUCK BAR -->
<div id="chuck-bar" class="bg-orange-peach dark:bg-dark-4">
<div class="w-full h-full flex justify-between items-center px-2 py-1">
<!-- left side -->
<div id="chuckBarLeft" class="flex justify-left items-center">
<!-- WebChucK Button-->
<button id="webchuckButton" type="button" class="font-semibold bg-orange text-white mr-2 py-2 px-1 max-h-full w-40 md:w-48 2xl:w-64 rounded-md enabled:hover:bg-orange-400 transition-all overflow-hidden truncate disabled:opacity-50" disabled>Loading...</button>
<!-- Chuck Buttons -->
<div class="flex h-full justify-start items-center">
<button id="micButton" type="button" class="chuck-button" title="Enable Microphone" disabled>
<img src="img/mic.svg" alt="Microphone" class="h-11" draggable="false">
</button>
<button id="playButton" type="button" class="chuck-button" disabled>
<img src="img/play.svg" alt="Play" class="h-11" draggable="false">
</button>
<button id="replaceButton" type="button" class="chuck-button" disabled>
<img src="img/replace.svg" alt="Replace" class="h-11" draggable="false">
</button>
<button id="removeButton" type="button" class="chuck-button" disabled>
<img src="img/remove.svg" alt="Remove" class="h-11" draggable="false">
</button>
<button id="recordButton" type="button" class="chuck-button" disabled>
<img id="recordImage" src="img/record-button.svg" alt="Remove" class="h-11" draggable="false">
</button>
</div>
</div>
<!-- right side -->
<div id="chuckBarRight" class="flex justify-right items-center">
<div id="chuckNowStatus" class="pr-2">
<span class="text-orange"><b>now:</b></span>
<span id="chuckNowTime" class="font-mono text-dark-4 dark:text-light text-sm">00:00:00.00000</span>
</div>
</div>
</div>
</div>
<!-- APP -->
<div id="app">
<!-- Left -->
<div id="app-left">
<div id="fileExplorerPanel" class="h-full flex flex-col justify-start">
<div id="fileExplorerHeader" class="header h-8 justify-start flex-none border-b border-dark-d dark:border-dark-a drop-shadow-sm font-bold overflow-hidden whitespace-nowrap">
<div class="px-2">File Explorer</div>
</div>
<div id="fileExplorerContainer">
<div id="fileExplorer" class="absolute w-full h-full overflow-y-auto overflow-x-hidden"></div>
<div id="fileExplorerUploadPrompt" class="opacity-0">
<div class="flex flex-col items-center">
<svg width="2rem" height="2rem" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" >
<path d="M6 20L18 20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M12 16V4M12 4L15.5 7.5M12 4L8.5 7.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round"></path>
</svg>
<div class="text-lg font-bold">Drop files here</div>
<div class="text-sm">to upload</div>
</div>
</div>
</div>
</div>
</div>
<div id="splitV1" class="resizer vSplit"></div>
<!-- Middle -->
<div id="app-middle">
<!-- Editor Panel -->
<div id="editorPanel" class="h-full flex flex-col justify-start">
<!-- Monaco -->
<div id="editorPanelHeader" class="header h-8 justify-start flex-none">
<button id="fileToggle" type="button" class="header-item icon px-1 mr-1">
<svg class="w-6 h-5" viewBox="0 0 30 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path stroke="currentColor" d="M3 0C1.35862 0 0 1.35862 0 3V21C0 22.6414 1.35862 24 3 24H27C28.6414 24 30 22.6414 30 21V6C30 4.35862 28.6414 3 27 3H15L12 0H3ZM3 3H10.7578L13.7578 6H27V21H3V3Z" fill="currentColor"/>
</svg>
</button>
<div id="filename" class="header-item">untitled.ck</div>
</div>
<div id="monacoEditor" style="height: calc(100% - 2rem - 1.75rem - 1px); width: 100%;"></div>
<div id=vimStatus class="border-none bg-gray-200 dark:bg-dark-4 w-full h-7 px-0.5 text-sm items-center flex-none hidden"></div>
</div>
<div id="splitH1" class="resizer hSplit"></div>
<!-- Input Panel -->
<div id="inputPanel" class="flex flex-col dark:bg-dark">
<div id="inputPanelHeader" class="header h-7 justify-start flex-none drop-shadow-sm">
<button id="GUITab" type="button" class="header-item flex items-center justify-center relative">
GUI
<span id="GUIPing" class="animate-ping absolute top-0 right-0 h-2 w-2 rounded-full bg-orange opacity-75 hidden"></span>
</button>
<button id="HIDTab" type="button" class="header-item flex items-center justify-center relative">
HID
<span id="HIDPing" class="animate-ping absolute top-0 right-0 h-2 w-2 rounded-full bg-orange opacity-75 hidden"></span>
</button>
<button id="SensorTab" type="button" class="header-item flex items-center justify-center relative">
SENSOR
<span id="SensorPing" class="animate-ping absolute top-0 right-0 h-2 w-2 rounded-full bg-orange opacity-75 hidden"></span>
</button>
</div>
<div id="GUIContainer" class="dark:bg-dark-2 w-full h-full">
<div id="GUIPanel" class="w-full h-full relative overflow-hidden">
</div>
</div>
<div id="HIDContainer" class="relative dark:bg-dark-2 w-full h-full overflow-auto md:overflow-hidden">
<div id="HIDPanel" class="absolute w-full h-full p-2">
<button id="mouseHIDButton" class="toggle-button w-32" disabled>Mouse: Off</button>
<button id="keyboardHIDButton" class="toggle-button w-32" disabled>Keyboard: Off</button>
<div id="hidLog" class="log-container opacity-50 text-sm"></div>
</div>
</div>
<div id="SensorContainer" class="relative dark:bg-dark-2 w-full h-full overflow-auto md:overflow-hidden">
<div id="SensorPanel" class="absolute w-full h-full p-2 pt-1">
<div class="pb-2 font-bold text-md">Mobile Only</div>
<div class="flex flex-wrap pb-1">
<button id="gyroButton" class="toggle-button w-32 mr-2" disabled>Gryo: Off</button>
<div id="gyroLog" class="log-container sensorLog opacity-50 text-sm"></div>
</div>
<div class="flex flex-wrap pb-1">
<button id="accelButton" class="toggle-button w-32 mr-2" disabled>Accel: Off</button>
<div id="accelLog" class="log-container sensorLog opacity-50 text-sm"></div>
</div>
</div>
</div>
</div>
</div>
<div id="splitV2" class="resizer vSplit"></div>
<!-- Right -->
<div id="app-right">
<!-- VM Monitor -->
<div id="vmMonitor" class="relative">
<table id="shredTable" class="w-full table-auto absolute text-left overflow-auto">
<thead class="h-8 align-middle font-medium border-b border-dark-d dark:border-dark-a drop-shadow-sm">
<tr>
<th scope="col">Shred</th>
<th scope="col">Code</th>
<th scope="col">Time</th>
<th scope="col" style="width: 10%;">Remove</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="splitH2" class="resizer hSplit"></div>
<!-- Output Panel -->
<div id="outputPanel" class="flex flex-col dark:bg-dark">
<div id="outputPanelHeader" class="header h-7 justify-start flex-none drop-shadow-sm">
<button id="consoleTab" type="button" class="header-item text-orange underline transition">CONSOLE</button>
<button id="visualizerTab" type="button" class="header-item text-dark-5">VISUALIZER</button>
</div>
<div id="consoleContainer" style="height: calc(100% - 1.75rem)" class="border-b border-sky-blue dark:border-dark-4">
<div id="console" class="bg-white dark:bg-dark-2 h-full"></div>
</div>
<div id="visualizerContainer" class="flex-1 bg-white dark:bg-dark-2 hidden">
<div id="visualizer-help" class="w-full h-full flex items-center justify-center text-[#666] dark:text-[#bbb] transition">
<b>Start WebChucK for visualizer</b>
</div>
<canvas id="visualizer" class="w-full h-full"></canvas>
</div>
</div>
</div>
</div>
<!-- MODALS -->
<!-- More Examples Modal -->
<dialog class="modal modal-lg" id="more-examples-modal">
<h1 class="text-xl font-medium pb-2">ChucK Example Library</h1>
<div class="w-full p-2 border border-gray-200 bg-gray-50 rounded-t-xl dark:border-gray-600 dark:bg-dark-4 flex flex-col-reverse md:flex-row">
<!-- Breadcrumbs -->
<nav class="flex justify-left w-1/2 pl-2 pt-2 md:pt-0">
<ol id="more-examples-breadcrumbs" class="inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse">
</ol>
</nav>
<!-- Search -->
<div class="justify-right w-full h-10 md:w-1/2 relative">
<input id="more-examples-search" type="text" class="w-full h-full py-2 pl-11 pr-3 border border-gray-300 rounded-md dark:bg-dark-4" placeholder="Search...">
<div class="absolute left-3 top-1/2 transform -translate-y-1/2">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="h-6 w-6 text-gray-500">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
</div>
<div id="more-examples-autocomplete" class="absolute w-full mt-1 border border-gray-300 rounded-md z-10 hidden bg-white dark:bg-dark">
<ul id="autocomplete-list" class="">
</ul>
</div>
</div>
</div>
<!-- File Explorer -->
<div id="more-examples-explorer" class="border-l border-r border-gray-200 dark:border-gray-600 flex flex-col flex-wrap overflow-auto" style="height:30vh">
</div>
<!-- File Preview -->
<div class="border-l border-r border-t border-gray-200 bg-gray-50 dark:text-light dark:border-gray-600 dark:bg-dark-4 flex">
<ul class="flex text-sm font-medium text-center text-dark dark:text-gray-400">
<li>
<span class="inline-block w-full p-2 px-3 bg-gray-100 border-r border-gray-200 dark:bg-dark dark:border-gray-600">Preview</span>
</li>
<li>
<span id="more-examples-preview-name" class="inline-block p-2 px-3"></span>
</li>
</ul>
</div>
<pre id="more-examples-preview-code" class="text-sm font-mono p-1 border border-gray-200 dark:border-gray-600 rounded-b-lg overflow-auto" style="height:16vh">
</pre>
<!-- Load More Examples -->
<div class="flex gap-4 justify-end pt-4">
<button id="more-examples-close" type="button" class="button secondary">Close</button>
<button id="more-examples-load" type="submit" class="button primary">Load Example</button>
</div>
</dialog>
<!-- Settings Modal -->
<dialog class="modal" id="settings-modal">
<h1 class="text-xl font-medium pb-2">Settings</h1>
<!-- Setting Options-->
<form class="flex flex-col gap-2 py-2 pr-7" method="dialog">
<label class="form-label">ChucK version</label>
<select id="chuck-version-select" class="border px-1 py-1 rounded-md focus:outline-none">
<option value="stable">Stable</option>
<option value="dev">Development</option>
</select>
<p id="chuck-version-desc" class="text-sm text-dark-8 dark:text-gray-400 mt-1"></p>
</form>
<!-- Close Settings -->
<div class="flex gap-4 justify-end pt-4">
<button id="settings-close" class="button secondary">Cancel</button>
<button id="settings-apply" class="button primary">Reload</button>
</div>
</dialog>
<!-- Export to WebChucK Modal -->
<dialog class="modal" id="export-webchuck-modal">
<form class="flex flex-col gap-2 py-2" method="dialog">
<h1 class="text-xl font-medium pb-2">Export to WebChucK</h1>
<div>
<label class="form-label">Title</label>
<input id="export-title" class="form-input" type="text" placeholder="Hello Sine">
</div>
<div>
<label class="form-label">Author</label>
<input id="export-author" class="form-input" type="text" placeholder="Terry Feng">
</div>
<div>
<label class="form-label">Description</label>
<textarea id="export-description" class="form-input" placeholder="A very cool sine wave!"></textarea>
</div>
<div>
<label class="form-label pr-2">Main File</label>
<select id="export-wc-file-select" class="border px-1 py-1 rounded-md focus:outline-none disabled:opacity-50">
</select>
</div>
<div class="flex gap-4 justify-end pt-4">
<button id="export-cancel-btn" type="button" class="button secondary">Cancel</button>
<button id="export-btn" type="submit" class="button primary">Export</button>
</div>
</form>
</dialog>
<!-- Share Code Modal -->
<dialog class="modal modal-sm" id="share-code-modal">
<form class="flex flex-col gap-2 py-2" method="dialog">
<!-- display url to copy -->
<label class="form-label">Shareable URL</label>
<input type="text" id="share-code-url" class="border px-2 py-1 rounded-md" readonly>
</form>
<div class="flex gap-4 justify-end pt-4">
<button id="share-code-close" class="button secondary">Close</button>
<button id="share-code-copy" class="button primary">Copy</button>
</div>
</dialog>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>