@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.
Files changed (189) hide show
  1. package/build/src/consts/virtual-key-constants.d.ts +191 -191
  2. package/build/src/consts/virtual-key-constants.js +221 -221
  3. package/build/src/consts/virtual-key-constants.js.map +1 -1
  4. package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.d.ts +5 -5
  5. package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js +72 -72
  6. package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js.map +1 -1
  7. package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.d.ts +28 -28
  8. package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js +120 -120
  9. package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js.map +1 -1
  10. package/build/src/keyman-touch-layout/keyman-touch-layout-file.d.ts +95 -95
  11. package/build/src/keyman-touch-layout/keyman-touch-layout-file.js +52 -52
  12. package/build/src/kmx/element-string.d.ts +23 -23
  13. package/build/src/kmx/element-string.js +125 -125
  14. package/build/src/kmx/element-string.js.map +1 -1
  15. package/build/src/kmx/keyman-targets.d.ts +20 -20
  16. package/build/src/kmx/keyman-targets.js +79 -79
  17. package/build/src/kmx/keyman-targets.js.map +1 -1
  18. package/build/src/kmx/kmx-builder.d.ts +32 -32
  19. package/build/src/kmx/kmx-builder.js +189 -189
  20. package/build/src/kmx/kmx-builder.js.map +1 -1
  21. package/build/src/kmx/kmx-file-reader.d.ts +13 -13
  22. package/build/src/kmx/kmx-file-reader.js +134 -134
  23. package/build/src/kmx/kmx-file-reader.js.map +1 -1
  24. package/build/src/kmx/kmx-plus-builder/build-disp.d.ts +18 -18
  25. package/build/src/kmx/kmx-plus-builder/build-disp.js +27 -27
  26. package/build/src/kmx/kmx-plus-builder/build-disp.js.map +1 -1
  27. package/build/src/kmx/kmx-plus-builder/build-elem.d.ts +28 -28
  28. package/build/src/kmx/kmx-plus-builder/build-elem.js +89 -89
  29. package/build/src/kmx/kmx-plus-builder/build-elem.js.map +1 -1
  30. package/build/src/kmx/kmx-plus-builder/build-keys.d.ts +56 -56
  31. package/build/src/kmx/kmx-plus-builder/build-keys.js +107 -107
  32. package/build/src/kmx/kmx-plus-builder/build-keys.js.map +1 -1
  33. package/build/src/kmx/kmx-plus-builder/build-layr.d.ts +53 -53
  34. package/build/src/kmx/kmx-plus-builder/build-layr.js +101 -101
  35. package/build/src/kmx/kmx-plus-builder/build-layr.js.map +1 -1
  36. package/build/src/kmx/kmx-plus-builder/build-list.d.ts +35 -35
  37. package/build/src/kmx/kmx-plus-builder/build-list.js +66 -66
  38. package/build/src/kmx/kmx-plus-builder/build-list.js.map +1 -1
  39. package/build/src/kmx/kmx-plus-builder/build-loca.d.ts +11 -11
  40. package/build/src/kmx/kmx-plus-builder/build-loca.js +21 -21
  41. package/build/src/kmx/kmx-plus-builder/build-loca.js.map +1 -1
  42. package/build/src/kmx/kmx-plus-builder/build-meta.d.ts +16 -16
  43. package/build/src/kmx/kmx-plus-builder/build-meta.js +20 -20
  44. package/build/src/kmx/kmx-plus-builder/build-sect.d.ts +15 -15
  45. package/build/src/kmx/kmx-plus-builder/build-sect.js +15 -15
  46. package/build/src/kmx/kmx-plus-builder/build-sect.js.map +1 -1
  47. package/build/src/kmx/kmx-plus-builder/build-strs.d.ts +22 -22
  48. package/build/src/kmx/kmx-plus-builder/build-strs.js +46 -46
  49. package/build/src/kmx/kmx-plus-builder/build-strs.js.map +1 -1
  50. package/build/src/kmx/kmx-plus-builder/build-tran.d.ts +32 -32
  51. package/build/src/kmx/kmx-plus-builder/build-tran.js +69 -69
  52. package/build/src/kmx/kmx-plus-builder/build-tran.js.map +1 -1
  53. package/build/src/kmx/kmx-plus-builder/build-uset.d.ts +30 -30
  54. package/build/src/kmx/kmx-plus-builder/build-uset.js +60 -60
  55. package/build/src/kmx/kmx-plus-builder/build-uset.js.map +1 -1
  56. package/build/src/kmx/kmx-plus-builder/build-vars.d.ts +21 -21
  57. package/build/src/kmx/kmx-plus-builder/build-vars.js +48 -48
  58. package/build/src/kmx/kmx-plus-builder/build-vars.js.map +1 -1
  59. package/build/src/kmx/kmx-plus-builder/builder-section.d.ts +9 -9
  60. package/build/src/kmx/kmx-plus-builder/builder-section.js +2 -2
  61. package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.d.ts +42 -42
  62. package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js +137 -137
  63. package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js.map +1 -1
  64. package/build/src/kmx/kmx-plus.d.ts +322 -322
  65. package/build/src/kmx/kmx-plus.js +830 -830
  66. package/build/src/kmx/kmx-plus.js.map +1 -1
  67. package/build/src/kmx/kmx.d.ts +233 -233
  68. package/build/src/kmx/kmx.js +302 -302
  69. package/build/src/kmx/kmx.js.map +1 -1
  70. package/build/src/kmx/string-list.d.ts +35 -35
  71. package/build/src/kmx/string-list.js +88 -88
  72. package/build/src/kmx/string-list.js.map +1 -1
  73. package/build/src/kpj/keyman-developer-project.d.ts +78 -78
  74. package/build/src/kpj/keyman-developer-project.js +195 -195
  75. package/build/src/kpj/keyman-developer-project.js.map +1 -1
  76. package/build/src/kpj/kpj-file-reader.d.ts +18 -18
  77. package/build/src/kpj/kpj-file-reader.js +119 -119
  78. package/build/src/kpj/kpj-file-reader.js.map +1 -1
  79. package/build/src/kpj/kpj-file.d.ts +39 -39
  80. package/build/src/kpj/kpj-file.js +10 -10
  81. package/build/src/kvk/kvk-file-reader.d.ts +4 -4
  82. package/build/src/kvk/kvk-file-reader.js +37 -37
  83. package/build/src/kvk/kvk-file-reader.js.map +1 -1
  84. package/build/src/kvk/kvk-file-writer.d.ts +19 -19
  85. package/build/src/kvk/kvk-file-writer.js +77 -77
  86. package/build/src/kvk/kvk-file-writer.js.map +1 -1
  87. package/build/src/kvk/kvk-file.d.ts +66 -66
  88. package/build/src/kvk/kvk-file.d.ts.map +1 -1
  89. package/build/src/kvk/kvk-file.js +90 -90
  90. package/build/src/kvk/kvk-file.js.map +1 -1
  91. package/build/src/kvk/kvks-file-reader.d.ts +23 -23
  92. package/build/src/kvk/kvks-file-reader.js +175 -175
  93. package/build/src/kvk/kvks-file-reader.js.map +1 -1
  94. package/build/src/kvk/kvks-file-writer.d.ts +6 -6
  95. package/build/src/kvk/kvks-file-writer.js +106 -106
  96. package/build/src/kvk/kvks-file-writer.js.map +1 -1
  97. package/build/src/kvk/kvks-file.d.ts +43 -43
  98. package/build/src/kvk/kvks-file.js +9 -9
  99. package/build/src/kvk/visual-keyboard.d.ts +44 -44
  100. package/build/src/kvk/visual-keyboard.js +75 -75
  101. package/build/src/kvk/visual-keyboard.js.map +1 -1
  102. package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.d.ts +60 -60
  103. package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.js +19 -19
  104. package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.d.ts +95 -95
  105. package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js +409 -409
  106. package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js.map +1 -1
  107. package/build/src/ldml-keyboard/ldml-keyboard-xml.d.ts +170 -170
  108. package/build/src/ldml-keyboard/ldml-keyboard-xml.js +55 -55
  109. package/build/src/ldml-keyboard/pattern-parser.d.ts +201 -201
  110. package/build/src/ldml-keyboard/pattern-parser.js +490 -490
  111. package/build/src/ldml-keyboard/pattern-parser.js.map +1 -1
  112. package/build/src/ldml-keyboard/unicodeset-parser-api.d.ts +37 -37
  113. package/build/src/ldml-keyboard/unicodeset-parser-api.js +27 -27
  114. package/build/src/main.d.ts +33 -33
  115. package/build/src/main.js +32 -32
  116. package/build/src/package/kmp-json-file.d.ts +115 -115
  117. package/build/src/package/kmp-json-file.js +1 -1
  118. package/build/src/package/kps-file.d.ts +175 -175
  119. package/build/src/package/kps-file.js +15 -15
  120. package/build/src/schema-validators.d.ts +13 -13
  121. package/build/src/schema-validators.js +25 -25
  122. package/build/src/schemas/displaymap.schema.d.ts +57 -57
  123. package/build/src/schemas/displaymap.schema.js +35 -35
  124. package/build/src/schemas/displaymap.schema.validator.d.mts +2 -2
  125. package/build/src/schemas/displaymap.schema.validator.mjs +266 -266
  126. package/build/src/schemas/displaymap.schema.validator.mjs.map +1 -1
  127. package/build/src/schemas/keyboard_info.schema.d.ts +209 -209
  128. package/build/src/schemas/keyboard_info.schema.js +98 -98
  129. package/build/src/schemas/keyboard_info.schema.validator.d.mts +2 -2
  130. package/build/src/schemas/keyboard_info.schema.validator.mjs +1160 -1160
  131. package/build/src/schemas/keyboard_info.schema.validator.mjs.map +1 -1
  132. package/build/src/schemas/keyman-touch-layout.clean.spec.d.ts +227 -227
  133. package/build/src/schemas/keyman-touch-layout.clean.spec.js +151 -151
  134. package/build/src/schemas/keyman-touch-layout.clean.spec.validator.d.mts +2 -2
  135. package/build/src/schemas/keyman-touch-layout.clean.spec.validator.mjs +1094 -1094
  136. package/build/src/schemas/keyman-touch-layout.clean.spec.validator.mjs.map +1 -1
  137. package/build/src/schemas/keyman-touch-layout.spec.d.ts +229 -229
  138. package/build/src/schemas/keyman-touch-layout.spec.js +140 -140
  139. package/build/src/schemas/keyman-touch-layout.spec.validator.d.mts +2 -2
  140. package/build/src/schemas/keyman-touch-layout.spec.validator.mjs +1436 -1436
  141. package/build/src/schemas/keyman-touch-layout.spec.validator.mjs.map +1 -1
  142. package/build/src/schemas/kmp.schema.d.ts +324 -324
  143. package/build/src/schemas/kmp.schema.js +353 -353
  144. package/build/src/schemas/kmp.schema.validator.d.mts +2 -2
  145. package/build/src/schemas/kmp.schema.validator.mjs +1627 -1627
  146. package/build/src/schemas/kmp.schema.validator.mjs.map +1 -1
  147. package/build/src/schemas/kpj-9.0.schema.d.ts +152 -152
  148. package/build/src/schemas/kpj-9.0.schema.js +131 -131
  149. package/build/src/schemas/kpj-9.0.schema.validator.d.mts +2 -2
  150. package/build/src/schemas/kpj-9.0.schema.validator.mjs +655 -655
  151. package/build/src/schemas/kpj-9.0.schema.validator.mjs.map +1 -1
  152. package/build/src/schemas/kpj.schema.d.ts +122 -122
  153. package/build/src/schemas/kpj.schema.js +129 -129
  154. package/build/src/schemas/kpj.schema.validator.d.mts +2 -2
  155. package/build/src/schemas/kpj.schema.validator.mjs +515 -515
  156. package/build/src/schemas/kpj.schema.validator.mjs.map +1 -1
  157. package/build/src/schemas/kvks.schema.d.ts +160 -160
  158. package/build/src/schemas/kvks.schema.js +182 -182
  159. package/build/src/schemas/kvks.schema.validator.d.mts +2 -2
  160. package/build/src/schemas/kvks.schema.validator.mjs +625 -625
  161. package/build/src/schemas/kvks.schema.validator.mjs.map +1 -1
  162. package/build/src/schemas/ldml-keyboard3.schema.d.ts +635 -635
  163. package/build/src/schemas/ldml-keyboard3.schema.js +696 -696
  164. package/build/src/schemas/ldml-keyboard3.schema.validator.d.mts +2 -2
  165. package/build/src/schemas/ldml-keyboard3.schema.validator.mjs +3117 -3117
  166. package/build/src/schemas/ldml-keyboard3.schema.validator.mjs.map +1 -1
  167. package/build/src/schemas/ldml-keyboardtest3.schema.d.ts +192 -192
  168. package/build/src/schemas/ldml-keyboardtest3.schema.js +225 -225
  169. package/build/src/schemas/ldml-keyboardtest3.schema.validator.d.mts +2 -2
  170. package/build/src/schemas/ldml-keyboardtest3.schema.validator.mjs +744 -744
  171. package/build/src/schemas/ldml-keyboardtest3.schema.validator.mjs.map +1 -1
  172. package/build/src/schemas.d.ts +2300 -2300
  173. package/build/src/schemas.js +23 -23
  174. package/build/src/util/common-events.d.ts +44 -44
  175. package/build/src/util/common-events.js +26 -26
  176. package/build/src/util/compiler-interfaces.d.ts +371 -371
  177. package/build/src/util/compiler-interfaces.d.ts.map +1 -1
  178. package/build/src/util/compiler-interfaces.js +380 -380
  179. package/build/src/util/compiler-interfaces.js.map +1 -1
  180. package/build/src/util/errors.d.ts +5 -5
  181. package/build/src/util/errors.js +5 -5
  182. package/build/src/util/file-types.d.ts +93 -93
  183. package/build/src/util/file-types.d.ts.map +1 -1
  184. package/build/src/util/file-types.js +142 -142
  185. package/build/src/util/file-types.js.map +1 -1
  186. package/build/src/util/util.d.ts +98 -98
  187. package/build/src/util/util.js +368 -368
  188. package/build/src/util/util.js.map +1 -1
  189. package/package.json +3 -3
