@the-inclusionist/engine 9.0.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (532) hide show
  1. package/README.md +120 -78
  2. package/app/css/style.css +761 -377
  3. package/app/public/vendor/fonts/playwrite-cu.woff2 +0 -0
  4. package/app/public/vendor/fonts/playwrite-es-deco.woff2 +0 -0
  5. package/app/public/vendor/fonts/playwrite-es.woff2 +0 -0
  6. package/app/public/vendor/fonts/playwrite-gb-j.woff2 +0 -0
  7. package/app/public/vendor/fonts/playwrite-gb-s.woff2 +0 -0
  8. package/app/public/vendor/fonts/playwrite-pe.woff2 +0 -0
  9. package/app/public/vendor/fonts/playwrite-pt.woff2 +0 -0
  10. package/app/public/vendor/fonts-licences/NOTICE.txt +166 -0
  11. package/app/public/vendor/fonts-licences/OFL-1.1.txt +86 -0
  12. package/app/public/vendor/fonts.css +36 -84
  13. package/dist-pkg/boot/create-game.d.ts +499 -219
  14. package/dist-pkg/boot/create-game.js +3944 -562
  15. package/dist-pkg/core/a11y-sr.d.ts +25 -3
  16. package/dist-pkg/core/a11y-sr.js +38 -19
  17. package/dist-pkg/core/accessible-label.d.ts +17 -0
  18. package/dist-pkg/core/accessible-label.js +37 -0
  19. package/dist-pkg/core/accommodation-subjects.d.ts +26 -0
  20. package/dist-pkg/core/accommodation-subjects.js +32 -0
  21. package/dist-pkg/core/accommodations.d.ts +125 -0
  22. package/dist-pkg/core/accommodations.js +195 -0
  23. package/dist-pkg/core/actions.d.ts +108 -55
  24. package/dist-pkg/core/actions.js +122 -71
  25. package/dist-pkg/core/calm-mode.d.ts +31 -0
  26. package/dist-pkg/core/calm-mode.js +47 -0
  27. package/dist-pkg/core/camera-cycle.d.ts +15 -0
  28. package/dist-pkg/core/camera-cycle.js +7 -0
  29. package/dist-pkg/core/caption-duration.d.ts +15 -0
  30. package/dist-pkg/core/caption-duration.js +19 -0
  31. package/dist-pkg/core/cartridge-problems.d.ts +34 -0
  32. package/dist-pkg/core/cartridge-problems.js +53 -0
  33. package/dist-pkg/core/constants.d.ts +0 -54
  34. package/dist-pkg/core/constants.js +9 -76
  35. package/dist-pkg/core/contract.d.ts +142 -164
  36. package/dist-pkg/core/contract.js +222 -208
  37. package/dist-pkg/core/dom-query.d.ts +4 -4
  38. package/dist-pkg/core/dom-query.js +12 -20
  39. package/dist-pkg/core/entity.d.ts +62 -77
  40. package/dist-pkg/core/entity.js +18 -32
  41. package/dist-pkg/core/escape-html.d.ts +9 -10
  42. package/dist-pkg/core/escape-html.js +16 -20
  43. package/dist-pkg/core/flash-threshold.d.ts +17 -0
  44. package/dist-pkg/core/flash-threshold.js +113 -0
  45. package/dist-pkg/core/game-speed.d.ts +11 -0
  46. package/dist-pkg/core/game-speed.js +16 -0
  47. package/dist-pkg/core/genres.d.ts +20 -0
  48. package/dist-pkg/core/genres.js +44 -0
  49. package/dist-pkg/core/i18n.d.ts +71 -60
  50. package/dist-pkg/core/i18n.js +186 -200
  51. package/dist-pkg/core/loop.d.ts +17 -6
  52. package/dist-pkg/core/loop.js +26 -26
  53. package/dist-pkg/core/pause-icon-catalogue.d.ts +15 -0
  54. package/dist-pkg/core/pause-icon-catalogue.js +54 -0
  55. package/dist-pkg/core/ring.d.ts +17 -0
  56. package/dist-pkg/core/ring.js +29 -0
  57. package/dist-pkg/core/rng.d.ts +7 -12
  58. package/dist-pkg/core/rng.js +23 -53
  59. package/dist-pkg/core/route.d.ts +26 -26
  60. package/dist-pkg/core/route.js +126 -121
  61. package/dist-pkg/core/scenes.d.ts +37 -40
  62. package/dist-pkg/core/scenes.js +41 -43
  63. package/dist-pkg/core/screens.d.ts +4 -4
  64. package/dist-pkg/core/screens.js +11 -16
  65. package/dist-pkg/core/session-clock.d.ts +23 -0
  66. package/dist-pkg/core/session-clock.js +37 -0
  67. package/dist-pkg/core/setting-defaults.d.ts +61 -0
  68. package/dist-pkg/core/setting-defaults.js +66 -0
  69. package/dist-pkg/core/speech-rate.d.ts +29 -0
  70. package/dist-pkg/core/speech-rate.js +47 -0
  71. package/dist-pkg/core/state.d.ts +118 -118
  72. package/dist-pkg/core/state.js +322 -297
  73. package/dist-pkg/core/visual-cycles.d.ts +30 -0
  74. package/dist-pkg/core/visual-cycles.js +52 -0
  75. package/dist-pkg/core/visual-state.d.ts +13 -0
  76. package/dist-pkg/core/visual-state.js +6 -0
  77. package/dist-pkg/educational/activities-registry.d.ts +1 -1
  78. package/dist-pkg/educational/activities-registry.js +9 -8
  79. package/dist-pkg/educational/adaptive-engine.d.ts +11 -11
  80. package/dist-pkg/educational/adaptive-engine.js +17 -17
  81. package/dist-pkg/educational/segment-bar.d.ts +12 -12
  82. package/dist-pkg/educational/segment-bar.js +9 -9
  83. package/dist-pkg/i18n/en.js +324 -223
  84. package/dist-pkg/i18n/es.js +323 -223
  85. package/dist-pkg/i18n/pt.js +348 -226
  86. package/dist-pkg/input/default-bindings.d.ts +37 -38
  87. package/dist-pkg/input/default-bindings.js +127 -144
  88. package/dist-pkg/input/devices.d.ts +7 -7
  89. package/dist-pkg/input/devices.js +17 -16
  90. package/dist-pkg/input/edges.d.ts +23 -32
  91. package/dist-pkg/input/edges.js +23 -28
  92. package/dist-pkg/input/empathy-filter.d.ts +22 -0
  93. package/dist-pkg/input/empathy-filter.js +34 -0
  94. package/dist-pkg/input/face-map.d.ts +96 -0
  95. package/dist-pkg/input/face-map.js +255 -0
  96. package/dist-pkg/input/face-signals.d.ts +40 -0
  97. package/dist-pkg/input/face-signals.js +48 -0
  98. package/dist-pkg/input/gamepad.d.ts +195 -145
  99. package/dist-pkg/input/gamepad.js +383 -556
  100. package/dist-pkg/input/gaze-cycle.d.ts +64 -0
  101. package/dist-pkg/input/gaze-cycle.js +133 -0
  102. package/dist-pkg/input/gaze-relative.d.ts +68 -0
  103. package/dist-pkg/input/gaze-relative.js +142 -0
  104. package/dist-pkg/input/hand-map.d.ts +28 -0
  105. package/dist-pkg/input/hand-map.js +142 -0
  106. package/dist-pkg/input/input-cooldown.d.ts +17 -0
  107. package/dist-pkg/input/input-cooldown.js +39 -0
  108. package/dist-pkg/input/key-default.d.ts +30 -0
  109. package/dist-pkg/input/key-default.js +60 -0
  110. package/dist-pkg/input/keyboard-runtime.d.ts +15 -21
  111. package/dist-pkg/input/keyboard-runtime.js +23 -27
  112. package/dist-pkg/input/keyboard.d.ts +68 -63
  113. package/dist-pkg/input/keyboard.js +83 -105
  114. package/dist-pkg/input/keydown.d.ts +123 -137
  115. package/dist-pkg/input/keydown.js +284 -289
  116. package/dist-pkg/input/latch-edge.d.ts +33 -21
  117. package/dist-pkg/input/latch-edge.js +34 -35
  118. package/dist-pkg/input/latch-scope.d.ts +51 -50
  119. package/dist-pkg/input/latch-scope.js +61 -82
  120. package/dist-pkg/input/latch-store.d.ts +26 -30
  121. package/dist-pkg/input/latch-store.js +42 -50
  122. package/dist-pkg/input/latch-sync.d.ts +29 -29
  123. package/dist-pkg/input/latch-sync.js +25 -25
  124. package/dist-pkg/input/latch.d.ts +14 -17
  125. package/dist-pkg/input/latch.js +29 -37
  126. package/dist-pkg/input/pad-defaults.d.ts +13 -16
  127. package/dist-pkg/input/pad-defaults.js +21 -28
  128. package/dist-pkg/input/pad-reading.d.ts +76 -0
  129. package/dist-pkg/input/pad-reading.js +169 -0
  130. package/dist-pkg/input/pad-wizard.d.ts +99 -0
  131. package/dist-pkg/input/pad-wizard.js +256 -0
  132. package/dist-pkg/input/pointer-space.d.ts +19 -20
  133. package/dist-pkg/input/pointer-space.js +27 -32
  134. package/dist-pkg/input/pointer.d.ts +39 -40
  135. package/dist-pkg/input/pointer.js +42 -45
  136. package/dist-pkg/input/state.d.ts +101 -89
  137. package/dist-pkg/input/state.js +54 -134
  138. package/dist-pkg/input/switch-scan.d.ts +59 -0
  139. package/dist-pkg/input/switch-scan.js +67 -0
  140. package/dist-pkg/input/synthetic-source.d.ts +42 -0
  141. package/dist-pkg/input/synthetic-source.js +57 -0
  142. package/dist-pkg/input/touch-bindings.d.ts +127 -116
  143. package/dist-pkg/input/touch-bindings.js +158 -173
  144. package/dist-pkg/input/touch.d.ts +147 -72
  145. package/dist-pkg/input/touch.js +362 -126
  146. package/dist-pkg/input/transport-in-use.d.ts +107 -0
  147. package/dist-pkg/input/transport-in-use.js +130 -0
  148. package/dist-pkg/input/transports.d.ts +90 -117
  149. package/dist-pkg/input/transports.js +104 -106
  150. package/dist-pkg/input/virtual-controller.d.ts +82 -0
  151. package/dist-pkg/input/virtual-controller.js +69 -0
  152. package/dist-pkg/input/vocabulary-migration.d.ts +50 -49
  153. package/dist-pkg/input/vocabulary-migration.js +80 -79
  154. package/dist-pkg/input/voice-map.d.ts +59 -0
  155. package/dist-pkg/input/voice-map.js +123 -0
  156. package/dist-pkg/platform/audio-ambient.d.ts +13 -2
  157. package/dist-pkg/platform/audio-ambient.js +14 -14
  158. package/dist-pkg/platform/audio-earcons.d.ts +20 -19
  159. package/dist-pkg/platform/audio-earcons.js +51 -42
  160. package/dist-pkg/platform/audio-jingles.js +9 -10
  161. package/dist-pkg/platform/audio-mixer.d.ts +14 -2
  162. package/dist-pkg/platform/audio-mixer.js +31 -39
  163. package/dist-pkg/platform/audio-sonar.d.ts +49 -152
  164. package/dist-pkg/platform/audio-sonar.js +124 -302
  165. package/dist-pkg/platform/audio.d.ts +62 -19
  166. package/dist-pkg/platform/audio.js +193 -168
  167. package/dist-pkg/platform/choose-by-voice.d.ts +70 -0
  168. package/dist-pkg/platform/choose-by-voice.js +157 -0
  169. package/dist-pkg/platform/flash-sampler.d.ts +19 -0
  170. package/dist-pkg/platform/flash-sampler.js +79 -0
  171. package/dist-pkg/platform/font-library.d.ts +77 -0
  172. package/dist-pkg/platform/font-library.js +98 -0
  173. package/dist-pkg/platform/font-library.json +721 -0
  174. package/dist-pkg/platform/heavy-catalogue.d.ts +77 -0
  175. package/dist-pkg/platform/heavy-catalogue.js +256 -0
  176. package/dist-pkg/platform/heavy-mirror.d.ts +20 -0
  177. package/dist-pkg/platform/heavy-mirror.js +73 -0
  178. package/dist-pkg/platform/heavy.d.ts +136 -0
  179. package/dist-pkg/platform/heavy.js +324 -0
  180. package/dist-pkg/platform/interruptible-speech.d.ts +23 -16
  181. package/dist-pkg/platform/interruptible-speech.js +77 -54
  182. package/dist-pkg/platform/kokoro-port.d.ts +27 -0
  183. package/dist-pkg/platform/kokoro-port.js +50 -0
  184. package/dist-pkg/platform/kokoro-runtime.d.ts +20 -0
  185. package/dist-pkg/platform/kokoro-runtime.js +52 -0
  186. package/dist-pkg/platform/kokoro.d.ts +70 -0
  187. package/dist-pkg/platform/kokoro.js +133 -0
  188. package/dist-pkg/platform/listener-scope.d.ts +12 -0
  189. package/dist-pkg/platform/listener-scope.js +90 -0
  190. package/dist-pkg/platform/locale-host.d.ts +14 -0
  191. package/dist-pkg/platform/locale-host.js +45 -0
  192. package/dist-pkg/platform/microphone.d.ts +51 -0
  193. package/dist-pkg/platform/microphone.js +118 -0
  194. package/dist-pkg/platform/onnx-runtime.d.ts +34 -0
  195. package/dist-pkg/platform/onnx-runtime.js +42 -0
  196. package/dist-pkg/platform/reading-in-worker.d.ts +64 -0
  197. package/dist-pkg/platform/reading-in-worker.js +125 -0
  198. package/dist-pkg/platform/reading-model.d.ts +94 -0
  199. package/dist-pkg/platform/reading-model.js +272 -0
  200. package/dist-pkg/platform/reading-runtime.d.ts +24 -0
  201. package/dist-pkg/platform/reading-runtime.js +164 -0
  202. package/dist-pkg/platform/reading-worker.d.ts +41 -0
  203. package/dist-pkg/platform/reading-worker.js +58 -0
  204. package/dist-pkg/platform/reading.d.ts +80 -0
  205. package/dist-pkg/platform/reading.js +136 -0
  206. package/dist-pkg/platform/speech-recognition.d.ts +60 -0
  207. package/dist-pkg/platform/speech-recognition.js +104 -0
  208. package/dist-pkg/platform/speech.d.ts +23 -1
  209. package/dist-pkg/platform/speech.js +29 -18
  210. package/dist-pkg/platform/storage-keys.d.ts +96 -0
  211. package/dist-pkg/platform/storage-keys.js +106 -0
  212. package/dist-pkg/platform/storage.d.ts +46 -111
  213. package/dist-pkg/platform/storage.js +104 -169
  214. package/dist-pkg/platform/tts.d.ts +85 -39
  215. package/dist-pkg/platform/tts.js +447 -127
  216. package/dist-pkg/platform/vision-loop.d.ts +23 -0
  217. package/dist-pkg/platform/vision-loop.js +56 -0
  218. package/dist-pkg/platform/vision.d.ts +132 -0
  219. package/dist-pkg/platform/vision.js +117 -0
  220. package/dist-pkg/platform/voice-listener.d.ts +40 -0
  221. package/dist-pkg/platform/voice-listener.js +88 -0
  222. package/dist-pkg/platform/voice-plan.d.ts +15 -98
  223. package/dist-pkg/platform/voice-plan.js +56 -143
  224. package/dist-pkg/platform/vosk-runtime.d.ts +96 -0
  225. package/dist-pkg/platform/vosk-runtime.js +151 -0
  226. package/dist-pkg/platform/vosk-vocabulary.d.ts +6 -0
  227. package/dist-pkg/platform/vosk-vocabulary.js +178 -0
  228. package/dist-pkg/render/canvas.d.ts +13 -7
  229. package/dist-pkg/render/canvas.js +13 -13
  230. package/dist-pkg/render/crt.d.ts +48 -12
  231. package/dist-pkg/render/crt.js +78 -80
  232. package/dist-pkg/render/cvd-matrices.d.ts +22 -18
  233. package/dist-pkg/render/cvd-matrices.js +37 -38
  234. package/dist-pkg/render/hc-role-data.d.ts +7 -7
  235. package/dist-pkg/render/hc-role-data.js +14 -14
  236. package/dist-pkg/render/high-contrast.d.ts +67 -56
  237. package/dist-pkg/render/high-contrast.js +226 -217
  238. package/dist-pkg/render/low-vision-drawing.d.ts +5 -0
  239. package/dist-pkg/render/low-vision-drawing.js +46 -0
  240. package/dist-pkg/render/lq-filter.d.ts +32 -20
  241. package/dist-pkg/render/lq-filter.js +59 -65
  242. package/dist-pkg/render/port.d.ts +86 -88
  243. package/dist-pkg/render/port.js +17 -23
  244. package/dist-pkg/render/screen-pipeline.d.ts +42 -42
  245. package/dist-pkg/render/screen-pipeline.js +80 -87
  246. package/dist-pkg/render/sprite-fx.d.ts +2 -1
  247. package/dist-pkg/render/sprite-fx.js +16 -14
  248. package/dist-pkg/render/viewports.d.ts +20 -15
  249. package/dist-pkg/render/viewports.js +83 -114
  250. package/dist-pkg/render/viz-axes-labels.d.ts +47 -0
  251. package/dist-pkg/render/viz-axes-labels.js +88 -0
  252. package/dist-pkg/render/viz-axes.d.ts +89 -86
  253. package/dist-pkg/render/viz-axes.js +128 -116
  254. package/dist-pkg/render/viz-modes.d.ts +28 -29
  255. package/dist-pkg/render/viz-modes.js +40 -45
  256. package/dist-pkg/render/viz-refusal.d.ts +32 -0
  257. package/dist-pkg/render/viz-refusal.js +57 -0
  258. package/dist-pkg/render/viz-setters.d.ts +104 -66
  259. package/dist-pkg/render/viz-setters.js +182 -191
  260. package/dist-pkg/ui/aac-sets.d.ts +45 -0
  261. package/dist-pkg/ui/aac-sets.js +41 -0
  262. package/dist-pkg/ui/audio-choices.d.ts +68 -0
  263. package/dist-pkg/ui/audio-choices.js +98 -0
  264. package/dist-pkg/ui/audio-rows-that-apply.d.ts +12 -0
  265. package/dist-pkg/ui/audio-rows-that-apply.js +43 -0
  266. package/dist-pkg/ui/camera-control.d.ts +53 -0
  267. package/dist-pkg/ui/camera-control.js +48 -0
  268. package/dist-pkg/ui/changed-mark.d.ts +9 -8
  269. package/dist-pkg/ui/changed-mark.js +22 -53
  270. package/dist-pkg/ui/control-choices.d.ts +37 -0
  271. package/dist-pkg/ui/control-choices.js +84 -0
  272. package/dist-pkg/ui/debug-panel.d.ts +59 -43
  273. package/dist-pkg/ui/debug-panel.js +68 -69
  274. package/dist-pkg/ui/declared-words.d.ts +21 -0
  275. package/dist-pkg/ui/declared-words.js +66 -0
  276. package/dist-pkg/ui/dom.d.ts +10 -14
  277. package/dist-pkg/ui/dom.js +10 -47
  278. package/dist-pkg/ui/drawing-problems.d.ts +25 -0
  279. package/dist-pkg/ui/drawing-problems.js +94 -0
  280. package/dist-pkg/ui/eye-control.d.ts +36 -0
  281. package/dist-pkg/ui/eye-control.js +178 -0
  282. package/dist-pkg/ui/face-control.d.ts +25 -0
  283. package/dist-pkg/ui/face-control.js +183 -0
  284. package/dist-pkg/ui/focus-trap.d.ts +39 -49
  285. package/dist-pkg/ui/focus-trap.js +56 -65
  286. package/dist-pkg/ui/fonts.d.ts +157 -68
  287. package/dist-pkg/ui/fonts.js +305 -115
  288. package/dist-pkg/ui/footer-scroll-driver.d.ts +14 -0
  289. package/dist-pkg/ui/footer-scroll-driver.js +201 -0
  290. package/dist-pkg/ui/footer-scroll.d.ts +38 -0
  291. package/dist-pkg/ui/footer-scroll.js +55 -0
  292. package/dist-pkg/ui/game-options.d.ts +47 -0
  293. package/dist-pkg/ui/game-options.js +158 -0
  294. package/dist-pkg/ui/gaze-overlay.d.ts +64 -0
  295. package/dist-pkg/ui/gaze-overlay.js +165 -0
  296. package/dist-pkg/ui/hand-control.d.ts +25 -0
  297. package/dist-pkg/ui/hand-control.js +143 -0
  298. package/dist-pkg/ui/help-panel.d.ts +87 -0
  299. package/dist-pkg/ui/help-panel.js +242 -0
  300. package/dist-pkg/ui/hud-bands.d.ts +62 -0
  301. package/dist-pkg/ui/hud-bands.js +146 -0
  302. package/dist-pkg/ui/hud-row.d.ts +34 -0
  303. package/dist-pkg/ui/hud-row.js +80 -0
  304. package/dist-pkg/ui/hud.d.ts +73 -73
  305. package/dist-pkg/ui/hud.js +94 -98
  306. package/dist-pkg/ui/item-announcement.d.ts +13 -12
  307. package/dist-pkg/ui/item-announcement.js +25 -26
  308. package/dist-pkg/ui/layout.d.ts +103 -28
  309. package/dist-pkg/ui/layout.js +117 -99
  310. package/dist-pkg/ui/libras-avatar-clip.d.ts +30 -0
  311. package/dist-pkg/ui/libras-avatar-clip.js +86 -0
  312. package/dist-pkg/ui/libras-avatar-load.d.ts +52 -0
  313. package/dist-pkg/ui/libras-avatar-load.js +134 -0
  314. package/dist-pkg/ui/libras-avatar-plan.d.ts +102 -0
  315. package/dist-pkg/ui/libras-avatar-plan.js +211 -0
  316. package/dist-pkg/ui/libras-avatar-player.d.ts +28 -0
  317. package/dist-pkg/ui/libras-avatar-player.js +226 -0
  318. package/dist-pkg/ui/libras-avatar-stage.d.ts +37 -0
  319. package/dist-pkg/ui/libras-avatar-stage.js +208 -0
  320. package/dist-pkg/ui/libras-glosses.d.ts +28 -0
  321. package/dist-pkg/ui/libras-glosses.js +161 -0
  322. package/dist-pkg/ui/locale-flags.d.ts +16 -0
  323. package/dist-pkg/ui/locale-flags.js +30 -0
  324. package/dist-pkg/ui/loop-crash.d.ts +17 -17
  325. package/dist-pkg/ui/loop-crash.js +33 -62
  326. package/dist-pkg/ui/menu-intent.d.ts +61 -0
  327. package/dist-pkg/ui/menu-intent.js +88 -0
  328. package/dist-pkg/ui/menu-items.d.ts +20 -0
  329. package/dist-pkg/ui/menu-items.js +51 -0
  330. package/dist-pkg/ui/menu-nav.d.ts +98 -92
  331. package/dist-pkg/ui/menu-nav.js +398 -286
  332. package/dist-pkg/ui/mobility-choices.d.ts +26 -0
  333. package/dist-pkg/ui/mobility-choices.js +41 -0
  334. package/dist-pkg/ui/motion-choices.d.ts +31 -0
  335. package/dist-pkg/ui/motion-choices.js +68 -0
  336. package/dist-pkg/ui/motion-scene.d.ts +24 -19
  337. package/dist-pkg/ui/motion-scene.js +29 -61
  338. package/dist-pkg/ui/mount-panel.d.ts +81 -0
  339. package/dist-pkg/ui/mount-panel.js +61 -0
  340. package/dist-pkg/ui/panel-shell.d.ts +65 -31
  341. package/dist-pkg/ui/panel-shell.js +92 -66
  342. package/dist-pkg/ui/panel-widgets.d.ts +150 -0
  343. package/dist-pkg/ui/panel-widgets.js +294 -0
  344. package/dist-pkg/ui/pause-buttons.d.ts +35 -0
  345. package/dist-pkg/ui/pause-buttons.js +66 -0
  346. package/dist-pkg/ui/pause-icons.d.ts +261 -347
  347. package/dist-pkg/ui/pause-icons.js +671 -601
  348. package/dist-pkg/ui/pause-markup.d.ts +86 -0
  349. package/dist-pkg/ui/pause-markup.js +125 -0
  350. package/dist-pkg/ui/reach-notice.d.ts +22 -23
  351. package/dist-pkg/ui/reach-notice.js +55 -58
  352. package/dist-pkg/ui/scan-overlay.d.ts +23 -0
  353. package/dist-pkg/ui/scan-overlay.js +50 -0
  354. package/dist-pkg/ui/screen-text.d.ts +25 -0
  355. package/dist-pkg/ui/screen-text.js +152 -0
  356. package/dist-pkg/ui/session-clock.d.ts +32 -0
  357. package/dist-pkg/ui/session-clock.js +67 -0
  358. package/dist-pkg/ui/settings-aac.d.ts +70 -0
  359. package/dist-pkg/ui/settings-aac.js +208 -0
  360. package/dist-pkg/ui/settings-audio.d.ts +97 -114
  361. package/dist-pkg/ui/settings-audio.js +493 -425
  362. package/dist-pkg/ui/settings-controls.d.ts +53 -96
  363. package/dist-pkg/ui/settings-controls.js +143 -215
  364. package/dist-pkg/ui/settings-empathy.d.ts +39 -30
  365. package/dist-pkg/ui/settings-empathy.js +53 -60
  366. package/dist-pkg/ui/settings-mobility.d.ts +192 -0
  367. package/dist-pkg/ui/settings-mobility.js +332 -0
  368. package/dist-pkg/ui/settings-motion.d.ts +91 -70
  369. package/dist-pkg/ui/settings-motion.js +287 -198
  370. package/dist-pkg/ui/settings-panel.d.ts +58 -45
  371. package/dist-pkg/ui/settings-panel.js +189 -94
  372. package/dist-pkg/ui/settings-typo.d.ts +29 -78
  373. package/dist-pkg/ui/settings-typo.js +158 -129
  374. package/dist-pkg/ui/settings-visual.d.ts +29 -87
  375. package/dist-pkg/ui/settings-visual.js +240 -193
  376. package/dist-pkg/ui/shell.d.ts +112 -135
  377. package/dist-pkg/ui/shell.js +148 -217
  378. package/dist-pkg/ui/simulation-list.d.ts +27 -0
  379. package/dist-pkg/ui/simulation-list.js +76 -0
  380. package/dist-pkg/ui/simulation-over-the-world.d.ts +23 -0
  381. package/dist-pkg/ui/simulation-over-the-world.js +131 -0
  382. package/dist-pkg/ui/simulation-refusal.d.ts +5 -31
  383. package/dist-pkg/ui/simulation-refusal.js +8 -56
  384. package/dist-pkg/ui/switchable-control.d.ts +11 -0
  385. package/dist-pkg/ui/switchable-control.js +19 -0
  386. package/dist-pkg/ui/title.d.ts +3 -12
  387. package/dist-pkg/ui/title.js +49 -18
  388. package/dist-pkg/ui/top-band.d.ts +26 -0
  389. package/dist-pkg/ui/top-band.js +96 -0
  390. package/dist-pkg/ui/typo-choices.d.ts +71 -0
  391. package/dist-pkg/ui/typo-choices.js +85 -0
  392. package/dist-pkg/ui/visual-axes-panel.d.ts +11 -47
  393. package/dist-pkg/ui/visual-axes-panel.js +12 -94
  394. package/dist-pkg/ui/visual-choices.d.ts +77 -0
  395. package/dist-pkg/ui/visual-choices.js +107 -0
  396. package/dist-pkg/ui/vlibras.d.ts +77 -10
  397. package/dist-pkg/ui/vlibras.js +130 -81
  398. package/dist-pkg/ui/voice-control.d.ts +68 -0
  399. package/dist-pkg/ui/voice-control.js +276 -0
  400. package/dist-pkg/ui/voice-settings.d.ts +95 -0
  401. package/dist-pkg/ui/voice-settings.js +352 -0
  402. package/dist-pkg/ui/where-the-child-is.d.ts +31 -0
  403. package/dist-pkg/ui/where-the-child-is.js +70 -0
  404. package/docs/CREDITS.md +300 -44
  405. package/docs/LICENSES.md +189 -145
  406. package/package.json +51 -27
  407. package/scripts/check-cartridge.mjs +78 -0
  408. package/scripts/game-build.d.mts +25 -0
  409. package/scripts/game-build.mjs +144 -0
  410. package/scripts/heavy-into-the-delivery.mjs +388 -0
  411. package/scripts/libras-avatar.json +680 -0
  412. package/scripts/libras-avatar.mjs +246 -0
  413. package/scripts/libras-glosses/gloss.py +95 -0
  414. package/scripts/libras-glosses/pyproject.toml +32 -0
  415. package/scripts/libras-glosses/uv.lock +781 -0
  416. package/scripts/libras-glosses.mjs +351 -0
  417. package/scripts/licences/Apache-2.0.txt +176 -0
  418. package/scripts/licences/GPL-3.0.txt +674 -0
  419. package/scripts/licences/MIT.txt +17 -0
  420. package/scripts/licences/OFL-1.1.txt +86 -0
  421. package/scripts/licences/UFL-1.0.txt +96 -0
  422. package/scripts/licences/fonts.mjs +389 -0
  423. package/scripts/licences/third-party.mjs +301 -0
  424. package/scripts/licences/vosk-browser.NOTICE.txt +268 -0
  425. package/app/public/vendor/fonts/comicneue-400.woff2 +0 -0
  426. package/app/public/vendor/fonts/comicneue-700.woff2 +0 -0
  427. package/app/public/vendor/fonts/fondamento-400-ext.woff2 +0 -0
  428. package/app/public/vendor/fonts/fondamento-400.woff2 +0 -0
  429. package/app/public/vendor/fonts/inter-400.woff2 +0 -0
  430. package/app/public/vendor/fonts/inter-700.woff2 +0 -0
  431. package/app/public/vendor/fonts/lato-400.woff2 +0 -0
  432. package/app/public/vendor/fonts/lato-700.woff2 +0 -0
  433. package/app/public/vendor/fonts/literata-400.woff2 +0 -0
  434. package/app/public/vendor/fonts/literata-700.woff2 +0 -0
  435. package/app/public/vendor/fonts/newsreader-400.woff2 +0 -0
  436. package/app/public/vendor/fonts/newsreader-700.woff2 +0 -0
  437. package/app/public/vendor/fonts/opendyslexic-400.woff2 +0 -0
  438. package/app/public/vendor/fonts/opensans-400.woff2 +0 -0
  439. package/app/public/vendor/fonts/opensans-700.woff2 +0 -0
  440. package/app/public/vendor/fonts/pinyon-400.woff2 +0 -0
  441. package/app/public/vendor/fonts/pressstart-400.woff2 +0 -0
  442. package/app/public/vendor/fonts/quattro-400.woff2 +0 -0
  443. package/app/public/vendor/fonts/quattro-700.woff2 +0 -0
  444. package/app/public/vendor/fonts/sourcesans-400.woff2 +0 -0
  445. package/app/public/vendor/fonts/sourcesans-700.woff2 +0 -0
  446. package/app/public/vendor/fonts/sourceserif-400.woff2 +0 -0
  447. package/app/public/vendor/fonts/sourceserif-700.woff2 +0 -0
  448. package/app/public/vendor/fonts/ufmag-400.woff2 +0 -0
  449. package/dist-pkg/core/anel.d.ts +0 -17
  450. package/dist-pkg/core/anel.js +0 -31
  451. package/dist-pkg/core/collision.d.ts +0 -21
  452. package/dist-pkg/core/collision.js +0 -62
  453. package/dist-pkg/core/layers.d.ts +0 -63
  454. package/dist-pkg/core/layers.js +0 -95
  455. package/dist-pkg/core/letter-grid.d.ts +0 -55
  456. package/dist-pkg/core/letter-grid.js +0 -116
  457. package/dist-pkg/core/password.d.ts +0 -34
  458. package/dist-pkg/core/password.js +0 -205
  459. package/dist-pkg/core/rotulo-acessivel.d.ts +0 -17
  460. package/dist-pkg/core/rotulo-acessivel.js +0 -41
  461. package/dist-pkg/core/run-state.d.ts +0 -115
  462. package/dist-pkg/core/run-state.js +0 -40
  463. package/dist-pkg/core/tiles.d.ts +0 -12
  464. package/dist-pkg/core/tiles.js +0 -61
  465. package/dist-pkg/core/world.d.ts +0 -4
  466. package/dist-pkg/core/world.js +0 -58
  467. package/dist-pkg/input/origem-sintetica.d.ts +0 -44
  468. package/dist-pkg/input/origem-sintetica.js +0 -60
  469. package/dist-pkg/input/transporte-em-uso.d.ts +0 -101
  470. package/dist-pkg/input/transporte-em-uso.js +0 -130
  471. package/dist-pkg/platform/audio-nav.d.ts +0 -51
  472. package/dist-pkg/platform/audio-nav.js +0 -99
  473. package/dist-pkg/platform/guide-intensity.d.ts +0 -40
  474. package/dist-pkg/platform/guide-intensity.js +0 -73
  475. package/dist-pkg/platform/pesados-catalogo.d.ts +0 -14
  476. package/dist-pkg/platform/pesados-catalogo.js +0 -177
  477. package/dist-pkg/platform/pesados.d.ts +0 -31
  478. package/dist-pkg/platform/pesados.js +0 -75
  479. package/dist-pkg/platform/vozes-prontas.d.ts +0 -28
  480. package/dist-pkg/platform/vozes-prontas.js +0 -61
  481. package/dist-pkg/render/camera.d.ts +0 -58
  482. package/dist-pkg/render/camera.js +0 -105
  483. package/dist-pkg/render/cenario-data.d.ts +0 -127
  484. package/dist-pkg/render/cenario-data.js +0 -145
  485. package/dist-pkg/render/city-tex.d.ts +0 -63
  486. package/dist-pkg/render/city-tex.js +0 -228
  487. package/dist-pkg/render/city-tiles.d.ts +0 -11
  488. package/dist-pkg/render/city-tiles.js +0 -140
  489. package/dist-pkg/render/draw.d.ts +0 -149
  490. package/dist-pkg/render/draw.js +0 -231
  491. package/dist-pkg/render/fx.d.ts +0 -63
  492. package/dist-pkg/render/fx.js +0 -123
  493. package/dist-pkg/render/minimap.d.ts +0 -11
  494. package/dist-pkg/render/minimap.js +0 -94
  495. package/dist-pkg/render/parallax.d.ts +0 -85
  496. package/dist-pkg/render/parallax.js +0 -158
  497. package/dist-pkg/render/player-anim.d.ts +0 -71
  498. package/dist-pkg/render/player-anim.js +0 -152
  499. package/dist-pkg/render/recycling-tex.d.ts +0 -48
  500. package/dist-pkg/render/recycling-tex.js +0 -164
  501. package/dist-pkg/render/scene-city.d.ts +0 -77
  502. package/dist-pkg/render/scene-city.js +0 -181
  503. package/dist-pkg/render/scene-parallax.d.ts +0 -72
  504. package/dist-pkg/render/scene-parallax.js +0 -426
  505. package/dist-pkg/render/scene-sky.d.ts +0 -126
  506. package/dist-pkg/render/scene-sky.js +0 -295
  507. package/dist-pkg/render/set-cenario.d.ts +0 -54
  508. package/dist-pkg/render/set-cenario.js +0 -103
  509. package/dist-pkg/render/textures.d.ts +0 -75
  510. package/dist-pkg/render/textures.js +0 -240
  511. package/dist-pkg/render/title-scene.d.ts +0 -46
  512. package/dist-pkg/render/title-scene.js +0 -75
  513. package/dist-pkg/render/weather.d.ts +0 -96
  514. package/dist-pkg/render/weather.js +0 -171
  515. package/dist-pkg/render/wheelchair-sprites.d.ts +0 -32
  516. package/dist-pkg/render/wheelchair-sprites.js +0 -69
  517. package/dist-pkg/render/world-tex.d.ts +0 -18
  518. package/dist-pkg/render/world-tex.js +0 -87
  519. package/dist-pkg/ui/activities-menu.d.ts +0 -258
  520. package/dist-pkg/ui/activities-menu.js +0 -648
  521. package/dist-pkg/ui/caa-sets.d.ts +0 -39
  522. package/dist-pkg/ui/caa-sets.js +0 -65
  523. package/dist-pkg/ui/latch-refusal.d.ts +0 -32
  524. package/dist-pkg/ui/latch-refusal.js +0 -60
  525. package/dist-pkg/ui/map-hub.d.ts +0 -56
  526. package/dist-pkg/ui/map-hub.js +0 -138
  527. package/dist-pkg/ui/settings-caa.d.ts +0 -45
  528. package/dist-pkg/ui/settings-caa.js +0 -137
  529. package/dist-pkg/ui/settings-motor.d.ts +0 -175
  530. package/dist-pkg/ui/settings-motor.js +0 -342
  531. package/dist-pkg/ui/webcam.d.ts +0 -7
  532. package/dist-pkg/ui/webcam.js +0 -93
