@keymanapp/common-types 17.0.85-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 +131 -0
- package/build/src/consts/virtual-key-constants.d.ts.map +1 -0
- package/build/src/consts/virtual-key-constants.js +245 -0
- package/build/src/consts/virtual-key-constants.js.map +1 -0
- package/build/src/import/techpreview/cldr_info.json +5 -0
- package/build/src/import/techpreview/keys-Latn-implied.xml +80 -0
- package/build/src/import/techpreview/keys-Zyyy-currency.xml +22 -0
- package/build/src/import/techpreview/keys-Zyyy-punctuation.xml +46 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.d.ts +7 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.d.ts.map +1 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js +74 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js.map +1 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.d.ts +24 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.d.ts.map +1 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js +75 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js.map +1 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.d.ts +76 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.d.ts.map +1 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.js +26 -0
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.js.map +1 -0
- package/build/src/keyman-touch-layout.clean.spec.json +170 -0
- package/build/src/kmx/element-string.d.ts +19 -0
- package/build/src/kmx/element-string.d.ts.map +1 -0
- package/build/src/kmx/element-string.js +72 -0
- package/build/src/kmx/element-string.js.map +1 -0
- package/build/src/kmx/kmx-builder.d.ts +77 -0
- package/build/src/kmx/kmx-builder.d.ts.map +1 -0
- package/build/src/kmx/kmx-builder.js +193 -0
- package/build/src/kmx/kmx-builder.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-disp.d.ts +18 -0
- package/build/src/kmx/kmx-plus-builder/build-disp.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-disp.js +25 -0
- package/build/src/kmx/kmx-plus-builder/build-disp.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-elem.d.ts +26 -0
- package/build/src/kmx/kmx-plus-builder/build-elem.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-elem.js +78 -0
- package/build/src/kmx/kmx-plus-builder/build-elem.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-keys.d.ts +60 -0
- package/build/src/kmx/kmx-plus-builder/build-keys.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-keys.js +107 -0
- package/build/src/kmx/kmx-plus-builder/build-keys.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-layr.d.ts +54 -0
- package/build/src/kmx/kmx-plus-builder/build-layr.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-layr.js +99 -0
- package/build/src/kmx/kmx-plus-builder/build-layr.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-list.d.ts +34 -0
- package/build/src/kmx/kmx-plus-builder/build-list.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-list.js +62 -0
- package/build/src/kmx/kmx-plus-builder/build-list.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-loca.d.ts +12 -0
- package/build/src/kmx/kmx-plus-builder/build-loca.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-loca.js +20 -0
- package/build/src/kmx/kmx-plus-builder/build-loca.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-meta.d.ts +17 -0
- package/build/src/kmx/kmx-plus-builder/build-meta.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-meta.js +21 -0
- package/build/src/kmx/kmx-plus-builder/build-meta.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-name.d.ts +12 -0
- package/build/src/kmx/kmx-plus-builder/build-name.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-name.js +23 -0
- package/build/src/kmx/kmx-plus-builder/build-name.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-ordr.d.ts +18 -0
- package/build/src/kmx/kmx-plus-builder/build-ordr.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-ordr.js +27 -0
- package/build/src/kmx/kmx-plus-builder/build-ordr.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-sect.d.ts +16 -0
- package/build/src/kmx/kmx-plus-builder/build-sect.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-sect.js +14 -0
- package/build/src/kmx/kmx-plus-builder/build-sect.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-strs.d.ts +18 -0
- package/build/src/kmx/kmx-plus-builder/build-strs.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-strs.js +34 -0
- package/build/src/kmx/kmx-plus-builder/build-strs.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-tran.d.ts +20 -0
- package/build/src/kmx/kmx-plus-builder/build-tran.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-tran.js +30 -0
- package/build/src/kmx/kmx-plus-builder/build-tran.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-vkey.d.ts +16 -0
- package/build/src/kmx/kmx-plus-builder/build-vkey.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/build-vkey.js +23 -0
- package/build/src/kmx/kmx-plus-builder/build-vkey.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/builder-section.d.ts +6 -0
- package/build/src/kmx/kmx-plus-builder/builder-section.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/builder-section.js +3 -0
- package/build/src/kmx/kmx-plus-builder/builder-section.js.map +1 -0
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.d.ts +47 -0
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js +143 -0
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js.map +1 -0
- package/build/src/kmx/kmx-plus.d.ts +259 -0
- package/build/src/kmx/kmx-plus.d.ts.map +1 -0
- package/build/src/kmx/kmx-plus.js +594 -0
- package/build/src/kmx/kmx-plus.js.map +1 -0
- package/build/src/kmx/kmx.d.ts +166 -0
- package/build/src/kmx/kmx.d.ts.map +1 -0
- package/build/src/kmx/kmx.js +271 -0
- package/build/src/kmx/kmx.js.map +1 -0
- package/build/src/kmx/string-list.d.ts +29 -0
- package/build/src/kmx/string-list.d.ts.map +1 -0
- package/build/src/kmx/string-list.js +75 -0
- package/build/src/kmx/string-list.js.map +1 -0
- package/build/src/kpj/keyman-developer-project.d.ts +58 -0
- package/build/src/kpj/keyman-developer-project.d.ts.map +1 -0
- package/build/src/kpj/keyman-developer-project.js +141 -0
- package/build/src/kpj/keyman-developer-project.js.map +1 -0
- package/build/src/kpj/kpj-file-reader.d.ts +17 -0
- package/build/src/kpj/kpj-file-reader.d.ts.map +1 -0
- package/build/src/kpj/kpj-file-reader.js +92 -0
- package/build/src/kpj/kpj-file-reader.js.map +1 -0
- package/build/src/kpj/kpj-file.d.ts +39 -0
- package/build/src/kpj/kpj-file.d.ts.map +1 -0
- package/build/src/kpj/kpj-file.js +11 -0
- package/build/src/kpj/kpj-file.js.map +1 -0
- package/build/src/kpj.schema.json +127 -0
- package/build/src/kvk/kvk-file-reader.d.ts +5 -0
- package/build/src/kvk/kvk-file-reader.d.ts.map +1 -0
- package/build/src/kvk/kvk-file-reader.js +35 -0
- package/build/src/kvk/kvk-file-reader.js.map +1 -0
- package/build/src/kvk/kvk-file-writer.d.ts +20 -0
- package/build/src/kvk/kvk-file-writer.d.ts.map +1 -0
- package/build/src/kvk/kvk-file-writer.js +67 -0
- package/build/src/kvk/kvk-file-writer.js.map +1 -0
- package/build/src/kvk/kvk-file.d.ts +64 -0
- package/build/src/kvk/kvk-file.d.ts.map +1 -0
- package/build/src/kvk/kvk-file.js +63 -0
- package/build/src/kvk/kvk-file.js.map +1 -0
- package/build/src/kvk/kvks-file-reader.d.ts +30 -0
- package/build/src/kvk/kvks-file-reader.d.ts.map +1 -0
- package/build/src/kvk/kvks-file-reader.js +154 -0
- package/build/src/kvk/kvks-file-reader.js.map +1 -0
- package/build/src/kvk/kvks-file-writer.d.ts +6 -0
- package/build/src/kvk/kvks-file-writer.d.ts.map +1 -0
- package/build/src/kvk/kvks-file-writer.js +99 -0
- package/build/src/kvk/kvks-file-writer.js.map +1 -0
- package/build/src/kvk/kvks-file.d.ts +44 -0
- package/build/src/kvk/kvks-file.d.ts.map +1 -0
- package/build/src/kvk/kvks-file.js +10 -0
- package/build/src/kvk/kvks-file.js.map +1 -0
- package/build/src/kvk/visual-keyboard.d.ts +35 -0
- package/build/src/kvk/visual-keyboard.d.ts.map +1 -0
- package/build/src/kvk/visual-keyboard.js +61 -0
- package/build/src/kvk/visual-keyboard.js.map +1 -0
- package/build/src/kvks.schema.json +182 -0
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.d.ts +56 -0
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.d.ts.map +1 -0
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.js +20 -0
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.js.map +1 -0
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.d.ts +91 -0
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.d.ts.map +1 -0
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js +370 -0
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js.map +1 -0
- package/build/src/ldml-keyboard/ldml-keyboard-xml.d.ts +143 -0
- package/build/src/ldml-keyboard/ldml-keyboard-xml.d.ts.map +1 -0
- package/build/src/ldml-keyboard/ldml-keyboard-xml.js +34 -0
- package/build/src/ldml-keyboard/ldml-keyboard-xml.js.map +1 -0
- package/build/src/ldml-keyboard.schema.json +634 -0
- package/build/src/ldml-keyboardtest.schema.json +221 -0
- package/build/src/main.d.ts +21 -0
- package/build/src/main.d.ts.map +1 -0
- package/build/src/main.js +20 -0
- package/build/src/main.js.map +1 -0
- package/build/src/util/common-events.d.ts +49 -0
- package/build/src/util/common-events.d.ts.map +1 -0
- package/build/src/util/common-events.js +29 -0
- package/build/src/util/common-events.js.map +1 -0
- package/build/src/util/compiler-interfaces.d.ts +51 -0
- package/build/src/util/compiler-interfaces.d.ts.map +1 -0
- package/build/src/util/compiler-interfaces.js +33 -0
- package/build/src/util/compiler-interfaces.js.map +1 -0
- package/build/src/util/util.d.ts +17 -0
- package/build/src/util/util.d.ts.map +1 -0
- package/build/src/util/util.js +67 -0
- package/build/src/util/util.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build.sh +86 -0
- package/package.json +58 -0
- package/src/consts/virtual-key-constants.ts +257 -0
- package/src/keyman-touch-layout/keyman-touch-layout-file-reader.ts +81 -0
- package/src/keyman-touch-layout/keyman-touch-layout-file-writer.ts +84 -0
- package/src/keyman-touch-layout/keyman-touch-layout-file.ts +87 -0
- package/src/kmx/element-string.ts +79 -0
- package/src/kmx/kmx-builder.ts +287 -0
- package/src/kmx/kmx-plus-builder/build-disp.ts +46 -0
- package/src/kmx/kmx-plus-builder/build-elem.ts +103 -0
- package/src/kmx/kmx-plus-builder/build-keys.ts +175 -0
- package/src/kmx/kmx-plus-builder/build-layr.ts +154 -0
- package/src/kmx/kmx-plus-builder/build-list.ts +95 -0
- package/src/kmx/kmx-plus-builder/build-loca.ts +34 -0
- package/src/kmx/kmx-plus-builder/build-meta.ts +37 -0
- package/src/kmx/kmx-plus-builder/build-name.ts +37 -0
- package/src/kmx/kmx-plus-builder/build-ordr.ts +45 -0
- package/src/kmx/kmx-plus-builder/build-sect.ts +31 -0
- package/src/kmx/kmx-plus-builder/build-strs.ts +58 -0
- package/src/kmx/kmx-plus-builder/build-tran.ts +50 -0
- package/src/kmx/kmx-plus-builder/build-vkey.ts +43 -0
- package/src/kmx/kmx-plus-builder/builder-section.ts +6 -0
- package/src/kmx/kmx-plus-builder/kmx-plus-builder.ts +190 -0
- package/src/kmx/kmx-plus.ts +692 -0
- package/src/kmx/kmx.ts +360 -0
- package/src/kmx/string-list.ts +74 -0
- package/src/kpj/keyman-developer-project.ts +155 -0
- package/src/kpj/kpj-file-reader.ts +103 -0
- package/src/kpj/kpj-file.ts +52 -0
- package/src/kvk/kvk-file-reader.ts +34 -0
- package/src/kvk/kvk-file-writer.ts +72 -0
- package/src/kvk/kvk-file.ts +122 -0
- package/src/kvk/kvks-file-reader.ts +164 -0
- package/src/kvk/kvks-file-writer.ts +113 -0
- package/src/kvk/kvks-file.ts +53 -0
- package/src/kvk/visual-keyboard.ts +80 -0
- package/src/ldml-keyboard/ldml-keyboard-testdata-xml.ts +74 -0
- package/src/ldml-keyboard/ldml-keyboard-xml-reader.ts +387 -0
- package/src/ldml-keyboard/ldml-keyboard-xml.ts +177 -0
- package/src/main.ts +27 -0
- package/src/restructure.d.ts +2 -0
- package/src/util/common-events.ts +50 -0
- package/src/util/compiler-interfaces.ts +54 -0
- package/src/util/util.ts +68 -0
- package/test/fixtures/import-minimal.xml +8 -0
- package/test/fixtures/import-minimal1.xml +11 -0
- package/test/fixtures/import-minimal2.xml +11 -0
- package/test/fixtures/import-symbols.xml +13 -0
- package/test/fixtures/invalid-conforms-to.xml +19 -0
- package/test/fixtures/invalid-import-base.xml +16 -0
- package/test/fixtures/invalid-import-path.xml +16 -0
- package/test/fixtures/invalid-import-readfail.xml +16 -0
- package/test/fixtures/invalid-import-wrongroot.xml +16 -0
- package/test/fixtures/invalid-structure-per-dtd.xml +8 -0
- package/test/fixtures/keyman-touch-layout/khmer_angkor.keyman-touch-layout +1950 -0
- package/test/fixtures/keyman-touch-layout/legacy.keyman-touch-layout +36 -0
- package/test/fixtures/kpj/khmer_angkor.kpj +187 -0
- package/test/fixtures/kvk/khmer_angkor.kvk +0 -0
- package/test/fixtures/kvk/khmer_angkor.kvks +206 -0
- package/test/fixtures/test-fr.xml +22 -0
- package/test/helpers/index.ts +39 -0
- package/test/helpers/reader-callback-test.ts +199 -0
- package/test/keyman-touch-layout/test-keyman-touch-layout-file-reader.ts +71 -0
- package/test/keyman-touch-layout/test-keyman-touch-layout-round-trip.ts +35 -0
- package/test/kpj/test-kpj-file-reader.ts +123 -0
- package/test/kvk/test-kvk-file.ts +15 -0
- package/test/kvk/test-kvk-round-trip.ts +87 -0
- package/test/kvk/test-kvk-utils.ts +24 -0
- package/test/kvk/test-kvks-file.ts +45 -0
- package/test/ldml-keyboard/test-ldml-keyboard-testdata-reader.ts +51 -0
- package/test/ldml-keyboard/test-ldml-keyboard-xml-reader.ts +131 -0
- package/test/tsconfig.json +21 -0
- package/test/util/test-unescape.ts +38 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema#",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"definitions": {
|
|
5
|
+
"any": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"backspace": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"check": {
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"properties": {
|
|
14
|
+
"result": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"result"
|
|
20
|
+
],
|
|
21
|
+
"type": "object"
|
|
22
|
+
},
|
|
23
|
+
"emit": {
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"properties": {
|
|
26
|
+
"to": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": [
|
|
31
|
+
"to"
|
|
32
|
+
],
|
|
33
|
+
"type": "object"
|
|
34
|
+
},
|
|
35
|
+
"info": {
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"properties": {
|
|
38
|
+
"author": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"keyboard": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"name": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"keyboard",
|
|
50
|
+
"name"
|
|
51
|
+
],
|
|
52
|
+
"type": "object"
|
|
53
|
+
},
|
|
54
|
+
"keystroke": {
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"properties": {
|
|
57
|
+
"flick": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
},
|
|
60
|
+
"key": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"longPress": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"tapCount": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"key"
|
|
72
|
+
],
|
|
73
|
+
"type": "object"
|
|
74
|
+
},
|
|
75
|
+
"repertoire": {
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"properties": {
|
|
78
|
+
"chars": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"name": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"type": {
|
|
85
|
+
"enum": [
|
|
86
|
+
"default",
|
|
87
|
+
"simple",
|
|
88
|
+
"gesture",
|
|
89
|
+
"flick",
|
|
90
|
+
"longPress",
|
|
91
|
+
"multiTap",
|
|
92
|
+
"hardware"
|
|
93
|
+
],
|
|
94
|
+
"type": "string"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"required": [
|
|
98
|
+
"chars",
|
|
99
|
+
"name"
|
|
100
|
+
],
|
|
101
|
+
"type": "object"
|
|
102
|
+
},
|
|
103
|
+
"special": {
|
|
104
|
+
"$ref": "#/definitions/any"
|
|
105
|
+
},
|
|
106
|
+
"startContext": {
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"properties": {
|
|
109
|
+
"to": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": [
|
|
114
|
+
"to"
|
|
115
|
+
],
|
|
116
|
+
"type": "object"
|
|
117
|
+
},
|
|
118
|
+
"test": {
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"properties": {
|
|
121
|
+
"backspace": {
|
|
122
|
+
"$ref": "#/definitions/backspace"
|
|
123
|
+
},
|
|
124
|
+
"check": {
|
|
125
|
+
"$ref": "#/definitions/check"
|
|
126
|
+
},
|
|
127
|
+
"emit": {
|
|
128
|
+
"$ref": "#/definitions/emit"
|
|
129
|
+
},
|
|
130
|
+
"keystroke": {
|
|
131
|
+
"$ref": "#/definitions/keystroke"
|
|
132
|
+
},
|
|
133
|
+
"name": {
|
|
134
|
+
"type": "string"
|
|
135
|
+
},
|
|
136
|
+
"special": {
|
|
137
|
+
"items": {
|
|
138
|
+
"$ref": "#/definitions/special"
|
|
139
|
+
},
|
|
140
|
+
"type": "array"
|
|
141
|
+
},
|
|
142
|
+
"startContext": {
|
|
143
|
+
"$ref": "#/definitions/startContext"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"required": [
|
|
147
|
+
"name"
|
|
148
|
+
],
|
|
149
|
+
"type": "object"
|
|
150
|
+
},
|
|
151
|
+
"tests": {
|
|
152
|
+
"additionalProperties": false,
|
|
153
|
+
"properties": {
|
|
154
|
+
"name": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"special": {
|
|
158
|
+
"items": {
|
|
159
|
+
"$ref": "#/definitions/special"
|
|
160
|
+
},
|
|
161
|
+
"type": "array"
|
|
162
|
+
},
|
|
163
|
+
"test": {
|
|
164
|
+
"items": {
|
|
165
|
+
"$ref": "#/definitions/test"
|
|
166
|
+
},
|
|
167
|
+
"minItems": 1,
|
|
168
|
+
"type": "array"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"required": [
|
|
172
|
+
"test",
|
|
173
|
+
"name"
|
|
174
|
+
],
|
|
175
|
+
"type": "object"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"properties": {
|
|
179
|
+
"keyboardTest": {
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"properties": {
|
|
182
|
+
"conformsTo": {
|
|
183
|
+
"enum": [
|
|
184
|
+
"techpreview"
|
|
185
|
+
],
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
"info": {
|
|
189
|
+
"$ref": "#/definitions/info"
|
|
190
|
+
},
|
|
191
|
+
"repertoire": {
|
|
192
|
+
"items": {
|
|
193
|
+
"$ref": "#/definitions/repertoire"
|
|
194
|
+
},
|
|
195
|
+
"type": "array"
|
|
196
|
+
},
|
|
197
|
+
"special": {
|
|
198
|
+
"items": {
|
|
199
|
+
"$ref": "#/definitions/special"
|
|
200
|
+
},
|
|
201
|
+
"type": "array"
|
|
202
|
+
},
|
|
203
|
+
"tests": {
|
|
204
|
+
"items": {
|
|
205
|
+
"$ref": "#/definitions/tests"
|
|
206
|
+
},
|
|
207
|
+
"type": "array"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"required": [
|
|
211
|
+
"info",
|
|
212
|
+
"conformsTo"
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"required": [
|
|
217
|
+
"keyboardTest"
|
|
218
|
+
],
|
|
219
|
+
"title": "techpreview/dtd/ldmlKeyboardTest.xsd",
|
|
220
|
+
"type": "object"
|
|
221
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * as KMX from './kmx/kmx.js';
|
|
2
|
+
export * as KMXPlus from './kmx/kmx-plus.js';
|
|
3
|
+
export { default as KMXBuilder } from './kmx/kmx-builder.js';
|
|
4
|
+
export * as VisualKeyboard from './kvk/visual-keyboard.js';
|
|
5
|
+
export { default as KMXPlusBuilder } from './kmx/kmx-plus-builder/kmx-plus-builder.js';
|
|
6
|
+
export { default as KvkFileReader } from './kvk/kvk-file-reader.js';
|
|
7
|
+
export { default as KvksFileReader } from './kvk/kvks-file-reader.js';
|
|
8
|
+
export { default as KvkFileWriter } from './kvk/kvk-file-writer.js';
|
|
9
|
+
export * as LDMLKeyboard from './ldml-keyboard/ldml-keyboard-xml.js';
|
|
10
|
+
export { LDMLKeyboardTestDataXMLSourceFile } from './ldml-keyboard/ldml-keyboard-testdata-xml.js';
|
|
11
|
+
export { default as LDMLKeyboardXMLSourceFileReader } from './ldml-keyboard/ldml-keyboard-xml-reader.js';
|
|
12
|
+
export * as Constants from './consts/virtual-key-constants.js';
|
|
13
|
+
export { CompilerCallbacks, CompilerEvent, CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec } from './util/compiler-interfaces.js';
|
|
14
|
+
export { CommonTypesMessages } from './util/common-events.js';
|
|
15
|
+
export * as TouchLayout from './keyman-touch-layout/keyman-touch-layout-file.js';
|
|
16
|
+
export { TouchLayoutFileReader } from './keyman-touch-layout/keyman-touch-layout-file-reader.js';
|
|
17
|
+
export { TouchLayoutFileWriter, TouchLayoutFileWriterOptions } from './keyman-touch-layout/keyman-touch-layout-file-writer.js';
|
|
18
|
+
export * as KPJ from './kpj/kpj-file.js';
|
|
19
|
+
export { KPJFileReader } from './kpj/kpj-file-reader.js';
|
|
20
|
+
export { KeymanDeveloperProject } from './kpj/keyman-developer-project.js';
|
|
21
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,mBAAmB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ard from './kvk/visual-keyboard.js';
|
|
5
|
+
export { default as KMXPlusBuilder } from './kmx/kmx-plus-builder/kmx-plus-builder.js';
|
|
6
|
+
export { default as KvkFileReader } from './kvk/kvk-file-reader.js';
|
|
7
|
+
export { default as KvksFileReader } from './kvk/kvks-file-reader.js';
|
|
8
|
+
export { default as KvkFileWriter } from './kvk/kvk-file-writer.js';
|
|
9
|
+
export * as LDMLKeyboard from './ldml-keyboard/ldml-keyboard-xml.js';
|
|
10
|
+
export { default as LDMLKeyboardXMLSourceFileReader } from './ldml-keyboard/ldml-keyboard-xml-reader.js';
|
|
11
|
+
export * as Constants from './consts/virtual-key-constants.js';
|
|
12
|
+
export { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec } from './util/compiler-interfaces.js';
|
|
13
|
+
export { CommonTypesMessages } from './util/common-events.js';
|
|
14
|
+
export * as TouchLayout from './keyman-touch-layout/keyman-touch-layout-file.js';
|
|
15
|
+
export { TouchLayoutFileReader } from './keyman-touch-layout/keyman-touch-layout-file-reader.js';
|
|
16
|
+
export { TouchLayoutFileWriter } from './keyman-touch-layout/keyman-touch-layout-file-writer.js';
|
|
17
|
+
export * as KPJ from './kpj/kpj-file.js';
|
|
18
|
+
export { KPJFileReader } from './kpj/kpj-file-reader.js';
|
|
19
|
+
export { KeymanDeveloperProject } from './kpj/keyman-developer-project.js';
|
|
20
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAC,MAAO,4CAA4C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,KAAK,YAAY,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAEzG,OAAO,KAAK,SAAS,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAoC,sBAAsB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACrJ,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,KAAK,WAAW,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,OAAO,EAAE,qBAAqB,EAAgC,MAAM,0DAA0D,CAAC;AAE/H,OAAO,KAAK,GAAG,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare class CommonTypesMessages {
|
|
2
|
+
static Error_SchemaValidationError: (o: {
|
|
3
|
+
instancePath: string;
|
|
4
|
+
keyword: string;
|
|
5
|
+
message: string;
|
|
6
|
+
params: string;
|
|
7
|
+
}) => import("./compiler-interfaces.js").CompilerEvent;
|
|
8
|
+
static ERROR_SchemaValidationError: number;
|
|
9
|
+
static Error_ImportInvalidBase: (o: {
|
|
10
|
+
base: string;
|
|
11
|
+
path: string;
|
|
12
|
+
subtag: string;
|
|
13
|
+
}) => import("./compiler-interfaces.js").CompilerEvent;
|
|
14
|
+
static ERROR_ImportInvalidBase: number;
|
|
15
|
+
static Error_ImportInvalidPath: (o: {
|
|
16
|
+
base: string;
|
|
17
|
+
path: string;
|
|
18
|
+
subtag: string;
|
|
19
|
+
}) => import("./compiler-interfaces.js").CompilerEvent;
|
|
20
|
+
static ERROR_ImportInvalidPath: number;
|
|
21
|
+
static Error_ImportReadFail: (o: {
|
|
22
|
+
base: string;
|
|
23
|
+
path: string;
|
|
24
|
+
subtag: string;
|
|
25
|
+
}) => import("./compiler-interfaces.js").CompilerEvent;
|
|
26
|
+
static ERROR_ImportReadFail: number;
|
|
27
|
+
static Error_ImportWrongRoot: (o: {
|
|
28
|
+
base: string;
|
|
29
|
+
path: string;
|
|
30
|
+
subtag: string;
|
|
31
|
+
}) => import("./compiler-interfaces.js").CompilerEvent;
|
|
32
|
+
static ERROR_ImportWrongRoot: number;
|
|
33
|
+
static Error_ImportMergeFail: (o: {
|
|
34
|
+
base: string;
|
|
35
|
+
path: string;
|
|
36
|
+
subtag: string;
|
|
37
|
+
subsubtag: string;
|
|
38
|
+
}) => import("./compiler-interfaces.js").CompilerEvent;
|
|
39
|
+
static ERROR_ImportMergeFail: number;
|
|
40
|
+
static Error_TestDataUnexpectedArray: (o: {
|
|
41
|
+
subtag: string;
|
|
42
|
+
}) => import("./compiler-interfaces.js").CompilerEvent;
|
|
43
|
+
static ERROR_TestDataUnexpectedArray: number;
|
|
44
|
+
static Error_TestDataUnexpectedAction: (o: {
|
|
45
|
+
subtag: string;
|
|
46
|
+
}) => import("./compiler-interfaces.js").CompilerEvent;
|
|
47
|
+
static ERROR_TestDataUnexpectedAction: number;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=common-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-events.d.ts","sourceRoot":"","sources":["../../../src/util/common-events.ts"],"names":[],"mappings":"AAUA,qBAAa,mBAAmB;IAE9B,MAAM,CAAC,2BAA2B,MAAM;QAAC,YAAY,EAAC,MAAM,CAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,OAAO,EAAE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29 @@
|
|
|
1
|
+
import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec as m } from './compiler-interfaces.js';
|
|
2
|
+
import { constants } from '@keymanapp/ldml-keyboard-constants';
|
|
3
|
+
const CommonTypesErrMask = CompilerErrorNamespace.CommonTypes;
|
|
4
|
+
// const SevInfo = CompilerErrorSeverity.Info | CommonTypesErrMask;
|
|
5
|
+
// const SevHint = CompilerErrorSeverity.Hint | CommonTypesErrMask;
|
|
6
|
+
// const SevWarn = CompilerErrorSeverity.Warn | CommonTypesErrMask;
|
|
7
|
+
const SevError = CompilerErrorSeverity.Error | CommonTypesErrMask;
|
|
8
|
+
// const SevFatal = CompilerErrorSeverity.Fatal | CommonTypesErrMask;
|
|
9
|
+
export class CommonTypesMessages {
|
|
10
|
+
// structured Ajv validation error
|
|
11
|
+
static Error_SchemaValidationError = (o) => m(this.ERROR_SchemaValidationError, `Error validating LDML XML file: ${o.instancePath}: ${o.keyword}: ${o.message} ${o.params}`);
|
|
12
|
+
static ERROR_SchemaValidationError = SevError | 0x0001;
|
|
13
|
+
static Error_ImportInvalidBase = (o) => m(this.ERROR_ImportInvalidBase, `Import element with base ${o.base} is unsupported. Only ${constants.cldr_import_base} is supported.`);
|
|
14
|
+
static ERROR_ImportInvalidBase = SevError | 0x0002;
|
|
15
|
+
static Error_ImportInvalidPath = (o) => m(this.ERROR_ImportInvalidPath, `Import element with invalid path ${o.path}: expected the form '${constants.cldr_version_latest}./*.xml`);
|
|
16
|
+
static ERROR_ImportInvalidPath = SevError | 0x0003;
|
|
17
|
+
static Error_ImportReadFail = (o) => m(this.ERROR_ImportReadFail, `Import could not read data with path ${o.path}: expected the form '${constants.cldr_version_latest}./*.xml'`);
|
|
18
|
+
static ERROR_ImportReadFail = SevError | 0x0004;
|
|
19
|
+
static Error_ImportWrongRoot = (o) => m(this.ERROR_ImportWrongRoot, `Invalid import file ${o.path}: expected ${o.subtag} as root element.`);
|
|
20
|
+
static ERROR_ImportWrongRoot = SevError | 0x0005;
|
|
21
|
+
static Error_ImportMergeFail = (o) => m(this.ERROR_ImportMergeFail, `Problem importing ${o.path}: not sure how to handle non-array ${o.subtag}.${o.subsubtag}`);
|
|
22
|
+
static ERROR_ImportMergeFail = SevError | 0x0006;
|
|
23
|
+
static Error_TestDataUnexpectedArray = (o) => m(this.ERROR_TestDataUnexpectedArray, `Problem reading test data: expected single ${o.subtag} element, found multiple`);
|
|
24
|
+
static ERROR_TestDataUnexpectedArray = SevError | 0x0007;
|
|
25
|
+
static Error_TestDataUnexpectedAction = (o) => m(this.ERROR_TestDataUnexpectedAction, `Problem reading test data: unexpected action element ${o.subtag}`);
|
|
26
|
+
static ERROR_TestDataUnexpectedAction = SevError | 0x0008;
|
|
27
|
+
}
|
|
28
|
+
;
|
|
29
|
+
//# sourceMappingURL=common-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-events.js","sourceRoot":"","sources":["../../../src/util/common-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,mBAAmB,IAAI,CAAC,EAAE,MAAM,0BAA0B,CAAC;AACnH,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAE/D,MAAM,kBAAkB,GAAK,sBAAsB,CAAC,WAAW,CAAC;AAChE,qEAAqE;AACrE,qEAAqE;AACrE,qEAAqE;AACrE,MAAM,QAAQ,GAAG,qBAAqB,CAAC,KAAK,GAAG,kBAAkB,CAAC;AAClE,qEAAqE;AAErE,MAAM,OAAO,mBAAmB;IAC9B,kCAAkC;IAClC,MAAM,CAAC,2BAA2B,GAAG,CAAC,CAAwE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,2BAA2B,EACnJ,mCAAmC,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/F,MAAM,CAAC,2BAA2B,GAAG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EjD,MAAM,CAAC,6BAA6B,GAAG,CAAC,CAAmB,EAAE,EAAE,CAC7D,CAAC,CAAC,IAAI,CAAC,6BAA6B,EAClC,8CAA8C,CAAC,CAAC,MAAM,0BAA0B,CAAC,CAAC;IACtF,MAAM,CAAC,6BAA6B,GAAG,QAAQ,GAAG,MAAM,CAAC;IACzD,MAAM,CAAC,8BAA8B,GAAG,CAAC,CAAmB,EAAE,EAAE,CAC9D,CAAC,CAAC,IAAI,CAAC,8BAA8B,EACnC,wDAAwD,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACxE,MAAM,CAAC,8BAA8B,GAAG,QAAQ,GAAG,MAAM,CAAC;;AAC3D,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/**
|
|
3
|
+
* Abstract interface for compiler error and warning messages
|
|
4
|
+
*/
|
|
5
|
+
export interface CompilerEvent {
|
|
6
|
+
code: number;
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
export declare enum CompilerErrorSeverity {
|
|
10
|
+
Info = 0,
|
|
11
|
+
Hint = 1048576,
|
|
12
|
+
Warn = 2097152,
|
|
13
|
+
Error = 3145728,
|
|
14
|
+
Fatal = 4194304,
|
|
15
|
+
Severity_Mask = 15728640,
|
|
16
|
+
Error_Mask = 1048575
|
|
17
|
+
}
|
|
18
|
+
export declare enum CompilerErrorNamespace {
|
|
19
|
+
/**
|
|
20
|
+
* kmc-keyboard errors between 0x0000…0x0FFF
|
|
21
|
+
*/
|
|
22
|
+
KeyboardCompiler = 0,
|
|
23
|
+
/**
|
|
24
|
+
* common/web/types errors between 0x1000…0x1FFF
|
|
25
|
+
*/
|
|
26
|
+
CommonTypes = 4096
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Abstract interface for callbacks, to abstract out file i/o
|
|
30
|
+
*/
|
|
31
|
+
export interface CompilerCallbacks {
|
|
32
|
+
/**
|
|
33
|
+
* Attempt to load a file. Return falsy if not found.
|
|
34
|
+
* @param baseFilename
|
|
35
|
+
* @param filename
|
|
36
|
+
*/
|
|
37
|
+
loadFile(baseFilename: string, filename: string | URL): Buffer;
|
|
38
|
+
loadLdmlKeyboardSchema(): Buffer;
|
|
39
|
+
loadLdmlKeyboardTestSchema(): Buffer;
|
|
40
|
+
reportMessage(event: CompilerEvent): void;
|
|
41
|
+
loadKvksJsonSchema(): Buffer;
|
|
42
|
+
loadKpjJsonSchema(): Buffer;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Convenience function for constructing CompilerEvents
|
|
46
|
+
* @param code
|
|
47
|
+
* @param message
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
export declare const CompilerMessageSpec: (code: number, message: string) => CompilerEvent;
|
|
51
|
+
//# sourceMappingURL=compiler-interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler-interfaces.d.ts","sourceRoot":"","sources":["../../../src/util/compiler-interfaces.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,qBAAqB;IAC/B,IAAI,IAAoB;IACxB,IAAI,UAAoB;IACxB,IAAI,UAAoB;IACxB,KAAK,UAAmB;IACxB,KAAK,UAAmB;IAExB,aAAa,WAAW;IACxB,UAAU,UAAc;CACzB;AAED,oBAAY,sBAAsB;IAChC;;OAEG;IACH,gBAAgB,IAAS;IACzB;;OAEG;IACH,WAAW,OAAS;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC;IAC/D,sBAAsB,IAAI,MAAM,CAAC;IACjC,0BAA0B,IAAI,MAAM,CAAC;IACrC,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAC1C,kBAAkB,IAAI,MAAM,CAAC;IAC7B,iBAAiB,IAAI,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,SAAU,MAAM,WAAW,MAAM,KAAI,aAA6C,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
;
|
|
2
|
+
export var CompilerErrorSeverity;
|
|
3
|
+
(function (CompilerErrorSeverity) {
|
|
4
|
+
CompilerErrorSeverity[CompilerErrorSeverity["Info"] = 0] = "Info";
|
|
5
|
+
CompilerErrorSeverity[CompilerErrorSeverity["Hint"] = 1048576] = "Hint";
|
|
6
|
+
CompilerErrorSeverity[CompilerErrorSeverity["Warn"] = 2097152] = "Warn";
|
|
7
|
+
CompilerErrorSeverity[CompilerErrorSeverity["Error"] = 3145728] = "Error";
|
|
8
|
+
CompilerErrorSeverity[CompilerErrorSeverity["Fatal"] = 4194304] = "Fatal";
|
|
9
|
+
CompilerErrorSeverity[CompilerErrorSeverity["Severity_Mask"] = 15728640] = "Severity_Mask";
|
|
10
|
+
CompilerErrorSeverity[CompilerErrorSeverity["Error_Mask"] = 1048575] = "Error_Mask";
|
|
11
|
+
})(CompilerErrorSeverity || (CompilerErrorSeverity = {}));
|
|
12
|
+
;
|
|
13
|
+
export var CompilerErrorNamespace;
|
|
14
|
+
(function (CompilerErrorNamespace) {
|
|
15
|
+
/**
|
|
16
|
+
* kmc-keyboard errors between 0x0000…0x0FFF
|
|
17
|
+
*/
|
|
18
|
+
CompilerErrorNamespace[CompilerErrorNamespace["KeyboardCompiler"] = 0] = "KeyboardCompiler";
|
|
19
|
+
/**
|
|
20
|
+
* common/web/types errors between 0x1000…0x1FFF
|
|
21
|
+
*/
|
|
22
|
+
CompilerErrorNamespace[CompilerErrorNamespace["CommonTypes"] = 4096] = "CommonTypes";
|
|
23
|
+
})(CompilerErrorNamespace || (CompilerErrorNamespace = {}));
|
|
24
|
+
;
|
|
25
|
+
;
|
|
26
|
+
/**
|
|
27
|
+
* Convenience function for constructing CompilerEvents
|
|
28
|
+
* @param code
|
|
29
|
+
* @param message
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
export const CompilerMessageSpec = (code, message) => { return { code, message }; };
|
|
33
|
+
//# sourceMappingURL=compiler-interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler-interfaces.js","sourceRoot":"","sources":["../../../src/util/compiler-interfaces.ts"],"names":[],"mappings":"AAMC,CAAC;AAEF,MAAM,CAAN,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,iEAAwB,CAAA;IACxB,uEAAwB,CAAA;IACxB,uEAAwB,CAAA;IACxB,yEAAwB,CAAA;IACxB,yEAAwB,CAAA;IAExB,0FAAwB,CAAA;IACxB,mFAAwB,CAAA;AAC1B,CAAC,EATW,qBAAqB,KAArB,qBAAqB,QAShC;AAAA,CAAC;AAEF,MAAM,CAAN,IAAY,sBASX;AATD,WAAY,sBAAsB;IAChC;;OAEG;IACH,2FAAyB,CAAA;IACzB;;OAEG;IACH,oFAAoB,CAAA;AACtB,CAAC,EATW,sBAAsB,KAAtB,sBAAsB,QASjC;AAAA,CAAC;AAiBD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAE,OAAe,EAAkB,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 class UnescapeError extends Error {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Unescapes a string according to UTS#18§1.1, see <https://www.unicode.org/reports/tr18/#Hex_notation>
|
|
13
|
+
* @param s escaped string
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function unescapeString(s: string): string;
|
|
17
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util/util.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CASnD;AAQD,qBAAa,aAAc,SAAQ,KAAK;CACvC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAmChD"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 function boxXmlArray(o, x) {
|
|
9
|
+
if (typeof o == 'object' && !Array.isArray(o[x])) {
|
|
10
|
+
if (o[x] === null || o[x] === undefined) {
|
|
11
|
+
o[x] = [];
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
o[x] = [o[x]];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
// TODO-LDML: #7569 the below regex works, but captures more than it should
|
|
19
|
+
// (it would include \u{fffffffffffffffff } which
|
|
20
|
+
// is overlong and has a space at the end.) The second regex does not work yet.
|
|
21
|
+
const MATCH_HEX_ESCAPE = /\\u{([0-9a-fA-F ]{1,})}/g;
|
|
22
|
+
// const MATCH_HEX_ESCAPE = /\\u{((?:(?:[0-9a-fA-F]{1,5})|(?:10[0-9a-fA-F]{4})(?: (?!}))?)+)}/g;
|
|
23
|
+
export class UnescapeError extends Error {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Unescapes a string according to UTS#18§1.1, see <https://www.unicode.org/reports/tr18/#Hex_notation>
|
|
27
|
+
* @param s escaped string
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
export function unescapeString(s) {
|
|
31
|
+
if (!s) {
|
|
32
|
+
return s;
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
/**
|
|
36
|
+
* Unescape one codepoint
|
|
37
|
+
* @param hex one codepoint in hex, such as '0127'
|
|
38
|
+
* @returns the unescaped codepoint
|
|
39
|
+
*/
|
|
40
|
+
function unescapeOne(hex) {
|
|
41
|
+
const codepoint = Number.parseInt(hex, 16);
|
|
42
|
+
return String.fromCodePoint(codepoint);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* process one regex match
|
|
46
|
+
* @param str ignored
|
|
47
|
+
* @param matched the entire match such as '0127' or '22 22'
|
|
48
|
+
* @returns the unescaped match
|
|
49
|
+
*/
|
|
50
|
+
function processMatch(str, matched) {
|
|
51
|
+
const codepoints = matched.split(' ');
|
|
52
|
+
const unescaped = codepoints.map(unescapeOne);
|
|
53
|
+
return unescaped.join('');
|
|
54
|
+
}
|
|
55
|
+
s = s.replaceAll(MATCH_HEX_ESCAPE, processMatch);
|
|
56
|
+
}
|
|
57
|
+
catch (e) {
|
|
58
|
+
if (e instanceof RangeError) {
|
|
59
|
+
throw new UnescapeError(`Out of range while unescaping '${s}': ${e.message}`, { cause: e });
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
throw e;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return s;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/util/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