@air-jam/cli 1.0.0-beta.6 → 1.0.0-beta.8

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- > **Prerelease `1.0.0-beta.6`** from Air Jam's `beta` channel. It is not stable and may change or break between prereleases; install `@latest` for the stable release.
1
+ > **Prerelease `1.0.0-beta.8`** from Air Jam's `beta` channel. It is not stable and may change or break between prereleases; install `@latest` for the stable release.
2
2
 
3
3
  # `@air-jam/cli`
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@air-jam/cli",
3
- "version": "1.0.0-beta.6",
3
+ "version": "1.0.0-beta.8",
4
4
  "engines": {
5
5
  "node": ">=22.15.0"
6
6
  },
@@ -59,8 +59,8 @@
59
59
  "template-assets"
60
60
  ],
61
61
  "dependencies": {
62
- "@air-jam/devtools": "1.0.0-beta.6",
63
- "@air-jam/sdk": "^1.0.0-beta.6",
62
+ "@air-jam/devtools": "1.0.0-beta.8",
63
+ "@air-jam/sdk": "^1.0.0-beta.8",
64
64
  "commander": "^14.0.0",
65
65
  "cross-spawn": "^7.0.6",
66
66
  "fs-extra": "^11.3.0",
@@ -58,6 +58,25 @@ The default order is:
58
58
  3. keep rendering integration separate from pure game rules
59
59
  4. use instancing when repeated objects justify it
60
60
 
61
+ ## Loading and the Reveal
62
+
63
+ In the Arcade and the Studio, the page around a game keeps its own cover up
64
+ until the game's host says it is ready, so players never watch a game assemble
65
+ itself. The host is ready once it has mounted, its fonts have loaded and its
66
+ room is connected. Anything still loading after that holds the reveal with
67
+ `<HoldReveal />` from `@air-jam/sdk`:
68
+
69
+ 1. render it in every Suspense fallback on the host, including the route-level
70
+ fallback around a lazy host view: `<Suspense fallback={<HoldReveal />}>`
71
+ 2. put a Suspense boundary with that fallback around R3F content that loads
72
+ models or textures (`useGLTF`, `useTexture`), so the scene appears whole
73
+ 3. render it conditionally for any other loading the host waits on:
74
+ `{!ready && <HoldReveal />}`
75
+
76
+ A fallback can draw its own placeholder and include `<HoldReveal />` inside it.
77
+ The reveal happens once; holding again later changes nothing, and outside a
78
+ host it does nothing.
79
+
61
80
  ## Air Jam Lane Rules
62
81
 
63
82
  Keep the framework lanes separate:
@@ -644,7 +644,7 @@ These exports are gone; use the replacement.
644
644
  | `usePlayers()` | `useAirJamHost((s) => s.players)` |
645
645
  | `isActiveMatchPhase`, `isEndedMatchPhase`, `isStandardMatchPhase`, `standardMatchPhases` | compare the phase directly; `toShellMatchPhase` stays |
646
646
  | `AirJamErrorBoundary`, `PlatformSettingsBoundary` | nothing: `createAirJamApp` and the session runtimes mount both |
647
- | `getEffectiveAudioVolume`, `useAudioCategoryVolume`, `mergeRoomPlatformSettingsSnapshot` | `useMusicVolume`, `usePlatformAudioSettings` |
647
+ | `getEffectiveAudioVolume`, `useAudioCategoryVolume`, `mergeRoomPlatformSettingsSnapshot` | `useMusicVolume`, `useAirJamSurfaceSettings` |
648
648
  | `parseAirJamGameMetadata` | `airJamGameMetadataSchema.safeParse` |
649
649
  | `RoomCode`, `RunMode`, `SignalPayload`, `SignalType`, `ControllerStatePayload`, `ControllerUpdatePlayerProfileAck`, `AirJamActionAccepted`, `AirJamActionRejected` from `@air-jam/sdk` | the same types from `@air-jam/sdk/protocol` |
650
650
  | `isInternalActionName`, `resolveControllerJoinSource`, `JoinUrlStatus` from `@air-jam/sdk/core` | internal; `JoinUrlStatus` comes from `@air-jam/sdk` |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "1.0.0-beta.6",
3
+ "packageVersion": "1.0.0-beta.8",
4
4
  "requiredComponents": [
5
5
  "ArcadeModeDiagram",
6
6
  "Callout",
@@ -160,7 +160,7 @@
160
160
  "lastVerifiedVersion": "1.0.0"
161
161
  },
162
162
  "size": 31449,
163
- "sha256": "0f628c675d9e97c99fab83e7f6c18eb463ec7b119be3ebb10b96f49a7516cc9b"
163
+ "sha256": "d0119901e5fb76ecb7025b5545f85b92799c88a95a2ed1e653469aa652d4204e"
164
164
  },
