@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,28 +1,40 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
- import { type JogadorDaAlternancia } from './latch-sync.js';
3
- import type { ArmazemDaAlternancia } from './latch-store.js';
4
- import type { Transporte } from './transporte-em-uso.js';
5
- export interface ArestaComAlternanciaOpts {
2
+ import { type LatchPlayer } from './latch-sync.js';
3
+ import type { LatchStore } from './latch-store.js';
4
+ import type { TransportName } from './transport-in-use.js';
5
+ import type { LiveInput } from './state.js';
6
+ export interface LatchedEdgeOptions {
6
7
  /**
7
- * O armazenamento. Injectável **para o gate**, e com padrão para o consumidor não poder esquecê-lo.
8
- *
9
- * ⚠️ Padrão e não campo obrigatório, e a razão é a mesma do `ui/pause-icons`: um armazém injectado é uma
10
- * coisa que um cartucho pode omitir, e omiti-la faria a criança perder a escolha guardada — em silêncio, e
11
- * só naquele jogo.
8
+ * The input state whose transport automaton records the edge — the root's (`Engine.input`, ADR-0232 D4). REQUIRED: an
9
+ * edge recorded in another root's state would move THAT root's latch, and this child's would never follow the device.
12
10
  */
13
- readonly armazem?: ArmazemDaAlternancia;
14
- /** O padrão de fábrica. `DEFAULTS.toggleMove`, e não `false` escrito à mão: há UMA fonte (ADR-0029). */
15
- readonly padrao?: boolean;
11
+ readonly input: Pick<LiveInput, 'playerEdge' | 'inputOf'>;
12
+ /**
13
+ * The page's store, built by the root (ADR-0232, issue #207). REQUIRED, and the reason is the one that once gave it a
14
+ * default: omitting it would make the child lose their stored choice — in silence, and only in that game. The compiler
15
+ * now refuses the omission instead of a default reaching the page's one `localStorage` underneath the host.
16
+ */
17
+ readonly store: LatchStore;
18
+ /** The factory default. `DEFAULTS.toggleMove`, not a hand-written `false`: there is ONE source (ADR-0029). */
19
+ readonly byDefault?: boolean;
20
+ /**
21
+ * DOES THE MOUNTED GAME HOLD ANY KEY NOW? — `GameDeclaration.holdsKeys` (ADR-0249), the latch's default on eyes, face,
22
+ * gestures and speech. A FUNCTION, called at every edge: a game changes its answer between stages (ADR-0084), and the
23
+ * next command must follow the stage it lands in. REQUIRED, like `holdsKeys` itself: `true` latches a quiz's every word,
24
+ * `false` stops a platform game's «direita» after one step, so no default is safe.
25
+ */
26
+ readonly holdsKeys: () => boolean;
16
27
  }
17
28
  /**
18
- * DEVOLVE O `arestaDoJogador` QUE TAMBÉM RESOLVE A ALTERNÂNCIA — para passar a `initKeydown` e a
19
- * `initTouchBindings` no lugar do cru.
29
+ * RETURNS THE `playerEdge` THAT ALSO RESOLVES THE TOGGLE. The root calls it from the virtual controller's `pressedBy`, the one
30
+ * door every transport's press goes through (ADR-0109 rule 3); a host without that door hands it to `initKeydown`,
31
+ * `initTouchBindings` and `initGamepad` in place of the raw one.
20
32
  *
21
- * ⚠️ RESOLVE CONTRA `entradaDe(jogador).emUso` E NÃO CONTRA `origem`, e a distinção é de desenho e não de
22
- * comportamento: hoje o `aposAresta` põe sempre `emUso = origem`, logo trocar uma pela outra é uma mutação
23
- * EQUIVALENTE — está registada como tal no gate, em vez de fingir cobertura. O que a escolha compra é o
24
- * futuro: quem decide que aparelho está em uso é o autómato, e o dia em que ele ganhar uma regra que RECUSE
25
- * uma aresta (um falso positivo da webcam a ser filtrado, por exemplo) esta linha segue-o sem ser editada.
26
- * Ler `origem` seria uma segunda resposta à pergunta que o `input/transporte-em-uso` existe para responder.
33
+ * ⚠️ IT RESOLVES AGAINST `inputOf(player).inUse` AND NOT `origin`, a difference of design and not of behaviour: today the
34
+ * edge always sets in-use to the origin, so swapping one for the other is an EQUIVALENT mutation — recorded as such in the
35
+ * gate, instead of pretending coverage. What the choice buys is the future: the state machine decides which device is in
36
+ * use, and the day it gains a rule that REFUSES an edge (a webcam false positive being filtered, say) this line follows
37
+ * it without being edited. Reading `origin` would be a second answer to the question `input/transport-in-use` exists to
38
+ * answer.
27
39
  */
28
- export declare function criarArestaComAlternancia(getPlayers: () => readonly (JogadorDaAlternancia | null | undefined)[], opts?: ArestaComAlternanciaOpts): (jogador: number, origem: Transporte) => void;
40
+ export declare function createLatchedEdge(getPlayers: () => readonly (LatchPlayer | null | undefined)[], opts: LatchedEdgeOptions): (player: number, origin: TransportName) => void;
@@ -1,45 +1,44 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
- // input/latch-edge.ts — A ARESTA E A ALTERNÂNCIA, NUMA FUNÇÃO SÓ (ADR-0113, issue #127).
2
+ // input/latch-edge.ts — THE EDGE AND THE TOGGLE, IN ONE FUNCTION (ADR-0113, issue #127).
3
3
  //
4
- // ========================= POR QUE O PAR NÃO PODE SEPARAR-SE =========================
5
- // Registar de que aparelho veio a aresta e resolver a alternância desse aparelho são duas metades de UM
6
- // acontecimento: a criança mudou de controle. Feitas em sítios diferentes, a segunda pode faltar — e o
7
- // resultado é a forma de defeito que este projecto já pagou várias vezes: o autómato sabe que ela pegou no
8
- // controle, e o jogo continua a andar com a alternância do teclado. Sem erro, e só ela dá por isso.
4
+ // ========================= WHY THE PAIR CANNOT SPLIT =========================
5
+ // Recording which device an edge came from and resolving that device's toggle are two halves of ONE event: the child
6
+ // changed controls. Done in different places, the second can go missing — the kind of defect this project has paid for
7
+ // several times: the state machine knows they picked up the pad, and the game keeps moving with the keyboard's toggle.
8
+ // No error, and only the child notices.
9
9
  //
10
- // 📌 É o mesmo movimento do `consumir` no `ui/menu-nav` («uma função só para o par nunca se separar») e da
11
- // escrita dupla no `ui/settings-motor`.
10
+ // 📌 The same move as the menu navigation's "one function so the pair never splits", and the double write in
11
+ // `ui/settings-mobility`.
12
12
  //
13
- // ⚠️ E É UMA FÁBRICA, NÃO UM CAMPO NOVO NO CONTEXTO DE CADA MÓDULO DE ENTRADA. O `input/keydown` e o
14
- // `input/touch-bindings` já recebem `arestaDoJogador(jogador, origem)`; esta função devolve uma com essa
15
- // mesma assinatura, e por isso a fiação passa a estar certa sem nenhum dos dois saber que a alternância
16
- // existe. Um segundo campo obrigatório em dois contextos seria mais superfície pública, mais uma coisa que um
17
- // cartucho pode esquecer, e a mesma pergunta feita duas vezes.
18
- import * as store from '../platform/storage.js';
19
- import { DEFAULTS } from '../core/state.js';
20
- import { arestaDoJogador, entradaDe } from './state.js';
21
- import { sincronizarAlternancia } from './latch-sync.js';
13
+ // ⚠️ AND IT IS A FACTORY, NOT A NEW FIELD IN EVERY INPUT MODULE'S CONTEXT. The keyboard and touch transports already
14
+ // receive `playerEdge(player, origin)`; this returns one with that same signature, so the wiring is right without either
15
+ // of them knowing the toggle exists. A second required field in two contexts would be more public surface, one more
16
+ // thing a cartridge can forget, and the same question asked twice.
17
+ import { DEFAULTS } from '../core/setting-defaults.js';
18
+ import { syncLatch } from './latch-sync.js';
22
19
  /**
23
- * DEVOLVE O `arestaDoJogador` QUE TAMBÉM RESOLVE A ALTERNÂNCIA — para passar a `initKeydown` e a
24
- * `initTouchBindings` no lugar do cru.
20
+ * RETURNS THE `playerEdge` THAT ALSO RESOLVES THE TOGGLE. The root calls it from the virtual controller's `pressedBy`, the one
21
+ * door every transport's press goes through (ADR-0109 rule 3); a host without that door hands it to `initKeydown`,
22
+ * `initTouchBindings` and `initGamepad` in place of the raw one.
25
23
  *
26
- * ⚠️ RESOLVE CONTRA `entradaDe(jogador).emUso` E NÃO CONTRA `origem`, e a distinção é de desenho e não de
27
- * comportamento: hoje o `aposAresta` põe sempre `emUso = origem`, logo trocar uma pela outra é uma mutação
28
- * EQUIVALENTE — está registada como tal no gate, em vez de fingir cobertura. O que a escolha compra é o
29
- * futuro: quem decide que aparelho está em uso é o autómato, e o dia em que ele ganhar uma regra que RECUSE
30
- * uma aresta (um falso positivo da webcam a ser filtrado, por exemplo) esta linha segue-o sem ser editada.
31
- * Ler `origem` seria uma segunda resposta à pergunta que o `input/transporte-em-uso` existe para responder.
24
+ * ⚠️ IT RESOLVES AGAINST `inputOf(player).inUse` AND NOT `origin`, a difference of design and not of behaviour: today the
25
+ * edge always sets in-use to the origin, so swapping one for the other is an EQUIVALENT mutation — recorded as such in the
26
+ * gate, instead of pretending coverage. What the choice buys is the future: the state machine decides which device is in
27
+ * use, and the day it gains a rule that REFUSES an edge (a webcam false positive being filtered, say) this line follows
28
+ * it without being edited. Reading `origin` would be a second answer to the question `input/transport-in-use` exists to
29
+ * answer.
32
30
  */
33
- export function criarArestaComAlternancia(getPlayers, opts = {}) {
34
- const armazem = opts.armazem ?? store;
35
- const padrao = opts.padrao ?? DEFAULTS.toggleMove;
36
- return (jogador, origem) => {
37
- arestaDoJogador(jogador, origem);
38
- // 📌 O JOGADOR PODE NÃO EXISTIR — uma tela em espera, um assento que ainda não entrou —, e isso não torna
39
- // a aresta inválida: o transporte em uso é facto sobre a ENTRADA e fica registado à mesma. O que não
40
- // acontece é a segunda metade, porque não há onde a escrever.
41
- const p = getPlayers()[jogador];
31
+ export function createLatchedEdge(getPlayers, opts) {
32
+ const latchStore = opts.store;
33
+ const { playerEdge, inputOf } = opts.input;
34
+ const fallback = opts.byDefault ?? DEFAULTS.toggleMove;
35
+ return (player, origin) => {
36
+ playerEdge(player, origin);
37
+ // 📌 THE PLAYER MAY NOT EXIST — a waiting screen, a seat not joined yet — and that does not make the edge invalid:
38
+ // the transport in use is a fact about the INPUT and is recorded all the same. What does not happen is the second
39
+ // half, because there is nowhere to write it.
40
+ const p = getPlayers()[player];
42
41
  if (p)
43
- sincronizarAlternancia(p, armazem, jogador, entradaDe(jogador).emUso, padrao);
42
+ syncLatch(p, latchStore, player, inputOf(player).inUse, { byDefault: fallback, gameHoldsKeys: opts.holdsKeys() });
44
43
  };
45
44
  }
@@ -1,70 +1,71 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  /**
3
- * Os transportes que emitem UM COMANDO DE CADA VEZ, e em que a alternância está sempre ligada.
3
+ * The transports that emit ONE COMMAND AT A TIME, on which the latch's default is the game's `holdsKeys()` (ADR-0249).
4
4
  *
5
- * Os nomes são os que a barra rápida já usa para os ícones (`face`, `eyes`, `voice`), mais `gestos`, que é o
6
- * quarto que o ADR-0104 §C nomeia. Ficam em português como o resto do vocabulário de transporte
7
- * (`teclado`, `toque`) — `transportesPadrao` já mistura, e mudar isso é outra conversa.
5
+ * The values are transport names, which stay Portuguese like the rest of that vocabulary (`teclado`, `toque`): they are
6
+ * stored, and renaming a stored value loses what the child saved.
8
7
  */
9
- export declare const UM_COMANDO_DE_CADA_VEZ: ReadonlySet<string>;
8
+ export declare const ONE_COMMAND_AT_A_TIME: ReadonlySet<string>;
10
9
  /**
11
- * Neste transporte a alternância está sempre ligada?
10
+ * Does this transport's latch start where the GAME says (ADR-0249)?
12
11
  *
13
- * ⚠️ «Sempre ligada» e «ligada por omissão» são coisas diferentes, e a diferença é a que o ADR-0104 §C faz:
14
- * um padrão pode ser mudado, e mudá-lo aqui deixaria o controle inutilizável. Por isso o valor guardado nem
15
- * chega a ser lido nestes transportes — ver `alternanciaDe`.
12
+ * `true` on the four one-command transports: with nothing stored for them, the latch is the game's `holdsKeys()`. The
13
+ * option is offered on every transport alike; this answers only where the default comes from.
16
14
  */
17
- export declare function alternanciaSempreLigada(transporte: string): boolean;
15
+ export declare function latchDefaultFromGame(transport: string): boolean;
18
16
  /**
19
- * A opção deve ser OFERECIDA para este transporte?
17
+ * The toggle's storage key, with the transport in its name.
20
18
  *
21
- * O contrário de `alternanciaSempreLigada`, e existe com nome próprio porque quem pergunta é outro: um
22
- * chama para decidir o estado, o outro para decidir se desenha o botão. Um painel que desenhasse o botão e
23
- * ignorasse o clique seria pior do que não o desenhar.
24
- */
25
- export declare function alternanciaEhEscolha(transporte: string): boolean;
26
- /**
27
- * A chave de armazenamento da alternância, agora com o transporte no nome.
19
+ * ⚠️ A FUNCTION, and not concatenation at the call site, for the reason `platform/storage` gives for the per-player keys:
20
+ * as a function, no call site can write a crooked name. Not a hypothesis — the mobility panel once rewrote the per-player
21
+ * key by hand, with a comment beside it saying it matched storage's. Two copies of a name change one at a time.
28
22
  *
29
- * ⚠️ FUNÇÃO, e não concatenação no ponto de uso, pela razão que o `platform/storage` já escreveu sobre as
30
- * chaves por jogador: «virar função aqui é o que impede que um deles escreva num nome torto». Não é
31
- * hipótese — o `ui/settings-motor` reescrevia `'incl_togglerun_p' + i` à mão, com um comentário ao lado a
32
- * dizer «== toggleRunP de platform/storage». Duas cópias de um nome mudam uma de cada vez.
33
- *
34
- * `base` é `togglemove` ou `togglerun`, os dois nomes que já existem no armazenamento da criança.
23
+ * `base` is `togglemove` or `togglerun`, the two names that already exist in the child's storage.
35
24
  */
36
- export declare function chaveDaAlternancia(base: string, jogador: number, transporte: string): string;
25
+ export declare function latchKey(base: string, player: number, transport: string): string;
37
26
  /**
38
- * A chave ANTIGA, por jogador e sem transporte. Continua a ser lida, e nunca mais escrita.
27
+ * The OLD key, per player and without a transport. Still read, never written again.
28
+ *
29
+ * ⚠️ IT IS INHERITED BY THE KEYBOARD, THE PAD AND TOUCH, and the choice takes a sentence to explain. The old value was set
30
+ * by the child in some context, and there is no way to know which — the key did not record it, which is the defect. The
31
+ * ways out were three: lose their setting, guess a transport, or inherit for all. Inheriting is the only one that takes
32
+ * nothing from whoever depends on the setting, and the leak it keeps lasts only until the child touches the setting once
33
+ * on each device. Losing the setting would cost more, and to whoever can least afford it.
39
34
  *
40
- * ⚠️ ELA HERDA PARA TODOS OS TRANSPORTES, e a escolha custa uma frase a explicar. O valor velho foi posto
41
- * pela criança nalgum contexto, e não há como saber qual — a chave não o registava, que é o defeito. As
42
- * saídas eram três: perder o ajuste dela, adivinhar um transporte, ou herdar para todos. Herdar para todos é
43
- * a única que não tira nada a quem depende do ajuste, e o vazamento que ela mantém dura só até a criança
44
- * mexer no assunto uma vez em cada aparelho. Perder o ajuste custaria mais, e a quem menos pode pagar.
35
+ * 📌 NOT BY THE FOUR ONE-COMMAND TRANSPORTS (ADR-0249): there the default is the game's answer, and a value the child set
36
+ * on the keyboard is not a choice about how a spoken word or a look should behave in this game.
45
37
  *
46
- * É também o padrão que este repositório já escolheu para este mesmo valor: o `KEYS.toggleMoveLegacy` existe
47
- * desde a migração anterior, e a nota do `platform/storage` diz porquê — «a chave velha fica onde está: é
48
- * dado da criança, não meu para apagar, e a sua permanência é o que torna um retorno possível».
38
+ * It is also the pattern this repository chose for this same value before: the old key stays where it is — it is the
39
+ * child's data, not mine to delete, and keeping it is what makes a way back possible.
49
40
  */
50
- export declare function chaveLegadaDaAlternancia(base: string, jogador: number): string;
51
- /** O que se sabe ao resolver a alternância de um transporte. */
52
- export interface LeituraDaAlternancia {
53
- /** O que está guardado para ESTE transporte. `null` = nunca foi escrito. */
54
- readonly doTransporte: boolean | null;
55
- /** O que está guardado na chave antiga, sem transporte. `null` = nunca foi escrito. */
56
- readonly doLegado: boolean | null;
57
- /** O padrão de fábrica (`DEFAULTS.toggleMove` / `DEFAULTS.toggleRun`). */
58
- readonly padrao: boolean;
41
+ export declare function legacyLatchKey(base: string, player: number): string;
42
+ /** What is known when resolving a transport's toggle. */
43
+ export interface LatchReading {
44
+ /** What is stored for THIS transport. `null` = never written. */
45
+ readonly fromTransport: boolean | null;
46
+ /** What is stored under the old key, without a transport. `null` = never written. */
47
+ readonly fromLegacy: boolean | null;
48
+ /** The factory default (`DEFAULTS.toggleMove` / `DEFAULTS.toggleRun`). */
49
+ readonly byDefault: boolean;
50
+ /**
51
+ * THE GAME'S ANSWER, NOW: `GameDeclaration.holdsKeys()` (ADR-0249). The default on the one-command transports.
52
+ *
53
+ * ⚠️ READ WHEN THE LATCH IS RESOLVED, not once at boot: a game changes it between stages (ADR-0084), and a latch resolved
54
+ * from a stale answer would keep a quiz stage latched because the stage before it held keys. REQUIRED, like `holdsKeys`
55
+ * itself: both values can be wrong, so there is no safe default to fall back on.
56
+ */
57
+ readonly gameHoldsKeys: boolean;
59
58
  }
59
+ /** The two defaults a resolution needs from outside storage — the factory's and the game's. */
60
+ export type LatchDefaults = Pick<LatchReading, 'byDefault' | 'gameHoldsKeys'>;
60
61
  /**
61
- * A alternância deste transporte, resolvida.
62
+ * This transport's toggle, resolved.
62
63
  *
63
- * A ordem é: transporte de um comando → SEMPRE ligada, e nem se lê o resto · valor deste transporte · valor
64
- * legado · padrão de fábrica.
64
+ * The order: this transport's stored value · on a one-command transport, the game's `holdsKeys()` · the legacy value ·
65
+ * the factory default.
65
66
  *
66
- * ⚠️ O TRANSPORTE DE UM COMANDO VEM PRIMEIRO, e não por atalho: se ele lesse o guardado primeiro, uma
67
- * criança que tivesse desligado a alternância no teclado herdaria esse `false` pelo legado e ficaria com um
68
- * controle de olhar que não responde — o pior defeito possível, no controle de quem tem menos alternativas.
67
+ * ⚠️ THE STORED VALUE COMES FIRST ON EVERY TRANSPORT (ADR-0249): the child's choice for this device wins over any default,
68
+ * including the game's. And a stored `false` is a VALUE, not an absence — the `!== null` is what keeps a latch the child
69
+ * turned off from coming back by itself.
69
70
  */
70
- export declare function alternanciaDe(transporte: string, l: LeituraDaAlternancia): boolean;
71
+ export declare function latchOf(transport: string, l: LatchReading): boolean;
@@ -1,110 +1,89 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
- // input/latch-scope — A ALTERNÂNCIA É DE UM TRANSPORTE, e não da criança (ADR-0104 §C, issue #114).
2
+ // input/latch-scope — THE TOGGLE BELONGS TO A TRANSPORT, not to the child (ADR-0104 §C, issue #114).
3
3
  //
4
- // ========================= O DEFEITO QUE ISTO CONSERTA, E ELE NÃO TINHA NOME =========================
5
- // «Segurar vira alternar» estava guardado POR JOGADOR — `incl_togglemove_p0` —, o que quer dizer: por
6
- // pessoa, e para todos os aparelhos ao mesmo tempo. Uma criança que liga a alternância no controle de TELA,
7
- // porque num botão virtual ninguém segura com conforto, liga-a também no teclado, onde segurar uma tecla é
8
- // exactamente o que ela sabe fazer. Ela não pediu isso e nada lho diz.
4
+ // ========================= THE DEFECT THIS FIXES, WHICH HAD NO NAME =========================
5
+ // "Holding becomes toggling" was stored PER PLAYER — `incl_togglemove_p0` — that is: per person, and for every device
6
+ // at once. A child who turns the toggle on for the on-screen pad, because nobody holds a virtual button comfortably,
7
+ // turns it on for the keyboard too, where holding a key is exactly what they can do. They did not ask for that and
8
+ // nothing tells them.
9
9
  //
10
- // ⚠️ E O REPOSITÓRIO JÁ CONHECIA O DEFEITO SEM O NOMEAR: o `core/state` traz a nota «a alternância do botão
11
- // de CORRER nasce desligada de FÁBRICA — e liga sozinha no controle de tela, que é CONTEXTO e não escolha».
12
- // Contexto é precisamente a palavra: o valor depende do aparelho em que a criança está. Guardá-lo por pessoa
13
- // obrigava a distinguir «ligou porque quis» de «ligou porque é toque» com uma marca à parte (o ADR-0029), e
14
- // essa marca existia para compensar uma chave que estava no escopo errado.
10
+ // ⚠️ AND THE REPOSITORY ALREADY KNEW THE DEFECT WITHOUT NAMING IT: the run toggle is born off at the factory and switches
11
+ // itself on with the on-screen pad, which is CONTEXT and not choice. Context is exactly the word: the value depends on
12
+ // the device the child is on. Keeping it per person forced a separate mark (ADR-0029) to tell "turned on because they
13
+ // wanted" from "turned on because it is touch" — a mark compensating for a key in the wrong scope.
15
14
  //
16
- // O mapeamento de teclas já se guarda por transporte, e sempre se guardou. Esta é a mesma coisa.
15
+ // The key mapping is already kept per transport, and always was. This is the same thing.
17
16
  //
18
- // ========================= E PARA QUATRO TRANSPORTES ELA NÃO É ESCOLHA NENHUMA =========================
19
- // ⚠️ Olhos, rosto, gestos e fala emitem UM COMANDO DE CADA VEZ. Não há como olhar para a esquerda e para o
20
- // botão de pular ao mesmo tempo; não há como dizer duas palavras em simultâneo. Neles a alternância não é
21
- // preferência — é a única forma de o controle funcionar, e oferecê-la como opção seria oferecer a uma
22
- // criança a escolha de um controle que não funciona.
17
+ // ========================= ON FOUR TRANSPORTS THE GAME SETS THE DEFAULT (ADR-0249) =========================
18
+ // Eyes, face, gestures and speech emit ONE COMMAND AT A TIME: a word or a look is a tap, never a hold. Whether that tap
19
+ // should keep going is the GAME's to say — in a platform game «direita» keeps the character walking, in a quiz «abaixo»
20
+ // moves the cursor once — and the game already says it: `GameDeclaration.holdsKeys()`. So on these four the latch STARTS
21
+ // as the game answers, and the child's stored choice for that transport, when there is one, wins (ADR-0104 §C: a default
22
+ // is not a lock). Keyboard, pad and touch keep the factory default and the legacy inheritance below.
23
23
  //
24
- // Isto resolve, de passagem, uma tensão que o ADR-0084 tinha contra a sua própria regra «valor salvo
25
- // significa escolha»: a alternância a ligar-se sozinha na webcam era uma excepção àquela regra. Deixa de
26
- // ser, porque nestes transportes ela nunca foi um valor salvo — é uma propriedade do transporte.
27
- //
28
- // ⚠️ OS QUATRO AINDA NÃO EXISTEM COMO TRANSPORTE, e a regra fica escrita à mesma. Medido em 2026-09-08: o
29
- // `transportesPadrao` devolve três (gamepad, teclado, toque), e o `ui/webcam` sintetiza `KeyboardEvent` — do
30
- // ponto de vista da engine, ele É o teclado. Os três ícones da barra rápida dizem-no: `face`, `eyes` e
31
- // `voice` estão marcados `soon`. Escrever a regra agora custa nada e faz com que eles cheguem COBERTOS, em
32
- // vez de chegarem a uma excepção que alguém terá de se lembrar de abrir.
33
- //
34
- // Módulo-folha: não importa nada, nem sequer o `platform/storage` cujas chaves ele monta.
24
+ // A leaf module: it imports nothing, not even the `platform/storage` whose keys it builds.
35
25
  /**
36
- * Os transportes que emitem UM COMANDO DE CADA VEZ, e em que a alternância está sempre ligada.
26
+ * The transports that emit ONE COMMAND AT A TIME, on which the latch's default is the game's `holdsKeys()` (ADR-0249).
37
27
  *
38
- * Os nomes são os que a barra rápida já usa para os ícones (`face`, `eyes`, `voice`), mais `gestos`, que é o
39
- * quarto que o ADR-0104 §C nomeia. Ficam em português como o resto do vocabulário de transporte
40
- * (`teclado`, `toque`) — `transportesPadrao` já mistura, e mudar isso é outra conversa.
28
+ * The values are transport names, which stay Portuguese like the rest of that vocabulary (`teclado`, `toque`): they are
29
+ * stored, and renaming a stored value loses what the child saved.
41
30
  */
42
- export const UM_COMANDO_DE_CADA_VEZ = new Set(['olhos', 'rosto', 'gestos', 'fala']);
31
+ export const ONE_COMMAND_AT_A_TIME = new Set(['olhos', 'rosto', 'gestos', 'fala']);
43
32
  /**
44
- * Neste transporte a alternância está sempre ligada?
33
+ * Does this transport's latch start where the GAME says (ADR-0249)?
45
34
  *
46
- * ⚠️ «Sempre ligada» e «ligada por omissão» são coisas diferentes, e a diferença é a que o ADR-0104 §C faz:
47
- * um padrão pode ser mudado, e mudá-lo aqui deixaria o controle inutilizável. Por isso o valor guardado nem
48
- * chega a ser lido nestes transportes — ver `alternanciaDe`.
35
+ * `true` on the four one-command transports: with nothing stored for them, the latch is the game's `holdsKeys()`. The
36
+ * option is offered on every transport alike; this answers only where the default comes from.
49
37
  */
50
- export function alternanciaSempreLigada(transporte) {
51
- return UM_COMANDO_DE_CADA_VEZ.has(transporte);
38
+ export function latchDefaultFromGame(transport) {
39
+ return ONE_COMMAND_AT_A_TIME.has(transport);
52
40
  }
53
41
  /**
54
- * A opção deve ser OFERECIDA para este transporte?
42
+ * The toggle's storage key, with the transport in its name.
55
43
  *
56
- * O contrário de `alternanciaSempreLigada`, e existe com nome próprio porque quem pergunta é outro: um
57
- * chama para decidir o estado, o outro para decidir se desenha o botão. Um painel que desenhasse o botão e
58
- * ignorasse o clique seria pior do que não o desenhar.
59
- */
60
- export function alternanciaEhEscolha(transporte) {
61
- return !alternanciaSempreLigada(transporte);
62
- }
63
- /**
64
- * A chave de armazenamento da alternância, agora com o transporte no nome.
65
- *
66
- * ⚠️ FUNÇÃO, e não concatenação no ponto de uso, pela razão que o `platform/storage` já escreveu sobre as
67
- * chaves por jogador: «virar função aqui é o que impede que um deles escreva num nome torto». Não é
68
- * hipótese — o `ui/settings-motor` reescrevia `'incl_togglerun_p' + i` à mão, com um comentário ao lado a
69
- * dizer «== toggleRunP de platform/storage». Duas cópias de um nome mudam uma de cada vez.
44
+ * ⚠️ A FUNCTION, and not concatenation at the call site, for the reason `platform/storage` gives for the per-player keys:
45
+ * as a function, no call site can write a crooked name. Not a hypothesis — the mobility panel once rewrote the per-player
46
+ * key by hand, with a comment beside it saying it matched storage's. Two copies of a name change one at a time.
70
47
  *
71
- * `base` é `togglemove` ou `togglerun`, os dois nomes que já existem no armazenamento da criança.
48
+ * `base` is `togglemove` or `togglerun`, the two names that already exist in the child's storage.
72
49
  */
73
- export function chaveDaAlternancia(base, jogador, transporte) {
74
- return `incl_${base}_p${jogador}_${transporte}`;
50
+ export function latchKey(base, player, transport) {
51
+ return `incl_${base}_p${player}_${transport}`;
75
52
  }
76
53
  /**
77
- * A chave ANTIGA, por jogador e sem transporte. Continua a ser lida, e nunca mais escrita.
54
+ * The OLD key, per player and without a transport. Still read, never written again.
55
+ *
56
+ * ⚠️ IT IS INHERITED BY THE KEYBOARD, THE PAD AND TOUCH, and the choice takes a sentence to explain. The old value was set
57
+ * by the child in some context, and there is no way to know which — the key did not record it, which is the defect. The
58
+ * ways out were three: lose their setting, guess a transport, or inherit for all. Inheriting is the only one that takes
59
+ * nothing from whoever depends on the setting, and the leak it keeps lasts only until the child touches the setting once
60
+ * on each device. Losing the setting would cost more, and to whoever can least afford it.
78
61
  *
79
- * ⚠️ ELA HERDA PARA TODOS OS TRANSPORTES, e a escolha custa uma frase a explicar. O valor velho foi posto
80
- * pela criança nalgum contexto, e não há como saber qual — a chave não o registava, que é o defeito. As
81
- * saídas eram três: perder o ajuste dela, adivinhar um transporte, ou herdar para todos. Herdar para todos é
82
- * a única que não tira nada a quem depende do ajuste, e o vazamento que ela mantém dura só até a criança
83
- * mexer no assunto uma vez em cada aparelho. Perder o ajuste custaria mais, e a quem menos pode pagar.
62
+ * 📌 NOT BY THE FOUR ONE-COMMAND TRANSPORTS (ADR-0249): there the default is the game's answer, and a value the child set
63
+ * on the keyboard is not a choice about how a spoken word or a look should behave in this game.
84
64
  *
85
- * É também o padrão que este repositório já escolheu para este mesmo valor: o `KEYS.toggleMoveLegacy` existe
86
- * desde a migração anterior, e a nota do `platform/storage` diz porquê — «a chave velha fica onde está: é
87
- * dado da criança, não meu para apagar, e a sua permanência é o que torna um retorno possível».
65
+ * It is also the pattern this repository chose for this same value before: the old key stays where it is — it is the
66
+ * child's data, not mine to delete, and keeping it is what makes a way back possible.
88
67
  */
89
- export function chaveLegadaDaAlternancia(base, jogador) {
90
- return `incl_${base}_p${jogador}`;
68
+ export function legacyLatchKey(base, player) {
69
+ return `incl_${base}_p${player}`;
91
70
  }
92
71
  /**
93
- * A alternância deste transporte, resolvida.
72
+ * This transport's toggle, resolved.
94
73
  *
95
- * A ordem é: transporte de um comando → SEMPRE ligada, e nem se lê o resto · valor deste transporte · valor
96
- * legado · padrão de fábrica.
74
+ * The order: this transport's stored value · on a one-command transport, the game's `holdsKeys()` · the legacy value ·
75
+ * the factory default.
97
76
  *
98
- * ⚠️ O TRANSPORTE DE UM COMANDO VEM PRIMEIRO, e não por atalho: se ele lesse o guardado primeiro, uma
99
- * criança que tivesse desligado a alternância no teclado herdaria esse `false` pelo legado e ficaria com um
100
- * controle de olhar que não responde — o pior defeito possível, no controle de quem tem menos alternativas.
77
+ * ⚠️ THE STORED VALUE COMES FIRST ON EVERY TRANSPORT (ADR-0249): the child's choice for this device wins over any default,
78
+ * including the game's. And a stored `false` is a VALUE, not an absence — the `!== null` is what keeps a latch the child
79
+ * turned off from coming back by itself.
101
80
  */
102
- export function alternanciaDe(transporte, l) {
103
- if (alternanciaSempreLigada(transporte))
104
- return true;
105
- if (l.doTransporte !== null)
106
- return l.doTransporte;
107
- if (l.doLegado !== null)
108
- return l.doLegado;
109
- return l.padrao;
81
+ export function latchOf(transport, l) {
82
+ if (l.fromTransport !== null)
83
+ return l.fromTransport;
84
+ if (latchDefaultFromGame(transport))
85
+ return l.gameHoldsKeys;
86
+ if (l.fromLegacy !== null)
87
+ return l.fromLegacy;
88
+ return l.byDefault;
110
89
  }
@@ -1,45 +1,41 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
- import { type LeituraDaAlternancia } from './latch-scope.js';
3
- /** O mínimo do `platform/storage` que isto precisa. Injectado, para o gate não precisar de um navegador. */
4
- export interface ArmazemDaAlternancia {
5
- /** ⚠️ O CRU, e não `getBool`. Ver `lerTriEstado`. */
6
- get(chave: string, padrao?: null): string | null;
7
- set(chave: string, valor: string): void;
2
+ import { type LatchReading, type LatchDefaults } from './latch-scope.js';
3
+ /** The minimum of `platform/storage` this needs. Injected, so the gate needs no browser. */
4
+ export interface LatchStore {
5
+ /** ⚠️ The RAW read, not `getBool`. See `readTriState`. */
6
+ get(key: string, fallback?: null): string | null;
7
+ set(key: string, value: string): void;
8
8
  }
9
9
  /**
10
- * TRÊS ESTADOS E NÃO DOIS: `true`, `false`, e NUNCA ESCRITO.
10
+ * THREE STATES, NOT TWO: `true`, `false`, and NEVER WRITTEN.
11
11
  *
12
- * 🔴 ESTA FUNÇÃO EXISTE PARA NÃO SE USAR `getBool`, e a diferença custa o ajuste de uma criança. O `getBool`
13
- * colapsa «nunca escrito» em `false`. Com ele, o `doTransporte` de uma criança que nunca mexeu neste aparelho
14
- * chegaria à regra como `false` — e a regra responde na PRIMEIRA linha que encontra um valor, logo devolveria
15
- * `false` e **nunca consultaria a chave legada**, que é onde vive o ajuste que ela já tinha.
12
+ * 🔴 THIS FUNCTION EXISTS SO `getBool` IS NOT USED, and the difference costs a child's setting. `getBool` collapses
13
+ * "never written" into `false`. With it, the per-transport value of a child who never touched this device would reach the
14
+ * rule as `false` — and the rule answers at the FIRST line that finds a value, so it would return `false` and **never
15
+ * consult the legacy key**, where the setting they already had lives.
16
16
  *
17
- * ⚠️ É por isso que o `latch-scope` tipa os dois campos como `boolean | null` e tem um caso próprio a dizer
18
- * que «`false` guardado é um VALOR, e não uma ausência». Este é o lado do armazenamento da mesma frase.
17
+ * ⚠️ That is why `latch-scope` types both fields `boolean | null` and has a case of its own saying "a stored `false` is a
18
+ * VALUE, not an absence". This is the storage side of the same sentence.
19
19
  */
20
- export declare function lerTriEstado(armazem: ArmazemDaAlternancia, chave: string): boolean | null;
20
+ export declare function readTriState(store: LatchStore, key: string): boolean | null;
21
21
  /**
22
- * A LEITURA COMPLETA que a regra pede, montada a partir do armazenamento.
22
+ * THE WHOLE READING the rule asks for, built from storage.
23
23
  *
24
- * `base` é `togglemove` ou `togglerun` — os dois nomes que já existem no armazenamento da criança.
24
+ * `base` is `togglemove` or `togglerun` — the two names that already exist in the child's storage. `defaults` carries what
25
+ * storage does not know: the factory default and the game's `holdsKeys()` answer now (ADR-0249).
25
26
  */
26
- export declare function leituraDaAlternancia(armazem: ArmazemDaAlternancia, base: string, jogador: number, transporte: string, padrao: boolean): LeituraDaAlternancia;
27
+ export declare function readLatch(store: LatchStore, base: string, player: number, transport: string, defaults: LatchDefaults): LatchReading;
27
28
  /**
28
- * A ALTERNÂNCIA DESTE JOGADOR NESTE TRANSPORTE — a pergunta inteira, numa chamada.
29
+ * THIS PLAYER'S TOGGLE ON THIS TRANSPORT — the whole question, in one call.
29
30
  *
30
- * 📌 TROCAR DE TRANSPORTE TROCA A RESPOSTA SEM ESCREVER NADA, que é a cláusula 1 do ADR-0113 em código: o
31
- * valor pertence ao mapeamento do controle, como um caps-lock, e mudar de controle é mudar de mapeamento.
31
+ * 📌 SWITCHING TRANSPORT SWITCHES THE ANSWER WITHOUT WRITING ANYTHING, clause 1 of ADR-0113 in code: the value belongs to
32
+ * the controls' mapping, like a caps lock, and changing controls is changing mapping.
32
33
  */
33
- export declare function alternanciaGuardada(armazem: ArmazemDaAlternancia, base: string, jogador: number, transporte: string, padrao: boolean): boolean;
34
+ export declare function storedLatch(store: LatchStore, base: string, player: number, transport: string, defaults: LatchDefaults): boolean;
34
35
  /**
35
- * GRAVA A ESCOLHA DA CRIANÇA para o transporte em uso. Devolve se gravou.
36
+ * WRITES THE CHILD'S CHOICE for the transport in use — on EVERY transport (ADR-0249).
36
37
  *
37
- * ⚠️ RECUSA NOS TRANSPORTES DE UM COMANDO, e a recusa é um `false` devolvido e não um lançamento: em olhos,
38
- * rosto, gestos e fala a alternância é o que faz a entrada funcionar (ADR-0113 cláusula 3), então não há
39
- * escolha a gravar. Quem chama usa a resposta para DESABILITAR o controle COM MOTIVO — que é a metade que
40
- * falta e que vive na interface, não aqui.
41
- *
42
- * 📌 Gravar mesmo assim seria pior do que inútil: a criança mexeria no ícone, o valor iria para o disco, e o
43
- * jogo continuaria a ignorá-lo — um controle que mente sobre ter funcionado.
38
+ * 📌 Eyes, face, gestures and speech included: their latch starts as the game answers `holdsKeys()`, and what is written
39
+ * here is the child changing that default for that device. The stored value is what `latchOf` reads first.
44
40
  */
45
- export declare function gravarAlternancia(escrever: (chave: string, ligada: boolean) => void, base: string, jogador: number, transporte: string, ligada: boolean): boolean;
41
+ export declare function writeLatch(write: (key: string, isOn: boolean) => void, base: string, player: number, transport: string, isOn: boolean): void;