@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.
Files changed (46) hide show
  1. package/build/src/compiler/cp1252.d.ts +7 -7
  2. package/build/src/compiler/cp1252.js +287 -290
  3. package/build/src/compiler/cp1252.js.map +1 -1
  4. package/build/src/compiler/kmp-compiler.d.ts +105 -105
  5. package/build/src/compiler/kmp-compiler.js +502 -505
  6. package/build/src/compiler/kmp-compiler.js.map +1 -1
  7. package/build/src/compiler/kmp-inf-writer.d.ts +21 -21
  8. package/build/src/compiler/kmp-inf-writer.js +143 -146
  9. package/build/src/compiler/kmp-inf-writer.js.map +1 -1
  10. package/build/src/compiler/kmx-keyboard-metadata.d.ts +3 -3
  11. package/build/src/compiler/kmx-keyboard-metadata.js +17 -20
  12. package/build/src/compiler/kmx-keyboard-metadata.js.map +1 -1
  13. package/build/src/compiler/markdown.d.ts +12 -12
  14. package/build/src/compiler/markdown.js +47 -50
  15. package/build/src/compiler/markdown.js.map +1 -1
  16. package/build/src/compiler/package-compiler-messages.d.ts +130 -130
  17. package/build/src/compiler/package-compiler-messages.js +79 -82
  18. package/build/src/compiler/package-compiler-messages.js.map +1 -1
  19. package/build/src/compiler/package-keyboard-target-validator.d.ts +12 -12
  20. package/build/src/compiler/package-keyboard-target-validator.js +43 -46
  21. package/build/src/compiler/package-keyboard-target-validator.js.map +1 -1
  22. package/build/src/compiler/package-metadata-collector.d.ts +16 -16
  23. package/build/src/compiler/package-metadata-collector.js +80 -83
  24. package/build/src/compiler/package-metadata-collector.js.map +1 -1
  25. package/build/src/compiler/package-metadata-updater.d.ts +4 -4
  26. package/build/src/compiler/package-metadata-updater.js +11 -14
  27. package/build/src/compiler/package-metadata-updater.js.map +1 -1
  28. package/build/src/compiler/package-validation.d.ts +18 -18
  29. package/build/src/compiler/package-validation.js +178 -181
  30. package/build/src/compiler/package-validation.js.map +1 -1
  31. package/build/src/compiler/package-version-validator.d.ts +20 -20
  32. package/build/src/compiler/package-version-validator.js +90 -93
  33. package/build/src/compiler/package-version-validator.js.map +1 -1
  34. package/build/src/compiler/redist-files.d.ts +17 -17
  35. package/build/src/compiler/redist-files.js +57 -60
  36. package/build/src/compiler/redist-files.js.map +1 -1
  37. package/build/src/compiler/web-keyboard-metadata.d.ts +20 -20
  38. package/build/src/compiler/web-keyboard-metadata.js +35 -38
  39. package/build/src/compiler/web-keyboard-metadata.js.map +1 -1
  40. package/build/src/compiler/windows-package-installer-compiler.d.ts +106 -106
  41. package/build/src/compiler/windows-package-installer-compiler.js +172 -175
  42. package/build/src/compiler/windows-package-installer-compiler.js.map +1 -1
  43. package/build/src/main.d.ts +4 -4
  44. package/build/src/main.js +5 -8
  45. package/build/src/main.js.map +1 -1
  46. package/package.json +3 -3
