Commit graph

1297 commits

Author SHA1 Message Date
Eberhard Beilharz
485ea55800
chore(web): Merge remote-tracking branch 'origin/epic/web-core' into feat/web/15287_doModifierPress 2026-01-20 11:41:05 +01:00
Eberhard Beilharz
03eba3cf55
Merge pull request #15463 from keymanapp/refactor/web/test-index
refactor(web): use unitTestEndpoint pattern in OSK 🎼

This changes the exports for unit testing to the unitTestEndpoint pattern.

Part-of: #15292
2026-01-20 08:41:40 +01:00
Eberhard Beilharz
55af621654
Merge pull request #15461 from keymanapp/refactor/web/processorAction
refactor(web): rename ruleBehavior variables → processorAction 🎼

The changes in PR #12291 renamed the `RuleBehavior` class to `ProcessorAction`. This change now renames the local variables in `InputProcessor` accordingly.

Follow-up-of: #12291
2026-01-20 08:40:54 +01:00
Eberhard Beilharz
b8d2dc5726
Merge pull request #15462 from keymanapp/refactor/web/exports
refactor(web): remove web-utils exports from keyboard 🎼

Types defined in keyman/common/web-utils were re-exported in keyman/engine/keyboard. This change removes the re-export.

Part-of: #15292
2026-01-20 08:39:58 +01:00
Eberhard Beilharz
63028ab4d6
Merge pull request #15466 from keymanapp/feat/web/isChiralEngineBase
feat(web): implement `KeyboardEngineBase.isChiral` 🎼

Part-of: #13426
2026-01-20 08:39:14 +01:00
Eberhard Beilharz
2e404390c0
Merge pull request #15437 from keymanapp/feat/web/findStores
feat(web): add `findStores` functions 🍪

This change adds a static `findStores` function to `VarStoreSerializer` and `VariableStoreCookieSerializer` as well as to the `VariableStoreSerializer` interface.

Also add unit tests for `VariableStoreCookieSerializer`.

Part-of: #13426
2026-01-19 13:01:03 +01:00
Eberhard Beilharz
4f154574f6
feat(web): implement KeyboardEngineBase.isChiral
Part-of: #13426
Test-bot: skip
2026-01-16 21:06:37 +01:00
Eberhard Beilharz
f8d07549ba
chore(web): update TODO comments
This changes several `TODO-web-core` to `TODO-embed-osk-in-kmx` because
they are related to OSK and can't be implemented/tested without having
the OSK API available.

Also updated some additional comments.

Build-bot: skip
Test-bot: skip
2026-01-16 16:52:05 +01:00
Eberhard Beilharz
aea2e2ab98
refactor(web): use unitTestEndpoint pattern in OSK
This changes the exports for unit testing to the unitTestEndpoint pattern.

Part-of: #15292
Test-bot: skip
2026-01-16 16:37:49 +01:00
Eberhard Beilharz
9930a8cbae
refactor(web): remove web-utils exports from keyboard
Types defined in keyman/common/web-utils were re-exported in
keyman/engine/keyboard. This change removes the re-export.

Part-of: #15292
Test-bot: skip
2026-01-16 16:25:32 +01:00
Eberhard Beilharz
44326731dd
refactor(web): rename ruleBehavior variables → processorAction
The changes in PR #12291 renamed the `RuleBehavior` class to
`ProcessorAction`. This change now renames the local variables in
`InputProcessor` accordingly.

Follow-up-of: #12291
Test-bot: skip
2026-01-16 15:52:33 +01:00
Eberhard Beilharz
a8c68711da
feat(web): add findStores functions
This change adds a static `findStores` function to `VarStoreSerializer`
and `VariableStoreCookieSerializer` as well as to the
`VariableStoreSerializer` interface.

Also add unit tests for `VariableStoreCookieSerializer`.

Part-of: #13426
Test-bot: skip
2026-01-15 12:28:56 +01:00
Eberhard Beilharz
f8546c0e5f
feat(web): address code review comments
Test-bot: skip
2026-01-15 11:57:41 +01:00
Eberhard Beilharz
ac22e0b1c5
feat(web): add CookieSerializer.loadAllMatching function
- rename tests from `cookies.tests.ts` → `cookieSerializer.tests.ts`
- add test for new function

Part-of: #13426
Test-bot: skip
2026-01-14 11:08:23 +01:00
Eberhard Beilharz
26ba3c8510
refactor(web): explicitly specify public/private on CookieSerializer 2026-01-14 11:06:33 +01:00
Eberhard Beilharz
050d18aa94
refactor(web): Rename (Default)Worker to WebWorker and NodeWorker
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
2026-01-12 10:52:05 +01:00
Eberhard Beilharz
3833f19c44
refactor(web): remove some aliases
This is a follow-up of review comments in #15401.
- rename `DefaultWorker` → `Worker`
- rename `BUTTON_CLASSES` → `buttonClassNames`
Both exports now also match the filename.

