Commit graph

4256 commits

Author SHA1 Message Date
Joshua Horton
2ac8a4503b
Merge branch 'master' into feature-esmodule-web-engine 2023-06-26 09:09:43 +07:00
Marc Durdin
b5a1e13d50 chore(developer): add store.line metadata and cleanup 2023-06-26 08:59:56 +07:00
Marc Durdin
7dbf97fa00 chore(developer): implement HasSupplementaryPlaneChars and FCallFunctions in kmw-compiler 2023-06-26 08:42:15 +07:00
Marc Durdin
d9b37d85d3 chore(developer): rename write-compiled-keyboard.ts to kmw-compiler.ts 2023-06-26 08:28:54 +07:00
Marc Durdin
7ccef2e5c6 chore(developer): handle layout file errors in kmw-compiler
Also removes leftover commented code, and changes an enum to string enum
type in order to get constant names for free for an error message.

Error_TouchLayoutIdentifierRequires15 was split into its own error
message because it was overloaded with CERR_TouchLayoutInvalidIdentifier
previously but had a different message.
2023-06-26 07:01:24 +07:00
Marc Durdin
d5331537cd chore(developer): cleanup javascript-strings.ts
Removes old commented code and fixes surrogate pair check.
2023-06-26 06:25:45 +07:00
dependabot[bot]
7d08b08fb2
chore(deps): bump semver from 7.3.8 to 7.5.2
Bumps [semver](https://github.com/npm/node-semver) from 7.3.8 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.8...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-24 12:37:06 +00:00
Steven R. Loomis
5cd3447bfd feat(developer): last fix for UTF-32 single chars 🙀
- elem

Fixes: #9050
2023-06-23 17:30:48 -05:00
Steven R. Loomis
79526e452d feat(developer): test fix for UTF-32 single chars 🙀
- last but not least, basic.txt

For: #9050
2023-06-23 17:10:51 -05:00
Steven R. Loomis
de90644d7a feat(core,common,developer): support UTF-32 single chars 🙀
- C++ side now
- updated tests
- refactored escaping code and squashed bugs
- still todo: basic.xml

For: #9050
2023-06-23 16:55:05 -05:00
Steven R. Loomis
8304de4ad9 feat(common): support UTF-32 single chars 🙀
- common and developer side
- needs C++ update and basic.xml

For: #9050
2023-06-23 14:11:26 -05:00
Marc Durdin
d6721f68ba chore: Merge branch 'feature-kmc-kmw' into chore/merge-master-into-feature-kmc-kmw 2023-06-23 15:44:06 +07:00
Marc Durdin
da51f545e1 fix(developer): support readonly groups in kmc-kmn/kmw-compiler
Adds support for readonly groups and corresponding unit test. Again
required more metadata from kmcmplib; this metadata is now fairly
straightforward to patch in without side-effects, which is encouraging.
2023-06-23 15:26:21 +07:00
Marc Durdin
dee046e647 chore(developer): tweak comments 2023-06-23 14:29:14 +07:00
Marc Durdin
8432b06547 fix(developer): support option stores in kmc-kmn/kmw
Adds support for option stores to kmc-kmn/kmw-compiler. This required
adding the relevant store metadata into the output from kmcmplib, and
so I also tidied up the corresponding WASM interfaces slightly more in
the process.

Added unit test for the options store.

While testing this, ran into a second bug with the way I ported a
constant from Delphi to Typescript in constants.ts, so fixed that and
added a corresponding unit test. Small steps, but good ones.
2023-06-23 14:21:30 +07:00
Marc Durdin
c67c21d489
Merge branch 'feature-kmc-kmw' into chore/developer/cleanup-wasm-data-passing 2023-06-23 13:25:41 +10:00
Marc Durdin
3730f2db53
Merge pull request #9058 from keymanapp/chore/developer/kmw-support-embed-files
chore(developer): support embedded files in kmw compiler 🗜
2023-06-23 13:25:23 +10:00
Marc Durdin
fd640288fb
Merge pull request #9057 from keymanapp/chore/developer/wasm-load-only-once
chore(developer): load wasm module only once per process 🗜
2023-06-23 13:25:03 +10:00
Marc Durdin
2222e875c9
Merge pull request #9056 from keymanapp/chore/developer/cleanup-display-underlying-flag
chore(developer): cleanup displayUnderlying flag in kmw compiler 🗜
2023-06-23 13:24:52 +10:00
Marc Durdin
6928188d13
Merge pull request #9054 from keymanapp/chore/developer/cleanup-font-style-in-kvk
chore(developer): remove font style/color from kvk 🗜
2023-06-23 13:24:41 +10:00
Marc Durdin
23ef2da1be
Merge pull request #9046 from keymanapp/chore/developer/kmc-web-compiler-cleanup
refactor(developer): move constants and globals for kmw compiler 🗜
2023-06-23 13:24:26 +10:00
Marc Durdin
9216a69636
chore: Update developer/src/kmc-kmn/src/compiler/compiler.ts
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2023-06-23 13:23:29 +10:00
Marc Durdin
557c400d57
chore: Apply suggestions from code review
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2023-06-23 13:21:23 +10:00
Marc Durdin
8cd28bdc97 chore(developer): rename data to extra 2023-06-22 07:47:39 +07:00
Marc Durdin
24910fb25a chore(developer): cleanup data passing from wasm
Reorganizes the data structures passed out of kmcmplib via WASM to make
it easier to work with the extra metadata and reduce the number of
places we have to touch when we add extra metadata fields.

Preparation for supporting the metadata that the kmw compiler requires.
2023-06-21 15:33:09 +07:00
Marc Durdin
165dcbe4aa chore(developer): support embedded files in kmw compiler
Adds support for `&kmw_embedcss`, `&kmw_embedjs`, `&kmw_helpfile`.
2023-06-21 12:29:51 +07:00
Marc Durdin
2c2e6feaa3 chore(developer): load wasm module only once per process
Improves performance, and also resolves warning from node:

(node:21032) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added to [process]. Use emitter.setMaxListeners() to
increase limit
2023-06-21 11:52:57 +07:00
Marc Durdin
a67abadb2f chore(developer): cleanup displayUnderlying flag in kmw compiler 2023-06-21 11:46:24 +07:00
Marc Durdin
3f507f974a chore(developer): remove font style/color from kvk
While .kvk includes a font color field, it is essentially unused. There
was also some sort of support provided for font style in the KeymanWeb
keyboard compiler, but this was never streamed into .kvk or .kvks files,
so was always a no-op.

Thus, this PR removes any semblance of support for font style and color
from the .kvk and .kvks readers and writers. When we write the font
color field which is present in .kvk, we always use the default
TColor.clWindowText which is what the legacy Delphi-based writer would
always have written.

Also sorted out the default font size and name in the .kvk transform
from .kvks, and in so doing cleaned up the basic.kvk and basic.js in
LDML keyboard compiler to match what we are doing in the .kmn compiler.
2023-06-21 10:53:45 +07:00
Steven R. Loomis
248d423535 feat(common,developer,core): add uset section 🙀
- not emitted yet, basic scaffolding
- expanded type field in elem:  str/char/set

For: #7377
2023-06-20 18:23:54 -05:00
Marc Durdin
78d56822c9
Merge pull request #9043 from keymanapp/chore/developer/use-schema-to-validate-display-map
chore(developer): validate displaymap schema 🗜
2023-06-20 18:16:10 +10:00
Marc Durdin
1890176c11 chore(developer): remove extraneous comment 2023-06-20 15:09:14 +07:00
Marc Durdin
749e42e0a0 chore(developer): move additional consts and globals 2023-06-20 15:08:33 +07:00
Marc Durdin
dae94fd4d5 chore(developer): move constants for kmw-compiler 2023-06-20 14:59:11 +07:00
Marc Durdin
57320435cc
Update developer/src/kmc-kmn/test/kmw/test-compiler-manual.ts 2023-06-20 17:11:47 +10:00
Marc Durdin
c68403fabf chore(developer): validate displaymap schema 2023-06-20 12:57:57 +07:00
Marc Durdin
0bd2ca4821 refactor(developer): kmc-kmw becomes component of kmc-kmn
Moves kmc-kmw to being a sub-component of kmc-kmn, as it can never be
independently instantiated anyway. Reorganized tests accordingly.

Note that c8 is currently disabled for kmw-compiler, until we add unit
tests for it.
2023-06-20 11:52:23 +07:00
Marc Durdin
cf91dd378b chore(developer): remove extraneous comment 2023-06-19 15:32:34 +07:00
Marc Durdin
6462b5fc63 refactor(developer): kmc-kmn now builds .js when needed
kmc-kmn calls into kmc-kmw to build .js when it is needed, rather than
kmc-kmw depending on kmc-kmn. This means examining the `&targets` system store
to determine which files need to be generated.

This also implements the `&displayMap` rewrite for both .kvks and
.keyman-touch-layout as part of the KMW compiler.

I suspect that the next step is to place kmc-kmw into a subfolder of
kmc-kmn, given they are part of the same process, and there is no
practical way to separate out the .js generation from the .kmx
generation.
2023-06-19 15:25:09 +07:00
Marc Durdin
adfa032e6f feat(developer): add &displayMap system store
The &displayMap system store adds support for a mapping file that remaps
the On Screen Keyboard files -- .kvks and .keyman-touch-layout, at
compile time, to new ranges. This is specifically intended to resolve a
limitation of unattached marks and diacritics which display
inconsistently across platforms; this is described in more detail in
issue #9031.
2023-06-17 16:21:26 +07:00
Marc Durdin
e9391f57ff chore(developer): refactor osk rewriter
Moves common remapping code for the OSK rewriter into common/web/types
so that it can be consumed by the kmn and kmw compilers soon. Also
cleans up the command line instantiation of the analyze tools, although
the rewrite tool is less likely to be used once we have the compiler
integration in place.
2023-06-17 15:03:02 +07:00
Marc Durdin
ce90742eb9 feat(developer): support to rewrite .kvks and .keyman-touch-layout with PUA 2023-06-14 16:01:19 +07:00
Marc Durdin
df4ec7d94c feat(developer): analyze osk char use continued
Refactoring, additional options for analyze, moving project scanning
into kmc rather than kmc-analyze.
2023-06-14 14:06:45 +07:00
Joshua A. Horton
f35ba0973e chore(developer): kmc-model no longer needs to bundle a .cjs version for input-processor 2023-06-14 10:15:56 +07:00
Marc Durdin
fac3cb02d0 chore(developer): fixup merge bump 2023-06-13 20:42:10 +07:00
Marc Durdin
d19f9027b7
Merge pull request #8994 from keymanapp/chore/developer/complete-error-checking-in-kmc-analyze
chore(developer): complete error checking in kmc-analyze 🗜
2023-06-13 23:10:46 +10:00
Marc Durdin
d2bf05c94a
Merge pull request #8991 from keymanapp/chore/developer/prevent-project-recursion-in-analyze
chore(developer): prevent recursion when analyzing projects 🗜
2023-06-13 23:10:11 +10:00
Marc Durdin
f7b524b8db
Merge pull request #8984 from keymanapp/chore/common/web/file-types-module-first-steps
feat(common): add file-types.ts module 🗜
2023-06-13 12:56:46 +10:00
Marc Durdin
3f6f11e1da
Merge pull request #8999 from keymanapp/fix/developer/8998-message-namespace-creep
fix(developer): keep kmc-kmn messages within namespace
2023-06-13 12:53:31 +10:00
Marc Durdin
b29c78a83b
chore: remove redundant check 2023-06-13 09:39:45 +10:00