@compose-market/theme 0.1.6 → 0.1.8

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.
@@ -1,7 +1,772 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Card } from "../entity";
3
3
  import { cx } from "../internal/cx";
4
- export const mirrorStyles = "";
4
+ export const mirrorStyles = /* css */ `
5
+ .cm-mirror-pane {
6
+ container-type: inline-size;
7
+ display: flex;
8
+ flex-direction: column;
9
+ width: 100%;
10
+ height: 100%;
11
+ min-width: 0;
12
+ min-height: 0;
13
+ overflow: hidden;
14
+ border: 1px solid hsl(var(--primary) / 0.18);
15
+ border-radius: 16px;
16
+ background:
17
+ linear-gradient(145deg, hsl(226 21% 23% / 0.42), hsl(221 50% 9% / 0.34)),
18
+ radial-gradient(circle at 18% 0%, hsl(var(--primary) / 0.09), transparent 34%),
19
+ hsl(224 36% 13% / 0.24);
20
+ box-shadow:
21
+ inset 0 1px 0 hsl(0 0% 100% / 0.06),
22
+ 0 0 34px hsl(var(--primary) / 0.06);
23
+ color: hsl(var(--foreground));
24
+ font-family: var(--font-sans), sans-serif;
25
+ backdrop-filter: blur(16px) saturate(1.12);
26
+ }
27
+
28
+ .cm-mirror-pane *,
29
+ .cm-mirror-pane *::before,
30
+ .cm-mirror-pane *::after {
31
+ box-sizing: border-box;
32
+ }
33
+
34
+ .cm-mirror-pane__toolbar {
35
+ flex: 0 0 auto;
36
+ display: flex;
37
+ align-items: center;
38
+ gap: 0.35rem;
39
+ min-height: 2.95rem;
40
+ padding: 0.38rem 0.45rem;
41
+ border-bottom: 1px solid hsl(var(--primary) / 0.1);
42
+ background: hsl(221 50% 9% / 0.28);
43
+ }
44
+
45
+ .cm-mirror-pane__toolbar-btn {
46
+ display: inline-flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ gap: 0.4rem;
50
+ min-width: 2.1rem;
51
+ min-height: 2.1rem;
52
+ padding: 0 0.58rem;
53
+ border: 1px solid transparent;
54
+ border-radius: 999px;
55
+ background: transparent;
56
+ color: hsl(var(--muted-foreground));
57
+ cursor: pointer;
58
+ font-family: var(--font-mono), monospace;
59
+ font-size: 0.68rem;
60
+ font-weight: 700;
61
+ letter-spacing: 0.08em;
62
+ text-transform: uppercase;
63
+ transition:
64
+ transform 160ms ease,
65
+ border-color 180ms ease,
66
+ background-color 180ms ease,
67
+ color 180ms ease,
68
+ box-shadow 180ms ease;
69
+ }
70
+
71
+ .cm-mirror-pane__toolbar-btn:hover,
72
+ .cm-mirror-pane__toolbar-btn:focus-visible {
73
+ outline: none;
74
+ color: hsl(var(--foreground));
75
+ border-color: hsl(var(--primary) / 0.2);
76
+ background: hsl(var(--primary) / 0.08);
77
+ }
78
+
79
+ .cm-mirror-pane__toolbar-btn--active-cyan {
80
+ border-color: hsl(var(--primary) / 0.36);
81
+ background: hsl(var(--primary) / 0.12);
82
+ color: hsl(var(--primary));
83
+ box-shadow: 0 0 18px hsl(var(--primary) / 0.12);
84
+ }
85
+
86
+ .cm-mirror-pane__toolbar-btn--active-fuchsia {
87
+ border-color: hsl(var(--accent) / 0.34);
88
+ background: hsl(var(--accent) / 0.11);
89
+ color: hsl(var(--accent));
90
+ box-shadow: 0 0 18px hsl(var(--accent) / 0.1);
91
+ }
92
+
93
+ .cm-mirror-pane__toolbar-btn svg {
94
+ width: 1rem;
95
+ height: 1rem;
96
+ }
97
+
98
+ .cm-mirror-pane__toolbar-label {
99
+ display: none;
100
+ }
101
+
102
+ @container (min-width: 24rem) {
103
+ .cm-mirror-pane__toolbar-label {
104
+ display: inline;
105
+ }
106
+ }
107
+
108
+ .cm-mirror-pane__body {
109
+ flex: 1 1 auto;
110
+ display: grid;
111
+ grid-template-rows: auto minmax(0, 1fr);
112
+ align-content: stretch;
113
+ gap: clamp(0.42rem, 1.45cqi, 0.68rem);
114
+ min-width: 0;
115
+ min-height: 0;
116
+ overflow: hidden;
117
+ padding: clamp(0.52rem, 1.65cqi, 0.78rem);
118
+ }
119
+
120
+ .cm-mirror-pane__card {
121
+ border: 0;
122
+ background: transparent;
123
+ box-shadow: none;
124
+ backdrop-filter: none;
125
+ }
126
+
127
+ .cm-mirror-pane__card > .cm-card__body {
128
+ height: auto;
129
+ min-height: 0;
130
+ padding: 0;
131
+ gap: 0.42rem;
132
+ grid-template-rows: auto;
133
+ }
134
+
135
+ .cm-mirror-pane__card .cm-card__header {
136
+ align-items: center;
137
+ gap: clamp(0.48rem, 1.4cqi, 0.68rem);
138
+ }
139
+
140
+ .cm-mirror-pane__card .cm-card__title-row {
141
+ display: block;
142
+ min-width: 0;
143
+ }
144
+
145
+ .cm-mirror-pane__card .cm-card__identity {
146
+ display: grid;
147
+ grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
148
+ align-items: center;
149
+ gap: 0.16rem;
150
+ min-height: clamp(2.85rem, 7.2cqi, 3.15rem);
151
+ max-height: clamp(2.85rem, 7.2cqi, 3.15rem);
152
+ min-width: 0;
153
+ }
154
+
155
+ .cm-mirror-pane__card .cm-card__title,
156
+ .cm-mirror-pane__card-title {
157
+ display: block;
158
+ min-width: 0;
159
+ max-width: 100%;
160
+ font-size: clamp(0.96rem, 4.6cqi, 1.16rem);
161
+ line-height: 1.05;
162
+ overflow: hidden;
163
+ text-overflow: ellipsis;
164
+ white-space: nowrap;
165
+ }
166
+
167
+ .cm-mirror-pane__card .cm-card__subtitle {
168
+ display: block;
169
+ min-width: 0;
170
+ overflow: hidden;
171
+ text-overflow: ellipsis;
172
+ white-space: nowrap;
173
+ }
174
+
175
+ .cm-mirror-pane__model-meta-row {
176
+ display: grid;
177
+ grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
178
+ align-items: center;
179
+ gap: 0.36rem;
180
+ min-width: 0;
181
+ width: 100%;
182
+ max-width: 100%;
183
+ }
184
+
185
+ .cm-mirror-pane__provider {
186
+ display: block;
187
+ min-width: 0;
188
+ max-width: min(9rem, 38cqi);
189
+ overflow: hidden;
190
+ color: hsl(var(--muted-foreground));
191
+ font-family: var(--font-mono), monospace;
192
+ font-size: 0.74rem;
193
+ line-height: 1.1;
194
+ text-overflow: ellipsis;
195
+ white-space: nowrap;
196
+ }
197
+
198
+ .cm-mirror-pane__type-list {
199
+ display: flex;
200
+ align-items: center;
201
+ gap: 0.28rem;
202
+ min-width: 0;
203
+ overflow: hidden;
204
+ }
205
+
206
+ .cm-mirror-pane__type-list > .cm-hint,
207
+ .cm-mirror-pane__type-list > .cm-hint > .cm-hint__trigger,
208
+ .cm-mirror-pane__io-badges > .cm-hint,
209
+ .cm-mirror-pane__io-badges > .cm-hint > .cm-hint__trigger {
210
+ min-width: 0;
211
+ max-width: 100%;
212
+ }
213
+
214
+ .cm-mirror-pane__type-list > .cm-hint {
215
+ flex: 0 1 auto;
216
+ }
217
+
218
+ .cm-mirror-pane__type-badge {
219
+ display: inline-grid;
220
+ grid-template-columns: auto minmax(0, 1fr);
221
+ align-items: center;
222
+ gap: 0.24rem;
223
+ min-width: 0;
224
+ max-width: 100%;
225
+ min-height: 1.32rem;
226
+ max-height: 1.32rem;
227
+ padding: 0 0.42rem;
228
+ border: 1px solid hsl(var(--accent) / 0.24);
229
+ border-radius: 999px;
230
+ background: hsl(var(--accent) / 0.1);
231
+ color: hsl(var(--accent));
232
+ font-family: var(--font-mono), monospace;
233
+ font-size: 0.62rem;
234
+ font-weight: 800;
235
+ letter-spacing: 0.05em;
236
+ line-height: 1;
237
+ text-transform: uppercase;
238
+ }
239
+
240
+ .cm-mirror-pane__type-badge[data-tone="cyan"] {
241
+ border-color: hsl(var(--primary) / 0.24);
242
+ background: hsl(var(--primary) / 0.1);
243
+ color: hsl(var(--primary));
244
+ }
245
+
246
+ .cm-mirror-pane__type-badge[data-tone="green"] {
247
+ border-color: hsl(142 71% 45% / 0.28);
248
+ background: hsl(142 71% 45% / 0.1);
249
+ color: hsl(142 71% 55%);
250
+ }
251
+
252
+ .cm-mirror-pane__type-badge > span:last-child {
253
+ min-width: 0;
254
+ overflow: hidden;
255
+ text-overflow: ellipsis;
256
+ white-space: nowrap;
257
+ }
258
+
259
+ .cm-mirror-pane__type-icon {
260
+ width: 0.72rem;
261
+ height: 0.72rem;
262
+ flex: 0 0 auto;
263
+ }
264
+
265
+ .cm-mirror-pane__card .cm-card__meta {
266
+ display: grid;
267
+ grid-template-columns: repeat(2, minmax(0, 1fr));
268
+ align-items: center;
269
+ gap: 0.34rem;
270
+ width: 100%;
271
+ }
272
+
273
+ .cm-mirror-pane__card .cm-card__meta-chip {
274
+ width: 100%;
275
+ min-height: 1.46rem;
276
+ max-height: 1.46rem;
277
+ justify-content: center;
278
+ padding: 0.18rem 0.48rem;
279
+ font-size: 0.68rem;
280
+ }
281
+
282
+ .cm-mirror-pane__model-id {
283
+ display: none;
284
+ }
285
+
286
+ .cm-mirror-pane__model-icon-box {
287
+ display: grid;
288
+ width: clamp(2.85rem, 7.2cqi, 3.15rem);
289
+ height: clamp(2.85rem, 7.2cqi, 3.15rem);
290
+ place-items: center;
291
+ flex: 0 0 auto;
292
+ border: 1px solid hsl(var(--primary) / 0.24);
293
+ border-radius: 12px;
294
+ background: hsl(var(--primary) / 0.09);
295
+ color: hsl(var(--primary));
296
+ box-shadow: inset 0 0 18px hsl(var(--primary) / 0.08);
297
+ }
298
+
299
+ .cm-mirror-pane__model-icon-box svg {
300
+ width: 1.16rem;
301
+ height: 1.16rem;
302
+ }
303
+
304
+ .cm-mirror-pane__content {
305
+ display: grid;
306
+ min-width: 0;
307
+ min-height: 0;
308
+ overflow: hidden;
309
+ }
310
+
311
+ .cm-mirror-pane__details,
312
+ .cm-mirror-pane__custom-content {
313
+ display: grid;
314
+ gap: clamp(0.38rem, 1.25cqi, 0.58rem);
315
+ min-width: 0;
316
+ min-height: 0;
317
+ align-content: start;
318
+ overflow: hidden;
319
+ }
320
+
321
+ .cm-mirror-pane__description,
322
+ .cm-mirror-pane__section,
323
+ .cm-mirror-pane__pricing-compact,
324
+ .cm-mirror-pane__pricing-block,
325
+ .cm-mirror-pane__tool-group,
326
+ .cm-mirror-pane__no-params,
327
+ .cm-mirror-pane__text-area,
328
+ .cm-mirror-pane__field {
329
+ border: 1px solid hsl(var(--primary) / 0.12);
330
+ border-radius: 12px;
331
+ background: hsl(221 50% 9% / 0.3);
332
+ }
333
+
334
+ .cm-mirror-pane__description {
335
+ min-width: 0;
336
+ padding: clamp(0.48rem, 1.35cqi, 0.62rem);
337
+ color: hsl(var(--muted-foreground));
338
+ font-size: 0.84rem;
339
+ line-height: 1.34;
340
+ }
341
+
342
+ .cm-mirror-pane__description .cm-excerpt,
343
+ .cm-mirror-pane__description .cm-excerpt__trigger,
344
+ .cm-mirror-pane__description .cm-excerpt__text,
345
+ .cm-mirror-pane__description .cm-hint,
346
+ .cm-mirror-pane__description .cm-hint__trigger,
347
+ .cm-mirror-pane__description-hint {
348
+ width: 100%;
349
+ min-width: 0;
350
+ }
351
+
352
+ .cm-mirror-pane__section {
353
+ display: grid;
354
+ grid-template-columns: 1.75rem minmax(0, 1fr);
355
+ grid-template-rows: minmax(2.25rem, auto);
356
+ align-items: center;
357
+ gap: 0.4rem;
358
+ min-width: 0;
359
+ min-height: 0;
360
+ overflow: hidden;
361
+ }
362
+
363
+ .cm-mirror-pane__section--compact {
364
+ padding: clamp(0.42rem, 1.25cqi, 0.58rem);
365
+ }
366
+
367
+ .cm-mirror-pane__section-label,
368
+ .cm-mirror-pane__tool-group-label {
369
+ display: inline-flex;
370
+ align-items: center;
371
+ justify-content: center;
372
+ min-width: 0;
373
+ color: hsl(var(--muted-foreground));
374
+ font-family: var(--font-mono), monospace;
375
+ font-size: 0.72rem;
376
+ font-weight: 800;
377
+ letter-spacing: 0.1em;
378
+ line-height: 1.1;
379
+ text-transform: uppercase;
380
+ overflow: hidden;
381
+ text-overflow: ellipsis;
382
+ white-space: nowrap;
383
+ }
384
+
385
+ .cm-mirror-pane__section--io {
386
+ grid-template-columns: repeat(2, minmax(0, 1fr));
387
+ gap: 0.44rem;
388
+ align-items: stretch;
389
+ }
390
+
391
+ .cm-mirror-pane__io-row,
392
+ .cm-mirror-pane__kv-row,
393
+ .cm-mirror-pane__pricing-header,
394
+ .cm-mirror-pane__tool-toggle {
395
+ min-width: 0;
396
+ min-height: 1.8rem;
397
+ }
398
+
399
+ .cm-mirror-pane__io-row {
400
+ display: grid;
401
+ grid-template-columns: 1.55rem minmax(0, 1fr);
402
+ align-items: center;
403
+ gap: 0.42rem;
404
+ min-width: 0;
405
+ }
406
+
407
+ .cm-mirror-pane__io-label,
408
+ .cm-mirror-pane__kv-label {
409
+ display: inline-flex;
410
+ align-items: center;
411
+ justify-content: center;
412
+ min-width: 0;
413
+ color: hsl(var(--muted-foreground));
414
+ font-family: var(--font-mono), monospace;
415
+ font-size: 0.76rem;
416
+ letter-spacing: 0.02em;
417
+ overflow: hidden;
418
+ text-overflow: ellipsis;
419
+ white-space: nowrap;
420
+ }
421
+
422
+ .cm-mirror-pane__io-badges {
423
+ display: flex;
424
+ align-items: center;
425
+ justify-content: flex-start;
426
+ gap: 0.28rem;
427
+ min-width: 0;
428
+ flex-wrap: wrap;
429
+ }
430
+
431
+ .cm-mirror-pane__io-badges > .cm-hint {
432
+ flex: 0 1 auto;
433
+ }
434
+
435
+ .cm-mirror-pane__icon-label {
436
+ display: inline-flex;
437
+ align-items: center;
438
+ justify-content: center;
439
+ width: 1.35rem;
440
+ height: 1.35rem;
441
+ min-width: 1.35rem;
442
+ border: 1px solid hsl(var(--primary) / 0.22);
443
+ border-radius: 999px;
444
+ background: hsl(var(--primary) / 0.08);
445
+ color: hsl(var(--primary));
446
+ }
447
+
448
+ .cm-mirror-pane__icon-svg {
449
+ width: 0.82rem;
450
+ height: 0.82rem;
451
+ }
452
+
453
+ .cm-mirror-pane__badge {
454
+ display: inline-grid;
455
+ grid-template-columns: auto minmax(0, 1fr);
456
+ align-items: center;
457
+ justify-content: center;
458
+ gap: 0.24rem;
459
+ min-width: 0;
460
+ min-height: 1.36rem;
461
+ max-height: 1.36rem;
462
+ max-width: 100%;
463
+ border: 1px solid hsl(var(--primary) / 0.18);
464
+ border-radius: 999px;
465
+ background: hsl(var(--primary) / 0.08);
466
+ color: hsl(var(--primary));
467
+ padding: 0 0.42rem;
468
+ font-family: var(--font-mono), monospace;
469
+ font-size: 0.62rem;
470
+ font-weight: 800;
471
+ letter-spacing: 0.06em;
472
+ line-height: 1;
473
+ text-transform: uppercase;
474
+ white-space: nowrap;
475
+ overflow: hidden;
476
+ text-overflow: ellipsis;
477
+ }
478
+
479
+ .cm-mirror-pane__badge > span:last-child {
480
+ min-width: 0;
481
+ overflow: hidden;
482
+ text-overflow: ellipsis;
483
+ white-space: nowrap;
484
+ }
485
+
486
+ .cm-mirror-pane__format-icon {
487
+ width: 0.72rem;
488
+ height: 0.72rem;
489
+ flex: 0 0 auto;
490
+ }
491
+
492
+ .cm-mirror-pane__badge[data-tone="fuchsia"] {
493
+ border-color: hsl(var(--accent) / 0.24);
494
+ background: hsl(var(--accent) / 0.1);
495
+ color: hsl(var(--accent));
496
+ }
497
+
498
+ .cm-mirror-pane__badge[data-tone="green"] {
499
+ border-color: hsl(142 71% 45% / 0.28);
500
+ background: hsl(142 71% 45% / 0.1);
501
+ color: hsl(142 71% 55%);
502
+ }
503
+
504
+ .cm-mirror-pane__badge[data-tone="warning"] {
505
+ border-color: hsl(42 100% 48% / 0.28);
506
+ background: hsl(42 100% 48% / 0.1);
507
+ color: hsl(42 100% 58%);
508
+ }
509
+
510
+ .cm-mirror-pane__badge[data-tone="danger"] {
511
+ border-color: hsl(var(--destructive) / 0.3);
512
+ background: hsl(var(--destructive) / 0.12);
513
+ color: hsl(var(--destructive));
514
+ }
515
+
516
+ .cm-mirror-pane__kv-grid,
517
+ .cm-mirror-pane__pricing-entries {
518
+ display: grid;
519
+ grid-template-columns: repeat(2, minmax(0, 1fr));
520
+ grid-auto-rows: minmax(1.58rem, auto);
521
+ gap: 0.24rem;
522
+ min-width: 0;
523
+ min-height: 0;
524
+ align-content: start;
525
+ }
526
+
527
+ .cm-mirror-pane__kv-row,
528
+ .cm-mirror-pane__pricing-header {
529
+ display: grid;
530
+ grid-template-columns: 1.45rem minmax(0, 1fr);
531
+ align-items: center;
532
+ gap: 0.34rem;
533
+ min-width: 0;
534
+ }
535
+
536
+ .cm-mirror-pane__kv-value {
537
+ min-width: 0;
538
+ color: hsl(var(--foreground));
539
+ font-family: var(--font-mono), monospace;
540
+ font-size: 0.76rem;
541
+ font-weight: 650;
542
+ text-align: right;
543
+ overflow: hidden;
544
+ text-overflow: ellipsis;
545
+ white-space: nowrap;
546
+ }
547
+
548
+ .cm-mirror-pane__kv-value > .cm-hint,
549
+ .cm-mirror-pane__kv-value > .cm-hint > .cm-hint__trigger {
550
+ width: 100%;
551
+ min-width: 0;
552
+ }
553
+
554
+ .cm-mirror-pane__field-value {
555
+ display: inline-flex;
556
+ align-items: baseline;
557
+ justify-content: flex-end;
558
+ gap: 0.26rem;
559
+ width: 100%;
560
+ min-width: 0;
561
+ max-width: 100%;
562
+ }
563
+
564
+ .cm-mirror-pane__field-main {
565
+ min-width: 0;
566
+ overflow: hidden;
567
+ text-overflow: ellipsis;
568
+ white-space: nowrap;
569
+ }
570
+
571
+ .cm-mirror-pane__field-unit {
572
+ flex: 0 1 auto;
573
+ min-width: 0;
574
+ color: hsl(var(--muted-foreground) / 0.72);
575
+ font-size: 0.62rem;
576
+ font-weight: 700;
577
+ letter-spacing: 0.06em;
578
+ line-height: 1;
579
+ overflow: hidden;
580
+ text-overflow: ellipsis;
581
+ text-transform: uppercase;
582
+ white-space: nowrap;
583
+ }
584
+
585
+ .cm-mirror-pane__pricing-compact,
586
+ .cm-mirror-pane__pricing-block,
587
+ .cm-mirror-pane__tool-group {
588
+ display: grid;
589
+ gap: 0.28rem;
590
+ min-width: 0;
591
+ min-height: 0;
592
+ }
593
+
594
+ .cm-mirror-pane__pricing-compact {
595
+ padding: 0;
596
+ }
597
+
598
+ .cm-mirror-pane__pricing-block,
599
+ .cm-mirror-pane__tool-group {
600
+ padding: 0.5rem 0.58rem;
601
+ }
602
+
603
+ .cm-mirror-pane__section--context .cm-mirror-pane__kv-grid,
604
+ .cm-mirror-pane__section--pricing .cm-mirror-pane__pricing-entries {
605
+ gap: 0.22rem;
606
+ }
607
+
608
+ .cm-mirror-pane__section--pricing > .cm-mirror-pane__pricing-compact {
609
+ border: 0;
610
+ background: transparent;
611
+ padding: 0;
612
+ }
613
+
614
+ .cm-mirror-pane__pricing-unit {
615
+ min-width: 0;
616
+ color: hsl(var(--muted-foreground) / 0.72);
617
+ font-family: var(--font-mono), monospace;
618
+ font-size: 0.7rem;
619
+ letter-spacing: 0.08em;
620
+ text-transform: uppercase;
621
+ overflow: hidden;
622
+ text-overflow: ellipsis;
623
+ white-space: nowrap;
624
+ }
625
+
626
+ .cm-mirror-pane__pricing-name {
627
+ min-width: 0;
628
+ color: hsl(var(--accent));
629
+ font-family: var(--font-mono), monospace;
630
+ font-weight: 700;
631
+ overflow: hidden;
632
+ text-overflow: ellipsis;
633
+ white-space: nowrap;
634
+ }
635
+
636
+ .cm-mirror-pane__footer {
637
+ flex: 0 0 auto;
638
+ border-top: 1px solid hsl(var(--primary) / 0.1);
639
+ padding: 0.75rem 1rem;
640
+ }
641
+
642
+ .cm-mirror-pane__empty {
643
+ flex: 1;
644
+ min-height: 14rem;
645
+ display: grid;
646
+ place-items: center;
647
+ align-content: center;
648
+ gap: 0.75rem;
649
+ padding: 1.5rem;
650
+ text-align: center;
651
+ }
652
+
653
+ .cm-mirror-pane__empty-icon {
654
+ display: inline-flex;
655
+ color: hsl(var(--primary));
656
+ opacity: 0.72;
657
+ }
658
+
659
+ .cm-mirror-pane__empty-icon svg {
660
+ width: 2.5rem;
661
+ height: 2.5rem;
662
+ }
663
+
664
+ .cm-mirror-pane__empty-text {
665
+ max-width: 18rem;
666
+ color: hsl(var(--muted-foreground));
667
+ line-height: 1.45;
668
+ }
669
+
670
+ .cm-mirror-pane__tool-group {
671
+ border-color: hsl(var(--primary) / 0.18);
672
+ background: hsl(var(--primary) / 0.05);
673
+ }
674
+
675
+ .cm-mirror-pane__tool-group--fuchsia {
676
+ border-color: hsl(var(--accent) / 0.18);
677
+ background: hsl(var(--accent) / 0.05);
678
+ }
679
+
680
+ .cm-mirror-pane__tool-toggle {
681
+ display: grid;
682
+ grid-template-columns: minmax(0, 1fr) auto;
683
+ align-items: center;
684
+ gap: 0.58rem;
685
+ }
686
+
687
+ .cm-mirror-pane__custom-section {
688
+ display: grid;
689
+ gap: 0.42rem;
690
+ min-width: 0;
691
+ }
692
+
693
+ .cm-mirror-pane__text-area {
694
+ width: 100%;
695
+ min-height: 7rem;
696
+ padding: 0.72rem;
697
+ color: hsl(var(--foreground));
698
+ font-family: var(--font-mono), monospace;
699
+ font-size: 0.86rem;
700
+ resize: vertical;
701
+ }
702
+
703
+ .cm-mirror-pane__field {
704
+ width: 100%;
705
+ min-height: 2.45rem;
706
+ color: hsl(var(--foreground));
707
+ font-family: var(--font-mono), monospace;
708
+ font-size: 0.86rem;
709
+ }
710
+
711
+ .cm-mirror-pane__field:focus,
712
+ .cm-mirror-pane__field:focus-visible,
713
+ .cm-mirror-pane__text-area:focus,
714
+ .cm-mirror-pane__text-area:focus-visible {
715
+ outline: none;
716
+ border-color: hsl(var(--primary) / 0.5);
717
+ box-shadow: 0 0 0 1px hsl(var(--primary) / 0.16);
718
+ }
719
+
720
+ .cm-mirror-pane__param-description,
721
+ .cm-mirror-pane__no-params {
722
+ min-width: 0;
723
+ color: hsl(var(--muted-foreground));
724
+ font-size: 0.86rem;
725
+ line-height: 1.4;
726
+ }
727
+
728
+ .cm-mirror-pane__no-params {
729
+ padding: 1rem;
730
+ text-align: center;
731
+ }
732
+
733
+ @container (max-width: 28rem) {
734
+ .cm-mirror-pane__body {
735
+ gap: 0.54rem;
736
+ padding: 0.62rem;
737
+ }
738
+
739
+ .cm-mirror-pane__section--io {
740
+ grid-template-columns: minmax(0, 1fr);
741
+ }
742
+
743
+ .cm-mirror-pane__io-badges {
744
+ justify-content: flex-start;
745
+ }
746
+ }
747
+
748
+ @container (max-width: 22rem) {
749
+ .cm-mirror-pane__card .cm-card__header {
750
+ grid-template-columns: minmax(0, 1fr);
751
+ }
752
+
753
+ .cm-mirror-pane__model-icon-box {
754
+ display: none;
755
+ }
756
+
757
+ .cm-mirror-pane__tool-toggle {
758
+ grid-template-columns: minmax(0, 1fr);
759
+ align-items: start;
760
+ gap: 0.3rem;
761
+ }
762
+ }
763
+
764
+ @media (prefers-reduced-motion: reduce) {
765
+ .cm-mirror-pane__toolbar-btn {
766
+ transition-duration: 0.01ms !important;
767
+ }
768
+ }
769
+ `;
5
770
  export function MirrorPane({ className, title, subtitle, description, icon, tabs = [], activeTab, onTabChange, badges = [], empty = false, emptyIcon, emptyText, footer, children, ...props }) {
6
771
  const content = empty ? (_jsxs("div", { className: "cm-mirror-pane__empty", children: [emptyIcon ? _jsx("div", { className: "cm-mirror-pane__empty-icon", children: emptyIcon }) : null, emptyText ? _jsx("p", { className: "cm-mirror-pane__empty-text", children: emptyText }) : null] })) : (_jsxs(_Fragment, { children: [(title || subtitle || icon || badges.length > 0) ? (_jsx(Card, { variant: "pane", className: "cm-mirror-pane__card", media: icon ? _jsx("span", { className: "cm-mirror-pane__model-icon-box", children: icon }) : undefined, mediaFallback: icon ? undefined : null, title: title, subtitle: subtitle, description: description, meta: badges.map((badge) => ({ label: badge.label, tone: badge.tone })) })) : null, children ? _jsx("div", { className: "cm-mirror-pane__content", children: children }) : null] }));
7
772
  return (_jsxs("div", { className: cx("cm-mirror-pane", className), ...props, children: [tabs.length > 0 ? (_jsx("div", { className: "cm-mirror-pane__toolbar", children: tabs.map((tab) => (_jsxs("button", { type: "button", className: cx("cm-mirror-pane__toolbar-btn", activeTab === tab.id && `cm-mirror-pane__toolbar-btn--active-${tab.tone || "cyan"}`), onClick: () => onTabChange?.(tab.id), "aria-pressed": activeTab === tab.id, "aria-label": typeof tab.label === "string" ? tab.label : undefined, children: [tab.icon, _jsx("span", { className: "cm-mirror-pane__toolbar-label", children: tab.label })] }, tab.id))) })) : null, _jsx("div", { className: "cm-mirror-pane__body", children: content }), footer ? _jsx("div", { className: "cm-mirror-pane__footer", children: footer }) : null] }));