castle-web-cli 0.4.163 → 0.4.164

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.
@@ -10,8 +10,8 @@
10
10
  <link rel="icon" type="image/png" sizes="32x32" href="/__castle/ide/favicon-32x32.png" />
11
11
  <link rel="icon" type="image/png" sizes="16x16" href="/__castle/ide/favicon-16x16.png" />
12
12
  <link rel="icon" href="/__castle/ide/favicon.ico" sizes="any" />
13
- <script type="module" crossorigin src="/__castle/ide/assets/index-BJO7LVCM.js"></script>
14
- <link rel="stylesheet" crossorigin href="/__castle/ide/assets/index-DfZmu3XC.css">
13
+ <script type="module" crossorigin src="/__castle/ide/assets/index-QtCau5vM.js"></script>
14
+ <link rel="stylesheet" crossorigin href="/__castle/ide/assets/index-CIRBt1qf.css">
15
15
  </head>
16
16
  <body>
17
17
  <div id="root"></div>
@@ -7,7 +7,7 @@
7
7
  "title": "base",
8
8
  "deckId": "yRcmH4_aYllE",
9
9
  "cardId": "zkFdingmIm3m",
10
- "publishedVersion": "2026-09-03T02:17:00.583Z",
10
+ "publishedVersion": "2026-09-04T00:08:13.472Z",
11
11
  "provides": [
12
12
  "castle-web-sdk"
13
13
  ]
@@ -63,8 +63,9 @@ or server `broadcast` to send its raw bytes. Receivers always get those bytes as
63
63
  `Uint8Array`; reconstruct another view type such as `Float32Array` on receipt.
64
64
  Multi-byte values use the sender platform's byte order. Every other payload uses
65
65
  JSON. Client→server messages are capped at 16 KB and server→client messages at
66
- 64 KB, for both JSON and binary frames. A binary frame includes a one-byte protocol
67
- tag. A published server bundle on an older runtime throws
66
+ 64 KB, for both JSON and binary frames. Both caps are on the frame, and a binary
67
+ frame includes a one-byte protocol tag, so the largest payload is one byte under the
68
+ cap. A published server bundle on an older runtime throws
68
69
  `TypeError: This Castle runtime does not support binary multiplayer messages yet.`
69
70
 
70
71
  Server callbacks are the default export from the deck's server entry. They are
@@ -132,7 +132,7 @@
132
132
  "main": "main.jsx",
133
133
  "autoUpdateWhenImported": true,
134
134
  "title": "physics-2d",
135
- "publishedVersion": "2026-09-02T05:55:15.826Z",
135
+ "publishedVersion": "2026-09-04T00:11:30.979Z",
136
136
  "imports": {
137
137
  "castle.base": {
138
138
  "deckId": "yRcmH4_aYllE",
@@ -466,6 +466,30 @@ export function Panel({ title, action, children, overridden = false }) {
466
466
  </section>
467
467
  );
468
468
  }
469
+ // ---------------------------------------------------------------------------
470
+ // THE FIELD SET BELOW IS COPIED INTO THE SHELL. Keep the two in sync by hand.
471
+ //
472
+ // `FieldRow`, `TextField`, `NumberField` (with `NumpadSheet`,
473
+ // `NumberInlineInput`, `snapToStep` and the SCRUB_* constants), `CheckboxField`,
474
+ // `ColorField` and `FieldNote` are ported into
475
+ // `cli/src/shell/paramFields.tsx`, which renders the Params view over a source
476
+ // file's PARAMS object -- so a param scrubs exactly like a behavior prop. Their
477
+ // styles are copied the same way, from `ui.module.css` into
478
+ // `cli/src/shell/kitPanels.css`.
479
+ //
480
+ // It is a copy because there is no seam to share through: the shell cannot
481
+ // import kit code, kits have no shared package, and the SDK ships runtime
482
+ // services with no React in it. Nothing enforces the mirroring, so a change here
483
+ // -- a new field type, a scrub-feel tweak, a fix -- has to be made there too, or
484
+ // the two inspectors drift apart.
485
+ //
486
+ // The shell copy deliberately drops the instance-override chrome (`overridden`,
487
+ // the "Default: X [Reset]" sub-line): a module-level constant has no template to
488
+ // override. Don't port that part back.
489
+ //
490
+ // If you find yourself making this a THIRD copy, make it a shared source instead.
491
+ // ---------------------------------------------------------------------------
492
+
469
493
  // Render the "Default: X" value in an instance override's sub-line.
470
494
  function formatFieldDefault(value) {
471
495
  if (typeof value === 'boolean') return value ? 'On' : 'Off';
@@ -1729,6 +1729,11 @@
1729
1729
  padding: 8px 16px 4px;
1730
1730
  }
1731
1731
 
1732
+ /* The field styles from here down (.fieldRow through the numpad and checkbox
1733
+ rules) are COPIED into cli/src/shell/kitPanels.css, scoped there to
1734
+ .castle-params-panel, so the shell's Params view renders identically to this
1735
+ inspector. Nothing enforces it -- change one, change the other. See the
1736
+ matching note above the field components in ui.jsx. */
1732
1737
  .fieldRow {
1733
1738
  display: grid;
1734
1739
  grid-template-columns: minmax(82px, 0.5fr) minmax(0, 1fr);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "castle-web-cli",
3
- "version": "0.4.163",
3
+ "version": "0.4.164",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "castle-web": "./dist/index.js"
@@ -8,7 +8,7 @@
8
8
  "scripts": {
9
9
  "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",
10
10
  "dev": "tsc --watch",
11
- "check": "eslint . && jscpd && tsc --noEmit && tsc --noEmit -p src/shell/tsconfig.json"
11
+ "check": "node ../scripts/sync-tokens.mjs --check && eslint . && jscpd && tsc --noEmit && tsc --noEmit -p src/shell/tsconfig.json"
12
12
  },
13
13
  "jscpd": {
14
14
  "path": [
@@ -32,6 +32,7 @@
32
32
  "@codemirror/state": "^6.6.0",
33
33
  "@codemirror/view": "^6.41.1",
34
34
  "@fortawesome/free-solid-svg-icons": "^5.15.4",
35
+ "@lezer/common": "^1.5.2",
35
36
  "@lezer/highlight": "^1.2.3",
36
37
  "@lydell/node-pty": "^1.2.0-beta.12",
37
38
  "@xterm/addon-fit": "^0.11.0",