@onlyworlds/sdk 4.129.1 → 4.130.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 CHANGED
@@ -5,6 +5,18 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.130.0] - 2026-11-02
9
+
10
+ ### Changed
11
+
12
+ - **A signed-out visitor sees the tools that need an account, greyed.** `openersFor` with `audience: 'public'` now gives a row for a tool whose `open.needs` is `account`, with the new state word `"Needs an account"` (whatever `signedIn` says: the public is the signed-out reader); before, the public saw no such row. A tool that needs the device is still not there for the public. The word comes after "You are here" and "Needs a connection", and before "Opens the world". `OwOpenerState` gains the word, so a `switch` over it that lists every case meets a new one. `mountWaymark` draws the row like one that needs a connection: grey, a link with no href, `aria-disabled="true"`, in the arrow and Tab order, doing nothing when pressed. The shared openers fixture has 92 cases (from 90): seven public cases gain their account rows, and two are new (a visitor outside a browser, a visitor on a tool that needs an account).
13
+
14
+ ## [4.129.2] - 2026-11-02
15
+
16
+ ### Fixed
17
+
18
+ - **`mapSpace` reads a number past 2^53 as not whole** (schema-dist `profiles/map-space.md`, rule 1: a reader holds whole numbers within the range it holds exactly). JavaScript parses a larger integer to the nearest double, so `-9223372036854775809` arrived as -2^63 and was kept as a point at that rounded value. A coordinate, `order`, `width`, `height` or `depth` past 2^53 - 1 now reads as not a whole number, as one with a fraction does: an `x` or `y` leaves the row out (`no_point`), a `z` reads as 0. The profile's fixture keeps every number inside that range, so no fixture answer moves.
19
+
8
20
  ## [4.129.1] - 2026-11-02
9
21
 
10
22
  ### Fixed
