@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,71 +1,61 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* What counts as focusable. Deliberately WITHOUT `[contenteditable]` and without positive `tabindex`: both exist, but
|
|
4
|
+
* appear in no dialog of this engine, and a selector that promises more than was verified is a selector that lies at
|
|
5
|
+
* the next review.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const FOCUSABLE_SELECTOR: string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Where focus has to go when Tab is about to leave the dialog — or `null` when there is nothing to do and the browser
|
|
10
|
+
* should carry on by itself.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* The four cases, and the third is why this exists:
|
|
13
13
|
*
|
|
14
|
-
* 1.
|
|
15
|
-
*
|
|
16
|
-
* 2.
|
|
17
|
-
*
|
|
18
|
-
* 3. ⚠️
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* 4.
|
|
14
|
+
* 1. EMPTY list → `null`. A dialog with nothing focusable is the dialog's defect, and trapping focus in it would
|
|
15
|
+
* leave the child with no way out at all. Better to let it leave than to lock it in a mute place.
|
|
16
|
+
* 2. focus on the LAST going forward → back to the first; on the FIRST going backwards → to the last. That is the
|
|
17
|
+
* cycle, which is what "trap" means.
|
|
18
|
+
* 3. ⚠️ focus OUTSIDE the list → bring it back. The case the other three do not cover: focus may have escaped by a
|
|
19
|
+
* click on the board, or because the dialog opened without focusing anything. Without it the trap only works for
|
|
20
|
+
* whoever was already inside.
|
|
21
|
+
* 4. focus in the MIDDLE → `null`, and the browser walks. See the header.
|
|
22
22
|
*/
|
|
23
|
-
export declare function
|
|
24
|
-
interface
|
|
25
|
-
addEventListener: (
|
|
26
|
-
removeEventListener?: (
|
|
23
|
+
export declare function nextInTrap<T>(focusables: readonly T[], current: T | null, backwards: boolean): T | null;
|
|
24
|
+
interface KeydownTarget {
|
|
25
|
+
addEventListener: (kind: 'keydown', fn: (e: KeyboardEvent) => void, capture?: boolean) => void;
|
|
26
|
+
removeEventListener?: (kind: 'keydown', fn: (e: KeyboardEvent) => void, capture?: boolean) => void;
|
|
27
27
|
}
|
|
28
28
|
export interface FocusTrapCtx {
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
win:
|
|
29
|
+
/** The highest VISIBLE dialog in the stack, or `null`. It is `ui/settings-panel`'s `topVisibleOverlay`. */
|
|
30
|
+
topOverlay: () => HTMLElement | null;
|
|
31
|
+
/** Who has focus now — `() => document.activeElement`. Injected: the node project has no document. */
|
|
32
|
+
currentFocus: () => Element | null;
|
|
33
|
+
/** The focusables INSIDE the dialog, in document order and already filtered by visibility. */
|
|
34
|
+
focusablesIn: (isInside: HTMLElement) => HTMLElement[];
|
|
35
|
+
win: KeydownTarget;
|
|
36
36
|
}
|
|
37
37
|
export interface FocusTrapApi {
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
/**
|
|
38
|
+
/** The handler, exposed so the test can call it without installing anything. */
|
|
39
|
+
onKeydown: (e: KeyboardEvent) => void;
|
|
40
|
+
/** Installs in the CAPTURE phase, for the same reason as `menu-nav`: see the key before whoever is underneath. */
|
|
41
41
|
attach: () => void;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Uninstalls.
|
|
44
44
|
*
|
|
45
|
-
* ⚠️
|
|
46
|
-
*
|
|
47
|
-
* diálogo aberto o Tab é do jogo» ficou vermelho por causa de uma armadilha que já devia ter saído.
|
|
48
|
-
*
|
|
49
|
-
* O que isso mostra vale fora do teste: uma armadilha que não se desinstala é um vazamento para qualquer
|
|
50
|
-
* página que monte a engine duas vezes — o `demos`, que troca de jogo sem recarregar, é exatamente isso.
|
|
45
|
+
* ⚠️ A trap that does not uninstall is a leak for any page that mounts the engine twice — one that switches games
|
|
46
|
+
* without reloading is exactly that: the first trap keeps holding focus during the second.
|
|
51
47
|
*/
|
|
52
48
|
detach: () => void;
|
|
53
49
|
}
|
|
54
50
|
export declare function initFocusTrap(ctx: FocusTrapCtx): FocusTrapApi;
|
|
55
51
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* ⚠️ A VISIBILIDADE É POR `getClientRects()`, e não por `offsetParent`.
|
|
60
|
-
*
|
|
61
|
-
* ⚠️ E A PRIMEIRA VERSÃO DESTE COMENTÁRIO ESTAVA ERRADA, o que vale mais registrar do que apagar: ele dizia
|
|
62
|
-
* que `offsetParent` é `null` para «qualquer elemento em `position: fixed`». Não é — é `null` para o elemento
|
|
63
|
-
* FIXO EM SI, e os descendentes dele devolvem o próprio contêiner. O teste de navegador reprovou a afirmação,
|
|
64
|
-
* que é exatamente o que um teste tem de fazer com uma justificativa inventada.
|
|
52
|
+
* The focusables of a container, in the browser. It lives here and not in a root so that two roots do not write two
|
|
53
|
+
* versions that would drift silently — one trapping focus and the other letting it escape, in the same product.
|
|
65
54
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
55
|
+
* ⚠️ VISIBILITY IS BY `getClientRects()`, not by `offsetParent`: `getClientRects()` answers "does this draw any box?",
|
|
56
|
+
* which covers `display:none` on ANY ancestor, zero-size elements and the fixed-container case — without the reader
|
|
57
|
+
* needing to know where `offsetParent` has holes (it is `null` for a FIXED element itself, while its descendants return
|
|
58
|
+
* the container).
|
|
69
59
|
*/
|
|
70
|
-
export declare function
|
|
60
|
+
export declare function focusablesInDom(isInside: HTMLElement): HTMLElement[];
|
|
71
61
|
export {};
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// ui/focus-trap.ts —
|
|
3
|
-
// EM LADO NENHUM da engine: os outros dois eram construídos e deixados desligados, este nunca foi escrito.
|
|
4
|
-
// `ui/settings-panel.ts:17-19` diz isso por escrito — *"não instala armadilha de foco (o original também não
|
|
5
|
-
// tem)"*.
|
|
2
|
+
// ui/focus-trap.ts — THE FOCUS TRAP (issue #109).
|
|
6
3
|
//
|
|
7
|
-
// ⚠️
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
4
|
+
// ⚠️ THE DOCUMENT ALREADY PROMISES IT. Every `.overlay__card` carries `aria-modal="true"`, which tells assistive
|
|
5
|
+
// technology the rest of the page is inert. Without a trap, Tab disagrees: it leaves the dialog and enters the board
|
|
6
|
+
// underneath. That is the worst shape of accessibility defect — not the absence of a promise, but a promise the keyboard
|
|
7
|
+
// contradicts. A screen-reader user steps out into a game whose state they cannot perceive, with no way back they can
|
|
8
|
+
// perceive.
|
|
12
9
|
//
|
|
13
|
-
// ⚠️
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
10
|
+
// ⚠️ IT ONLY INTERVENES AT THE EDGES, and that is a decision, not thrift. Reimplementing the whole tab order would mean
|
|
11
|
+
// reproducing rules the browser already gets right — positive `tabindex`, DOM order in a shadow root, elements made
|
|
12
|
+
// focusable by `contenteditable`. A trap that steps into the middle errs while walking; one that only closes the cycle
|
|
13
|
+
// at the ends cannot err in the middle, because it does not touch it.
|
|
17
14
|
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
15
|
+
// The rule lives in ONE pure function (`nextInTrap`), testable in the node project with no DOM. What needs a browser is
|
|
16
|
+
// only reading who is focused and calling `.focus()`.
|
|
20
17
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
18
|
+
* What counts as focusable. Deliberately WITHOUT `[contenteditable]` and without positive `tabindex`: both exist, but
|
|
19
|
+
* appear in no dialog of this engine, and a selector that promises more than was verified is a selector that lies at
|
|
20
|
+
* the next review.
|
|
24
21
|
*/
|
|
25
|
-
export const
|
|
22
|
+
export const FOCUSABLE_SELECTOR = [
|
|
26
23
|
'a[href]',
|
|
27
24
|
'button:not([disabled])',
|
|
28
25
|
'input:not([disabled])',
|
|
@@ -31,69 +28,63 @@ export const SELETOR_FOCAVEL = [
|
|
|
31
28
|
'[tabindex]:not([tabindex="-1"])',
|
|
32
29
|
].join(',');
|
|
33
30
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
31
|
+
* Where focus has to go when Tab is about to leave the dialog — or `null` when there is nothing to do and the browser
|
|
32
|
+
* should carry on by itself.
|
|
36
33
|
*
|
|
37
|
-
*
|
|
34
|
+
* The four cases, and the third is why this exists:
|
|
38
35
|
*
|
|
39
|
-
* 1.
|
|
40
|
-
*
|
|
41
|
-
* 2.
|
|
42
|
-
*
|
|
43
|
-
* 3. ⚠️
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* 4.
|
|
36
|
+
* 1. EMPTY list → `null`. A dialog with nothing focusable is the dialog's defect, and trapping focus in it would
|
|
37
|
+
* leave the child with no way out at all. Better to let it leave than to lock it in a mute place.
|
|
38
|
+
* 2. focus on the LAST going forward → back to the first; on the FIRST going backwards → to the last. That is the
|
|
39
|
+
* cycle, which is what "trap" means.
|
|
40
|
+
* 3. ⚠️ focus OUTSIDE the list → bring it back. The case the other three do not cover: focus may have escaped by a
|
|
41
|
+
* click on the board, or because the dialog opened without focusing anything. Without it the trap only works for
|
|
42
|
+
* whoever was already inside.
|
|
43
|
+
* 4. focus in the MIDDLE → `null`, and the browser walks. See the header.
|
|
47
44
|
*/
|
|
48
|
-
export function
|
|
49
|
-
if (
|
|
45
|
+
export function nextInTrap(focusables, current, backwards) {
|
|
46
|
+
if (focusables.length === 0)
|
|
50
47
|
return null;
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const i =
|
|
48
|
+
const first = focusables[0];
|
|
49
|
+
const last = focusables[focusables.length - 1];
|
|
50
|
+
const i = current === null ? -1 : focusables.indexOf(current);
|
|
54
51
|
if (i < 0)
|
|
55
|
-
return
|
|
56
|
-
if (!
|
|
57
|
-
return
|
|
58
|
-
if (
|
|
59
|
-
return
|
|
60
|
-
return null; //
|
|
52
|
+
return backwards ? last : first; // case 3: focus was outside
|
|
53
|
+
if (!backwards && i === focusables.length - 1)
|
|
54
|
+
return first;
|
|
55
|
+
if (backwards && i === 0)
|
|
56
|
+
return last;
|
|
57
|
+
return null; // case 4: the middle belongs to the browser
|
|
61
58
|
}
|
|
62
59
|
export function initFocusTrap(ctx) {
|
|
63
|
-
function
|
|
60
|
+
function trapKey(e) {
|
|
64
61
|
if (e.key !== 'Tab')
|
|
65
62
|
return;
|
|
66
|
-
const dialogo = ctx.
|
|
63
|
+
const dialogo = ctx.topOverlay();
|
|
67
64
|
if (!dialogo)
|
|
68
|
-
return; //
|
|
69
|
-
const
|
|
70
|
-
if (!
|
|
65
|
+
return; // with no dialog open, Tab belongs to the game, and has to stay that way
|
|
66
|
+
const target = nextInTrap(ctx.focusablesIn(dialogo), ctx.currentFocus(), e.shiftKey);
|
|
67
|
+
if (!target)
|
|
71
68
|
return;
|
|
72
69
|
e.preventDefault();
|
|
73
|
-
|
|
70
|
+
target.focus();
|
|
74
71
|
}
|
|
75
72
|
return {
|
|
76
|
-
|
|
77
|
-
attach: () => ctx.win.addEventListener('keydown',
|
|
78
|
-
detach: () => ctx.win.removeEventListener?.('keydown',
|
|
73
|
+
onKeydown: trapKey,
|
|
74
|
+
attach: () => ctx.win.addEventListener('keydown', trapKey, true),
|
|
75
|
+
detach: () => ctx.win.removeEventListener?.('keydown', trapKey, true),
|
|
79
76
|
};
|
|
80
77
|
}
|
|
81
78
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
79
|
+
* The focusables of a container, in the browser. It lives here and not in a root so that two roots do not write two
|
|
80
|
+
* versions that would drift silently — one trapping focus and the other letting it escape, in the same product.
|
|
84
81
|
*
|
|
85
|
-
* ⚠️
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* FIXO EM SI, e os descendentes dele devolvem o próprio contêiner. O teste de navegador reprovou a afirmação,
|
|
90
|
-
* que é exatamente o que um teste tem de fazer com uma justificativa inventada.
|
|
91
|
-
*
|
|
92
|
-
* A razão verdadeira é mais simples e mais forte: `getClientRects()` responde *«isto desenha alguma caixa?»*,
|
|
93
|
-
* o que cobre `display:none` em QUALQUER ancestral, elementos de tamanho zero e o caso do contêiner fixo —
|
|
94
|
-
* sem que quem lê precise de saber em que casos `offsetParent` tem buracos.
|
|
82
|
+
* ⚠️ VISIBILITY IS BY `getClientRects()`, not by `offsetParent`: `getClientRects()` answers "does this draw any box?",
|
|
83
|
+
* which covers `display:none` on ANY ancestor, zero-size elements and the fixed-container case — without the reader
|
|
84
|
+
* needing to know where `offsetParent` has holes (it is `null` for a FIXED element itself, while its descendants return
|
|
85
|
+
* the container).
|
|
95
86
|
*/
|
|
96
|
-
export function
|
|
97
|
-
const
|
|
98
|
-
return
|
|
87
|
+
export function focusablesInDom(isInside) {
|
|
88
|
+
const candidates = [...isInside.querySelectorAll(FOCUSABLE_SELECTOR)];
|
|
89
|
+
return candidates.filter((el) => !el.hidden && el.getClientRects().length > 0);
|
|
99
90
|
}
|
package/dist-pkg/ui/fonts.d.ts
CHANGED
|
@@ -1,111 +1,200 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* A face's ROLE — the ADR-0012 amendment turned into data (issue #87).
|
|
4
|
+
*
|
|
5
|
+
* ⚠️ IT IS NOT THE SAME AS THE GROUP. The group (`sans`/`serif`/`hand`) is APPEARANCE and serves to read the list; the
|
|
6
|
+
* role is WHERE THE FACE MAY BE USED, and it is a rule:
|
|
7
|
+
*
|
|
8
|
+
* · `geral` — anywhere. The only ones the typography menu offers.
|
|
9
|
+
* · `caligrafica` — **only INSIDE school activities**, never in the HUD or menus, and so **not in the font menu**. They
|
|
10
|
+
* exist for the child to LEARN to read cursive, which is subject matter; using them as interface would hand the
|
|
11
|
+
* child the subject as an obstacle everywhere they only want to navigate.
|
|
12
|
+
* · `jogo` — the face the GAME uses in the HUD, the title and short arcade labels. Not in the menu either, for the same
|
|
13
|
+
* kind of reason: an 8-bit pixel face is drawn to say FEW words at a large size. As an interface face it contradicts
|
|
14
|
+
* the argument that makes Atkinson Hyperlegible the default — little differentiation between letters, a wide
|
|
15
|
+
* advance, no height variation. Right in a pixel-art game's HUD, wrong in a menu the child has to READ.
|
|
16
|
+
*
|
|
17
|
+
* ⚠️ AND THE CUT IS NOT THE `hand` GROUP. `pwbr` is there by appearance — it is the group's GENERAL face (ADR-0176) and
|
|
18
|
+
* often recommended for dyslexia. Removing it from the menu would remove a legitimately accessible option. The good
|
|
19
|
+
* definition is the list in #87 item 2, which names the handwriting faces by giving them a minimum size.
|
|
20
|
+
*/
|
|
21
|
+
export type FontRole = 'geral' | 'caligrafica' | 'jogo';
|
|
22
|
+
/** One position of the eleventh button's typography cycle: the CASE and the FACE, together (ADR-0149 §1). */
|
|
23
|
+
export interface TypographyStep {
|
|
24
|
+
/** `upper` = UPPER CASE; `mixed` = upper and lower case. The values of `core/state.letterCase`. */
|
|
25
|
+
readonly letterCase: 'upper' | 'mixed';
|
|
26
|
+
/** The face's key in the catalogue. */
|
|
27
|
+
readonly font: string;
|
|
28
|
+
/**
|
|
29
|
+
* This position's size multiplier — 1 on the reading faces, **1.25 on the country hand** (ADR-0149 §1).
|
|
30
|
+
*
|
|
31
|
+
* 🔴 NOT A PREFERENCE, IT IS THE LEGIBILITY FLOOR ALREADY MEASURED. The Playwrite faces declare `minPx: 20` (ADR-0012
|
|
32
|
+
* amendment): below it the face stops being DIFFICULT and becomes ILLEGIBLE — difficulty is the exercise, illegibility
|
|
33
|
+
* is the child giving up. The document's base is 16 px, and 16 × 1.25 = 20 — the multiplier IS the floor, written as a
|
|
34
|
+
* ratio instead of a loose number.
|
|
35
|
+
*/
|
|
36
|
+
readonly scale: number;
|
|
37
|
+
}
|
|
38
|
+
/** The country hand's increase. Named so the gate can assert it against `minPx` instead of repeating it. */
|
|
39
|
+
export declare const HANDWRITING_SCALE = 1.25;
|
|
40
|
+
/** The document's base, in px — the `font-size` of `html,body`. The floor comes from multiplying it by the scale. */
|
|
41
|
+
export declare const BASE_EM_PX = 16;
|
|
42
|
+
/**
|
|
43
|
+
* THE ELEVENTH BUTTON'S CYCLE — five positions, or six where the country teaches two hands (ADR-0149 §1, ADR-0150 §2).
|
|
44
|
+
*
|
|
45
|
+
* 🎯 EACH STEP CHANGES THE CASE **AND** THE FACE, and that is the whole decision: `letterCase` (`core/state`, ADR-0028)
|
|
46
|
+
* and the face are two settings, but Andika in upper case is ONE pedagogical choice of whoever teaches literacy, not
|
|
47
|
+
* two. A child should not have to know the model to make it.
|
|
48
|
+
*
|
|
49
|
+
* 📌 IT STARTS AT ATKINSON, which is position (c) and the project's default. The cycle is a ring: from it, one press goes
|
|
50
|
+
* to Lexend and the last goes back to the start.
|
|
51
|
+
*
|
|
52
|
+
* ⚠️ THE COUNTRY HAND MAY NOT EXIST — a tag with no region and a language outside the repertoire returns nothing. Then the
|
|
53
|
+
* cycle has FOUR positions, which is the right answer: one position fewer is better than one showing the hand of a
|
|
54
|
+
* country that is not that child's.
|
|
55
|
+
*
|
|
56
|
+
* 🔴 ARASAAC AND PCS ARE NOT POSITIONS, a decision and not an oversight: ADR-0155 §3 says to skip them — while the licence
|
|
57
|
+
* does not allow, the cycle neither stops on them nor announces them. A position existing only to be skipped would be
|
|
58
|
+
* data with no reader; they enter the day they work.
|
|
6
59
|
*/
|
|
60
|
+
export declare function typographyCycle(tag: string | null | undefined): readonly TypographyStep[];
|
|
61
|
+
/** The index where the cycle STARTS — position (c). Named so the gate can assert it without recounting. */
|
|
62
|
+
export declare const CYCLE_START = 2;
|
|
7
63
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* ⚠️
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* ⚠️ E O CORTE NÃO É O GRUPO `hand`. O `comicneue` está lá por aparência — a face é de propósito geral e é
|
|
24
|
-
* frequentemente recomendada para dislexia. Tirá-la do menu removeria uma opção legitimamente acessível. A
|
|
25
|
-
* definição boa é a lista do item 2 da #87, que nomeia as caligráficas dando-lhes tamanho mínimo.
|
|
64
|
+
* The handwriting font keys for a BCP-47 tag — `pt-BR` → `['pwbr']`, `es-MX` → `['pwmx']`.
|
|
65
|
+
*
|
|
66
|
+
* ⚠️ IT READS THE REGION AND THEN THE LANGUAGE, in that order, and the forgotten case is the tag WITHOUT a region: `en`
|
|
67
|
+
* alone names no country, and falling back is the right answer — not an error, a child whose browser did not say where
|
|
68
|
+
* they are.
|
|
69
|
+
*
|
|
70
|
+
* 📌 It returns a LIST and not one face: where the country teaches two hands, both enter the cycle.
|
|
71
|
+
* 📌 It returns NOTHING for a language outside the repertoire, and nothing is sayable: the caller drops the position
|
|
72
|
+
* from the cycle instead of showing a hand that is nobody's.
|
|
73
|
+
*/
|
|
74
|
+
export declare function handsForTag(tag: string | null | undefined): readonly string[];
|
|
75
|
+
/**
|
|
76
|
+
* A catalogue font. `fam` is the FONT'S NAME — a proper noun, never translated. `d` holds the i18n KEY of the description,
|
|
77
|
+
* not the text: the same decision as `VIZ_MODES` and `RM_LABEL`, for the same reason — a `const` table of text resolves
|
|
78
|
+
* once, on import, and stays frozen in the boot language.
|
|
26
79
|
*/
|
|
27
|
-
export type FontRole = 'geral' | 'caligrafica' | 'jogo';
|
|
28
80
|
export type FontItem = {
|
|
81
|
+
/** The face's `id` in `catalogo_tipografico.json` (ADR-0176): the key that holds it to the catalogue's status, layer, floor and coverage. */
|
|
82
|
+
id: string;
|
|
29
83
|
k: string;
|
|
30
84
|
fam: string;
|
|
31
85
|
fb: string;
|
|
32
86
|
d?: string;
|
|
33
87
|
off?: string;
|
|
34
|
-
/** Ausente = `geral`. Só as caligráficas se declaram, porque são a excepção. */
|
|
35
|
-
papel?: FontRole;
|
|
36
88
|
/**
|
|
37
|
-
*
|
|
89
|
+
* The i18n KEY of a sentence ALWAYS shown after the description — unlike `off`, which only speaks while the face is
|
|
90
|
+
* disabled. It is for a stack whose preferred faces the device may lack: the ronde's names the three to install, because
|
|
91
|
+
* without them the child sees Cookie, a related hand that is not the one taught at school (ADR-0154).
|
|
92
|
+
*/
|
|
93
|
+
notice?: string;
|
|
94
|
+
/** Absent = `geral`. Only the handwriting faces declare it, because they are the exception. */
|
|
95
|
+
role?: FontRole;
|
|
96
|
+
/**
|
|
97
|
+
* The smallest size, in px, at which this face is still legible (#87 item 2, the Dev's numbers).
|
|
38
98
|
*
|
|
39
|
-
* ⚠️
|
|
40
|
-
*
|
|
99
|
+
* ⚠️ Below it the face stops being DIFFICULT and becomes ILLEGIBLE, which are different things: difficulty is the
|
|
100
|
+
* exercise, illegibility is the child giving up. That is why it is a gate and not a recommendation.
|
|
41
101
|
*/
|
|
42
102
|
minPx?: number;
|
|
43
103
|
};
|
|
44
|
-
/**
|
|
104
|
+
/** A catalogue group. `g` holds a KEY too ('font.group.sans'), for the same reason. */
|
|
45
105
|
export type FontGroup = {
|
|
46
106
|
g: string;
|
|
47
107
|
items: FontItem[];
|
|
48
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* THE TYPOGRAPHY PANEL'S KIT — every face a panel may list, grouped. The engine mounts no panel since ADR-0151 («quem escolhe a
|
|
111
|
+
* tipografia é o jogo»), and the kit stays for whoever mounts one (`ui/settings-typo`), because the eleventh button's cycle and
|
|
112
|
+
* the boot's stored choice go through its writer.
|
|
113
|
+
*
|
|
114
|
+
* 📌 MOST OF THESE FACES ARE THE FONT LIBRARY'S, not the engine's (ADR-0255): only the cycle's faces are packaged. A library face
|
|
115
|
+
* reaches a page when its cartridge declares the family in `uses.fonts` and the delivery carries it, so `faceAvailable` answers
|
|
116
|
+
* for it through the host's detector — a row whose family nobody declared is shown disabled, never offered and then drawn in the
|
|
117
|
+
* system font. Keeping the rows is what lets a game that declares its families offer them with no list of its own.
|
|
118
|
+
*/
|
|
49
119
|
export declare const FONT_GROUPS: FontGroup[];
|
|
50
|
-
/** O papel de uma face; ausente no catálogo quer dizer `geral`. */
|
|
51
|
-
export declare function papelDaFonte(it: FontItem): FontRole;
|
|
52
120
|
/**
|
|
53
|
-
*
|
|
121
|
+
* How much larger the text is drawn with this face: enough to reach its `minPx` from the document's base, never smaller.
|
|
122
|
+
* A face whose catalogue floor is above the base (a display sans, the handwriting) is offered at that size, not under it
|
|
123
|
+
* (ADR-0176 §4, the catalogue's rule R2). The cycle's hand of the country is the same rule (`HANDWRITING_SCALE`).
|
|
124
|
+
*/
|
|
125
|
+
export declare function faceScale(it: FontItem): number;
|
|
126
|
+
/** A face's role; absent in the catalogue means `geral`. */
|
|
127
|
+
export declare function fontRole(it: FontItem): FontRole;
|
|
128
|
+
/**
|
|
129
|
+
* THE FAMILIES A FACE ACCEPTS, from a `fam` that may be a STACK.
|
|
54
130
|
*
|
|
55
|
-
* 📌
|
|
56
|
-
*
|
|
57
|
-
*
|
|
131
|
+
* 📌 The ronde declares four (`'Ronde Script, OPTIFrench-Script, Merveille, Cookie'`): the three drawings of the same
|
|
132
|
+
* hand an adult may install, then the packaged fallback (ADR-0154). The other faces declare one, and for them this
|
|
133
|
+
* returns a list of one.
|
|
58
134
|
*/
|
|
59
|
-
export declare function
|
|
135
|
+
export declare function faceFamilies(it: FontItem): string[];
|
|
60
136
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* ⚠️ O DETECTOR É INJECTADO, e nunca `document.fonts` lido daqui: este módulo é o catálogo, corre em node nos
|
|
68
|
-
* gates, e ler um global do navegador aqui é o ACHADO 15 outra vez — o `srAlert` que rebentou o boot contra um
|
|
69
|
-
* documento injectado.
|
|
70
|
-
* 📌 E o PADRÃO É «não instalada», que é seguro por uma razão que não vale para todos os padrões deste
|
|
71
|
-
* repositório: sem detector a opção fica desabilitada COM a mensagem, e a mensagem diz ao adulto exactamente
|
|
72
|
-
* o que fazer. O silêncio não decide nada contra a criança — ele mantém o estado que já existia e que é
|
|
73
|
-
* accionável. É o oposto do `seguraTeclas`, onde os dois lados do padrão erravam.
|
|
137
|
+
* A `fam` as a CSS `font-family` value — each family quoted on its own: `'Ronde Script','OPTIFrench-Script',…,'Cookie'`.
|
|
138
|
+
*
|
|
139
|
+
* 🔴 QUOTING THE WHOLE STRING ONCE NAMES ONE FAMILY THAT DOES NOT EXIST. `'Ronde Script, …, Cookie'` is a single name with
|
|
140
|
+
* commas in it, so the browser skips it and draws the generic fallback — the stack would never reach Cookie, and the
|
|
141
|
+
* fallback ADR-0154 decided would exist only in the catalogue. For a one-family `fam` the result is the same `'Inter'`.
|
|
74
142
|
*/
|
|
75
|
-
export declare function
|
|
76
|
-
/**
|
|
143
|
+
export declare function familyStack(fam: string): string;
|
|
144
|
+
/**
|
|
145
|
+
* THE FACES THE ENGINE DRAWS WITH ITSELF, by key — the eleventh button's cycle over EVERY hand a tag can pick (ADR-0149,
|
|
146
|
+
* ADR-0150). With the mathematics face (`MATHEMATICS_FAMILY`) they are the only faces packaged and precached (ADR-0255 §1); every
|
|
147
|
+
* other face of the kit is the font library's. `tests/what-fonts-the-package-carries.node.test.js` holds `fonts.css` to this list.
|
|
148
|
+
*/
|
|
149
|
+
export declare const ENGINE_FACE_KEYS: readonly string[];
|
|
150
|
+
/** The face the engine draws mathematics in (`--font-math` in `style.css`): packaged, never a typography choice (ADR-0012). */
|
|
151
|
+
export declare const MATHEMATICS_FAMILY = "Atkinson Hyperlegible Mono";
|
|
152
|
+
/**
|
|
153
|
+
* CAN THIS FACE BE USED NOW? — `off` stops being a sentence and becomes a CONDITION.
|
|
154
|
+
*
|
|
155
|
+
* An engine face is always there: it is packaged and precached (ADR-0255 §1). Any other face is used WHILE one of its families
|
|
156
|
+
* is present — a library family its cartridge declared in `uses.fonts` (the root's detector answers for those), or, for an `off`
|
|
157
|
+
* face, one the adult installed from the ones its message names (ADR-0012's «enquanto»). The ronde's stack ends in Cookie, a
|
|
158
|
+
* library family, so it is available where the game declares Cookie (ADR-0154, ADR-0255).
|
|
159
|
+
*
|
|
160
|
+
* ⚠️ THE DETECTOR IS INJECTED, and `document.fonts` is never read here: this module is the catalogue, it runs in node in
|
|
161
|
+
* the gates, and reading a browser global here would be a boot waiting to crash against an injected document.
|
|
162
|
+
* 📌 And the DEFAULT is not present, which is safe: with no detector a library row stays disabled, never offered and then drawn
|
|
163
|
+
* in the system font, and an `off` row keeps the message that tells the adult exactly what to do.
|
|
164
|
+
*/
|
|
165
|
+
export declare function faceAvailable(it: FontItem, installed?: (family: string) => boolean): boolean;
|
|
166
|
+
/** The faces the MENU may offer: only the general ones (ADR-0012 amendment). */
|
|
77
167
|
export declare const OFERECIVEIS: FontItem[];
|
|
168
|
+
/**
|
|
169
|
+
* The catalogue by key. BUILT IN ONE EXPRESSION and never filled after it (ADR-0232 D4): the table was an empty object the
|
|
170
|
+
* module wrote into at import, which the code-health measure reads as module state. The last item with a key wins, as it did.
|
|
171
|
+
*/
|
|
78
172
|
export declare const FONT_BY_KEY: Record<string, FontItem>;
|
|
173
|
+
/** The families `vendor/fonts.css` declares — the engine's faces and the mathematics face. A cartridge never declares these. */
|
|
174
|
+
export declare const ENGINE_FAMILIES: ReadonlySet<string>;
|
|
79
175
|
/** Narrow store shape these need — lets a caller inject a fake without touching real storage. */
|
|
80
176
|
export interface FontStore {
|
|
81
177
|
get(key: string, fallback: string | null): string | null;
|
|
82
178
|
set(key: string, v: string): void;
|
|
83
179
|
}
|
|
84
|
-
export declare const FONT_KEY = "incl_font_k";
|
|
85
|
-
export declare const FONT_KEY_LEGACY = "incl_fonte";
|
|
86
180
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* porque duas cópias de um padrão são duas chances de o reset devolver algo que o jogo nunca usou.
|
|
181
|
+
* The factory font, named. Atkinson Hyperlegible was designed by the Braille Institute precisely for low vision — it
|
|
182
|
+
* tells apart the shapes most often confused (I/l/1, O/0). That is why it is the default and not an aesthetic preference,
|
|
183
|
+
* and why typography's reset (ADR-0028) returns here: the way back from an accessibility menu has to end at the most
|
|
184
|
+
* legible choice, not at any one. Used in TWO places — the end of the boot chain just below and the panel's reset —, and
|
|
185
|
+
* a constant because two copies of a default are two chances for the reset to return something the game never used.
|
|
93
186
|
*/
|
|
94
187
|
export declare const DEFAULT_FONT_KEY = "atkinson";
|
|
95
188
|
/**
|
|
96
189
|
* Boot choice: validated persisted key (ignores .off fonts) -> legacy-key migration -> DEFAULT_FONT_KEY.
|
|
97
190
|
*
|
|
98
|
-
* ⚠️
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* uma interface inteira em letra cursiva a quem já não tem como sair dela pelo menu — uma armadilha, e das
|
|
103
|
-
* silenciosas.
|
|
191
|
+
* ⚠️ AND A STORED HANDWRITING FACE GOES BACK TO THE DEFAULT (issue #87). A child may have one stored from when the menu
|
|
192
|
+
* offered them, and a stored value is their choice, not ours to undo without a reason. The reason exists: the ADR-0012
|
|
193
|
+
* amendment says a handwriting face **cannot be the interface face**, and the menu no longer offers it. Letting it stand
|
|
194
|
+
* would give a whole interface in cursive to someone with no way out of it through the menu — a trap, and a silent one.
|
|
104
195
|
*
|
|
105
|
-
* ⚠️
|
|
106
|
-
*
|
|
196
|
+
* ⚠️ AND A DELETED KEY GOES BACK TOO, by the same path: a face no longer in `FONT_BY_KEY` falls back to the default
|
|
197
|
+
* instead of leaving the child with no face at all.
|
|
107
198
|
*/
|
|
108
199
|
export declare function resolveFontKey(s: FontStore): string;
|
|
109
200
|
export declare function persistFontKey(s: FontStore, k: string): void;
|
|
110
|
-
export declare function loadFontKey(): string;
|
|
111
|
-
export declare function saveFontKey(k: string): void;
|