@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,24 +1,24 @@
|
|
|
1
|
-
import { DependencySections, StrsItem, UsetItem } from './kmx-plus.js';
|
|
2
|
-
export declare enum ElemElementFlags {
|
|
3
|
-
none = 0,
|
|
4
|
-
type,
|
|
5
|
-
tertiary_base,
|
|
6
|
-
prebase
|
|
7
|
-
}
|
|
8
|
-
export declare class ElemElement {
|
|
9
|
-
value?: StrsItem;
|
|
10
|
-
uset?: UsetItem;
|
|
11
|
-
order: number;
|
|
12
|
-
tertiary: number;
|
|
13
|
-
flags: ElemElementFlags;
|
|
14
|
-
isEqual(a: ElemElement): boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare class ElementString extends Array<ElemElement> {
|
|
17
|
-
/**
|
|
18
|
-
* @param source if a string array, does not get reinterpreted as UnicodeSet. This is used with vars, etc. Or pass `["str"]` for an explicit 1-element elem.
|
|
19
|
-
* If it is a string, will be interpreted per reorder element rules.
|
|
20
|
-
*/
|
|
21
|
-
static fromStrings(sections: DependencySections, source: string | string[], order?: string, tertiary?: string, tertiary_base?: string, prebase?: string): ElementString;
|
|
22
|
-
isEqual(a: ElementString): boolean;
|
|
23
|
-
}
|
|
1
|
+
import { DependencySections, StrsItem, UsetItem } from './kmx-plus.js';
|
|
2
|
+
export declare enum ElemElementFlags {
|
|
3
|
+
none = 0,
|
|
4
|
+
type,
|
|
5
|
+
tertiary_base,
|
|
6
|
+
prebase
|
|
7
|
+
}
|
|
8
|
+
export declare class ElemElement {
|
|
9
|
+
value?: StrsItem;
|
|
10
|
+
uset?: UsetItem;
|
|
11
|
+
order: number;
|
|
12
|
+
tertiary: number;
|
|
13
|
+
flags: ElemElementFlags;
|
|
14
|
+
isEqual(a: ElemElement): boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class ElementString extends Array<ElemElement> {
|
|
17
|
+
/**
|
|
18
|
+
* @param source if a string array, does not get reinterpreted as UnicodeSet. This is used with vars, etc. Or pass `["str"]` for an explicit 1-element elem.
|
|
19
|
+
* If it is a string, will be interpreted per reorder element rules.
|
|
20
|
+
*/
|
|
21
|
+
static fromStrings(sections: DependencySections, source: string | string[], order?: string, tertiary?: string, tertiary_base?: string, prebase?: string): ElementString;
|
|
22
|
+
isEqual(a: ElementString): boolean;
|
|
23
|
+
}
|
|
24
24
|
//# sourceMappingURL=element-string.d.ts.map
|
|
@@ -1,127 +1,127 @@
|
|
|
1
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]="
|
|
3
|
-
import { constants } from '@keymanapp/ldml-keyboard-constants';
|
|
4
|
-
import { ElementParser, ElementSegment, ElementType } from '../ldml-keyboard/pattern-parser.js';
|
|
5
|
-
import { MATCH_HEX_ESCAPE, unescapeOneQuadString } from '../util/util.js';
|
|
6
|
-
export var ElemElementFlags;
|
|
7
|
-
(function (ElemElementFlags) {
|
|
8
|
-
ElemElementFlags[ElemElementFlags["none"] = 0] = "none";
|
|
9
|
-
ElemElementFlags[ElemElementFlags["type"] = constants.elem_flags_type] = "type";
|
|
10
|
-
ElemElementFlags[ElemElementFlags["tertiary_base"] = constants.elem_flags_tertiary_base] = "tertiary_base";
|
|
11
|
-
ElemElementFlags[ElemElementFlags["prebase"] = constants.elem_flags_prebase] = "prebase";
|
|
12
|
-
})(ElemElementFlags || (ElemElementFlags = {}));
|
|
13
|
-
;
|
|
14
|
-
export class ElemElement {
|
|
15
|
-
value; // UnicodeSet or UCS32LE character
|
|
16
|
-
uset;
|
|
17
|
-
order; // -128 to +127; used only by reorder element values
|
|
18
|
-
tertiary; // -128 to +127; used only by reorder element values
|
|
19
|
-
flags;
|
|
20
|
-
isEqual(a) {
|
|
21
|
-
return a.value === this.value &&
|
|
22
|
-
a.order === this.order &&
|
|
23
|
-
a.tertiary === this.tertiary &&
|
|
24
|
-
a.flags === this.flags;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
;
|
|
28
|
-
export class ElementString extends Array {
|
|
29
|
-
/**
|
|
30
|
-
* @param source if a string array, does not get reinterpreted as UnicodeSet. This is used with vars, etc. Or pass `["str"]` for an explicit 1-element elem.
|
|
31
|
-
* If it is a string, will be interpreted per reorder element rules.
|
|
32
|
-
*/
|
|
33
|
-
static fromStrings(sections, source, order, tertiary, tertiary_base, prebase) {
|
|
34
|
-
// the returned array
|
|
35
|
-
const array = new ElementString();
|
|
36
|
-
if (!source) {
|
|
37
|
-
return array;
|
|
38
|
-
}
|
|
39
|
-
let items;
|
|
40
|
-
if (Array.isArray(source)) {
|
|
41
|
-
items = source.map(segment => new ElementSegment(segment, ElementType.string));
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
// use segmenter to analyze each part
|
|
45
|
-
items = ElementParser.segment(source);
|
|
46
|
-
}
|
|
47
|
-
let orders = order ? order.split(" ") : [];
|
|
48
|
-
if (orders.length == 1) {
|
|
49
|
-
orders = Array(items.length).fill(orders[0]);
|
|
50
|
-
}
|
|
51
|
-
let tertiaries = tertiary ? tertiary.split(" ") : [];
|
|
52
|
-
if (tertiaries.length == 1) {
|
|
53
|
-
tertiaries = Array(items.length).fill(tertiaries[0]);
|
|
54
|
-
}
|
|
55
|
-
let tertiary_bases = tertiary_base ? tertiary_base.split(" ") : [];
|
|
56
|
-
if (tertiary_bases.length == 1) {
|
|
57
|
-
tertiary_bases = Array(items.length).fill(tertiary_bases[0]);
|
|
58
|
-
}
|
|
59
|
-
let prebases = prebase ? prebase.split(" ") : [];
|
|
60
|
-
if (prebases.length == 1) {
|
|
61
|
-
prebases = Array(items.length).fill(prebases[0]);
|
|
62
|
-
}
|
|
63
|
-
for (let i = 0; i < items.length; i++) {
|
|
64
|
-
let elem = new ElemElement();
|
|
65
|
-
const item = items[i];
|
|
66
|
-
let typeFlag = 0;
|
|
67
|
-
if (item.type === ElementType.uset) {
|
|
68
|
-
typeFlag |= constants.elem_flags_type_uset;
|
|
69
|
-
// TODO-LDML: err on max buffer size
|
|
70
|
-
const needRanges = sections.usetparser.sizeUnicodeSet(item.segment);
|
|
71
|
-
if (needRanges < 0) {
|
|
72
|
-
// Note that sizeUnicodeSet() already will notify via callback if there's an
|
|
73
|
-
// error. So we can just exit here.
|
|
74
|
-
return null; // UnicodeSet error
|
|
75
|
-
}
|
|
76
|
-
const uset = sections.usetparser.parseUnicodeSet(item.segment, needRanges);
|
|
77
|
-
if (!uset) {
|
|
78
|
-
return null; // UnicodeSet error already thrown
|
|
79
|
-
}
|
|
80
|
-
elem.uset = sections.uset.allocUset(uset, sections);
|
|
81
|
-
elem.value = sections.strs.allocString('', { singleOk: true }); // no string
|
|
82
|
-
}
|
|
83
|
-
else if (item.type === ElementType.codepoint || item.type === ElementType.escaped || item.type === ElementType.string) {
|
|
84
|
-
// some kind of a string
|
|
85
|
-
let str = item.segment;
|
|
86
|
-
if (item.type === ElementType.escaped && !MATCH_HEX_ESCAPE.test(str)) {
|
|
87
|
-
str = unescapeOneQuadString(str);
|
|
88
|
-
// TODO-LDML: any other escape forms here?
|
|
89
|
-
elem.value = sections.strs.allocString(str, { singleOk: true });
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
elem.value = sections.strs.allocString(str, { unescape: true, singleOk: true });
|
|
93
|
-
}
|
|
94
|
-
// Now did we end up with one char or no?
|
|
95
|
-
if (elem.value.isOneChar) {
|
|
96
|
-
typeFlag |= constants.elem_flags_type_char;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
typeFlag |= constants.elem_flags_type_str;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
elem.order = orders.length ? parseInt(orders[i], 10) : 0;
|
|
103
|
-
elem.tertiary = tertiaries.length ? parseInt(tertiaries[i], 10) : 0;
|
|
104
|
-
elem.flags = ElemElementFlags.none |
|
|
105
|
-
(ElemElementFlags.type & typeFlag) |
|
|
106
|
-
(tertiary_bases?.[i] == '1' /* TODO-LDML: or 'true'? */ ? ElemElementFlags.tertiary_base : 0) |
|
|
107
|
-
(prebases?.[i] == '1' /* TODO-LDML: or 'true'? */ ? ElemElementFlags.prebase : 0);
|
|
108
|
-
array.push(elem);
|
|
109
|
-
}
|
|
110
|
-
;
|
|
111
|
-
return array;
|
|
112
|
-
}
|
|
113
|
-
isEqual(a) {
|
|
114
|
-
if (a.length != this.length) {
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
for (let i = 0; i < a.length; i++) {
|
|
118
|
-
if (!this[i].isEqual(a[i])) {
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
;
|
|
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]="3304ab9e-d0b0-5a93-b610-3ea437fdead3")}catch(e){}}();
|
|
3
|
+
import { constants } from '@keymanapp/ldml-keyboard-constants';
|
|
4
|
+
import { ElementParser, ElementSegment, ElementType } from '../ldml-keyboard/pattern-parser.js';
|
|
5
|
+
import { MATCH_HEX_ESCAPE, unescapeOneQuadString } from '../util/util.js';
|
|
6
|
+
export var ElemElementFlags;
|
|
7
|
+
(function (ElemElementFlags) {
|
|
8
|
+
ElemElementFlags[ElemElementFlags["none"] = 0] = "none";
|
|
9
|
+
ElemElementFlags[ElemElementFlags["type"] = constants.elem_flags_type] = "type";
|
|
10
|
+
ElemElementFlags[ElemElementFlags["tertiary_base"] = constants.elem_flags_tertiary_base] = "tertiary_base";
|
|
11
|
+
ElemElementFlags[ElemElementFlags["prebase"] = constants.elem_flags_prebase] = "prebase";
|
|
12
|
+
})(ElemElementFlags || (ElemElementFlags = {}));
|
|
13
|
+
;
|
|
14
|
+
export class ElemElement {
|
|
15
|
+
value; // UnicodeSet or UCS32LE character
|
|
16
|
+
uset;
|
|
17
|
+
order; // -128 to +127; used only by reorder element values
|
|
18
|
+
tertiary; // -128 to +127; used only by reorder element values
|
|
19
|
+
flags;
|
|
20
|
+
isEqual(a) {
|
|
21
|
+
return a.value === this.value &&
|
|
22
|
+
a.order === this.order &&
|
|
23
|
+
a.tertiary === this.tertiary &&
|
|
24
|
+
a.flags === this.flags;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
;
|
|
28
|
+
export class ElementString extends Array {
|
|
29
|
+
/**
|
|
30
|
+
* @param source if a string array, does not get reinterpreted as UnicodeSet. This is used with vars, etc. Or pass `["str"]` for an explicit 1-element elem.
|
|
31
|
+
* If it is a string, will be interpreted per reorder element rules.
|
|
32
|
+
*/
|
|
33
|
+
static fromStrings(sections, source, order, tertiary, tertiary_base, prebase) {
|
|
34
|
+
// the returned array
|
|
35
|
+
const array = new ElementString();
|
|
36
|
+
if (!source) {
|
|
37
|
+
return array;
|
|
38
|
+
}
|
|
39
|
+
let items;
|
|
40
|
+
if (Array.isArray(source)) {
|
|
41
|
+
items = source.map(segment => new ElementSegment(segment, ElementType.string));
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
// use segmenter to analyze each part
|
|
45
|
+
items = ElementParser.segment(source);
|
|
46
|
+
}
|
|
47
|
+
let orders = order ? order.split(" ") : [];
|
|
48
|
+
if (orders.length == 1) {
|
|
49
|
+
orders = Array(items.length).fill(orders[0]);
|
|
50
|
+
}
|
|
51
|
+
let tertiaries = tertiary ? tertiary.split(" ") : [];
|
|
52
|
+
if (tertiaries.length == 1) {
|
|
53
|
+
tertiaries = Array(items.length).fill(tertiaries[0]);
|
|
54
|
+
}
|
|
55
|
+
let tertiary_bases = tertiary_base ? tertiary_base.split(" ") : [];
|
|
56
|
+
if (tertiary_bases.length == 1) {
|
|
57
|
+
tertiary_bases = Array(items.length).fill(tertiary_bases[0]);
|
|
58
|
+
}
|
|
59
|
+
let prebases = prebase ? prebase.split(" ") : [];
|
|
60
|
+
if (prebases.length == 1) {
|
|
61
|
+
prebases = Array(items.length).fill(prebases[0]);
|
|
62
|
+
}
|
|
63
|
+
for (let i = 0; i < items.length; i++) {
|
|
64
|
+
let elem = new ElemElement();
|
|
65
|
+
const item = items[i];
|
|
66
|
+
let typeFlag = 0;
|
|
67
|
+
if (item.type === ElementType.uset) {
|
|
68
|
+
typeFlag |= constants.elem_flags_type_uset;
|
|
69
|
+
// TODO-LDML: err on max buffer size
|
|
70
|
+
const needRanges = sections.usetparser.sizeUnicodeSet(item.segment);
|
|
71
|
+
if (needRanges < 0) {
|
|
72
|
+
// Note that sizeUnicodeSet() already will notify via callback if there's an
|
|
73
|
+
// error. So we can just exit here.
|
|
74
|
+
return null; // UnicodeSet error
|
|
75
|
+
}
|
|
76
|
+
const uset = sections.usetparser.parseUnicodeSet(item.segment, needRanges);
|
|
77
|
+
if (!uset) {
|
|
78
|
+
return null; // UnicodeSet error already thrown
|
|
79
|
+
}
|
|
80
|
+
elem.uset = sections.uset.allocUset(uset, sections);
|
|
81
|
+
elem.value = sections.strs.allocString('', { singleOk: true }); // no string
|
|
82
|
+
}
|
|
83
|
+
else if (item.type === ElementType.codepoint || item.type === ElementType.escaped || item.type === ElementType.string) {
|
|
84
|
+
// some kind of a string
|
|
85
|
+
let str = item.segment;
|
|
86
|
+
if (item.type === ElementType.escaped && !MATCH_HEX_ESCAPE.test(str)) {
|
|
87
|
+
str = unescapeOneQuadString(str);
|
|
88
|
+
// TODO-LDML: any other escape forms here?
|
|
89
|
+
elem.value = sections.strs.allocString(str, { singleOk: true });
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
elem.value = sections.strs.allocString(str, { unescape: true, singleOk: true });
|
|
93
|
+
}
|
|
94
|
+
// Now did we end up with one char or no?
|
|
95
|
+
if (elem.value.isOneChar) {
|
|
96
|
+
typeFlag |= constants.elem_flags_type_char;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
typeFlag |= constants.elem_flags_type_str;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
elem.order = orders.length ? parseInt(orders[i], 10) : 0;
|
|
103
|
+
elem.tertiary = tertiaries.length ? parseInt(tertiaries[i], 10) : 0;
|
|
104
|
+
elem.flags = ElemElementFlags.none |
|
|
105
|
+
(ElemElementFlags.type & typeFlag) |
|
|
106
|
+
(tertiary_bases?.[i] == '1' /* TODO-LDML: or 'true'? */ ? ElemElementFlags.tertiary_base : 0) |
|
|
107
|
+
(prebases?.[i] == '1' /* TODO-LDML: or 'true'? */ ? ElemElementFlags.prebase : 0);
|
|
108
|
+
array.push(elem);
|
|
109
|
+
}
|
|
110
|
+
;
|
|
111
|
+
return array;
|
|
112
|
+
}
|
|
113
|
+
isEqual(a) {
|
|
114
|
+
if (a.length != this.length) {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
for (let i = 0; i < a.length; i++) {
|
|
118
|
+
if (!this[i].isEqual(a[i])) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
;
|
|
126
126
|
//# sourceMappingURL=element-string.js.map
|
|
127
|
-
//# debugId=
|
|
127
|
+
//# debugId=3304ab9e-d0b0-5a93-b610-3ea437fdead3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-string.js","sources":["../../../src/kmx/element-string.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,uDAAQ,CAAA;IACR,4CAAO,SAAS,CAAC,eAAe,UAAA,CAAA;IAChC,qDAAgB,SAAS,CAAC,wBAAwB,mBAAA,CAAA;IAClD,+CAAU,SAAS,CAAC,kBAAkB,aAAA,CAAA;AACxC,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AACD,CAAC;AAED,MAAM,OAAO,WAAW;IACtB,KAAK,CAAY,CAAC,kCAAkC;IACpD,IAAI,CAAY;IAChB,KAAK,CAAS,CAAC,oDAAoD;IACnE,QAAQ,CAAS,CAAC,oDAAoD;IACtE,KAAK,CAAmB;IACxB,OAAO,CAAC,CAAc;QACpB,OAAO,CA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,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC3B,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AACD,CAAC","debug_id":"3304ab9e-d0b0-5a93-b610-3ea437fdead3"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export declare enum KeymanTarget {
|
|
2
|
-
any = "any",
|
|
3
|
-
windows = "windows",
|
|
4
|
-
macosx = "macosx",
|
|
5
|
-
linux = "linux",
|
|
6
|
-
web = "web",
|
|
7
|
-
iphone = "iphone",
|
|
8
|
-
ipad = "ipad",
|
|
9
|
-
androidphone = "androidphone",
|
|
10
|
-
androidtablet = "androidtablet",
|
|
11
|
-
mobile = "mobile",
|
|
12
|
-
desktop = "desktop",
|
|
13
|
-
tablet = "tablet"
|
|
14
|
-
}
|
|
15
|
-
export declare const AllKeymanTargets: KeymanTarget[], TouchKeymanTargets: KeymanTarget[], KMXKeymanTargets: KeymanTarget[], KMWKeymanTargets: KeymanTarget[], KeymanTargetsUsingKVK: KeymanTarget[], SKeymanTargetNames: {
|
|
16
|
-
[index: string]: string;
|
|
17
|
-
};
|
|
18
|
-
export declare function keymanTargetsFromString(targets: string, options?: {
|
|
19
|
-
expandTargets?: boolean;
|
|
20
|
-
}): KeymanTarget[];
|
|
1
|
+
export declare enum KeymanTarget {
|
|
2
|
+
any = "any",
|
|
3
|
+
windows = "windows",
|
|
4
|
+
macosx = "macosx",
|
|
5
|
+
linux = "linux",
|
|
6
|
+
web = "web",
|
|
7
|
+
iphone = "iphone",
|
|
8
|
+
ipad = "ipad",
|
|
9
|
+
androidphone = "androidphone",
|
|
10
|
+
androidtablet = "androidtablet",
|
|
11
|
+
mobile = "mobile",
|
|
12
|
+
desktop = "desktop",
|
|
13
|
+
tablet = "tablet"
|
|
14
|
+
}
|
|
15
|
+
export declare const AllKeymanTargets: KeymanTarget[], TouchKeymanTargets: KeymanTarget[], KMXKeymanTargets: KeymanTarget[], KMWKeymanTargets: KeymanTarget[], KeymanTargetsUsingKVK: KeymanTarget[], SKeymanTargetNames: {
|
|
16
|
+
[index: string]: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function keymanTargetsFromString(targets: string, options?: {
|
|
19
|
+
expandTargets?: boolean;
|
|
20
|
+
}): KeymanTarget[];
|
|
21
21
|
//# sourceMappingURL=keyman-targets.d.ts.map
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
//
|
|
2
|
-
// This mirrors UKeymanTargets.pas
|
|
3
|
-
//
|
|
1
|
+
//
|
|
2
|
+
// This mirrors UKeymanTargets.pas
|
|
3
|
+
//
|
|
4
4
|
|
|
5
|
-
!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]="
|
|
6
|
-
export var KeymanTarget;
|
|
7
|
-
(function (KeymanTarget) {
|
|
8
|
-
KeymanTarget["any"] = "any";
|
|
9
|
-
KeymanTarget["windows"] = "windows";
|
|
10
|
-
KeymanTarget["macosx"] = "macosx";
|
|
11
|
-
KeymanTarget["linux"] = "linux";
|
|
12
|
-
KeymanTarget["web"] = "web";
|
|
13
|
-
KeymanTarget["iphone"] = "iphone";
|
|
14
|
-
KeymanTarget["ipad"] = "ipad";
|
|
15
|
-
KeymanTarget["androidphone"] = "androidphone";
|
|
16
|
-
KeymanTarget["androidtablet"] = "androidtablet";
|
|
17
|
-
KeymanTarget["mobile"] = "mobile";
|
|
18
|
-
KeymanTarget["desktop"] = "desktop";
|
|
19
|
-
KeymanTarget["tablet"] = "tablet";
|
|
20
|
-
})(KeymanTarget || (KeymanTarget = {}));
|
|
21
|
-
;
|
|
22
|
-
export const
|
|
23
|
-
// Note: if these change, update the copied values in KeyboardParser.pas accordingly
|
|
24
|
-
AllKeymanTargets = [
|
|
25
|
-
KeymanTarget.any,
|
|
26
|
-
KeymanTarget.windows, KeymanTarget.macosx, KeymanTarget.linux,
|
|
27
|
-
KeymanTarget.web, KeymanTarget.iphone, KeymanTarget.ipad, KeymanTarget.androidphone, KeymanTarget.androidtablet,
|
|
28
|
-
KeymanTarget.mobile, KeymanTarget.desktop, KeymanTarget.tablet
|
|
29
|
-
], TouchKeymanTargets = [
|
|
30
|
-
KeymanTarget.iphone, KeymanTarget.ipad, KeymanTarget.androidphone, KeymanTarget.androidtablet,
|
|
31
|
-
KeymanTarget.mobile, KeymanTarget.tablet
|
|
32
|
-
],
|
|
33
|
-
// Compile to .kmx
|
|
34
|
-
KMXKeymanTargets = [
|
|
35
|
-
KeymanTarget.windows, KeymanTarget.macosx, KeymanTarget.linux, KeymanTarget.desktop
|
|
36
|
-
],
|
|
37
|
-
// Compile to .js
|
|
38
|
-
KMWKeymanTargets = [
|
|
39
|
-
KeymanTarget.web, KeymanTarget.iphone, KeymanTarget.ipad, KeymanTarget.androidphone, KeymanTarget.androidtablet,
|
|
40
|
-
KeymanTarget.mobile, KeymanTarget.tablet
|
|
41
|
-
],
|
|
42
|
-
// Supports .kvks
|
|
43
|
-
KeymanTargetsUsingKVK = [
|
|
44
|
-
KeymanTarget.windows, KeymanTarget.macosx, KeymanTarget.linux, KeymanTarget.desktop, KeymanTarget.web
|
|
45
|
-
],
|
|
46
|
-
// Friendly names for targets, e.g. for documentation
|
|
47
|
-
SKeymanTargetNames = {
|
|
48
|
-
[KeymanTarget.any]: 'All',
|
|
49
|
-
[KeymanTarget.windows]: 'Windows', [KeymanTarget.macosx]: 'macOS', [KeymanTarget.linux]: 'Linux',
|
|
50
|
-
[KeymanTarget.web]: 'Web', [KeymanTarget.iphone]: 'iPhone', [KeymanTarget.ipad]: 'iPad',
|
|
51
|
-
[KeymanTarget.androidphone]: 'Android phone', [KeymanTarget.androidtablet]: 'Android tablet',
|
|
52
|
-
[KeymanTarget.mobile]: 'Mobile devices', [KeymanTarget.desktop]: 'Desktop devices',
|
|
53
|
-
[KeymanTarget.tablet]: 'Tablet devices'
|
|
54
|
-
};
|
|
55
|
-
export function keymanTargetsFromString(targets, options) {
|
|
56
|
-
let result = new Set(targets.split(/ +/));
|
|
57
|
-
if (options?.expandTargets) {
|
|
58
|
-
if (result.has(KeymanTarget.any)) {
|
|
59
|
-
return AllKeymanTargets;
|
|
60
|
-
}
|
|
61
|
-
if (result.has(KeymanTarget.mobile)) {
|
|
62
|
-
result.delete(KeymanTarget.mobile);
|
|
63
|
-
result.add(KeymanTarget.androidphone);
|
|
64
|
-
result.add(KeymanTarget.iphone);
|
|
65
|
-
}
|
|
66
|
-
if (result.has(KeymanTarget.tablet)) {
|
|
67
|
-
result.delete(KeymanTarget.tablet);
|
|
68
|
-
result.add(KeymanTarget.androidtablet);
|
|
69
|
-
result.add(KeymanTarget.ipad);
|
|
70
|
-
}
|
|
71
|
-
if (result.has(KeymanTarget.desktop)) {
|
|
72
|
-
result.delete(KeymanTarget.desktop);
|
|
73
|
-
result.add(KeymanTarget.linux);
|
|
74
|
-
result.add(KeymanTarget.macosx);
|
|
75
|
-
result.add(KeymanTarget.windows);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return [...result];
|
|
79
|
-
}
|
|
5
|
+
!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]="1c5604c4-0969-5673-81ea-bad6b3c074c4")}catch(e){}}();
|
|
6
|
+
export var KeymanTarget;
|
|
7
|
+
(function (KeymanTarget) {
|
|
8
|
+
KeymanTarget["any"] = "any";
|
|
9
|
+
KeymanTarget["windows"] = "windows";
|
|
10
|
+
KeymanTarget["macosx"] = "macosx";
|
|
11
|
+
KeymanTarget["linux"] = "linux";
|
|
12
|
+
KeymanTarget["web"] = "web";
|
|
13
|
+
KeymanTarget["iphone"] = "iphone";
|
|
14
|
+
KeymanTarget["ipad"] = "ipad";
|
|
15
|
+
KeymanTarget["androidphone"] = "androidphone";
|
|
16
|
+
KeymanTarget["androidtablet"] = "androidtablet";
|
|
17
|
+
KeymanTarget["mobile"] = "mobile";
|
|
18
|
+
KeymanTarget["desktop"] = "desktop";
|
|
19
|
+
KeymanTarget["tablet"] = "tablet";
|
|
20
|
+
})(KeymanTarget || (KeymanTarget = {}));
|
|
21
|
+
;
|
|
22
|
+
export const
|
|
23
|
+
// Note: if these change, update the copied values in KeyboardParser.pas accordingly
|
|
24
|
+
AllKeymanTargets = [
|
|
25
|
+
KeymanTarget.any,
|
|
26
|
+
KeymanTarget.windows, KeymanTarget.macosx, KeymanTarget.linux,
|
|
27
|
+
KeymanTarget.web, KeymanTarget.iphone, KeymanTarget.ipad, KeymanTarget.androidphone, KeymanTarget.androidtablet,
|
|
28
|
+
KeymanTarget.mobile, KeymanTarget.desktop, KeymanTarget.tablet
|
|
29
|
+
], TouchKeymanTargets = [
|
|
30
|
+
KeymanTarget.iphone, KeymanTarget.ipad, KeymanTarget.androidphone, KeymanTarget.androidtablet,
|
|
31
|
+
KeymanTarget.mobile, KeymanTarget.tablet
|
|
32
|
+
],
|
|
33
|
+
// Compile to .kmx
|
|
34
|
+
KMXKeymanTargets = [
|
|
35
|
+
KeymanTarget.windows, KeymanTarget.macosx, KeymanTarget.linux, KeymanTarget.desktop
|
|
36
|
+
],
|
|
37
|
+
// Compile to .js
|
|
38
|
+
KMWKeymanTargets = [
|
|
39
|
+
KeymanTarget.web, KeymanTarget.iphone, KeymanTarget.ipad, KeymanTarget.androidphone, KeymanTarget.androidtablet,
|
|
40
|
+
KeymanTarget.mobile, KeymanTarget.tablet
|
|
41
|
+
],
|
|
42
|
+
// Supports .kvks
|
|
43
|
+
KeymanTargetsUsingKVK = [
|
|
44
|
+
KeymanTarget.windows, KeymanTarget.macosx, KeymanTarget.linux, KeymanTarget.desktop, KeymanTarget.web
|
|
45
|
+
],
|
|
46
|
+
// Friendly names for targets, e.g. for documentation
|
|
47
|
+
SKeymanTargetNames = {
|
|
48
|
+
[KeymanTarget.any]: 'All',
|
|
49
|
+
[KeymanTarget.windows]: 'Windows', [KeymanTarget.macosx]: 'macOS', [KeymanTarget.linux]: 'Linux',
|
|
50
|
+
[KeymanTarget.web]: 'Web', [KeymanTarget.iphone]: 'iPhone', [KeymanTarget.ipad]: 'iPad',
|
|
51
|
+
[KeymanTarget.androidphone]: 'Android phone', [KeymanTarget.androidtablet]: 'Android tablet',
|
|
52
|
+
[KeymanTarget.mobile]: 'Mobile devices', [KeymanTarget.desktop]: 'Desktop devices',
|
|
53
|
+
[KeymanTarget.tablet]: 'Tablet devices'
|
|
54
|
+
};
|
|
55
|
+
export function keymanTargetsFromString(targets, options) {
|
|
56
|
+
let result = new Set(targets.split(/ +/));
|
|
57
|
+
if (options?.expandTargets) {
|
|
58
|
+
if (result.has(KeymanTarget.any)) {
|
|
59
|
+
return AllKeymanTargets;
|
|
60
|
+
}
|
|
61
|
+
if (result.has(KeymanTarget.mobile)) {
|
|
62
|
+
result.delete(KeymanTarget.mobile);
|
|
63
|
+
result.add(KeymanTarget.androidphone);
|
|
64
|
+
result.add(KeymanTarget.iphone);
|
|
65
|
+
}
|
|
66
|
+
if (result.has(KeymanTarget.tablet)) {
|
|
67
|
+
result.delete(KeymanTarget.tablet);
|
|
68
|
+
result.add(KeymanTarget.androidtablet);
|
|
69
|
+
result.add(KeymanTarget.ipad);
|
|
70
|
+
}
|
|
71
|
+
if (result.has(KeymanTarget.desktop)) {
|
|
72
|
+
result.delete(KeymanTarget.desktop);
|
|
73
|
+
result.add(KeymanTarget.linux);
|
|
74
|
+
result.add(KeymanTarget.macosx);
|
|
75
|
+
result.add(KeymanTarget.windows);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return [...result];
|
|
79
|
+
}
|
|
80
80
|
//# sourceMappingURL=keyman-targets.js.map
|
|
81
|
-
//# debugId=
|
|
81
|
+
//# debugId=1c5604c4-0969-5673-81ea-bad6b3c074c4
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyman-targets.js","sources":["../../../src/kmx/keyman-targets.ts"],"sourceRoot":"","names":[],"mappings":"AACA,EAAE;AACF,kCAAkC;AAClC,EAAE;;;AAEF,MAAM,CAAN,IACE,YAKC;AANH,WACE,YAAY;IACV,2BAAW,CAAA;IACX,mCAAmB,CAAA;IAAE,iCAAiB,CAAA;IAAE,+BAAe,CAAA;IACvD,2BAAW,CAAA;IAAE,iCAAiB,CAAA;IAAE,6BAAa,CAAA;IAAE,6CAA6B,CAAA;IAAE,+CAA+B,CAAA;IAC7G,iCAAiB,CAAA;IAAE,mCAAmB,CAAA;IAAE,iCAAiB,CAAA;AAC3D,CAAC,EALD,YAAY,KAAZ,YAAY,QAKX;AAAA,CAAC;AAEJ,MAAM,CAAC;AACL,oFAAoF;AACpF,gBAAgB,GAAmB;IACjC,YAAY,CAAC,GAAG;IAChB,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK;IAC7D,YAAY,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,YAAY,EAAE,YAAY,CAAC,aAAa;IAC/G,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM;CAC/D,EAED,kBAAkB,GAAmB;IACnC,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,YAAY,EAAE,YAAY,CAAC,aAAa;IAC7F,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM;CACzC;AAED,kBAAkB;AAClB,gBAAgB,GAAmB;IACjC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,OAAO;CACpF;AAED,iBA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MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YACnC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;YACtC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAClC,CAAC;QACD,IAAG,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YACnC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;YACvC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;QACD,IAAG,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;YACpC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YACpC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAC/B,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YAChC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;AACrB,CAAC","debug_id":"1c5604c4-0969-5673-81ea-bad6b3c074c4"}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { KMXFile, GROUP, KEY, STORE, BUILDER_COMP_KEYBOARD, BUILDER_COMP_KEYBOARD_KMXPLUSINFO, BUILDER_COMP_STORE, BUILDER_COMP_GROUP, BUILDER_COMP_KEY } from './kmx.js';
|
|
2
|
-
export default class KMXBuilder {
|
|
3
|
-
file: KMXFile;
|
|
4
|
-
base_keyboard: number;
|
|
5
|
-
base_kmxplus: number;
|
|
6
|
-
comp_header: BUILDER_COMP_KEYBOARD;
|
|
7
|
-
comp_kmxplus: BUILDER_COMP_KEYBOARD_KMXPLUSINFO;
|
|
8
|
-
comp_stores: {
|
|
9
|
-
base: number;
|
|
10
|
-
store: STORE;
|
|
11
|
-
obj: BUILDER_COMP_STORE;
|
|
12
|
-
}[];
|
|
13
|
-
comp_groups: {
|
|
14
|
-
base: number;
|
|
15
|
-
group: GROUP;
|
|
16
|
-
obj: BUILDER_COMP_GROUP;
|
|
17
|
-
keys: {
|
|
18
|
-
base: number;
|
|
19
|
-
key: KEY;
|
|
20
|
-
obj: BUILDER_COMP_KEY;
|
|
21
|
-
}[];
|
|
22
|
-
}[];
|
|
23
|
-
comp_kmxplus_data: Uint8Array;
|
|
24
|
-
writeDebug: boolean;
|
|
25
|
-
constructor(file: KMXFile, writeDebug: boolean);
|
|
26
|
-
calculateStringOffsetAndSize(string: string, base: number, requireString?: boolean): number[];
|
|
27
|
-
private build;
|
|
28
|
-
buildBitmap(): number;
|
|
29
|
-
buildKMXPlus(base: number): number;
|
|
30
|
-
setString(file: Uint8Array, pos: number, str: string, requireString?: boolean): void;
|
|
31
|
-
compile(): Uint8Array;
|
|
32
|
-
}
|
|
1
|
+
import { KMXFile, GROUP, KEY, STORE, BUILDER_COMP_KEYBOARD, BUILDER_COMP_KEYBOARD_KMXPLUSINFO, BUILDER_COMP_STORE, BUILDER_COMP_GROUP, BUILDER_COMP_KEY } from './kmx.js';
|
|
2
|
+
export default class KMXBuilder {
|
|
3
|
+
file: KMXFile;
|
|
4
|
+
base_keyboard: number;
|
|
5
|
+
base_kmxplus: number;
|
|
6
|
+
comp_header: BUILDER_COMP_KEYBOARD;
|
|
7
|
+
comp_kmxplus: BUILDER_COMP_KEYBOARD_KMXPLUSINFO;
|
|
8
|
+
comp_stores: {
|
|
9
|
+
base: number;
|
|
10
|
+
store: STORE;
|
|
11
|
+
obj: BUILDER_COMP_STORE;
|
|
12
|
+
}[];
|
|
13
|
+
comp_groups: {
|
|
14
|
+
base: number;
|
|
15
|
+
group: GROUP;
|
|
16
|
+
obj: BUILDER_COMP_GROUP;
|
|
17
|
+
keys: {
|
|
18
|
+
base: number;
|
|
19
|
+
key: KEY;
|
|
20
|
+
obj: BUILDER_COMP_KEY;
|
|
21
|
+
}[];
|
|
22
|
+
}[];
|
|
23
|
+
comp_kmxplus_data: Uint8Array;
|
|
24
|
+
writeDebug: boolean;
|
|
25
|
+
constructor(file: KMXFile, writeDebug: boolean);
|
|
26
|
+
calculateStringOffsetAndSize(string: string, base: number, requireString?: boolean): number[];
|
|
27
|
+
private build;
|
|
28
|
+
buildBitmap(): number;
|
|
29
|
+
buildKMXPlus(base: number): number;
|
|
30
|
+
setString(file: Uint8Array, pos: number, str: string, requireString?: boolean): void;
|
|
31
|
+
compile(): Uint8Array;
|
|
32
|
+
}
|
|
33
33
|
//# sourceMappingURL=kmx-builder.d.ts.map
|