@keymanapp/kmc-ldml 17.0.155-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/compiler/compiler.d.ts +57 -55
- package/build/src/compiler/compiler.d.ts.map +1 -1
- package/build/src/compiler/compiler.js +198 -198
- package/build/src/compiler/compiler.js.map +1 -1
- package/build/src/compiler/disp.d.ts +14 -12
- package/build/src/compiler/disp.d.ts.map +1 -1
- package/build/src/compiler/disp.js +45 -43
- package/build/src/compiler/disp.js.map +1 -1
- package/build/src/compiler/empty-compiler.d.ts +39 -37
- package/build/src/compiler/empty-compiler.d.ts.map +1 -1
- package/build/src/compiler/empty-compiler.js +71 -69
- package/build/src/compiler/empty-compiler.js.map +1 -1
- package/build/src/compiler/keymanweb-compiler.d.ts +16 -16
- package/build/src/compiler/keymanweb-compiler.d.ts.map +1 -1
- package/build/src/compiler/keymanweb-compiler.js +97 -96
- package/build/src/compiler/keymanweb-compiler.js.map +1 -1
- package/build/src/compiler/keys.d.ts +30 -28
- package/build/src/compiler/keys.d.ts.map +1 -1
- package/build/src/compiler/keys.js +240 -238
- package/build/src/compiler/keys.js.map +1 -1
- package/build/src/compiler/layr.d.ts +12 -10
- package/build/src/compiler/layr.d.ts.map +1 -1
- package/build/src/compiler/layr.js +83 -81
- package/build/src/compiler/layr.js.map +1 -1
- package/build/src/compiler/ldml-compiler-options.d.ts +10 -0
- package/build/src/compiler/ldml-compiler-options.d.ts.map +1 -0
- package/build/src/compiler/ldml-compiler-options.js +5 -0
- package/build/src/compiler/ldml-compiler-options.js.map +1 -0
- package/build/src/compiler/loca.d.ts +18 -16
- package/build/src/compiler/loca.d.ts.map +1 -1
- package/build/src/compiler/loca.js +61 -59
- package/build/src/compiler/loca.js.map +1 -1
- package/build/src/compiler/marker-tracker.d.ts +36 -34
- package/build/src/compiler/marker-tracker.d.ts.map +1 -1
- package/build/src/compiler/marker-tracker.js +75 -73
- package/build/src/compiler/marker-tracker.js.map +1 -1
- package/build/src/compiler/messages.d.ts +135 -133
- package/build/src/compiler/messages.d.ts.map +1 -1
- package/build/src/compiler/messages.js +79 -77
- package/build/src/compiler/messages.js.map +1 -1
- package/build/src/compiler/meta.d.ts +14 -12
- package/build/src/compiler/meta.d.ts.map +1 -1
- package/build/src/compiler/meta.js +60 -58
- package/build/src/compiler/meta.js.map +1 -1
- package/build/src/compiler/metadata-compiler.d.ts +15 -13
- package/build/src/compiler/metadata-compiler.d.ts.map +1 -1
- package/build/src/compiler/metadata-compiler.js +49 -47
- package/build/src/compiler/metadata-compiler.js.map +1 -1
- package/build/src/compiler/name.d.ts +12 -10
- package/build/src/compiler/name.d.ts.map +1 -1
- package/build/src/compiler/name.js +22 -20
- package/build/src/compiler/name.js.map +1 -1
- package/build/src/compiler/section-compiler.d.ts +18 -16
- package/build/src/compiler/section-compiler.d.ts.map +1 -1
- package/build/src/compiler/section-compiler.js +36 -34
- package/build/src/compiler/section-compiler.js.map +1 -1
- package/build/src/compiler/touch-layout-compiler.d.ts +10 -8
- package/build/src/compiler/touch-layout-compiler.d.ts.map +1 -1
- package/build/src/compiler/touch-layout-compiler.js +89 -87
- package/build/src/compiler/touch-layout-compiler.js.map +1 -1
- package/build/src/compiler/tran.d.ts +39 -37
- package/build/src/compiler/tran.d.ts.map +1 -1
- package/build/src/compiler/tran.js +187 -185
- package/build/src/compiler/tran.js.map +1 -1
- package/build/src/compiler/vars.d.ts +23 -21
- package/build/src/compiler/vars.d.ts.map +1 -1
- package/build/src/compiler/vars.js +221 -219
- package/build/src/compiler/vars.js.map +1 -1
- package/build/src/compiler/visual-keyboard-compiler.d.ts +9 -7
- package/build/src/compiler/visual-keyboard-compiler.d.ts.map +1 -1
- package/build/src/compiler/visual-keyboard-compiler.js +52 -54
- package/build/src/compiler/visual-keyboard-compiler.js.map +1 -1
- package/build/src/compiler/vkey.d.ts +11 -9
- package/build/src/compiler/vkey.d.ts.map +1 -1
- package/build/src/compiler/vkey.js +61 -59
- package/build/src/compiler/vkey.js.map +1 -1
- package/build/src/main.d.ts +11 -9
- package/build/src/main.d.ts.map +1 -1
- package/build/src/main.js +10 -8
- package/build/src/main.js.map +1 -1
- package/build/src/util/util.d.ts +44 -42
- package/build/src/util/util.d.ts.map +1 -1
- package/build/src/util/util.js +122 -120
- package/build/src/util/util.js.map +1 -1
- package/package.json +8 -8
- package/build/src/compiler/compiler-options.d.ts +0 -16
- package/build/src/compiler/compiler-options.d.ts.map +0 -1
- package/build/src/compiler/compiler-options.js +0 -6
- package/build/src/compiler/compiler-options.js.map +0 -1
- 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,54 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
result.header.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
result.header.
|
|
11
|
-
result.header.ansiFont
|
|
12
|
-
result.header.
|
|
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
|
-
//# sourceMappingURL=visual-keyboard-compiler.js.map
|
|
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]="678c7f8e-da72-5dbc-932b-bfe3ed75b9be")}catch(e){}}();
|
|
2
|
+
import { Constants, VisualKeyboard } from "@keymanapp/common-types";
|
|
3
|
+
export class LdmlKeyboardVisualKeyboardCompiler {
|
|
4
|
+
compile(source) {
|
|
5
|
+
let result = new VisualKeyboard.VisualKeyboard();
|
|
6
|
+
/* TODO-LDML: consider VisualKeyboardHeaderFlags.kvkhUseUnderlying kvkhDisplayUnderlying kvkhAltGr kvkh102 */
|
|
7
|
+
result.header.flags = 0;
|
|
8
|
+
result.header.version = 0x0600;
|
|
9
|
+
/* TODO-LDML: consider associatedKeyboard: this _must_ be set to id (aka basename sans ext) of keyboard .kmx file */
|
|
10
|
+
result.header.associatedKeyboard = '';
|
|
11
|
+
result.header.ansiFont = { ...VisualKeyboard.DEFAULT_KVK_FONT };
|
|
12
|
+
result.header.unicodeFont = { ...VisualKeyboard.DEFAULT_KVK_FONT };
|
|
13
|
+
for (let layers of source.keyboard.layers) {
|
|
14
|
+
for (let layer of layers.layer) {
|
|
15
|
+
this.compileHardwareLayer(source, result, layer);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
compileHardwareLayer(source, vk, layer) {
|
|
21
|
+
// TODO-LDML: consider consolidation with keys.ts?
|
|
22
|
+
const shift = this.translateLayerIdToVisualKeyboardShift(layer.id);
|
|
23
|
+
let y = -1;
|
|
24
|
+
for (let row of layer.row) {
|
|
25
|
+
y++;
|
|
26
|
+
const keys = row.keys.split(' ');
|
|
27
|
+
let x = -1;
|
|
28
|
+
for (let key of keys) {
|
|
29
|
+
x++;
|
|
30
|
+
let keydef = source.keyboard.keys?.key?.find(x => x.id == key);
|
|
31
|
+
if (!keydef) {
|
|
32
|
+
throw Error(`Internal Error: could not find key id="${key}" in layer "${layer.id || '<none>'}", row "${y}"`);
|
|
33
|
+
}
|
|
34
|
+
vk.keys.push({
|
|
35
|
+
flags: 2 /* VisualKeyboard.VisualKeyboardKeyFlags.kvkkUnicode */,
|
|
36
|
+
shift: shift,
|
|
37
|
+
text: keydef.to,
|
|
38
|
+
vkey: Constants.USVirtualKeyMap[y][x] // TODO-LDML: #7965 US-only
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
translateLayerIdToVisualKeyboardShift(id) {
|
|
44
|
+
if (id == 'base') {
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
47
|
+
// TODO-LDML: other modifiers
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# debugId=678c7f8e-da72-5dbc-932b-bfe3ed75b9be
|
|
52
|
+
//# sourceMappingURL=visual-keyboard-compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"678c7f8e-da72-5dbc-932b-bfe3ed75b9be","file":"visual-keyboard-compiler.js","mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAgB,MAAM,yBAAyB,CAAC;AAElF,MAAM,OAAO,kCAAkC;IACtC,OAAO,CAAC,MAA8C;QAC3D,IAAI,MAAM,GAAG,IAAI,cAAc,CAAC,cAAc,EAAE,CAAC;QAEjD,6GAA6G;QAC7G,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;QACxB,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;QAE/B,oHAAoH;QACpH,MAAM,CAAC,MAAM,CAAC,kBAAkB,GAAG,EAAE,CAAC;QACtC,MAAM,CAAC,MAAM,CAAC,QAAQ,GAAG,EAAC,GAAG,cAAc,CAAC,gBAAgB,EAAC,CAAC;QAC9D,MAAM,CAAC,MAAM,CAAC,WAAW,GAAG,EAAC,GAAG,cAAc,CAAC,gBAAgB,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BACnE,CAAC,CAAC;aACJ;SACF;IACH,CAAC;IAEO,qCAAqC,CAAC,EAAU;QACtD,IAAG,EAAE,IAAI,MAAM,EAAE;YACf,OAAO,CAAC,CAAC;SACV;QACD,6BAA6B;QAC7B,OAAO,CAAC,CAAC;IACX,CAAC;CACF","names":[],"sourceRoot":"","sources":["../../../src/compiler/visual-keyboard-compiler.ts"],"version":3}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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]="74359acc-a72c-5f70-b2ec-95aa0f5539b4")}catch(e){}}();
|
|
2
|
+
import { KMXPlus } from '@keymanapp/common-types';
|
|
3
|
+
import { SectionCompiler } from "./section-compiler.js";
|
|
4
|
+
import Vkey = KMXPlus.Vkey;
|
|
5
|
+
export declare class VkeyCompiler extends SectionCompiler {
|
|
6
|
+
get id(): import("@keymanapp/ldml-keyboard-constants").SectionIdent;
|
|
7
|
+
validate(): boolean;
|
|
8
|
+
compile(): Vkey;
|
|
9
|
+
}
|
|
10
|
+
//# debugId=74359acc-a72c-5f70-b2ec-95aa0f5539b4
|
|
11
|
+
//# sourceMappingURL=vkey.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"74359acc-a72c-5f70-b2ec-95aa0f5539b4","file":"vkey.d.ts","mappings":";AACA,OAAO,EAAE,OAAO,EAAa,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAG3B,qBAAa,YAAa,SAAQ,eAAe;IAE/C,IAAW,EAAE,8DAEZ;IAEM,QAAQ,IAAI,OAAO;IAqCnB,OAAO,IAAI,IAAI;CAiBvB","names":[],"sourceRoot":"","sources":["../../../src/compiler/vkey.ts"],"version":3}
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
var
|
|
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
|
-
|
|
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]="34e6bacf-0614-5be7-b0fa-f7b3d46aa0ac")}catch(e){}}();
|
|
2
|
+
import { constants } from "@keymanapp/ldml-keyboard-constants";
|
|
3
|
+
import { KMXPlus, Constants } from '@keymanapp/common-types';
|
|
4
|
+
import { CompilerMessages } from "./messages.js";
|
|
5
|
+
import { SectionCompiler } from "./section-compiler.js";
|
|
6
|
+
var Vkey = KMXPlus.Vkey;
|
|
7
|
+
var LdmlVkeyNames = Constants.LdmlVkeyNames;
|
|
8
|
+
export class VkeyCompiler extends SectionCompiler {
|
|
9
|
+
get id() {
|
|
10
|
+
return constants.section.vkey;
|
|
11
|
+
}
|
|
12
|
+
validate() {
|
|
13
|
+
let valid = true;
|
|
14
|
+
if (this.keyboard.vkeys) {
|
|
15
|
+
let from = [], to = [];
|
|
16
|
+
this.keyboard.vkeys.vkey.forEach(vk => {
|
|
17
|
+
if (LdmlVkeyNames[vk.from] === undefined) {
|
|
18
|
+
// TODO-LDML: When we do #7135 this may need to change back to an error.
|
|
19
|
+
this.callbacks.reportMessage(CompilerMessages.Hint_VkeyIsNotValid({ vkey: vk.from }));
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (LdmlVkeyNames[vk.to] === undefined) {
|
|
23
|
+
// TODO-LDML: When we do #7135 this may need to change back to an error.
|
|
24
|
+
this.callbacks.reportMessage(CompilerMessages.Hint_VkeyIsNotValid({ vkey: vk.to }));
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (vk.from == vk.to) {
|
|
28
|
+
this.callbacks.reportMessage(CompilerMessages.Hint_VkeyIsRedundant({ vkey: vk.from }));
|
|
29
|
+
}
|
|
30
|
+
if (from.find(svk => svk == vk.from)) {
|
|
31
|
+
this.callbacks.reportMessage(CompilerMessages.Error_VkeyIsRepeated({ vkey: vk.from }));
|
|
32
|
+
valid = false;
|
|
33
|
+
}
|
|
34
|
+
from.push(vk.from);
|
|
35
|
+
if (to.find(svk => svk == vk.to)) {
|
|
36
|
+
this.callbacks.reportMessage(CompilerMessages.Info_MultipleVkeysHaveSameTarget({ vkey: vk.to }));
|
|
37
|
+
}
|
|
38
|
+
to.push(vk.to);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return valid;
|
|
42
|
+
}
|
|
43
|
+
compile() {
|
|
44
|
+
let result = new Vkey();
|
|
45
|
+
if (!this.keyboard.vkeys) {
|
|
46
|
+
/* c8 ignore next 2 */
|
|
47
|
+
return result; // not hit due to boxing
|
|
48
|
+
}
|
|
49
|
+
result.vkeys = this.keyboard.vkeys?.vkey.map(vk => {
|
|
50
|
+
return {
|
|
51
|
+
vkey: LdmlVkeyNames[vk.from],
|
|
52
|
+
target: LdmlVkeyNames[vk.to]
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
// Sort according to vkey binary order, per C7043
|
|
56
|
+
result.vkeys.sort((a, b) => a.vkey - b.vkey);
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# debugId=34e6bacf-0614-5be7-b0fa-f7b3d46aa0ac
|
|
61
|
+
//# sourceMappingURL=vkey.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"34e6bacf-0614-5be7-b0fa-f7b3d46aa0ac","file":"vkey.js","mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,IAAO,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAC3B,IAAO,aAAa,GAAG,SAAS,CAAC,aAAa,CAAC;AAE/C,MAAM,OAAO,YAAa,SAAQ,eAAe;IAE/C,IAAW,EAAE;QACX,OAAO,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;IAChC,CAAC;IAEM,QAAQ;QACb,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,IAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;YACtB,IAAI,IAAI,GAAa,EAAE,EAAE,EAAE,GAAa,EAAE,CAAC;YAE3C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,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EAAC,CAAC,CAAC,CAAC;iBAChG;gBACD,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YACjB,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,OAAO;QACZ,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,IAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;YACvB,sBAAsB;YACtB,OAAO,MAAM,CAAC,CAAC,wBAAwB;SACxC;QAED,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YAChD,OAAO;gBACL,IAAI,EAAE,aAAa,CAAC,EAAE,CAAC,IAAI,CAAC;gBAC5B,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC,EAAE,CAAC;aAC7B,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,iDAAiD;QACjD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;QAC5C,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","names":[],"sourceRoot":"","sources":["../../../src/compiler/vkey.ts"],"version":3}
|
package/build/src/main.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
|
|
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]="fa6c2db3-b403-5b39-b892-f84d79a89da7")}catch(e){}}();
|
|
2
|
+
export { LdmlKeyboardCompiler } from './compiler/compiler.js';
|
|
3
|
+
export { LdmlKeyboardKeymanWebCompiler } from './compiler/keymanweb-compiler.js';
|
|
4
|
+
export { LdmlKeyboardVisualKeyboardCompiler } from './compiler/visual-keyboard-compiler.js';
|
|
5
|
+
export { TouchLayoutCompiler } from './compiler/touch-layout-compiler.js';
|
|
6
|
+
export { LdmlCompilerOptions } from './compiler/ldml-compiler-options.js';
|
|
7
|
+
export { CompilerMessages } from './compiler/messages.js';
|
|
8
|
+
export { KMXPlusMetadataCompiler } from './compiler/metadata-compiler.js';
|
|
9
|
+
export { KMXBuilder } from "@keymanapp/common-types";
|
|
10
|
+
//# debugId=fa6c2db3-b403-5b39-b892-f84d79a89da7
|
|
11
|
+
//# sourceMappingURL=main.d.ts.map
|
package/build/src/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"fa6c2db3-b403-5b39-b892-f84d79a89da7","file":"main.d.ts","mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,kCAAkC,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC","names":[],"sourceRoot":"","sources":["../../src/main.ts"],"version":3}
|
package/build/src/main.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
|
|
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]="6b543fea-aa1e-514c-b117-bc4c0b47be50")}catch(e){}}();
|
|
2
|
+
export { LdmlKeyboardCompiler } from './compiler/compiler.js';
|
|
3
|
+
export { LdmlKeyboardKeymanWebCompiler } from './compiler/keymanweb-compiler.js';
|
|
4
|
+
export { LdmlKeyboardVisualKeyboardCompiler } from './compiler/visual-keyboard-compiler.js';
|
|
5
|
+
export { TouchLayoutCompiler } from './compiler/touch-layout-compiler.js';
|
|
6
|
+
export { CompilerMessages } from './compiler/messages.js';
|
|
7
|
+
export { KMXPlusMetadataCompiler } from './compiler/metadata-compiler.js';
|
|
8
|
+
export { KMXBuilder } from "@keymanapp/common-types";
|
|
9
|
+
//# debugId=6b543fea-aa1e-514c-b117-bc4c0b47be50
|
|
10
|
+
//# sourceMappingURL=main.js.map
|
package/build/src/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"6b543fea-aa1e-514c-b117-bc4c0b47be50","file":"main.js","mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,kCAAkC,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC","names":[],"sourceRoot":"","sources":["../../src/main.ts"],"version":3}
|
package/build/src/util/util.d.ts
CHANGED
|
@@ -1,42 +1,44 @@
|
|
|
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
|
-
* @param
|
|
26
|
-
* @param
|
|
27
|
-
* @param
|
|
28
|
-
* @
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
* @
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* @
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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]="77f2c1ea-2052-5b2c-91ef-e04e70cec57c")}catch(e){}}();
|
|
2
|
+
import { LDMLKeyboard } from "@keymanapp/common-types";
|
|
3
|
+
/**
|
|
4
|
+
* Verifies that value is an item in the enumeration.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isValidEnumValue<T extends {
|
|
7
|
+
[key: number]: string | number;
|
|
8
|
+
}>(enu: T, value: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Returns unique LKKeys only, preserving later ones
|
|
11
|
+
* in case of conflict. (i.e. later overrides)
|
|
12
|
+
* @param keys list of keys to consider. (mutated)
|
|
13
|
+
* @returns Array of unique keys. Order is not specified.
|
|
14
|
+
*/
|
|
15
|
+
export declare function calculateUniqueKeys(keys?: LDMLKeyboard.LKKey[]): LDMLKeyboard.LKKey[];
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @param layersList list of layers elements, from `keyboard?.layers`
|
|
19
|
+
* @returns set of key IDs
|
|
20
|
+
*/
|
|
21
|
+
export declare function allUsedKeyIdsInLayers(layersList: LDMLKeyboard.LKLayers[] | null): Set<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Helper function for validating child elements. Written for the convenience of message passing functions.
|
|
24
|
+
*
|
|
25
|
+
* @param values array of values to check
|
|
26
|
+
* @param onDuplicate callback with array of duplicate values, deduped
|
|
27
|
+
* @param allowed optional set of valid values
|
|
28
|
+
* @param onInvalid callback with array of invalid values, deduped
|
|
29
|
+
* @returns true if all OK
|
|
30
|
+
*/
|
|
31
|
+
export declare function verifyValidAndUnique(values: string[], onDuplicate: (duplicates: string[]) => void, allowed?: Set<string>, onInvalid?: (invalids: string[]) => void): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Determine modifier from layer info
|
|
34
|
+
* @param layer layer obj
|
|
35
|
+
* @returns modifier
|
|
36
|
+
*/
|
|
37
|
+
export declare function translateLayerAttrToModifier(layer: LDMLKeyboard.LKLayer): number;
|
|
38
|
+
/**
|
|
39
|
+
* @param modifier modifier sequence such as undefined, "none", "shift altR" etc
|
|
40
|
+
* @returns true if valid
|
|
41
|
+
*/
|
|
42
|
+
export declare function validModifier(modifier?: string): boolean;
|
|
43
|
+
//# debugId=77f2c1ea-2052-5b2c-91ef-e04e70cec57c
|
|
44
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"77f2c1ea-2052-5b2c-91ef-e04e70cec57c","file":"util.d.ts","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;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EAAE,EAChB,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,EAC3C,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EACrB,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,GACtC,OAAO,CA0BV;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","names":[],"sourceRoot":"","sources":["../../../src/util/util.ts"],"version":3}
|