@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
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
/**
|
|
3
|
+
* The devices a child plays through. Closed: a new transport has to decide its rule here.
|
|
4
|
+
*
|
|
5
|
+
* The values stay Portuguese because they are stored — `latch-scope.latchKey` puts the transport name in the
|
|
6
|
+
* key — and renaming a stored value loses what the child saved.
|
|
7
|
+
*/
|
|
8
|
+
export type TransportName = 'teclado' | 'gamepad' | 'toque' | 'olhos' | 'rosto' | 'gestos' | 'fala';
|
|
9
|
+
/**
|
|
10
|
+
* THE UNION AS A VALUE, because there is one place where it has to be checked at runtime.
|
|
11
|
+
*
|
|
12
|
+
* ⚠️ IT EXISTS BECAUSE OF A BOUNDARY, and that is the only reason that justifies it: `input/synthetic-source`
|
|
13
|
+
* reads the transport from an EXPANDO hung on a `KeyboardEvent` — an object this code did not build and that
|
|
14
|
+
* any script on the page can build. A value crossing that boundary is not a `TransportName` because TypeScript
|
|
15
|
+
* says so; it is a `string` until someone checks it. Without the list, `'olho'` would enter the origin map as a
|
|
16
|
+
* phantom transport, and nothing would say so.
|
|
17
|
+
*
|
|
18
|
+
* 📌 This is not the list-beside-the-union defect this repository has already undone three times (`RM_KEYS`,
|
|
19
|
+
* the reduced-motion labels, the storage keys), because the guard below belongs to the COMPILER: the two cannot
|
|
20
|
+
* diverge. A copy that cannot diverge is a projection, not a second source.
|
|
21
|
+
*/
|
|
22
|
+
export declare const TRANSPORT_NAMES: readonly ["teclado", "gamepad", "toque", "olhos", "rosto", "gestos", "fala"];
|
|
23
|
+
/**
|
|
24
|
+
* Is this thing that came from outside really a transport?
|
|
25
|
+
*
|
|
26
|
+
* ⚠️ The question is not about security — every script on this page is ours, and whoever wanted to lie would
|
|
27
|
+
* use a VALID value. It is about correctness: it keeps a wrong or missing stamp from becoming a silent entry in
|
|
28
|
+
* `keySource`, the structure the whole latch depends on.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isTransportName(v: unknown): v is TransportName;
|
|
31
|
+
/**
|
|
32
|
+
* THE FOUR THAT REQUIRE EXPLICIT ENABLING and, once enabled, rule over all the others (rule 4).
|
|
33
|
+
*
|
|
34
|
+
* ⚠️ It is the same list as `ONE_COMMAND_AT_A_TIME` in `input/latch-scope`, and the match is no accident: these
|
|
35
|
+
* are the transports that send one command at a time. What ADR-0109 added — that enabling them turns latching on
|
|
36
|
+
* for the rest — is the model of `latchNow`, which ADR-0113 superseded; since ADR-0249 their own latch starts as
|
|
37
|
+
* the game's `holdsKeys()` and the child may change it.
|
|
38
|
+
*/
|
|
39
|
+
export declare const NEED_ENABLING: ReadonlySet<TransportName>;
|
|
40
|
+
/** The transport that turns latching on by itself, with no priority involved (rule 2). */
|
|
41
|
+
export declare const LATCH_OF_THEIR_OWN: ReadonlySet<TransportName>;
|
|
42
|
+
export interface InputState {
|
|
43
|
+
/** Which device this player is using NOW. */
|
|
44
|
+
readonly inUse: TransportName;
|
|
45
|
+
/**
|
|
46
|
+
* Was the camera/microphone enabled? ⚠️ Once `true`, it NEVER goes back to `false` through an edge — only an
|
|
47
|
+
* explicit decision turns it off, and ADR-0109 §4 says the child does not own that decision. See
|
|
48
|
+
* `disableAssisted`.
|
|
49
|
+
*/
|
|
50
|
+
readonly assistedOn: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* THE INITIAL STATE: keyboard, without latching.
|
|
54
|
+
*
|
|
55
|
+
* ⚠️ Rule 1 says "pad AND keyboard, both without latching", and that is why the default can name just one
|
|
56
|
+
* without lying: between the two, the answer to the only question this module asks — is latching on? — is the
|
|
57
|
+
* SAME. `inUse` only starts telling them apart when someone wants to SHOW the current device, which is another
|
|
58
|
+
* question, and ADR-0109 explicitly leaves it undecided.
|
|
59
|
+
*/
|
|
60
|
+
export declare const DEFAULT_INPUT_STATE: InputState;
|
|
61
|
+
/**
|
|
62
|
+
* IS LATCHING ON NOW? — ⚠️ **DO NOT ASK THIS FUNCTION.** See the paragraph below.
|
|
63
|
+
*
|
|
64
|
+
* ⚠️ The assisted priority comes FIRST, and the order is the whole of rule 4: while it is on, no other device
|
|
65
|
+
* turns latching off — not even the keyboard, which otherwise would. Swapping these two lines is the defect that
|
|
66
|
+
* would lock a child out of their own game, and it is silent.
|
|
67
|
+
*
|
|
68
|
+
* @deprecated 🔴 **THIS FUNCTION IMPLEMENTS THE MODEL ADR-0113 SUPERSEDED**, and stays exported because it is
|
|
69
|
+
* published surface (`./input/*.js`) and because the record has historical value — not because it is the answer.
|
|
70
|
+
*
|
|
71
|
+
* ADR-0109 decided latching **by device alone**: assisted on → yes; touch → yes; everything else → no. ADR-0113
|
|
72
|
+
* withdrew that clause, with the Dev's reason: latching is a **caps lock stored with the controller's mapping**,
|
|
73
|
+
* and the value the child saved counts.
|
|
74
|
+
*
|
|
75
|
+
* 🔴 THE DIVERGENCE HAS A CONCRETE CHILD, and it is the one who prompted the record: someone with a motor
|
|
76
|
+
* difficulty who plays on the KEYBOARD and saved latching on. This function returns `false` for them —
|
|
77
|
+
* `teclado` is not in `LATCH_OF_THEIR_OWN` — and that is exactly the control they would lose.
|
|
78
|
+
* `latch-scope.latchOf` returns `true`, because it reads what they saved.
|
|
79
|
+
*
|
|
80
|
+
* ⚠️ AND THE TOUCH CLAUSE FELL TOO: under ADR-0113 touch is a transport like the others — its value is a choice
|
|
81
|
+
* and is stored. Eyes, face, gestures and speech differ only in where their DEFAULT comes from — the game's
|
|
82
|
+
* `holdsKeys()` (ADR-0249, `latch-scope.latchDefaultFromGame`) — and their value is a choice too.
|
|
83
|
+
*
|
|
84
|
+
* **The right answer is `latch-scope.latchOf(inputState.inUse, reading)`.** The role left to this module is
|
|
85
|
+
* what its name says: WHICH transport is in use — which is what feeds that first argument.
|
|
86
|
+
* `tests/latching-per-transport.node.test.js` asserts this function still has no consumer.
|
|
87
|
+
*/
|
|
88
|
+
export declare function latchNow(inputState: InputState): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* AN EDGE ARRIVED, with its origin. Returns the NEW state.
|
|
91
|
+
*
|
|
92
|
+
* ⚠️ An edge from an assisted transport does NOT enable it. Enabling is an explicit act (rule 4: they "have to
|
|
93
|
+
* be enabled"), and letting an edge do it would mean a webcam false positive — a shadow, a second face passing
|
|
94
|
+
* by — locked latching on for everyone without anyone asking.
|
|
95
|
+
*/
|
|
96
|
+
export declare function afterEdge(inputState: InputState, origin: TransportName): InputState;
|
|
97
|
+
/** The child (or whoever is with them) enabled the camera/microphone. From here on, latching is law. */
|
|
98
|
+
export declare function enableAssisted(inputState: InputState): InputState;
|
|
99
|
+
/**
|
|
100
|
+
* DISABLE the assisted transports. It exists, and ADR-0109 says whose it is: NOT the child's during a match.
|
|
101
|
+
*
|
|
102
|
+
* ⚠️ It stays exported because turning the camera off has to be possible somewhere — switching users, closing
|
|
103
|
+
* the game, an adult reconfiguring. What §4 forbids is offering it as a button beside the game. A function that
|
|
104
|
+
* exists and is not offered differs from a function that does not exist: the first says where the decision
|
|
105
|
+
* lives.
|
|
106
|
+
*/
|
|
107
|
+
export declare function disableAssisted(inputState: InputState): InputState;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// input/transport-in-use — THE LATCH FOLLOWS THE DEVICE IN USE (ADR-0109), the pure half.
|
|
3
|
+
//
|
|
4
|
+
// ========================= WHAT THIS MODULE IS =========================
|
|
5
|
+
// The automaton of ADR-0109 §1's four rules, with no DOM, no storage and no events. It takes EDGES with their
|
|
6
|
+
// origin and returns state; whoever asks "is latching on now?" asks the state.
|
|
7
|
+
//
|
|
8
|
+
// 1. By default, pad and keyboard, both WITHOUT latching.
|
|
9
|
+
// 2. A mouse click or a touch on the screen → on-screen controls WITH latching.
|
|
10
|
+
// 3. Pressing a key returns the keyboard WITHOUT latching; using the pad does the same.
|
|
11
|
+
// 4. Camera and microphone have to be enabled; once enabled, they turn latching on for ALL the other
|
|
12
|
+
// controls, with NO way to turn it off. They take priority.
|
|
13
|
+
//
|
|
14
|
+
// ⚠️ WHY THIS IS AN AUTOMATON AND NOT A STORED VALUE — and it is what ADR-0109 supersedes of ADR-0104 §C.
|
|
15
|
+
// Latching was a CHOICE stored per transport, and issue #114 measured that its wiring could not be written: the
|
|
16
|
+
// edge's origin is erased at the door (`input/state.keys` is a `Set<string>` of CODES, and touch and the webcam
|
|
17
|
+
// write into it). The Dev decided the BEHAVIOUR, and the behaviour picks the mechanism.
|
|
18
|
+
//
|
|
19
|
+
// ⚠️ AND RULE 3 IS WHY IT TAKES TWO THINGS, not one. "Pressing a key returns the keyboard without latching" is
|
|
20
|
+
// TWO facts: an EVENT whose origin must be known, and a MODE that persists until the next switch. An edge keeps
|
|
21
|
+
// no state; a stored mode does not detect its own switch. Neither half expresses the rule; together they do.
|
|
22
|
+
// This file is the second half — the MODE.
|
|
23
|
+
//
|
|
24
|
+
// 📌 The Dev's image, kept because it says the thing: it is a CAPS LOCK ON A KEYBOARD WITH MEMORY. A mode and
|
|
25
|
+
// not a momentary state; remembered per device; switching devices does not erase what the other remembers.
|
|
26
|
+
/**
|
|
27
|
+
* THE UNION AS A VALUE, because there is one place where it has to be checked at runtime.
|
|
28
|
+
*
|
|
29
|
+
* ⚠️ IT EXISTS BECAUSE OF A BOUNDARY, and that is the only reason that justifies it: `input/synthetic-source`
|
|
30
|
+
* reads the transport from an EXPANDO hung on a `KeyboardEvent` — an object this code did not build and that
|
|
31
|
+
* any script on the page can build. A value crossing that boundary is not a `TransportName` because TypeScript
|
|
32
|
+
* says so; it is a `string` until someone checks it. Without the list, `'olho'` would enter the origin map as a
|
|
33
|
+
* phantom transport, and nothing would say so.
|
|
34
|
+
*
|
|
35
|
+
* 📌 This is not the list-beside-the-union defect this repository has already undone three times (`RM_KEYS`,
|
|
36
|
+
* the reduced-motion labels, the storage keys), because the guard below belongs to the COMPILER: the two cannot
|
|
37
|
+
* diverge. A copy that cannot diverge is a projection, not a second source.
|
|
38
|
+
*/
|
|
39
|
+
export const TRANSPORT_NAMES = ['teclado', 'gamepad', 'toque', 'olhos', 'rosto', 'gestos', 'fala'];
|
|
40
|
+
const _COVERS_THE_TRANSPORTS = true;
|
|
41
|
+
void _COVERS_THE_TRANSPORTS;
|
|
42
|
+
/**
|
|
43
|
+
* Is this thing that came from outside really a transport?
|
|
44
|
+
*
|
|
45
|
+
* ⚠️ The question is not about security — every script on this page is ours, and whoever wanted to lie would
|
|
46
|
+
* use a VALID value. It is about correctness: it keeps a wrong or missing stamp from becoming a silent entry in
|
|
47
|
+
* `keySource`, the structure the whole latch depends on.
|
|
48
|
+
*/
|
|
49
|
+
export function isTransportName(v) {
|
|
50
|
+
return typeof v === 'string' && TRANSPORT_NAMES.includes(v);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* THE FOUR THAT REQUIRE EXPLICIT ENABLING and, once enabled, rule over all the others (rule 4).
|
|
54
|
+
*
|
|
55
|
+
* ⚠️ It is the same list as `ONE_COMMAND_AT_A_TIME` in `input/latch-scope`, and the match is no accident: these
|
|
56
|
+
* are the transports that send one command at a time. What ADR-0109 added — that enabling them turns latching on
|
|
57
|
+
* for the rest — is the model of `latchNow`, which ADR-0113 superseded; since ADR-0249 their own latch starts as
|
|
58
|
+
* the game's `holdsKeys()` and the child may change it.
|
|
59
|
+
*/
|
|
60
|
+
export const NEED_ENABLING = new Set(['olhos', 'rosto', 'gestos', 'fala']);
|
|
61
|
+
/** The transport that turns latching on by itself, with no priority involved (rule 2). */
|
|
62
|
+
export const LATCH_OF_THEIR_OWN = new Set(['toque']);
|
|
63
|
+
/**
|
|
64
|
+
* THE INITIAL STATE: keyboard, without latching.
|
|
65
|
+
*
|
|
66
|
+
* ⚠️ Rule 1 says "pad AND keyboard, both without latching", and that is why the default can name just one
|
|
67
|
+
* without lying: between the two, the answer to the only question this module asks — is latching on? — is the
|
|
68
|
+
* SAME. `inUse` only starts telling them apart when someone wants to SHOW the current device, which is another
|
|
69
|
+
* question, and ADR-0109 explicitly leaves it undecided.
|
|
70
|
+
*/
|
|
71
|
+
export const DEFAULT_INPUT_STATE = Object.freeze({ inUse: 'teclado', assistedOn: false });
|
|
72
|
+
/**
|
|
73
|
+
* IS LATCHING ON NOW? — ⚠️ **DO NOT ASK THIS FUNCTION.** See the paragraph below.
|
|
74
|
+
*
|
|
75
|
+
* ⚠️ The assisted priority comes FIRST, and the order is the whole of rule 4: while it is on, no other device
|
|
76
|
+
* turns latching off — not even the keyboard, which otherwise would. Swapping these two lines is the defect that
|
|
77
|
+
* would lock a child out of their own game, and it is silent.
|
|
78
|
+
*
|
|
79
|
+
* @deprecated 🔴 **THIS FUNCTION IMPLEMENTS THE MODEL ADR-0113 SUPERSEDED**, and stays exported because it is
|
|
80
|
+
* published surface (`./input/*.js`) and because the record has historical value — not because it is the answer.
|
|
81
|
+
*
|
|
82
|
+
* ADR-0109 decided latching **by device alone**: assisted on → yes; touch → yes; everything else → no. ADR-0113
|
|
83
|
+
* withdrew that clause, with the Dev's reason: latching is a **caps lock stored with the controller's mapping**,
|
|
84
|
+
* and the value the child saved counts.
|
|
85
|
+
*
|
|
86
|
+
* 🔴 THE DIVERGENCE HAS A CONCRETE CHILD, and it is the one who prompted the record: someone with a motor
|
|
87
|
+
* difficulty who plays on the KEYBOARD and saved latching on. This function returns `false` for them —
|
|
88
|
+
* `teclado` is not in `LATCH_OF_THEIR_OWN` — and that is exactly the control they would lose.
|
|
89
|
+
* `latch-scope.latchOf` returns `true`, because it reads what they saved.
|
|
90
|
+
*
|
|
91
|
+
* ⚠️ AND THE TOUCH CLAUSE FELL TOO: under ADR-0113 touch is a transport like the others — its value is a choice
|
|
92
|
+
* and is stored. Eyes, face, gestures and speech differ only in where their DEFAULT comes from — the game's
|
|
93
|
+
* `holdsKeys()` (ADR-0249, `latch-scope.latchDefaultFromGame`) — and their value is a choice too.
|
|
94
|
+
*
|
|
95
|
+
* **The right answer is `latch-scope.latchOf(inputState.inUse, reading)`.** The role left to this module is
|
|
96
|
+
* what its name says: WHICH transport is in use — which is what feeds that first argument.
|
|
97
|
+
* `tests/latching-per-transport.node.test.js` asserts this function still has no consumer.
|
|
98
|
+
*/
|
|
99
|
+
export function latchNow(inputState) {
|
|
100
|
+
if (inputState.assistedOn)
|
|
101
|
+
return true;
|
|
102
|
+
return LATCH_OF_THEIR_OWN.has(inputState.inUse);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* AN EDGE ARRIVED, with its origin. Returns the NEW state.
|
|
106
|
+
*
|
|
107
|
+
* ⚠️ An edge from an assisted transport does NOT enable it. Enabling is an explicit act (rule 4: they "have to
|
|
108
|
+
* be enabled"), and letting an edge do it would mean a webcam false positive — a shadow, a second face passing
|
|
109
|
+
* by — locked latching on for everyone without anyone asking.
|
|
110
|
+
*/
|
|
111
|
+
export function afterEdge(inputState, origin) {
|
|
112
|
+
if (inputState.inUse === origin)
|
|
113
|
+
return inputState; // no change: returns the SAME object, not a copy
|
|
114
|
+
return { inUse: origin, assistedOn: inputState.assistedOn };
|
|
115
|
+
}
|
|
116
|
+
/** The child (or whoever is with them) enabled the camera/microphone. From here on, latching is law. */
|
|
117
|
+
export function enableAssisted(inputState) {
|
|
118
|
+
return inputState.assistedOn ? inputState : { inUse: inputState.inUse, assistedOn: true };
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* DISABLE the assisted transports. It exists, and ADR-0109 says whose it is: NOT the child's during a match.
|
|
122
|
+
*
|
|
123
|
+
* ⚠️ It stays exported because turning the camera off has to be possible somewhere — switching users, closing
|
|
124
|
+
* the game, an adult reconfiguring. What §4 forbids is offering it as a button beside the game. A function that
|
|
125
|
+
* exists and is not offered differs from a function that does not exist: the first says where the decision
|
|
126
|
+
* lives.
|
|
127
|
+
*/
|
|
128
|
+
export function disableAssisted(inputState) {
|
|
129
|
+
return inputState.assistedOn ? { inUse: inputState.inUse, assistedOn: false } : inputState;
|
|
130
|
+
}
|
|
@@ -1,176 +1,149 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
import { type Action } from '../core/actions.js';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* HOW MANY PLACES EACH REAL TRANSPORT HAS, and where each number comes from. They were measured and lived only in
|
|
5
|
+
* the test; a number that exists only in a test reaches no child.
|
|
6
6
|
*
|
|
7
|
-
* · `gamepad: 17` —
|
|
8
|
-
* · `toque:
|
|
9
|
-
* · `teclado: ACTIONS.length` — ⚠️
|
|
7
|
+
* · `gamepad: 17` — the Gamepad API's "standard" mapping declares seventeen buttons. Not our choice.
|
|
8
|
+
* · `toque: 13` — `TOUCH_DEFAULT` (input/devices) names thirteen slots: the nine plus ADR-0160's four shoulders.
|
|
9
|
+
* · `teclado: ACTIONS.length` — ⚠️ and this is the one that needed a decision.
|
|
10
10
|
*
|
|
11
|
-
* ⚠️
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* ⚠️ THE KEYBOARD'S NUMBER IS NOT THE NUMBER OF KEYS, nor the number of bindings in the current scheme. Not the keys,
|
|
12
|
+
* because a hundred keys are not a hundred places a child finds and remembers; not the scheme, because the scheme
|
|
13
|
+
* grows, and the limit would become the configuration instead of the device.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* It is `ACTIONS.length` because what limits a keyboard, in this product's practice, is THE VOCABULARY THE ENGINE
|
|
16
|
+
* CAN NAME: a transport that covers every position that exists cannot be the short one. Derived and not written by
|
|
17
|
+
* hand on purpose — when the vocabulary grows (it went from nine to fourteen), this number grows with it and never
|
|
18
|
+
* starts lying.
|
|
19
19
|
*/
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const SLOTS: Readonly<{
|
|
21
21
|
gamepad: 17;
|
|
22
|
-
toque:
|
|
22
|
+
toque: 13;
|
|
23
23
|
teclado: 14;
|
|
24
24
|
}>;
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
*
|
|
28
|
-
* ⚠️ E A DECISÃO É NÃO PERGUNTAR AO APARELHO. O `navigator.maxTouchPoints` existe, responde depressa, e
|
|
29
|
-
* MENTE — mente para cima: muitos aparelhos anunciam cinco e reconhecem dois. Um modelo assente nele falha
|
|
30
|
-
* exactamente no telemóvel barato da escola pública, que é o pilar 1 deste projeto, e falha em silêncio: a
|
|
31
|
-
* criança tenta correr e pular ao mesmo tempo, não acontece nada, e ela conclui que o jogo está partido.
|
|
32
|
-
*
|
|
33
|
-
* Um piso declarado não pode errar para cima. Ele erra para baixo — um aparelho que segurava três fica
|
|
34
|
-
* servido por dois —, e esse erro tem conserto: a opção do terceiro botão, PROVADA POR TESTE, porque um
|
|
35
|
-
* gesto real é a única evidência que um aparelho não consegue falsificar. Nada é recusado e nada é assumido.
|
|
36
|
-
*
|
|
37
|
-
* ⚠️ NÃO É UM REGISTO DE TETOS POR TRANSPORTE, e o ADR diz isso em `more-information`: só o toque tem número
|
|
38
|
-
* declarado. O `holds` do `Transport` é opcional justamente por isso — ausente significa «não há tecto
|
|
39
|
-
* conhecido», não «segura uma». Um registo de tetos para teclado e controle é uma mudança maior, e nada
|
|
40
|
-
* precisa dela hoje.
|
|
41
|
-
*/
|
|
42
|
-
export declare const SEGURA_TOQUE = 2;
|
|
43
|
-
/** Como se descobre que cada transporte está aqui AGORA. Injetado: nenhuma destas perguntas é pura. */
|
|
44
|
-
export interface Disponibilidade {
|
|
25
|
+
/** How each transport is found to be here NOW. Injected: none of these questions is pure. */
|
|
26
|
+
export interface Availability {
|
|
45
27
|
gamepad: () => boolean;
|
|
46
|
-
|
|
47
|
-
|
|
28
|
+
touch: () => boolean;
|
|
29
|
+
keyboard: () => boolean;
|
|
48
30
|
/**
|
|
49
|
-
*
|
|
31
|
+
* Is there a MOUSE here? (ADR-0112)
|
|
50
32
|
*
|
|
51
|
-
* ⚠️
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
33
|
+
* ⚠️ IT IS NOT A TRANSPORT OF ITS OWN, which is why it enters as a question and not as a fourth line of
|
|
34
|
+
* `defaultTransports`: a mouse alone does not carry the fourteen positions. It is the CONTINUOUS SIGNAL beside the
|
|
35
|
+
* keyboard — the Dev's sentence, «no caso do teclado, o sinal contínuo passa a ser o mouse» —, and it is what gives
|
|
36
|
+
* a foundation to ADR-0074's transports 8 and 9, which that record declared as having none.
|
|
55
37
|
*/
|
|
56
|
-
|
|
38
|
+
mouse: () => boolean;
|
|
57
39
|
}
|
|
58
40
|
/**
|
|
59
|
-
*
|
|
41
|
+
* The three transports this engine knows how to offer today.
|
|
60
42
|
*
|
|
61
|
-
* ⚠️
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
43
|
+
* ⚠️ THE KEYBOARD DETECTION IS IMPRECISE AND THAT IS ACCEPTABLE — but only because the screen that consumes this
|
|
44
|
+
* INFORMS instead of REFUSING. No API says "a physical keyboard is plugged in"; what the root asks is
|
|
45
|
+
* `pointer:coarse && hover:none`, and a tablet WITH a keyboard answers "touch" to that. If the screen blocked, that
|
|
46
|
+
* tablet would get a false refusal in a game it plays. Since it only says what is missing and lets the child go on,
|
|
47
|
+
* the error costs one extra sentence and never a closed door.
|
|
66
48
|
*/
|
|
67
|
-
export declare function
|
|
68
|
-
/**
|
|
49
|
+
export declare function defaultTransports(d: Availability): Transport[];
|
|
50
|
+
/** A transport, as it declares itself. Zero meaning: how many places, and whether it is here now. */
|
|
69
51
|
export interface Transport {
|
|
70
|
-
/**
|
|
52
|
+
/** A stable identifier, for saved preferences. Never reaches a person. */
|
|
71
53
|
readonly id: string;
|
|
72
|
-
/**
|
|
54
|
+
/** How many ASSIGNABLE places. It is the number the guarantee's arithmetic uses. */
|
|
73
55
|
readonly slots: number;
|
|
74
56
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
57
|
+
* How many positions it HOLDS AT ONCE, when that is known. A different axis from `slots`: the on-screen control
|
|
58
|
+
* has thirteen places and holds two.
|
|
77
59
|
*
|
|
78
|
-
* ⚠️
|
|
79
|
-
*
|
|
80
|
-
*
|
|
60
|
+
* ⚠️ ABSENT MEANS "NO KNOWN CEILING", not "holds one". Today only touch declares a number (`HOLDS_TOUCH`), because
|
|
61
|
+
* only about it is there a decision — see the note there. Reading the absence as zero would make every transport
|
|
62
|
+
* without a number suddenly fail, which is the opposite of what an optional field should do.
|
|
81
63
|
*/
|
|
82
64
|
readonly holds?: number;
|
|
83
65
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
66
|
+
* Is it available ON THIS device, NOW? A function and not a value: a pad gets plugged in mid-match, and a touch
|
|
67
|
+
* screen appears when the child turns the tablet.
|
|
86
68
|
*/
|
|
87
69
|
readonly available: () => boolean;
|
|
88
70
|
/**
|
|
89
|
-
*
|
|
71
|
+
* Does this transport offer a POINTER — a continuous position (ADR-0112)?
|
|
90
72
|
*
|
|
91
|
-
* ⚠️
|
|
92
|
-
*
|
|
73
|
+
* ⚠️ A FUNCTION AND NOT A BOOLEAN, for the same reason written on `available` above: a mouse gets plugged in
|
|
74
|
+
* mid-match, just like a pad. A fixed value here would answer with the state at boot.
|
|
93
75
|
*
|
|
94
|
-
* ⚠️
|
|
95
|
-
*
|
|
96
|
-
*
|
|
76
|
+
* ⚠️ ABSENT MEANS "DOES NOT OFFER", and here — unlike `holds` — reading the absence that way is right: the pointer
|
|
77
|
+
* is a capability one DECLARES, and a transport that does not declare it does not have it. `holds` is the opposite
|
|
78
|
+
* because there the absence is "no known ceiling", and reading it as zero would fail everyone.
|
|
97
79
|
*/
|
|
98
|
-
readonly
|
|
80
|
+
readonly points?: () => boolean;
|
|
99
81
|
}
|
|
100
|
-
/**
|
|
101
|
-
export declare function carries(t: Transport,
|
|
102
|
-
/**
|
|
103
|
-
* Este transporte SEGURA quantas o jogo pede ao mesmo tempo? (ADR-0104 §A.)
|
|
104
|
-
*
|
|
105
|
-
* ⚠️ TRANSPORTE SEM TECTO DECLARADO RESPONDE SIM, e a escolha é deliberada: o `holds` ausente quer dizer «não
|
|
106
|
-
* medimos isto», e recusar por falta de medida transformaria uma ignorância em acusação — o teclado e o
|
|
107
|
-
* controle passariam a reprovar todos os jogos por não terem número nenhum. Onde não há decisão, o modelo
|
|
108
|
-
* cala; é o toque que tem decisão, e é só ele que pode reprovar aqui.
|
|
109
|
-
*/
|
|
110
|
-
export declare function holds(t: Transport, pedidas: number): boolean;
|
|
82
|
+
/** Does this transport carry this set of actions? Arithmetic, as ADR-0079 §3 describes it. */
|
|
83
|
+
export declare function carries(t: Transport, actions: readonly Action[]): boolean;
|
|
111
84
|
/**
|
|
112
|
-
*
|
|
85
|
+
* The AVAILABLE transports that carry this set.
|
|
113
86
|
*
|
|
114
|
-
* ⚠️
|
|
115
|
-
*
|
|
87
|
+
* ⚠️ Availability and capacity are checked in this order on purpose: a transport that would fit but is not plugged
|
|
88
|
+
* in is no answer for a child sitting at the device now.
|
|
116
89
|
*/
|
|
117
|
-
export declare function carriedBy(
|
|
90
|
+
export declare function carriedBy(list: readonly Transport[], actions: readonly Action[]): Transport[];
|
|
118
91
|
/**
|
|
119
|
-
*
|
|
92
|
+
* ADR-0079 §3's guarantee, as a yes-or-no question.
|
|
120
93
|
*
|
|
121
|
-
* ⚠️
|
|
122
|
-
*
|
|
123
|
-
*
|
|
94
|
+
* ⚠️ AN EMPTY SET OF ACTIONS RETURNS `false`, not a vacuous `true`. A game that declares no action is not a game any
|
|
95
|
+
* transport serves — it is a game nobody can play, and `actionSetProblems` already fails it. Returning `true` here
|
|
96
|
+
* would hide that defect behind this function.
|
|
124
97
|
*/
|
|
125
|
-
export declare function reachable(
|
|
126
|
-
/**
|
|
127
|
-
export interface
|
|
98
|
+
export declare function reachable(list: readonly Transport[], actions: readonly Action[]): boolean;
|
|
99
|
+
/** What the selection screen has to say, and what it needs to know to say it. */
|
|
100
|
+
export interface Reach {
|
|
128
101
|
/**
|
|
129
|
-
*
|
|
130
|
-
* mesmo tempo**.
|
|
102
|
+
* True = at least one available transport carries the set **and holds as many as the game asks at once**.
|
|
131
103
|
*
|
|
132
|
-
* ⚠️
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
104
|
+
* ⚠️ THE SECOND HALF OF THIS SENTENCE (ADR-0104) fixed a blind spot nobody had named: the platformer declared nine
|
|
105
|
+
* actions, touch had nine places, `ok` said yes — and running, walking and jumping at once are three fingers a
|
|
106
|
+
* two-touch phone does not have. `ok` claimed "playable" about a game that was not, which is the worst thing this
|
|
107
|
+
* field could do.
|
|
136
108
|
*/
|
|
137
109
|
readonly ok: boolean;
|
|
138
|
-
/**
|
|
139
|
-
readonly
|
|
140
|
-
/**
|
|
141
|
-
readonly
|
|
142
|
-
/**
|
|
143
|
-
readonly
|
|
144
|
-
/**
|
|
145
|
-
readonly
|
|
110
|
+
/** How many actions the game asks for. */
|
|
111
|
+
readonly asked: number;
|
|
112
|
+
/** How many it asks to HOLD at once — the second axis, and what `holdsAtOnce` declares. */
|
|
113
|
+
readonly holdsAsked: number;
|
|
114
|
+
/** Those that would serve if they were plugged in — the actionable information: "plug in a pad". */
|
|
115
|
+
readonly wouldServeIfOn: readonly string[];
|
|
116
|
+
/** The available ones that DO NOT fit, with how many places they have. So the sentence can say the number. */
|
|
117
|
+
readonly short: readonly {
|
|
146
118
|
readonly id: string;
|
|
147
119
|
readonly slots: number;
|
|
148
120
|
}[];
|
|
149
121
|
/**
|
|
150
|
-
*
|
|
122
|
+
* The available ones that REACH the actions but do not hold as many as the game asks at once, with their ceiling.
|
|
151
123
|
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
124
|
+
* It is the third sentence of #112's card, and it needs both numbers — the on-screen control holds two buttons at
|
|
125
|
+
* a time and this game asks for three. Without the ceiling, the sentence would say something is missing without
|
|
126
|
+
* saying what.
|
|
154
127
|
*/
|
|
155
|
-
readonly
|
|
128
|
+
readonly cannotHold: readonly {
|
|
156
129
|
readonly id: string;
|
|
157
130
|
readonly holds: number;
|
|
158
131
|
}[];
|
|
159
|
-
/**
|
|
160
|
-
readonly
|
|
132
|
+
/** Did this game declare that it needs a POINTER? (ADR-0112) */
|
|
133
|
+
readonly needsPointer: boolean;
|
|
161
134
|
/**
|
|
162
|
-
*
|
|
135
|
+
* The available ones that reach the actions AND hold as many as the game asks, and fail ONLY by not pointing.
|
|
163
136
|
*
|
|
164
|
-
* ⚠️
|
|
165
|
-
*
|
|
166
|
-
*
|
|
137
|
+
* ⚠️ ONLY THOSE THAT FAIL JUST ON THIS, by the same rule `cannotHold` follows: a transport on two lists would make
|
|
138
|
+
* #112's card state two problems where there is one, and the child would read two reasons for the same refusal.
|
|
139
|
+
* The list is empty when the game does not ask for a pointer — not "all of them", because none failed.
|
|
167
140
|
*/
|
|
168
|
-
readonly
|
|
141
|
+
readonly cannotPoint: readonly string[];
|
|
169
142
|
}
|
|
170
143
|
/**
|
|
171
|
-
*
|
|
144
|
+
* Measures the reach BEFORE the child starts.
|
|
172
145
|
*
|
|
173
|
-
* ⚠️
|
|
174
|
-
*
|
|
146
|
+
* ⚠️ It returns DATA and not text. The sentence belongs to the interface and has to go through `t()`; returning
|
|
147
|
+
* prose from here would put a language in a module that has none.
|
|
175
148
|
*/
|
|
176
|
-
export declare function
|
|
149
|
+
export declare function reach(list: readonly Transport[], actions: readonly Action[], askedHolds: number, wantsPointer?: boolean): Reach;
|