165
165
  {
166
166
  "source": "how-it-works/architecture/page.mdx",
@@ -263,8 +263,8 @@
263
263
  "sinceVersion": "1.0.0",
264
264
  "lastVerifiedVersion": "1.0.0"
265
265
  },
266
- "size": 7114,
267
- "sha256": "f7806eb201cefb2981cfb9f27bb5a2c71e894c66dd02be69dcd57a1d84f590ed"
266
+ "size": 6558,
267
+ "sha256": "753ad280b852bef1f6b883c4b11039fe32529f5b982bc26f61f91a85d139c079"
268
268
  },
269
269
  {
270
270
  "source": "sdk/input-system/page.mdx",
@@ -418,8 +418,8 @@
418
418
  "sinceVersion": "1.0.0",
419
419
  "lastVerifiedVersion": "1.0.0"
420
420
  },
421
- "size": 2990,
422
- "sha256": "5157e30df164ec5bc9c0d23dc6877711be7117075f844ce7643ae853cb0ca73b"
421
+ "size": 3950,
422
+ "sha256": "df3d2b8954b8dbb5683a734dbcf7aac6318f3e5495269ab9e6ad109203ec3e0d"
423
423
  },
424
424
  {
425
425
  "source": "for-agents/supported-agents/page.mdx",
@@ -468,8 +468,8 @@
468
468
  "sinceVersion": "1.0.0",
469
469
  "lastVerifiedVersion": "1.0.0"
470
470
  },
471
- "size": 6232,
472
- "sha256": "fc775f90ade332234211a9009b00c543b02b0b63a60414000588ae73e14a3a8f"
471
+ "size": 6819,
472
+ "sha256": "e4184871a36717a96d4558eebcf7e07ea8dd5bd6cafc8e7cfa2e6ef155f5c8fd"
473
473
  },
474
474
  {
475
475
  "source": "sdk/assets-and-theme/page.mdx",
@@ -25,7 +25,9 @@ export const pongSettings = defineAirJamSettings({
25
25
  max: 720,
26
26
  step: 10,
27
27
  live: true,
28
- description: "Ball speed in pixels per second.",
28
+ label: "Ball speed",
29
+ unit: "px/s",
30
+ description: "How fast the ball crosses the court.",
29
31
  }),
30
32
  });
31
33
  export type PongSettings = AirJamSettingsValues<typeof pongSettings>;
@@ -40,7 +42,16 @@ Keys are lower camel case. `setting.number` requires `default`, `min` and
40
42
  Steps are multiples of zero. `setting.boolean` requires a boolean `default`.
41
43
  `setting.choice` takes a nonempty string tuple in `options` and a `default`
42
44
  from that tuple; its value type is the union of those strings.
