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
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`.
`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
The variable name `keymanweb` used in the UI modules is confusing
because `KeymanWeb` also exists and points to something else. Rename to
`keyman` which just mirrors `window.keyman`.
Also fixup type declaration for toolbar `lastDismissalCallback`, which
did not match the assigned type.
Fixes: #16168
Test-bot: skip
Ensure that the IME interface methods are all defined for both browser
and webview modes. Deprecate 'Element' methods and replace with
'TextStore' to clarify return type. Add deprecation flags where needed
and update documentation accordingly.
Fixes: #16144
chore(web): improve the KeymanWeb integration documentation
- replace use of `kmw` with `keyman`
- unify pattern to load keyboards: do it in `keyman.init().then()` instead of in the document `onload`
Part-of: keymanapp/keyman.com#449
In order to maintain roughly the current build artifact size, strip out
the unfinished core integration from what we merge with preflight.
Test-bot: skip
Build-bot: release:android,ios,developer,web
The export of `test-index.ts` were intended to be used by tests only,
but over time they contained also exports that were consumed else where,
e.g. in UI classes like `kmwuibutton.ts`. This change removes unused
exports, moves test-only classes to a `unitTestEndPoints` container and
marks test-only types with `@internal`.
Build-bot: skip build:web
Test-bot: skip
PR #15856 introduced the `KeyboardDetails` type but overlooked the use in
one file.
Follow-up-of: #15856
Follows: #15887
Build-bot: skip build:web
Test-bot: skip
This change explicitly specifies the return types and access for the
functions in KeymanEngine. Also introduce `KeyboardDetails` instead of
`ReturnType<>`.
Test-bot: skip
The command shortcuts that were used by Web
scripts to create bundles via `esbuild` were not
properly handling the $KEYMAN_ROOT path when it
contained a space. These changes will rectify
this behavior and permit builds for such cases.
Build-bot: skip build:web
Test-bot: skip
This change stubs out `KMXKeyboard.isRTL` and adds a unit test for RTL
with .js and .kmx (currently skipped) keyboards. Also change some code
to use `Keyboard` instead of `JSKeyboard` and stub out additional methods.
The RTL functionality will have to be completed when the necessary
extensions to the Core API are implemented (#15482).
Fixes: #15288
Test-bot: skip
This makes the `options` parameter in the `JSKeyboardProcessor`
constructor no longer optional.
Also `baseLayout` and `defaultOutputRules` are now required in
`ProcessorInitOptions`.
For testing purposes we export `DEFAULT_OPTIONS` in a testing endpoint.
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
Document what values are possible for the `eventCode` parameter and what
these values mean. Also change `data` parameter to a `boolean`.
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