@keymanapp/kmc-ldml 18.0.16-alpha → 18.0.18-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.
Files changed (48) hide show
  1. package/build/src/compiler/compiler.js +309 -308
  2. package/build/src/compiler/compiler.js.map +1 -1
  3. package/build/src/compiler/disp.js +84 -83
  4. package/build/src/compiler/disp.js.map +1 -1
  5. package/build/src/compiler/empty-compiler.js +116 -115
  6. package/build/src/compiler/empty-compiler.js.map +1 -1
  7. package/build/src/compiler/keymanweb-compiler.js +97 -96
  8. package/build/src/compiler/keymanweb-compiler.js.map +1 -1
  9. package/build/src/compiler/keys.d.ts.map +1 -1
  10. package/build/src/compiler/keys.js +419 -415
  11. package/build/src/compiler/keys.js.map +1 -1
  12. package/build/src/compiler/layr.d.ts.map +1 -1
  13. package/build/src/compiler/layr.js +83 -76
  14. package/build/src/compiler/layr.js.map +1 -1
  15. package/build/src/compiler/ldml-compiler-options.js +5 -4
  16. package/build/src/compiler/ldml-compiler-options.js.map +1 -1
  17. package/build/src/compiler/loca.js +61 -60
  18. package/build/src/compiler/loca.js.map +1 -1
  19. package/build/src/compiler/messages.d.ts +11 -3
  20. package/build/src/compiler/messages.d.ts.map +1 -1
  21. package/build/src/compiler/messages.js +120 -109
  22. package/build/src/compiler/messages.js.map +1 -1
  23. package/build/src/compiler/meta.js +57 -56
  24. package/build/src/compiler/meta.js.map +1 -1
  25. package/build/src/compiler/metadata-compiler.js +49 -48
  26. package/build/src/compiler/metadata-compiler.js.map +1 -1
  27. package/build/src/compiler/section-compiler.js +42 -41
  28. package/build/src/compiler/section-compiler.js.map +1 -1
  29. package/build/src/compiler/substitution-tracker.js +105 -104
  30. package/build/src/compiler/substitution-tracker.js.map +1 -1
  31. package/build/src/compiler/touch-layout-compiler.js +93 -92
  32. package/build/src/compiler/touch-layout-compiler.js.map +1 -1
  33. package/build/src/compiler/tran.d.ts +7 -0
  34. package/build/src/compiler/tran.d.ts.map +1 -1
  35. package/build/src/compiler/tran.js +382 -353
  36. package/build/src/compiler/tran.js.map +1 -1
  37. package/build/src/compiler/vars.d.ts.map +1 -1
  38. package/build/src/compiler/vars.js +236 -227
  39. package/build/src/compiler/vars.js.map +1 -1
  40. package/build/src/compiler/visual-keyboard-compiler.js +70 -69
  41. package/build/src/compiler/visual-keyboard-compiler.js.map +1 -1
  42. package/build/src/main.js +5 -4
  43. package/build/src/main.js.map +1 -1
  44. package/build/src/util/util.d.ts +2 -2
  45. package/build/src/util/util.d.ts.map +1 -1
  46. package/build/src/util/util.js +185 -179
  47. package/build/src/util/util.js.map +1 -1
  48. package/package.json +6 -6
@@ -1,42 +1,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]="0faee5af-6b84-5503-9071-04a423b30093")}catch(e){}}();
2
- import { constants } from '@keymanapp/ldml-keyboard-constants';
3
- export class SectionCompiler {
4
- keyboard3;
5
- callbacks;
6
- constructor(source, callbacks) {
7
- this.keyboard3 = source.keyboard3;
8
- this.callbacks = callbacks;
9
- }
10
- /**
11
- * This is called before compile.
12
- * @returns false if this compiler failed to validate.
13
- */
14
- validate() {
15
- return true;
16
- }
17
- /**
18
- * This is called after all other compile phases have completed,
19
- * when being called by validate(), and provides an
20
- * opportunity for late error reporting, for example for invalid strings.
21
- * @param section the compiled section, if any.
22
- * @returns false if validate fails
23
- */
24
- postValidate(section) {
25
- return true;
26
- }
27
- /**
28
- * Get the dependencies for this compiler.
29
- * @returns set of dependent sections
30
- */
31
- get dependencies() {
32
- const defaults = new Set([
33
- constants.section.strs,
34
- constants.section.list,
35
- constants.section.elem,
36
- constants.section.vars,
37
- ]);
38
- return defaults;
39
- }
40
- }
41
- //# debugId=0faee5af-6b84-5503-9071-04a423b30093
1
+
2
+ !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]="be26e017-8a6f-5472-899a-65c563654944")}catch(e){}}();
3
+ import { constants } from '@keymanapp/ldml-keyboard-constants';
4
+ export class SectionCompiler {
5
+ keyboard3;
6
+ callbacks;
7
+ constructor(source, callbacks) {
8
+ this.keyboard3 = source.keyboard3;
9
+ this.callbacks = callbacks;
10
+ }
11
+ /**
12
+ * This is called before compile.
13
+ * @returns false if this compiler failed to validate.
14
+ */
15
+ validate() {
16
+ return true;
17
+ }
18
+ /**
19
+ * This is called after all other compile phases have completed,
20
+ * when being called by validate(), and provides an
21
+ * opportunity for late error reporting, for example for invalid strings.
22
+ * @param section the compiled section, if any.
23
+ * @returns false if validate fails
24
+ */
25
+ postValidate(section) {
26
+ return true;
27
+ }
28
+ /**
29
+ * Get the dependencies for this compiler.
30
+ * @returns set of dependent sections
31
+ */
32
+ get dependencies() {
33
+ const defaults = new Set([
34
+ constants.section.strs,
35
+ constants.section.list,
36
+ constants.section.elem,
37
+ constants.section.vars,
38
+ ]);
39
+ return defaults;
40
+ }
41
+ }
42
42
  //# sourceMappingURL=section-compiler.js.map
