Commit graph

683 commits

Author SHA1 Message Date
Marc Durdin
a03eb37f6d Update km_kbp_context_api.cpp 2020-02-10 13:58:10 +11:00
Marc Durdin
2159302620 fix(common/core): buffer overrun in context api
A static buffer for UTF-8 encoded characters used in debugging and test
logs did not provide enough space for SMP characters (require 6 bytes
rather than 4). This was used only for test cases and not in production
code -- outputting JSON text.

This should fix the failing keyboardprocessor test builds on Windows and
macOS.
2020-02-10 13:58:09 +11:00
Darcy Wong
ca5445dc19 chore(common): Add comments to tests
Fix comments per review
2020-02-10 09:33:21 +07:00
Darcy
ddcf601954 fix(common): Update kmp.json test file 2020-02-07 15:29:52 +07:00
Darcy
181b9959c7 fix(common): Fix window when setting context buffer
Fix adjustment of context buffer when buffer is full. This also accounts for deadkey or surrogate pairs.

* Also added 3 meson unit tests
2020-02-07 14:59:09 +07:00
Darcy
d127f08bed chore(common): Manually add kmx 2020-02-06 16:51:05 +07:00
Darcy Wong
704c6d8dbd fix(common): Adjust test keyboard
Using numbers so debugging context will be clearer
2020-02-06 16:50:03 +07:00
Darcy
21246a516d fix(common): Add unit test for testing long context (>= 64 chars)
Reproduces issue #2575 with a keyboardprcoessor unit test.

* Also fix build warning in `kmx_options.cpp` where  unsigned int `idx` is always `>= 0`
2020-02-06 11:12:30 +07:00
jahorton
becf2039a4 fix(common): model specification for isRTL 2020-01-30 14:23:31 +07:00
jahorton
7561f04d40 fix(common): LMLayer test case fix 2020-01-15 12:28:05 +07:00
jahorton
5cc282c660 fix(common): more 'code unit' -> 'code point' work 2020-01-15 12:21:11 +07:00
jahorton
716a598b49 fix(common): addresses PR review comments for trie model SMP 2020-01-15 11:35:34 +07:00
jahorton
d0ab35d5d9 fix(common): Fixes #2469 2020-01-08 11:53:53 +07:00
jahorton
09d7a0e826 fix(common): adds string.startswith polyfill to lmlayer 2019-12-16 08:16:55 +07:00
jahorton
8be8403b60 fix(common): Actually adds polyfill (and fixes .gitignore) 2019-12-10 09:24:23 +07:00
jahorton
89bbf44139 fix(common): Adds array.from polyfill, the next thing to break 2019-12-10 09:24:22 +07:00
jahorton
4d347c3b3e fix(common): Re-enables two unit tests now functional b/c worker polyfill 2019-12-10 09:24:22 +07:00
jahorton
8d778b2a59 fix(common): adds polyfill for charCodeAt, fixes #2323 2019-12-10 09:24:22 +07:00
jahorton
1fbb093262 change(common): IE unit test bypass - return -> this.skip 2019-12-06 08:27:51 +07:00
Joshua A. Horton
7cab14b4c1 fix(common): lmlayer unit test failure in IE due to wordbreaker swap 2019-12-04 08:53:20 +07:00
Joshua A. Horton
02e57d80d9 fix(common): 'default' wordbreaker context-final null token 2019-12-04 08:42:51 +07:00
jahorton
cd55c90a2f change(common): makes LMLayer default wordBreaker the actual default 2019-12-03 10:43:28 +07:00
jahorton
a640fa76e2 fix(web): console obj validity check 2019-12-02 07:57:13 +07:00
jahorton
c2b011dc2f change(lmlayer): Fixes a few of the 'draft' tweaks to logging from previous commits of this PR 2019-12-02 07:55:38 +07:00
jahorton
4778819203 feat(lmlayer): adds basic error reporting from worker 2019-12-02 07:55:37 +07:00
jahorton
ecddb73862 change(android): gets API 23 working again, but not 19 or 21 (yet) 2019-12-02 07:55:37 +07:00
Eddie Antonio Santos
eb7e9f7722
Document @keymanapp/lexical-model-types. 2019-10-05 13:41:33 -06:00
Eddie Antonio Santos
377e018ceb
Fix other build.sh. 2019-10-02 09:31:49 -06:00
Eddie Antonio Santos
556d89b11e
Fix link before install in the event of ./build.sh -clean. 2019-10-02 09:26:03 -06:00
Eddie Antonio Santos
00ccc0080f
Add set -eu and failure messages in ./build.sh(s). 2019-10-02 08:45:44 -06:00
Eddie Antonio Santos
f2f511840e
Move npm link . to dependent build.sh scripts. 2019-10-01 14:55:58 -06:00
Eddie Antonio Santos
fc633ae94d
Rename WorkerInternalModel -> LexicalModel. 2019-10-01 14:31:40 -06:00
Eddie Antonio Santos
e14d1b0fba
Do not try to build anything in build.sh! 2019-10-01 14:10:07 -06:00
Eddie Antonio Santos
2d975138ac
Setup @keymanapp/lexical-model-types for publication. 2019-10-01 14:00:15 -06:00
Eddie Antonio Santos
1ce770d958
Add a few readonly declarations.
All consumers of these APIs compile with the current set of readonly properties. It's best to make the interfaces as strict as possible right now, for a few reasons:

 1) When I get objects of a particular interface, I don't expect its properties to change. Mutability is harder to reason about than immutability.
 2) Open-closed principle: it's easier to move from a restrictive declaration to a less restrictive declaration than the other way around.
