@atelier-ui/react 0.1.10 → 0.1.11

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.
@@ -0,0 +1,446 @@
1
+ /* ── Host wrapper ──────────────────────────────────────────────────────────── */
2
+ .llm-chat {
3
+ display: contents;
4
+ }
5
+
6
+ /* ── Shared surface (header / messages / input column) ─────────────────────── */
7
+ .llm-chat .surface {
8
+ display: flex;
9
+ flex-direction: column;
10
+ background: var(--ui-color-surface);
11
+ color: var(--ui-color-text);
12
+ overflow: hidden;
13
+ }
14
+
15
+ /* ═══════════════════════════════════════════════════════════════════════════ */
16
+ /* DRAWER variant */
17
+ /* ═══════════════════════════════════════════════════════════════════════════ */
18
+ .llm-chat.variant-drawer dialog {
19
+ all: unset;
20
+ position: fixed;
21
+ inset: 0 0 0 auto;
22
+ height: 100dvh;
23
+ width: 28rem;
24
+ display: none;
25
+ flex-direction: column;
26
+ background: var(--ui-color-surface);
27
+ box-shadow: var(--ui-shadow-xl, -8px 0 32px rgba(0, 0, 0, 0.12));
28
+ color: var(--ui-color-text);
29
+ overflow: hidden;
30
+ transform: translateX(100%);
31
+ transition:
32
+ transform var(--ui-duration-slow) var(--ui-ease-out, ease-out),
33
+ display var(--ui-duration-slow) allow-discrete,
34
+ overlay var(--ui-duration-slow) allow-discrete;
35
+ }
36
+
37
+ .llm-chat.variant-drawer dialog[open] {
38
+ display: flex;
39
+ transform: translateX(0);
40
+ }
41
+
42
+ @starting-style {
43
+ .llm-chat.variant-drawer dialog[open] {
44
+ transform: translateX(100%);
45
+ }
46
+ }
47
+
48
+ .llm-chat.variant-drawer dialog::backdrop {
49
+ background: var(--ui-color-overlay);
50
+ backdrop-filter: blur(2px);
51
+ transition:
52
+ opacity var(--ui-duration-slow) var(--ui-ease-out, ease-out),
53
+ display var(--ui-duration-slow) allow-discrete,
54
+ overlay var(--ui-duration-slow) allow-discrete;
55
+ }
56
+
57
+ .llm-chat.variant-drawer .drawer-surface {
58
+ width: 100%;
59
+ height: 100%;
60
+ }
61
+
62
+ /* ═══════════════════════════════════════════════════════════════════════════ */
63
+ /* POPUP variant */
64
+ /* ═══════════════════════════════════════════════════════════════════════════ */
65
+ .llm-chat.variant-popup .popup-surface {
66
+ position: fixed;
67
+ bottom: calc(var(--ui-spacing-6) + 3.5rem + var(--ui-spacing-4));
68
+ right: var(--ui-spacing-6);
69
+ width: 23.75rem;
70
+ height: 35rem;
71
+ border-radius: var(--ui-radius-xl);
72
+ box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
73
+ z-index: 100;
74
+ }
75
+
76
+ .llm-chat.variant-popup .fab-bubble {
77
+ position: fixed;
78
+ bottom: var(--ui-spacing-6);
79
+ right: var(--ui-spacing-6);
80
+ width: 3.5rem;
81
+ height: 3.5rem;
82
+ border-radius: var(--ui-radius-full);
83
+ background: var(--ui-color-brand-ai, #b5e61c);
84
+ color: var(--ui-color-text);
85
+ border: none;
86
+ font-family: var(--ui-font-family);
87
+ font-size: var(--ui-font-size-lg);
88
+ font-weight: var(--ui-font-weight-semibold);
89
+ cursor: pointer;
90
+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
91
+ transition:
92
+ transform var(--ui-transition-fast),
93
+ box-shadow var(--ui-transition-fast);
94
+ z-index: 101;
95
+ }
96
+
97
+ .llm-chat.variant-popup .fab-bubble:hover {
98
+ transform: scale(1.05);
99
+ box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
100
+ }
101
+
102
+ .llm-chat.variant-popup .fab-bubble:focus-visible {
103
+ outline: none;
104
+ box-shadow: var(--ui-focus-ring), 0 6px 16px rgba(0, 0, 0, 0.18);
105
+ }
106
+
107
+ /* ═══════════════════════════════════════════════════════════════════════════ */
108
+ /* INLINE variant */
109
+ /* ═══════════════════════════════════════════════════════════════════════════ */
110
+ .llm-chat.variant-inline .inline-surface {
111
+ width: 100%;
112
+ height: 100%;
113
+ min-height: 24rem;
114
+ border: 1px solid var(--ui-color-border);
115
+ border-radius: var(--ui-radius-xl);
116
+ }
117
+
118
+ .llm-chat.variant-inline .llm-chat-header .close-btn {
119
+ display: none;
120
+ }
121
+
122
+ /* ═══════════════════════════════════════════════════════════════════════════ */
123
+ /* SUB-COMPONENT: header */
124
+ /* ═══════════════════════════════════════════════════════════════════════════ */
125
+ .llm-chat-header {
126
+ display: flex;
127
+ align-items: center;
128
+ justify-content: space-between;
129
+ gap: var(--ui-spacing-3);
130
+ padding: var(--ui-spacing-3) var(--ui-spacing-4);
131
+ border-bottom: 1px solid var(--ui-color-border);
132
+ flex-shrink: 0;
133
+ }
134
+
135
+ .llm-chat-header .title-block {
136
+ display: flex;
137
+ align-items: center;
138
+ gap: var(--ui-spacing-3);
139
+ font-size: var(--ui-font-size-md);
140
+ font-weight: var(--ui-font-weight-semibold);
141
+ color: var(--ui-color-text);
142
+ letter-spacing: var(--ui-letter-spacing-tight);
143
+ flex: 1;
144
+ min-width: 0;
145
+ }
146
+
147
+ .llm-chat-header .close-btn {
148
+ display: inline-flex;
149
+ align-items: center;
150
+ justify-content: center;
151
+ flex-shrink: 0;
152
+ width: 2rem;
153
+ height: 2rem;
154
+ padding: 0;
155
+ background: transparent;
156
+ border: 1px solid var(--ui-color-border);
157
+ border-radius: var(--ui-radius-sm);
158
+ cursor: pointer;
159
+ color: var(--ui-color-text-muted);
160
+ transition:
161
+ background-color var(--ui-transition-fast),
162
+ color var(--ui-transition-fast);
163
+ }
164
+
165
+ .llm-chat-header .close-btn:hover {
166
+ background-color: var(--ui-color-surface-sunken);
167
+ color: var(--ui-color-text);
168
+ }
169
+
170
+ .llm-chat-header .close-btn:focus-visible {
171
+ outline: none;
172
+ box-shadow: var(--ui-focus-ring);
173
+ }
174
+
175
+ /* ═══════════════════════════════════════════════════════════════════════════ */
176
+ /* SUB-COMPONENT: messages */
177
+ /* ═══════════════════════════════════════════════════════════════════════════ */
178
+ .llm-chat-messages {
179
+ display: flex;
180
+ flex-direction: column;
181
+ gap: var(--ui-spacing-3);
182
+ padding: var(--ui-spacing-4);
183
+ overflow-y: auto;
184
+ overflow-anchor: auto;
185
+ scroll-behavior: smooth;
186
+ flex: 1;
187
+ background: var(--ui-color-surface);
188
+ }
189
+
190
+ /* ═══════════════════════════════════════════════════════════════════════════ */
191
+ /* SUB-COMPONENT: message bubble */
192
+ /* ═══════════════════════════════════════════════════════════════════════════ */
193
+ .llm-chat-message {
194
+ display: block;
195
+ max-width: 85%;
196
+ padding: var(--ui-spacing-3) var(--ui-spacing-4);
197
+ border-radius: var(--ui-radius-lg);
198
+ font-size: var(--ui-font-size-sm);
199
+ line-height: var(--ui-line-height-normal);
200
+ word-wrap: break-word;
201
+ }
202
+
203
+ .llm-chat-message.role-assistant,
204
+ .llm-chat-message.role-system {
205
+ background: var(--ui-color-surface-sunken);
206
+ color: var(--ui-color-text);
207
+ align-self: flex-start;
208
+ }
209
+
210
+ .llm-chat-message.role-user {
211
+ background: var(--ui-color-primary);
212
+ color: var(--ui-color-text-on-primary);
213
+ align-self: flex-end;
214
+ }
215
+
216
+ .llm-chat-message.role-system {
217
+ font-style: italic;
218
+ color: var(--ui-color-text-muted);
219
+ }
220
+
221
+ .llm-chat-message.is-failed {
222
+ background: var(--ui-color-surface-sunken);
223
+ border: 1px dashed var(--ui-color-danger);
224
+ color: var(--ui-color-text);
225
+ }
226
+
227
+ /* ═══════════════════════════════════════════════════════════════════════════ */
228
+ /* SUB-COMPONENT: typing indicator */
229
+ /* ═══════════════════════════════════════════════════════════════════════════ */
230
+ .llm-chat-typing {
231
+ display: inline-flex;
232
+ align-items: center;
233
+ gap: var(--ui-spacing-1);
234
+ padding: var(--ui-spacing-2) var(--ui-spacing-3);
235
+ background: var(--ui-color-surface-sunken);
236
+ border-radius: var(--ui-radius-lg);
237
+ align-self: flex-start;
238
+ }
239
+
240
+ .llm-chat-typing .dot {
241
+ width: 0.375rem;
242
+ height: 0.375rem;
243
+ border-radius: 50%;
244
+ background: var(--ui-color-text-muted);
245
+ animation: llm-chat-typing 1.4s infinite ease-in-out;
246
+ }
247
+
248
+ .llm-chat-typing .dot:nth-child(2) {
249
+ animation-delay: 0.16s;
250
+ }
251
+
252
+ .llm-chat-typing .dot:nth-child(3) {
253
+ animation-delay: 0.32s;
254
+ }
255
+
256
+ /* Inline cursor variant — drops the bubble chrome so the dots can sit at the
257
+ end of a streaming assistant message. */
258
+ .llm-chat-typing.is-inline {
259
+ display: inline-flex;
260
+ padding: 0;
261
+ margin-left: var(--ui-spacing-1);
262
+ background: transparent;
263
+ border-radius: 0;
264
+ vertical-align: baseline;
265
+ align-self: auto;
266
+ }
267
+
268
+ .llm-chat-typing.is-inline .dot {
269
+ width: 0.25rem;
270
+ height: 0.25rem;
271
+ }
272
+
273
+ @keyframes llm-chat-typing {
274
+ 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
275
+ 30% { opacity: 1; transform: translateY(-2px); }
276
+ }
277
+
278
+ @media (prefers-reduced-motion: reduce) {
279
+ .llm-chat-typing .dot {
280
+ animation: none;
281
+ opacity: 0.6;
282
+ }
283
+ }
284
+
285
+ .llm-chat-typing .sr-only {
286
+ position: absolute;
287
+ width: 1px;
288
+ height: 1px;
289
+ padding: 0;
290
+ margin: -1px;
291
+ overflow: hidden;
292
+ clip: rect(0, 0, 0, 0);
293
+ white-space: nowrap;
294
+ border: 0;
295
+ }
296
+
297
+ /* ═══════════════════════════════════════════════════════════════════════════ */
298
+ /* SUB-COMPONENT: suggestion chip */
299
+ /* ═══════════════════════════════════════════════════════════════════════════ */
300
+ .llm-chat-suggestion {
301
+ display: block;
302
+ }
303
+
304
+ .llm-chat-suggestion .chip {
305
+ display: flex;
306
+ flex-direction: column;
307
+ align-items: flex-start;
308
+ gap: var(--ui-spacing-1);
309
+ width: 100%;
310
+ padding: var(--ui-spacing-3) var(--ui-spacing-4);
311
+ background: var(--ui-color-surface);
312
+ color: var(--ui-color-text);
313
+ border: 1px solid var(--ui-color-border);
314
+ border-radius: var(--ui-radius-lg);
315
+ font-family: var(--ui-font-family);
316
+ text-align: left;
317
+ cursor: pointer;
318
+ transition:
319
+ background-color var(--ui-transition-fast),
320
+ border-color var(--ui-transition-fast);
321
+ }
322
+
323
+ .llm-chat-suggestion .chip:hover {
324
+ background-color: var(--ui-color-surface-sunken);
325
+ border-color: var(--ui-color-border-hover);
326
+ }
327
+
328
+ .llm-chat-suggestion .chip:focus-visible {
329
+ outline: none;
330
+ box-shadow: var(--ui-focus-ring);
331
+ }
332
+
333
+ .llm-chat-suggestion .chip-label {
334
+ font-size: var(--ui-font-size-sm);
335
+ font-weight: var(--ui-font-weight-medium);
336
+ color: var(--ui-color-text);
337
+ }
338
+
339
+ .llm-chat-suggestion .chip-hint {
340
+ font-size: var(--ui-font-size-xs);
341
+ color: var(--ui-color-text-muted);
342
+ }
343
+
344
+ /* ═══════════════════════════════════════════════════════════════════════════ */
345
+ /* SUB-COMPONENT: input footer */
346
+ /* ═══════════════════════════════════════════════════════════════════════════ */
347
+ .llm-chat-input {
348
+ display: flex;
349
+ align-items: flex-end;
350
+ gap: var(--ui-spacing-2);
351
+ padding: var(--ui-spacing-3) var(--ui-spacing-4);
352
+ border-top: 1px solid var(--ui-color-border);
353
+ background: var(--ui-color-surface);
354
+ flex-shrink: 0;
355
+ }
356
+
357
+ .llm-chat-input .field {
358
+ flex: 1;
359
+ min-width: 0;
360
+ padding: var(--ui-spacing-2) var(--ui-spacing-3);
361
+ border: 1px solid var(--ui-color-input-border, var(--ui-color-border));
362
+ border-radius: var(--ui-radius-md);
363
+ background: var(--ui-color-surface-sunken);
364
+ color: var(--ui-color-text);
365
+ font-family: var(--ui-font-family);
366
+ font-size: var(--ui-font-size-sm);
367
+ line-height: var(--ui-line-height-normal);
368
+ resize: none;
369
+ transition: border-color var(--ui-transition-fast);
370
+ }
371
+
372
+ .llm-chat-input .field::placeholder {
373
+ color: var(--ui-color-text-muted);
374
+ }
375
+
376
+ .llm-chat-input .field:hover:not(:disabled) {
377
+ border-color: var(--ui-color-input-border-hover, var(--ui-color-border-hover));
378
+ }
379
+
380
+ .llm-chat-input .field:focus-visible {
381
+ outline: none;
382
+ border-color: var(--ui-color-primary);
383
+ box-shadow: var(--ui-focus-ring);
384
+ }
385
+
386
+ .llm-chat-input .field:disabled {
387
+ opacity: var(--ui-opacity-disabled);
388
+ cursor: not-allowed;
389
+ }
390
+
391
+ .llm-chat-input .action-btn {
392
+ display: inline-flex;
393
+ align-items: center;
394
+ justify-content: center;
395
+ flex-shrink: 0;
396
+ padding: var(--ui-spacing-2) var(--ui-spacing-4);
397
+ border: 1px solid transparent;
398
+ border-radius: var(--ui-radius-md);
399
+ font-family: var(--ui-font-family);
400
+ font-size: var(--ui-font-size-sm);
401
+ font-weight: var(--ui-font-weight-medium);
402
+ cursor: pointer;
403
+ transition:
404
+ background-color var(--ui-transition-fast),
405
+ border-color var(--ui-transition-fast),
406
+ transform var(--ui-transition-fast);
407
+ }
408
+
409
+ .llm-chat-input .action-btn.variant-primary {
410
+ background: var(--ui-color-primary);
411
+ color: var(--ui-color-text-on-primary);
412
+ border-color: var(--ui-color-primary);
413
+ }
414
+
415
+ .llm-chat-input .action-btn.variant-primary:hover:not(:disabled) {
416
+ background: var(--ui-color-primary-hover);
417
+ border-color: var(--ui-color-primary-hover);
418
+ }
419
+
420
+ .llm-chat-input .action-btn.variant-danger {
421
+ background: var(--ui-color-danger);
422
+ color: var(--ui-color-text-on-danger);
423
+ border-color: var(--ui-color-danger);
424
+ }
425
+
426
+ .llm-chat-input .action-btn.variant-danger:hover {
427
+ background: var(--ui-color-danger-hover);
428
+ border-color: var(--ui-color-danger-hover);
429
+ }
430
+
431
+ .llm-chat-input .action-btn:disabled {
432
+ opacity: var(--ui-opacity-disabled);
433
+ cursor: not-allowed;
434
+ }
435
+
436
+ .llm-chat-input .action-btn:focus-visible {
437
+ outline: none;
438
+ box-shadow: var(--ui-focus-ring);
439
+ }
440
+
441
+ /* ═══════════════════════════════════════════════════════════════════════════ */
442
+ /* STATUS-aware tweaks */
443
+ /* ═══════════════════════════════════════════════════════════════════════════ */
444
+ .llm-chat.status-streaming .llm-chat-input .field {
445
+ cursor: wait;
446
+ }
@@ -0,0 +1,123 @@
1
+ .llm-checkbox {
2
+ display: block;
3
+ font-family: var(--ui-font-family);
4
+ font-size: var(--ui-font-size-md);
5
+ }
6
+
7
+ .llm-checkbox label {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ gap: var(--ui-spacing-3);
11
+ cursor: pointer;
12
+ user-select: none;
13
+ color: var(--ui-color-text);
14
+ line-height: var(--ui-line-height-normal);
15
+ min-height: 1.5rem;
16
+ }
17
+
18
+ .llm-checkbox input[type='checkbox'] {
19
+ appearance: none;
20
+ -webkit-appearance: none;
21
+ flex-shrink: 0;
22
+ width: 1.25rem;
23
+ height: 1.25rem;
24
+ border: 1.5px solid var(--ui-color-border-strong);
25
+ border-radius: var(--ui-radius-sm);
26
+ background-color: var(--ui-color-input-bg);
27
+ cursor: pointer;
28
+ position: relative;
29
+ transition: border-color var(--ui-transition-fast),
30
+ background-color var(--ui-transition-fast),
31
+ box-shadow var(--ui-transition-fast);
32
+ outline: none;
33
+ }
34
+
35
+ .llm-checkbox input[type='checkbox']:hover:not(:disabled) {
36
+ border-color: var(--ui-color-primary);
37
+ background-color: var(--ui-color-primary-light);
38
+ }
39
+
40
+ .llm-checkbox input[type='checkbox']:focus-visible {
41
+ box-shadow: var(--ui-focus-ring);
42
+ border-color: var(--ui-color-primary);
43
+ }
44
+
45
+ /* Checked state */
46
+ .llm-checkbox input[type='checkbox']:checked {
47
+ background-color: var(--ui-color-primary);
48
+ border-color: var(--ui-color-primary);
49
+ }
50
+
51
+ .llm-checkbox input[type='checkbox']:checked::after {
52
+ content: '';
53
+ position: absolute;
54
+ inset: 0;
55
+ margin: auto;
56
+ width: 0.35rem;
57
+ height: 0.6rem;
58
+ border: 2px solid var(--ui-color-text-on-primary);
59
+ border-top: none;
60
+ border-left: none;
61
+ transform: rotate(45deg) translate(-1px, -1px);
62
+ animation: llm-check-pop var(--ui-duration-normal) var(--ui-ease-spring);
63
+ }
64
+
65
+ /* Indeterminate state */
66
+ .llm-checkbox input[type='checkbox']:indeterminate {
67
+ background-color: var(--ui-color-primary);
68
+ border-color: var(--ui-color-primary);
69
+ }
70
+
71
+ .llm-checkbox input[type='checkbox']:indeterminate::after {
72
+ content: '';
73
+ position: absolute;
74
+ inset: 0;
75
+ margin: auto;
76
+ width: 0.5rem;
77
+ height: 2px;
78
+ background-color: var(--ui-color-text-on-primary);
79
+ animation: llm-check-pop var(--ui-duration-normal) var(--ui-ease-spring);
80
+ }
81
+
82
+ /* Invalid state */
83
+ .llm-checkbox.is-invalid input[type='checkbox'] {
84
+ border-color: var(--ui-color-input-border-invalid);
85
+ }
86
+
87
+ .llm-checkbox.is-invalid input[type='checkbox']:focus-visible {
88
+ border-color: var(--ui-color-input-border-invalid);
89
+ box-shadow: 0 0 0 2px var(--ui-color-surface), 0 0 0 4px var(--ui-color-danger);
90
+ }
91
+
92
+ /* Disabled state */
93
+ .llm-checkbox.is-disabled {
94
+ opacity: var(--ui-opacity-disabled);
95
+ cursor: not-allowed;
96
+ }
97
+
98
+ .llm-checkbox.is-disabled label {
99
+ cursor: not-allowed;
100
+ }
101
+
102
+ .llm-checkbox.is-disabled input[type='checkbox'] {
103
+ cursor: not-allowed;
104
+ }
105
+
106
+ /* Error messages */
107
+ .llm-checkbox .errors {
108
+ margin-top: var(--ui-spacing-2);
109
+ }
110
+
111
+ .llm-checkbox .error-message {
112
+ margin: 0;
113
+ font-size: var(--ui-font-size-sm);
114
+ color: var(--ui-color-error-text);
115
+ line-height: var(--ui-line-height-normal);
116
+ }
117
+
118
+ /* Animation */
119
+ @keyframes llm-check-pop {
120
+ 0% { transform: rotate(45deg) translate(-1px, -1px) scale(0); }
121
+ 60% { transform: rotate(45deg) translate(-1px, -1px) scale(1.15); }
122
+ 100% { transform: rotate(45deg) translate(-1px, -1px) scale(1); }
123
+ }
@@ -0,0 +1,112 @@
1
+ /* ============================================================
2
+ llm-code-block.css
3
+ ============================================================ */
4
+
5
+ .llm-code-block {
6
+ display: block;
7
+ border: 1px solid var(--ui-color-border);
8
+ border-radius: var(--ui-radius-lg);
9
+ overflow: hidden;
10
+ font-family: var(--ui-font-family);
11
+ }
12
+
13
+ /* ---------------------------------------------------------------------------
14
+ Header
15
+ --------------------------------------------------------------------------- */
16
+
17
+ .code-block-header {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: space-between;
21
+ padding: var(--ui-spacing-3) var(--ui-spacing-4);
22
+ background: var(--ui-color-surface-raised);
23
+ border-bottom: 1px solid var(--ui-color-border);
24
+ min-height: 2.5rem;
25
+ }
26
+
27
+ .code-block-label {
28
+ font-family: var(--ui-font-mono, 'Menlo', 'Monaco', 'Courier New', monospace);
29
+ font-size: 0.72rem;
30
+ font-weight: 600;
31
+ letter-spacing: 0.03em;
32
+ color: var(--ui-color-text-muted);
33
+ text-transform: lowercase;
34
+ user-select: none;
35
+ }
36
+
37
+ /* ---------------------------------------------------------------------------
38
+ Copy button
39
+ --------------------------------------------------------------------------- */
40
+
41
+ .code-block-copy {
42
+ display: inline-flex;
43
+ align-items: center;
44
+ gap: 0.3rem;
45
+ padding: 0.2rem 0.55rem;
46
+ border: 1px solid var(--ui-color-border);
47
+ border-radius: var(--ui-radius-sm);
48
+ background: transparent;
49
+ color: var(--ui-color-text-muted);
50
+ font-family: inherit;
51
+ font-size: 0.72rem;
52
+ font-weight: 500;
53
+ cursor: pointer;
54
+ transition: color var(--ui-transition-fast), background var(--ui-transition-fast), border-color var(--ui-transition-fast);
55
+ white-space: nowrap;
56
+ }
57
+
58
+ .code-block-copy:hover {
59
+ color: var(--ui-color-text);
60
+ background: var(--ui-color-surface);
61
+ border-color: var(--ui-color-input-border);
62
+ }
63
+
64
+ .code-block-copy:focus-visible {
65
+ outline: none;
66
+ box-shadow: var(--ui-focus-ring);
67
+ }
68
+
69
+ /* ---------------------------------------------------------------------------
70
+ Code body
71
+ --------------------------------------------------------------------------- */
72
+
73
+ .code-block-body {
74
+ background: var(--ui-color-surface);
75
+ overflow-x: auto;
76
+ }
77
+
78
+ .code-block-pre {
79
+ margin: 0;
80
+ padding: var(--ui-spacing-4);
81
+ font-family: var(--ui-font-mono, 'Menlo', 'Monaco', 'Courier New', monospace);
82
+ font-size: var(--ui-font-size-sm);
83
+ line-height: 1.65;
84
+ color: var(--ui-color-text);
85
+ white-space: pre;
86
+ tab-size: 2;
87
+ }
88
+
89
+ /* ---------------------------------------------------------------------------
90
+ Line numbers
91
+ --------------------------------------------------------------------------- */
92
+
93
+ .code-line {
94
+ display: flex;
95
+ }
96
+
97
+ .code-line-number {
98
+ display: inline-block;
99
+ min-width: 2rem;
100
+ padding-right: var(--ui-spacing-3);
101
+ color: var(--ui-color-text-muted);
102
+ text-align: right;
103
+ user-select: none;
104
+ border-right: 1px solid var(--ui-color-border);
105
+ margin-right: var(--ui-spacing-3);
106
+ flex-shrink: 0;
107
+ opacity: 0.6;
108
+ }
109
+
110
+ .code-line-text {
111
+ flex: 1;
112
+ }