@polyglot-bundles/kn-lang 0.1.0
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/dist/characters.d.ts +43 -0
- package/dist/characters.js +93 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -0
- package/package.json +36 -0
|
@@ -0,0 +1,43 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
function c(a) {
|
|
2
|
+
return a.charType === "vowel";
|
|
3
|
+
}
|
|
4
|
+
function e(a) {
|
|
5
|
+
return a.charType === "consonant";
|
|
6
|
+
}
|
|
7
|
+
const i = [
|
|
8
|
+
// Short vowels
|
|
9
|
+
{ char: "ಅ", id: "a", charType: "vowel", ipa: "ə", name: "ಅ", length: "short" },
|
|
10
|
+
{ char: "ಆ", id: "aa", charType: "vowel", ipa: "aː", name: "ಆ", length: "long" },
|
|
11
|
+
{ char: "ಇ", id: "i", charType: "vowel", ipa: "ɪ", name: "ಇ", length: "short" },
|
|
12
|
+
{ char: "ಈ", id: "ii", charType: "vowel", ipa: "iː", name: "ಈ", length: "long" },
|
|
13
|
+
{ char: "ಉ", id: "u", charType: "vowel", ipa: "ʊ", name: "ಉ", length: "short" },
|
|
14
|
+
{ char: "ಊ", id: "uu", charType: "vowel", ipa: "uː", name: "ಊ", length: "long" },
|
|
15
|
+
{ char: "ಋ", id: "r", charType: "vowel", ipa: "rɪ", name: "ಋ", length: "short" },
|
|
16
|
+
{ char: "ಎ", id: "e", charType: "vowel", ipa: "ɛ", name: "ಎ", length: "short" },
|
|
17
|
+
{ char: "ಏ", id: "ee", charType: "vowel", ipa: "eː", name: "ಏ", length: "long" },
|
|
18
|
+
{ char: "ಐ", id: "ai", charType: "vowel", ipa: "ai", name: "ಐ", length: "short" },
|
|
19
|
+
{ char: "ಒ", id: "o", charType: "vowel", ipa: "ɔ", name: "ಒ", length: "short" },
|
|
20
|
+
{ char: "ಓ", id: "oo", charType: "vowel", ipa: "oː", name: "ಓ", length: "long" },
|
|
21
|
+
{ char: "ಔ", id: "au", charType: "vowel", ipa: "au", name: "ಔ", length: "short" },
|
|
22
|
+
// Vowel signs (matras)
|
|
23
|
+
{ char: "ಾ", id: "aa_matra", charType: "vowel", ipa: "aː", name: "ಾ (aa matra)", length: "long" },
|
|
24
|
+
{ char: "ಿ", id: "i_matra", charType: "vowel", ipa: "i", name: "ಿ (i matra)", length: "short" },
|
|
25
|
+
{ char: "ೀ", id: "ii_matra", charType: "vowel", ipa: "iː", name: "ೀ (ii matra)", length: "long" },
|
|
26
|
+
{ char: "ು", id: "u_matra", charType: "vowel", ipa: "u", name: "ು (u matra)", length: "short" },
|
|
27
|
+
{ char: "ೂ", id: "uu_matra", charType: "vowel", ipa: "uː", name: "ೂ (uu matra)", length: "long" },
|
|
28
|
+
{ char: "ೃ", id: "r_matra", charType: "vowel", ipa: "rɪ", name: "ೃ (r matra)", length: "short" },
|
|
29
|
+
{ char: "ೇ", id: "ee_matra", charType: "vowel", ipa: "eː", name: "ೇ (ee matra)", length: "long" },
|
|
30
|
+
{ char: "ೈ", id: "ai_matra", charType: "vowel", ipa: "ai", name: "ೈ (ai matra)", length: "short" },
|
|
31
|
+
{ char: "ೋ", id: "oo_matra", charType: "vowel", ipa: "oː", name: "ೋ (oo matra)", length: "long" },
|
|
32
|
+
{ char: "ೌ", id: "au_matra", charType: "vowel", ipa: "au", name: "ೌ (au matra)", length: "short" }
|
|
33
|
+
], n = [
|
|
34
|
+
// Velar consonants (ಕಣ)
|
|
35
|
+
{ char: "ಕ", id: "ka", charType: "consonant", ipa: "k", name: "ಕ", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
36
|
+
{ char: "ಖ", id: "kha", charType: "consonant", ipa: "kʰ", name: "ಖ", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
37
|
+
{ char: "ಗ", id: "ga", charType: "consonant", ipa: "ɡ", name: "ಗ", voicing: "voiced", articulation: "stop", place: "velar" },
|
|
38
|
+
{ char: "ಘ", id: "gha", charType: "consonant", ipa: "ɡʰ", name: "ಘ", voicing: "voiced", articulation: "stop", place: "velar" },
|
|
39
|
+
{ char: "ಙ", id: "nga", charType: "consonant", ipa: "ŋ", name: "ಙ", voicing: "nasal", articulation: "nasal", place: "velar" },
|
|
40
|
+
// Palatal consonants (ಚಣ)
|
|
41
|
+
{ char: "ಚ", id: "cha", charType: "consonant", ipa: "tʃ", name: "ಚ", voicing: "voiceless", articulation: "stop", place: "palatal" },
|
|
42
|
+
{ char: "ಛ", id: "chha", charType: "consonant", ipa: "tʃʰ", name: "ಛ", voicing: "voiceless", articulation: "stop", place: "palatal" },
|
|
43
|
+
{ char: "ಜ", id: "ja", charType: "consonant", ipa: "dʒ", name: "ಜ", voicing: "voiced", articulation: "stop", place: "palatal" },
|
|
44
|
+
{ char: "ಝ", id: "jha", charType: "consonant", ipa: "dʒʰ", name: "ಝ", voicing: "voiced", articulation: "stop", place: "palatal" },
|
|
45
|
+
{ char: "ಞ", id: "nya", charType: "consonant", ipa: "ɲ", name: "ಞ", voicing: "nasal", articulation: "nasal", place: "palatal" },
|
|
46
|
+
// Retroflex consonants (ಟಣ)
|
|
47
|
+
{ char: "ಟ", id: "tta", charType: "consonant", ipa: "ʈ", name: "ಟ", voicing: "voiceless", articulation: "stop", place: "retroflex" },
|
|
48
|
+
{ char: "ಠ", id: "ttha", charType: "consonant", ipa: "ʈʰ", name: "ಠ", voicing: "voiceless", articulation: "stop", place: "retroflex" },
|
|
49
|
+
{ char: "ಡ", id: "dda", charType: "consonant", ipa: "ɖ", name: "ಡ", voicing: "voiced", articulation: "stop", place: "retroflex" },
|
|
50
|
+
{ char: "ಢ", id: "ddha", charType: "consonant", ipa: "ɖʰ", name: "ಢ", voicing: "voiced", articulation: "stop", place: "retroflex" },
|
|
51
|
+
{ char: "ಣ", id: "nna", charType: "consonant", ipa: "ɳ", name: "ಣ", voicing: "nasal", articulation: "nasal", place: "retroflex" },
|
|
52
|
+
// Dental consonants (ತಣ)
|
|
53
|
+
{ char: "ತ", id: "ta", charType: "consonant", ipa: "t", name: "ತ", voicing: "voiceless", articulation: "stop", place: "dental" },
|
|
54
|
+
{ char: "ಥ", id: "tha", charType: "consonant", ipa: "tʰ", name: "ಥ", voicing: "voiceless", articulation: "stop", place: "dental" },
|
|
55
|
+
{ char: "ದ", id: "da", charType: "consonant", ipa: "d", name: "ದ", voicing: "voiced", articulation: "stop", place: "dental" },
|
|
56
|
+
{ char: "ಧ", id: "dha", charType: "consonant", ipa: "dʰ", name: "ಧ", voicing: "voiced", articulation: "stop", place: "dental" },
|
|
57
|
+
{ char: "ನ", id: "na", charType: "consonant", ipa: "n", name: "ನ", voicing: "nasal", articulation: "nasal", place: "dental" },
|
|
58
|
+
// Labial consonants (ಪಣ)
|
|
59
|
+
{ char: "ಪ", id: "pa", charType: "consonant", ipa: "p", name: "ಪ", voicing: "voiceless", articulation: "stop", place: "labial" },
|
|
60
|
+
{ char: "ಫ", id: "pha", charType: "consonant", ipa: "pʰ", name: "ಫ", voicing: "voiceless", articulation: "stop", place: "labial" },
|
|
61
|
+
{ char: "ಬ", id: "ba", charType: "consonant", ipa: "b", name: "ಬ", voicing: "voiced", articulation: "stop", place: "labial" },
|
|
62
|
+
{ char: "ಭ", id: "bha", charType: "consonant", ipa: "bʰ", name: "ಭ", voicing: "voiced", articulation: "stop", place: "labial" },
|
|
63
|
+
{ char: "ಮ", id: "ma", charType: "consonant", ipa: "m", name: "ಮ", voicing: "nasal", articulation: "nasal", place: "labial" },
|
|
64
|
+
// Other consonants
|
|
65
|
+
{ char: "ಯ", id: "ya", charType: "consonant", ipa: "j", name: "ಯ", voicing: "approximant", articulation: "approximant", place: "palatal" },
|
|
66
|
+
{ char: "ರ", id: "ra", charType: "consonant", ipa: "r", name: "ರ", voicing: "trill", articulation: "trill", place: "retroflex" },
|
|
67
|
+
{ char: "ಲ", id: "la", charType: "consonant", ipa: "l", name: "ಲ", voicing: "lateral", articulation: "lateral", place: "dental" },
|
|
68
|
+
{ char: "ವ", id: "va", charType: "consonant", ipa: "ʋ", name: "ವ", voicing: "approximant", articulation: "approximant", place: "labial" },
|
|
69
|
+
{ char: "ಷ", id: "ssa", charType: "consonant", ipa: "ʂ", name: "ಷ", voicing: "voiceless", articulation: "fricative", place: "retroflex" },
|
|
70
|
+
{ char: "ಸ", id: "sa", charType: "consonant", ipa: "s", name: "ಸ", voicing: "voiceless", articulation: "fricative", place: "dental" },
|
|
71
|
+
{ char: "ಹ", id: "ha", charType: "consonant", ipa: "h", name: "ಹ", voicing: "voiceless", articulation: "fricative", place: "glottal" },
|
|
72
|
+
{ char: "ಳ", id: "lla", charType: "consonant", ipa: "ɭ", name: "ಳ", voicing: "lateral", articulation: "lateral", place: "retroflex" },
|
|
73
|
+
{ char: "ಕ್ಷ", id: "ksha", charType: "consonant", ipa: "kʃ", name: "ಕ್ಷ", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
74
|
+
{ char: "ಜ್ಞ", id: "gya", charType: "consonant", ipa: "dʒɲ", name: "ಜ್ಞ", voicing: "voiced", articulation: "stop", place: "palatal" },
|
|
75
|
+
{ char: "ಶ", id: "sha_palatal", charType: "consonant", ipa: "ʃ", name: "ಶ", voicing: "voiceless", articulation: "fricative", place: "palatal" },
|
|
76
|
+
{ char: "ಱ", id: "rra", charType: "consonant", ipa: "ɽ", name: "ಱ", voicing: "trill", articulation: "trill", place: "retroflex" },
|
|
77
|
+
{ char: "ಙ್ಕ", id: "nga_ka", charType: "consonant", ipa: "ŋk", name: "ಙ್ಕ", voicing: "nasal", articulation: "stop", place: "velar" },
|
|
78
|
+
// Modern additions (for loanwords)
|
|
79
|
+
{ char: "ಫ಼", id: "fa", charType: "consonant", ipa: "f", name: "ಫ಼", voicing: "voiceless", articulation: "fricative", place: "labial" },
|
|
80
|
+
{ char: "ಜ಼", id: "za", charType: "consonant", ipa: "z", name: "ಜ಼", voicing: "voiced", articulation: "fricative", place: "palatal" },
|
|
81
|
+
{ char: "ಖ಼", id: "kha_farsi", charType: "consonant", ipa: "x", name: "ಖ಼", voicing: "voiceless", articulation: "fricative", place: "velar" },
|
|
82
|
+
{ char: "ಗ಼", id: "gha_farsi", charType: "consonant", ipa: "ɣ", name: "ಗ಼", voicing: "voiced", articulation: "fricative", place: "velar" }
|
|
83
|
+
], o = [
|
|
84
|
+
...i,
|
|
85
|
+
...n
|
|
86
|
+
];
|
|
87
|
+
export {
|
|
88
|
+
e as isConsonant,
|
|
89
|
+
c as isVowel,
|
|
90
|
+
o as kannadaAllCharacters,
|
|
91
|
+
n as kannadaConsonants,
|
|
92
|
+
i as kannadaVowels
|
|
93
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { kannadaVowels, kannadaConsonants, kannadaAllCharacters, type KannadaVowelsInfo, type KannadaConsonantsInfo, type KannadaCharacter, isVowel, isConsonant, } from './characters.js';
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@polyglot-bundles/kn-lang",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@polyglot-bundles/content-shared": "0.3.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"vite": "^5.4.0",
|
|
24
|
+
"vite-plugin-dts": "^4.0.0",
|
|
25
|
+
"@polyglot-bundles/lang-tooling": "1.0.0"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/fustilio/polyglot-bundles.git",
|
|
30
|
+
"directory": "packages/kn/lang"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "vite build",
|
|
34
|
+
"clean": "rm -rf dist"
|
|
35
|
+
}
|
|
36
|
+
}
|