Removes Keyman Developer Server's transitive dependency on dicer by
updating multer to `1.4.5-lts.1`, which updates its dependency on
busboy.
See
https://github.com/expressjs/multer/pull/1097#issuecomment-1141286771
for reasoning behind use of `-lts.1` rather than a full release
version.
At some point in the future, multer will publish a full release with
this fix, at which point we can move back to a full release version.
Fixes#7028.
Note that the desktop layout is not currently used by KeymanWeb. The
designer has a number of additional issues, as the .keyman-touch-layout
format is not well suited to describing a fixed hardware layout, but
fixing this is outside the scope of this issue.
Fixes#7216.
The warning message 0x209A 'The rule will never be matched because its
key code is never fired.' was being generated multiple times for a
single line because the `JavaScript_Key` function it is generated by is
used for various purposes.
This PR keeps a cache of reported key rules to ensure that the message
is reported only once for a given key rule, and also improves the
reporting to clarify which specific key is unreachable, which makes it
easier to diagnose when using `any(k)` style messages, for example:
```
lao_phonetic.kmn (237): Warning: 209A The rule will never be matched for key 'ñ' because its key code is never fired.
```
This also reduces the warning to a hint, as this should not be a
blocking issue for a keyboard, rather just a place the keyboard author
can tidy up.
Fixes#7122.
The compiler was updating currentLine when checking for unreachable
rules, but not restoring it afterwards. This led to mismatches in the
debugger and in compiler warnings.
Fixes#7030.
Prevents a stack overflow / loop when the web target is removed from a
keyboard and it has already been tested on web, and the user presses the
Compile button.
When rebuilding a model, Keyman Developer would query for the
registered model, but a missing simplifyId call meant that it never
matched the model name (due to `.` vs `_`).
Picked up while reviewing code for conversion to C++. The compiler
could, in some circumstances emit garbage code for readonly groups
because we weren't testing all scenarios correctly. In practice, this
would have been rare as readonly groups don't emit characters, but it
should be fixed!
Fixes up scripts (except under /linux) to use `#!/usr/bin/env bash`
instead of `#!/bin/bash` or `#!/bin/sh` so that we don't end up with
the ancient version of bash supplied with macOS.
This became urgent with this PR, because of bash-4.xisms in
build-utils.sh, for example on line 572:
```
if [[ -v _builder_params[$e] ]]; then
```
If Server is shut down, Keyman Developer now handles this better
and offers to restart it in UI interactions, and backs out quietly
in non-UI processes.
After a demo of the Touch Layout Editor @jahorton suggested using a
"default hint" model instead of the "display hint" from the design spec.
I liked this and have reworked the design accordingly. With the default
hint model, a source for the hint text can be specified, such as the
default longpress key, or a specific flick key. This can then be
overridden on a key level.
The hint input element now shows a placeholder to indicate the default
hint for the key, and if a hint has been customised for a given key, it
is shown in green on the key cap.
Changing the default hint does not impact any customised hints.
Most dialogs in touch layout editor can now have just a Close
button with changes taking effect immediately. This helps users
visualize how the options they've chosen will work.
Moves the top toolbar to the left to make more room, and tidy it up,
and moves various controls into sub-dialogs to make them clearer.
Shortcut buttons to prepopulate the Hint property will come in a
subsequent PR.
Improves the .keyman-touch-layout clean schema and adds additional
cleanup during load and save in the Touch Layout Editor.
The compiler already does transforms for the relevant fields to the
formats that KeymanWeb is expecting (in particular, width, pad to
string).
This is preparation for adding hint data to the format as well.