@@ -1,93 +1,90 @@
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]="2fed3219-dbc8-5798-b47d-f1496278331b")}catch(e){}}();
3
- import { CompilerMessages } from './package-compiler-messages.js';
4
- export const DEFAULT_KEYBOARD_VERSION = '1.0';
5
- export const MIN_LM_FILEVERSION_KMP_JSON = '12.0';
6
- export const MIN_KBD_FILEVERSION_KMP_JSON = '7.0';
7
- export class PackageVersionValidator {
8
- callbacks;
9
- constructor(callbacks) {
10
- this.callbacks = callbacks;
11
- }
12
- getMinKeymanVersion(keyboardMetadata) {
13
- let minKeymanVersion = MIN_KBD_FILEVERSION_KMP_JSON;
14
- for (let id of Object.keys(keyboardMetadata)) {
15
- // minKeymanVersion is always a float so float comparison is safe
16
- let kbdMinKeymanVersion = parseFloat(keyboardMetadata[id].data.minKeymanVersion);
17
- if (kbdMinKeymanVersion > 14.0) {
18
- // Keyman for Windows 14 and earlier only accepted version 7.0 for keyboard
19
- // packages, so we must not write any other version in order to allow
20
- // earlier versions of Keyman to load the package.
21
- if (parseFloat(minKeymanVersion) < kbdMinKeymanVersion) {
22
- minKeymanVersion = keyboardMetadata[id].data.minKeymanVersion;
23
- }
24
- }
25
- }
26
- return minKeymanVersion;
27
- }
28
- /**
29
- * Verifies version information in corresponding keyboards and updates kmpJson
30
- * metadata as the version information can be out of sync in the .kps file
31
- * after updating a contained keyboard.
32
- * @param kps
33
- * @param kmp
34
- * @returns
35
- */
36
- validateAndUpdateVersions(kps, kmp, keyboardMetadata) {
37
- const followKeyboardVersion = kps.Options?.FollowKeyboardVersion !== undefined;
38
- if (followKeyboardVersion) {
39
- if (!this.checkFollowKeyboardVersion(kmp)) {
40
- return false;
41
- }
42
- }
43
- if (!kmp.keyboards) {
44
- // Lexical models don't have version metadata; only their packages.
45
- return true;
46
- }
47
- let result = true;
48
- // We now know we have at least one keyboard in the package
49
- for (let keyboard of kmp.keyboards) {
50
- const data = keyboardMetadata[keyboard.id];
51
- if (!data) {
52
- // Warnings or errors will have been raised by getKeyboardFileData
53
- // TODO raise error -- we should not have gotten here
54
- return false;
55
- }
56
- // Note: there is often version metadata in the .kps <Keyboard> element, but
57
- // we don't read from the metadata because we want to ensure we have the
58
- // most up-to-date keyboard version data here, from the compiled keyboard.
59
- if (followKeyboardVersion && data.data.keyboardVersion === null) {
60
- this.callbacks.reportMessage(CompilerMessages.Info_KeyboardFileHasNoKeyboardVersion({ filename: keyboard.id }));
61
- }
62
- keyboard.version = data.data.keyboardVersion ?? DEFAULT_KEYBOARD_VERSION;
63
- if (result && followKeyboardVersion) {
64
- if (kmp.keyboards[0].version !== keyboard.version) {
65
- this.callbacks.reportMessage(CompilerMessages.Warn_KeyboardVersionsDoNotMatch({
66
- keyboard: keyboard.id,
67
- version: keyboard.version,
68
- firstKeyboard: kmp.keyboards[0].id,
69
- firstVersion: kmp.keyboards[0].version
70
- }));
71
- }
72
- }
73
- }
74
- if (result && followKeyboardVersion) {
75
- kmp.info.version = { description: kmp.keyboards[0].version };
76
- }
77
- return result;
78
- }
79
- checkFollowKeyboardVersion(kmp) {
80
- // Lexical model packages do not allow FollowKeyboardVersion
81
- if (kmp.lexicalModels && kmp.lexicalModels.length) {
82
- this.callbacks.reportMessage(CompilerMessages.Error_FollowKeyboardVersionNotAllowedForModelPackages());
83
- return false;
84
- }
85
- if (!kmp.keyboards || !kmp.keyboards.length) {
86
- this.callbacks.reportMessage(CompilerMessages.Error_FollowKeyboardVersionButNoKeyboards());
87
- return false;
88
- }
89
- return true;
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"],"sourceRoot":"","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,cAAS,GAAT,SAAS,CAAmB;IAAG,CAAC;IAE7C,mBAAmB,CAAC,gBAA4C;QACrE,IAAI,gBAAgB,GAAG,4BAA4B,CAAC;QACpD,KAAI,IAAI,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE;YAC3C,iEAAiE;YACjE,IAAI,mBAAmB,GAAG,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACjF,IAAG,mBAAmB,GAAG,IAAI,EAAE;gBAC7B,2EAA2E;gBAC3E,qEAAqE;gBACrE,kDAAkD;gBAClD,IAAG,UAAU,CAAC,gBAAgB,CAAC,GAAG,mBAAmB,EAAE;oBACrD,gBAAgB,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;iBAC/D;aACF;SACF;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD;;;;;;;OAOG;IACI,yBAAyB,CAAC,GAAoB,EAAE,GAA4B,EAAE,gBAA4C;QAC/H,MAAM,qBAAqB,GAAG,GAAG,CAAC,OAAO,EAAE,qBAAqB,KAAK,SAAS,CAAC;QAE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O;qBACvC,CAAC,CAAC,CAAC;iBACL;aACF;SACF;QAED,IAAG,MAAM,IAAI,qBAAqB,EAAE;YAClC,GAAG,CAAC,IAAI,CAAC,OAAO,GAAG,EAAC,WAAW,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,EAAC,CAAC;SAC5D;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,0BAA0B,CAAC,GAA4B;QAC7D,4DAA4D;QAC5D,IAAG,GAAG,CAAC,aAAa,IAAI,GAAG,CAAC,aAAa,CAAC,MAAM,EAAE;YAChD,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,gBAAgB,CAAC,qDAAqD,EAAE,CAAC,CAAC;YACvG,OAAO,KAAK,CAAC;SACd;QAED,IAAG,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE;YAC1C,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,gBAAgB,CAAC,yCAAyC,EAAE,CAAC,CAAC;YAC3F,OAAO,KAAK,CAAC;SACd;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF","debug_id":"2fed3219-dbc8-5798-b47d-f1496278331b"}
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,cAAS,GAAT,SAAS,CAAmB;IAAG,CAAC;IAE7C,mBAAmB,CAAC,gBAA4C;QACrE,IAAI,gBAAgB,GAAG,4BAA4B,CAAC;QACpD,KAAI,IAAI,EAAE,IAAI,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,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
- !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]="d8ba5b90-e7ad-5e6f-9e25-0eaeaae6f000")}catch(e){}}();
17
- export const keymanForWindowsInstallerFiles = [
18
- 'keymandesktop.msi',
19
- 'keymanengine.msm'
20
- ];
21
- export const keymanEngineForWindowsFiles = [
22
- 'base.xslt',
23
- 'crashpad_handler.exe',
24
- 'keyman-debug-etw.man',
25
- 'keyman.exe',
26
- 'keyman32.dll',
27
- 'keyman64.dll',
28
- 'keymanmc.dll',
29
- 'keymanx64.exe',
30
- 'kmcomapi.dll',
31
- 'kmcomapi.x64.dll',
32
- 'kmrefresh.x64.exe',
33
- 'kmrefresh.x86.exe',
34
- 'kmtip.dll',
35
- 'kmtip64.dll',
36
- 'mcompile.exe',
37
- 'sentry.dll',
38
- 'sentry.x64.dll',
39
- 'si_browsers.xslt',
40
- 'si_fonts.xslt',
41
- 'si_hookdlls.xslt',
42
- 'si_keyman.xslt',
43
- 'si_language.xslt',
44
- 'si_office.xslt',
45
- 'si_overview.xslt',
46
- 'si_processes.xslt',
47
- 'si_processes_x64.xslt',
48
- 'si_startup.xslt',
49
- 'tsysinfo.exe',
50
- ];
51
- export const keymanForWindowsRedistFiles = [
52
- 'desktop_resources.dll',
53
- 'keymandesktop.chm',
54
- 'kmbrowserhost.exe',
55
- 'kmconfig.exe',
56
- 'kmshell.exe',
57
- 'unicodedata.mdb',
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"],"sourceRoot":"","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","debug_id":"d8ba5b90-e7ad-5e6f-9e25-0eaeaae6f000"}
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
- !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]="7be13b44-2b7e-5674-8439-331800382138")}catch(e){}}();
3
- ;
4
- /**
5
- * This function parses the JavaScript to do a best-effort retrieval of
6
- * keyboard data. It assumes a format similar to what the compiler produces.
7
- * It may be possible for it to miss something if the code is hand written and
8
- * diverges enough from the compiler code (e.g. if there is a comment between
9
- * a member variable and its value or something crazy like that).
10
- *
11
- * Long-term, we will require package to include .kmx so this kind of parsing
12
- * won't be necessary.
13
- */
14
- export function getCompiledWebKeyboardMetadata(js) {
15
- const nameRegex = /this.KN\s*=\s*(['"])(.*?)\1/;
16
- const kbverRegex = /this.KBVER\s*=\s*(['"])(.*?)\1/;
17
- const minverRegex = /this.KMINVER\s*=\s*([''"])(.*?)\1/;
18
- const rtlRegex = /this.KRTL\s*=\s*(.*?)\s*;/;
19
- const mnemonicRegex = /this.KM\s*=\s*(.*?)\s*;/;
20
- const touchLayoutRegex = /this.KVKL\s*=\s*{/;
21
- const name = nameRegex.exec(js);
22
- const kbver = kbverRegex.exec(js);
23
- const minver = minverRegex.exec(js);
24
- const rtl = rtlRegex.exec(js);
25
- const mnemonic = mnemonicRegex.exec(js);
26
- const touchLayout = touchLayoutRegex.exec(js);
27
- const SKeymanVersion70 = '7.0';
28
- return {
29
- keyboardName: name ? name[2] : null,
30
- keyboardVersion: kbver ? kbver[2] : null,
31
- minKeymanVersion: minver ? minver[2] : SKeymanVersion70,
32
- isRtl: !!(rtl && rtl[1].match(/^(1|true)$/)),
33
- isMnemonic: !!(mnemonic && mnemonic[1].match(/^(1|true)$/)),
34
- hasTouchLayout: !!touchLayout
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"],"sourceRoot":"","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,CAAC;IAChC,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAE9C,MAAM,gBAAgB,GAAG,KAAK,CAAC;IAE/B,OAAO;QACL,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QACnC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QACxC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB;QACvD,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC5C,UAAU,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC3D,cAAc,EAAE,CAAC,CAAC,WAAW;KAC9B,CAAC;AACJ,CAAC","debug_id":"7be13b44-2b7e-5674-8439-331800382138"}
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,6BA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