Commit graph

3472 commits

Author SHA1 Message Date
Marc Durdin
8704ecf2ee
Merge pull request #15788 from keymanapp/change/developer/embed-osk/remove-font-data-from-osk
change(common): remove drafted font metadata from KMX+ format 🔱
2026-04-17 06:16:50 +10:00
Marc Durdin
1517b1369a
Merge pull request #15613 from keymanapp/feat/developer/embed-osk/convert-touch-layout-into-kmx-plus
feat(developer): convert .keyman-touch-layout into KMX+ data and embed 🔱
2026-04-17 06:16:36 +10:00
Marc Durdin
2e38a50522 change(common): remove drafted font metadata from KMX+ format
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
This comes out of a design philosophy review on what we include when we
embed OSK data into KMX.

We will now avoid embedding font name into the OSK (and hence .kmx)
altogether, and leave that metadata to the packaging data. Reasons:

1. The font information is specified in the .kps, so we have to do a
   patchup on the .kmx during packaging if we want to embed the info
   into the OSK.

2. The referenced font must be supplied separately anyway (via .kmp,
   @font-face, or system supplied, etc), so including the font facename
   in the keyboard is not really all that helpful.

3. Philosophically, the font is really a presentation level factor
   (aside from displaymap considerations). Keeping it together with
   future theming and styling choices, rather than the key layout data,
   seems appropriate.

4. This makes fewer places where font data is referenced -- in fact, to
   just one place: in the .kps/.kmp for LDML keyboards, which is great.

This also simplifies some aspects of the embed-osk-in-kmx work, removing
the need to patch the .kmx after the build, and eliminates the smelly
kmx-plus-osk-token.ts file.

A corresponding change has been made to the design document referenced
in #14857.

Test-bot: skip
2026-04-16 09:13:15 +02:00
Marc Durdin
1ddd972590 chore(developer): extend unit tests for flicks and address review comments
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-16 09:10:31 +02:00
Marc Durdin
35212fdd50 fix(common): track flick index correctly when building flicks table
Fixes: #15853
2026-04-16 09:09:41 +02:00
Keyman Server
1374491ed9
Merge branch 'epic/embed-osk-in-kmx' into auto/A19S26-merge-master-into-embed-osk-in-kmx 2026-04-10 17:04:46 +02:00
Marc Durdin
30f40b5092 chore(developer): polish character constants and U_ id check
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Move U_25CC to a new CharacterConstants common enumeration.

Rewrite U_ key id conversion to check for invalid characters and report
to the keyboard author with warnings.

Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-04-09 10:53:56 +02:00
Marc Durdin
1e1a378231
Merge pull request #15791 from keymanapp/dependabot/npm_and_yarn/developer/src/server/src/win32/trayicon/addon-src/brace-expansion-5.0.5
chore(deps): bump brace-expansion from 5.0.4 to 5.0.5 in /developer/src/server/src/win32/trayicon/addon-src
2026-03-28 03:25:08 +11:00
Marc Durdin
ab23c12558
Merge branch 'epic/embed-osk-in-kmx' into auto/A19S25-merge-master-into-embed-osk-in-kmx 2026-03-27 16:27:19 +11:00
dependabot[bot]
0205ada4aa
chore(deps): bump brace-expansion
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.4 to 5.0.5.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v5.0.4...v5.0.5)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 5.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-26 22:20:26 +00:00
Marc Durdin
aa61b08473 feat(developer): embed touch layout and kvk into kmx
Add support for embedding .keyman-touch-layout into .kmx and complete
support and tests for embedding .kvk. Fixup a number of related
functions.

