aiquadtreejs 0.3.1 → 0.4.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/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  Part of the [ai\*js micro-runtime ecosystem](https://github.com/yshengliao) — see also [aifsmjs](https://github.com/yshengliao/aifsmjs) (FSM), [aiecsjs](https://github.com/yshengliao/aiecsjs) (ECS), [aibridgejs](https://github.com/yshengliao/aibridgejs) (cross-context RPC), [aieventjs](https://github.com/yshengliao/aieventjs) (event emitter), [aipooljs](https://github.com/yshengliao/aipooljs) (object pool), and [aiaudiojs](https://github.com/yshengliao/aiaudiojs) (Web Audio shell).
12
12
 
13
- > **Status: 0.3.1 published.** `retrieveInto(region, target)` is a steady-state zero-allocation broadphase (reused internal scratch + caller buffer); property-based dedup invariants. ≥95% coverage, ≤2 KB gzip.
13
+ > **Status: 0.4.0 published.** Dependency hygiene + 1.0-track stability freeze — no runtime API change. `retrieveInto(region, target)` is a steady-state zero-allocation broadphase (reused internal scratch + caller buffer); property-based dedup invariants. ≥95% coverage, ≤2 KB gzip.
14
14
 
15
15
  ---
16
16
 
@@ -64,7 +64,7 @@ function nearbyEnemies(player: Body, enemies: Body[]): Body[] {
64
64
  }
65
65
  ```
66
66
 
67
- Coordinate semantics match PixiJS `getBounds()`: `x + width` and `y + height` are exclusive.
67
+ Right-open coordinate semantics: `x + width` and `y + height` are exclusive (renderer-neutral; matches common conventions such as PixiJS `getBounds()`).
68
68
 
69
69
  ---
70
70
 
@@ -122,6 +122,7 @@ Full JSDoc lives in [`src/index.ts`](src/index.ts).
122
122
  | ---------- | ------------------------------------------------------------------------------------------------------------------------------------- |
123
123
  | **0.1.0** | `createQuadtree`, `insert` / `retrieve` / `clear` / `dispose`, Set-based dedup, ≥95% coverage, ≤2 KB gzip. |
124
124
  | **0.3.0** | `retrieveInto(region, target)` zero-alloc API; property-based tests (`fast-check`); STABILITY.md tracking. |
125
+ | **0.4.0** | Dependency hygiene (removed unused `tsx`, aligned `fast-check`); 0.3.x public surface frozen for the 1.x track. No runtime API change. |
125
126
  | **0.6+** | Evaluate 3D octree variant (`createOctree<T extends AABB3>`); see `STABILITY.md` for current draft. |
126
127
 
127
128
  ---
package/README_ZHTW.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  隸屬 [ai\*js micro-runtime 生態系](https://github.com/yshengliao) ─ 另見 [aifsmjs](https://github.com/yshengliao/aifsmjs)(FSM)、[aiecsjs](https://github.com/yshengliao/aiecsjs)(ECS)、[aibridgejs](https://github.com/yshengliao/aibridgejs)(cross-context RPC)、[aieventjs](https://github.com/yshengliao/aieventjs)(event emitter)、[aipooljs](https://github.com/yshengliao/aipooljs)(物件池)、[aiaudiojs](https://github.com/yshengliao/aiaudiojs)(Web Audio 薄殼)。
12
12
 
13
- > **狀態:0.3.1 已發佈。** `retrieveInto(region, target)` 為 steady-state 零分配 broadphase(內部 scratch 重用 + caller buffer)與 property-based 去重不變式驗證。≥95% coverage,≤2 KB gzip。
13
+ > **狀態:0.4.0 已發佈。** Dependency hygiene + 1.0-track 穩定凍結 — 無 runtime API 變動。`retrieveInto(region, target)` 為 steady-state 零分配 broadphase(內部 scratch 重用 + caller buffer)與 property-based 去重不變式。≥95% coverage,≤2 KB gzip。
14
14
 
15
15
  ---
16
16
 
@@ -64,7 +64,7 @@ function nearbyEnemies(player: Body, enemies: Body[]): Body[] {
64
64
  }
65
65
  ```
66
66
 
67
- 座標語意對齊 PixiJS `getBounds()`:`x + width` 與 `y + height` 都是**右開**(不含)。
67
+ 右開座標語意:`x + width` 與 `y + height` 皆為右開(不含)。此為 renderer-neutral 慣例,PixiJS `getBounds()` 等渲染器亦同。
68
68
 
69
69
  ---
70
70
 
@@ -122,6 +122,7 @@ function createQuadtree<T extends AABB>(opts: QuadtreeOptions): Quadtree<T>;
122
122
  | ---------- | --------------------------------------------------------------------------------------------------------------------------------------- |
123
123
  | **0.1.0** | `createQuadtree`、`insert` / `retrieve` / `clear` / `dispose`、Set 去重、≥95% coverage、≤2 KB gzip。 |
124
124
  | **0.3.0** | `retrieveInto(region, target)` 零分配 API;property-based 測試(`fast-check`);`STABILITY.md` API 穩定度追蹤。 |
125
+ | **0.4.0** | 依賴 hygiene(移除未用 `tsx`、對齊 `fast-check`);0.3.x public surface 凍結為 1.x track。無 runtime API 變動。 |
125
126
  | **0.6+** | 評估 3D octree 變體(`createOctree<T extends AABB3>`);現有草稿見 `STABILITY.md`。 |
126
127
 
127
128
  ---
package/llms-full.txt CHANGED
@@ -23,7 +23,7 @@ The short index lives at `llms.txt` (see https://llmstxt.org/).
23
23
 
24
24
  Part of the [ai\*js micro-runtime ecosystem](https://github.com/yshengliao) — see also [aifsmjs](https://github.com/yshengliao/aifsmjs) (FSM), [aiecsjs](https://github.com/yshengliao/aiecsjs) (ECS), [aibridgejs](https://github.com/yshengliao/aibridgejs) (cross-context RPC), [aieventjs](https://github.com/yshengliao/aieventjs) (event emitter), [aipooljs](https://github.com/yshengliao/aipooljs) (object pool), and [aiaudiojs](https://github.com/yshengliao/aiaudiojs) (Web Audio shell).
25
25
 
26
- > **Status: 0.3.1 published.** `retrieveInto(region, target)` is a steady-state zero-allocation broadphase (reused internal scratch + caller buffer); property-based dedup invariants. ≥95% coverage, ≤2 KB gzip.
26
+ > **Status: 0.4.0 published.** Dependency hygiene + 1.0-track stability freeze — no runtime API change. `retrieveInto(region, target)` is a steady-state zero-allocation broadphase (reused internal scratch + caller buffer); property-based dedup invariants. ≥95% coverage, ≤2 KB gzip.
27
27
 
28
28
  ---
29
29
 
@@ -77,7 +77,7 @@ function nearbyEnemies(player: Body, enemies: Body[]): Body[] {
77
77
  }
78
78
  ```
79
79
 
80
- Coordinate semantics match PixiJS `getBounds()`: `x + width` and `y + height` are exclusive.
80
+ Right-open coordinate semantics: `x + width` and `y + height` are exclusive (renderer-neutral; matches common conventions such as PixiJS `getBounds()`).
81
81
 
82
82
  ---
83
83
 
@@ -135,6 +135,7 @@ Full JSDoc lives in [`src/index.ts`](src/index.ts).
135
135
  | ---------- | ------------------------------------------------------------------------------------------------------------------------------------- |
136
136
  | **0.1.0** | `createQuadtree`, `insert` / `retrieve` / `clear` / `dispose`, Set-based dedup, ≥95% coverage, ≤2 KB gzip. |
137
137
  | **0.3.0** | `retrieveInto(region, target)` zero-alloc API; property-based tests (`fast-check`); STABILITY.md tracking. |
138
+ | **0.4.0** | Dependency hygiene (removed unused `tsx`, aligned `fast-check`); 0.3.x public surface frozen for the 1.x track. No runtime API change. |
138
139
  | **0.6+** | Evaluate 3D octree variant (`createOctree<T extends AABB3>`); see `STABILITY.md` for current draft. |
139
140
 
140
141
  ---
@@ -155,6 +156,36 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
155
156
 
156
157
  ## [Unreleased]
157
158
 
159
+ ## [0.4.0] - 2026-05-29
160
+
161
+ Dependency hygiene + stability freeze. **No runtime API addition or behaviour
162
+ change** — `dist/index.js` is byte-identical to 0.3.1; consumers see no
163
+ difference. This release unifies the ai*js family version line at 0.4.0 and
164
+ formally freezes the public surface for the 1.x track.
165
+
166
+ ### Changed
167
+
168
+ - **devDependencies** — removed unused `tsx` (no script, config, or example in
169
+ this package invoked it) and aligned `fast-check` `^3.23.0` → `^4.8.0` to
170
+ match the rest of the ai*js family. Both are dev-only and absent from the
171
+ published tarball (`files` ships `dist` + docs only), so consumers are
172
+ unaffected.
173
+
174
+ ### Stability
175
+
176
+ - The 0.3.x public surface — `createQuadtree`, the `Quadtree<T>` interface and
177
+ all its members (`insert` / `retrieve` / `retrieveInto` / `clear` /
178
+ `dispose` / `disposed`), `AABB`, `QuadtreeOptions`, `QuadtreeError`,
179
+ `QuadtreeDisposedError` — is declared **frozen for the 1.x track**: it will
180
+ not break before a 1.0.0+ major. The 3D octree variant remains a draft
181
+ (target v0.6+).
182
+
183
+ ### Internal (not shipped to npm)
184
+
185
+ - `pnpm audit` reports no known vulnerabilities; `pnpm-lock.yaml` regenerated
186
+ after the devDependency changes. Property tests re-run green under
187
+ fast-check v4.
188
+
158
189
  ## [0.3.1] - 2026-05-29
159
190
 
160
191
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiquadtreejs",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Tiny 2D quadtree for per-frame rebuild collision broadphase. Insert AABBs, retrieve candidates, clear. Caller does precise hit-testing. Designed for PixiJS games with 500–10,000 active entities.",
5
5
  "keywords": [
6
6
  "quadtree",
@@ -62,9 +62,8 @@
62
62
  "@biomejs/biome": "^1.9.0",
63
63
  "@types/node": "^22.0.0",
64
64
  "@vitest/coverage-v8": "^4.1.7",
65
- "fast-check": "^3.23.0",
65
+ "fast-check": "^4.8.0",
66
66
  "tsup": "^8.3.0",
67
- "tsx": "^4.22.3",
68
67
  "typescript": "^5.6.0",
69
68
  "vite": "^8.0.14",
70
69
  "vitest": "^4.1.7"