@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.
- package/README.md +120 -78
- package/app/css/style.css +761 -377
- package/app/public/vendor/fonts/playwrite-cu.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-es-deco.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-es.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-gb-j.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-gb-s.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-pe.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-pt.woff2 +0 -0
- package/app/public/vendor/fonts-licences/NOTICE.txt +166 -0
- package/app/public/vendor/fonts-licences/OFL-1.1.txt +86 -0
- package/app/public/vendor/fonts.css +36 -84
- package/dist-pkg/boot/create-game.d.ts +499 -219
- package/dist-pkg/boot/create-game.js +3944 -562
- package/dist-pkg/core/a11y-sr.d.ts +25 -3
- package/dist-pkg/core/a11y-sr.js +38 -19
- package/dist-pkg/core/accessible-label.d.ts +17 -0
- package/dist-pkg/core/accessible-label.js +37 -0
- package/dist-pkg/core/accommodation-subjects.d.ts +26 -0
- package/dist-pkg/core/accommodation-subjects.js +32 -0
- package/dist-pkg/core/accommodations.d.ts +125 -0
- package/dist-pkg/core/accommodations.js +195 -0
- package/dist-pkg/core/actions.d.ts +108 -55
- package/dist-pkg/core/actions.js +122 -71
- package/dist-pkg/core/calm-mode.d.ts +31 -0
- package/dist-pkg/core/calm-mode.js +47 -0
- package/dist-pkg/core/camera-cycle.d.ts +15 -0
- package/dist-pkg/core/camera-cycle.js +7 -0
- package/dist-pkg/core/caption-duration.d.ts +15 -0
- package/dist-pkg/core/caption-duration.js +19 -0
- package/dist-pkg/core/cartridge-problems.d.ts +34 -0
- package/dist-pkg/core/cartridge-problems.js +53 -0
- package/dist-pkg/core/constants.d.ts +0 -54
- package/dist-pkg/core/constants.js +9 -76
- package/dist-pkg/core/contract.d.ts +142 -164
- package/dist-pkg/core/contract.js +222 -208
- package/dist-pkg/core/dom-query.d.ts +4 -4
- package/dist-pkg/core/dom-query.js +12 -20
- package/dist-pkg/core/entity.d.ts +62 -77
- package/dist-pkg/core/entity.js +18 -32
- package/dist-pkg/core/escape-html.d.ts +9 -10
- package/dist-pkg/core/escape-html.js +16 -20
- package/dist-pkg/core/flash-threshold.d.ts +17 -0
- package/dist-pkg/core/flash-threshold.js +113 -0
- package/dist-pkg/core/game-speed.d.ts +11 -0
- package/dist-pkg/core/game-speed.js +16 -0
- package/dist-pkg/core/genres.d.ts +20 -0
- package/dist-pkg/core/genres.js +44 -0
- package/dist-pkg/core/i18n.d.ts +71 -60
- package/dist-pkg/core/i18n.js +186 -200
- package/dist-pkg/core/loop.d.ts +17 -6
- package/dist-pkg/core/loop.js +26 -26
- package/dist-pkg/core/pause-icon-catalogue.d.ts +15 -0
- package/dist-pkg/core/pause-icon-catalogue.js +54 -0
- package/dist-pkg/core/ring.d.ts +17 -0
- package/dist-pkg/core/ring.js +29 -0
- package/dist-pkg/core/rng.d.ts +7 -12
- package/dist-pkg/core/rng.js +23 -53
- package/dist-pkg/core/route.d.ts +26 -26
- package/dist-pkg/core/route.js +126 -121
- package/dist-pkg/core/scenes.d.ts +37 -40
- package/dist-pkg/core/scenes.js +41 -43
- package/dist-pkg/core/screens.d.ts +4 -4
- package/dist-pkg/core/screens.js +11 -16
- package/dist-pkg/core/session-clock.d.ts +23 -0
- package/dist-pkg/core/session-clock.js +37 -0
- package/dist-pkg/core/setting-defaults.d.ts +61 -0
- package/dist-pkg/core/setting-defaults.js +66 -0
- package/dist-pkg/core/speech-rate.d.ts +29 -0
- package/dist-pkg/core/speech-rate.js +47 -0
- package/dist-pkg/core/state.d.ts +118 -118
- package/dist-pkg/core/state.js +322 -297
- package/dist-pkg/core/visual-cycles.d.ts +30 -0
- package/dist-pkg/core/visual-cycles.js +52 -0
- package/dist-pkg/core/visual-state.d.ts +13 -0
- package/dist-pkg/core/visual-state.js +6 -0
- package/dist-pkg/educational/activities-registry.d.ts +1 -1
- package/dist-pkg/educational/activities-registry.js +9 -8
- package/dist-pkg/educational/adaptive-engine.d.ts +11 -11
- package/dist-pkg/educational/adaptive-engine.js +17 -17
- package/dist-pkg/educational/segment-bar.d.ts +12 -12
- package/dist-pkg/educational/segment-bar.js +9 -9
- package/dist-pkg/i18n/en.js +324 -223
- package/dist-pkg/i18n/es.js +323 -223
- package/dist-pkg/i18n/pt.js +348 -226
- package/dist-pkg/input/default-bindings.d.ts +37 -38
- package/dist-pkg/input/default-bindings.js +127 -144
- package/dist-pkg/input/devices.d.ts +7 -7
- package/dist-pkg/input/devices.js +17 -16
- package/dist-pkg/input/edges.d.ts +23 -32
- package/dist-pkg/input/edges.js +23 -28
- package/dist-pkg/input/empathy-filter.d.ts +22 -0
- package/dist-pkg/input/empathy-filter.js +34 -0
- package/dist-pkg/input/face-map.d.ts +96 -0
- package/dist-pkg/input/face-map.js +255 -0
- package/dist-pkg/input/face-signals.d.ts +40 -0
- package/dist-pkg/input/face-signals.js +48 -0
- package/dist-pkg/input/gamepad.d.ts +195 -145
- package/dist-pkg/input/gamepad.js +383 -556
- package/dist-pkg/input/gaze-cycle.d.ts +64 -0
- package/dist-pkg/input/gaze-cycle.js +133 -0
- package/dist-pkg/input/gaze-relative.d.ts +68 -0
- package/dist-pkg/input/gaze-relative.js +142 -0
- package/dist-pkg/input/hand-map.d.ts +28 -0
- package/dist-pkg/input/hand-map.js +142 -0
- package/dist-pkg/input/input-cooldown.d.ts +17 -0
- package/dist-pkg/input/input-cooldown.js +39 -0
- package/dist-pkg/input/key-default.d.ts +30 -0
- package/dist-pkg/input/key-default.js +60 -0
- package/dist-pkg/input/keyboard-runtime.d.ts +15 -21
- package/dist-pkg/input/keyboard-runtime.js +23 -27
- package/dist-pkg/input/keyboard.d.ts +68 -63
- package/dist-pkg/input/keyboard.js +83 -105
- package/dist-pkg/input/keydown.d.ts +123 -137
- package/dist-pkg/input/keydown.js +284 -289
- package/dist-pkg/input/latch-edge.d.ts +33 -21
- package/dist-pkg/input/latch-edge.js +34 -35
- package/dist-pkg/input/latch-scope.d.ts +51 -50
- package/dist-pkg/input/latch-scope.js +61 -82
- package/dist-pkg/input/latch-store.d.ts +26 -30
- package/dist-pkg/input/latch-store.js +42 -50
- package/dist-pkg/input/latch-sync.d.ts +29 -29
- package/dist-pkg/input/latch-sync.js +25 -25
- package/dist-pkg/input/latch.d.ts +14 -17
- package/dist-pkg/input/latch.js +29 -37
- package/dist-pkg/input/pad-defaults.d.ts +13 -16
- package/dist-pkg/input/pad-defaults.js +21 -28
- package/dist-pkg/input/pad-reading.d.ts +76 -0
- package/dist-pkg/input/pad-reading.js +169 -0
- package/dist-pkg/input/pad-wizard.d.ts +99 -0
- package/dist-pkg/input/pad-wizard.js +256 -0
- package/dist-pkg/input/pointer-space.d.ts +19 -20
- package/dist-pkg/input/pointer-space.js +27 -32
- package/dist-pkg/input/pointer.d.ts +39 -40
- package/dist-pkg/input/pointer.js +42 -45
- package/dist-pkg/input/state.d.ts +101 -89
- package/dist-pkg/input/state.js +54 -134
- package/dist-pkg/input/switch-scan.d.ts +59 -0
- package/dist-pkg/input/switch-scan.js +67 -0
- package/dist-pkg/input/synthetic-source.d.ts +42 -0
- package/dist-pkg/input/synthetic-source.js +57 -0
- package/dist-pkg/input/touch-bindings.d.ts +127 -116
- package/dist-pkg/input/touch-bindings.js +158 -173
- package/dist-pkg/input/touch.d.ts +147 -72
- package/dist-pkg/input/touch.js +362 -126
- package/dist-pkg/input/transport-in-use.d.ts +107 -0
- package/dist-pkg/input/transport-in-use.js +130 -0
- package/dist-pkg/input/transports.d.ts +90 -117
- package/dist-pkg/input/transports.js +104 -106
- package/dist-pkg/input/virtual-controller.d.ts +82 -0
- package/dist-pkg/input/virtual-controller.js +69 -0
- package/dist-pkg/input/vocabulary-migration.d.ts +50 -49
- package/dist-pkg/input/vocabulary-migration.js +80 -79
- package/dist-pkg/input/voice-map.d.ts +59 -0
- package/dist-pkg/input/voice-map.js +123 -0
- package/dist-pkg/platform/audio-ambient.d.ts +13 -2
- package/dist-pkg/platform/audio-ambient.js +14 -14
- package/dist-pkg/platform/audio-earcons.d.ts +20 -19
- package/dist-pkg/platform/audio-earcons.js +51 -42
- package/dist-pkg/platform/audio-jingles.js +9 -10
- package/dist-pkg/platform/audio-mixer.d.ts +14 -2
- package/dist-pkg/platform/audio-mixer.js +31 -39
- package/dist-pkg/platform/audio-sonar.d.ts +49 -152
- package/dist-pkg/platform/audio-sonar.js +124 -302
- package/dist-pkg/platform/audio.d.ts +62 -19
- package/dist-pkg/platform/audio.js +193 -168
- package/dist-pkg/platform/choose-by-voice.d.ts +70 -0
- package/dist-pkg/platform/choose-by-voice.js +157 -0
- package/dist-pkg/platform/flash-sampler.d.ts +19 -0
- package/dist-pkg/platform/flash-sampler.js +79 -0
- package/dist-pkg/platform/font-library.d.ts +77 -0
- package/dist-pkg/platform/font-library.js +98 -0
- package/dist-pkg/platform/font-library.json +721 -0
- package/dist-pkg/platform/heavy-catalogue.d.ts +77 -0
- package/dist-pkg/platform/heavy-catalogue.js +256 -0
- package/dist-pkg/platform/heavy-mirror.d.ts +20 -0
- package/dist-pkg/platform/heavy-mirror.js +73 -0
- package/dist-pkg/platform/heavy.d.ts +136 -0
- package/dist-pkg/platform/heavy.js +324 -0
- package/dist-pkg/platform/interruptible-speech.d.ts +23 -16
- package/dist-pkg/platform/interruptible-speech.js +77 -54
- package/dist-pkg/platform/kokoro-port.d.ts +27 -0
- package/dist-pkg/platform/kokoro-port.js +50 -0
- package/dist-pkg/platform/kokoro-runtime.d.ts +20 -0
- package/dist-pkg/platform/kokoro-runtime.js +52 -0
- package/dist-pkg/platform/kokoro.d.ts +70 -0
- package/dist-pkg/platform/kokoro.js +133 -0
- package/dist-pkg/platform/listener-scope.d.ts +12 -0
- package/dist-pkg/platform/listener-scope.js +90 -0
- package/dist-pkg/platform/locale-host.d.ts +14 -0
- package/dist-pkg/platform/locale-host.js +45 -0
- package/dist-pkg/platform/microphone.d.ts +51 -0
- package/dist-pkg/platform/microphone.js +118 -0
- package/dist-pkg/platform/onnx-runtime.d.ts +34 -0
- package/dist-pkg/platform/onnx-runtime.js +42 -0
- package/dist-pkg/platform/reading-in-worker.d.ts +64 -0
- package/dist-pkg/platform/reading-in-worker.js +125 -0
- package/dist-pkg/platform/reading-model.d.ts +94 -0
- package/dist-pkg/platform/reading-model.js +272 -0
- package/dist-pkg/platform/reading-runtime.d.ts +24 -0
- package/dist-pkg/platform/reading-runtime.js +164 -0
- package/dist-pkg/platform/reading-worker.d.ts +41 -0
- package/dist-pkg/platform/reading-worker.js +58 -0
- package/dist-pkg/platform/reading.d.ts +80 -0
- package/dist-pkg/platform/reading.js +136 -0
- package/dist-pkg/platform/speech-recognition.d.ts +60 -0
- package/dist-pkg/platform/speech-recognition.js +104 -0
- package/dist-pkg/platform/speech.d.ts +23 -1
- package/dist-pkg/platform/speech.js +29 -18
- package/dist-pkg/platform/storage-keys.d.ts +96 -0
- package/dist-pkg/platform/storage-keys.js +106 -0
- package/dist-pkg/platform/storage.d.ts +46 -111
- package/dist-pkg/platform/storage.js +104 -169
- package/dist-pkg/platform/tts.d.ts +85 -39
- package/dist-pkg/platform/tts.js +447 -127
- package/dist-pkg/platform/vision-loop.d.ts +23 -0
- package/dist-pkg/platform/vision-loop.js +56 -0
- package/dist-pkg/platform/vision.d.ts +132 -0
- package/dist-pkg/platform/vision.js +117 -0
- package/dist-pkg/platform/voice-listener.d.ts +40 -0
- package/dist-pkg/platform/voice-listener.js +88 -0
- package/dist-pkg/platform/voice-plan.d.ts +15 -98
- package/dist-pkg/platform/voice-plan.js +56 -143
- package/dist-pkg/platform/vosk-runtime.d.ts +96 -0
- package/dist-pkg/platform/vosk-runtime.js +151 -0
- package/dist-pkg/platform/vosk-vocabulary.d.ts +6 -0
- package/dist-pkg/platform/vosk-vocabulary.js +178 -0
- package/dist-pkg/render/canvas.d.ts +13 -7
- package/dist-pkg/render/canvas.js +13 -13
- package/dist-pkg/render/crt.d.ts +48 -12
- package/dist-pkg/render/crt.js +78 -80
- package/dist-pkg/render/cvd-matrices.d.ts +22 -18
- package/dist-pkg/render/cvd-matrices.js +37 -38
- package/dist-pkg/render/hc-role-data.d.ts +7 -7
- package/dist-pkg/render/hc-role-data.js +14 -14
- package/dist-pkg/render/high-contrast.d.ts +67 -56
- package/dist-pkg/render/high-contrast.js +226 -217
- package/dist-pkg/render/low-vision-drawing.d.ts +5 -0
- package/dist-pkg/render/low-vision-drawing.js +46 -0
- package/dist-pkg/render/lq-filter.d.ts +32 -20
- package/dist-pkg/render/lq-filter.js +59 -65
- package/dist-pkg/render/port.d.ts +86 -88
- package/dist-pkg/render/port.js +17 -23
- package/dist-pkg/render/screen-pipeline.d.ts +42 -42
- package/dist-pkg/render/screen-pipeline.js +80 -87
- package/dist-pkg/render/sprite-fx.d.ts +2 -1
- package/dist-pkg/render/sprite-fx.js +16 -14
- package/dist-pkg/render/viewports.d.ts +20 -15
- package/dist-pkg/render/viewports.js +83 -114
- package/dist-pkg/render/viz-axes-labels.d.ts +47 -0
- package/dist-pkg/render/viz-axes-labels.js +88 -0
- package/dist-pkg/render/viz-axes.d.ts +89 -86
- package/dist-pkg/render/viz-axes.js +128 -116
- package/dist-pkg/render/viz-modes.d.ts +28 -29
- package/dist-pkg/render/viz-modes.js +40 -45
- package/dist-pkg/render/viz-refusal.d.ts +32 -0
- package/dist-pkg/render/viz-refusal.js +57 -0
- package/dist-pkg/render/viz-setters.d.ts +104 -66
- package/dist-pkg/render/viz-setters.js +182 -191
- package/dist-pkg/ui/aac-sets.d.ts +45 -0
- package/dist-pkg/ui/aac-sets.js +41 -0
- package/dist-pkg/ui/audio-choices.d.ts +68 -0
- package/dist-pkg/ui/audio-choices.js +98 -0
- package/dist-pkg/ui/audio-rows-that-apply.d.ts +12 -0
- package/dist-pkg/ui/audio-rows-that-apply.js +43 -0
- package/dist-pkg/ui/camera-control.d.ts +53 -0
- package/dist-pkg/ui/camera-control.js +48 -0
- package/dist-pkg/ui/changed-mark.d.ts +9 -8
- package/dist-pkg/ui/changed-mark.js +22 -53
- package/dist-pkg/ui/control-choices.d.ts +37 -0
- package/dist-pkg/ui/control-choices.js +84 -0
- package/dist-pkg/ui/debug-panel.d.ts +59 -43
- package/dist-pkg/ui/debug-panel.js +68 -69
- package/dist-pkg/ui/declared-words.d.ts +21 -0
- package/dist-pkg/ui/declared-words.js +66 -0
- package/dist-pkg/ui/dom.d.ts +10 -14
- package/dist-pkg/ui/dom.js +10 -47
- package/dist-pkg/ui/drawing-problems.d.ts +25 -0
- package/dist-pkg/ui/drawing-problems.js +94 -0
- package/dist-pkg/ui/eye-control.d.ts +36 -0
- package/dist-pkg/ui/eye-control.js +178 -0
- package/dist-pkg/ui/face-control.d.ts +25 -0
- package/dist-pkg/ui/face-control.js +183 -0
- package/dist-pkg/ui/focus-trap.d.ts +39 -49
- package/dist-pkg/ui/focus-trap.js +56 -65
- package/dist-pkg/ui/fonts.d.ts +157 -68
- package/dist-pkg/ui/fonts.js +305 -115
- package/dist-pkg/ui/footer-scroll-driver.d.ts +14 -0
- package/dist-pkg/ui/footer-scroll-driver.js +201 -0
- package/dist-pkg/ui/footer-scroll.d.ts +38 -0
- package/dist-pkg/ui/footer-scroll.js +55 -0
- package/dist-pkg/ui/game-options.d.ts +47 -0
- package/dist-pkg/ui/game-options.js +158 -0
- package/dist-pkg/ui/gaze-overlay.d.ts +64 -0
- package/dist-pkg/ui/gaze-overlay.js +165 -0
- package/dist-pkg/ui/hand-control.d.ts +25 -0
- package/dist-pkg/ui/hand-control.js +143 -0
- package/dist-pkg/ui/help-panel.d.ts +87 -0
- package/dist-pkg/ui/help-panel.js +242 -0
- package/dist-pkg/ui/hud-bands.d.ts +62 -0
- package/dist-pkg/ui/hud-bands.js +146 -0
- package/dist-pkg/ui/hud-row.d.ts +34 -0
- package/dist-pkg/ui/hud-row.js +80 -0
- package/dist-pkg/ui/hud.d.ts +73 -73
- package/dist-pkg/ui/hud.js +94 -98
- package/dist-pkg/ui/item-announcement.d.ts +13 -12
- package/dist-pkg/ui/item-announcement.js +25 -26
- package/dist-pkg/ui/layout.d.ts +103 -28
- package/dist-pkg/ui/layout.js +117 -99
- package/dist-pkg/ui/libras-avatar-clip.d.ts +30 -0
- package/dist-pkg/ui/libras-avatar-clip.js +86 -0
- package/dist-pkg/ui/libras-avatar-load.d.ts +52 -0
- package/dist-pkg/ui/libras-avatar-load.js +134 -0
- package/dist-pkg/ui/libras-avatar-plan.d.ts +102 -0
- package/dist-pkg/ui/libras-avatar-plan.js +211 -0
- package/dist-pkg/ui/libras-avatar-player.d.ts +28 -0
- package/dist-pkg/ui/libras-avatar-player.js +226 -0
- package/dist-pkg/ui/libras-avatar-stage.d.ts +37 -0
- package/dist-pkg/ui/libras-avatar-stage.js +208 -0
- package/dist-pkg/ui/libras-glosses.d.ts +28 -0
- package/dist-pkg/ui/libras-glosses.js +161 -0
- package/dist-pkg/ui/locale-flags.d.ts +16 -0
- package/dist-pkg/ui/locale-flags.js +30 -0
- package/dist-pkg/ui/loop-crash.d.ts +17 -17
- package/dist-pkg/ui/loop-crash.js +33 -62
- package/dist-pkg/ui/menu-intent.d.ts +61 -0
- package/dist-pkg/ui/menu-intent.js +88 -0
- package/dist-pkg/ui/menu-items.d.ts +20 -0
- package/dist-pkg/ui/menu-items.js +51 -0
- package/dist-pkg/ui/menu-nav.d.ts +98 -92
- package/dist-pkg/ui/menu-nav.js +398 -286
- package/dist-pkg/ui/mobility-choices.d.ts +26 -0
- package/dist-pkg/ui/mobility-choices.js +41 -0
- package/dist-pkg/ui/motion-choices.d.ts +31 -0
- package/dist-pkg/ui/motion-choices.js +68 -0
- package/dist-pkg/ui/motion-scene.d.ts +24 -19
- package/dist-pkg/ui/motion-scene.js +29 -61
- package/dist-pkg/ui/mount-panel.d.ts +81 -0
- package/dist-pkg/ui/mount-panel.js +61 -0
- package/dist-pkg/ui/panel-shell.d.ts +65 -31
- package/dist-pkg/ui/panel-shell.js +92 -66
- package/dist-pkg/ui/panel-widgets.d.ts +150 -0
- package/dist-pkg/ui/panel-widgets.js +294 -0
- package/dist-pkg/ui/pause-buttons.d.ts +35 -0
- package/dist-pkg/ui/pause-buttons.js +66 -0
- package/dist-pkg/ui/pause-icons.d.ts +261 -347
- package/dist-pkg/ui/pause-icons.js +671 -601
- package/dist-pkg/ui/pause-markup.d.ts +86 -0
- package/dist-pkg/ui/pause-markup.js +125 -0
- package/dist-pkg/ui/reach-notice.d.ts +22 -23
- package/dist-pkg/ui/reach-notice.js +55 -58
- package/dist-pkg/ui/scan-overlay.d.ts +23 -0
- package/dist-pkg/ui/scan-overlay.js +50 -0
- package/dist-pkg/ui/screen-text.d.ts +25 -0
- package/dist-pkg/ui/screen-text.js +152 -0
- package/dist-pkg/ui/session-clock.d.ts +32 -0
- package/dist-pkg/ui/session-clock.js +67 -0
- package/dist-pkg/ui/settings-aac.d.ts +70 -0
- package/dist-pkg/ui/settings-aac.js +208 -0
- package/dist-pkg/ui/settings-audio.d.ts +97 -114
- package/dist-pkg/ui/settings-audio.js +493 -425
- package/dist-pkg/ui/settings-controls.d.ts +53 -96
- package/dist-pkg/ui/settings-controls.js +143 -215
- package/dist-pkg/ui/settings-empathy.d.ts +39 -30
- package/dist-pkg/ui/settings-empathy.js +53 -60
- package/dist-pkg/ui/settings-mobility.d.ts +192 -0
- package/dist-pkg/ui/settings-mobility.js +332 -0
- package/dist-pkg/ui/settings-motion.d.ts +91 -70
- package/dist-pkg/ui/settings-motion.js +287 -198
- package/dist-pkg/ui/settings-panel.d.ts +58 -45
- package/dist-pkg/ui/settings-panel.js +189 -94
- package/dist-pkg/ui/settings-typo.d.ts +29 -78
- package/dist-pkg/ui/settings-typo.js +158 -129
- package/dist-pkg/ui/settings-visual.d.ts +29 -87
- package/dist-pkg/ui/settings-visual.js +240 -193
- package/dist-pkg/ui/shell.d.ts +112 -135
- package/dist-pkg/ui/shell.js +148 -217
- package/dist-pkg/ui/simulation-list.d.ts +27 -0
- package/dist-pkg/ui/simulation-list.js +76 -0
- package/dist-pkg/ui/simulation-over-the-world.d.ts +23 -0
- package/dist-pkg/ui/simulation-over-the-world.js +131 -0
- package/dist-pkg/ui/simulation-refusal.d.ts +5 -31
- package/dist-pkg/ui/simulation-refusal.js +8 -56
- package/dist-pkg/ui/switchable-control.d.ts +11 -0
- package/dist-pkg/ui/switchable-control.js +19 -0
- package/dist-pkg/ui/title.d.ts +3 -12
- package/dist-pkg/ui/title.js +49 -18
- package/dist-pkg/ui/top-band.d.ts +26 -0
- package/dist-pkg/ui/top-band.js +96 -0
- package/dist-pkg/ui/typo-choices.d.ts +71 -0
- package/dist-pkg/ui/typo-choices.js +85 -0
- package/dist-pkg/ui/visual-axes-panel.d.ts +11 -47
- package/dist-pkg/ui/visual-axes-panel.js +12 -94
- package/dist-pkg/ui/visual-choices.d.ts +77 -0
- package/dist-pkg/ui/visual-choices.js +107 -0
- package/dist-pkg/ui/vlibras.d.ts +77 -10
- package/dist-pkg/ui/vlibras.js +130 -81
- package/dist-pkg/ui/voice-control.d.ts +68 -0
- package/dist-pkg/ui/voice-control.js +276 -0
- package/dist-pkg/ui/voice-settings.d.ts +95 -0
- package/dist-pkg/ui/voice-settings.js +352 -0
- package/dist-pkg/ui/where-the-child-is.d.ts +31 -0
- package/dist-pkg/ui/where-the-child-is.js +70 -0
- package/docs/CREDITS.md +300 -44
- package/docs/LICENSES.md +189 -145
- package/package.json +51 -27
- package/scripts/check-cartridge.mjs +78 -0
- package/scripts/game-build.d.mts +25 -0
- package/scripts/game-build.mjs +144 -0
- package/scripts/heavy-into-the-delivery.mjs +388 -0
- package/scripts/libras-avatar.json +680 -0
- package/scripts/libras-avatar.mjs +246 -0
- package/scripts/libras-glosses/gloss.py +95 -0
- package/scripts/libras-glosses/pyproject.toml +32 -0
- package/scripts/libras-glosses/uv.lock +781 -0
- package/scripts/libras-glosses.mjs +351 -0
- package/scripts/licences/Apache-2.0.txt +176 -0
- package/scripts/licences/GPL-3.0.txt +674 -0
- package/scripts/licences/MIT.txt +17 -0
- package/scripts/licences/OFL-1.1.txt +86 -0
- package/scripts/licences/UFL-1.0.txt +96 -0
- package/scripts/licences/fonts.mjs +389 -0
- package/scripts/licences/third-party.mjs +301 -0
- package/scripts/licences/vosk-browser.NOTICE.txt +268 -0
- package/app/public/vendor/fonts/comicneue-400.woff2 +0 -0
- package/app/public/vendor/fonts/comicneue-700.woff2 +0 -0
- package/app/public/vendor/fonts/fondamento-400-ext.woff2 +0 -0
- package/app/public/vendor/fonts/fondamento-400.woff2 +0 -0
- package/app/public/vendor/fonts/inter-400.woff2 +0 -0
- package/app/public/vendor/fonts/inter-700.woff2 +0 -0
- package/app/public/vendor/fonts/lato-400.woff2 +0 -0
- package/app/public/vendor/fonts/lato-700.woff2 +0 -0
- package/app/public/vendor/fonts/literata-400.woff2 +0 -0
- package/app/public/vendor/fonts/literata-700.woff2 +0 -0
- package/app/public/vendor/fonts/newsreader-400.woff2 +0 -0
- package/app/public/vendor/fonts/newsreader-700.woff2 +0 -0
- package/app/public/vendor/fonts/opendyslexic-400.woff2 +0 -0
- package/app/public/vendor/fonts/opensans-400.woff2 +0 -0
- package/app/public/vendor/fonts/opensans-700.woff2 +0 -0
- package/app/public/vendor/fonts/pinyon-400.woff2 +0 -0
- package/app/public/vendor/fonts/pressstart-400.woff2 +0 -0
- package/app/public/vendor/fonts/quattro-400.woff2 +0 -0
- package/app/public/vendor/fonts/quattro-700.woff2 +0 -0
- package/app/public/vendor/fonts/sourcesans-400.woff2 +0 -0
- package/app/public/vendor/fonts/sourcesans-700.woff2 +0 -0
- package/app/public/vendor/fonts/sourceserif-400.woff2 +0 -0
- package/app/public/vendor/fonts/sourceserif-700.woff2 +0 -0
- package/app/public/vendor/fonts/ufmag-400.woff2 +0 -0
- package/dist-pkg/core/anel.d.ts +0 -17
- package/dist-pkg/core/anel.js +0 -31
- package/dist-pkg/core/collision.d.ts +0 -21
- package/dist-pkg/core/collision.js +0 -62
- package/dist-pkg/core/layers.d.ts +0 -63
- package/dist-pkg/core/layers.js +0 -95
- package/dist-pkg/core/letter-grid.d.ts +0 -55
- package/dist-pkg/core/letter-grid.js +0 -116
- package/dist-pkg/core/password.d.ts +0 -34
- package/dist-pkg/core/password.js +0 -205
- package/dist-pkg/core/rotulo-acessivel.d.ts +0 -17
- package/dist-pkg/core/rotulo-acessivel.js +0 -41
- package/dist-pkg/core/run-state.d.ts +0 -115
- package/dist-pkg/core/run-state.js +0 -40
- package/dist-pkg/core/tiles.d.ts +0 -12
- package/dist-pkg/core/tiles.js +0 -61
- package/dist-pkg/core/world.d.ts +0 -4
- package/dist-pkg/core/world.js +0 -58
- package/dist-pkg/input/origem-sintetica.d.ts +0 -44
- package/dist-pkg/input/origem-sintetica.js +0 -60
- package/dist-pkg/input/transporte-em-uso.d.ts +0 -101
- package/dist-pkg/input/transporte-em-uso.js +0 -130
- package/dist-pkg/platform/audio-nav.d.ts +0 -51
- package/dist-pkg/platform/audio-nav.js +0 -99
- package/dist-pkg/platform/guide-intensity.d.ts +0 -40
- package/dist-pkg/platform/guide-intensity.js +0 -73
- package/dist-pkg/platform/pesados-catalogo.d.ts +0 -14
- package/dist-pkg/platform/pesados-catalogo.js +0 -177
- package/dist-pkg/platform/pesados.d.ts +0 -31
- package/dist-pkg/platform/pesados.js +0 -75
- package/dist-pkg/platform/vozes-prontas.d.ts +0 -28
- package/dist-pkg/platform/vozes-prontas.js +0 -61
- package/dist-pkg/render/camera.d.ts +0 -58
- package/dist-pkg/render/camera.js +0 -105
- package/dist-pkg/render/cenario-data.d.ts +0 -127
- package/dist-pkg/render/cenario-data.js +0 -145
- package/dist-pkg/render/city-tex.d.ts +0 -63
- package/dist-pkg/render/city-tex.js +0 -228
- package/dist-pkg/render/city-tiles.d.ts +0 -11
- package/dist-pkg/render/city-tiles.js +0 -140
- package/dist-pkg/render/draw.d.ts +0 -149
- package/dist-pkg/render/draw.js +0 -231
- package/dist-pkg/render/fx.d.ts +0 -63
- package/dist-pkg/render/fx.js +0 -123
- package/dist-pkg/render/minimap.d.ts +0 -11
- package/dist-pkg/render/minimap.js +0 -94
- package/dist-pkg/render/parallax.d.ts +0 -85
- package/dist-pkg/render/parallax.js +0 -158
- package/dist-pkg/render/player-anim.d.ts +0 -71
- package/dist-pkg/render/player-anim.js +0 -152
- package/dist-pkg/render/recycling-tex.d.ts +0 -48
- package/dist-pkg/render/recycling-tex.js +0 -164
- package/dist-pkg/render/scene-city.d.ts +0 -77
- package/dist-pkg/render/scene-city.js +0 -181
- package/dist-pkg/render/scene-parallax.d.ts +0 -72
- package/dist-pkg/render/scene-parallax.js +0 -426
- package/dist-pkg/render/scene-sky.d.ts +0 -126
- package/dist-pkg/render/scene-sky.js +0 -295
- package/dist-pkg/render/set-cenario.d.ts +0 -54
- package/dist-pkg/render/set-cenario.js +0 -103
- package/dist-pkg/render/textures.d.ts +0 -75
- package/dist-pkg/render/textures.js +0 -240
- package/dist-pkg/render/title-scene.d.ts +0 -46
- package/dist-pkg/render/title-scene.js +0 -75
- package/dist-pkg/render/weather.d.ts +0 -96
- package/dist-pkg/render/weather.js +0 -171
- package/dist-pkg/render/wheelchair-sprites.d.ts +0 -32
- package/dist-pkg/render/wheelchair-sprites.js +0 -69
- package/dist-pkg/render/world-tex.d.ts +0 -18
- package/dist-pkg/render/world-tex.js +0 -87
- package/dist-pkg/ui/activities-menu.d.ts +0 -258
- package/dist-pkg/ui/activities-menu.js +0 -648
- package/dist-pkg/ui/caa-sets.d.ts +0 -39
- package/dist-pkg/ui/caa-sets.js +0 -65
- package/dist-pkg/ui/latch-refusal.d.ts +0 -32
- package/dist-pkg/ui/latch-refusal.js +0 -60
- package/dist-pkg/ui/map-hub.d.ts +0 -56
- package/dist-pkg/ui/map-hub.js +0 -138
- package/dist-pkg/ui/settings-caa.d.ts +0 -45
- package/dist-pkg/ui/settings-caa.js +0 -137
- package/dist-pkg/ui/settings-motor.d.ts +0 -175
- package/dist-pkg/ui/settings-motor.js +0 -342
- package/dist-pkg/ui/webcam.d.ts +0 -7
- 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
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
*
|
|
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
|
-
* ⚠️
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
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
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
137
|
+
/** DOM selector (querySelector), injected — never reaches the global `document`. */
|
|
129
138
|
$: DomQuery;
|
|
130
139
|
/**
|
|
131
|
-
*
|
|
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
|
-
* ⚠️
|
|
134
|
-
*
|
|
135
|
-
*
|
|
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
|
-
|
|
138
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
/**
|
|
168
|
+
/** On-screen touch controls — they vanish on the first physical input. */
|
|
154
169
|
isTouchMode: () => boolean;
|
|
155
170
|
hideTouchControls: () => void;
|
|
156
|
-
/**
|
|
171
|
+
/** Live state of players/screens (injected as a getter — never cached by this module). */
|
|
157
172
|
getPlayers: () => GamepadPlayer[];
|
|
158
173
|
getNumPlayers: () => number;
|
|
159
|
-
/**
|
|
174
|
+
/** Menu navigation: the title, the shared dialog (the topmost), and the pause per screen. */
|
|
160
175
|
navTitle: (k: NavKeys) => void;
|
|
161
|
-
/**
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
navBar: (i: number, k: NavKeys,
|
|
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
|
-
/**
|
|
168
|
-
*
|
|
169
|
-
*
|
|
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
|
-
/**
|
|
193
|
+
/** Which player opens the accessibility submenu next. */
|
|
173
194
|
setPauseActor: (playerIndex: number) => void;
|
|
174
195
|
/**
|
|
175
|
-
*
|
|
196
|
+
* THIS EDGE IS THIS PLAYER'S, AND IT CAME FROM THE PAD (ADR-0113 clause 4, issue #127).
|
|
176
197
|
*
|
|
177
|
-
* 🔴
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
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
|
-
* ⚠️
|
|
183
|
-
*
|
|
184
|
-
|
|
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
|
-
|
|
229
|
+
takeShown?: () => boolean;
|
|
187
230
|
/**
|
|
188
|
-
*
|
|
231
|
+
* The player's OWN modal: the engine delivers the INTENT, the game decides (ADR-0033).
|
|
189
232
|
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
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
|
-
/**
|
|
195
|
-
*
|
|
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
|
-
/**
|
|
240
|
+
/** Does this player have a modal open? A question, and not the game's object. */
|
|
198
241
|
hasModal: (playerIndex: number) => boolean;
|
|
199
|
-
/**
|
|
242
|
+
/** Joins a running game with a new screen. */
|
|
200
243
|
joinPlayer: (padIndex: number) => boolean;
|
|
201
|
-
/**
|
|
244
|
+
/** Restarts only this player's screen. */
|
|
202
245
|
respawnPlayer: (playerIndex: number) => void;
|
|
203
|
-
/**
|
|
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
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
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
|
-
|
|
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
|
-
/**
|
|
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 {};
|