@diffenderfer-games/hub 2.0.0-next.1 → 2.0.0-next.10

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.
Files changed (245) hide show
  1. package/CHANGELOG.md +160 -6
  2. package/README.md +27 -15
  3. package/dist/auto.d.ts +8 -8
  4. package/dist/auto.js +3 -3
  5. package/dist/avatar-pixi.d.ts +165 -0
  6. package/dist/avatar-pixi.d.ts.map +1 -0
  7. package/dist/avatar-pixi.js +299 -0
  8. package/dist/avatar-pixi.js.map +1 -0
  9. package/dist/avatar-svg.d.ts +4 -0
  10. package/dist/avatar-svg.js +5 -0
  11. package/dist/avatar-three.d.ts +69 -0
  12. package/dist/avatar-three.d.ts.map +1 -0
  13. package/dist/avatar-three.js +49 -0
  14. package/dist/avatar-three.js.map +1 -0
  15. package/dist/avatar.d.ts +7 -0
  16. package/dist/avatar.js +500 -0
  17. package/dist/avatar.js.map +1 -0
  18. package/dist/daily.d.ts +2 -2
  19. package/dist/doctor/cli.mjs +71 -10
  20. package/dist/doctor/cli.mjs.map +1 -1
  21. package/dist/index.d.ts +8 -8
  22. package/dist/index.js +3 -3
  23. package/dist/input.d.ts +2 -2
  24. package/dist/input.js +2 -2
  25. package/dist/mp.d.ts +3 -3
  26. package/dist/race.d.ts +1 -1
  27. package/dist/rooms.d.ts +3 -3
  28. package/dist/rooms.js +1 -1
  29. package/dist/shared/animator.d.ts +104 -0
  30. package/dist/shared/animator.d.ts.map +1 -0
  31. package/dist/shared/art.js +1946 -0
  32. package/dist/shared/art.js.map +1 -0
  33. package/dist/shared/atlas.d.ts +138 -0
  34. package/dist/shared/atlas.d.ts.map +1 -0
  35. package/dist/shared/avatar.d.ts +123 -0
  36. package/dist/shared/avatar.d.ts.map +1 -0
  37. package/dist/shared/bridge.js +18 -4
  38. package/dist/shared/bridge.js.map +1 -1
  39. package/dist/shared/client-version.gen.js +1 -1
  40. package/dist/shared/daily.d.ts +145 -19
  41. package/dist/shared/daily.d.ts.map +1 -1
  42. package/dist/shared/daily.js +138 -25
  43. package/dist/shared/daily.js.map +1 -1
  44. package/dist/shared/defineProperty.js +39 -0
  45. package/dist/shared/describe.d.ts +32 -0
  46. package/dist/shared/describe.d.ts.map +1 -0
  47. package/dist/shared/describe.js +109 -0
  48. package/dist/shared/describe.js.map +1 -0
  49. package/dist/shared/globals.js +1 -39
  50. package/dist/shared/globals.js.map +1 -1
  51. package/dist/shared/index.d.ts +1122 -46
  52. package/dist/shared/index.d.ts.map +1 -1
  53. package/dist/shared/input.d.ts +74 -14
  54. package/dist/shared/input.d.ts.map +1 -1
  55. package/dist/shared/input.js +179 -25
  56. package/dist/shared/input.js.map +1 -1
  57. package/dist/shared/json-guards.js +48 -0
  58. package/dist/shared/json-guards.js.map +1 -0
  59. package/dist/shared/latest-state.js +1 -1
  60. package/dist/shared/live-canvas.js +62 -0
  61. package/dist/shared/live-canvas.js.map +1 -0
  62. package/dist/shared/mp.js +10 -2
  63. package/dist/shared/mp.js.map +1 -1
  64. package/dist/shared/multiplayer-types.d.ts +15 -2
  65. package/dist/shared/multiplayer-types.d.ts.map +1 -1
  66. package/dist/shared/overlays.js +800 -0
  67. package/dist/shared/overlays.js.map +1 -0
  68. package/dist/shared/page-stack.js +2 -1
  69. package/dist/shared/page-stack.js.map +1 -1
  70. package/dist/shared/pose-key.js +249 -0
  71. package/dist/shared/pose-key.js.map +1 -0
  72. package/dist/shared/race-types.d.ts +1 -1
  73. package/dist/shared/race.js +1 -1
  74. package/dist/shared/room-types.d.ts +28 -3
  75. package/dist/shared/room-types.d.ts.map +1 -1
  76. package/dist/shared/rooms.d.ts.map +1 -1
  77. package/dist/shared/rooms.js +23 -4
  78. package/dist/shared/rooms.js.map +1 -1
  79. package/dist/shared/runtime-opener.js +1 -1
  80. package/dist/shared/scene.d.ts +90 -0
  81. package/dist/shared/scene.d.ts.map +1 -0
  82. package/dist/shared/social.d.ts +90 -9
  83. package/dist/shared/social.d.ts.map +1 -1
  84. package/dist/shared/social.js +6 -1
  85. package/dist/shared/social.js.map +1 -1
  86. package/dist/shared/src.js +4563 -667
  87. package/dist/shared/src.js.map +1 -1
  88. package/dist/shared/svg-markup.js +2354 -0
  89. package/dist/shared/svg-markup.js.map +1 -0
  90. package/dist/shared/svg.js +27 -0
  91. package/dist/shared/svg.js.map +1 -0
  92. package/dist/shared/types.d.ts +174 -0
  93. package/dist/shared/types.d.ts.map +1 -0
  94. package/dist/shared/wire-types.d.ts +6 -2
  95. package/dist/shared/wire-types.d.ts.map +1 -1
  96. package/dist/social.d.ts +5 -5
  97. package/dist/social.js +2 -2
  98. package/dist/turns-rules.d.ts +2 -0
  99. package/dist/turns-rules.js +1 -0
  100. package/dist/turns.d.ts +61 -0
  101. package/dist/turns.d.ts.map +1 -0
  102. package/dist/turns.js +183 -0
  103. package/dist/turns.js.map +1 -0
  104. package/package.json +39 -3
  105. package/src/avatar/adapters/pixi-avatar.ts +73 -0
  106. package/src/avatar/adapters/pixi-crowd.ts +329 -0
  107. package/src/avatar/adapters/pixi-types.ts +84 -0
  108. package/src/avatar/adapters/three.ts +126 -0
  109. package/src/avatar/animator/animator.ts +285 -0
  110. package/src/avatar/animator/reactions.ts +44 -0
  111. package/src/avatar/animator/schedule.ts +73 -0
  112. package/src/avatar/art/beard.ts +49 -0
  113. package/src/avatar/art/glasses.ts +67 -0
  114. package/src/avatar/art/hair.ts +254 -0
  115. package/src/avatar/art/headwear.ts +75 -0
  116. package/src/avatar/art/index.ts +21 -0
  117. package/src/avatar/art/shape.ts +87 -0
  118. package/src/avatar/art-store.ts +36 -0
  119. package/src/avatar/atlas.ts +246 -0
  120. package/src/avatar/catalog-view.ts +14 -0
  121. package/src/avatar/colour.ts +109 -0
  122. package/src/avatar/describe.ts +79 -0
  123. package/src/avatar/face.ts +187 -0
  124. package/src/avatar/geom.ts +173 -0
  125. package/src/avatar/layout.ts +47 -0
  126. package/src/avatar/look-like.ts +52 -0
  127. package/src/avatar/outputs/bitmap.ts +75 -0
  128. package/src/avatar/outputs/canvas-paint.ts +177 -0
  129. package/src/avatar/outputs/canvas.ts +62 -0
  130. package/src/avatar/outputs/custom-element.ts +140 -0
  131. package/src/avatar/outputs/element.ts +58 -0
  132. package/src/avatar/outputs/live-canvas.ts +57 -0
  133. package/src/avatar/outputs/overlay-svg.ts +22 -0
  134. package/src/avatar/outputs/pose-key.ts +30 -0
  135. package/src/avatar/outputs/svg-markup.ts +113 -0
  136. package/src/avatar/outputs/svg.ts +41 -0
  137. package/src/avatar/overlays.ts +128 -0
  138. package/src/avatar/render/body.ts +116 -0
  139. package/src/avatar/render/colours.ts +81 -0
  140. package/src/avatar/render/compose.ts +320 -0
  141. package/src/avatar/render/context.ts +117 -0
  142. package/src/avatar/render/eyes.ts +78 -0
  143. package/src/avatar/render/eyewear.ts +118 -0
  144. package/src/avatar/render/frame.ts +73 -0
  145. package/src/avatar/render/head.ts +81 -0
  146. package/src/avatar/render/mouth.ts +86 -0
  147. package/src/avatar/render/props.ts +91 -0
  148. package/src/avatar/render/types.ts +93 -0
  149. package/src/avatar/render/walker-parts.ts +121 -0
  150. package/src/avatar/render/walker.ts +199 -0
  151. package/src/avatar/scene.ts +119 -0
  152. package/src/avatar-pixi.ts +20 -0
  153. package/src/avatar-svg.ts +21 -0
  154. package/src/avatar-three.ts +18 -0
  155. package/src/avatar.ts +63 -0
  156. package/src/core/avatar/avatar-cache.ts +95 -0
  157. package/src/core/avatar/avatar-ref.ts +34 -0
  158. package/src/core/avatar/avatar-types.ts +43 -0
  159. package/src/core/avatar/hub-avatar.ts +308 -0
  160. package/src/core/connection.ts +201 -92
  161. package/src/core/errors.ts +15 -2
  162. package/src/core/game-data.ts +11 -9
  163. package/src/core/hub-economy.ts +47 -10
  164. package/src/core/hub-progress.ts +94 -30
  165. package/src/core/hub.ts +228 -7
  166. package/src/core/offline/cloud-saves.ts +62 -0
  167. package/src/core/offline/hub-kinds/avatar-kind.ts +42 -0
  168. package/src/core/offline/hub-kinds/daily-kind.ts +68 -0
  169. package/src/core/offline/hub-kinds/economy-kinds.ts +86 -0
  170. package/src/core/offline/hub-kinds/game-fields.ts +2 -0
  171. package/src/core/offline/hub-kinds/index.ts +52 -0
  172. package/src/core/offline/hub-kinds/legacy-ops.ts +37 -0
  173. package/src/core/offline/hub-kinds/progress-kinds.ts +165 -0
  174. package/src/core/offline/hub-kinds/resume-kind.ts +108 -0
  175. package/src/core/offline/hub-kinds/saved-kind.ts +93 -0
  176. package/src/core/offline/kind-adapters.ts +48 -0
  177. package/src/core/offline/local-inventory.ts +64 -0
  178. package/src/core/offline/local-store.ts +66 -23
  179. package/src/core/offline/offline-api.ts +65 -0
  180. package/src/core/offline/outbox-entry.ts +59 -0
  181. package/src/core/offline/outbox-kinds.ts +78 -0
  182. package/src/core/offline/outbox-merge.ts +39 -0
  183. package/src/core/offline/outbox-replayer.ts +141 -0
  184. package/src/core/offline/outbox-store.ts +85 -0
  185. package/src/core/offline/outbox.ts +232 -0
  186. package/src/core/offline/queue.ts +4 -49
  187. package/src/core/offline/replay-lease.ts +87 -0
  188. package/src/core/offline/replay-policy.ts +52 -0
  189. package/src/core/page-account.ts +121 -0
  190. package/src/core/page.ts +14 -1
  191. package/src/core/rest/rest-client.ts +14 -3
  192. package/src/core/rest/routes.gen.ts +144 -88
  193. package/src/core/resume/hub-resume.ts +286 -0
  194. package/src/core/resume/local-resume.ts +130 -0
  195. package/src/core/resume/resume-list.ts +65 -0
  196. package/src/core/resume/resume-request.ts +52 -0
  197. package/src/core/resume/resume-types.ts +64 -0
  198. package/src/core/saved/daily-saves.ts +196 -0
  199. package/src/core/saved/daily-seed.ts +16 -0
  200. package/src/core/saved/hub-saved.ts +221 -0
  201. package/src/core/saved/local-saved.ts +122 -0
  202. package/src/core/saved/saved-list.ts +129 -0
  203. package/src/core/saved/saved-open.ts +104 -0
  204. package/src/core/saved/saved-order.ts +49 -0
  205. package/src/core/saved/saved-types.ts +24 -0
  206. package/src/core/storage/json-guards.ts +6 -0
  207. package/src/core/turns/hub-turns.ts +161 -0
  208. package/src/core/turns/turn-game.ts +510 -0
  209. package/src/core/turns/your-turn-buzz.ts +69 -0
  210. package/src/core/version/client-version.gen.ts +2 -2
  211. package/src/daily/daily-system.ts +127 -12
  212. package/src/daily/page-daily.ts +2 -2
  213. package/src/daily/types.ts +49 -11
  214. package/src/doctor/checks.ts +12 -4
  215. package/src/doctor/cli.ts +5 -2
  216. package/src/doctor/hub-version-fetch.ts +43 -43
  217. package/src/doctor/world-check.ts +61 -0
  218. package/src/index.ts +20 -2
  219. package/src/input/focus-ring.ts +13 -0
  220. package/src/input/input-registry.ts +9 -2
  221. package/src/input/input-system.ts +14 -1
  222. package/src/input/modality.ts +122 -0
  223. package/src/input/nav-state.ts +13 -4
  224. package/src/input/navigator.ts +11 -0
  225. package/src/input/zero-config.ts +1 -14
  226. package/src/input.ts +4 -0
  227. package/src/mp.ts +1 -1
  228. package/src/overlay/overlay.ts +30 -4
  229. package/src/overlay/styles.ts +4 -3
  230. package/src/realtime/bridge.ts +5 -0
  231. package/src/realtime/multiplayer-forwarder.ts +13 -1
  232. package/src/realtime/multiplayer-types.ts +15 -1
  233. package/src/realtime/room-types.ts +28 -2
  234. package/src/realtime/rooms-forwarder.ts +27 -2
  235. package/src/realtime/runtime-api.ts +33 -8
  236. package/src/realtime/social-forwarder.ts +5 -0
  237. package/src/realtime/social-types.ts +8 -0
  238. package/src/realtime/types.ts +1 -0
  239. package/src/realtime/wire-types.ts +7 -0
  240. package/src/realtime/world-types.ts +20 -0
  241. package/src/rooms.ts +1 -1
  242. package/src/social.ts +1 -0
  243. package/src/turns-kit/check-rules.ts +281 -0
  244. package/src/turns-rules.ts +12 -0
  245. package/src/turns.ts +14 -0
