@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,43 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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
|
-
|
|
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]="861019a0-5241-56e6-9549-f2a584120b5d")}catch(e){}}();
|
|
2
|
+
import { constants } from "@keymanapp/ldml-keyboard-constants";
|
|
3
|
+
import { KMXPlus, MarkerParser } from '@keymanapp/common-types';
|
|
4
|
+
import { CompilerMessages } from "./messages.js";
|
|
5
|
+
import { SectionCompiler } from "./section-compiler.js";
|
|
6
|
+
var Disp = KMXPlus.Disp;
|
|
7
|
+
import { MarkerUse } from "./marker-tracker.js";
|
|
8
|
+
export class DispCompiler extends SectionCompiler {
|
|
9
|
+
static validateMarkers(keyboard, mt) {
|
|
10
|
+
keyboard.displays?.display?.forEach(({ to }) => mt.add(MarkerUse.match, MarkerParser.allReferences(to)));
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
get id() {
|
|
14
|
+
return constants.section.disp;
|
|
15
|
+
}
|
|
16
|
+
validate() {
|
|
17
|
+
let valid = true;
|
|
18
|
+
const tos = new Set();
|
|
19
|
+
if (this.keyboard.displays?.display) {
|
|
20
|
+
for (const { to } of this.keyboard.displays?.display) {
|
|
21
|
+
if (tos.has(to)) {
|
|
22
|
+
this.callbacks.reportMessage(CompilerMessages.Error_DisplayIsRepeated({ to }));
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
tos.add(to);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return valid;
|
|
29
|
+
}
|
|
30
|
+
compile(sections) {
|
|
31
|
+
let result = new Disp();
|
|
32
|
+
// displayOptions
|
|
33
|
+
result.baseCharacter = sections.strs.allocAndUnescapeString(this.keyboard.displays?.displayOptions?.baseCharacter);
|
|
34
|
+
// TODO-LDML: substitute variables!
|
|
35
|
+
// displays
|
|
36
|
+
result.disps = this.keyboard.displays?.display.map(display => ({
|
|
37
|
+
to: sections.strs.allocAndUnescapeString(sections.vars.substituteMarkerString(display.to)),
|
|
38
|
+
display: sections.strs.allocAndUnescapeString(display.display),
|
|
39
|
+
})) || []; // TODO-LDML: need coverage for the []
|
|
40
|
+
result.disps.sort((a, b) => a.to.compareTo(b.to));
|
|
41
|
+
return result;
|
|
42
|
+
}
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
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
get
|
|
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
|
-
|
|
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]="4c3ff15c-de02-5c5e-8453-5b415fafcf01")}catch(e){}}();
|
|
2
|
+
import { SectionIdent } from '@keymanapp/ldml-keyboard-constants';
|
|
3
|
+
import { SectionCompiler } from "./section-compiler.js";
|
|
4
|
+
import { LDMLKeyboard, KMXPlus, CompilerCallbacks } from "@keymanapp/common-types";
|
|
5
|
+
import { VarsCompiler } from './vars.js';
|
|
6
|
+
/**
|
|
7
|
+
* Compiler for typrs that don't actually consume input XML
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class EmptyCompiler extends SectionCompiler {
|
|
10
|
+
private _id;
|
|
11
|
+
constructor(id: SectionIdent, source: LDMLKeyboard.LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks);
|
|
12
|
+
get id(): SectionIdent;
|
|
13
|
+
get dependencies(): Set<SectionIdent>;
|
|
14
|
+
}
|
|
15
|
+
export declare class StrsCompiler extends EmptyCompiler {
|
|
16
|
+
constructor(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks);
|
|
17
|
+
compile(sections: KMXPlus.DependencySections): KMXPlus.Section;
|
|
18
|
+
}
|
|
19
|
+
export declare class ElemCompiler extends EmptyCompiler {
|
|
20
|
+
constructor(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks);
|
|
21
|
+
compile(sections: KMXPlus.DependencySections): KMXPlus.Section;
|
|
22
|
+
get dependencies(): Set<SectionIdent>;
|
|
23
|
+
}
|
|
24
|
+
export declare class ListCompiler extends EmptyCompiler {
|
|
25
|
+
constructor(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks);
|
|
26
|
+
compile(sections: KMXPlus.DependencySections): KMXPlus.Section;
|
|
27
|
+
get dependencies(): Set<SectionIdent>;
|
|
28
|
+
}
|
|
29
|
+
export declare class UsetCompiler extends EmptyCompiler {
|
|
30
|
+
constructor(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile, callbacks: CompilerCallbacks);
|
|
31
|
+
compile(sections: KMXPlus.DependencySections): KMXPlus.Section;
|
|
32
|
+
get dependencies(): Set<SectionIdent>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* For test use. The top compilers.
|
|
36
|
+
*/
|
|
37
|
+
export declare const BASIC_DEPENDENCIES: (typeof VarsCompiler | typeof StrsCompiler)[];
|
|
38
|
+
//# debugId=4c3ff15c-de02-5c5e-8453-5b415fafcf01
|
|
39
|
+
//# sourceMappingURL=empty-compiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"4c3ff15c-de02-5c5e-8453-5b415fafcf01","file":"empty-compiler.d.ts","mappings":";AAAA,OAAO,EAAE,YAAY,EAAa,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,8BAAsB,aAAc,SAAQ,eAAe;IACzD,OAAO,CAAC,GAAG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
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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
|
-
|
|
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]="297ff392-56de-571b-93c0-e6c66c121b86")}catch(e){}}();
|
|
2
|
+
import { constants } from '@keymanapp/ldml-keyboard-constants';
|
|
3
|
+
import { SectionCompiler } from "./section-compiler.js";
|
|
4
|
+
import { KMXPlus } from "@keymanapp/common-types";
|
|
5
|
+
import { VarsCompiler } from './vars.js';
|
|
6
|
+
/**
|
|
7
|
+
* Compiler for typrs that don't actually consume input XML
|
|
8
|
+
*/
|
|
9
|
+
export class EmptyCompiler extends SectionCompiler {
|
|
10
|
+
_id;
|
|
11
|
+
constructor(id, source, callbacks) {
|
|
12
|
+
super(source, callbacks);
|
|
13
|
+
this._id = id;
|
|
14
|
+
}
|
|
15
|
+
get id() {
|
|
16
|
+
return this._id;
|
|
17
|
+
}
|
|
18
|
+
get dependencies() {
|
|
19
|
+
return new Set(); // no dependencies
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export class StrsCompiler extends EmptyCompiler {
|
|
23
|
+
constructor(source, callbacks) {
|
|
24
|
+
super(constants.section.strs, source, callbacks);
|
|
25
|
+
}
|
|
26
|
+
compile(sections) {
|
|
27
|
+
return new KMXPlus.Strs();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export class ElemCompiler extends EmptyCompiler {
|
|
31
|
+
constructor(source, callbacks) {
|
|
32
|
+
super(constants.section.elem, source, callbacks);
|
|
33
|
+
}
|
|
34
|
+
compile(sections) {
|
|
35
|
+
return new KMXPlus.Elem(sections);
|
|
36
|
+
}
|
|
37
|
+
get dependencies() {
|
|
38
|
+
const strsOnly = new Set([constants.section.strs]);
|
|
39
|
+
return strsOnly;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export class ListCompiler extends EmptyCompiler {
|
|
43
|
+
constructor(source, callbacks) {
|
|
44
|
+
super(constants.section.list, source, callbacks);
|
|
45
|
+
}
|
|
46
|
+
compile(sections) {
|
|
47
|
+
return new KMXPlus.List(sections.strs);
|
|
48
|
+
}
|
|
49
|
+
get dependencies() {
|
|
50
|
+
const strsOnly = new Set([constants.section.strs]);
|
|
51
|
+
return strsOnly;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export class UsetCompiler extends EmptyCompiler {
|
|
55
|
+
constructor(source, callbacks) {
|
|
56
|
+
super(constants.section.uset, source, callbacks);
|
|
57
|
+
}
|
|
58
|
+
compile(sections) {
|
|
59
|
+
return new KMXPlus.Uset();
|
|
60
|
+
}
|
|
61
|
+
get dependencies() {
|
|
62
|
+
const strsOnly = new Set([constants.section.strs]);
|
|
63
|
+
return strsOnly;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* For test use. The top compilers.
|
|
68
|
+
*/
|
|
69
|
+
export const BASIC_DEPENDENCIES = [StrsCompiler, ListCompiler, ElemCompiler, VarsCompiler];
|
|
70
|
+
//# debugId=297ff392-56de-571b-93c0-e6c66c121b86
|
|
71
|
+
//# sourceMappingURL=empty-compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"297ff392-56de-571b-93c0-e6c66c121b86","file":"empty-compiler.js","mappings":";AAAA,OAAO,EAAgB,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAgB,OAAO,EAAqB,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAgB,aAAc,SAAQ,eAAe;IACjD,GAAG,CAAe;IAC1B,YAAY,EAAgB,EAAE,MAA8C,EAAE,SAA4B;QACxG,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QACzB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IAChB,CAAC;IAED,IAAW,EAAE;QACX,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IACD,IAAW,YAAY;QACrB,OAAO,IAAI,GAAG,EAAE,CAAC,CAAC,kBAAkB;IACtC,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,aAAa;IAC7C,YAAY,MAA8C,EAAE,SAA4B;QACtF,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACnD,CAAC;IACM,OAAO,CAAC,QAAoC;QACjD,OAAO,IAAI,OAAO,CAAC,IAAI,EA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AAC,CAAC,CAAC;QACnE,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAE,CAAC","names":[],"sourceRoot":"","sources":["../../../src/compiler/empty-compiler.ts"],"version":3}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
private
|
|
7
|
-
private readonly
|
|
8
|
-
private readonly
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=keymanweb-compiler.d.ts.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]="9773f5ca-dcf3-522f-a252-632b52c6d153")}catch(e){}}();
|
|
2
|
+
import { CompilerCallbacks, LDMLKeyboard } from "@keymanapp/common-types";
|
|
3
|
+
import { LdmlCompilerOptions } from "./ldml-compiler-options.js";
|
|
4
|
+
export declare class LdmlKeyboardKeymanWebCompiler {
|
|
5
|
+
private callbacks;
|
|
6
|
+
private readonly options;
|
|
7
|
+
private readonly nl;
|
|
8
|
+
private readonly tab;
|
|
9
|
+
constructor(callbacks: CompilerCallbacks, options?: LdmlCompilerOptions);
|
|
10
|
+
compileVisualKeyboard(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile): string;
|
|
11
|
+
compileTouchLayout(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile): string;
|
|
12
|
+
private cleanName;
|
|
13
|
+
compile(name: string, source: LDMLKeyboard.LDMLKeyboardXMLSourceFile): string;
|
|
14
|
+
}
|
|
15
|
+
//# debugId=9773f5ca-dcf3-522f-a252-632b52c6d153
|
|
16
|
+
//# sourceMappingURL=keymanweb-compiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"9773f5ca-dcf3-522f-a252-632b52c6d153","file":"keymanweb-compiler.d.ts","mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAkB,YAAY,EAA0C,MAAM,yBAAyB,CAAC;AAClI,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMjE,qBAAa,6BAA6B;IAK5B,OAAO,CAAC,SAAS;IAJ7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAC9C,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;gBAET,SAAS,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,mBAAmB;IAMxE,qBAAqB,CAAC,MAAM,EAAE,YAAY,CAAC,yBAAyB;IAgBpE,kBAAkB,CAAC,MAAM,EAAE,YAAY,CAAC,yBAAyB;IAOxE,OAAO,CAAC,SAAS;IAcV,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,yBAAyB,GAAG,MAAM;CA0DrF","names":[],"sourceRoot":"","sources":["../../../src/compiler/keymanweb-compiler.ts"],"version":3}
|
|
@@ -1,96 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
;
|
|
6
|
-
export class LdmlKeyboardKeymanWebCompiler {
|
|
7
|
-
callbacks;
|
|
8
|
-
options;
|
|
9
|
-
nl;
|
|
10
|
-
tab;
|
|
11
|
-
constructor(callbacks, options) {
|
|
12
|
-
this.callbacks = callbacks;
|
|
13
|
-
this.options = { ...options };
|
|
14
|
-
this.nl = this.options.
|
|
15
|
-
this.tab = this.options.
|
|
16
|
-
}
|
|
17
|
-
compileVisualKeyboard(source) {
|
|
18
|
-
const nl = this.nl, tab = this.tab;
|
|
19
|
-
const vkc = new LdmlKeyboardVisualKeyboardCompiler();
|
|
20
|
-
const vk = vkc.compile(source);
|
|
21
|
-
let result = `{F: '
|
|
22
|
-
`K102: ${vk.header.flags & 1 /* VisualKeyboard.VisualKeyboardHeaderFlags.kvkh102 */ ? 1 : 0}};${nl}` + // TODO-LDML: escape ' and " in font name correctly
|
|
23
|
-
`${tab}this.KV.KLS={${nl}` +
|
|
24
|
-
`${tab}${tab}TODO_LDML: ${vk.keys.length}${nl}` +
|
|
25
|
-
// TODO-LDML: fill in KLS
|
|
26
|
-
`${tab}}`;
|
|
27
|
-
return result;
|
|
28
|
-
}
|
|
29
|
-
compileTouchLayout(source) {
|
|
30
|
-
const tlcompiler = new TouchLayoutCompiler();
|
|
31
|
-
const layout = tlcompiler.compileToJavascript(source);
|
|
32
|
-
const writer = new TouchLayoutFileWriter({ formatted: this.options.
|
|
33
|
-
return writer.compile(layout);
|
|
34
|
-
}
|
|
35
|
-
cleanName(name) {
|
|
36
|
-
let result = this.callbacks.path.basename(name,
|
|
37
|
-
if (!result) {
|
|
38
|
-
throw new Error(`Invalid file name ${name}`);
|
|
39
|
-
}
|
|
40
|
-
result = result.replaceAll(/[^a-z0-9]/g, '_');
|
|
41
|
-
if (result.match(/^[0-9]/)) {
|
|
42
|
-
// Can't have a digit as initial
|
|
43
|
-
result = '_' + result;
|
|
44
|
-
}
|
|
45
|
-
return result;
|
|
46
|
-
}
|
|
47
|
-
compile(name, source) {
|
|
48
|
-
const nl = this.nl, tab = this.tab;
|
|
49
|
-
const sName = 'Keyboard_' + this.cleanName(name);
|
|
50
|
-
const displayUnderlying = true; // TODO-LDML
|
|
51
|
-
const modifierBitmask = 0; // TODO-LDML: define the modifiers used by this keyboard
|
|
52
|
-
const vkDictionary = ''; // TODO-LDML: vk dictionary for touch keys
|
|
53
|
-
const hasSupplementaryPlaneChars = false; // TODO-LDML
|
|
54
|
-
const isRTL = false; // TODO-LDML
|
|
55
|
-
let result = `if(typeof keyman === 'undefined') {${nl}` +
|
|
56
|
-
`${tab}console.error('Keyboard requires KeymanWeb ${MINIMUM_KMW_VERSION} or later');${nl}` +
|
|
57
|
-
`} else {${nl}` +
|
|
58
|
-
`${tab}KeymanWeb.KR(new ${sName}());${nl}` +
|
|
59
|
-
`}${nl}` +
|
|
60
|
-
`function ${sName}() {${nl}` +
|
|
61
|
-
// `${tab}${this.setupDebug()}${nl}` + ? we may use this for modifierBitmask in future
|
|
62
|
-
// `${tab}this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;${nl}` + ? we probably don't need this, it's for back-compat
|
|
63
|
-
`${tab}this.KI="${sName}";${nl}` +
|
|
64
|
-
`${tab}this.KN=${JSON.stringify(source.keyboard.names.name[0])};${nl}` +
|
|
65
|
-
`${tab}this.KMINVER=${JSON.stringify(MINIMUM_KMW_VERSION)};${nl}` +
|
|
66
|
-
`${tab}this.KV=${this.compileVisualKeyboard(source)};${nl}` +
|
|
67
|
-
`${tab}this.KDU=${displayUnderlying ? '1' : '0'};${nl}` +
|
|
68
|
-
`${tab}this.KH="";${nl}` + // TODO-LDML: help text not supported
|
|
69
|
-
`${tab}this.KM=0;${nl}` + // TODO-LDML: mnemonic layout not supported for LDML keyboards
|
|
70
|
-
`${tab}this.KBVER=${JSON.stringify(source.keyboard.version?.number || '0.0')};${nl}` +
|
|
71
|
-
`${tab}this.KMBM=${modifierBitmask};${nl}`;
|
|
72
|
-
if (isRTL) {
|
|
73
|
-
result += `${tab}this.KRTL=1;${nl}`;
|
|
74
|
-
}
|
|
75
|
-
if (hasSupplementaryPlaneChars) {
|
|
76
|
-
result += `${tab}this.KS=1;${nl}`;
|
|
77
|
-
}
|
|
78
|
-
if (vkDictionary != '') {
|
|
79
|
-
result += `${tab}this.KVKD=${JSON.stringify(vkDictionary)};${nl}`;
|
|
80
|
-
}
|
|
81
|
-
let layoutFile = this.compileTouchLayout(source);
|
|
82
|
-
if (layoutFile != '') {
|
|
83
|
-
result += `${tab}this.KVKL=${layoutFile};${nl}`;
|
|
84
|
-
}
|
|
85
|
-
// TODO-LDML: KCSS not supported
|
|
86
|
-
// TODO-LDML: embed binary keyboard for loading into Core
|
|
87
|
-
// A LDML keyboard has a no-op for its gs() (begin Unicode) function,
|
|
88
|
-
// because the functionality is embedded in Keyman Core
|
|
89
|
-
result += `${tab}this.gs=function(t,e){${nl}` +
|
|
90
|
-
`${tab}${tab}return 0;${nl}` + // TODO-LDML: we will start by embedding call into Keyman Core here
|
|
91
|
-
`${tab}};${nl}`;
|
|
92
|
-
result += `}${nl}`;
|
|
93
|
-
return result;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
//#
|
|
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]="0be6f19a-9bc1-5da7-af8e-6d8cbcca258d")}catch(e){}}();
|
|
2
|
+
import { VisualKeyboard, TouchLayoutFileWriter } from "@keymanapp/common-types";
|
|
3
|
+
import { TouchLayoutCompiler } from "./touch-layout-compiler.js";
|
|
4
|
+
import { LdmlKeyboardVisualKeyboardCompiler } from "./visual-keyboard-compiler.js";
|
|
5
|
+
const MINIMUM_KMW_VERSION = '16.0';
|
|
6
|
+
export class LdmlKeyboardKeymanWebCompiler {
|
|
7
|
+
callbacks;
|
|
8
|
+
options;
|
|
9
|
+
nl;
|
|
10
|
+
tab;
|
|
11
|
+
constructor(callbacks, options) {
|
|
12
|
+
this.callbacks = callbacks;
|
|
13
|
+
this.options = { ...options };
|
|
14
|
+
this.nl = this.options.saveDebug ? "\n" : '';
|
|
15
|
+
this.tab = this.options.saveDebug ? " " : '';
|
|
16
|
+
}
|
|
17
|
+
compileVisualKeyboard(source) {
|
|
18
|
+
const nl = this.nl, tab = this.tab;
|
|
19
|
+
const vkc = new LdmlKeyboardVisualKeyboardCompiler();
|
|
20
|
+
const vk = vkc.compile(source);
|
|
21
|
+
let result = `{F: ' 1em ${JSON.stringify(vk.header.unicodeFont.name)}', ` +
|
|
22
|
+
`K102: ${vk.header.flags & 1 /* VisualKeyboard.VisualKeyboardHeaderFlags.kvkh102 */ ? 1 : 0}};${nl}` + // TODO-LDML: escape ' and " in font name correctly
|
|
23
|
+
`${tab}this.KV.KLS={${nl}` +
|
|
24
|
+
`${tab}${tab}TODO_LDML: ${vk.keys.length}${nl}` +
|
|
25
|
+
// TODO-LDML: fill in KLS
|
|
26
|
+
`${tab}}`;
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
compileTouchLayout(source) {
|
|
30
|
+
const tlcompiler = new TouchLayoutCompiler();
|
|
31
|
+
const layout = tlcompiler.compileToJavascript(source);
|
|
32
|
+
const writer = new TouchLayoutFileWriter({ formatted: this.options.saveDebug });
|
|
33
|
+
return writer.compile(layout);
|
|
34
|
+
}
|
|
35
|
+
cleanName(name) {
|
|
36
|
+
let result = this.callbacks.path.basename(name, ".xml" /* KeymanFileTypes.Source.LdmlKeyboard */);
|
|
37
|
+
if (!result) {
|
|
38
|
+
throw new Error(`Invalid file name ${name}`);
|
|
39
|
+
}
|
|
40
|
+
result = result.replaceAll(/[^a-z0-9]/g, '_');
|
|
41
|
+
if (result.match(/^[0-9]/)) {
|
|
42
|
+
// Can't have a digit as initial
|
|
43
|
+
result = '_' + result;
|
|
44
|
+
}
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
compile(name, source) {
|
|
48
|
+
const nl = this.nl, tab = this.tab;
|
|
49
|
+
const sName = 'Keyboard_' + this.cleanName(name);
|
|
50
|
+
const displayUnderlying = true; // TODO-LDML
|
|
51
|
+
const modifierBitmask = 0; // TODO-LDML: define the modifiers used by this keyboard
|
|
52
|
+
const vkDictionary = ''; // TODO-LDML: vk dictionary for touch keys
|
|
53
|
+
const hasSupplementaryPlaneChars = false; // TODO-LDML
|
|
54
|
+
const isRTL = false; // TODO-LDML
|
|
55
|
+
let result = `if(typeof keyman === 'undefined') {${nl}` +
|
|
56
|
+
`${tab}console.error('Keyboard requires KeymanWeb ${MINIMUM_KMW_VERSION} or later');${nl}` +
|
|
57
|
+
`} else {${nl}` +
|
|
58
|
+
`${tab}KeymanWeb.KR(new ${sName}());${nl}` +
|
|
59
|
+
`}${nl}` +
|
|
60
|
+
`function ${sName}() {${nl}` +
|
|
61
|
+
// `${tab}${this.setupDebug()}${nl}` + ? we may use this for modifierBitmask in future
|
|
62
|
+
// `${tab}this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;${nl}` + ? we probably don't need this, it's for back-compat
|
|
63
|
+
`${tab}this.KI="${sName}";${nl}` +
|
|
64
|
+
`${tab}this.KN=${JSON.stringify(source.keyboard.names.name[0])};${nl}` +
|
|
65
|
+
`${tab}this.KMINVER=${JSON.stringify(MINIMUM_KMW_VERSION)};${nl}` +
|
|
66
|
+
`${tab}this.KV=${this.compileVisualKeyboard(source)};${nl}` +
|
|
67
|
+
`${tab}this.KDU=${displayUnderlying ? '1' : '0'};${nl}` +
|
|
68
|
+
`${tab}this.KH="";${nl}` + // TODO-LDML: help text not supported
|
|
69
|
+
`${tab}this.KM=0;${nl}` + // TODO-LDML: mnemonic layout not supported for LDML keyboards
|
|
70
|
+
`${tab}this.KBVER=${JSON.stringify(source.keyboard.version?.number || '0.0')};${nl}` +
|
|
71
|
+
`${tab}this.KMBM=${modifierBitmask};${nl}`;
|
|
72
|
+
if (isRTL) {
|
|
73
|
+
result += `${tab}this.KRTL=1;${nl}`;
|
|
74
|
+
}
|
|
75
|
+
if (hasSupplementaryPlaneChars) {
|
|
76
|
+
result += `${tab}this.KS=1;${nl}`;
|
|
77
|
+
}
|
|
78
|
+
if (vkDictionary != '') {
|
|
79
|
+
result += `${tab}this.KVKD=${JSON.stringify(vkDictionary)};${nl}`;
|
|
80
|
+
}
|
|
81
|
+
let layoutFile = this.compileTouchLayout(source);
|
|
82
|
+
if (layoutFile != '') {
|
|
83
|
+
result += `${tab}this.KVKL=${layoutFile};${nl}`;
|
|
84
|
+
}
|
|
85
|
+
// TODO-LDML: KCSS not supported
|
|
86
|
+
// TODO-LDML: embed binary keyboard for loading into Core
|
|
87
|
+
// A LDML keyboard has a no-op for its gs() (begin Unicode) function,
|
|
88
|
+
// because the functionality is embedded in Keyman Core
|
|
89
|
+
result += `${tab}this.gs=function(t,e){${nl}` +
|
|
90
|
+
`${tab}${tab}return 0;${nl}` + // TODO-LDML: we will start by embedding call into Keyman Core here
|
|
91
|
+
`${tab}};${nl}`;
|
|
92
|
+
result += `}${nl}`;
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# debugId=0be6f19a-9bc1-5da7-af8e-6d8cbcca258d
|
|
97
|
+
//# sourceMappingURL=keymanweb-compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"debug_id":"0be6f19a-9bc1-5da7-af8e-6d8cbcca258d","file":"keymanweb-compiler.js","mappings":";AAAA,OAAO,EAAqB,cAAc,EAAgB,qBAAqB,EAAmB,MAAM,yBAAyB,CAAC;AAElI,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AAEnF,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEnC,MAAM,OAAO,6BAA6B;IAKpB;IAJH,OAAO,CAAsB;IAC7B,EAAE,CAAS;IACX,GAAG,CAAS;IAE7B,YAAoB,SAA4B,EAAE,OAA6B;QAA3D,cAAS,GAAT,SAAS,CAAmB;QAC9C,IAAI,CAAC,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;QAC9B,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7C,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CA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