Add special-key-caps.ts to developer-utils -- in future this will become
the primary source for developer for these key caps, but this cannot be
done until Developer Server and Touch Layout Editor are updated with
Typescript in client code.
2026-03-26 14:45:46 +01:00
dependabot[bot]
fb8dae5090
chore(deps): bump picomatch
Bumps [picomatch](https://github.com/micromatch/picomatch) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/4.0.3...4.0.4)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-26 07:39:34 +00:00
Marc Durdin
1806c1baa6 fix(developer): define globalThis for compiled custom lexical models
The boilerplate code for custom lexical models has never really been
tested. For use in a browser/worker context, we need to define
`exports`. The added unit test verifies that the model will build.

Test-bot: skip
2026-03-24 10:31:07 +01:00
Marc Durdin
ec5efd4ee5 chore(common): adjust dependencies
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-03-17 05:57:30 +01:00
Marc Durdin
c8058fdc2c chore(common): Merge branch 'epic/embed-osk-in-kmx' into feat/common/kmx-plus-file-reader
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-03-16 17:32:17 +01:00
Marc Durdin
77a612d25e
Merge pull request #15733 from keymanapp/chore/common/hextobin-cleanup
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
chore(common): cleanup and reorganize hextobin to remove fs dependency 🔱
2026-03-17 03:09:14 +11:00
Marc Durdin
efad936105 feat(common): add KMX+ file reader in Typescript
Add a KMX+ file reader and tests, including a round-trip builder:reader
test.

Move basic-17.txt, basic-19.txt, and basic.xml to common test resources
folder so they can be used by unit tests in common and developer.

Test-bot: skip
2026-03-16 07:21:38 +01:00
Marc Durdin
b6b10d1a09 chore: Merge branch 'epic/embed-osk-in-kmx' into auto/A19S24-merge-master-into-embed-osk-in-kmx 2026-03-15 07:42:03 +01:00
Marc Durdin
36cd83f21b chore(common): cleanup and reorganize hextobin to remove fs dependency
fs dependency removed from the main hextobin function, only in the
filesystem.ts version. Also supports loading a segment of a hex file
for isolated tests.

Test-bot: skip
2026-03-12 16:26:08 +01:00
dependabot[bot]
e08247d4f6
chore(deps): bump tar
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.10 to 7.5.11.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.10...v7.5.11)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.11
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-11 00:29:09 +00:00
Marc Durdin
65f7d91e67
Merge pull request #15705 from keymanapp/fix/developer/15673-new-project-whitespace
fix(developer): use trimmed version of paths when verifying in New Project
2026-03-09 18:53:51 +07:00
Marc Durdin
36fa80f6fb
Merge pull request #15704 from keymanapp/fix/developer/15674-unlockproject-guard
fix(developer): correct INVALID_HANDLE_VALUE check in UnlockProject
2026-03-09 18:53:45 +07:00
Marc Durdin
5562f6a32c
Merge pull request #15701 from keymanapp/fix/developer/15699-await-copier-result
fix(developer): await copier result before reporting success or failure
2026-03-09 16:01:56 +07:00
Marc Durdin
f2f3e32e69 fix(developer): use trimmed version of paths when verifying in New Project
Fixes: #15673
Build-bot: skip
Test-bot: skip
2026-03-09 07:38:13 +01:00
Marc Durdin
89c9c615e5 fix(developer): correct INVALID_HANDLE_VALUE check in UnlockProject
Fixes: #15674
Test-bot: skip
Build-bot: skip
2026-03-09 07:31:51 +01:00
Marc Durdin
a8f5ee3362 fix(developer): resolve input project path for kmc copy
Relative paths would cause `kmc copy` to fail to find sources files for
the project, because component paths would be constructed incorrectly.
The cleanest fix is to ensure that we always full resolve local file
paths before attempting to copy the project.

Fixes: #15659
2026-03-09 07:08:47 +01:00
Marc Durdin
5129a482b4 fix(developer): await copier result before reporting success or failure
Without `await`, a 'success' message is always returned, because the
Promise that is returned is not nullish. While the log message was
misleading, the outcome was already correct, because the parent function
`copyProject()` did correctly await the call to `doCopy()`.

Fixes: #15699
Test-bot: skip
2026-03-09 06:24:57 +01:00
Marc Durdin
00b0a98715
Merge pull request #15649 from keymanapp/dependabot/npm_and_yarn/fast-xml-parser-5.3.8
chore(deps): bump fast-xml-parser from 5.3.4 to 5.3.8
2026-03-09 11:55:08 +07:00
Marc Durdin
11e3e100a6
Merge pull request #15626 from keymanapp/fix/developer/15625-ngrok-upgrade
fix(developer): ngrok upgrade
2026-03-06 21:49:13 +07:00
Marc Durdin
deec23cfde
Merge pull request #15672 from keymanapp/fix/developer/11706-debug-memo-get-anchor-with-tom-interface
fix(developer): retrieve debug memo anchor without side effects
2026-03-06 21:01:26 +07:00
Marc Durdin
99cec792d4
Merge pull request #15669 from keymanapp/fix/developer/15063-clone-overwrite
fix(developer): prevent new projects from overwriting existing projects
2026-03-06 21:01:11 +07:00
Marc Durdin
aff6c7d686
Merge pull request #15684 from keymanapp/maint/developer/test-callbacks-cleanup-redux
maint(developer): cleanup additional TestCompilerCallbacks references
2026-03-06 21:00:48 +07:00
Marc Durdin
659e85033a
Merge pull request #15665 from keymanapp/maint/developer/test-callbacks-cleanup
maint(developer): make `TestCompilerCallbacks` usage more consistent and simplify
2026-03-06 21:00:39 +07:00
dependabot[bot]
25c3490ecd
chore(deps): bump fast-xml-parser from 5.3.4 to 5.3.8
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.3.4 to 5.3.8.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.3.4...v5.3.8)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.3.8
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-06 13:58:59 +00:00
Marc Durdin
281e382171 chore(developer): Merge branch 'master' into fix/developer/15625-ngrok-upgrade 2026-03-06 14:52:41 +01:00
Marc Durdin
cca8d4d21f docs: tweak build bot docs and update imsample gitignore
Just minor maintenance.

