castle-web-cli 0.4.82 → 0.4.83

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.
@@ -37,6 +37,9 @@
37
37
  --castle-danger: #ff5d5d;
38
38
  --castle-ok: #81e69b;
39
39
  --castle-blue: #8db7ff;
40
+ /* Instance-override indicator: label/reset text + a dimmer input border. */
41
+ --castle-override: #b388ff;
42
+ --castle-override-border: #5b4a80;
40
43
  --castle-radius: 4px;
41
44
  /* Tools/hotbar strip height -- aligned to the inspector "+ Add behavior" row
42
45
  (top+bottom pad + 1px borders + select padding + text line). The text line
@@ -420,6 +423,13 @@
420
423
  background: var(--castle-inspector-input-bg);
421
424
  }
422
425
 
426
+ /* The blueprint of the currently-selected actor: distinct from a direct
427
+ blueprint selection -- just a white border, no thickening/glow. */
428
+ .bpSlotInstance,
429
+ .bpSlotInstance:hover {
430
+ border-color: #fff;
431
+ }
432
+
423
433
  .bpSlot:disabled,
424
434
  .bpActionSlot:disabled {
425
435
  cursor: default;
@@ -549,7 +559,78 @@
549
559
  font-size: 12px;
550
560
  }
551
561
 
562
+ .instanceHeader {
563
+ display: flex;
564
+ flex-direction: column;
565
+ align-items: stretch;
566
+ gap: 12px;
567
+ padding: 14px 16px;
568
+ border-bottom: 1px solid var(--castle-inspector-divider);
569
+ }
570
+
571
+ .instanceHeaderName {
572
+ display: flex;
573
+ align-items: center;
574
+ gap: 8px;
575
+ min-width: 0;
576
+ }
577
+
578
+ .instanceHeaderNameText {
579
+ min-width: 0;
580
+ overflow: hidden;
581
+ text-overflow: ellipsis;
582
+ white-space: nowrap;
583
+ color: var(--castle-inspector-text);
584
+ font-size: 14px;
585
+ font-weight: 400;
586
+ }
587
+
588
+ .instanceHeaderNameStrong {
589
+ font-weight: 600;
590
+ }
591
+
592
+ .instanceHeaderNameCol {
593
+ display: flex;
594
+ flex-direction: column;
595
+ gap: 2px;
596
+ min-width: 0;
597
+ }
598
+
599
+ .instanceHeaderId {
600
+ color: var(--castle-inspector-muted);
601
+ font-size: 12px;
602
+ overflow: hidden;
603
+ text-overflow: ellipsis;
604
+ white-space: nowrap;
605
+ }
606
+
607
+ .revealOverridesButton {
608
+ display: flex;
609
+ align-items: center;
610
+ justify-content: flex-start;
611
+ gap: 8px;
612
+ width: 100%;
613
+ padding: 14px 16px;
614
+ border: 0;
615
+ border-bottom: 1px solid var(--castle-inspector-divider);
616
+ background: transparent;
617
+ color: var(--castle-inspector-muted);
618
+ font-size: 13px;
619
+ text-align: left;
620
+ cursor: pointer;
621
+ }
622
+
623
+ .revealOverridesButton:hover {
624
+ background: var(--castle-inspector-input-bg);
625
+ color: var(--castle-inspector-text);
626
+ }
627
+
552
628
  .instanceForkButton {
629
+ display: inline-flex;
630
+ align-items: center;
631
+ justify-content: center;
632
+ gap: 6px;
633
+ align-self: flex-start;
553
634
  border: 1px solid var(--castle-inspector-border);
554
635
  border-radius: 6px;
555
636
  background: var(--castle-inspector-input-bg);
@@ -675,14 +756,16 @@
675
756
  animation: selOverlayIn 150ms ease;
676
757
  }
677
758
 
