Commit graph

1372 commits

Author SHA1 Message Date
Joshua Horton
9372137bee change(web): mark a couple fields private
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-08-18 09:12:42 -05:00
Joshua Horton
7a7ca44242 change(web): merge gesture-completion handler and cancler for HeldRepeater 2026-08-18 08:12:51 -05:00
Joshua Horton
0f666be3d5 docs(web): document GestureHandler.cancel idempotency 2026-08-17 08:21:52 -05:00
Joshua Horton
3c13dfb175 refactor(web): refactor HeldRepeater class 2026-08-17 08:12:05 -05:00
Joshua Horton
d153ecb1c0 fix(web): cancel gestures on relayouts and context resets
Related-to: #15226

This fixes the bug underlying the repro described here: https://github.com/keymanapp/keyman/issues/15226#issuecomment-3842211229

I cannot yet confirm that it fixes the issue as a whole, however.

Build-bot: skip build:web release:android release:ios
2026-08-14 15:26:57 -05:00
Marc Durdin
f1361a94f0 feat(web): add keyman.versionInfo API
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
2026-08-12 11:07:31 +02:00
Eberhard Beilharz
870903dccb
refactor(web): fix return type of currentKeyboardSrcTextStore
`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
2026-08-07 09:37:14 +02:00
Eberhard Beilharz
1eb58c4ef8
chore(web): fire keyboardloaded event only once per keyboard
Previously we fired `keyboardloaded` twice for each loaded keyboard.
This change fixes this.

Fixes: #16292
Build-bot: skip build:web
Test-bot: skip
2026-08-03 17:50:11 +02:00
Eberhard Beilharz
21f744f44a
Merge pull request #16286 from keymanapp/refactor/web/contextManager
refactor(web): adjust function visibility and variable names
2026-07-30 15:51:50 +02:00
Eberhard Beilharz
8cad000e11
Merge pull request #16285 from keymanapp/chore/web/updateHelpLinks
chore(web): update help links to use latest version

This updates three in-code help links to point to `current-version` instead of an outdated version page.
2026-07-27 15:38:57 +02:00
Eberhard Beilharz
d9f572f92d
refactor(web): adjust function visibility and variable names
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
The functions are only used inside of the class, so this change makes
them private. Also update some variable names.

Test-bot: skip
2026-07-27 14:17:33 +02:00
Eberhard Beilharz
76058bcc52
chore(web): update help links to use latest version
This updates three in-code help links to point to `current-version`
instead of an outdated version page.

Build-bot: skip
Test-bot: skip
2026-07-27 13:22:04 +02:00
Eberhard Beilharz
f6eec08a66
fix(web): ignore exception trying to access cookie
This change works around the problem where third-party cookies are
blocked when using the keymanweb bookmark by ignoring the exception.
The cookie is used to store a previous state; if we ignore the exception
the user will always get the initial state of the keyboard, but at
least the bookmark is usable.

Fixes: #keymanapp/r.keymanweb.com/9
Build-bot: skip build:web
Test-bot: skip
2026-07-27 10:07:17 +02:00
Marc Durdin
3852d354f7
Merge pull request #16221 from keymanapp/chore/web/stubAndKeyboardCacheScope
chore(web): declare scope for stubAndKeyboardCache members
2026-07-14 21:22:09 +10:00
Marc Durdin
0e076d5389 chore(web): declare scope for stubAndKeyboardCache members
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Also remove redundant `fetchKeyboardForStub` function, as it had only a
single use (and was not unit tested directly).

Test-bot: skip
2026-07-11 14:47:32 +02:00
Marc Durdin
07daf94555
Merge pull request #16170 from keymanapp/fix/web/16144-define-interfaces-for-imes-in-base
fix(web): define IME interfaces in `KeyboardInterfaceBase`
2026-07-11 00:25:31 +10:00
Marc Durdin
83328c904b fix(web): ensure onmouseleave does not crash if mouseEnterPromise is not set 2026-07-10 15:32:56 +02:00
Marc Durdin
db881049e1 fix(developer): move osk banner resync from Server frontend to Web set osk
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
After review, it is better to do the sync of the model banner in
KeymanWeb `set osk()` than in the client of the API. The client should
be able to assign a new OSK and have it "just work" without needing to
attach things to it.

Fixes: #15217
2026-07-02 14:55:46 +02:00
Marc Durdin
a1bd0987a8
Merge branch 'master' into fix/web/16144-define-interfaces-for-imes-in-base
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-07-02 22:00:39 +10:00
Joshua Horton
824925a387
Merge pull request #16136 from keymanapp/fix/ios/load-via-scheme-handler 2026-07-01 21:57:37 +07:00
Marc Durdin
0fc869faa4 fix(web): define IME interfaces in KeyboardInterfaceBase
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
2026-07-01 07:43:08 +02:00
Joshua Horton
eea463b18b fix(web): set proper font path for doc-keyboards 2026-06-29 09:38:03 -05:00
Marc Durdin
c2d72b7a03 fix(web): revert regression in setting activeKeyboard in set osk
Fixes: #16155
Test-bot: skip
2026-06-29 15:40:05 +02:00
Joshua Horton
b3ee271aee fix(ios): load host page, keyboards through a consistent WKURLSchemeHandler
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
This bypasses any need to modify KMW keyboard loading (say, via .fetch), though it does require a number of collateral changes to be made in order for CORS, etc to be satisfied.

Build-bot: skip build:ios
2026-06-26 14:37:11 -05:00
Eberhard Beilharz
046100a5f8
Merge pull request #16067 from keymanapp/fix/web/validateForCustomKeyboard
fix(web): fix `KeyboardStub.validateForCustomKeyboard`

This change fixes a misleading error message in `validateForCustomKeyboard` - `KR` is not the region as the error implies - furthermore it doesn't make sense to check `KR` since it is the optional   [keyboard registration function](https://help.keyman.com/developer/engine/web/18.0/reference/interface/registerKeyboard),   so this change removes it.
2026-06-10 12:44:41 +02:00
Eberhard Beilharz
9733ea4211
chore(web): remove outdated *_load.js files
This change removes unused `*_load.js` files and inlines the code from
`laokeys_load.js`. Current Keyman versions no longer produce _load.js
files when compiling a keyboard, so these files were pretty outdated.

Build-bot: skip build:web
Test-bot: skip
2026-06-09 18:42:47 +02:00
Eberhard Beilharz
09a6ea87c2
fix(web): fix KeyboardStub.validateForCustomKeyboard
This change fixes a misleading error message in `validateForCustomKeyboard`
- `KR` is not the region as the error implies
- furthermore it doesn't make sense to check `KR` since it is the optional
  [keyboard registration function](https://help.keyman.com/developer/engine/web/18.0/reference/interface/registerKeyboard),
  so this change removes it.

Test-bot: skip
2026-06-03 19:52:36 +02:00
Eberhard Beilharz
f218aa92db
refactor(web): reformatting of files
Test-bot: skip
2026-06-03 19:51:44 +02:00
Marc Durdin
bf1e272d17 chore: remove commented code
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-06-01 16:56:00 +02:00
Marc Durdin
ee8e3e8664 chore: remove keymancore.d.ts 2026-06-01 16:54:45 +02:00
Marc Durdin
fc82f28b2d chore(web): web-core preflight - strip core references
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
2026-06-01 14:44:45 +02:00
Marc Durdin
9f75726344 chore(web): Merge branch 'master' into chore/web-core-preflight 2026-05-28 13:47:36 +02:00
Eberhard Beilharz
78ea935fe5
docs(web): reformat and small fixes
- rewrap lines
- change http:// to https://

Build-bot: skip
Test-bot: skip
2026-05-27 19:55:36 +02:00
Marc Durdin
49a2887c24
Merge branch 'epic/web-core' into feat/web/varStoresCleanup
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-18 01:29:29 +10:00
Marc Durdin
50139a0ebd refactor(web): eliminate nullable variableStoreSerializer code paths
To reduce the number of possible failure cases within KeymanWeb,
require variableStoreSerializer to always be initialized. This impacts
only unit tests in practice. There remains a unit test special case in
the variable store code itself which needs to be removed in the future.

Create a mock VariableStoreTestSerializer class so that unit tests can
run without impacting state or requiring cookies. (We should leverage
this in future tests to verify that variable stores are saved
correctly.)

Establish keyman/test/headless-resources, so that we can include shared
resources such as VariableStoreTestSerializer without creating a
dependency on either DOM or Node.
2026-04-17 15:36:11 +02:00
Eberhard Beilharz
6677c2b198
refactor(web): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-04-17 14:49:10 +02:00
Marc Durdin
2cffc57eb1 chore(web): cleanup variable store interfaces for web-core 2026-04-17 12:59:04 +02:00
Marc Durdin
d6c2b213ee
Merge branch 'epic/web-core' into feat/web/varStoresCleanup 2026-04-17 20:44:06 +10:00
Marc Durdin
7df5b94cc2 refactor(web): simplify VariableStore type
Remove the unnecessary nested set patterns for `VariableStore` and
rename the type to `VariableStores` to match its actual use.
2026-04-17 12:08:58 +02:00
Eberhard Beilharz
115ab18d71
refactor(web): add abstract Keyboard base class
Also rename `JSKeyboardData` → `KeyboardData`.

Test-bot: skip
2026-04-16 22:18:08 +02:00
Eberhard Beilharz
bbad490154
maint(web): cleanup imports
For the files touched in this PR:

- fix the order of the imports according to style guide
- use `node:` prefix for node modules
- add header
2026-03-23 15:43:17 +01:00
Eberhard Beilharz
06f7f22cd0
maint(web): address more code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-03-23 15:43:17 +01:00
Eberhard Beilharz
745fa36d24
chore(web): Merge branch 'epic/web-core' into maint/web/jstests
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-03-20 18:03:47 +01:00
Eberhard Beilharz
1d9b8cc883
maint(web): address code review comments
- inline consts so that we don't have to export them for unit testing
- create `getKeymanRoot` and `getWebTestResourcesPath` helper functions
  to DRY out the code
- run `languageProcessortests.js` without coverage to prevent a failure
  creating the coverage report.
2026-03-20 15:53:41 +01:00
Marc Durdin
70c54b0b40 chore: Merge branch 'epic/web-core' into auto/A19S24-merge-master-into-web-core
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-03-16 04:49:38 +01:00
Marc Durdin
659e85033a
Merge pull request #15665 from keymanapp/maint/developer/test-callbacks-cleanup
maint(developer): make `TestCompilerCallbacks` usage more consistent and simplify
2026-03-06 21:00:39 +07:00
Marc Durdin
645e1cd16f chore(web): remove implicit any type when setting processingConfig.itemIdentifier
Not exactly clear what triggered this? Perhaps related to npm package updates,
but hard to see how.

Test-bot: skip
Build-bot: skip build:web
2026-03-05 21:46:40 +01:00
Marc Durdin
529a49431e maint(developer): make TestCompilerCallbacks usage more consistent and simplify
Simplify usage of `TestCompilerCallbacks` by making it responsible for
the `beforeEach` and `afterEach` incantations itself. There are a couple
of more complex usages of `TestCompilerCallbacks` which have been
excluded from this change on purpose.

Renamed `testCallbacks` to `callbacks` in the one place where it was
different.

Hoist @types/node and @types/mocha because inconsistent versions of
@types/mocha were causing compiler errors with this change.

Also added a cast to `fs.readFileSync` to `Uint8Array` to eliminate
compiler warnings/errors in test files.

Fixes: #15654
Test-bot: skip
2026-03-03 16:44:06 +01:00
Eberhard Beilharz
3c525cc244
chore: Merge branch 'epic/web-core' into auto/A19S23-merge-master-into-web-core 2026-02-27 10:19:18 +01:00
Joshua Horton
5c445d470c change(web): remove temp debug shell-script echo statements 2026-02-18 12:59:17 +07:00