@@ -1,99 +1,99 @@
1
- /**
2
- * xml2js will not place single-entry objects into arrays. Easiest way to fix
3
- * this is to box them ourselves as needed. Ensures that o.x is an array.
4
- *
5
- * @param o Object with property to box
6
- * @param x Name of element to box
7
- */
8
- export declare function boxXmlArray(o: any, x: string): void;
9
- export declare const MATCH_HEX_ESCAPE: RegExp;
10
- /** regex for single quad escape such as \u0127 or \U00000000 */
11
- export declare const CONTAINS_QUAD_ESCAPE: RegExp;
12
- /** regex for single quad escape such as \u0127 */
13
- export declare const MATCH_QUAD_ESCAPE: RegExp;
14
- export declare class UnescapeError extends Error {
15
- }
16
- /**
17
- * Unescape one codepoint
18
- * @param hex one codepoint in hex, such as '0127'
19
- * @returns the unescaped codepoint
20
- */
21
- export declare function unescapeOne(hex: string): string;
22
- /**
23
- * Unescape one single quad string such as \u0127 / \U00000000
24
- * Throws exception if the string doesn't match MATCH_QUAD_ESCAPE
25
- * Note this does not attempt to handle or reject surrogates.
26
- * So, `\\uD838\\uDD09` will work but other combinations may not.
27
- * @param s input string
28
- * @returns output
29
- */
30
- export declare function unescapeOneQuadString(s: string): string;
31
- /** unscape multiple occurences of \u0127 style strings */
32
- export declare function unescapeQuadString(s: string): string;
33
- /**
34
- * Unescapes a string according to UTS#18§1.1, see <https://www.unicode.org/reports/tr18/#Hex_notation>
35
- * @param s escaped string
36
- * @returns
37
- */
38
- export declare function unescapeString(s: string): string;
39
- /** 0000 … FFFF */
40
- export declare function hexQuad(n: number): string;
41
- /** 00000000 … FFFFFFFF */
42
- export declare function hexOcts(n: number): string;
43
- /** escape one char for regex in \uXXXX form */
44
- export declare function escapeRegexChar(ch: string): string;
45
- /**
46
- * Escape a string (\uxxxx form) if there are any problematic codepoints
47
- */
48
- export declare function escapeStringForRegex(s: string): string;
49
- /**
50
- * Unescapes a string according to UTS#18§1.1, see <https://www.unicode.org/reports/tr18/#Hex_notation>
51
- * @param s escaped string
52
- * @returns
53
- */
54
- export declare function unescapeStringToRegex(s: string): string;
55
- /** True if this string *could* be a UTF-32 single char */
56
- export declare function isOneChar(value: string): boolean;
57
- export declare function toOneChar(value: string): number;
58
- export declare function describeCodepoint(ch: number): string;
59
- export declare enum BadStringType {
60
- pua = "PUA",
61
- unassigned = "Unassigned",
62
- illegal = "Illegal",
63
- denormalized = "Denormalized"
64
- }
65
- export declare function isValidUnicode(start: number, end?: number): boolean;
66
- export declare function isPUA(ch: number): boolean;
67
- declare class BadStringMap extends Map<BadStringType, Set<number>> {
68
- toString(): string;
69
- }
70
- /** abstract class for analyzing and categorizing strings */
71
- export declare abstract class StringAnalyzer {
72
- /** add a string for analysis */
73
- add(s: string): void;
74
- /**
75
- * subclass interface
76
- * @param c single codepoint to analyze (string)
77
- * @param ch single codepoint to analyze (scalar)
78
- */
79
- protected abstract analyzeCodePoint(c: string, ch: number): BadStringType;
80
- /** internal interface for the result of an analysis */
81
- protected addProblem(ch: number, type: BadStringType): void;
82
- /** get the results of the analysis */
83
- analyze(): BadStringMap;
84
- /** internal map */
85
- private m;
86
- }
87
- /** analyze a string looking for bad unicode */
88
- export declare class BadStringAnalyzer extends StringAnalyzer {
89
- /** analyze one codepoint */
90
- protected analyzeCodePoint(c: string, ch: number): BadStringType;
91
- /** export analyzer function */
92
- static getProblem(ch: number): BadStringType.pua | BadStringType.illegal;
93
- }
94
- /** Analyzer that checks if something isn't NFD */
95
- export declare class NFDAnalyzer extends StringAnalyzer {
96
- protected analyzeCodePoint(c: string, ch: number): BadStringType;
97
- }
98
- export {};
1
+ /**
2
+ * xml2js will not place single-entry objects into arrays. Easiest way to fix
3
+ * this is to box them ourselves as needed. Ensures that o.x is an array.
4
+ *
5
+ * @param o Object with property to box
6
+ * @param x Name of element to box
7
+ */
8
+ export declare function boxXmlArray(o: any, x: string): void;
9
+ export declare const MATCH_HEX_ESCAPE: RegExp;
10
+ /** regex for single quad escape such as \u0127 or \U00000000 */
11
+ export declare const CONTAINS_QUAD_ESCAPE: RegExp;
12
+ /** regex for single quad escape such as \u0127 */
13
+ export declare const MATCH_QUAD_ESCAPE: RegExp;
14
+ export declare class UnescapeError extends Error {
15
+ }
16
+ /**
17
+ * Unescape one codepoint
18
+ * @param hex one codepoint in hex, such as '0127'
19
+ * @returns the unescaped codepoint
20
+ */
21
+ export declare function unescapeOne(hex: string): string;
22
+ /**
23
+ * Unescape one single quad string such as \u0127 / \U00000000
24
+ * Throws exception if the string doesn't match MATCH_QUAD_ESCAPE
25
+ * Note this does not attempt to handle or reject surrogates.
26
+ * So, `\\uD838\\uDD09` will work but other combinations may not.
27
+ * @param s input string
28
+ * @returns output
29
+ */
30
+ export declare function unescapeOneQuadString(s: string): string;
31
+ /** unscape multiple occurences of \u0127 style strings */
32
+ export declare function unescapeQuadString(s: string): string;
33
+ /**
34
+ * Unescapes a string according to UTS#18§1.1, see <https://www.unicode.org/reports/tr18/#Hex_notation>
35
+ * @param s escaped string
36
+ * @returns
37
+ */
38
+ export declare function unescapeString(s: string): string;
39
+ /** 0000 … FFFF */
40
+ export declare function hexQuad(n: number): string;
41
+ /** 00000000 … FFFFFFFF */
42
+ export declare function hexOcts(n: number): string;
43
+ /** escape one char for regex in \uXXXX form */
44
+ export declare function escapeRegexChar(ch: string): string;
45
+ /**
46
+ * Escape a string (\uxxxx form) if there are any problematic codepoints
47
+ */
48
+ export declare function escapeStringForRegex(s: string): string;
49
+ /**
50
+ * Unescapes a string according to UTS#18§1.1, see <https://www.unicode.org/reports/tr18/#Hex_notation>
51
+ * @param s escaped string
52
+ * @returns
53
+ */
54
+ export declare function unescapeStringToRegex(s: string): string;
55
+ /** True if this string *could* be a UTF-32 single char */
56
+ export declare function isOneChar(value: string): boolean;
57
+ export declare function toOneChar(value: string): number;
58
+ export declare function describeCodepoint(ch: number): string;
59
+ export declare enum BadStringType {
60
+ pua = "PUA",
61
+ unassigned = "Unassigned",
62
+ illegal = "Illegal",
63
+ denormalized = "Denormalized"
64
+ }
65
+ export declare function isValidUnicode(start: number, end?: number): boolean;
66
+ export declare function isPUA(ch: number): boolean;
67
+ declare class BadStringMap extends Map<BadStringType, Set<number>> {
68
+ toString(): string;
69
+ }
70
+ /** abstract class for analyzing and categorizing strings */
71
+ export declare abstract class StringAnalyzer {
72
+ /** add a string for analysis */
73
+ add(s: string): void;
74
+ /**
75
+ * subclass interface
76
+ * @param c single codepoint to analyze (string)
77
+ * @param ch single codepoint to analyze (scalar)
78
+ */
79
+ protected abstract analyzeCodePoint(c: string, ch: number): BadStringType;
80
+ /** internal interface for the result of an analysis */
81
+ protected addProblem(ch: number, type: BadStringType): void;
82
+ /** get the results of the analysis */
83
+ analyze(): BadStringMap;
84
+ /** internal map */
85
+ private m;
86
+ }
87
+ /** analyze a string looking for bad unicode */
88
+ export declare class BadStringAnalyzer extends StringAnalyzer {
89
+ /** analyze one codepoint */
90
+ protected analyzeCodePoint(c: string, ch: number): BadStringType;
91
+ /** export analyzer function */
92
+ static getProblem(ch: number): BadStringType.pua | BadStringType.illegal;
93
+ }
94
+ /** Analyzer that checks if something isn't NFD */
95
+ export declare class NFDAnalyzer extends StringAnalyzer {
96
+ protected analyzeCodePoint(c: string, ch: number): BadStringType;
97
+ }
98
+ export {};
99
99
  //# sourceMappingURL=util.d.ts.map