@diffenderfer-games/hub 2.0.0-next.0 → 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 (293) hide show
  1. package/CHANGELOG.md +163 -0
  2. package/LICENSE +21 -21
  3. package/README.md +203 -139
  4. package/dist/auto.d.ts +8 -8
  5. package/dist/auto.js +3 -3
  6. package/dist/avatar-pixi.d.ts +165 -0
  7. package/dist/avatar-pixi.d.ts.map +1 -0
  8. package/dist/avatar-pixi.js +299 -0
  9. package/dist/avatar-pixi.js.map +1 -0
  10. package/dist/avatar-svg.d.ts +4 -0
  11. package/dist/avatar-svg.js +5 -0
  12. package/dist/avatar-three.d.ts +69 -0
  13. package/dist/avatar-three.d.ts.map +1 -0
  14. package/dist/avatar-three.js +49 -0
  15. package/dist/avatar-three.js.map +1 -0
  16. package/dist/avatar.d.ts +7 -0
  17. package/dist/avatar.js +500 -0
  18. package/dist/avatar.js.map +1 -0
  19. package/dist/daily.d.ts +2 -2
  20. package/dist/doctor/cli.mjs +119 -28
  21. package/dist/doctor/cli.mjs.map +1 -1
  22. package/dist/index.d.ts +8 -8
  23. package/dist/index.js +3 -3
  24. package/dist/input.d.ts +2 -2
  25. package/dist/input.js +2 -2
  26. package/dist/mp.d.ts +3 -3
  27. package/dist/race.d.ts +1 -1
  28. package/dist/rooms.d.ts +3 -3
  29. package/dist/rooms.js +1 -1
  30. package/dist/shared/animator.d.ts +104 -0
  31. package/dist/shared/animator.d.ts.map +1 -0
  32. package/dist/shared/art.js +1946 -0
  33. package/dist/shared/art.js.map +1 -0
  34. package/dist/shared/atlas.d.ts +138 -0
  35. package/dist/shared/atlas.d.ts.map +1 -0
  36. package/dist/shared/avatar.d.ts +123 -0
  37. package/dist/shared/avatar.d.ts.map +1 -0
  38. package/dist/shared/bridge.js +18 -4
  39. package/dist/shared/bridge.js.map +1 -1
  40. package/dist/shared/client-version.gen.js +1 -1
  41. package/dist/shared/daily.d.ts +145 -19
  42. package/dist/shared/daily.d.ts.map +1 -1
  43. package/dist/shared/daily.js +138 -25
  44. package/dist/shared/daily.js.map +1 -1
  45. package/dist/shared/defineProperty.js +39 -0
  46. package/dist/shared/describe.d.ts +32 -0
  47. package/dist/shared/describe.d.ts.map +1 -0
  48. package/dist/shared/describe.js +109 -0
  49. package/dist/shared/describe.js.map +1 -0
  50. package/dist/shared/globals.js +9 -42
  51. package/dist/shared/globals.js.map +1 -1
  52. package/dist/shared/index.d.ts +1122 -46
  53. package/dist/shared/index.d.ts.map +1 -1
  54. package/dist/shared/input.d.ts +74 -14
  55. package/dist/shared/input.d.ts.map +1 -1
  56. package/dist/shared/input.js +179 -25
  57. package/dist/shared/input.js.map +1 -1
  58. package/dist/shared/json-guards.js +48 -0
  59. package/dist/shared/json-guards.js.map +1 -0
  60. package/dist/shared/latest-state.js +1 -1
  61. package/dist/shared/live-canvas.js +62 -0
  62. package/dist/shared/live-canvas.js.map +1 -0
  63. package/dist/shared/mp.js +10 -2
  64. package/dist/shared/mp.js.map +1 -1
  65. package/dist/shared/multiplayer-types.d.ts +15 -2
  66. package/dist/shared/multiplayer-types.d.ts.map +1 -1
  67. package/dist/shared/overlays.js +800 -0
  68. package/dist/shared/overlays.js.map +1 -0
  69. package/dist/shared/page-stack.js +2 -1
  70. package/dist/shared/page-stack.js.map +1 -1
  71. package/dist/shared/pose-key.js +249 -0
  72. package/dist/shared/pose-key.js.map +1 -0
  73. package/dist/shared/race-types.d.ts +1 -1
  74. package/dist/shared/race.js +1 -1
  75. package/dist/shared/room-types.d.ts +28 -3
  76. package/dist/shared/room-types.d.ts.map +1 -1
  77. package/dist/shared/rooms.d.ts.map +1 -1
  78. package/dist/shared/rooms.js +23 -4
  79. package/dist/shared/rooms.js.map +1 -1
  80. package/dist/shared/runtime-opener.js +1 -1
  81. package/dist/shared/scene.d.ts +90 -0
  82. package/dist/shared/scene.d.ts.map +1 -0
  83. package/dist/shared/social.d.ts +90 -9
  84. package/dist/shared/social.d.ts.map +1 -1
  85. package/dist/shared/social.js +6 -1
  86. package/dist/shared/social.js.map +1 -1
  87. package/dist/shared/src.js +4563 -667
  88. package/dist/shared/src.js.map +1 -1
  89. package/dist/shared/svg-markup.js +2354 -0
  90. package/dist/shared/svg-markup.js.map +1 -0
  91. package/dist/shared/svg.js +27 -0
  92. package/dist/shared/svg.js.map +1 -0
  93. package/dist/shared/types.d.ts +174 -0
  94. package/dist/shared/types.d.ts.map +1 -0
  95. package/dist/shared/wire-types.d.ts +6 -2
  96. package/dist/shared/wire-types.d.ts.map +1 -1
  97. package/dist/social.d.ts +5 -5
  98. package/dist/social.js +2 -2
  99. package/dist/turns-rules.d.ts +2 -0
  100. package/dist/turns-rules.js +1 -0
  101. package/dist/turns.d.ts +61 -0
  102. package/dist/turns.d.ts.map +1 -0
  103. package/dist/turns.js +183 -0
  104. package/dist/turns.js.map +1 -0
  105. package/package.json +125 -89
  106. package/src/auto.ts +39 -39
  107. package/src/avatar/adapters/pixi-avatar.ts +73 -0
  108. package/src/avatar/adapters/pixi-crowd.ts +329 -0
  109. package/src/avatar/adapters/pixi-types.ts +84 -0
  110. package/src/avatar/adapters/three.ts +126 -0
  111. package/src/avatar/animator/animator.ts +285 -0
  112. package/src/avatar/animator/reactions.ts +44 -0
  113. package/src/avatar/animator/schedule.ts +73 -0
  114. package/src/avatar/art/beard.ts +49 -0
  115. package/src/avatar/art/glasses.ts +67 -0
  116. package/src/avatar/art/hair.ts +254 -0
  117. package/src/avatar/art/headwear.ts +75 -0
  118. package/src/avatar/art/index.ts +21 -0
  119. package/src/avatar/art/shape.ts +87 -0
  120. package/src/avatar/art-store.ts +36 -0
  121. package/src/avatar/atlas.ts +246 -0
  122. package/src/avatar/catalog-view.ts +14 -0
  123. package/src/avatar/colour.ts +109 -0
  124. package/src/avatar/describe.ts +79 -0
  125. package/src/avatar/face.ts +187 -0
  126. package/src/avatar/geom.ts +173 -0
  127. package/src/avatar/layout.ts +47 -0
  128. package/src/avatar/look-like.ts +52 -0
  129. package/src/avatar/outputs/bitmap.ts +75 -0
  130. package/src/avatar/outputs/canvas-paint.ts +177 -0
  131. package/src/avatar/outputs/canvas.ts +62 -0
  132. package/src/avatar/outputs/custom-element.ts +140 -0
  133. package/src/avatar/outputs/element.ts +58 -0
  134. package/src/avatar/outputs/live-canvas.ts +57 -0
  135. package/src/avatar/outputs/overlay-svg.ts +22 -0
  136. package/src/avatar/outputs/pose-key.ts +30 -0
  137. package/src/avatar/outputs/svg-markup.ts +113 -0
  138. package/src/avatar/outputs/svg.ts +41 -0
  139. package/src/avatar/overlays.ts +128 -0
  140. package/src/avatar/render/body.ts +116 -0
  141. package/src/avatar/render/colours.ts +81 -0
  142. package/src/avatar/render/compose.ts +320 -0
  143. package/src/avatar/render/context.ts +117 -0
  144. package/src/avatar/render/eyes.ts +78 -0
  145. package/src/avatar/render/eyewear.ts +118 -0
  146. package/src/avatar/render/frame.ts +73 -0
  147. package/src/avatar/render/head.ts +81 -0
  148. package/src/avatar/render/mouth.ts +86 -0
  149. package/src/avatar/render/props.ts +91 -0
  150. package/src/avatar/render/types.ts +93 -0
  151. package/src/avatar/render/walker-parts.ts +121 -0
  152. package/src/avatar/render/walker.ts +199 -0
  153. package/src/avatar/scene.ts +119 -0
  154. package/src/avatar-pixi.ts +20 -0
  155. package/src/avatar-svg.ts +21 -0
  156. package/src/avatar-three.ts +18 -0
  157. package/src/avatar.ts +63 -0
  158. package/src/core/avatar/avatar-cache.ts +95 -0
  159. package/src/core/avatar/avatar-ref.ts +34 -0
  160. package/src/core/avatar/avatar-types.ts +43 -0
  161. package/src/core/avatar/hub-avatar.ts +308 -0
  162. package/src/core/connection.ts +408 -299
  163. package/src/core/errors.ts +160 -147
  164. package/src/core/game-data.ts +40 -38
  165. package/src/core/hub-economy.ts +216 -179
  166. package/src/core/hub-progress.ts +269 -205
  167. package/src/core/hub.ts +352 -131
  168. package/src/core/menu-control.ts +61 -61
  169. package/src/core/offline/cloud-saves.ts +62 -0
  170. package/src/core/offline/events.ts +50 -50
  171. package/src/core/offline/favorites.ts +21 -21
  172. package/src/core/offline/hub-kinds/avatar-kind.ts +42 -0
  173. package/src/core/offline/hub-kinds/daily-kind.ts +68 -0
  174. package/src/core/offline/hub-kinds/economy-kinds.ts +86 -0
  175. package/src/core/offline/hub-kinds/game-fields.ts +2 -0
  176. package/src/core/offline/hub-kinds/index.ts +52 -0
  177. package/src/core/offline/hub-kinds/legacy-ops.ts +37 -0
  178. package/src/core/offline/hub-kinds/progress-kinds.ts +165 -0
  179. package/src/core/offline/hub-kinds/resume-kind.ts +108 -0
  180. package/src/core/offline/hub-kinds/saved-kind.ts +93 -0
  181. package/src/core/offline/kind-adapters.ts +48 -0
  182. package/src/core/offline/local-inventory.ts +64 -0
  183. package/src/core/offline/local-store.ts +304 -261
  184. package/src/core/offline/offline-api.ts +65 -0
  185. package/src/core/offline/outbox-entry.ts +59 -0
  186. package/src/core/offline/outbox-kinds.ts +78 -0
  187. package/src/core/offline/outbox-merge.ts +39 -0
  188. package/src/core/offline/outbox-replayer.ts +141 -0
  189. package/src/core/offline/outbox-store.ts +85 -0
  190. package/src/core/offline/outbox.ts +232 -0
  191. package/src/core/offline/queue.ts +126 -171
  192. package/src/core/offline/replay-lease.ts +87 -0
  193. package/src/core/offline/replay-policy.ts +52 -0
  194. package/src/core/page-account.ts +121 -0
  195. package/src/core/page.ts +87 -74
  196. package/src/core/rest/endpoint-types.ts +22 -22
  197. package/src/core/rest/rest-client.ts +163 -152
  198. package/src/core/rest/routes.gen.ts +144 -88
  199. package/src/core/resume/hub-resume.ts +286 -0
  200. package/src/core/resume/local-resume.ts +130 -0
  201. package/src/core/resume/resume-list.ts +65 -0
  202. package/src/core/resume/resume-request.ts +52 -0
  203. package/src/core/resume/resume-types.ts +64 -0
  204. package/src/core/saved/daily-saves.ts +196 -0
  205. package/src/core/saved/daily-seed.ts +16 -0
  206. package/src/core/saved/hub-saved.ts +221 -0
  207. package/src/core/saved/local-saved.ts +122 -0
  208. package/src/core/saved/saved-list.ts +129 -0
  209. package/src/core/saved/saved-open.ts +104 -0
  210. package/src/core/saved/saved-order.ts +49 -0
  211. package/src/core/saved/saved-types.ts +24 -0
  212. package/src/core/storage/json-guards.ts +80 -74
  213. package/src/core/storage/key-value.ts +66 -66
  214. package/src/core/ticket.ts +43 -43
  215. package/src/core/turns/hub-turns.ts +161 -0
  216. package/src/core/turns/turn-game.ts +510 -0
  217. package/src/core/turns/your-turn-buzz.ts +69 -0
  218. package/src/core/types.ts +134 -134
  219. package/src/core/version/client-version.gen.ts +2 -2
  220. package/src/core/version/hub-version.ts +62 -62
  221. package/src/core/version/semver.ts +97 -97
  222. package/src/daily/daily-system.ts +276 -161
  223. package/src/daily/page-daily.ts +36 -36
  224. package/src/daily/types.ts +105 -67
  225. package/src/daily.ts +10 -10
  226. package/src/doctor/checks.ts +86 -76
  227. package/src/doctor/cli.ts +101 -106
  228. package/src/doctor/hub-version-fetch.ts +43 -0
  229. package/src/doctor/tsconfig.json +12 -12
  230. package/src/doctor/world-check.ts +61 -0
  231. package/src/globals.ts +115 -110
  232. package/src/index.ts +68 -50
  233. package/src/input/device-state.ts +146 -146
  234. package/src/input/edges.ts +55 -55
  235. package/src/input/focus-ring.ts +13 -0
  236. package/src/input/gamepad.ts +61 -61
  237. package/src/input/input-events.ts +32 -32
  238. package/src/input/input-registry.ts +171 -164
  239. package/src/input/input-system.ts +406 -393
  240. package/src/input/legacy-controls.ts +64 -64
  241. package/src/input/modality.ts +122 -0
  242. package/src/input/nav-state.ts +200 -191
  243. package/src/input/navigator.ts +182 -171
  244. package/src/input/on-screen-controls.ts +101 -101
  245. package/src/input/page-control.ts +43 -43
  246. package/src/input/page-input.ts +193 -193
  247. package/src/input/player-remaps.ts +77 -77
  248. package/src/input/source-values.ts +116 -116
  249. package/src/input/spatial.ts +47 -47
  250. package/src/input/types.ts +331 -331
  251. package/src/input/zero-config.ts +164 -177
  252. package/src/input.ts +26 -22
  253. package/src/mp.ts +10 -10
  254. package/src/overlay/controls-panel.ts +163 -163
  255. package/src/overlay/dom.ts +46 -46
  256. package/src/overlay/layout-clusters.ts +162 -162
  257. package/src/overlay/layout-geometry.ts +136 -136
  258. package/src/overlay/layout.ts +203 -203
  259. package/src/overlay/listener-scope.ts +23 -23
  260. package/src/overlay/on-screen-keyboard.ts +137 -137
  261. package/src/overlay/overlay.ts +234 -208
  262. package/src/overlay/styles.ts +13 -12
  263. package/src/overlay/virtual-controls.ts +262 -262
  264. package/src/race.ts +10 -10
  265. package/src/realtime/bridge.ts +126 -121
  266. package/src/realtime/cross-bundle.ts +29 -29
  267. package/src/realtime/fallback-notice.ts +48 -48
  268. package/src/realtime/hub-link.ts +65 -65
  269. package/src/realtime/latest-state.ts +33 -33
  270. package/src/realtime/multiplayer-forwarder.ts +40 -28
  271. package/src/realtime/multiplayer-types.ts +66 -52
  272. package/src/realtime/page-runtime.ts +60 -60
  273. package/src/realtime/race-forwarder.ts +59 -59
  274. package/src/realtime/race-types.ts +132 -132
  275. package/src/realtime/room-types.ts +151 -125
  276. package/src/realtime/rooms-forwarder.ts +104 -79
  277. package/src/realtime/runtime-api.ts +74 -49
  278. package/src/realtime/runtime-opener.ts +61 -61
  279. package/src/realtime/social-forwarder.ts +77 -72
  280. package/src/realtime/social-types.ts +86 -78
  281. package/src/realtime/types.ts +54 -53
  282. package/src/realtime/wire-types.ts +79 -72
  283. package/src/realtime/world-types.ts +20 -0
  284. package/src/rooms.ts +10 -10
  285. package/src/social.ts +19 -18
  286. package/src/turns-kit/check-rules.ts +281 -0
  287. package/src/turns-rules.ts +12 -0
  288. package/src/turns.ts +14 -0
  289. package/src/types.ts +13 -13
  290. package/src/uistack/page-stack.ts +45 -45
  291. package/src/uistack/play-suspension.ts +82 -82
  292. package/src/uistack/types.ts +76 -76
  293. package/src/uistack/ui-stack.ts +144 -144
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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P,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"}
@@ -0,0 +1,299 @@
1
+ import { C as frameBox, I as toCode, g as expressionFromEmote } from "./shared/svg-markup.js";
2
+ import { a as paintNodes, n as defaultLayer } from "./shared/pose-key.js";
3
+ import { c as drawToCanvas, o as animator, r as layout, t as overlays } from "./shared/overlays.js";
4
+ import { t as liveCanvas } from "./shared/live-canvas.js";
5
+ //#region src/avatar/adapters/pixi-types.ts
6
+ /** Re-uploads a texture after its canvas changed (Pixi 8 and 7). */
7
+ function refresh(texture) {
8
+ if (texture.source) texture.source.update();
9
+ else texture.update?.();
10
+ }
11
+ //#endregion
12
+ //#region src/avatar/adapters/pixi-avatar.ts
13
+ /** A live avatar sprite: `pixiAvatar(pixi, seat.look, { size: 64, animator })`. */
14
+ function pixiAvatar(pixi, like, opts = {}) {
15
+ const resolution = opts.resolution ?? 2;
16
+ const live = liveCanvas(like, opts, resolution);
17
+ live.draw(opts.pose);
18
+ const texture = pixi.Texture.from(live.canvas);
19
+ const view = new pixi.Sprite(texture);
20
+ view.anchor.set(.5);
21
+ view.scale.set(1 / resolution);
22
+ return {
23
+ view,
24
+ update(t) {
25
+ const pose = typeof t === "number" ? opts.animator?.pose(t) : t;
26
+ if (live.draw(pose ?? opts.pose)) refresh(texture);
27
+ },
28
+ setLook(next) {
29
+ live.setLook(next);
30
+ opts.animator?.setLook(next);
31
+ if (live.draw(opts.pose)) refresh(texture);
32
+ },
33
+ destroy() {
34
+ view.destroy();
35
+ texture.destroy(true);
36
+ }
37
+ };
38
+ }
39
+ /** A still avatar texture (Pixi 7 games use this from a bitmap-like canvas). */
40
+ function avatarTexture(pixi, like, opts = {}) {
41
+ return pixi.Texture.from(drawToCanvas(like, opts));
42
+ }
43
+ //#endregion
44
+ //#region src/avatar/adapters/pixi-crowd.ts
45
+ /**
46
+ * `createCrowd` (§3.11): the world's whole avatar layer in Pixi 8. One
47
+ * y-sorted container; most avatars are atlas frames (shared page textures,
48
+ * so Pixi batches them), and up to `liveMax` flagged ones (nearest, hovered,
49
+ * talking, friends; the world decides) are live vector avatars with full
50
+ * expressions. Name tags and bubbles are cached textures, re-rendered only
51
+ * when their text changes. Baking is time-sliced; an avatar without a baked
52
+ * frame yet shows the silhouette.
53
+ */
54
+ const EMOTE_MS = 2500;
55
+ const CYCLE = {
56
+ walk: 520,
57
+ run: 320,
58
+ dance: 900,
59
+ jump: 700,
60
+ cheer: 600,
61
+ idle: 2400
62
+ };
63
+ /** The walker's shorter legs step quicker. */
64
+ const WALKER_CYCLE = {
65
+ ...CYCLE,
66
+ walk: 440,
67
+ run: 300,
68
+ idle: 2800
69
+ };
70
+ /** A crowd over an atlas: `createCrowd(pixi, { atlas, container })`. */
71
+ function createCrowd(pixi, opts) {
72
+ const { atlas, container } = opts;
73
+ const overlayLayer = opts.overlays ?? container;
74
+ const displayScale = opts.displayScale ?? 1;
75
+ container.sortableChildren = true;
76
+ overlayLayer.sortableChildren = true;
77
+ const liveMax = opts.liveMax ?? 6;
78
+ const figure = opts.figure ?? "blob";
79
+ const cycles = figure === "walker" ? WALKER_CYCLE : CYCLE;
80
+ const [, liveTop, , liveHeight] = frameBox({
81
+ frame: "full",
82
+ figure
83
+ });
84
+ const entries = /* @__PURE__ */ new Map();
85
+ const pageTextures = [];
86
+ const frameTextures = /* @__PURE__ */ new Map();
87
+ const overlayTextures = /* @__PURE__ */ new Map();
88
+ /** Where the name plate sits above the feet (rig units), cached per look, pose and prop. */
89
+ const nameplates = /* @__PURE__ */ new Map();
90
+ const nameplateY = (look, body, status) => {
91
+ const key = `${toCode(look)}|${body}|${status ?? ""}`;
92
+ let plateY = nameplates.get(key);
93
+ if (plateY === void 0) {
94
+ plateY = layout(look, {
95
+ figure,
96
+ pose: {
97
+ body,
98
+ status
99
+ }
100
+ }).nameplate.y;
101
+ nameplates.set(key, plateY);
102
+ }
103
+ return plateY;
104
+ };
105
+ const overlayTexture = (key, overlay) => {
106
+ const hit = overlayTextures.get(key);
107
+ if (hit) return hit;
108
+ const [left, top, w, h] = overlay.box;
109
+ const resolution = 2;
110
+ const made = defaultLayer(Math.ceil(w * resolution), Math.ceil(h * resolution));
111
+ if (!made || !("getContext" in made.canvas)) return null;
112
+ made.ctx.scale(resolution, resolution);
113
+ made.ctx.translate(-left, -top);
114
+ paintNodes(made.ctx, overlay.nodes);
115
+ const out = {
116
+ texture: pixi.Texture.from(made.canvas),
117
+ ax: -left / w,
118
+ ay: -top / h
119
+ };
120
+ overlayTextures.set(key, out);
121
+ return out;
122
+ };
123
+ const textureFor = (page, left, top, w, h) => {
124
+ const sources = atlas.sources;
125
+ while (pageTextures.length < sources.length) {
126
+ const source = sources[pageTextures.length];
127
+ if (!source || !("getContext" in source)) return null;
128
+ pageTextures.push(pixi.Texture.from(source));
129
+ }
130
+ const base = pageTextures[page]?.source;
131
+ if (!base) return null;
132
+ const key = `${String(page)}:${String(left)}:${String(top)}`;
133
+ let tex = frameTextures.get(key);
134
+ if (!tex) {
135
+ tex = new pixi.Texture({
136
+ source: base,
137
+ frame: new pixi.Rectangle(left, top, w, h)
138
+ });
139
+ frameTextures.set(key, tex);
140
+ }
141
+ return tex;
142
+ };
143
+ const placeOverlay = (slot, key, make, atX, atY) => {
144
+ if (key === "") {
145
+ if (slot.sprite) slot.sprite.visible = false;
146
+ return;
147
+ }
148
+ let sprite = slot.sprite;
149
+ if (slot.key !== key || !sprite) {
150
+ const overlay = make();
151
+ const made = overlay ? overlayTexture(key, overlay) : null;
152
+ if (!made) return;
153
+ if (!sprite) {
154
+ sprite = new pixi.Sprite(made.texture);
155
+ overlayLayer.addChild(sprite);
156
+ }
157
+ slot.sprite = sprite;
158
+ sprite.texture = made.texture;
159
+ sprite.anchor.set(made.ax, made.ay);
160
+ sprite.scale.set(.5);
161
+ slot.key = key;
162
+ }
163
+ sprite.visible = true;
164
+ sprite.x = atX;
165
+ sprite.y = atY;
166
+ sprite.zIndex = 1e6 + atY;
167
+ };
168
+ return {
169
+ set(id, member) {
170
+ const key = String(id);
171
+ const entry = entries.get(key);
172
+ if (entry) {
173
+ if (member.emote && member.emote !== entry.member.emote) {
174
+ entry.emoteAt = -1;
175
+ const face = expressionFromEmote(member.emote);
176
+ if (face) entry.anim.express(face);
177
+ }
178
+ if (member.look !== entry.member.look) entry.live?.setLook(member.look);
179
+ entry.member = member;
180
+ return;
181
+ }
182
+ const sprite = new pixi.Sprite();
183
+ container.addChild(sprite);
184
+ entries.set(key, {
185
+ member,
186
+ sprite,
187
+ tag: {
188
+ sprite: null,
189
+ key: ""
190
+ },
191
+ bubble: {
192
+ sprite: null,
193
+ key: ""
194
+ },
195
+ emoteAt: member.emote ? -1 : 0,
196
+ hasFrame: false,
197
+ live: null,
198
+ body: null,
199
+ anim: animator(member.look, { seed: key })
200
+ });
201
+ },
202
+ remove(id) {
203
+ const entry = entries.get(String(id));
204
+ if (!entry) return;
205
+ entry.sprite.destroy();
206
+ entry.tag.sprite?.destroy();
207
+ entry.bubble.sprite?.destroy();
208
+ entry.live?.destroy();
209
+ entries.delete(String(id));
210
+ },
211
+ update(t) {
212
+ if (atlas.bake(opts.bakeMs ?? 4) > 0) pageTextures.forEach(refresh);
213
+ const wantsLive = [...entries.values()].filter((e) => e.member.live === true).slice(0, liveMax);
214
+ const liveSet = new Set(wantsLive);
215
+ for (const entry of entries.values()) {
216
+ const m = entry.member;
217
+ const body = m.body ?? "idle";
218
+ if (entry.emoteAt === -1) entry.emoteAt = t;
219
+ const isEmoting = m.emote !== void 0 && t - entry.emoteAt < EMOTE_MS;
220
+ if (liveSet.has(entry)) {
221
+ if (!entry.live) {
222
+ entry.live = pixiAvatar(pixi, m.look, {
223
+ frame: "full",
224
+ figure,
225
+ size: 64,
226
+ rim: true,
227
+ shadow: false,
228
+ animator: entry.anim
229
+ });
230
+ container.addChild(entry.live.view);
231
+ }
232
+ entry.sprite.visible = false;
233
+ const view = entry.live.view;
234
+ if (entry.body !== body) {
235
+ entry.body = body;
236
+ entry.anim.setBody(body, { at: t });
237
+ }
238
+ entry.live.update({
239
+ ...entry.anim.pose(t),
240
+ body,
241
+ status: m.status ?? null,
242
+ phase: t / (cycles[body] ?? 600) % 1
243
+ });
244
+ view.x = m.x;
245
+ view.y = m.y + (figure === "walker" ? (liveTop + liveHeight / 2) * (64 / liveHeight) : -32);
246
+ view.zIndex = m.y;
247
+ view.visible = true;
248
+ } else {
249
+ if (entry.live) entry.live.view.visible = false;
250
+ const frame = atlas.frame({
251
+ look: m.look,
252
+ facing: m.facing ?? "S",
253
+ body,
254
+ status: m.status ?? null,
255
+ phase: t / (cycles[body] ?? 600) % 1,
256
+ face: isEmoting ? "happy" : "neutral"
257
+ });
258
+ const shown = frame ?? (entry.hasFrame ? null : atlas.frame({ look: null }));
259
+ entry.hasFrame || (entry.hasFrame = frame !== null);
260
+ const tex = shown ? textureFor(shown.page, shown.x, shown.y, shown.w, shown.h) : null;
261
+ if (tex) {
262
+ entry.sprite.texture = tex;
263
+ entry.sprite.visible = true;
264
+ }
265
+ if (shown) {
266
+ entry.sprite.anchor.set(shown.footX / shown.w, shown.footY / shown.h);
267
+ entry.sprite.scale.set(shown.mirror ? -displayScale : displayScale, displayScale);
268
+ }
269
+ entry.sprite.x = m.x;
270
+ entry.sprite.y = m.y;
271
+ entry.sprite.zIndex = m.y;
272
+ }
273
+ const top = m.y - (m.tagLift ?? 0) + nameplateY(m.look, body, m.status ?? null) * (entry.live?.view.visible === true ? 64 / liveHeight : atlas.scale * displayScale);
274
+ const tagKey = m.name && !m.tagHidden ? `tag:${m.name}:${m.friend ? 1 : 0}:${m.you ? 1 : 0}` : "";
275
+ placeOverlay(entry.tag, tagKey, () => m.name ? overlays.nameTag({
276
+ name: m.name,
277
+ friend: m.friend === true,
278
+ you: m.you === true
279
+ }) : null, m.x, top);
280
+ const bubbleKey = isEmoting && m.emote ? `emote:${m.emote}` : m.reaction ? `react:${m.reaction}` : m.activity ? `act:${m.activity}` : "";
281
+ placeOverlay(entry.bubble, bubbleKey, () => {
282
+ if (isEmoting && m.emote) return overlays.emoteBubble(m.emote);
283
+ if (m.reaction) return overlays.reactionBubble(m.reaction);
284
+ return m.activity ? overlays.activityBubble({ game: m.activity }) : null;
285
+ }, m.x, top - 12);
286
+ }
287
+ },
288
+ destroy() {
289
+ for (const id of [...entries.keys()]) this.remove(id);
290
+ for (const tex of frameTextures.values()) tex.destroy(false);
291
+ for (const tex of pageTextures) tex.destroy(true);
292
+ for (const o of overlayTextures.values()) o.texture.destroy(true);
293
+ }
294
+ };
295
+ }
296
+ //#endregion
297
+ export { avatarTexture, createCrowd, pixiAvatar };
298
+
299
+ //# sourceMappingURL=avatar-pixi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-pixi.js","names":[],"sources":["../src/avatar/adapters/pixi-types.ts","../src/avatar/adapters/pixi-avatar.ts","../src/avatar/adapters/pixi-crowd.ts"],"mappings":";;;;;;AA4EA,SAAgB,QAAQ,SAA4B;CAClD,IAAI,QAAQ,QACV,QAAQ,OAAO,OAAO;MAEtB,QAAQ,SAAS;AAErB;;;;ACnDA,SAAgB,WACd,MACA,MACA,OAA0B,CAAC,GACN;CACrB,MAAM,aAAa,KAAK,cAAc;CACtC,MAAM,OAAO,WAAW,MAAM,MAAM,UAAU;CAC9C,KAAK,KAAK,KAAK,IAAI;CACnB,MAAM,UAAU,KAAK,QAAQ,KAAK,KAAK,MAAM;CAC7C,MAAM,OAAO,IAAI,KAAK,OAAO,OAAO;CACpC,KAAK,OAAO,IAAI,EAAG;CACnB,KAAK,MAAM,IAAI,IAAI,UAAU;CAC7B,OAAO;EACL;EACA,OAAO,GAAG;GACR,MAAM,OAAO,OAAO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shared/types.js";
2
+ import { a as renderSvg, i as ready, n as describe } from "./shared/describe.js";
3
+ import { AvatarLook, decodeLook, defaultLook, encodeLook } from "@diffenderfer-games/hub-contract/avatar";
4
+ export { type AvatarLook, EXPRESSION_NAMES, type Expression, type Facing, type Frame, type LookLike, type Pose, type RenderOptions, decodeLook, defaultLook, describe, encodeLook, isExpression, ready, renderSvg };
@@ -0,0 +1,5 @@
1
+ import { h as EXPRESSION_NAMES, v as isExpression, x as ready } from "./shared/svg-markup.js";
2
+ import { n as renderSvg } from "./shared/svg.js";
3
+ import { n as describe } from "./shared/describe.js";
4
+ import { decodeLook, defaultLook, encodeLook } from "@diffenderfer-games/hub-contract/avatar";
5
+ export { EXPRESSION_NAMES, decodeLook, defaultLook, describe, encodeLook, isExpression, ready, renderSvg };