@the-inclusionist/engine 9.0.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -78
- package/app/css/style.css +761 -377
- package/app/public/vendor/fonts/playwrite-cu.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-es-deco.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-es.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-gb-j.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-gb-s.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-pe.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-pt.woff2 +0 -0
- package/app/public/vendor/fonts-licences/NOTICE.txt +166 -0
- package/app/public/vendor/fonts-licences/OFL-1.1.txt +86 -0
- package/app/public/vendor/fonts.css +36 -84
- package/dist-pkg/boot/create-game.d.ts +499 -219
- package/dist-pkg/boot/create-game.js +3944 -562
- package/dist-pkg/core/a11y-sr.d.ts +25 -3
- package/dist-pkg/core/a11y-sr.js +38 -19
- package/dist-pkg/core/accessible-label.d.ts +17 -0
- package/dist-pkg/core/accessible-label.js +37 -0
- package/dist-pkg/core/accommodation-subjects.d.ts +26 -0
- package/dist-pkg/core/accommodation-subjects.js +32 -0
- package/dist-pkg/core/accommodations.d.ts +125 -0
- package/dist-pkg/core/accommodations.js +195 -0
- package/dist-pkg/core/actions.d.ts +108 -55
- package/dist-pkg/core/actions.js +122 -71
- package/dist-pkg/core/calm-mode.d.ts +31 -0
- package/dist-pkg/core/calm-mode.js +47 -0
- package/dist-pkg/core/camera-cycle.d.ts +15 -0
- package/dist-pkg/core/camera-cycle.js +7 -0
- package/dist-pkg/core/caption-duration.d.ts +15 -0
- package/dist-pkg/core/caption-duration.js +19 -0
- package/dist-pkg/core/cartridge-problems.d.ts +34 -0
- package/dist-pkg/core/cartridge-problems.js +53 -0
- package/dist-pkg/core/constants.d.ts +0 -54
- package/dist-pkg/core/constants.js +9 -76
- package/dist-pkg/core/contract.d.ts +142 -164
- package/dist-pkg/core/contract.js +222 -208
- package/dist-pkg/core/dom-query.d.ts +4 -4
- package/dist-pkg/core/dom-query.js +12 -20
- package/dist-pkg/core/entity.d.ts +62 -77
- package/dist-pkg/core/entity.js +18 -32
- package/dist-pkg/core/escape-html.d.ts +9 -10
- package/dist-pkg/core/escape-html.js +16 -20
- package/dist-pkg/core/flash-threshold.d.ts +17 -0
- package/dist-pkg/core/flash-threshold.js +113 -0
- package/dist-pkg/core/game-speed.d.ts +11 -0
- package/dist-pkg/core/game-speed.js +16 -0
- package/dist-pkg/core/genres.d.ts +20 -0
- package/dist-pkg/core/genres.js +44 -0
- package/dist-pkg/core/i18n.d.ts +71 -60
- package/dist-pkg/core/i18n.js +186 -200
- package/dist-pkg/core/loop.d.ts +17 -6
- package/dist-pkg/core/loop.js +26 -26
- package/dist-pkg/core/pause-icon-catalogue.d.ts +15 -0
- package/dist-pkg/core/pause-icon-catalogue.js +54 -0
- package/dist-pkg/core/ring.d.ts +17 -0
- package/dist-pkg/core/ring.js +29 -0
- package/dist-pkg/core/rng.d.ts +7 -12
- package/dist-pkg/core/rng.js +23 -53
- package/dist-pkg/core/route.d.ts +26 -26
- package/dist-pkg/core/route.js +126 -121
- package/dist-pkg/core/scenes.d.ts +37 -40
- package/dist-pkg/core/scenes.js +41 -43
- package/dist-pkg/core/screens.d.ts +4 -4
- package/dist-pkg/core/screens.js +11 -16
- package/dist-pkg/core/session-clock.d.ts +23 -0
- package/dist-pkg/core/session-clock.js +37 -0
- package/dist-pkg/core/setting-defaults.d.ts +61 -0
- package/dist-pkg/core/setting-defaults.js +66 -0
- package/dist-pkg/core/speech-rate.d.ts +29 -0
- package/dist-pkg/core/speech-rate.js +47 -0
- package/dist-pkg/core/state.d.ts +118 -118
- package/dist-pkg/core/state.js +322 -297
- package/dist-pkg/core/visual-cycles.d.ts +30 -0
- package/dist-pkg/core/visual-cycles.js +52 -0
- package/dist-pkg/core/visual-state.d.ts +13 -0
- package/dist-pkg/core/visual-state.js +6 -0
- package/dist-pkg/educational/activities-registry.d.ts +1 -1
- package/dist-pkg/educational/activities-registry.js +9 -8
- package/dist-pkg/educational/adaptive-engine.d.ts +11 -11
- package/dist-pkg/educational/adaptive-engine.js +17 -17
- package/dist-pkg/educational/segment-bar.d.ts +12 -12
- package/dist-pkg/educational/segment-bar.js +9 -9
- package/dist-pkg/i18n/en.js +324 -223
- package/dist-pkg/i18n/es.js +323 -223
- package/dist-pkg/i18n/pt.js +348 -226
- package/dist-pkg/input/default-bindings.d.ts +37 -38
- package/dist-pkg/input/default-bindings.js +127 -144
- package/dist-pkg/input/devices.d.ts +7 -7
- package/dist-pkg/input/devices.js +17 -16
- package/dist-pkg/input/edges.d.ts +23 -32
- package/dist-pkg/input/edges.js +23 -28
- package/dist-pkg/input/empathy-filter.d.ts +22 -0
- package/dist-pkg/input/empathy-filter.js +34 -0
- package/dist-pkg/input/face-map.d.ts +96 -0
- package/dist-pkg/input/face-map.js +255 -0
- package/dist-pkg/input/face-signals.d.ts +40 -0
- package/dist-pkg/input/face-signals.js +48 -0
- package/dist-pkg/input/gamepad.d.ts +195 -145
- package/dist-pkg/input/gamepad.js +383 -556
- package/dist-pkg/input/gaze-cycle.d.ts +64 -0
- package/dist-pkg/input/gaze-cycle.js +133 -0
- package/dist-pkg/input/gaze-relative.d.ts +68 -0
- package/dist-pkg/input/gaze-relative.js +142 -0
- package/dist-pkg/input/hand-map.d.ts +28 -0
- package/dist-pkg/input/hand-map.js +142 -0
- package/dist-pkg/input/input-cooldown.d.ts +17 -0
- package/dist-pkg/input/input-cooldown.js +39 -0
- package/dist-pkg/input/key-default.d.ts +30 -0
- package/dist-pkg/input/key-default.js +60 -0
- package/dist-pkg/input/keyboard-runtime.d.ts +15 -21
- package/dist-pkg/input/keyboard-runtime.js +23 -27
- package/dist-pkg/input/keyboard.d.ts +68 -63
- package/dist-pkg/input/keyboard.js +83 -105
- package/dist-pkg/input/keydown.d.ts +123 -137
- package/dist-pkg/input/keydown.js +284 -289
- package/dist-pkg/input/latch-edge.d.ts +33 -21
- package/dist-pkg/input/latch-edge.js +34 -35
- package/dist-pkg/input/latch-scope.d.ts +51 -50
- package/dist-pkg/input/latch-scope.js +61 -82
- package/dist-pkg/input/latch-store.d.ts +26 -30
- package/dist-pkg/input/latch-store.js +42 -50
- package/dist-pkg/input/latch-sync.d.ts +29 -29
- package/dist-pkg/input/latch-sync.js +25 -25
- package/dist-pkg/input/latch.d.ts +14 -17
- package/dist-pkg/input/latch.js +29 -37
- package/dist-pkg/input/pad-defaults.d.ts +13 -16
- package/dist-pkg/input/pad-defaults.js +21 -28
- package/dist-pkg/input/pad-reading.d.ts +76 -0
- package/dist-pkg/input/pad-reading.js +169 -0
- package/dist-pkg/input/pad-wizard.d.ts +99 -0
- package/dist-pkg/input/pad-wizard.js +256 -0
- package/dist-pkg/input/pointer-space.d.ts +19 -20
- package/dist-pkg/input/pointer-space.js +27 -32
- package/dist-pkg/input/pointer.d.ts +39 -40
- package/dist-pkg/input/pointer.js +42 -45
- package/dist-pkg/input/state.d.ts +101 -89
- package/dist-pkg/input/state.js +54 -134
- package/dist-pkg/input/switch-scan.d.ts +59 -0
- package/dist-pkg/input/switch-scan.js +67 -0
- package/dist-pkg/input/synthetic-source.d.ts +42 -0
- package/dist-pkg/input/synthetic-source.js +57 -0
- package/dist-pkg/input/touch-bindings.d.ts +127 -116
- package/dist-pkg/input/touch-bindings.js +158 -173
- package/dist-pkg/input/touch.d.ts +147 -72
- package/dist-pkg/input/touch.js +362 -126
- package/dist-pkg/input/transport-in-use.d.ts +107 -0
- package/dist-pkg/input/transport-in-use.js +130 -0
- package/dist-pkg/input/transports.d.ts +90 -117
- package/dist-pkg/input/transports.js +104 -106
- package/dist-pkg/input/virtual-controller.d.ts +82 -0
- package/dist-pkg/input/virtual-controller.js +69 -0
- package/dist-pkg/input/vocabulary-migration.d.ts +50 -49
- package/dist-pkg/input/vocabulary-migration.js +80 -79
- package/dist-pkg/input/voice-map.d.ts +59 -0
- package/dist-pkg/input/voice-map.js +123 -0
- package/dist-pkg/platform/audio-ambient.d.ts +13 -2
- package/dist-pkg/platform/audio-ambient.js +14 -14
- package/dist-pkg/platform/audio-earcons.d.ts +20 -19
- package/dist-pkg/platform/audio-earcons.js +51 -42
- package/dist-pkg/platform/audio-jingles.js +9 -10
- package/dist-pkg/platform/audio-mixer.d.ts +14 -2
- package/dist-pkg/platform/audio-mixer.js +31 -39
- package/dist-pkg/platform/audio-sonar.d.ts +49 -152
- package/dist-pkg/platform/audio-sonar.js +124 -302
- package/dist-pkg/platform/audio.d.ts +62 -19
- package/dist-pkg/platform/audio.js +193 -168
- package/dist-pkg/platform/choose-by-voice.d.ts +70 -0
- package/dist-pkg/platform/choose-by-voice.js +157 -0
- package/dist-pkg/platform/flash-sampler.d.ts +19 -0
- package/dist-pkg/platform/flash-sampler.js +79 -0
- package/dist-pkg/platform/font-library.d.ts +77 -0
- package/dist-pkg/platform/font-library.js +98 -0
- package/dist-pkg/platform/font-library.json +721 -0
- package/dist-pkg/platform/heavy-catalogue.d.ts +77 -0
- package/dist-pkg/platform/heavy-catalogue.js +256 -0
- package/dist-pkg/platform/heavy-mirror.d.ts +20 -0
- package/dist-pkg/platform/heavy-mirror.js +73 -0
- package/dist-pkg/platform/heavy.d.ts +136 -0
- package/dist-pkg/platform/heavy.js +324 -0
- package/dist-pkg/platform/interruptible-speech.d.ts +23 -16
- package/dist-pkg/platform/interruptible-speech.js +77 -54
- package/dist-pkg/platform/kokoro-port.d.ts +27 -0
- package/dist-pkg/platform/kokoro-port.js +50 -0
- package/dist-pkg/platform/kokoro-runtime.d.ts +20 -0
- package/dist-pkg/platform/kokoro-runtime.js +52 -0
- package/dist-pkg/platform/kokoro.d.ts +70 -0
- package/dist-pkg/platform/kokoro.js +133 -0
- package/dist-pkg/platform/listener-scope.d.ts +12 -0
- package/dist-pkg/platform/listener-scope.js +90 -0
- package/dist-pkg/platform/locale-host.d.ts +14 -0
- package/dist-pkg/platform/locale-host.js +45 -0
- package/dist-pkg/platform/microphone.d.ts +51 -0
- package/dist-pkg/platform/microphone.js +118 -0
- package/dist-pkg/platform/onnx-runtime.d.ts +34 -0
- package/dist-pkg/platform/onnx-runtime.js +42 -0
- package/dist-pkg/platform/reading-in-worker.d.ts +64 -0
- package/dist-pkg/platform/reading-in-worker.js +125 -0
- package/dist-pkg/platform/reading-model.d.ts +94 -0
- package/dist-pkg/platform/reading-model.js +272 -0
- package/dist-pkg/platform/reading-runtime.d.ts +24 -0
- package/dist-pkg/platform/reading-runtime.js +164 -0
- package/dist-pkg/platform/reading-worker.d.ts +41 -0
- package/dist-pkg/platform/reading-worker.js +58 -0
- package/dist-pkg/platform/reading.d.ts +80 -0
- package/dist-pkg/platform/reading.js +136 -0
- package/dist-pkg/platform/speech-recognition.d.ts +60 -0
- package/dist-pkg/platform/speech-recognition.js +104 -0
- package/dist-pkg/platform/speech.d.ts +23 -1
- package/dist-pkg/platform/speech.js +29 -18
- package/dist-pkg/platform/storage-keys.d.ts +96 -0
- package/dist-pkg/platform/storage-keys.js +106 -0
- package/dist-pkg/platform/storage.d.ts +46 -111
- package/dist-pkg/platform/storage.js +104 -169
- package/dist-pkg/platform/tts.d.ts +85 -39
- package/dist-pkg/platform/tts.js +447 -127
- package/dist-pkg/platform/vision-loop.d.ts +23 -0
- package/dist-pkg/platform/vision-loop.js +56 -0
- package/dist-pkg/platform/vision.d.ts +132 -0
- package/dist-pkg/platform/vision.js +117 -0
- package/dist-pkg/platform/voice-listener.d.ts +40 -0
- package/dist-pkg/platform/voice-listener.js +88 -0
- package/dist-pkg/platform/voice-plan.d.ts +15 -98
- package/dist-pkg/platform/voice-plan.js +56 -143
- package/dist-pkg/platform/vosk-runtime.d.ts +96 -0
- package/dist-pkg/platform/vosk-runtime.js +151 -0
- package/dist-pkg/platform/vosk-vocabulary.d.ts +6 -0
- package/dist-pkg/platform/vosk-vocabulary.js +178 -0
- package/dist-pkg/render/canvas.d.ts +13 -7
- package/dist-pkg/render/canvas.js +13 -13
- package/dist-pkg/render/crt.d.ts +48 -12
- package/dist-pkg/render/crt.js +78 -80
- package/dist-pkg/render/cvd-matrices.d.ts +22 -18
- package/dist-pkg/render/cvd-matrices.js +37 -38
- package/dist-pkg/render/hc-role-data.d.ts +7 -7
- package/dist-pkg/render/hc-role-data.js +14 -14
- package/dist-pkg/render/high-contrast.d.ts +67 -56
- package/dist-pkg/render/high-contrast.js +226 -217
- package/dist-pkg/render/low-vision-drawing.d.ts +5 -0
- package/dist-pkg/render/low-vision-drawing.js +46 -0
- package/dist-pkg/render/lq-filter.d.ts +32 -20
- package/dist-pkg/render/lq-filter.js +59 -65
- package/dist-pkg/render/port.d.ts +86 -88
- package/dist-pkg/render/port.js +17 -23
- package/dist-pkg/render/screen-pipeline.d.ts +42 -42
- package/dist-pkg/render/screen-pipeline.js +80 -87
- package/dist-pkg/render/sprite-fx.d.ts +2 -1
- package/dist-pkg/render/sprite-fx.js +16 -14
- package/dist-pkg/render/viewports.d.ts +20 -15
- package/dist-pkg/render/viewports.js +83 -114
- package/dist-pkg/render/viz-axes-labels.d.ts +47 -0
- package/dist-pkg/render/viz-axes-labels.js +88 -0
- package/dist-pkg/render/viz-axes.d.ts +89 -86
- package/dist-pkg/render/viz-axes.js +128 -116
- package/dist-pkg/render/viz-modes.d.ts +28 -29
- package/dist-pkg/render/viz-modes.js +40 -45
- package/dist-pkg/render/viz-refusal.d.ts +32 -0
- package/dist-pkg/render/viz-refusal.js +57 -0
- package/dist-pkg/render/viz-setters.d.ts +104 -66
- package/dist-pkg/render/viz-setters.js +182 -191
- package/dist-pkg/ui/aac-sets.d.ts +45 -0
- package/dist-pkg/ui/aac-sets.js +41 -0
- package/dist-pkg/ui/audio-choices.d.ts +68 -0
- package/dist-pkg/ui/audio-choices.js +98 -0
- package/dist-pkg/ui/audio-rows-that-apply.d.ts +12 -0
- package/dist-pkg/ui/audio-rows-that-apply.js +43 -0
- package/dist-pkg/ui/camera-control.d.ts +53 -0
- package/dist-pkg/ui/camera-control.js +48 -0
- package/dist-pkg/ui/changed-mark.d.ts +9 -8
- package/dist-pkg/ui/changed-mark.js +22 -53
- package/dist-pkg/ui/control-choices.d.ts +37 -0
- package/dist-pkg/ui/control-choices.js +84 -0
- package/dist-pkg/ui/debug-panel.d.ts +59 -43
- package/dist-pkg/ui/debug-panel.js +68 -69
- package/dist-pkg/ui/declared-words.d.ts +21 -0
- package/dist-pkg/ui/declared-words.js +66 -0
- package/dist-pkg/ui/dom.d.ts +10 -14
- package/dist-pkg/ui/dom.js +10 -47
- package/dist-pkg/ui/drawing-problems.d.ts +25 -0
- package/dist-pkg/ui/drawing-problems.js +94 -0
- package/dist-pkg/ui/eye-control.d.ts +36 -0
- package/dist-pkg/ui/eye-control.js +178 -0
- package/dist-pkg/ui/face-control.d.ts +25 -0
- package/dist-pkg/ui/face-control.js +183 -0
- package/dist-pkg/ui/focus-trap.d.ts +39 -49
- package/dist-pkg/ui/focus-trap.js +56 -65
- package/dist-pkg/ui/fonts.d.ts +157 -68
- package/dist-pkg/ui/fonts.js +305 -115
- package/dist-pkg/ui/footer-scroll-driver.d.ts +14 -0
- package/dist-pkg/ui/footer-scroll-driver.js +201 -0
- package/dist-pkg/ui/footer-scroll.d.ts +38 -0
- package/dist-pkg/ui/footer-scroll.js +55 -0
- package/dist-pkg/ui/game-options.d.ts +47 -0
- package/dist-pkg/ui/game-options.js +158 -0
- package/dist-pkg/ui/gaze-overlay.d.ts +64 -0
- package/dist-pkg/ui/gaze-overlay.js +165 -0
- package/dist-pkg/ui/hand-control.d.ts +25 -0
- package/dist-pkg/ui/hand-control.js +143 -0
- package/dist-pkg/ui/help-panel.d.ts +87 -0
- package/dist-pkg/ui/help-panel.js +242 -0
- package/dist-pkg/ui/hud-bands.d.ts +62 -0
- package/dist-pkg/ui/hud-bands.js +146 -0
- package/dist-pkg/ui/hud-row.d.ts +34 -0
- package/dist-pkg/ui/hud-row.js +80 -0
- package/dist-pkg/ui/hud.d.ts +73 -73
- package/dist-pkg/ui/hud.js +94 -98
- package/dist-pkg/ui/item-announcement.d.ts +13 -12
- package/dist-pkg/ui/item-announcement.js +25 -26
- package/dist-pkg/ui/layout.d.ts +103 -28
- package/dist-pkg/ui/layout.js +117 -99
- package/dist-pkg/ui/libras-avatar-clip.d.ts +30 -0
- package/dist-pkg/ui/libras-avatar-clip.js +86 -0
- package/dist-pkg/ui/libras-avatar-load.d.ts +52 -0
- package/dist-pkg/ui/libras-avatar-load.js +134 -0
- package/dist-pkg/ui/libras-avatar-plan.d.ts +102 -0
- package/dist-pkg/ui/libras-avatar-plan.js +211 -0
- package/dist-pkg/ui/libras-avatar-player.d.ts +28 -0
- package/dist-pkg/ui/libras-avatar-player.js +226 -0
- package/dist-pkg/ui/libras-avatar-stage.d.ts +37 -0
- package/dist-pkg/ui/libras-avatar-stage.js +208 -0
- package/dist-pkg/ui/libras-glosses.d.ts +28 -0
- package/dist-pkg/ui/libras-glosses.js +161 -0
- package/dist-pkg/ui/locale-flags.d.ts +16 -0
- package/dist-pkg/ui/locale-flags.js +30 -0
- package/dist-pkg/ui/loop-crash.d.ts +17 -17
- package/dist-pkg/ui/loop-crash.js +33 -62
- package/dist-pkg/ui/menu-intent.d.ts +61 -0
- package/dist-pkg/ui/menu-intent.js +88 -0
- package/dist-pkg/ui/menu-items.d.ts +20 -0
- package/dist-pkg/ui/menu-items.js +51 -0
- package/dist-pkg/ui/menu-nav.d.ts +98 -92
- package/dist-pkg/ui/menu-nav.js +398 -286
- package/dist-pkg/ui/mobility-choices.d.ts +26 -0
- package/dist-pkg/ui/mobility-choices.js +41 -0
- package/dist-pkg/ui/motion-choices.d.ts +31 -0
- package/dist-pkg/ui/motion-choices.js +68 -0
- package/dist-pkg/ui/motion-scene.d.ts +24 -19
- package/dist-pkg/ui/motion-scene.js +29 -61
- package/dist-pkg/ui/mount-panel.d.ts +81 -0
- package/dist-pkg/ui/mount-panel.js +61 -0
- package/dist-pkg/ui/panel-shell.d.ts +65 -31
- package/dist-pkg/ui/panel-shell.js +92 -66
- package/dist-pkg/ui/panel-widgets.d.ts +150 -0
- package/dist-pkg/ui/panel-widgets.js +294 -0
- package/dist-pkg/ui/pause-buttons.d.ts +35 -0
- package/dist-pkg/ui/pause-buttons.js +66 -0
- package/dist-pkg/ui/pause-icons.d.ts +261 -347
- package/dist-pkg/ui/pause-icons.js +671 -601
- package/dist-pkg/ui/pause-markup.d.ts +86 -0
- package/dist-pkg/ui/pause-markup.js +125 -0
- package/dist-pkg/ui/reach-notice.d.ts +22 -23
- package/dist-pkg/ui/reach-notice.js +55 -58
- package/dist-pkg/ui/scan-overlay.d.ts +23 -0
- package/dist-pkg/ui/scan-overlay.js +50 -0
- package/dist-pkg/ui/screen-text.d.ts +25 -0
- package/dist-pkg/ui/screen-text.js +152 -0
- package/dist-pkg/ui/session-clock.d.ts +32 -0
- package/dist-pkg/ui/session-clock.js +67 -0
- package/dist-pkg/ui/settings-aac.d.ts +70 -0
- package/dist-pkg/ui/settings-aac.js +208 -0
- package/dist-pkg/ui/settings-audio.d.ts +97 -114
- package/dist-pkg/ui/settings-audio.js +493 -425
- package/dist-pkg/ui/settings-controls.d.ts +53 -96
- package/dist-pkg/ui/settings-controls.js +143 -215
- package/dist-pkg/ui/settings-empathy.d.ts +39 -30
- package/dist-pkg/ui/settings-empathy.js +53 -60
- package/dist-pkg/ui/settings-mobility.d.ts +192 -0
- package/dist-pkg/ui/settings-mobility.js +332 -0
- package/dist-pkg/ui/settings-motion.d.ts +91 -70
- package/dist-pkg/ui/settings-motion.js +287 -198
- package/dist-pkg/ui/settings-panel.d.ts +58 -45
- package/dist-pkg/ui/settings-panel.js +189 -94
- package/dist-pkg/ui/settings-typo.d.ts +29 -78
- package/dist-pkg/ui/settings-typo.js +158 -129
- package/dist-pkg/ui/settings-visual.d.ts +29 -87
- package/dist-pkg/ui/settings-visual.js +240 -193
- package/dist-pkg/ui/shell.d.ts +112 -135
- package/dist-pkg/ui/shell.js +148 -217
- package/dist-pkg/ui/simulation-list.d.ts +27 -0
- package/dist-pkg/ui/simulation-list.js +76 -0
- package/dist-pkg/ui/simulation-over-the-world.d.ts +23 -0
- package/dist-pkg/ui/simulation-over-the-world.js +131 -0
- package/dist-pkg/ui/simulation-refusal.d.ts +5 -31
- package/dist-pkg/ui/simulation-refusal.js +8 -56
- package/dist-pkg/ui/switchable-control.d.ts +11 -0
- package/dist-pkg/ui/switchable-control.js +19 -0
- package/dist-pkg/ui/title.d.ts +3 -12
- package/dist-pkg/ui/title.js +49 -18
- package/dist-pkg/ui/top-band.d.ts +26 -0
- package/dist-pkg/ui/top-band.js +96 -0
- package/dist-pkg/ui/typo-choices.d.ts +71 -0
- package/dist-pkg/ui/typo-choices.js +85 -0
- package/dist-pkg/ui/visual-axes-panel.d.ts +11 -47
- package/dist-pkg/ui/visual-axes-panel.js +12 -94
- package/dist-pkg/ui/visual-choices.d.ts +77 -0
- package/dist-pkg/ui/visual-choices.js +107 -0
- package/dist-pkg/ui/vlibras.d.ts +77 -10
- package/dist-pkg/ui/vlibras.js +130 -81
- package/dist-pkg/ui/voice-control.d.ts +68 -0
- package/dist-pkg/ui/voice-control.js +276 -0
- package/dist-pkg/ui/voice-settings.d.ts +95 -0
- package/dist-pkg/ui/voice-settings.js +352 -0
- package/dist-pkg/ui/where-the-child-is.d.ts +31 -0
- package/dist-pkg/ui/where-the-child-is.js +70 -0
- package/docs/CREDITS.md +300 -44
- package/docs/LICENSES.md +189 -145
- package/package.json +51 -27
- package/scripts/check-cartridge.mjs +78 -0
- package/scripts/game-build.d.mts +25 -0
- package/scripts/game-build.mjs +144 -0
- package/scripts/heavy-into-the-delivery.mjs +388 -0
- package/scripts/libras-avatar.json +680 -0
- package/scripts/libras-avatar.mjs +246 -0
- package/scripts/libras-glosses/gloss.py +95 -0
- package/scripts/libras-glosses/pyproject.toml +32 -0
- package/scripts/libras-glosses/uv.lock +781 -0
- package/scripts/libras-glosses.mjs +351 -0
- package/scripts/licences/Apache-2.0.txt +176 -0
- package/scripts/licences/GPL-3.0.txt +674 -0
- package/scripts/licences/MIT.txt +17 -0
- package/scripts/licences/OFL-1.1.txt +86 -0
- package/scripts/licences/UFL-1.0.txt +96 -0
- package/scripts/licences/fonts.mjs +389 -0
- package/scripts/licences/third-party.mjs +301 -0
- package/scripts/licences/vosk-browser.NOTICE.txt +268 -0
- package/app/public/vendor/fonts/comicneue-400.woff2 +0 -0
- package/app/public/vendor/fonts/comicneue-700.woff2 +0 -0
- package/app/public/vendor/fonts/fondamento-400-ext.woff2 +0 -0
- package/app/public/vendor/fonts/fondamento-400.woff2 +0 -0
- package/app/public/vendor/fonts/inter-400.woff2 +0 -0
- package/app/public/vendor/fonts/inter-700.woff2 +0 -0
- package/app/public/vendor/fonts/lato-400.woff2 +0 -0
- package/app/public/vendor/fonts/lato-700.woff2 +0 -0
- package/app/public/vendor/fonts/literata-400.woff2 +0 -0
- package/app/public/vendor/fonts/literata-700.woff2 +0 -0
- package/app/public/vendor/fonts/newsreader-400.woff2 +0 -0
- package/app/public/vendor/fonts/newsreader-700.woff2 +0 -0
- package/app/public/vendor/fonts/opendyslexic-400.woff2 +0 -0
- package/app/public/vendor/fonts/opensans-400.woff2 +0 -0
- package/app/public/vendor/fonts/opensans-700.woff2 +0 -0
- package/app/public/vendor/fonts/pinyon-400.woff2 +0 -0
- package/app/public/vendor/fonts/pressstart-400.woff2 +0 -0
- package/app/public/vendor/fonts/quattro-400.woff2 +0 -0
- package/app/public/vendor/fonts/quattro-700.woff2 +0 -0
- package/app/public/vendor/fonts/sourcesans-400.woff2 +0 -0
- package/app/public/vendor/fonts/sourcesans-700.woff2 +0 -0
- package/app/public/vendor/fonts/sourceserif-400.woff2 +0 -0
- package/app/public/vendor/fonts/sourceserif-700.woff2 +0 -0
- package/app/public/vendor/fonts/ufmag-400.woff2 +0 -0
- package/dist-pkg/core/anel.d.ts +0 -17
- package/dist-pkg/core/anel.js +0 -31
- package/dist-pkg/core/collision.d.ts +0 -21
- package/dist-pkg/core/collision.js +0 -62
- package/dist-pkg/core/layers.d.ts +0 -63
- package/dist-pkg/core/layers.js +0 -95
- package/dist-pkg/core/letter-grid.d.ts +0 -55
- package/dist-pkg/core/letter-grid.js +0 -116
- package/dist-pkg/core/password.d.ts +0 -34
- package/dist-pkg/core/password.js +0 -205
- package/dist-pkg/core/rotulo-acessivel.d.ts +0 -17
- package/dist-pkg/core/rotulo-acessivel.js +0 -41
- package/dist-pkg/core/run-state.d.ts +0 -115
- package/dist-pkg/core/run-state.js +0 -40
- package/dist-pkg/core/tiles.d.ts +0 -12
- package/dist-pkg/core/tiles.js +0 -61
- package/dist-pkg/core/world.d.ts +0 -4
- package/dist-pkg/core/world.js +0 -58
- package/dist-pkg/input/origem-sintetica.d.ts +0 -44
- package/dist-pkg/input/origem-sintetica.js +0 -60
- package/dist-pkg/input/transporte-em-uso.d.ts +0 -101
- package/dist-pkg/input/transporte-em-uso.js +0 -130
- package/dist-pkg/platform/audio-nav.d.ts +0 -51
- package/dist-pkg/platform/audio-nav.js +0 -99
- package/dist-pkg/platform/guide-intensity.d.ts +0 -40
- package/dist-pkg/platform/guide-intensity.js +0 -73
- package/dist-pkg/platform/pesados-catalogo.d.ts +0 -14
- package/dist-pkg/platform/pesados-catalogo.js +0 -177
- package/dist-pkg/platform/pesados.d.ts +0 -31
- package/dist-pkg/platform/pesados.js +0 -75
- package/dist-pkg/platform/vozes-prontas.d.ts +0 -28
- package/dist-pkg/platform/vozes-prontas.js +0 -61
- package/dist-pkg/render/camera.d.ts +0 -58
- package/dist-pkg/render/camera.js +0 -105
- package/dist-pkg/render/cenario-data.d.ts +0 -127
- package/dist-pkg/render/cenario-data.js +0 -145
- package/dist-pkg/render/city-tex.d.ts +0 -63
- package/dist-pkg/render/city-tex.js +0 -228
- package/dist-pkg/render/city-tiles.d.ts +0 -11
- package/dist-pkg/render/city-tiles.js +0 -140
- package/dist-pkg/render/draw.d.ts +0 -149
- package/dist-pkg/render/draw.js +0 -231
- package/dist-pkg/render/fx.d.ts +0 -63
- package/dist-pkg/render/fx.js +0 -123
- package/dist-pkg/render/minimap.d.ts +0 -11
- package/dist-pkg/render/minimap.js +0 -94
- package/dist-pkg/render/parallax.d.ts +0 -85
- package/dist-pkg/render/parallax.js +0 -158
- package/dist-pkg/render/player-anim.d.ts +0 -71
- package/dist-pkg/render/player-anim.js +0 -152
- package/dist-pkg/render/recycling-tex.d.ts +0 -48
- package/dist-pkg/render/recycling-tex.js +0 -164
- package/dist-pkg/render/scene-city.d.ts +0 -77
- package/dist-pkg/render/scene-city.js +0 -181
- package/dist-pkg/render/scene-parallax.d.ts +0 -72
- package/dist-pkg/render/scene-parallax.js +0 -426
- package/dist-pkg/render/scene-sky.d.ts +0 -126
- package/dist-pkg/render/scene-sky.js +0 -295
- package/dist-pkg/render/set-cenario.d.ts +0 -54
- package/dist-pkg/render/set-cenario.js +0 -103
- package/dist-pkg/render/textures.d.ts +0 -75
- package/dist-pkg/render/textures.js +0 -240
- package/dist-pkg/render/title-scene.d.ts +0 -46
- package/dist-pkg/render/title-scene.js +0 -75
- package/dist-pkg/render/weather.d.ts +0 -96
- package/dist-pkg/render/weather.js +0 -171
- package/dist-pkg/render/wheelchair-sprites.d.ts +0 -32
- package/dist-pkg/render/wheelchair-sprites.js +0 -69
- package/dist-pkg/render/world-tex.d.ts +0 -18
- package/dist-pkg/render/world-tex.js +0 -87
- package/dist-pkg/ui/activities-menu.d.ts +0 -258
- package/dist-pkg/ui/activities-menu.js +0 -648
- package/dist-pkg/ui/caa-sets.d.ts +0 -39
- package/dist-pkg/ui/caa-sets.js +0 -65
- package/dist-pkg/ui/latch-refusal.d.ts +0 -32
- package/dist-pkg/ui/latch-refusal.js +0 -60
- package/dist-pkg/ui/map-hub.d.ts +0 -56
- package/dist-pkg/ui/map-hub.js +0 -138
- package/dist-pkg/ui/settings-caa.d.ts +0 -45
- package/dist-pkg/ui/settings-caa.js +0 -137
- package/dist-pkg/ui/settings-motor.d.ts +0 -175
- package/dist-pkg/ui/settings-motor.js +0 -342
- package/dist-pkg/ui/webcam.d.ts +0 -7
- package/dist-pkg/ui/webcam.js +0 -93
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
/**
|
|
3
|
-
* `sim` —
|
|
3
|
+
* `sim` — this mode SIMULATES a disability in someone who does not have it, instead of CORRECTING the screen for someone
|
|
4
|
+
* who does.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NÃO tem a deficiência. Um reset que faz isso é pior que a armadilha que ele deveria desfazer.
|
|
6
|
+
* `kind` does not answer that: `sim-deuter` (simulating colour blindness) and `fix-deuter` (correcting it) share
|
|
7
|
+
* `kind:'filter'`, though they serve two opposite people. It matters because the empathy menu's "restore defaults"
|
|
8
|
+
* (ADR-0028) turns the simulations off, and turning the corrections off with them would take from a colour-blind child
|
|
9
|
+
* the only correction they have — from the menu that exists for whoever does NOT have the disability. A reset that does
|
|
10
|
+
* that is worse than the trap it should undo.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* Only the 9 marked modes simulate. The 3 `fix-*` correct, the 3 `hc-direto*` correct, and `normal` does nothing.
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
* `RM_LABEL`,
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* A vision mode. `name` and `desc` keep an i18n KEY, not text — the same decision as `SceneryTheme.name` and
|
|
16
|
+
* `RM_LABEL`, for the same reason: a `const` table with text resolves ONCE, on import, and stays frozen in the boot's
|
|
17
|
+
* language. This menu is what a low-vision or colour-blind child reads to configure their OWN game; leaving it in
|
|
18
|
+
* Portuguese in an English build takes from them the one page they needed to read.
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* Whoever SHOWS it resolves it (`render/viz-setters`, `consumer-quiz`), and that is why this module stays a LEAF: pure
|
|
21
|
+
* data, no dependency, importable from both sides of the boundary.
|
|
22
22
|
*/
|
|
23
23
|
export type VizMode = {
|
|
24
24
|
key: string;
|
|
25
25
|
kind: string;
|
|
26
|
-
|
|
26
|
+
name: string;
|
|
27
27
|
desc: string;
|
|
28
28
|
lv?: string;
|
|
29
29
|
sim?: true;
|
|
@@ -33,29 +33,28 @@ export declare const VIZ_BY_KEY: Record<string, VizMode>;
|
|
|
33
33
|
export declare const VIZ_FILTER: Record<string, string>;
|
|
34
34
|
export declare const VIZ_CYCLE: string[];
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* desconhecido é não.
|
|
36
|
+
* Does this mode simulate a disability? An unknown (or empty) key → false, because the question the caller is asking is
|
|
37
|
+
* "can I turn this off without taking anything from anyone?", and the honest answer in front of the unknown is no.
|
|
39
38
|
*/
|
|
40
39
|
export declare function simulatesDisability(key: string): boolean;
|
|
41
40
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
41
|
+
* The colour-blindness CORRECTIONS: they daltonise the screen for whoever HAS the condition. Derived from the catalogue,
|
|
42
|
+
* never listed by hand — they are exactly the filters that do not simulate.
|
|
44
43
|
*
|
|
45
|
-
*
|
|
46
|
-
* Dev, issue #60).
|
|
47
|
-
*
|
|
48
|
-
*
|
|
44
|
+
* They exist as a list of their own because they live in the VISUAL ACCESSIBILITY menu, and not in the empathy one (the
|
|
45
|
+
* Dev's decision, issue #60). With `kind` not telling simulating from correcting, the empathy panel, which cuts itself
|
|
46
|
+
* by `kind:'filter'`, dragged the three along: two opposite audiences in one list — whoever wants to feel what being
|
|
47
|
+
* colour-blind is like, and whoever is.
|
|
49
48
|
*/
|
|
50
49
|
export declare const VIZ_CORRECTIONS: readonly VizMode[];
|
|
51
|
-
/**
|
|
50
|
+
/** Does this mode need a world CANVAS to exist? Only the `hcnew` ones do: they repaint textures. */
|
|
52
51
|
export declare function needsCanvas(key: string): boolean;
|
|
53
52
|
/**
|
|
54
|
-
*
|
|
53
|
+
* The modes that work in ANY game — the ones applied as a CSS filter over an element.
|
|
55
54
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
55
|
+
* Derived, never listed by hand: a new mode enters the right stack because of the `kind` it declares, not because
|
|
56
|
+
* someone remembered to add it here. The same rule as `VIZ_CORRECTIONS`.
|
|
58
57
|
*/
|
|
59
58
|
export declare const VIZ_DOM_ONLY: readonly VizMode[];
|
|
60
|
-
/**
|
|
59
|
+
/** The modes that REQUIRE a world. The exact complement of `VIZ_DOM_ONLY` — together, the 16, no leftover and no repeat. */
|
|
61
60
|
export declare const VIZ_CANVAS_ONLY: readonly VizMode[];
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
export const VIZ_MODES = [
|
|
3
|
-
{ key: 'normal', kind: 'normal',
|
|
4
|
-
{ key: 'hc-direto', kind: 'hcnew',
|
|
5
|
-
{ key: 'hc-direto-45', kind: 'hcnew',
|
|
6
|
-
{ key: 'hc-direto-7', kind: 'hcnew',
|
|
7
|
-
{ key: 'sim-deuter', sim: true, kind: 'filter',
|
|
8
|
-
{ key: 'sim-protan', sim: true, kind: 'filter',
|
|
9
|
-
{ key: 'sim-tritan', sim: true, kind: 'filter',
|
|
10
|
-
{ key: 'fix-protan', kind: 'filter',
|
|
11
|
-
{ key: 'fix-deuter', kind: 'filter',
|
|
12
|
-
{ key: 'fix-tritan', kind: 'filter',
|
|
13
|
-
{ key: 'lv-blur', sim: true, kind: 'lowvision', lv: 'blur',
|
|
14
|
-
{ key: 'lv-haze', sim: true, kind: 'lowvision', lv: 'haze',
|
|
15
|
-
{ key: 'lv-tunnel', sim: true, kind: 'lowvision', lv: 'tunnel',
|
|
16
|
-
{ key: 'lv-macular', sim: true, kind: 'lowvision', lv: 'macular',
|
|
17
|
-
{ key: 'lv-diabetic', sim: true, kind: 'lowvision', lv: 'diabetic',
|
|
18
|
-
{ key: 'blind', sim: true, kind: 'blind',
|
|
3
|
+
{ key: 'normal', kind: 'normal', name: 'viz.normal', desc: 'viz.desc.normal' },
|
|
4
|
+
{ key: 'hc-direto', kind: 'hcnew', name: 'viz.hc-direto', desc: 'viz.desc.hc-direto' },
|
|
5
|
+
{ key: 'hc-direto-45', kind: 'hcnew', name: 'viz.hc-direto-45', desc: 'viz.desc.hc-direto-45' },
|
|
6
|
+
{ key: 'hc-direto-7', kind: 'hcnew', name: 'viz.hc-direto-7', desc: 'viz.desc.hc-direto-7' },
|
|
7
|
+
{ key: 'sim-deuter', sim: true, kind: 'filter', name: 'viz.sim-deuter', desc: 'viz.desc.sim-deuter' },
|
|
8
|
+
{ key: 'sim-protan', sim: true, kind: 'filter', name: 'viz.sim-protan', desc: 'viz.desc.sim-protan' },
|
|
9
|
+
{ key: 'sim-tritan', sim: true, kind: 'filter', name: 'viz.sim-tritan', desc: 'viz.desc.sim-tritan' },
|
|
10
|
+
{ key: 'fix-protan', kind: 'filter', name: 'viz.fix-protan', desc: 'viz.desc.fix-protan' },
|
|
11
|
+
{ key: 'fix-deuter', kind: 'filter', name: 'viz.fix-deuter', desc: 'viz.desc.fix-deuter' },
|
|
12
|
+
{ key: 'fix-tritan', kind: 'filter', name: 'viz.fix-tritan', desc: 'viz.desc.fix-tritan' },
|
|
13
|
+
{ key: 'lv-blur', sim: true, kind: 'lowvision', lv: 'blur', name: 'viz.lv-blur', desc: 'viz.desc.lv-blur' },
|
|
14
|
+
{ key: 'lv-haze', sim: true, kind: 'lowvision', lv: 'haze', name: 'viz.lv-haze', desc: 'viz.desc.lv-haze' },
|
|
15
|
+
{ key: 'lv-tunnel', sim: true, kind: 'lowvision', lv: 'tunnel', name: 'viz.lv-tunnel', desc: 'viz.desc.lv-tunnel' },
|
|
16
|
+
{ key: 'lv-macular', sim: true, kind: 'lowvision', lv: 'macular', name: 'viz.lv-macular', desc: 'viz.desc.lv-macular' },
|
|
17
|
+
{ key: 'lv-diabetic', sim: true, kind: 'lowvision', lv: 'diabetic', name: 'viz.lv-diabetic', desc: 'viz.desc.lv-diabetic' },
|
|
18
|
+
{ key: 'blind', sim: true, kind: 'blind', name: 'viz.blind', desc: 'viz.desc.blind' },
|
|
19
19
|
];
|
|
20
20
|
export const VIZ_BY_KEY = Object.fromEntries(VIZ_MODES.map((m) => [m.key, m]));
|
|
21
21
|
export const VIZ_FILTER = { 'sim-deuter': 'url(#cvd-deuter)', 'sim-protan': 'url(#cvd-protan)', 'sim-tritan': 'url(#cvd-tritan)',
|
|
@@ -23,52 +23,47 @@ export const VIZ_FILTER = { 'sim-deuter': 'url(#cvd-deuter)', 'sim-protan': 'url
|
|
|
23
23
|
'lv-blur': 'blur(2.4px)', 'lv-haze': 'contrast(.58) brightness(1.14) blur(.6px)', 'lv-tunnel': 'blur(.5px)', 'lv-macular': '', 'lv-diabetic': 'blur(.8px)', 'blind': 'brightness(0)' };
|
|
24
24
|
export const VIZ_CYCLE = VIZ_MODES.map((m) => m.key);
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* desconhecido é não.
|
|
26
|
+
* Does this mode simulate a disability? An unknown (or empty) key → false, because the question the caller is asking is
|
|
27
|
+
* "can I turn this off without taking anything from anyone?", and the honest answer in front of the unknown is no.
|
|
29
28
|
*/
|
|
30
29
|
export function simulatesDisability(key) {
|
|
31
30
|
return VIZ_BY_KEY[key]?.sim === true;
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
33
|
+
* The colour-blindness CORRECTIONS: they daltonise the screen for whoever HAS the condition. Derived from the catalogue,
|
|
34
|
+
* never listed by hand — they are exactly the filters that do not simulate.
|
|
36
35
|
*
|
|
37
|
-
*
|
|
38
|
-
* Dev, issue #60).
|
|
39
|
-
*
|
|
40
|
-
*
|
|
36
|
+
* They exist as a list of their own because they live in the VISUAL ACCESSIBILITY menu, and not in the empathy one (the
|
|
37
|
+
* Dev's decision, issue #60). With `kind` not telling simulating from correcting, the empathy panel, which cuts itself
|
|
38
|
+
* by `kind:'filter'`, dragged the three along: two opposite audiences in one list — whoever wants to feel what being
|
|
39
|
+
* colour-blind is like, and whoever is.
|
|
41
40
|
*/
|
|
42
41
|
export const VIZ_CORRECTIONS = VIZ_MODES.filter((m) => m.kind === 'filter' && !m.sim);
|
|
43
|
-
/* =====================
|
|
42
|
+
/* ===================== TWO STACKS UNDER ONE NAME ===================== */
|
|
44
43
|
//
|
|
45
|
-
//
|
|
44
|
+
// What the menu calls "visual accessibility" is TWO stacks under one name — the engine's second consumer measured it:
|
|
45
|
+
// the `hcnew` modes REPAINT tile TEXTURES in PIXI, and a quiz has no tiles to repaint. One stack is DOM/CSS
|
|
46
|
+
// (colour-blindness filters, typography, letter case) and serves any game; the other is CANVAS (direct rendering,
|
|
47
|
+
// outlines, role colours) and only exists where there is a world.
|
|
46
48
|
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
// tipografia, caixa alta) que serve a qualquer jogo; uma de CANVAS (renderização direta, contornos,
|
|
51
|
-
// cores de papel) que só existe onde há mundo. O painel as apresenta numa lista única de 7 modos… A
|
|
52
|
-
// divisão do passo 5 precisa cortar AQUI."
|
|
49
|
+
// This is the cut, and it is one of DATA, not of files — the files were already apart (`render/cvd-matrices` is pure
|
|
50
|
+
// DOM; `render/high-contrast` repaints a world whose tiles it is handed). What was missing was the table SAYING which
|
|
51
|
+
// stack each mode belongs to, so nobody rebuilds the answer in their head.
|
|
53
52
|
//
|
|
54
|
-
//
|
|
55
|
-
// é DOM puro; `render/high-contrast` importa `core/collision.tileAt`). O que faltava era a tabela DIZER a
|
|
56
|
-
// qual pilha cada modo pertence, para que ninguém mais reconstruísse a resposta de cabeça.
|
|
57
|
-
//
|
|
58
|
-
// E era reconstruída: o segundo consumidor escrevia
|
|
53
|
+
// And it was being rebuilt: the second consumer wrote
|
|
59
54
|
// `VIZ_MODES.filter((m) => m.kind === 'normal' || (m.kind === 'filter' && !simulatesDisability(m.key)))`
|
|
60
|
-
// —
|
|
61
|
-
//
|
|
62
|
-
/**
|
|
55
|
+
// — an expression mixing TWO different questions ("does it need a canvas?" and "does it simulate a disability?") that
|
|
56
|
+
// every future consumer would have to reinvent, with the chance of getting one right and the other wrong.
|
|
57
|
+
/** Does this mode need a world CANVAS to exist? Only the `hcnew` ones do: they repaint textures. */
|
|
63
58
|
export function needsCanvas(key) {
|
|
64
59
|
return VIZ_BY_KEY[key]?.kind === 'hcnew';
|
|
65
60
|
}
|
|
66
61
|
/**
|
|
67
|
-
*
|
|
62
|
+
* The modes that work in ANY game — the ones applied as a CSS filter over an element.
|
|
68
63
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
64
|
+
* Derived, never listed by hand: a new mode enters the right stack because of the `kind` it declares, not because
|
|
65
|
+
* someone remembered to add it here. The same rule as `VIZ_CORRECTIONS`.
|
|
71
66
|
*/
|
|
72
67
|
export const VIZ_DOM_ONLY = VIZ_MODES.filter((m) => !needsCanvas(m.key));
|
|
73
|
-
/**
|
|
68
|
+
/** The modes that REQUIRE a world. The exact complement of `VIZ_DOM_ONLY` — together, the 16, no leftover and no repeat. */
|
|
74
69
|
export const VIZ_CANVAS_ONLY = VIZ_MODES.filter((m) => needsCanvas(m.key));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
import { type UnavailableReason, type VisualState } from './viz-axes.js';
|
|
3
|
+
/** A line ready to translate: the key and what it needs. `null` = nothing to say. */
|
|
4
|
+
export interface Refusal {
|
|
5
|
+
readonly key: string;
|
|
6
|
+
/** What the child has to undo for the demonstration to be honest. */
|
|
7
|
+
readonly axis: UnavailableReason;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The reason's i18n key, per axis off its default.
|
|
11
|
+
*
|
|
12
|
+
* ⚠️ THREE KEYS AND NOT ONE WITH A PARAMETER, and the difference is one of translation, not style: in Portuguese
|
|
13
|
+
* «o tema» and «a correção de cor» take different articles, and «os dois» is the plural of neither. A sentence with an
|
|
14
|
+
* axis parameter would force each language to build agreement from a loose noun — exactly the defect `sr.nav.clockOne`
|
|
15
|
+
* already recorded for «às 1 horas».
|
|
16
|
+
*/
|
|
17
|
+
export declare const REASON_KEY: Readonly<Record<UnavailableReason, string>>;
|
|
18
|
+
/**
|
|
19
|
+
* Can this simulation be offered? And if not, what to say.
|
|
20
|
+
*
|
|
21
|
+
* `null` = it can; the interface shows nothing, because a notice that always appears stops being read.
|
|
22
|
+
*/
|
|
23
|
+
export declare function simulationRefusal(v: VisualState): Refusal | null;
|
|
24
|
+
/**
|
|
25
|
+
* Should the simulation appear DISABLED instead of vanishing?
|
|
26
|
+
*
|
|
27
|
+
* ⚠️ ALWAYS, AND IT IS ADR-0076's «never silently removed» HALF. It exists as a function with a name of its own, and not
|
|
28
|
+
* as a `!refusal` at the call site, because it answers a different question: `simulationRefusal` says *why* it cannot;
|
|
29
|
+
* this one says *that the line stays on screen*. Whoever draws needs both, and merging them would make the answer
|
|
30
|
+
* "there is no reason" look like "do not draw the line".
|
|
31
|
+
*/
|
|
32
|
+
export declare function showsEvenWhenUnavailable(): boolean;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// render/viz-refusal — WHY THE SIMULATION IS NOT AVAILABLE, told to the child (ADR-0076, issue #104).
|
|
3
|
+
//
|
|
4
|
+
// ========================= WHAT THE REFUSAL HAS TO DO, AND WHAT IT MUST NOT DO =========================
|
|
5
|
+
// ADR-0076 requires an unavailable simulation to appear **VISIBLE and explained** — «never silently removed, never
|
|
6
|
+
// accepted then ignored». The two halves of that sentence describe two different defects:
|
|
7
|
+
//
|
|
8
|
+
// · REMOVING SILENTLY teaches that the thing does not exist. An adult who showed the simulation to a class yesterday
|
|
9
|
+
// and cannot find it today concludes it was taken away, not that they themselves turned high contrast on.
|
|
10
|
+
// · ACCEPTING AND IGNORING is worse: the demonstration SEEMS to be running. Over an already corrected screen it shows
|
|
11
|
+
// neither the disability nor the correction; over a high-contrast theme it shows what the THEME does and not what
|
|
12
|
+
// deuteranopia does. ⚠️ It is not a weaker demonstration — **it teaches something false**.
|
|
13
|
+
//
|
|
14
|
+
// ⚠️ AND THE REASON IS A FACT ABOUT THE DEMONSTRATION, NEVER A REPROACH TO WHOEVER CHOSE. Whoever turned high contrast
|
|
15
|
+
// on did so because they need it; whoever turned colour correction on sees better with it. The sentence says what the
|
|
16
|
+
// demonstration needs to be honest, and how to go back — never "turn that off".
|
|
17
|
+
//
|
|
18
|
+
// ========================= WHY THIS IS A PURE MODULE =========================
|
|
19
|
+
// The same shape as `ui/reach-notice`: it returns DATA (an i18n key + parameters), not ready text. The sentence belongs
|
|
20
|
+
// to the interface and has to go through `t()`; returning prose from here would put a language in a module that has
|
|
21
|
+
// none. And, being pure, the refusal's design can be checked in the `node` project, with no document.
|
|
22
|
+
//
|
|
23
|
+
// A leaf module: it imports only the types and the predicate of the two-axis model.
|
|
24
|
+
import { simulationUnavailable } from './viz-axes.js';
|
|
25
|
+
/**
|
|
26
|
+
* The reason's i18n key, per axis off its default.
|
|
27
|
+
*
|
|
28
|
+
* ⚠️ THREE KEYS AND NOT ONE WITH A PARAMETER, and the difference is one of translation, not style: in Portuguese
|
|
29
|
+
* «o tema» and «a correção de cor» take different articles, and «os dois» is the plural of neither. A sentence with an
|
|
30
|
+
* axis parameter would force each language to build agreement from a loose noun — exactly the defect `sr.nav.clockOne`
|
|
31
|
+
* already recorded for «às 1 horas».
|
|
32
|
+
*/
|
|
33
|
+
export const REASON_KEY = Object.freeze({
|
|
34
|
+
tema: 'sim.indisponivel.tema',
|
|
35
|
+
correcao: 'sim.indisponivel.correcao',
|
|
36
|
+
ambos: 'sim.indisponivel.ambos',
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* Can this simulation be offered? And if not, what to say.
|
|
40
|
+
*
|
|
41
|
+
* `null` = it can; the interface shows nothing, because a notice that always appears stops being read.
|
|
42
|
+
*/
|
|
43
|
+
export function simulationRefusal(v) {
|
|
44
|
+
const reason = simulationUnavailable(v);
|
|
45
|
+
return reason === null ? null : { key: REASON_KEY[reason], axis: reason };
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Should the simulation appear DISABLED instead of vanishing?
|
|
49
|
+
*
|
|
50
|
+
* ⚠️ ALWAYS, AND IT IS ADR-0076's «never silently removed» HALF. It exists as a function with a name of its own, and not
|
|
51
|
+
* as a `!refusal` at the call site, because it answers a different question: `simulationRefusal` says *why* it cannot;
|
|
52
|
+
* this one says *that the line stays on screen*. Whoever draws needs both, and merging them would make the answer
|
|
53
|
+
* "there is no reason" look like "do not draw the line".
|
|
54
|
+
*/
|
|
55
|
+
export function showsEvenWhenUnavailable() {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
@@ -1,60 +1,67 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
import { type VizMode } from './viz-modes.js';
|
|
3
|
-
import { type
|
|
3
|
+
import { type Theme, type Correction, type VisualState } from './viz-axes.js';
|
|
4
|
+
import type { Translate } from '../core/i18n.js';
|
|
5
|
+
import { type HighContrast } from './high-contrast.js';
|
|
6
|
+
import type { Store } from '../platform/storage.js';
|
|
7
|
+
/** What each player's visual state is read and written through. */
|
|
8
|
+
export type VisualStore = Pick<Store, 'get' | 'getJSON' | 'set' | 'setJSON'>;
|
|
4
9
|
import type { DomQuery } from '../core/dom-query.js';
|
|
5
|
-
import type {
|
|
10
|
+
import type { WithFilter, WithTexture, Visible, DrawingWithCircle, ApplyCssFilter, FilterReach, ApplyHighContrastToDom } from './port.js';
|
|
6
11
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
12
|
+
* How far this mode's filter reaches. ENHANCEMENT reaches the menus; EMPATHY stays in the world (see `FilterReach`).
|
|
13
|
+
* Derived from the catalogue's `sim` — the same flag that already tells the two apart, not a second list for someone
|
|
14
|
+
* to forget to update.
|
|
10
15
|
*/
|
|
11
|
-
export declare function
|
|
12
|
-
/**
|
|
16
|
+
export declare function reachOfMode(mode: string): FilterReach;
|
|
17
|
+
/** The mode by key, with a fallback: an unknown (or null) key FALLS to `normal`. */
|
|
13
18
|
export declare function resolveViz(key: string | null | undefined): VizMode;
|
|
14
19
|
/**
|
|
15
|
-
*
|
|
20
|
+
* This player's STORED VISUAL STATE, in either of its two shapes (issue #104).
|
|
16
21
|
*
|
|
17
|
-
* ⚠️
|
|
18
|
-
*
|
|
22
|
+
* ⚠️ THIS FUNCTION IS THE definition of done's box that says a setting saved before the split restores the same visible
|
|
23
|
+
* state, and the order of the two reads is the whole decision:
|
|
19
24
|
*
|
|
20
|
-
* 1.
|
|
21
|
-
* 2.
|
|
22
|
-
*
|
|
23
|
-
* 3.
|
|
25
|
+
* 1. the NEW key (`visualP`), the only one that can express two axes;
|
|
26
|
+
* 2. without it, the OLD key (`vizP`), which keeps the single string — and where the setting of every child who
|
|
27
|
+
* played this game before the split lives;
|
|
28
|
+
* 3. without either, the default.
|
|
24
29
|
*
|
|
25
|
-
* ⚠️
|
|
26
|
-
*
|
|
27
|
-
*
|
|
30
|
+
* ⚠️ THE FALLBACK IS NOT ZEAL: without it, the first session after the update would erase the visual mode the child
|
|
31
|
+
* chose — and whoever chose `fix-deuter` or `hc-direto-7` chose it because that is how they see. It is the difference
|
|
32
|
+
* between migrating and starting over.
|
|
28
33
|
*
|
|
29
|
-
* `
|
|
34
|
+
* `migrateVisual` accepts both shapes and is idempotent, so this can run as many times as needed.
|
|
35
|
+
*
|
|
36
|
+
* 📌 THE STORE IS A PARAMETER (ADR-0232, issue #207): the page's store, built by whoever composes the page.
|
|
30
37
|
*/
|
|
31
|
-
export declare function
|
|
32
|
-
/**
|
|
38
|
+
export declare function readStoredVisual(store: VisualStore, i: number): VisualState;
|
|
39
|
+
/** Is it one of the three Direct Rendering (high contrast) levels? The test is `!!DIRECT_CFG[mode]`. */
|
|
33
40
|
export declare function isDirectMode(mode: string): boolean;
|
|
34
|
-
/**
|
|
41
|
+
/** The canvas's CSS filter in SOLO: vision simulation/correction + the L→Q enhancement, composed and with no gaps. */
|
|
35
42
|
export declare function cssFilterFor(mode: string, lq: string): string;
|
|
36
|
-
/**
|
|
43
|
+
/** A viewport's indicator dot: only blindness (white) and low vision (green) light it. */
|
|
37
44
|
export declare function vizDotFor(m: VizMode | undefined): {
|
|
38
45
|
visible: boolean;
|
|
39
46
|
fill: number | null;
|
|
40
47
|
};
|
|
41
|
-
/**
|
|
48
|
+
/** The GLOBAL dot (#viz-indicator) for a `kind`: visible, classes and screen-reader label. */
|
|
42
49
|
export declare function vizIndicatorFor(kind: string): {
|
|
43
50
|
on: boolean;
|
|
44
51
|
blind: boolean;
|
|
45
52
|
low: boolean;
|
|
46
53
|
label: string;
|
|
47
54
|
};
|
|
48
|
-
/**
|
|
55
|
+
/** The low-vision DOM overlay's class (`lv-haze`/`lv-tunnel`/…); '' for any other kind. */
|
|
49
56
|
export declare function lvOverlayClassFor(m: VizMode): string;
|
|
50
|
-
/** HTML
|
|
51
|
-
export declare function vizGroupHtml(modes: readonly VizMode[], cur: string): string;
|
|
52
|
-
/**
|
|
53
|
-
export declare function vizGroupSay(numPlayers: number, sel: number,
|
|
54
|
-
type Filtered =
|
|
55
|
-
type Textured =
|
|
56
|
-
/** PIXI.Graphics
|
|
57
|
-
type DotGfx =
|
|
57
|
+
/** The HTML of the vision modes' radio group (one row per mode; the current one marked). */
|
|
58
|
+
export declare function vizGroupHtml(t: Translate, modes: readonly VizMode[], cur: string): string;
|
|
59
|
+
/** The screen reader's line when a mode is chosen: prefixed with the player only on several screens. */
|
|
60
|
+
export declare function vizGroupSay(numPlayers: number, sel: number, name: string): string;
|
|
61
|
+
type Filtered = WithFilter;
|
|
62
|
+
type Textured = WithTexture;
|
|
63
|
+
/** The per-viewport dot's PIXI.Graphics — only what updateVpDots really uses. */
|
|
64
|
+
type DotGfx = Visible & DrawingWithCircle;
|
|
58
65
|
interface ClassListHost {
|
|
59
66
|
classList: {
|
|
60
67
|
toggle(token: string, force?: boolean): unknown;
|
|
@@ -72,16 +79,21 @@ interface Pu {
|
|
|
72
79
|
sprite?: Textured | null;
|
|
73
80
|
}
|
|
74
81
|
export interface VizSettersCtx {
|
|
75
|
-
/**
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
*
|
|
82
|
+
/** Translates in the page's language — the root's translator (ADR-0232 D3). REQUIRED: text built from nowhere is a raw key. */
|
|
83
|
+
t: Translate;
|
|
84
|
+
/**
|
|
85
|
+
* Where each player's visual state is kept — the page's store, built by the root (ADR-0232, issue #207). Required: a
|
|
86
|
+
* correction written nowhere is gone at the next visit, for the child who chose it because that is how they see.
|
|
87
|
+
*/
|
|
88
|
+
store: VisualStore;
|
|
89
|
+
/** The game's selector (#viz-overlay, #viz-indicator, the panel's lists). `DomQuery` from `core/dom-query`: a local
|
|
90
|
+
* NON-GENERIC version would instantiate a generic function by its CONSTRAINT when assigned to it. */
|
|
79
91
|
$: DomQuery;
|
|
80
92
|
body: ClassListHost;
|
|
81
93
|
srSay: (s: string) => void;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
|
|
94
|
+
applyCssFilter: ApplyCssFilter;
|
|
95
|
+
/** High contrast in the DOM — the filter does not reach it because it IS not a filter. Issue #83. */
|
|
96
|
+
applyHighContrastToDom: ApplyHighContrastToDom;
|
|
85
97
|
camera: Filtered;
|
|
86
98
|
worldSprite: Textured;
|
|
87
99
|
parallaxLayers: Textured[];
|
|
@@ -89,19 +101,17 @@ export interface VizSettersCtx {
|
|
|
89
101
|
getVpSpr: () => Filtered[];
|
|
90
102
|
getVpDots: () => DotGfx[];
|
|
91
103
|
/**
|
|
92
|
-
*
|
|
104
|
+
* The declared ITEMS' sprites (the array lives in the game and may be recreated — hence a getter).
|
|
93
105
|
*
|
|
94
|
-
*
|
|
95
|
-
* das entidades declaradas: uma lista de sprites, sem o desenho saber o que cada um representa.
|
|
106
|
+
* A list of sprites, with the drawing not knowing what each one represents — not a coin-shaped getter.
|
|
96
107
|
*/
|
|
97
108
|
getItemSprites: () => (Textured | null | undefined)[];
|
|
98
109
|
/**
|
|
99
|
-
*
|
|
110
|
+
* What the GAME calls its items in `render/high-contrast`'s recolour cache.
|
|
100
111
|
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* por isso o nome tinha de estar em algum lugar — agora está do lado de quem o escolheu.
|
|
112
|
+
* The cache keys by `(id, mode)`; a `'coin'` string fixed in here would be this module naming one game's item. Note
|
|
113
|
+
* the neighbour below: power-ups always carried their own `kind`, and the engine only passes it on. The items carried
|
|
114
|
+
* nothing, so the name had to live somewhere — it lives on the side of whoever chose it.
|
|
105
115
|
*/
|
|
106
116
|
itemTexId: string;
|
|
107
117
|
getPowerups: () => readonly Pu[];
|
|
@@ -117,46 +127,74 @@ export interface VizSettersCtx {
|
|
|
117
127
|
playerVizTex: (base: unknown, mode: string) => unknown;
|
|
118
128
|
pixiFilterFor: (mode: string) => unknown;
|
|
119
129
|
clearPlayerDirectCache: () => void;
|
|
130
|
+
/**
|
|
131
|
+
* A POWER-UP'S TEXTURE IN THIS VISUAL MODE, and forgetting it — through a DOOR (ADR-0228).
|
|
132
|
+
*
|
|
133
|
+
* 🔴 A power-up is a game's furniture, and so is its texture cache. What is the ENGINE's is the rule — switching visual
|
|
134
|
+
* mode repaints what is on screen —, and that rule does not need to know what a power-up is.
|
|
135
|
+
*/
|
|
136
|
+
pupTexFor: (kind: string, mode: string) => unknown;
|
|
137
|
+
resetPupTexCache: () => void;
|
|
138
|
+
/**
|
|
139
|
+
* THE WORLD'S HIGH CONTRAST (`render/high-contrast`'s `createHighContrast`), built by whoever has the world — the root
|
|
140
|
+
* has none (ADR-0232 D4, issue #207). REQUIRED: the recoloured world and sprites, and their caches, are that instance's.
|
|
141
|
+
*/
|
|
142
|
+
hc: Pick<HighContrast, 'worldTexFor' | 'spriteTexFor' | 'clearWorldTexCache' | 'clearSpriteTexCache'>;
|
|
143
|
+
/**
|
|
144
|
+
* The L→Q contrast enhancement's CSS fragment (`render/lq-filter`'s `createLqFilter().filter`), '' when off. REQUIRED:
|
|
145
|
+
* the enhancement is a low-vision child's, and a filter recomposed without it would drop it in silence.
|
|
146
|
+
*/
|
|
147
|
+
lqFilter: () => string;
|
|
120
148
|
setFrontDim: (on: boolean) => void;
|
|
121
149
|
rebuildExtras: () => void;
|
|
122
150
|
rebuildCoins: () => void;
|
|
123
|
-
|
|
151
|
+
/**
|
|
152
|
+
* The blindness empathy mode turns on the cane + audio cues: the settings store's blind-mode writer (write, persist,
|
|
153
|
+
* notify). REQUIRED (ADR-0232 D2c): the store is built by the root and passed in; a game that is its own root passes
|
|
154
|
+
* `setBlindModeValue` from `core/state`.
|
|
155
|
+
*/
|
|
156
|
+
setBlindMode: (on: boolean) => void;
|
|
157
|
+
/**
|
|
158
|
+
* Writes the single LEGACY visual-mode mirror (`incl_viz`) — the settings store's `setVizModeValue`. REQUIRED for the
|
|
159
|
+
* same reason: the old readers of the global key would lose the child's mode without it.
|
|
160
|
+
*/
|
|
161
|
+
setVizMode: (mode: string) => void;
|
|
124
162
|
hideTouchControls: (reason?: string) => void;
|
|
125
163
|
reflectVizButtons: () => void;
|
|
126
164
|
renderVisualPanel: () => void;
|
|
127
165
|
renderEmpathyPanel: () => void;
|
|
128
166
|
}
|
|
129
167
|
export interface VizSettersApi {
|
|
130
|
-
/**
|
|
168
|
+
/** Several screens: applies the mode's STATIC textures (memoised) + each player's current frame. */
|
|
131
169
|
applySharedTextures(mode: string): void;
|
|
132
|
-
/**
|
|
170
|
+
/** Per-viewport indicator dots (outside the viewport's filter — visible even in blindness). */
|
|
133
171
|
updateVpDots(): void;
|
|
134
|
-
/**
|
|
172
|
+
/** Each viewport's PIXI filter = the mode of that screen's player. */
|
|
135
173
|
applyVpFilters(): void;
|
|
136
|
-
/**
|
|
174
|
+
/** Changes ONE player's mode: persists, invalidates the static render and reapplies by the right path. */
|
|
137
175
|
setPlayerViz(i: number, mode: string): void;
|
|
138
176
|
/**
|
|
139
|
-
*
|
|
177
|
+
* A player's WHOLE state, and the TWO per-axis writers (#104).
|
|
140
178
|
*
|
|
141
|
-
* ⚠️
|
|
142
|
-
*
|
|
143
|
-
*
|
|
179
|
+
* ⚠️ The per-axis writers are separate because that is what a two-control panel needs: changing the THEME without
|
|
180
|
+
* touching the correction, and vice versa. With a single field, changing one inevitably meant erasing the other — and
|
|
181
|
+
* that was the defect, not the API.
|
|
144
182
|
*/
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
/**
|
|
183
|
+
setPlayerVisual(i: number, v: VisualState): void;
|
|
184
|
+
setPlayerTheme(i: number, theme: Theme): void;
|
|
185
|
+
setPlayerCorrection(i: number, correction: Correction): void;
|
|
186
|
+
/** The SOLO path: CSS filter on the canvas + global textures + DOM overlay + dot. */
|
|
149
187
|
applyVizGlobal(v: VisualState): void;
|
|
150
|
-
/**
|
|
188
|
+
/** Reapplies everything after a structural change (scenery, number of screens). */
|
|
151
189
|
reapplyVizAll(): void;
|
|
152
|
-
/**
|
|
190
|
+
/** The global dot (#viz-indicator) for a `kind`. */
|
|
153
191
|
updateVizIndicator(kind: string): void;
|
|
154
|
-
/**
|
|
192
|
+
/** Invalidates the direct texture caches (world/sprites/power-ups/player) and re-renders. */
|
|
155
193
|
rebakeDirect(): void;
|
|
156
|
-
/**
|
|
194
|
+
/** The vision modes' radio group in the panels (visual/empathy). */
|
|
157
195
|
renderVizGroup(listSel: string, tabsSel: string, modes: readonly VizMode[]): void;
|
|
158
|
-
/**
|
|
159
|
-
|
|
196
|
+
/** The visual panel's TWO axes (#104). The sibling of the one above — see the note in the implementation. */
|
|
197
|
+
renderVisualAxes(listSel: string, tabsSel: string): void;
|
|
160
198
|
}
|
|
161
199
|
export declare function initVizSetters(ctx: VizSettersCtx): VizSettersApi;
|
|
162
200
|
export {};
|