-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1309 lines (1289 loc) · 46.6 KB
/
Copy pathindex.html
File metadata and controls
1309 lines (1289 loc) · 46.6 KB
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
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Bareforge</title>
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<style>
:root { color-scheme: light dark; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: system-ui, sans-serif; }
x-theme {
display: block;
min-height: 100vh;
background: var(--x-color-bg);
color: var(--x-color-text);
}
#app { min-height: 100vh; }
/* --- chrome layout ------------------------------------------------ */
.chrome {
display: grid;
grid-template-columns: 240px 1fr 320px;
grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
grid-template-areas:
"toolbar toolbar toolbar"
"palette canvas inspector"
"layers canvas inspector";
height: 100vh;
}
/* --- preview mode -------------------------------------------------- */
.chrome[data-mode="preview"] {
grid-template-columns: 1fr;
grid-template-rows: auto minmax(0, 1fr);
grid-template-areas:
"toolbar"
"canvas";
}
.chrome[data-mode="preview"] .panel-palette,
.chrome[data-mode="preview"] .panel-layers,
.chrome[data-mode="preview"] .panel-inspector { display: none; }
.chrome[data-mode="preview"] .canvas-host { padding: 0; }
.chrome[data-mode="preview"] [data-bareforge-container]:empty {
/* Drop the edit-mode placeholder outline + label in preview. */
min-height: 0;
min-width: 0;
margin: 0;
outline: none;
}
.chrome[data-mode="preview"] [data-bareforge-container]:empty::before {
content: none;
}
.panel-layers {
grid-area: layers;
border-top: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.2));
display: flex;
flex-direction: column;
gap: 6px;
}
.panel-inspector { grid-row: palette / span 2; }
.canvas-host { grid-row: palette / span 2; }
/* The toolbar itself is an <x-navbar>; it brings its own
shadow-DOM styling for the navbar shell (background, border,
padding, alignment). Bareforge only needs to place it in the
grid and size the brand logo in the light-DOM brand slot.
`position: relative` + explicit z-index creates a stacking
context above .canvas-host (which is position: relative with
overflow: auto) so the x-menu popup the File button opens
isn't clipped/shadowed by the canvas host below. */
.toolbar {
grid-area: toolbar;
position: relative;
z-index: 20;
}
.toolbar-brand { display: flex; align-items: center; }
.toolbar-brand img { display: block; height: 28px; width: auto; }
.toolbar-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.toolbar-title {
font-size: 13px;
opacity: 0.8;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.85));
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 42ch;
}
.toolbar-divider {
width: 1px;
height: 22px;
margin: 0 6px;
background: var(--x-color-border, rgba(127, 127, 127, 0.35));
}
.toolbar-icon-button span { font-size: 16px; line-height: 1; }
.toolbar-autosave-warn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
margin-left: 6px;
color: var(--x-color-warning, #c97a00);
font-size: 16px;
cursor: help;
}
.toolbar-autosave-warn[hidden] { display: none; }
.panel {
border-right: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.2));
padding: 12px;
overflow: auto;
background: var(--x-color-surface);
/* Tool-panel chrome — labels, item titles, category headers etc.
should never be browser-text-selectable. Without this, dragging
a palette item across other labels paints them with the native
selection highlight and the user has to click somewhere else
to clear it before the next drag works. Native <input>s and
<textarea>s inside the panels (inspector search fields,
text-areas) still allow text selection because they override
user-select by default. */
-webkit-user-select: none;
user-select: none;
}
.panel-palette { grid-area: palette; }
.panel-inspector {
grid-area: inspector;
border-right: none;
border-left: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.2));
}
.canvas-host {
grid-area: canvas;
padding: 24px;
/* Pan is gesture-driven (Space-drag, wheel) rather than native
scroll, so we hide overflow and let the inner x-theme's
transform handle positioning. Cursor reflects the pan-gesture
state via data-pan-armed / data-pan-active. */
overflow: hidden;
position: relative;
}
.canvas-host[data-pan-armed] { cursor: grab; }
.canvas-host[data-pan-active] { cursor: grabbing; }
/* The reconciler renders into #bareforge-canvas-theme. Driving
zoom + pan through CSS variables on this element means the
canvas-view watcher updates three style props per change rather
than rebuilding a transform string each tick. */
#bareforge-canvas-theme {
transform-origin: 0 0;
transform: translate(var(--canvas-pan-x, 0), var(--canvas-pan-y, 0))
scale(var(--canvas-zoom, 1));
}
/* Preview mode neutralises the canvas-view: the page should render
at 1:1 with native scroll, regardless of how the user pans or
zooms in edit mode. Edit-mode state is preserved (no reset on
toggle), so toggling back returns to where they were. */
.chrome[data-mode="preview"] .canvas-host { overflow: auto; }
.chrome[data-mode="preview"] #bareforge-canvas-theme { transform: none; }
/* The zoom indicator is a sibling of <x-theme>, not a descendant,
so the theme's CSS variables don't reach it — use solid values
instead of var() with fallbacks. min-width keeps the chip
readable across the full 25%–400% range without the box
jiggling as digits change. */
/* Contextual alignment bar — a pill at the bottom-center of the
canvas-host, visible only when the selection contains 2+ free-
placement nodes. Sits above the zoom indicator (z-index 200)
and below modals (≥ 1000). The body-level <x-theme> exposes
--x-color-* tokens to every descendant, so the bar uses the
same surface / border / text colours as the chrome panels and
toolbar — fallbacks below for the (rare) case the theme isn't
providing them yet. */
.align-bar {
position: absolute;
left: 50%;
bottom: 16px;
transform: translateX(-50%);
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 6px;
background: var(--x-color-surface, #ffffff);
color: var(--x-color-on-surface, #1a1a1a);
border: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.2));
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
z-index: 210;
user-select: none;
}
.align-bar[data-hidden] { display: none; }
.chrome[data-mode="preview"] .align-bar { display: none; }
.align-bar-divider {
width: 1px;
height: 20px;
margin: 0 2px;
background: var(--x-color-border, rgba(127, 127, 127, 0.2));
}
/* CSS-only tooltip on each align-bar button. We avoid BareDOM's
x-tooltip here because nesting it inside the bar's inline-flex
layout squishes the popover to one character per line. The
`nowrap` keeps the tip on a single line; the inverse-of-surface
colours give it good contrast against the bar regardless of
theme (light theme → dark tip, dark theme → light tip). */
.align-bar-tip {
position: relative;
display: inline-flex;
}
.align-bar-tip[data-tip]:hover::after {
content: attr(data-tip);
position: absolute;
bottom: calc(100% + 6px);
left: 50%;
transform: translateX(-50%);
padding: 3px 8px;
font: 11px/1.4 system-ui, -apple-system, sans-serif;
color: var(--x-color-surface, #ffffff);
background: var(--x-color-on-surface, #1a1a1a);
border-radius: 4px;
white-space: nowrap;
pointer-events: none;
z-index: 220;
animation: align-bar-tip-fade 120ms ease-out 250ms both;
}
@keyframes align-bar-tip-fade {
from { opacity: 0; transform: translate(-50%, 4px); }
to { opacity: 1; transform: translate(-50%, 0); }
}
.canvas-zoom-indicator {
position: absolute;
right: 16px;
bottom: 16px;
min-width: 44px;
padding: 4px 10px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
line-height: 1.4;
text-align: center;
color: #1a1a1a;
background: #ffffff;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 6px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
pointer-events: none;
user-select: none;
z-index: 200;
opacity: 0.92;
}
.chrome[data-mode="preview"] .canvas-zoom-indicator { display: none; }
/* In edit mode, suppress native text selection inside the canvas:
Shift-click and marquee-drag would otherwise paint a browser
text-selection band over the rendered preview, fighting our own
multi-select. Inline text editing has its own textarea overlay,
which we re-enable below. Preview mode leaves selection untouched
so users can interact with their built page normally. */
.chrome[data-mode="edit"] .canvas-host {
user-select: none;
-webkit-user-select: none;
}
.bareforge-inline-edit {
user-select: text;
-webkit-user-select: text;
}
.bareforge-selection-overlay {
position: absolute;
pointer-events: none;
border: 1px solid var(--x-color-primary, #4f46e5);
border-radius: 2px;
box-sizing: border-box;
z-index: 100;
transition: left 80ms ease, top 80ms ease, width 80ms ease, height 80ms ease;
}
.bareforge-selection-overlay[data-hidden] { display: none; }
.chrome[data-mode="preview"] .bareforge-selection-overlay { display: none; }
/* Disable the follow-selection transition while a resize is
in progress; otherwise the overlay visibly lags the handle. */
.bareforge-selection-overlay[data-resizing] {
transition: none;
}
/* Resize handles — hidden by default, revealed based on the
overlay's data-resize-mode. `free` shows all eight; `flow`
shows only the three growth handles (E, S, SE). */
.bareforge-selection-handle {
display: none;
position: absolute;
width: 10px;
height: 10px;
background: var(--x-color-primary, #4f46e5);
border: 1px solid white;
box-sizing: border-box;
pointer-events: auto;
z-index: 1;
}
.bareforge-selection-overlay[data-resize-mode="free"] .bareforge-selection-handle {
display: block;
}
.bareforge-selection-overlay[data-resize-mode="flow"] .bareforge-selection-handle[data-handle="e"],
.bareforge-selection-overlay[data-resize-mode="flow"] .bareforge-selection-handle[data-handle="s"],
.bareforge-selection-overlay[data-resize-mode="flow"] .bareforge-selection-handle[data-handle="se"] {
display: block;
}
.bareforge-selection-handle[data-handle="nw"] { top: -5px; left: -5px; cursor: nw-resize; }
.bareforge-selection-handle[data-handle="n"] { top: -5px; left: 50%; margin-left: -5px; cursor: n-resize; }
.bareforge-selection-handle[data-handle="ne"] { top: -5px; right: -5px; cursor: ne-resize; }
.bareforge-selection-handle[data-handle="e"] { top: 50%; right: -5px; margin-top: -5px; cursor: e-resize; }
.bareforge-selection-handle[data-handle="se"] { bottom: -5px; right: -5px; cursor: se-resize; }
.bareforge-selection-handle[data-handle="s"] { bottom: -5px; left: 50%; margin-left: -5px; cursor: s-resize; }
.bareforge-selection-handle[data-handle="sw"] { bottom: -5px; left: -5px; cursor: sw-resize; }
.bareforge-selection-handle[data-handle="w"] { top: 50%; left: -5px; margin-top: -5px; cursor: w-resize; }
.bareforge-marquee {
position: absolute;
pointer-events: none;
z-index: 99;
border: 1px dashed var(--x-color-primary, #4f46e5);
background: rgba(79, 70, 229, 0.08);
}
/* Smart-alignment guides shown during free-drag. Hot pink because
it's the universal "snapping" colour in design tools and reads
cleanly against any canvas content. Strokes are crisp 1 px
regardless of canvas zoom — they live in canvas-host (untransformed)
and dnd.guides converts doc-space coords to viewport-space using
the current zoom factor. */
.bareforge-snap-guide {
position: absolute;
pointer-events: none;
background: #ec4899;
box-shadow: 0 0 0 0.5px rgba(236, 72, 153, 0.5);
z-index: 98;
}
.bareforge-snap-guide[data-hidden] { display: none; }
.chrome[data-mode="preview"] .bareforge-snap-guide { display: none; }
/* --- cheat sheet ----------------------------------------------- */
/* x-modal carries its own backdrop / panel chrome; we only style
the row + group layout inside the modal body. Typography (kbd,
overline, body2, h3) inherits from the active theme. */
.cheat-group + .cheat-group { margin-top: 18px; }
.cheat-row {
display: grid;
grid-template-columns: 240px 1fr;
gap: 14px;
padding: 4px 0;
align-items: baseline;
}
/* x-command-palette owns its own modal chrome and shadow-DOM
styling — no host-level CSS needed. */
.bareforge-marquee[data-hidden] { display: none; }
.chrome[data-mode="preview"] .bareforge-marquee { display: none; }
.bareforge-inline-edit {
position: absolute;
z-index: 101;
box-sizing: border-box;
background: var(--x-color-bg, #fff);
color: var(--x-color-text, #1a1a1a);
border: 1px dashed var(--x-color-primary, #4f46e5);
outline: none;
resize: none;
overflow: hidden;
padding: 0;
margin: 0;
font: inherit;
}
.chrome[data-mode="preview"] .bareforge-inline-edit { display: none; }
.placeholder-label {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.6px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
}
/* --- palette ------------------------------------------------------ */
.palette-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
margin-bottom: 8px;
}
.panel-palette { display: flex; flex-direction: column; gap: 10px; }
.palette-search { width: 100%; }
.palette-groups { display: flex; flex-direction: column; gap: 6px; }
.palette-category { border-radius: 6px; }
.palette-category-summary {
cursor: pointer;
padding: 6px 4px;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.4px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
list-style: none;
user-select: none;
}
.palette-category[open] .palette-category-summary { color: var(--x-color-text); }
.palette-category-items {
display: flex;
flex-direction: column;
gap: 2px;
padding: 2px 0 6px 0;
}
.palette-item {
display: flex;
flex-direction: column;
gap: 2px;
padding: 6px 8px;
border-radius: 4px;
cursor: pointer;
transition: background 120ms ease;
}
.palette-item:hover {
background: var(--x-color-surface-hover, rgba(127, 127, 127, 0.12));
}
.palette-item:active {
background: var(--x-color-surface-active, rgba(127, 127, 127, 0.2));
}
.palette-item-header {
display: grid;
grid-template-columns: 1fr auto auto;
column-gap: 8px;
align-items: baseline;
}
.palette-item-label { font-size: 13px; font-weight: 500; }
.palette-item-tag {
font-size: 11px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
}
/* Pattern caret + inline flyout (M3.4). The caret rotates when
open so the affordance reads as expand/collapse. */
.palette-item-caret {
font-size: 11px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
cursor: pointer;
padding: 0 4px;
user-select: none;
transition: transform 120ms ease;
}
.palette-item-caret[data-open] { transform: rotate(180deg); }
.palette-patterns {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-top: 6px;
}
.palette-patterns[data-hidden] { display: none; }
.palette-pattern {
font-size: 11px;
padding: 3px 8px;
border-radius: 999px;
background: var(--x-color-surface, rgba(127, 127, 127, 0.1));
color: var(--x-color-text);
border: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.2));
cursor: pointer;
user-select: none;
}
.palette-pattern:hover {
background: var(--x-color-surface-hover, rgba(127, 127, 127, 0.18));
border-color: var(--x-color-primary);
}
.palette-empty {
font-size: 12px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
padding: 12px 4px;
text-align: center;
}
/* --- layers ------------------------------------------------------- */
.layers-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
}
.layers-list {
display: flex;
flex-direction: column;
overflow: auto;
flex: 1;
}
.layers-row {
display: flex;
align-items: baseline;
gap: 8px;
padding: 4px 8px;
font-size: 12px;
cursor: grab;
border-radius: 4px;
user-select: none;
touch-action: none;
}
.layers-row:hover {
background: var(--x-color-surface-hover, rgba(127, 127, 127, 0.12));
}
.layers-row.is-selected {
background: var(--x-color-primary, #4f46e5);
color: #fff;
}
.layers-row.is-selected .layers-row-tag { color: rgba(255, 255, 255, 0.7); }
.layers-row-label { font-weight: 500; }
.layers-row-tag {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 10px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
}
/* --- inspector --------------------------------------------------- */
.panel-inspector { display: flex; flex-direction: column; gap: 10px; }
.inspector-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
}
/* --- right-panel tabs (Inspector / State) ----------------------- */
.right-panel-tabs {
display: flex;
gap: 0;
border-bottom: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.25));
margin-bottom: 4px;
}
.right-panel-tab {
flex: 0 1 auto;
padding: 6px 10px;
border: 0;
border-bottom: 2px solid transparent;
background: transparent;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
font: inherit;
font-size: 12px;
cursor: pointer;
letter-spacing: 0.02em;
}
.right-panel-tab:hover {
color: var(--x-color-text, currentColor);
}
.right-panel-tab[data-active="true"] {
color: var(--x-color-text, currentColor);
border-bottom-color: var(--x-color-primary, #4f46e5);
}
/* --- state panel ------------------------------------------------- */
.state-panel-body {
display: flex;
flex-direction: column;
gap: 12px;
}
.state-panel-body[hidden] { display: none; }
.state-panel-empty {
font-size: 12px;
opacity: 0.65;
padding: 12px 4px;
}
.state-panel-section {
display: flex;
flex-direction: column;
gap: 4px;
padding: 8px 6px;
border: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.25));
border-radius: 4px;
}
.state-panel-section-head {
display: flex;
align-items: baseline;
gap: 8px;
padding-bottom: 4px;
border-bottom: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.2));
}
.state-panel-section-title {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.state-panel-section-kind {
font-size: 10px;
opacity: 0.6;
}
.state-panel-field {
display: flex;
flex-direction: column;
gap: 2px;
padding: 2px 0;
font-size: 11px;
}
.state-panel-field-head {
display: grid;
grid-template-columns: minmax(80px, 1fr) auto auto minmax(0, 2fr);
align-items: baseline;
gap: 6px;
}
.state-panel-name {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.state-panel-type {
font-size: 10px;
opacity: 0.6;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.state-panel-arrow {
opacity: 0.4;
font-size: 11px;
}
.state-panel-value {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 11px;
/* No truncation — short scalars render verbatim and wrap if
needed; collections render as a count summary in this slot
and pretty-print into the .state-panel-detail block below. */
overflow-wrap: anywhere;
word-break: break-word;
}
.state-panel-detail {
margin: 0;
padding: 6px 8px;
max-height: 240px;
overflow: auto;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 10px;
line-height: 1.4;
white-space: pre;
background: var(--x-color-surface-hover, rgba(127, 127, 127, 0.06));
border-left: 2px solid var(--x-color-border, rgba(127, 127, 127, 0.3));
border-radius: 0 3px 3px 0;
opacity: 0.92;
}
.inspector-body { display: flex; flex-direction: column; gap: 16px; }
.inspector-body[hidden] { display: none; }
.inspector-header {
padding-bottom: 8px;
border-bottom: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.2));
}
.inspector-header-label { font-size: 14px; font-weight: 600; }
.inspector-header-tag {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 11px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
}
.inspector-section { display: flex; flex-direction: column; gap: 8px; }
.inspector-section-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.6px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
}
.inspector-field {
display: flex;
flex-direction: column;
gap: 4px;
}
.inspector-field-label {
font-size: 11px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* Numeric labels become drag-to-scrub handles. The `is-scrubbable`
class is added by `pointer-scrub!` only when the widget exposes
a scrub spec, so non-numeric labels keep their default cursor. */
.inspector-field-label.is-scrubbable {
cursor: ew-resize;
user-select: none;
-webkit-user-select: none;
touch-action: none;
}
.inspector-field-widget { width: 100%; }
/* Multi-select shared-attr widgets render the .is-mixed class
when values disagree across the selected nodes. A subtle
border tint plus muted text on the placeholder makes the
state legible without shouting at the user. */
.inspector-field-widget.is-mixed {
opacity: 0.85;
border-style: dashed;
}
/* Compact x-color-picker for the Inspector. Halves the main
colour-area height and tightens the strip heights + gap so a
picker with alpha still fits where the default (alpha-less)
picker used to sit. */
/* `:host{display:inline-block}` by default and its inner
`[part=container]` is sized by `--x-color-picker-width`
(240px). Override both so the picker stretches to fill the
surrounding column, and halve the inner strip/area heights so
a picker with alpha still fits where the default (alpha-less)
picker used to sit. Applies to both the Inspector and the
floating Theme panel — they share the same constraints. */
.inspector-color-picker,
.theme-color-picker {
display: block;
width: 100%;
--x-color-picker-width: 100%;
--x-color-picker-area-height: 80px;
--x-color-picker-strip-height: 10px;
--x-color-picker-gap: 6px;
--x-color-picker-swatch-size: 20px;
}
.inspector-slot {
display: flex;
justify-content: space-between;
font-size: 12px;
padding: 4px 0;
}
.inspector-slot-name { font-weight: 500; }
.inspector-slot-meta {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 11px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
}
.inspector-readonly-value {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
padding: 4px 8px;
border-radius: 4px;
background: var(--x-color-surface-hover, rgba(127, 127, 127, 0.08));
}
.inspector-empty {
font-size: 12px;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
padding: 4px 0;
}
.inspector-empty-state { padding: 12px 4px; text-align: center; }
/* --- inspector fields locked row -------------------------------- */
.inspector-data-row--locked { opacity: 0.55; }
.inspector-data-row--locked .inspector-data-field::before {
content: "🔒 ";
}
.inspector-data-field { font-size: 12px; line-height: 1.3; }
.inspector-data-field--stacked {
display: flex;
flex-direction: column;
gap: 1px;
}
.inspector-data-field-head { font-size: 12px; }
.inspector-data-field-summary {
font-size: 10px;
opacity: 0.65;
}
/* --- inspector bind picker --------------------------------------- */
.inspector-bind-picker {
display: flex;
flex-direction: column;
gap: 4px;
padding: 4px;
border: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.3));
border-radius: 4px;
background: var(--x-color-surface, rgba(255, 255, 255, 0.02));
}
.inspector-bind-picker-body {
display: flex;
flex-direction: column;
gap: 2px;
max-height: 240px;
overflow-y: auto;
}
.inspector-bind-section {
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.04em;
opacity: 0.7;
padding: 6px 4px 2px;
border-bottom: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.25));
}
.inspector-bind-suggestion { padding: 4px 6px; cursor: pointer; border-radius: 2px; }
.inspector-bind-suggestion:hover { background: var(--x-color-surface-hover, rgba(127, 127, 127, 0.08)); }
.inspector-bind-suggestion--dim { opacity: 0.45; }
.inspector-bind-suggestion--setter { padding-left: 16px; opacity: 0.75; font-style: italic; }
.inspector-bind-subsection {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.04em;
opacity: 0.55;
padding: 4px 4px 2px 16px;
}
/* --- inline binding chip + popover ------------------------------- */
.inspector-field-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
min-height: 18px;
}
.inspector-bind-chip {
display: inline-flex;
align-items: center;
gap: 2px;
padding: 1px 6px;
border: 1px solid transparent;
border-radius: 999px;
background: transparent;
font-size: 11px;
font-family: inherit;
color: var(--x-color-text-muted, rgba(127, 127, 127, 0.7));
cursor: pointer;
line-height: 1.4;
}
.inspector-bind-chip:hover {
background: var(--x-color-surface-hover, rgba(127, 127, 127, 0.08));
color: var(--x-color-text, currentColor);
}
.inspector-bind-chip--bound {
border-color: var(--x-color-border, rgba(127, 127, 127, 0.3));
background: var(--x-color-surface-hover, rgba(127, 127, 127, 0.08));
color: var(--x-color-text, currentColor);
cursor: default;
}
.inspector-bind-chip-label {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 10px;
cursor: pointer;
}
.inspector-bind-chip-x {
border: 0;
background: transparent;
color: inherit;
cursor: pointer;
font-size: 13px;
line-height: 1;
padding: 0 2px;
margin-left: 2px;
}
.inspector-bind-chip-x:hover {
color: var(--x-color-danger-fg, #d44);
}
.inspector-bind-popover {
margin-top: 2px;
padding: 4px;
border: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.3));
border-radius: 6px;
background: var(--x-color-surface, rgba(255, 255, 255, 0.04));
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.inspector-bind-popover[hidden] { display: none; }
/* --- inspector events section ------------------------------------ */
.inspector-event-row-wrap { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.inspector-event-hint { font-size: 11px; opacity: 0.55; padding-left: 2px; }
/* --- trigger payload preview ------------------------------------- */
.inspector-payload-preview {
display: flex;
flex-direction: column;
gap: 2px;
margin-top: 2px;
padding: 4px 6px;
border-left: 2px solid var(--x-color-border, rgba(127, 127, 127, 0.3));
background: var(--x-color-surface-hover, rgba(127, 127, 127, 0.05));
border-radius: 0 3px 3px 0;
}
.inspector-payload-head {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.04em;
opacity: 0.7;
}
.inspector-payload-entry {
display: flex;
gap: 6px;
align-items: baseline;
font-size: 11px;
}
.inspector-payload-label {
opacity: 0.65;
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.inspector-payload-detail {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 11px;
}
/* --- inspector actions (multi-step) ------------------------------ */
.inspector-action {
display: flex;
flex-direction: column;
gap: 4px;
padding: 6px 8px;
border: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.25));
border-radius: 4px;
margin-bottom: 6px;
}
.inspector-action-name { font-weight: 600; }
.inspector-action-step {
display: flex;
align-items: center;
gap: 4px;
padding: 2px 4px 2px 12px;
border-left: 2px solid var(--x-color-border, rgba(127, 127, 127, 0.25));
font-size: 12px;
}
.inspector-action-step-label {
flex: 1;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 11px;
}
.inspector-action-add-step {
display: flex;
flex-direction: column;
gap: 4px;
padding: 4px 4px 4px 12px;
border-left: 2px dashed var(--x-color-border, rgba(127, 127, 127, 0.25));
opacity: 0.85;
}
/* --- inspector seed-records table -------------------------------- */
.inspector-field-def { display: flex; flex-direction: column; gap: 4px; }
.inspector-seed-toggle { flex: 0 0 auto; margin-right: 4px; }
.inspector-seed-editor {
display: flex;
flex-direction: column;
gap: 4px;
padding: 4px 0 4px 12px;
border-left: 2px solid var(--x-color-border, rgba(127, 127, 127, 0.3));
}
.inspector-seed-table {
display: flex;
flex-direction: column;
gap: 4px;
}
.inspector-seed-row {
display: flex;
align-items: flex-end;
gap: 8px;
padding: 6px 8px;
border: 1px solid var(--x-color-border, rgba(127, 127, 127, 0.25));
border-radius: 6px;
background: color-mix(in srgb, var(--x-color-surface, #fff) 92%, transparent);
}
.inspector-seed-cells {
display: flex;
flex-wrap: nowrap;
gap: 6px;
flex: 1 1 auto;
min-width: 0;
overflow-x: auto;
}
.inspector-seed-cell-wrap {
display: flex;
flex-direction: column;
gap: 2px;
flex: 1 1 96px;
min-width: 72px;
}
.inspector-seed-caption {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.04em;
opacity: 0.55;
padding-left: 2px;
}
.inspector-seed-cell { width: 100%; }
/* Seed cells aren't searches — hide the leading icon and reclaim
its horizontal space for the input itself. */
.inspector-seed-cell::part(icon) { display: none; }
.inspector-seed-cell::part(wrapper) { padding-inline-start: 0.4rem; }
.inspector-seed-remove {
flex: 0 0 auto;
margin-left: auto;
--x-button-padding-inline: 0.35rem;
}
.inspector-seed-add { display: flex; justify-content: flex-start; }
/* --- drag ghost / drop target ------------------------------------ */
.bareforge-drag-ghost {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
pointer-events: none;
padding: 6px 10px;
font-size: 12px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
background: var(--x-color-primary, #4f46e5);
color: #fff;
border-radius: 4px;
box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
opacity: 0.92;
transition: background 80ms ease, opacity 80ms ease;
}
.bareforge-drag-ghost.is-invalid {
background: #94a3b8;
opacity: 0.55;
}
.bareforge-drop-inside {
outline: 2px dashed var(--x-color-primary, #4f46e5) !important;
outline-offset: 2px;
transition: outline-color 120ms ease;
}
.bareforge-drop-before {
box-shadow: 0 -3px 0 0 var(--x-color-primary, #4f46e5);
}
.bareforge-drop-after {
box-shadow: 0 3px 0 0 var(--x-color-primary, #4f46e5);
}
.bareforge-slot-target {
outline: 2px dashed var(--x-color-primary, #4f46e5);
outline-offset: 2px;