castle-web-cli 0.4.142 → 0.4.145
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/dist/agent-prompts.d.ts +1 -0
- package/dist/agent-prompts.js +7 -2
- package/dist/agent.js +11 -9
- package/dist/imports.js +44 -4
- package/dist/init.d.ts +4 -0
- package/dist/init.js +63 -26
- package/dist/install.js +4 -0
- package/dist/platformDoc.d.ts +12 -0
- package/dist/platformDoc.js +236 -0
- package/dist/serve.d.ts +3 -0
- package/dist/serve.js +157 -13
- package/dist/serveSecurity.d.ts +5 -1
- package/dist/serveSecurity.js +27 -8
- package/dist/shell/assets/index-BaiRLZ8p.css +1 -0
- package/dist/shell/assets/{index-qbygvQIx.js → index-CbRAepsq.js} +68 -68
- package/dist/shell/index.html +2 -2
- package/kits/blank/CLAUDE.md +198 -0
- package/kits/blank/castle.json +8 -0
- package/kits/blank/index.html +42 -0
- package/kits/blank/package-lock.json +10 -0
- package/kits/blank/package.json +9 -0
- package/kits/physics-2d/CLAUDE.md +44 -4
- package/kits/physics-2d/behaviors/Collider.jsx +21 -0
- package/kits/physics-2d/behaviors/Draggable.jsx +9 -0
- package/kits/physics-2d/behaviors/Layout.jsx +7 -0
- package/kits/physics-2d/behaviors/RigidBody.jsx +6 -0
- package/kits/physics-2d/behaviors/Sprite.jsx +9 -4
- package/kits/physics-2d/editors/BlueprintLibrary.jsx +64 -32
- package/kits/physics-2d/editors/NewBlueprintModal.jsx +69 -0
- package/kits/physics-2d/editors/PlayOnly.jsx +1 -1
- package/kits/physics-2d/editors/SceneEditor.jsx +333 -108
- package/kits/physics-2d/editors/SelectionOverlay.jsx +6 -2
- package/kits/physics-2d/editors/behaviorRegistry.js +78 -5
- package/kits/physics-2d/engine/SceneUI.jsx +2 -2
- package/kits/physics-2d/engine/blueprint.js +212 -15
- package/kits/physics-2d/engine/editorFlags.js +50 -0
- package/kits/physics-2d/engine/files.js +9 -0
- package/kits/physics-2d/engine/liveReload.js +16 -4
- package/kits/physics-2d/engine/panelPrefs.js +78 -0
- package/kits/physics-2d/engine/panelSorting.jsx +84 -0
- package/kits/physics-2d/engine/physics/PhysicsSystem.js +5 -2
- package/kits/physics-2d/engine/physics/matterBridge.js +12 -2
- package/kits/physics-2d/engine/scene.js +94 -3
- package/kits/physics-2d/engine/ui.jsx +157 -4
- package/kits/physics-2d/engine/ui.module.css +615 -1
- package/kits/physics-2d/package-lock.json +78 -1
- package/kits/physics-2d/package.json +4 -0
- package/kits/physics-3d/CLAUDE.md +2 -3
- package/package.json +1 -1
- package/dist/commonInstructions.d.ts +0 -1
- package/dist/commonInstructions.js +0 -26
- package/dist/shell/assets/index-CcVJjnL3.css +0 -1
|
@@ -472,6 +472,83 @@
|
|
|
472
472
|
color: var(--castle-inspector-muted);
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
+
/* Wraps the canvas + its name fallback so the two can occupy the same 36px
|
|
476
|
+
square without the slot's flex layout giving them separate boxes. */
|
|
477
|
+
.bpSlotArt {
|
|
478
|
+
position: relative;
|
|
479
|
+
display: inline-flex;
|
|
480
|
+
align-items: center;
|
|
481
|
+
justify-content: center;
|
|
482
|
+
width: 36px;
|
|
483
|
+
height: 36px;
|
|
484
|
+
flex: 0 0 36px;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* Kept in the tree (so it can re-render into view) but not shown. */
|
|
488
|
+
.bpSlotThumbHidden {
|
|
489
|
+
display: none;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/* The blueprint's name standing in for missing art. At 36px this is a
|
|
493
|
+
glance-level cue for telling one undrawn actor from another, not a label to
|
|
494
|
+
read -- the full name stays on the slot's title. The outer box only centers;
|
|
495
|
+
all the text behavior is on `.bpSlotNameText`. */
|
|
496
|
+
.bpSlotName {
|
|
497
|
+
display: flex;
|
|
498
|
+
align-items: center;
|
|
499
|
+
justify-content: center;
|
|
500
|
+
width: 36px;
|
|
501
|
+
height: 36px;
|
|
502
|
+
overflow: hidden;
|
|
503
|
+
/* No padding: the tile IS the box, and the two pixels it would cost are the
|
|
504
|
+
difference between "Undrawn Hero" breaking at its space and breaking
|
|
505
|
+
mid-word ("Undraw / n Hero"), which reads as damage rather than wrapping. */
|
|
506
|
+
padding: 0;
|
|
507
|
+
border-radius: 3px;
|
|
508
|
+
background: var(--castle-card);
|
|
509
|
+
color: var(--castle-inspector-muted);
|
|
510
|
+
/* Measured, not guessed: at 8px "Undrawn" is 36.7px against a 36px box, so
|
|
511
|
+
it overflowed by less than a pixel and got broken mid-word ("Undraw / n
|
|
512
|
+
Hero") even though the name has a space to break at. 7.5px puts a 7-8
|
|
513
|
+
character word comfortably inside. Genuinely long single words
|
|
514
|
+
("Checkpoint") still break mid-word at any legible size -- that one is
|
|
515
|
+
unavoidable in a 36px square, and reads fine. */
|
|
516
|
+
font-size: 7.5px;
|
|
517
|
+
line-height: 1.12;
|
|
518
|
+
font-weight: 600;
|
|
519
|
+
text-align: center;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/* Two lines, hard cap, ellipsis on the cut. A name that runs past the box has
|
|
523
|
+
to LOOK cut off -- three lines of 8px text in a 36px square is unreadable
|
|
524
|
+
anyway, and silent clipping is indistinguishable from a rendering bug.
|
|
525
|
+
-webkit-box + line-clamp is what puts the ellipsis at the clamp point;
|
|
526
|
+
plain `overflow: hidden` would truncate with no sign that it had.
|
|
527
|
+
|
|
528
|
+
`break-word` and not `anywhere`: the box is barely wider than one short
|
|
529
|
+
word, and `anywhere` breaks eagerly enough to split "Missing Art" into
|
|
530
|
+
"Missin / g Art". `break-word` only breaks a word that cannot fit a line by
|
|
531
|
+
itself, so two-word names split at the space, where the eye expects.
|
|
532
|
+
|
|
533
|
+
The explicit width is what gives the wrap something to break against -- see
|
|
534
|
+
the note in BlueprintThumbnail about anonymous flex items. */
|
|
535
|
+
.bpSlotNameText {
|
|
536
|
+
display: -webkit-box;
|
|
537
|
+
-webkit-line-clamp: 2;
|
|
538
|
+
-webkit-box-orient: vertical;
|
|
539
|
+
width: 100%;
|
|
540
|
+
overflow: hidden;
|
|
541
|
+
overflow-wrap: break-word;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/* The drag preview is as big as the actor, so the name can breathe -- but the
|
|
545
|
+
two-line cap holds there too. */
|
|
546
|
+
.bpSlotNamePreview {
|
|
547
|
+
width: 100%;
|
|
548
|
+
height: 100%;
|
|
549
|
+
font-size: 11px;
|
|
550
|
+
}
|
|
551
|
+
|
|
475
552
|
.bpDragPreview {
|
|
476
553
|
position: fixed;
|
|
477
554
|
z-index: 1000;
|
|
@@ -533,6 +610,296 @@
|
|
|
533
610
|
gap: 8px;
|
|
534
611
|
}
|
|
535
612
|
|
|
613
|
+
/* The New-blueprint modal. Wider than .confirmDialog (it holds a scrolling art
|
|
614
|
+
grid, not a sentence) and capped in height so a deck with a lot of art still
|
|
615
|
+
leaves the buttons on screen. */
|
|
616
|
+
.newBpDialog {
|
|
617
|
+
width: min(460px, calc(100vw - 32px));
|
|
618
|
+
max-height: min(620px, calc(100vh - 48px));
|
|
619
|
+
overflow-y: auto;
|
|
620
|
+
padding: 18px;
|
|
621
|
+
border: 1px solid var(--castle-border);
|
|
622
|
+
border-radius: 10px;
|
|
623
|
+
background: var(--castle-panel-raised);
|
|
624
|
+
color: var(--castle-text);
|
|
625
|
+
box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.newBpLabel {
|
|
629
|
+
display: block;
|
|
630
|
+
margin: 14px 0 6px;
|
|
631
|
+
font-size: 11px;
|
|
632
|
+
font-weight: 600;
|
|
633
|
+
letter-spacing: 0.06em;
|
|
634
|
+
text-transform: uppercase;
|
|
635
|
+
color: var(--castle-inspector-muted);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.newBpInput {
|
|
639
|
+
display: block;
|
|
640
|
+
width: 100%;
|
|
641
|
+
min-width: 0;
|
|
642
|
+
padding: 7px 9px;
|
|
643
|
+
border: 1px solid var(--castle-inspector-border);
|
|
644
|
+
border-radius: 5px;
|
|
645
|
+
background: var(--castle-inspector-input-bg);
|
|
646
|
+
color: var(--castle-text);
|
|
647
|
+
font-size: 13px;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.newBpInput:focus {
|
|
651
|
+
outline: none;
|
|
652
|
+
border-color: var(--castle-selected);
|
|
653
|
+
box-shadow: 0 0 0 1px var(--castle-selected);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/* The Art label and its filter share a row: the filter belongs to the strip
|
|
657
|
+
below it, not to the form above. */
|
|
658
|
+
.newBpArtHead {
|
|
659
|
+
display: flex;
|
|
660
|
+
align-items: baseline;
|
|
661
|
+
justify-content: space-between;
|
|
662
|
+
gap: 12px;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.newBpSearch {
|
|
666
|
+
flex: 0 1 190px;
|
|
667
|
+
min-width: 0;
|
|
668
|
+
margin-bottom: 6px;
|
|
669
|
+
padding: 5px 8px;
|
|
670
|
+
border: 1px solid var(--castle-inspector-border);
|
|
671
|
+
border-radius: 5px;
|
|
672
|
+
background: var(--castle-inspector-input-bg);
|
|
673
|
+
color: var(--castle-text);
|
|
674
|
+
font-size: 12px;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
.newBpSearch:focus {
|
|
678
|
+
outline: none;
|
|
679
|
+
border-color: var(--castle-selected);
|
|
680
|
+
box-shadow: 0 0 0 1px var(--castle-selected);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.newBpTemplates {
|
|
684
|
+
display: grid;
|
|
685
|
+
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
686
|
+
gap: 8px;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.newBpTemplate {
|
|
690
|
+
display: flex;
|
|
691
|
+
flex-direction: column;
|
|
692
|
+
gap: 3px;
|
|
693
|
+
padding: 9px 10px;
|
|
694
|
+
border: 1px solid var(--castle-inspector-border);
|
|
695
|
+
border-radius: 6px;
|
|
696
|
+
background: var(--castle-inspector-input-bg);
|
|
697
|
+
color: var(--castle-text);
|
|
698
|
+
text-align: left;
|
|
699
|
+
cursor: pointer;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.newBpTemplate:hover {
|
|
703
|
+
border-color: var(--castle-inspector-muted);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.newBpTemplateSelected,
|
|
707
|
+
.newBpTemplateSelected:hover {
|
|
708
|
+
border-color: var(--castle-selected);
|
|
709
|
+
box-shadow: 0 0 0 1px var(--castle-selected);
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.newBpTemplateName {
|
|
713
|
+
font-size: 13px;
|
|
714
|
+
font-weight: 600;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.newBpTemplateHint {
|
|
718
|
+
font-size: 11px;
|
|
719
|
+
line-height: 1.35;
|
|
720
|
+
color: var(--castle-inspector-muted);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
/* A grid, capped and scrolled vertically. The choices are a SET to survey --
|
|
724
|
+
you want them all in view at once to compare, which a single row can't do
|
|
725
|
+
past four or five. Vertical is also the axis a scroll wheel already has, so
|
|
726
|
+
overflow needs no wheel remapping the way the belt's row does.
|
|
727
|
+
|
|
728
|
+
The cap is what keeps the modal a fixed size: a deck importing several kits
|
|
729
|
+
scrolls rather than growing a dialog taller than the viewport. */
|
|
730
|
+
.newBpChoiceGrid {
|
|
731
|
+
display: grid;
|
|
732
|
+
grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
|
|
733
|
+
gap: 8px;
|
|
734
|
+
max-height: 268px;
|
|
735
|
+
overflow-y: auto;
|
|
736
|
+
/* Explicit, not incidental: setting only overflow-y makes overflow-x compute
|
|
737
|
+
from `visible` to `auto`, which can surface a stray horizontal scrollbar. */
|
|
738
|
+
overflow-x: hidden;
|
|
739
|
+
overscroll-behavior-y: contain;
|
|
740
|
+
padding: 2px;
|
|
741
|
+
scrollbar-width: thin;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.newBpArtTile {
|
|
745
|
+
display: flex;
|
|
746
|
+
flex-direction: column;
|
|
747
|
+
align-items: center;
|
|
748
|
+
gap: 5px;
|
|
749
|
+
min-width: 0;
|
|
750
|
+
padding: 8px 4px 6px;
|
|
751
|
+
border: 1px solid var(--castle-inspector-border);
|
|
752
|
+
border-radius: 6px;
|
|
753
|
+
background: var(--castle-inspector-input-bg);
|
|
754
|
+
color: var(--castle-text);
|
|
755
|
+
cursor: pointer;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
.newBpArtTile:hover {
|
|
759
|
+
border-color: var(--castle-inspector-muted);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.newBpArtTileSelected,
|
|
763
|
+
.newBpArtTileSelected:hover {
|
|
764
|
+
border-color: var(--castle-selected);
|
|
765
|
+
box-shadow: 0 0 0 1px var(--castle-selected);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/* Up to two lines, then ellipsis. One nowrap line truncated "Blank Drawing"
|
|
769
|
+
to "Blank Drawi..." -- the most important choice in the grid, unreadable to
|
|
770
|
+
save a row of height the grid has anyway. Two lines fit every preset name we
|
|
771
|
+
ship and most of what a kit would add. */
|
|
772
|
+
.newBpArtLabel {
|
|
773
|
+
display: -webkit-box;
|
|
774
|
+
-webkit-line-clamp: 2;
|
|
775
|
+
-webkit-box-orient: vertical;
|
|
776
|
+
max-width: 100%;
|
|
777
|
+
overflow: hidden;
|
|
778
|
+
overflow-wrap: break-word;
|
|
779
|
+
font-size: 10px;
|
|
780
|
+
line-height: 1.2;
|
|
781
|
+
text-align: center;
|
|
782
|
+
color: var(--castle-inspector-muted);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.newBpNoMatch {
|
|
786
|
+
align-self: center;
|
|
787
|
+
padding: 0 6px;
|
|
788
|
+
font-size: 12px;
|
|
789
|
+
color: var(--castle-inspector-muted);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/* Actions mirror the deck-settings overlay in castle-www: a white-to-grey
|
|
793
|
+
gradient pill with a 3px bottom edge for the primary, a translucent
|
|
794
|
+
hairline-bordered pill for the secondary. Both fully rounded. Values are
|
|
795
|
+
literal rather than themed because the point is to MATCH that surface --
|
|
796
|
+
theming them to the editor's tokens is what made them diverge in the first
|
|
797
|
+
place. */
|
|
798
|
+
.newBpSubtitle {
|
|
799
|
+
margin: -4px 0 4px;
|
|
800
|
+
font-size: 12.5px;
|
|
801
|
+
line-height: 1.45;
|
|
802
|
+
color: var(--castle-inspector-muted);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.newBpActions {
|
|
806
|
+
display: flex;
|
|
807
|
+
align-items: center;
|
|
808
|
+
justify-content: flex-end;
|
|
809
|
+
gap: 8px;
|
|
810
|
+
margin-top: 18px;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/* Picking a tile IS the commit, so the only button left is the way out. Left
|
|
814
|
+
aligned: a lone right-aligned button reads as the primary action, which is
|
|
815
|
+
exactly what Cancel is not. */
|
|
816
|
+
.newBpActionsSingle {
|
|
817
|
+
justify-content: flex-start;
|
|
818
|
+
margin-top: 14px;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/* The blueprint's thumbnail, doubling as the way into the sprite editor. The
|
|
822
|
+
pencil sits in the corner rather than replacing the art on hover: on touch
|
|
823
|
+
there is no hover, and the affordance has to be visible before it is
|
|
824
|
+
touched. */
|
|
825
|
+
.editSpriteButton {
|
|
826
|
+
position: relative;
|
|
827
|
+
display: inline-flex;
|
|
828
|
+
align-items: center;
|
|
829
|
+
justify-content: center;
|
|
830
|
+
padding: 0;
|
|
831
|
+
border: 0;
|
|
832
|
+
border-radius: 4px;
|
|
833
|
+
background: none;
|
|
834
|
+
cursor: pointer;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
.editSpriteButton:hover .editSpriteHint,
|
|
838
|
+
.editSpriteButton:focus-visible .editSpriteHint {
|
|
839
|
+
color: #fff;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/* The pencil sits directly on the corner of the art -- no badge behind it. A
|
|
843
|
+
filled circle read as a separate control stuck on top of the thumbnail
|
|
844
|
+
rather than as a hint about the thumbnail, and it covered the art it was
|
|
845
|
+
annotating. Bare glyph: muted at rest, full white on hover.
|
|
846
|
+
|
|
847
|
+
The drop shadow is what lets it stay legible without the badge, since the
|
|
848
|
+
art underneath can be any color. */
|
|
849
|
+
.editSpriteHint {
|
|
850
|
+
position: absolute;
|
|
851
|
+
right: 0;
|
|
852
|
+
bottom: 0;
|
|
853
|
+
display: inline-flex;
|
|
854
|
+
align-items: center;
|
|
855
|
+
justify-content: center;
|
|
856
|
+
color: var(--castle-inspector-muted);
|
|
857
|
+
filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7));
|
|
858
|
+
transition: color 90ms ease-out;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
.editSpriteHint svg {
|
|
862
|
+
width: 9px;
|
|
863
|
+
height: 9px;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
.newBpPrimary {
|
|
867
|
+
display: inline-flex;
|
|
868
|
+
align-items: center;
|
|
869
|
+
justify-content: center;
|
|
870
|
+
padding: 9px 20px;
|
|
871
|
+
border: none;
|
|
872
|
+
border-bottom: 3px solid #aaa;
|
|
873
|
+
border-radius: 999px;
|
|
874
|
+
background: linear-gradient(#fff, #ddd);
|
|
875
|
+
color: #000;
|
|
876
|
+
font-size: 14px;
|
|
877
|
+
font-weight: 500;
|
|
878
|
+
cursor: pointer;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
.newBpPrimary:disabled {
|
|
882
|
+
cursor: default;
|
|
883
|
+
opacity: 0.4;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
.newBpSecondary {
|
|
887
|
+
display: inline-flex;
|
|
888
|
+
align-items: center;
|
|
889
|
+
justify-content: center;
|
|
890
|
+
padding: 9px 20px;
|
|
891
|
+
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
892
|
+
border-radius: 999px;
|
|
893
|
+
background: rgba(255, 255, 255, 0.06);
|
|
894
|
+
color: var(--castle-text);
|
|
895
|
+
font-size: 14px;
|
|
896
|
+
cursor: pointer;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
.newBpSecondary:hover {
|
|
900
|
+
background: rgba(255, 255, 255, 0.1);
|
|
901
|
+
}
|
|
902
|
+
|
|
536
903
|
.blueprintBadge {
|
|
537
904
|
display: inline-flex;
|
|
538
905
|
align-items: center;
|
|
@@ -1030,17 +1397,264 @@
|
|
|
1030
1397
|
align-items: center;
|
|
1031
1398
|
justify-content: space-between;
|
|
1032
1399
|
gap: 12px;
|
|
1033
|
-
padding
|
|
1400
|
+
/* Same TOP padding open or shut, so the title sits at one height and does not
|
|
1401
|
+
jump when a panel is toggled. Only the bottom differs: collapsed centres the
|
|
1402
|
+
row, expanded leaves a smaller gap before the body. */
|
|
1403
|
+
padding: 10px 16px 6px;
|
|
1034
1404
|
border-bottom: 0;
|
|
1405
|
+
/* The row owns the hold-then-drag gesture; without this the browser claims
|
|
1406
|
+
the press for scrolling before the hold completes. */
|
|
1407
|
+
touch-action: none;
|
|
1035
1408
|
color: var(--castle-inspector-text);
|
|
1036
1409
|
font-size: 14px;
|
|
1037
1410
|
font-weight: 650;
|
|
1038
1411
|
}
|
|
1039
1412
|
|
|
1413
|
+
/* The disclosure control fills the title row so the whole row toggles, but it
|
|
1414
|
+
must not swallow the trash button that the inspector absolutely-positions
|
|
1415
|
+
over the panel's top-right -- hence `flex: 0 1 auto` rather than a full-width
|
|
1416
|
+
stretch, and no padding of its own. */
|
|
1417
|
+
/* Collapsed, the header IS the row, so it centres between the row's borders. */
|
|
1418
|
+
.panelHeaderCollapsed {
|
|
1419
|
+
padding-bottom: 10px;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
.panelDisclosure {
|
|
1423
|
+
display: inline-flex;
|
|
1424
|
+
align-items: center;
|
|
1425
|
+
gap: 7px;
|
|
1426
|
+
/* Grows to fill the row so the title sits next to the grip instead of being
|
|
1427
|
+
pushed to the far edge by the header's space-between. */
|
|
1428
|
+
flex: 1 1 auto;
|
|
1429
|
+
min-width: 0;
|
|
1430
|
+
margin: 0;
|
|
1431
|
+
padding: 0 6px 0 0;
|
|
1432
|
+
border: 0;
|
|
1433
|
+
background: none;
|
|
1434
|
+
color: inherit;
|
|
1435
|
+
font: inherit;
|
|
1436
|
+
text-align: left;
|
|
1437
|
+
cursor: pointer;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
.panelDisclosure svg {
|
|
1441
|
+
font-size: 9px;
|
|
1442
|
+
flex: 0 0 auto;
|
|
1443
|
+
opacity: 0.55;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
.panelDisclosure:hover svg {
|
|
1447
|
+
opacity: 1;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
/* The behavior's own one-liner, shown only while collapsed. Muted and pushed
|
|
1451
|
+
right so the eye still lands on the title first -- it answers "is this the
|
|
1452
|
+
panel I want", it is not the panel's name. */
|
|
1453
|
+
.panelSummary {
|
|
1454
|
+
/* The title never shrinks; the summary is what gives way when the row runs
|
|
1455
|
+
out of room, since it is the part with a readable short form. */
|
|
1456
|
+
flex: 0 1 auto;
|
|
1457
|
+
min-width: 0;
|
|
1458
|
+
overflow: hidden;
|
|
1459
|
+
text-overflow: ellipsis;
|
|
1460
|
+
white-space: nowrap;
|
|
1461
|
+
margin-left: 2px;
|
|
1462
|
+
color: var(--castle-inspector-muted);
|
|
1463
|
+
font-size: 12px;
|
|
1464
|
+
font-weight: 400;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
/* Grab handle, left of the disclosure. `touch-action: none` is what makes the
|
|
1468
|
+
hold-then-drag possible on touch: without it the browser claims the gesture
|
|
1469
|
+
for scrolling before the hold completes and the drag never starts. */
|
|
1470
|
+
/* The behavior's source file. Sits at the right end of the header row, inset
|
|
1471
|
+
far enough to clear the remove button the inspector positions absolutely over
|
|
1472
|
+
the panel's top-right corner. */
|
|
1473
|
+
.panelSource {
|
|
1474
|
+
display: inline-flex;
|
|
1475
|
+
align-items: center;
|
|
1476
|
+
justify-content: center;
|
|
1477
|
+
flex: 0 0 auto;
|
|
1478
|
+
padding: 2px;
|
|
1479
|
+
border: 0;
|
|
1480
|
+
background: none;
|
|
1481
|
+
color: var(--castle-inspector-muted);
|
|
1482
|
+
opacity: 0.5;
|
|
1483
|
+
cursor: pointer;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
.panelSource:hover,
|
|
1487
|
+
.panelSource:focus-visible {
|
|
1488
|
+
opacity: 1;
|
|
1489
|
+
color: var(--castle-text);
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
/* The remove button, matched to `.panelSource` beside it: same size, same
|
|
1493
|
+
resting dimness, same fill-in on hover. It was 16px at full inherit colour,
|
|
1494
|
+
which made destroy the loudest thing in a header whose other controls are
|
|
1495
|
+
quiet -- and the mismatch read as two unrelated controls rather than a pair. */
|
|
1496
|
+
/* The on/off switch, leading the trailing controls. Colour carries the state --
|
|
1497
|
+
green and full strength when running, red and dimmed when not -- so a shut
|
|
1498
|
+
panel says which it is without being opened.
|
|
1499
|
+
The glyph is a single FontAwesome path, so the colour is the whole switch
|
|
1500
|
+
rather than just its pill. */
|
|
1501
|
+
.panelPower {
|
|
1502
|
+
display: inline-flex;
|
|
1503
|
+
align-items: center;
|
|
1504
|
+
justify-content: center;
|
|
1505
|
+
flex: 0 0 auto;
|
|
1506
|
+
margin: 0;
|
|
1507
|
+
padding: 2px;
|
|
1508
|
+
border: 0;
|
|
1509
|
+
background: none;
|
|
1510
|
+
color: var(--castle-ok);
|
|
1511
|
+
font-size: 12px;
|
|
1512
|
+
opacity: 1;
|
|
1513
|
+
cursor: pointer;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
.panelPowerOff {
|
|
1517
|
+
color: var(--castle-danger);
|
|
1518
|
+
opacity: 0.6;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
.panelPower:hover,
|
|
1522
|
+
.panelPower:focus-visible {
|
|
1523
|
+
opacity: 1;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
/* An open panel that is switched off: its fields stay fully editable -- tuning
|
|
1527
|
+
a slingshot with it off is the point -- but the state has to be legible while
|
|
1528
|
+
you do it. */
|
|
1529
|
+
.panelBodyOff {
|
|
1530
|
+
opacity: 0.55;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
.panelRemove {
|
|
1534
|
+
display: inline-flex;
|
|
1535
|
+
align-items: center;
|
|
1536
|
+
justify-content: center;
|
|
1537
|
+
flex: 0 0 auto;
|
|
1538
|
+
margin: 0;
|
|
1539
|
+
padding: 2px;
|
|
1540
|
+
border: 0;
|
|
1541
|
+
background: none;
|
|
1542
|
+
color: var(--castle-inspector-muted);
|
|
1543
|
+
opacity: 0.5;
|
|
1544
|
+
line-height: 1;
|
|
1545
|
+
cursor: pointer;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
.panelRemove:hover,
|
|
1549
|
+
.panelRemove:focus-visible {
|
|
1550
|
+
opacity: 1;
|
|
1551
|
+
color: var(--castle-text);
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
/* Matched to the source glyph beside it. Sized through font-size, not width:
|
|
1555
|
+
`Icon` sets an inline `width: 1em`, which no class rule can override. */
|
|
1556
|
+
.panelRemove {
|
|
1557
|
+
font-size: 11px;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
.panelSource {
|
|
1561
|
+
font-size: 11px;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
.panelTitleText {
|
|
1565
|
+
flex: 0 0 auto;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
/* Affordance only: the whole header row carries the drag listeners, so this is
|
|
1569
|
+
a hint rather than a target and can be small. */
|
|
1570
|
+
.panelGrip {
|
|
1571
|
+
display: inline-flex;
|
|
1572
|
+
align-items: center;
|
|
1573
|
+
justify-content: center;
|
|
1574
|
+
flex: 0 0 auto;
|
|
1575
|
+
margin-left: -2px;
|
|
1576
|
+
font-size: 7px;
|
|
1577
|
+
color: var(--castle-inspector-muted);
|
|
1578
|
+
opacity: 0.4;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
.panelGrip:hover {
|
|
1582
|
+
opacity: 1;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
/* `Icon` sizes itself in `em` via an inline style, which no class rule can
|
|
1586
|
+
beat -- so every one of these is sized by the button's font-size, not by a
|
|
1587
|
+
width on the svg. */
|
|
1588
|
+
.panelGrip {
|
|
1589
|
+
font-size: 9px;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
/* Every behavior row. Positioned so the lifted one can be raised above its
|
|
1593
|
+
neighbours while it travels. */
|
|
1594
|
+
.behaviorRow {
|
|
1595
|
+
position: relative;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
/* The row being dragged, following the pointer. It has to read as PICKED UP,
|
|
1599
|
+
not merely highlighted: raised above its neighbours, tilted off the column
|
|
1600
|
+
edge by a shadow, and slightly transparent so the gap it will drop into stays
|
|
1601
|
+
readable underneath it. No transition on this one -- it is pinned to the
|
|
1602
|
+
pointer and any easing shows up as lag. */
|
|
1603
|
+
.behaviorRowDragging {
|
|
1604
|
+
z-index: 3;
|
|
1605
|
+
/* Fully opaque, not merely raised: at 95% the row underneath bled through the
|
|
1606
|
+
title and read as a rendering fault rather than as depth. The shadow and
|
|
1607
|
+
the ring carry the lift instead. */
|
|
1608
|
+
background: var(--castle-panel-raised);
|
|
1609
|
+
box-shadow:
|
|
1610
|
+
0 0 0 1px var(--castle-selected),
|
|
1611
|
+
0 12px 28px rgba(0, 0, 0, 0.6);
|
|
1612
|
+
border-radius: 6px;
|
|
1613
|
+
border-bottom-color: transparent !important;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
.panelDragging {
|
|
1617
|
+
cursor: grabbing;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
.panelDragging .panelGrip {
|
|
1621
|
+
opacity: 1;
|
|
1622
|
+
cursor: grabbing;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1040
1625
|
.panelTitleOverridden {
|
|
1041
1626
|
color: var(--castle-override);
|
|
1042
1627
|
}
|
|
1043
1628
|
|
|
1629
|
+
/* Occasional actions for an OPEN panel, under its title. */
|
|
1630
|
+
.panelLinks {
|
|
1631
|
+
display: flex;
|
|
1632
|
+
align-items: center;
|
|
1633
|
+
gap: 14px;
|
|
1634
|
+
padding: 0 16px 2px;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
.panelLink {
|
|
1638
|
+
margin: 0;
|
|
1639
|
+
padding: 0;
|
|
1640
|
+
border: 0;
|
|
1641
|
+
background: none;
|
|
1642
|
+
color: var(--castle-inspector-muted);
|
|
1643
|
+
font-size: 11.5px;
|
|
1644
|
+
cursor: pointer;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
.panelLink:hover,
|
|
1648
|
+
.panelLink:focus-visible {
|
|
1649
|
+
color: var(--castle-text);
|
|
1650
|
+
text-decoration: underline;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
.panelLinkDanger:hover,
|
|
1654
|
+
.panelLinkDanger:focus-visible {
|
|
1655
|
+
color: var(--castle-danger);
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1044
1658
|
.panelBody {
|
|
1045
1659
|
padding: 8px 16px 4px;
|
|
1046
1660
|
}
|