@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,27 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
import type { Translate } from '../core/i18n.js';
|
|
3
|
+
export interface SimulationListCtx {
|
|
4
|
+
/** Translates in the page's language — the root's translator (ADR-0232 D3). REQUIRED: text built from nowhere is a raw key. */
|
|
5
|
+
t: Translate;
|
|
6
|
+
/** The host's DOM query — this module never reaches a global (ADR-0221 step 7d). */
|
|
7
|
+
readonly find: <T extends Element>(selector: string) => T | null;
|
|
8
|
+
/** Makes an element. Injected for the same reason: no `document` in here. */
|
|
9
|
+
readonly make: <K extends keyof HTMLElementTagNameMap>(tag: K) => HTMLElementTagNameMap[K];
|
|
10
|
+
/**
|
|
11
|
+
* The simulations offered, in the order the child reads them.
|
|
12
|
+
*
|
|
13
|
+
* 📌 DATA AND NOT A CONSTANT OF THIS MODULE: which simulations an engine offers is a decision of whoever composes it, and
|
|
14
|
+
* a key this module cannot resolve is then something a caller can actually do — which is what lets the guard below be
|
|
15
|
+
* driven by a case instead of only protecting a future edit of a private list.
|
|
16
|
+
*/
|
|
17
|
+
readonly keys: readonly string[];
|
|
18
|
+
/** What is running on the world right now. The list always shows IT, so a refused choice (ADR-0076) comes back by itself. */
|
|
19
|
+
readonly running: () => string | null;
|
|
20
|
+
/** The child picked one. */
|
|
21
|
+
readonly picked: (key: string) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface SimulationList {
|
|
24
|
+
/** Builds the row if it is not there yet, and writes every word of it in the language of now. */
|
|
25
|
+
render(listSelector: string): void;
|
|
26
|
+
}
|
|
27
|
+
export declare function createSimulationList(ctx: SimulationListCtx): SimulationList;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// ui/simulation-list — THE ONE LIST OF SIMULATIONS THE EMPATHY PANEL OFFERS (ADR-0159 rule 7; ADR-0074; ADR-0129).
|
|
3
|
+
//
|
|
4
|
+
// More than five positions means a dropdown and not a row of buttons (ADR-0159 rule 7), and there are ten of these. The row
|
|
5
|
+
// is built ONCE AND KEPT, which is the decision the whole shape follows from: the child opens this panel to try a
|
|
6
|
+
// simulation, look at the game, come back and try another, and a row rebuilt at every opening would take the focus off the
|
|
7
|
+
// list every time she did.
|
|
8
|
+
//
|
|
9
|
+
// 🎯 AND THAT IS WHY EVERYTHING A READER TAKES FROM IT IS WRITTEN AT EACH OPENING instead of at build time: the row's short
|
|
10
|
+
// label, the list's own accessible name, and the name of every option. What is built once is the SHAPE; what is rewritten is
|
|
11
|
+
// the TEXT. Two of them freeze the language otherwise, and a list that says «Simulações» to a child playing in English is a
|
|
12
|
+
// list she cannot use.
|
|
13
|
+
//
|
|
14
|
+
// ⚠️ PROBED BEFORE IT MOVED, and five of nine decisions were blind — the list could lose its accessible name, pile a second
|
|
15
|
+
// set of options on every opening, and name each option by its KEY. They have cases now
|
|
16
|
+
// (`tests/the-simulation-list-is-read-in-the-language-of-now.browser.test.js`).
|
|
17
|
+
//
|
|
18
|
+
// 📌 THE EXPLANATION IS A WORD OF THIS ROW LIKE THE OTHERS, and it is written by `render` for the same reason. It used to be
|
|
19
|
+
// written at build time and stayed in the language it was built in — not this list's fault alone, since 14 of the 28
|
|
20
|
+
// explanation-bearing rows of the engine's panels did the same: `ui/settings-panel.fillExplain` DESTROYED the `.opt-hint` on
|
|
21
|
+
// the way to the footer, so every producer's rewrite landed on a node that was no longer there. It now hides it instead.
|
|
22
|
+
import { VIZ_BY_KEY } from '../render/viz-modes.js';
|
|
23
|
+
export function createSimulationList(ctx) {
|
|
24
|
+
const { t } = ctx;
|
|
25
|
+
/** The row, once. Everything after this writes into it. */
|
|
26
|
+
function build(list) {
|
|
27
|
+
const row = ctx.make('div');
|
|
28
|
+
row.className = 'ctrl-row';
|
|
29
|
+
const envelope = ctx.make('span');
|
|
30
|
+
envelope.appendChild(ctx.make('strong'));
|
|
31
|
+
const hint = ctx.make('span');
|
|
32
|
+
hint.className = 'opt-hint'; // CLAUDE.md §4: the prose belongs to the footer, and this is how it gets there
|
|
33
|
+
envelope.appendChild(hint); // the TEXT is written by `render`, like every other word of this row
|
|
34
|
+
row.appendChild(envelope);
|
|
35
|
+
const choice = ctx.make('select');
|
|
36
|
+
choice.id = 'opt-simulacao';
|
|
37
|
+
choice.className = 'vol';
|
|
38
|
+
row.appendChild(choice);
|
|
39
|
+
list.textContent = '';
|
|
40
|
+
list.appendChild(row);
|
|
41
|
+
// the render below writes the list back from the world, so a refused choice returns to what runs
|
|
42
|
+
choice.addEventListener('change', () => { ctx.picked(choice.value); });
|
|
43
|
+
return choice;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
render(listSelector) {
|
|
47
|
+
const list = ctx.find(listSelector);
|
|
48
|
+
if (!list)
|
|
49
|
+
return;
|
|
50
|
+
const choice = list.querySelector('#opt-simulacao') ?? build(list);
|
|
51
|
+
const label = t('empathy.grupo.rotulo');
|
|
52
|
+
const row = choice.closest('.ctrl-row');
|
|
53
|
+
const strong = row?.querySelector('strong');
|
|
54
|
+
if (strong)
|
|
55
|
+
strong.textContent = label;
|
|
56
|
+
// the explanation is a word of this row like the others, so it is rewritten here and not left at build time —
|
|
57
|
+
// `ui/settings-panel.fillExplain` hides this node rather than destroying it, so the write reaches the footer
|
|
58
|
+
const hint = row?.querySelector('.opt-hint');
|
|
59
|
+
if (hint)
|
|
60
|
+
hint.textContent = t('empathy.simulacao.dica');
|
|
61
|
+
// a `<select>` whose label is a sibling is announced as «combo box» and nothing else without this
|
|
62
|
+
choice.setAttribute('aria-label', label);
|
|
63
|
+
choice.textContent = ''; // rewritten, never appended: twice open would be twice the options
|
|
64
|
+
for (const key of ctx.keys) {
|
|
65
|
+
const mode = VIZ_BY_KEY[key];
|
|
66
|
+
if (!mode)
|
|
67
|
+
continue; // a key no mode answers for would become a blank option the child can choose
|
|
68
|
+
const option = ctx.make('option');
|
|
69
|
+
option.value = key;
|
|
70
|
+
option.textContent = t(mode.name); // what it DOES, never the key that stores it (ADR-0074)
|
|
71
|
+
choice.appendChild(option);
|
|
72
|
+
}
|
|
73
|
+
choice.value = ctx.running() ?? 'normal';
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
import type { WorldScope } from '../core/contract.js';
|
|
3
|
+
export interface SimulationOverTheWorldCtx {
|
|
4
|
+
/** What this cartridge declared as its world (`GameDeclaration.world`). */
|
|
5
|
+
readonly world: () => WorldScope;
|
|
6
|
+
/** The host's DOM query — this module never reaches a global. */
|
|
7
|
+
readonly find: <T extends Element>(selector: string) => T | null;
|
|
8
|
+
/** Makes the drawing layer. Injected for the same reason: no `document` in here. */
|
|
9
|
+
readonly createCanvas: () => HTMLCanvasElement;
|
|
10
|
+
}
|
|
11
|
+
export interface SimulationOverTheWorld {
|
|
12
|
+
/**
|
|
13
|
+
* Puts `css` on the game and nowhere else, with `improvement` kept underneath it.
|
|
14
|
+
*
|
|
15
|
+
* ⚠️ `improvement` is what the child turned on to SEE — her colour correction, her contrast enhancement. It composes
|
|
16
|
+
* under the simulation on a world that holds no menu; dropping it would take her own setting away for as long as an
|
|
17
|
+
* adult is looking through her eyes.
|
|
18
|
+
*/
|
|
19
|
+
onlyInPlay(css: string, improvement: string): void;
|
|
20
|
+
/** Shows, moves and draws the layer for a DRAWN simulation — and hides it for anything else. */
|
|
21
|
+
drawLayer(key: string | null): void;
|
|
22
|
+
}
|
|
23
|
+
export declare function createSimulationOverTheWorld(ctx: SimulationOverTheWorldCtx): SimulationOverTheWorld;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// ui/simulation-over-the-world — A SIMULATION RUNS IN THE GAME, NEVER IN A MENU (ADR-0187; ADR-0151 §2; issue #182).
|
|
3
|
+
//
|
|
4
|
+
// The Dev, 2026-09-13: «Simulação de deficiência não pode funcionar no menu! Só no jogo!» 📏 And the reason is measured,
|
|
5
|
+
// not stylistic: a CSS filter reaches every descendant and clearing it on a child does NOT undo it, so a simulated
|
|
6
|
+
// blindness put on an ancestor of a menu blacks out the panel where a child turns it off. That happened, in the quiz.
|
|
7
|
+
//
|
|
8
|
+
// TWO HALVES OF ONE SUBJECT, which is why they live together: the FILTER (what the eye of the simulated condition does
|
|
9
|
+
// to colour and light) and the LAYER (what three of them draw over the world — a tunnel, a central scotoma, scattered
|
|
10
|
+
// scotomas). Both answer «where does this go so that it covers the game and nothing else», and both have to know what
|
|
11
|
+
// the world is and where its menus are.
|
|
12
|
+
//
|
|
13
|
+
// WHY IT IS NOT IN THE COMPOSITION ROOT
|
|
14
|
+
// It was ~30 branches of `boot/create-game`, and none of them wiring: «descend into a box that holds a door», «a canvas
|
|
15
|
+
// has no children, so the layer goes to its parent», «what HELPS stays under what SIMULATES» are rules with reasons.
|
|
16
|
+
// ADR-0221's erratum measures a root's debt in BRANCHES.
|
|
17
|
+
//
|
|
18
|
+
// ⚠️ PROBED BEFORE IT MOVED, and five of eleven decisions were blind — three of them the whole canvas-world path, which
|
|
19
|
+
// no case in the tree drove. They have cases now (`tests/a-canvas-world-is-simulated-too.browser.test.js`).
|
|
20
|
+
import { drawLowVision } from '../render/low-vision-drawing.js';
|
|
21
|
+
import { VIZ_BY_KEY } from '../render/viz-modes.js';
|
|
22
|
+
import { LOGICAL_W, LOGICAL_H } from '../core/constants.js';
|
|
23
|
+
/**
|
|
24
|
+
* WHAT COUNTS AS A MENU, and therefore never gets a simulation on it or above it.
|
|
25
|
+
*
|
|
26
|
+
* 📌 `[data-incl-menu]` is the CARTRIDGE's own door (ADR-0187): the engine cannot tell which of a game's buttons opens
|
|
27
|
+
* the pause card, and a simulation over that door is the one a child playing by touch cannot turn off.
|
|
28
|
+
*/
|
|
29
|
+
const ENGINE_MENUS = '.overlay, .screen-pause, .screen-a11y, #title-icons, .rodape-da-tela, .pausa-rapida, .touch, #viz-overlay, [data-incl-menu]';
|
|
30
|
+
/**
|
|
31
|
+
* The three simulations that are DRAWN rather than filtered: a colour filter can only blur for them.
|
|
32
|
+
*
|
|
33
|
+
* 📌 By the `lv` of the mode and not by its key, because the key is what a panel stores and the `lv` is what the
|
|
34
|
+
* drawing understands — the two have drifted apart before.
|
|
35
|
+
*/
|
|
36
|
+
const DRAWN = new Set(['tunnel', 'macular', 'diabetic']);
|
|
37
|
+
export function createSimulationOverTheWorld(ctx) {
|
|
38
|
+
/** The elements this module filtered last time, so the next call can clear exactly those and no others. */
|
|
39
|
+
let filtered = [];
|
|
40
|
+
/** The declared world, when it is an element that is actually in the page. */
|
|
41
|
+
const worldElement = () => {
|
|
42
|
+
const world = ctx.world();
|
|
43
|
+
if (world.kind !== 'element')
|
|
44
|
+
return null;
|
|
45
|
+
return ctx.find(world.selector); // `null` is already a line of `problems`
|
|
46
|
+
};
|
|
47
|
+
const holdsNoMenu = (n) => typeof n.querySelector !== 'function' || !n.querySelector(ENGINE_MENUS);
|
|
48
|
+
/** Down through the world, filtering what is ordinary and stepping over — and into — what is or holds a menu. */
|
|
49
|
+
const parts = (parent, css) => {
|
|
50
|
+
for (const child of Array.from(parent.children)) {
|
|
51
|
+
if (child.matches(ENGINE_MENUS))
|
|
52
|
+
continue;
|
|
53
|
+
// 🔴 A BOX THAT HOLDS A DOOR IS WALKED INTO, not filtered: filtering it would reach the door inside, and clearing
|
|
54
|
+
// the filter on the door does not undo it. This is the defect of ADR-0187, one level down.
|
|
55
|
+
if (holdsNoMenu(child)) {
|
|
56
|
+
child.style.filter = css;
|
|
57
|
+
filtered.push(child);
|
|
58
|
+
}
|
|
59
|
+
else
|
|
60
|
+
parts(child, css);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
onlyInPlay(css, improvement) {
|
|
65
|
+
for (const n of filtered)
|
|
66
|
+
n.style.filter = '';
|
|
67
|
+
filtered = [];
|
|
68
|
+
const el = worldElement();
|
|
69
|
+
if (!css || !el)
|
|
70
|
+
return;
|
|
71
|
+
if (holdsNoMenu(el)) {
|
|
72
|
+
el.style.filter = [improvement, css].filter(Boolean).join(' '); // the world itself, over what helps
|
|
73
|
+
return; // recomposed from `improvement` on the next call, so it is not tracked here
|
|
74
|
+
}
|
|
75
|
+
parts(el, css);
|
|
76
|
+
},
|
|
77
|
+
drawLayer(key) {
|
|
78
|
+
const lv = key ? VIZ_BY_KEY[key]?.lv : undefined;
|
|
79
|
+
const existing = ctx.find('#viz-overlay');
|
|
80
|
+
if (!lv || !DRAWN.has(lv)) {
|
|
81
|
+
if (existing)
|
|
82
|
+
existing.hidden = true;
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const el = worldElement();
|
|
86
|
+
if (!el)
|
|
87
|
+
return;
|
|
88
|
+
const host = hostFor(el);
|
|
89
|
+
if (!host)
|
|
90
|
+
return;
|
|
91
|
+
const layer = existing ?? newLayer(ctx);
|
|
92
|
+
if (layer.parentElement !== host)
|
|
93
|
+
host.appendChild(layer);
|
|
94
|
+
placeOver(layer, el);
|
|
95
|
+
const c = layer.getContext('2d');
|
|
96
|
+
if (!c)
|
|
97
|
+
return;
|
|
98
|
+
c.clearRect(0, 0, layer.width, layer.height);
|
|
99
|
+
drawLowVision(c, lv, layer.width, layer.height);
|
|
100
|
+
layer.hidden = false;
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* WHERE THE LAYER LIVES. ⚠️ A canvas HAS NO CHILDREN, so its layer is a sibling — putting it inside means it never
|
|
106
|
+
* appears at all, and nothing on screen says why.
|
|
107
|
+
*/
|
|
108
|
+
const hostFor = (el) => (el.tagName === 'CANVAS' ? el.parentElement : el);
|
|
109
|
+
/** A fresh layer, at the world's logical size. */
|
|
110
|
+
function newLayer(ctx) {
|
|
111
|
+
const layer = ctx.createCanvas();
|
|
112
|
+
layer.id = 'viz-overlay';
|
|
113
|
+
layer.setAttribute('aria-hidden', 'true');
|
|
114
|
+
// inline and not only in style.css: a page without the stylesheet must still let the clicks through to the game
|
|
115
|
+
// z 4: over the game, under the quick bar (5), the pause card (6) and the panels (60) — a simulation is never over a menu
|
|
116
|
+
Object.assign(layer.style, { position: 'absolute', inset: '0', pointerEvents: 'none', zIndex: '4' });
|
|
117
|
+
layer.width = LOGICAL_W;
|
|
118
|
+
layer.height = LOGICAL_H;
|
|
119
|
+
return layer;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Over the world and not over its host: a canvas world may sit anywhere inside its parent, and a layer that took the
|
|
123
|
+
* parent's box would cover the wrong pixels — and, where the parent is bigger, the menus beside it.
|
|
124
|
+
*/
|
|
125
|
+
function placeOver(layer, el) {
|
|
126
|
+
if (el.tagName !== 'CANVAS') {
|
|
127
|
+
Object.assign(layer.style, { width: '100%', height: '100%' });
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
Object.assign(layer.style, { inset: 'auto', left: `${el.offsetLeft}px`, top: `${el.offsetTop}px`, width: `${el.offsetWidth}px`, height: `${el.offsetHeight}px` });
|
|
131
|
+
}
|
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
readonly eixo: MotivoIndisponivel;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* A chave i18n do motivo, por eixo fora do padrão.
|
|
11
|
-
*
|
|
12
|
-
* ⚠️ TRÊS CHAVES E NÃO UMA COM PARÂMETRO, e a diferença é de tradução e não de estilo: em português «o tema»
|
|
13
|
-
* e «a correção de cor» levam artigos diferentes, e «os dois» não é o plural de nenhum dos dois. Uma frase
|
|
14
|
-
* com `{eixo}` obrigaria cada idioma a montar concordância a partir de um substantivo solto — que é
|
|
15
|
-
* exactamente o defeito que o `sr.nav.clockOne` já registou para «às 1 horas».
|
|
16
|
-
*/
|
|
17
|
-
export declare const CHAVE_DO_MOTIVO: Readonly<Record<MotivoIndisponivel, string>>;
|
|
18
|
-
/**
|
|
19
|
-
* Esta simulação pode ser oferecida? E se não, o que dizer.
|
|
20
|
-
*
|
|
21
|
-
* `null` = pode; a interface não mostra nada, porque um aviso que aparece sempre deixa de ser lido.
|
|
22
|
-
*/
|
|
23
|
-
export declare function recusaDaSimulacao(v: VisualState): Recusa | null;
|
|
24
|
-
/**
|
|
25
|
-
* A simulação deve aparecer DESABILITADA em vez de sumir?
|
|
26
|
-
*
|
|
27
|
-
* ⚠️ SEMPRE, E É A METADE «never silently removed» DO ADR-0076. Existe como função com nome próprio, e não
|
|
28
|
-
* como um `!recusa` no ponto de uso, porque ela responde a uma pergunta diferente: `recusaDaSimulacao` diz
|
|
29
|
-
* *por que* não dá; esta diz *que a linha continua na tela*. Quem desenha precisa das duas, e juntá-las numa
|
|
30
|
-
* só faria a resposta «não há motivo» parecer «não desenhe a linha».
|
|
31
|
-
*/
|
|
32
|
-
export declare function mostraMesmoIndisponivel(): boolean;
|
|
2
|
+
import { simulationRefusal as recusaDaSimulacaoDeRender, showsEvenWhenUnavailable as mostraMesmoIndisponivelDeRender, type Refusal as RecusaDeRender } from '../render/viz-refusal.js';
|
|
3
|
+
export declare const REASON_KEY: Readonly<Record<import("../render/viz-axes.js").UnavailableReason, string>>;
|
|
4
|
+
export declare const simulationRefusal: typeof recusaDaSimulacaoDeRender;
|
|
5
|
+
export declare const showsEvenWhenUnavailable: typeof mostraMesmoIndisponivelDeRender;
|
|
6
|
+
export type Refusal = RecusaDeRender;
|
|
@@ -1,57 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// ui/simulation-refusal —
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// · ACEITAR E IGNORAR é pior: a demonstração PARECE estar a correr. Sobre uma tela já corrigida, ela não
|
|
11
|
-
// mostra nem a deficiência nem a correção; sobre um tema de alto contraste, mostra o que o TEMA faz e não
|
|
12
|
-
// o que a deuteranopia faz. ⚠️ Não é uma demonstração mais fraca — **ela ensina uma coisa falsa**.
|
|
13
|
-
//
|
|
14
|
-
// ⚠️ E O MOTIVO É UM FACTO SOBRE A DEMONSTRAÇÃO, NUNCA UMA REPREENSÃO A QUEM ESCOLHEU. Quem ligou o alto
|
|
15
|
-
// contraste ligou-o porque precisa; quem ligou a correção de cor vê melhor com ela. A frase diz o que a
|
|
16
|
-
// demonstração precisa para ser honesta, e diz como voltar — nunca «desligue isso».
|
|
17
|
-
//
|
|
18
|
-
// ========================= POR QUE ISTO É UM MÓDULO PURO =========================
|
|
19
|
-
// Mesma forma do `ui/reach-notice`: devolve DADO (chave i18n + parâmetros), não texto pronto. A frase é da
|
|
20
|
-
// interface e tem de passar por `t()`; devolver português daqui repetiria o defeito que o `PADWIZ_STEPS` já
|
|
21
|
-
// deixou de cometer. E, sendo puro, o desenho da recusa é conferível no project `node`, sem documento.
|
|
22
|
-
//
|
|
23
|
-
// Módulo-folha: importa só os tipos e o predicado do modelo de dois eixos.
|
|
24
|
-
import { simulacaoIndisponivel } from '../render/viz-axes.js';
|
|
25
|
-
/**
|
|
26
|
-
* A chave i18n do motivo, por eixo fora do padrão.
|
|
27
|
-
*
|
|
28
|
-
* ⚠️ TRÊS CHAVES E NÃO UMA COM PARÂMETRO, e a diferença é de tradução e não de estilo: em português «o tema»
|
|
29
|
-
* e «a correção de cor» levam artigos diferentes, e «os dois» não é o plural de nenhum dos dois. Uma frase
|
|
30
|
-
* com `{eixo}` obrigaria cada idioma a montar concordância a partir de um substantivo solto — que é
|
|
31
|
-
* exactamente o defeito que o `sr.nav.clockOne` já registou para «às 1 horas».
|
|
32
|
-
*/
|
|
33
|
-
export const CHAVE_DO_MOTIVO = Object.freeze({
|
|
34
|
-
tema: 'sim.indisponivel.tema',
|
|
35
|
-
correcao: 'sim.indisponivel.correcao',
|
|
36
|
-
ambos: 'sim.indisponivel.ambos',
|
|
37
|
-
});
|
|
38
|
-
/**
|
|
39
|
-
* Esta simulação pode ser oferecida? E se não, o que dizer.
|
|
40
|
-
*
|
|
41
|
-
* `null` = pode; a interface não mostra nada, porque um aviso que aparece sempre deixa de ser lido.
|
|
42
|
-
*/
|
|
43
|
-
export function recusaDaSimulacao(v) {
|
|
44
|
-
const motivo = simulacaoIndisponivel(v);
|
|
45
|
-
return motivo === null ? null : { chave: CHAVE_DO_MOTIVO[motivo], eixo: motivo };
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* A simulação deve aparecer DESABILITADA em vez de sumir?
|
|
49
|
-
*
|
|
50
|
-
* ⚠️ SEMPRE, E É A METADE «never silently removed» DO ADR-0076. Existe como função com nome próprio, e não
|
|
51
|
-
* como um `!recusa` no ponto de uso, porque ela responde a uma pergunta diferente: `recusaDaSimulacao` diz
|
|
52
|
-
* *por que* não dá; esta diz *que a linha continua na tela*. Quem desenha precisa das duas, e juntá-las numa
|
|
53
|
-
* só faria a resposta «não há motivo» parecer «não desenhe a linha».
|
|
54
|
-
*/
|
|
55
|
-
export function mostraMesmoIndisponivel() {
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
2
|
+
// ui/simulation-refusal — the refusal of a simulation that would teach something false (ADR-0076): the names cartridges import from ui.
|
|
3
|
+
//
|
|
4
|
+
// The module lives in `render/viz-refusal` since issue #167: `render/viz-setters` uses it, and render may not import ui
|
|
5
|
+
// (ADR-0173). These names stay, bound to the same values and types.
|
|
6
|
+
import { REASON_KEY as CHAVE_DO_MOTIVODeRender, simulationRefusal as recusaDaSimulacaoDeRender, showsEvenWhenUnavailable as mostraMesmoIndisponivelDeRender, } from '../render/viz-refusal.js';
|
|
7
|
+
export const REASON_KEY = CHAVE_DO_MOTIVODeRender;
|
|
8
|
+
export const simulationRefusal = recusaDaSimulacaoDeRender;
|
|
9
|
+
export const showsEvenWhenUnavailable = mostraMesmoIndisponivelDeRender;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
/**
|
|
3
|
+
* Something the accessibility bar turns on and off, and that lets go of everything it holds when turned off.
|
|
4
|
+
*
|
|
5
|
+
* ⚠️ `apply(false)` MUST release the device — the camera, the microphone — and not merely stop reading it. One camera mode at
|
|
6
|
+
* a time holds by construction only because the one going off is told first (ADR-0197, ADR-0215), and a control that keeps
|
|
7
|
+
* the camera open after being switched off breaks the next mode instead of itself.
|
|
8
|
+
*/
|
|
9
|
+
export interface SwitchableControl {
|
|
10
|
+
apply(on: boolean): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// ui/switchable-control — WHAT A WAY OF PLAYING WITH THE BODY IS, as one line the compiler can check (ADR-0221 step 7f).
|
|
3
|
+
//
|
|
4
|
+
// 🔴 WHY IT EXISTS. The eyes, the face, the hands and the voice are four ways into the same virtual controller, and they had
|
|
5
|
+
// the same shape without ever saying so: four modules, four interfaces, one method each. 📏 Measured on 2026-09-22 while the
|
|
6
|
+
// Dev weighed the three family interfaces: they already exported `XControlDeps` · `XControl` · `createX`, and `XControl` was
|
|
7
|
+
// `apply(on: boolean): Promise<void>` in all four. The abstraction was not missing — it was unnamed, which is worse, because
|
|
8
|
+
// only the co-change of the four files said it existed.
|
|
9
|
+
//
|
|
10
|
+
// 🎯 WHAT DECLARING IT BUYS, and it is not tidiness: `ui/camera-control.followCameraMode` takes a record of these and turns
|
|
11
|
+
// the others off before turning one on. Today the compiler checks that record structurally; with the family named, a member
|
|
12
|
+
// that drifts — an `apply` that stops returning a promise, one that takes no argument — fails where it is WRITTEN instead of
|
|
13
|
+
// where it is combined. The Dev's own words for the choice: «custa pouco, é nativo do TypeScript, e transforma a abstração em
|
|
14
|
+
// falta em algo que o compilador vê».
|
|
15
|
+
//
|
|
16
|
+
// ⚠️ THE VOICE IS IN THE FAMILY AND NOT IN THE CAMERA CYCLE. It answers to the 👄, not to the 📷, and it has one method more
|
|
17
|
+
// (`refreshGrammar`). That is why this interface is not called «camera» anything: the family is «what the bar can switch on
|
|
18
|
+
// and off», and the camera cycle is one USER of it.
|
|
19
|
+
export {};
|
package/dist-pkg/ui/title.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
import type { DomQuery } from '../core/dom-query.js';
|
|
3
|
-
/** Minimal DOM-selector shape (matches ui/dom.ts's `$`). */
|
|
4
|
-
export type { DomQuery } from '../core/dom-query.js';
|
|
5
3
|
export type TitleMenuId = 'tm-main' | 'tm-alf' | 'tm-mat' | 'tm-tab' | 'tm-fr' | 'tm-cen';
|
|
6
|
-
/**
|
|
7
|
-
* The 6 submenus of the title screen, in the order game.js has always hidden/shown them.
|
|
8
|
-
*
|
|
9
|
-
* The ORDERED array is the source and the Set is derived from it, not the other way round. A Set carries no
|
|
10
|
-
* order in its type, so ui/activities-menu - which has to scan the submenus in order to find the visible one -
|
|
11
|
-
* had declared its own array of the same six ids, kept in step by discipline alone. One list now.
|
|
12
|
-
*/
|
|
13
|
-
export declare const TITLE_MENU_IDS_ORDERED: readonly TitleMenuId[];
|
|
14
4
|
export declare const TITLE_MENU_IDS: ReadonlySet<TitleMenuId>;
|
|
15
5
|
export declare function isTitleMenuId(v: string): v is TitleMenuId;
|
|
16
6
|
export interface TitleCtx {
|
|
@@ -18,7 +8,8 @@ export interface TitleCtx {
|
|
|
18
8
|
$: DomQuery;
|
|
19
9
|
}
|
|
20
10
|
export interface TitleApi {
|
|
21
|
-
/** Shows `which` and hides the other 5 submenus; toggles legend/title-block
|
|
11
|
+
/** Shows `which` and hides the other 5 submenus; toggles legend/title-block. Focus: going IN, the first button; coming
|
|
12
|
+
* BACK to a menu left on the way in, the item that opened the next one (ADR-0130 rule 1). */
|
|
22
13
|
show: (which: TitleMenuId) => void;
|
|
23
14
|
}
|
|
24
15
|
export interface TitleMenuView {
|
|
@@ -31,6 +22,6 @@ export interface TitleMenuView {
|
|
|
31
22
|
/** .title-block (the game's title art) shows only on tm-main; submenus render their own `.tm-title` heading. */
|
|
32
23
|
titleBlockDisplay: '' | 'none';
|
|
33
24
|
}
|
|
34
|
-
/** Pure view-model for
|
|
25
|
+
/** Pure view-model for show(which). */
|
|
35
26
|
export declare function computeTitleMenuView(which: TitleMenuId): TitleMenuView;
|
|
36
27
|
export declare function initTitle(ctx: TitleCtx): TitleApi;
|
package/dist-pkg/ui/title.js
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// ui/title — title-screen submenu NAVIGATION
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// ui/dom.ts shape) is needed — the transition carries no message of its own
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
// other Estágio-4 slices and stays in game.js for now.
|
|
2
|
+
// ui/title — title-screen submenu NAVIGATION. Shows one submenu (`tm-main`/`tm-alf`/`tm-mat`/`tm-tab`/`tm-fr`/`tm-cen`)
|
|
3
|
+
// and hides the rest, toggles the footer legend (only on `tm-main`) and the game-title block (only on `tm-main` —
|
|
4
|
+
// submenus show their own `.tm-title` instead), then focuses the first button of the now-visible submenu — or, coming
|
|
5
|
+
// back to a menu left on the way in, the item that opened the next one (ADR-0130 rule 1). DI via
|
|
6
|
+
// initTitle(ctx): only `$` (DOM selector, ui/dom.ts shape) is needed — the transition carries no message of its own
|
|
7
|
+
// (the caller picks what to announce per transition; announcing here too would double-speak). Building the submenu
|
|
8
|
+
// markup, the footer legend, arrow-key traversal and the click/keydown wiring belong to the game that owns the title
|
|
9
|
+
// screen, not to this module.
|
|
11
10
|
/**
|
|
12
|
-
* The 6 submenus of the title screen, in the order
|
|
11
|
+
* The 6 submenus of the title screen, in the order they are hidden/shown.
|
|
13
12
|
*
|
|
14
13
|
* The ORDERED array is the source and the Set is derived from it, not the other way round. A Set carries no
|
|
15
|
-
* order in its type, so
|
|
16
|
-
*
|
|
14
|
+
* order in its type, so a reader that has to scan the submenus in order to find the visible one would otherwise
|
|
15
|
+
* declare its own array of the same six ids, kept in step by discipline alone. One list.
|
|
17
16
|
*/
|
|
18
|
-
|
|
17
|
+
const TITLE_MENU_IDS_ORDERED = [
|
|
19
18
|
'tm-main', 'tm-alf', 'tm-mat', 'tm-tab', 'tm-fr', 'tm-cen',
|
|
20
19
|
];
|
|
21
20
|
export const TITLE_MENU_IDS = new Set(TITLE_MENU_IDS_ORDERED);
|
|
22
21
|
export function isTitleMenuId(v) {
|
|
23
22
|
return TITLE_MENU_IDS.has(v);
|
|
24
23
|
}
|
|
25
|
-
/** Pure view-model for
|
|
24
|
+
/** Pure view-model for show(which). */
|
|
26
25
|
export function computeTitleMenuView(which) {
|
|
27
26
|
const hidden = new Map();
|
|
28
27
|
for (const id of TITLE_MENU_IDS)
|
|
@@ -34,11 +33,41 @@ export function computeTitleMenuView(which) {
|
|
|
34
33
|
titleBlockDisplay: which === 'tm-main' ? '' : 'none',
|
|
35
34
|
};
|
|
36
35
|
}
|
|
37
|
-
// ---------------------------------------------------------------------------------------------
|
|
38
|
-
// DOM-facing (thin) — requires `document`/injected ctx
|
|
39
|
-
// ---------------------------------------------------------------------------------------------
|
|
40
36
|
export function initTitle(ctx) {
|
|
37
|
+
/*
|
|
38
|
+
* THE WAY IN, so the way out lands where the child was (ADR-0130 rule 1). `show` stays a «goto» — a game calls
|
|
39
|
+
* `show('tm-main')` for its «Voltar» and nothing else — and the trail tells the two apart: a menu already on the trail is
|
|
40
|
+
* a way BACK, which pops to it and returns the cursor to the item that opened the next menu; any other is a way IN,
|
|
41
|
+
* which records the item that opened it. The menus stay one at a time on screen: whether the cards behind stay visible
|
|
42
|
+
* is left open by the record.
|
|
43
|
+
*/
|
|
44
|
+
const trail = [];
|
|
45
|
+
/** The menu on screen now, and the item inside it that has focus — the opener, if the next `show` goes in. */
|
|
46
|
+
function where() {
|
|
47
|
+
for (const id of TITLE_MENU_IDS_ORDERED) {
|
|
48
|
+
const el = ctx.$('#' + id);
|
|
49
|
+
if (!el || el.hidden)
|
|
50
|
+
continue;
|
|
51
|
+
const focused = el.ownerDocument.activeElement;
|
|
52
|
+
return { menu: id, opener: focused && focused !== el && el.contains(focused) ? focused : null };
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
/** Where the cursor lands: the recorded opener when coming back to a menu on the trail, else `null` (item 1). */
|
|
57
|
+
function walk(which) {
|
|
58
|
+
const back = trail.findIndex((step) => step.menu === which);
|
|
59
|
+
if (back >= 0) {
|
|
60
|
+
const { opener } = trail[back];
|
|
61
|
+
trail.length = back;
|
|
62
|
+
return opener;
|
|
63
|
+
}
|
|
64
|
+
const here = where();
|
|
65
|
+
if (here && here.menu !== which)
|
|
66
|
+
trail.push(here);
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
41
69
|
function show(which) {
|
|
70
|
+
const opener = walk(which);
|
|
42
71
|
const view = computeTitleMenuView(which);
|
|
43
72
|
for (const [id, hide] of view.hidden) {
|
|
44
73
|
const el = ctx.$('#' + id);
|
|
@@ -52,7 +81,9 @@ export function initTitle(ctx) {
|
|
|
52
81
|
if (tb)
|
|
53
82
|
tb.style.display = view.titleBlockDisplay;
|
|
54
83
|
const activeEl = ctx.$('#' + which);
|
|
55
|
-
|
|
84
|
+
// the opener only while it is still an item of this menu: a game may have rebuilt the menu since
|
|
85
|
+
const cameFrom = opener && activeEl?.contains(opener) ? opener : null;
|
|
86
|
+
const b = cameFrom ?? (activeEl && activeEl.querySelector('button'));
|
|
56
87
|
if (b)
|
|
57
88
|
b.focus();
|
|
58
89
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
/** What this module needs to see in order to measure. All injected: the module reaches neither `document` nor `window`. */
|
|
3
|
+
export interface TopBandCtx {
|
|
4
|
+
/** The game region, where the two variables are written. Absent: there is nowhere to write, and nothing is written. */
|
|
5
|
+
readonly region: HTMLElement | null;
|
|
6
|
+
/** The accessibility bar. ⚠️ Absent = a ZERO band: there is nothing to reserve, and reserving anyway would take the
|
|
7
|
+
* first line of the screen from the game — 12% of the height at 640×360. */
|
|
8
|
+
readonly bar: HTMLElement | null;
|
|
9
|
+
/**
|
|
10
|
+
* The HUD column that sits at the TOP, when mounted: the mission's, centred under the bar (ADR-0239 erratum). The rest of
|
|
11
|
+
* the HUD is a row at the bottom (`ui/hud-row`), and counting it here would give the game's top to the bottom row.
|
|
12
|
+
*/
|
|
13
|
+
readonly hud: {
|
|
14
|
+
readonly left: HTMLElement;
|
|
15
|
+
} | null;
|
|
16
|
+
/** `getComputedStyle`, injected. Absent in a document that lacks it, and then the name line is not measured. */
|
|
17
|
+
readonly computedStyle?: (el: HTMLElement) => CSSStyleDeclaration;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Measures the top and writes `--hud-mission-top`, `--scan-top` and `--barra-a11y-h` on the region.
|
|
21
|
+
*
|
|
22
|
+
* 🔴 THE SCAN CHIP TAKES ROOM FOR THE SAME REASON AS THE NAME LINE (ADR-0218): it is HUD, and HUD that does not reserve its
|
|
23
|
+
* space is the engine writing over the game. But it is PLACED by `--scan-top`, written BEFORE it widens the room; see
|
|
24
|
+
* the loop in the header.
|
|
25
|
+
*/
|
|
26
|
+
export declare function reserveTopBand(ctx: TopBandCtx): void;
|