@onlyworlds/sdk 4.135.1 → 4.135.2

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 CHANGED
@@ -5,6 +5,12 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.135.2] - 2026-11-09
9
+
10
+ ### Fixed
11
+
12
+ - A tool that never calls `trailByPlace` no longer carries its default floors. `TRAIL_TIERS` was built by a top-level call a bundler could not drop, so 4.135.0 and 4.135.1 added about 450 bytes to every bundle. Its freezes are now marked pure, and a bundle that imports only `mapSpace`, `worldGraph` or `OwV2Client` comes out the size it was on 4.134.1. The table is the same, frozen as before.
13
+
8
14
  ## [4.135.1] - 2026-11-09
9
15
 
10
16
  ### Fixed
package/dist/index.js CHANGED
@@ -4036,12 +4036,13 @@ function mapSpace(elements) {
4036
4036
  }
4037
4037
 
4038
4038
  // src/layout-trail.ts
4039
- var TRAIL_TIERS = Object.freeze([
4040
- { name: "ground: places and things", z: 0, kinds: ["location", "object", "zone"] },
4041
- { name: "people and the living", z: 240, kinds: ["character", "collective", "creature", "species"] },
4042
- { name: "what happened", z: 480, kinds: ["event"] },
4043
- { name: "told or abstract", z: 720, kinds: ["ability", "construct", "family", "institution", "language", "law", "narrative", "phenomenon", "relation", "title", "trait"] }
4044
- ].map((t) => Object.freeze({ ...t, kinds: Object.freeze([...t.kinds]) })));
4039
+ var tier = (name, z, kinds) => /* @__PURE__ */ Object.freeze({ name, z, kinds: /* @__PURE__ */ Object.freeze(kinds) });
4040
+ var TRAIL_TIERS = /* @__PURE__ */ Object.freeze([
4041
+ /* @__PURE__ */ tier("ground: places and things", 0, ["location", "object", "zone"]),
4042
+ /* @__PURE__ */ tier("people and the living", 240, ["character", "collective", "creature", "species"]),
4043
+ /* @__PURE__ */ tier("what happened", 480, ["event"]),
4044
+ /* @__PURE__ */ tier("told or abstract", 720, ["ability", "construct", "family", "institution", "language", "law", "narrative", "phenomenon", "relation", "title", "trait"])
4045
+ ]);
4045
4046
  var DEFAULT_SPIRAL = { r0: 140, c: 20, angle: 2.399963 };
4046
4047
  var DEFAULT_PARENT_RING = 140;
4047
4048
  function roundHalfEven(v) {
@@ -4189,11 +4190,11 @@ function trailByPlace(input) {
4189
4190
  const heroId = hero?.id;
4190
4191
  for (const { cx, cy, hs } of clusters.values()) {
4191
4192
  hs.sort((p, q) => Number(p.h.id !== heroId) - Number(q.h.id !== heroId) || p.tier - q.tier || byCodePoint(p.h.id, q.h.id));
4192
- hs.forEach(({ h, tier }, n) => {
4193
+ hs.forEach(({ h, tier: tier2 }, n) => {
4193
4194
  const r = spiral.r0 + spiral.c * Math.sqrt(n);
4194
4195
  const a = n * spiral.angle;
4195
- const where = `tier ${tiers[tier].name}; ${n + 1} of ${hs.length} on the spiral round it`;
4196
- raw.push({ element_type: h.type, element_id: h.id, name: h.name, x: cx + r * Math.cos(a), y: cy + r * Math.sin(a), z: tiers[tier].z, by: h.by ? `${h.by}; ${where}` : where });
4196
+ const where = `tier ${tiers[tier2].name}; ${n + 1} of ${hs.length} on the spiral round it`;
4197
+ raw.push({ element_type: h.type, element_id: h.id, name: h.name, x: cx + r * Math.cos(a), y: cy + r * Math.sin(a), z: tiers[tier2].z, by: h.by ? `${h.by}; ${where}` : where });
4197
4198
  });
4198
4199
  }
4199
4200
  raw.sort((p, q) => byCodePoint(p.element_id, q.element_id));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.135.1",
3
+ "version": "4.135.2",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {