@keymanapp/kmc-ldml 18.0.40-alpha → 18.0.45-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 (58) hide show
  1. package/build/src/compiler/compiler.d.ts +123 -123
  2. package/build/src/compiler/compiler.js +307 -310
  3. package/build/src/compiler/compiler.js.map +1 -1
  4. package/build/src/compiler/disp.d.ts +11 -11
  5. package/build/src/compiler/disp.js +82 -85
  6. package/build/src/compiler/disp.js.map +1 -1
  7. package/build/src/compiler/empty-compiler.d.ts +37 -37
  8. package/build/src/compiler/empty-compiler.js +114 -117
  9. package/build/src/compiler/empty-compiler.js.map +1 -1
  10. package/build/src/compiler/keymanweb-compiler.d.ts +13 -13
  11. package/build/src/compiler/keymanweb-compiler.js +95 -98
  12. package/build/src/compiler/keymanweb-compiler.js.map +1 -1
  13. package/build/src/compiler/keys.d.ts +53 -53
  14. package/build/src/compiler/keys.js +417 -420
  15. package/build/src/compiler/keys.js.map +1 -1
  16. package/build/src/compiler/layr.d.ts +9 -9
  17. package/build/src/compiler/layr.js +81 -84
  18. package/build/src/compiler/layr.js.map +1 -1
  19. package/build/src/compiler/ldml-compiler-options.d.ts +11 -11
  20. package/build/src/compiler/ldml-compiler-options.js +3 -6
  21. package/build/src/compiler/ldml-compiler-options.js.map +1 -1
  22. package/build/src/compiler/loca.d.ts +15 -15
  23. package/build/src/compiler/loca.js +59 -62
  24. package/build/src/compiler/loca.js.map +1 -1
  25. package/build/src/compiler/messages.d.ts +186 -186
  26. package/build/src/compiler/messages.js +122 -125
  27. package/build/src/compiler/messages.js.map +1 -1
  28. package/build/src/compiler/meta.d.ts +13 -13
  29. package/build/src/compiler/meta.js +55 -58
  30. package/build/src/compiler/meta.js.map +1 -1
  31. package/build/src/compiler/metadata-compiler.d.ts +12 -12
  32. package/build/src/compiler/metadata-compiler.js +47 -50
  33. package/build/src/compiler/metadata-compiler.js.map +1 -1
  34. package/build/src/compiler/section-compiler.d.ts +35 -35
  35. package/build/src/compiler/section-compiler.js +40 -43
  36. package/build/src/compiler/section-compiler.js.map +1 -1
  37. package/build/src/compiler/substitution-tracker.d.ts +47 -47
  38. package/build/src/compiler/substitution-tracker.js +103 -106
  39. package/build/src/compiler/substitution-tracker.js.map +1 -1
  40. package/build/src/compiler/touch-layout-compiler.d.ts +7 -7
  41. package/build/src/compiler/touch-layout-compiler.js +91 -94
  42. package/build/src/compiler/touch-layout-compiler.js.map +1 -1
  43. package/build/src/compiler/tran.d.ts +57 -57
  44. package/build/src/compiler/tran.js +388 -391
  45. package/build/src/compiler/tran.js.map +1 -1
  46. package/build/src/compiler/vars.d.ts +21 -21
  47. package/build/src/compiler/vars.js +234 -237
  48. package/build/src/compiler/vars.js.map +1 -1
  49. package/build/src/compiler/visual-keyboard-compiler.d.ts +8 -8
  50. package/build/src/compiler/visual-keyboard-compiler.js +68 -71
  51. package/build/src/compiler/visual-keyboard-compiler.js.map +1 -1
  52. package/build/src/main.d.ts +3 -3
  53. package/build/src/main.js +3 -6
  54. package/build/src/main.js.map +1 -1
  55. package/build/src/util/util.d.ts +49 -49
  56. package/build/src/util/util.js +183 -186
  57. package/build/src/util/util.js.map +1 -1
  58. package/package.json +6 -6
