@keymanapp/kmc-ldml 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/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 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"ccde55e5-9c97-508b-aeac-a101ab8e40db","file":"name.js","mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,IAAO,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAE3B,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,KAAK,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACrD,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,OAAO,CAAC,QAA4B;QACzC,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;QAC7F,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","names":[],"sourceRoot":"","sources":["../../../src/compiler/name.ts"],"version":3}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
protected readonly
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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]="9dc7768f-c9dc-5435-b055-37e7a9cf5b49")}catch(e){}}();
|
|
2
|
+
import { LDMLKeyboard, KMXPlus, CompilerCallbacks } from "@keymanapp/common-types";
|
|
3
|
+
import { SectionIdent } from '@keymanapp/ldml-keyboard-constants';
|
|
4
|
+
export declare class SectionCompiler {
|
|
5
|
+
protected readonly keyboard: LDMLKeyboard.LKKeyboard;
|
|
6
|
+
protected readonly callbacks: CompilerCallbacks;
|
|
7
|
+
constructor(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks);
|
|
8
|
+
get id(): SectionIdent;
|
|
9
|
+
compile(sections: KMXPlus.DependencySections): KMXPlus.Section;
|
|
10
|
+
validate(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Get the dependencies for this compiler.
|
|
13
|
+
* @returns set of dependent sections
|
|
14
|
+
*/
|
|
15
|
+
get dependencies(): Set<SectionIdent>;
|
|
16
|
+
}
|
|
17
|
+
//# debugId=9dc7768f-c9dc-5435-b055-37e7a9cf5b49
|
|
18
|
+
//# sourceMappingURL=section-compiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"9dc7768f-c9dc-5435-b055-37e7a9cf5b49","file":"section-compiler.d.ts","mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,YAAY,EAAa,MAAM,oCAAoC,CAAC;AAG7E,qBAAa,eAAe;IAC1B,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC;IACrD,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;gBAEpC,MAAM,EAAE,YAAY,CAAC,yBAAyB,EAAE,SAAS,EAAE,iBAAiB;IAMxF,IAAW,EAAE,IAAI,YAAY,CAE5B;IAEM,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,OAAO;IAI9D,QAAQ,IAAI,OAAO;IAI1B;;;OAGG;IACH,IAAW,YAAY,IAAI,GAAG,CAAC,YAAY,CAAC,CAQ3C;CACF","names":[],"sourceRoot":"","sources":["../../../src/compiler/section-compiler.ts"],"version":3}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
this.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
constants.section.
|
|
28
|
-
constants.section.
|
|
29
|
-
constants.section.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
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]="2df8ddf1-d2b8-5cdd-b71f-4ed6460aa5f1")}catch(e){}}();
|
|
2
|
+
import { constants } from '@keymanapp/ldml-keyboard-constants';
|
|
3
|
+
/* istanbul ignore next */
|
|
4
|
+
export class SectionCompiler {
|
|
5
|
+
keyboard;
|
|
6
|
+
callbacks;
|
|
7
|
+
constructor(source, callbacks) {
|
|
8
|
+
this.keyboard = source.keyboard;
|
|
9
|
+
this.callbacks = callbacks;
|
|
10
|
+
}
|
|
11
|
+
/* c8 ignore next 11 */
|
|
12
|
+
get id() {
|
|
13
|
+
throw Error(`Internal Error: id() not implemented`);
|
|
14
|
+
}
|
|
15
|
+
compile(sections) {
|
|
16
|
+
throw Error(`Internal Error: compile() not implemented`);
|
|
17
|
+
}
|
|
18
|
+
validate() {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get the dependencies for this compiler.
|
|
23
|
+
* @returns set of dependent sections
|
|
24
|
+
*/
|
|
25
|
+
get dependencies() {
|
|
26
|
+
const defaults = new Set([
|
|
27
|
+
constants.section.strs,
|
|
28
|
+
constants.section.list,
|
|
29
|
+
constants.section.elem,
|
|
30
|
+
constants.section.vars,
|
|
31
|
+
]);
|
|
32
|
+
return defaults;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# debugId=2df8ddf1-d2b8-5cdd-b71f-4ed6460aa5f1
|
|
36
|
+
//# sourceMappingURL=section-compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"2df8ddf1-d2b8-5cdd-b71f-4ed6460aa5f1","file":"section-compiler.js","mappings":";AACA,OAAO,EAAgB,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAE7E,0BAA0B;AAC1B,MAAM,OAAO,eAAe;IACP,QAAQ,CAA0B;IAClC,SAAS,CAAoB;IAEhD,YAAY,MAA8C,EAAE,SAA4B;QACtF,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,uBAAuB;IACvB,IAAW,EAAE;QACX,MAAM,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACtD,CAAC;IAEM,OAAO,CAAC,QAAoC;QACjD,MAAM,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC3D,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,IAAW,YAAY;QACrB,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAiB;YACvC,SAAS,CAAC,OAAO,CAAC,IAAI;YACtB,SAAS,CAAC,OAAO,CAAC,IAAI;YACtB,SAAS,CAAC,OAAO,CAAC,IAAI;YACtB,SAAS,CAAC,OAAO,CAAC,IAAI;SACvB,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF","names":[],"sourceRoot":"","sources":["../../../src/compiler/section-compiler.ts"],"version":3}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
private
|
|
6
|
-
private
|
|
7
|
-
|
|
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]="620d42e2-770f-5821-a85a-0739100b16a6")}catch(e){}}();
|
|
2
|
+
import { TouchLayout, LDMLKeyboard } from "@keymanapp/common-types";
|
|
3
|
+
export declare class TouchLayoutCompiler {
|
|
4
|
+
compileToJavascript(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile): TouchLayout.TouchLayoutFile;
|
|
5
|
+
private compileHardwareLayer;
|
|
6
|
+
private translateLayerIdToTouchLayoutLayerId;
|
|
7
|
+
private translateKeyIdentifierToTouch;
|
|
8
|
+
}
|
|
9
|
+
//# debugId=620d42e2-770f-5821-a85a-0739100b16a6
|
|
10
|
+
//# sourceMappingURL=touch-layout-compiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"620d42e2-770f-5821-a85a-0739100b16a6","file":"touch-layout-compiler.d.ts","mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEpE,qBAAa,mBAAmB;IACvB,mBAAmB,CAAC,MAAM,EAAE,YAAY,CAAC,yBAAyB,GAAG,WAAW,CAAC,eAAe;IAkBvG,OAAO,CAAC,oBAAoB;IAuC5B,OAAO,CAAC,oCAAoC;IAmC5C,OAAO,CAAC,6BAA6B;CAatC","names":[],"sourceRoot":"","sources":["../../../src/compiler/touch-layout-compiler.ts"],"version":3}
|
|
@@ -1,87 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
result
|
|
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
|
-
// rightalt
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
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]="3fbedc9f-b6fd-5d05-97bc-02438e04e380")}catch(e){}}();
|
|
2
|
+
export class TouchLayoutCompiler {
|
|
3
|
+
compileToJavascript(source) {
|
|
4
|
+
let result = {};
|
|
5
|
+
// start with desktop to mimic vk emit
|
|
6
|
+
result.desktop = {
|
|
7
|
+
defaultHint: "none",
|
|
8
|
+
layer: []
|
|
9
|
+
};
|
|
10
|
+
for (let layers of source.keyboard.layers) {
|
|
11
|
+
for (let layer of layers.layer) {
|
|
12
|
+
const resultLayer = this.compileHardwareLayer(source, result, layer);
|
|
13
|
+
result.desktop.layer.push(resultLayer);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
compileHardwareLayer(source, file, layer) {
|
|
19
|
+
// TODO-LDML: consider consolidation with keys.ts?
|
|
20
|
+
let fileLayer = {
|
|
21
|
+
id: this.translateLayerIdToTouchLayoutLayerId(layer.id, layer.modifier),
|
|
22
|
+
row: []
|
|
23
|
+
};
|
|
24
|
+
let y = -1;
|
|
25
|
+
for (let row of layer.row) {
|
|
26
|
+
y++;
|
|
27
|
+
let fileRow = { id: y, key: [] };
|
|
28
|
+
fileLayer.row.push(fileRow);
|
|
29
|
+
const keys = row.keys.split(' ');
|
|
30
|
+
for (let key of keys) {
|
|
31
|
+
const keydef = source.keyboard.keys?.key?.find(x => x.id == key);
|
|
32
|
+
if (keydef) {
|
|
33
|
+
const fileKey = {
|
|
34
|
+
id: this.translateKeyIdentifierToTouch(keydef.id),
|
|
35
|
+
text: keydef.to || '',
|
|
36
|
+
// TODO-LDML: additional properties
|
|
37
|
+
};
|
|
38
|
+
fileRow.key.push(fileKey);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
// TODO-LDML: consider logging missing keys
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return fileLayer;
|
|
46
|
+
}
|
|
47
|
+
translateLayerIdToTouchLayoutLayerId(id, modifier) {
|
|
48
|
+
// Touch layout layers have a set of reserved names that correspond to
|
|
49
|
+
// hardware modifiers. We want to map these identifiers first before falling
|
|
50
|
+
// back to the layer ids
|
|
51
|
+
// The set of recognized layer identifiers is:
|
|
52
|
+
//
|
|
53
|
+
// touch | LDML
|
|
54
|
+
// ---------------+-------------
|
|
55
|
+
// default | none
|
|
56
|
+
// shift | shift
|
|
57
|
+
// caps | caps
|
|
58
|
+
// rightalt | altR
|
|
59
|
+
// rightalt-shift | altR shift
|
|
60
|
+
//
|
|
61
|
+
const map = {
|
|
62
|
+
none: 'default',
|
|
63
|
+
shift: 'shift',
|
|
64
|
+
caps: 'caps',
|
|
65
|
+
altR: 'rightalt',
|
|
66
|
+
"altR shift": 'rightalt-shift'
|
|
67
|
+
};
|
|
68
|
+
// canonicalize modifier string, alphabetical
|
|
69
|
+
modifier = (modifier || '').split(/\b/).sort().join(' ').trim();
|
|
70
|
+
if (Object.hasOwn(map, modifier)) {
|
|
71
|
+
return map[modifier];
|
|
72
|
+
}
|
|
73
|
+
// TODO-LDML: Other layer names will be used unmodified, is this sufficient?
|
|
74
|
+
return id;
|
|
75
|
+
}
|
|
76
|
+
translateKeyIdentifierToTouch(id) {
|
|
77
|
+
// Note: keys identifiers in kmx were traditionally case-insensitive, but we
|
|
78
|
+
// are going to use them as case-insensitive for LDML keyboards. The set of
|
|
79
|
+
// standard key identifiers a-z, A-Z, 0-9 will be used, where possible, and
|
|
80
|
+
// all other keys will be mapped to `T_key`.
|
|
81
|
+
if (id.match(/^[0-9a-zA-Z]$/)) {
|
|
82
|
+
return 'K_' + id;
|
|
83
|
+
}
|
|
84
|
+
// Not a standard key
|
|
85
|
+
return 'T_' + id;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# debugId=3fbedc9f-b6fd-5d05-97bc-02438e04e380
|
|
89
|
+
//# sourceMappingURL=touch-layout-compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"3fbedc9f-b6fd-5d05-97bc-02438e04e380","file":"touch-layout-compiler.js","mappings":";AAEA,MAAM,OAAO,mBAAmB;IACvB,mBAAmB,CAAC,MAA8C;QACvE,IAAI,MAAM,GAAgC,EAAE,CAAC;QAE7C,sCAAsC;QACtC,MAAM,CAAC,OAAO,GAAG;YACf,WAAW,EAAE,MAAM;YACnB,KAAK,EAAE,EAAE;SACV,CAAC;QAEF,KAAI,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;YACxC,KAAI,IAAI,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE;gBAC7B,MAAM,WAAW,GAAG,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;gBACrE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;aACxC;SACF;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,oBAAoB,CAC1B,M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AChC,wBAAwB;QACxB,yBAAyB;QACzB,wBAAwB;QACxB,wBAAwB;QACxB,8BAA8B;QAC9B,EAAE;QAEF,MAAM,GAAG,GAAG;YACV,IAAI,EAAU,SAAS;YACvB,KAAK,EAAS,OAAO;YACrB,IAAI,EAAU,MAAM;YACpB,IAAI,EAAU,UAAU;YACxB,YAAY,EAAE,gBAAgB;SAC/B,CAAC;QAEF,6CAA6C;QAC7C,QAAQ,GAAG,CAAC,QAAQ,IAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAE9D,IAAG,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE;YAC/B,OAAQ,GAAW,CAAC,QAAQ,CAAC,CAAC;SAC/B;QAED,4EAA4E;QAC5E,OAAO,EAAE,CAAC;IACZ,CAAC;IAEO,6BAA6B,CAAC,EAAU;QAC9C,4EAA4E;QAC5E,2EAA2E;QAC3E,2EAA2E;QAC3E,4CAA4C;QAE5C,IAAG,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE;YAC5B,OAAO,IAAI,GAAC,EAAE,CAAC;SAChB;QAED,qBAAqB;QACrB,OAAO,IAAI,GAAC,EAAE,CAAC;IACjB,CAAC;CACF","names":[],"sourceRoot":"","sources":["../../../src/compiler/touch-layout-compiler.ts"],"version":3}
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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]="842832ce-9e65-5a95-93a3-c59281887962")}catch(e){}}();
|
|
2
|
+
import { SectionIdent } from "@keymanapp/ldml-keyboard-constants";
|
|
3
|
+
import { KMXPlus, LDMLKeyboard, CompilerCallbacks } from '@keymanapp/common-types';
|
|
4
|
+
import { SectionCompiler } from "./section-compiler.js";
|
|
5
|
+
import Bksp = KMXPlus.Bksp;
|
|
6
|
+
import DependencySections = KMXPlus.DependencySections;
|
|
7
|
+
import Tran = KMXPlus.Tran;
|
|
8
|
+
import LDMLKeyboardXMLSourceFile = LDMLKeyboard.LDMLKeyboardXMLSourceFile;
|
|
9
|
+
import { MarkerTracker } from "./marker-tracker.js";
|
|
10
|
+
type TransformCompilerType = 'simple' | 'backspace';
|
|
11
|
+
export declare class TransformCompiler<T extends TransformCompilerType, TranBase extends Tran> extends SectionCompiler {
|
|
12
|
+
static validateMarkers(keyboard: LDMLKeyboard.LKKeyboard, mt: MarkerTracker): boolean;
|
|
13
|
+
protected type: T;
|
|
14
|
+
constructor(source: LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks);
|
|
15
|
+
validate(): boolean;
|
|
16
|
+
/** allocate a new TranBase subclass */
|
|
17
|
+
protected newTran(): TranBase;
|
|
18
|
+
private compileTransforms;
|
|
19
|
+
private compileTransformGroup;
|
|
20
|
+
private compileTransformTranGroup;
|
|
21
|
+
private compileTransform;
|
|
22
|
+
private compileReorderTranGroup;
|
|
23
|
+
private compileReorder;
|
|
24
|
+
compile(sections: DependencySections): TranBase;
|
|
25
|
+
get dependencies(): Set<SectionIdent>;
|
|
26
|
+
}
|
|
27
|
+
export declare class TranCompiler extends TransformCompiler<'simple', Tran> {
|
|
28
|
+
constructor(source: LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks);
|
|
29
|
+
protected newTran(): Tran;
|
|
30
|
+
get id(): SectionIdent;
|
|
31
|
+
}
|
|
32
|
+
export declare class BkspCompiler extends TransformCompiler<'backspace', Bksp> {
|
|
33
|
+
constructor(source: LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks);
|
|
34
|
+
protected newTran(): Bksp;
|
|
35
|
+
get id(): SectionIdent;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
38
|
+
//# debugId=842832ce-9e65-5a95-93a3-c59281887962
|
|
39
|
+
//# sourceMappingURL=tran.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"842832ce-9e65-5a95-93a3-c59281887962","file":"tran.d.ts","mappings":";AAAA,OAAO,EAAa,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAgC,MAAM,yBAAyB,CAAC;AACjH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAC3B,OAAO,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;AACvD,OAAO,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAI3B,OAAO,yBAAyB,GAAG,YAAY,CAAC,yBAAyB,CAAC;AAO1E,OAAO,EAAE,aAAa,EAAa,MAAM,qBAAqB,CAAC;AAE/D,KAAK,qBAAqB,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEpD,qBAAa,iBAAiB,CAAC,CAAC,SAAS,qBAAqB,EAAE,QAAQ,SAAS,IAAI,CAAE,SAAQ,eAAe;IAE5G,MAAM,CAAC,eAAe,CAAC,QAAQ,EAAE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