@polyglot-bundles/kn-lang 0.3.0 → 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/kn-lang
2
+
3
+ ## Installation
4
+
5
+ ```sh
6
+ npm install @polyglot-bundles/kn-lang
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ ```ts
12
+ import * as characters from "@polyglot-bundles/kn-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
+ ~43 consonants, 24 vowels
25
+
26
+ ## License
27
+
28
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyglot-bundles/kn-lang",
3
- "version": "0.3.0",
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": [
@@ -18,8 +22,9 @@
18
22
  },
19
23
  "devDependencies": {
20
24
  "vite-plugin-dts": "^4.5.4",
21
- "@polyglot-bundles/content-shared": "0.5.4",
22
- "@polyglot-bundles/lang-tooling": "0.0.0"
25
+ "vitest": "^4.1.4",
26
+ "@polyglot-bundles/lang-tooling": "0.0.0",
27
+ "@polyglot-bundles/content-shared": "0.5.6"
23
28
  },
24
29
  "repository": {
25
30
  "type": "git",
@@ -27,6 +32,8 @@
27
32
  "directory": "packages/kn/lang"
28
33
  },
29
34
  "scripts": {
30
- "build": "vite build"
35
+ "build": "vite build",
36
+ "test": "vitest run",
37
+ "typecheck": "tsc --noEmit"
31
38
  }
32
39
  }