Build-bot: skip
Test-bot: skip
2026-03-06 10:21:04 +01:00
Marc Durdin
274d7891e6
Merge pull request #15681 from keymanapp/dependabot/npm_and_yarn/multer-2.1.1
chore(deps): bump multer from 2.0.2 to 2.1.1
2026-03-06 03:37:52 +07:00
Marc Durdin
d5db6f5395
Merge pull request #15682 from keymanapp/dependabot/npm_and_yarn/developer/src/server/src/win32/trayicon/addon-src/tar-7.5.10
chore(deps): bump tar from 7.5.7 to 7.5.10 in /developer/src/server/src/win32/trayicon/addon-src
2026-03-06 03:28:33 +07:00
Marc Durdin
0e8f468963
Merge pull request #15648 from keymanapp/dependabot/npm_and_yarn/developer/src/server/src/win32/trayicon/addon-src/minimatch-10.2.4
chore(deps): bump minimatch from 10.1.1 to 10.2.4 in /developer/src/server/src/win32/trayicon/addon-src
2026-03-06 03:28:02 +07:00
Marc Durdin
ad7966950d chore(developer): address review comments
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
2026-03-05 15:19:01 +01:00
Marc Durdin
f1163860d1 fix(developer): address review comments 2026-03-05 15:14:54 +01:00
Marc Durdin
8f3b2b06c9
Merge pull request #15670 from keymanapp/fix/developer/13958-setup-feedback
fix(developer): improve UI feedback on upgrade
2026-03-05 19:20:51 +07:00
Marc Durdin
724a8ea0f5 maint(developer): cleanup additional TestCompilerCallbacks references
Address a review comment from #15665 and cleanup additional references
that I missed the first time around, along with the `fs.readFileSync`
`Uint8Array` cast.

Follows: #15665
Test-bot: skip
2026-03-05 13:15:43 +01:00
dependabot[bot]
1a07aadc05
chore(deps): bump tar
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.7 to 7.5.10.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.7...v7.5.10)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.10
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 09:08:11 +00:00
dependabot[bot]
0700a3e444
chore(deps): bump multer from 2.0.2 to 2.1.1
Bumps [multer](https://github.com/expressjs/multer) from 2.0.2 to 2.1.1.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v2.0.2...v2.1.1)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 08:15:02 +00:00
Marc Durdin
59f02a6a55 fix(developer): retrieve debug memo anchor without side effects
Use RichEdit's `ITextDocument` interface to retrieve the selection
anchor/caret information, and avoid the side-effects that can arise with
the hacky `EM_GETSEL` / `EM_SETSEL` pattern we used previously.

Changing the selection with `EM_SETSEL` in order to find the anchor
point causes notification messages to be generated that can arrive at an
unexpected time in some text selection scenarios, which ended up with us
having a saved selection in the debugger pointing to the wrong text
range.

The name `Anchor` was a misnomer, because it was actually returning the
caret position, not the anchor for the selection, which is the far side
of the selection from the anchor!

Fixes: #11706
Fixes: KEYMAN-DEVELOPER-18A
2026-03-04 14:01:42 +01:00
Marc Durdin
26cf278cc1 fix(developer): improve UI feedback on upgrade
Show a progress dialog when running the Keyman Developer upgrade
(`-au` parameter).

Fixes: #13958
Test-bot: skip
2026-03-04 06:27:36 +01:00
Marc Durdin
7a8fa1bf7f fix(developer): prevent new projects from overwriting existing projects
The new project UI process detects if the target project folder already
exists in a given path, and asks if the author wants to overwrite it.

However, this has been inconsistently implemented -- in the clone
keyboard case, the process would fail with a message "error KM0B004:
Output path <PATH> already exists, not overwriting". In other cases, no
files would be removed, but existing files would be overwritten where
there was a collision, resulting in a messy project folder.

I have opted to prevent this situation in a consistent manner, requiring
the author to remove the folder themselves in Windows Explorer, even
though this is higher friction, because it pushes them into verifying
that they actually want to delete the contents of the folder.

I also took the opportunity to DRY out this verification process in the
six different New Project dialogs.

Fixes: #15063
2026-03-04 05:45:21 +01:00
Marc Durdin
a0ecd51c60 fix(developer): apply keyboard description in Windows keyboard import
Fixes: #15630
Test-bot: skip
2026-03-04 04:57:56 +01:00
Marc Durdin
529a49431e maint(developer): make TestCompilerCallbacks usage more consistent and simplify
Simplify usage of `TestCompilerCallbacks` by making it responsible for
the `beforeEach` and `afterEach` incantations itself. There are a couple
of more complex usages of `TestCompilerCallbacks` which have been
excluded from this change on purpose.

Renamed `testCallbacks` to `callbacks` in the one place where it was
different.

Hoist @types/node and @types/mocha because inconsistent versions of
@types/mocha were causing compiler errors with this change.

Also added a cast to `fs.readFileSync` to `Uint8Array` to eliminate
compiler warnings/errors in test files.

Fixes: #15654
Test-bot: skip
2026-03-03 16:44:06 +01:00