@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,100 +1,153 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
/**
|
|
2
|
+
/** The fourteen positions the engine knows. None of them is a word a child reads. */
|
|
3
3
|
export declare const ACTIONS: readonly ["up", "down", "left", "right", "action1", "action2", "action3", "action4", "leftShoulder", "leftTrigger", "rightShoulder", "rightTrigger", "start", "select"];
|
|
4
4
|
export type Action = (typeof ACTIONS)[number];
|
|
5
|
-
/**
|
|
5
|
+
/** The four directions, which every transport has to reach. */
|
|
6
6
|
export declare const DIRECTIONS: readonly ["up", "down", "left", "right"];
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* The eight verbs, in TWO halves named by different criteria, and that is a decision, not carelessness:
|
|
9
9
|
*
|
|
10
|
-
* · `action1`..`action4` —
|
|
11
|
-
*
|
|
12
|
-
* · `leftShoulder`, `leftTrigger`, `rightShoulder`, `rightTrigger` —
|
|
13
|
-
*
|
|
10
|
+
* · `action1`..`action4` — the diamond. NUMBERED, because four positions in a cross have no names that cross genres:
|
|
11
|
+
* what a platformer calls jump, a quiz calls confirm.
|
|
12
|
+
* · `leftShoulder`, `leftTrigger`, `rightShoulder`, `rightTrigger` — NAMED by the hand's anatomy: two fingers per
|
|
13
|
+
* hand, one above the other. ADR-0086.
|
|
14
14
|
*
|
|
15
|
-
* ⚠️
|
|
16
|
-
*
|
|
15
|
+
* ⚠️ THERE IS NO HIERARCHY BETWEEN THEM in the contract. The order is that of presentation — in the gamepad wizard, on
|
|
16
|
+
* the remap screen — and not a scale of importance: a game may use `rightShoulder` and nothing else.
|
|
17
17
|
*/
|
|
18
18
|
export declare const VERBS: readonly ["action1", "action2", "action3", "action4", "leftShoulder", "leftTrigger", "rightShoulder", "rightTrigger"];
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* The two SYSTEM ones. They do not belong to the game's world: `start` pauses and resumes, `select` opens what belongs
|
|
21
|
+
* to the session.
|
|
21
22
|
*
|
|
22
|
-
* ⚠️
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* ⚠️ AND THAT IS WHY THE ENGINE MAY NAME THEM and may not name the others. ADR-0074 forbids an abstract name reaching a
|
|
24
|
+
* person because `action1` says nothing to anyone — but "start" and "select" are what has been printed on the pad
|
|
25
|
+
* itself since 1983, and the child reads that legend before ours.
|
|
25
26
|
*/
|
|
26
27
|
export declare const SYSTEM: readonly ["start", "select"];
|
|
27
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* What the child reads and hears for a position: the name, and the sentence that explains it when they ask — RESOLVED, in
|
|
30
|
+
* the page's language. The engine builds these from the game's KEYS (`wordsOf`) each time it draws; a game declares keys.
|
|
31
|
+
*/
|
|
28
32
|
export interface ActionWord {
|
|
29
|
-
/**
|
|
33
|
+
/** "Jump", "Confirm", "Place piece". NEVER `action2` — an abstract name reaching a person is a defect. */
|
|
30
34
|
readonly label: string;
|
|
31
35
|
/**
|
|
32
|
-
*
|
|
36
|
+
* The SHORT version, for where the long one does not fit. Falls back to `label` when absent.
|
|
33
37
|
*
|
|
34
|
-
* ⚠️
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* ações, `act.*` e `legend.*`. A distinção é do jogo, não da engine, então atravessa com as palavras.
|
|
38
|
+
* ⚠️ NOT A STYLE PREFERENCE: MEASURED WIDTH. A legend puts the word under a glyph, in a row of four, where the longer
|
|
39
|
+
* remap-screen wording does not fit — which is why the dictionary once had TWO families of keys for the same four
|
|
40
|
+
* actions. The distinction is the game's, not the engine's, so it crosses with the words.
|
|
38
41
|
*
|
|
39
|
-
* ⚠️
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
+
* ⚠️ AND THE FALLBACK TO `label` DEGRADES VISUALLY, not functionally: a game that declares no `short` gets the long
|
|
43
|
+
* word squeezed, not an empty legend. Chosen because a mute legend is worse than a tight one — the first vanishes for
|
|
44
|
+
* a screen reader user, the second does not.
|
|
42
45
|
*/
|
|
43
46
|
readonly short?: string;
|
|
44
|
-
/**
|
|
47
|
+
/** Optional, for the remap screen: what this button does, in one sentence. */
|
|
45
48
|
readonly hint?: string;
|
|
46
49
|
}
|
|
47
50
|
/**
|
|
48
|
-
*
|
|
51
|
+
* What a game DECLARES for a position: the KEYS of its words in its own dictionary (`CreateGameOptions.dictionaries`).
|
|
52
|
+
*
|
|
53
|
+
* 🔴 KEYS AND NOT WORDS (ADR-0232 D3, erratum of 2026-09-25). A word handed over at boot is in the boot language forever:
|
|
54
|
+
* 📏 measured, a preset built with `t` in Portuguese still read «Acima» after `setLocale('en')`. A key is resolved by the
|
|
55
|
+
* root's translator each time the engine draws or speaks it, so changing the language changes every word at once
|
|
56
|
+
* (ADR-0225), and the game never needs to know how (ADR-0216).
|
|
57
|
+
*/
|
|
58
|
+
export interface ActionKeys {
|
|
59
|
+
/** The key of the name: «Jump», «Confirm». A key the game's dictionaries lack leaves the position unnamed, and `problems` says so. */
|
|
60
|
+
readonly labelKey: string;
|
|
61
|
+
/** The key of the SHORT name, for a legend under a glyph. Falls back to the name when absent. */
|
|
62
|
+
readonly shortKey?: string;
|
|
63
|
+
/** The key of the sentence that says what this button does, for the help and the remap screen. */
|
|
64
|
+
readonly hintKey?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The vocabulary of ONE game: for each position it uses, the keys of its words.
|
|
68
|
+
*
|
|
69
|
+
* ⚠️ PARTIAL ON PURPOSE. A game declares ONLY the positions it uses. Requiring all fourteen would make a quiz invent a
|
|
70
|
+
* name for a trigger it does not have, and an invented name ends up on a remap screen in front of a child.
|
|
71
|
+
*/
|
|
72
|
+
export type ActionPreset = Partial<Readonly<Record<Action, ActionKeys>>>;
|
|
73
|
+
/** A preset RESOLVED into words, in the page's language — what the engine's surfaces read (`wordsOf`). */
|
|
74
|
+
export type ActionWords = Partial<Readonly<Record<Action, ActionWord>>>;
|
|
75
|
+
/** The positions this preset names, in the canonical order of `ACTIONS`. */
|
|
76
|
+
export declare function presetActions(p: ActionPreset | ActionWords): Action[];
|
|
77
|
+
/**
|
|
78
|
+
* THE GAME'S KEYS, RESOLVED NOW — called at every drawing, never kept (ADR-0232 D3 erratum).
|
|
49
79
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* frente de uma criança.
|
|
80
|
+
* A position whose NAME resolves to nothing is left out, so every surface treats it as unnamed — the rule `labellerFrom`
|
|
81
|
+
* already applies: an absence is one step fewer, never a mute step, and never the key itself on screen.
|
|
53
82
|
*/
|
|
54
|
-
export
|
|
55
|
-
/** As posições que este preset nomeia, na ordem canônica de `ACTIONS`. */
|
|
56
|
-
export declare function presetActions(p: ActionPreset): Action[];
|
|
83
|
+
export declare function wordsOf(p: ActionPreset, word: (key: string) => string | null): ActionWords;
|
|
57
84
|
/**
|
|
58
|
-
*
|
|
85
|
+
* The question the engine asks the game when it has to SHOW an action: "what is this called?".
|
|
59
86
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
87
|
+
* It is the cut's boundary in the shape of a function. The engine knows a position exists; only the game knows the
|
|
88
|
+
* word, and this function is what crosses.
|
|
62
89
|
*/
|
|
63
90
|
export type ActionLabeller = (a: Action) => string;
|
|
64
91
|
/**
|
|
65
|
-
*
|
|
92
|
+
* Builds the translator from a preset.
|
|
66
93
|
*
|
|
67
|
-
* ⚠️
|
|
68
|
-
*
|
|
69
|
-
*
|
|
94
|
+
* ⚠️ AND WHAT IT DOES WITH AN UNNAMED ACTION IS THE WHOLE DECISION. Returning `action7` would put an abstract name in
|
|
95
|
+
* front of a child, which ADR-0074 calls a defect in so many words. Returning empty would silence the screen reader,
|
|
96
|
+
* the silent defect `speakableProblems` already chases elsewhere.
|
|
70
97
|
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
98
|
+
* It returns `null`, and the caller decides: the pad wizard DOES NOT ASK for an action the game does not name — if the
|
|
99
|
+
* game does not use it, there is nothing to map. An absence becomes one step fewer, never a mute step. (`SYSTEM` is the
|
|
100
|
+
* exception there: the wizard asks START and SELECT in its own words, since no preset may name them — ADR-0144 erratum.)
|
|
73
101
|
*/
|
|
74
|
-
export declare function labellerFrom(p:
|
|
102
|
+
export declare function labellerFrom(p: ActionWords): (a: Action) => string | null;
|
|
75
103
|
/**
|
|
76
|
-
*
|
|
104
|
+
* The same, in the SHORT version — for a legend, where the word lives under a glyph.
|
|
77
105
|
*
|
|
78
|
-
* ⚠️
|
|
79
|
-
*
|
|
106
|
+
* ⚠️ IT FALLS BACK TO `label`, and the fallback is the decision: a tight legend is worse than a neat one and better than
|
|
107
|
+
* an empty one. Empty would also vanish for a screen reader user, which is the cost not accepted here.
|
|
80
108
|
*/
|
|
81
|
-
export declare function shortLabellerFrom(p:
|
|
109
|
+
export declare function shortLabellerFrom(p: ActionWords): (a: Action) => string | null;
|
|
82
110
|
/**
|
|
83
|
-
*
|
|
111
|
+
* Is a preset well formed? Returns the problems — EMPTY means conformant.
|
|
84
112
|
*
|
|
85
|
-
* ⚠️
|
|
86
|
-
* `
|
|
87
|
-
*
|
|
113
|
+
* ⚠️ WHAT IT CATCHES IS THE EMPTY KEY, the same silent defect as `speakableProblems` in `core/contract`: a blank
|
|
114
|
+
* `labelKey` breaks nothing, warns nobody, and leaves the remap screen with a mute row — for a screen reader user, a button
|
|
115
|
+
* that exists and has no name. Whether the key is IN the game's dictionaries is the root's question (`ui/declared-words`).
|
|
88
116
|
*/
|
|
89
117
|
export declare function presetProblems(p: ActionPreset | null | undefined): string[];
|
|
90
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* `start` IS THE PAUSE'S, AND A GAME DOES NOT TAKE IT (ADR-0144 §4). Returns the reason, or `null`.
|
|
120
|
+
*
|
|
121
|
+
* ⚠️ THIS IS THE ONE CLAUSE OF THAT RECORD THAT ADDS A RESTRICTION instead of reusing something that was
|
|
122
|
+
* already there, and it is written down — rather than discovered in a conflict — because the record asked
|
|
123
|
+
* for exactly that. Since ADR-0122 the pause is not declinable, and `start` is the only position that
|
|
124
|
+
* reaches it: a game that claimed it for something else would be declining the pause by the back door, and
|
|
125
|
+
* the child would get four settings panels that are mounted, in the document, and unreachable.
|
|
126
|
+
*
|
|
127
|
+
* 📌 SEPARATE FROM `presetProblems`, and on purpose. That one answers «is this preset well formed?» and
|
|
128
|
+
* nobody calls it yet (issue for the wiring); this one is a PRE-CONDITION the boot refuses on, which is a
|
|
129
|
+
* different rubric — a malformed label degrades a remap screen, a stolen `start` removes the pause.
|
|
130
|
+
*
|
|
131
|
+
* 📌 `select` has its own sibling below, since ADR-0155 made it the door to the pause menus. Until then it stayed
|
|
132
|
+
* free on purpose: refusing it would have been deciding, in advance, something nobody had decided.
|
|
133
|
+
*/
|
|
134
|
+
export declare function startClaimProblem(p: ActionPreset | null | undefined): string | null;
|
|
135
|
+
/**
|
|
136
|
+
* `select` OPENS THE PAUSE MENUS, AND A GAME DOES NOT TAKE IT EITHER (ADR-0155 §4). Returns the reason, or `null`.
|
|
137
|
+
*
|
|
138
|
+
* ⚠️ The same argument as `start`, one door over: START is now the quick pause and SELECT the six-item card, so
|
|
139
|
+
* a game claiming `select` would leave quitting, the number of players and the inclusion settings unreachable.
|
|
140
|
+
* 📏 Measured when written: no game repository declares `select` in a preset.
|
|
141
|
+
*/
|
|
142
|
+
export declare function selectClaimProblem(p: ActionPreset | null | undefined): string | null;
|
|
143
|
+
/** Is it a known action? A boundary guard for data that came from outside (a saved map, a remap). */
|
|
91
144
|
export declare function isAction(x: unknown): x is Action;
|
|
92
145
|
/**
|
|
93
|
-
*
|
|
146
|
+
* Is a declaration of the actions a game uses well formed? Returns the problems — EMPTY means conformant.
|
|
94
147
|
*
|
|
95
|
-
* ⚠️
|
|
96
|
-
* `left`/`right`;
|
|
97
|
-
*
|
|
98
|
-
*
|
|
148
|
+
* ⚠️ REQUIRING THE FOUR DIRECTIONS WOULD BE WRONG, and the temptation is strong: a quiz walks by `up`/`down` and uses
|
|
149
|
+
* no `left`/`right`; a one-button game uses none. The game decides the set. What this checks is that the set is
|
|
150
|
+
* NAMEABLE and not empty — a game with no action cannot be played, and that would otherwise fail in silence in the
|
|
151
|
+
* first transport that tried to bind to nothing.
|
|
99
152
|
*/
|
|
100
153
|
export declare function actionSetProblems(used: readonly string[] | null | undefined): string[];
|
package/dist-pkg/core/actions.js
CHANGED
|
@@ -1,79 +1,95 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// core/actions —
|
|
2
|
+
// core/actions — THE FOURTEEN ABSTRACT ACTIONS. The single source of the engine's input vocabulary.
|
|
3
3
|
//
|
|
4
|
-
// =========================
|
|
5
|
-
//
|
|
6
|
-
//
|
|
4
|
+
// ========================= WHAT THIS IS =========================
|
|
5
|
+
// ADR-0074 decided that the engine knows POSITIONS, not verbs, and that the GAME supplies the words. This module is
|
|
6
|
+
// the list of those positions and nothing else: no dependencies, no I/O, importable from both sides of the boundary.
|
|
7
|
+
// It was written before the transports migrated to it (issue #103), so the migration had a destination instead of
|
|
8
|
+
// inventing one.
|
|
7
9
|
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
// os transportes passam a apontar, escrito antes para que a migração tenha destino em vez de o inventar.
|
|
10
|
+
// ========================= WHY FOURTEEN AND NOT NINE =========================
|
|
11
|
+
// ADR-0074 recorded nine and wrote, among its own drawbacks, that nine is a CEILING a genre may want to exceed and
|
|
12
|
+
// that the record must say what happens then. The Dev exceeded it, asking for five more for richer games.
|
|
12
13
|
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// cinco para jogos mais elaborados. O ADR-0085 é o que acontece.
|
|
14
|
+
// ⚠️ AND THE FOUR NEW ONES ARE `leftShoulder`, `leftTrigger`, `rightShoulder`, `rightTrigger` — NOT
|
|
15
|
+
// `action5`..`action8`. I argued for numbers and the Dev decided against, for a reason ADR-0086 records: `action7` is
|
|
16
|
+
// unreadable where someone programs, and a vocabulary nobody can read aloud is not abstraction, it is cipher.
|
|
17
17
|
//
|
|
18
|
-
// ⚠️
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
// emendado.
|
|
18
|
+
// ⚠️ AND THE OBJECTION STAYS WRITTEN, because it does not vanish when the decision went the other way: shoulder and
|
|
19
|
+
// trigger are a GAMEPAD's shape. On a keyboard `leftTrigger` is a key; on touch, a slot; for a speech recogniser, a
|
|
20
|
+
// word. ADR-0086 answers that the shape is ANATOMICAL before it is a gamepad's — two fingers per hand, one above the
|
|
21
|
+
// other — and that this crosses transports better than a number does. Whoever disagrees should read both records.
|
|
23
22
|
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
// cima do outro — e que isso atravessa transportes melhor do que um número atravessa. Quem discordar leia os
|
|
28
|
-
// dois registros, que é para isso que eles existem.
|
|
29
|
-
//
|
|
30
|
-
// `start` e `select` mantêm nome pelo critério que já valia para `start`: são FUNÇÃO, não posição — o que é
|
|
31
|
-
// do sistema e não do mundo do jogo.
|
|
32
|
-
/** As quatorze posições que a engine conhece. Nenhuma delas é uma palavra que uma criança leia. */
|
|
23
|
+
// `start` and `select` keep names by the criterion that already held for `start`: they are a FUNCTION, not a
|
|
24
|
+
// position — what belongs to the system and not to the game's world.
|
|
25
|
+
/** The fourteen positions the engine knows. None of them is a word a child reads. */
|
|
33
26
|
export const ACTIONS = [
|
|
34
27
|
'up', 'down', 'left', 'right',
|
|
35
28
|
'action1', 'action2', 'action3', 'action4',
|
|
36
29
|
'leftShoulder', 'leftTrigger', 'rightShoulder', 'rightTrigger',
|
|
37
30
|
'start', 'select',
|
|
38
31
|
];
|
|
39
|
-
/**
|
|
32
|
+
/** The four directions, which every transport has to reach. */
|
|
40
33
|
export const DIRECTIONS = ['up', 'down', 'left', 'right'];
|
|
41
34
|
/**
|
|
42
|
-
*
|
|
35
|
+
* The eight verbs, in TWO halves named by different criteria, and that is a decision, not carelessness:
|
|
43
36
|
*
|
|
44
|
-
* · `action1`..`action4` —
|
|
45
|
-
*
|
|
46
|
-
* · `leftShoulder`, `leftTrigger`, `rightShoulder`, `rightTrigger` —
|
|
47
|
-
*
|
|
37
|
+
* · `action1`..`action4` — the diamond. NUMBERED, because four positions in a cross have no names that cross genres:
|
|
38
|
+
* what a platformer calls jump, a quiz calls confirm.
|
|
39
|
+
* · `leftShoulder`, `leftTrigger`, `rightShoulder`, `rightTrigger` — NAMED by the hand's anatomy: two fingers per
|
|
40
|
+
* hand, one above the other. ADR-0086.
|
|
48
41
|
*
|
|
49
|
-
* ⚠️
|
|
50
|
-
*
|
|
42
|
+
* ⚠️ THERE IS NO HIERARCHY BETWEEN THEM in the contract. The order is that of presentation — in the gamepad wizard, on
|
|
43
|
+
* the remap screen — and not a scale of importance: a game may use `rightShoulder` and nothing else.
|
|
51
44
|
*/
|
|
52
45
|
export const VERBS = [
|
|
53
46
|
'action1', 'action2', 'action3', 'action4',
|
|
54
47
|
'leftShoulder', 'leftTrigger', 'rightShoulder', 'rightTrigger',
|
|
55
48
|
];
|
|
56
49
|
/**
|
|
57
|
-
*
|
|
50
|
+
* The two SYSTEM ones. They do not belong to the game's world: `start` pauses and resumes, `select` opens what belongs
|
|
51
|
+
* to the session.
|
|
58
52
|
*
|
|
59
|
-
* ⚠️
|
|
60
|
-
*
|
|
61
|
-
*
|
|
53
|
+
* ⚠️ AND THAT IS WHY THE ENGINE MAY NAME THEM and may not name the others. ADR-0074 forbids an abstract name reaching a
|
|
54
|
+
* person because `action1` says nothing to anyone — but "start" and "select" are what has been printed on the pad
|
|
55
|
+
* itself since 1983, and the child reads that legend before ours.
|
|
62
56
|
*/
|
|
63
57
|
export const SYSTEM = ['start', 'select'];
|
|
64
|
-
/**
|
|
58
|
+
/** The positions this preset names, in the canonical order of `ACTIONS`. */
|
|
65
59
|
export function presetActions(p) {
|
|
66
60
|
return ACTIONS.filter((a) => p[a] !== undefined);
|
|
67
61
|
}
|
|
62
|
+
/** Resolves one declared key through `word`; a key that is not text resolves to nothing. */
|
|
63
|
+
const resolved = (word, key) => (typeof key === 'string' && key.trim() ? word(key) : null);
|
|
64
|
+
/**
|
|
65
|
+
* THE GAME'S KEYS, RESOLVED NOW — called at every drawing, never kept (ADR-0232 D3 erratum).
|
|
66
|
+
*
|
|
67
|
+
* A position whose NAME resolves to nothing is left out, so every surface treats it as unnamed — the rule `labellerFrom`
|
|
68
|
+
* already applies: an absence is one step fewer, never a mute step, and never the key itself on screen.
|
|
69
|
+
*/
|
|
70
|
+
export function wordsOf(p, word) {
|
|
71
|
+
const words = {};
|
|
72
|
+
for (const a of presetActions(p)) {
|
|
73
|
+
const keys = p[a];
|
|
74
|
+
const label = resolved(word, keys.labelKey);
|
|
75
|
+
if (!label)
|
|
76
|
+
continue;
|
|
77
|
+
const short = resolved(word, keys.shortKey);
|
|
78
|
+
const hint = resolved(word, keys.hintKey);
|
|
79
|
+
words[a] = { label, ...(short ? { short } : {}), ...(hint ? { hint } : {}) };
|
|
80
|
+
}
|
|
81
|
+
return words;
|
|
82
|
+
}
|
|
68
83
|
/**
|
|
69
|
-
*
|
|
84
|
+
* Builds the translator from a preset.
|
|
70
85
|
*
|
|
71
|
-
* ⚠️
|
|
72
|
-
*
|
|
73
|
-
*
|
|
86
|
+
* ⚠️ AND WHAT IT DOES WITH AN UNNAMED ACTION IS THE WHOLE DECISION. Returning `action7` would put an abstract name in
|
|
87
|
+
* front of a child, which ADR-0074 calls a defect in so many words. Returning empty would silence the screen reader,
|
|
88
|
+
* the silent defect `speakableProblems` already chases elsewhere.
|
|
74
89
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
90
|
+
* It returns `null`, and the caller decides: the pad wizard DOES NOT ASK for an action the game does not name — if the
|
|
91
|
+
* game does not use it, there is nothing to map. An absence becomes one step fewer, never a mute step. (`SYSTEM` is the
|
|
92
|
+
* exception there: the wizard asks START and SELECT in its own words, since no preset may name them — ADR-0144 erratum.)
|
|
77
93
|
*/
|
|
78
94
|
export function labellerFrom(p) {
|
|
79
95
|
return (a) => {
|
|
@@ -82,57 +98,92 @@ export function labellerFrom(p) {
|
|
|
82
98
|
};
|
|
83
99
|
}
|
|
84
100
|
/**
|
|
85
|
-
*
|
|
101
|
+
* The same, in the SHORT version — for a legend, where the word lives under a glyph.
|
|
86
102
|
*
|
|
87
|
-
* ⚠️
|
|
88
|
-
*
|
|
103
|
+
* ⚠️ IT FALLS BACK TO `label`, and the fallback is the decision: a tight legend is worse than a neat one and better than
|
|
104
|
+
* an empty one. Empty would also vanish for a screen reader user, which is the cost not accepted here.
|
|
89
105
|
*/
|
|
90
106
|
export function shortLabellerFrom(p) {
|
|
91
107
|
return (a) => {
|
|
92
108
|
const w = p[a];
|
|
93
109
|
if (!w)
|
|
94
110
|
return null;
|
|
95
|
-
const
|
|
96
|
-
return
|
|
111
|
+
const short = w.short && w.short.trim() ? w.short : w.label;
|
|
112
|
+
return short && short.trim() ? short : null;
|
|
97
113
|
};
|
|
98
114
|
}
|
|
99
115
|
/**
|
|
100
|
-
*
|
|
116
|
+
* Is a preset well formed? Returns the problems — EMPTY means conformant.
|
|
101
117
|
*
|
|
102
|
-
* ⚠️
|
|
103
|
-
* `
|
|
104
|
-
*
|
|
118
|
+
* ⚠️ WHAT IT CATCHES IS THE EMPTY KEY, the same silent defect as `speakableProblems` in `core/contract`: a blank
|
|
119
|
+
* `labelKey` breaks nothing, warns nobody, and leaves the remap screen with a mute row — for a screen reader user, a button
|
|
120
|
+
* that exists and has no name. Whether the key is IN the game's dictionaries is the root's question (`ui/declared-words`).
|
|
105
121
|
*/
|
|
106
122
|
export function presetProblems(p) {
|
|
107
123
|
if (!p)
|
|
108
124
|
return ['preset: missing'];
|
|
109
125
|
const problemas = [];
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
126
|
+
const named = presetActions(p);
|
|
127
|
+
if (named.length === 0)
|
|
112
128
|
problemas.push('preset: names no action - the child would see an unlabelled control');
|
|
113
|
-
for (const
|
|
114
|
-
if (!isAction(
|
|
115
|
-
problemas.push(`preset: ${
|
|
129
|
+
for (const key of Object.keys(p)) {
|
|
130
|
+
if (!isAction(key))
|
|
131
|
+
problemas.push(`preset: ${key} is not an action`);
|
|
116
132
|
}
|
|
117
|
-
for (const a of
|
|
133
|
+
for (const a of named) {
|
|
118
134
|
const w = p[a];
|
|
119
|
-
if (!w ||
|
|
120
|
-
problemas.push(`preset: ${a} has an empty
|
|
135
|
+
if (!w || typeof w.labelKey !== 'string' || !w.labelKey.trim()) {
|
|
136
|
+
problemas.push(`preset: ${a} has an empty labelKey - the remap screen would show a nameless button`);
|
|
121
137
|
}
|
|
122
138
|
}
|
|
123
139
|
return problemas;
|
|
124
140
|
}
|
|
125
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* `start` IS THE PAUSE'S, AND A GAME DOES NOT TAKE IT (ADR-0144 §4). Returns the reason, or `null`.
|
|
143
|
+
*
|
|
144
|
+
* ⚠️ THIS IS THE ONE CLAUSE OF THAT RECORD THAT ADDS A RESTRICTION instead of reusing something that was
|
|
145
|
+
* already there, and it is written down — rather than discovered in a conflict — because the record asked
|
|
146
|
+
* for exactly that. Since ADR-0122 the pause is not declinable, and `start` is the only position that
|
|
147
|
+
* reaches it: a game that claimed it for something else would be declining the pause by the back door, and
|
|
148
|
+
* the child would get four settings panels that are mounted, in the document, and unreachable.
|
|
149
|
+
*
|
|
150
|
+
* 📌 SEPARATE FROM `presetProblems`, and on purpose. That one answers «is this preset well formed?» and
|
|
151
|
+
* nobody calls it yet (issue for the wiring); this one is a PRE-CONDITION the boot refuses on, which is a
|
|
152
|
+
* different rubric — a malformed label degrades a remap screen, a stolen `start` removes the pause.
|
|
153
|
+
*
|
|
154
|
+
* 📌 `select` has its own sibling below, since ADR-0155 made it the door to the pause menus. Until then it stayed
|
|
155
|
+
* free on purpose: refusing it would have been deciding, in advance, something nobody had decided.
|
|
156
|
+
*/
|
|
157
|
+
export function startClaimProblem(p) {
|
|
158
|
+
if (!p || p.start === undefined)
|
|
159
|
+
return null;
|
|
160
|
+
return 'preset: «start» is the position that opens the pause (ADR-0144 §4) and a game may not claim it; '
|
|
161
|
+
+ 'use one of the eight verb positions instead (action1..action4, leftShoulder, leftTrigger, rightShoulder, rightTrigger)';
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* `select` OPENS THE PAUSE MENUS, AND A GAME DOES NOT TAKE IT EITHER (ADR-0155 §4). Returns the reason, or `null`.
|
|
165
|
+
*
|
|
166
|
+
* ⚠️ The same argument as `start`, one door over: START is now the quick pause and SELECT the six-item card, so
|
|
167
|
+
* a game claiming `select` would leave quitting, the number of players and the inclusion settings unreachable.
|
|
168
|
+
* 📏 Measured when written: no game repository declares `select` in a preset.
|
|
169
|
+
*/
|
|
170
|
+
export function selectClaimProblem(p) {
|
|
171
|
+
if (!p || p.select === undefined)
|
|
172
|
+
return null;
|
|
173
|
+
return 'preset: «select» is the position that opens the pause menus (ADR-0155 §4) and a game may not claim it; '
|
|
174
|
+
+ 'use one of the eight verb positions instead (action1..action4, leftShoulder, leftTrigger, rightShoulder, rightTrigger)';
|
|
175
|
+
}
|
|
176
|
+
/** Is it a known action? A boundary guard for data that came from outside (a saved map, a remap). */
|
|
126
177
|
export function isAction(x) {
|
|
127
178
|
return typeof x === 'string' && ACTIONS.includes(x);
|
|
128
179
|
}
|
|
129
180
|
/**
|
|
130
|
-
*
|
|
181
|
+
* Is a declaration of the actions a game uses well formed? Returns the problems — EMPTY means conformant.
|
|
131
182
|
*
|
|
132
|
-
* ⚠️
|
|
133
|
-
* `left`/`right`;
|
|
134
|
-
*
|
|
135
|
-
*
|
|
183
|
+
* ⚠️ REQUIRING THE FOUR DIRECTIONS WOULD BE WRONG, and the temptation is strong: a quiz walks by `up`/`down` and uses
|
|
184
|
+
* no `left`/`right`; a one-button game uses none. The game decides the set. What this checks is that the set is
|
|
185
|
+
* NAMEABLE and not empty — a game with no action cannot be played, and that would otherwise fail in silence in the
|
|
186
|
+
* first transport that tried to bind to nothing.
|
|
136
187
|
*/
|
|
137
188
|
export function actionSetProblems(used) {
|
|
138
189
|
const p = [];
|
|
@@ -140,9 +191,9 @@ export function actionSetProblems(used) {
|
|
|
140
191
|
return ['action set: missing'];
|
|
141
192
|
if (used.length === 0)
|
|
142
193
|
return ['action set: empty - a game with no action cannot be played'];
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
145
|
-
p.push(`action set: unknown action(s) ${
|
|
194
|
+
const unknown = used.filter((a) => !isAction(a));
|
|
195
|
+
if (unknown.length)
|
|
196
|
+
p.push(`action set: unknown action(s) ${unknown.join(', ')}`);
|
|
146
197
|
if (new Set(used).size !== used.length)
|
|
147
198
|
p.push('action set: has a repeated action');
|
|
148
199
|
return p;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
/** The calm cycle: 0 = normal · 1 = quiet (reduces) · 2 = silent (switches off). */
|
|
3
|
+
export declare const CALM_NAMES: readonly string[];
|
|
4
|
+
/** The audio categories calm mode governs. The others are left intact on purpose (see the header). */
|
|
5
|
+
export declare const CALM_AUDIO_CATS: readonly string[];
|
|
6
|
+
/** One step of the cycle. */
|
|
7
|
+
export declare const nextCalmMode: (cur: number) => number;
|
|
8
|
+
/**
|
|
9
|
+
* The stored level, sanitised, with the caller's fallback.
|
|
10
|
+
*
|
|
11
|
+
* ⚠️ Data from the browser is data from OUTSIDE: an invented level would pick `CALM_NAMES[3]`, which is `undefined`, and the
|
|
12
|
+
* announcement to the screen reader would come out empty — the child who depends on it would hear silence and not know which
|
|
13
|
+
* level she is in.
|
|
14
|
+
*/
|
|
15
|
+
export declare function sanitiseTeaLevel(raw: number, fallback: number): number;
|
|
16
|
+
/**
|
|
17
|
+
* What the level does to ONE audio category.
|
|
18
|
+
*
|
|
19
|
+
* 📌 The clamp of level 1 is DESTRUCTIVE, and it is in plain sight for that reason: it writes 0.3 over the volume the child
|
|
20
|
+
* chose, and going back to level 0 returns the stored value, not the one she had before. Extracted so that this can be
|
|
21
|
+
* measured by a case.
|
|
22
|
+
*/
|
|
23
|
+
export declare function calmAudioPlan(calmMode: number, vol: number): {
|
|
24
|
+
on: boolean;
|
|
25
|
+
vol: number;
|
|
26
|
+
};
|
|
27
|
+
/** What the level does to the two reduced-motion flags. */
|
|
28
|
+
export declare function calmMotionPlan(calmMode: number): {
|
|
29
|
+
sceneReduced: boolean;
|
|
30
|
+
charFrozen: boolean;
|
|
31
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// core/calm-mode — SENSORY COMFORT IN THREE LEVELS, and what each one silences (ADR-0028; issue #203).
|
|
3
|
+
//
|
|
4
|
+
// 🔴 WHY THIS LEFT `ui/pause-icons`: that module had reached 695 lines of code and 127 decision nodes (ADR-0221), and this
|
|
5
|
+
// group is not about ICONS. It is about what a child who cannot bear noise needs the engine to silence — the icon is one of
|
|
6
|
+
// the surfaces she asks through; the panel row is another. A module that answers «what does level 2 do to the audio?» should
|
|
7
|
+
// not require reading a file about the accessibility bar to be found.
|
|
8
|
+
//
|
|
9
|
+
// ⚠️ A LEAF MODULE: zero imports, zero DOM, zero storage. Everything here is a question with an answer — which is what makes
|
|
10
|
+
// the destructive clamp of level 1 testable without mounting anything.
|
|
11
|
+
//
|
|
12
|
+
// 📌 WHAT IT NEVER TOUCHES, and it is the decision that defines it: TTS, sonar, ledge guard and guide. The calm level is about
|
|
13
|
+
// NOISE, not about losing navigation — a child in silent mode still needs to hear where she is.
|
|
14
|
+
/** The calm cycle: 0 = normal · 1 = quiet (reduces) · 2 = silent (switches off). */
|
|
15
|
+
export const CALM_NAMES = ['calm.off', 'calm.quiet', 'calm.silent'];
|
|
16
|
+
/** The audio categories calm mode governs. The others are left intact on purpose (see the header). */
|
|
17
|
+
export const CALM_AUDIO_CATS = ['ambient', 'music', 'earcons', 'interact'];
|
|
18
|
+
/** One step of the cycle. */
|
|
19
|
+
export const nextCalmMode = (cur) => (cur + 1) % CALM_NAMES.length;
|
|
20
|
+
/**
|
|
21
|
+
* The stored level, sanitised, with the caller's fallback.
|
|
22
|
+
*
|
|
23
|
+
* ⚠️ Data from the browser is data from OUTSIDE: an invented level would pick `CALM_NAMES[3]`, which is `undefined`, and the
|
|
24
|
+
* announcement to the screen reader would come out empty — the child who depends on it would hear silence and not know which
|
|
25
|
+
* level she is in.
|
|
26
|
+
*/
|
|
27
|
+
export function sanitiseTeaLevel(raw, fallback) {
|
|
28
|
+
return Number.isInteger(raw) && raw >= 0 && raw < CALM_NAMES.length ? raw : fallback;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* What the level does to ONE audio category.
|
|
32
|
+
*
|
|
33
|
+
* 📌 The clamp of level 1 is DESTRUCTIVE, and it is in plain sight for that reason: it writes 0.3 over the volume the child
|
|
34
|
+
* chose, and going back to level 0 returns the stored value, not the one she had before. Extracted so that this can be
|
|
35
|
+
* measured by a case.
|
|
36
|
+
*/
|
|
37
|
+
export function calmAudioPlan(calmMode, vol) {
|
|
38
|
+
if (calmMode === 0)
|
|
39
|
+
return { on: true, vol };
|
|
40
|
+
if (calmMode === 1)
|
|
41
|
+
return { on: true, vol: Math.min(vol, 0.3) };
|
|
42
|
+
return { on: false, vol };
|
|
43
|
+
}
|
|
44
|
+
/** What the level does to the two reduced-motion flags. */
|
|
45
|
+
export function calmMotionPlan(calmMode) {
|
|
46
|
+
return { sceneReduced: calmMode >= 1, charFrozen: calmMode === 2 };
|
|
47
|
+
}
|