43
+ //# debugId=be26e017-8a6f-5472-899a-65c563654944
@@ -1 +1 @@
1
- {"debug_id":"0faee5af-6b84-5503-9071-04a423b30093","file":"section-compiler.js","mappings":";AACA,OAAO,EAAgB,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAI7E,MAAM,OAAgB,eAAe;IAChB,SAAS,CAA0B;IACnC,SAAS,CAAoB;IAEhD,YAAY,MAA8C,EAAE,SAA4B;QACtF,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAID;;;OAGG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAUD;;;;;;OAMG;IACI,YAAY,CAAC,OAAyB;QAC3C,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
+ {"version":3,"file":"section-compiler.js","sources":["../../../src/compiler/section-compiler.ts"],"sourceRoot":"","names":[],"mappings":";;AACA,OAAO,EAAgB,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAI7E,MAAM,OAAgB,eAAe;IAChB,SAAS,CAA0B;IACnC,SAAS,CAAoB;IAEhD,YAAY,MAA8C,EAAE,SAA4B;QACtF,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAID;;;OAGG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAUD;;;;;;OAMG;IACI,YAAY,CAAC,OAAyB;QAC3C,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","debug_id":"be26e017-8a6f-5472-899a-65c563654944"}
@@ -1,105 +1,106 @@
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]="7aac6235-1791-5d7b-b3ba-a1eebffc6344")}catch(e){}}();
2
- import { MarkerParser, VariableParser } from "@keymanapp/common-types";
3
- /**
4
- * Verb for SubstitutionTracker.add()
5
- */
6
- export var SubstitutionUse;
7
- (function (SubstitutionUse) {
8
- /** outputs this marker into context (e.g. transform to= or key to=) */
9
- SubstitutionUse[SubstitutionUse["emit"] = 0] = "emit";
10
- /** consumes this marker out of the context (e.g. transform from=) */
11
- SubstitutionUse[SubstitutionUse["consume"] = 1] = "consume";
12
- /** matches the marker, but doesn't consume (e.g. display to=) */
13
- SubstitutionUse[SubstitutionUse["match"] = 2] = "match";
14
- /** variable definition: might consume, emit, or match. */
15
- SubstitutionUse[SubstitutionUse["variable"] = 3] = "variable";
16
- })(SubstitutionUse || (SubstitutionUse = {}));
17
- /** Tracks usage of markers */
18
- export class SubstitutionTracker {
19
- /** markers that were emitted */
20
- emitted;
21
- /** markers that were consumed and removed from the context */
22
- consumed;
23
- /** markers that were matched, but not necessarily consumed */
24
- matched;
25
- /** all markers */
26
- all;
27
- constructor() {
28
- this.emitted = new Set();
29
- this.consumed = new Set();
30
- this.matched = new Set();
31
- this.all = new Set();
32
- }
33
- /**
34
- *
35
- * @param verb what kind of use we are adding
36
- * @param markers list of substitutions to add
37
- */
38
- add(verb, markers) {
39
- if (!markers.length) {
40
- return; // skip if empty
41
- }
42
- if (verb == SubstitutionUse.emit) {
43
- markers.forEach((m) => {
44
- this.emitted.add(m);
45
- this.all.add(m);
46
- });
47
- }
48
- else if (verb == SubstitutionUse.consume) {
49
- markers.forEach((m) => {
50
- this.consumed.add(m);
51
- this.all.add(m);
52
- });
53
- }
54
- else if (verb == SubstitutionUse.match) {
55
- markers.forEach((m) => {
56
- this.matched.add(m);
57
- this.all.add(m);
58
- });
59
- }
60
- else if (verb == SubstitutionUse.variable) {
61
- markers.forEach((m) => {
62
- // we don't know, so add it to all three
63
- this.matched.add(m);
64
- this.emitted.add(m);
65
- this.consumed.add(m);
66
- this.all.add(m);
67
- });
68
- /* c8 skip next 3 */
69
- }
70
- else {
71
- throw Error(`Internal error: unsupported verb ${verb} for match`);
72
- }
73
- }
74
- }
75
- /** rollup of several substitution types */
76
- export class Substitutions {
77
- addSetAndStringSubtitution(verb, str) {
78
- this.set.add(verb, VariableParser.allSetReferences(str));
79
- this.addStringAndMarkerSubstitution(verb, str);
80
- }
81
- /** add a string that can have string var substitutions or markers */
82
- addStringAndMarkerSubstitution(verb, str) {
83
- this.addMarkers(verb, str);
84
- this.addStringSubstitution(verb, str);
85
- }
86
- addStringSubstitution(verb, str) {
87
- this.string.add(verb, VariableParser.allStringReferences(str));
88
- }
89
- /** add a string that's just markers */
90
- addMarkers(verb, str) {
91
- this.markers.add(verb, MarkerParser.allReferences(str));
92
- }
93
- markers;
94
- set;
95
- string;
96
- uset;
97
- constructor() {
98
- this.markers = new SubstitutionTracker();
99
- this.set = new SubstitutionTracker();
100
- this.string = new SubstitutionTracker();
101
- this.uset = new SubstitutionTracker();
102
- }
103
- }
104
- //# debugId=7aac6235-1791-5d7b-b3ba-a1eebffc6344
1
+
2
+ !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]="1fdfe3f8-d593-5e7f-9858-74311b2316dd")}catch(e){}}();
3
+ import { MarkerParser, VariableParser } from "@keymanapp/common-types";
4
+ /**
5
+ * Verb for SubstitutionTracker.add()
6
+ */
7
+ export var SubstitutionUse;
8
+ (function (SubstitutionUse) {
9
+ /** outputs this marker into context (e.g. transform to= or key to=) */
10
+ SubstitutionUse[SubstitutionUse["emit"] = 0] = "emit";
11
+ /** consumes this marker out of the context (e.g. transform from=) */
12
+ SubstitutionUse[SubstitutionUse["consume"] = 1] = "consume";
13
+ /** matches the marker, but doesn't consume (e.g. display to=) */
14
+ SubstitutionUse[SubstitutionUse["match"] = 2] = "match";
15
+ /** variable definition: might consume, emit, or match. */
16
+ SubstitutionUse[SubstitutionUse["variable"] = 3] = "variable";
17
+ })(SubstitutionUse || (SubstitutionUse = {}));
18
+ /** Tracks usage of markers */
19
+ export class SubstitutionTracker {
20
+ /** markers that were emitted */
21
+ emitted;
22
+ /** markers that were consumed and removed from the context */
23
+ consumed;
24
+ /** markers that were matched, but not necessarily consumed */
25
+ matched;
26
+ /** all markers */
27
+ all;
28
+ constructor() {
29
+ this.emitted = new Set();
30
+ this.consumed = new Set();
31
+ this.matched = new Set();
32
+ this.all = new Set();
33
+ }
34
+ /**
35
+ *
36
+ * @param verb what kind of use we are adding
37
+ * @param markers list of substitutions to add
38
+ */
39
+ add(verb, markers) {
40
+ if (!markers.length) {
41
+ return; // skip if empty
42
+ }
43
+ if (verb == SubstitutionUse.emit) {
44
+ markers.forEach((m) => {
45
+ this.emitted.add(m);
46
+ this.all.add(m);
47
+ });
48
+ }
49
+ else if (verb == SubstitutionUse.consume) {
50
+ markers.forEach((m) => {
51
+ this.consumed.add(m);
52
+ this.all.add(m);
53
+ });
54
+ }
55
+ else if (verb == SubstitutionUse.match) {
56
+ markers.forEach((m) => {
57
+ this.matched.add(m);
58
+ this.all.add(m);
59
+ });
60
+ }
61
+ else if (verb == SubstitutionUse.variable) {
62
+ markers.forEach((m) => {
63
+ // we don't know, so add it to all three
64
+ this.matched.add(m);
65
+ this.emitted.add(m);
66
+ this.consumed.add(m);
67
+ this.all.add(m);
68
+ });
69
+ /* c8 skip next 3 */
70
+ }
71
+ else {
72
+ throw Error(`Internal error: unsupported verb ${verb} for match`);
73
+ }
74
+ }
75
+ }
76
+ /** rollup of several substitution types */
77
+ export class Substitutions {
78
+ addSetAndStringSubtitution(verb, str) {
79
+ this.set.add(verb, VariableParser.allSetReferences(str));
80
+ this.addStringAndMarkerSubstitution(verb, str);
81
+ }
82
+ /** add a string that can have string var substitutions or markers */
83
+ addStringAndMarkerSubstitution(verb, str) {
84
+ this.addMarkers(verb, str);
85
+ this.addStringSubstitution(verb, str);
86
+ }
87
+ addStringSubstitution(verb, str) {
88
+ this.string.add(verb, VariableParser.allStringReferences(str));
89
+ }
90
+ /** add a string that's just markers */
91
+ addMarkers(verb, str) {
92
+ this.markers.add(verb, MarkerParser.allReferences(str));
93
+ }
94
+ markers;
95
+ set;
96
+ string;
97
+ uset;
98
+ constructor() {
99
+ this.markers = new SubstitutionTracker();
100
+ this.set = new SubstitutionTracker();
101
+ this.string = new SubstitutionTracker();
102
+ this.uset = new SubstitutionTracker();
103
+ }
104
+ }
105
105
  //# sourceMappingURL=substitution-tracker.js.map
