@jgengine/react 0.38.2 → 0.38.3
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/CHANGELOG.md +11 -0
- package/dist/gameMenu.d.ts +5 -2
- package/package.json +2 -2
- package/skills/jgengine/api.md +2 -2
- package/skills/jgengine-ui/api.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,17 @@ At publish, rename this heading to the new version and mirror the entries into
|
|
|
26
26
|
`packages/core/src/meta/changelog.ts` (the typed `CHANGELOG` export).
|
|
27
27
|
-->
|
|
28
28
|
|
|
29
|
+
## 0.38.3
|
|
30
|
+
|
|
31
|
+
### Migrate
|
|
32
|
+
|
|
33
|
+
- **Bump lockstep SDK packages to `^0.38.3`:** `@jgengine/{core,rapier,react,ws,node,sql,convex,shell,editor,assets,navbake}`. CLI `jgengine` is `0.35.3`; `@jgengine/github` is `0.25.3`.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- `GameMenu`'s `style` and `detailStyle` accept a plain `CSSProperties` again (`CSSProperties | GameMenuStyle`). 0.38.2 typed them as `CSSProperties & Record<`--${string}`, ...>`, which a `CSSProperties` value cannot satisfy, so Harbor Heat and Beacon Bastion stopped typechecking on a patch release while they passed the same objects to `style` before it.
|
|
38
|
+
- `SceneCaptureBinding`'s props are a required object with an optional `bind` again. The 0.38.2 `{ bind } = {}` optional parameter made React's `createElement` overload infer `Attributes & undefined` for the props, so a game that builds its overlay as `createElement(SceneCaptureBinding, { bind })` failed with `'bind' does not exist in type 'Attributes'`; `<SceneCaptureBinding />` and `<SceneCaptureBinding bind={…} />` both still typecheck.
|
|
39
|
+
|
|
29
40
|
## 0.38.2
|
|
30
41
|
|
|
31
42
|
### Migrate
|
package/dist/gameMenu.d.ts
CHANGED
|
@@ -39,6 +39,9 @@ export type GameMenuVariant = "title" | "pause";
|
|
|
39
39
|
/**
|
|
40
40
|
* Inline style for a menu surface that also accepts `--jg-*` theme tokens, so a game sets a token
|
|
41
41
|
* with `{ "--jg-menu-radius": "12px" }` instead of casting the object to `CSSProperties`.
|
|
42
|
+
*
|
|
43
|
+
* `style` and `detailStyle` take `CSSProperties` too: a game that already builds a `CSSProperties`
|
|
44
|
+
* object keeps passing it, which a 0.38.2 intersection silently stopped accepting.
|
|
42
45
|
*/
|
|
43
46
|
export type GameMenuStyle = CSSProperties & Record<`--${string}`, string | number>;
|
|
44
47
|
/** Props for {@link GameMenu}. */
|
|
@@ -89,9 +92,9 @@ export interface GameMenuProps {
|
|
|
89
92
|
/** Accessible name of the surface. Default `"Main menu"` (`"Paused"` for the pause variant). */
|
|
90
93
|
label?: string;
|
|
91
94
|
className?: string;
|
|
92
|
-
style?: GameMenuStyle;
|
|
95
|
+
style?: CSSProperties | GameMenuStyle;
|
|
93
96
|
detailClassName?: string;
|
|
94
|
-
detailStyle?: GameMenuStyle;
|
|
97
|
+
detailStyle?: CSSProperties | GameMenuStyle;
|
|
95
98
|
}
|
|
96
99
|
/**
|
|
97
100
|
* Lock the page scroll while `active`, so a fixed full-bleed surface is exactly the viewport and the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jgengine/react",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.3",
|
|
4
4
|
"description": "React UI layer for JGengine: GameProvider, hooks, and headless primitives over @jgengine/core.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"styles": "bun scripts/styles.ts"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@jgengine/core": "^0.38.
|
|
38
|
+
"@jgengine/core": "^0.38.3"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": "^19.0.0",
|
package/skills/jgengine/api.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
- `CHANGELOG` (const): const CHANGELOG: Record<string, ChangelogEntry> — Per-version engine changelog keyed by semver string (e.g. `"0.10.0"`).
|
|
8
8
|
- `ChangelogEntry` (interface): interface ChangelogEntry — One release's migrate steps plus added/changed/removed notes (typed mirror of CHANGELOG.md).
|
|
9
|
-
- `VERSION` (const): const VERSION: "0.38.
|
|
9
|
+
- `VERSION` (const): const VERSION: "0.38.3" — Installed `@jgengine/core` semver — compare against {@link CHANGELOG} keys when migrating.
|
|
10
10
|
|
|
11
11
|
## @jgengine/core/authoring
|
|
12
12
|
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
|
|
286
286
|
- `CHANGELOG` (const): const CHANGELOG: Record<string, ChangelogEntry> — Per-version engine changelog keyed by semver string (e.g. `"0.10.0"`).
|
|
287
287
|
- `ChangelogEntry` (interface): interface ChangelogEntry — One release's migrate steps plus added/changed/removed notes (typed mirror of CHANGELOG.md).
|
|
288
|
-
- `VERSION` (const): const VERSION: "0.38.
|
|
288
|
+
- `VERSION` (const): const VERSION: "0.38.3" — Installed `@jgengine/core` semver — compare against {@link CHANGELOG} keys when migrating.
|
|
289
289
|
|
|
290
290
|
## @jgengine/core/runtime/adapter
|
|
291
291
|
|
|
@@ -3085,7 +3085,7 @@
|
|
|
3085
3085
|
|
|
3086
3086
|
- `CaptureRenderer` (interface): interface CaptureRenderer — The bit of a WebGL renderer scene capture needs — its backing `<canvas>`.
|
|
3087
3087
|
- `SceneCapture` (type): type SceneCapture = () => string | null — Reads the current scene frame as an image data URL, or null when the frame cannot be read.
|
|
3088
|
-
- `SceneCaptureBinding` (function): function SceneCaptureBinding({ bind }: { bind?: (capture: () => string | null) => void }
|
|
3088
|
+
- `SceneCaptureBinding` (function): function SceneCaptureBinding({ bind }: { bind?: (capture: () => string | null) => void }): null — In-`<Canvas>` binder that hands the scene-capture function out to HUD code living outside the reconciler (a photo-mode Capture button, a save slot's thumbnail). Mount it inside the game's `WorldOverlay`; the reader is registered for `requestSceneCapture`/`requestSceneThumbnail`, which wait for this mount and the first painted frame. `bind` is for code that wants the function directly and can be left out when a game only requests captures. Renders nothing.
|
|
3089
3089
|
- `SceneCaptureFailure` (type): type SceneCaptureFailure = "no-binding" | "no-frame" | "undecodable" — Why a capture request produced no image.
|
|
3090
3090
|
- `SceneCaptureRequestOptions` (interface): interface SceneCaptureRequestOptions — How a capture request waits and retries.
|
|
3091
3091
|
- `SceneCaptureResult` (type): type SceneCaptureResult = | { ok: true; capture: string } | { ok: false; reason: SceneCaptureFailure } — A captured frame, or the stated reason there is none.
|