@keymanapp/common-types 18.0.41-alpha → 18.0.46-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/consts/virtual-key-constants.d.ts +191 -191
- package/build/src/consts/virtual-key-constants.js +221 -221
- package/build/src/consts/virtual-key-constants.js.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.d.ts +5 -5
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js +72 -72
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.d.ts +28 -28
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js +120 -120
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.d.ts +95 -95
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.js +52 -52
- package/build/src/kmx/element-string.d.ts +23 -23
- package/build/src/kmx/element-string.js +125 -125
- package/build/src/kmx/element-string.js.map +1 -1
- package/build/src/kmx/keyman-targets.d.ts +20 -20
- package/build/src/kmx/keyman-targets.js +79 -79
- package/build/src/kmx/keyman-targets.js.map +1 -1
- package/build/src/kmx/kmx-builder.d.ts +32 -32
- package/build/src/kmx/kmx-builder.js +189 -189
- package/build/src/kmx/kmx-builder.js.map +1 -1
- package/build/src/kmx/kmx-file-reader.d.ts +13 -13
- package/build/src/kmx/kmx-file-reader.js +134 -134
- package/build/src/kmx/kmx-file-reader.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-disp.d.ts +18 -18
- package/build/src/kmx/kmx-plus-builder/build-disp.js +27 -27
- package/build/src/kmx/kmx-plus-builder/build-disp.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-elem.d.ts +28 -28
- package/build/src/kmx/kmx-plus-builder/build-elem.js +89 -89
- package/build/src/kmx/kmx-plus-builder/build-elem.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-keys.d.ts +56 -56
- package/build/src/kmx/kmx-plus-builder/build-keys.js +107 -107
- package/build/src/kmx/kmx-plus-builder/build-keys.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-layr.d.ts +53 -53
- package/build/src/kmx/kmx-plus-builder/build-layr.js +101 -101
- package/build/src/kmx/kmx-plus-builder/build-layr.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-list.d.ts +35 -35
- package/build/src/kmx/kmx-plus-builder/build-list.js +66 -66
- package/build/src/kmx/kmx-plus-builder/build-list.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-loca.d.ts +11 -11
- package/build/src/kmx/kmx-plus-builder/build-loca.js +21 -21
- package/build/src/kmx/kmx-plus-builder/build-loca.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-meta.d.ts +16 -16
- package/build/src/kmx/kmx-plus-builder/build-meta.js +20 -20
- package/build/src/kmx/kmx-plus-builder/build-sect.d.ts +15 -15
- package/build/src/kmx/kmx-plus-builder/build-sect.js +15 -15
- package/build/src/kmx/kmx-plus-builder/build-sect.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-strs.d.ts +22 -22
- package/build/src/kmx/kmx-plus-builder/build-strs.js +46 -46
- package/build/src/kmx/kmx-plus-builder/build-strs.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-tran.d.ts +32 -32
- package/build/src/kmx/kmx-plus-builder/build-tran.js +69 -69
- package/build/src/kmx/kmx-plus-builder/build-tran.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-uset.d.ts +30 -30
- package/build/src/kmx/kmx-plus-builder/build-uset.js +60 -60
- package/build/src/kmx/kmx-plus-builder/build-uset.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-vars.d.ts +21 -21
- package/build/src/kmx/kmx-plus-builder/build-vars.js +48 -48
- package/build/src/kmx/kmx-plus-builder/build-vars.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/builder-section.d.ts +9 -9
- package/build/src/kmx/kmx-plus-builder/builder-section.js +2 -2
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.d.ts +42 -42
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js +137 -137
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js.map +1 -1
- package/build/src/kmx/kmx-plus.d.ts +322 -322
- package/build/src/kmx/kmx-plus.js +830 -830
- package/build/src/kmx/kmx-plus.js.map +1 -1
- package/build/src/kmx/kmx.d.ts +233 -233
- package/build/src/kmx/kmx.js +302 -302
- package/build/src/kmx/kmx.js.map +1 -1
- package/build/src/kmx/string-list.d.ts +35 -35
- package/build/src/kmx/string-list.js +88 -88
- package/build/src/kmx/string-list.js.map +1 -1
- package/build/src/kpj/keyman-developer-project.d.ts +78 -78
- package/build/src/kpj/keyman-developer-project.js +195 -195
- package/build/src/kpj/keyman-developer-project.js.map +1 -1
- package/build/src/kpj/kpj-file-reader.d.ts +18 -18
- package/build/src/kpj/kpj-file-reader.js +119 -119
- package/build/src/kpj/kpj-file-reader.js.map +1 -1
- package/build/src/kpj/kpj-file.d.ts +39 -39
- package/build/src/kpj/kpj-file.js +10 -10
- package/build/src/kvk/kvk-file-reader.d.ts +4 -4
- package/build/src/kvk/kvk-file-reader.js +37 -37
- package/build/src/kvk/kvk-file-reader.js.map +1 -1
- package/build/src/kvk/kvk-file-writer.d.ts +19 -19
- package/build/src/kvk/kvk-file-writer.js +77 -77
- package/build/src/kvk/kvk-file-writer.js.map +1 -1
- package/build/src/kvk/kvk-file.d.ts +66 -66
- package/build/src/kvk/kvk-file.d.ts.map +1 -1
- package/build/src/kvk/kvk-file.js +90 -90
- package/build/src/kvk/kvk-file.js.map +1 -1
- package/build/src/kvk/kvks-file-reader.d.ts +23 -23
- package/build/src/kvk/kvks-file-reader.js +175 -175
- package/build/src/kvk/kvks-file-reader.js.map +1 -1
- package/build/src/kvk/kvks-file-writer.d.ts +6 -6
- package/build/src/kvk/kvks-file-writer.js +106 -106
- package/build/src/kvk/kvks-file-writer.js.map +1 -1
- package/build/src/kvk/kvks-file.d.ts +43 -43
- package/build/src/kvk/kvks-file.js +9 -9
- package/build/src/kvk/visual-keyboard.d.ts +44 -44
- package/build/src/kvk/visual-keyboard.js +75 -75
- package/build/src/kvk/visual-keyboard.js.map +1 -1
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.d.ts +60 -60
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.js +19 -19
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.d.ts +95 -95
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js +409 -409
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js.map +1 -1
- package/build/src/ldml-keyboard/ldml-keyboard-xml.d.ts +170 -170
- package/build/src/ldml-keyboard/ldml-keyboard-xml.js +55 -55
- package/build/src/ldml-keyboard/pattern-parser.d.ts +201 -201
- package/build/src/ldml-keyboard/pattern-parser.js +490 -490
- package/build/src/ldml-keyboard/pattern-parser.js.map +1 -1
- package/build/src/ldml-keyboard/unicodeset-parser-api.d.ts +37 -37
- package/build/src/ldml-keyboard/unicodeset-parser-api.js +27 -27
- package/build/src/main.d.ts +33 -33
- package/build/src/main.js +32 -32
- package/build/src/package/kmp-json-file.d.ts +115 -115
- package/build/src/package/kmp-json-file.js +1 -1
- package/build/src/package/kps-file.d.ts +175 -175
- package/build/src/package/kps-file.js +15 -15
- package/build/src/schema-validators.d.ts +13 -13
- package/build/src/schema-validators.js +25 -25
- package/build/src/schemas/displaymap.schema.d.ts +57 -57
- package/build/src/schemas/displaymap.schema.js +35 -35
- package/build/src/schemas/displaymap.schema.validator.d.mts +2 -2
- package/build/src/schemas/displaymap.schema.validator.mjs +266 -266
- package/build/src/schemas/displaymap.schema.validator.mjs.map +1 -1
- package/build/src/schemas/keyboard_info.schema.d.ts +209 -209
- package/build/src/schemas/keyboard_info.schema.js +98 -98
- package/build/src/schemas/keyboard_info.schema.validator.d.mts +2 -2
- package/build/src/schemas/keyboard_info.schema.validator.mjs +1160 -1160
- package/build/src/schemas/keyboard_info.schema.validator.mjs.map +1 -1
- package/build/src/schemas/keyman-touch-layout.clean.spec.d.ts +227 -227
- package/build/src/schemas/keyman-touch-layout.clean.spec.js +151 -151
- package/build/src/schemas/keyman-touch-layout.clean.spec.validator.d.mts +2 -2
- package/build/src/schemas/keyman-touch-layout.clean.spec.validator.mjs +1094 -1094
- package/build/src/schemas/keyman-touch-layout.clean.spec.validator.mjs.map +1 -1
- package/build/src/schemas/keyman-touch-layout.spec.d.ts +229 -229
- package/build/src/schemas/keyman-touch-layout.spec.js +140 -140
- package/build/src/schemas/keyman-touch-layout.spec.validator.d.mts +2 -2
- package/build/src/schemas/keyman-touch-layout.spec.validator.mjs +1436 -1436
- package/build/src/schemas/keyman-touch-layout.spec.validator.mjs.map +1 -1
- package/build/src/schemas/kmp.schema.d.ts +324 -324
- package/build/src/schemas/kmp.schema.js +353 -353
- package/build/src/schemas/kmp.schema.validator.d.mts +2 -2
- package/build/src/schemas/kmp.schema.validator.mjs +1627 -1627
- package/build/src/schemas/kmp.schema.validator.mjs.map +1 -1
- package/build/src/schemas/kpj-9.0.schema.d.ts +152 -152
- package/build/src/schemas/kpj-9.0.schema.js +131 -131
- package/build/src/schemas/kpj-9.0.schema.validator.d.mts +2 -2
- package/build/src/schemas/kpj-9.0.schema.validator.mjs +655 -655
- package/build/src/schemas/kpj-9.0.schema.validator.mjs.map +1 -1
- package/build/src/schemas/kpj.schema.d.ts +122 -122
- package/build/src/schemas/kpj.schema.js +129 -129
- package/build/src/schemas/kpj.schema.validator.d.mts +2 -2
- package/build/src/schemas/kpj.schema.validator.mjs +515 -515
- package/build/src/schemas/kpj.schema.validator.mjs.map +1 -1
- package/build/src/schemas/kvks.schema.d.ts +160 -160
- package/build/src/schemas/kvks.schema.js +182 -182
- package/build/src/schemas/kvks.schema.validator.d.mts +2 -2
- package/build/src/schemas/kvks.schema.validator.mjs +625 -625
- package/build/src/schemas/kvks.schema.validator.mjs.map +1 -1
- package/build/src/schemas/ldml-keyboard3.schema.d.ts +635 -635
- package/build/src/schemas/ldml-keyboard3.schema.js +696 -696
- package/build/src/schemas/ldml-keyboard3.schema.validator.d.mts +2 -2
- package/build/src/schemas/ldml-keyboard3.schema.validator.mjs +3117 -3117
- package/build/src/schemas/ldml-keyboard3.schema.validator.mjs.map +1 -1
- package/build/src/schemas/ldml-keyboardtest3.schema.d.ts +192 -192
- package/build/src/schemas/ldml-keyboardtest3.schema.js +225 -225
- package/build/src/schemas/ldml-keyboardtest3.schema.validator.d.mts +2 -2
- package/build/src/schemas/ldml-keyboardtest3.schema.validator.mjs +744 -744
- package/build/src/schemas/ldml-keyboardtest3.schema.validator.mjs.map +1 -1
- package/build/src/schemas.d.ts +2300 -2300
- package/build/src/schemas.js +23 -23
- package/build/src/util/common-events.d.ts +44 -44
- package/build/src/util/common-events.js +26 -26
- package/build/src/util/compiler-interfaces.d.ts +371 -371
- package/build/src/util/compiler-interfaces.d.ts.map +1 -1
- package/build/src/util/compiler-interfaces.js +380 -380
- package/build/src/util/compiler-interfaces.js.map +1 -1
- package/build/src/util/errors.d.ts +5 -5
- package/build/src/util/errors.js +5 -5
- package/build/src/util/file-types.d.ts +93 -93
- package/build/src/util/file-types.d.ts.map +1 -1
- package/build/src/util/file-types.js +142 -142
- package/build/src/util/file-types.js.map +1 -1
- package/build/src/util/util.d.ts +98 -98
- package/build/src/util/util.js +368 -368
- package/build/src/util/util.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { OrderedStringList } from '../ldml-keyboard/pattern-parser.js';
|
|
2
|
-
import { DependencySections, StrsItem, StrsOptions } from './kmx-plus.js';
|
|
3
|
-
/**
|
|
4
|
-
* A single entry in a ListItem.
|
|
5
|
-
* Contains a StrsItem as its value.
|
|
6
|
-
*/
|
|
7
|
-
export declare class ListIndex {
|
|
8
|
-
readonly value: StrsItem;
|
|
9
|
-
constructor(value: StrsItem);
|
|
10
|
-
isEqual(a: ListIndex | string): boolean;
|
|
11
|
-
toString(): string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* A string list in memory. This will be replaced with an index
|
|
15
|
-
* into the string table at finalization.
|
|
16
|
-
*/
|
|
17
|
-
export declare class ListItem extends Array<ListIndex> implements OrderedStringList {
|
|
18
|
-
/**
|
|
19
|
-
* Construct a new list from an array of strings.
|
|
20
|
-
* Use List. This is meant to be called by the List.allocString*() functions.
|
|
21
|
-
* @param source array of strings
|
|
22
|
-
* @param opts string handling options
|
|
23
|
-
* @param sections the Strs section is needed to construct this object, and other sections may
|
|
24
|
-
* be needed depending on the options
|
|
25
|
-
* @returns
|
|
26
|
-
*/
|
|
27
|
-
static fromStrings(source: Array<string>, opts: StrsOptions, sections: DependencySections): ListItem;
|
|
28
|
-
getItemOrder(item: string): number;
|
|
29
|
-
isEqual(a: ListItem | string[]): boolean;
|
|
30
|
-
compareTo(o: ListItem): number;
|
|
31
|
-
/** for debugging and tests, print as single string */
|
|
32
|
-
toString(): string;
|
|
33
|
-
/** for debugging and tests, map to string array */
|
|
34
|
-
toStringArray(): string[];
|
|
35
|
-
}
|
|
1
|
+
import { OrderedStringList } from '../ldml-keyboard/pattern-parser.js';
|
|
2
|
+
import { DependencySections, StrsItem, StrsOptions } from './kmx-plus.js';
|
|
3
|
+
/**
|
|
4
|
+
* A single entry in a ListItem.
|
|
5
|
+
* Contains a StrsItem as its value.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListIndex {
|
|
8
|
+
readonly value: StrsItem;
|
|
9
|
+
constructor(value: StrsItem);
|
|
10
|
+
isEqual(a: ListIndex | string): boolean;
|
|
11
|
+
toString(): string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A string list in memory. This will be replaced with an index
|
|
15
|
+
* into the string table at finalization.
|
|
16
|
+
*/
|
|
17
|
+
export declare class ListItem extends Array<ListIndex> implements OrderedStringList {
|
|
18
|
+
/**
|
|
19
|
+
* Construct a new list from an array of strings.
|
|
20
|
+
* Use List. This is meant to be called by the List.allocString*() functions.
|
|
21
|
+
* @param source array of strings
|
|
22
|
+
* @param opts string handling options
|
|
23
|
+
* @param sections the Strs section is needed to construct this object, and other sections may
|
|
24
|
+
* be needed depending on the options
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
static fromStrings(source: Array<string>, opts: StrsOptions, sections: DependencySections): ListItem;
|
|
28
|
+
getItemOrder(item: string): number;
|
|
29
|
+
isEqual(a: ListItem | string[]): boolean;
|
|
30
|
+
compareTo(o: ListItem): number;
|
|
31
|
+
/** for debugging and tests, print as single string */
|
|
32
|
+
toString(): string;
|
|
33
|
+
/** for debugging and tests, map to string array */
|
|
34
|
+
toStringArray(): string[];
|
|
35
|
+
}
|
|
36
36
|
//# sourceMappingURL=string-list.d.ts.map
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A single entry in a ListItem.
|
|
3
|
-
* Contains a StrsItem as its value.
|
|
4
|
-
*/
|
|
1
|
+
/**
|
|
2
|
+
* A single entry in a ListItem.
|
|
3
|
+
* Contains a StrsItem as its value.
|
|
4
|
+
*/
|
|
5
5
|
|
|
6
|
-
!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]="
|
|
7
|
-
export class ListIndex {
|
|
8
|
-
value; // will become index into Strs table
|
|
9
|
-
constructor(value) {
|
|
10
|
-
this.value = value;
|
|
11
|
-
}
|
|
12
|
-
isEqual(a) {
|
|
13
|
-
// so we can compare this to a string
|
|
14
|
-
return a.toString() === this.toString();
|
|
15
|
-
}
|
|
16
|
-
toString() {
|
|
17
|
-
return this.value.value;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
;
|
|
21
|
-
/**
|
|
22
|
-
* A string list in memory. This will be replaced with an index
|
|
23
|
-
* into the string table at finalization.
|
|
24
|
-
*/
|
|
25
|
-
export class ListItem extends Array {
|
|
26
|
-
/**
|
|
27
|
-
* Construct a new list from an array of strings.
|
|
28
|
-
* Use List. This is meant to be called by the List.allocString*() functions.
|
|
29
|
-
* @param source array of strings
|
|
30
|
-
* @param opts string handling options
|
|
31
|
-
* @param sections the Strs section is needed to construct this object, and other sections may
|
|
32
|
-
* be needed depending on the options
|
|
33
|
-
* @returns
|
|
34
|
-
*/
|
|
35
|
-
static fromStrings(source, opts, sections) {
|
|
36
|
-
const a = new ListItem();
|
|
37
|
-
if (!source) {
|
|
38
|
-
return a;
|
|
39
|
-
}
|
|
40
|
-
for (const str of source) {
|
|
41
|
-
let index = new ListIndex(sections.strs.allocString(str, opts, sections));
|
|
42
|
-
a.push(index);
|
|
43
|
-
}
|
|
44
|
-
return a;
|
|
45
|
-
}
|
|
46
|
-
getItemOrder(item) {
|
|
47
|
-
return this.findIndex(({ value }) => value.value === item);
|
|
48
|
-
}
|
|
49
|
-
isEqual(a) {
|
|
50
|
-
if (a.length != this.length) {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
for (let i = 0; i < a.length; i++) {
|
|
54
|
-
if (!this[i].isEqual(a[i])) {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
compareTo(o) {
|
|
61
|
-
for (let i = 0; i < Math.min(this.length, o.length); i++) {
|
|
62
|
-
const r = this[i].value.compareTo(o[i].value);
|
|
63
|
-
if (r !== 0) {
|
|
64
|
-
return r;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
// prefix is the same, so go by length: shortest is first.
|
|
68
|
-
if (this.length < o.length) {
|
|
69
|
-
return -1;
|
|
70
|
-
}
|
|
71
|
-
else if (this.length > o.length) {
|
|
72
|
-
return 1;
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
return 0;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/** for debugging and tests, print as single string */
|
|
79
|
-
toString() {
|
|
80
|
-
return this.toStringArray().join(' ');
|
|
81
|
-
}
|
|
82
|
-
/** for debugging and tests, map to string array */
|
|
83
|
-
toStringArray() {
|
|
84
|
-
// TODO-LDML: this crashes: return this.map(v => v.toString());
|
|
85
|
-
return Array.from(this.values()).map(v => v.toString());
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
;
|
|
6
|
+
!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]="1bd29aa2-c043-5484-92d7-36f4ad3ce602")}catch(e){}}();
|
|
7
|
+
export class ListIndex {
|
|
8
|
+
value; // will become index into Strs table
|
|
9
|
+
constructor(value) {
|
|
10
|
+
this.value = value;
|
|
11
|
+
}
|
|
12
|
+
isEqual(a) {
|
|
13
|
+
// so we can compare this to a string
|
|
14
|
+
return a.toString() === this.toString();
|
|
15
|
+
}
|
|
16
|
+
toString() {
|
|
17
|
+
return this.value.value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
;
|
|
21
|
+
/**
|
|
22
|
+
* A string list in memory. This will be replaced with an index
|
|
23
|
+
* into the string table at finalization.
|
|
24
|
+
*/
|
|
25
|
+
export class ListItem extends Array {
|
|
26
|
+
/**
|
|
27
|
+
* Construct a new list from an array of strings.
|
|
28
|
+
* Use List. This is meant to be called by the List.allocString*() functions.
|
|
29
|
+
* @param source array of strings
|
|
30
|
+
* @param opts string handling options
|
|
31
|
+
* @param sections the Strs section is needed to construct this object, and other sections may
|
|
32
|
+
* be needed depending on the options
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
35
|
+
static fromStrings(source, opts, sections) {
|
|
36
|
+
const a = new ListItem();
|
|
37
|
+
if (!source) {
|
|
38
|
+
return a;
|
|
39
|
+
}
|
|
40
|
+
for (const str of source) {
|
|
41
|
+
let index = new ListIndex(sections.strs.allocString(str, opts, sections));
|
|
42
|
+
a.push(index);
|
|
43
|
+
}
|
|
44
|
+
return a;
|
|
45
|
+
}
|
|
46
|
+
getItemOrder(item) {
|
|
47
|
+
return this.findIndex(({ value }) => value.value === item);
|
|
48
|
+
}
|
|
49
|
+
isEqual(a) {
|
|
50
|
+
if (a.length != this.length) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
for (let i = 0; i < a.length; i++) {
|
|
54
|
+
if (!this[i].isEqual(a[i])) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
compareTo(o) {
|
|
61
|
+
for (let i = 0; i < Math.min(this.length, o.length); i++) {
|
|
62
|
+
const r = this[i].value.compareTo(o[i].value);
|
|
63
|
+
if (r !== 0) {
|
|
64
|
+
return r;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// prefix is the same, so go by length: shortest is first.
|
|
68
|
+
if (this.length < o.length) {
|
|
69
|
+
return -1;
|
|
70
|
+
}
|
|
71
|
+
else if (this.length > o.length) {
|
|
72
|
+
return 1;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
return 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/** for debugging and tests, print as single string */
|
|
79
|
+
toString() {
|
|
80
|
+
return this.toStringArray().join(' ');
|
|
81
|
+
}
|
|
82
|
+
/** for debugging and tests, map to string array */
|
|
83
|
+
toStringArray() {
|
|
84
|
+
// TODO-LDML: this crashes: return this.map(v => v.toString());
|
|
85
|
+
return Array.from(this.values()).map(v => v.toString());
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
;
|
|
89
89
|
//# sourceMappingURL=string-list.js.map
|
|
90
|
-
//# debugId=
|
|
90
|
+
//# debugId=1bd29aa2-c043-5484-92d7-36f4ad3ce602
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-list.js","sources":["../../../src/kmx/string-list.ts"],"sourceRoot":"","names":[],"mappings":"AAGA;;;GAGG;;;AACH,MAAM,OAAO,SAAS;IACX,KAAK,CAAW,CAAC,oCAAoC;IAC9D,YAAY,KAAe;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IACD,OAAO,CAAC,CAAqB;QAC3B,qCAAqC;QACrC,OAAO,CAAC,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC1C,CAAC;IACD,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC1B,CAAC;CACF;AAAA,CAAC;AAEF;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAgB;IAC5C;;;;;;;;OAQG;IACH,MAAM,CAAC,WAAW,CAAC,MAAqB,EAAE,IAAiB,EAAE,QAA4B;QACvF,MAAM,CAAC,GAAG,IAAI,QAAQ,EAAE,CAAC;QACzB,IAAI,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"string-list.js","sources":["../../../src/kmx/string-list.ts"],"sourceRoot":"","names":[],"mappings":"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","debug_id":"1bd29aa2-c043-5484-92d7-36f4ad3ce602"}
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import { KeymanFileTypes } from '../main.js';
|
|
2
|
-
import { CompilerCallbacks } from '../util/compiler-interfaces.js';
|
|
3
|
-
export declare class KeymanDeveloperProject {
|
|
4
|
-
private _projectFilename;
|
|
5
|
-
private callbacks;
|
|
6
|
-
options: KeymanDeveloperProjectOptions;
|
|
7
|
-
files: KeymanDeveloperProjectFile[];
|
|
8
|
-
projectPath: string;
|
|
9
|
-
readonly projectFile: KeymanDeveloperProjectFile;
|
|
10
|
-
get projectFilename(): string;
|
|
11
|
-
constructor(_projectFilename: string, version: KeymanDeveloperProjectVersion, callbacks: CompilerCallbacks);
|
|
12
|
-
/**
|
|
13
|
-
* Adds .kmn, .xml, .kps to project based on options.sourcePath
|
|
14
|
-
* @param projectFilename Full path to project.kpj (even if the file doesn't exist)
|
|
15
|
-
*/
|
|
16
|
-
populateFiles(): boolean;
|
|
17
|
-
isKeyboardProject(): boolean;
|
|
18
|
-
isLexicalModelProject(): boolean;
|
|
19
|
-
private resolveProjectPath;
|
|
20
|
-
getOutputFilePath(type: KeymanFileTypes.Binary): string;
|
|
21
|
-
resolveInputFilePath(file: KeymanDeveloperProjectFile): string;
|
|
22
|
-
resolveOutputFilePath(file: KeymanDeveloperProjectFile, sourceExt: string, targetExt: string): string;
|
|
23
|
-
}
|
|
24
|
-
export declare enum KeymanDeveloperProjectType {
|
|
25
|
-
Keyboard = 0,
|
|
26
|
-
LexicalModel = 1
|
|
27
|
-
}
|
|
28
|
-
export type KeymanDeveloperProjectVersion = "1.0" | // Keyman Developer <17.0: All files referenced in .kpj
|
|
29
|
-
"2.0";
|
|
30
|
-
export declare class KeymanDeveloperProjectOptions {
|
|
31
|
-
buildPath: string;
|
|
32
|
-
sourcePath: string;
|
|
33
|
-
compilerWarningsAsErrors: boolean;
|
|
34
|
-
warnDeprecatedCode: boolean;
|
|
35
|
-
checkFilenameConventions: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Skip building .keyboard_info and .model_info files, for example in
|
|
38
|
-
* unit tests or for legacy keyboards
|
|
39
|
-
*/
|
|
40
|
-
skipMetadataFiles: boolean;
|
|
41
|
-
projectType: KeymanDeveloperProjectType;
|
|
42
|
-
readonly version: KeymanDeveloperProjectVersion;
|
|
43
|
-
constructor(version: KeymanDeveloperProjectVersion);
|
|
44
|
-
}
|
|
45
|
-
export interface KeymanDeveloperProjectFile {
|
|
46
|
-
get filename(): string;
|
|
47
|
-
get fileType(): string;
|
|
48
|
-
readonly filePath: string;
|
|
49
|
-
}
|
|
50
|
-
export declare class KeymanDeveloperProjectFile10 implements KeymanDeveloperProjectFile {
|
|
51
|
-
readonly id: string;
|
|
52
|
-
readonly filePath: string;
|
|
53
|
-
readonly fileVersion: string;
|
|
54
|
-
private readonly callbacks;
|
|
55
|
-
get filename(): string;
|
|
56
|
-
get fileType(): string;
|
|
57
|
-
details: KeymanDeveloperProjectFileDetail_Kmn & KeymanDeveloperProjectFileDetail_Kps;
|
|
58
|
-
childFiles: KeymanDeveloperProjectFile[];
|
|
59
|
-
constructor(id: string, filePath: string, fileVersion: string, callbacks: CompilerCallbacks);
|
|
60
|
-
}
|
|
61
|
-
export type KeymanDeveloperProjectFileType20 = KeymanFileTypes.Source;
|
|
62
|
-
export declare class KeymanDeveloperProjectFile20 implements KeymanDeveloperProjectFile {
|
|
63
|
-
readonly filePath: string;
|
|
64
|
-
private readonly callbacks;
|
|
65
|
-
get filename(): string;
|
|
66
|
-
get fileType(): string;
|
|
67
|
-
constructor(filePath: string, callbacks: CompilerCallbacks);
|
|
68
|
-
}
|
|
69
|
-
export declare class KeymanDeveloperProjectFileDetail_Kps {
|
|
70
|
-
name?: string;
|
|
71
|
-
copyright?: string;
|
|
72
|
-
version?: string;
|
|
73
|
-
}
|
|
74
|
-
export declare class KeymanDeveloperProjectFileDetail_Kmn {
|
|
75
|
-
name?: string;
|
|
76
|
-
copyright?: string;
|
|
77
|
-
message?: string;
|
|
78
|
-
}
|
|
1
|
+
import { KeymanFileTypes } from '../main.js';
|
|
2
|
+
import { CompilerCallbacks } from '../util/compiler-interfaces.js';
|
|
3
|
+
export declare class KeymanDeveloperProject {
|
|
4
|
+
private _projectFilename;
|
|
5
|
+
private callbacks;
|
|
6
|
+
options: KeymanDeveloperProjectOptions;
|
|
7
|
+
files: KeymanDeveloperProjectFile[];
|
|
8
|
+
projectPath: string;
|
|
9
|
+
readonly projectFile: KeymanDeveloperProjectFile;
|
|
10
|
+
get projectFilename(): string;
|
|
11
|
+
constructor(_projectFilename: string, version: KeymanDeveloperProjectVersion, callbacks: CompilerCallbacks);
|
|
12
|
+
/**
|
|
13
|
+
* Adds .kmn, .xml, .kps to project based on options.sourcePath
|
|
14
|
+
* @param projectFilename Full path to project.kpj (even if the file doesn't exist)
|
|
15
|
+
*/
|
|
16
|
+
populateFiles(): boolean;
|
|
17
|
+
isKeyboardProject(): boolean;
|
|
18
|
+
isLexicalModelProject(): boolean;
|
|
19
|
+
private resolveProjectPath;
|
|
20
|
+
getOutputFilePath(type: KeymanFileTypes.Binary): string;
|
|
21
|
+
resolveInputFilePath(file: KeymanDeveloperProjectFile): string;
|
|
22
|
+
resolveOutputFilePath(file: KeymanDeveloperProjectFile, sourceExt: string, targetExt: string): string;
|
|
23
|
+
}
|
|
24
|
+
export declare enum KeymanDeveloperProjectType {
|
|
25
|
+
Keyboard = 0,
|
|
26
|
+
LexicalModel = 1
|
|
27
|
+
}
|
|
28
|
+
export type KeymanDeveloperProjectVersion = "1.0" | // Keyman Developer <17.0: All files referenced in .kpj
|
|
29
|
+
"2.0";
|
|
30
|
+
export declare class KeymanDeveloperProjectOptions {
|
|
31
|
+
buildPath: string;
|
|
32
|
+
sourcePath: string;
|
|
33
|
+
compilerWarningsAsErrors: boolean;
|
|
34
|
+
warnDeprecatedCode: boolean;
|
|
35
|
+
checkFilenameConventions: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Skip building .keyboard_info and .model_info files, for example in
|
|
38
|
+
* unit tests or for legacy keyboards
|
|
39
|
+
*/
|
|
40
|
+
skipMetadataFiles: boolean;
|
|
41
|
+
projectType: KeymanDeveloperProjectType;
|
|
42
|
+
readonly version: KeymanDeveloperProjectVersion;
|
|
43
|
+
constructor(version: KeymanDeveloperProjectVersion);
|
|
44
|
+
}
|
|
45
|
+
export interface KeymanDeveloperProjectFile {
|
|
46
|
+
get filename(): string;
|
|
47
|
+
get fileType(): string;
|
|
48
|
+
readonly filePath: string;
|
|
49
|
+
}
|
|
50
|
+
export declare class KeymanDeveloperProjectFile10 implements KeymanDeveloperProjectFile {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly filePath: string;
|
|
53
|
+
readonly fileVersion: string;
|
|
54
|
+
private readonly callbacks;
|
|
55
|
+
get filename(): string;
|
|
56
|
+
get fileType(): string;
|
|
57
|
+
details: KeymanDeveloperProjectFileDetail_Kmn & KeymanDeveloperProjectFileDetail_Kps;
|
|
58
|
+
childFiles: KeymanDeveloperProjectFile[];
|
|
59
|
+
constructor(id: string, filePath: string, fileVersion: string, callbacks: CompilerCallbacks);
|
|
60
|
+
}
|
|
61
|
+
export type KeymanDeveloperProjectFileType20 = KeymanFileTypes.Source;
|
|
62
|
+
export declare class KeymanDeveloperProjectFile20 implements KeymanDeveloperProjectFile {
|
|
63
|
+
readonly filePath: string;
|
|
64
|
+
private readonly callbacks;
|
|
65
|
+
get filename(): string;
|
|
66
|
+
get fileType(): string;
|
|
67
|
+
constructor(filePath: string, callbacks: CompilerCallbacks);
|
|
68
|
+
}
|
|
69
|
+
export declare class KeymanDeveloperProjectFileDetail_Kps {
|
|
70
|
+
name?: string;
|
|
71
|
+
copyright?: string;
|
|
72
|
+
version?: string;
|
|
73
|
+
}
|
|
74
|
+
export declare class KeymanDeveloperProjectFileDetail_Kmn {
|
|
75
|
+
name?: string;
|
|
76
|
+
copyright?: string;
|
|
77
|
+
message?: string;
|
|
78
|
+
}
|
|
79
79
|
//# sourceMappingURL=keyman-developer-project.d.ts.map
|