Commit graph

130 commits

Author SHA1 Message Date
Marc Durdin
2e51955055 chore(web): Merge branch 'refactor/web/merge-engine-modules' into refactor/web/downgrade-web-utils-from-package-to-module 2025-11-06 14:07:19 +01:00
Marc Durdin
d94292959c chore(web): Merge branch 'epic/web-core' into refactor/web/merge-engine-modules 2025-11-06 10:54:25 +01:00
Marc Durdin
41c9cef797 refactor(web): change @keymanapp/web-utils to keyman/common/web-utils
Removes the need for package.json references for @keymanapp/web-utils,
and relies on bundler to include keyman/common/web-utils when building.
2025-11-06 07:24:36 +01:00
Marc Durdin
9d2c23e0d3 refactor(web): merge engine modules
In order to simplify and make the build significantly faster, as well as
reduce duplication of configuration files, we have merged most of the
engine modules into a single module, engine:
  * engine/attachment
  * engine/core-processor
  * engine/dom-utils
  * engine/element-wrappers
  * engine/events
  * engine/interfaces
  * engine/js-processor
  * engine/keyboard
  * engine/keyboard-storage
  * engine/main
  * engine/osk

A few test-specific files have been moved from engine to test, such as
nodeCloudRequester.ts and nodeKeyboardLoader.ts.
2025-11-04 19:13:17 +01:00
Eberhard Beilharz
96275fff2c
refactor(web): cleanup 2025-11-04 17:14:38 +01:00
Eberhard Beilharz
07aa9e7af8
refactor(web): rename eventOutputTarget and outputTargetForElement
- Rename `eventOutputTarget` → `textStoreForEvent`
- Rename `outputTargetForElement` → `textStoreForElement`
2025-11-04 17:14:38 +01:00
Eberhard Beilharz
0fc7416b68
refactor(web): rename MockSyntheticTextStore 2025-11-04 17:14:37 +01:00
Eberhard Beilharz
c9fa02f21c
refactor(web): rename OutputTargetBaseTextStore 2025-11-04 16:58:08 +01:00
Eberhard Beilharz
dce103bed2
refactor(web): rename OutputTargetInterfaceOutputTargetBase 2025-11-04 16:57:33 +01:00
Eberhard Beilharz
71ed528fc8
refactor(web): move files from js-processor to keyboard
This change moves
- deadkeys.ts
- mock.ts
- outputTargetBase.ts
- stringDivergence.ts

OutputTarget is the same regardless of whether it's a JS or KMX keyboard.
2025-11-04 16:57:32 +01:00
Marc Durdin
f7bc0e13f7 chore(web): update build to use new builder function names 2025-08-28 15:37:36 +02:00
Marc Durdin
8da5cdd059 chore: Merge remote-tracking branch 'origin/epic/web-core' into chore/merge-master-into-web-core 2025-08-28 10:42:57 +02:00
Marc Durdin
3c3ad4a088 maint(common): move github.inc.sh to ci/
Relates-to: #14453
2025-08-05 10:51:19 +10:00
Marc Durdin
2726050601 maint(common): rename and move node-related script functions into node.inc.sh
Consolidates the node-related script functions into node.inc.sh, as part
of cleaning up the build scripts and making them easier to maintain into
the future.

Fixes: #14447
2025-08-02 13:34:29 +10:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Eberhard Beilharz
cfacbb6cc5
refactor(web): rename OutputTarget interface → OutputTargetInterface 2025-06-05 13:22:32 +02:00
Marc Durdin
64d9128446 chore: Merge branch 'chore/merge-master-into-web-core' 2025-05-15 17:42:55 +02:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Joshua Horton
1438704ee0
Merge pull request #13819 from keymanapp/maint/web/use-builder_is_ci_build
chore(web): replace --ci flag with builder_is_ci_build
2025-05-06 08:16:37 +07:00
Joshua Horton
cb5e3035a7 chore(web): replace --ci flag with builder_is_ci_build
Fixes: #12640
2025-05-02 09:39:39 +07:00
Joshua Horton
843221c466 chore(web): improve clean actions
A few cases weren't properly handled, while a few others simply weren't called by the top-level script.  This PR seeks to make the top-level clean action able to fully clean all built components, perhaps save for sample and test pages.

