@typeonce/ritmo-pixi 0.9.0 → 0.11.0

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 ADDED
@@ -0,0 +1,145 @@
1
+ # @typeonce/ritmo-pixi
2
+
3
+ ## 0.11.0
4
+
5
+ ### Patch Changes
6
+
7
+ - e46f284: **Documentation pass over every public module.** Every export has JSDoc saying what it is for and which neighbouring API to use instead; examples that no longer compiled (`Session.make` without `hostClock`, `Replay.session`, the `Pointer` rebind) are fixed; `Debug.Lint` lists every lint code the runtime emits. The `stale-target` lint's fix now names `queries.x.getHandle(handle)`.
8
+ - Updated dependencies [e46f284]
9
+ - @typeonce/ritmo-render@0.11.0
10
+
11
+ ## 0.10.0
12
+
13
+ ### Patch Changes
14
+
15
+ - 7002f4d: **Everything a game's agent needs now ships with the packages, and `ritmo-devtools lint` reports simulation modules the lint rules miss.**
16
+
17
+ - **Breaking: `ritmo-devtools lint` fails on an uncovered simulation module.** Every module the entry loads that the `ritmo/keep-simulation-headless` override in `.oxlintrc.json` does not cover is reported as `uncovered-simulation-module`, and the command exits 1. Add the module (or its folder) to the simulation override's `"files"`, or stop importing values from it. Modules loaded only inside `lintTarget` are not checked. Requires Node 22.15 or newer (`engines.node` is now `>=22.15`).
18
+ - **An agent skill ships with `@typeonce/ritmo`** in `skills/ritmo/SKILL.md`, for every change: where the docs are, and principles for where a game's code and state belong. Link it into the folder the game's agent reads skills from, for example `ln -s ../../node_modules/@typeonce/ritmo/skills/ritmo .agents/skills/ritmo`. `SETUP.md` in `@typeonce/ritmo` is the one-time setup: the base packages and checks every game uses, the add-ons, and linking the skill.
19
+ - **Every package ships its `CHANGELOG.md`.** The upgrade notes for 0.8.0 and 0.9.0 are in the `@typeonce/ritmo` changelog.
20
+ - **JSDoc corrections.** Examples no longer provide randomness or time as services (use the `Random` resource and `Clock`), the `Command` module example declares its commands, inspector docs state that `added`/`changed` reads report records since the inspector's previous evaluation, and every example uses prefixed names (`"Game/Position"`). Guidance that lived only in the repository's guides (spawn order, `ReadonlyValue` helpers, re-entering a state, `thisTick` and plugin systems, service effects and rollback) is now in the JSDoc.
21
+ - Package READMEs link other packages' READMEs by GitHub URL, so the links work on npm.
22
+
23
+ - Updated dependencies [7002f4d]
24
+ - @typeonce/ritmo-render@0.10.0
25
+
26
+ ## 0.9.0
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [330246e]
31
+ - @typeonce/ritmo-render@0.9.0
32
+
33
+ ## 0.8.0
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [a0fac0a]
38
+ - @typeonce/ritmo-render@0.8.0
39
+
40
+ ## 0.7.0
41
+
42
+ ### Patch Changes
43
+
44
+ - 358401a: Link the bevy-ts migration guide from each published package README.
45
+ - Updated dependencies [358401a]
46
+ - @typeonce/ritmo-render@0.7.0
47
+
48
+ ## 0.6.0
49
+
50
+ ### Minor Changes
51
+
52
+ - 130cb6e: Rename the package family from `@typeonce/bevy-ts*` to `@typeonce/ritmo*`.
53
+ Update imports, workspace dependencies, type identity markers, examples, and
54
+ documentation together. There are no compatibility aliases; use the matching
55
+ Ritmo package for each previous Bevy TS package. The separate release preparation
56
+ change coordinates the repository rename and retirement of the generated
57
+ documentation site.
58
+ Use "The agent-first type safe ECS runtime" in package metadata,
59
+ documentation, and brand assets.
60
+
61
+ ### Patch Changes
62
+
63
+ - a8e0473: Retire the generated documentation site and point package homepages, source links,
64
+ and issue links to the Ritmo repository in the Typeonce GitHub organization.
65
+ Keep source JSDoc and repository guides, including the Pixi walkthrough in its
66
+ example README.
67
+ - Updated dependencies [a8e0473]
68
+ - Updated dependencies [c20bbc0]
69
+ - Updated dependencies [130cb6e]
70
+ - Updated dependencies [a1f18a8]
71
+ - @typeonce/ritmo-render@0.6.0
72
+
73
+ ## 0.5.0
74
+
75
+ ### Patch Changes
76
+
77
+ - @typeonce/bevy-ts-render@0.5.0
78
+
79
+ ## 0.4.0
80
+
81
+ ### Minor Changes
82
+
83
+ - e2b2275: New package `@typeonce/bevy-ts-render`: the renderer-agnostic part of `@typeonce/bevy-ts-pixi`, the entity-keyed node registry (`NodeRegistry.make`) and the render sync systems (`RenderSync.system`, `RenderSync.interpolate`), for games drawn with Three.js, the DOM, or any other renderer.
84
+
85
+ **Breaking:** import `NodeRegistry` and `RenderSync` from `@typeonce/bevy-ts-render`. Pixi exports only `PixiNodeRegistry`, with `make(container)` replacing `NodeRegistry.inContainer(container)`. The platform-prefixed adapter implements the generic registry contract and is provided through the existing typed runtime service API. The old Pixi modules and re-exports are removed immediately. Pixi depends only on the render package, dropping its unused browser and core dependencies.
86
+
87
+ This combines the four planned steps into one 0.4.0 release of the fixed package group.
88
+
89
+ - `Game.Schedule.pauseWhen` retains event-reader cursors during a pause. Ordinary `when` gates still discard messages across mode changes and take precedence over pause gates in either nesting order. Stream capacity bounds retention, and debug traces expose whether a skipped run held messages.
90
+ - A system's optional `local` factory owns scratch state per runtime, shared by gated copies. Locals are neither rolled back nor snapshotted and are rebuilt after successful restore. Debug descriptions show which systems declare them.
91
+ - Optional and conditional local factories preserve `undefined` in the callback type. Factories allocate fresh scratch state without side effects; mode changes preserve locals, and values needing cleanup belong in host-managed services.
92
+ - `runtime.send` immediately publishes a schema event from the host at a fresh tick. Calls during a tick or with unknown descriptors throw. Unread host messages survive restore without replaying to readers that already consumed them. Devtools trace sends and include external producers in event lints.
93
+ - **Breaking:** `EntityId` and `Handle` are branded numbers. Replace `id.value` and `handle.value` with `id` and `handle`. Handles now compare by numeric identity and work as `Set` keys without allocating objects. `decodeHandle` and `Decode.handle` accept only positive integer numbers. Object-shaped handles are rejected, including inside snapshots; snapshots write numbers.
94
+ - The guides cover fallible lookups, inspector machine reads, `Query.Cells`, shared access objects, simulation-owned time, and seeded random state. `Feature` remains supported and is documented in the package-authoring guide.
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies [e2b2275]
99
+ - @typeonce/bevy-ts-render@0.4.0
100
+
101
+ ## 0.3.0
102
+
103
+ ### Patch Changes
104
+
105
+ - 2b0fb7e: Add `Game.Condition.check(name, access, predicate)` (types in `@typeonce/bevy-ts/Condition`): a run condition computed by ordinary code, so conditions need no growing set of combinators. A check declares its reads like a system and receives them read-only. It may read resources, machines, and queries with no write slots and no `added`/`changed` filters; events, transition events, removed/despawned reads, relation failures, and services are compile errors, as are other games' descriptors and non-boolean predicates. Its reads become requirements of whatever it gates, through `not`/`and`/`or`, a system's `when`, and `Schedule.when`. Checks are evaluated before each gated system against committed values, so they see writes from earlier systems in the same run, and they never advance the world tick or a reader cursor. A throwing predicate propagates like a throwing system. Devtools render checks as `check(name)` and count their reads as the gated system's reads.
106
+
107
+ Conditions now carry their requirements in one type-level field, read with `ConditionNeeds` / `ConditionNeedsFromConditions`. `MachineNeedsFromCondition(s)` remain and extract only the machines. `InputCapture.system` and `RenderSync` (`system`, `interpolate`) pass a check's requirements through their `when` option.
108
+
109
+ - Updated dependencies [2b0fb7e]
110
+ - Updated dependencies [c4d1add]
111
+ - Updated dependencies [bd9bdd5]
112
+ - Updated dependencies [bd9bdd5]
113
+ - Updated dependencies [94bdc32]
114
+ - Updated dependencies [421a727]
115
+ - Updated dependencies [f196f48]
116
+ - Updated dependencies [bd9bdd5]
117
+ - @typeonce/bevy-ts@0.3.0
118
+ - @typeonce/bevy-ts-browser@0.3.0
119
+
120
+ ## 0.2.0
121
+
122
+ ### Minor Changes
123
+
124
+ - 4b3a312: `InputCapture.system(...)` and `RenderSync.system(...)` accept `when`, run conditions like a system's own. A gated capture takes no snapshots meanwhile, so presses stay in the device until it resumes (pauses, hit-stop); a gated render sync catches up on additions, changes, and removals when it runs again. The machines the conditions read are requirements of the generated system.
125
+ - 4b3a312: `RenderSync.system`'s `transform` is optional: without it, `apply` runs on creation and on `redrawOn` changes only (callbacks see `transform: undefined`), for games that place nodes every frame some other way. New `RenderSync.interpolate(Game, { registry, previous, current, clock, place })` draws fixed-step movement smoothly: every run it places each node at `previous + (current - previous) * alpha`, with `alpha` from a clock service such as `FixedLoop`'s render callback. Both components must hold `{ x, y }` and the clock must provide `alpha`, checked at compile time.
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [4b3a312]
130
+ - Updated dependencies [4b3a312]
131
+ - Updated dependencies [4b3a312]
132
+ - Updated dependencies [4b3a312]
133
+ - Updated dependencies [4b3a312]
134
+ - Updated dependencies [4b3a312]
135
+ - @typeonce/bevy-ts-browser@0.2.0
136
+ - @typeonce/bevy-ts@0.2.0
137
+
138
+ ## 0.1.1
139
+
140
+ ### Patch Changes
141
+
142
+ - c95a102: First release published from CI through npm trusted publishing, with provenance attestations. Declarations are now verified against consumers on both TypeScript 7 and TypeScript 6. No API or output changes.
143
+ - Updated dependencies [c95a102]
144
+ - @typeonce/bevy-ts@0.1.1
145
+ - @typeonce/bevy-ts-browser@0.1.1
package/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # `@typeonce/ritmo-pixi`
2
2
 