@@ -1,186 +1,183 @@
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]="92c01187-7818-5f35-9ffc-8e06975000b5")}catch(e){}}();
3
- import { constants } from "@keymanapp/ldml-keyboard-constants";
4
- /**
5
- * Verifies that value is an item in the enumeration.
6
- */
7
- export function isValidEnumValue(enu, value) {
8
- return Object.values(enu).includes(value);
9
- }
10
- /**
11
- * Returns unique LKKeys only, preserving later ones
12
- * in case of conflict. (i.e. later overrides)
13
- * @param keys list of keys to consider. (mutated)
14
- * @returns Array of unique keys. Order is not specified.
15
- */
16
- export function calculateUniqueKeys(keys) {
17
- if (!keys) {
18
- return [];
19
- }
20
- // Need 'newer' (later) keys to override older ones.
21
- const reverseKeys = keys.reverse(); // newest to oldest
22
- const alreadySeen = new Set();
23
- // filter out only the keys that haven't already been seen
24
- const uniqueKeys = reverseKeys.filter(({ id }) => {
25
- if (!alreadySeen.has(id)) {
26
- alreadySeen.add(id);
27
- return true;
28
- }
29
- return false;
30
- });
31
- return uniqueKeys;
32
- }
33
- /** Convert an array of keys to a hash */
34
- export function hashKeys(keys) {
35
- const m = new Map();
36
- for (const k of keys ?? []) {
37
- m.set(k.id, k);
38
- }
39
- return m;
40
- }
41
- export function hashFlicks(flicks) {
42
- const m = new Map();
43
- for (const k of flicks ?? []) {
44
- m.set(k.id, k);
45
- }
46
- return m;
47
- }
48
- /**
49
- * @param layersList list of layers elements, from `keyboard?.layers`
50
- * @returns set of key IDs
51
- */
52
- export function allUsedKeyIdsInLayers(layersList) {
53
- const s = new Set();
54
- if (layersList) {
55
- for (const layers of layersList || []) {
56
- for (const layer of layers.layer || []) {
57
- for (const row of layer.row || []) {
58
- if (row.keys) {
59
- for (const k of row.keys.split(" ")) {
60
- s.add(k);
61
- }
62
- }
63
- }
64
- }
65
- }
66
- }
67
- return s;
68
- }
69
- /**
70
- * Extract all of the key ids that this key refers to, not counting flicks
71
- * @returns map from the key id to a set of attribute names (such as `multiTapDefaultKeyId` etc.) used by that key.
72
- */
73
- export function allUsedKeyIdsInKey(key) {
74
- const m = new Map();
75
- /** add one key */
76
- function addKey(keyId, attr) {
77
- if (!keyId)
78
- return;
79
- if (!m.has(keyId))
80
- m.set(keyId, []);
81
- m.get(keyId).push(attr);
82
- }
83
- /** add a set of keys */
84
- function addKeys(keyIds, attr) {
85
- if (!keyIds)
86
- return;
87
- for (const keyId of keyIds?.split(' ')) {
88
- addKey(keyId, attr);
89
- }
90
- }
91
- const { longPressKeyIds, longPressDefaultKeyId, multiTapKeyIds } = key;
92
- addKey(longPressDefaultKeyId, 'longPressDefaultKeyId');
93
- addKeys(longPressKeyIds, 'longPressKeyIds');
94
- addKeys(multiTapKeyIds, 'multiTapKeyIds');
95
- return m;
96
- }
97
- export function allUsedKeyIdsInFlick(flick) {
98
- const s = new Set();
99
- if (flick) {
100
- for (const { keyId } of flick.flickSegment) {
101
- s.add(keyId);
102
- }
103
- }
104
- return s;
105
- }
106
- /**
107
- * Helper function for validating child elements. Written for the convenience of message passing functions.
108
- *
109
- * @param values array of values to check
110
- * @param onDuplicate callback with array of duplicate values, deduped
111
- * @param allowed optional set of valid values
112
- * @param onInvalid callback with array of invalid values, deduped
113
- * @returns true if all OK
114
- */
115
- export function verifyValidAndUnique(values, onDuplicate, allowed, onInvalid) {
116
- const dups = [];
117
- const invalids = [];
118
- const seen = new Set();
119
- for (const value of values) {
120
- if (allowed && !allowed.has(value)) {
121
- invalids.push(value);
122
- }
123
- if (seen.has(value)) {
124
- dups.push(value);
125
- }
126
- else {
127
- seen.add(value);
128
- }
129
- }
130
- function dedupedSortedArray(values) {
131
- return Array.from(new Set(values)).sort();
132
- }
133
- if (dups.length > 0 && onDuplicate) {
134
- onDuplicate(dedupedSortedArray(dups));
135
- }
136
- if (invalids.length > 0 && onInvalid) {
137
- onInvalid(dedupedSortedArray(invalids));
138
- }
139
- return (!dups.length && !invalids.length);
140
- }
141
- /**
142
- * Determine modifier from layer info
143
- * @param layer layer obj
144
- * @returns modifier array
145
- */
146
- export function translateLayerAttrToModifier(layer) {
147
- const { modifiers } = layer;
148
- if (!modifiers)
149
- return [constants.keys_mod_none];
150
- return modifiers.split(',').map(m => translateModifierSubsetToLayer(m)).sort();
151
- }
152
- function translateModifierSubsetToLayer(modifiers) {
153
- // TODO-LDML: Default #11072
154
- if (modifiers) {
155
- if (modifiers.indexOf(',') !== -1) {
156
- throw Error(`translateModifierSubsetToLayer only takes a single subset of the modifiers`);
157
- }
158
- let mod = constants.keys_mod_none;
159
- for (let str of modifiers.split(' ')) {
160
- const submod = constants.keys_mod_map.get(str);
161
- mod |= submod;
162
- }
163
- return mod;
164
- }
165
- // TODO-LDML: other modifiers, other ids?
166
- return constants.keys_mod_none;
167
- }
168
- /**
169
- * @param modifier modifier sequence such as undefined, "none", "shift altR" etc
170
- * @returns true if valid
171
- */
172
- export function validModifier(modifier) {
173
- if (!modifier)
174
- return true; // valid to have no modifier, == none
175
- // TODO-LDML: enforce illegal combinations per spec.
176
- for (let sub of modifier.trim().split(',')) {
177
- for (let str of sub.trim().split(' ')) {
178
- if (!constants.keys_mod_map.has(str)) {
179
- return false;
180
- }
181
- }
182
- }
183
- return true;
184
- }
185
- //# sourceMappingURL=util.js.map
186
- //# debugId=92c01187-7818-5f35-9ffc-8e06975000b5
1
+ import { constants } from "@keymanapp/ldml-keyboard-constants";
2
+ /**
3
+ * Verifies that value is an item in the enumeration.
4
+ */
5
+ export function isValidEnumValue(enu, value) {
6
+ return Object.values(enu).includes(value);
7
+ }
8
+ /**
9
+ * Returns unique LKKeys only, preserving later ones
10
+ * in case of conflict. (i.e. later overrides)
11
+ * @param keys list of keys to consider. (mutated)
12
+ * @returns Array of unique keys. Order is not specified.
13
+ */
14
+ export function calculateUniqueKeys(keys) {
15
+ if (!keys) {
16
+ return [];
17
+ }
18
+ // Need 'newer' (later) keys to override older ones.
19
+ const reverseKeys = keys.reverse(); // newest to oldest
20
+ const alreadySeen = new Set();
21
+ // filter out only the keys that haven't already been seen
22
+ const uniqueKeys = reverseKeys.filter(({ id }) => {
23
+ if (!alreadySeen.has(id)) {
24
+ alreadySeen.add(id);
25
+ return true;
26
+ }
27
+ return false;
28
+ });
29
+ return uniqueKeys;
30
+ }
31
+ /** Convert an array of keys to a hash */
32
+ export function hashKeys(keys) {
33
+ const m = new Map();
34
+ for (const k of keys ?? []) {
35
+ m.set(k.id, k);
36
+ }
37
+ return m;
38
+ }
39
+ export function hashFlicks(flicks) {
40
+ const m = new Map();
41
+ for (const k of flicks ?? []) {
42
+ m.set(k.id, k);
43
+ }
44
+ return m;
45
+ }
46
+ /**
47
+ * @param layersList list of layers elements, from `keyboard?.layers`
48
+ * @returns set of key IDs
49
+ */
50
+ export function allUsedKeyIdsInLayers(layersList) {
51
+ const s = new Set();
52
+ if (layersList) {
53
+ for (const layers of layersList || []) {
54
+ for (const layer of layers.layer || []) {
55
+ for (const row of layer.row || []) {
56
+ if (row.keys) {
57
+ for (const k of row.keys.split(" ")) {
58
+ s.add(k);
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ return s;
66
+ }
67
+ /**
68
+ * Extract all of the key ids that this key refers to, not counting flicks
69
+ * @returns map from the key id to a set of attribute names (such as `multiTapDefaultKeyId` etc.) used by that key.
70
+ */
71
+ export function allUsedKeyIdsInKey(key) {
72
+ const m = new Map();
73
+ /** add one key */
74
+ function addKey(keyId, attr) {
75
+ if (!keyId)
76
+ return;
77
+ if (!m.has(keyId))
78
+ m.set(keyId, []);
79
+ m.get(keyId).push(attr);
80
+ }
81
+ /** add a set of keys */
82
+ function addKeys(keyIds, attr) {
83
+ if (!keyIds)
84
+ return;
85
+ for (const keyId of keyIds?.split(' ')) {
86
+ addKey(keyId, attr);
87
+ }
88
+ }
89
+ const { longPressKeyIds, longPressDefaultKeyId, multiTapKeyIds } = key;
90
+ addKey(longPressDefaultKeyId, 'longPressDefaultKeyId');
91
+ addKeys(longPressKeyIds, 'longPressKeyIds');
92
+ addKeys(multiTapKeyIds, 'multiTapKeyIds');
93
+ return m;
94
+ }
95
+ export function allUsedKeyIdsInFlick(flick) {
96
+ const s = new Set();
97
+ if (flick) {
98
+ for (const { keyId } of flick.flickSegment) {
99
+ s.add(keyId);
100
+ }
101
+ }
102
+ return s;
103
+ }
104
+ /**
105
+ * Helper function for validating child elements. Written for the convenience of message passing functions.
106
+ *
107
+ * @param values array of values to check
108
+ * @param onDuplicate callback with array of duplicate values, deduped
109
+ * @param allowed optional set of valid values
110
+ * @param onInvalid callback with array of invalid values, deduped
111
+ * @returns true if all OK
112
+ */
113
+ export function verifyValidAndUnique(values, onDuplicate, allowed, onInvalid) {
114
+ const dups = [];
115
+ const invalids = [];
116
+ const seen = new Set();
117
+ for (const value of values) {
118
+ if (allowed && !allowed.has(value)) {
119
+ invalids.push(value);
120
+ }
121
+ if (seen.has(value)) {
122
+ dups.push(value);
123
+ }
124
+ else {
125
+ seen.add(value);
126
+ }
127
+ }
128
+ function dedupedSortedArray(values) {
129
+ return Array.from(new Set(values)).sort();
130
+ }
131
+ if (dups.length > 0 && onDuplicate) {
132
+ onDuplicate(dedupedSortedArray(dups));
133
+ }
134
+ if (invalids.length > 0 && onInvalid) {
135
+ onInvalid(dedupedSortedArray(invalids));
136
+ }
137
+ return (!dups.length && !invalids.length);
138
+ }
139
+ /**
140
+ * Determine modifier from layer info
141
+ * @param layer layer obj
142
+ * @returns modifier array
143
+ */
144
+ export function translateLayerAttrToModifier(layer) {
145
+ const { modifiers } = layer;
146
+ if (!modifiers)
147
+ return [constants.keys_mod_none];
148
+ return modifiers.split(',').map(m => translateModifierSubsetToLayer(m)).sort();
149
+ }
150
+ function translateModifierSubsetToLayer(modifiers) {
151
+ // TODO-LDML: Default #11072
152
+ if (modifiers) {
153
+ if (modifiers.indexOf(',') !== -1) {
154
+ throw Error(`translateModifierSubsetToLayer only takes a single subset of the modifiers`);
155
+ }
156
+ let mod = constants.keys_mod_none;
157
+ for (let str of modifiers.split(' ')) {
158
+ const submod = constants.keys_mod_map.get(str);
159
+ mod |= submod;
160
+ }
161
+ return mod;
162
+ }
163
+ // TODO-LDML: other modifiers, other ids?
164
+ return constants.keys_mod_none;
165
+ }
166
+ /**
167
+ * @param modifier modifier sequence such as undefined, "none", "shift altR" etc
168
+ * @returns true if valid
169
+ */
170
+ export function validModifier(modifier) {
171
+ if (!modifier)
172
+ return true; // valid to have no modifier, == none
173
+ // TODO-LDML: enforce illegal combinations per spec.
174
+ for (let sub of modifier.trim().split(',')) {
175
+ for (let str of sub.trim().split(' ')) {
176
+ if (!constants.keys_mod_map.has(str)) {
177
+ return false;
178
+ }
179
+ }
180
+ }
181
+ return true;
182
+ }
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C;YACtC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACrC,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
package/package.json CHANGED
@@ -25,15 +25,15 @@
25
25
  "url": "https://github.com/keymanapp/keyman/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@keymanapp/keyman-version": "18.0.40-alpha",
29
- "@keymanapp/kmc-kmn": "18.0.40-alpha",
30
- "@keymanapp/ldml-keyboard-constants": "18.0.40-alpha",
28
+ "@keymanapp/keyman-version": "18.0.45-alpha",
29
+ "@keymanapp/kmc-kmn": "18.0.45-alpha",
30
+ "@keymanapp/ldml-keyboard-constants": "18.0.45-alpha",
31
31
  "restructure": "git+https://github.com/keymanapp/dependency-restructure.git#7a188a1e26f8f36a175d95b67ffece8702363dfc",
32
32
  "semver": "^7.5.2"
33
33
  },
34
34
  "devDependencies": {
35
- "@keymanapp/developer-test-helpers": "18.0.40-alpha",
36
- "@keymanapp/resources-gosh": "18.0.40-alpha",
35
+ "@keymanapp/developer-test-helpers": "18.0.45-alpha",
36
+ "@keymanapp/resources-gosh": "18.0.45-alpha",
37
37
  "@types/mocha": "^5.2.7",
38
38
  "@types/node": "^20.4.1",
39
39
  "@types/semver": "^7.3.12",
@@ -63,5 +63,5 @@
63
63
  "type": "git",
64
64
  "url": "git+https://github.com/keymanapp/keyman.git"
65
65
  },
66
- "version": "18.0.40-alpha"
66
+ "version": "18.0.45-alpha"
67
67
  }