106
+ //# debugId=1fdfe3f8-d593-5e7f-9858-74311b2316dd
@@ -1 +1 @@
1
- {"debug_id":"7aac6235-1791-5d7b-b3ba-a1eebffc6344","file":"substitution-tracker.js","mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEvE;;GAEG;AACH,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACzB,uEAAuE;IACvE,qDAAI,CAAA;IACJ,qEAAqE;IACrE,2DAAO,CAAA;IACP,iEAAiE;IACjE,uDAAK,CAAA;IACL,0DAA0D;IAC1D,6DAAQ,CAAA;AACV,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B;AAID,8BAA8B;AAC9B,MAAM,OAAO,mBAAmB;IAC9B,gCAAgC;IAChC,OAAO,CAAkB;IACzB,8DAA8D;IAC9D,QAAQ,CAAkB;IAC1B,8DAA8D;IAC9D,OAAO,CAAkB;IACzB,kBAAkB;IAClB,GAAG,CAAkB;IAErB;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,CAAC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AAC;IACxC,CAAC;CACF","names":[],"sourceRoot":"","sources":["../../../src/compiler/substitution-tracker.ts"],"version":3}
1
+ {"version":3,"file":"substitution-tracker.js","sources":["../../../src/compiler/substitution-tracker.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEvE;;GAEG;AACH,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACzB,uEAAuE;IACvE,qDAAI,CAAA;IACJ,qEAAqE;IACrE,2DAAO,CAAA;IACP,iEAAiE;IACjE,uDAAK,CAAA;IACL,0DAA0D;IAC1D,6DAAQ,CAAA;AACV,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B;AAID,8BAA8B;AAC9B,MAAM,OAAO,mBAAmB;IAC9B,gCAAgC;IAChC,OAAO,CAAkB;IACzB,8DAA8D;IAC9D,QAAQ,CAAkB;IAC1B,8DAA8D;IAC9D,OAAO,CAAkB;IACzB,kBAAkB;IAClB,GAAG,CAAkB;IAErB;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,IAAqB,EAAE,OAAiB;QAC1C,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,OAAO,CAAC,gBAAgB;SACzB;QACD,IAAI,IAAI,IAAI,eAAe,CAAC,IAAI,EAAE;YAChC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;gBACpB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBACpB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAClB,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8BAA8B,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACjD,CAAC;IACD,qEAAqE;IACrE,8BAA8B,CAAC,IAAqB,EAAE,GAAY;QAChE,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,qBAAqB,CAAC,IAAqB,EAAE,GAAY;QACvD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC;IACjE,CAAC;IACD,uCAAuC;IACvC,UAAU,CAAC,IAAqB,EAAE,GAAY;QAC5C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,CAAsB;IAC7B,GAAG,CAAsB;IACzB,MAAM,CAAsB;IAC5B,IAAI,CAAsB;IAE1B;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,mBAAmB,EAAE,CAAC;QACzC,IAAI,CAAC,GAAG,GAAG,IAAI,mBAAmB,EAAE,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,mBAAmB,EAAE,CAAC;IACxC,CAAC;CACF","debug_id":"1fdfe3f8-d593-5e7f-9858-74311b2316dd"}
@@ -1,93 +1,94 @@
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]="78b01620-18a7-5989-b3da-211b0c74b4b0")}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.keyboard3.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.modifiers),
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.keyboard3.keys?.key?.find(x => x.id == key);
32
- if (keydef) {
33
- const fileKey = {
34
- id: this.translateKeyIdentifierToTouch(keydef.id),
35
- text: keydef.output || '',
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
- // TODO-LDML: need to support multiple here
70
- if (modifier && modifier.indexOf(',') !== -1) {
71
- throw Error(`Internal error: TODO-LDML: multiple modifiers ${modifier} not yet supported.`);
72
- }
73
- modifier = (modifier || '').split(/\b/).sort().join(' ').trim();
74
- if (Object.hasOwn(map, modifier)) {
75
- return map[modifier];
76
- }
77
- // TODO-LDML: Other layer names will be used unmodified, is this sufficient?
78
- return id;
79
- }
80
- translateKeyIdentifierToTouch(id) {
81
- // Note: keys identifiers in kmx were traditionally case-insensitive, but we
82
- // are going to use them as case-insensitive for LDML keyboards. The set of
83
- // standard key identifiers a-z, A-Z, 0-9 will be used, where possible, and
84
- // all other keys will be mapped to `T_key`.
85
- if (id.match(/^[0-9a-zA-Z]$/)) {
86
- return 'K_' + id;
87
- }
88
- // Not a standard key
89
- return 'T_' + id;
90
- }
91
- }
92
- //# debugId=78b01620-18a7-5989-b3da-211b0c74b4b0
1
+
2
+ !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]="69297fc7-3014-5509-98ca-7d49188be130")}catch(e){}}();
3
+ export class TouchLayoutCompiler {
4
+ compileToJavascript(source) {
5
+ let result = {};
6
+ // start with desktop to mimic vk emit
7
+ result.desktop = {
8
+ defaultHint: "none",
9
+ layer: []
10
+ };
11
+ for (let layers of source.keyboard3.layers) {
12
+ for (let layer of layers.layer) {
13
+ const resultLayer = this.compileHardwareLayer(source, result, layer);
14
+ result.desktop.layer.push(resultLayer);
15
+ }
16
+ }
17
+ return result;
18
+ }
19
+ compileHardwareLayer(source, file, layer) {
20
+ // TODO-LDML: consider consolidation with keys.ts?
21
+ let fileLayer = {
22
+ id: this.translateLayerIdToTouchLayoutLayerId(layer.id, layer.modifiers),
23
+ row: []
24
+ };
25
+ let y = -1;
26
+ for (let row of layer.row) {
27
+ y++;
28
+ let fileRow = { id: y, key: [] };
29
+ fileLayer.row.push(fileRow);
30
+ const keys = row.keys.split(' ');
31
+ for (let key of keys) {
32
+ const keydef = source.keyboard3.keys?.key?.find(x => x.id == key);
33
+ if (keydef) {
34
+ const fileKey = {
35
+ id: this.translateKeyIdentifierToTouch(keydef.id),
36
+ text: keydef.output || '',
37
+ // TODO-LDML: additional properties
38
+ };
39
+ fileRow.key.push(fileKey);
40
+ }
41
+ else {
42
+ // TODO-LDML: consider logging missing keys
43
+ }
44
+ }
45
+ }
46
+ return fileLayer;
47
+ }
48
+ translateLayerIdToTouchLayoutLayerId(id, modifier) {
49
+ // Touch layout layers have a set of reserved names that correspond to
50
+ // hardware modifiers. We want to map these identifiers first before falling
51
+ // back to the layer ids
52
+ // The set of recognized layer identifiers is:
53
+ //
54
+ // touch | LDML
55
+ // ---------------+-------------
56
+ // default | none
57
+ // shift | shift
58
+ // caps | caps
59
+ // rightalt | altR
60
+ // rightalt-shift | altR shift
61
+ //
62
+ const map = {
63
+ none: 'default',
64
+ shift: 'shift',
65
+ caps: 'caps',
66
+ altR: 'rightalt',
67
+ "altR shift": 'rightalt-shift'
68
+ };
69
+ // canonicalize modifier string, alphabetical
70
+ // TODO-LDML: need to support multiple here
71
+ if (modifier && modifier.indexOf(',') !== -1) {
72
+ throw Error(`Internal error: TODO-LDML: multiple modifiers ${modifier} not yet supported.`);
73
+ }
74
+ modifier = (modifier || '').split(/\b/).sort().join(' ').trim();
75
+ if (Object.hasOwn(map, modifier)) {
76
+ return map[modifier];
77
+ }
78
+ // TODO-LDML: Other layer names will be used unmodified, is this sufficient?
79
+ return id;
80
+ }
81
+ translateKeyIdentifierToTouch(id) {
82
+ // Note: keys identifiers in kmx were traditionally case-insensitive, but we
83
+ // are going to use them as case-insensitive for LDML keyboards. The set of
84
+ // standard key identifiers a-z, A-Z, 0-9 will be used, where possible, and
85
+ // all other keys will be mapped to `T_key`.
86
+ if (id.match(/^[0-9a-zA-Z]$/)) {
87
+ return 'K_' + id;
88
+ }
89
+ // Not a standard key
90
+ return 'T_' + id;
91
+ }
92
+ }
93
93
  //# sourceMappingURL=touch-layout-compiler.js.map