Follow-up-of: #15401
Test-bot: skip
2026-01-09 10:55:01 +01:00
Eberhard Beilharz
1a8c909274
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-01-09 09:36:00 +01:00
Eberhard Beilharz
f9f804c190
feat(web): remove 'export default' to eliminate more aliases
Fixes: #15292
Test-bot: skip
2026-01-07 15:36:33 +01:00
Eberhard Beilharz
79cc8e7258
test(web): address code review comments 2026-01-06 18:42:58 +01:00
Eberhard Beilharz
4ba1fcbfb3
Merge pull request #15376 from keymanapp/refactor/web/keyboard-storage
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
2025-12-22 14:53:28 +01:00
Eberhard Beilharz
f276c672c0
Merge pull request #15344 from keymanapp/refactor/web/constants
chore(web): remove default from hardware keyboard 

Also some other refactorings like use constants instead of hard coded values.
2025-12-22 14:33:53 +01:00
Eberhard Beilharz
5b38557227
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
Test-bot: skip
2025-12-19 18:43:02 +01:00
Eberhard Beilharz
72d12622ff
refactor(web): address code review comment 2025-12-19 11:59:32 +01:00
Eberhard Beilharz
1895a944a2
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-12-18 12:48:45 +01:00
Eberhard Beilharz
e4e76caea7
refactor(web): address code review comment
Build-bot: skip
Test-bot: skip
2025-12-17 15:55:52 +01:00
Eberhard Beilharz
4d644cd00e
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-12-15 15:44:42 +01:00
Eberhard Beilharz
1b04772bb9
refactor(web): address code review comments 2025-12-12 11:31:55 +01:00
Eberhard Beilharz
68de61ad9c
feat(web): implement doModifierPress
Fixes: #15287
Test-bot: skip
2025-12-11 19:29:23 +01:00
Eberhard Beilharz
dbb05e3fcc
refactor(web): use constants instead of hard coded values
And some other refactorings.

Test-bot: skip
2025-12-11 19:27:03 +01:00
Eberhard Beilharz
79ad53f9cf
refactor(web): document and cleanup parameters of Keyboard.notify()
Document what values are possible for the `eventCode` parameter and what
these values mean. Also change `data` parameter to a `boolean`.

Test-bot: skip
2025-12-09 20:14:14 +01:00
Eberhard Beilharz
654f1b2103
chore(web): Merge remote-tracking branch 'origin/epic/web-core' into feat/web/15283_keydown 2025-12-09 20:06:48 +01:00
Eberhard Beilharz
b7369d79d7
Merge pull request #15251 from keymanapp/test/web/baseline
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.
2025-12-09 18:13:01 +01:00
Eberhard Beilharz
d594afb317
Merge pull request #15310 from keymanapp/maint/web/cleanup
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
2025-12-08 08:43:25 +01:00
Eberhard Beilharz
191964260f
feat(web): properly set keyDown flag
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
2025-12-05 19:18:15 +01:00
Eberhard Beilharz
8784e0aacf
test(web): add baseline tests 2025-12-05 19:14:09 +01:00
Eberhard Beilharz
490add936f
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
Test-bot: skip
2025-12-05 15:01:18 +01:00
Eberhard Beilharz
133f46330d
chore(web): add issue# for some todos
Also use const instead of let in `renderer_core.ts`.

Test-bot: skip
2025-12-04 15:57:08 +01:00
Eberhard Beilharz
ec7f1b6b35
Merge pull request #15234 from keymanapp/fix/web/context
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.
2025-11-28 18:36:25 +01:00
Eberhard Beilharz
bf652fb18c
fix(web): another simplification
Plus another unit test.

Test-bot: skip
2025-11-28 12:03:11 +01:00
Eberhard Beilharz
e442fc36d6
fix(web): simplify function
Addresses code review comments.

Co-authored-by: Marc Durdin <marc@durdin.net>
Test-bot: skip
2025-11-27 17:46:03 +01:00
Eberhard Beilharz
43ec5c28fa
Merge pull request #15220 from keymanapp/refactor/web/corekbdproctests
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
2025-11-27 13:09:41 +01:00
Eberhard Beilharz
a5c243b7e2
fix(web): address code review comments 2025-11-26 18:31:33 +01:00
Eberhard Beilharz
8875a904a3
fix(web): add text after last deadkey to context
Test-bot: skip
2025-11-25 19:20:40 +01:00
Eberhard Beilharz
cc12161d84
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
Test-bot: skip
2025-11-24 17:27:44 +01:00
Eberhard Beilharz
0cd87ba898
docs(web): add comment why output() is on keyboard interface
Follow-up-of: #15190
Build-bot: skip
Test-bot: skip
2025-11-24 16:16:42 +01:00
Eberhard Beilharz
1e53d7413b
Merge pull request #15210 from keymanapp/refactor/web/testexports 2025-11-24 12:17:46 +01:00
Eberhard Beilharz
62a566cc6b
Merge pull request #15190 from keymanapp/refactor/web/gettingTextStore
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
2025-11-21 12:14:44 +01:00
Eberhard Beilharz
f8404a82e4
Merge pull request #15211 from keymanapp/test/web/nestedInstanceOf
test(web): add unit tests for `nestedInstanceOf`

Also rename file `utils.ts` to `nestedInstanceOf.ts`.
2025-11-21 12:11:25 +01:00
Eberhard Beilharz
a35bd2b6f6
Merge pull request #15189 from keymanapp/refactor/web/mockvars
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
2025-11-21 12:09:24 +01:00