759
+ /* Fade only -- no scale. Scaling the full-card overlay about its center made
760
+ an off-center selection's handles slide inward-from-center on every mount
761
+ (most visible re-selecting a different actor after a deselect, where the
762
+ overlay remounts), reading as "animating in from the old position". */
678
763
  @keyframes selOverlayIn {
679
764
  from {
680
765
  opacity: 0;
681
- transform: scale(0.92);
682
766
  }
683
767
  to {
684
768
  opacity: 1;
685
- transform: scale(1);
686
769
  }
687
770
  }
688
771
 
@@ -700,16 +783,10 @@
700
783
  top: 0;
701
784
  }
702
785
 
703
- .selChromeRotate {
704
- position: absolute;
705
- left: 0;
706
- top: 0;
707
- }
708
-
709
786
  .selColliderBox {
710
787
  position: absolute;
711
788
  box-sizing: border-box;
712
- border: 2px solid rgb(141 183 255 / 0.9);
789
+ border: 2px dotted rgb(141 183 255 / 0.9);
713
790
  background: rgb(141 183 255 / 0.14);
714
791
  border-radius: 2px;
715
792
  pointer-events: none;
@@ -723,19 +800,22 @@
723
800
  .selBox {
724
801
  position: absolute;
725
802
  box-sizing: border-box;
726
- border: 2px dashed var(--castle-text);
803
+ border: 2px solid var(--castle-text);
727
804
  border-radius: 3px;
728
805
  opacity: 0.85;
729
806
  pointer-events: none;
730
807
  }
731
808
 
732
- /* Connector stem from the box's right-center edge to the rotate handle. */
809
+ /* Connector stem from the box's right-center edge to the rotate handle. Lives
810
+ in the un-scaled px layer and is rotated about its left-center anchor, so its
811
+ thickness matches the selection box border at any zoom. */
733
812
  .selStem {
734
813
  position: absolute;
735
814
  height: 2px;
736
815
  background: var(--castle-text);
737
- opacity: 0.7;
738
- transform: translateY(-50%);
816
+ opacity: 0.85;
817
+ transform-origin: left center;
818
+ pointer-events: none;
739
819
  }
740
820
 
741
821
  .selScaleHandle {
@@ -949,6 +1029,10 @@
949
1029
  font-weight: 650;
950
1030
  }
951
1031
 
1032
+ .panelTitleOverridden {
1033
+ color: var(--castle-override);
1034
+ }
1035
+
952
1036
  .panelBody {
953
1037
  padding: 8px 16px 4px;
954
1038
  }
@@ -972,6 +1056,63 @@
972
1056
  font-size: 14px;
973
1057
  }
974
1058
 
1059
+ /* Instance override: purple label + input border, plus a "Default: X [Reset]"
1060
+ sub-line rendered below the control (see FieldRow). */
1061
+ .fieldLabelOverridden {
1062
+ color: var(--castle-override);
1063
+ }
1064
+
1065
+ .fieldRowOverridden .input,
1066
+ .fieldRowOverridden .select,
1067
+ .fieldRowOverridden .colorInput {
1068
+ border-color: var(--castle-override-border);
1069
+ }
1070
+
1071
+ .fieldOverride {
1072
+ padding-bottom: 12px;
1073
+ }
1074
+
1075
+ .fieldOverride .fieldRow {
1076
+ padding-bottom: 4px;
1077
+ }
1078
+
1079
+ .fieldDefault {
1080
+ display: grid;
1081
+ grid-template-columns: minmax(82px, 0.5fr) minmax(0, 1fr);
1082
+ gap: 12px;
1083
+ }
1084
+
1085
+ .fieldDefaultInner {
1086
+ grid-column: 2;
1087
+ display: flex;
1088
+ align-items: center;
1089
+ gap: 8px;
1090
+ min-width: 0;
1091
+ font-size: 12px;
1092
+ color: var(--castle-inspector-muted);
1093
+ }
1094
+
1095
+ .fieldDefaultInner > span {
1096
+ min-width: 0;
1097
+ overflow: hidden;
1098
+ text-overflow: ellipsis;
1099
+ white-space: nowrap;
1100
+ }
1101
+
1102
+ .fieldResetBtn {
1103
+ margin-left: auto;
1104
+ border: 0;
1105
+ padding: 0;
1106
+ background: transparent;
1107
+ color: var(--castle-override);
1108
+ font-size: 12px;
1109
+ cursor: pointer;
1110
+ }
1111
+
1112
+ .fieldResetBtn:hover {
1113
+ color: var(--castle-inspector-text);
1114
+ }
1115
+
975
1116
  .input,
