llm-canvas-linux-x64 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/llm-canvas +0 -0
- package/package.json +21 -0
- package/skills/canvas-workspace/SKILL.md +320 -0
- package/workspace/app.js +727 -0
- package/workspace/comments.js +345 -0
- package/workspace/index.html +136 -0
- package/workspace/lib/highlight.min.js +1244 -0
- package/workspace/lib/hljs-github-dark.min.css +10 -0
- package/workspace/lib/mermaid.min.js +2029 -0
- package/workspace/lib/tailwind.js +83 -0
- package/workspace/lib/three.min.js +7 -0
- package/workspace/lib/turndown-plugin-gfm.min.js +165 -0
- package/workspace/lib/turndown.min.js +974 -0
- package/workspace/styles.css +454 -0
- package/workspace/theme.css +136 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
/* Canvas workspace shell chrome.
|
|
2
|
+
* Agent-facing component classes and theme tokens live in theme.css (loaded before this file).
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* Section host: each rendered section sits inside this. */
|
|
6
|
+
.canvas-section-host {
|
|
7
|
+
position: relative;
|
|
8
|
+
background: var(--bg-elevated);
|
|
9
|
+
border: 1px solid var(--border);
|
|
10
|
+
border-radius: 0.5rem;
|
|
11
|
+
padding: 1.5rem 2rem;
|
|
12
|
+
scroll-margin-top: 5rem; /* so focus_section scrollIntoView doesn't hide under sticky header */
|
|
13
|
+
}
|
|
14
|
+
.section-copy-btn {
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0.625rem;
|
|
17
|
+
right: 0.625rem;
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 0.3rem;
|
|
21
|
+
padding: 0.3rem 0.55rem;
|
|
22
|
+
border: 1px solid var(--border);
|
|
23
|
+
border-radius: 0.375rem;
|
|
24
|
+
background: var(--bg-elevated);
|
|
25
|
+
color: var(--fg-muted);
|
|
26
|
+
font-size: 0.72rem;
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
opacity: 0;
|
|
30
|
+
transition: opacity 0.12s ease;
|
|
31
|
+
}
|
|
32
|
+
.canvas-section-host:hover .section-copy-btn,
|
|
33
|
+
.section-copy-btn:focus-visible { opacity: 1; }
|
|
34
|
+
.section-copy-btn:hover { background: var(--bg); color: var(--fg); }
|
|
35
|
+
.section-copy-btn[data-copied="true"] {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
border-color: var(--accent);
|
|
38
|
+
color: var(--accent-strong);
|
|
39
|
+
}
|
|
40
|
+
.canvas-section-host[data-focused="true"] {
|
|
41
|
+
border-color: var(--accent);
|
|
42
|
+
box-shadow: 0 0 0 3px var(--accent-soft-bg);
|
|
43
|
+
}
|
|
44
|
+
/* Code blocks use a fixed dark surface in both themes. */
|
|
45
|
+
.canvas-section-host pre {
|
|
46
|
+
background: #0f172a;
|
|
47
|
+
color: #f1f5f9;
|
|
48
|
+
padding: 1rem;
|
|
49
|
+
border-radius: 0.375rem;
|
|
50
|
+
border: 1px solid var(--border);
|
|
51
|
+
overflow-x: auto;
|
|
52
|
+
font-size: 0.85rem;
|
|
53
|
+
}
|
|
54
|
+
.canvas-section-host h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.75rem; }
|
|
55
|
+
.canvas-section-host h2 { font-size: 1.25rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
|
|
56
|
+
.canvas-section-host h3 { font-size: 1.05rem; font-weight: 600; margin: 1rem 0 0.5rem; }
|
|
57
|
+
.canvas-section-host p { margin: 0.5rem 0; line-height: 1.65; }
|
|
58
|
+
.canvas-section-host ul, .canvas-section-host ol { margin: 0.5rem 0 0.5rem 1.25rem; }
|
|
59
|
+
.canvas-section-host li { margin: 0.25rem 0; line-height: 1.55; }
|
|
60
|
+
.canvas-section-host a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
|
|
61
|
+
|
|
62
|
+
/* Section iframe for document-form sections */
|
|
63
|
+
.canvas-section-iframe {
|
|
64
|
+
width: 100%;
|
|
65
|
+
min-height: 480px;
|
|
66
|
+
border: 1px solid var(--border);
|
|
67
|
+
border-radius: 0.5rem;
|
|
68
|
+
background: var(--bg-elevated);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.canvas-section-title {
|
|
72
|
+
font-size: 0.7rem;
|
|
73
|
+
font-weight: 600;
|
|
74
|
+
letter-spacing: 0.08em;
|
|
75
|
+
text-transform: uppercase;
|
|
76
|
+
color: var(--fg-muted);
|
|
77
|
+
margin-bottom: 0.5rem;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Sidebar entries */
|
|
81
|
+
.nav-session {
|
|
82
|
+
display: block;
|
|
83
|
+
padding: 0.5rem 0.75rem;
|
|
84
|
+
border-radius: 0.375rem;
|
|
85
|
+
font-size: 0.9rem;
|
|
86
|
+
color: var(--fg);
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
}
|
|
89
|
+
.nav-session:hover { background: var(--bg-sunken); }
|
|
90
|
+
.nav-session[data-active="true"] {
|
|
91
|
+
background: var(--accent-soft-bg);
|
|
92
|
+
color: var(--accent-soft-fg);
|
|
93
|
+
font-weight: 600;
|
|
94
|
+
}
|
|
95
|
+
.nav-section {
|
|
96
|
+
display: block;
|
|
97
|
+
padding: 0.25rem 0.75rem 0.25rem 1.5rem;
|
|
98
|
+
font-size: 0.85rem;
|
|
99
|
+
color: var(--fg-muted);
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
border-radius: 0.25rem;
|
|
102
|
+
}
|
|
103
|
+
.nav-section:hover { color: var(--fg); background: var(--bg); }
|
|
104
|
+
.nav-section[data-active="true"] { color: var(--accent-strong); font-weight: 600; }
|
|
105
|
+
|
|
106
|
+
/* Sidebar — collapsible to a spine, mirrors the inbox rail. */
|
|
107
|
+
.sidebar {
|
|
108
|
+
flex: 0 0 18rem;
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: row;
|
|
111
|
+
border-right: 1px solid var(--border);
|
|
112
|
+
background: var(--bg-elevated);
|
|
113
|
+
}
|
|
114
|
+
.sidebar-body {
|
|
115
|
+
flex: 1 1 auto;
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
min-width: 0;
|
|
119
|
+
overflow-y: auto;
|
|
120
|
+
}
|
|
121
|
+
.sidebar-header {
|
|
122
|
+
flex: 0 0 auto;
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: flex-start;
|
|
125
|
+
justify-content: space-between;
|
|
126
|
+
gap: 0.5rem;
|
|
127
|
+
padding: 1rem;
|
|
128
|
+
border-bottom: 1px solid var(--border);
|
|
129
|
+
}
|
|
130
|
+
.sidebar-spine {
|
|
131
|
+
display: none;
|
|
132
|
+
width: 3rem;
|
|
133
|
+
flex: 0 0 3rem;
|
|
134
|
+
background: var(--bg);
|
|
135
|
+
align-items: center;
|
|
136
|
+
flex-direction: column;
|
|
137
|
+
gap: 0.5rem;
|
|
138
|
+
padding: 0.75rem 0;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
color: var(--fg-muted);
|
|
141
|
+
}
|
|
142
|
+
.sidebar-spine:hover { background: var(--bg-sunken); }
|
|
143
|
+
.sidebar-spine-icon { font-size: 1rem; }
|
|
144
|
+
.sidebar-spine-label {
|
|
145
|
+
font-size: 0.65rem;
|
|
146
|
+
font-weight: 600;
|
|
147
|
+
letter-spacing: 0.08em;
|
|
148
|
+
text-transform: uppercase;
|
|
149
|
+
color: var(--fg-muted);
|
|
150
|
+
writing-mode: vertical-rl;
|
|
151
|
+
}
|
|
152
|
+
.sidebar[data-collapsed="true"] { flex: 0 0 3rem; }
|
|
153
|
+
.sidebar[data-collapsed="true"] .sidebar-spine { display: flex; }
|
|
154
|
+
.sidebar[data-collapsed="true"] .sidebar-body { display: none; }
|
|
155
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
156
|
+
.sidebar { transition: flex-basis 0.2s ease; }
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Inbox rail — browser→agent note channel.
|
|
160
|
+
* Wide (≥1280px): in-flow right rail (sibling of <main>); can collapse to a spine.
|
|
161
|
+
* Narrow (<1280px): fixed-position drawer that slides in from the right.
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
.inbox-rail {
|
|
165
|
+
flex: 0 0 22rem;
|
|
166
|
+
display: flex;
|
|
167
|
+
flex-direction: row;
|
|
168
|
+
background: var(--bg-elevated);
|
|
169
|
+
border-left: 1px solid var(--border);
|
|
170
|
+
height: 100vh;
|
|
171
|
+
position: relative;
|
|
172
|
+
}
|
|
173
|
+
.inbox-rail-spine {
|
|
174
|
+
display: none;
|
|
175
|
+
width: 3rem;
|
|
176
|
+
flex: 0 0 3rem;
|
|
177
|
+
border-right: 1px solid var(--border);
|
|
178
|
+
background: var(--bg);
|
|
179
|
+
align-items: center;
|
|
180
|
+
justify-content: center;
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
gap: 0.5rem;
|
|
183
|
+
padding: 0.75rem 0;
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
color: var(--fg-muted);
|
|
186
|
+
position: relative;
|
|
187
|
+
}
|
|
188
|
+
.inbox-rail-spine:hover { background: var(--bg-sunken); }
|
|
189
|
+
.inbox-spine-icon { font-size: 1.1rem; }
|
|
190
|
+
.inbox-spine-label {
|
|
191
|
+
font-size: 0.65rem;
|
|
192
|
+
font-weight: 600;
|
|
193
|
+
letter-spacing: 0.08em;
|
|
194
|
+
text-transform: uppercase;
|
|
195
|
+
color: var(--fg-muted);
|
|
196
|
+
writing-mode: vertical-rl;
|
|
197
|
+
transform: rotate(180deg);
|
|
198
|
+
margin-top: 0.25rem;
|
|
199
|
+
}
|
|
200
|
+
.inbox-spine-badge {
|
|
201
|
+
position: absolute;
|
|
202
|
+
top: 0.5rem;
|
|
203
|
+
right: 0.4rem;
|
|
204
|
+
min-width: 1.1rem;
|
|
205
|
+
height: 1.1rem;
|
|
206
|
+
padding: 0 0.3rem;
|
|
207
|
+
border-radius: 9999px;
|
|
208
|
+
background: var(--accent);
|
|
209
|
+
color: var(--accent-fg);
|
|
210
|
+
font-size: 0.65rem;
|
|
211
|
+
font-weight: 700;
|
|
212
|
+
display: inline-flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: center;
|
|
215
|
+
}
|
|
216
|
+
.inbox-rail-body {
|
|
217
|
+
flex: 1 1 auto;
|
|
218
|
+
display: flex;
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
min-width: 0;
|
|
221
|
+
height: 100%;
|
|
222
|
+
}
|
|
223
|
+
.inbox-rail-header {
|
|
224
|
+
flex: 0 0 auto;
|
|
225
|
+
display: flex;
|
|
226
|
+
align-items: center;
|
|
227
|
+
gap: 0.5rem;
|
|
228
|
+
padding: 0.75rem 0.875rem;
|
|
229
|
+
border-bottom: 1px solid var(--border);
|
|
230
|
+
}
|
|
231
|
+
.inbox-rail-title {
|
|
232
|
+
font-size: 0.85rem;
|
|
233
|
+
font-weight: 600;
|
|
234
|
+
color: var(--fg);
|
|
235
|
+
}
|
|
236
|
+
.inbox-rail-spacer { flex: 1 1 auto; }
|
|
237
|
+
.inbox-badge {
|
|
238
|
+
min-width: 1.25rem;
|
|
239
|
+
height: 1.25rem;
|
|
240
|
+
padding: 0 0.4rem;
|
|
241
|
+
border-radius: 9999px;
|
|
242
|
+
background: var(--accent);
|
|
243
|
+
color: var(--accent-fg);
|
|
244
|
+
font-size: 0.7rem;
|
|
245
|
+
font-weight: 700;
|
|
246
|
+
display: inline-flex;
|
|
247
|
+
align-items: center;
|
|
248
|
+
justify-content: center;
|
|
249
|
+
}
|
|
250
|
+
.inbox-rail-iconbtn {
|
|
251
|
+
width: 1.75rem;
|
|
252
|
+
height: 1.75rem;
|
|
253
|
+
border-radius: 0.375rem;
|
|
254
|
+
background: transparent;
|
|
255
|
+
color: var(--fg-muted);
|
|
256
|
+
display: inline-flex;
|
|
257
|
+
align-items: center;
|
|
258
|
+
justify-content: center;
|
|
259
|
+
font-size: 1rem;
|
|
260
|
+
line-height: 1;
|
|
261
|
+
cursor: pointer;
|
|
262
|
+
}
|
|
263
|
+
.inbox-rail-iconbtn:hover { background: var(--bg-sunken); color: var(--fg); }
|
|
264
|
+
.inbox-rail-iconbtn-drawer { display: none; }
|
|
265
|
+
|
|
266
|
+
.inbox-thread {
|
|
267
|
+
flex: 1 1 auto;
|
|
268
|
+
display: flex;
|
|
269
|
+
flex-direction: column;
|
|
270
|
+
gap: 0.625rem;
|
|
271
|
+
overflow-y: auto;
|
|
272
|
+
padding: 0.75rem 0.875rem;
|
|
273
|
+
}
|
|
274
|
+
.inbox-message { display: flex; flex-direction: column; gap: 0.2rem; }
|
|
275
|
+
.inbox-message-meta {
|
|
276
|
+
display: flex;
|
|
277
|
+
align-items: center;
|
|
278
|
+
gap: 0.4rem;
|
|
279
|
+
font-size: 0.72rem;
|
|
280
|
+
color: var(--fg-muted);
|
|
281
|
+
}
|
|
282
|
+
.inbox-message-text {
|
|
283
|
+
white-space: pre-wrap;
|
|
284
|
+
line-height: 1.5;
|
|
285
|
+
font-size: 0.9rem;
|
|
286
|
+
color: var(--fg);
|
|
287
|
+
}
|
|
288
|
+
.inbox-ack { font-size: 0.72rem; color: var(--fg-subtle); margin-top: 0.1rem; }
|
|
289
|
+
.inbox-empty {
|
|
290
|
+
flex: 1 1 auto;
|
|
291
|
+
font-size: 0.85rem;
|
|
292
|
+
color: var(--fg-subtle);
|
|
293
|
+
padding: 1rem 0.875rem;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.inbox-compose {
|
|
297
|
+
flex: 0 0 auto;
|
|
298
|
+
border-top: 1px solid var(--border);
|
|
299
|
+
padding: 0.75rem 0.875rem;
|
|
300
|
+
background: var(--bg-elevated);
|
|
301
|
+
}
|
|
302
|
+
.inbox-textarea {
|
|
303
|
+
width: 100%;
|
|
304
|
+
resize: vertical;
|
|
305
|
+
min-height: 2.75rem;
|
|
306
|
+
max-height: 12rem;
|
|
307
|
+
padding: 0.5rem 0.625rem;
|
|
308
|
+
border: 1px solid var(--border-strong);
|
|
309
|
+
border-radius: 0.375rem;
|
|
310
|
+
font: inherit;
|
|
311
|
+
font-size: 0.9rem;
|
|
312
|
+
color: var(--fg);
|
|
313
|
+
background: var(--bg-elevated);
|
|
314
|
+
}
|
|
315
|
+
.inbox-textarea:focus {
|
|
316
|
+
outline: 2px solid var(--accent-soft-bg);
|
|
317
|
+
border-color: var(--accent);
|
|
318
|
+
}
|
|
319
|
+
.inbox-compose-row { display: flex; align-items: center; gap: 0.625rem; margin-top: 0.4rem; }
|
|
320
|
+
.inbox-error { color: var(--danger); font-size: 0.78rem; }
|
|
321
|
+
.inbox-counter { margin-left: auto; font-size: 0.72rem; color: var(--fg-subtle); }
|
|
322
|
+
.inbox-counter[data-over="true"] { color: var(--danger); font-weight: 600; }
|
|
323
|
+
.inbox-send {
|
|
324
|
+
padding: 0.35rem 0.85rem;
|
|
325
|
+
border-radius: 0.375rem;
|
|
326
|
+
background: var(--accent);
|
|
327
|
+
color: var(--accent-fg);
|
|
328
|
+
font-size: 0.82rem;
|
|
329
|
+
font-weight: 600;
|
|
330
|
+
cursor: pointer;
|
|
331
|
+
}
|
|
332
|
+
.inbox-send:hover { background: var(--accent-strong); }
|
|
333
|
+
.inbox-send:disabled { background: var(--border-strong); cursor: not-allowed; }
|
|
334
|
+
|
|
335
|
+
/* Wide-screen collapsed state — show only spine. */
|
|
336
|
+
.inbox-rail[data-collapsed="true"] {
|
|
337
|
+
flex: 0 0 3rem;
|
|
338
|
+
}
|
|
339
|
+
.inbox-rail[data-collapsed="true"] .inbox-rail-spine { display: flex; }
|
|
340
|
+
.inbox-rail[data-collapsed="true"] .inbox-rail-body { display: none; }
|
|
341
|
+
|
|
342
|
+
/* Content zoom control in the session header. */
|
|
343
|
+
.zoom-control {
|
|
344
|
+
flex: 0 0 auto;
|
|
345
|
+
display: inline-flex;
|
|
346
|
+
align-items: center;
|
|
347
|
+
border: 1px solid var(--border);
|
|
348
|
+
border-radius: 0.5rem;
|
|
349
|
+
background: var(--bg-elevated);
|
|
350
|
+
overflow: hidden;
|
|
351
|
+
}
|
|
352
|
+
.zoom-btn {
|
|
353
|
+
width: 1.85rem;
|
|
354
|
+
height: 1.85rem;
|
|
355
|
+
display: inline-flex;
|
|
356
|
+
align-items: center;
|
|
357
|
+
justify-content: center;
|
|
358
|
+
font-size: 1rem;
|
|
359
|
+
line-height: 1;
|
|
360
|
+
color: var(--fg-muted);
|
|
361
|
+
background: var(--bg-elevated);
|
|
362
|
+
cursor: pointer;
|
|
363
|
+
}
|
|
364
|
+
.zoom-btn:hover { background: var(--bg-sunken); color: var(--fg); }
|
|
365
|
+
.zoom-btn:disabled { color: var(--border-strong); cursor: not-allowed; background: var(--bg-elevated); }
|
|
366
|
+
.zoom-level {
|
|
367
|
+
min-width: 3.25rem;
|
|
368
|
+
height: 1.85rem;
|
|
369
|
+
padding: 0 0.25rem;
|
|
370
|
+
font-size: 0.78rem;
|
|
371
|
+
font-weight: 600;
|
|
372
|
+
font-variant-numeric: tabular-nums;
|
|
373
|
+
color: var(--fg);
|
|
374
|
+
background: var(--bg-elevated);
|
|
375
|
+
border-left: 1px solid var(--border);
|
|
376
|
+
border-right: 1px solid var(--border);
|
|
377
|
+
cursor: pointer;
|
|
378
|
+
}
|
|
379
|
+
.zoom-level:hover { background: var(--bg-sunken); }
|
|
380
|
+
|
|
381
|
+
/* Top-bar toggle (visible only on narrow). */
|
|
382
|
+
.inbox-toggle-topbar {
|
|
383
|
+
flex: 0 0 auto;
|
|
384
|
+
display: inline-flex;
|
|
385
|
+
align-items: center;
|
|
386
|
+
gap: 0.4rem;
|
|
387
|
+
padding: 0.4rem 0.7rem;
|
|
388
|
+
border: 1px solid var(--border);
|
|
389
|
+
border-radius: 0.5rem;
|
|
390
|
+
background: var(--bg-elevated);
|
|
391
|
+
font-size: 0.8rem;
|
|
392
|
+
font-weight: 600;
|
|
393
|
+
color: var(--fg);
|
|
394
|
+
cursor: pointer;
|
|
395
|
+
}
|
|
396
|
+
.inbox-toggle-topbar:hover { background: var(--bg); }
|
|
397
|
+
|
|
398
|
+
/* Backdrop, narrow-screen only. */
|
|
399
|
+
.inbox-backdrop {
|
|
400
|
+
position: fixed;
|
|
401
|
+
inset: 0;
|
|
402
|
+
background: rgba(15, 23, 42, 0.35);
|
|
403
|
+
z-index: 40;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* Narrow-screen behavior: drawer overlays content. */
|
|
407
|
+
@media (max-width: 1279.98px) {
|
|
408
|
+
.inbox-rail {
|
|
409
|
+
position: fixed;
|
|
410
|
+
top: 0;
|
|
411
|
+
right: 0;
|
|
412
|
+
height: 100vh;
|
|
413
|
+
width: min(22rem, 92vw);
|
|
414
|
+
flex: none;
|
|
415
|
+
z-index: 50;
|
|
416
|
+
box-shadow: -12px 0 32px rgba(15, 23, 42, 0.12);
|
|
417
|
+
transform: translateX(100%);
|
|
418
|
+
}
|
|
419
|
+
.inbox-rail[data-open="true"] { transform: translateX(0); }
|
|
420
|
+
.inbox-rail[data-collapsed="true"] { flex: none; } /* collapse meaningless when drawer */
|
|
421
|
+
.inbox-rail[data-collapsed="true"] .inbox-rail-spine { display: none; }
|
|
422
|
+
.inbox-rail[data-collapsed="true"] .inbox-rail-body { display: flex; }
|
|
423
|
+
.inbox-rail-iconbtn-drawer { display: inline-flex; }
|
|
424
|
+
.inbox-collapse-btn-wide { display: none; }
|
|
425
|
+
#inbox-collapse { display: none; }
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/* Wide-screen: hide the drawer-close X, hide the top-bar toggle. */
|
|
429
|
+
@media (min-width: 1280px) {
|
|
430
|
+
.inbox-toggle-topbar { display: none !important; }
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
434
|
+
.inbox-rail { transition: transform 0.2s ease, flex-basis 0.2s ease; }
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/* Dark-mode toggle — sits beside the zoom control in the header. */
|
|
438
|
+
.theme-toggle {
|
|
439
|
+
flex: 0 0 auto;
|
|
440
|
+
width: 2.1rem;
|
|
441
|
+
height: 2.1rem;
|
|
442
|
+
display: inline-flex;
|
|
443
|
+
align-items: center;
|
|
444
|
+
justify-content: center;
|
|
445
|
+
border: 1px solid var(--border);
|
|
446
|
+
border-radius: 0.5rem;
|
|
447
|
+
background: var(--bg-elevated);
|
|
448
|
+
color: var(--fg-muted);
|
|
449
|
+
font-size: 0.95rem;
|
|
450
|
+
line-height: 1;
|
|
451
|
+
cursor: pointer;
|
|
452
|
+
}
|
|
453
|
+
.theme-toggle:hover { background: var(--bg-sunken); color: var(--fg); }
|
|
454
|
+
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/* Canvas theme tokens + agent-facing component classes.
|
|
2
|
+
* Linked by the workspace shell and injected into document-mode iframes,
|
|
3
|
+
* so document sections theme alongside the shell.
|
|
4
|
+
* Light values live on :root; dark values on html.dark (added in Task 3).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--bg: #f8fafc;
|
|
9
|
+
--bg-elevated: #ffffff;
|
|
10
|
+
--bg-sunken: #f1f5f9;
|
|
11
|
+
--fg: #0f172a;
|
|
12
|
+
--fg-muted: #64748b;
|
|
13
|
+
--fg-subtle: #94a3b8;
|
|
14
|
+
--border: #e2e8f0;
|
|
15
|
+
--border-strong: #cbd5e1;
|
|
16
|
+
--accent: #4f46e5;
|
|
17
|
+
--accent-strong: #4338ca;
|
|
18
|
+
--accent-fg: #ffffff;
|
|
19
|
+
--accent-soft-bg: #eef2ff;
|
|
20
|
+
--accent-soft-fg: #312e81;
|
|
21
|
+
--accent-underline: #a5b4fc;
|
|
22
|
+
--danger: #dc2626;
|
|
23
|
+
|
|
24
|
+
--callout-bg: #f8fafc;
|
|
25
|
+
--callout-bd: #cbd5e1;
|
|
26
|
+
--callout-fg: #334155;
|
|
27
|
+
--callout-info-bg: #f0f9ff;
|
|
28
|
+
--callout-info-bd: #0ea5e9;
|
|
29
|
+
--callout-info-fg: #0c4a6e;
|
|
30
|
+
--callout-warn-bg: #fffbeb;
|
|
31
|
+
--callout-warn-bd: #f59e0b;
|
|
32
|
+
--callout-warn-fg: #78350f;
|
|
33
|
+
--callout-danger-bg: #fef2f2;
|
|
34
|
+
--callout-danger-bd: #ef4444;
|
|
35
|
+
--callout-danger-fg: #7f1d1d;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Baseline surface — mainly for document-mode iframes, which have no shell
|
|
39
|
+
* Tailwind classes. The main document's <body> is themed in index.html. */
|
|
40
|
+
body {
|
|
41
|
+
background: var(--bg);
|
|
42
|
+
color: var(--fg);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.canvas-callout {
|
|
46
|
+
--c-bg: var(--callout-bg);
|
|
47
|
+
--c-bd: var(--callout-bd);
|
|
48
|
+
--c-fg: var(--callout-fg);
|
|
49
|
+
display: block;
|
|
50
|
+
padding: 0.75rem 1rem;
|
|
51
|
+
border-left: 3px solid var(--c-bd);
|
|
52
|
+
background: var(--c-bg);
|
|
53
|
+
color: var(--c-fg);
|
|
54
|
+
border-radius: 0.25rem;
|
|
55
|
+
margin: 1rem 0;
|
|
56
|
+
}
|
|
57
|
+
.canvas-callout.info { --c-bg: var(--callout-info-bg); --c-bd: var(--callout-info-bd); --c-fg: var(--callout-info-fg); }
|
|
58
|
+
.canvas-callout.warn { --c-bg: var(--callout-warn-bg); --c-bd: var(--callout-warn-bd); --c-fg: var(--callout-warn-fg); }
|
|
59
|
+
.canvas-callout.danger { --c-bg: var(--callout-danger-bg); --c-bd: var(--callout-danger-bd); --c-fg: var(--callout-danger-fg); }
|
|
60
|
+
|
|
61
|
+
.canvas-table {
|
|
62
|
+
width: 100%;
|
|
63
|
+
border-collapse: collapse;
|
|
64
|
+
margin: 1rem 0;
|
|
65
|
+
font-size: 0.9rem;
|
|
66
|
+
}
|
|
67
|
+
.canvas-table th,
|
|
68
|
+
.canvas-table td {
|
|
69
|
+
border: 1px solid var(--border);
|
|
70
|
+
padding: 0.5rem 0.75rem;
|
|
71
|
+
text-align: left;
|
|
72
|
+
vertical-align: top;
|
|
73
|
+
}
|
|
74
|
+
.canvas-table th { background: var(--bg-sunken); font-weight: 600; }
|
|
75
|
+
|
|
76
|
+
.canvas-pill {
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 0.25rem;
|
|
80
|
+
padding: 0.125rem 0.5rem;
|
|
81
|
+
border-radius: 9999px;
|
|
82
|
+
font-size: 0.7rem;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
background: var(--border);
|
|
85
|
+
color: var(--fg-muted);
|
|
86
|
+
text-transform: uppercase;
|
|
87
|
+
letter-spacing: 0.04em;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.canvas-fileref {
|
|
91
|
+
color: var(--accent);
|
|
92
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
93
|
+
font-size: 0.85em;
|
|
94
|
+
text-decoration: underline;
|
|
95
|
+
text-decoration-color: var(--accent-underline);
|
|
96
|
+
text-underline-offset: 2px;
|
|
97
|
+
}
|
|
98
|
+
.canvas-fileref:hover { color: var(--accent-strong); }
|
|
99
|
+
|
|
100
|
+
.canvas-card {
|
|
101
|
+
background: var(--bg-elevated);
|
|
102
|
+
border: 1px solid var(--border);
|
|
103
|
+
border-radius: 0.5rem;
|
|
104
|
+
padding: 1rem 1.25rem;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
html.dark {
|
|
108
|
+
--bg: #0f172a;
|
|
109
|
+
--bg-elevated: #1e293b;
|
|
110
|
+
--bg-sunken: #0b1120;
|
|
111
|
+
--fg: #e2e8f0;
|
|
112
|
+
--fg-muted: #94a3b8;
|
|
113
|
+
--fg-subtle: #8492a6;
|
|
114
|
+
--border: #334155;
|
|
115
|
+
--border-strong: #475569;
|
|
116
|
+
--accent: #818cf8;
|
|
117
|
+
--accent-strong: #a5b4fc;
|
|
118
|
+
--accent-fg: #0f172a;
|
|
119
|
+
--accent-soft-bg: #312e81;
|
|
120
|
+
--accent-soft-fg: #e0e7ff;
|
|
121
|
+
--accent-underline: #6366f1;
|
|
122
|
+
--danger: #f87171;
|
|
123
|
+
|
|
124
|
+
--callout-bg: #1e293b;
|
|
125
|
+
--callout-bd: #475569;
|
|
126
|
+
--callout-fg: #cbd5e1;
|
|
127
|
+
--callout-info-bg: #0c293f;
|
|
128
|
+
--callout-info-bd: #38bdf8;
|
|
129
|
+
--callout-info-fg: #bae6fd;
|
|
130
|
+
--callout-warn-bg: #3a2c0a;
|
|
131
|
+
--callout-warn-bd: #fbbf24;
|
|
132
|
+
--callout-warn-fg: #fde68a;
|
|
133
|
+
--callout-danger-bg: #3b1314;
|
|
134
|
+
--callout-danger-bd: #f87171;
|
|
135
|
+
--callout-danger-fg: #fecaca;
|
|
136
|
+
}
|