@keymanapp/kmc-ldml 17.0.104-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/compiler/compiler-options.d.ts +11 -0
- package/build/src/compiler/compiler-options.d.ts.map +1 -0
- package/build/src/compiler/compiler-options.js +3 -0
- package/build/src/compiler/compiler-options.js.map +1 -0
- package/build/src/compiler/compiler.d.ts +38 -0
- package/build/src/compiler/compiler.d.ts.map +1 -0
- package/build/src/compiler/compiler.js +144 -0
- package/build/src/compiler/compiler.js.map +1 -0
- package/build/src/compiler/disp.d.ts +10 -0
- package/build/src/compiler/disp.d.ts.map +1 -0
- package/build/src/compiler/disp.js +37 -0
- package/build/src/compiler/disp.js.map +1 -0
- package/build/src/compiler/keymanweb-compiler.d.ts +16 -0
- package/build/src/compiler/keymanweb-compiler.d.ts.map +1 -0
- package/build/src/compiler/keymanweb-compiler.js +96 -0
- package/build/src/compiler/keymanweb-compiler.js.map +1 -0
- package/build/src/compiler/keys.d.ts +26 -0
- package/build/src/compiler/keys.d.ts.map +1 -0
- package/build/src/compiler/keys.js +207 -0
- package/build/src/compiler/keys.js.map +1 -0
- package/build/src/compiler/layr.d.ts +10 -0
- package/build/src/compiler/layr.d.ts.map +1 -0
- package/build/src/compiler/layr.js +79 -0
- package/build/src/compiler/layr.js.map +1 -0
- package/build/src/compiler/loca.d.ts +16 -0
- package/build/src/compiler/loca.d.ts.map +1 -0
- package/build/src/compiler/loca.js +58 -0
- package/build/src/compiler/loca.js.map +1 -0
- package/build/src/compiler/messages.d.ts +93 -0
- package/build/src/compiler/messages.d.ts.map +1 -0
- package/build/src/compiler/messages.js +54 -0
- package/build/src/compiler/messages.js.map +1 -0
- package/build/src/compiler/meta.d.ts +12 -0
- package/build/src/compiler/meta.d.ts.map +1 -0
- package/build/src/compiler/meta.js +58 -0
- package/build/src/compiler/meta.js.map +1 -0
- package/build/src/compiler/metadata-compiler.d.ts +13 -0
- package/build/src/compiler/metadata-compiler.d.ts.map +1 -0
- package/build/src/compiler/metadata-compiler.js +47 -0
- package/build/src/compiler/metadata-compiler.js.map +1 -0
- package/build/src/compiler/name.d.ts +10 -0
- package/build/src/compiler/name.d.ts.map +1 -0
- package/build/src/compiler/name.js +20 -0
- package/build/src/compiler/name.js.map +1 -0
- package/build/src/compiler/ordr.d.ts +12 -0
- package/build/src/compiler/ordr.d.ts.map +1 -0
- package/build/src/compiler/ordr.js +35 -0
- package/build/src/compiler/ordr.js.map +1 -0
- package/build/src/compiler/section-compiler.d.ts +12 -0
- package/build/src/compiler/section-compiler.d.ts.map +1 -0
- package/build/src/compiler/section-compiler.js +22 -0
- package/build/src/compiler/section-compiler.js.map +1 -0
- package/build/src/compiler/touch-layout-compiler.d.ts +8 -0
- package/build/src/compiler/touch-layout-compiler.d.ts.map +1 -0
- package/build/src/compiler/touch-layout-compiler.js +87 -0
- package/build/src/compiler/touch-layout-compiler.js.map +1 -0
- package/build/src/compiler/tran.d.ts +41 -0
- package/build/src/compiler/tran.d.ts.map +1 -0
- package/build/src/compiler/tran.js +102 -0
- package/build/src/compiler/tran.js.map +1 -0
- package/build/src/compiler/visual-keyboard-compiler.d.ts +7 -0
- package/build/src/compiler/visual-keyboard-compiler.d.ts.map +1 -0
- package/build/src/compiler/visual-keyboard-compiler.js +51 -0
- package/build/src/compiler/visual-keyboard-compiler.js.map +1 -0
- package/build/src/compiler/vkey.d.ts +10 -0
- package/build/src/compiler/vkey.d.ts.map +1 -0
- package/build/src/compiler/vkey.js +59 -0
- package/build/src/compiler/vkey.js.map +1 -0
- package/build/src/kpj.schema.json +127 -0
- package/build/src/kvks.schema.json +182 -0
- package/build/src/ldml-keyboard.schema.json +702 -0
- package/build/src/ldml-keyboardtest.schema.json +221 -0
- package/build/src/main.d.ts +9 -0
- package/build/src/main.d.ts.map +1 -0
- package/build/src/main.js +8 -0
- package/build/src/main.js.map +1 -0
- package/build/src/util/util.d.ts +32 -0
- package/build/src/util/util.d.ts.map +1 -0
- package/build/src/util/util.js +85 -0
- package/build/src/util/util.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema#",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"definitions": {
|
|
5
|
+
"any": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"backspace": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"check": {
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"properties": {
|
|
14
|
+
"result": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"result"
|
|
20
|
+
],
|
|
21
|
+
"type": "object"
|
|
22
|
+
},
|
|
23
|
+
"emit": {
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"properties": {
|
|
26
|
+
"to": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": [
|
|
31
|
+
"to"
|
|
32
|
+
],
|
|
33
|
+
"type": "object"
|
|
34
|
+
},
|
|
35
|
+
"info": {
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"properties": {
|
|
38
|
+
"author": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"keyboard": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"name": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"keyboard",
|
|
50
|
+
"name"
|
|
51
|
+
],
|
|
52
|
+
"type": "object"
|
|
53
|
+
},
|
|
54
|
+
"keystroke": {
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"properties": {
|
|
57
|
+
"flick": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
},
|
|
60
|
+
"key": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"longPress": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"tapCount": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"key"
|
|
72
|
+
],
|
|
73
|
+
"type": "object"
|
|
74
|
+
},
|
|
75
|
+
"repertoire": {
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"properties": {
|
|
78
|
+
"chars": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"name": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"type": {
|
|
85
|
+
"enum": [
|
|
86
|
+
"default",
|
|
87
|
+
"simple",
|
|
88
|
+
"gesture",
|
|
89
|
+
"flick",
|
|
90
|
+
"longPress",
|
|
91
|
+
"multiTap",
|
|
92
|
+
"hardware"
|
|
93
|
+
],
|
|
94
|
+
"type": "string"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"required": [
|
|
98
|
+
"chars",
|
|
99
|
+
"name"
|
|
100
|
+
],
|
|
101
|
+
"type": "object"
|
|
102
|
+
},
|
|
103
|
+
"special": {
|
|
104
|
+
"$ref": "#/definitions/any"
|
|
105
|
+
},
|
|
106
|
+
"startContext": {
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"properties": {
|
|
109
|
+
"to": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": [
|
|
114
|
+
"to"
|
|
115
|
+
],
|
|
116
|
+
"type": "object"
|
|
117
|
+
},
|
|
118
|
+
"test": {
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"properties": {
|
|
121
|
+
"backspace": {
|
|
122
|
+
"$ref": "#/definitions/backspace"
|
|
123
|
+
},
|
|
124
|
+
"check": {
|
|
125
|
+
"$ref": "#/definitions/check"
|
|
126
|
+
},
|
|
127
|
+
"emit": {
|
|
128
|
+
"$ref": "#/definitions/emit"
|
|
129
|
+
},
|
|
130
|
+
"keystroke": {
|
|
131
|
+
"$ref": "#/definitions/keystroke"
|
|
132
|
+
},
|
|
133
|
+
"name": {
|
|
134
|
+
"type": "string"
|
|
135
|
+
},
|
|
136
|
+
"special": {
|
|
137
|
+
"items": {
|
|
138
|
+
"$ref": "#/definitions/special"
|
|
139
|
+
},
|
|
140
|
+
"type": "array"
|
|
141
|
+
},
|
|
142
|
+
"startContext": {
|
|
143
|
+
"$ref": "#/definitions/startContext"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"required": [
|
|
147
|
+
"name"
|
|
148
|
+
],
|
|
149
|
+
"type": "object"
|
|
150
|
+
},
|
|
151
|
+
"tests": {
|
|
152
|
+
"additionalProperties": false,
|
|
153
|
+
"properties": {
|
|
154
|
+
"name": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"special": {
|
|
158
|
+
"items": {
|
|
159
|
+
"$ref": "#/definitions/special"
|
|
160
|
+
},
|
|
161
|
+
"type": "array"
|
|
162
|
+
},
|
|
163
|
+
"test": {
|
|
164
|
+
"items": {
|
|
165
|
+
"$ref": "#/definitions/test"
|
|
166
|
+
},
|
|
167
|
+
"minItems": 1,
|
|
168
|
+
"type": "array"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"required": [
|
|
172
|
+
"test",
|
|
173
|
+
"name"
|
|
174
|
+
],
|
|
175
|
+
"type": "object"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"properties": {
|
|
179
|
+
"keyboardTest": {
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"properties": {
|
|
182
|
+
"conformsTo": {
|
|
183
|
+
"enum": [
|
|
184
|
+
"techpreview"
|
|
185
|
+
],
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
"info": {
|
|
189
|
+
"$ref": "#/definitions/info"
|
|
190
|
+
},
|
|
191
|
+
"repertoire": {
|
|
192
|
+
"items": {
|
|
193
|
+
"$ref": "#/definitions/repertoire"
|
|
194
|
+
},
|
|
195
|
+
"type": "array"
|
|
196
|
+
},
|
|
197
|
+
"special": {
|
|
198
|
+
"items": {
|
|
199
|
+
"$ref": "#/definitions/special"
|
|
200
|
+
},
|
|
201
|
+
"type": "array"
|
|
202
|
+
},
|
|
203
|
+
"tests": {
|
|
204
|
+
"items": {
|
|
205
|
+
"$ref": "#/definitions/tests"
|
|
206
|
+
},
|
|
207
|
+
"type": "array"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"required": [
|
|
211
|
+
"info",
|
|
212
|
+
"conformsTo"
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"required": [
|
|
217
|
+
"keyboardTest"
|
|
218
|
+
],
|
|
219
|
+
"title": "techpreview/dtd/ldmlKeyboardTest.xsd",
|
|
220
|
+
"type": "object"
|
|
221
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Compiler } from './compiler/compiler.js';
|
|
2
|
+
export { KeymanWebCompiler } from './compiler/keymanweb-compiler.js';
|
|
3
|
+
export { default as VisualKeyboardCompiler } from './compiler/visual-keyboard-compiler.js';
|
|
4
|
+
export { TouchLayoutCompiler } from './compiler/touch-layout-compiler.js';
|
|
5
|
+
export { default as CompilerOptions } from './compiler/compiler-options.js';
|
|
6
|
+
export { CompilerMessages } from './compiler/messages.js';
|
|
7
|
+
export { default as KMXPlusMetadataCompiler } from './compiler/metadata-compiler.js';
|
|
8
|
+
export { KMXBuilder } from "@keymanapp/common-types";
|
|
9
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Compiler } from './compiler/compiler.js';
|
|
2
|
+
export { KeymanWebCompiler } from './compiler/keymanweb-compiler.js';
|
|
3
|
+
export { default as VisualKeyboardCompiler } from './compiler/visual-keyboard-compiler.js';
|
|
4
|
+
export { TouchLayoutCompiler } from './compiler/touch-layout-compiler.js';
|
|
5
|
+
export { CompilerMessages } from './compiler/messages.js';
|
|
6
|
+
export { default as KMXPlusMetadataCompiler } from './compiler/metadata-compiler.js';
|
|
7
|
+
export { KMXBuilder } from "@keymanapp/common-types";
|
|
8
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { LDMLKeyboard } from "@keymanapp/common-types";
|
|
2
|
+
/**
|
|
3
|
+
* Verifies that value is an item in the enumeration.
|
|
4
|
+
*/
|
|
5
|
+
export declare function isValidEnumValue<T extends {
|
|
6
|
+
[key: number]: string | number;
|
|
7
|
+
}>(enu: T, value: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Returns unique LKKeys only, preserving later ones
|
|
10
|
+
* in case of conflict. (i.e. later overrides)
|
|
11
|
+
* @param keys list of keys to consider. (mutated)
|
|
12
|
+
* @returns Array of unique keys. Order is not specified.
|
|
13
|
+
*/
|
|
14
|
+
export declare function calculateUniqueKeys(keys?: LDMLKeyboard.LKKey[]): LDMLKeyboard.LKKey[];
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param layersList list of layers elements, from `keyboard?.layers`
|
|
18
|
+
* @returns set of key IDs
|
|
19
|
+
*/
|
|
20
|
+
export declare function allUsedKeyIdsInLayers(layersList: LDMLKeyboard.LKLayers[] | null): Set<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Determine modifier from layer info
|
|
23
|
+
* @param layer layer obj
|
|
24
|
+
* @returns modifier
|
|
25
|
+
*/
|
|
26
|
+
export declare function translateLayerAttrToModifier(layer: LDMLKeyboard.LKLayer): number;
|
|
27
|
+
/**
|
|
28
|
+
* @param modifier modifier sequence such as undefined, "none", "shift altR" etc
|
|
29
|
+
* @returns true if valid
|
|
30
|
+
*/
|
|
31
|
+
export declare function validModifier(modifier?: string): boolean;
|
|
32
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,WAEjG;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,KAAK,EAAE,GAAG,YAAY,CAAC,KAAK,EAAE,CAiBrF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAG,YAAY,CAAC,QAAQ,EAAE,GAAG,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,CAgB9F;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,YAAY,CAAC,OAAO,GAAI,MAAM,CAYjF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAI,OAAO,CAQzD"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { constants } from "@keymanapp/ldml-keyboard-constants";
|
|
2
|
+
/**
|
|
3
|
+
* Verifies that value is an item in the enumeration.
|
|
4
|
+
*/
|
|
5
|
+
export function isValidEnumValue(enu, value) {
|
|
6
|
+
return Object.values(enu).includes(value);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Returns unique LKKeys only, preserving later ones
|
|
10
|
+
* in case of conflict. (i.e. later overrides)
|
|
11
|
+
* @param keys list of keys to consider. (mutated)
|
|
12
|
+
* @returns Array of unique keys. Order is not specified.
|
|
13
|
+
*/
|
|
14
|
+
export function calculateUniqueKeys(keys) {
|
|
15
|
+
if (!keys) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
// Need 'newer' (later) keys to override older ones.
|
|
19
|
+
const reverseKeys = keys.reverse(); // newest to oldest
|
|
20
|
+
const alreadySeen = new Set();
|
|
21
|
+
// filter out only the keys that haven't already been seen
|
|
22
|
+
const uniqueKeys = reverseKeys.filter(({ id }) => {
|
|
23
|
+
if (!alreadySeen.has(id)) {
|
|
24
|
+
alreadySeen.add(id);
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
});
|
|
29
|
+
return uniqueKeys;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @param layersList list of layers elements, from `keyboard?.layers`
|
|
34
|
+
* @returns set of key IDs
|
|
35
|
+
*/
|
|
36
|
+
export function allUsedKeyIdsInLayers(layersList) {
|
|
37
|
+
const s = new Set();
|
|
38
|
+
if (layersList) {
|
|
39
|
+
for (const layers of layersList || []) {
|
|
40
|
+
for (const layer of layers.layer || []) {
|
|
41
|
+
for (const row of layer.row || []) {
|
|
42
|
+
if (row.keys) {
|
|
43
|
+
for (const k of row.keys.split(" ")) {
|
|
44
|
+
s.add(k);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return s;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Determine modifier from layer info
|
|
55
|
+
* @param layer layer obj
|
|
56
|
+
* @returns modifier
|
|
57
|
+
*/
|
|
58
|
+
export function translateLayerAttrToModifier(layer) {
|
|
59
|
+
const { modifier } = layer;
|
|
60
|
+
if (modifier) {
|
|
61
|
+
let mod = constants.keys_mod_none;
|
|
62
|
+
for (let str of modifier.split(' ')) {
|
|
63
|
+
const submod = constants.keys_mod_map.get(str);
|
|
64
|
+
mod |= submod;
|
|
65
|
+
}
|
|
66
|
+
return mod;
|
|
67
|
+
}
|
|
68
|
+
// TODO-LDML: other modifiers, other ids?
|
|
69
|
+
return constants.keys_mod_none;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @param modifier modifier sequence such as undefined, "none", "shift altR" etc
|
|
73
|
+
* @returns true if valid
|
|
74
|
+
*/
|
|
75
|
+
export function validModifier(modifier) {
|
|
76
|
+
if (!modifier)
|
|
77
|
+
return true; // valid to have no modifier, == none
|
|
78
|
+
for (let str of modifier.split(' ')) {
|
|
79
|
+
if (!constants.keys_mod_map.has(str)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/util/util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAA6C,GAAM,EAAE,KAAa;IAChG,OAAQ,MAAM,CAAC,MAAM,CAAC,GAAG,CAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAA2B;IAC7D,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,EAAE,CAAC;KACX;IACD,oDAAoD;IACpD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,mBAAmB;IACvD,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;IACtC,0DAA0D;IAC1D,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;QAC/C,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YACxB,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACpB,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAA2C;IAC/E,MAAM,CAAC,GAAG,IAAI,GAAG,EAAU,CAAC;IAC5B,IAAI,UAAU,EAAE;QACd,KAAK,MAAM,MAAM,IAAI,UAAU,IAAI,EAAE,EAAE;YACrC,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE;gBACtC,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,EAAE,EAAE;oBACjC,IAAI,GAAG,CAAC,IAAI,EAAE;wBACZ,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;4BACnC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;yBACV;qBACF;iBACF;aACF;SACF;KACF;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAAC,KAA2B;IACtE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,IAAI,QAAQ,EAAE;QACZ,IAAI,GAAG,GAAG,SAAS,CAAC,aAAa,CAAC;QAClC,KAAK,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACnC,MAAM,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC/C,GAAG,IAAI,MAAM,CAAC;SACf;QACD,OAAO,GAAG,CAAC;KACZ;IACD,yCAAyC;IACzC,OAAO,SAAS,CAAC,aAAa,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,QAAiB;IAC7C,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC,CAAE,qCAAqC;IAClE,KAAK,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QACnC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACpC,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@keymanapp/kmc-ldml",
|
|
3
|
+
"description": "Keyman Developer LDML keyboard compiler",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"keyboard",
|
|
6
|
+
"keyman",
|
|
7
|
+
"ldml",
|
|
8
|
+
"unicode"
|
|
9
|
+
],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./build/src/main.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"/build/src/"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc -b",
|
|
19
|
+
"lint": "eslint .",
|
|
20
|
+
"test": "npm run lint && cd test && tsc -b && cd .. && c8 --reporter=lcov --reporter=text mocha",
|
|
21
|
+
"prepublishOnly": "npm run build"
|
|
22
|
+
},
|
|
23
|
+
"author": "Marc Durdin <marc@keyman.com> (https://github.com/mcdurdin)",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/keymanapp/keyman/issues"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@keymanapp/keyman-version": "17.0.104-alpha",
|
|
30
|
+
"@keymanapp/ldml-keyboard-constants": "17.0.104-alpha",
|
|
31
|
+
"ajv": "^8.11.0",
|
|
32
|
+
"restructure": "git+https://github.com/keymanapp/dependency-restructure.git#49d129cf0916d082a7278bb09296fb89cecfcc50",
|
|
33
|
+
"semver": "^7.3.7",
|
|
34
|
+
"xml2js": "git+https://github.com/keymanapp/dependency-node-xml2js#535fe732dc408d697e0f847c944cc45f0baf0829"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/chai": "^4.1.7",
|
|
38
|
+
"@types/mocha": "^5.2.7",
|
|
39
|
+
"@types/node": "^10.14.6",
|
|
40
|
+
"@types/semver": "^7.3.12",
|
|
41
|
+
"@types/xml2js": "^0.4.5",
|
|
42
|
+
"c8": "^7.12.0",
|
|
43
|
+
"chai": "^4.3.4",
|
|
44
|
+
"chalk": "^2.4.2",
|
|
45
|
+
"mocha": "^8.4.0",
|
|
46
|
+
"ts-node": "^9.1.1",
|
|
47
|
+
"typescript": "^4.9.5",
|
|
48
|
+
"@keymanapp/developer-test-helpers": "17.0.104-alpha"
|
|
49
|
+
},
|
|
50
|
+
"mocha": {
|
|
51
|
+
"spec": "build/test/**/test-*.js",
|
|
52
|
+
"require": [
|
|
53
|
+
"source-map-support/register"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"c8": {
|
|
57
|
+
"all": true,
|
|
58
|
+
"src": [
|
|
59
|
+
"src/"
|
|
60
|
+
],
|
|
61
|
+
"exclude-after-remap": true,
|
|
62
|
+
"exclude": [
|
|
63
|
+
"test/"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "git+https://github.com/keymanapp/keyman.git"
|
|
69
|
+
},
|
|
70
|
+
"version": "17.0.104-alpha"
|
|
71
|
+
}
|