castle-web-cli 0.4.180 → 0.4.182

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.
@@ -1741,113 +1741,11 @@
1741
1741
  padding: 8px 16px 4px;
1742
1742
  }
1743
1743
 
1744
- /* The field styles from here down (.fieldRow through the numpad and checkbox
1745
- rules) are COPIED into cli/src/shell/kitPanels.css, scoped there to
1746
- .castle-params-panel, so the shell's Params view renders identically to this
1747
- inspector. Nothing enforces it -- change one, change the other. See the
1748
- matching note above the field components in ui.jsx. */
1749
- .fieldRow {
1750
- display: grid;
1751
- grid-template-columns: minmax(82px, 0.5fr) minmax(0, 1fr);
1752
- align-items: center;
1753
- gap: 12px;
1754
- padding-bottom: 12px;
1755
- margin-bottom: 0;
1756
- min-height: 28px;
1757
- }
1758
-
1759
- .fieldRow:last-child {
1760
- margin-bottom: 0;
1761
- }
1762
-
1763
- .fieldLabel {
1764
- color: var(--castle-inspector-text);
1765
- font-size: 14px;
1766
- }
1767
-
1768
- /* Instance override: purple label + input border, plus a "Default: X [Reset]"
1769
- sub-line rendered below the control (see FieldRow). */
1770
- .fieldLabelOverridden {
1771
- color: var(--castle-override);
1772
- }
1773
-
1774
- .fieldRowOverridden .input,
1775
- .fieldRowOverridden .select,
1776
- .fieldRowOverridden .textarea,
1777
- .fieldRowOverridden .colorInput,
1778
- .fieldRowOverridden .checkbox {
1779
- border-color: var(--castle-override-border);
1780
- }
1781
-
1782
- .fieldOverride {
1783
- padding-bottom: 12px;
1784
- }
1785
-
1786
- .fieldOverride .fieldRow {
1787
- padding-bottom: 4px;
1788
- }
1789
-
1790
- /* A muted line of explanation under a field, sitting in the control column the
1791
- same way the override sub-line above does. For a prop whose name can't carry
1792
- its own meaning -- see `hint` in a behavior's propertyMeta. */
1793
- .fieldNote {
1794
- display: grid;
1795
- grid-template-columns: minmax(82px, 0.5fr) minmax(0, 1fr);
1796
- gap: 12px;
1797
- margin-top: -6px;
1798
- padding-bottom: 12px;
1799
- }
1800
-
1801
- .fieldNoteInner {
1802
- grid-column: 2;
1803
- min-width: 0;
1804
- font-size: 12px;
1805
- line-height: 1.35;
1806
- color: var(--castle-inspector-muted);
1807
- }
1808
-
1809
- .fieldDefault {
1810
- display: grid;
1811
- grid-template-columns: minmax(82px, 0.5fr) minmax(0, 1fr);
1812
- gap: 12px;
1813
- }
1814
-
1815
- .fieldDefaultInner {
1816
- grid-column: 2;
1817
- display: flex;
1818
- align-items: center;
1819
- gap: 8px;
1820
- min-width: 0;
1821
- font-size: 12px;
1822
- color: var(--castle-inspector-muted);
1823
- }
1824
-
1825
- .fieldDefaultInner > span {
1826
- min-width: 0;
1827
- overflow: hidden;
1828
- text-overflow: ellipsis;
1829
- white-space: nowrap;
1830
- }
1831
-
1832
- .fieldResetBtn {
1833
- margin-left: auto;
1834
- border: 0;
1835
- padding: 0;
1836
- background: transparent;
1837
- color: var(--castle-override);
1838
- font-size: 12px;
1839
- cursor: pointer;
1840
- }
1841
-
1842
- .fieldResetBtn:hover {
1843
- color: var(--castle-inspector-text);
1844
- }
1845
-
1846
- .input,
1744
+ /* --field-border is set by an overridden FieldRow (fields/fields.module.css). */
1847
1745
  .select,
