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
- 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
* Simplify the build dependency / child tree
* Split building and testing tooling so we don't rebuild components
* Fixup expected outputs to avoid repeated builds of components
* Remove unused dependency references
* Move test.sh targets into build.sh, so that testing doesn't lose
dependency tracking and cause unnecessary rebuilds. (Note that I have
not yet deleted test.sh.)
* Make predictive-text a direct child of engine, so that we don't build
it twice (or even more times)
Test-bot: skip
sentry-manager is used by Keyman Engine for Android and Keyman Engine
for iOS, but not directly by KeymanWeb, nor does it have any
dependencies on /web. So it does not make sense to keep it under /web.
es-bundling is used by sentry-manager and potentially other /common/web
tools in the future, so moving it under /common/tools makes it more
consistent in the future.
This is part of simplifying the web source tree; these changes do not
make significant build performance differences at this time.
Test-bot: skip