@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,323 +1,323 @@
|
|
|
1
|
-
import { ElementString } from './element-string.js';
|
|
2
|
-
import { ListItem } from './string-list.js';
|
|
3
|
-
import { KMXFile } from './kmx.js';
|
|
4
|
-
import { UnicodeSetParser, UnicodeSet } from '@keymanapp/common-types';
|
|
5
|
-
export declare class Section {
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Sections which are needed as dependencies.
|
|
9
|
-
*/
|
|
10
|
-
export interface DependencySections extends KMXPlusData {
|
|
11
|
-
/** needed for UnicodeSet parsing */
|
|
12
|
-
usetparser?: UnicodeSetParser;
|
|
13
|
-
}
|
|
14
|
-
export declare class Sect extends Section {
|
|
15
|
-
}
|
|
16
|
-
export declare class Elem extends Section {
|
|
17
|
-
strings: ElementString[];
|
|
18
|
-
constructor(sections: DependencySections);
|
|
19
|
-
/**
|
|
20
|
-
* @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.
|
|
21
|
-
* If it is a string, will be interpreted per reorder element ruls.
|
|
22
|
-
*/
|
|
23
|
-
allocElementString(sections: DependencySections, source: string | string[], order?: string, tertiary?: string, tertiary_base?: string, prebase?: string): ElementString;
|
|
24
|
-
}
|
|
25
|
-
export declare class Loca extends Section {
|
|
26
|
-
locales: StrsItem[];
|
|
27
|
-
}
|
|
28
|
-
export declare enum KeyboardSettings {
|
|
29
|
-
none = 0,
|
|
30
|
-
normalizationDisabled
|
|
31
|
-
}
|
|
32
|
-
export declare class Meta extends Section {
|
|
33
|
-
author: StrsItem;
|
|
34
|
-
conform: StrsItem;
|
|
35
|
-
layout: StrsItem;
|
|
36
|
-
name: StrsItem;
|
|
37
|
-
indicator: StrsItem;
|
|
38
|
-
version: StrsItem;
|
|
39
|
-
settings: KeyboardSettings;
|
|
40
|
-
/** convenience for checking settings */
|
|
41
|
-
get normalizationDisabled(): number;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* A string item in memory. This will be replaced with an index
|
|
45
|
-
* into the string table at finalization.
|
|
46
|
-
*/
|
|
47
|
-
export declare class StrsItem {
|
|
48
|
-
/** string value */
|
|
49
|
-
readonly value: string;
|
|
50
|
-
/** char value if this is a single-char placeholder item (CharStrsItem) */
|
|
51
|
-
readonly char?: number;
|
|
52
|
-
constructor(value: string, char?: number);
|
|
53
|
-
compareTo(o: StrsItem): number;
|
|
54
|
-
static binaryStringCompare(a: string, b: string): number;
|
|
55
|
-
get isOneChar(): boolean;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* A StrsItem for a single char. Used as a placeholder and hint to the builder
|
|
59
|
-
*/
|
|
60
|
-
export declare class CharStrsItem extends StrsItem {
|
|
61
|
-
constructor(value: string);
|
|
62
|
-
}
|
|
63
|
-
/** class for string manipulation options. These are in order of the pipeline. */
|
|
64
|
-
export interface StrsOptions {
|
|
65
|
-
/** apply string variables (requires sections) */
|
|
66
|
-
stringVariables?: boolean;
|
|
67
|
-
/** apply markers (requires sections) */
|
|
68
|
-
markers?: boolean;
|
|
69
|
-
/** unescape with unescapeString */
|
|
70
|
-
unescape?: boolean;
|
|
71
|
-
/** apply (possibly marker safe) nfd. Not for regex use. */
|
|
72
|
-
nfd?: boolean;
|
|
73
|
-
/** string can be stored as a single CharStrsItem, not in strs table. */
|
|
74
|
-
singleOk?: boolean;
|
|
75
|
-
}
|
|
76
|
-
export declare class Strs extends Section {
|
|
77
|
-
/** the in-memory string table */
|
|
78
|
-
strings: StrsItem[];
|
|
79
|
-
/** for validating */
|
|
80
|
-
allProcessedStrings: Set<string>;
|
|
81
|
-
/**
|
|
82
|
-
* Allocate a StrsItem given the string, unescaping if necessary.
|
|
83
|
-
* @param s escaped string
|
|
84
|
-
* @param opts options for allocation
|
|
85
|
-
* @param sections other sections, if needed
|
|
86
|
-
* @returns StrsItem
|
|
87
|
-
*/
|
|
88
|
-
allocString(s?: string, opts?: StrsOptions, sections?: DependencySections): StrsItem;
|
|
89
|
-
/** process everything according to opts */
|
|
90
|
-
static processString(s: string, opts: StrsOptions, sections: DependencySections): string;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* See LKVariables
|
|
94
|
-
*/
|
|
95
|
-
export declare class Vars extends Section {
|
|
96
|
-
totalCount(): number;
|
|
97
|
-
markers: ListItem;
|
|
98
|
-
strings: StringVarItem[];
|
|
99
|
-
sets: SetVarItem[];
|
|
100
|
-
usets: UnicodeSetItem[];
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
* @returns false if any invalid variables
|
|
104
|
-
*/
|
|
105
|
-
valid(): boolean;
|
|
106
|
-
substituteSets(str: string, sections: DependencySections): string;
|
|
107
|
-
substituteUnicodeSets(value: string, sections: DependencySections): string;
|
|
108
|
-
substituteStrings(str: string, sections: DependencySections, forMatch?: boolean): string;
|
|
109
|
-
findStringVariableValue(id: string): string;
|
|
110
|
-
substituteSetRegex(str: string, sections: DependencySections): string;
|
|
111
|
-
/**
|
|
112
|
-
* Variable locator facility
|
|
113
|
-
* @param array
|
|
114
|
-
* @param id
|
|
115
|
-
* @returns
|
|
116
|
-
*/
|
|
117
|
-
private static findVariable;
|
|
118
|
-
substituteMarkerString(s: string, forMatch?: boolean): string;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Common base for variable sections
|
|
122
|
-
* See Variable
|
|
123
|
-
*/
|
|
124
|
-
export declare class VarsItem extends Section {
|
|
125
|
-
id: StrsItem;
|
|
126
|
-
value: StrsItem;
|
|
127
|
-
constructor(id: string, value: string, sections: DependencySections);
|
|
128
|
-
valid(): boolean;
|
|
129
|
-
}
|
|
130
|
-
export declare class UnicodeSetItem extends VarsItem {
|
|
131
|
-
constructor(id: string, value: string, sections: DependencySections, usetparser: UnicodeSetParser);
|
|
132
|
-
unicodeSet?: UnicodeSet;
|
|
133
|
-
valid(): boolean;
|
|
134
|
-
}
|
|
135
|
-
export declare class SetVarItem extends VarsItem {
|
|
136
|
-
constructor(id: string, value: string[], sections: DependencySections, rawItems: string[]);
|
|
137
|
-
items: ElementString;
|
|
138
|
-
rawItems: string[];
|
|
139
|
-
valid(): boolean;
|
|
140
|
-
}
|
|
141
|
-
export declare class StringVarItem extends VarsItem {
|
|
142
|
-
constructor(id: string, value: string, sections: DependencySections);
|
|
143
|
-
}
|
|
144
|
-
export declare class TranTransform {
|
|
145
|
-
from: StrsItem;
|
|
146
|
-
to: StrsItem;
|
|
147
|
-
mapFrom: StrsItem;
|
|
148
|
-
mapTo: StrsItem;
|
|
149
|
-
}
|
|
150
|
-
export declare class TranGroup {
|
|
151
|
-
type: number;
|
|
152
|
-
transforms: TranTransform[];
|
|
153
|
-
reorders: TranReorder[];
|
|
154
|
-
}
|
|
155
|
-
export declare class TranReorder {
|
|
156
|
-
elements: ElementString;
|
|
157
|
-
before: ElementString;
|
|
158
|
-
}
|
|
159
|
-
export declare class Tran extends Section {
|
|
160
|
-
groups: TranGroup[];
|
|
161
|
-
get id(): import("@keymanapp/ldml-keyboard-constants").SectionIdent;
|
|
162
|
-
}
|
|
163
|
-
export declare class UsetItem {
|
|
164
|
-
uset: UnicodeSet;
|
|
165
|
-
str: StrsItem;
|
|
166
|
-
constructor(uset: UnicodeSet, str: StrsItem);
|
|
167
|
-
compareTo(other: UsetItem): number;
|
|
168
|
-
}
|
|
169
|
-
export declare class Uset extends Section {
|
|
170
|
-
usets: UsetItem[];
|
|
171
|
-
allocUset(set: UnicodeSet, sections: DependencySections): UsetItem;
|
|
172
|
-
}
|
|
173
|
-
export declare class Bksp extends Tran {
|
|
174
|
-
get id(): import("@keymanapp/ldml-keyboard-constants").SectionIdent;
|
|
175
|
-
}
|
|
176
|
-
export declare class DispItem {
|
|
177
|
-
to: StrsItem;
|
|
178
|
-
id: StrsItem;
|
|
179
|
-
display: StrsItem;
|
|
180
|
-
}
|
|
181
|
-
export declare class Disp extends Section {
|
|
182
|
-
baseCharacter: StrsItem;
|
|
183
|
-
disps: DispItem[];
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* In-memory `<layers>`
|
|
187
|
-
*/
|
|
188
|
-
export declare class LayrList {
|
|
189
|
-
hardware: StrsItem;
|
|
190
|
-
layers: LayrEntry[];
|
|
191
|
-
minDeviceWidth: number;
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* In-memory `<layer>`
|
|
195
|
-
*/
|
|
196
|
-
export declare class LayrEntry {
|
|
197
|
-
id: StrsItem;
|
|
198
|
-
mod: number;
|
|
199
|
-
rows: LayrRow[];
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* In-memory `<row>`
|
|
203
|
-
*/
|
|
204
|
-
export declare class LayrRow {
|
|
205
|
-
keys: StrsItem[];
|
|
206
|
-
}
|
|
207
|
-
export declare class Layr extends Section {
|
|
208
|
-
lists: LayrList[];
|
|
209
|
-
}
|
|
210
|
-
export declare class KeysKeys {
|
|
211
|
-
flags: number;
|
|
212
|
-
flicks: string;
|
|
213
|
-
id: StrsItem;
|
|
214
|
-
longPress: ListItem;
|
|
215
|
-
longPressDefault: StrsItem;
|
|
216
|
-
multiTap: ListItem;
|
|
217
|
-
switch: StrsItem;
|
|
218
|
-
to: StrsItem;
|
|
219
|
-
width: number;
|
|
220
|
-
}
|
|
221
|
-
export declare class KeysKmap {
|
|
222
|
-
vkey: number;
|
|
223
|
-
mod: number;
|
|
224
|
-
key: string;
|
|
225
|
-
}
|
|
226
|
-
export declare class KeysFlicks {
|
|
227
|
-
flicks: KeysFlick[];
|
|
228
|
-
id: StrsItem;
|
|
229
|
-
compareTo(b: KeysFlicks): number;
|
|
230
|
-
constructor(id: StrsItem);
|
|
231
|
-
}
|
|
232
|
-
export declare class KeysFlick {
|
|
233
|
-
directions: ListItem;
|
|
234
|
-
keyId: StrsItem;
|
|
235
|
-
}
|
|
236
|
-
export declare class Keys extends Section {
|
|
237
|
-
keys: KeysKeys[];
|
|
238
|
-
flicks: KeysFlicks[];
|
|
239
|
-
kmap: KeysKmap[];
|
|
240
|
-
constructor(strs: Strs);
|
|
241
|
-
}
|
|
242
|
-
export declare class List extends Section {
|
|
243
|
-
/**
|
|
244
|
-
* Allocate a list from a space-separated list of items.
|
|
245
|
-
* Note that passing undefined or null or `''` will
|
|
246
|
-
* end up being the same as the empty list `[]`
|
|
247
|
-
* @param s space-separated list of items
|
|
248
|
-
* @param opts string options
|
|
249
|
-
* @param sections sections
|
|
250
|
-
* @returns a List object
|
|
251
|
-
*/
|
|
252
|
-
allocListFromSpaces(s: string, opts: StrsOptions, sections: DependencySections): ListItem;
|
|
253
|
-
/**
|
|
254
|
-
* Return a List object referring to the string list.
|
|
255
|
-
* Note that a falsy list, or a list containing only an empty string
|
|
256
|
-
* `['']` will be stored as an empty list `[]`.
|
|
257
|
-
* @param strs Strs section for allocation
|
|
258
|
-
* @param s string list to allocate
|
|
259
|
-
* @returns
|
|
260
|
-
*/
|
|
261
|
-
allocList(s: string[], opts: StrsOptions, sections: DependencySections): ListItem;
|
|
262
|
-
constructor(strs: Strs);
|
|
263
|
-
lists: ListItem[];
|
|
264
|
-
}
|
|
265
|
-
export { ListItem as ListItem };
|
|
266
|
-
export interface KMXPlusData {
|
|
267
|
-
sect?: Strs;
|
|
268
|
-
bksp?: Bksp;
|
|
269
|
-
disp?: Disp;
|
|
270
|
-
elem?: Elem;
|
|
271
|
-
keys?: Keys;
|
|
272
|
-
layr?: Layr;
|
|
273
|
-
list?: List;
|
|
274
|
-
loca?: Loca;
|
|
275
|
-
meta?: Meta;
|
|
276
|
-
strs?: Strs;
|
|
277
|
-
tran?: Tran;
|
|
278
|
-
uset?: Uset;
|
|
279
|
-
vars?: Vars;
|
|
280
|
-
}
|
|
281
|
-
export declare class KMXPlusFile extends KMXFile {
|
|
282
|
-
readonly COMP_PLUS_SECT_ITEM: any;
|
|
283
|
-
readonly COMP_PLUS_SECT: any;
|
|
284
|
-
readonly COMP_PLUS_BKSP_ITEM: any;
|
|
285
|
-
readonly COMP_PLUS_BKSP: any;
|
|
286
|
-
readonly COMP_PLUS_DISP_ITEM: any;
|
|
287
|
-
readonly COMP_PLUS_DISP: any;
|
|
288
|
-
readonly COMP_PLUS_ELEM_ELEMENT: any;
|
|
289
|
-
readonly COMP_PLUS_ELEM_STRING: any;
|
|
290
|
-
readonly COMP_PLUS_ELEM: any;
|
|
291
|
-
readonly COMP_PLUS_LAYR_ENTRY: any;
|
|
292
|
-
readonly COMP_PLUS_LAYR_KEY: any;
|
|
293
|
-
readonly COMP_PLUS_LAYR_LIST: any;
|
|
294
|
-
readonly COMP_PLUS_LAYR_ROW: any;
|
|
295
|
-
readonly COMP_PLUS_LAYR: any;
|
|
296
|
-
readonly COMP_PLUS_KEYS_FLICK: any;
|
|
297
|
-
readonly COMP_PLUS_KEYS_FLICKS: any;
|
|
298
|
-
readonly COMP_PLUS_KEYS_KEY: any;
|
|
299
|
-
readonly COMP_PLUS_KEYS_KMAP: any;
|
|
300
|
-
readonly COMP_PLUS_KEYS: any;
|
|
301
|
-
readonly COMP_PLUS_LIST_LIST: any;
|
|
302
|
-
readonly COMP_PLUS_LIST_INDEX: any;
|
|
303
|
-
readonly COMP_PLUS_LIST: any;
|
|
304
|
-
readonly COMP_PLUS_LOCA_ITEM: any;
|
|
305
|
-
readonly COMP_PLUS_LOCA: any;
|
|
306
|
-
readonly COMP_PLUS_META: any;
|
|
307
|
-
readonly COMP_PLUS_STRS_ITEM: any;
|
|
308
|
-
readonly COMP_PLUS_STRS: any;
|
|
309
|
-
readonly COMP_PLUS_TRAN_GROUP: any;
|
|
310
|
-
readonly COMP_PLUS_TRAN_TRANSFORM: any;
|
|
311
|
-
readonly COMP_PLUS_TRAN_REORDER: any;
|
|
312
|
-
readonly COMP_PLUS_TRAN: any;
|
|
313
|
-
readonly COMP_PLUS_USET_USET: any;
|
|
314
|
-
readonly COMP_PLUS_USET_RANGE: any;
|
|
315
|
-
readonly COMP_PLUS_USET: any;
|
|
316
|
-
readonly COMP_PLUS_VKEY_ITEM: any;
|
|
317
|
-
readonly COMP_PLUS_VKEY: any;
|
|
318
|
-
readonly COMP_PLUS_VARS: any;
|
|
319
|
-
readonly COMP_PLUS_VARS_ITEM: any;
|
|
320
|
-
kmxplus: KMXPlusData;
|
|
321
|
-
constructor();
|
|
322
|
-
}
|
|
1
|
+
import { ElementString } from './element-string.js';
|
|
2
|
+
import { ListItem } from './string-list.js';
|
|
3
|
+
import { KMXFile } from './kmx.js';
|
|
4
|
+
import { UnicodeSetParser, UnicodeSet } from '@keymanapp/common-types';
|
|
5
|
+
export declare class Section {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Sections which are needed as dependencies.
|
|
9
|
+
*/
|
|
10
|
+
export interface DependencySections extends KMXPlusData {
|
|
11
|
+
/** needed for UnicodeSet parsing */
|
|
12
|
+
usetparser?: UnicodeSetParser;
|
|
13
|
+
}
|
|
14
|
+
export declare class Sect extends Section {
|
|
15
|
+
}
|
|
16
|
+
export declare class Elem extends Section {
|
|
17
|
+
strings: ElementString[];
|
|
18
|
+
constructor(sections: DependencySections);
|
|
19
|
+
/**
|
|
20
|
+
* @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.
|
|
21
|
+
* If it is a string, will be interpreted per reorder element ruls.
|
|
22
|
+
*/
|
|
23
|
+
allocElementString(sections: DependencySections, source: string | string[], order?: string, tertiary?: string, tertiary_base?: string, prebase?: string): ElementString;
|
|
24
|
+
}
|
|
25
|
+
export declare class Loca extends Section {
|
|
26
|
+
locales: StrsItem[];
|
|
27
|
+
}
|
|
28
|
+
export declare enum KeyboardSettings {
|
|
29
|
+
none = 0,
|
|
30
|
+
normalizationDisabled
|
|
31
|
+
}
|
|
32
|
+
export declare class Meta extends Section {
|
|
33
|
+
author: StrsItem;
|
|
34
|
+
conform: StrsItem;
|
|
35
|
+
layout: StrsItem;
|
|
36
|
+
name: StrsItem;
|
|
37
|
+
indicator: StrsItem;
|
|
38
|
+
version: StrsItem;
|
|
39
|
+
settings: KeyboardSettings;
|
|
40
|
+
/** convenience for checking settings */
|
|
41
|
+
get normalizationDisabled(): number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A string item in memory. This will be replaced with an index
|
|
45
|
+
* into the string table at finalization.
|
|
46
|
+
*/
|
|
47
|
+
export declare class StrsItem {
|
|
48
|
+
/** string value */
|
|
49
|
+
readonly value: string;
|
|
50
|
+
/** char value if this is a single-char placeholder item (CharStrsItem) */
|
|
51
|
+
readonly char?: number;
|
|
52
|
+
constructor(value: string, char?: number);
|
|
53
|
+
compareTo(o: StrsItem): number;
|
|
54
|
+
static binaryStringCompare(a: string, b: string): number;
|
|
55
|
+
get isOneChar(): boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A StrsItem for a single char. Used as a placeholder and hint to the builder
|
|
59
|
+
*/
|
|
60
|
+
export declare class CharStrsItem extends StrsItem {
|
|
61
|
+
constructor(value: string);
|
|
62
|
+
}
|
|
63
|
+
/** class for string manipulation options. These are in order of the pipeline. */
|
|
64
|
+
export interface StrsOptions {
|
|
65
|
+
/** apply string variables (requires sections) */
|
|
66
|
+
stringVariables?: boolean;
|
|
67
|
+
/** apply markers (requires sections) */
|
|
68
|
+
markers?: boolean;
|
|
69
|
+
/** unescape with unescapeString */
|
|
70
|
+
unescape?: boolean;
|
|
71
|
+
/** apply (possibly marker safe) nfd. Not for regex use. */
|
|
72
|
+
nfd?: boolean;
|
|
73
|
+
/** string can be stored as a single CharStrsItem, not in strs table. */
|
|
74
|
+
singleOk?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export declare class Strs extends Section {
|
|
77
|
+
/** the in-memory string table */
|
|
78
|
+
strings: StrsItem[];
|
|
79
|
+
/** for validating */
|
|
80
|
+
allProcessedStrings: Set<string>;
|
|
81
|
+
/**
|
|
82
|
+
* Allocate a StrsItem given the string, unescaping if necessary.
|
|
83
|
+
* @param s escaped string
|
|
84
|
+
* @param opts options for allocation
|
|
85
|
+
* @param sections other sections, if needed
|
|
86
|
+
* @returns StrsItem
|
|
87
|
+
*/
|
|
88
|
+
allocString(s?: string, opts?: StrsOptions, sections?: DependencySections): StrsItem;
|
|
89
|
+
/** process everything according to opts */
|
|
90
|
+
static processString(s: string, opts: StrsOptions, sections: DependencySections): string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* See LKVariables
|
|
94
|
+
*/
|
|
95
|
+
export declare class Vars extends Section {
|
|
96
|
+
totalCount(): number;
|
|
97
|
+
markers: ListItem;
|
|
98
|
+
strings: StringVarItem[];
|
|
99
|
+
sets: SetVarItem[];
|
|
100
|
+
usets: UnicodeSetItem[];
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @returns false if any invalid variables
|
|
104
|
+
*/
|
|
105
|
+
valid(): boolean;
|
|
106
|
+
substituteSets(str: string, sections: DependencySections): string;
|
|
107
|
+
substituteUnicodeSets(value: string, sections: DependencySections): string;
|
|
108
|
+
substituteStrings(str: string, sections: DependencySections, forMatch?: boolean): string;
|
|
109
|
+
findStringVariableValue(id: string): string;
|
|
110
|
+
substituteSetRegex(str: string, sections: DependencySections): string;
|
|
111
|
+
/**
|
|
112
|
+
* Variable locator facility
|
|
113
|
+
* @param array
|
|
114
|
+
* @param id
|
|
115
|
+
* @returns
|
|
116
|
+
*/
|
|
117
|
+
private static findVariable;
|
|
118
|
+
substituteMarkerString(s: string, forMatch?: boolean): string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Common base for variable sections
|
|
122
|
+
* See Variable
|
|
123
|
+
*/
|
|
124
|
+
export declare class VarsItem extends Section {
|
|
125
|
+
id: StrsItem;
|
|
126
|
+
value: StrsItem;
|
|
127
|
+
constructor(id: string, value: string, sections: DependencySections);
|
|
128
|
+
valid(): boolean;
|
|
129
|
+
}
|
|
130
|
+
export declare class UnicodeSetItem extends VarsItem {
|
|
131
|
+
constructor(id: string, value: string, sections: DependencySections, usetparser: UnicodeSetParser);
|
|
132
|
+
unicodeSet?: UnicodeSet;
|
|
133
|
+
valid(): boolean;
|
|
134
|
+
}
|
|
135
|
+
export declare class SetVarItem extends VarsItem {
|
|
136
|
+
constructor(id: string, value: string[], sections: DependencySections, rawItems: string[]);
|
|
137
|
+
items: ElementString;
|
|
138
|
+
rawItems: string[];
|
|
139
|
+
valid(): boolean;
|
|
140
|
+
}
|
|
141
|
+
export declare class StringVarItem extends VarsItem {
|
|
142
|
+
constructor(id: string, value: string, sections: DependencySections);
|
|
143
|
+
}
|
|
144
|
+
export declare class TranTransform {
|
|
145
|
+
from: StrsItem;
|
|
146
|
+
to: StrsItem;
|
|
147
|
+
mapFrom: StrsItem;
|
|
148
|
+
mapTo: StrsItem;
|
|
149
|
+
}
|
|
150
|
+
export declare class TranGroup {
|
|
151
|
+
type: number;
|
|
152
|
+
transforms: TranTransform[];
|
|
153
|
+
reorders: TranReorder[];
|
|
154
|
+
}
|
|
155
|
+
export declare class TranReorder {
|
|
156
|
+
elements: ElementString;
|
|
157
|
+
before: ElementString;
|
|
158
|
+
}
|
|
159
|
+
export declare class Tran extends Section {
|
|
160
|
+
groups: TranGroup[];
|
|
161
|
+
get id(): import("@keymanapp/ldml-keyboard-constants").SectionIdent;
|
|
162
|
+
}
|
|
163
|
+
export declare class UsetItem {
|
|
164
|
+
uset: UnicodeSet;
|
|
165
|
+
str: StrsItem;
|
|
166
|
+
constructor(uset: UnicodeSet, str: StrsItem);
|
|
167
|
+
compareTo(other: UsetItem): number;
|
|
168
|
+
}
|
|
169
|
+
export declare class Uset extends Section {
|
|
170
|
+
usets: UsetItem[];
|
|
171
|
+
allocUset(set: UnicodeSet, sections: DependencySections): UsetItem;
|
|
172
|
+
}
|
|
173
|
+
export declare class Bksp extends Tran {
|
|
174
|
+
get id(): import("@keymanapp/ldml-keyboard-constants").SectionIdent;
|
|
175
|
+
}
|
|
176
|
+
export declare class DispItem {
|
|
177
|
+
to: StrsItem;
|
|
178
|
+
id: StrsItem;
|
|
179
|
+
display: StrsItem;
|
|
180
|
+
}
|
|
181
|
+
export declare class Disp extends Section {
|
|
182
|
+
baseCharacter: StrsItem;
|
|
183
|
+
disps: DispItem[];
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* In-memory `<layers>`
|
|
187
|
+
*/
|
|
188
|
+
export declare class LayrList {
|
|
189
|
+
hardware: StrsItem;
|
|
190
|
+
layers: LayrEntry[];
|
|
191
|
+
minDeviceWidth: number;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* In-memory `<layer>`
|
|
195
|
+
*/
|
|
196
|
+
export declare class LayrEntry {
|
|
197
|
+
id: StrsItem;
|
|
198
|
+
mod: number;
|
|
199
|
+
rows: LayrRow[];
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* In-memory `<row>`
|
|
203
|
+
*/
|
|
204
|
+
export declare class LayrRow {
|
|
205
|
+
keys: StrsItem[];
|
|
206
|
+
}
|
|
207
|
+
export declare class Layr extends Section {
|
|
208
|
+
lists: LayrList[];
|
|
209
|
+
}
|
|
210
|
+
export declare class KeysKeys {
|
|
211
|
+
flags: number;
|
|
212
|
+
flicks: string;
|
|
213
|
+
id: StrsItem;
|
|
214
|
+
longPress: ListItem;
|
|
215
|
+
longPressDefault: StrsItem;
|
|
216
|
+
multiTap: ListItem;
|
|
217
|
+
switch: StrsItem;
|
|
218
|
+
to: StrsItem;
|
|
219
|
+
width: number;
|
|
220
|
+
}
|
|
221
|
+
export declare class KeysKmap {
|
|
222
|
+
vkey: number;
|
|
223
|
+
mod: number;
|
|
224
|
+
key: string;
|
|
225
|
+
}
|
|
226
|
+
export declare class KeysFlicks {
|
|
227
|
+
flicks: KeysFlick[];
|
|
228
|
+
id: StrsItem;
|
|
229
|
+
compareTo(b: KeysFlicks): number;
|
|
230
|
+
constructor(id: StrsItem);
|
|
231
|
+
}
|
|
232
|
+
export declare class KeysFlick {
|
|
233
|
+
directions: ListItem;
|
|
234
|
+
keyId: StrsItem;
|
|
235
|
+
}
|
|
236
|
+
export declare class Keys extends Section {
|
|
237
|
+
keys: KeysKeys[];
|
|
238
|
+
flicks: KeysFlicks[];
|
|
239
|
+
kmap: KeysKmap[];
|
|
240
|
+
constructor(strs: Strs);
|
|
241
|
+
}
|
|
242
|
+
export declare class List extends Section {
|
|
243
|
+
/**
|
|
244
|
+
* Allocate a list from a space-separated list of items.
|
|
245
|
+
* Note that passing undefined or null or `''` will
|
|
246
|
+
* end up being the same as the empty list `[]`
|
|
247
|
+
* @param s space-separated list of items
|
|
248
|
+
* @param opts string options
|
|
249
|
+
* @param sections sections
|
|
250
|
+
* @returns a List object
|
|
251
|
+
*/
|
|
252
|
+
allocListFromSpaces(s: string, opts: StrsOptions, sections: DependencySections): ListItem;
|
|
253
|
+
/**
|
|
254
|
+
* Return a List object referring to the string list.
|
|
255
|
+
* Note that a falsy list, or a list containing only an empty string
|
|
256
|
+
* `['']` will be stored as an empty list `[]`.
|
|
257
|
+
* @param strs Strs section for allocation
|
|
258
|
+
* @param s string list to allocate
|
|
259
|
+
* @returns
|
|
260
|
+
*/
|
|
261
|
+
allocList(s: string[], opts: StrsOptions, sections: DependencySections): ListItem;
|
|
262
|
+
constructor(strs: Strs);
|
|
263
|
+
lists: ListItem[];
|
|
264
|
+
}
|
|
265
|
+
export { ListItem as ListItem };
|
|
266
|
+
export interface KMXPlusData {
|
|
267
|
+
sect?: Strs;
|
|
268
|
+
bksp?: Bksp;
|
|
269
|
+
disp?: Disp;
|
|
270
|
+
elem?: Elem;
|
|
271
|
+
keys?: Keys;
|
|
272
|
+
layr?: Layr;
|
|
273
|
+
list?: List;
|
|
274
|
+
loca?: Loca;
|
|
275
|
+
meta?: Meta;
|
|
276
|
+
strs?: Strs;
|
|
277
|
+
tran?: Tran;
|
|
278
|
+
uset?: Uset;
|
|
279
|
+
vars?: Vars;
|
|
280
|
+
}
|
|
281
|
+
export declare class KMXPlusFile extends KMXFile {
|
|
282
|
+
readonly COMP_PLUS_SECT_ITEM: any;
|
|
283
|
+
readonly COMP_PLUS_SECT: any;
|
|
284
|
+
readonly COMP_PLUS_BKSP_ITEM: any;
|
|
285
|
+
readonly COMP_PLUS_BKSP: any;
|
|
286
|
+
readonly COMP_PLUS_DISP_ITEM: any;
|
|
287
|
+
readonly COMP_PLUS_DISP: any;
|
|
288
|
+
readonly COMP_PLUS_ELEM_ELEMENT: any;
|
|
289
|
+
readonly COMP_PLUS_ELEM_STRING: any;
|
|
290
|
+
readonly COMP_PLUS_ELEM: any;
|
|
291
|
+
readonly COMP_PLUS_LAYR_ENTRY: any;
|
|
292
|
+
readonly COMP_PLUS_LAYR_KEY: any;
|
|
293
|
+
readonly COMP_PLUS_LAYR_LIST: any;
|
|
294
|
+
readonly COMP_PLUS_LAYR_ROW: any;
|
|
295
|
+
readonly COMP_PLUS_LAYR: any;
|
|
296
|
+
readonly COMP_PLUS_KEYS_FLICK: any;
|
|
297
|
+
readonly COMP_PLUS_KEYS_FLICKS: any;
|
|
298
|
+
readonly COMP_PLUS_KEYS_KEY: any;
|
|
299
|
+
readonly COMP_PLUS_KEYS_KMAP: any;
|
|
300
|
+
readonly COMP_PLUS_KEYS: any;
|
|
301
|
+
readonly COMP_PLUS_LIST_LIST: any;
|
|
302
|
+
readonly COMP_PLUS_LIST_INDEX: any;
|
|
303
|
+
readonly COMP_PLUS_LIST: any;
|
|
304
|
+
readonly COMP_PLUS_LOCA_ITEM: any;
|
|
305
|
+
readonly COMP_PLUS_LOCA: any;
|
|
306
|
+
readonly COMP_PLUS_META: any;
|
|
307
|
+
readonly COMP_PLUS_STRS_ITEM: any;
|
|
308
|
+
readonly COMP_PLUS_STRS: any;
|
|
309
|
+
readonly COMP_PLUS_TRAN_GROUP: any;
|
|
310
|
+
readonly COMP_PLUS_TRAN_TRANSFORM: any;
|
|
311
|
+
readonly COMP_PLUS_TRAN_REORDER: any;
|
|
312
|
+
readonly COMP_PLUS_TRAN: any;
|
|
313
|
+
readonly COMP_PLUS_USET_USET: any;
|
|
314
|
+
readonly COMP_PLUS_USET_RANGE: any;
|
|
315
|
+
readonly COMP_PLUS_USET: any;
|
|
316
|
+
readonly COMP_PLUS_VKEY_ITEM: any;
|
|
317
|
+
readonly COMP_PLUS_VKEY: any;
|
|
318
|
+
readonly COMP_PLUS_VARS: any;
|
|
319
|
+
readonly COMP_PLUS_VARS_ITEM: any;
|
|
320
|
+
kmxplus: KMXPlusData;
|
|
321
|
+
constructor();
|
|
322
|
+
}
|
|
323
323
|
//# sourceMappingURL=kmx-plus.d.ts.map
|