refactor(web): rename ruleBehavior variables → processorAction 🎼
The changes in PR #12291 renamed the `RuleBehavior` class to `ProcessorAction`. This change now renames the local variables in `InputProcessor` accordingly.
Follow-up-of: #12291
refactor(web): remove web-utils exports from keyboard 🎼
Types defined in keyman/common/web-utils were re-exported in keyman/engine/keyboard. This change removes the re-export.
Part-of: #15292
feat(web): add `findStores` functions 🍪
This change adds a static `findStores` function to `VarStoreSerializer` and `VariableStoreCookieSerializer` as well as to the `VariableStoreSerializer` interface.
Also add unit tests for `VariableStoreCookieSerializer`.
Part-of: #13426
This changes several `TODO-web-core` to `TODO-embed-osk-in-kmx` because
they are related to OSK and can't be implemented/tested without having
the OSK API available.
Also updated some additional comments.
Build-bot: skip
Test-bot: skip
The changes in PR #12291 renamed the `RuleBehavior` class to
`ProcessorAction`. This change now renames the local variables in
`InputProcessor` accordingly.
Follow-up-of: #12291
Test-bot: skip
This change adds a static `findStores` function to `VarStoreSerializer`
and `VariableStoreCookieSerializer` as well as to the
`VariableStoreSerializer` interface.
Also add unit tests for `VariableStoreCookieSerializer`.
Part-of: #13426
Test-bot: skip
Addresses code review comment: `Worker` is a generic and semi-reserved
name that we should not be stepping on.
This renames it to `WebWorker` instead of the suggested `LMWorker` or
`PredictiveTextWorker`. `WebWorker` is a name that was already used
in a few places and seems to better match: there is a corresponding
class for running with node. Naming it `WebWorker` makes it clearer
that this is the corresponding class when running in the browser.
The corresponding class for running under node was renamed to `NodeWorker`.
Test-bot: skip
This is a follow-up of review comments in #15401.
- rename `DefaultWorker` → `Worker`
- rename `BUTTON_CLASSES` → `buttonClassNames`
Both exports now also match the filename.
Follow-up-of: #15401
Test-bot: skip
refactor(web): remove defaults in keyboard-storage
- Also renamed `prefixed` and `withoutPrefix` functions to use the name that was aliased on most cases: `toPrefixedKeyboardId` and `toUnprefixedKeyboardId`.
- Renamed `ModelManager` class to `ModelCache` which was the name used everywhere except in comments.
Part-of: #15292
- Also renamed `prefixed` and `withoutPrefix` functions to use the name
that was aliased on most cases: `toPrefixedKeyboardId` and
`toUnprefixedKeyboardId`.
- Renamed `ModelManager` class to `ModelCache` which was the name used
everywhere except in comments.
Part-of: #15292
Test-bot: skip
Document what values are possible for the `eventCode` parameter and what
these values mean. Also change `data` parameter to a `boolean`.
Test-bot: skip
test(web): add baseline tests
This adds the baseline tests from `/common/test/keyboards/baseline`. Some tests are skipped because they rely on functionality not implemented in Web, other tests are skipped because they require functionality still marked with `TODO-web-core` and should pass once web-core is finished.
maint(web): remove file that sneaked in through wrong merge
A previous PR (#15092) renamed `outputTargetForElement.ts` to `textStoreForElement.ts`, another PR (#15093) moved files around. In the end we ended up having both files. This change removes the unused file.
Follow-up-of: #15092
Follow-up-of: #15093
This change passes the right value to the `is_key_down` parameter of
Core's `process_event`. It also updates the WASM interface to accept
a boolean instead of a number, and adds the enum values for the core
event flags.
Fixes: #15283
Test-bot: skip
A previous PR (#15092) renamed `outputTargetForElement.ts` to
`textStoreForElement.ts`, another PR (#15093) moved files around. In the
end we ended up having both files. This change removes the unused file.
Follow-up-of: #15092
Follow-up-of: #15093
Test-bot: skip
fix(web): add text after last deadkey to context
Previously we forgot to add the text after the last deadkey - or any text if didn't have deadkeys. This change fixes this and verifies things with additional unit tests.
refactor(web): make core adapter and processor tests headless
Also improve Core Adapter to detect if we're running in a browser or on node.js and load the appropriate km-core module.
Follow-up-of: #13993
Also improve Core Adapter to detect if we're running in a browser or on
node.js and load the appropriate km-core module.
Follow-up-of: #13993
Test-bot: skip
refactor(web): simplify `insertText`
Getting the textStore was done twice, without the second time changing the result. Additionally, `insertText` in the super class also gets the active text store and returns false if it is not set. This change removes those additional code lines that are not needed.
Also adds unit tests for `ContextManager.insertText`, and introduces new type `KeymanInfoPair`.
Follow-up-of: #15092
refactor(web): rename target and mock variables and functions
This change renames `target` and `mock` variables that identify a text store. Similarly it renames functions with `Target` in the name.
Follow-up-of: #15092