Commit graph

3420 commits

Author SHA1 Message Date
Marc Durdin
33affc660f fix(common): legacy .kpj schema
Fixes #9140.
Fixes #9148.

Keyman Developer 9.0 .kpj files included a lot of additional state
metadata. We need a schema which validates these files, as they are
otherwise valid to load (we'll never save them any more). Rather than
add all the extra metadata to what is otherwise a fairly clean schema,
we'll provide a legacy .schema.json.

In the future, we may be able to merge these schemas, as we move towards
the .kpj 2.0 format which doesn't list files. Ideally, all three formats
(Keyman Developer 9.0 schema, call it legacy, 1.0 schema for Keyman
Developer 10.0+ which has Options and Files listed, 2.0 schema for
capturing just project settings for a folder) will be supported by a
single schema file.
2023-07-03 09:06:03 +07:00
Marc Durdin
d021526e38 fix(common): give friendly error when .kvks is in binary format
Fixes #9124.
2023-06-30 08:43:01 +07:00
Marc Durdin
56da64796f fix(common): specify alignment for COMP_ structs
When we read .kmx files, they have no alignment guarantees, so we need
to tell the compiler to generate unaligned-safe code for accesses to
`COMP_` structure members, because typically we point into the buffer
and read at any offset.

A .kmx file will generally be 2-byte aligned, as there are no structures
or data types with smaller than 2 byte widths. There is no requirement
that this be the case per the .kmx spec, though. So we use a 1 byte
alignment attribute for the compiler, so it will generate safe code when
reading these structs.

Note that we are assuming that `COMP_KEYBOARD` is aligned because it is
always the start of the file, so will be at the start of any buffer
which will automatically be aligned correctly.

We should probably review some of our design decisions and structs for
KMXPlus given this.
2023-06-30 08:29:20 +07:00
Marc Durdin
6027360544 fix(developer): handle empty File Details in package reader
Fixes #9109.
2023-06-28 07:27:42 +07: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
Joshua Horton
2ac8a4503b
Merge branch 'master' into feature-esmodule-web-engine 2023-06-26 09:09:43 +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
8a3a08dcf7 feat(core): update documentation and builder for uset 🙀
- pre-sort the uset items instead of copying the patterns and re-finding
- update docs on the uset subtable

#7377
2023-06-23 10:52:34 -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
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
82256d06ac
Merge pull request #9048 from keymanapp/chore/common/fix-common-web-types-coverage
chore(common): fixup tests for common/web/ci 🗜
2023-06-23 13:24:32 +10:00
Marc Durdin
164823a643
chore: fix comment in common 2023-06-21 14:31:50 +10: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
6da441da04 chore(common): fixup tests for common/web/ci 2023-06-20 15:57:50 +07: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
fa38e30e2f
Merge pull request #9038 from keymanapp/refactor/developer/kmc-kmn-call-into-kmc-kmw
refactor(developer): kmc-kmn now builds .js when needed 🗜
2023-06-20 17:12:08 +10:00
Marc Durdin
608df3bcd8 chore: fix typo 2023-06-20 12:59:33 +07: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
Joshua Horton
89e7393665
Merge pull request #9025 from keymanapp/chore/web/esbuild-config-cleanup
chore(web): esbuild configuration cleanup 🧩
2023-06-19 14:04:11 +07:00
Joshua A. Horton
b497dc3ba2 chore(web): Merge remote-tracking branch 'origin/chore/web/centralize-kmw-tsconfigs' into chore/web/centralize-kmw-tsconfigs 2023-06-19 14:03:45 +07:00
Joshua A. Horton
f2e3effa4c chore(web): Merge branch 'feature-esmodule-web-engine' into chore/web/centralize-kmw-tsconfigs 2023-06-19 14:03:20 +07:00
Joshua Horton
0532405335
Merge pull request #8995 from keymanapp/change/srcmap-cleanup-and-c8-use
change(web): config, sourcemap cleanup + adds some c8 reporting 🧩
2023-06-19 14:01:40 +07:00
Joshua A. Horton
093daea59b chore(web): tweaks per review 2023-06-19 12:18:16 +07:00
Joshua A. Horton
31528786a0 fix(common/models): missed fixing commands in common/predictive-text test script 2023-06-19 08:54:03 +07:00
Marc Durdin
2ca191d290 chore(developer): document displaymap format 2023-06-19 05:48:51 +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
Joshua A. Horton
a92f915e60 chore(web): Merge branch 'chore/web/cleanup-kmw-headless-module-builds' into chore/web/esbuild-config-cleanup 2023-06-16 12:47:20 +07:00
Joshua A. Horton
46c58f5ab2 chore(web): Merge branch 'chore/web/centralize-kmw-tsconfigs' into chore/web/cleanup-kmw-headless-module-builds 2023-06-16 12:46:50 +07:00
Joshua A. Horton
569662237e fix(web): build.sh dependency on the centralized bundling stuff 2023-06-16 11:36:03 +07:00
Joshua A. Horton
eccbd49abb change(web): centralizes /web project bundling configs 2023-06-16 11:35:10 +07:00
Joshua A. Horton
9ae9a5e297 change(common/web): generalizes the entrypoint mapper func 2023-06-16 10:33:03 +07:00
Joshua A. Horton
194139be03 chore(web): paren spacing cleanup 2023-06-15 15:49:38 +07:00
Joshua A. Horton
6e8432383b chore(web): applies bulk of review suggestions 2023-06-15 15:48:53 +07:00
Joshua A. Horton
804efbe1d9 fix(web): fixed mocha test paths for lm-layer tests 2023-06-15 11:00:19 +07:00
Joshua A. Horton
66002a4128 chore(web): relocates tslib-treeshaker def, consolidates it further 2023-06-15 10:56:44 +07:00
Joshua A. Horton
b4b1c5e2ac chore(web): partial centralization of common/web KMW module bundling config 2023-06-15 10:33:29 +07:00
Joshua A. Horton
7dfebbfd4d chore(web): one more comment to cleanup 2023-06-14 15:56:33 +07:00
Marc Durdin
3d56bc667e chore(common): export KvksFileWriter 2023-06-14 15:55:56 +07:00
Joshua A. Horton
b65df8243b chore(web): cleanup of lm-worker & related build scripts, removal of lower-level bundles 2023-06-14 15:51:09 +07:00
Joshua A. Horton
cb2029bf49 chore(web): cleanup for purely-headless KMW main-thread-module build scripts, esbuild configs 2023-06-14 15:37:30 +07:00
Joshua A. Horton
4dde7453f5 chore(web): Merge branch 'change/srcmap-cleanup-and-c8-use' into chore/web/centralize-kmw-tsconfigs 2023-06-14 15:15:05 +07:00
Joshua A. Horton
22ae456e0a fix(common/models): prior commit(s) broke npm run tsc 2023-06-14 15:14:40 +07:00
Joshua A. Horton
626e1855a3 chore(web): Merge branch 'change/srcmap-cleanup-and-c8-use' into chore/web/centralize-kmw-tsconfigs 2023-06-14 14:59:18 +07:00
Joshua A. Horton
75347ebc6f change(web): internal event names -> lowercase convention 2023-06-14 10:30:56 +07:00
Joshua A. Horton
7e5de4e8dd fix(common/models): forgot about setting needed for Node worker use 2023-06-14 10:12:48 +07:00
Joshua A. Horton
3ce99b9c73 chore(web): cleanup re set_keyman_standard_build_path 2023-06-14 10:00:39 +07:00
Joshua A. Horton
0ca8e34424 chore(web): resolves centralization b/t the worker & main kmw tsconfigs 2023-06-14 09:26:27 +07:00