package/CHANGELOG.md CHANGED
@@ -1,9 +1,163 @@
1
- # @diffenderfer-games/hub
2
-
3
- ## 2.0.0-next.1
1
+ # @diffenderfer-games/hub
2
+
3
+ ## 2.0.0-next.10
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Follow-ups from the Bubble Pop pilot. `hub-doctor` gives up after `--timeout` ms (default 10 s) and fails with `hub unreachable at <url>` instead of hanging. A v1 vendored singleton adopted on the page is now recorded in `window.__DG__` as `{ version: 'v1' }`. The README covers exact pins for prereleases, sharing the page with the host's `/_hub/hub.js`, and testing against the hub.
8
- - Updated dependencies
9
- - @diffenderfer-games/hub-contract@2.0.0-next.1
7
+ - 5d68e5f: Adventure Mode (the world, full screen at `/world`):
8
+
9
+ - `world.say` takes `{ quick }` or `{ text }`: typed text is moderated like all chat and delivered only to the mutual friends who can see you (strangers get quick chat only); the `world.say` event's `quick` is absent for typed text.
10
+ - `world.find { userId }` (new): where a friend is (world, instance, their cell when they share yours) and the portals to walk through; `friend_not_in_world` for anyone who isn't a friend showing you their presence.
11
+ - `world.enter`'s `world` is optional (your last world, else the Hall) and both it and `world.teleport` take `friend` to join that friend's instance; `WorldPlace.chat` says whether you may type.
12
+ - `@diffenderfer-games/world`: `portalEdges` and `planWorldRoute`, the fewest-portals route between worlds.
13
+ - `@diffenderfer-games/hub`: a page the host injected without a slug (the catalog, Adventure Mode) has no game (`hub.slug` is `null`).
14
+ - 5deeb66: `TurnGame`'s quiet-refresh safety net now also runs while the game is a lobby (waiting for seats or a start), so a page waiting in a lobby fetches the game again if it missed a live event.
15
+ - Updated dependencies [5d68e5f]
16
+ - @diffenderfer-games/hub-contract@2.0.0-next.10
17
+ - @diffenderfer-games/world@2.0.0-next.10
18
+
19
+ ## 2.0.0-next.9
20
+
21
+ ### Minor Changes
22
+
23
+ - c464aae: Avatars get a world-scale figure: `figure: 'walker'` (on `RenderOptions` for full frames, on `createAtlas` and on `createCrowd`) draws a small full-body character with legs, arms, a shirt, trousers and shoes and a smaller head, for maps and crowds. It walks (8-step cycles that swing the legs and arms along the facing), runs, sits (the origin is the seat; the feet hang `WALKER_SEAT_DROP` units below it), idles, waves and cheers, and reads clearly from behind. Head and bust frames always draw the usual figure, and `blob` stays the default. Crowd members also take `tagLift` to move a name tag up, so a world can stack tags that would overlap, and a crowd member whose look changes keeps showing its old frame while the new one bakes (no flash to the silhouette). New exports: the `Figure` type, `WALKER_HEAD_SCALE` and `WALKER_SEAT_DROP`.
24
+
25
+ ### Patch Changes
26
+
27
+ - e28707d: `createCrowd` (`/avatar/pixi`) takes two optional settings for worlds: `overlays`, a container for name tags and bubbles (so they can sit above a lighting layer), and `displayScale`, which draws atlas avatars at that scale (bake the atlas at `scale × devicePixelRatio` and pass `1 / devicePixelRatio` for crisp avatars on high-density screens). Both default to the old behaviour.
28
+ - 4eefc6c: `createCrowd` (`/avatar/pixi`): a member whose look has not baked yet shows the silhouette at its spot and at the crowd's `displayScale`, like a baked frame (it was drawn at full size with its corner at the feet, so on high-density screens it showed twice as big, below and to the right of its name tag).
29
+ - ef850e8: The world, ready to publish and live on the hub.
30
+
31
+ - `@diffenderfer-games/world` (first release): the `dg-world@1` map format with compressed `"encoding": "rle"` layers, a map `revision`, the generator's `provenance.generatorVersion` (the same seed and needs at the same version always give the same map), strict validation with readable paths, and size limits (`WORLD_LIMITS`, `parseWorldMapText`). New: `serializeWorldMap`, `encodeWorldMap`, `mapFingerprint`, `generatorVersionOf`, the Tiled converter (`worldMapToTiled`, `worldMapFromTiled`: layers, tile properties, objects, zones and lights, both ways) and the `dg-world` CLI (`check`, `from-tiled`, `to-tiled`, `generate`).
32
+ - `@diffenderfer-games/hub-contract`: `game.world` in the manifest (`map` and/or `generate: { type, seed, needs }`), the `world.*` socket ops (`enter`, `leave`, `move`, `sit`, `stand`, `teleport`, `say`) and events (`world.state`, `world.say`), `GET /world/maps/:key`, the world error codes, and `world` on a friend's presence.
33
+ - `@diffenderfer-games/hub`: `hub-doctor` checks a `game.world.map` file (it exists, is a valid map and is within the size limit) and warns about an unknown world type; the realtime API's optional `world` (feature version 6).
34
+ - Updated dependencies [ef850e8]
35
+ - @diffenderfer-games/world@2.0.0-next.9
36
+ - @diffenderfer-games/hub-contract@2.0.0-next.9
37
+
38
+ ## 2.0.0-next.8
39
+
40
+ ### Minor Changes
41
+
42
+ - ac6b1cd: Online games (`hub.turns`): `TurnGame.mayActNow` says this player may move now out of turn (the rules' `mayAct`: offer the jump-in, the UNO call, the catch), and `TurnGame.tournament` names the tournament match a game is. A `move()` answer that arrives after live events already brought newer moves no longer rolls the page back (nor does an older live event). `letComputerPlay()` documents the hand-over case. The rules kit `checkTurnRules` now moves every seat in `toAct` (not only the first) and seats in `mayAct` through `autoReact` (or the new `reactMove` option), fails on an illegal `autoReact` or a seat that does not exist, and reports `outOfTurn`.
43
+ - c12868a: Online games: new `@diffenderfer-games/hub/turns-rules` entry for a game's rules module (`defineTurnRules`, the rules types and the RNG, nothing else: the bundle stays a few KB instead of about 1 MB; `/turns` re-exports it with the kit). `TurnGame.canLetComputerPlay(now?)` says when "Let the computer play" may work (from `summary.handOverAt`, the seats' new `connected` and the deadline); `turn` now also fires when a seated player comes or goes or `handOverAt` changes. `refresh()` (and every other fetch) no longer rolls the game back when its answer is older than a live move that arrived meanwhile, and never replays that move twice. The rules kit `checkTurnRules` gains `revealed(state, marker)` (a planted card the rules rightly reveal, such as one played face up, stops being checked) and `shuffleHidden(state, seat, rng)` (the "twin table": shuffling what a seat can't see must not change its view).
44
+
45
+ `TurnGame.move()` fetches the game again after a 500 `rules_error` or 503 `rules_busy` (the hub now makes a move all or nothing, so such a move was not made).
46
+
47
+ The "your turn" buzz: every online game's page gives a short vibration when the player becomes due on a live update (never for their own next step, a move out of turn, a game just opened or a catch-up; never when they turned it off, ask for less motion, or the device can't vibrate). `hub.turns.setYourTurnBuzz(false)` and `TurnGame.setYourTurnBuzz(false)` opt a page or game out; `hub.turns.playerYourTurnBuzz` is the player's own switch on this device (the menu's Settings show it), with `readYourTurnBuzz`, `saveYourTurnBuzz`, `isNewlyDue`, `YOUR_TURN_BUZZ` and `YOUR_TURN_BUZZ_KEY` exported. A visible page waiting on another player's move that hears nothing for `TURN_QUIET_MS` (15 s) fetches the game again, so games need no polling of their own.
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies [3a67590]
52
+ - Updated dependencies [70dcfa1]
53
+ - Updated dependencies [c77830f]
54
+ - Updated dependencies [ac6b1cd]
55
+ - Updated dependencies [c12868a]
56
+ - @diffenderfer-games/hub-contract@2.0.0-next.8
57
+
58
+ ## 2.0.0-next.7
59
+
60
+ ### Minor Changes
61
+
62
+ - 99d0932: Avatars: long hair now hangs behind the body. The parts of a hair style below the shoulders are drawn before the body (in SVG, Canvas, `<dg-avatar>`, the Pixi atlas and the three.js adapter) while the fringe and anything over the face stay over the head; back views keep the hair over the back. The renderer draws the eight new glasses in style C with any frame colour (light frames, and frames close to the skin, get a dark edge) and tinted lenses for sunglasses, sport and hearts (a mirror finish for `p:lens-mirror`); winks and sleepy eyes show through the lenses. `describe()` names them. The `/avatar` entry re-exports `FRAME_PRESETS`, `isTinted` and `SECOND_COLOUR_CODE`.
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies [99d0932]
67
+ - @diffenderfer-games/hub-contract@2.0.0-next.7
68
+
69
+ ## 2.0.0-next.6
70
+
71
+ ### Minor Changes
72
+
73
+ - 537272a: `hub.avatar`: players' avatars without the renderer. `mine()` / `mineSync()` (works offline from the device cache), `of(userId)` and `many(ids)` (batched and cached), `from(seat)` (any payload with `look`, no request), `bot(seed)` for computer players, `save(look)` (queued offline), `on('change')`, `openDesigner()` ("Make your avatar" over the game) and `load()` (the `/avatar` renderer with its art). A DOM-free `@diffenderfer-games/hub/avatar/svg` entry renders avatars as SVG on servers and in workers.
74
+ - fb0a9f5: `hub.userId()`: your user id, or `null`, synchronously. It follows the account as the hub changes it (the menu's new-guest account, sign-in, sign-out, the live connection's hello) with no `hub.me()` call.
75
+
76
+ `hub.avatar` follows the account too: when your account appears or changes, your look is fetched and `change` fires with your `userId`; before it exists, `mine()` resolves at once with a default look. Each time the live connection (re)connects, the looks this page asked about are checked again and `change` fires for any that changed while it was down. `change` for your own look fires only when it differs from the one the page last had.
77
+ - 849874f: Avatars: draw players' faces in any game. New entries: `@diffenderfer-games/hub/avatar` (`ready()`, `render.svg/element/canvas/canvasAt/bitmap/dataUrl`, `<dg-avatar>` via `defineAvatarElement()`, the `animator` with 16 expressions, gaze, blinks, talking, reactions and `feel()`, `layout()` anchors, `facingFrom`, `lookToward`, `describe`, `avatarEmoji`, overlays and `createAtlas`), `@diffenderfer-games/hub/avatar/pixi` (`pixiAvatar`, `avatarTexture`, `createCrowd`) and `@diffenderfer-games/hub/avatar/three` (`avatarCanvasTexture`, `avatarSprite`). The adapters take your PIXI or THREE namespace; no new dependencies. See "Avatars" in docs/hub.md.
78
+ - 5109a42: The avatar renderer draws the new `beard.short` (a short, neat beard with a moustache) in style C, with the same beard and moustache layers and tonal outline as the full beard, in SVG, `<dg-avatar>` and the Pixi and three.js adapters. `describe()` calls it "a short beard".
79
+ - e86bfb4: "Your turn" alerts and quiet hours. The contract adds the `your_turn` notice and preference kind, `NotifyPrefs.yourTurn`/`yourTurnOff`/`yourTurnAsked`/`quiet`, `QuietHours` and `PUT /social/notify/quiet` (`setQuietHours`), plus `POST /turns/:id/share` (`shareTurnGame`) and `autoStart` on `createTurnGame`. The client adds `TurnGame.share({ link?, public? })`, `hub.turns.create({ autoStart })`, `TURN_RESYNC_EVENT` (an open online game fetches what it missed when the live connection comes back; `turn` also fires on a `chatMode` or `link` change), and `hub.saved.onOpen(handler, { kinds })`. A second Rematch joins the first one's game.
80
+ - e0e38da: Daily challenges in progress. A started day is now a saved game: starting it again (the calendar, a `?daily=` link, Your games) picks it up where the player left it, at any age, and winning it any time later gives that day's credit. `hub.daily` adds `save({ state, progress, title?, version? })`, `resume(instanceId)`, `discard()` and `inProgress()`; `challenge.saved`/`savedVersion`/`instanceId`/`resumed` in `play(challenge)`; the `hub:daily-resumed`, `hub:daily-paused` and `hub:daily-discarded` events. `hub.daily.cancel()` now pauses the day (it stays in progress) instead of dropping it. `hub.resume.save()` during a daily saves to the day instead of being ignored (`blockedBy` no longer reports `'daily'`), so games that already use `hub.resume` get mid-daily saves for free; `hub.resume.clear()` during a daily restarts the day. Works offline (a day started offline lands as the one saved game for that day). The contract adds `StartedDailyChallenge` (start answers `instanceId`, `saved`, `savedVersion`, `resumed`), `POST /daily/instances/:id/resume`, `inProgress` days in `GET /daily` and `GET /games/:slug/daily`, and 409 `too_many_dailies` (60 per game).
81
+ - ce80c33: Saved games (foundations). New `hub.saved`: `list()` (this game's games in progress: daily challenges, the saved run, online games), `listAll()`, `opened` (the instance the page was opened for, `?hub_open=<id>&hub_kind=<kind>`), `onOpen(handler)` (switch to a game picked from the hub menu without a reload), `open(id)`, `discard(id)`, `counts()` and `on('change', cb)`. Works offline from the device's copies. The contract adds `api/saved.ts` (`GET /saved`, `GET /saved/:id`, `PUT /saved/:id/state`, `POST /saved/:id/discard`, `POST /games/:slug/saved/discard`), the `saved` socket event, `TurnSummary`, the error codes `instance_closed` and `too_many_dailies`, and the pure `compareSaved`/`countSaved`. `hub.resume` is unchanged for games; saved runs never expire any more (`RESUME_RETENTION_MS` is deprecated and unused).
82
+ - 0c5c833: Online games played over days. A game declares `game.turns` (`rules`, `players`, `bots`, `modes`, `maxApplyMs`) and ships its rules as one self-contained ES module (the `TurnRules` contract: `setup`, `view`, `toAct`, `apply`, `eventView`, `outcome`, `progress`, `autoMove`, `migrate`); the hub runs it on the server, so hands and decks never reach another player. New `hub.turns` (`create`, `join`, `open`, `list`, `openLobbies`, `link`) and `TurnGame` (`summary`, `view`, `mySeat`, `outcome`, `chat`, `chatMode`, `link`, `start`, `move`, `history`, `leave`, `nudge`, `setNotify`, `rematch`, `invite`, `letComputerPlay`, `say`, `refresh`, `close`, events `move`, `turn`, `ended`, `chat`). `@diffenderfer-games/hub/turns` exports the rules types, `defineTurnRules`, the seeded RNG and the `checkTurnRules` conformance kit for a game's own tests. `HubError.rule` carries a rules refusal's code; `hub.resume.blockedBy` can be `'turns'`. The contract adds `api/turns.ts`, the `turn` and `turn.chat` events, the turn error codes, `ErrorBody.rule`, Play online's `yourTurn`/`turns`/`openTurns`/`turnGames`, and the `turn_chat` report kind.
83
+
84
+ ### Patch Changes
85
+
86
+ - 4a03d21: The avatar adapters take the engines' real types and give them back: `pixiAvatar`, `avatarTexture` and `createCrowd` (`/avatar/pixi`) accept `import * as PIXI from 'pixi.js'` or an object of the named imports, and `face.view` is pixi's own `Sprite` (it goes into a `Container` with no cast). `avatarSprite` and `avatarCanvasTexture` (`/avatar/three`) do the same for three.js, returning three's `Sprite` and `CanvasTexture`; `avatarCanvasTexture` needs only `CanvasTexture` (the new `ThreeTextureNs`). `PixiNs`, `PixiSprite`, `PixiContainer`, `PixiAvatar`, `CrowdOptions`, `ThreeNs` and `ThreeAvatarTexture` are generic over the game's classes, with defaults, so existing annotations keep compiling. No runtime change.
87
+ - bcb10f1: `hub.resume.clear()` during a daily challenge now reaches the hub (the day starts over from its seed on every device instead of the old state coming back), and `hub.resume.get()`/`load()` dropping an older-version saved run no longer restarts the daily being played.
88
+ - ac2884e: `hub.input.autoNavigateTarget()` returns the game's current `autoNavigate` target (its query and back action), so hub dialogs that borrow the gamepad give the game's menu navigation back when they close. Fixes gamepad menu navigation being lost after a social dialog (a confirm, the share sheet) closed.
89
+ - b2e9e64: Saved runs (`hub.resume`) are now saved games of their own kind and never expire; the API is unchanged. The menu's Reset game also offers to discard the game's daily challenges in progress.
90
+ - 93af853: `hub.input.setInsets` also publishes the insets as `--hub-inset-top` (and right, bottom, left) on the page, so the hub's toasts sit below a game's top bar (without it, the hub looks for a top bar in the page itself).
91
+ - 06f827c: `TurnGame` fires `turn` when a seated player changes their avatar (the seat's `look`), not only when statuses or players change.
92
+ - Updated dependencies [91ca7f9]
93
+ - Updated dependencies [46fa584]
94
+ - Updated dependencies [5109a42]
95
+ - Updated dependencies [bf6445c]
96
+ - Updated dependencies [508531a]
97
+ - Updated dependencies [e86bfb4]
98
+ - Updated dependencies [e0e38da]
99
+ - Updated dependencies [ce80c33]
100
+ - Updated dependencies [0c5c833]
101
+ - Updated dependencies [17cf0af]
102
+ - @diffenderfer-games/hub-contract@2.0.0-next.6
103
+
104
+ ## 2.0.0-next.5
105
+
106
+ ### Patch Changes
107
+
108
+ - 7585522: Saves offline no longer risk the cloud copy. Offline, `getSave(slot)` rejects with a `HubError` whose `code` is `save_unknown` (new export `SAVE_UNKNOWN_CODE`; `isOffline` is `true`) when the device has never seen the hub's copy of that slot, instead of answering `save: null`; it still answers from the device's copy after a snapshot (`prefetchAll`), an online read, a landed write, or for a slot the device wrote and has queued. A `putSave` replayed from the offline queue now sends `base`, the slot's `updatedAt` on the hub as the device last saw it, and the hub refuses it with 409 `save_conflict` when another device saved since (dropped and reported in the `hub:sync` conflicts); writes sent at once while online are unchanged. The client also remembers the signed-in user from `login`, `signup`, `claim` and `ensureGuest` replies, and forgets it on `logout`. Contract: `writeSave` takes an optional `base` and may answer 409; new error code `save_conflict`. Older clients (no `base`) behave as before. See docs/hub.md "Saves offline".
109
+ - Updated dependencies [7585522]
110
+ - @diffenderfer-games/hub-contract@2.0.0-next.5
111
+
112
+ ## 2.0.0-next.4
113
+
114
+ ### Minor Changes
115
+
116
+ - 9f993ab: Resume saved games. New `hub.resume` (`save`, `flush`, `clear`, `load`, `get`, `requested`, `blockedBy`, `list`, `discard`): one auto-saved run per player per game that the home page's new Resume card lists, so players pick long single-player runs up again on any device. Saves are kept on the device at once, debounced (3 s), sent when the page hides, and replay offline through the new `hub.resume` outbox kind; they are ignored during races, daily challenges and hub rooms. `hub.resume.requested` is a synchronous `true` when the page was opened from the card (`?hub_resume=1`, taken out of the URL). Games opt in with `game.resumable: true` in the manifest. Contract: `resumeEndpoints` (`getResumeSlot`, `saveResumeSlot`, `clearResumeSlot`, `listMyResumeSlots`), `ResumeSlot`, `ResumeSummary`, `ResumeProgress`, `ResumeWrite`, `RESUME_MAX_STATE_BYTES` (512 KB), `RESUME_TEXT_MAX`, `RESUME_RETENTION_MS` (60 days), `RESUME_REQUEST_PARAM`; `saveResumeSlot` and `clearResumeSlot` join `OFFLINE_REPLAY_ENDPOINTS`. See docs/hub.md "Resume saved games". Daily: `hub.daily.complete()` now ends the daily run at the call (`hub.daily.active` is `null` at once, even if the hub refuses the completion); games must call `hub.daily.cancel()` when the player leaves a daily unfinished, or `hub.resume.save` stays off (it warns once).
117
+
118
+ ### Patch Changes
119
+
120
+ - Updated dependencies [9f993ab]
121
+ - @diffenderfer-games/hub-contract@2.0.0-next.4
122
+
123
+ ## 2.0.0-next.3
124
+
125
+ ### Patch Changes
126
+
127
+ - ce98e79: Focus rings only for keyboard and gamepad players. The input system tracks the last input modality on `<html data-hub-input="keys|pointer|touch">`: the navigation highlight and the catalog's `gp-focus` show only after a key or gamepad press, never after a tap or click, and touch screens show no focus ring on buttons at all (the browser's own included). The ring is new: a two-tone box-shadow (dark gap, light ring) that follows the element's own corner radius instead of an orange rectangle, tunable with `--hub-focus-color`, `--hub-focus-inner`, `--hub-focus-width` and `--hub-focus-gap`. New exports from `@diffenderfer-games/hub/input`: `FOCUS_RING_SHADOW`, `MODALITY_ATTRIBUTE`, `trackInputModality` and the `InputModality` type.
128
+ - @diffenderfer-games/hub-contract@2.0.0-next.3
129
+
130
+ ## 2.0.0-next.2
131
+
132
+ ### Minor Changes
133
+
134
+ - 3944819: `game.labels`: say what kind of game yours is, from a fixed vocabulary (`GAME_LABELS`, with display names in `GAME_LABEL_TITLES`, grouped in `GAME_LABEL_GROUPS`): genre (`cards`, `board`, `puzzle`, `arcade`, `platformer`, `real-time-strategy`, `physics`, `typing`, `word`, `sports`, `racing`), look (`2d`, `3d`), where it plays (`phone`, `controller`, `desktop`) and players (`multiplayer`, `single-player`). The home page filters by them. An unknown label is a `hub-doctor` warning, not an error.
135
+
136
+ New endpoints: `GET /catalog/players` (how many accounts and guests have each game open right now: counts only) and `GET /games/:slug/me/activity` (the signed-in player's plays and minutes in a game). The `lobbyOpen` notification preference now means "tell me when people want to play": an open public lobby or race, or a tournament opening.
137
+ - 937d61e: Explicit offline replay. Writes made offline now go into a typed operation outbox in `localStorage`: each op has a kind whose handler performs it (several dependent calls can be one op), ops replay in order with backoff when the hub is back and after a reload, one tab replays at a time, and the outbox is capped. Saves, stats, scores, the profile, daily completions, inventory grants and house exchanges, and starring a game all queue offline. Games add their own kinds with `hub.offline.define(kind, handler)`, queue them with `hub.offline.enqueue(kind, payload)`, list them with `hub.offline.pending()`, and hear `queued`, `replayed` and `failed` through `hub.offline.on(...)` (and `hub:offline-*` window events). An offline `hub.daily.complete()` resolves `null`, fires `hub:daily-queued`, and replays later. The contract marks the endpoints that may be replayed (`OFFLINE_REPLAY_ENDPOINTS`); each replayed call carries an operation key (`x-hub-op`) and the hub runs it once per key. `SyncConflict.op` is now the dropped outbox op.
138
+ - ed68402: Invite links and resilient online games (batch 2026-10, R13 and R14).
139
+
140
+ - **Invite links:** `hub.mp.inviteLink()` makes (or reuses) a shareable link to the room the player is in; `hub.mp.revokeInviteLink(token)` revokes it. Opening `/<slug>/<lobby>?hub_link=<token>` arrives as an ordinary `join` or `watch` launch with `via: 'link'`. Contract: `POST /mp/links`, `GET /mp/links`, `DELETE /mp/links/:token`, `POST /mp/links/:token/open`, the `InviteLink` shape and the `link_invalid`, `link_room_gone` and `too_many_links` error codes.
141
+ - **Resilient rooms:** the new `room.seat` event (`room.on('seat', …)`: `away` with `graceEndsAt`, `back`, `gone` with `reason`), `room.seats()`, `hub.rooms.reclaim()` (socket op `room.reclaim`), seats' `graceEndsAt`, and `Launch.via` (`'link' | 'rejoin'`). The host role now passes on instead of the room closing with `host_left`: once the host's seat is freed by default, or as soon as the host drops with `hub.rooms.create({ hostMigration: 'drop' })`.
142
+ - The realtime feature version is 3; on an older runtime the new methods reject with `OfflineError` asking for a reload.
143
+ - 5b68831: Tournaments (docs/multiplayer.md §15). `game.multiplayer.tournaments: true` says a game plays 1v1 tournament matches and reports their winner; race games need nothing. A ready match reaches the game as an ordinary `host`/`guest` launch with the new `launch.tournament` (`{ id, title, match, opponent }`); a hub-room game ends it with `room.end({ winnerId })`, an own-server game posts results with `tournament: { id, match }`.
144
+
145
+ New endpoints: `GET /play-online` (lobbies waiting for a player, invites, my tournaments, open ones coming up), `GET|POST /tournaments`, `GET|DELETE /tournaments/:id`, `POST /tournaments/:id/join|leave|start|invites`, `PUT|DELETE /tournaments/:id/follow` and `POST /tournaments/:id/matches/:match/launch`; the `tournament` socket event; the `tournament` notice kind; `GameInfo.tournaments`; `TOURNAMENT_LIMITS`. `hub.social.openPlayOnline()` opens the hub's Play online window (realtime feature version 4).
146
+
147
+ ### Patch Changes
148
+
149
+ - `hub.input.axis(name)` reads a vertical-only axis (`axes: { paddle: { y: ['up', 'down'] } }`); it used to read 0.
150
+ - A save, profile or score meta with an optional field set to `undefined` is stored and sent as the JSON it stands for (the field left out); with the new outbox it was refused as "Malformed offline operation payload" and never reached the hub.
151
+ - Updated dependencies [3944819]
152
+ - Updated dependencies [937d61e]
153
+ - Updated dependencies [ed68402]
154
+ - Updated dependencies [5b68831]
155
+ - @diffenderfer-games/hub-contract@2.0.0-next.2
156
+
157
+ ## 2.0.0-next.1
158
+
159
+ ### Patch Changes
160
+
161
+ - Follow-ups from the Bubble Pop pilot. `hub-doctor` gives up after `--timeout` ms (default 10 s) and fails with `hub unreachable at <url>` instead of hanging. A v1 vendored singleton adopted on the page is now recorded in `window.__DG__` as `{ version: 'v1' }`. The README covers exact pins for prereleases, sharing the page with the host's `/_hub/hub.js`, and testing against the hub.
162
+ - Updated dependencies
163
+ - @diffenderfer-games/hub-contract@2.0.0-next.1
package/README.md CHANGED
@@ -90,16 +90,31 @@ The analytics calls (`recordPlay`, `heartbeat`, `event`) never throw.
90
90
 
91
91
  With `offline: 'auto'` (the default), reads fall back to a cache in
92
92
  `localStorage` when the hub can't be reached, and writes (saves, stats,
93
- scores, profile) apply to the cache at once and are queued. The queue replays
94
- in order when the connection returns; `hub.sync()` replays it on demand,
95
- `hub.pending()` counts what waits, and `hub.onStatus(listener)` reports
96
- changes. `hub.prefetchAll()` warms the cache for every game in one request.
97
- `offline: 'always'` never touches the network (develop without a hub);
98
- `offline: 'never'` always throws instead.
93
+ scores, profile, daily completions, inventory grants and exchanges, stars)
94
+ apply to the cache at once and are queued in an outbox. The outbox replays
95
+ in order when the connection returns (and after a reload), one tab at a
96
+ time, and the hub applies each replayed call once. `hub.sync()` replays it
97
+ on demand, `hub.pending()` counts what waits, and `hub.onStatus(listener)`
98
+ reports changes. `hub.prefetchAll()` warms the cache for every game in one
99
+ request. `offline: 'always'` never touches the network (develop without a
100
+ hub); `offline: 'never'` always throws instead.
101
+
102
+ Queue your own operations, with a handler that may make several dependent
103
+ calls:
99
104
 
