@polyglot-bundles/mg-lang 0.1.5 → 0.3.1

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/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @polyglot-bundles/mg-lang
2
+
3
+ ## Installation
4
+
5
+ ```sh
6
+ npm install @polyglot-bundles/mg-lang
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ ```ts
12
+ import * as characters from "@polyglot-bundles/mg-lang/characters";
13
+ ```
14
+
15
+ ## Available exports
16
+
17
+ | Export | Contents |
18
+ |--------|---------|
19
+ | `.` | Re-exports everything |
20
+ | `./characters` | Character inventory (arrays / keyed objects with `char` field) |
21
+
22
+ ## Data
23
+
24
+ ~25 consonants, 19 vowels
25
+
26
+ ## License
27
+
28
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyglot-bundles/mg-lang",
3
- "version": "0.1.5",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -8,6 +8,10 @@
8
8
  ".": {
9
9
  "import": "./dist/index.js",
10
10
  "types": "./dist/index.d.ts"
11
+ },
12
+ "./characters": {
13
+ "types": "./dist/characters.d.ts",
14
+ "import": "./dist/characters.js"
11
15
  }
12
16
  },
13
17
  "files": [
@@ -17,8 +21,10 @@
17
21
  "access": "public"
18
22
  },
19
23
  "devDependencies": {
20
- "@polyglot-bundles/lang-tooling": "0.0.0",
21
- "@polyglot-bundles/content-shared": "0.5.3"
24
+ "vite-plugin-dts": "^4.5.4",
25
+ "vitest": "^4.1.4",
26
+ "@polyglot-bundles/content-shared": "0.5.6",
27
+ "@polyglot-bundles/lang-tooling": "0.0.0"
22
28
  },
23
29
  "repository": {
24
30
  "type": "git",
@@ -26,6 +32,8 @@
26
32
  "directory": "packages/mg/lang"
27
33
  },
28
34
  "scripts": {
29
- "build": "vite build"
35
+ "build": "vite build",
36
+ "test": "vitest run",
37
+ "typecheck": "tsc --noEmit"
30
38
  }
31
39
  }
@@ -1,396 +0,0 @@
1
- //#region src/characters.ts
2
- function e(e) {
3
- return e.charType === "vowel";
4
- }
5
- function t(e) {
6
- return e.charType === "consonant";
7
- }
8
- var n = [
9
- {
10
- char: "a",
11
- id: "a",
12
- charType: "vowel",
13
- ipa: "a",
14
- name: "A",
15
- length: "short"
16
- },
17
- {
18
- char: "e",
19
- id: "e",
20
- charType: "vowel",
21
- ipa: "ɛ",
22
- name: "E",
23
- length: "short"
24
- },
25
- {
26
- char: "i",
27
- id: "i",
28
- charType: "vowel",
29
- ipa: "i",
30
- name: "I",
31
- length: "short"
32
- },
33
- {
34
- char: "o",
35
- id: "o",
36
- charType: "vowel",
37
- ipa: "ɔ",
38
- name: "O",
39
- length: "short"
40
- },
41
- {
42
- char: "u",
43
- id: "u",
44
- charType: "vowel",
45
- ipa: "u",
46
- name: "U",
47
- length: "short"
48
- },
49
- {
50
- char: "â",
51
- id: "a_circumflex",
52
- charType: "vowel",
53
- ipa: "a",
54
- name: "Â",
55
- length: "short"
56
- },
57
- {
58
- char: "ê",
59
- id: "e_circumflex",
60
- charType: "vowel",
61
- ipa: "ɛ",
62
- name: "Ê",
63
- length: "short"
64
- },
65
- {
66
- char: "î",
67
- id: "i_circumflex",
68
- charType: "vowel",
69
- ipa: "i",
70
- name: "Î",
71
- length: "short"
72
- },
73
- {
74
- char: "ô",
75
- id: "o_circumflex",
76
- charType: "vowel",
77
- ipa: "ɔ",
78
- name: "Ô",
79
- length: "short"
80
- },
81
- {
82
- char: "û",
83
- id: "u_circumflex",
84
- charType: "vowel",
85
- ipa: "u",
86
- name: "Û",
87
- length: "short"
88
- },
89
- {
90
- char: "ai",
91
- id: "ai",
92
- charType: "vowel",
93
- ipa: "ai",
94
- name: "AI",
95
- length: "short"
96
- },
97
- {
98
- char: "ao",
99
- id: "ao",
100
- charType: "vowel",
101
- ipa: "aʊ",
102
- name: "AO",
103
- length: "short"
104
- },
105
- {
106
- char: "au",
107
- id: "au",
108
- charType: "vowel",
109
- ipa: "au",
110
- name: "AU",
111
- length: "short"
112
- },
113
- {
114
- char: "ei",
115
- id: "ei",
116
- charType: "vowel",
117
- ipa: "ɛi",
118
- name: "EI",
119
- length: "short"
120
- },
121
- {
122
- char: "io",
123
- id: "io",
124
- charType: "vowel",
125
- ipa: "io",
126
- name: "IO",
127
- length: "short"
128
- },
129
- {
130
- char: "iu",
131
- id: "iu",
132
- charType: "vowel",
133
- ipa: "iu",
134
- name: "IU",
135
- length: "short"
136
- },
137
- {
138
- char: "oe",
139
- id: "oe",
140
- charType: "vowel",
141
- ipa: "uɛ",
142
- name: "OE",
143
- length: "short"
144
- },
145
- {
146
- char: "ou",
147
- id: "ou",
148
- charType: "vowel",
149
- ipa: "ʊu",
150
- name: "OU",
151
- length: "short"
152
- }
153
- ], r = [
154
- {
155
- char: "b",
156
- id: "b",
157
- charType: "consonant",
158
- ipa: "b",
159
- name: "B",
160
- voicing: "voiced",
161
- articulation: "stop",
162
- place: "labial"
163
- },
164
- {
165
- char: "p",
166
- id: "p",
167
- charType: "consonant",
168
- ipa: "p",
169
- name: "P",
170
- voicing: "voiceless",
171
- articulation: "stop",
172
- place: "labial"
173
- },
174
- {
175
- char: "m",
176
- id: "m",
177
- charType: "consonant",
178
- ipa: "m",
179
- name: "M",
180
- voicing: "nasal",
181
- articulation: "nasal",
182
- place: "labial"
183
- },
184
- {
185
- char: "v",
186
- id: "v",
187
- charType: "consonant",
188
- ipa: "v",
189
- name: "V",
190
- voicing: "voiced",
191
- articulation: "fricative",
192
- place: "labial"
193
- },
194
- {
195
- char: "f",
196
- id: "f",
197
- charType: "consonant",
198
- ipa: "f",
199
- name: "F",
200
- voicing: "voiceless",
201
- articulation: "fricative",
202
- place: "labial"
203
- },
204
- {
205
- char: "t",
206
- id: "t",
207
- charType: "consonant",
208
- ipa: "t",
209
- name: "T",
210
- voicing: "voiceless",
211
- articulation: "stop",
212
- place: "dental"
213
- },
214
- {
215
- char: "d",
216
- id: "d_foreign",
217
- charType: "consonant",
218
- ipa: "d",
219
- name: "D (foreign)",
220
- voicing: "voiced",
221
- articulation: "stop",
222
- place: "dental"
223
- },
224
- {
225
- char: "s",
226
- id: "s",
227
- charType: "consonant",
228
- ipa: "s",
229
- name: "S",
230
- voicing: "voiceless",
231
- articulation: "fricative",
232
- place: "alveolar"
233
- },
234
- {
235
- char: "z",
236
- id: "z_foreign",
237
- charType: "consonant",
238
- ipa: "z",
239
- name: "Z (foreign)",
240
- voicing: "voiced",
241
- articulation: "fricative",
242
- place: "alveolar"
243
- },
244
- {
245
- char: "n",
246
- id: "n",
247
- charType: "consonant",
248
- ipa: "n",
249
- name: "N",
250
- voicing: "nasal",
251
- articulation: "nasal",
252
- place: "alveolar"
253
- },
254
- {
255
- char: "l",
256
- id: "l",
257
- charType: "consonant",
258
- ipa: "l",
259
- name: "L",
260
- voicing: "lateral",
261
- articulation: "lateral",
262
- place: "alveolar"
263
- },
264
- {
265
- char: "r",
266
- id: "r",
267
- charType: "consonant",
268
- ipa: "r",
269
- name: "R",
270
- voicing: "trill",
271
- articulation: "trill",
272
- place: "alveolar"
273
- },
274
- {
275
- char: "y",
276
- id: "y",
277
- charType: "consonant",
278
- ipa: "j",
279
- name: "Y",
280
- voicing: "voiced",
281
- articulation: "approximant",
282
- place: "palatal"
283
- },
284
- {
285
- char: "j",
286
- id: "j_foreign",
287
- charType: "consonant",
288
- ipa: "dʒ",
289
- name: "J (foreign)",
290
- voicing: "voiced",
291
- articulation: "affricate",
292
- place: "palatal"
293
- },
294
- {
295
- char: "k",
296
- id: "k",
297
- charType: "consonant",
298
- ipa: "k",
299
- name: "K",
300
- voicing: "voiceless",
301
- articulation: "stop",
302
- place: "velar"
303
- },
304
- {
305
- char: "g",
306
- id: "g_foreign",
307
- charType: "consonant",
308
- ipa: "ɡ",
309
- name: "G (foreign)",
310
- voicing: "voiced",
311
- articulation: "stop",
312
- place: "velar"
313
- },
314
- {
315
- char: "h",
316
- id: "h",
317
- charType: "consonant",
318
- ipa: "h",
319
- name: "H",
320
- voicing: "voiceless",
321
- articulation: "fricative",
322
- place: "glottal"
323
- },
324
- {
325
- char: "g",
326
- id: "g_velar",
327
- charType: "consonant",
328
- ipa: "ɡ",
329
- name: "G (velar)",
330
- voicing: "voiced",
331
- articulation: "stop",
332
- place: "velar"
333
- },
334
- {
335
- char: "q",
336
- id: "q_foreign",
337
- charType: "consonant",
338
- ipa: "k",
339
- name: "Q (foreign)",
340
- voicing: "voiceless",
341
- articulation: "stop",
342
- place: "velar"
343
- },
344
- {
345
- char: "c",
346
- id: "c_foreign",
347
- charType: "consonant",
348
- ipa: "k",
349
- name: "C (foreign)",
350
- voicing: "voiceless",
351
- articulation: "stop",
352
- place: "velar"
353
- },
354
- {
355
- char: "x",
356
- id: "x_foreign",
357
- charType: "consonant",
358
- ipa: "ks",
359
- name: "X (foreign)",
360
- voicing: "voiceless",
361
- articulation: "stop",
362
- place: "velar"
363
- },
364
- {
365
- char: "w",
366
- id: "w_foreign",
367
- charType: "consonant",
368
- ipa: "w",
369
- name: "W (foreign)",
370
- voicing: "voiced",
371
- articulation: "approximant",
372
- place: "labial"
373
- },
374
- {
375
- char: "d",
376
- id: "d_apical",
377
- charType: "consonant",
378
- ipa: "ɽ",
379
- name: "D (apical)",
380
- voicing: "voiced",
381
- articulation: "stop",
382
- place: "retroflex"
383
- },
384
- {
385
- char: "z",
386
- id: "z_apical",
387
- charType: "consonant",
388
- ipa: "z",
389
- name: "Z (apical)",
390
- voicing: "voiced",
391
- articulation: "fricative",
392
- place: "alveolar"
393
- }
394
- ], i = [...n, ...r];
395
- //#endregion
396
- export { t as isConsonant, e as isVowel, i as malagasyAllCharacters, r as malagasyConsonants, n as malagasyVowels };
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- import { isConsonant as e, isVowel as t, malagasyAllCharacters as n, malagasyConsonants as r, malagasyVowels as i } from "./characters.js";
2
- export { e as isConsonant, t as isVowel, n as malagasyAllCharacters, r as malagasyConsonants, i as malagasyVowels };
@@ -1,44 +0,0 @@
1
- /**
2
- * Malagasy Character Types
3
- *
4
- * Type definitions for Malagasy characters (Latin script).
5
- * Malagasy has 21 letters: 5 vowels, 16 consonants.
6
- */
7
- /**
8
- * Base character info
9
- */
10
- type MalagasyCharacterBaseInfo = {
11
- char: string;
12
- id: string;
13
- display?: string;
14
- audio?: string;
15
- notes?: string;
16
- };
17
- /**
18
- * Malagasy Vowels
19
- */
20
- export type MalagasyVowelsInfo = {
21
- charType: "vowel";
22
- ipa: string;
23
- name: string;
24
- length?: "short" | "long";
25
- } & MalagasyCharacterBaseInfo;
26
- /**
27
- * Malagasy Consonants
28
- */
29
- export type MalagasyConsonantsInfo = {
30
- charType: "consonant";
31
- ipa: string;
32
- name: string;
33
- articulation: "stop" | "fricative" | "nasal" | "approximant" | "lateral" | "trill" | "affricate";
34
- voicing: "voiced" | "voiceless" | "nasal" | "lateral" | "approximant" | "trill" | "affricate" | "fricative";
35
- place: "velar" | "palatal" | "alveolar" | "dental" | "labial" | "glottal" | "retroflex" | "alveolar";
36
- } & MalagasyCharacterBaseInfo;
37
- export type MalagasyCharacter = MalagasyVowelsInfo | MalagasyConsonantsInfo;
38
- export declare function isVowel(character: MalagasyCharacter): character is MalagasyVowelsInfo;
39
- export declare function isConsonant(character: MalagasyCharacter): character is MalagasyConsonantsInfo;
40
- export declare const malagasyVowels: MalagasyVowelsInfo[];
41
- export declare const malagasyConsonants: MalagasyConsonantsInfo[];
42
- export declare const malagasyAllCharacters: (MalagasyVowelsInfo | MalagasyConsonantsInfo)[];
43
- export {};
44
- //# sourceMappingURL=characters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"characters.d.ts","sourceRoot":"","sources":["../../../../../src/characters.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,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{ malagasyVowels, malagasyConsonants, malagasyAllCharacters, type MalagasyVowelsInfo, type MalagasyConsonantsInfo, type MalagasyCharacter, isVowel, isConsonant, } from './characters.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,OAAO,EACP,WAAW,GACZ,MAAM,iBAAiB,CAAC"}