@the-inclusionist/engine 9.0.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -78
- package/app/css/style.css +761 -377
- package/app/public/vendor/fonts/playwrite-cu.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-es-deco.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-es.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-gb-j.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-gb-s.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-pe.woff2 +0 -0
- package/app/public/vendor/fonts/playwrite-pt.woff2 +0 -0
- package/app/public/vendor/fonts-licences/NOTICE.txt +166 -0
- package/app/public/vendor/fonts-licences/OFL-1.1.txt +86 -0
- package/app/public/vendor/fonts.css +36 -84
- package/dist-pkg/boot/create-game.d.ts +499 -219
- package/dist-pkg/boot/create-game.js +3944 -562
- package/dist-pkg/core/a11y-sr.d.ts +25 -3
- package/dist-pkg/core/a11y-sr.js +38 -19
- package/dist-pkg/core/accessible-label.d.ts +17 -0
- package/dist-pkg/core/accessible-label.js +37 -0
- package/dist-pkg/core/accommodation-subjects.d.ts +26 -0
- package/dist-pkg/core/accommodation-subjects.js +32 -0
- package/dist-pkg/core/accommodations.d.ts +125 -0
- package/dist-pkg/core/accommodations.js +195 -0
- package/dist-pkg/core/actions.d.ts +108 -55
- package/dist-pkg/core/actions.js +122 -71
- package/dist-pkg/core/calm-mode.d.ts +31 -0
- package/dist-pkg/core/calm-mode.js +47 -0
- package/dist-pkg/core/camera-cycle.d.ts +15 -0
- package/dist-pkg/core/camera-cycle.js +7 -0
- package/dist-pkg/core/caption-duration.d.ts +15 -0
- package/dist-pkg/core/caption-duration.js +19 -0
- package/dist-pkg/core/cartridge-problems.d.ts +34 -0
- package/dist-pkg/core/cartridge-problems.js +53 -0
- package/dist-pkg/core/constants.d.ts +0 -54
- package/dist-pkg/core/constants.js +9 -76
- package/dist-pkg/core/contract.d.ts +142 -164
- package/dist-pkg/core/contract.js +222 -208
- package/dist-pkg/core/dom-query.d.ts +4 -4
- package/dist-pkg/core/dom-query.js +12 -20
- package/dist-pkg/core/entity.d.ts +62 -77
- package/dist-pkg/core/entity.js +18 -32
- package/dist-pkg/core/escape-html.d.ts +9 -10
- package/dist-pkg/core/escape-html.js +16 -20
- package/dist-pkg/core/flash-threshold.d.ts +17 -0
- package/dist-pkg/core/flash-threshold.js +113 -0
- package/dist-pkg/core/game-speed.d.ts +11 -0
- package/dist-pkg/core/game-speed.js +16 -0
- package/dist-pkg/core/genres.d.ts +20 -0
- package/dist-pkg/core/genres.js +44 -0
- package/dist-pkg/core/i18n.d.ts +71 -60
- package/dist-pkg/core/i18n.js +186 -200
- package/dist-pkg/core/loop.d.ts +17 -6
- package/dist-pkg/core/loop.js +26 -26
- package/dist-pkg/core/pause-icon-catalogue.d.ts +15 -0
- package/dist-pkg/core/pause-icon-catalogue.js +54 -0
- package/dist-pkg/core/ring.d.ts +17 -0
- package/dist-pkg/core/ring.js +29 -0
- package/dist-pkg/core/rng.d.ts +7 -12
- package/dist-pkg/core/rng.js +23 -53
- package/dist-pkg/core/route.d.ts +26 -26
- package/dist-pkg/core/route.js +126 -121
- package/dist-pkg/core/scenes.d.ts +37 -40
- package/dist-pkg/core/scenes.js +41 -43
- package/dist-pkg/core/screens.d.ts +4 -4
- package/dist-pkg/core/screens.js +11 -16
- package/dist-pkg/core/session-clock.d.ts +23 -0
- package/dist-pkg/core/session-clock.js +37 -0
- package/dist-pkg/core/setting-defaults.d.ts +61 -0
- package/dist-pkg/core/setting-defaults.js +66 -0
- package/dist-pkg/core/speech-rate.d.ts +29 -0
- package/dist-pkg/core/speech-rate.js +47 -0
- package/dist-pkg/core/state.d.ts +118 -118
- package/dist-pkg/core/state.js +322 -297
- package/dist-pkg/core/visual-cycles.d.ts +30 -0
- package/dist-pkg/core/visual-cycles.js +52 -0
- package/dist-pkg/core/visual-state.d.ts +13 -0
- package/dist-pkg/core/visual-state.js +6 -0
- package/dist-pkg/educational/activities-registry.d.ts +1 -1
- package/dist-pkg/educational/activities-registry.js +9 -8
- package/dist-pkg/educational/adaptive-engine.d.ts +11 -11
- package/dist-pkg/educational/adaptive-engine.js +17 -17
- package/dist-pkg/educational/segment-bar.d.ts +12 -12
- package/dist-pkg/educational/segment-bar.js +9 -9
- package/dist-pkg/i18n/en.js +324 -223
- package/dist-pkg/i18n/es.js +323 -223
- package/dist-pkg/i18n/pt.js +348 -226
- package/dist-pkg/input/default-bindings.d.ts +37 -38
- package/dist-pkg/input/default-bindings.js +127 -144
- package/dist-pkg/input/devices.d.ts +7 -7
- package/dist-pkg/input/devices.js +17 -16
- package/dist-pkg/input/edges.d.ts +23 -32
- package/dist-pkg/input/edges.js +23 -28
- package/dist-pkg/input/empathy-filter.d.ts +22 -0
- package/dist-pkg/input/empathy-filter.js +34 -0
- package/dist-pkg/input/face-map.d.ts +96 -0
- package/dist-pkg/input/face-map.js +255 -0
- package/dist-pkg/input/face-signals.d.ts +40 -0
- package/dist-pkg/input/face-signals.js +48 -0
- package/dist-pkg/input/gamepad.d.ts +195 -145
- package/dist-pkg/input/gamepad.js +383 -556
- package/dist-pkg/input/gaze-cycle.d.ts +64 -0
- package/dist-pkg/input/gaze-cycle.js +133 -0
- package/dist-pkg/input/gaze-relative.d.ts +68 -0
- package/dist-pkg/input/gaze-relative.js +142 -0
- package/dist-pkg/input/hand-map.d.ts +28 -0
- package/dist-pkg/input/hand-map.js +142 -0
- package/dist-pkg/input/input-cooldown.d.ts +17 -0
- package/dist-pkg/input/input-cooldown.js +39 -0
- package/dist-pkg/input/key-default.d.ts +30 -0
- package/dist-pkg/input/key-default.js +60 -0
- package/dist-pkg/input/keyboard-runtime.d.ts +15 -21
- package/dist-pkg/input/keyboard-runtime.js +23 -27
- package/dist-pkg/input/keyboard.d.ts +68 -63
- package/dist-pkg/input/keyboard.js +83 -105
- package/dist-pkg/input/keydown.d.ts +123 -137
- package/dist-pkg/input/keydown.js +284 -289
- package/dist-pkg/input/latch-edge.d.ts +33 -21
- package/dist-pkg/input/latch-edge.js +34 -35
- package/dist-pkg/input/latch-scope.d.ts +51 -50
- package/dist-pkg/input/latch-scope.js +61 -82
- package/dist-pkg/input/latch-store.d.ts +26 -30
- package/dist-pkg/input/latch-store.js +42 -50
- package/dist-pkg/input/latch-sync.d.ts +29 -29
- package/dist-pkg/input/latch-sync.js +25 -25
- package/dist-pkg/input/latch.d.ts +14 -17
- package/dist-pkg/input/latch.js +29 -37
- package/dist-pkg/input/pad-defaults.d.ts +13 -16
- package/dist-pkg/input/pad-defaults.js +21 -28
- package/dist-pkg/input/pad-reading.d.ts +76 -0
- package/dist-pkg/input/pad-reading.js +169 -0
- package/dist-pkg/input/pad-wizard.d.ts +99 -0
- package/dist-pkg/input/pad-wizard.js +256 -0
- package/dist-pkg/input/pointer-space.d.ts +19 -20
- package/dist-pkg/input/pointer-space.js +27 -32
- package/dist-pkg/input/pointer.d.ts +39 -40
- package/dist-pkg/input/pointer.js +42 -45
- package/dist-pkg/input/state.d.ts +101 -89
- package/dist-pkg/input/state.js +54 -134
- package/dist-pkg/input/switch-scan.d.ts +59 -0
- package/dist-pkg/input/switch-scan.js +67 -0
- package/dist-pkg/input/synthetic-source.d.ts +42 -0
- package/dist-pkg/input/synthetic-source.js +57 -0
- package/dist-pkg/input/touch-bindings.d.ts +127 -116
- package/dist-pkg/input/touch-bindings.js +158 -173
- package/dist-pkg/input/touch.d.ts +147 -72
- package/dist-pkg/input/touch.js +362 -126
- package/dist-pkg/input/transport-in-use.d.ts +107 -0
- package/dist-pkg/input/transport-in-use.js +130 -0
- package/dist-pkg/input/transports.d.ts +90 -117
- package/dist-pkg/input/transports.js +104 -106
- package/dist-pkg/input/virtual-controller.d.ts +82 -0
- package/dist-pkg/input/virtual-controller.js +69 -0
- package/dist-pkg/input/vocabulary-migration.d.ts +50 -49
- package/dist-pkg/input/vocabulary-migration.js +80 -79
- package/dist-pkg/input/voice-map.d.ts +59 -0
- package/dist-pkg/input/voice-map.js +123 -0
- package/dist-pkg/platform/audio-ambient.d.ts +13 -2
- package/dist-pkg/platform/audio-ambient.js +14 -14
- package/dist-pkg/platform/audio-earcons.d.ts +20 -19
- package/dist-pkg/platform/audio-earcons.js +51 -42
- package/dist-pkg/platform/audio-jingles.js +9 -10
- package/dist-pkg/platform/audio-mixer.d.ts +14 -2
- package/dist-pkg/platform/audio-mixer.js +31 -39
- package/dist-pkg/platform/audio-sonar.d.ts +49 -152
- package/dist-pkg/platform/audio-sonar.js +124 -302
- package/dist-pkg/platform/audio.d.ts +62 -19
- package/dist-pkg/platform/audio.js +193 -168
- package/dist-pkg/platform/choose-by-voice.d.ts +70 -0
- package/dist-pkg/platform/choose-by-voice.js +157 -0
- package/dist-pkg/platform/flash-sampler.d.ts +19 -0
- package/dist-pkg/platform/flash-sampler.js +79 -0
- package/dist-pkg/platform/font-library.d.ts +77 -0
- package/dist-pkg/platform/font-library.js +98 -0
- package/dist-pkg/platform/font-library.json +721 -0
- package/dist-pkg/platform/heavy-catalogue.d.ts +77 -0
- package/dist-pkg/platform/heavy-catalogue.js +256 -0
- package/dist-pkg/platform/heavy-mirror.d.ts +20 -0
- package/dist-pkg/platform/heavy-mirror.js +73 -0
- package/dist-pkg/platform/heavy.d.ts +136 -0
- package/dist-pkg/platform/heavy.js +324 -0
- package/dist-pkg/platform/interruptible-speech.d.ts +23 -16
- package/dist-pkg/platform/interruptible-speech.js +77 -54
- package/dist-pkg/platform/kokoro-port.d.ts +27 -0
- package/dist-pkg/platform/kokoro-port.js +50 -0
- package/dist-pkg/platform/kokoro-runtime.d.ts +20 -0
- package/dist-pkg/platform/kokoro-runtime.js +52 -0
- package/dist-pkg/platform/kokoro.d.ts +70 -0
- package/dist-pkg/platform/kokoro.js +133 -0
- package/dist-pkg/platform/listener-scope.d.ts +12 -0
- package/dist-pkg/platform/listener-scope.js +90 -0
- package/dist-pkg/platform/locale-host.d.ts +14 -0
- package/dist-pkg/platform/locale-host.js +45 -0
- package/dist-pkg/platform/microphone.d.ts +51 -0
- package/dist-pkg/platform/microphone.js +118 -0
- package/dist-pkg/platform/onnx-runtime.d.ts +34 -0
- package/dist-pkg/platform/onnx-runtime.js +42 -0
- package/dist-pkg/platform/reading-in-worker.d.ts +64 -0
- package/dist-pkg/platform/reading-in-worker.js +125 -0
- package/dist-pkg/platform/reading-model.d.ts +94 -0
- package/dist-pkg/platform/reading-model.js +272 -0
- package/dist-pkg/platform/reading-runtime.d.ts +24 -0
- package/dist-pkg/platform/reading-runtime.js +164 -0
- package/dist-pkg/platform/reading-worker.d.ts +41 -0
- package/dist-pkg/platform/reading-worker.js +58 -0
- package/dist-pkg/platform/reading.d.ts +80 -0
- package/dist-pkg/platform/reading.js +136 -0
- package/dist-pkg/platform/speech-recognition.d.ts +60 -0
- package/dist-pkg/platform/speech-recognition.js +104 -0
- package/dist-pkg/platform/speech.d.ts +23 -1
- package/dist-pkg/platform/speech.js +29 -18
- package/dist-pkg/platform/storage-keys.d.ts +96 -0
- package/dist-pkg/platform/storage-keys.js +106 -0
- package/dist-pkg/platform/storage.d.ts +46 -111
- package/dist-pkg/platform/storage.js +104 -169
- package/dist-pkg/platform/tts.d.ts +85 -39
- package/dist-pkg/platform/tts.js +447 -127
- package/dist-pkg/platform/vision-loop.d.ts +23 -0
- package/dist-pkg/platform/vision-loop.js +56 -0
- package/dist-pkg/platform/vision.d.ts +132 -0
- package/dist-pkg/platform/vision.js +117 -0
- package/dist-pkg/platform/voice-listener.d.ts +40 -0
- package/dist-pkg/platform/voice-listener.js +88 -0
- package/dist-pkg/platform/voice-plan.d.ts +15 -98
- package/dist-pkg/platform/voice-plan.js +56 -143
- package/dist-pkg/platform/vosk-runtime.d.ts +96 -0
- package/dist-pkg/platform/vosk-runtime.js +151 -0
- package/dist-pkg/platform/vosk-vocabulary.d.ts +6 -0
- package/dist-pkg/platform/vosk-vocabulary.js +178 -0
- package/dist-pkg/render/canvas.d.ts +13 -7
- package/dist-pkg/render/canvas.js +13 -13
- package/dist-pkg/render/crt.d.ts +48 -12
- package/dist-pkg/render/crt.js +78 -80
- package/dist-pkg/render/cvd-matrices.d.ts +22 -18
- package/dist-pkg/render/cvd-matrices.js +37 -38
- package/dist-pkg/render/hc-role-data.d.ts +7 -7
- package/dist-pkg/render/hc-role-data.js +14 -14
- package/dist-pkg/render/high-contrast.d.ts +67 -56
- package/dist-pkg/render/high-contrast.js +226 -217
- package/dist-pkg/render/low-vision-drawing.d.ts +5 -0
- package/dist-pkg/render/low-vision-drawing.js +46 -0
- package/dist-pkg/render/lq-filter.d.ts +32 -20
- package/dist-pkg/render/lq-filter.js +59 -65
- package/dist-pkg/render/port.d.ts +86 -88
- package/dist-pkg/render/port.js +17 -23
- package/dist-pkg/render/screen-pipeline.d.ts +42 -42
- package/dist-pkg/render/screen-pipeline.js +80 -87
- package/dist-pkg/render/sprite-fx.d.ts +2 -1
- package/dist-pkg/render/sprite-fx.js +16 -14
- package/dist-pkg/render/viewports.d.ts +20 -15
- package/dist-pkg/render/viewports.js +83 -114
- package/dist-pkg/render/viz-axes-labels.d.ts +47 -0
- package/dist-pkg/render/viz-axes-labels.js +88 -0
- package/dist-pkg/render/viz-axes.d.ts +89 -86
- package/dist-pkg/render/viz-axes.js +128 -116
- package/dist-pkg/render/viz-modes.d.ts +28 -29
- package/dist-pkg/render/viz-modes.js +40 -45
- package/dist-pkg/render/viz-refusal.d.ts +32 -0
- package/dist-pkg/render/viz-refusal.js +57 -0
- package/dist-pkg/render/viz-setters.d.ts +104 -66
- package/dist-pkg/render/viz-setters.js +182 -191
- package/dist-pkg/ui/aac-sets.d.ts +45 -0
- package/dist-pkg/ui/aac-sets.js +41 -0
- package/dist-pkg/ui/audio-choices.d.ts +68 -0
- package/dist-pkg/ui/audio-choices.js +98 -0
- package/dist-pkg/ui/audio-rows-that-apply.d.ts +12 -0
- package/dist-pkg/ui/audio-rows-that-apply.js +43 -0
- package/dist-pkg/ui/camera-control.d.ts +53 -0
- package/dist-pkg/ui/camera-control.js +48 -0
- package/dist-pkg/ui/changed-mark.d.ts +9 -8
- package/dist-pkg/ui/changed-mark.js +22 -53
- package/dist-pkg/ui/control-choices.d.ts +37 -0
- package/dist-pkg/ui/control-choices.js +84 -0
- package/dist-pkg/ui/debug-panel.d.ts +59 -43
- package/dist-pkg/ui/debug-panel.js +68 -69
- package/dist-pkg/ui/declared-words.d.ts +21 -0
- package/dist-pkg/ui/declared-words.js +66 -0
- package/dist-pkg/ui/dom.d.ts +10 -14
- package/dist-pkg/ui/dom.js +10 -47
- package/dist-pkg/ui/drawing-problems.d.ts +25 -0
- package/dist-pkg/ui/drawing-problems.js +94 -0
- package/dist-pkg/ui/eye-control.d.ts +36 -0
- package/dist-pkg/ui/eye-control.js +178 -0
- package/dist-pkg/ui/face-control.d.ts +25 -0
- package/dist-pkg/ui/face-control.js +183 -0
- package/dist-pkg/ui/focus-trap.d.ts +39 -49
- package/dist-pkg/ui/focus-trap.js +56 -65
- package/dist-pkg/ui/fonts.d.ts +157 -68
- package/dist-pkg/ui/fonts.js +305 -115
- package/dist-pkg/ui/footer-scroll-driver.d.ts +14 -0
- package/dist-pkg/ui/footer-scroll-driver.js +201 -0
- package/dist-pkg/ui/footer-scroll.d.ts +38 -0
- package/dist-pkg/ui/footer-scroll.js +55 -0
- package/dist-pkg/ui/game-options.d.ts +47 -0
- package/dist-pkg/ui/game-options.js +158 -0
- package/dist-pkg/ui/gaze-overlay.d.ts +64 -0
- package/dist-pkg/ui/gaze-overlay.js +165 -0
- package/dist-pkg/ui/hand-control.d.ts +25 -0
- package/dist-pkg/ui/hand-control.js +143 -0
- package/dist-pkg/ui/help-panel.d.ts +87 -0
- package/dist-pkg/ui/help-panel.js +242 -0
- package/dist-pkg/ui/hud-bands.d.ts +62 -0
- package/dist-pkg/ui/hud-bands.js +146 -0
- package/dist-pkg/ui/hud-row.d.ts +34 -0
- package/dist-pkg/ui/hud-row.js +80 -0
- package/dist-pkg/ui/hud.d.ts +73 -73
- package/dist-pkg/ui/hud.js +94 -98
- package/dist-pkg/ui/item-announcement.d.ts +13 -12
- package/dist-pkg/ui/item-announcement.js +25 -26
- package/dist-pkg/ui/layout.d.ts +103 -28
- package/dist-pkg/ui/layout.js +117 -99
- package/dist-pkg/ui/libras-avatar-clip.d.ts +30 -0
- package/dist-pkg/ui/libras-avatar-clip.js +86 -0
- package/dist-pkg/ui/libras-avatar-load.d.ts +52 -0
- package/dist-pkg/ui/libras-avatar-load.js +134 -0
- package/dist-pkg/ui/libras-avatar-plan.d.ts +102 -0
- package/dist-pkg/ui/libras-avatar-plan.js +211 -0
- package/dist-pkg/ui/libras-avatar-player.d.ts +28 -0
- package/dist-pkg/ui/libras-avatar-player.js +226 -0
- package/dist-pkg/ui/libras-avatar-stage.d.ts +37 -0
- package/dist-pkg/ui/libras-avatar-stage.js +208 -0
- package/dist-pkg/ui/libras-glosses.d.ts +28 -0
- package/dist-pkg/ui/libras-glosses.js +161 -0
- package/dist-pkg/ui/locale-flags.d.ts +16 -0
- package/dist-pkg/ui/locale-flags.js +30 -0
- package/dist-pkg/ui/loop-crash.d.ts +17 -17
- package/dist-pkg/ui/loop-crash.js +33 -62
- package/dist-pkg/ui/menu-intent.d.ts +61 -0
- package/dist-pkg/ui/menu-intent.js +88 -0
- package/dist-pkg/ui/menu-items.d.ts +20 -0
- package/dist-pkg/ui/menu-items.js +51 -0
- package/dist-pkg/ui/menu-nav.d.ts +98 -92
- package/dist-pkg/ui/menu-nav.js +398 -286
- package/dist-pkg/ui/mobility-choices.d.ts +26 -0
- package/dist-pkg/ui/mobility-choices.js +41 -0
- package/dist-pkg/ui/motion-choices.d.ts +31 -0
- package/dist-pkg/ui/motion-choices.js +68 -0
- package/dist-pkg/ui/motion-scene.d.ts +24 -19
- package/dist-pkg/ui/motion-scene.js +29 -61
- package/dist-pkg/ui/mount-panel.d.ts +81 -0
- package/dist-pkg/ui/mount-panel.js +61 -0
- package/dist-pkg/ui/panel-shell.d.ts +65 -31
- package/dist-pkg/ui/panel-shell.js +92 -66
- package/dist-pkg/ui/panel-widgets.d.ts +150 -0
- package/dist-pkg/ui/panel-widgets.js +294 -0
- package/dist-pkg/ui/pause-buttons.d.ts +35 -0
- package/dist-pkg/ui/pause-buttons.js +66 -0
- package/dist-pkg/ui/pause-icons.d.ts +261 -347
- package/dist-pkg/ui/pause-icons.js +671 -601
- package/dist-pkg/ui/pause-markup.d.ts +86 -0
- package/dist-pkg/ui/pause-markup.js +125 -0
- package/dist-pkg/ui/reach-notice.d.ts +22 -23
- package/dist-pkg/ui/reach-notice.js +55 -58
- package/dist-pkg/ui/scan-overlay.d.ts +23 -0
- package/dist-pkg/ui/scan-overlay.js +50 -0
- package/dist-pkg/ui/screen-text.d.ts +25 -0
- package/dist-pkg/ui/screen-text.js +152 -0
- package/dist-pkg/ui/session-clock.d.ts +32 -0
- package/dist-pkg/ui/session-clock.js +67 -0
- package/dist-pkg/ui/settings-aac.d.ts +70 -0
- package/dist-pkg/ui/settings-aac.js +208 -0
- package/dist-pkg/ui/settings-audio.d.ts +97 -114
- package/dist-pkg/ui/settings-audio.js +493 -425
- package/dist-pkg/ui/settings-controls.d.ts +53 -96
- package/dist-pkg/ui/settings-controls.js +143 -215
- package/dist-pkg/ui/settings-empathy.d.ts +39 -30
- package/dist-pkg/ui/settings-empathy.js +53 -60
- package/dist-pkg/ui/settings-mobility.d.ts +192 -0
- package/dist-pkg/ui/settings-mobility.js +332 -0
- package/dist-pkg/ui/settings-motion.d.ts +91 -70
- package/dist-pkg/ui/settings-motion.js +287 -198
- package/dist-pkg/ui/settings-panel.d.ts +58 -45
- package/dist-pkg/ui/settings-panel.js +189 -94
- package/dist-pkg/ui/settings-typo.d.ts +29 -78
- package/dist-pkg/ui/settings-typo.js +158 -129
- package/dist-pkg/ui/settings-visual.d.ts +29 -87
- package/dist-pkg/ui/settings-visual.js +240 -193
- package/dist-pkg/ui/shell.d.ts +112 -135
- package/dist-pkg/ui/shell.js +148 -217
- package/dist-pkg/ui/simulation-list.d.ts +27 -0
- package/dist-pkg/ui/simulation-list.js +76 -0
- package/dist-pkg/ui/simulation-over-the-world.d.ts +23 -0
- package/dist-pkg/ui/simulation-over-the-world.js +131 -0
- package/dist-pkg/ui/simulation-refusal.d.ts +5 -31
- package/dist-pkg/ui/simulation-refusal.js +8 -56
- package/dist-pkg/ui/switchable-control.d.ts +11 -0
- package/dist-pkg/ui/switchable-control.js +19 -0
- package/dist-pkg/ui/title.d.ts +3 -12
- package/dist-pkg/ui/title.js +49 -18
- package/dist-pkg/ui/top-band.d.ts +26 -0
- package/dist-pkg/ui/top-band.js +96 -0
- package/dist-pkg/ui/typo-choices.d.ts +71 -0
- package/dist-pkg/ui/typo-choices.js +85 -0
- package/dist-pkg/ui/visual-axes-panel.d.ts +11 -47
- package/dist-pkg/ui/visual-axes-panel.js +12 -94
- package/dist-pkg/ui/visual-choices.d.ts +77 -0
- package/dist-pkg/ui/visual-choices.js +107 -0
- package/dist-pkg/ui/vlibras.d.ts +77 -10
- package/dist-pkg/ui/vlibras.js +130 -81
- package/dist-pkg/ui/voice-control.d.ts +68 -0
- package/dist-pkg/ui/voice-control.js +276 -0
- package/dist-pkg/ui/voice-settings.d.ts +95 -0
- package/dist-pkg/ui/voice-settings.js +352 -0
- package/dist-pkg/ui/where-the-child-is.d.ts +31 -0
- package/dist-pkg/ui/where-the-child-is.js +70 -0
- package/docs/CREDITS.md +300 -44
- package/docs/LICENSES.md +189 -145
- package/package.json +51 -27
- package/scripts/check-cartridge.mjs +78 -0
- package/scripts/game-build.d.mts +25 -0
- package/scripts/game-build.mjs +144 -0
- package/scripts/heavy-into-the-delivery.mjs +388 -0
- package/scripts/libras-avatar.json +680 -0
- package/scripts/libras-avatar.mjs +246 -0
- package/scripts/libras-glosses/gloss.py +95 -0
- package/scripts/libras-glosses/pyproject.toml +32 -0
- package/scripts/libras-glosses/uv.lock +781 -0
- package/scripts/libras-glosses.mjs +351 -0
- package/scripts/licences/Apache-2.0.txt +176 -0
- package/scripts/licences/GPL-3.0.txt +674 -0
- package/scripts/licences/MIT.txt +17 -0
- package/scripts/licences/OFL-1.1.txt +86 -0
- package/scripts/licences/UFL-1.0.txt +96 -0
- package/scripts/licences/fonts.mjs +389 -0
- package/scripts/licences/third-party.mjs +301 -0
- package/scripts/licences/vosk-browser.NOTICE.txt +268 -0
- package/app/public/vendor/fonts/comicneue-400.woff2 +0 -0
- package/app/public/vendor/fonts/comicneue-700.woff2 +0 -0
- package/app/public/vendor/fonts/fondamento-400-ext.woff2 +0 -0
- package/app/public/vendor/fonts/fondamento-400.woff2 +0 -0
- package/app/public/vendor/fonts/inter-400.woff2 +0 -0
- package/app/public/vendor/fonts/inter-700.woff2 +0 -0
- package/app/public/vendor/fonts/lato-400.woff2 +0 -0
- package/app/public/vendor/fonts/lato-700.woff2 +0 -0
- package/app/public/vendor/fonts/literata-400.woff2 +0 -0
- package/app/public/vendor/fonts/literata-700.woff2 +0 -0
- package/app/public/vendor/fonts/newsreader-400.woff2 +0 -0
- package/app/public/vendor/fonts/newsreader-700.woff2 +0 -0
- package/app/public/vendor/fonts/opendyslexic-400.woff2 +0 -0
- package/app/public/vendor/fonts/opensans-400.woff2 +0 -0
- package/app/public/vendor/fonts/opensans-700.woff2 +0 -0
- package/app/public/vendor/fonts/pinyon-400.woff2 +0 -0
- package/app/public/vendor/fonts/pressstart-400.woff2 +0 -0
- package/app/public/vendor/fonts/quattro-400.woff2 +0 -0
- package/app/public/vendor/fonts/quattro-700.woff2 +0 -0
- package/app/public/vendor/fonts/sourcesans-400.woff2 +0 -0
- package/app/public/vendor/fonts/sourcesans-700.woff2 +0 -0
- package/app/public/vendor/fonts/sourceserif-400.woff2 +0 -0
- package/app/public/vendor/fonts/sourceserif-700.woff2 +0 -0
- package/app/public/vendor/fonts/ufmag-400.woff2 +0 -0
- package/dist-pkg/core/anel.d.ts +0 -17
- package/dist-pkg/core/anel.js +0 -31
- package/dist-pkg/core/collision.d.ts +0 -21
- package/dist-pkg/core/collision.js +0 -62
- package/dist-pkg/core/layers.d.ts +0 -63
- package/dist-pkg/core/layers.js +0 -95
- package/dist-pkg/core/letter-grid.d.ts +0 -55
- package/dist-pkg/core/letter-grid.js +0 -116
- package/dist-pkg/core/password.d.ts +0 -34
- package/dist-pkg/core/password.js +0 -205
- package/dist-pkg/core/rotulo-acessivel.d.ts +0 -17
- package/dist-pkg/core/rotulo-acessivel.js +0 -41
- package/dist-pkg/core/run-state.d.ts +0 -115
- package/dist-pkg/core/run-state.js +0 -40
- package/dist-pkg/core/tiles.d.ts +0 -12
- package/dist-pkg/core/tiles.js +0 -61
- package/dist-pkg/core/world.d.ts +0 -4
- package/dist-pkg/core/world.js +0 -58
- package/dist-pkg/input/origem-sintetica.d.ts +0 -44
- package/dist-pkg/input/origem-sintetica.js +0 -60
- package/dist-pkg/input/transporte-em-uso.d.ts +0 -101
- package/dist-pkg/input/transporte-em-uso.js +0 -130
- package/dist-pkg/platform/audio-nav.d.ts +0 -51
- package/dist-pkg/platform/audio-nav.js +0 -99
- package/dist-pkg/platform/guide-intensity.d.ts +0 -40
- package/dist-pkg/platform/guide-intensity.js +0 -73
- package/dist-pkg/platform/pesados-catalogo.d.ts +0 -14
- package/dist-pkg/platform/pesados-catalogo.js +0 -177
- package/dist-pkg/platform/pesados.d.ts +0 -31
- package/dist-pkg/platform/pesados.js +0 -75
- package/dist-pkg/platform/vozes-prontas.d.ts +0 -28
- package/dist-pkg/platform/vozes-prontas.js +0 -61
- package/dist-pkg/render/camera.d.ts +0 -58
- package/dist-pkg/render/camera.js +0 -105
- package/dist-pkg/render/cenario-data.d.ts +0 -127
- package/dist-pkg/render/cenario-data.js +0 -145
- package/dist-pkg/render/city-tex.d.ts +0 -63
- package/dist-pkg/render/city-tex.js +0 -228
- package/dist-pkg/render/city-tiles.d.ts +0 -11
- package/dist-pkg/render/city-tiles.js +0 -140
- package/dist-pkg/render/draw.d.ts +0 -149
- package/dist-pkg/render/draw.js +0 -231
- package/dist-pkg/render/fx.d.ts +0 -63
- package/dist-pkg/render/fx.js +0 -123
- package/dist-pkg/render/minimap.d.ts +0 -11
- package/dist-pkg/render/minimap.js +0 -94
- package/dist-pkg/render/parallax.d.ts +0 -85
- package/dist-pkg/render/parallax.js +0 -158
- package/dist-pkg/render/player-anim.d.ts +0 -71
- package/dist-pkg/render/player-anim.js +0 -152
- package/dist-pkg/render/recycling-tex.d.ts +0 -48
- package/dist-pkg/render/recycling-tex.js +0 -164
- package/dist-pkg/render/scene-city.d.ts +0 -77
- package/dist-pkg/render/scene-city.js +0 -181
- package/dist-pkg/render/scene-parallax.d.ts +0 -72
- package/dist-pkg/render/scene-parallax.js +0 -426
- package/dist-pkg/render/scene-sky.d.ts +0 -126
- package/dist-pkg/render/scene-sky.js +0 -295
- package/dist-pkg/render/set-cenario.d.ts +0 -54
- package/dist-pkg/render/set-cenario.js +0 -103
- package/dist-pkg/render/textures.d.ts +0 -75
- package/dist-pkg/render/textures.js +0 -240
- package/dist-pkg/render/title-scene.d.ts +0 -46
- package/dist-pkg/render/title-scene.js +0 -75
- package/dist-pkg/render/weather.d.ts +0 -96
- package/dist-pkg/render/weather.js +0 -171
- package/dist-pkg/render/wheelchair-sprites.d.ts +0 -32
- package/dist-pkg/render/wheelchair-sprites.js +0 -69
- package/dist-pkg/render/world-tex.d.ts +0 -18
- package/dist-pkg/render/world-tex.js +0 -87
- package/dist-pkg/ui/activities-menu.d.ts +0 -258
- package/dist-pkg/ui/activities-menu.js +0 -648
- package/dist-pkg/ui/caa-sets.d.ts +0 -39
- package/dist-pkg/ui/caa-sets.js +0 -65
- package/dist-pkg/ui/latch-refusal.d.ts +0 -32
- package/dist-pkg/ui/latch-refusal.js +0 -60
- package/dist-pkg/ui/map-hub.d.ts +0 -56
- package/dist-pkg/ui/map-hub.js +0 -138
- package/dist-pkg/ui/settings-caa.d.ts +0 -45
- package/dist-pkg/ui/settings-caa.js +0 -137
- package/dist-pkg/ui/settings-motor.d.ts +0 -175
- package/dist-pkg/ui/settings-motor.js +0 -342
- package/dist-pkg/ui/webcam.d.ts +0 -7
- package/dist-pkg/ui/webcam.js +0 -93
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
/** The high-contrast levels, as `player.viz` values. The first one is «off». */
|
|
3
|
+
export declare const CONTRAST_LEVELS: readonly string[];
|
|
4
|
+
/** The colour-correction cycle, as `player.viz` values. */
|
|
5
|
+
export declare const CVD_SEQ: readonly string[];
|
|
6
|
+
/**
|
|
7
|
+
* The i18n keys of the announced colour-correction names, indexed like `CVD_SEQ`.
|
|
8
|
+
*
|
|
9
|
+
* ⚠️ POSITION 0 IS `cvd.tricro` AND NOT `cvd.off`, AND THE TWO KEYS DO NOT SWAP. This list names the four CHOICES of the
|
|
10
|
+
* cycle, so position 0 is a way of seeing — trichromatic vision, the one that needs no correction — and it says so. `cvd.off`
|
|
11
|
+
* is the FALLBACK for `viz` values that are no correction at all, and 13 of the 16 modes are exactly that: the three
|
|
12
|
+
* simulations, the three contrast levels, the five low-vision ones and blind mode. Announcing «trichromatic vision» there
|
|
13
|
+
* would be the software asserting what the child sees while she simulates not seeing. The choice is named; the fallback is off.
|
|
14
|
+
*/
|
|
15
|
+
export declare const CVD_NAMES: readonly string[];
|
|
16
|
+
/** The next contrast step. A `viz` that is not in the list — a correction filter, say — counts as index 0. */
|
|
17
|
+
export declare function nextContrast(cur: string | undefined): string;
|
|
18
|
+
/**
|
|
19
|
+
* The next colour-correction step.
|
|
20
|
+
*
|
|
21
|
+
* 🔴 NOTE THE ASYMMETRY WITH `nextContrast`, and it is the reason the two live in one file: an unknown `viz` lands on index
|
|
22
|
+
* **1** (`fix-protan`) and not on 0. It is the monolith's rule, kept verbatim (`idx = idx<0 ? 1 : (idx+1)%seq.length`), and the effect on
|
|
23
|
+
* the child is concrete: starting from a mode that is not a correction, contrast switches on at its first level while
|
|
24
|
+
* correction skips «normal» and goes straight into protanopia. Apart, a reader fixes one by the other and deletes a decision
|
|
25
|
+
* without knowing it existed.
|
|
26
|
+
*/
|
|
27
|
+
export declare function nextCvd(cur: string | undefined): {
|
|
28
|
+
idx: number;
|
|
29
|
+
mode: string;
|
|
30
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// core/visual-cycles — THE TWO CYCLES OF VISUAL ACCESSIBILITY, and the asymmetry between them (ADR-0221; issue #203).
|
|
3
|
+
//
|
|
4
|
+
// High contrast and colour correction are two choices a child steps through from the quick bar, and they used to live in two
|
|
5
|
+
// different modules: the list of levels in `ui/settings-visual`, the steps and the names in `ui/pause-icons`. 🔴 They are here
|
|
6
|
+
// together because the thing that costs most to maintain only reads when both are in sight — their ASYMMETRY, written below
|
|
7
|
+
// and deliberate.
|
|
8
|
+
//
|
|
9
|
+
// ⚠️ A LEAF MODULE: zero imports, zero DOM, zero storage. Two lists and two small sums.
|
|
10
|
+
//
|
|
11
|
+
// 📌 What it does NOT decide: which cycle the bar offers, or when. That belongs to the icon (`ui/pause-icons`) and to the panel
|
|
12
|
+
// (`ui/settings-visual`), the two surfaces through which the same choice is asked for.
|
|
13
|
+
/** The high-contrast levels, as `player.viz` values. The first one is «off». */
|
|
14
|
+
export const CONTRAST_LEVELS = ['normal', 'hc-direto', 'hc-direto-45', 'hc-direto-7'];
|
|
15
|
+
/** The colour-correction cycle, as `player.viz` values. */
|
|
16
|
+
export const CVD_SEQ = ['normal', 'fix-protan', 'fix-deuter', 'fix-tritan'];
|
|
17
|
+
/**
|
|
18
|
+
* The i18n keys of the announced colour-correction names, indexed like `CVD_SEQ`.
|
|
19
|
+
*
|
|
20
|
+
* ⚠️ POSITION 0 IS `cvd.tricro` AND NOT `cvd.off`, AND THE TWO KEYS DO NOT SWAP. This list names the four CHOICES of the
|
|
21
|
+
* cycle, so position 0 is a way of seeing — trichromatic vision, the one that needs no correction — and it says so. `cvd.off`
|
|
22
|
+
* is the FALLBACK for `viz` values that are no correction at all, and 13 of the 16 modes are exactly that: the three
|
|
23
|
+
* simulations, the three contrast levels, the five low-vision ones and blind mode. Announcing «trichromatic vision» there
|
|
24
|
+
* would be the software asserting what the child sees while she simulates not seeing. The choice is named; the fallback is off.
|
|
25
|
+
*/
|
|
26
|
+
export const CVD_NAMES = ['cvd.tricro', 'cvd.protan', 'cvd.deuter', 'cvd.tritan'];
|
|
27
|
+
/*
|
|
28
|
+
* 🔴 `CVD_LABELS` DID NOT COME ALONG — IT WAS DELETED. It sat in the declared debt of `ui/pause-icons`
|
|
29
|
+
* (`docs/6-DevOps-SRE/exports-without-consumer.json`) — published and measured to have no consumer anywhere — and its own
|
|
30
|
+
* comment called it «the label `iconLabel` uses», which had stopped being true at some point with nobody noticing. A debt
|
|
31
|
+
* ledger exists to SHRINK: moving it house would have carried it another year. What `iconLabel` uses is `CVD_NAMES`.
|
|
32
|
+
*/
|
|
33
|
+
/** The next contrast step. A `viz` that is not in the list — a correction filter, say — counts as index 0. */
|
|
34
|
+
export function nextContrast(cur) {
|
|
35
|
+
let idx = CONTRAST_LEVELS.indexOf(cur);
|
|
36
|
+
idx = idx < 0 ? 0 : idx;
|
|
37
|
+
return CONTRAST_LEVELS[(idx + 1) % CONTRAST_LEVELS.length];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The next colour-correction step.
|
|
41
|
+
*
|
|
42
|
+
* 🔴 NOTE THE ASYMMETRY WITH `nextContrast`, and it is the reason the two live in one file: an unknown `viz` lands on index
|
|
43
|
+
* **1** (`fix-protan`) and not on 0. It is the monolith's rule, kept verbatim (`idx = idx<0 ? 1 : (idx+1)%seq.length`), and the effect on
|
|
44
|
+
* the child is concrete: starting from a mode that is not a correction, contrast switches on at its first level while
|
|
45
|
+
* correction skips «normal» and goes straight into protanopia. Apart, a reader fixes one by the other and deletes a decision
|
|
46
|
+
* without knowing it existed.
|
|
47
|
+
*/
|
|
48
|
+
export function nextCvd(cur) {
|
|
49
|
+
let idx = CVD_SEQ.indexOf(cur);
|
|
50
|
+
idx = idx < 0 ? 1 : (idx + 1) % CVD_SEQ.length;
|
|
51
|
+
return { idx, mode: CVD_SEQ[idx] };
|
|
52
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
/** The CONTRAST axis. `padrao` is not the absence of a theme: it is the game's own drawn theme. */
|
|
3
|
+
export type Theme = 'padrao' | 'hc3' | 'hc45' | 'hc7';
|
|
4
|
+
/** The COLOUR CORRECTION axis. `tricro` = trichromatic vision, and it is a name, not an absence. */
|
|
5
|
+
export type Correction = 'tricro' | 'protan' | 'deuter' | 'tritan';
|
|
6
|
+
/** The simulation, which is NOT an axis. `null` = none running. */
|
|
7
|
+
export type Simulation = null | 'sim-protan' | 'sim-deuter' | 'sim-tritan' | 'lv-blur' | 'lv-haze' | 'lv-tunnel' | 'lv-macular' | 'lv-diabetic' | 'blind';
|
|
8
|
+
/** The visual state of ONE player. Replaces the single `p.viz` string. */
|
|
9
|
+
export interface VisualState {
|
|
10
|
+
readonly tema: Theme;
|
|
11
|
+
readonly correcao: Correction;
|
|
12
|
+
readonly simulacao: Simulation;
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// core/visual-state — the SHAPE of a child's visual state: the two axes and the simulation that is not one (ADR-0076).
|
|
3
|
+
//
|
|
4
|
+
// Types only, in core because `core/entity` holds a player's state and may not import upward (ADR-0173, issue #167);
|
|
5
|
+
// `render/viz-axes` keeps the same names and the functions that apply them.
|
|
6
|
+
export {};
|
|
@@ -22,7 +22,7 @@ export interface ActivityDef {
|
|
|
22
22
|
export declare const DEFAULT_ACTIVITY_ID = "ludico";
|
|
23
23
|
/** True when `id` names a real catalog entry. */
|
|
24
24
|
export declare function isValidActivityId(id: string): boolean;
|
|
25
|
-
/** Same check,
|
|
25
|
+
/** Same check, under the name `game-platformer`'s title menu (`ui/activities-menu`) calls it by. */
|
|
26
26
|
export declare function hasActivity(id: string): boolean;
|
|
27
27
|
/** The activity definition for `id`, or `undefined` if unknown (mirrors `ACTIVITIES[id]`). */
|
|
28
28
|
export declare function getActivity(id: string): ActivityDef | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// educational/activities-registry — the ACTIVITIES catalog: every playable activity's id → metadata
|
|
3
3
|
// (category, display name, sub-label, description, fraction denominators, "pick numbers" flag). This module
|
|
4
4
|
// owns only the CATALOG + id validation — it does NOT hold the current selection (that stays `activity` +
|
|
5
|
-
// `setActivityValue` in core/state.ts, per ADR/
|
|
5
|
+
// `setActivityValue` in core/state.ts, per ADR/plan-modularization-map).
|
|
6
6
|
//
|
|
7
7
|
// ============================ POR QUE ISTO NÃO MORA EM `game/` (ADR-0032) ============================
|
|
8
8
|
// Isto é CURRÍCULO, não jogo. `alf1..alf5` são as hipóteses da psicogênese de Ferreiro; `mat1..mat6` e as
|
|
@@ -25,13 +25,14 @@
|
|
|
25
25
|
// independe de língua". "Tabuada", "Divisão" e "Soma e subtração com meios" nomeiam operações que
|
|
26
26
|
// existem iguais em qualquer língua, e o lúdico ("Coletar 10 moedas") nem currículo é.
|
|
27
27
|
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
// ui/activities-menu
|
|
31
|
-
//
|
|
28
|
+
// MECHANICALLY: an activity that translates declares `nomeKey`/`dKey`; one that does not, declares neither. This
|
|
29
|
+
// module still imports NOTHING — it keeps the KEY, and the display point resolves it (`nomeDaAtividade` in the title
|
|
30
|
+
// menu, `ui/activities-menu`, which left for `game-platformer` with ADR-0174), for the same reason as
|
|
31
|
+
// `TOUCH_ACT_LABELS` and `PAD_GLYPH_SPOKEN`: a module `const` is evaluated once at import, and text already resolved
|
|
32
|
+
// would freeze the boot language.
|
|
32
33
|
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
34
|
+
// The gate went with the menu: `game-platformer`'s `tests/atividades-matematica-traduzem.node.test.js`, which watches
|
|
35
|
+
// BOTH sides — a translatable activity without a key fails, and a literacy activity WITH a key fails too.
|
|
35
36
|
const ACTIVITIES_DATA = [
|
|
36
37
|
['ludico', { cat: 'ludico', nome: 'Coletar 10 moedas', nomeKey: 'act.ludico.nome' }],
|
|
37
38
|
['alf1', { cat: 'alf', nome: 'Descobrindo palavras', sub: 'BABA • BOLA • BEBE', d: 'Elaborado para ajudar a superar as hipóteses pré-silábicas.' }],
|
|
@@ -60,7 +61,7 @@ export const DEFAULT_ACTIVITY_ID = 'ludico';
|
|
|
60
61
|
export function isValidActivityId(id) {
|
|
61
62
|
return ACTIVITIES.has(id);
|
|
62
63
|
}
|
|
63
|
-
/** Same check,
|
|
64
|
+
/** Same check, under the name `game-platformer`'s title menu (`ui/activities-menu`) calls it by. */
|
|
64
65
|
export function hasActivity(id) {
|
|
65
66
|
return isValidActivityId(id);
|
|
66
67
|
}
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
/** O que sobra de uma questão depois de as tentativas dela colapsarem. */
|
|
3
3
|
export type ResultadoDaQuestao = 'primeira' | 'mediada' | 'falhou';
|
|
4
4
|
/** A faixa em que a criança está, e o que ela manda fazer com o nível. */
|
|
5
|
-
export type
|
|
5
|
+
export type Band = 'proficiente' | 'zona' | 'frustracao';
|
|
6
6
|
/** Por que a faixa é essa. Existe para o anúncio ao leitor de tela e para a barra do ADR-0049 poderem dizer
|
|
7
7
|
* a razão em vez de só o resultado — e para um teste poder distinguir duas faixas iguais por motivos
|
|
8
8
|
* diferentes, que é onde um motor adaptativo erra sem dar sinal. */
|
|
9
|
-
export type
|
|
10
|
-
export interface
|
|
11
|
-
faixa:
|
|
12
|
-
motivo:
|
|
9
|
+
export type Reason = 'acertos-de-primeira' | 'quatro-seguidas' | 'resolvidas-no-piso' | 'dentro-da-zona' | 'janela-incompleta';
|
|
10
|
+
export interface Verdict {
|
|
11
|
+
faixa: Band;
|
|
12
|
+
motivo: Reason;
|
|
13
13
|
/** −1 desce, 0 mantém, +1 sobe. O ADR-0048 §5 chama a isto o efeito da faixa. */
|
|
14
14
|
efeito: -1 | 0 | 1;
|
|
15
15
|
}
|
|
16
16
|
/** Quantas questões a janela olha. Dez é o número do registo. */
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const WINDOW = 10;
|
|
18
18
|
/** A fração de acertos DE PRIMEIRA a partir da qual se sobe. 0,80 = 8 em 10, e vale para qualquer tipo. */
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const LEVEL_UP_TARGET = 0.8;
|
|
20
20
|
/** Quantas QUESTÕES falhadas seguidas descem o nível na hora. Quatro, porque 0,40⁴ < 5%. */
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const MISSES_IN_A_ROW_THAT_DROP = 4;
|
|
22
22
|
/**
|
|
23
23
|
* O piso de chute de um tipo de questão: a fração de questões que a sorte pura resolve.
|
|
24
24
|
*
|
|
@@ -30,14 +30,14 @@ export declare const FALHAS_SEGUIDAS_QUE_DESCEM = 4;
|
|
|
30
30
|
* com uma tentativa tem 0,10. Embutir o 0,60 do caso de cinco faria o motor julgar todas as outras pela
|
|
31
31
|
* aritmética da errada.
|
|
32
32
|
*/
|
|
33
|
-
export declare function
|
|
33
|
+
export declare function guessFloor(alternativas: number, tentativas: number): number;
|
|
34
34
|
/**
|
|
35
35
|
* As tentativas de UMA questão colapsam num resultado.
|
|
36
36
|
*
|
|
37
37
|
* `acertouNaTentativa` é 1-based; `null` quando a criança não acertou em nenhuma. É aqui que quatro tentativas
|
|
38
38
|
* erradas deixam de poder ser confundidas com quatro questões falhadas: elas produzem UM `'falhou'`.
|
|
39
39
|
*/
|
|
40
|
-
export declare function resultadoDaQuestao(
|
|
40
|
+
export declare function resultadoDaQuestao(rightOnAttempt: number | null): ResultadoDaQuestao;
|
|
41
41
|
/** Quantas questões terminaram em falha, contadas do fim para trás até à primeira que não falhou. */
|
|
42
42
|
export declare function falhasSeguidas(historico: readonly ResultadoDaQuestao[]): number;
|
|
43
43
|
/**
|
|
@@ -62,4 +62,4 @@ export declare function falhasSeguidas(historico: readonly ResultadoDaQuestao[])
|
|
|
62
62
|
* «abaixo do piso», que é o resumo e não a regra. Quem seguir a prosa deixa a criança um nível acima com um
|
|
63
63
|
* desempenho que o chute puro reproduz.
|
|
64
64
|
*/
|
|
65
|
-
export declare function
|
|
65
|
+
export declare function bandOf(historico: readonly ResultadoDaQuestao[], piso: number, windowSize?: number): Verdict;
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
//
|
|
33
33
|
// E não importa NADA, como toda a camada `educational/` (ADR-0032): ela é dado, e o gate de fronteira afere.
|
|
34
34
|
/** Quantas questões a janela olha. Dez é o número do registo. */
|
|
35
|
-
export const
|
|
35
|
+
export const WINDOW = 10;
|
|
36
36
|
/** A fração de acertos DE PRIMEIRA a partir da qual se sobe. 0,80 = 8 em 10, e vale para qualquer tipo. */
|
|
37
|
-
export const
|
|
37
|
+
export const LEVEL_UP_TARGET = 0.8;
|
|
38
38
|
/** Quantas QUESTÕES falhadas seguidas descem o nível na hora. Quatro, porque 0,40⁴ < 5%. */
|
|
39
|
-
export const
|
|
39
|
+
export const MISSES_IN_A_ROW_THAT_DROP = 4;
|
|
40
40
|
/**
|
|
41
41
|
* O piso de chute de um tipo de questão: a fração de questões que a sorte pura resolve.
|
|
42
42
|
*
|
|
@@ -48,16 +48,16 @@ export const FALHAS_SEGUIDAS_QUE_DESCEM = 4;
|
|
|
48
48
|
* com uma tentativa tem 0,10. Embutir o 0,60 do caso de cinco faria o motor julgar todas as outras pela
|
|
49
49
|
* aritmética da errada.
|
|
50
50
|
*/
|
|
51
|
-
export function
|
|
51
|
+
export function guessFloor(alternativas, tentativas) {
|
|
52
52
|
if (!Number.isFinite(alternativas) || alternativas < 2)
|
|
53
53
|
return 0;
|
|
54
54
|
// O tecto é o número de ALTERNATIVAS, não uma a menos: com tantas tentativas quantas alternativas a
|
|
55
55
|
// criança esgota todas as erradas e a certeza é 1. Pedir mais não pode passar disso.
|
|
56
56
|
const t = Math.max(0, Math.min(Math.floor(tentativas), Math.floor(alternativas)));
|
|
57
|
-
let
|
|
57
|
+
let chanceOfMissingAll = 1;
|
|
58
58
|
for (let i = 0; i < t; i++)
|
|
59
|
-
|
|
60
|
-
return 1 -
|
|
59
|
+
chanceOfMissingAll *= (alternativas - 1 - i) / (alternativas - i);
|
|
60
|
+
return 1 - chanceOfMissingAll;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* As tentativas de UMA questão colapsam num resultado.
|
|
@@ -65,10 +65,10 @@ export function pisoDeChute(alternativas, tentativas) {
|
|
|
65
65
|
* `acertouNaTentativa` é 1-based; `null` quando a criança não acertou em nenhuma. É aqui que quatro tentativas
|
|
66
66
|
* erradas deixam de poder ser confundidas com quatro questões falhadas: elas produzem UM `'falhou'`.
|
|
67
67
|
*/
|
|
68
|
-
export function resultadoDaQuestao(
|
|
69
|
-
if (
|
|
68
|
+
export function resultadoDaQuestao(rightOnAttempt) {
|
|
69
|
+
if (rightOnAttempt === null || !Number.isFinite(rightOnAttempt))
|
|
70
70
|
return 'falhou';
|
|
71
|
-
return
|
|
71
|
+
return rightOnAttempt <= 1 ? 'primeira' : 'mediada';
|
|
72
72
|
}
|
|
73
73
|
/** Quantas questões terminaram em falha, contadas do fim para trás até à primeira que não falhou. */
|
|
74
74
|
export function falhasSeguidas(historico) {
|
|
@@ -99,17 +99,17 @@ export function falhasSeguidas(historico) {
|
|
|
99
99
|
* «abaixo do piso», que é o resumo e não a regra. Quem seguir a prosa deixa a criança um nível acima com um
|
|
100
100
|
* desempenho que o chute puro reproduz.
|
|
101
101
|
*/
|
|
102
|
-
export function
|
|
103
|
-
if (falhasSeguidas(historico) >=
|
|
102
|
+
export function bandOf(historico, piso, windowSize = WINDOW) {
|
|
103
|
+
if (falhasSeguidas(historico) >= MISSES_IN_A_ROW_THAT_DROP) {
|
|
104
104
|
return { faixa: 'frustracao', motivo: 'quatro-seguidas', efeito: -1 };
|
|
105
105
|
}
|
|
106
|
-
if (historico.length <
|
|
106
|
+
if (historico.length < windowSize) {
|
|
107
107
|
return { faixa: 'zona', motivo: 'janela-incompleta', efeito: 0 };
|
|
108
108
|
}
|
|
109
|
-
const ultimas = historico.slice(-
|
|
110
|
-
const dePrimeira = ultimas.filter((r) => r === 'primeira').length /
|
|
111
|
-
const resolvidas = ultimas.filter((r) => r !== 'falhou').length /
|
|
112
|
-
if (dePrimeira >=
|
|
109
|
+
const ultimas = historico.slice(-windowSize);
|
|
110
|
+
const dePrimeira = ultimas.filter((r) => r === 'primeira').length / windowSize;
|
|
111
|
+
const resolvidas = ultimas.filter((r) => r !== 'falhou').length / windowSize;
|
|
112
|
+
if (dePrimeira >= LEVEL_UP_TARGET)
|
|
113
113
|
return { faixa: 'proficiente', motivo: 'acertos-de-primeira', efeito: 1 };
|
|
114
114
|
if (resolvidas <= piso)
|
|
115
115
|
return { faixa: 'frustracao', motivo: 'resolvidas-no-piso', efeito: -1 };
|
|
@@ -16,38 +16,38 @@ export type Segmento = 'azul' | 'verde' | 'vermelho';
|
|
|
16
16
|
* `nenhuma` não é «apagada» — é a barra a mostrar os seus segmentos, que é o estado normal. Laranja e roxa
|
|
17
17
|
* cobrem-nos porque são a única coisa que interessa naquele instante.
|
|
18
18
|
*/
|
|
19
|
-
export type
|
|
19
|
+
export type BarColour = 'nenhuma' | 'laranja' | 'roxa';
|
|
20
20
|
/**
|
|
21
|
-
* O VEREDICTO, visto daqui: a fatia mínima do que o `
|
|
21
|
+
* O VEREDICTO, visto daqui: a fatia mínima do que o `bandOf` devolve.
|
|
22
22
|
*
|
|
23
23
|
* Só `efeito` e `motivo`, e nem sequer a `faixa` — a barra não precisa de saber que a criança está «na zona»,
|
|
24
24
|
* precisa de saber se subiu, desceu ou ficou. `motivo` existe para o anúncio ao leitor de tela poder dizer a
|
|
25
25
|
* RAZÃO: «desceu porque quatro seguidas» é informação; «ficou laranja» é decoração.
|
|
26
26
|
*/
|
|
27
|
-
export interface
|
|
27
|
+
export interface ReadVerdict {
|
|
28
28
|
readonly efeito: -1 | 0 | 1;
|
|
29
29
|
readonly motivo: string;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Quantos segmentos a barra tem.
|
|
33
33
|
*
|
|
34
|
-
* Dez, e tem de ser a mesma `
|
|
34
|
+
* Dez, e tem de ser a mesma `WINDOW` que o motor adaptativo julga: uma barra que mostrasse doze questões
|
|
35
35
|
* enquanto o motor julga dez estaria a mostrar duas que não contam para o veredicto que a colore. O gate
|
|
36
36
|
* afirma a igualdade, porque este ficheiro não pode importar a constante.
|
|
37
37
|
*/
|
|
38
|
-
export declare const
|
|
38
|
+
export declare const BAR_SEGMENTS = 10;
|
|
39
39
|
/** Uma barra pronta a desenhar. Tudo aqui é derivado; não há nada para mutar. */
|
|
40
|
-
export interface
|
|
40
|
+
export interface Bar {
|
|
41
41
|
/** A árvore de habilidade desta barra. O ADR-0049 §5 manda uma barra POR habilidade, de uma a três, e o
|
|
42
42
|
* segmento cai na barra da habilidade que a questão exercitou — sem isto, duas habilidades ligadas ao
|
|
43
43
|
* mesmo tempo partilhariam um histórico e as faixas mediriam a média de duas crianças diferentes. */
|
|
44
44
|
readonly skill: string;
|
|
45
|
-
/** Os segmentos, do mais ANTIGO para o mais novo, no máximo `
|
|
45
|
+
/** Os segmentos, do mais ANTIGO para o mais novo, no máximo `BAR_SEGMENTS`. Menos do que isso no
|
|
46
46
|
* começo da sessão: a barra enche-se, e não nasce cheia de espaços que pareçam erros. */
|
|
47
47
|
readonly segmentos: readonly Segmento[];
|
|
48
|
-
readonly cor:
|
|
48
|
+
readonly cor: BarColour;
|
|
49
49
|
/** O veredicto que produziu a cor, tal como entrou. */
|
|
50
|
-
readonly veredicto:
|
|
50
|
+
readonly veredicto: ReadVerdict;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Um resultado de questão vira uma cor. É a tradução inteira, e é 1 para 1 de propósito.
|
|
@@ -59,7 +59,7 @@ export interface Barra {
|
|
|
59
59
|
*/
|
|
60
60
|
export declare function corDoSegmento(r: Resultado): Segmento;
|
|
61
61
|
/** O que se sabe além do histórico e do veredicto. */
|
|
62
|
-
export interface
|
|
62
|
+
export interface Context {
|
|
63
63
|
/**
|
|
64
64
|
* ⚠️ A CRIANÇA CHEGOU A COPIAR A RESPOSTA (ADR-0049): falhou as três tentativas, falhou as três da
|
|
65
65
|
* explicação, e a resposta apareceu para ela copiar. Aí «o nível desce IMEDIATAMENTE, sem esperar por
|
|
@@ -80,7 +80,7 @@ export interface Contexto {
|
|
|
80
80
|
* medir a média de duas crianças diferentes. Quem chama separa; este módulo não tem como saber que não
|
|
81
81
|
* separou — nem tem como julgar, que é precisamente o ponto.
|
|
82
82
|
*/
|
|
83
|
-
export declare function
|
|
83
|
+
export declare function barOf(skill: string, historico: readonly Resultado[], veredicto: ReadVerdict, ctx?: Context): Bar;
|
|
84
84
|
/**
|
|
85
85
|
* O histórico DEPOIS de a barra ter sinalizado — porque «sobe» leva consigo «e a contagem zera».
|
|
86
86
|
*
|
|
@@ -93,4 +93,4 @@ export declare function barraDe(skill: string, historico: readonly Resultado[],
|
|
|
93
93
|
*
|
|
94
94
|
* Fica como pergunta para o Dev; enquanto ele não a responder, esta é a leitura que não produz um defeito.
|
|
95
95
|
*/
|
|
96
|
-
export declare function
|
|
96
|
+
export declare function afterSignalling(historico: readonly Resultado[], barra: Bar): readonly Resultado[];
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
// ========================= A BARRA NÃO PODE CONTAR, E ISSO É ESTRUTURAL =========================
|
|
5
5
|
// A leitura literal da issue #93 produz um módulo com contadores próprios: «oito azuis → roxa, cinco
|
|
6
6
|
// vermelhos → laranja». Escrevê-lo assim seria pôr no repositório uma SEGUNDA implementação de uma decisão
|
|
7
|
-
// que já existe no `
|
|
7
|
+
// que já existe no `bandOf` do motor adaptativo:
|
|
8
8
|
//
|
|
9
|
-
// · «oito azuis sobem» é o `
|
|
10
|
-
// · «quatro vermelhos seguidos» é o `
|
|
9
|
+
// · «oito azuis sobem» é o `LEVEL_UP_TARGET = 0.8` — 8 de primeira em 10;
|
|
10
|
+
// · «quatro vermelhos seguidos» é o `MISSES_IN_A_ROW_THAT_DROP = 4`;
|
|
11
11
|
// · «cinco vermelhos espalhados» é `resolvidas <= piso` — 5 falhadas em 10 dá 0,50, abaixo do piso 0,60.
|
|
12
12
|
//
|
|
13
13
|
// O próprio ADR-0049 diz isto em voz alta: «That is what makes every number in ADR-0048 §5 line up.»
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
//
|
|
20
20
|
// ⚠️ POR ISSO O VEREDICTO ENTRA PRONTO, e é a arquitectura que o obriga em vez de a disciplina. O `educational/`
|
|
21
21
|
// não importa NADA — nem os seus vizinhos (ADR-0032; a camada é DADO e viaja sozinha para o
|
|
22
|
-
// `the-inclusionist-knowledge-tree` do ADR-0058). Este módulo não tem, portanto, como chamar o `
|
|
22
|
+
// `the-inclusionist-knowledge-tree` do ADR-0058). Este módulo não tem, portanto, como chamar o `bandOf`; e
|
|
23
23
|
// como também não recebe o `piso`, não tem sequer os números com que recalcular a regra. Ele SÓ pode
|
|
24
24
|
// projectar o que lhe deram. Um gate consegue afirmar que duas implementações concordam; esta forma torna a
|
|
25
25
|
// segunda implementação impossível de escrever aqui dentro.
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
/**
|
|
40
40
|
* Quantos segmentos a barra tem.
|
|
41
41
|
*
|
|
42
|
-
* Dez, e tem de ser a mesma `
|
|
42
|
+
* Dez, e tem de ser a mesma `WINDOW` que o motor adaptativo julga: uma barra que mostrasse doze questões
|
|
43
43
|
* enquanto o motor julga dez estaria a mostrar duas que não contam para o veredicto que a colore. O gate
|
|
44
44
|
* afirma a igualdade, porque este ficheiro não pode importar a constante.
|
|
45
45
|
*/
|
|
46
|
-
export const
|
|
46
|
+
export const BAR_SEGMENTS = 10;
|
|
47
47
|
/**
|
|
48
48
|
* Um resultado de questão vira uma cor. É a tradução inteira, e é 1 para 1 de propósito.
|
|
49
49
|
*
|
|
@@ -63,8 +63,8 @@ export function corDoSegmento(r) {
|
|
|
63
63
|
* medir a média de duas crianças diferentes. Quem chama separa; este módulo não tem como saber que não
|
|
64
64
|
* separou — nem tem como julgar, que é precisamente o ponto.
|
|
65
65
|
*/
|
|
66
|
-
export function
|
|
67
|
-
const segmentos = historico.slice(-
|
|
66
|
+
export function barOf(skill, historico, veredicto, ctx = {}) {
|
|
67
|
+
const segmentos = historico.slice(-BAR_SEGMENTS).map(corDoSegmento);
|
|
68
68
|
// A rendição vence o veredicto porque ela É uma descida, decidida antes e por outro caminho. Escrevê-la
|
|
69
69
|
// como `|| efeito < 0` em vez de a testar primeiro daria o mesmo resultado hoje e mentiria sobre a ordem.
|
|
70
70
|
const cor = ctx.copiouAResposta ? 'laranja'
|
|
@@ -84,6 +84,6 @@ export function barraDe(skill, historico, veredicto, ctx = {}) {
|
|
|
84
84
|
*
|
|
85
85
|
* Fica como pergunta para o Dev; enquanto ele não a responder, esta é a leitura que não produz um defeito.
|
|
86
86
|
*/
|
|
87
|
-
export function
|
|
87
|
+
export function afterSignalling(historico, barra) {
|
|
88
88
|
return barra.cor === 'nenhuma' ? historico : [];
|
|
89
89
|
}
|