976
1117
  .select,
977
1118
  .textarea {
@@ -1145,13 +1286,6 @@
1145
1286
  height: 14px;
1146
1287
  }
1147
1288
 
1148
- .dashedSquareIcon {
1149
- width: 14px;
1150
- height: 14px;
1151
- border: 2px dashed currentColor;
1152
- border-radius: 2px;
1153
- }
1154
-
1155
1289
  .button:hover,
1156
1290
  .iconButton:hover {
1157
1291
  background: var(--castle-inspector-input-bg);
@@ -1868,10 +2002,7 @@
1868
2002
  .mobileOnly,
1869
2003
  .sheetBackdrop,
1870
2004
  .sheetGrab,
1871
- .sheetGrabBar,
1872
- .sheetGrabLabelRow,
1873
- .sheetGrabLabel,
1874
- .sheetGrabHint {
2005
+ .sheetGrabBar {
1875
2006
  display: none;
1876
2007
  }
1877
2008
 
@@ -2049,7 +2180,7 @@
2049
2180
  transition: none;
2050
2181
  }
2051
2182
 
2052
- /* Shared sheet chrome -- grab bar pill + label row. Always visible when sheet is visible. */
2183
+ /* Shared sheet chrome -- grab bar pill. Always visible when sheet is visible. */
2053
2184
  .sheetGrab {
2054
2185
  display: flex;
2055
2186
  flex-direction: column;
@@ -2074,37 +2205,10 @@
2074
2205
  height: 4px;
2075
2206
  border-radius: 999px;
2076
2207
  background: var(--castle-inspector-divider);
2077
- margin: 0 auto 8px;
2208
+ margin: 0 auto;
2078
2209
  flex: 0 0 4px;
2079
2210
  }
2080
2211
 
2081
- .sheetGrabLabelRow {
2082
- display: flex;
2083
- align-items: baseline;
2084
- gap: 8px;
2085
- min-width: 0;
2086
- }
2087
-
2088
- .sheetGrabLabel {
2089
- display: inline;
2090
- font-size: 14px;
2091
- font-weight: 600;
2092
- color: var(--castle-inspector-text);
2093
- overflow: hidden;
2094
- text-overflow: ellipsis;
2095
- white-space: nowrap;
2096
- }
2097
-
2098
- .sheetGrabHint {
2099
- display: inline;
2100
- font-size: 14px;
2101
- color: var(--castle-inspector-muted);
2102
- overflow: hidden;
2103
- text-overflow: ellipsis;
2104
- white-space: nowrap;
2105
- flex: 1;
2106
- }
2107
-
2108
2212
  .sheetBody {
2109
2213
  flex: 1;
2110
2214
  min-height: 0;
@@ -2,12 +2,12 @@
2
2
  "background": "#1a1932",
3
3
  "actors": [
4
4
  {
5
- "id": "pig",
5
+ "id": "cauldron",
6
6
  "blueprint": "blueprints/cauldron.scene",
7
7
  "components": {
8
8
  "Layout": {
9
- "x": 210,
10
- "y": 310
9
+ "x": 200,
10
+ "y": 300
11
11
  }
12
12
  }
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "castle-web-cli",
3
- "version": "0.4.82",
3
+ "version": "0.4.83",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "castle-web": "./dist/index.js"
@@ -23,6 +23,7 @@
23
23
  ]
24
24
  },
25
25
  "dependencies": {
26
+ "@codemirror/commands": "^6.10.4",
26
27
  "@codemirror/lang-javascript": "^6.2.5",
27
28
  "@codemirror/language": "^6.12.3",
28
29
  "@codemirror/state": "^6.6.0",