@@ -1,95 +1,25 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ import type { Translate } from '../core/i18n.js';
2
3
  import type { PlayerView } from '../core/entity.js';
3
- import { type TabelaDoPad } from './pad-defaults.js';
4
- export interface PadButtonLike {
5
- pressed: boolean;
6
- }
7
- export interface PadLike {
8
- id: string;
9
- index: number;
10
- mapping: string;
11
- buttons: readonly (PadButtonLike | null | undefined)[];
12
- axes: readonly number[];
13
- }
14
- /** Adapter for `navigator.getGamepads()` — the DI point that lets tests feed a fake pad without a browser. */
15
- export type GetGamepads = () => readonly (PadLike | null | undefined)[] | null | undefined;
16
- export type { DomQuery } from '../core/dom-query.js';
17
- /** One binding captured by the wizard: a digital button, a signed analog threshold, or an exact hat/POV value.
18
- * Loosely-shaped (all fields optional) rather than a strict union: bindings round-trip through JSON in
19
- * localStorage, so `bindActive` must stay defensive against malformed/partial saved data, same as the original. */
20
- export interface PadBinding {
21
- b?: number;
22
- ax?: number;
23
- s?: number;
24
- av?: number;
25
- v?: number;
26
- }
27
- /** action -> binding, keyed by the 9 wizard steps (left/right/up/down/jump/run/swap/especial/start), PLUS the
28
- * `_skip: true` sentinel meaning "user cancelled the wizard for this model — use the default mapping, don't
29
- * ask again this session" (not persisted). A flat index signature (not `Partial<Record<..>> & {_skip}`) so the
30
- * boolean `_skip` and the PadBinding action values can coexist under TS's index-signature rule; `bindingAt`
31
- * narrows a lookup back down to a PadBinding for `bindActive`. */
32
- export type PadMap = Record<string, PadBinding | boolean | undefined>;
33
- export type ActionKey = 'left' | 'right' | 'up' | 'down' | 'action2' | 'action1' | 'action4' | 'action3';
34
- export interface Dirs {
35
- left: boolean;
36
- right: boolean;
37
- up: boolean;
38
- down: boolean;
39
- }
40
- export interface PadActions extends Dirs {
41
- [key: string]: boolean;
42
- action2: boolean;
43
- action1: boolean;
44
- action4: boolean;
45
- action3: boolean;
46
- _start: boolean;
47
- _pause: boolean;
48
- }
49
- /** Direções pelas FONTES PADRÃO: stick 0/1 (zona morta PAD_DEAD), D-pad 12-15, e o "hat" nos eixos >=6 (POV do
50
- * DirectInput). Controles com os dois direcionais mapeados ficam com ambos vivos (dedo no stick não mata o D-pad). */
51
- export declare function stdDirs(gp: PadLike): Dirs;
52
- /** Está o binding `bd` ativo agora neste gamepad? Digital = pressed; analógico ({ax,s}) = limiar por sinal
53
- * (metade do curso); hat ({av,v}) = valor exato do passo (±0.13 — os 8 passos distam ~0.286). */
54
- export declare function bindActive(gp: PadLike, bd: PadBinding | null | undefined): boolean;
55
- /** Ações do frame para este gamepad. `custom` = mapa salvo pelo wizard para este `gp.id` (null/`_skip` = usa o
56
- * mapa PADRÃO da Gamepad API "standard": 0=pulo · 1=especial · 2/5/7=correr · 3=troca · 9=START). Direções
57
- * custom caem de volta em stdDirs quando o binding do usuário não está ativo (D-pad/stick continuam vivos). */
58
- export declare function padActions(gp: PadLike, custom: PadMap | null, tabela?: TabelaDoPad): PadActions;
4
+ import { type PadMaps } from './pad-wizard.js';
5
+ import type { PadTableFor } from './pad-defaults.js';
6
+ import type { LiveInput } from './state.js';
7
+ import { type PadLike, type GetGamepads, type PadMap, type ActionKey } from './pad-reading.js';
59
8
  /**
60
- * O MODO DE UM BOTÃO, APLICADO AO CONTROLE — a metade que faltava da empatia motora (issue #120).
61
- *
62
- * ⚠️ ELE VALIA SÓ NO TECLADO. `input/keydown.ts:407` solta todas as outras teclas de jogo quando uma nova
63
- * chega com o modo ligado; `pollPads` não tinha equivalente nenhum, e `grep oneButton` neste ficheiro
64
- * devolvia zero. Uma criança que ligasse o modo e tivesse um controle na mão **não estava no modo** — sem
65
- * erro, sem aviso, sem sintoma, porque as definições continuavam a dizer que estava ligado.
66
- *
67
- * ⚠️ AS DIREÇÕES CONTAM, e é isso que torna a regra fiel ao teclado: lá, `isGameKeyCode` inclui as teclas
68
- * de `p.ctrl`, que são as quatro direções — andar e pular não coexistem. Um filtro que poupasse as
69
- * direções seria mais confortável e estaria a simular outra deficiência.
9
+ * The ORDER in which the wizard asks. ONLY the order — the same list `input/pad-wizard` walks, where it lives apart
10
+ * from any game (issue #182).
70
11
  *
71
- * ⚠️ E A ESCOLHA DE QUEM SOBREVIVE É DIFERENTE DA DO TECLADO, POR NECESSIDADE. No teclado a chegada nova
72
- * ganha, porque HÁ uma chegada: o evento diz qual é. Um controle é lido por SONDAGEM — o que chega é um
73
- * retrato, sem ordem. Então mantém-se a que já valia, e só quando ela solta é que a próxima assume. É o
74
- * que impede o botão de correr de ser cortado porque o polegar encostou noutro, e é a mesma leitura de
75
- * «segurar» que o ADR-0077 dá.
12
+ * ⚠️ NO WORDS HERE: the word comes from `ctx.actionLabel`, which the game supplies through its preset (ADR-0074 —
13
+ * platformer vocabulary, in one language, inside the engine was the defect this removed). What stays is what really
14
+ * is the engine's: the sequence of the questions — directions first, actions next, system last —, an ergonomic
15
+ * decision of the wizard and not of the game.
76
16
  *
77
- * A POLÍTICA é a mesma do `keydown`; a IMPLEMENTAÇÃO não pode ser partilhada hoje porque as formas do
78
- * estado diferem — lá é um `Set` de códigos de tecla, aqui é um retrato de booleanos por posição. Unificar
79
- * as duas é trabalho à parte, e escrevê-lo aqui é a alternativa a fingir que não há duas.
17
+ * ⚠️ AND AN ACTION THE GAME DOES NOT NAME IS NOT ASKED. `input/pad-wizard` skips it, because a game that does not use
18
+ * the position has nothing to map on it — and asking would produce a mute step or, worse, a step saying `action7` out
19
+ * loud. The exception is the system's two: START and SELECT are always asked, in the engine's words, because no game may
20
+ * name them and no pad may lack them (ADR-0144, erratum of 2026-09-26).
80
21
  */
