@keymanapp/common-types 17.0.154-alpha → 17.0.156-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/consts/virtual-key-constants.d.ts +144 -138
- package/build/src/consts/virtual-key-constants.d.ts.map +1 -1
- package/build/src/consts/virtual-key-constants.js +258 -252
- package/build/src/consts/virtual-key-constants.js.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.d.ts +8 -7
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.d.ts.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js +76 -74
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.d.ts +31 -24
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.d.ts.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js +119 -75
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.d.ts +78 -76
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.d.ts.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.js +28 -26
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.js.map +1 -1
- package/build/src/kmx/element-string.d.ts +26 -24
- package/build/src/kmx/element-string.d.ts.map +1 -1
- package/build/src/kmx/element-string.js +121 -119
- package/build/src/kmx/element-string.js.map +1 -1
- package/build/src/kmx/keyman-targets.d.ts +23 -0
- package/build/src/kmx/keyman-targets.d.ts.map +1 -0
- package/build/src/kmx/keyman-targets.js +80 -0
- package/build/src/kmx/keyman-targets.js.map +1 -0
- package/build/src/kmx/kmx-builder.d.ts +35 -33
- package/build/src/kmx/kmx-builder.d.ts.map +1 -1
- package/build/src/kmx/kmx-builder.js +190 -188
- package/build/src/kmx/kmx-builder.js.map +1 -1
- package/build/src/kmx/kmx-file-reader.d.ts +16 -7
- package/build/src/kmx/kmx-file-reader.d.ts.map +1 -1
- package/build/src/kmx/kmx-file-reader.js +135 -38
- package/build/src/kmx/kmx-file-reader.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-disp.d.ts +20 -18
- package/build/src/kmx/kmx-plus-builder/build-disp.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-disp.js +27 -25
- package/build/src/kmx/kmx-plus-builder/build-disp.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-elem.d.ts +31 -29
- package/build/src/kmx/kmx-plus-builder/build-elem.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-elem.js +90 -88
- package/build/src/kmx/kmx-plus-builder/build-elem.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-keys.d.ts +60 -58
- package/build/src/kmx/kmx-plus-builder/build-keys.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-keys.js +109 -107
- package/build/src/kmx/kmx-plus-builder/build-keys.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-layr.d.ts +56 -54
- package/build/src/kmx/kmx-plus-builder/build-layr.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-layr.js +101 -99
- package/build/src/kmx/kmx-plus-builder/build-layr.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-list.d.ts +38 -36
- package/build/src/kmx/kmx-plus-builder/build-list.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-list.js +67 -65
- package/build/src/kmx/kmx-plus-builder/build-list.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-loca.d.ts +14 -12
- package/build/src/kmx/kmx-plus-builder/build-loca.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-loca.js +22 -20
- package/build/src/kmx/kmx-plus-builder/build-loca.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-meta.d.ts +19 -17
- package/build/src/kmx/kmx-plus-builder/build-meta.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-meta.js +23 -21
- package/build/src/kmx/kmx-plus-builder/build-meta.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-name.d.ts +14 -12
- package/build/src/kmx/kmx-plus-builder/build-name.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-name.js +25 -23
- package/build/src/kmx/kmx-plus-builder/build-name.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-sect.d.ts +18 -16
- package/build/src/kmx/kmx-plus-builder/build-sect.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-sect.js +16 -14
- package/build/src/kmx/kmx-plus-builder/build-sect.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-strs.d.ts +25 -23
- package/build/src/kmx/kmx-plus-builder/build-strs.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-strs.js +47 -45
- package/build/src/kmx/kmx-plus-builder/build-strs.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-tran.d.ts +35 -33
- package/build/src/kmx/kmx-plus-builder/build-tran.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-tran.js +70 -68
- package/build/src/kmx/kmx-plus-builder/build-tran.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-uset.d.ts +33 -31
- package/build/src/kmx/kmx-plus-builder/build-uset.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-uset.js +61 -59
- package/build/src/kmx/kmx-plus-builder/build-uset.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-vars.d.ts +24 -22
- package/build/src/kmx/kmx-plus-builder/build-vars.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-vars.js +49 -47
- package/build/src/kmx/kmx-plus-builder/build-vars.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-vkey.d.ts +18 -16
- package/build/src/kmx/kmx-plus-builder/build-vkey.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-vkey.js +25 -23
- package/build/src/kmx/kmx-plus-builder/build-vkey.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/builder-section.d.ts +12 -10
- package/build/src/kmx/kmx-plus-builder/builder-section.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/builder-section.js +5 -3
- package/build/src/kmx/kmx-plus-builder/builder-section.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.d.ts +49 -47
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js +146 -144
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js.map +1 -1
- package/build/src/kmx/kmx-plus.d.ts +331 -329
- package/build/src/kmx/kmx-plus.d.ts.map +1 -1
- package/build/src/kmx/kmx-plus.js +835 -833
- package/build/src/kmx/kmx-plus.js.map +1 -1
- package/build/src/kmx/kmx.d.ts +235 -209
- package/build/src/kmx/kmx.d.ts.map +1 -1
- package/build/src/kmx/kmx.js +299 -276
- package/build/src/kmx/kmx.js.map +1 -1
- package/build/src/kmx/string-list.d.ts +36 -34
- package/build/src/kmx/string-list.d.ts.map +1 -1
- package/build/src/kmx/string-list.js +85 -83
- package/build/src/kmx/string-list.js.map +1 -1
- package/build/src/kpj/keyman-developer-project.d.ts +74 -63
- package/build/src/kpj/keyman-developer-project.d.ts.map +1 -1
- package/build/src/kpj/keyman-developer-project.js +165 -146
- package/build/src/kpj/keyman-developer-project.js.map +1 -1
- package/build/src/kpj/kpj-file-reader.d.ts +21 -19
- package/build/src/kpj/kpj-file-reader.d.ts.map +1 -1
- package/build/src/kpj/kpj-file-reader.js +110 -96
- package/build/src/kpj/kpj-file-reader.js.map +1 -1
- package/build/src/kpj/kpj-file.d.ts +41 -39
- package/build/src/kpj/kpj-file.d.ts.map +1 -1
- package/build/src/kpj/kpj-file.js +13 -11
- package/build/src/kpj/kpj-file.js.map +1 -1
- package/build/src/kvk/kvk-file-reader.d.ts +7 -5
- package/build/src/kvk/kvk-file-reader.d.ts.map +1 -1
- package/build/src/kvk/kvk-file-reader.js +38 -35
- package/build/src/kvk/kvk-file-reader.js.map +1 -1
- package/build/src/kvk/kvk-file-writer.d.ts +22 -20
- package/build/src/kvk/kvk-file-writer.d.ts.map +1 -1
- package/build/src/kvk/kvk-file-writer.js +78 -67
- package/build/src/kvk/kvk-file-writer.js.map +1 -1
- package/build/src/kvk/kvk-file.d.ts +68 -65
- package/build/src/kvk/kvk-file.d.ts.map +1 -1
- package/build/src/kvk/kvk-file.js +67 -64
- package/build/src/kvk/kvk-file.js.map +1 -1
- package/build/src/kvk/kvks-file-reader.d.ts +26 -23
- package/build/src/kvk/kvks-file-reader.d.ts.map +1 -1
- package/build/src/kvk/kvks-file-reader.js +179 -151
- package/build/src/kvk/kvks-file-reader.js.map +1 -1
- package/build/src/kvk/kvks-file-writer.d.ts +9 -6
- package/build/src/kvk/kvks-file-writer.d.ts.map +1 -1
- package/build/src/kvk/kvks-file-writer.js +107 -98
- package/build/src/kvk/kvks-file-writer.js.map +1 -1
- package/build/src/kvk/kvks-file.d.ts +46 -44
- package/build/src/kvk/kvks-file.d.ts.map +1 -1
- package/build/src/kvk/kvks-file.js +12 -10
- package/build/src/kvk/kvks-file.js.map +1 -1
- package/build/src/kvk/visual-keyboard.d.ts +47 -35
- package/build/src/kvk/visual-keyboard.d.ts.map +1 -1
- package/build/src/kvk/visual-keyboard.js +73 -61
- package/build/src/kvk/visual-keyboard.js.map +1 -1
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.d.ts +58 -56
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.d.ts.map +1 -1
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.js +22 -20
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.js.map +1 -1
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.d.ts +97 -95
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.d.ts.map +1 -1
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js +387 -385
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js.map +1 -1
- package/build/src/ldml-keyboard/ldml-keyboard-xml.d.ts +163 -161
- package/build/src/ldml-keyboard/ldml-keyboard-xml.d.ts.map +1 -1
- package/build/src/ldml-keyboard/ldml-keyboard-xml.js +41 -39
- package/build/src/ldml-keyboard/ldml-keyboard-xml.js.map +1 -1
- package/build/src/ldml-keyboard/pattern-parser.d.ts +138 -136
- package/build/src/ldml-keyboard/pattern-parser.d.ts.map +1 -1
- package/build/src/ldml-keyboard/pattern-parser.js +245 -243
- package/build/src/ldml-keyboard/pattern-parser.js.map +1 -1
- package/build/src/ldml-keyboard/unicodeset-parser-api.d.ts +40 -38
- package/build/src/ldml-keyboard/unicodeset-parser-api.d.ts.map +1 -1
- package/build/src/ldml-keyboard/unicodeset-parser-api.js +30 -28
- package/build/src/ldml-keyboard/unicodeset-parser-api.js.map +1 -1
- package/build/src/main.d.ts +36 -29
- package/build/src/main.d.ts.map +1 -1
- package/build/src/main.js +35 -28
- package/build/src/main.js.map +1 -1
- package/build/src/osk/osk.d.ts +25 -0
- package/build/src/osk/osk.d.ts.map +1 -0
- package/build/src/osk/osk.js +89 -0
- package/build/src/osk/osk.js.map +1 -0
- package/build/src/package/kmp-json-file.d.ts +69 -68
- package/build/src/package/kmp-json-file.d.ts.map +1 -1
- package/build/src/package/kmp-json-file.js +4 -2
- package/build/src/package/kmp-json-file.js.map +1 -1
- package/build/src/package/kps-file.d.ts +100 -98
- package/build/src/package/kps-file.d.ts.map +1 -1
- package/build/src/package/kps-file.js +18 -16
- package/build/src/package/kps-file.js.map +1 -1
- package/build/src/schemas/displaymap.schema.d.ts +60 -0
- package/build/src/schemas/displaymap.schema.d.ts.map +1 -0
- package/build/src/schemas/displaymap.schema.js +38 -0
- package/build/src/schemas/displaymap.schema.js.map +1 -0
- package/build/src/schemas/keyman-touch-layout.clean.spec.d.ts +230 -0
- package/build/src/schemas/keyman-touch-layout.clean.spec.d.ts.map +1 -0
- package/build/src/schemas/keyman-touch-layout.clean.spec.js +154 -0
- package/build/src/schemas/keyman-touch-layout.clean.spec.js.map +1 -0
- package/build/src/schemas/keyman-touch-layout.spec.d.ts +229 -0
- package/build/src/schemas/keyman-touch-layout.spec.d.ts.map +1 -0
- package/build/src/schemas/keyman-touch-layout.spec.js +142 -0
- package/build/src/schemas/keyman-touch-layout.spec.js.map +1 -0
- package/build/src/schemas/kpj-9.0.schema.d.ts +155 -0
- package/build/src/schemas/kpj-9.0.schema.d.ts.map +1 -0
- package/build/src/schemas/kpj-9.0.schema.js +134 -0
- package/build/src/schemas/kpj-9.0.schema.js.map +1 -0
- package/build/src/schemas/kpj.schema.d.ts +121 -0
- package/build/src/schemas/kpj.schema.d.ts.map +1 -0
- package/build/src/schemas/kpj.schema.js +128 -0
- package/build/src/schemas/kpj.schema.js.map +1 -0
- package/build/src/schemas/kvks.schema.d.ts +163 -0
- package/build/src/schemas/kvks.schema.d.ts.map +1 -0
- package/build/src/schemas/kvks.schema.js +185 -0
- package/build/src/schemas/kvks.schema.js.map +1 -0
- package/build/src/schemas/ldml-keyboard.schema.d.ts +634 -0
- package/build/src/schemas/ldml-keyboard.schema.d.ts.map +1 -0
- package/build/src/schemas/ldml-keyboard.schema.js +705 -0
- package/build/src/schemas/ldml-keyboard.schema.js.map +1 -0
- package/build/src/schemas/ldml-keyboardtest.schema.d.ts +191 -0
- package/build/src/schemas/ldml-keyboardtest.schema.d.ts.map +1 -0
- package/build/src/schemas/ldml-keyboardtest.schema.js +224 -0
- package/build/src/schemas/ldml-keyboardtest.schema.js.map +1 -0
- package/build/src/schemas.d.ts +1757 -0
- package/build/src/schemas.d.ts.map +1 -0
- package/build/src/schemas.js +22 -0
- package/build/src/schemas.js.map +1 -0
- package/build/src/util/common-events.d.ts +51 -49
- package/build/src/util/common-events.d.ts.map +1 -1
- package/build/src/util/common-events.js +31 -29
- package/build/src/util/common-events.js.map +1 -1
- package/build/src/util/compiler-interfaces.d.ts +296 -136
- package/build/src/util/compiler-interfaces.d.ts.map +1 -1
- package/build/src/util/compiler-interfaces.js +294 -104
- package/build/src/util/compiler-interfaces.js.map +1 -1
- package/build/src/util/errors.d.ts +8 -0
- package/build/src/util/errors.d.ts.map +1 -0
- package/build/src/util/errors.js +8 -0
- package/build/src/util/errors.js.map +1 -0
- package/build/src/util/file-types.d.ts +98 -0
- package/build/src/util/file-types.d.ts.map +1 -0
- package/build/src/util/file-types.js +117 -0
- package/build/src/util/file-types.js.map +1 -0
- package/build/src/util/util.d.ts +32 -30
- package/build/src/util/util.d.ts.map +1 -1
- package/build/src/util/util.js +98 -96
- package/build/src/util/util.js.map +1 -1
- package/package.json +23 -4
- package/build/src/keyman-touch-layout.clean.spec.json +0 -170
- package/build/src/kpj.schema.json +0 -127
- package/build/src/kvks.schema.json +0 -182
- package/build/src/ldml-keyboard.schema.json +0 -702
- package/build/src/ldml-keyboardtest.schema.json +0 -221
|
@@ -1,74 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b17cb898-e715-518f-b76f-4217b5b5d535")}catch(e){}}();
|
|
2
|
+
import { default as AjvModule } from 'ajv';
|
|
3
|
+
const Ajv = AjvModule.default; // The actual expected Ajv type.
|
|
4
|
+
import Schemas from '../../src/schemas.js';
|
|
5
|
+
export class TouchLayoutFileReader {
|
|
6
|
+
read(source) {
|
|
7
|
+
const decoder = new TextDecoder('utf-8', { fatal: true, ignoreBOM: true });
|
|
8
|
+
let sourceString;
|
|
9
|
+
try {
|
|
10
|
+
sourceString = decoder.decode(source);
|
|
11
|
+
/* c8 ignore next 7 */
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
if (e instanceof TypeError) {
|
|
15
|
+
// TODO: Do we want to do something else with this?
|
|
16
|
+
throw e;
|
|
17
|
+
}
|
|
18
|
+
throw e;
|
|
19
|
+
}
|
|
20
|
+
let result;
|
|
21
|
+
try {
|
|
22
|
+
result = JSON.parse(sourceString, function (key, value) {
|
|
23
|
+
// `row.id` should be number, but may have been stringified; we use
|
|
24
|
+
// presence of `key` property to recognise this as a `TouchLayoutRow`.
|
|
25
|
+
if (this.key && key == 'id' && typeof value == 'string') {
|
|
26
|
+
let newValue = parseInt(value, 10);
|
|
27
|
+
/* c8 ignore next 3 */
|
|
28
|
+
if (isNaN(newValue)) {
|
|
29
|
+
throw new TypeError(`Invalid row.id: "${value}"`);
|
|
30
|
+
}
|
|
31
|
+
return newValue;
|
|
32
|
+
}
|
|
33
|
+
// `key.width`, `key.pad`, `key.sp` should be number, but may have been
|
|
34
|
+
// stringified
|
|
35
|
+
if (key == 'width' || key == 'pad' || key == 'sp') {
|
|
36
|
+
if (value === '') {
|
|
37
|
+
// Empty string is equivalent to not present, so fall back to
|
|
38
|
+
// default value
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
let newValue = parseInt(value, 10);
|
|
42
|
+
/* c8 ignore next 3 */
|
|
43
|
+
if (isNaN(newValue)) {
|
|
44
|
+
throw new TypeError(`Invalid [sub]key.${key}: "${value}"`);
|
|
45
|
+
}
|
|
46
|
+
return newValue;
|
|
47
|
+
}
|
|
48
|
+
if (Array.isArray(value) && value.length == 0) {
|
|
49
|
+
// Delete empty arrays
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
return value;
|
|
53
|
+
});
|
|
54
|
+
/* c8 ignore next 7 */
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
if (e instanceof SyntaxError) {
|
|
58
|
+
// TODO: Do we want to do something else with this?
|
|
59
|
+
throw e;
|
|
60
|
+
}
|
|
61
|
+
throw e;
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
validate(source) {
|
|
66
|
+
const ajv = new Ajv();
|
|
67
|
+
if (!ajv.validate(Schemas.touchLayoutClean, source))
|
|
68
|
+
/* c8 ignore next 3 */
|
|
69
|
+
{
|
|
70
|
+
throw new Error(ajv.errorsText());
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
;
|
|
75
|
+
//# debugId=b17cb898-e715-518f-b76f-4217b5b5d535
|
|
76
|
+
//# sourceMappingURL=keyman-touch-layout-file-reader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"b17cb898-e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-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f6699873-edc6-54b2-a91c-f12441d5e8a8")}catch(e){}}();
|
|
2
|
+
import { TouchLayoutFile } from "./keyman-touch-layout-file.js";
|
|
3
|
+
export interface TouchLayoutFileWriterOptions {
|
|
4
|
+
formatted?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare class TouchLayoutFileWriter {
|
|
7
|
+
options: TouchLayoutFileWriterOptions;
|
|
8
|
+
constructor(options?: TouchLayoutFileWriterOptions);
|
|
9
|
+
/**
|
|
10
|
+
* Writes the touch layout to a .keyman-touch-layout JSON file
|
|
11
|
+
* @param source TouchLayoutFile
|
|
12
|
+
* @returns Uint8Array, the .keyman-touch-layout file
|
|
13
|
+
*/
|
|
14
|
+
write(source: TouchLayoutFile): Uint8Array;
|
|
15
|
+
/**
|
|
16
|
+
* Gets the output as a JSON string
|
|
17
|
+
*/
|
|
18
|
+
toJSONString(source: TouchLayoutFile): string;
|
|
19
|
+
/**
|
|
20
|
+
* Compiles the touch layout file into a KeymanWeb-compatible JSON-style
|
|
21
|
+
* object string. In the future, this may be optimized to remove unnecessary
|
|
22
|
+
* quoting of property names, and remove unused properties, as this string
|
|
23
|
+
* is embedded into .js code.
|
|
24
|
+
* @param source
|
|
25
|
+
* @returns string
|
|
26
|
+
*/
|
|
27
|
+
compile(source: TouchLayoutFile): string;
|
|
28
|
+
fixup(source: TouchLayoutFile): TouchLayoutFile;
|
|
29
|
+
}
|
|
30
|
+
//# debugId=f6699873-edc6-54b2-a91c-f12441d5e8a8
|
|
31
|
+
//# sourceMappingURL=keyman-touch-layout-file-writer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"f6699873-edc6-54b2-a91c-f12441d5e8a8","file":"keyman-touch-layout-file-writer.d.ts","mappings":";AAAA,OAAO,EAAE,eAAe,EAA0D,MAAM,+BAA+B,CAAC;AAExH,MAAM,WAAW,4BAA4B;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,qBAAa,qBAAqB;IAEhC,OAAO,EAAE,4BAA4B,CAAC;gBAE1B,OAAO,CAAC,EAAE,4BAA4B;IAIlD;;;;OAIG;IACI,KAAK,CAAC,MAAM,EAAE,eAAe,GAAG,UAAU;IAMjD;;OAEG;IACI,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM;IAIpD;;;;;;;OAOG;IACI,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM;IAIxC,KAAK,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe;CAkFvD","names":[],"sourceRoot":"","sources":["../../../src/keyman-touch-layout/keyman-touch-layout-file-writer.ts"],"version":3}
|
|
@@ -1,75 +1,119 @@
|
|
|
1
|
-
;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
* @
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
1
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aefdc198-181e-584b-b310-4893f68ac054")}catch(e){}}();
|
|
2
|
+
;
|
|
3
|
+
export class TouchLayoutFileWriter {
|
|
4
|
+
options;
|
|
5
|
+
constructor(options) {
|
|
6
|
+
this.options = { ...options };
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Writes the touch layout to a .keyman-touch-layout JSON file
|
|
10
|
+
* @param source TouchLayoutFile
|
|
11
|
+
* @returns Uint8Array, the .keyman-touch-layout file
|
|
12
|
+
*/
|
|
13
|
+
write(source) {
|
|
14
|
+
const output = this.toJSONString(source);
|
|
15
|
+
const encoder = new TextEncoder();
|
|
16
|
+
return encoder.encode(output);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Gets the output as a JSON string
|
|
20
|
+
*/
|
|
21
|
+
toJSONString(source) {
|
|
22
|
+
return JSON.stringify(source, null, this.options?.formatted ? 2 : undefined);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Compiles the touch layout file into a KeymanWeb-compatible JSON-style
|
|
26
|
+
* object string. In the future, this may be optimized to remove unnecessary
|
|
27
|
+
* quoting of property names, and remove unused properties, as this string
|
|
28
|
+
* is embedded into .js code.
|
|
29
|
+
* @param source
|
|
30
|
+
* @returns string
|
|
31
|
+
*/
|
|
32
|
+
compile(source) {
|
|
33
|
+
return this.toJSONString(this.fixup(source));
|
|
34
|
+
}
|
|
35
|
+
fixup(source) {
|
|
36
|
+
// Deep copy the source
|
|
37
|
+
source = JSON.parse(JSON.stringify(source));
|
|
38
|
+
// Fixup pad, width and sp to string types, as that's what KeymanWeb
|
|
39
|
+
// currently expects
|
|
40
|
+
const fixupKey = (key) => {
|
|
41
|
+
if (Object.hasOwn(key, 'pad')) {
|
|
42
|
+
if (key.pad == 0) {
|
|
43
|
+
delete key.pad;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
key.pad = key.pad.toString();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (Object.hasOwn(key, 'sp')) {
|
|
50
|
+
if (key.sp == 0) {
|
|
51
|
+
delete key.sp;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
key.sp = key.sp.toString();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (Object.hasOwn(key, 'width')) {
|
|
58
|
+
if (key.width == 0) {
|
|
59
|
+
delete key.width;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
key.width = key.width.toString();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (Object.hasOwn(key, 'text') && key.text === '')
|
|
66
|
+
delete key.text;
|
|
67
|
+
if (Object.hasOwn(key, 'id') && key.id === '')
|
|
68
|
+
delete key.id;
|
|
69
|
+
if (Object.hasOwn(key, 'hint') && key.hint === '')
|
|
70
|
+
delete key.hint;
|
|
71
|
+
};
|
|
72
|
+
const fixupPlatform = (platform) => {
|
|
73
|
+
// font and fontsize are eliminated if nullish:
|
|
74
|
+
if (Object.hasOwn(platform, 'font') && platform.font == '')
|
|
75
|
+
delete platform.font;
|
|
76
|
+
if (Object.hasOwn(platform, 'fontsize') && platform.fontsize == '')
|
|
77
|
+
delete platform.fontsize;
|
|
78
|
+
// displayUnderlying is always written out by kmcomp, so we do the same for kmc:
|
|
79
|
+
platform.displayUnderlying = !!platform.displayUnderlying;
|
|
80
|
+
for (let layer of platform.layer) {
|
|
81
|
+
for (let row of layer.row) {
|
|
82
|
+
// this matches the old spec for touch layout files
|
|
83
|
+
row.id = row.id.toString();
|
|
84
|
+
for (let key of row.key) {
|
|
85
|
+
fixupKey(key);
|
|
86
|
+
if (key.sk) {
|
|
87
|
+
for (let sk of key.sk) {
|
|
88
|
+
fixupKey(sk);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (key.multitap) {
|
|
92
|
+
for (let sk of key.multitap) {
|
|
93
|
+
fixupKey(sk);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (key.flick) {
|
|
97
|
+
for (let id of Object.keys(key.flick)) {
|
|
98
|
+
fixupKey(key.flick[id]);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
if (source.desktop) {
|
|
106
|
+
fixupPlatform(source.desktop);
|
|
107
|
+
}
|
|
108
|
+
if (source.phone) {
|
|
109
|
+
fixupPlatform(source.phone);
|
|
110
|
+
}
|
|
111
|
+
if (source.tablet) {
|
|
112
|
+
fixupPlatform(source.tablet);
|
|
113
|
+
}
|
|
114
|
+
return source;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
;
|
|
118
|
+
//# debugId=aefdc198-181e-584b-b310-4893f68ac054
|
|
119
|
+
//# sourceMappingURL=keyman-touch-layout-file-writer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"aefdc198-181e-584b-b310-4893f68ac054","file":"keyman-touch-layout-file-writer.js","mappings":";AAIC,CAAC;AAEF,MAAM,OAAO,qBAAqB;IAEhC,OAAO,CAA+B;IAEtC,YAAY,OAAsC;QAChD,IAAI,CAAC,OA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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
type
|
|
28
|
-
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
export type
|
|
54
|
-
export
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
1
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="50589f68-7aa7-597e-9e25-de42cfaded12")}catch(e){}}();
|
|
2
|
+
export interface TouchLayoutFile {
|
|
3
|
+
tablet?: TouchLayoutPlatform;
|
|
4
|
+
phone?: TouchLayoutPlatform;
|
|
5
|
+
desktop?: TouchLayoutPlatform;
|
|
6
|
+
}
|
|
7
|
+
export type TouchLayoutFont = string;
|
|
8
|
+
export type TouchLayoutFontSize = string;
|
|
9
|
+
export type TouchLayoutDefaultHint = "none" | "dot" | "longpress" | "multitap" | "flick" | "flick-n" | "flick-ne" | "flick-e" | "flick-se" | "flick-s" | "flick-sw" | "flick-w" | "flick-nw";
|
|
10
|
+
export interface TouchLayoutPlatform {
|
|
11
|
+
font?: TouchLayoutFont;
|
|
12
|
+
fontsize?: TouchLayoutFontSize;
|
|
13
|
+
layer: TouchLayoutLayer[];
|
|
14
|
+
displayUnderlying?: boolean;
|
|
15
|
+
defaultHint: TouchLayoutDefaultHint;
|
|
16
|
+
}
|
|
17
|
+
export type TouchLayoutLayerId = string;
|
|
18
|
+
export interface TouchLayoutLayer {
|
|
19
|
+
id: TouchLayoutLayerId;
|
|
20
|
+
row: TouchLayoutRow[];
|
|
21
|
+
}
|
|
22
|
+
export type TouchLayoutRowId = number;
|
|
23
|
+
export interface TouchLayoutRow {
|
|
24
|
+
id: TouchLayoutRowId;
|
|
25
|
+
key: TouchLayoutKey[];
|
|
26
|
+
}
|
|
27
|
+
type Key_Type = 'T' | 'K' | 'U' | 't' | 'k' | 'u';
|
|
28
|
+
type Key_Id = string;
|
|
29
|
+
export type TouchLayoutKeyId = `${Key_Type}_${Key_Id}`;
|
|
30
|
+
export interface TouchLayoutKey {
|
|
31
|
+
id?: TouchLayoutKeyId;
|
|
32
|
+
text?: string;
|
|
33
|
+
layer?: TouchLayoutLayerId;
|
|
34
|
+
nextlayer?: TouchLayoutLayerId;
|
|
35
|
+
font?: TouchLayoutFont;
|
|
36
|
+
fontsize?: TouchLayoutFontSize;
|
|
37
|
+
sp?: TouchLayoutKeySp;
|
|
38
|
+
pad?: TouchLayoutKeyPad;
|
|
39
|
+
width?: TouchLayoutKeyWidth;
|
|
40
|
+
sk?: TouchLayoutSubKey[];
|
|
41
|
+
flick?: TouchLayoutFlick;
|
|
42
|
+
multitap?: TouchLayoutSubKey[];
|
|
43
|
+
hint?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare enum TouchLayoutKeySp {
|
|
46
|
+
normal = 0,
|
|
47
|
+
special = 1,
|
|
48
|
+
specialActive = 2,
|
|
49
|
+
deadkey = 8,
|
|
50
|
+
blank = 9,
|
|
51
|
+
spacer = 10
|
|
52
|
+
}
|
|
53
|
+
export type TouchLayoutKeyPad = number;
|
|
54
|
+
export type TouchLayoutKeyWidth = number;
|
|
55
|
+
export interface TouchLayoutSubKey {
|
|
56
|
+
id: TouchLayoutKeyId;
|
|
57
|
+
text?: string;
|
|
58
|
+
layer?: TouchLayoutLayerId;
|
|
59
|
+
nextlayer?: TouchLayoutLayerId;
|
|
60
|
+
font?: TouchLayoutFont;
|
|
61
|
+
fontsize?: TouchLayoutFontSize;
|
|
62
|
+
sp?: TouchLayoutKeySp;
|
|
63
|
+
pad?: TouchLayoutKeyPad;
|
|
64
|
+
width?: TouchLayoutKeyWidth;
|
|
65
|
+
}
|
|
66
|
+
export interface TouchLayoutFlick {
|
|
67
|
+
n?: TouchLayoutSubKey;
|
|
68
|
+
s?: TouchLayoutSubKey;
|
|
69
|
+
e?: TouchLayoutSubKey;
|
|
70
|
+
w?: TouchLayoutSubKey;
|
|
71
|
+
ne?: TouchLayoutSubKey;
|
|
72
|
+
nw?: TouchLayoutSubKey;
|
|
73
|
+
se?: TouchLayoutSubKey;
|
|
74
|
+
sw?: TouchLayoutSubKey;
|
|
75
|
+
}
|
|
76
|
+
export {};
|
|
77
|
+
//# debugId=50589f68-7aa7-597e-9e25-de42cfaded12
|
|
78
|
+
//# sourceMappingURL=keyman-touch-layout-file.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"50589f68-7aa7-597e-9e25-de42cfaded12","file":"keyman-touch-layout-file.d.ts","mappings":";AASA,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,OAA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