This change explicitly specifies the return types and access for the
functions in KeymanEngine. Also introduce `KeyboardDetails` instead of
`ReturnType<>`.
Test-bot: skip
chore(web): fix red squiggles in .ts test files in vscode
VSCode shows red squiggles under things like `describe` or `it` in .ts test files for web. This change adds the types to the `tsconfig.json` file which fixes this problem.
VSCode shows red squiggles under things like `describe` or `it` in
.ts test files for web. This change adds the types to the `tsconfig.json`
file which fixes this problem.
Build-bot: skip build:web
Test-bot: skip
To reduce the number of possible failure cases within KeymanWeb,
require variableStoreSerializer to always be initialized. This impacts
only unit tests in practice. There remains a unit test special case in
the variable store code itself which needs to be removed in the future.
Create a mock VariableStoreTestSerializer class so that unit tests can
run without impacting state or requiring cookies. (We should leverage
this in future tests to verify that variable stores are saved
correctly.)
Establish keyman/test/headless-resources, so that we can include shared
resources such as VariableStoreTestSerializer without creating a
dependency on either DOM or Node.
As Ubuntu packaging does not currently have a node environment, we'll
disable api-header-extractor; the output files are not used in this
context anyway.
Add mappings for key to vkey + mod for .kvk and .keyman-touch-layout,
and clarify the key identifiers for .keyman-touch-layout within KMX+
format.
Update unit test fixture khmer_angkor.keyman_touch_layout to remove
dependency on .kmn (T_xxxx_yyyy -> U_xxxx_yyyy), as the relevant
VKDictionary will not be present, because the corresponding .kmn is not
compiled for the unit tests where the fixture is used.
Test-bot: skip
Refactor the `getModifierState` and `getStateFromLayer` functions into a
cleaner `modifierStringToState` function, and move from web into common.
Marks existing functions as deprecated but does not update usage at this
time.
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
Rebuild the API docs using api-header-extractor script, and add the
script to the normal build for Core so that it doesn't get out of sync
again.
Hotdoc configuration has not been used for a while; it is currently
broken and we haven't got any docs generated by it anyway, so remove
from repo.
Remove largely duplicate BUILDING.md and old json-schema.md.
Test-bot: skip
jsonpp was being used only in a single unit test, and so this was a lot
of overhead and complexity for very little benefit. We may want to add
some more unit tests in the future for state_api.tests.cpp to do a
deep comparison of the state?
Test-bot: skip
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>
fix(linux): fix memory problem
This fixes a problem identified by devin.ai: Because of the operator precedence the previous code caused `memmove` to read `sizeof(commit_queue_item) - 1` bytes past the end of `commit_queue`. With this change `memmove` now reads the intended `MAX_QUEUE_SIZE - 1` `commit_queue_items`.