@keymanapp/kmc-ldml 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.
Files changed (58) hide show
  1. package/build/src/compiler/compiler.d.ts +123 -123
  2. package/build/src/compiler/compiler.js +307 -310
  3. package/build/src/compiler/compiler.js.map +1 -1
  4. package/build/src/compiler/disp.d.ts +11 -11
  5. package/build/src/compiler/disp.js +82 -85
  6. package/build/src/compiler/disp.js.map +1 -1
  7. package/build/src/compiler/empty-compiler.d.ts +37 -37
  8. package/build/src/compiler/empty-compiler.js +114 -117
  9. package/build/src/compiler/empty-compiler.js.map +1 -1
  10. package/build/src/compiler/keymanweb-compiler.d.ts +13 -13
  11. package/build/src/compiler/keymanweb-compiler.js +95 -98
  12. package/build/src/compiler/keymanweb-compiler.js.map +1 -1
  13. package/build/src/compiler/keys.d.ts +53 -53
  14. package/build/src/compiler/keys.js +417 -420
  15. package/build/src/compiler/keys.js.map +1 -1
  16. package/build/src/compiler/layr.d.ts +9 -9
  17. package/build/src/compiler/layr.js +81 -84
  18. package/build/src/compiler/layr.js.map +1 -1
  19. package/build/src/compiler/ldml-compiler-options.d.ts +11 -11
  20. package/build/src/compiler/ldml-compiler-options.js +3 -6
  21. package/build/src/compiler/ldml-compiler-options.js.map +1 -1
  22. package/build/src/compiler/loca.d.ts +15 -15
  23. package/build/src/compiler/loca.js +59 -62
  24. package/build/src/compiler/loca.js.map +1 -1
  25. package/build/src/compiler/messages.d.ts +186 -186
  26. package/build/src/compiler/messages.js +122 -125
  27. package/build/src/compiler/messages.js.map +1 -1
  28. package/build/src/compiler/meta.d.ts +13 -13
  29. package/build/src/compiler/meta.js +55 -58
  30. package/build/src/compiler/meta.js.map +1 -1
  31. package/build/src/compiler/metadata-compiler.d.ts +12 -12
  32. package/build/src/compiler/metadata-compiler.js +47 -50
  33. package/build/src/compiler/metadata-compiler.js.map +1 -1
  34. package/build/src/compiler/section-compiler.d.ts +35 -35
  35. package/build/src/compiler/section-compiler.js +40 -43
  36. package/build/src/compiler/section-compiler.js.map +1 -1
  37. package/build/src/compiler/substitution-tracker.d.ts +47 -47
  38. package/build/src/compiler/substitution-tracker.js +103 -106
  39. package/build/src/compiler/substitution-tracker.js.map +1 -1
  40. package/build/src/compiler/touch-layout-compiler.d.ts +7 -7
  41. package/build/src/compiler/touch-layout-compiler.js +91 -94
  42. package/build/src/compiler/touch-layout-compiler.js.map +1 -1
  43. package/build/src/compiler/tran.d.ts +57 -57
  44. package/build/src/compiler/tran.js +388 -391
  45. package/build/src/compiler/tran.js.map +1 -1
  46. package/build/src/compiler/vars.d.ts +21 -21
  47. package/build/src/compiler/vars.js +234 -237
  48. package/build/src/compiler/vars.js.map +1 -1
  49. package/build/src/compiler/visual-keyboard-compiler.d.ts +8 -8
  50. package/build/src/compiler/visual-keyboard-compiler.js +68 -71
  51. package/build/src/compiler/visual-keyboard-compiler.js.map +1 -1
  52. package/build/src/main.d.ts +3 -3
  53. package/build/src/main.js +3 -6
  54. package/build/src/main.js.map +1 -1
  55. package/build/src/util/util.d.ts +49 -49
  56. package/build/src/util/util.js +183 -186
  57. package/build/src/util/util.js.map +1 -1
  58. package/package.json +6 -6
