Deprecate the following obsolete functions and properties:
* `keyman.helpURL`
* `keyman.util.rgba`
* `keyman.util.toFloat`
* `keyman.util.toNumber`
* `keyman.util.toNzString`
Use correct language for code blocks in Keyman Engine for Web
documentation.
Test-bot: skip
The `loaduserinterface` and `unloaduserinterface` events were
incompletely implemented, and the documentation was incomplete. This
change:
1. ensures `loaduserinterface` is called any time a UI is set, either
during initialization or when the property is set later.
2. ensures `unloaduserinterface` is called immediately before a UI is
shutdown.
3. updates documentation
4. removes misleading commented code in kmwuifloat.ts
Test-bot: skip
KeymanWeb has long had `keyman.build` and `keyman.version`. Neither of
these properties expose the full version string, and consumers are
forced to manipulate them to get a partial version string.
This change deprecates both these properties, and introduces a new
`keyman.versionInfo` property, which returns an object with all the
version information, most importantly `full`.
Update documentation and add a unit test for this, following the unit
test pattern established throughout Keyman of a unit test filename
matching the implementation class. The `KeymanEngineBase` class is a
little difficult to instantiate so this unit test module currently has
a minimal instantiation which provides enough to fulfill the one
included test.
Test-bot: skip
Fixes: #16335
The new unit tests here caught the behavior addressed by this PR's predecessor, #16349.
Meanwhile, a _different_ behavior was noted here that had added complexity - it so happens the test case I constructed managed to catch a bug in backspace handling! Fortunately, a small tweak was able to resolve the issue.
Build-bot: skip build:web
Test-bot: skip
refactor(web): improve naming of `_SetTargetDir` function
`_SetTargetDir` deals with setting the text direction of the target, not the target directory. This change mainly renames the private function to `setTargetTextDirection`.
Build-bot: skip release:web release:android
Relates-to: #16254
Relates-to: #16313
Noting that similar issues to those fixed by #16313 have occurred in other gesture-related contexts, it seems wise to implement the same sort of fix for all gesture types - perhaps the Android WebView has its own circumstances where similar "reference replacements" may occur and throw off our internal key-matching logic.
Fixes: #16254
While I have not been able to find a definitive online reference, it appears that the key-spec instance attached to OSK elements may be replaced within the iOS Safari-based WebView despite no re-assignment existing within Keyman Engine for Web code.
The references should not change under any condition, but it appears that something external within the iOS WebView causes this anyway. Fortunately, we can still check against the unique element ID, which provides a way around this issue.
Build-bot: skip release:web release:ios
`currentKeyboardSrcTextStore` can return `null` if the global
`textStore` should be used. This change reflects this in the return
type.
Build-bot: skip build:web
Test-bot: skip
`_SetTargetDir` deals with setting the text direction of the target,
not the target directory. This change mainly renames the private function
to `setTargetTextDirection`.
Build-bot: skip build:web
Test-bot: skip
Adds unit tests to cover context-reset patterns
and to ensure that transition IDs are always set
properly on generated suggestions, for all model
types.
Build-bot: skip build:web
Test-bot: skip
Before epic/autocorrect, input of a pure backspacing transform would perform special operations within the predictive-text worker, reconstructing the remainder of the token and erasing fat-finger data. This PR fixes the regression.
This is notably useful when attempting to erase part of an applied suggestion, as applied suggestions wholesale-replace the original versions of affected tokens with a single transform input. Backspacing into the transform will then break that unitary transform into pieces better suited for ongoing predictive-text operations.
Build-bot: skip build:web build:android