43
- Every kind accepts `description` and `live`, which defaults to false.
45
+ Every kind accepts `label`, `description` and `live`, which defaults to false;
46
+ numbers also accept a `unit` shown after the value.
47
+
48
+ The Air Jam platform draws every declared setting in its settings dialog under
49
+ the game's name, on the big screen and on phones, with no settings code in the
50
+ game: a switch for a boolean, segments for a few choices or steps, and a slider
51
+ with its value for a range. A setting that is not `live` waits for the game to
52
+ restart. The screen remembers the values per game and launches the game with
53
+ them next time; a remembered value the game no longer accepts reads as its
54
+ default.
44
55
  `defineAirJamSettings` validates defaults immediately. The description returned
45
56
  by `airjam.inspect_game` includes these descriptors in `declaration.settings`.
46
57
 
@@ -7,7 +7,6 @@ import {
7
7
  SurfaceViewport,
8
8
  PlayerAvatar,
9
9
  RoomQrCode,
10
- VolumeControls,
11
10
  Button,
12
11
  Slider,
13
12
  } from "@air-jam/sdk/ui";
@@ -133,31 +132,6 @@ Avoid:
133
132
 
134
133
  ---
135
134
 
136
- ### `VolumeControls`
137
-
138
- Ready-made control block for master/music/sfx sliders bound to the shared platform settings runtime.
139
-
140
- ```tsx
141
- import { VolumeControls } from "@air-jam/sdk/ui";
142
-
143
- <VolumeControls className="w-full max-w-xs" compact />;
144
- ```
145
-
146
- Mount it below `PlatformSettingsRuntime` when you want slider changes to persist in Arcade and inherit into embedded games.
147
-
148
- Props:
149
-
150
- - `className?: string`
151
- - `compact?: boolean`
152
-
153
- Use it for:
154
-
155
- - in-game settings overlays
156
- - pause/settings drawers
157
- - Arcade- or platform-owned settings panels
158
-
159
- ---
160
-
161
135
  ## Phone Controls
162
136
 
163
137
  `ControlButton`, `AxisButton` and `Stick` bind phone UI to the game's declared
@@ -112,7 +112,7 @@
112
112
  "path": "docs/airjam/generated/migrating-legacy-games.md",
113
113
  "kind": "docs-generated",
114
114
  "size": 31510,
115
- "sha256": "63b66676c7578d37635e542f45149cd67dcc42229c1bf9364280ae76583586ec"
115
+ "sha256": "372390766ea2b59606bbc1d727b2a115aaa9e3c3c232cf9d588b69e7abdfb7ed"
116
116
  },
