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
refactor(web): change `preInput` to `SyntheticTextStore`
`preInput` always contains a `SyntheticTextStore`, so this change modifies the type of the property so that we don't have to always cast it.
Follow-up-of: #15092
Previously we re-exported the exports of `element-text-stores` in
`attachment` because it was needed in unit tests. This change removes
this re-export - should be solved differently, but it turns out that
all current tests pass even without the re-export.
This comes out of
[a review comment in #15092](https://github.com/keymanapp/keyman/pull/15092#discussion_r2493048032).
Follow-up-of: #15092
Test-bot: skip
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
Test-bot: skip
`preInput` always contains a `SyntheticTextStore`, so this change modifies
the type of the property so that we don't have to always cast it.
Follow-up-of: #15092
Test-bot: skip
This implements and uses`CoreKeyboardProcessor.applyContextFromTextStore`
and `CoreKeyboardProcessor.saveMarkersToTextStore`, and also adds unit
tests.
Fixes: #13926
Test-bot: skip
This change moves the core adapter to core-adapter module which contains
the code to bind to the the WASM core binaries and adds additional type
definitions for Core.
Part-of: #13926
Test-bot: skip
- initialize `Deadkey.matched` in c'tor
- fix `Deadkey.equal` method
- verify deadkey exists before removing it in `DeadkeyTracker.remove`
- add unit tests for DeadkeyTracker
Test-bot: skip