@@ -1,44 +0,0 @@
1
- /**
2
- * Kannada Character Types
3
- *
4
- * Type definitions for Kannada characters (Kannada script).
5
- * Kannada has 49 characters: 13 vowels, 36 consonants.
6
- */
7
- /**
8
- * Base character info
9
- */
10
- type KannadaCharacterBaseInfo = {
11
- char: string;
12
- id: string;
13
- display?: string;
14
- audio?: string;
15
- notes?: string;
16
- };
17
- /**
18
- * Kannada Vowels (Swaralu)
19
- */
20
- export type KannadaVowelsInfo = {
21
- charType: "vowel";
22
- ipa: string;
23
- name: string;
24
- length?: "short" | "long";
25
- } & KannadaCharacterBaseInfo;
26
- /**
27
- * Kannada Consonants (Vyanjanalu)
28
- */
29
- export type KannadaConsonantsInfo = {
30
- charType: "consonant";
31
- ipa: string;
32
- name: string;
33
- articulation: "stop" | "fricative" | "nasal" | "approximant" | "lateral" | "trill";
34
- voicing: "voiced" | "voiceless" | "nasal" | "lateral" | "approximant" | "trill" | "fricative";
35
- place: "velar" | "palatal" | "retroflex" | "dental" | "labial" | "glottal";
36
- } & KannadaCharacterBaseInfo;
37
- export type KannadaCharacter = KannadaVowelsInfo | KannadaConsonantsInfo;
38
- export declare function isVowel(character: KannadaCharacter): character is KannadaVowelsInfo;
39
- export declare function isConsonant(character: KannadaCharacter): character is KannadaConsonantsInfo;
40
- export declare const kannadaVowels: KannadaVowelsInfo[];
41
- export declare const kannadaConsonants: KannadaConsonantsInfo[];
42
- export declare const kannadaAllCharacters: (KannadaVowelsInfo | KannadaConsonantsInfo)[];
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,wBAAwB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CA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
8
- var n = [
9
- {
10
- char: "ಅ",
11
- id: "a",
12
- charType: "vowel",
13
- ipa: "ə",
14
- name: "ಅ",
15
- length: "short"
16
- },
17
- {
18
- char: "ಆ",
19
- id: "aa",
20
- charType: "vowel",
21
- ipa: "aː",
22
- name: "ಆ",
23
- length: "long"
24
- },
25
- {
26
- char: "ಇ",
27
- id: "i",
28
- charType: "vowel",
29
- ipa: "ɪ",
30
- name: "ಇ",
31
- length: "short"
32
- },
33
- {
34
- char: "ಈ",
35
- id: "ii",
36
- charType: "vowel",
37
- ipa: "iː",
38
- name: "ಈ",
39
- length: "long"
40
- },
41
- {
42
- char: "ಉ",
43
- id: "u",
44
- charType: "vowel",
45
- ipa: "ʊ",
46
- name: "ಉ",
47
- length: "short"
48
- },
49
- {
50
- char: "ಊ",
51
- id: "uu",
52
- charType: "vowel",
53
- ipa: "uː",
54
- name: "ಊ",
55
- length: "long"
56
- },
57
- {
58
- char: "ಋ",
59
- id: "r",
60
- charType: "vowel",
61
- ipa: "rɪ",
62
- name: "ಋ",
63
- length: "short"
64
- },
65
- {
66
- char: "ಎ",
67
- id: "e",
68
- charType: "vowel",
69
- ipa: "ɛ",
70
- name: "ಎ",
71
- length: "short"
72
- },
73
- {
74
- char: "ಏ",
75
- id: "ee",
76
- charType: "vowel",
77
- ipa: "eː",
78
- name: "ಏ",
79
- length: "long"
80
- },
81
- {
82
- char: "ಐ",
83
- id: "ai",
84
- charType: "vowel",
85
- ipa: "ai",
86
- name: "ಐ",
87
- length: "short"
88
- },
89
- {
90
- char: "ಒ",
91
- id: "o",
92
- charType: "vowel",
93
- ipa: "ɔ",
94
- name: "ಒ",
95
- length: "short"
96
- },
97
- {
98
- char: "ಓ",
99
- id: "oo",
100
- charType: "vowel",
101
- ipa: "oː",
102
- name: "ಓ",
103
- length: "long"
104
- },
105
- {
106
- char: "ಔ",
107
- id: "au",
108
- charType: "vowel",
109
- ipa: "au",
110
- name: "ಔ",
111
- length: "short"
112
- },
113
- {
114
- char: "ಾ",
115
- id: "aa_matra",
116
- charType: "vowel",
117
- ipa: "aː",
118
- name: "ಾ (aa matra)",
119
- length: "long"
120
- },
121
- {
122
- char: "ಿ",
123
- id: "i_matra",
124
- charType: "vowel",
125
- ipa: "i",
126
- name: "ಿ (i matra)",
127
- length: "short"
128
- },
129
- {
130
- char: "ೀ",
131
- id: "ii_matra",
132
- charType: "vowel",
133
- ipa: "iː",
134
- name: "ೀ (ii matra)",
135
- length: "long"
136
- },
137
- {
138
- char: "ು",
139
- id: "u_matra",
140
- charType: "vowel",
141
- ipa: "u",
142
- name: "ು (u matra)",
143
- length: "short"
144
- },
145
- {
146
- char: "ೂ",
147
- id: "uu_matra",
148
- charType: "vowel",
149
- ipa: "uː",
150
- name: "ೂ (uu matra)",
151
- length: "long"
152
- },
153
- {
154
- char: "ೃ",
155
- id: "r_matra",
156
- charType: "vowel",
157
- ipa: "rɪ",
158
- name: "ೃ (r matra)",
159
- length: "short"
160
- },
161
- {
162
- char: "ೇ",
163
- id: "ee_matra",
164
- charType: "vowel",
165
- ipa: "eː",
166
- name: "ೇ (ee matra)",
167
- length: "long"
168
- },
169
- {
170
- char: "ೈ",
171
- id: "ai_matra",
172
- charType: "vowel",
173
- ipa: "ai",
174
- name: "ೈ (ai matra)",
175
- length: "short"
176
- },
177
- {
178
- char: "ೋ",
179
- id: "oo_matra",
180
- charType: "vowel",
181
- ipa: "oː",
182
- name: "ೋ (oo matra)",
183
- length: "long"
184
- },
185
- {
186
- char: "ೌ",
187
- id: "au_matra",
188
- charType: "vowel",
189
- ipa: "au",
190
- name: "ೌ (au matra)",
191
- length: "short"
192
- }
193
- ], r = [
194
- {
195
- char: "ಕ",
196
- id: "ka",
197
- charType: "consonant",
198
- ipa: "k",
199
- name: "ಕ",
200
- voicing: "voiceless",
201
- articulation: "stop",
202
- place: "velar"
203
- },
204
- {
205
- char: "ಖ",
206
- id: "kha",
207
- charType: "consonant",
208
- ipa: "kʰ",
209
- name: "ಖ",
210
- voicing: "voiceless",
211
- articulation: "stop",
212
- place: "velar"
213
- },
214
- {
215
- char: "ಗ",
216
- id: "ga",
217
- charType: "consonant",
218
- ipa: "ɡ",
219
- name: "ಗ",
220
- voicing: "voiced",
221
- articulation: "stop",
222
- place: "velar"
223
- },
224
- {
225
- char: "ಘ",
226
- id: "gha",
227
- charType: "consonant",
228
- ipa: "ɡʰ",
229
- name: "ಘ",
230
- voicing: "voiced",
231
- articulation: "stop",
232
- place: "velar"
233
- },
234
- {
235
- char: "ಙ",
236
- id: "nga",
237
- charType: "consonant",
238
- ipa: "ŋ",
239
- name: "ಙ",
240
- voicing: "nasal",
241
- articulation: "nasal",
242
- place: "velar"
243
- },
244
- {
245
- char: "ಚ",
246
- id: "cha",
247
- charType: "consonant",
248
- ipa: "tʃ",
249
- name: "ಚ",
250
- voicing: "voiceless",
251
- articulation: "stop",
252
- place: "palatal"
253
- },
254
- {
255
- char: "ಛ",
256
- id: "chha",
257
- charType: "consonant",
258
- ipa: "tʃʰ",
259
- name: "ಛ",
260
- voicing: "voiceless",
261
- articulation: "stop",
262
- place: "palatal"
263
- },
264
- {
265
- char: "ಜ",
266
- id: "ja",
267
- charType: "consonant",
268
- ipa: "dʒ",
269
- name: "ಜ",
270
- voicing: "voiced",
271
- articulation: "stop",
272
- place: "palatal"
273
- },
274
- {
275
- char: "ಝ",
276
- id: "jha",
277
- charType: "consonant",
278
- ipa: "dʒʰ",
279
- name: "ಝ",
280
- voicing: "voiced",
281
- articulation: "stop",
282
- place: "palatal"
283
- },
284
- {
285
- char: "ಞ",
286
- id: "nya",
287
- charType: "consonant",
288
- ipa: "ɲ",
289
- name: "ಞ",
290
- voicing: "nasal",
291
- articulation: "nasal",
292
- place: "palatal"
293
- },
294
- {
295
- char: "ಟ",
296
- id: "tta",
297
- charType: "consonant",
298
- ipa: "ʈ",
299
- name: "ಟ",
300
- voicing: "voiceless",
301
- articulation: "stop",
302
- place: "retroflex"
303
- },
304
- {
305
- char: "ಠ",
306
- id: "ttha",
307
- charType: "consonant",
308
- ipa: "ʈʰ",
309
- name: "ಠ",
310
- voicing: "voiceless",
311
- articulation: "stop",
312
- place: "retroflex"
313
- },
314
- {
315
- char: "ಡ",
316
- id: "dda",
317
- charType: "consonant",
318
- ipa: "ɖ",
319
- name: "ಡ",
320
- voicing: "voiced",
321
- articulation: "stop",
322
- place: "retroflex"
323
- },
324
- {
325
- char: "ಢ",
326
- id: "ddha",
327
- charType: "consonant",
328
- ipa: "ɖʰ",
329
- name: "ಢ",
330
- voicing: "voiced",
331
- articulation: "stop",
332
- place: "retroflex"
333
- },
334
- {
335
- char: "ಣ",
336
- id: "nna",
337
- charType: "consonant",
338
- ipa: "ɳ",
339
- name: "ಣ",
340
- voicing: "nasal",
341
- articulation: "nasal",
342
- place: "retroflex"
343
- },
344
- {
345
- char: "ತ",
346
- id: "ta",
347
- charType: "consonant",
348
- ipa: "t",
349
- name: "ತ",
350
- voicing: "voiceless",
351
- articulation: "stop",
352
- place: "dental"
353
- },
354
- {
355
- char: "ಥ",
356
- id: "tha",
357
- charType: "consonant",
358
- ipa: "tʰ",
359
- name: "ಥ",
360
- voicing: "voiceless",
361
- articulation: "stop",
362
- place: "dental"
363
- },
364
- {
365
- char: "ದ",
366
- id: "da",
367
- charType: "consonant",
368
- ipa: "d",
369
- name: "ದ",
370
- voicing: "voiced",
371
- articulation: "stop",
372
- place: "dental"
373
- },
374
- {
375
- char: "ಧ",
376
- id: "dha",
377
- charType: "consonant",
378
- ipa: "dʰ",
379
- name: "ಧ",
380
- voicing: "voiced",
381
- articulation: "stop",
382
- place: "dental"
383
- },
384
- {
385
- char: "ನ",
386
- id: "na",
387
- charType: "consonant",
388
- ipa: "n",
389
- name: "ನ",
390
- voicing: "nasal",
391
- articulation: "nasal",
392
- place: "dental"
393
- },
394
- {
395
- char: "ಪ",
396
- id: "pa",
397
- charType: "consonant",
398
- ipa: "p",
399
- name: "ಪ",
400
- voicing: "voiceless",
401
- articulation: "stop",
402
- place: "labial"
403
- },
404
- {
405
- char: "ಫ",
406
- id: "pha",
407
- charType: "consonant",
408
- ipa: "pʰ",
409
- name: "ಫ",
410
- voicing: "voiceless",
411
- articulation: "stop",
412
- place: "labial"
413
- },
414
- {
415
- char: "ಬ",
416
- id: "ba",
417
- charType: "consonant",
418
- ipa: "b",
419
- name: "ಬ",
420
- voicing: "voiced",
421
- articulation: "stop",
422
- place: "labial"
423
- },
424
- {
425
- char: "ಭ",
426
- id: "bha",
427
- charType: "consonant",
428
- ipa: "bʰ",
429
- name: "ಭ",
430
- voicing: "voiced",
431
- articulation: "stop",
432
- place: "labial"
433
- },
434
- {
435
- char: "ಮ",
436
- id: "ma",
437
- charType: "consonant",
438
- ipa: "m",
439
- name: "ಮ",
440
- voicing: "nasal",
441
- articulation: "nasal",
442
- place: "labial"
443
- },
444
- {
445
- char: "ಯ",
446
- id: "ya",
447
- charType: "consonant",
448
- ipa: "j",
449
- name: "ಯ",
450
- voicing: "approximant",
451
- articulation: "approximant",
452
- place: "palatal"
453
- },
454
- {
455
- char: "ರ",
456
- id: "ra",
457
- charType: "consonant",
458
- ipa: "r",
459
- name: "ರ",
460
- voicing: "trill",
461
- articulation: "trill",
462
- place: "retroflex"
463
- },
464
- {
465
- char: "ಲ",
466
- id: "la",
467
- charType: "consonant",
468
- ipa: "l",
469
- name: "ಲ",
470
- voicing: "lateral",
471
- articulation: "lateral",
472
- place: "dental"
473
- },
474
- {
475
- char: "ವ",
476
- id: "va",
477
- charType: "consonant",
478
- ipa: "ʋ",
479
- name: "ವ",
480
- voicing: "approximant",
481
- articulation: "approximant",
482
- place: "labial"
483
- },
484
- {
485
- char: "ಷ",
486
- id: "ssa",
487
- charType: "consonant",
488
- ipa: "ʂ",
489
- name: "ಷ",
490
- voicing: "voiceless",
491
- articulation: "fricative",
492
- place: "retroflex"
493
- },
494
- {
495
- char: "ಸ",
496
- id: "sa",
497
- charType: "consonant",
498
- ipa: "s",
499
- name: "ಸ",
500
- voicing: "voiceless",
501
- articulation: "fricative",
502
- place: "dental"
503
- },
504
- {
505
- char: "ಹ",
506
- id: "ha",
507
- charType: "consonant",
508
- ipa: "h",
509
- name: "ಹ",
510
- voicing: "voiceless",
511
- articulation: "fricative",
512
- place: "glottal"
513
- },
514
- {
515
- char: "ಳ",
516
- id: "lla",
517
- charType: "consonant",
518
- ipa: "ɭ",
519
- name: "ಳ",
520
- voicing: "lateral",
521
- articulation: "lateral",
522
- place: "retroflex"
523
- },
524
- {
525
- char: "ಕ್ಷ",
526
- id: "ksha",
527
- charType: "consonant",
528
- ipa: "kʃ",
529
- name: "ಕ್ಷ",
530
- voicing: "voiceless",
531
- articulation: "stop",
532
- place: "velar"
533
- },
534
- {
535
- char: "ಜ್ಞ",
536
- id: "gya",
537
- charType: "consonant",
538
- ipa: "dʒɲ",
539
- name: "ಜ್ಞ",
540
- voicing: "voiced",
541
- articulation: "stop",
542
- place: "palatal"
543
- },
544
- {
545
- char: "ಶ",
546
- id: "sha_palatal",
547
- charType: "consonant",
548
- ipa: "ʃ",
549
- name: "ಶ",
550
- voicing: "voiceless",
551
- articulation: "fricative",
552
- place: "palatal"
553
- },
554
- {
555
- char: "ಱ",
556
- id: "rra",
557
- charType: "consonant",
558
- ipa: "ɽ",
559
- name: "ಱ",
560
- voicing: "trill",
561
- articulation: "trill",
562
- place: "retroflex"
563
- },
564
- {
565
- char: "ಙ್ಕ",
566
- id: "nga_ka",
567
- charType: "consonant",
568
- ipa: "ŋk",
569
- name: "ಙ್ಕ",
570
- voicing: "nasal",
571
- articulation: "stop",
572
- place: "velar"
573
- },
574
- {
575
- char: "ಫ಼",
576
- id: "fa",
577
- charType: "consonant",
578
- ipa: "f",
579
- name: "ಫ಼",
580
- voicing: "voiceless",
581
- articulation: "fricative",
582
- place: "labial"
583
- },
584
- {
585
- char: "ಜ಼",
586
- id: "za",
587
- charType: "consonant",
588
- ipa: "z",
589
- name: "ಜ಼",
590
- voicing: "voiced",
591
- articulation: "fricative",
592
- place: "palatal"
593
- },
594
- {
595
- char: "ಖ಼",
596
- id: "kha_farsi",
597
- charType: "consonant",
598
- ipa: "x",
599
- name: "ಖ಼",
600
- voicing: "voiceless",
601
- articulation: "fricative",
602
- place: "velar"
603
- },
604
- {
605
- char: "ಗ಼",
606
- id: "gha_farsi",
607
- charType: "consonant",
608
- ipa: "ɣ",
609
- name: "ಗ಼",
610
- voicing: "voiced",
611
- articulation: "fricative",
612
- place: "velar"
613
- }
614
- ], i = [...n, ...r];
615
- //#endregion
616
- export { t as isConsonant, e as isVowel, i as kannadaAllCharacters, r as kannadaConsonants, n as kannadaVowels };
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { kannadaVowels, kannadaConsonants, kannadaAllCharacters, type KannadaVowelsInfo, type KannadaConsonantsInfo, type KannadaCharacter, 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,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,OAAO,EACP,WAAW,GACZ,MAAM,iBAAiB,CAAC"}
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- import { isConsonant as e, isVowel as t, kannadaAllCharacters as n, kannadaConsonants as r, kannadaVowels as i } from "./characters.js";
2
- export { e as isConsonant, t as isVowel, n as kannadaAllCharacters, r as kannadaConsonants, i as kannadaVowels };