100
- The cache and queue use the same `localStorage` keys as the old vendored
101
- client, so a game that switches to this package keeps its players' queued
102
- progress.
105
+ ```ts
106
+ hub.offline.define<{ score: number }>('my-game.finish', async (run, context) => {
107
+ const { rank } = await context.call('submitScore', { slug: 'my-game', key: 'runs', score: run.score });
108
+ await context.call('updateGameStat', { slug: 'my-game', key: 'best-rank', value: rank ?? 0, mode: 'max' });
109
+ });
110
+ hub.offline.enqueue('my-game.finish', { score: 4200 });
111
+ hub.offline.on('failed', ({ op, error }) => console.warn(op.kind, error));
112
+ ```
113
+
114
+ The full rules (what replays, ordering, retries, the size cap) are in the
115
+ hub docs' "Offline and replay" section. The cache keeps the old vendored
116
+ client's `localStorage` keys, and its queue moves into the outbox, so a game
117
+ that switches to this package keeps its players' queued progress.
103
118
 
104
119
  ## Games without a build step
105
120
 
@@ -166,16 +181,13 @@ warns when the client is deprecated or a vendored `src/hub/` copy (or
166
181
  The hub's test kit lives in the host repo (`test/helpers/`). Point your
167
182
  game's tests at a checkout of it with `DG_HOST`; the default is
168
183
  `../diffenderfer-games`. It boots a real hub on a free port for each test
169
- file:
184
+ file (the same hub and host production runs):
170
185
 
171
186
  ```sh
172
- DG_HOST=../diffenderfer-games HUB_IMPL=next npm run test:hub
187
+ DG_HOST=../diffenderfer-games npm run test:hub
173
188
  ```
174
189
 
175
- `HUB_IMPL=next` runs the TypeScript hub and host that production runs. Without
176
- it, the kit boots the old hub (`src/index.js`), which is kept only as a
177
- rollback path until it is deleted; test against `next`. The checkout needs
178
- `npm ci` at its root and in `next/`.
190
+ The checkout needs `npm ci` at its root.
179
191
 
180
192
  ## Moving from the vendored copy
181
193
 
package/dist/auto.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { a as RaceResultPlayer, c as RoomChatLine, d as RoomStateChange, f as SchemaOutput, i as RaceRecordPlayer, l as RoomMessage, m as Snapshot, n as Notice, o as RaceStatusEvent, p as ServerEvents, r as RaceHistory, s as RealtimeErrorShape, t as InviteCreated, u as RoomSeat } from "./shared/wire-types.js";
2
- import { _ as DailyStatus, a as isDailySystem, c as DailyAll, d as DailyCompletionMeta, f as DailyDefinition, g as DailyStartResponse, h as DailyHost, i as getDaily, l as DailyChallenge, m as DailyGameStatus, n as DailyCompletions, o as DAILY_START_EVENT, p as DailyEventDetail, r as DAILY_SINGLETON_API, s as DailySystem, t as DailyCompletion, u as DailyCompleteResponse } from "./shared/daily.js";
3
- import { $ as VirtualControlType, A as AxisSide, B as InputReading, C as parseInputOverrides, D as isPageInputControl, E as PageInputControl, F as InputConfig, G as NavElement, H as MenuBridge, I as InputDef, J as NavTarget, K as NavElementKind, L as InputEvents, M as EdgeOffsets, N as GamepadMapping, O as Anchor, P as GroupDef, Q as Vector, R as InputHost, S as isInputSystem, T as InputSystemOptions, U as MouseMapping, V as InputSource, W as NavBlurEvent, X as Rect, Y as NavigableDef, Z as TouchMapping, _ as boxesTouch, a as OverlayEdge, b as InputOptions, c as OverlayReason, d as LayoutOptions, et as VirtualDef, f as layoutControls, g as LayoutItem, h as LayoutBox, i as AutoPauseOptions, j as DraggedSpot, k as AxisDef, l as UiStack, m as Insets, n as getUiStack, nt as VirtualOverride, o as OverlayEvent, p as Overlay, q as NavFocusEvent, r as isUiStack, s as OverlayListener, t as UI_STACK_VERSION, tt as VirtualInputs, u as UiStackHandoff, v as controlSize, w as InputSystem, x as getInput, y as INPUT_SINGLETON_API, z as InputOverrides } from "./shared/input.js";
4
- import { a as JoinInfoEvent, i as InviteResult, n as HubMpApi, r as InviteOptions, t as BusyOptions } from "./shared/multiplayer-types.js";
1
+ import { A as SAVED_OPEN_EVENT, C as SavedKind, D as TurnSummary, E as SavedStatus, M as SavedOpened, N as savedGameUrl, O as SAVED_CHANGE_EVENT, S as SavedEntry, T as SavedProgress, _ as DailyStartResponse, a as isDailySystem, b as SavedCounts, c as DailyAll, d as DailyCompletionMeta, f as DailyDefinition, g as DailySaveInput, h as DailyHost, i as getDaily, j as SAVED_OPEN_PARAM, k as SAVED_KIND_PARAM, l as DailyChallenge, m as DailyGameStatus, n as DailyCompletions, o as DAILY_START_EVENT, p as DailyEventDetail, r as DAILY_SINGLETON_API, s as DailySystem, t as DailyCompletion, u as DailyCompleteResponse, v as DailyStatus, w as SavedListOptions, x as SavedDaily, y as GamePayload } from "./shared/daily.js";
2
+ import { a as RaceRecordPlayer, c as RealtimeErrorShape, d as RoomSeat, f as RoomSeatChange, g as Snapshot, h as ServerEvents, i as RaceHistory, l as RoomChatLine, m as SchemaOutput, n as InviteLink, o as RaceResultPlayer, p as RoomStateChange, r as Notice, s as RaceStatusEvent, t as InviteCreated, u as RoomMessage } from "./shared/wire-types.js";
3
+ import { $ as NavTarget, A as PageInputControl, B as InputConfig, C as INPUT_SINGLETON_API, D as parseInputOverrides, E as isInputSystem, F as AxisSide, G as InputReading, H as InputEvents, I as DraggedSpot, J as MouseMapping, K as InputSource, L as EdgeOffsets, M as AutoNavigateTarget, N as Anchor, O as InputSystem, P as AxisDef, Q as NavFocusEvent, R as GamepadMapping, S as FOCUS_RING_SHADOW, T as getInput, U as InputHost, V as InputDef, W as InputOverrides, X as NavElement, Y as NavBlurEvent, Z as NavElementKind, _ as boxesTouch, a as OverlayEdge, at as VirtualDef, b as MODALITY_ATTRIBUTE, c as OverlayReason, d as LayoutOptions, et as NavigableDef, f as layoutControls, g as LayoutItem, h as LayoutBox, i as AutoPauseOptions, it as VirtualControlType, j as isPageInputControl, k as InputSystemOptions, l as UiStack, m as Insets, n as getUiStack, nt as TouchMapping, o as OverlayEvent, ot as VirtualInputs, p as Overlay, q as MenuBridge, r as isUiStack, rt as Vector, s as OverlayListener, st as VirtualOverride, t as UI_STACK_VERSION, tt as Rect, u as UiStackHandoff, v as controlSize, w as InputOptions, x as trackInputModality, y as InputModality, z as GroupDef } from "./shared/input.js";
4
+ import { a as InviteResult, i as InviteOptions, n as HubMpApi, o as JoinInfoEvent, r as InviteLinkMethods, t as BusyOptions } from "./shared/multiplayer-types.js";
5
5
  import { o as multiplayerForwarder } from "./shared/mp.js";
6
- import { a as RoomEvents, c as RoomSendOptions, i as RoomCreateOptions, l as RoomState, n as HubRoomsApi, o as RoomListOptions, r as JoinOptions, s as RoomSelf, t as HubRoom, u as RoomStateOptions } from "./shared/room-types.js";
6
+ import { a as RoomEvents, c as RoomSelf, d as RoomStateOptions, i as RoomCreateOptions, l as RoomSendOptions, n as HubRoomsApi, o as RoomListOptions, r as JoinOptions, s as RoomReclaimMethods, t as HubRoom, u as RoomState } from "./shared/room-types.js";
7
7
  import { a as RaceHistoryQuery, c as RaceRuntimeApi, i as RaceEvents, l as RaceStart, n as RaceCreateOptions, o as RaceHistoryViewOptions, r as RaceDefinition, s as RaceHudPlace, t as HubRaceApi } from "./shared/race-types.js";
8
8
  import { f as raceForwarder } from "./shared/race.js";
9
9
  import { n as roomsForwarder } from "./shared/rooms.js";
10
- import { $ as HubNotifyApi, A as RacerState, B as SuggestionStatus, C as RaceRecord, D as RaceStats, E as RaceState, F as ReportReason, G as REALTIME_READY_EVENT, H as isRealtimeApi, I as RoomInfo, J as RealtimeHubLink, K as REALTIME_SINGLETON_API, L as SocialConfig, M as Relation, N as ReportInput, O as Racer, P as ReportKind, Q as socialForwarder, R as SocialMe, S as RaceParams, T as RaceStatValue, U as REALTIME_FAILED_EVENT, V as findRealtimeApi, W as REALTIME_FEATURE_VERSION, X as notifyForwarder, Y as linkRealtimeToHub, Z as presenceForwarder, _ as PlayerLite, a as ErrorBody, at as SocialEvents, b as PresenceKind, c as JoinInfo, d as Message, et as HubPresenceApi, f as MessagesPage, g as PlayerCard, h as Party, i as Counts, it as SocialCounts, j as RecentPlayer, k as RacerResult, l as Launch, m as NotifyPrefs, n as ChatMode, nt as OpenInviteOptions, o as FriendEntry, p as NotifyChange, q as RealtimeApi, r as Conversation, rt as PlayerRef, s as Invite, t as Audience, tt as HubSocialApi, u as LaunchTicket, v as Presence, w as RaceResult, x as RaceOutcome, y as PresenceInput, z as Suggestion } from "./shared/social.js";
11
- import { $ as SubmitScoreResult, A as BoardWithTop, B as Json, C as CLIENT_VERSION_HEADER, D as QueuedScoreOptions, E as QueueOpInput, F as GlobalAnalytics, G as Profile, H as LeaderboardResult, I as HubOptions, J as SaveMeta, K as ProfileSummary, L as HubStatus, M as GameInfo, N as GameLeaderboards, O as BufferedEvent, P as GameRecords, Q as SubmitScoreOptions, R as Inventory, S as SyncResult, T as QueueOp, U as MeResponse, V as LeaderboardEntry, W as Metrics, X as SortDir, Y as SnapshotResponse, Z as Stats, _ as TradeNoteOptions, a as HubErrorDetails, b as StatResult, c as Hub, d as ClientSupport, et as User, f as HubMenuControl, g as TradeListOptions, h as TradeId, i as HubErrorCode, it as GamePayload, j as GameAnalytics, k as Board, l as createHub, m as TradeBundle, n as ContentRejectedError, nt as EndpointName, o as OfflineError, p as GrantBundle, q as Save, r as HubError, rt as EndpointReply, s as UNSUPPORTED_BY_HUB, t as HUB_CLIENT_VERSION, tt as EndpointFields, u as hub, v as AuthResponse, w as ProfilePatch, x as SyncConflict, y as ProfileUpdate, z as InventorySnapshot } from "./shared/index.js";
10
+ import { $ as AvatarRef, A as RacerState, B as SuggestionStatus, C as RaceRecord, D as RaceStats, E as RaceState, F as ReportReason, G as REALTIME_READY_EVENT, H as isRealtimeApi, I as RoomInfo, J as SESSION_EVENT, K as REALTIME_SINGLETON_API, L as SocialConfig, M as Relation, N as ReportInput, O as Racer, P as ReportKind, Q as AvatarChange, R as SocialMe, S as RaceParams, T as RaceStatValue, U as REALTIME_FAILED_EVENT, V as findRealtimeApi, W as REALTIME_FEATURE_VERSION, X as WorldEventName, Y as RuntimeWorldApi, Z as WorldOpName, _ as PlayerLite, a as ErrorBody, at as notifyForwarder, b as PresenceKind, c as JoinInfo, ct as HubNotifyApi, d as Message, dt as OpenInviteOptions, et as DesignerResult, f as MessagesPage, ft as PlayOnlineMethods, g as PlayerCard, h as Party, ht as SocialEvents, i as Counts, it as linkRealtimeToHub, j as RecentPlayer, k as RacerResult, l as Launch, lt as HubPresenceApi, m as NotifyPrefs, mt as SocialCounts, n as ChatMode, nt as RuntimeAvatarApi, o as FriendEntry, ot as presenceForwarder, p as NotifyChange, pt as PlayerRef, q as RealtimeApi, r as Conversation, rt as RealtimeHubLink, s as Invite, st as socialForwarder, t as Audience, tt as OpenDesignerOptions, u as LaunchTicket, ut as HubSocialApi, v as Presence, w as RaceResult, x as RaceOutcome, y as PresenceInput, z as Suggestion } from "./shared/social.js";
11
+ import { $ as TradeListOptions, $t as AvatarModule, A as TurnGame, At as HubOptions, B as HubResume, Bt as ProfileSummary, C as TURN_LINK_PARAM, Ct as Board, D as TURN_POLL_MS, Dt as GameLeaderboards, E as TURN_EVENT, Et as GameInfo, F as HubSaved, Ft as LeaderboardEntry, G as ResumeLoadOptions, Gt as Stats, H as RESUME_MAX_STATE_BYTES, Ht as SaveMeta, I as SAVED_CHANGE_QUIET_MS, It as LeaderboardResult, J as ResumeSaveInput, Jt as User, K as ResumeProgress, Kt as SubmitScoreOptions, L as SavedChangeListener, Lt as MeResponse, M as TurnGameOptions, Mt as Inventory, N as TurnMoveEvent, Nt as InventorySnapshot, O as TURN_QUIET_MS, Ot as GameRecords, P as TurnOutcome, Pt as Json, Q as TradeId, Qt as AvatarHost, R as SavedOpenDetail, Rt as Metrics, S as HubTurns, St as BufferedEvent, T as TURN_CHAT_EVENT, Tt as GameAnalytics, U as ResumeBlocker, Ut as SnapshotResponse, V as RESUME_DEBOUNCE_MS, Vt as Save, W as ResumeEntry, Wt as SortDir, X as GrantBundle, Xt as EndpointName, Y as HubMenuControl, Yt as EndpointFields, Z as TradeBundle, Zt as EndpointReply, _ as UNSUPPORTED_BY_HUB, _t as CLIENT_VERSION_HEADER, a as HUB_CLIENT_VERSION, at as SyncResult, b as hub, bt as QueueOpInput, c as isNewlyDue, ct as OfflineEventDetails, d as ContentRejectedError, dt as OfflineOp, en as HubAvatar, et as TradeNoteOptions, f as HubError, ft as OUTBOX_MAX_CHARS, g as SAVE_UNKNOWN_CODE, gt as ReplayContext, h as OfflineError, ht as OfflineKindDefinition, i as TurnGameView, it as SyncConflict, j as TurnGameEvents, jt as HubStatus, k as TURN_RESYNC_EVENT, kt as GlobalAnalytics, l as readYourTurnBuzz, lt as OfflineEventName, m as HubErrorDetails, mt as OfflineHandler, n as TurnChatLine, nt as ProfileUpdate, o as YOUR_TURN_BUZZ, ot as OfflineApi, p as HubErrorCode, pt as OUTBOX_MAX_ENTRIES, q as ResumeRun, qt as SubmitScoreResult, r as TurnDeadline, rt as StatResult, s as YOUR_TURN_BUZZ_KEY, st as OUTBOX_FULL_CODE, t as OpenTurnGame, tn as CarriesLook, tt as AuthResponse, u as saveYourTurnBuzz, ut as OfflineListener, v as Hub, vt as ProfilePatch, w as TurnCreateOptions, wt as BoardWithTop, x as ClientSupport, xt as QueuedScoreOptions, y as createHub, yt as QueueOp, z as SavedOpenHandler, zt as Profile } from "./shared/index.js";
12
12
  //#region src/auto.d.ts
13
13
  /** What `window.HubSDK` holds. */
14
14
  export interface HubSdkGlobal {
@@ -32,5 +32,5 @@ declare global {
32
32
  }
33
33
  }
34
34
  //#endregion
35
- export { type Anchor, type Audience, type AuthResponse, type AutoPauseOptions, type AxisDef, type AxisSide, type Board, type BoardWithTop, type BufferedEvent, type BusyOptions, CLIENT_VERSION_HEADER, type ChatMode, type ClientSupport, ContentRejectedError, type Conversation, type Counts, DAILY_SINGLETON_API, DAILY_START_EVENT, type DailyAll, type DailyChallenge, type DailyCompleteResponse, type DailyCompletion, type DailyCompletionMeta, type DailyCompletions, type DailyDefinition, type DailyEventDetail, type DailyGameStatus, type DailyHost, type DailyStartResponse, type DailyStatus, DailySystem, type DraggedSpot, type EdgeOffsets, type EndpointFields, type EndpointName, type EndpointReply, type ErrorBody, type FriendEntry, type GameAnalytics, type GameInfo, type GameLeaderboards, type GamePayload, type GameRecords, type GamepadMapping, type GlobalAnalytics, type GrantBundle, type GroupDef, HUB_CLIENT_VERSION, Hub, HubError, type HubErrorCode, type HubErrorDetails, type HubMenuControl, type HubMpApi, type HubNotifyApi, type HubOptions, type HubPresenceApi, type HubRaceApi, type HubRoom, type HubRoomsApi, type HubSocialApi, type HubStatus, INPUT_SINGLETON_API, type InputConfig, type InputDef, type InputEvents, type InputHost, type InputOptions, type InputOverrides, type InputReading, type InputSource, InputSystem, type InputSystemOptions, type Insets, type Inventory, type InventorySnapshot, type Invite, type InviteCreated, type InviteOptions, type InviteResult, type JoinInfo, type JoinInfoEvent, type JoinOptions, type Json, type Launch, type LaunchTicket, type LayoutBox, type LayoutItem, type LayoutOptions, type LeaderboardEntry, type LeaderboardResult, type MeResponse, type MenuBridge, type Message, type MessagesPage, type Metrics, type MouseMapping, type NavBlurEvent, type NavElement, type NavElementKind, type NavFocusEvent, type NavTarget, type NavigableDef, type Notice, type NotifyChange, type NotifyPrefs, OfflineError, type OpenInviteOptions, Overlay, type OverlayEdge, type OverlayEvent, type OverlayListener, type OverlayReason, type PageInputControl, type Party, type PlayerCard, type PlayerLite, type PlayerRef, type Presence, type PresenceInput, type PresenceKind, type Profile, type ProfilePatch, type ProfileSummary, type ProfileUpdate, type QueueOp, type QueueOpInput, type QueuedScoreOptions, type REALTIME_FAILED_EVENT, type REALTIME_FEATURE_VERSION, type REALTIME_READY_EVENT, type REALTIME_SINGLETON_API, type RaceCreateOptions, type RaceDefinition, type RaceEvents, type RaceHistory, type RaceHistoryQuery, type RaceHistoryViewOptions, type RaceHudPlace, type RaceOutcome, type RaceParams, type RaceRecord, type RaceRecordPlayer, type RaceResult, type RaceResultPlayer, type RaceRuntimeApi, type RaceStart, type RaceStatValue, type RaceState, type RaceStats, type RaceStatusEvent, type Racer, type RacerResult, type RacerState, type RealtimeApi, type RealtimeErrorShape, type RealtimeHubLink, type RecentPlayer, type Rect, type Relation, type ReportInput, type ReportKind, type ReportReason, type RoomChatLine, type RoomCreateOptions, type RoomEvents, type RoomInfo, type RoomListOptions, type RoomMessage, type RoomSeat, type RoomSelf, type RoomSendOptions, type RoomState, type RoomStateChange, type RoomStateOptions, type Save, type SaveMeta, type SchemaOutput, type ServerEvents, type Snapshot, type SnapshotResponse, type SocialConfig, type SocialCounts, type SocialEvents, type SocialMe, type SortDir, type StatResult, type Stats, type SubmitScoreOptions, type SubmitScoreResult, type Suggestion, type SuggestionStatus, type SyncConflict, type SyncResult, type TouchMapping, type TradeBundle, type TradeId, type TradeListOptions, type TradeNoteOptions, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, type UiStack, type UiStackHandoff, type User, type Vector, type VirtualControlType, type VirtualDef, type VirtualInputs, type VirtualOverride, boxesTouch, controlSize, createHub, type findRealtimeApi, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, type isRealtimeApi, isUiStack, layoutControls, type linkRealtimeToHub, type multiplayerForwarder as mp, type notifyForwarder as notify, parseInputOverrides, type presenceForwarder as presence, type raceForwarder as race, type roomsForwarder as rooms, type socialForwarder as social };
35
+ export { type Anchor, type Audience, type AuthResponse, type AutoNavigateTarget, type AutoPauseOptions, type AvatarChange, type AvatarHost, type AvatarModule, type AvatarRef, type AxisDef, type AxisSide, type Board, type BoardWithTop, type BufferedEvent, type BusyOptions, CLIENT_VERSION_HEADER, type CarriesLook, type ChatMode, type ClientSupport, ContentRejectedError, type Conversation, type Counts, DAILY_SINGLETON_API, DAILY_START_EVENT, type DailyAll, type DailyChallenge, type DailyCompleteResponse, type DailyCompletion, type DailyCompletionMeta, type DailyCompletions, type DailyDefinition, type DailyEventDetail, type DailyGameStatus, type DailyHost, type DailySaveInput, type DailyStartResponse, type DailyStatus, DailySystem, type DesignerResult, type DraggedSpot, type EdgeOffsets, type EndpointFields, type EndpointName, type EndpointReply, type ErrorBody, FOCUS_RING_SHADOW, type FriendEntry, type GameAnalytics, type GameInfo, type GameLeaderboards, type GamePayload, type GameRecords, type GamepadMapping, type GlobalAnalytics, type GrantBundle, type GroupDef, HUB_CLIENT_VERSION, Hub, HubAvatar, HubError, type HubErrorCode, type HubErrorDetails, type HubMenuControl, type HubMpApi, type HubNotifyApi, type HubOptions, type HubPresenceApi, type HubRaceApi, HubResume, type HubRoom, type HubRoomsApi, HubSaved, type HubSocialApi, type HubStatus, HubTurns, INPUT_SINGLETON_API, type InputConfig, type InputDef, type InputEvents, type InputHost, type InputModality, type InputOptions, type InputOverrides, type InputReading, type InputSource, InputSystem, type InputSystemOptions, type Insets, type Inventory, type InventorySnapshot, type Invite, type InviteCreated, type InviteLink, type InviteLinkMethods, type InviteOptions, type InviteResult, type JoinInfo, type JoinInfoEvent, type JoinOptions, type Json, type Launch, type LaunchTicket, type LayoutBox, type LayoutItem, type LayoutOptions, type LeaderboardEntry, type LeaderboardResult, MODALITY_ATTRIBUTE, type MeResponse, type MenuBridge, type Message, type MessagesPage, type Metrics, type MouseMapping, type NavBlurEvent, type NavElement, type NavElementKind, type NavFocusEvent, type NavTarget, type NavigableDef, type Notice, type NotifyChange, type NotifyPrefs, OUTBOX_FULL_CODE, OUTBOX_MAX_CHARS, OUTBOX_MAX_ENTRIES, OfflineApi, OfflineError, type OfflineEventDetails, type OfflineEventName, type OfflineHandler, type OfflineKindDefinition, type OfflineListener, type OfflineOp, type OpenDesignerOptions, type OpenInviteOptions, type OpenTurnGame, Overlay, type OverlayEdge, type OverlayEvent, type OverlayListener, type OverlayReason, type PageInputControl, type Party, type PlayOnlineMethods, type PlayerCard, type PlayerLite, type PlayerRef, type Presence, type PresenceInput, type PresenceKind, type Profile, type ProfilePatch, type ProfileSummary, type ProfileUpdate, type QueueOp, type QueueOpInput, type QueuedScoreOptions, type REALTIME_FAILED_EVENT, type REALTIME_FEATURE_VERSION, type REALTIME_READY_EVENT, type REALTIME_SINGLETON_API, RESUME_DEBOUNCE_MS, RESUME_MAX_STATE_BYTES, type RaceCreateOptions, type RaceDefinition, type RaceEvents, type RaceHistory, type RaceHistoryQuery, type RaceHistoryViewOptions, type RaceHudPlace, type RaceOutcome, type RaceParams, type RaceRecord, type RaceRecordPlayer, type RaceResult, type RaceResultPlayer, type RaceRuntimeApi, type RaceStart, type RaceStatValue, type RaceState, type RaceStats, type RaceStatusEvent, type Racer, type RacerResult, type RacerState, type RealtimeApi, type RealtimeErrorShape, type RealtimeHubLink, type RecentPlayer, type Rect, type Relation, type ReplayContext, type ReportInput, type ReportKind, type ReportReason, type ResumeBlocker, type ResumeEntry, type ResumeLoadOptions, type ResumeProgress, type ResumeRun, type ResumeSaveInput, type RoomChatLine, type RoomCreateOptions, type RoomEvents, type RoomInfo, type RoomListOptions, type RoomMessage, type RoomReclaimMethods, type RoomSeat, type RoomSeatChange, type RoomSelf, type RoomSendOptions, type RoomState, type RoomStateChange, type RoomStateOptions, type RuntimeAvatarApi, type RuntimeWorldApi, SAVED_CHANGE_EVENT, SAVED_CHANGE_QUIET_MS, SAVED_KIND_PARAM, SAVED_OPEN_EVENT, SAVED_OPEN_PARAM, SAVE_UNKNOWN_CODE, type SESSION_EVENT, type Save, type SaveMeta, type SavedChangeListener, type SavedCounts, type SavedDaily, type SavedEntry, type SavedKind, type SavedListOptions, type SavedOpenDetail, type SavedOpenHandler, type SavedOpened, type SavedProgress, type SavedStatus, type SchemaOutput, type ServerEvents, type Snapshot, type SnapshotResponse, type SocialConfig, type SocialCounts, type SocialEvents, type SocialMe, type SortDir, type StatResult, type Stats, type SubmitScoreOptions, type SubmitScoreResult, type Suggestion, type SuggestionStatus, type SyncConflict, type SyncResult, TURN_CHAT_EVENT, TURN_EVENT, TURN_LINK_PARAM, TURN_POLL_MS, TURN_QUIET_MS, TURN_RESYNC_EVENT, type TouchMapping, type TradeBundle, type TradeId, type TradeListOptions, type TradeNoteOptions, type TurnChatLine, type TurnCreateOptions, type TurnDeadline, TurnGame, type TurnGameEvents, type TurnGameOptions, type TurnGameView, type TurnMoveEvent, type TurnOutcome, type TurnSummary, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, type UiStack, type UiStackHandoff, type User, type Vector, type VirtualControlType, type VirtualDef, type VirtualInputs, type VirtualOverride, type WorldEventName, type WorldOpName, YOUR_TURN_BUZZ, YOUR_TURN_BUZZ_KEY, boxesTouch, controlSize, createHub, type findRealtimeApi, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isNewlyDue, isPageInputControl, type isRealtimeApi, isUiStack, layoutControls, type linkRealtimeToHub, type multiplayerForwarder as mp, type notifyForwarder as notify, parseInputOverrides, type presenceForwarder as presence, type raceForwarder as race, readYourTurnBuzz, type roomsForwarder as rooms, saveYourTurnBuzz, savedGameUrl, type socialForwarder as social, trackInputModality };
36
36
  //# sourceMappingURL=auto.d.ts.map
package/dist/auto.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { a as DailySystem, i as DAILY_START_EVENT, n as getDaily, r as isDailySystem, t as DAILY_SINGLETON_API } from "./shared/daily.js";
2
2
  import { t as HUB_CLIENT_VERSION } from "./shared/client-version.gen.js";
3
- import { a as isPageInputControl, c as layoutControls, i as parseInputOverrides, l as boxesTouch, n as getInput, o as InputSystem, r as isInputSystem, s as Overlay, t as INPUT_SINGLETON_API, u as controlSize } from "./shared/input.js";
3
+ import { a as isPageInputControl, c as layoutControls, d as MODALITY_ATTRIBUTE, f as trackInputModality, i as parseInputOverrides, l as boxesTouch, n as getInput, o as InputSystem, p as FOCUS_RING_SHADOW, r as isInputSystem, s as Overlay, t as INPUT_SINGLETON_API, u as controlSize } from "./shared/input.js";
4
4
  import { n as isUiStack, r as UI_STACK_VERSION, t as getUiStack } from "./shared/page-stack.js";
5
- import { a as ContentRejectedError, c as UNSUPPORTED_BY_HUB, i as CLIENT_VERSION_HEADER, n as createHub, o as HubError, r as hub, s as OfflineError, t as Hub } from "./shared/src.js";
5
+ import { A as OUTBOX_MAX_ENTRIES, C as savedGameUrl, D as CLIENT_VERSION_HEADER, E as RESUME_MAX_STATE_BYTES, F as SAVE_UNKNOWN_CODE, I as UNSUPPORTED_BY_HUB, L as HubAvatar, M as ContentRejectedError, N as HubError, O as OUTBOX_FULL_CODE, P as OfflineError, S as SAVED_OPEN_PARAM, T as RESUME_DEBOUNCE_MS, _ as HubSaved, a as TURN_LINK_PARAM, b as SAVED_KIND_PARAM, c as TURN_POLL_MS, d as TurnGame, f as YOUR_TURN_BUZZ, g as saveYourTurnBuzz, h as readYourTurnBuzz, i as HubTurns, j as OfflineApi, k as OUTBOX_MAX_CHARS, l as TURN_QUIET_MS, m as isNewlyDue, n as createHub, o as TURN_CHAT_EVENT, p as YOUR_TURN_BUZZ_KEY, r as hub, s as TURN_EVENT, t as Hub, u as TURN_RESYNC_EVENT, v as SAVED_CHANGE_QUIET_MS, w as HubResume, x as SAVED_OPEN_EVENT, y as SAVED_CHANGE_EVENT } from "./shared/src.js";
6
6
  //#region src/auto.ts
7
7
  /**
8
8
  * `@diffenderfer-games/hub/auto`: everything the main entry exports, plus a
@@ -22,6 +22,6 @@ if (typeof window !== "undefined") window.HubSDK = {
22
22
  ContentRejectedError
23
23
  };
24
24
  //#endregion
25
- export { CLIENT_VERSION_HEADER, ContentRejectedError, DAILY_SINGLETON_API, DAILY_START_EVENT, DailySystem, HUB_CLIENT_VERSION, Hub, HubError, INPUT_SINGLETON_API, InputSystem, OfflineError, Overlay, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, boxesTouch, controlSize, createHub, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, isUiStack, layoutControls, parseInputOverrides };
25
+ export { CLIENT_VERSION_HEADER, ContentRejectedError, DAILY_SINGLETON_API, DAILY_START_EVENT, DailySystem, FOCUS_RING_SHADOW, HUB_CLIENT_VERSION, Hub, HubAvatar, HubError, HubResume, HubSaved, HubTurns, INPUT_SINGLETON_API, InputSystem, MODALITY_ATTRIBUTE, OUTBOX_FULL_CODE, OUTBOX_MAX_CHARS, OUTBOX_MAX_ENTRIES, OfflineApi, OfflineError, Overlay, RESUME_DEBOUNCE_MS, RESUME_MAX_STATE_BYTES, SAVED_CHANGE_EVENT, SAVED_CHANGE_QUIET_MS, SAVED_KIND_PARAM, SAVED_OPEN_EVENT, SAVED_OPEN_PARAM, SAVE_UNKNOWN_CODE, TURN_CHAT_EVENT, TURN_EVENT, TURN_LINK_PARAM, TURN_POLL_MS, TURN_QUIET_MS, TURN_RESYNC_EVENT, TurnGame, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, YOUR_TURN_BUZZ, YOUR_TURN_BUZZ_KEY, boxesTouch, controlSize, createHub, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isNewlyDue, isPageInputControl, isUiStack, layoutControls, parseInputOverrides, readYourTurnBuzz, saveYourTurnBuzz, savedGameUrl, trackInputModality };
26
26
 
27
27
  //# sourceMappingURL=auto.js.map
@@ -0,0 +1,165 @@
1
+ import { d as StatusProp, i as Figure, l as Pose, n as BodyPose, r as Facing, s as LookLike, u as RenderOptions } from "./shared/types.js";
2
+ import { r as AvatarAtlas, s as ReactionGlyph } from "./shared/atlas.js";
3
+ import { t as Animator } from "./shared/animator.js";
4
+ //#region src/avatar/adapters/pixi-types.d.ts
5
+ /**
6
+ * The slice of PixiJS the adapters use, typed structurally so the hub has no
7
+ * dependency on pixi. Pixi 8 is the target; Pixi 7 works through the same
8
+ * calls where they exist (`Texture.from(canvas)`, `texture.update()`).
9
+ */
10
+ /** A canvas-like source Pixi can upload. */
11
+ type PixiSource = HTMLCanvasElement | OffscreenCanvas;
12
+ /** A texture's uploadable source (Pixi 8). */
13
+ interface PixiTextureSource {
14
+ update(): void;
15
+ }
16
+ /** A texture (Pixi 8: `source.update()`; Pixi 7: `update()`). */
17
+ interface PixiTexture {
18
+ readonly source?: PixiTextureSource;
19
+ update?(): void;
20
+ destroy(destroySource?: boolean): void;
21
+ }
22
+ /** A display object's shared fields. */
23
+ interface PixiDisplay {
24
+ x: number;
25
+ y: number;
26
+ visible: boolean;
27
+ alpha: number;
28
+ zIndex: number;
29
+ readonly scale: {
30
+ x: number;
31
+ y: number;
32
+ set(x: number, y?: number): void;
33
+ };
34
+ destroy(options?: {
35
+ children?: boolean;
36
+ }): void;
37
+ }
38
+ /** A sprite showing a `TTexture`. */
39
+ interface PixiSprite<TTexture extends PixiTexture = PixiTexture> extends PixiDisplay {
40
+ texture: TTexture;
41
+ readonly anchor: {
42
+ set(x: number, y?: number): void;
43
+ };
44
+ }
45
+ /** A container that takes `TChild` sprites. */
46
+ interface PixiContainer<TChild extends PixiDisplay = PixiSprite> extends PixiDisplay {
47
+ sortableChildren: boolean;
48
+ addChild(child: TChild): void;
49
+ removeChild(child: TChild): void;
50
+ }
51
+ /** A frame rectangle. */
52
+ interface PixiRectangle {
53
+ readonly x: number;
54
+ readonly y: number;
55
+ readonly width: number;
56
+ readonly height: number;
57
+ }
58
+ /**
59
+ * The PIXI namespace, as passed in by the game (`import * as PIXI from
60
+ * 'pixi.js'`, or an object of the named imports). It is generic over the
61
+ * game's own classes, inferred from what is passed, so the sprites and
62
+ * textures that come back are pixi's own types and go straight into a
63
+ * `Container` with no cast.
64
+ */
65
+ interface PixiNs<TTexture extends PixiTexture = PixiTexture, TSprite extends PixiSprite<TTexture> = PixiSprite<TTexture>, TRectangle extends PixiRectangle = PixiRectangle> {
66
+ readonly Texture: {
67
+ from(source: PixiSource): TTexture;
68
+ new (options: {
69
+ source: NonNullable<TTexture['source']>;
70
+ frame: TRectangle;
71
+ }): TTexture;
72
+ };
73
+ readonly Sprite: new (texture?: TTexture) => TSprite;
74
+ /** Not used by the adapters; accepted so an object of the named imports can include it. */
75
+ readonly Container?: new () => PixiDisplay;
76
+ readonly Rectangle: new (x: number, y: number, width: number, height: number) => TRectangle;
77
+ }
78
+ //#endregion
79
+ //#region src/avatar/adapters/pixi-avatar.d.ts
80
+ /** Options for {@link pixiAvatar}. */
81
+ interface PixiAvatarOptions extends RenderOptions {
82
+ /** Drives the face each `update(t)`; without one the avatar is still. */
83
+ readonly animator?: Animator;
84
+ /** Texture pixels per CSS pixel (default 2). */
85
+ readonly resolution?: number;
86
+ }
87
+ /** A live Pixi avatar; `view` is the game's own pixi `Sprite`. */
88
+ interface PixiAvatar<TSprite extends PixiSprite = PixiSprite> {
89
+ /** The sprite to add to the stage (anchored at its centre). */
90
+ readonly view: TSprite;
91
+ /** Renders the animator's pose at `t` (or a given pose). */
92
+ update(t: number | Pose): void;
93
+ /** Swaps the look. */
94
+ setLook(like: LookLike): void;
95
+ destroy(): void;
96
+ }
97
+ /** A live avatar sprite: `pixiAvatar(pixi, seat.look, { size: 64, animator })`. */
98
+ export declare function pixiAvatar<TTexture extends PixiTexture, TSprite extends PixiSprite<TTexture>, TRectangle extends PixiRectangle>(pixi: PixiNs<TTexture, TSprite, TRectangle>, like: LookLike, opts?: PixiAvatarOptions): PixiAvatar<TSprite>;
99
+ /** A still avatar texture (Pixi 7 games use this from a bitmap-like canvas). */
100
+ export declare function avatarTexture<TTexture extends PixiTexture, TSprite extends PixiSprite<TTexture>, TRectangle extends PixiRectangle>(pixi: PixiNs<TTexture, TSprite, TRectangle>, like: LookLike, opts?: RenderOptions): TTexture;
101
+ //#endregion
102
+ //#region src/avatar/adapters/pixi-crowd.d.ts
103
+ /** One avatar's state in the crowd (the world's own protocol fills it). */
104
+ interface CrowdMember {
105
+ readonly look: LookLike;
106
+ readonly x: number;
107
+ readonly y: number;
108
+ readonly facing?: Facing;
109
+ readonly body?: BodyPose;
110
+ readonly status?: StatusProp | null;
111
+ /** The username for the name tag (omit for no tag). */
112
+ readonly name?: string;
113
+ readonly friend?: boolean;
114
+ readonly you?: boolean;
115
+ /** "Playing Uno": the game's catalog title. */
116
+ readonly activity?: string;
117
+ /** A quick-chat emote to pop (shown for 2.5 s from when it's set). */
118
+ readonly emote?: string;
119
+ readonly reaction?: ReactionGlyph;
120
+ /** Ask for live vector rendering (granted to at most `liveMax`). */
121
+ readonly live?: boolean;
122
+ /** Hide the tag (the world fades tags by distance and hides them when crowded). */
123
+ readonly tagHidden?: boolean;
124
+ /** Moves the tag and bubble up by this much (container units), so a world can stack tags that would overlap. */
125
+ readonly tagLift?: number;
126
+ }
127
+ /** Crowd options; `container` is the game's own pixi `Container`. */
128
+ interface CrowdOptions<TSprite extends PixiSprite = PixiSprite> {
129
+ readonly atlas: AvatarAtlas;
130
+ /** The container avatars go into (it is made y-sortable). */
131
+ readonly container: PixiContainer<TSprite>;
132
+ /** Live vector avatars at most (default 6; 2 on low-end devices). */
133
+ readonly liveMax?: number;
134
+ /** Atlas baking budget per update, ms (default 4). */
135
+ readonly bakeMs?: number;
136
+ /**
137
+ * Where name tags and bubbles go (default `container`). A world puts them in
138
+ * a container above its lighting so tags stay readable at night.
139
+ */
140
+ readonly overlays?: PixiContainer<TSprite>;
141
+ /**
142
+ * Draws atlas avatars at this scale (default 1). Bake the atlas at
143
+ * `scale × devicePixelRatio` and pass `1 / devicePixelRatio` for crisp
144
+ * avatars on high-density screens; positions stay in the container's units.
145
+ */
146
+ readonly displayScale?: number;
147
+ /**
148
+ * The figure the atlas draws (default `blob`). Pass the atlas's own
149
+ * figure, so name tags sit on the right heads and walks step in time.
150
+ */
151
+ readonly figure?: Figure;
152
+ }
153
+ /** The crowd. */
154
+ interface AvatarCrowd {
155
+ set(id: string | number, member: CrowdMember): void;
156
+ remove(id: string | number): void;
157
+ /** Advances animation to `t` (ms), bakes, and lays everyone out. Call once per frame. */
158
+ update(t: number): void;
159
+ destroy(): void;
160
+ }
161
+ /** A crowd over an atlas: `createCrowd(pixi, { atlas, container })`. */
162
+ export declare function createCrowd<TTexture extends PixiTexture, TSprite extends PixiSprite<TTexture>, TRectangle extends PixiRectangle>(pixi: PixiNs<TTexture, TSprite, TRectangle>, opts: CrowdOptions<NoInfer<TSprite>>): AvatarCrowd;
163
+ //#endregion
164
+ export type { AvatarCrowd, CrowdMember, CrowdOptions, PixiAvatar, PixiAvatarOptions, PixiContainer, PixiNs, PixiSprite, PixiTexture };
165
+ //# sourceMappingURL=avatar-pixi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-pixi.d.ts","names":[],"sources":["../src/avatar/adapters/pixi-types.ts","../src/avatar/adapters/pixi-avatar.ts","../src/avatar/adapters/pixi-crowd.ts"],"mappings":";;;;;;;;;;KAOY,aAAa,oBAAoB;;UAG5B;EACf;;;UAIe;WACN,SAAS;EAClB;EACA,QAAQ;;;UAIO;EACf;EACA;EACA;EACA;EACA;WACS;IAAS;IAAW;IAAW,IAAI,WAAW;;EACvD,QAAQ;IAAY;;;;UAIL,WAAW,iBAAiB,cAAc,qBAAqB;EAC9E,SAAS;WACA;IAAU,IAAI,WAAW;;;;UAInB,cAAc,eAAe,cAAc,oBAAoB;EAC9E;EACA,SAAS,OAAO;EAChB,YAAY,OAAO;;;UAIJ;WACN;WACA;WACA;WACA;;;;;;;;;UAUM,OACf,iBAAiB,cAAc,aAC/B,gBAAgB,WAAW,YAAY,WAAW,WAClD,mBAAmB,gBAAgB;WAE1B;IACP,KAAK,QAAQ,aAAa;SACrB;MAAW,QAAQ,YAAY;MAAqB,OAAO;QAAe;;WAExE,aAAa,UAAU,aAAa;;WAEpC,sBAAsB;WACtB,gBAAgB,WAAW,WAAW,eAAe,mBAAmB;;;;;UC5DlE,0BAA0B;;WAEhC,WAAW;;WAEX;;;UAIM,WAAW,gBAAgB,aAAa;;WAE9C,MAAM;;EAEf,OAAO,YAAY;;EAEnB,QAAQ,MAAM;EACd;;;wBAIc,WAAW,iBAAiB,aAAa,gBAAgB,WAAW,WAAW,mBAAmB,eAChH,MAAM,OAAO,UAAU,SAAS,aAChC,MAAM,UACN,OAAM,oBACL,WAAW;;wBA+BE,cAAc,iBAAiB,aAAa,gBAAgB,WAAW,WAAW,mBAAmB,eACnH,MAAM,OAAO,UAAU,SAAS,aAChC,MAAM,UACN,OAAM,gBACL;;;;UC/Cc;WACN,MAAM;WACN;WACA;WACA,SAAS;WACT,OAAO;WACP,SAAS;;WAET;WACA;WACA;;WAEA;;WAEA;WACA,WAAW;;WAEX;;WAEA;;WAEA;;;UAIM,aAAa,gBAAgB,aAAa;WAChD,OAAO;;WAEP,WAAW,cAAc;;WAEzB;;WAEA;;;;;WAKA,WAAW,cAAc;;;;;;WAMzB;;;;;WAKA,SAAS;;;UAIH;EACf,IAAI,qBAAqB,QAAQ;EACjC,OAAO;;EAEP,OAAO;EACP;;;wBA4Bc,YAAY,iBAAiB,aAAa,gBAAgB,WAAW,WAAW,mBAAmB,eACjH,MAAM,OAAO,UAAU,SAAS,aAChC,MAAM,aAAa,QAAQ,YAC1B"}