@polyglot-bundles/kn-lang 1.1.2

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.
@@ -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
+ };
@@ -0,0 +1 @@
1
+ export { kannadaVowels, kannadaConsonants, kannadaAllCharacters, type KannadaVowelsInfo, type KannadaConsonantsInfo, type KannadaCharacter, isVowel, isConsonant, } from './characters.js';
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { isConsonant as o, isVowel as s, kannadaAllCharacters as e, kannadaConsonants as l, kannadaVowels as r } from "./characters.js";
2
+ export {
3
+ o as isConsonant,
4
+ s as isVowel,
5
+ e as kannadaAllCharacters,
6
+ l as kannadaConsonants,
7
+ r as kannadaVowels
8
+ };
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@polyglot-bundles/kn-lang",
3
+ "version": "1.1.2",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "vite build",
9
+ "clean": "rm -rf dist"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "dependencies": {
24
+ "@polyglot-bundles/content-shared": "workspace:*"
25
+ },
26
+ "devDependencies": {
27
+ "@polyglot-bundles/lang-tooling": "workspace:*",
28
+ "vite": "catalog:",
29
+ "vite-plugin-dts": "catalog:"
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/fustilio/polyglot-bundles.git",
34
+ "directory": "packages/kn/lang"
35
+ }
36
+ }