package/README.md CHANGED
@@ -473,7 +473,7 @@ const rows = openersFor(TOOLS, 'element', parseOwLink(link), { audience: 'member
473
473
 
474
474
  Pass the element as you were served it (`{ element }`): a tool whose element door does not open what it carries (a room element, a hidden or proposed one, a Map, Pin or Marker, a reading aid: the list's `open.element_skips`, each read as `worldGraph` reads it) has no row, rather than a link to a page that cannot open it. Without it, every row is there.
475
475
 
476
- `surface` says what the page knows and nothing is guessed: `audience` (`member` or `public`; the public sees only rows that need nothing first), `signedIn` (`null` when the page cannot know, and then no row says so), `browser` (false in a desktop app), `phone`, `online` (false with no connection: every row whose link is a web address then says "Needs a connection"), and `tool`, the page's own client name, whose row says "You are here". Draw the rows as given; the words are decided here, so every surface says the same.
476
+ `surface` says what the page knows and nothing is guessed: `audience` (`member` or `public`, the signed-out reader: the public sees the rows that need nothing, and a tool that needs an account as a row that says "Needs an account" and opens nothing; a tool that needs the device is not there), `signedIn` (`null` when the page cannot know, and then no row says so), `browser` (false in a desktop app), `phone`, `online` (false with no connection: every row whose link is a web address then says "Needs a connection"), and `tool`, the page's own client name, whose row says "You are here". Draw the rows as given; the words are decided here, so every surface says the same.
477
477
 
478
478
  ### The Waymark: Open with, beside a name
479
479
 
@@ -1287,6 +1287,7 @@ var NEEDS = ["account", "device", null];
1287
1287
  var PLACEHOLDER = /\{(world|type|id)\}/g;
1288
1288
  var WEB = /^https?:/i;
1289
1289
  var OFFLINE = "Needs a connection";
1290
+ var NO_ACCOUNT = "Needs an account";
1290
1291
  var fail = (what) => {
1291
1292
  throw new TypeError(`openersFor: ${what}`);
1292
1293
  };
@@ -1358,7 +1359,7 @@ function openersFor(tools, kind, address, surface, options = {}) {
1358
1359
  }
1359
1360
  if (elementDoor === null && skips.length > 0) fail(`tool ${r.id}: open.element_skips names what an element door leaves out, and the row has none`);
1360
1361
  if (r.rung !== "listed") continue;
1361
- if (audience === "public" && needs !== null) continue;
1362
+ if (audience === "public" && needs === "device") continue;
1362
1363
  const template = kind === "element" ? elementDoor ?? worldDoor : worldDoor;
1363
1364
  if (template === null) continue;
1364
1365
  if (kind === "element" && marks.some((m) => skips.includes(m))) continue;
@@ -1366,6 +1367,7 @@ function openersFor(tools, kind, address, surface, options = {}) {
1366
1367
  let state = null;
1367
1368
  if (tool !== null && r.client === tool) state = "You are here";
1368
1369
  else if (offline(href)) state = OFFLINE;
1370
+ else if (audience === "public" && needs === "account") state = NO_ACCOUNT;
1369
1371
  else if (needs === "account" && !browser) state = "Opens in your browser";
1370
1372
  else if (needs === "account" && signedIn === false) state = `Sign in to ${r.name} first`;
1371
1373
  else if (needs === "device" && phone) state = "Needs the world on this phone";
package/dist/index.d.ts CHANGED
@@ -5883,7 +5883,7 @@ interface OwToolOpen {
5883
5883
  world: string | null;
5884
5884
  /** The link that opens one element, holding `{id}` and, if it needs them, `{world}` and `{type}` (the type word); null without one. */
5885
5885
  element: string | null;
5886
- /** What the person needs first; null for nothing, which is the one kind of row a public page offers. */
5886
+ /** What the person needs first; null for nothing. A public page offers those rows, and an `account` row only as one that opens nothing ("Needs an account"). */
5887
5887
  needs: OwToolNeeds | null;
5888
5888
  /** What the element door does not open, in the graph section's words; [] or absent: it opens every element (a list older than the key has none). */
5889
5889
  element_skips?: readonly OwElementMark[];
@@ -5919,7 +5919,7 @@ interface OwOpenerSurface {
5919
5919
  online?: boolean;
5920
5920
  }
5921
5921
  /** The word a row says when it cannot open now, or says where it lands. Sentence case, exactly. */
5922
- type OwOpenerState = 'You are here' | 'Needs a connection' | `Sign in to ${string} first` | 'Opens in your browser' | 'Needs the world on this phone' | 'Opens the world';
5922
+ type OwOpenerState = 'You are here' | 'Needs a connection' | 'Needs an account' | `Sign in to ${string} first` | 'Opens in your browser' | 'Needs the world on this phone' | 'Opens the world';
5923
5923
  /** One row of the menu. */
5924
5924
  interface OwOpener {
5925
5925
  /** `onlyworlds` for the site's own row, else the tool's id in the list. */
@@ -5943,13 +5943,16 @@ interface OwOpener {
5943
5943
  * a world door is a row to its world door that says "Opens the world". On an element given as
5944
5944
  * `options.element`, a row whose `open.element_skips` names a mark the element carries (room, hidden,
5945
5945
  * proposed, map space, a reading aid, each read as `worldGraph` reads it) is not there: its door cannot
5946
- * open it. A world door alone opens the world, so it stays. For the `public` audience only
5947
- * rows whose `open.needs` is null are there: a row that needs anything does not exist for the public.
5946
+ * open it. A world door alone opens the world, so it stays. For the `public` audience (the signed-out
5947
+ * reader) a row whose `open.needs` is `device` is not there, since a visitor's device holds no world of
5948
+ * this one's, and a row whose `needs` is `account` is there and says it needs one.
5948
5949
  *
5949
5950
  * Each row's `state`, the first that holds: "You are here" for the surface's own tool (its `client` is
5950
5951
  * `surface.tool`); then, when `surface.online` is false, "Needs a connection" for a row whose href is a
5951
5952
  * web address (scheme `http:` or `https:`; a row whose link opens an app on the device is unaffected,
5952
- * and the href stays in the row either way); then what `needs` asks of this surface: `account` outside
5953
+ * and the href stays in the row either way); then, for the `public` audience, "Needs an account" for a
5954
+ * row whose `needs` is `account`, whatever `signedIn` says (the href stays in the row; a surface draws
5955
+ * it as a row that opens nothing); then what `needs` asks of this surface: `account` outside
5953
5956
  * a browser "Opens in your browser", in a browser signed out "Sign in to <name> first" (none when
5954
5957
  * `signedIn` is null: a word shows only when the surface knows it is true), `device` on a phone "Needs
5955
5958
  * the world on this phone"; then
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ import {
42
42
  trimWhiteSpace,
43
43
  typeWord,
44
44
  unknownKey
45
- } from "./chunk-K7SQUXMR.js";
45
+ } from "./chunk-EDU36RUO.js";
46
46
 
47
47
  // src/v2/keyed-id.ts
48
48
  var KEYED_IDS = "0199b6a0-6f0e-7c2a-9d1e-3b5c7a8e4f21";
@@ -3846,7 +3846,7 @@ function landingOf(graph, options) {
3846
3846
 
3847
3847
  // src/mapspace.ts
3848
3848
  var isRow = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
3849
- var whole3 = (v) => typeof v === "number" && Number.isInteger(v);
3849
+ var whole3 = (v) => typeof v === "number" && Number.isSafeInteger(v);
3850
3850
  var idOf2 = (v) => typeof v === "string" && v !== "" ? v : null;
3851
3851
  var byId = (a, b) => byCodePoint(a, b);
3852
3852
  function point(e) {
package/dist/waymark.d.ts CHANGED
@@ -9,7 +9,7 @@ interface OwToolOpen {
9
9
  world: string | null;
10
10
  /** The link that opens one element, holding `{id}` and, if it needs them, `{world}` and `{type}` (the type word); null without one. */
11
11
  element: string | null;
12
- /** What the person needs first; null for nothing, which is the one kind of row a public page offers. */
12
+ /** What the person needs first; null for nothing. A public page offers those rows, and an `account` row only as one that opens nothing ("Needs an account"). */
13
13
  needs: OwToolNeeds | null;
14
14
  /** What the element door does not open, in the graph section's words; [] or absent: it opens every element (a list older than the key has none). */
15
15
  element_skips?: readonly OwElementMark[];
@@ -52,7 +52,7 @@ interface OwWaymarkOptions {
52
52
  name: string;
53
53
  [k: string]: unknown;
54
54
  } | null;
55
- /** `member`, `guest` or `public`. The public face shows the name line without the last door, the rows that need nothing first, and Copy link. */
55
+ /** `member`, `guest` or `public`. The public face shows the name line without the last door, the rows that need nothing, those that need an account as rows that open nothing ("Needs an account"), and Copy link. */
56
56
  reader: OwWaymarkReader;
57
57
  /** The client name of the surface's own tool; its row says "You are here". The site passes `onlyworlds`. */
58
58
  tool?: string | null;
@@ -100,6 +100,10 @@ interface OwWaymark {
100
100
  * nothing and the fan-out stays open. While the fan-out is open, the window's `online` and `offline`
101
101
  * events redraw the rows in place, and focus on a row stays on that row. Copy link is unaffected.
102
102
  *
103
+ * For the public reader, a tool that needs an account says "Needs an account" and is drawn the same
104
+ * way: grey, a link with no href, `aria-disabled="true"`, in the arrow and Tab order, doing nothing
105
+ * when pressed.
106
+ *
103
107
  * Keyboard: the mark is a button and the fan-out a menu; Tab goes from the mark through the rows in
104
108
  * order, the arrow keys, Home and End move within it, Escape closes it and returns focus to what opened
105
109
  * it: the mark, or for the entry `returnFocus` when given (the surface's "..." button, which stays
package/dist/waymark.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  openersFor,
7
7
  refuseUnknownOptions,
8
8
  typeWord
9
- } from "./chunk-K7SQUXMR.js";
9
+ } from "./chunk-EDU36RUO.js";
10
10
 
11
11
  // src/waymark/glyphs.ts
12
12
  var MARK_PATH = "M48.8 0.0 43.8 0.4 39.0 1.2 36.0 2.0 33.2 2.9 29.3 4.5 24.8 6.8 20.6 9.5 17.0 12.4 13.6 15.7 10.4 19.4 7.8 23.1 5.8 26.6 4.5 29.3 3.3 32.1 1.8 36.8 0.8 41.2 0.1 46.3 0.0 51.1 0.4 56.2 1.2 61.0 2.0 63.9 2.9 66.8 4.5 70.7 6.8 75.2 9.5 79.4 12.4 82.9 15.7 86.3 19.4 89.5 23.1 92.1 26.6 94.2 29.3 95.5 32.1 96.7 36.8 98.2 41.2 99.2 46.3 99.8 51.1 100.0 56.2 99.6 61.0 98.8 63.9 98.0 66.8 97.1 70.7 95.5 75.2 93.2 79.4 90.4 82.9 87.6 86.3 84.3 89.5 80.5 92.1 76.9 94.2 73.4 95.5 70.7 96.7 67.9 98.2 63.2 99.2 58.7 99.8 53.7 100.0 48.8 99.6 43.8 98.6 38.4 97.1 33.2 95.5 29.3 93.2 24.8 90.4 20.6 87.6 17.0 84.3 13.6 80.5 10.4 76.9 7.8 73.4 5.8 70.7 4.5 67.9 3.3 63.2 1.8 58.7 0.8 53.7 0.1ZM77.5 80.7 74.1 83.4 70.7 85.7 67.0 87.5 64.5 88.6 64.1 88.7 65.7 86.3 67.1 83.9 68.7 80.7 69.9 77.6 72.7 78.5 73.0 78.4ZM22.5 80.7 25.6 79.0 27.3 78.3 30.0 77.6 31.3 80.7 32.8 83.9 34.2 86.3 35.9 88.7 32.9 87.5 29.3 85.7 25.8 83.4ZM51.2 74.5 55.1 74.7 59.9 75.2 64.2 76.0 67.5 76.9 66.0 80.5 64.2 84.0 62.0 87.4 59.6 90.1 55.1 90.9 52.2 91.2 51.2 91.1ZM48.7 74.5 48.8 91.1 47.7 91.2 44.9 90.9 40.3 90.1 38.2 87.8 36.3 85.0 34.2 81.2 32.5 77.0 35.8 76.0 40.5 75.2 44.5 74.7ZM91.1 51.2 91.1 52.9 90.8 56.3 90.1 59.7 89.3 62.5 88.5 64.8 87.2 67.7 85.7 70.7 83.9 73.4 82.0 75.9 79.4 78.9 76.3 77.2 73.8 76.1 76.2 68.8 77.8 62.7 78.7 56.8 79.0 51.2ZM55.8 51.2 67.7 51.2 67.6 55.1 67.2 59.0 66.7 61.5 65.7 65.0 61.0 64.2 55.7 63.6ZM32.5 51.2 44.5 51.2 44.4 63.6 39.7 64.1 34.5 65.0 33.5 61.3 32.9 58.1 32.5 54.2ZM8.8 51.2 21.0 51.2 21.0 53.3 21.4 56.6 22.7 64.0 23.8 68.4 25.0 72.1 26.6 75.9 23.7 77.2 20.6 78.9 18.5 76.7 16.5 74.1 14.8 71.5 13.4 69.1 12.1 66.3 11.0 63.6 10.1 60.5 9.4 57.3 8.9 53.5 8.8 51.3ZM36.2 27.0 39.5 27.5 44.5 28.2 44.4 48.8 32.4 48.7 32.8 44.5 33.6 39.1 35.0 32.0ZM63.9 26.9 65.2 32.1 66.6 39.2 67.4 44.8 67.7 48.7 55.8 48.8 55.7 28.1 60.5 27.5ZM74.8 23.4 76.9 22.5 79.4 21.1 82.0 24.0 84.8 27.8 86.2 30.3 87.5 32.9 88.6 35.4 89.5 38.1 90.3 41.2 90.8 44.0 91.1 47.0 91.1 48.8 79.0 48.7 78.7 44.6 78.0 39.3 76.5 31.2 74.7 23.5ZM25.5 23.5 25.5 23.7 24.5 26.8 23.7 30.2 22.4 36.6 21.5 42.5 21.1 48.7 8.8 48.8 8.8 47.0 9.2 43.7 9.8 40.8 10.5 38.1 11.5 35.2 12.4 32.9 13.8 30.2 15.2 27.8 17.9 24.0 20.6 21.1 23.1 22.5ZM64.1 11.3 67.0 12.4 70.7 14.3 74.1 16.5 77.5 19.3 75.6 20.3 73.2 21.5 70.0 22.6 68.7 19.2 67.1 16.1 65.7 13.6ZM35.9 11.3 34.2 13.6 32.8 16.1 31.3 19.2 30.0 22.5 27.9 21.9 26.4 21.3 22.5 19.3 25.8 16.5 29.3 14.3 32.9 12.4 35.4 11.4ZM51.2 8.8 52.2 8.8 55.1 9.0 59.6 9.9 61.7 12.2 64.2 16.0 66.0 19.5 67.6 23.3 64.3 24.3 59.4 25.2 56.2 25.6 51.2 25.5ZM48.8 8.8 48.7 25.5 44.2 25.6 40.6 25.2 36.4 24.5 32.4 23.2 33.9 19.5 35.7 16.0 38.2 12.2 40.3 9.9 44.9 9.0 47.7 8.8Z";
@@ -55,13 +55,14 @@ var COPIED = "Link copied";
55
55
  var NOT_COPIED = "Could not copy the link.";
56
56
  var HERE = "You are here";
57
57
  var OFFLINE = "Needs a connection";
58
+ var NO_ACCOUNT = "Needs an account";
58
59
  var WEB_LINK = /^https?:/i;
59
60
  var mounted = 0;
60
61
  var fail = (what) => {
61
62
  throw new TypeError(`mountWaymark: ${what}`);
62
63
  };
63
64
  function cannotOpen(state) {
64
- return state !== null && (state.startsWith("Sign in to ") || state === "Needs the world on this phone" || state === OFFLINE);
65
+ return state !== null && (state.startsWith("Sign in to ") || state === "Needs the world on this phone" || state === OFFLINE || state === NO_ACCOUNT);
65
66
  }
66
67
  function shapedOn(at, now) {
67
68
  const d = new Date(at);
@@ -242,7 +243,7 @@ function mountWaymark(target, options) {
242
243
  a.type = "button";
243
244
  a.setAttribute("aria-current", "page");
244
245
  a.dataset.here = "";
245
- } else if (r.state === OFFLINE) {
246
+ } else if (r.state === OFFLINE || r.state === NO_ACCOUNT) {
246
247
  a = el("a", cls);
247
248
  a.tabIndex = 0;
248
249
  a.setAttribute("aria-disabled", "true");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.129.1",
3
+ "version": "4.130.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {