@keymanapp/kmc-package 18.0.41-alpha → 18.0.45-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/compiler/cp1252.d.ts +7 -7
- package/build/src/compiler/cp1252.js +287 -290
- package/build/src/compiler/cp1252.js.map +1 -1
- package/build/src/compiler/kmp-compiler.d.ts +105 -105
- package/build/src/compiler/kmp-compiler.js +502 -505
- package/build/src/compiler/kmp-compiler.js.map +1 -1
- package/build/src/compiler/kmp-inf-writer.d.ts +21 -21
- package/build/src/compiler/kmp-inf-writer.js +143 -146
- package/build/src/compiler/kmp-inf-writer.js.map +1 -1
- package/build/src/compiler/kmx-keyboard-metadata.d.ts +3 -3
- package/build/src/compiler/kmx-keyboard-metadata.js +17 -20
- package/build/src/compiler/kmx-keyboard-metadata.js.map +1 -1
- package/build/src/compiler/markdown.d.ts +12 -12
- package/build/src/compiler/markdown.js +47 -50
- package/build/src/compiler/markdown.js.map +1 -1
- package/build/src/compiler/package-compiler-messages.d.ts +130 -130
- package/build/src/compiler/package-compiler-messages.js +79 -82
- package/build/src/compiler/package-compiler-messages.js.map +1 -1
- package/build/src/compiler/package-keyboard-target-validator.d.ts +12 -12
- package/build/src/compiler/package-keyboard-target-validator.js +43 -46
- package/build/src/compiler/package-keyboard-target-validator.js.map +1 -1
- package/build/src/compiler/package-metadata-collector.d.ts +16 -16
- package/build/src/compiler/package-metadata-collector.js +80 -83
- package/build/src/compiler/package-metadata-collector.js.map +1 -1
- package/build/src/compiler/package-metadata-updater.d.ts +4 -4
- package/build/src/compiler/package-metadata-updater.js +11 -14
- package/build/src/compiler/package-metadata-updater.js.map +1 -1
- package/build/src/compiler/package-validation.d.ts +18 -18
- package/build/src/compiler/package-validation.js +178 -181
- package/build/src/compiler/package-validation.js.map +1 -1
- package/build/src/compiler/package-version-validator.d.ts +20 -20
- package/build/src/compiler/package-version-validator.js +90 -93
- package/build/src/compiler/package-version-validator.js.map +1 -1
- package/build/src/compiler/redist-files.d.ts +17 -17
- package/build/src/compiler/redist-files.js +57 -60
- package/build/src/compiler/redist-files.js.map +1 -1
- package/build/src/compiler/web-keyboard-metadata.d.ts +20 -20
- package/build/src/compiler/web-keyboard-metadata.js +35 -38
- package/build/src/compiler/web-keyboard-metadata.js.map +1 -1
- package/build/src/compiler/windows-package-installer-compiler.d.ts +106 -106
- package/build/src/compiler/windows-package-installer-compiler.js +172 -175
- package/build/src/compiler/windows-package-installer-compiler.js.map +1 -1
- package/build/src/main.d.ts +4 -4
- package/build/src/main.js +5 -8
- package/build/src/main.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,93 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=package-version-validator.js.map
|
|
93
|
-
//# debugId=2fed3219-dbc8-5798-b47d-f1496278331b
|
|
1
|
+
import { CompilerMessages } from './package-compiler-messages.js';
|
|
2
|
+
export const DEFAULT_KEYBOARD_VERSION = '1.0';
|
|
3
|
+
export const MIN_LM_FILEVERSION_KMP_JSON = '12.0';
|
|
4
|
+
export const MIN_KBD_FILEVERSION_KMP_JSON = '7.0';
|
|
5
|
+
export class PackageVersionValidator {
|
|
6
|
+
callbacks;
|
|
7
|
+
constructor(callbacks) {
|
|
8
|
+
this.callbacks = callbacks;
|
|
9
|
+
}
|
|
10
|
+
getMinKeymanVersion(keyboardMetadata) {
|
|
11
|
+
let minKeymanVersion = MIN_KBD_FILEVERSION_KMP_JSON;
|
|
12
|
+
for (let id of Object.keys(keyboardMetadata)) {
|
|
13
|
+
// minKeymanVersion is always a float so float comparison is safe
|
|
14
|
+
let kbdMinKeymanVersion = parseFloat(keyboardMetadata[id].data.minKeymanVersion);
|
|
15
|
+
if (kbdMinKeymanVersion > 14.0) {
|
|
16
|
+
// Keyman for Windows 14 and earlier only accepted version 7.0 for keyboard
|
|
17
|
+
// packages, so we must not write any other version in order to allow
|
|
18
|
+
// earlier versions of Keyman to load the package.
|
|
19
|
+
if (parseFloat(minKeymanVersion) < kbdMinKeymanVersion) {
|
|
20
|
+
minKeymanVersion = keyboardMetadata[id].data.minKeymanVersion;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return minKeymanVersion;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Verifies version information in corresponding keyboards and updates kmpJson
|
|
28
|
+
* metadata as the version information can be out of sync in the .kps file
|
|
29
|
+
* after updating a contained keyboard.
|
|
30
|
+
* @param kps
|
|
31
|
+
* @param kmp
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
validateAndUpdateVersions(kps, kmp, keyboardMetadata) {
|
|
35
|
+
const followKeyboardVersion = kps.Options?.FollowKeyboardVersion !== undefined;
|
|
36
|
+
if (followKeyboardVersion) {
|
|
37
|
+
if (!this.checkFollowKeyboardVersion(kmp)) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (!kmp.keyboards) {
|
|
42
|
+
// Lexical models don't have version metadata; only their packages.
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
let result = true;
|
|
46
|
+
// We now know we have at least one keyboard in the package
|
|
47
|
+
for (let keyboard of kmp.keyboards) {
|
|
48
|
+
const data = keyboardMetadata[keyboard.id];
|
|
49
|
+
if (!data) {
|
|
50
|
+
// Warnings or errors will have been raised by getKeyboardFileData
|
|
51
|
+
// TODO raise error -- we should not have gotten here
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
// Note: there is often version metadata in the .kps <Keyboard> element, but
|
|
55
|
+
// we don't read from the metadata because we want to ensure we have the
|
|
56
|
+
// most up-to-date keyboard version data here, from the compiled keyboard.
|
|
57
|
+
if (followKeyboardVersion && data.data.keyboardVersion === null) {
|
|
58
|
+
this.callbacks.reportMessage(CompilerMessages.Info_KeyboardFileHasNoKeyboardVersion({ filename: keyboard.id }));
|
|
59
|
+
}
|
|
60
|
+
keyboard.version = data.data.keyboardVersion ?? DEFAULT_KEYBOARD_VERSION;
|
|
61
|
+
if (result && followKeyboardVersion) {
|
|
62
|
+
if (kmp.keyboards[0].version !== keyboard.version) {
|
|
63
|
+
this.callbacks.reportMessage(CompilerMessages.Warn_KeyboardVersionsDoNotMatch({
|
|
64
|
+
keyboard: keyboard.id,
|
|
65
|
+
version: keyboard.version,
|
|
66
|
+
firstKeyboard: kmp.keyboards[0].id,
|
|
67
|
+
firstVersion: kmp.keyboards[0].version
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (result && followKeyboardVersion) {
|
|
73
|
+
kmp.info.version = { description: kmp.keyboards[0].version };
|
|
74
|
+
}
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
checkFollowKeyboardVersion(kmp) {
|
|
78
|
+
// Lexical model packages do not allow FollowKeyboardVersion
|
|
79
|
+
if (kmp.lexicalModels && kmp.lexicalModels.length) {
|
|
80
|
+
this.callbacks.reportMessage(CompilerMessages.Error_FollowKeyboardVersionNotAllowedForModelPackages());
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
if (!kmp.keyboards || !kmp.keyboards.length) {
|
|
84
|
+
this.callbacks.reportMessage(CompilerMessages.Error_FollowKeyboardVersionButNoKeyboards());
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=package-version-validator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-version-validator.js","sources":["../../../src/compiler/package-version-validator.ts"],"
|
|
1
|
+
{"version":3,"file":"package-version-validator.js","sourceRoot":"","sources":["../../../src/compiler/package-version-validator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAC9C,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAClD,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,CAAC;AAElD,MAAM,OAAO,uBAAuB;IAEd;IAApB,YAAoB,SAA4B;QAA5B,cA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M,EAAE,CAAC;YACjD,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,gBAAgB,CAAC,qDAAqD,EAAE,CAAC,CAAC;YACvG,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAG,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;YAC3C,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,gBAAgB,CAAC,yCAAyC,EAAE,CAAC,CAAC;YAC3F,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a set of known redistributable files for Keyman for Windows that
|
|
3
|
-
* should not be included in packages. It is not critical that this list matches
|
|
4
|
-
* the current deployment; it is just for warning against accidental inclusion
|
|
5
|
-
* of these files by package authors. Some redistributable files have been
|
|
6
|
-
* intentionally excluded because they could legitimately be a different file
|
|
7
|
-
* with the same name.
|
|
8
|
-
*
|
|
9
|
-
* This matches behaviour from the legacy package compiler; we may want to
|
|
10
|
-
* reconsider how this is done in the future.
|
|
11
|
-
*
|
|
12
|
-
* These lists have been constructed from 17.0.109 alpha build. Filenames
|
|
13
|
-
* intentionally in lower case.
|
|
14
|
-
*/
|
|
15
|
-
export declare const keymanForWindowsInstallerFiles: string[];
|
|
16
|
-
export declare const keymanEngineForWindowsFiles: string[];
|
|
17
|
-
export declare const keymanForWindowsRedistFiles: string[];
|
|
1
|
+
/**
|
|
2
|
+
* This is a set of known redistributable files for Keyman for Windows that
|
|
3
|
+
* should not be included in packages. It is not critical that this list matches
|
|
4
|
+
* the current deployment; it is just for warning against accidental inclusion
|
|
5
|
+
* of these files by package authors. Some redistributable files have been
|
|
6
|
+
* intentionally excluded because they could legitimately be a different file
|
|
7
|
+
* with the same name.
|
|
8
|
+
*
|
|
9
|
+
* This matches behaviour from the legacy package compiler; we may want to
|
|
10
|
+
* reconsider how this is done in the future.
|
|
11
|
+
*
|
|
12
|
+
* These lists have been constructed from 17.0.109 alpha build. Filenames
|
|
13
|
+
* intentionally in lower case.
|
|
14
|
+
*/
|
|
15
|
+
export declare const keymanForWindowsInstallerFiles: string[];
|
|
16
|
+
export declare const keymanEngineForWindowsFiles: string[];
|
|
17
|
+
export declare const keymanForWindowsRedistFiles: string[];
|
|
18
18
|
//# sourceMappingURL=redist-files.d.ts.map
|
|
@@ -1,60 +1,57 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a set of known redistributable files for Keyman for Windows that
|
|
3
|
-
* should not be included in packages. It is not critical that this list matches
|
|
4
|
-
* the current deployment; it is just for warning against accidental inclusion
|
|
5
|
-
* of these files by package authors. Some redistributable files have been
|
|
6
|
-
* intentionally excluded because they could legitimately be a different file
|
|
7
|
-
* with the same name.
|
|
8
|
-
*
|
|
9
|
-
* This matches behaviour from the legacy package compiler; we may want to
|
|
10
|
-
* reconsider how this is done in the future.
|
|
11
|
-
*
|
|
12
|
-
* These lists have been constructed from 17.0.109 alpha build. Filenames
|
|
13
|
-
* intentionally in lower case.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
];
|
|
59
|
-
//# sourceMappingURL=redist-files.js.map
|
|
60
|
-
//# debugId=d8ba5b90-e7ad-5e6f-9e25-0eaeaae6f000
|
|
1
|
+
/**
|
|
2
|
+
* This is a set of known redistributable files for Keyman for Windows that
|
|
3
|
+
* should not be included in packages. It is not critical that this list matches
|
|
4
|
+
* the current deployment; it is just for warning against accidental inclusion
|
|
5
|
+
* of these files by package authors. Some redistributable files have been
|
|
6
|
+
* intentionally excluded because they could legitimately be a different file
|
|
7
|
+
* with the same name.
|
|
8
|
+
*
|
|
9
|
+
* This matches behaviour from the legacy package compiler; we may want to
|
|
10
|
+
* reconsider how this is done in the future.
|
|
11
|
+
*
|
|
12
|
+
* These lists have been constructed from 17.0.109 alpha build. Filenames
|
|
13
|
+
* intentionally in lower case.
|
|
14
|
+
*/
|
|
15
|
+
export const keymanForWindowsInstallerFiles = [
|
|
16
|
+
'keymandesktop.msi',
|
|
17
|
+
'keymanengine.msm'
|
|
18
|
+
];
|
|
19
|
+
export const keymanEngineForWindowsFiles = [
|
|
20
|
+
'base.xslt',
|
|
21
|
+
'crashpad_handler.exe',
|
|
22
|
+
'keyman-debug-etw.man',
|
|
23
|
+
'keyman.exe',
|
|
24
|
+
'keyman32.dll',
|
|
25
|
+
'keyman64.dll',
|
|
26
|
+
'keymanmc.dll',
|
|
27
|
+
'keymanx64.exe',
|
|
28
|
+
'kmcomapi.dll',
|
|
29
|
+
'kmcomapi.x64.dll',
|
|
30
|
+
'kmrefresh.x64.exe',
|
|
31
|
+
'kmrefresh.x86.exe',
|
|
32
|
+
'kmtip.dll',
|
|
33
|
+
'kmtip64.dll',
|
|
34
|
+
'mcompile.exe',
|
|
35
|
+
'sentry.dll',
|
|
36
|
+
'sentry.x64.dll',
|
|
37
|
+
'si_browsers.xslt',
|
|
38
|
+
'si_fonts.xslt',
|
|
39
|
+
'si_hookdlls.xslt',
|
|
40
|
+
'si_keyman.xslt',
|
|
41
|
+
'si_language.xslt',
|
|
42
|
+
'si_office.xslt',
|
|
43
|
+
'si_overview.xslt',
|
|
44
|
+
'si_processes.xslt',
|
|
45
|
+
'si_processes_x64.xslt',
|
|
46
|
+
'si_startup.xslt',
|
|
47
|
+
'tsysinfo.exe',
|
|
48
|
+
];
|
|
49
|
+
export const keymanForWindowsRedistFiles = [
|
|
50
|
+
'desktop_resources.dll',
|
|
51
|
+
'keymandesktop.chm',
|
|
52
|
+
'kmbrowserhost.exe',
|
|
53
|
+
'kmconfig.exe',
|
|
54
|
+
'kmshell.exe',
|
|
55
|
+
'unicodedata.mdb',
|
|
56
|
+
];
|
|
57
|
+
//# sourceMappingURL=redist-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redist-files.js","sources":["../../../src/compiler/redist-files.ts"],"
|
|
1
|
+
{"version":3,"file":"redist-files.js","sourceRoot":"","sources":["../../../src/compiler/redist-files.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MACL,8BAA8B,GAAa;IACzC,mBAAmB;IACnB,kBAAkB;CACnB,CAAC;AAGJ,MAAM,CAAC,MACL,2BAA2B,GAAa;IACtC,WAAW;IACX,sBAAsB;IACtB,sBAAsB;IACtB,YAAY;IACZ,cAAc;IACd,cAAc;IACd,cAAc;IACd,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;IACZ,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;IACnB,uBAAuB;IACvB,iBAAiB;IACjB,cAAc;CACf,CAAC;AAEJ,MAAM,CAAC,MACL,2BAA2B,GAAa;IACtC,uBAAuB;IACvB,mBAAmB;IACnB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,iBAAiB;CAClB,CAAC"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export interface WebKeyboardMetadata {
|
|
2
|
-
keyboardName: string;
|
|
3
|
-
keyboardVersion: string;
|
|
4
|
-
minKeymanVersion: string;
|
|
5
|
-
isRtl: boolean;
|
|
6
|
-
isMnemonic: boolean;
|
|
7
|
-
targets?: string;
|
|
8
|
-
hasTouchLayout: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* This function parses the JavaScript to do a best-effort retrieval of
|
|
12
|
-
* keyboard data. It assumes a format similar to what the compiler produces.
|
|
13
|
-
* It may be possible for it to miss something if the code is hand written and
|
|
14
|
-
* diverges enough from the compiler code (e.g. if there is a comment between
|
|
15
|
-
* a member variable and its value or something crazy like that).
|
|
16
|
-
*
|
|
17
|
-
* Long-term, we will require package to include .kmx so this kind of parsing
|
|
18
|
-
* won't be necessary.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getCompiledWebKeyboardMetadata(js: string): WebKeyboardMetadata;
|
|
1
|
+
export interface WebKeyboardMetadata {
|
|
2
|
+
keyboardName: string;
|
|
3
|
+
keyboardVersion: string;
|
|
4
|
+
minKeymanVersion: string;
|
|
5
|
+
isRtl: boolean;
|
|
6
|
+
isMnemonic: boolean;
|
|
7
|
+
targets?: string;
|
|
8
|
+
hasTouchLayout: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This function parses the JavaScript to do a best-effort retrieval of
|
|
12
|
+
* keyboard data. It assumes a format similar to what the compiler produces.
|
|
13
|
+
* It may be possible for it to miss something if the code is hand written and
|
|
14
|
+
* diverges enough from the compiler code (e.g. if there is a comment between
|
|
15
|
+
* a member variable and its value or something crazy like that).
|
|
16
|
+
*
|
|
17
|
+
* Long-term, we will require package to include .kmx so this kind of parsing
|
|
18
|
+
* won't be necessary.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getCompiledWebKeyboardMetadata(js: string): WebKeyboardMetadata;
|
|
21
21
|
//# sourceMappingURL=web-keyboard-metadata.d.ts.map
|
|
@@ -1,38 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=web-keyboard-metadata.js.map
|
|
38
|
-
//# debugId=7be13b44-2b7e-5674-8439-331800382138
|
|
1
|
+
;
|
|
2
|
+
/**
|
|
3
|
+
* This function parses the JavaScript to do a best-effort retrieval of
|
|
4
|
+
* keyboard data. It assumes a format similar to what the compiler produces.
|
|
5
|
+
* It may be possible for it to miss something if the code is hand written and
|
|
6
|
+
* diverges enough from the compiler code (e.g. if there is a comment between
|
|
7
|
+
* a member variable and its value or something crazy like that).
|
|
8
|
+
*
|
|
9
|
+
* Long-term, we will require package to include .kmx so this kind of parsing
|
|
10
|
+
* won't be necessary.
|
|
11
|
+
*/
|
|
12
|
+
export function getCompiledWebKeyboardMetadata(js) {
|
|
13
|
+
const nameRegex = /this.KN\s*=\s*(['"])(.*?)\1/;
|
|
14
|
+
const kbverRegex = /this.KBVER\s*=\s*(['"])(.*?)\1/;
|
|
15
|
+
const minverRegex = /this.KMINVER\s*=\s*([''"])(.*?)\1/;
|
|
16
|
+
const rtlRegex = /this.KRTL\s*=\s*(.*?)\s*;/;
|
|
17
|
+
const mnemonicRegex = /this.KM\s*=\s*(.*?)\s*;/;
|
|
18
|
+
const touchLayoutRegex = /this.KVKL\s*=\s*{/;
|
|
19
|
+
const name = nameRegex.exec(js);
|
|
20
|
+
const kbver = kbverRegex.exec(js);
|
|
21
|
+
const minver = minverRegex.exec(js);
|
|
22
|
+
const rtl = rtlRegex.exec(js);
|
|
23
|
+
const mnemonic = mnemonicRegex.exec(js);
|
|
24
|
+
const touchLayout = touchLayoutRegex.exec(js);
|
|
25
|
+
const SKeymanVersion70 = '7.0';
|
|
26
|
+
return {
|
|
27
|
+
keyboardName: name ? name[2] : null,
|
|
28
|
+
keyboardVersion: kbver ? kbver[2] : null,
|
|
29
|
+
minKeymanVersion: minver ? minver[2] : SKeymanVersion70,
|
|
30
|
+
isRtl: !!(rtl && rtl[1].match(/^(1|true)$/)),
|
|
31
|
+
isMnemonic: !!(mnemonic && mnemonic[1].match(/^(1|true)$/)),
|
|
32
|
+
hasTouchLayout: !!touchLayout
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=web-keyboard-metadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-keyboard-metadata.js","sources":["../../../src/compiler/web-keyboard-metadata.ts"],"
|
|
1
|
+
{"version":3,"file":"web-keyboard-metadata.js","sourceRoot":"","sources":["../../../src/compiler/web-keyboard-metadata.ts"],"names":[],"mappings":"AASC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,UAAU,8BAA8B,CAAC,EAAU;IACrD,MAAM,SAAS,GAAK,6BAA6B,CAAC;IAClD,MAAM,UAAU,GAAI,gCAAgC,CAAC;IACrD,MAAM,WAAW,GAAG,mCAAmC,CAAC;IACxD,MAAM,QAAQ,GAAM,2BAA2B,CAAC;IAChD,MAAM,aAAa,GAAG,yBAAyB,CAAC;IAChD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;IAE7C,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAA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