Commit graph

1904 commits

Author SHA1 Message Date
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
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
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
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
b29c78a83b
chore: remove redundant check 2023-06-13 09:39:45 +10:00
Marc Durdin
d684e58baa
Merge branch 'feature-kmc-kmw' into chore/common/web/file-types-module-first-steps 2023-06-13 08:37:55 +10:00
Marc Durdin
da29d82e01 chore(developer): complete error checking in kmc-analyze 2023-06-12 13:02:04 +07:00
Marc Durdin
b050d018f2 chore(developer): prevent recursion when analyzing projects 2023-06-12 12:44:09 +07:00
Marc Durdin
f6900d9e85 chore(developer): merge kmc-kmw messages with kmc-kmn messages
These two modules had duplicated messages from kmcmplib. Rewrites the
kmc-kmw messages module to inherit from kmc-kmn and define message
strings where necessary.

While this refactor is not ideal, because it diverges slightly from the
patterns of other message modules, and has a little bit of spaghetti
import cross-modules, I think it is still a step in the right direction
for consolidated message reporting.
2023-06-12 10:29:35 +07:00
Marc Durdin
769a08f027 chore(developer): remove old comment 2023-06-12 09:49:12 +07:00
Marc Durdin
f04900a9e9 chore(developer): fixup .kpj reference 2023-06-12 09:36:36 +07:00
Marc Durdin
7ad2df06d9 chore: Merge branch 'feature-kmc-kmw' into chore/merge-master-into-feature-kmc-kmw 2023-06-12 09:31:18 +07:00
Marc Durdin
66f2489573
Merge pull request #8982 from keymanapp/chore/developer/refactor-compiler-options
chore(developer): refactor CompilerOptions 🗜
2023-06-12 12:20:39 +10:00
Marc Durdin
0b5b674d67
Merge pull request #8968 from keymanapp/chore/developer/enable-eslint-kmc-kmw
chore(developer): enable eslint for kmc-kmw 🗜
2023-06-12 12:20:31 +10:00
Marc Durdin
a25f8a723f
Merge pull request #8962 from keymanapp/refactor/developer/kmcmplib-error-code-patterns
refactor(developer): import kmcmplib errors into kmc-kmn
2023-06-12 12:20:10 +10:00
Marc Durdin
8a4c005d40 chore(common): define constants for file types
Now that we have the file type detection in place, we can replace
existing references to the file extensions, where possible, with the
constant declarations. While we could rely on TypeScript's typing to use
string-based values, this helps us to avoid using file extensions
directly in string transforms, regex, etc, and use the `KeymanFileTypes`
alias instead.

Note that only references in common/web, and kmc-* projects have been
touched. References in other Developer projects have not been touched,
as some of those are not yet ESM, so that needs to be addressed first.
2023-06-12 09:17:09 +07:00
Marc Durdin
01b575128f
chore: address review comments 2023-06-12 11:55:03 +10:00
Marc Durdin
d2029c40cd chore(common): Create file-types.ts module
This module is used for identification of Keyman source and binary file
formats by file extension. It is not yet appropriate to use for
constants; this will come in a future commit.
2023-06-12 08:20:02 +07:00
Marc Durdin
8bfd4c0bae chore(developer): refactor LdmlCompilerOptions
LdmlCompilerOptions is now based on the shared CompilerOptions. Also
fixes command line parameter inheritance for sub-commands.
2023-06-10 14:27:40 +07:00
Marc Durdin
459f42b273 chore(developer): refactor CompilerOptions
Part 1 of the `CompilerOptions` reorg. kmc now uses `CompilerOptions`
throughout, and `CompilerBaseOptions` maps to the set of options
available to all activities.
2023-06-10 14:27:39 +07:00
Marc Durdin
db06dfd810 chore(developer): Merge branch 'feature-kmc-kmw' into feat/developer/kmc-analyze 2023-06-09 14:00:14 +07:00
Marc Durdin
16c40d0d99
Merge pull request #8951 from keymanapp/feat/KmxFileReader-error-handling-and-more
chore(common): cleanup error handling for KmxFileReader and CompilerOptions as shared type
2023-06-09 16:57:54 +10:00
Marc Durdin
fc043c960e chore: tweak CompilerLogLevel 2023-06-09 13:02:17 +07:00
Marc Durdin
3b5c38aa80 feat(developer): use new memory-based kmx compiler in analyze
* Also adds info messages for scanning.
2023-06-09 12:38:20 +07:00
Marc Durdin
fde428fb70 chore(developer): add logLevel to kmc
Tidies up silent vs quiet vs verbose by adding logLevel as an option.

* Notes that we need to consolidate all the various CompilerOptions
  interfaces before they get too much further out of hand.
* Cleans up a couple of other minor TODO items.
2023-06-09 10:23:06 +07:00
Marc Durdin
1670b3099f chore(developer): cleanup kmc-analyze build.sh 2023-06-09 10:20:54 +07:00
Steven R. Loomis
2d367756a8
Merge pull request #8967 from keymanapp/fix/developer-7377-codecleanup-transform-epic-ldml 2023-06-08 21:42:34 -05:00
Marc Durdin
3476977d16 chore(developer): enable eslint for kmc-kmw
Relates to #8959.

Also makes build.sh responsible for build rather than package.json.
2023-06-09 09:06:37 +07:00
Marc Durdin
38fde28165
Merge pull request #8695 from keymanapp/feat/developer-7377-transform-format-epic-ldml3
spec(core): spec/impl for transform and vars 🙀
2023-06-09 11:44:40 +10:00
Marc Durdin
b06981fff8 chore(developer): fixup kmc-analyze call in kmc 2023-06-09 06:51:10 +07:00
Steven R. Loomis
4febfcb451 feat(developer): improve tran/bksp tests, other improvements 🙀
- delete dead code
- share common ID regex for vars
- move bksp/finl/order tests into tran

For: #7377
2023-06-08 18:39:44 -05:00
Steven R. Loomis
5cf025b62e
Merge pull request #8942 from keymanapp/feat/core-7377-transform-epic-ldml
feat(core): fixups to C++ side 🙀
2023-06-08 18:17:06 -05:00
Steven R. Loomis
4562b90502
Merge branch 'master' into feat/developer-7377-transform-format-epic-ldml3 2023-06-08 18:12:12 -05:00
Steven R. Loomis
26053a5ba3
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-06-08 18:10:11 -05:00
Marc Durdin
915311c5fc chore(developer): fixup gosh ref 2023-06-09 06:03:28 +07:00
Marc Durdin
427c326682 chore(developer): cleanup kmc-analyze build and test 2023-06-09 05:20:25 +07:00
Steven R. Loomis
9f9589b095 feat(developer): fix e2e test 🙀
- re-enable e2e
- fix basic.txt to match

tools (hextobin):
- support diff(block1,block2,divisor)
- document the comma rule

For: #7377
2023-06-08 13:29:15 -05:00