@@ -1,124 +1,124 @@
1
- import { LDMLKeyboard, KMXPlus, CompilerCallbacks, LDMLKeyboardTestDataXMLSourceFile, UnicodeSetParser, KeymanCompiler, KeymanCompilerResult, KeymanCompilerArtifacts, KeymanCompilerArtifactOptional } from '@keymanapp/common-types';
2
- import { LdmlCompilerOptions } from './ldml-compiler-options.js';
3
- import { BkspCompiler, TranCompiler } from './tran.js';
4
- import { DispCompiler } from './disp.js';
5
- import { KeysCompiler } from './keys.js';
6
- import { LayrCompiler } from './layr.js';
7
- import { LocaCompiler } from './loca.js';
8
- import { MetaCompiler } from './meta.js';
9
- import { VarsCompiler } from './vars.js';
10
- import { StrsCompiler } from './empty-compiler.js';
11
- import LDMLKeyboardXMLSourceFile = LDMLKeyboard.LDMLKeyboardXMLSourceFile;
12
- export declare const SECTION_COMPILERS: (typeof TranCompiler | typeof BkspCompiler | typeof DispCompiler | typeof KeysCompiler | typeof LayrCompiler | typeof LocaCompiler | typeof MetaCompiler | typeof VarsCompiler | typeof StrsCompiler)[];
13
- /**
14
- * @public
15
- * Internal in-memory build artifacts from a successful compilation
16
- */
17
- export interface LdmlKeyboardCompilerArtifacts extends KeymanCompilerArtifacts {
18
- /**
19
- * Binary keyboard filedata and filename - installable into Keyman desktop
20
- * projects
21
- */
22
- kmx?: KeymanCompilerArtifactOptional;
23
- /**
24
- * Binary on screen keyboard filedata and filename - installable into Keyman
25
- * desktop projects alongside .kmx
26
- */
27
- kvk?: KeymanCompilerArtifactOptional;
28
- /**
29
- * Javascript keyboard filedata and filename - installable into KeymanWeb,
30
- * Keyman mobile products
31
- */
32
- js?: KeymanCompilerArtifactOptional;
33
- }
34
- export interface LdmlKeyboardCompilerResult extends KeymanCompilerResult {
35
- /**
36
- * Internal in-memory build artifacts from a successful compilation. Caller
37
- * can write these to disk with {@link LdmlKeyboardCompiler.write}
38
- */
39
- artifacts: LdmlKeyboardCompilerArtifacts;
40
- }
41
- /**
42
- * @public
43
- * Compiles a LDML keyboard .xml file to a .kmx (KMXPlus), .kvk, and/or .js. The
44
- * compiler does not read or write from filesystem or network directly, but
45
- * relies on callbacks for all external IO.
46
- */
47
- export declare class LdmlKeyboardCompiler implements KeymanCompiler {
48
- private callbacks;
49
- private options;
50
- private usetparser?;
51
- /**
52
- * Initialize the compiler, including loading the WASM host for uset parsing.
53
- * Copies options.
54
- * @param callbacks - Callbacks for external interfaces, including message
55
- * reporting and file io
56
- * @param options - Compiler options
57
- * @returns false if initialization fails
58
- */
59
- init(callbacks: CompilerCallbacks, options: LdmlCompilerOptions): Promise<boolean>;
60
- /**
61
- * Compiles a LDML keyboard .xml file to .kmx, .kvk, and/or .js files. Returns
62
- * an object containing binary artifacts on success. The files are passed in
63
- * by name, and the compiler will use callbacks as passed to the
64
- * {@link LdmlKeyboardCompiler.init} function to read any input files by disk.
65
- * @param infile - Path to source file.
66
- * @param outfile - Path to output file. The file will not be written to, but
67
- * will be included in the result for use by
68
- * {@link LdmlKeyboardCompiler.write}.
69
- * @returns Binary artifacts on success, null on failure.
70
- */
71
- run(inputFilename: string, outputFilename?: string): Promise<LdmlKeyboardCompilerResult>;
72
- /**
73
- * Write artifacts from a successful compile to disk, via callbacks methods.
74
- * The artifacts written may include:
75
- *
76
- * - .kmx file - binary keyboard used by Keyman on desktop platforms
77
- * - .kvk file - binary on screen keyboard used by Keyman on desktop platforms
78
- * - .js file - Javascript keyboard for web and touch platforms
79
- *
80
- * @param artifacts - object containing artifact binary data to write out
81
- * @returns true on success
82
- */
83
- write(artifacts: LdmlKeyboardCompilerArtifacts): Promise<boolean>;
84
- /**
85
- * @internal
86
- * Construct or return a UnicodeSetParser, aka KmnCompiler
87
- * @returns the held UnicodeSetParser
88
- */
89
- getUsetParser(): Promise<UnicodeSetParser>;
90
- private buildSections;
91
- /**
92
- * @internal
93
- * Loads a LDML Keyboard xml file and compiles into in-memory xml
94
- * structures.
95
- * @param filename - input filename, will use callback to load from disk
96
- * @returns the source file, or null if invalid
97
- */
98
- load(filename: string): LDMLKeyboardXMLSourceFile | null;
99
- /**
100
- * @internal
101
- * Loads a LDML Keyboard test data xml file and compiles into in-memory xml
102
- * structures.
103
- * @param filename - input filename, will use callback to load from disk
104
- * @returns the source file, or null if invalid
105
- */
106
- loadTestData(filename: string): LDMLKeyboardTestDataXMLSourceFile | null;
107
- /**
108
- * @internal
109
- * Validates that the LDML keyboard source file and lints. Actually just
110
- * compiles the keyboard and returns `true` if everything is good...
111
- * @param source - in-memory representation of LDML keyboard xml file
112
- * @returns true if the file validates
113
- */
114
- validate(source: LDMLKeyboardXMLSourceFile): Promise<boolean>;
115
- /**
116
- * @internal
117
- * Transforms in-memory LDML keyboard xml file to an intermediate
118
- * representation of a .kmx file.
119
- * @param source - in-memory representation of LDML keyboard xml file
120
- * @returns KMXPlusFile intermediate file
121
- */
122
- compile(source: LDMLKeyboardXMLSourceFile, postValidate?: boolean): Promise<KMXPlus.KMXPlusFile>;
123
- }
1
+ import { LDMLKeyboard, KMXPlus, CompilerCallbacks, LDMLKeyboardTestDataXMLSourceFile, UnicodeSetParser, KeymanCompiler, KeymanCompilerResult, KeymanCompilerArtifacts, KeymanCompilerArtifactOptional } from '@keymanapp/common-types';
2
+ import { LdmlCompilerOptions } from './ldml-compiler-options.js';
3
+ import { BkspCompiler, TranCompiler } from './tran.js';
4
+ import { DispCompiler } from './disp.js';
5
+ import { KeysCompiler } from './keys.js';
6
+ import { LayrCompiler } from './layr.js';
7
+ import { LocaCompiler } from './loca.js';
8
+ import { MetaCompiler } from './meta.js';
9
+ import { VarsCompiler } from './vars.js';
10
+ import { StrsCompiler } from './empty-compiler.js';
11
+ import LDMLKeyboardXMLSourceFile = LDMLKeyboard.LDMLKeyboardXMLSourceFile;
12
+ export declare const SECTION_COMPILERS: (typeof TranCompiler | typeof BkspCompiler | typeof DispCompiler | typeof KeysCompiler | typeof LayrCompiler | typeof LocaCompiler | typeof MetaCompiler | typeof VarsCompiler | typeof StrsCompiler)[];
13
+ /**
14
+ * @public
15
+ * Internal in-memory build artifacts from a successful compilation
16
+ */
17
+ export interface LdmlKeyboardCompilerArtifacts extends KeymanCompilerArtifacts {
18
+ /**
19
+ * Binary keyboard filedata and filename - installable into Keyman desktop
20
+ * projects
21
+ */
22
+ kmx?: KeymanCompilerArtifactOptional;
23
+ /**
24
+ * Binary on screen keyboard filedata and filename - installable into Keyman
25
+ * desktop projects alongside .kmx
26
+ */
27
+ kvk?: KeymanCompilerArtifactOptional;
28
+ /**
29
+ * Javascript keyboard filedata and filename - installable into KeymanWeb,
30
+ * Keyman mobile products
31
+ */
32
+ js?: KeymanCompilerArtifactOptional;
33
+ }
34
+ export interface LdmlKeyboardCompilerResult extends KeymanCompilerResult {
35
+ /**
36
+ * Internal in-memory build artifacts from a successful compilation. Caller
37
+ * can write these to disk with {@link LdmlKeyboardCompiler.write}
38
+ */
39
+ artifacts: LdmlKeyboardCompilerArtifacts;
40
+ }
41
+ /**
42
+ * @public
43
+ * Compiles a LDML keyboard .xml file to a .kmx (KMXPlus), .kvk, and/or .js. The
44
+ * compiler does not read or write from filesystem or network directly, but
45
+ * relies on callbacks for all external IO.
46
+ */
47
+ export declare class LdmlKeyboardCompiler implements KeymanCompiler {
48
+ private callbacks;
49
+ private options;
50
+ private usetparser?;
51
+ /**
52
+ * Initialize the compiler, including loading the WASM host for uset parsing.
53
+ * Copies options.
54
+ * @param callbacks - Callbacks for external interfaces, including message
55
+ * reporting and file io
56
+ * @param options - Compiler options
57
+ * @returns false if initialization fails
58
+ */
59
+ init(callbacks: CompilerCallbacks, options: LdmlCompilerOptions): Promise<boolean>;
60
+ /**
61
+ * Compiles a LDML keyboard .xml file to .kmx, .kvk, and/or .js files. Returns
62
+ * an object containing binary artifacts on success. The files are passed in
63
+ * by name, and the compiler will use callbacks as passed to the
64
+ * {@link LdmlKeyboardCompiler.init} function to read any input files by disk.
65
+ * @param infile - Path to source file.
66
+ * @param outfile - Path to output file. The file will not be written to, but
67
+ * will be included in the result for use by
68
+ * {@link LdmlKeyboardCompiler.write}.
69
+ * @returns Binary artifacts on success, null on failure.
70
+ */
71
+ run(inputFilename: string, outputFilename?: string): Promise<LdmlKeyboardCompilerResult>;
72
+ /**
73
+ * Write artifacts from a successful compile to disk, via callbacks methods.
74
+ * The artifacts written may include:
75
+ *
76
+ * - .kmx file - binary keyboard used by Keyman on desktop platforms
77
+ * - .kvk file - binary on screen keyboard used by Keyman on desktop platforms
78
+ * - .js file - Javascript keyboard for web and touch platforms
79
+ *
80
+ * @param artifacts - object containing artifact binary data to write out
81
+ * @returns true on success
82
+ */
83
+ write(artifacts: LdmlKeyboardCompilerArtifacts): Promise<boolean>;
84
+ /**
85
+ * @internal
86
+ * Construct or return a UnicodeSetParser, aka KmnCompiler
87
+ * @returns the held UnicodeSetParser
88
+ */
89
+ getUsetParser(): Promise<UnicodeSetParser>;
90
+ private buildSections;
91
+ /**
92
+ * @internal
93
+ * Loads a LDML Keyboard xml file and compiles into in-memory xml
94
+ * structures.
95
+ * @param filename - input filename, will use callback to load from disk
96
+ * @returns the source file, or null if invalid
97
+ */
98
+ load(filename: string): LDMLKeyboardXMLSourceFile | null;
99
+ /**
100
+ * @internal
101
+ * Loads a LDML Keyboard test data xml file and compiles into in-memory xml
102
+ * structures.
103
+ * @param filename - input filename, will use callback to load from disk
104
+ * @returns the source file, or null if invalid
105
+ */
106
+ loadTestData(filename: string): LDMLKeyboardTestDataXMLSourceFile | null;
107
+ /**
108
+ * @internal
109
+ * Validates that the LDML keyboard source file and lints. Actually just
110
+ * compiles the keyboard and returns `true` if everything is good...
111
+ * @param source - in-memory representation of LDML keyboard xml file
112
+ * @returns true if the file validates
113
+ */
114
+ validate(source: LDMLKeyboardXMLSourceFile): Promise<boolean>;
115
+ /**
116
+ * @internal
117
+ * Transforms in-memory LDML keyboard xml file to an intermediate
118
+ * representation of a .kmx file.
119
+ * @param source - in-memory representation of LDML keyboard xml file
120
+ * @returns KMXPlusFile intermediate file
121
+ */
122
+ compile(source: LDMLKeyboardXMLSourceFile, postValidate?: boolean): Promise<KMXPlus.KMXPlusFile>;
123
+ }
124
124
  //# sourceMappingURL=compiler.d.ts.map