@keymanapp/kmc-ldml 17.0.199-alpha → 17.0.201-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 +3 -4
- package/build/src/compiler/compiler.d.ts.map +1 -1
- package/build/src/compiler/compiler.js +2 -4
- package/build/src/compiler/compiler.js.map +1 -1
- package/build/src/compiler/disp.js +16 -16
- package/build/src/compiler/disp.js.map +1 -1
- package/build/src/compiler/keymanweb-compiler.js +3 -3
- package/build/src/compiler/keymanweb-compiler.js.map +1 -1
- package/build/src/compiler/keys.d.ts +20 -6
- package/build/src/compiler/keys.d.ts.map +1 -1
- package/build/src/compiler/keys.js +163 -86
- package/build/src/compiler/keys.js.map +1 -1
- package/build/src/compiler/layr.js +9 -9
- package/build/src/compiler/layr.js.map +1 -1
- package/build/src/compiler/messages.d.ts +20 -16
- package/build/src/compiler/messages.d.ts.map +1 -1
- package/build/src/compiler/messages.js +21 -20
- package/build/src/compiler/messages.js.map +1 -1
- package/build/src/compiler/meta.d.ts +2 -2
- package/build/src/compiler/meta.d.ts.map +1 -1
- package/build/src/compiler/meta.js +7 -14
- package/build/src/compiler/meta.js.map +1 -1
- package/build/src/compiler/metadata-compiler.js +3 -3
- package/build/src/compiler/metadata-compiler.js.map +1 -1
- package/build/src/compiler/touch-layout-compiler.d.ts +2 -2
- package/build/src/compiler/touch-layout-compiler.d.ts.map +1 -1
- package/build/src/compiler/touch-layout-compiler.js +8 -4
- package/build/src/compiler/touch-layout-compiler.js.map +1 -1
- package/build/src/compiler/visual-keyboard-compiler.js +5 -5
- package/build/src/compiler/visual-keyboard-compiler.js.map +1 -1
- package/build/src/util/util.d.ts +12 -4
- package/build/src/util/util.d.ts.map +1 -1
- package/build/src/util/util.js +67 -9
- package/build/src/util/util.js.map +1 -1
- package/package.json +5 -5
- package/build/src/compiler/name.d.ts +0 -12
- package/build/src/compiler/name.d.ts.map +0 -1
- package/build/src/compiler/name.js +0 -22
- package/build/src/compiler/name.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
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]="
|
|
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]="5fdfc315-e6f3-53c3-8b8e-888e24f63568")}catch(e){}}();
|
|
2
2
|
import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec as m } from "@keymanapp/common-types";
|
|
3
3
|
// const SevInfo = CompilerErrorSeverity.Info | CompilerErrorNamespace.LdmlKeyboardCompiler;
|
|
4
4
|
const SevHint = CompilerErrorSeverity.Hint | CompilerErrorNamespace.LdmlKeyboardCompiler;
|
|
@@ -6,13 +6,13 @@ const SevWarn = CompilerErrorSeverity.Warn | CompilerErrorNamespace.LdmlKeyboard
|
|
|
6
6
|
const SevError = CompilerErrorSeverity.Error | CompilerErrorNamespace.LdmlKeyboardCompiler;
|
|
7
7
|
const SevFatal = CompilerErrorSeverity.Fatal | CompilerErrorNamespace.LdmlKeyboardCompiler;
|
|
8
8
|
export class CompilerMessages {
|
|
9
|
-
static
|
|
10
|
-
static
|
|
9
|
+
static Hint_NormalizationDisabled = () => m(this.HINT_NormalizationDisabled, `normalization=disabled is not recommended.`);
|
|
10
|
+
static HINT_NormalizationDisabled = SevHint | 0x0001;
|
|
11
11
|
static Error_InvalidLocale = (o) => m(this.ERROR_InvalidLocale, `Invalid BCP 47 locale form '${o.tag}'`);
|
|
12
12
|
static ERROR_InvalidLocale = SevError | 0x0002;
|
|
13
13
|
static Error_HardwareLayerHasTooManyRows = () => m(this.ERROR_HardwareLayerHasTooManyRows, `'hardware' layer has too many rows`);
|
|
14
14
|
static ERROR_HardwareLayerHasTooManyRows = SevError | 0x0003;
|
|
15
|
-
static Error_RowOnHardwareLayerHasTooManyKeys = (o) => m(this.ERROR_RowOnHardwareLayerHasTooManyKeys, `Row #${o.row} on 'hardware' ${o.hardware} layer for modifier ${o.
|
|
15
|
+
static Error_RowOnHardwareLayerHasTooManyKeys = (o) => m(this.ERROR_RowOnHardwareLayerHasTooManyKeys, `Row #${o.row} on 'hardware' ${o.hardware} layer for modifier ${o.modifiers || 'none'} has too many keys`);
|
|
16
16
|
static ERROR_RowOnHardwareLayerHasTooManyKeys = SevError | 0x0004;
|
|
17
17
|
static Error_KeyNotFoundInKeyBag = (o) => m(this.ERROR_KeyNotFoundInKeyBag, `Key '${o.keyId}' in position #${o.col} on row #${o.row} of layer ${o.layer}, form '${o.form}' not found in key bag`);
|
|
18
18
|
static ERROR_KeyNotFoundInKeyBag = SevError | 0x0005;
|
|
@@ -26,7 +26,8 @@ export class CompilerMessages {
|
|
|
26
26
|
static ERROR_InvalidScanCode = SevError | 0x0009;
|
|
27
27
|
static Warn_CustomForm = (o) => m(this.WARN_CustomForm, `Custom <form id="${o.id}"> element. Key layout may not be as expected.`);
|
|
28
28
|
static WARN_CustomForm = SevWarn | 0x000A;
|
|
29
|
-
|
|
29
|
+
static Error_GestureKeyNotFoundInKeyBag = (o) => m(this.ERROR_GestureKeyNotFoundInKeyBag, `Key '${o.keyId}' not found in key bag, referenced from other '${o.parentKeyId}' in ${o.attribute}`);
|
|
30
|
+
static ERROR_GestureKeyNotFoundInKeyBag = SevError | 0x000B;
|
|
30
31
|
// 0x000C - available
|
|
31
32
|
static Error_InvalidVersion = (o) => m(this.ERROR_InvalidVersion, `Version number '${o.version}' must be a semantic version format string.`);
|
|
32
33
|
static ERROR_InvalidVersion = SevError | 0x000D;
|
|
@@ -35,31 +36,31 @@ export class CompilerMessages {
|
|
|
35
36
|
static Fatal_SectionCompilerFailed = (o) => m(this.FATAL_SectionCompilerFailed, null, `The compiler for '${o.sect}' failed unexpectedly.`);
|
|
36
37
|
static FATAL_SectionCompilerFailed = SevFatal | 0x000F;
|
|
37
38
|
/** annotate the to= or id= entry */
|
|
38
|
-
static
|
|
39
|
-
if (o.
|
|
40
|
-
return `
|
|
39
|
+
static outputOrKeyId(o) {
|
|
40
|
+
if (o.output && o.keyId) {
|
|
41
|
+
return `output='${o.output}' keyId='${o.keyId}'`;
|
|
41
42
|
}
|
|
42
|
-
else if (o.
|
|
43
|
-
return `
|
|
43
|
+
else if (o.keyId) {
|
|
44
|
+
return `keyId='${o.keyId}'`;
|
|
44
45
|
}
|
|
45
|
-
else if (o.
|
|
46
|
-
return `
|
|
46
|
+
else if (o.output) {
|
|
47
|
+
return `output='${o.output}'`;
|
|
47
48
|
}
|
|
48
49
|
else {
|
|
49
50
|
return '';
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
static Error_DisplayIsRepeated = (o) => m(this.ERROR_DisplayIsRepeated, `display ${CompilerMessages.
|
|
53
|
+
static Error_DisplayIsRepeated = (o) => m(this.ERROR_DisplayIsRepeated, `display ${CompilerMessages.outputOrKeyId(o)} has more than one display entry.`);
|
|
53
54
|
static ERROR_DisplayIsRepeated = SevError | 0x0010;
|
|
54
|
-
static Error_KeyMissingToGapOrSwitch = (o) => m(this.ERROR_KeyMissingToGapOrSwitch, `key id='${o.keyId}' must have either
|
|
55
|
+
static Error_KeyMissingToGapOrSwitch = (o) => m(this.ERROR_KeyMissingToGapOrSwitch, `key id='${o.keyId}' must have either output=, gap=, or layerId=.`);
|
|
55
56
|
static ERROR_KeyMissingToGapOrSwitch = SevError | 0x0011;
|
|
56
|
-
static Error_ExcessHardware = (o) => m(this.ERROR_ExcessHardware, `layers
|
|
57
|
+
static Error_ExcessHardware = (o) => m(this.ERROR_ExcessHardware, `layers formId=${o.formId}: Can only have one non-'touch' element`);
|
|
57
58
|
static ERROR_ExcessHardware = SevError | 0x0012;
|
|
58
|
-
static Error_InvalidHardware = (o) => m(this.ERROR_InvalidHardware, `layers has invalid value
|
|
59
|
+
static Error_InvalidHardware = (o) => m(this.ERROR_InvalidHardware, `layers has invalid value formId=${o.formId}`);
|
|
59
60
|
static ERROR_InvalidHardware = SevError | 0x0013;
|
|
60
|
-
static Error_InvalidModifier = (o) => m(this.ERROR_InvalidModifier, `layer has invalid
|
|
61
|
+
static Error_InvalidModifier = (o) => m(this.ERROR_InvalidModifier, `layer has invalid modifiers='${o.modifiers}' on layer id=${o.layer}`);
|
|
61
62
|
static ERROR_InvalidModifier = SevError | 0x0014;
|
|
62
|
-
static Error_MissingFlicks = (o) => m(this.ERROR_MissingFlicks, `key id=${o.id} refers to missing
|
|
63
|
+
static Error_MissingFlicks = (o) => m(this.ERROR_MissingFlicks, `key id=${o.id} refers to missing flickId=${o.flickId}`);
|
|
63
64
|
static ERROR_MissingFlicks = SevError | 0x0015;
|
|
64
65
|
static Error_DuplicateVariable = (o) => m(this.ERROR_DuplicateVariable, `duplicate variables: id=${o.ids}`);
|
|
65
66
|
static ERROR_DuplicateVariable = SevError | 0x0016;
|
|
@@ -84,8 +85,8 @@ export class CompilerMessages {
|
|
|
84
85
|
static ERROR_CantReferenceSetFromUnicodeSet = SevError | 0x0020;
|
|
85
86
|
static Error_MissingMarkers = (o) => m(this.ERROR_MissingMarkers, `Markers used for matching but not defined: ${o.ids?.join(',')}`);
|
|
86
87
|
static ERROR_MissingMarkers = SevError | 0x0021;
|
|
87
|
-
static Error_DisplayNeedsToOrId = (o) => m(this.ERROR_DisplayNeedsToOrId, `display ${CompilerMessages.
|
|
88
|
+
static Error_DisplayNeedsToOrId = (o) => m(this.ERROR_DisplayNeedsToOrId, `display ${CompilerMessages.outputOrKeyId(o)} needs output= or keyId=, but not both`);
|
|
88
89
|
static ERROR_DisplayNeedsToOrId = SevError | 0x0022;
|
|
89
90
|
}
|
|
90
|
-
//# debugId=
|
|
91
|
+
//# debugId=5fdfc315-e6f3-53c3-8b8e-888e24f63568
|
|
91
92
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|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C;IAEhE,MAAM,CAAC,oBAAoB,GAAG,CAAC,CAAoB,EAAE,EAAE,CACvD,CAAC,CAAC,IAAI,CAAC,oBAAoB,EAAE,8CAA8C,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC/F,MAAM,CAAC,oBAAoB,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEhD,MAAM,CAAC,wBAAwB,GAAG,CAAC,CAAmC,EAAE,EAAE,CAC1E,CAAC,CAAC,IAAI,CAAC,wBAAwB,EAAE,WAAW,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC,wCAAwC,CAAC,CAAC;IACvH,MAAM,CAAC,wBAAwB,GAAG,QAAQ,GAAG,MAAM,CAAC","names":[],"sourceRoot":"","sources":["../../../src/compiler/messages.ts"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
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]="
|
|
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]="ae7661a4-5053-59a0-92c0-af54b545393e")}catch(e){}}();
|
|
2
2
|
import { KMXPlus } from '@keymanapp/common-types';
|
|
3
3
|
import { SectionCompiler } from "./section-compiler.js";
|
|
4
4
|
import DependencySections = KMXPlus.DependencySections;
|
|
@@ -10,5 +10,5 @@ export declare class MetaCompiler extends SectionCompiler {
|
|
|
10
10
|
private validateNormalization;
|
|
11
11
|
compile(sections: DependencySections): Meta;
|
|
12
12
|
}
|
|
13
|
-
//# debugId=
|
|
13
|
+
//# debugId=ae7661a4-5053-59a0-92c0-af54b545393e
|
|
14
14
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"debug_id":"
|
|
1
|
+
{"debug_id":"ae7661a4-5053-59a0-92c0-af54b545393e","file":"meta.d.ts","mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;AACvD,OAAO,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAG3B,qBAAa,YAAa,SAAQ,eAAe;IAE/C,IAAW,EAAE,8DAEZ;IAEM,QAAQ,IAAI,OAAO;IAS1B,OAAO,CAAC,eAAe;IAevB,OAAO,CAAC,qBAAqB;IAOtB,OAAO,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI;CAYnD","names":[],"sourceRoot":"","sources":["../../../src/compiler/meta.ts"],"version":3}
|
|
@@ -1,12 +1,10 @@
|
|
|
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]="
|
|
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]="2c6bbd99-21aa-5bc0-a38d-5bc2b03dd1ac")}catch(e){}}();
|
|
2
2
|
import { constants } from "@keymanapp/ldml-keyboard-constants";
|
|
3
3
|
import { KMXPlus } from '@keymanapp/common-types';
|
|
4
|
-
import { isValidEnumValue } from "../util/util.js";
|
|
5
4
|
import { CompilerMessages } from "./messages.js";
|
|
6
5
|
import { SectionCompiler } from "./section-compiler.js";
|
|
7
6
|
import semver from "semver";
|
|
8
7
|
var Meta = KMXPlus.Meta;
|
|
9
|
-
var Meta_NormalizationForm = KMXPlus.Meta_NormalizationForm;
|
|
10
8
|
var KeyboardSettings = KMXPlus.KeyboardSettings;
|
|
11
9
|
export class MetaCompiler extends SectionCompiler {
|
|
12
10
|
get id() {
|
|
@@ -14,7 +12,7 @@ export class MetaCompiler extends SectionCompiler {
|
|
|
14
12
|
}
|
|
15
13
|
validate() {
|
|
16
14
|
let valid = true;
|
|
17
|
-
valid &&= this.validateNormalization(this.keyboard3.
|
|
15
|
+
valid &&= this.validateNormalization(this.keyboard3.settings?.normalization);
|
|
18
16
|
valid &&= this.validateVersion(this.keyboard3.version?.number);
|
|
19
17
|
return valid;
|
|
20
18
|
}
|
|
@@ -33,11 +31,8 @@ export class MetaCompiler extends SectionCompiler {
|
|
|
33
31
|
return true;
|
|
34
32
|
}
|
|
35
33
|
validateNormalization(normalization) {
|
|
36
|
-
if (normalization
|
|
37
|
-
|
|
38
|
-
this.callbacks.reportMessage(CompilerMessages.Error_InvalidNormalization({ form: normalization }));
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
34
|
+
if (normalization === 'disabled') {
|
|
35
|
+
this.callbacks.reportMessage(CompilerMessages.Hint_NormalizationDisabled());
|
|
41
36
|
}
|
|
42
37
|
return true;
|
|
43
38
|
}
|
|
@@ -46,15 +41,13 @@ export class MetaCompiler extends SectionCompiler {
|
|
|
46
41
|
result.author = sections.strs.allocString(this.keyboard3.info?.author);
|
|
47
42
|
result.conform = sections.strs.allocString(this.keyboard3.conformsTo);
|
|
48
43
|
result.layout = sections.strs.allocString(this.keyboard3.info?.layout);
|
|
49
|
-
result.
|
|
44
|
+
result.name = sections.strs.allocString(this.keyboard3.info?.name);
|
|
50
45
|
result.indicator = sections.strs.allocString(this.keyboard3.info?.indicator);
|
|
51
46
|
result.version = sections.strs.allocString(this.keyboard3.version?.number ?? "0.0.0");
|
|
52
47
|
result.settings =
|
|
53
|
-
(this.keyboard3.settings?.
|
|
54
|
-
(this.keyboard3.settings?.transformFailure == "omit" ? KeyboardSettings.transformFailure : 0) |
|
|
55
|
-
(this.keyboard3.settings?.transformPartial == "hide" ? KeyboardSettings.transformPartial : 0);
|
|
48
|
+
(this.keyboard3.settings?.normalization == "disabled" ? KeyboardSettings.normalizationDisabled : 0);
|
|
56
49
|
return result;
|
|
57
50
|
}
|
|
58
51
|
}
|
|
59
|
-
//# debugId=
|
|
52
|
+
//# debugId=2c6bbd99-21aa-5bc0-a38d-5bc2b03dd1ac
|
|
60
53
|
//# sourceMappingURL=meta.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"debug_id":"
|
|
1
|
+
{"debug_id":"2c6bbd99-21aa-5bc0-a38d-5bc2b03dd1ac","file":"meta.js","mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,IAAO,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAC3B,IAAO,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAEnD,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;QAEjB,KAAK,KAAK,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QAC7E,KAAK,KAAK,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAE/D,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,eAAe,CAAC,aAAsB;QAC5C,IAAG,aAAa,KAAK,SAAS,EAAE;YAC9B,IAAG,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;gBAChC,wCAAwC;gBAC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,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACjF,MAAM,CAAC,OAAO,GAAS,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,IAAI,OAAO,CAAC,CAAC;QAC5F,MAAM,CAAC,QAAQ;YACb,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,aAAa,IAAI,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtG,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","names":[],"sourceRoot":"","sources":["../../../src/compiler/meta.ts"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
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]="
|
|
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]="7c5b0df9-8089-53fa-ab82-3f3d26cdc8ec")}catch(e){}}();
|
|
2
2
|
import { KMX } from '@keymanapp/common-types';
|
|
3
3
|
import KEYMAN_VERSION from "@keymanapp/keyman-version";
|
|
4
4
|
var KMXFile = KMX.KMXFile;
|
|
@@ -20,7 +20,7 @@ export class KMXPlusMetadataCompiler {
|
|
|
20
20
|
// TSS_NAME: User friendly name of keyboard
|
|
21
21
|
keyboard.stores.push({
|
|
22
22
|
dpName: '&NAME',
|
|
23
|
-
dpString: kmxplus.name?.
|
|
23
|
+
dpString: kmxplus.meta?.name?.value ?? 'unknown',
|
|
24
24
|
dwSystemID: KMXFile.TSS_NAME
|
|
25
25
|
});
|
|
26
26
|
if (options.shouldAddCompilerVersion) {
|
|
@@ -45,5 +45,5 @@ export class KMXPlusMetadataCompiler {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
//# debugId=
|
|
48
|
+
//# debugId=7c5b0df9-8089-53fa-ab82-3f3d26cdc8ec
|
|
49
49
|
//# sourceMappingURL=metadata-compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"debug_id":"
|
|
1
|
+
{"debug_id":"7c5b0df9-8089-53fa-ab82-3f3d26cdc8ec","file":"metadata-compiler.js","mappings":";AAAA,OAAO,EAAE,GAAG,EAAW,MAAM,yBAAyB,CAAC;AAEvD,OAAO,cAAc,MAAM,2BAA2B,CAAC;AAGvD,IAAO,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;AAG7B,MAAM,OAAO,uBAAuB;IAClC;;;;OAIG;IACI,MAAM,CAAC,cAAc,CAAC,OAAoB,EAAE,QAAkB,EAAE,OAA4B;QACjG,4EAA4E;QAC5E,iEAAiE;QACjE,0EAA0E;QAC1E,QAAQ;QAER,eAAe;QACf,2BAA2B;QAC3B,2BAA2B;QAC3B,mBAAmB;QAEnB,2CAA2C;QAC3C,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;YACnB,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,IAAI,SAAS;YAChD,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B,CAAC,CAAC;QAEH,IAAG,OAAO,CAAC,wBAAwB,EAAE;YACnC,+CAA+C;YAC/C,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;gBACnB,MAAM,EAAE,EAAE;gBACV,QAAQ,EAAE,cAAc,CAAC,gBAAgB;gBACzC,UAAU,EAAE,OAAO,CAAC,mBAAmB;aACxC,CAAC,CAAC;SACJ;QAED,iEAAiE;QACjE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;YACnB,MAAM,EAAE,kBAAkB;YAC1B,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,KAAK;YAC/C,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC,CAAC,CAAC;QAEH,6CAA6C;QAC7C,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;YACnB,MAAM,EAAE,UAAU;YAClB,QAAQ,EAAE,SAAS;YACnB,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC,CAAC,CAAC;IACL,CAAC;CAEF","names":[],"sourceRoot":"","sources":["../../../src/compiler/metadata-compiler.ts"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
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]="
|
|
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]="e5fd018c-a5c6-5dd5-886b-45fef4f93c61")}catch(e){}}();
|
|
2
2
|
import { TouchLayout, LDMLKeyboard } from "@keymanapp/common-types";
|
|
3
3
|
export declare class TouchLayoutCompiler {
|
|
4
4
|
compileToJavascript(source: LDMLKeyboard.LDMLKeyboardXMLSourceFile): TouchLayout.TouchLayoutFile;
|
|
@@ -6,5 +6,5 @@ export declare class TouchLayoutCompiler {
|
|
|
6
6
|
private translateLayerIdToTouchLayoutLayerId;
|
|
7
7
|
private translateKeyIdentifierToTouch;
|
|
8
8
|
}
|
|
9
|
-
//# debugId=
|
|
9
|
+
//# debugId=e5fd018c-a5c6-5dd5-886b-45fef4f93c61
|
|
10
10
|
//# sourceMappingURL=touch-layout-compiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"debug_id":"
|
|
1
|
+
{"debug_id":"e5fd018c-a5c6-5dd5-886b-45fef4f93c61","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;IAsC5C,OAAO,CAAC,6BAA6B;CAatC","names":[],"sourceRoot":"","sources":["../../../src/compiler/touch-layout-compiler.ts"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
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]="
|
|
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
2
|
export class TouchLayoutCompiler {
|
|
3
3
|
compileToJavascript(source) {
|
|
4
4
|
let result = {};
|
|
@@ -18,7 +18,7 @@ export class TouchLayoutCompiler {
|
|
|
18
18
|
compileHardwareLayer(source, file, layer) {
|
|
19
19
|
// TODO-LDML: consider consolidation with keys.ts?
|
|
20
20
|
let fileLayer = {
|
|
21
|
-
id: this.translateLayerIdToTouchLayoutLayerId(layer.id, layer.
|
|
21
|
+
id: this.translateLayerIdToTouchLayoutLayerId(layer.id, layer.modifiers),
|
|
22
22
|
row: []
|
|
23
23
|
};
|
|
24
24
|
let y = -1;
|
|
@@ -32,7 +32,7 @@ export class TouchLayoutCompiler {
|
|
|
32
32
|
if (keydef) {
|
|
33
33
|
const fileKey = {
|
|
34
34
|
id: this.translateKeyIdentifierToTouch(keydef.id),
|
|
35
|
-
text: keydef.
|
|
35
|
+
text: keydef.output || '',
|
|
36
36
|
// TODO-LDML: additional properties
|
|
37
37
|
};
|
|
38
38
|
fileRow.key.push(fileKey);
|
|
@@ -66,6 +66,10 @@ export class TouchLayoutCompiler {
|
|
|
66
66
|
"altR shift": 'rightalt-shift'
|
|
67
67
|
};
|
|
68
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
|
+
}
|
|
69
73
|
modifier = (modifier || '').split(/\b/).sort().join(' ').trim();
|
|
70
74
|
if (Object.hasOwn(map, modifier)) {
|
|
71
75
|
return map[modifier];
|
|
@@ -85,5 +89,5 @@ export class TouchLayoutCompiler {
|
|
|
85
89
|
return 'T_' + id;
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
|
-
//# debugId=
|
|
92
|
+
//# debugId=78b01620-18a7-5989-b3da-211b0c74b4b0
|
|
89
93
|
//# sourceMappingURL=touch-layout-compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"debug_id":"
|
|
1
|
+
{"debug_id":"78b01620-18a7-5989-b3da-211b0c74b4b0","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,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,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AA4E;QAC5E,wBAAwB;QAExB,8CAA8C;QAC9C,EAAE;QACF,wBAAwB;QACxB,gCAAgC;QAChC,wBAAwB;QACxB,yBAAyB;QACzB,wBAAwB;QACxB,wBAAwB;QACxB,8BAA8B;QAC9B,EAAE;QACF,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,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","names":[],"sourceRoot":"","sources":["../../../src/compiler/touch-layout-compiler.ts"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
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]="
|
|
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]="1877cefa-0ac4-5791-85a6-dd5b8b1d90f9")}catch(e){}}();
|
|
2
2
|
import { VisualKeyboard } from "@keymanapp/common-types";
|
|
3
3
|
import { KeysCompiler } from "./keys.js";
|
|
4
4
|
export class LdmlKeyboardVisualKeyboardCompiler {
|
|
@@ -12,9 +12,9 @@ export class LdmlKeyboardVisualKeyboardCompiler {
|
|
|
12
12
|
result.header.ansiFont = { ...VisualKeyboard.DEFAULT_KVK_FONT };
|
|
13
13
|
result.header.unicodeFont = { ...VisualKeyboard.DEFAULT_KVK_FONT };
|
|
14
14
|
for (let layers of source.keyboard3.layers) {
|
|
15
|
-
const
|
|
15
|
+
const { formId } = layers;
|
|
16
16
|
for (let layer of layers.layer) {
|
|
17
|
-
this.compileHardwareLayer(source, result, layer,
|
|
17
|
+
this.compileHardwareLayer(source, result, layer, formId);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
return result;
|
|
@@ -42,7 +42,7 @@ export class LdmlKeyboardVisualKeyboardCompiler {
|
|
|
42
42
|
vk.keys.push({
|
|
43
43
|
flags: 2 /* VisualKeyboard.VisualKeyboardKeyFlags.kvkkUnicode */,
|
|
44
44
|
shift: shift,
|
|
45
|
-
text: keydef.
|
|
45
|
+
text: keydef.output,
|
|
46
46
|
vkey: keymap[y][x],
|
|
47
47
|
});
|
|
48
48
|
}
|
|
@@ -56,5 +56,5 @@ export class LdmlKeyboardVisualKeyboardCompiler {
|
|
|
56
56
|
return 0;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
//# debugId=
|
|
59
|
+
//# debugId=1877cefa-0ac4-5791-85a6-dd5b8b1d90f9
|
|
60
60
|
//#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AC;IACX,CAAC;CACF","names":[],"sourceRoot":"","sources":["../../../src/compiler/visual-keyboard-compiler.ts"],"version":3}
|
package/build/src/util/util.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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]="
|
|
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]="48df3e4a-a85c-5022-97de-8680e38434cc")}catch(e){}}();
|
|
2
2
|
import { LDMLKeyboard } from "@keymanapp/common-types";
|
|
3
3
|
/**
|
|
4
4
|
* Verifies that value is an item in the enumeration.
|
|
@@ -13,12 +13,20 @@ export declare function isValidEnumValue<T extends {
|
|
|
13
13
|
* @returns Array of unique keys. Order is not specified.
|
|
14
14
|
*/
|
|
15
15
|
export declare function calculateUniqueKeys(keys?: LDMLKeyboard.LKKey[]): LDMLKeyboard.LKKey[];
|
|
16
|
+
/** Convert an array of keys to a hash */
|
|
17
|
+
export declare function hashKeys(keys?: LDMLKeyboard.LKKey[]): Map<string, LDMLKeyboard.LKKey>;
|
|
18
|
+
export declare function hashFlicks(flicks?: LDMLKeyboard.LKFlick[]): Map<string, LDMLKeyboard.LKFlick>;
|
|
16
19
|
/**
|
|
17
|
-
*
|
|
18
20
|
* @param layersList list of layers elements, from `keyboard?.layers`
|
|
19
21
|
* @returns set of key IDs
|
|
20
22
|
*/
|
|
21
|
-
export declare function allUsedKeyIdsInLayers(layersList
|
|
23
|
+
export declare function allUsedKeyIdsInLayers(layersList?: LDMLKeyboard.LKLayers[]): Set<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Extract all of the key ids that this key refers to, not counting flicks
|
|
26
|
+
* @returns map from the key id to a set of attribute names (such as `multiTapDefaultKeyId` etc.) used by that key.
|
|
27
|
+
*/
|
|
28
|
+
export declare function allUsedKeyIdsInKey(key: LDMLKeyboard.LKKey): Map<string, string[]>;
|
|
29
|
+
export declare function allUsedKeyIdsInFlick(flick?: LDMLKeyboard.LKFlick): Set<string>;
|
|
22
30
|
/**
|
|
23
31
|
* Helper function for validating child elements. Written for the convenience of message passing functions.
|
|
24
32
|
*
|
|
@@ -40,5 +48,5 @@ export declare function translateLayerAttrToModifier(layer: LDMLKeyboard.LKLayer
|
|
|
40
48
|
* @returns true if valid
|
|
41
49
|
*/
|
|
42
50
|
export declare function validModifier(modifier?: string): boolean;
|
|
43
|
-
//# debugId=
|
|
51
|
+
//# debugId=48df3e4a-a85c-5022-97de-8680e38434cc
|
|
44
52
|
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"debug_id":"
|
|
1
|
+
{"debug_id":"48df3e4a-a85c-5022-97de-8680e38434cc","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,yCAAyC;AACzC,wBAAgB,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,KAAK,EAAE,GAAI,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,CAMtF;AAED,wBAAgB,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,EAAE,GAAI,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,CAM9F;AAGD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAgBvF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAG,YAAY,CAAC,KAAK,GAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAuBnF;AAED,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,EAAG,YAAY,CAAC,OAAO,GAAI,GAAG,CAAC,MAAM,CAAC,CAQhF;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,CAgBjF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAI,OAAO,CAWzD","names":[],"sourceRoot":"","sources":["../../../src/util/util.ts"],"version":3}
|
package/build/src/util/util.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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]="
|
|
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]="a430db0c-07f0-5c0e-9373-ad4732a23941")}catch(e){}}();
|
|
2
2
|
import { constants } from "@keymanapp/ldml-keyboard-constants";
|
|
3
3
|
/**
|
|
4
4
|
* Verifies that value is an item in the enumeration.
|
|
@@ -29,8 +29,22 @@ export function calculateUniqueKeys(keys) {
|
|
|
29
29
|
});
|
|
30
30
|
return uniqueKeys;
|
|
31
31
|
}
|
|
32
|
+
/** Convert an array of keys to a hash */
|
|
33
|
+
export function hashKeys(keys) {
|
|
34
|
+
const m = new Map();
|
|
35
|
+
for (const k of keys ?? []) {
|
|
36
|
+
m.set(k.id, k);
|
|
37
|
+
}
|
|
38
|
+
return m;
|
|
39
|
+
}
|
|
40
|
+
export function hashFlicks(flicks) {
|
|
41
|
+
const m = new Map();
|
|
42
|
+
for (const k of flicks ?? []) {
|
|
43
|
+
m.set(k.id, k);
|
|
44
|
+
}
|
|
45
|
+
return m;
|
|
46
|
+
}
|
|
32
47
|
/**
|
|
33
|
-
*
|
|
34
48
|
* @param layersList list of layers elements, from `keyboard?.layers`
|
|
35
49
|
* @returns set of key IDs
|
|
36
50
|
*/
|
|
@@ -51,6 +65,43 @@ export function allUsedKeyIdsInLayers(layersList) {
|
|
|
51
65
|
}
|
|
52
66
|
return s;
|
|
53
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Extract all of the key ids that this key refers to, not counting flicks
|
|
70
|
+
* @returns map from the key id to a set of attribute names (such as `multiTapDefaultKeyId` etc.) used by that key.
|
|
71
|
+
*/
|
|
72
|
+
export function allUsedKeyIdsInKey(key) {
|
|
73
|
+
const m = new Map();
|
|
74
|
+
/** add one key */
|
|
75
|
+
function addKey(keyId, attr) {
|
|
76
|
+
if (!keyId)
|
|
77
|
+
return;
|
|
78
|
+
if (!m.has(keyId))
|
|
79
|
+
m.set(keyId, []);
|
|
80
|
+
m.get(keyId).push(attr);
|
|
81
|
+
}
|
|
82
|
+
/** add a set of keys */
|
|
83
|
+
function addKeys(keyIds, attr) {
|
|
84
|
+
if (!keyIds)
|
|
85
|
+
return;
|
|
86
|
+
for (const keyId of keyIds?.split(' ')) {
|
|
87
|
+
addKey(keyId, attr);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const { longPressKeyIds, longPressDefaultKeyId, multiTapKeyIds } = key;
|
|
91
|
+
addKey(longPressDefaultKeyId, 'longPressDefaultKeyId');
|
|
92
|
+
addKeys(longPressKeyIds, 'longPressKeyIds');
|
|
93
|
+
addKeys(multiTapKeyIds, 'multiTapKeyIds');
|
|
94
|
+
return m;
|
|
95
|
+
}
|
|
96
|
+
export function allUsedKeyIdsInFlick(flick) {
|
|
97
|
+
const s = new Set();
|
|
98
|
+
if (flick) {
|
|
99
|
+
for (const { keyId } of flick.flickSegment) {
|
|
100
|
+
s.add(keyId);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return s;
|
|
104
|
+
}
|
|
54
105
|
/**
|
|
55
106
|
* Helper function for validating child elements. Written for the convenience of message passing functions.
|
|
56
107
|
*
|
|
@@ -92,10 +143,14 @@ export function verifyValidAndUnique(values, onDuplicate, allowed, onInvalid) {
|
|
|
92
143
|
* @returns modifier
|
|
93
144
|
*/
|
|
94
145
|
export function translateLayerAttrToModifier(layer) {
|
|
95
|
-
const {
|
|
96
|
-
if (
|
|
146
|
+
const { modifiers } = layer;
|
|
147
|
+
if (modifiers) {
|
|
148
|
+
// TODO-LDML
|
|
149
|
+
if (modifiers.indexOf(',') !== -1) {
|
|
150
|
+
throw Error(`TODO-LDML #9838: ”,” in modifiers not supported yet.`);
|
|
151
|
+
}
|
|
97
152
|
let mod = constants.keys_mod_none;
|
|
98
|
-
for (let str of
|
|
153
|
+
for (let str of modifiers.split(' ')) {
|
|
99
154
|
const submod = constants.keys_mod_map.get(str);
|
|
100
155
|
mod |= submod;
|
|
101
156
|
}
|
|
@@ -111,12 +166,15 @@ export function translateLayerAttrToModifier(layer) {
|
|
|
111
166
|
export function validModifier(modifier) {
|
|
112
167
|
if (!modifier)
|
|
113
168
|
return true; // valid to have no modifier, == none
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
169
|
+
// TODO-LDML: enforce illegal combinations per spec.
|
|
170
|
+
for (let sub of modifier.split(',')) {
|
|
171
|
+
for (let str of sub.split(' ')) {
|
|
172
|
+
if (!constants.keys_mod_map.has(str)) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
117
175
|
}
|
|
118
176
|
}
|
|
119
177
|
return true;
|
|
120
178
|
}
|
|
121
|
-
//# debugId=
|
|
179
|
+
//# debugId=a430db0c-07f0-5c0e-9373-ad4732a23941
|
|
122
180
|
//# sourceMappingURL=util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"debug_id":"
|
|
1
|
+
{"debug_id":"a430db0c-07f0-5c0e-9373-ad4732a23941","file":"util.js","mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAA6C,GAAM,EAAE,KAAa;IAChG,OAAQ,MAAM,CAAC,MAAM,CAAC,GAAG,CAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAA2B;IAC7D,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,EAAE,CAAC;KACX;IACD,oDAAoD;IACpD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,mBAAmB;IACvD,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;IACtC,0DAA0D;IAC1D,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;QAC/C,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YACxB,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACpB,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,yCAAyC;AACzC,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AAG,CAAC,GAAG,CAAC,CAAC;YAC/C,GAAG,IAAI,MAAM,CAAC;SACf;QACD,OAAO,GAAG,CAAC;KACZ;IACD,yCAAyC;IACzC,OAAO,SAAS,CAAC,aAAa,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,QAAiB;IAC7C,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC,CAAE,qCAAqC;IAClE,oDAAoD;IACpD,KAAK,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QACnC,KAAK,IAAI,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YAC9B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBACpC,OAAO,KAAK,CAAC;aACd;SACF;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC","names":[],"sourceRoot":"","sources":["../../../src/util/util.ts"],"version":3}
|
package/package.json
CHANGED
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"url": "https://github.com/keymanapp/keyman/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@keymanapp/keyman-version": "17.0.
|
|
30
|
-
"@keymanapp/kmc-kmn": "17.0.
|
|
31
|
-
"@keymanapp/ldml-keyboard-constants": "17.0.
|
|
29
|
+
"@keymanapp/keyman-version": "17.0.201-alpha",
|
|
30
|
+
"@keymanapp/kmc-kmn": "17.0.201-alpha",
|
|
31
|
+
"@keymanapp/ldml-keyboard-constants": "17.0.201-alpha",
|
|
32
32
|
"restructure": "git+https://github.com/keymanapp/dependency-restructure.git#7a188a1e26f8f36a175d95b67ffece8702363dfc",
|
|
33
33
|
"semver": "^7.5.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@keymanapp/developer-test-helpers": "17.0.
|
|
36
|
+
"@keymanapp/developer-test-helpers": "17.0.201-alpha",
|
|
37
37
|
"@types/chai": "^4.1.7",
|
|
38
38
|
"@types/mocha": "^5.2.7",
|
|
39
39
|
"@types/node": "^20.4.1",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"type": "git",
|
|
66
66
|
"url": "git+https://github.com/keymanapp/keyman.git"
|
|
67
67
|
},
|
|
68
|
-
"version": "17.0.
|
|
68
|
+
"version": "17.0.201-alpha"
|
|
69
69
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
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]="3e3c65e9-5600-5318-a7b7-635a654de810")}catch(e){}}();
|
|
2
|
-
import { KMXPlus } from '@keymanapp/common-types';
|
|
3
|
-
import { SectionCompiler } from "./section-compiler.js";
|
|
4
|
-
import DependencySections = KMXPlus.DependencySections;
|
|
5
|
-
import Name = KMXPlus.Name;
|
|
6
|
-
export declare class NameCompiler extends SectionCompiler {
|
|
7
|
-
get id(): import("@keymanapp/ldml-keyboard-constants").SectionIdent;
|
|
8
|
-
validate(): boolean;
|
|
9
|
-
compile(sections: DependencySections): Name;
|
|
10
|
-
}
|
|
11
|
-
//# debugId=3e3c65e9-5600-5318-a7b7-635a654de810
|
|
12
|
-
//# sourceMappingURL=name.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"debug_id":"3e3c65e9-5600-5318-a7b7-635a654de810","file":"name.d.ts","mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;AACvD,OAAO,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAE3B,qBAAa,YAAa,SAAQ,eAAe;IAE/C,IAAW,EAAE,8DAEZ;IAEM,QAAQ,IAAI,OAAO;IAMnB,OAAO,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI;CAKnD","names":[],"sourceRoot":"","sources":["../../../src/compiler/name.ts"],"version":3}
|