117
117
  {
118
118
  "path": "docs/airjam/generated/networked-state.md",
@@ -141,14 +141,14 @@
141
141
  {
142
142
  "path": "docs/airjam/generated/settings.md",
143
143
  "kind": "docs-generated",
144
- "size": 6382,
145
- "sha256": "7bc2d29c42826085640a503601d6a2b42c9b2c7bdfc38908d58cd82b1ccf5c47"
144
+ "size": 6969,
145
+ "sha256": "4efa779c48aa0701be630bb71a6bce1703525b670e84d0344c3c6376ceca9009"
146
146
  },
147
147
  {
148
148
  "path": "docs/airjam/generated/state-and-rendering.md",
149
149
  "kind": "docs-generated",
150
- "size": 3176,
151
- "sha256": "c9e52a44c5f865db217a5bb538d0ee64b82ef342c78bc85acc830c488e3c8198"
150
+ "size": 4136,
151
+ "sha256": "d62521b4bab84c3292b780255b72ab559fcdd7652ef431909e71db72d7735bf0"
152
152
  },
153
153
  {
154
154
  "path": "docs/airjam/generated/supported-agents.md",
@@ -159,8 +159,8 @@
159
159
  {
160
160
  "path": "docs/airjam/generated/ui-components.md",
161
161
  "kind": "docs-generated",
162
- "size": 7216,
163
- "sha256": "72347505e23c4546a55b23bbbb8a9d9135bd3789facf3e3f2afa5c1238e24d24"
162
+ "size": 6660,
163
+ "sha256": "deb0b2a40901dd29e40bd8c7aa6bbf8e447e09385b84e476cce098e5ce1c5cfc"
164
164
  },
165
165
  {
166
166
  "path": "docs/airjam/generated/unified-dev-logs.md",
@@ -183,8 +183,8 @@
183
183
  {
184
184
  "path": "docs/airjam/preview-controllers.md",
185
185
  "kind": "docs-local",
186
- "size": 4813,
187
- "sha256": "0844ba6b2ebd62250affeae6f3b1c6eabb439d1a8f77145916705b45198f0d16"
186
+ "size": 4812,
187
+ "sha256": "24f60c5fd41d25b12cdcef99d64a995b89e4266ee6b4378d56a8057e9386b5bc"
188
188
  },
189
189
  {
190
190
  "path": "docs/airjam/r3f-3d-scene.md",
@@ -205,5 +205,5 @@
205
205
  "sha256": "0eaa064c38b4568c200fbf5cadb96f16c7c738a29469c4c955fb1ac5f8077edf"
206
206
  }
207
207
  ],
208
- "contentDigest": "a0d1bae880328b8aa950e163f5f544c3f12005df2cde4dd2a9437b6695a5183b"
208
+ "contentDigest": "153337331e5a84a9cd56a9c56b06d02a0bd26d24df2e074996c05799c69aa4ae"
209
209
  }
@@ -645,7 +645,7 @@ These exports are gone; use the replacement.
645
645
  | `usePlayers()` | `useAirJamHost((s) => s.players)` |
646
646
  | `isActiveMatchPhase`, `isEndedMatchPhase`, `isStandardMatchPhase`, `standardMatchPhases` | compare the phase directly; `toShellMatchPhase` stays |
647
647
  | `AirJamErrorBoundary`, `PlatformSettingsBoundary` | nothing: `createAirJamApp` and the session runtimes mount both |
648
- | `getEffectiveAudioVolume`, `useAudioCategoryVolume`, `mergeRoomPlatformSettingsSnapshot` | `useMusicVolume`, `usePlatformAudioSettings` |
648
+ | `getEffectiveAudioVolume`, `useAudioCategoryVolume`, `mergeRoomPlatformSettingsSnapshot` | `useMusicVolume`, `useAirJamSurfaceSettings` |
649
649
  | `parseAirJamGameMetadata` | `airJamGameMetadataSchema.safeParse` |
650
650
  | `RoomCode`, `RunMode`, `SignalPayload`, `SignalType`, `ControllerStatePayload`, `ControllerUpdatePlayerProfileAck`, `AirJamActionAccepted`, `AirJamActionRejected` from `@air-jam/sdk` | the same types from `@air-jam/sdk/protocol` |
651
651
  | `isInternalActionName`, `resolveControllerJoinSource`, `JoinUrlStatus` from `@air-jam/sdk/core` | internal; `JoinUrlStatus` comes from `@air-jam/sdk` |
@@ -28,7 +28,9 @@ export const pongSettings = defineAirJamSettings({
28
28
  max: 720,
29
29
  step: 10,
30
30
  live: true,
31
- description: "Ball speed in pixels per second.",
31
+ label: "Ball speed",
32
+ unit: "px/s",
33
+ description: "How fast the ball crosses the court.",
32
34
  }),
33
35
  });
34
36
  export type PongSettings = AirJamSettingsValues<typeof pongSettings>;
@@ -43,7 +45,16 @@ Keys are lower camel case. `setting.number` requires `default`, `min` and
43
45
  Steps are multiples of zero. `setting.boolean` requires a boolean `default`.
44
46
  `setting.choice` takes a nonempty string tuple in `options` and a `default`
45
47
  from that tuple; its value type is the union of those strings.