1848
1746
  .textarea {
1849
1747
  width: 100%;
1850
- border: 1px solid var(--castle-inspector-border);
1748
+ border: 1px solid var(--field-border, var(--castle-inspector-border));
1851
1749
  border-radius: var(--castle-radius);
1852
1750
  background: var(--castle-inspector-input-bg);
1853
1751
  color: var(--castle-inspector-text);
@@ -2061,277 +1959,6 @@
2061
1959
  background: var(--castle-inspector-input-bg);
2062
1960
  }
2063
1961
 
2064
- .numberField {
2065
- position: relative;
2066
- width: 100%;
2067
- }
2068
-
2069
- .numberInput {
2070
- padding-right: 22px;
2071
- appearance: textfield;
2072
- -moz-appearance: textfield;
2073
- }
2074
-
2075
- .numberInput::-webkit-inner-spin-button,
2076
- .numberInput::-webkit-outer-spin-button {
2077
- -webkit-appearance: none;
2078
- appearance: none;
2079
- margin: 0;
2080
- }
2081
-
2082
- .numberSteppers {
2083
- position: absolute;
2084
- top: 1px;
2085
- right: 1px;
2086
- bottom: 1px;
2087
- width: 18px;
2088
- display: flex;
2089
- flex-direction: column;
2090
- border-left: 1px solid var(--castle-inspector-divider);
2091
- opacity: 0;
2092
- pointer-events: none;
2093
- transition: opacity 0.1s;
2094
- }
2095
-
2096
- .numberField:hover .numberSteppers,
2097
- .numberField:focus-within .numberSteppers {
2098
- opacity: 1;
2099
- pointer-events: auto;
2100
- }
2101
-
2102
- .numberStepper {
2103
- flex: 1;
2104
- display: flex;
2105
- align-items: center;
2106
- justify-content: center;
2107
- border: 0;
2108
- padding: 0;
2109
- background: transparent;
2110
- color: var(--castle-inspector-muted);
2111
- cursor: pointer;
2112
- font-size: 14px;
2113
- line-height: 1;
2114
- }
2115
-
2116
- .numberStepper:first-child {
2117
- border-bottom: 1px solid var(--castle-inspector-divider);
2118
- }
2119
-
2120
- /* Number fields are drag scrubbers: drag the field to change the value — a bounded
2121
- field (min AND max) maps the pointer across [min,max] like a slider and shows a
2122
- fill; an unbounded field scrubs relatively and into negatives — tap to type. The
2123
- input sits transparent on top and only takes pointer events while editing, so a
2124
- drag reaches the box; a tap focuses it (JS) to raise the keyboard. */
2125
- /* Number fields are drag scrubbers with a tap-to-open custom numpad (no native
2126
- keyboard). A bounded field (min AND max) is a slider with fill + thumb; an
2127
- unbounded one shows a grip and scrubs into negatives. touch-action: pan-y (set
2128
- inline) lets a vertical drag scroll the field list while horizontal scrubs. */
2129
- .numberScrub {
2130
- position: relative;
2131
- display: flex;
2132
- align-items: center;
2133
- gap: 6px;
2134
- overflow: hidden;
2135
- padding: 5px 8px;
2136
- cursor: ew-resize;
2137
- user-select: none;
2138
- -webkit-user-select: none;
2139
- }
2140
-
2141
- .numberSlider {
2142
- cursor: pointer;
2143
- }
2144
-
2145
- .numberValue {
2146
- position: relative;
2147
- z-index: 1;
2148
- flex: 1 1 auto;
2149
- min-width: 0;
2150
- text-align: right;
2151
- font-variant-numeric: tabular-nums;
2152
- }
2153
-
2154
- .scrubGrip {
2155
- position: relative;
2156
- z-index: 1;
2157
- flex: 0 0 auto;
2158
- color: var(--castle-inspector-muted);
2159
- font-size: 12px;
2160
- line-height: 1;
2161
- letter-spacing: -2px;
2162
- opacity: 0.4;
2163
- }
2164
-
2165
- /* Value bubble that floats above the finger while scrubbing (the finger covers the
2166
- field, so the live number needs to show somewhere visible). */
2167
- .scrubBubble {
2168
- position: fixed;
2169
- z-index: 1001;
2170
- transform: translate(-50%, -100%);
2171
- padding: 3px 10px;
2172
- border-radius: 8px;
2173
- background: rgba(20, 24, 30, 0.96);
2174
- border: 1px solid var(--castle-inspector-border);
2175
- color: var(--castle-inspector-text);
2176
- font-size: 15px;
2177
- font-variant-numeric: tabular-nums;
2178
- pointer-events: none;
2179
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
2180
- }
2181
-
2182
- .sliderFill {
2183
- position: absolute;
2184
- left: 0;
2185
- top: 0;
2186
- bottom: 0;
2187
- background: rgba(90, 140, 210, 0.3);
2188
- pointer-events: none;
2189
- z-index: 0;
2190
- }
2191
-
2192
- .sliderThumb {
2193
- position: absolute;
2194
- top: 50%;
2195
- width: 3px;
2196
- height: 60%;
2197
- border-radius: 2px;
2198
- background: rgba(150, 190, 240, 0.95);
2199
- transform: translate(-50%, -50%);
2200
- pointer-events: none;
2201
- z-index: 1;
2202
- }
2203
-
2204
- /* Custom numeric pad, shown as a bottom sheet. */
2205
- .numpadBackdrop {
2206
- position: fixed;
2207
- inset: 0;
2208
- z-index: 1000;
2209
- display: flex;
2210
- flex-direction: column;
2211
- justify-content: flex-end;
2212
- background: rgba(0, 0, 0, 0.35);
2213
- }
2214
-
2215
- .numpadSheet {
2216
- background: var(--castle-inspector-bg, #16181d);
2217
- border-top: 1px solid var(--castle-inspector-border);
2218
- border-radius: 14px 14px 0 0;
2219
- padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
2220
- box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
2221
- }
2222
-
2223
- .numpadValueRow {
2224
- display: flex;
2225
- align-items: baseline;
2226
- justify-content: space-between;
2227
- gap: 12px;
2228
- padding: 6px 8px 12px;
2229
- }
2230
-
2231
- /* Label and number are one value line, not a caption plus a value — same size
2232
- and color. A long label (e.g. "Friction Static") truncates rather than
2233
- pushing the number off, which is why the number never shrinks. */
2234
- .numpadValueLabel {
2235
- color: var(--castle-inspector-text);
2236
- font-size: 22px;
2237
- min-width: 0;
2238
- overflow: hidden;
2239
- text-overflow: ellipsis;
2240
- white-space: nowrap;
2241
- }
2242
-
2243
- .numpadValueNum {
2244
- flex: 0 0 auto;
2245
- color: var(--castle-inspector-text);
2246
- font-size: 22px;
2247
- font-variant-numeric: tabular-nums;
2248
- }
2249
-
2250
- .numpadGrid {
2251
- display: grid;
2252
- grid-template-columns: repeat(4, 1fr);
2253
- gap: 8px;
2254
- }
2255
-
2256
- .numpadKey {
2257
- height: 52px;
2258
- border: 1px solid var(--castle-inspector-border);
2259
- border-radius: 10px;
2260
- background: var(--castle-inspector-input-bg);
2261
- color: var(--castle-inspector-text);
2262
- font-size: 20px;
2263
- cursor: pointer;
2264
- touch-action: manipulation;
2265
- }
2266
-
2267
- .numpadKey:active {
2268
- background: var(--castle-inspector-divider);
2269
- }
2270
-
2271
- .numpadKeyZero {
2272
- grid-column: span 3;
2273
- }
2274
-
2275
- .numpadKeyDone {
2276
- background: rgba(90, 140, 210, 0.9);
2277
- border-color: transparent;
2278
- color: #fff;
2279
- font-size: 16px;
2280
- }
2281
-
2282
- .numberStepper:hover {
2283
- background: var(--castle-inspector-input-bg);
2284
- color: var(--castle-inspector-text);
2285
- }
2286
-
2287
- .numberStepper:disabled {
2288
- opacity: 0.3;
2289
- cursor: default;
2290
- background: transparent;
2291
- }
2292
-
2293
- .colorInput {
2294
- width: 100%;
2295
- height: 28px;
2296
- border: 1px solid var(--castle-inspector-border);
2297
- border-radius: var(--castle-radius);
2298
- background: var(--castle-inspector-input-bg);
2299
- padding: 2px;
2300
- outline: 0;
2301
- cursor: pointer;
2302
- }
2303
-
2304
- .checkbox {
2305
- width: 20px;
2306
- height: 20px;
2307
- flex: 0 0 auto;
2308
- justify-self: end;
2309
- border: 1px solid var(--castle-inspector-border);
2310
- border-radius: var(--castle-radius);
2311
- background: var(--castle-inspector-input-bg);
2312
- padding: 0;
2313
- cursor: pointer;
2314
- display: flex;
2315
- align-items: center;
2316
- justify-content: center;
2317
- box-shadow: none;
2318
- color: var(--castle-text);
2319
- }
2320
-
2321
- .checkboxOn {
2322
- background: var(--castle-black);
2323
- }
2324
-
2325
- .checkboxMark {
2326
- display: none;
2327
- width: 12px;
2328
- height: 12px;
2329
- }
2330
-
2331
- .checkboxOn .checkboxMark {
2332
- display: block;
2333
- }
2334
-
2335
1962
  .textarea {
2336
1963
  min-height: 0;
2337
1964
  resize: vertical;
@@ -7,7 +7,7 @@
7
7
  "palette": "node scripts/palette.mjs",
8
8
  "restart": "node ../../cli/dist/index.js restart .",
9
9
  "screenshot": "node ../../cli/dist/index.js screenshot .",
10
- "check": "eslint . && jscpd && node --input-type=module -e \"const { bundleProject } = await import('../../cli/dist/bundle.js'); await bundleProject('.');\""
10
+ "check": "node ../../scripts/sync-shared.mjs --check && eslint . && jscpd && node --input-type=module -e \"const { bundleProject } = await import('../../cli/dist/bundle.js'); await bundleProject('.');\""
11
11
  },
12
12
  "jscpd": {
13
13
  "path": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "castle-web-cli",
3
- "version": "0.4.180",
3
+ "version": "0.4.182",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/castle-xyz/castle-experimental-web.git"
@@ -12,7 +12,7 @@
12
12
  "scripts": {
13
13
  "build": "rm -rf dist && tsc && chmod +x dist/index.js && vite build && cp -R src/castle-host dist/castle-host && chmod -R u+w kits 2>/dev/null; rm -rf kits && cp -R ../kits kits && chmod -R u+w kits && rm -rf kits/*/imports",
14
14
  "dev": "tsc --watch",
15
- "check": "node ../scripts/sync-tokens.mjs --check && node ../scripts/tests/icon-registry.mjs && node ../scripts/tests/sandbox-graphql-fields.mjs && eslint . && jscpd && tsc --noEmit && tsc --noEmit -p src/shell/tsconfig.json"
15
+ "check": "node ../scripts/sync-shared.mjs --check && node ../scripts/tests/icon-registry.mjs && node ../scripts/tests/sandbox-graphql-fields.mjs && eslint . && jscpd && tsc --noEmit && tsc --noEmit -p src/shell/tsconfig.json"
16
16
  },
17
17
  "jscpd": {
18
18
  "path": [
@@ -21,6 +21,7 @@
21
21
  "ignore": [
22
22
  "src/castle-host/**",
23
23
  "src/shell/castle-patterns.css",
24
+ "src/shell/fields/**",
24
25
  "src/shell/icons.ts"
25
26
  ],
26
27
  "threshold": 0,