Commit graph

3368 commits

Author SHA1 Message Date
Marc Durdin
ed9975ee81 fix(developer): handle missing font spec in touch layout file
Fixes #9101.
2023-06-28 06:11:37 +07:00
Marc Durdin
afa081a170 fix(developer): content files can have mixed case in packages
Fixes #9098.
2023-06-28 06:09:04 +07:00
Marc Durdin
0f42e3c92c fix(developer): key type checks were invalid
Fixes #9097.
2023-06-28 06:07:32 +07:00
Steven R. Loomis
fbf6005bc4
Merge pull request #9084 from keymanapp/feat/developer-9050-utf32-epic-ldml
feat(developer,common,core): ldml UTF-32 literals in binary 🙀
2023-06-26 20:33:27 -05:00
Marc Durdin
d914b6918d chore: Merge branch 'feature-kmc-kmw' into chore/merge-master-into-feature-kmc-kmw-a17s16-start 2023-06-26 14:33:20 +07:00
Marc Durdin
69f679693a
Merge pull request #9088 from keymanapp/chore/developer/kmc-kmn-kmw-compiler-cleanup
chore(developer): cleanup for kmw-compiler.ts 🗜
2023-06-26 17:28:15 +10:00
Marc Durdin
5182b49b0f
Merge pull request #9087 from keymanapp/chore/developer/kmc-kmn-kmwcompiler-handle-layout-file-errors
chore(developer): handle layout file errors in kmw-compiler
2023-06-26 17:28:07 +10:00
Marc Durdin
fbfd8c5b2a
Merge pull request #9086 from keymanapp/chore/developer/kmc-kmw-cleanup-javascript-strings
chore(developer): cleanup javascript-strings.ts 🗜
2023-06-26 17:28:00 +10:00
Marc Durdin
313ad95ecd
Merge pull request #9076 from keymanapp/fix/developer/kmc-kmw-readonly-groups
fix(developer): support readonly groups in kmc-kmn/kmw-compiler 🗜
2023-06-26 17:27:51 +10:00
Marc Durdin
c3bb426ff0
Merge pull request #9075 from keymanapp/fix/developer/kmc-kmw-options-stores
fix(developer): support option stores in kmc-kmn/kmw 🗜
2023-06-26 17:27:41 +10:00
Marc Durdin
90f5ab6884 chore(developer): fix tests for layout validity
The tests for layout validity in #9087 were incomplete; first, they
didn't fail the build if a key had invalid identifier, and second, there
were some constants missing from the KeyIdType test (imperfect
translation from the Delphi code in this case).
2023-06-26 11:48:03 +07:00
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