46
- Every kind accepts `description` and `live`, which defaults to false.
48
+ Every kind accepts `label`, `description` and `live`, which defaults to false;
49
+ numbers also accept a `unit` shown after the value.
50
+
51
+ The Air Jam platform draws every declared setting in its settings dialog under
52
+ the game's name, on the big screen and on phones, with no settings code in the
53
+ game: a switch for a boolean, segments for a few choices or steps, and a slider
54
+ with its value for a range. A setting that is not `live` waits for the game to
55
+ restart. The screen remembers the values per game and launches the game with
56
+ them next time; a remembered value the game no longer accepts reads as its
57
+ default.
47
58
  `defineAirJamSettings` validates defaults immediately. The description returned
48
59
  by `airjam.inspect_game` includes these descriptors in `declaration.settings`.
49
60
 
@@ -61,6 +61,25 @@ The default order is:
61
61
  3. keep rendering integration separate from pure game rules
62
62
  4. use instancing when repeated objects justify it
63
63
 
64
+ ## Loading and the Reveal
65
+
66
+ In the Arcade and the Studio, the page around a game keeps its own cover up
67
+ until the game's host says it is ready, so players never watch a game assemble
68
+ itself. The host is ready once it has mounted, its fonts have loaded and its
69
+ room is connected. Anything still loading after that holds the reveal with
70
+ `<HoldReveal />` from `@air-jam/sdk`:
71
+
72
+ 1. render it in every Suspense fallback on the host, including the route-level
73
+ fallback around a lazy host view: `<Suspense fallback={<HoldReveal />}>`
74
+ 2. put a Suspense boundary with that fallback around R3F content that loads
75
+ models or textures (`useGLTF`, `useTexture`), so the scene appears whole
76
+ 3. render it conditionally for any other loading the host waits on:
77
+ `{!ready && <HoldReveal />}`
78
+
79
+ A fallback can draw its own placeholder and include `<HoldReveal />` inside it.
80
+ The reveal happens once; holding again later changes nothing, and outside a
81
+ host it does nothing.
82
+
64
83
  ## Air Jam Lane Rules
65
84
 
66
85
  Keep the framework lanes separate:
@@ -10,7 +10,6 @@ import {
10
10
  SurfaceViewport,
11
11
  PlayerAvatar,
12
12
  RoomQrCode,
13
- VolumeControls,
14
13
  Button,
15
14
  Slider,
16
15
  } from "@air-jam/sdk/ui";
@@ -134,31 +133,6 @@ Avoid:
134
133
 
135
134
  ---
136
135
 
137
- ### `VolumeControls`
138
-
139
- Ready-made control block for master/music/sfx sliders bound to the shared platform settings runtime.
140
-
141
- ```tsx
142
- import { VolumeControls } from "@air-jam/sdk/ui";
143
-
144
- <VolumeControls className="w-full max-w-xs" compact />;
145
- ```
146
-
147
- Mount it below `PlatformSettingsRuntime` when you want slider changes to persist in Arcade and inherit into embedded games.
148
-
149
- Props:
150
-
151
- - `className?: string`
152
- - `compact?: boolean`
153
-
154
- Use it for:
155
-
156
- - in-game settings overlays
157
- - pause/settings drawers
158
- - Arcade- or platform-owned settings panels
159
-
160
- ---
161
-
162
136
  ## Phone Controls
163
137
 
164
138
  `ControlButton`, `AxisButton` and `Stick` bind phone UI to the game's declared
@@ -75,7 +75,7 @@ The preview workspace supports:
75
75
  4. minimize and close controls
76
76
  5. per-window portrait or landscape rotation from the title bar for games without joystick input
77
77
 
78
- 6. shared active-opacity control for preview windows through platform settings
78
+ 6. active-window opacity from the room's on-screen controller opacity setting
79
79
  7. a room controller roster with source-aware `Kick` controls for manual local recovery
80
80
  8. a `Reset room` escape hatch that creates a fresh empty room and reloads the local host page so gameplay state and controller state both reset cleanly
81
81