2019-10-01 13:26:39 -06:00
Eddie Antonio Santos
b9398749c1
Add SuggestionTag interface. 2019-10-01 13:13:21 -06:00
Eddie Antonio Santos
d75c04ca39
Remove worker-compiler-interfaces entirely. 2019-10-01 12:56:03 -06:00
Eddie Antonio Santos
81d8f7eb87
Completely move worker-compiler-interfaces.d.ts to lexical-model-types. 2019-10-01 12:48:19 -06:00
Eddie Antonio Santos
a630c0e249
Move common things from message.d.ts to the lexical-model-types. 2019-10-01 12:32:08 -06:00
Eddie Antonio Santos
eb6f9b53b1
Get linking to work. 2019-10-01 09:45:33 -06:00
Eddie Antonio Santos
5b58e6c236
Somehow that works. 2019-10-01 09:28:36 -06:00
Eddie Antonio Santos
c2f8767fe2
Setup scaffolding. 2019-10-01 09:15:35 -06:00
jahorton
c364fdbeec Adjusts old unit test accordingly. 2019-08-07 10:36:49 +07:00
jahorton
a454b99971 Fixes double-space bug. 2019-08-07 09:38:55 +07:00
Joshua Horton
01fc91dfcf
Merge pull request #1918 from keymanapp/lmlayer-history-notes
[LMLayer] Initial history, history.md CI check support
2019-08-01 08:18:25 +07:00
Eddie Antonio Santos
fd5173c882
Typo
Co-Authored-By: Marc Durdin <marc@durdin.net>
2019-07-31 09:40:09 -06:00
jahorton
59327fab81 Moved LMLayer history notes to KMW's history.md. 2019-07-31 14:49:33 +07:00
Eddie Antonio Santos
27e63e16b1
Be explicit about the type of punctuation defaults. 2019-07-30 10:20:36 -06:00
Eddie Antonio Santos
3017300f33
Factor out some interfaces required both by compiler and by worker to their own file. 2019-07-30 10:07:11 -06:00
Eddie Antonio Santos
13c5a4cdd5
Trie to appease IE... 2019-07-30 09:47:15 -06:00