81
- export declare function umBotaoPorVez(anterior: Readonly<Record<string, boolean | undefined>>, atual: PadActions, ligado: boolean): PadActions;
82
22
  export declare const PADWIZ_ORDER: readonly string[];
83
- export interface WizAnimDef {
84
- seq?: string[];
85
- hold?: number;
86
- cls: string;
87
- fx?: string;
88
- noimg?: number;
89
- flip?: number;
90
- }
91
- /** Demonstração animada de cada ação (frames reais do jogo) mostrada durante o passo correspondente do wizard. */
92
- export declare const PADWIZ_ANIM: Record<string, WizAnimDef>;
93
23
  interface WizBase {
94
24
  b: boolean[];
95
25
  a: number[];
@@ -101,7 +31,7 @@ interface WizAxTrack {
101
31
  changes: number;
102
32
  ticks: number;
103
33
  }
104
- /** Estado do wizard em andamento; `null` = fechado. Espelha o `padWiz` do game.js. */
34
+ /** The state of a wizard in progress; `null` = closed. */
105
35
  export interface WizState {
106
36
  gi: number;
107
37
  id: string;
@@ -116,100 +46,219 @@ export interface WizState {
116
46
  import type { NavKeys } from './edges.js';
117
47
  import type { ModalIntent } from './keydown.js';
118
48
  import type { DomQuery } from '../core/dom-query.js';
119
- export type { NavKeys } from './edges.js';
120
- /** Forma mínima de jogador que este módulo lê/escreve — DERIVADA de core/entity, não redigitada.
121
- * (`quiz` SAIU em 2026-08-25 — ADR-0033. Era `{ kind: string } | null` aqui e `{ kind?: string } | null` no
122
- * keydown, o mesmo objeto do JOGO com o discriminante obrigatório num módulo e opcional no outro. Hoje
123
- * nenhum dos dois o lê: a pergunta é `ctx.hasModal(i)` e a resposta é uma INTENÇÃO.) */
49
+ /** The minimal player shape this module reads/writes — DERIVED from core/entity, not retyped. There is no `quiz`
50
+ * here (ADR-0033): the question is `ctx.hasModal(i)` and the answer is an INTENT, so this module never reads the
51
+ * game's object. */
124
52
  export type GamepadPlayer = PlayerView<'pad' | 'quit' | 'waiting' | 'easy' | 'jumpEdge' | 'runEdge' | 'leftEdge' | 'rightEdge' | 'swapEdge' | 'specialEdge'>;
53
+ /**
54
+ * WHAT ONLY THE CARTRIDGE KNOWS ABOUT ITS WORLD (ADR-0224). The engine mounts this transport — as it mounts touch, the
55
+ * eyes, the face, the hands, the voice and the scan —, and the root answers every door of `GamepadCtx` it can with what it
56
+ * already has. These are the ones left, and they are the ones nothing in the engine can know.
57
+ *
58
+ * 🎯 **ALL OPTIONAL, AND EVERY ABSENCE HAS A WRITTEN MEANING** — never guessed (ADR-0113 clause 3, ADR-0169). A
59
+ * cartridge that declares nothing has a working pad; what depends on its world simply does not happen. Refusing the
60
+ * boot for lack of these would break every game with a pad and no title screen, over a declaration that has a safe
61
+ * meaning — refusing where it should report.
62
+ *
63
+ * 📌 ONE FIELD in `CreateGameOptions`, not nine loose ones: nine fields are nine things every game has to learn in a
64
+ * contract whose cost is a one-way door (ADR-0172), and the next transport needing the same treatment would bring nine
65
+ * more. Grouping them also says something true — they belong together because they are what the pad needs from the
66
+ * game.
67
+ */
68
+ export interface GamepadGameHooks {
69
+ /** Is the world moving? **Absent: it is**, whenever the pause card is not open. */
70
+ readonly worldRunning?: () => boolean;
71
+ /** This game's title screen. **Absent: no title to navigate** — the pad does nothing outside play and the pause. */
72
+ readonly navTitle?: (k: NavKeys) => void;
73
+ /** The demonstration that plays by itself. **Absent: no demo**, so nothing to stop. */
74
+ readonly attractActive?: () => boolean;
75
+ readonly stopAttract?: () => void;
76
+ /** This player's open challenge. **Absent: no modal**, and the d-pad belongs to the game. */
77
+ readonly hasModal?: (playerIndex: number) => boolean;
78
+ readonly modalInput?: (playerIndex: number, intent: ModalIntent) => void;
79
+ /** Joining a running game with a new screen. **Absent: nobody joins midway** (returns `false`). */
80
+ readonly joinPlayer?: (padIndex: number) => boolean;
81
+ /** Restarting only this player's screen. **Absent: nothing happens** — an abandoned screen stays abandoned. */
82
+ readonly respawnPlayer?: (playerIndex: number) => void;
83
+ /** The game's HUD "waiting" badge. **Absent: there is no badge** to remove. */
84
+ readonly clearWaitingBadge?: (playerIndex: number) => void;
85
+ /**
86
+ * A demonstration of what each position does, drawn by the GAME while the mapping wizard asks for it — `null` is
87
+ * the wizard opening. **Absent: the wizard speaks, with no drawing.** The engine asks the questions and in what
88
+ * order; what a position LOOKS like is the game's (note CD — the engine used to draw one game's boy here).
89
+ */
90
+ readonly wizardStep?: (position: string | null) => void;
91
+ /** One tick of the wizard's clock, for a demonstration that animates. **Absent: nothing animates.** */
92
+ readonly wizardTick?: () => void;
93
+ }
94
+ /** The same answers, all present: this is what `GamepadCtx` consumes, and what the table below guarantees. */
95
+ export type PadGameAnswers = Required<Omit<GamepadGameHooks, 'worldRunning'>> & {
96
+ readonly worldRunning: () => boolean;
97
+ };
98
+ /**
99
+ * The cartridge's answers with every absence already resolved. 📌 A field DECLARED as `undefined` is an absence like any
100
+ * other — spreading the raw object over the table would erase the answer with an `undefined`, which is the silent
101
+ * defect this function exists not to have.
102
+ */
103
+ export declare function padGameAnswers(hooks: GamepadGameHooks | undefined, worldRunningWhenSilent: () => boolean): PadGameAnswers;
104
+ /**
105
+ * THE SEAT FIELDS, SEEDED BY THE ENGINE (ADR-0224). 📏 Measured: the players a cartridge declares are
106
+ * `{ ctrl, audioSink? }`, and this transport needs to know whose each pad is (`pad`), who is still waiting (`waiting`)
107
+ * and who left the screen (`quit`).
108
+ *
109
+ * 🔴 IT SEEDS THE OBJECT ITSELF and returns the SAME list — copying would lose the seat on the next frame, because
110
+ * `takeSeat` writes into this object. That is also why there is no `.map`: the identity is what carries the state.
111
+ * 📌 It only touches whoever does not have the fields yet, so a cartridge that declares them keeps its own.
112
+ */
113
+ export declare function seatEveryPlayer(list: readonly object[]): GamepadPlayer[];
125
114
  export interface GamepadCtx {
126
- /** Adaptador da Gamepad API (substitui `navigator.getGamepads()`) — o ponto de DI para testar sem browser. */
115
+ /** Translates in the page's language — the root's translator (ADR-0232 D3). REQUIRED: text built from nowhere is a raw key. */
116
+ t: Translate;
117
+ /**
118
+ * The controller maps a child made — this root's `createPadMaps(store)` (ADR-0232 D4), the SAME object its own mapping
119
+ * wizard writes. Required: a pad whose map is read from nowhere answers with the standard layout, and a custom pad goes
120
+ * dead with no word said.
121
+ */
122
+ padMaps: PadMaps;
123
+ /**
124
+ * THIS GAME'S BUTTON TABLE per arrangement and seat — `createPadTable(declaration.padMapping)` (ADR-0115, ADR-0232 D4).
125
+ * Required: a transport handed no table would give the ENGINE's map, in silence, to a game that declared another.
126
+ */
127
+ padTable: PadTableFor;
128
+ /** Where each pad's frame is kept — this root's input state (`Engine.input`), mutated in place every poll. */
129
+ input: Pick<LiveInput, 'padCur' | 'padPrevAct' | 'padPrevStart'>;
130
+ /**
131
+ * Is the ONE-BUTTON mode on (the motor empathy, issue #120)? Read each frame — the child turns it on mid-game. The
132
+ * root answers from the settings store it built (ADR-0232); required, see the note at the imports.
133
+ */
134
+ oneButton: () => boolean;
135
+ /** The Gamepad API adapter (replaces `navigator.getGamepads()`) — the DI point for testing with no browser. */
127
136
  getGamepads: GetGamepads;
128
- /** Seletor DOM (querySelector), injetado — nunca alcança `document` global. */
137
+ /** DOM selector (querySelector), injected — never reaches the global `document`. */
129
138
  $: DomQuery;
130
139
  /**
131
- * COMO SE CHAMA esta posição, na palavra do JOGO e no idioma vigente. `null` = o jogo não a usa.
140
+ * WHAT this position IS CALLED, in the GAME's word and the current language. `null` = the game does not use it.
132
141
  *
133
- * ⚠️ É a fronteira do corte de 2026-09-06 em forma de campo: a engine sabe que existe uma posição,
134
- * só o jogo sabe a palavra. Antes desta linha o assistente dizia «PULAR» a partir de uma constante
135
- * deste ficheiro — em português, sem passar por `t()`, dentro do motor.
142
+ * ⚠️ It is the boundary between engine and game as a field: the engine knows a position exists, only the game knows
143
+ * the word. Without it the wizard would speak a constant of this file — in one language, without `t()`, inside the
144
+ * engine.
136
145
  */
137
- rotuloDaAcao: (acao: string) => string | null;
138
- /** Anúncios de leitor de tela (core/a11y-sr), injetados. */
146
+ actionLabel: (action: string) => string | null;
147
+ /** Screen-reader announcements (core/a11y-sr), injected. */
139
148
  srSay: (msg: string) => void;
140
149
  srAlert: (msg: string) => void;
141
- /** Traz um overlay para frente + preenche o texto de ajuda (game.js's frontOverlay, compartilhado por todo overlay). */
150
+ /** Brings an overlay to the front + fills in the help text (the shared overlay helper, used by every overlay). */
142
151
  frontOverlay: (el: HTMLElement | null) => void;
143
- /** O mundo está rodando? (START aqui PAUSA.) */
144
- mundoRodando: () => boolean;
145
- /** O menu de pausa está aberto? (START aqui RETOMA.) */
146
- menuDePausa: () => boolean;
147
- /** Pausar e retomar. Quem empilha a cena é a raiz; daqui sai só a intenção. */
148
- pausar: () => void;
149
- retomar: () => void;
150
- /** Modo demonstração (attract) — game.js's attractCtl. */
152
+ /** Is the world running? (START here PAUSES.) */
153
+ worldRunning: () => boolean;
154
+ /** Is the pause menu open? (START here RESUMES.) */
155
+ pauseMenu: () => boolean;
156
+ /**
157
+ * Pause and resume. The root stacks the scene; only the intent leaves from here. ⚠️ `pause` carries no seat: it is the
158
+ * mapping wizard's, which stops everything while a pad is mapped. START in play is PRESSED for the pad's seat (`press`).
159
+ * `resume` names the seat whose START asks it — the wizard's own resume is seat 0's, whose quick pause `pause` opened —, because
160
+ * the root decides whether that seat's START reaches this screen's pause: on a shared screen only the first seat's does
161
+ * (ADR-0144, erratum of 2026-09-26).
162
+ */
163
+ pause: () => void;
164
+ resume: (seat: number) => void;
165
+ /** Demonstration (attract) mode. */
151
166
  isAttractActive: () => boolean;
152
167
  stopAttract: () => void;
153
- /** Controles virtuais de toque — somem no primeiro input físico. */
168
+ /** On-screen touch controls — they vanish on the first physical input. */
154
169
  isTouchMode: () => boolean;
155
170
  hideTouchControls: () => void;
156
- /** Estado vivo de jogadores/telas (core/state.ts, injetado como getter — nunca cacheado por este módulo). */
171
+ /** Live state of players/screens (injected as a getter — never cached by this module). */
157
172
  getPlayers: () => GamepadPlayer[];
158
173
  getNumPlayers: () => number;
159
- /** Navegação de menus (game.js): título, diálogo compartilhado (o de cima), e a pausa por tela. */
174
+ /** Menu navigation: the title, the shared dialog (the topmost), and the pause per screen. */
160
175
  navTitle: (k: NavKeys) => void;
161
- /** A tela `i` está no modo `accessibility`? (ADR-0044, item 7 — o direcional dirige a barra do HUD.) */
162
- naBarraDe: (i: number) => boolean;
163
- /** Um passo dentro da barra. `temStart` é a borda do botão de pausa, que é a SEGUNDA saída do modo. */
164
- navBar: (i: number, k: NavKeys, temStart: boolean) => void;
176
+ /** Is screen `i` in `accessibility` mode? (ADR-0044, item 7 — the d-pad steers the HUD bar.) */
177
+ onBar: (i: number) => boolean;
178
+ /** One step inside the bar. `hasStart` is the pause button's edge, which is the mode's SECOND exit. */
179
+ navBar: (i: number, k: NavKeys, hasStart: boolean) => void;
165
180
  sharedDialogOpen: () => HTMLElement | null;
166
181
  navDialog: (dlg: HTMLElement, k: NavKeys) => void;
167
- /** A tela de pausa do jogador. `HTMLElement` e não `{ hidden: boolean }`: o mínimo estrutural funciona
168
- * para LER, mas este módulo REPASSA o menu para `navPause`, que precisa do elemento inteiro — e em
169
- * posição de parâmetro a fatia mínima se inverte (ADR-0039). Mesma lição do `held` em audio-nav. */
182
+ /**
183
+ * Does this seat's pad steer the menus open on this screen — the dialog on top and the pause card? On a screen several players
184
+ * share, only the first's does (ADR-0144, erratum of 2026-09-26): another seat's d-pad and buttons move, press and close
185
+ * nothing there. Absent: every seat's does — each has a screen of her own. The same question `ui/menu-nav` asks of a key.
186
+ */
187
+ leadsTheScreen?: (seat: number) => boolean;
188
+ /** The player's pause screen. `HTMLElement` and not `{ hidden: boolean }`: the structural minimum works for READING,
189
+ * but this module HANDS the menu to `navPause`, which needs the whole element — and in parameter position the
190
+ * minimal slice inverts (ADR-0039). */
170
191
  getPauseMenu: (playerIndex: number) => HTMLElement | null | undefined;
171
192
  navPause: (menu: HTMLElement, playerIndex: number, k: NavKeys) => void;
172
- /** Qual jogador abre o submenu de a11y em seguida (game.js's `pauseActor`). */
193
+ /** Which player opens the accessibility submenu next. */
173
194
  setPauseActor: (playerIndex: number) => void;
174
195
  /**
175
- * ESTA ARESTA É DESTE JOGADOR, E VEIO DO CONTROLE (ADR-0113 cláusula 4, issue #127).
196
+ * THIS EDGE IS THIS PLAYER'S, AND IT CAME FROM THE PAD (ADR-0113 clause 4, issue #127).
176
197
  *
177
- * 🔴 OBRIGATÓRIO, e a razão foi medida em 2026-09-09: `input/state.arestaDoJogador` tinha ZERO chamadores
178
- * em produção, logo `entradaDe(i).emUso` respondia `teclado` a toda a gente — e a alternância lida era a do
179
- * teclado mesmo com o controle na mão. 📌 Passe `criarArestaComAlternancia(() => players)` de
180
- * `input/latch-edge`, e não o cru: é ela que também resolve a alternância deste aparelho no jogador.
198
+ * 🔴 REQUIRED: without it the input state's `playerEdge` has no caller for the pad, so `inputOf(i).inUse` answers
199
+ * `teclado` for everyone — and the latch read is the keyboard's even with the pad in hand. 📌 The latch is resolved where the
200
+ * pad's press lands: the root's virtual controller tells `pressedBy`, which records this edge through `input/latch-edge` too,
201
+ * so the root passes the raw one here. A host whose `press` does not reach such a door passes
202
+ * `createLatchedEdge(() => players, { store, input, holdsKeys })` instead.
181
203
  *
182
- * ⚠️ O gamepad era o ÚNICO transporte que sobrevivia identificável sem isto — ele nunca passou pelo
183
- * conjunto de teclas, passa por `padCur` —, e é exactamente por isso que a falta aqui era invisível: o
184
- * módulo sabe de que controle veio a aresta, e o autómato não.
204
+ * ⚠️ The gamepad is the transport that stays identifiable without the key set — it goes through `padCur` —, and that
205
+ * is exactly why a gap here is invisible: the module knows which pad the edge came from, and the automaton does not.
206
+ */
207
+ playerEdge: (player: number, origin: 'gamepad') => void;
208
+ /**
209
+ * THE SINGLE DOOR TO THE CARTRIDGE (ADR-0223): press a POSITION on this pad's seat. Answers whether the press reached
210
+ * the GAME — `false` means a menu took it.
211
+ *
212
+ * 🔴 Edges alone are not a door: a cartridge that listens only to `onCommand` — which ADR-0111's erratum asks of
213
+ * everyone — would not answer a pad. The edges stay (a cartridge's physics learns from them that there was a press),
214
+ * but they are the CONSEQUENCE of a press that reached the game.
215
+ *
216
+ * 📌 REQUIRED, and ADR-0223's erratum says why: an optional door is one more field a game can forget, and forgetting
217
+ * it brings back the silence this work exists to end. The root passes its virtual controller's `press`.
218
+ */
219
+ press: (action: ActionKey | 'start' | 'select', source: 'gamepad', player: number) => boolean;
220
+ /** Release the POSITION. The controller lets go of the key it held and delivers the release — only for a press the game heard. */
221
+ release: (action: ActionKey, source: 'gamepad', player: number) => void;
222
+ /**
223
+ * ONE BUTTON ONLY (ADR-0218 §4): asked once per frame in which a button of a pad WENT DOWN — a position, START or SELECT.
224
+ * `true`: one-button scanning took it as «take the one shown», and nothing else of that pad's frame happens. It is the question
225
+ * the virtual controller asks of every press (`takeShown` there); the pad asks it too because it also steers the pause card,
226
+ * a panel, the quick bar and the title, and opens and leaves the pause, by itself and without pressing a position.
227
+ * Absent: every press is itself.
185
228
  */
186
- arestaDoJogador: (jogador: number, origem: 'gamepad') => void;
229
+ takeShown?: () => boolean;
187
230
  /**
188
- * MODAL do PRÓPRIO jogador: a engine entrega a INTENÇÃO, o jogo decide (ADR-0033).
231
+ * The player's OWN modal: the engine delivers the INTENT, the game decides (ADR-0033).
189
232
  *
190
- * Eram quatro — `quizMove(p, delta)`, `quizConfirm`, `quizErase`, `announceBraille` — e as quatro existiam
191
- * porque a decisão de qual chamar morava aqui, com a grade de três colunas e o desvio de Braille. O pad e
192
- * o teclado tinham CÓPIAS dessa mesma decisão, o que é a pior forma de tê-la: duas para divergir.
233
+ * One intent and not four verbs (move, confirm, erase, announce Braille): with the verbs, the decision of which to
234
+ * call lived here, with the three-column grid and the Braille detour — and the pad and the keyboard each had a COPY
235
+ * of it, which is the worst way to have it: two to drift apart.
193
236
  */
194
- /** O ÍNDICE do jogador, não o jogador (ADR-0033/0039): a engine entrega intenção e não precisa saber o
195
- * que é um jogador com desafio aberto. Quem resolve o índice é o dono do desafio. */
237
+ /** The player's INDEX, not the player (ADR-0033/0039): the engine delivers an intent and does not need to know what a
238
+ * player with an open challenge is. The challenge's owner resolves the index. */
196
239
  modalInput: (playerIndex: number, intent: ModalIntent) => void;
197
- /** Este jogador tem um modal aberto? Uma pergunta, e não o objeto do jogo. */
240
+ /** Does this player have a modal open? A question, and not the game's object. */
198
241
  hasModal: (playerIndex: number) => boolean;
199
- /** Entra num jogo em andamento com uma tela nova (game.js's joinPlayer). */
242
+ /** Joins a running game with a new screen. */
200
243
  joinPlayer: (padIndex: number) => boolean;
201
- /** Recomeça só a tela deste jogador (game.js's respawnPlayer). */
244
+ /** Restarts only this player's screen. */
202
245
  respawnPlayer: (playerIndex: number) => void;
203
- /** Remove o selo "aguardando" da tela quando ela ganha um controle (parte do HUD, game.js). */
246
+ /** Removes the screen's "waiting" badge when it gets a pad (part of the game's HUD). */
204
247
  clearWaitingBadge: (playerIndex: number) => void;
248
+ /** The game's demonstration of each wizard step (`GamepadGameHooks.wizardStep`). */
249
+ wizardStep: (position: string | null) => void;
250
+ /** One tick of the wizard's clock for that demonstration (`GamepadGameHooks.wizardTick`). */
251
+ wizardTick: () => void;
205
252
  /**
206
- * Caminho-base dos sprites usado pela demo animada do wizard. NOTA — bug encontrado, não corrigido: o
207
- * game.js original referencia um identificador `SPR` que NUNCA é declarado/importado ali (só existe, sem
208
- * export, em render/sprites.ts) — `padWizDemo`/`padWizDemoTick` lançam ReferenceError em runtime assim que
209
- * o wizard mostra qualquer demonstração animada (inclusive ao abrir: `padWizDemo(null)` já cai no ramo que lê
210
- * `SPR`). Fica como dependência EXPLÍCITA aqui em vez de reproduzir o global inexistente — ver retorno da tarefa.
253
+ * THIS TRANSPORT'S OWN WIZARD HAS CLOSED (ADR-0248), whichever way it ended — saved, cancelled, or closed by the root. Called
254
+ * once per close, AFTER `#padwiz` is hidden and after the resume of a game the wizard paused, so whoever owns the focus
255
+ * returns it to what is really in front. The root answers by giving the focus back to whoever held it when the wizard
256
+ * opened (`overlays.restoreFocus('padwiz')`).
257
+ * 🔴 REQUIRED (ADR-0248, as ADR-0224 did for the door): the code that knows the wizard ended is this module, the code that owns
258
+ * the focus is the root — an optional port is one more field a game can forget, and forgetting it drops a screen-reader
259
+ * child's focus on `<body>`.
211
260
  */
212
- spriteBase: string;
261
+ wizardClosed: () => void;
213
262
  }
214
263
  export interface GamepadApi {
215
264
  pollPads(): void;
@@ -218,7 +267,8 @@ export interface GamepadApi {
218
267
  closePadWiz(save: boolean): void;
219
268
  padWizTick(): void;
220
269
  padMapFor(id: string): PadMap | null;
221
- /** Estado vivo do wizard (para expor via `get padWiz(){}` no window.__incl, como o game.js original). */
270
+ /** The wizard's live state (`null` = closed). */
222
271
  getPadWiz(): WizState | null;
223
272
  }
224
273
  export declare function initGamepad(ctx: GamepadCtx): GamepadApi;
274
+ export {};