94
+ //# debugId=69297fc7-3014-5509-98ca-7d49188be130
@@ -1 +1 @@
1
- {"debug_id":"78b01620-18a7-5989-b3da-211b0c74b4b0","file":"touch-layout-compiler.js","mappings":";AAEA,MAAM,OAAO,mBAAmB;IACvB,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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
+ {"version":3,"file":"touch-layout-compiler.js","sources":["../../../src/compiler/touch-layout-compiler.ts"],"sourceRoot":"","names":[],"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,SAAS,CAAC,MAAM,EAAE;YACzC,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,MAA8C,EAC9C,IAAiC,EACjC,KAA2B;QAE3B,kDAAkD;QAElD,IAAI,SAAS,GAAiC;YAC5C,EAAE,EAAE,IAAI,CAAC,oCAAoC,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC;YACxE,GAAG,EAAE,EAAE;SACR,CAAC;QAEF,IAAI,CAAC,GAAG,CAAC,CAAC,CAA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F,6CAA6C;QAC7C,2CAA2C;QAC3C,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC5C,MAAM,KAAK,CAAC,iDAAiD,QAAQ,qBAAqB,CAAC,CAAC;SAC7F;QACD,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","debug_id":"69297fc7-3014-5509-98ca-7d49188be130"}
@@ -18,6 +18,13 @@ export declare abstract class TransformCompiler<T extends TransformCompilerType,
18
18
  private compileTransformGroup;
19
19
  private compileTransformTranGroup;
20
20
  private compileTransform;
21
+ /**
22
+ * Validate the final regex
23
+ * @param cookedFrom the regex to use, missing the trailing '$'
24
+ * @param from the original from - for error reporting
25
+ * @returns true if OK
26
+ */
27
+ private isValidRegex;
21
28
  private compileReorderTranGroup;
22
29
  private compileReorder;
23
30
  compile(sections: DependencySections): TranBase;
@@ -1 +1 @@
1
- {"version":3,"file":"tran.d.ts","sourceRoot":"","sources":["../../../src/compiler/tran.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAE,MAAM,oCAAoC,CAAC;AA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