3
- Migrating from bevy-ts? See the [package migration guide](https://github.com/typeonce-dev/ritmo/blob/main/MIGRATION.md).
4
-
5
3
  Pixi's implementation of the renderer-independent `NodeRegistry` contract. `PixiNodeRegistry.make` attaches nodes to one Pixi container and detaches and destroys them with their children on removal.
6
4
 
7
- Import the generic `NodeRegistry` contract and `RenderSync` systems from [`@typeonce/ritmo-render`](https://www.npmjs.com/package/@typeonce/ritmo-render). The Pixi package exports only its adapter; systems depend on the generic registry service, and the host chooses its implementation.
5
+ Import the generic `NodeRegistry` contract and `RenderSync` systems from [`@typeonce/ritmo-render`](https://github.com/typeonce-dev/ritmo/blob/main/packages/render/README.md). The Pixi package exports only its adapter; systems depend on the generic registry service, and the host chooses its implementation.
8
6
 
9
7
  ```sh
10
8
  pnpm add @typeonce/ritmo-pixi @typeonce/ritmo-render @typeonce/ritmo
@@ -24,6 +22,6 @@ const services = Game.Runtime.services(Game.Runtime.service(Sprites, sprites))
24
22
 
25
23
  Bring your own `pixi.js` application; the package does not import it.
26
24
 
27
- Released together with [`@typeonce/ritmo`](https://www.npmjs.com/package/@typeonce/ritmo), always with the same version.
25
+ Released together with [`@typeonce/ritmo`](https://github.com/typeonce-dev/ritmo/blob/main/packages/core/README.md), always with the same version.
28
26
 
29
27
  Source: https://github.com/typeonce-dev/ritmo
@@ -1 +1 @@
1
- {"version":3,"file":"PixiNodeRegistry.d.ts","sourceRoot":"","sources":["../src/PixiNodeRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAA;AAEnE;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,KAAK;IAClC,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAA;IAC/B,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAA;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,GAAI,IAAI,SAAS,WAAW,UAAU,aAAa,CAAC,IAAI,CAAC,KAAG,YAAY,CAAC,YAAY,CAAC,IAAI,CASvG,CAAA"}
1
+ {"version":3,"file":"PixiNodeRegistry.d.ts","sourceRoot":"","sources":["../src/PixiNodeRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAA;AAEnE;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,KAAK;IAClC,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAA;IAC/B,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAA;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,GAAI,IAAI,SAAS,WAAW,UAAU,aAAa,CAAC,IAAI,CAAC,KAAG,YAAY,CAAC,YAAY,CAAC,IAAI,CASvG,CAAA"}
@@ -16,6 +16,7 @@
16
16
  * sprites.clear()
17
17
  * ```
18
18
  */
19
+ // oxlint-disable-next-line ritmo/keep-simulation-headless -- this package is the Pixi adapter for the render registry, render code by definition
19
20
  import * as NodeRegistry from "@typeonce/ritmo-render/NodeRegistry";
20
21
  /**
21
22
  * Creates a registry whose nodes are children of one container and are
@@ -1 +1 @@
1
- {"version":3,"file":"PixiNodeRegistry.js","sourceRoot":"","sources":["../src/PixiNodeRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAA;AAiBnE;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAA2B,MAA2B,EAAmC,EAAE,CAC7G,YAAY,CAAC,IAAI,CAAC;IAChB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACvB,CAAC;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACxB,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAClC,CAAC;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"PixiNodeRegistry.js","sourceRoot":"","sources":["../src/PixiNodeRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,iJAAiJ;AACjJ,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAA;AAiBnE;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAA2B,MAA2B,EAAmC,EAAE,CAC7G,YAAY,CAAC,IAAI,CAAC;IAChB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACvB,CAAC;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACxB,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAClC,CAAC;CACF,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -8,5 +8,6 @@
8
8
  * (sprite conventions, HUDs, cameras) so they remain composable across games.
9
9
  */
10
10
  export * as PixiNodeRegistry from "./PixiNodeRegistry.ts";
11
+ /** The package's name tag (`"pixi"`), for tests and tools that check which package they loaded. Games do not need it. */
11
12
  export declare const packageTag: "pixi";
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AAEzD,eAAO,MAAM,UAAU,EAAG,MAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AAEzD,yHAAyH;AACzH,eAAO,MAAM,UAAU,EAAG,MAAe,CAAA"}
package/dist/index.js CHANGED
@@ -8,5 +8,6 @@
8
8
  * (sprite conventions, HUDs, cameras) so they remain composable across games.
9
9
  */
10
10
  export * as PixiNodeRegistry from "./PixiNodeRegistry.js";
11
+ /** The package's name tag (`"pixi"`), for tests and tools that check which package they loaded. Games do not need it. */
11
12
  export const packageTag = "pixi";
12
13
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AAEzD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAe,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AAEzD,yHAAyH;AACzH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAe,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typeonce/ritmo-pixi",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Pixi container adapter for Ritmo render-node registries",
5
5
  "author": "Sandro Maglione",
6
6
  "license": "MIT",
@@ -27,6 +27,7 @@
27
27
  "src/**/*.ts",
28
28
  "dist",
29
29
  "README.md",
30
+ "CHANGELOG.md",
30
31
  "LICENSE"
31
32
  ],
32
33
  "exports": {
@@ -47,10 +48,10 @@
47
48
  "provenance": true
48
49
  },
49
50
  "dependencies": {
50
- "@typeonce/ritmo-render": "^0.9.0"
51
+ "@typeonce/ritmo-render": "^0.11.0"
51
52
  },
52
53
  "devDependencies": {
53
- "@typeonce/ritmo": "0.9.0"
54
+ "@typeonce/ritmo": "0.11.0"
54
55
  },
55
56
  "engines": {
56
57
  "node": ">=20"
@@ -16,6 +16,7 @@
16
16
  * sprites.clear()
17
17
  * ```
18
18
  */
19
+ // oxlint-disable-next-line ritmo/keep-simulation-headless -- this package is the Pixi adapter for the render registry, render code by definition
19
20
  import * as NodeRegistry from "@typeonce/ritmo-render/NodeRegistry"
20
21
 
21
22
  /**
package/src/index.ts CHANGED
@@ -9,4 +9,5 @@
9
9
  */
10
10
  export * as PixiNodeRegistry from "./PixiNodeRegistry.ts"
11
11
 
12
+ /** The package's name tag (`"pixi"`), for tests and tools that check which package they loaded. Games do not need it. */
12
13
  export const packageTag = "pixi" as const