Test-bot: skip
2025-04-30 12:18:59 +07:00
Joshua Horton
d6579495f8 change(web): address recorder-tool linter errors 2025-04-29 11:54:44 +07:00
Marc Durdin
ffec6a21f3 chore: Merge remote-tracking branch 'origin/epic/web-core' into chore/merge-dev-refactors-into-web-core 2025-04-03 12:19:28 +07:00
Marc Durdin
cafa503124 chore: use explicit node: prefix on more module imports 2025-04-03 08:10:50 +07:00
Eberhard Beilharz
3b2157cb83
refactor(web): cleanup OutputTarget class names
- rename `js-processor`'s `OutputTarget` → `OutputTargetBase`
- rename `element-wrappers`' `OutputTarget` → `OutputTargetElementWrapper`
2025-03-03 18:02:47 +01:00
Eberhard Beilharz
08b261c0d3
feat(web): add Keyboard and KMXKeyboard classes
The `Keyboard` class can be either a JS or KMX keyboard. Also make use
of the `Keyboard` class where it makes sense and add TODOs in the places
that still need to be implemented for KMX keyboard support.
2025-01-14 16:43:20 +01:00
Eberhard Beilharz
bd724a574e
refactor(web): rename KeyboardProcessor class to JSKeyboardProcessor
Also rename file `keyboardProcessor.ts` to `jsKeyboardProcessor.ts`.
2025-01-14 15:35:30 +01:00
Eberhard Beilharz
62cd0d6509
refactor(web): rename KeyboardInterface class to JSKeyboardInterface
Also rename file from `kbdInterface.ts` to `jsKeyboardInterface.ts`.
2025-01-14 15:35:29 +01:00
Eberhard Beilharz
c05cf0eff9
feat(web): re-implement timeout error test
The previous approach with overriding `onload` no longer works if we use
indirect eval. However, since we now need to use a server anyways instead
of directly loading a file (because of Core), we can add a timeout to
the test server and implement this test in a cleaner way.
2024-10-01 15:33:55 +02:00
Eberhard Beilharz
387a697990
chore(web): Merge branch 'epic/web-core' into feat/web/readkbd 2024-09-27 17:35:29 +02:00
Eberhard Beilharz
de717cce58
feat(web): address code review comments 2024-09-26 19:47:48 +02:00
Eberhard Beilharz
94b06b7ed7
feat(web): improve errors and tests
Addresses code review comments.
2024-09-16 17:34:03 +02:00
Marc Durdin
9ebd1a9b0a
Merge branch 'epic/web-core' into chore/merge-master-into-web-core 2024-09-13 08:09:24 +02:00
Eberhard Beilharz
f52a1209c8
refactor(web): merge device-detect with web/src/engine/main
This change moves `web/src/engine/device-detect/` →
`web/src/engine/main/` and renames the `Device` class to `DeviceDetector`.

Fixes: #12388
2024-09-11 16:48:15 +02:00
Eberhard Beilharz
d4a049f614
refactor(web): move to web/src/tools/es-bundling
Addresses code review comments.
2024-09-11 09:44:58 +02:00
Eberhard Beilharz
a6d2d02e61
refactor(web): move common/web/utils to web/src/engine/common/web-utils/
Fixes:#12025
2024-09-10 18:12:46 +02:00
Eberhard Beilharz
c3e587193e
refactor(web): move model/types to web/types
Part-of: #12133
2024-09-09 19:59:01 +02:00
Eberhard Beilharz
0abc250af3
feat(web): POC of Core WASM integration into Keyman Web
- add temporary function to Core for this POC
- add new CoreProcessor to access Keyman Core WASM
- add unit tests for new core processor
- add code to KeymanEngine and InputProcessor to load the new CoreProcessor
- add web server to manual tests and new action `start` to build script

This change requires the manual tests to be loaded from a web server
instead of loaded as file, because otherwise the wasm code won't be
loaded.

Currently we always load CoreProcessor. This should be improved in a future
change to only load when it is actually needed.

Part-of: #11293
2024-08-20 22:45:39 +02:00
Eberhard Beilharz
78857d96c9
refactor(web): move lm-message-typespredictive-text/types
Moves `common/web/lm-message-types/` →
`web/src/engine/predictive-text/types/`

Fixes: #12147
2024-08-16 08:31:21 +02:00
Eberhard Beilharz
89abdbd64c
refactor(web): move some files around
- move `outputTarget.ts` → `js-processor`
- move `deadkeys.ts` → `js-processor`
- move `stringDivergence.ts` → `js-processor`
- split `Mock` into `mock.ts`
- create `keyboard/outputTarget.interface.ts`
2024-08-14 19:06:32 +02:00
Eberhard Beilharz
46ecfd4466
refactor(web): move remaining parts of keyboard-processorkeyboard
move parts of `common/web/keyboard-processor/` →
`web/src/engine/keyboard/`.

Fixes: #12110
2024-08-12 19:40:15 +02:00
Eberhard Beilharz
c09c895333
refactor(web): move parts of keyboard-processorjs-processor
Move parts of `common/web/keyboard-processor/` →
`web/src/engine/js-processor/`.

Note this temporarily disable tests for keyboard-processor which depend on
js-processor, until #12110 is fixed.

Fixes: #12067
2024-08-08 18:25:03 +02:00
Eberhard Beilharz
faacf9de8a
refactor(web): Move common/web/recorderweb/src/tools/testing/recorder-core
Fixes: #12091
2024-08-08 16:34:01 +02:00
Eberhard Beilharz
24159d680b
chore(web): move common/web/input-processor/web/src/engine/main/
Also:
- move `modelSpec.ts` and `PredictionContext.ts` →
  `web/src/engine/interfaces`
- move `correction.ts` and `correctionLayout.ts` to `web/src/engine/osk/`

Relates-to: #12035
Fixes: #12054
2024-08-01 20:13:21 +02:00
Joshua A. Horton
62fd5f6444 chore(web): Merge branch 'change/web/keyboard-preprocess-optimization' into feat/web/osk-layer-deferral 2024-06-19 15:31:02 +07:00
Joshua Horton
ce49f12af9
Merge pull request #10432 from keymanapp/feat/web/package-kbd-renderer
feat(web): add bulk_render variant that loads and renders keyboards from local KMP
2024-06-12 12:56:40 +07:00
Marc Durdin
3f6ae0ade4 chore(web): re-enable allowJs for sourcemap-root 2024-06-06 13:51:58 +07:00
Joshua A. Horton
66955cd171 chore(web): Merge remote-tracking branch 'origin/feat/web/package-kbd-renderer' into feat/web/package-kbd-renderer 2024-06-06 08:51:45 +07:00
Joshua A. Horton
cce2f9a867 chore(web): Merge branch 'master' into feat/web/package-kbd-renderer 2024-06-06 08:51:08 +07:00