@polyglot-bundles/ne-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.
- 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
|
+
* Nepali Character Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for Nepali characters (Devanagari script).
|
|
5
|
+
* Nepali has 47 characters: 11 vowels, 36 consonants.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Base character info
|
|
9
|
+
*/
|
|
10
|
+
type NepaliCharacterBaseInfo = {
|
|
11
|
+
char: string;
|
|
12
|
+
id: string;
|
|
13
|
+
display?: string;
|
|
14
|
+
audio?: string;
|
|
15
|
+
notes?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Nepali Vowels (Swaraku)
|
|
19
|
+
*/
|
|
20
|
+
export type NepaliVowelsInfo = {
|
|
21
|
+
charType: "vowel";
|
|
22
|
+
ipa: string;
|
|
23
|
+
name: string;
|
|
24
|
+
length?: "short" | "long";
|
|
25
|
+
} & NepaliCharacterBaseInfo;
|
|
26
|
+
/**
|
|
27
|
+
* Nepali Consonants (Vyanjanaku)
|
|
28
|
+
*/
|
|
29
|
+
export type NepaliConsonantsInfo = {
|
|
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
|
+
} & NepaliCharacterBaseInfo;
|
|
37
|
+
export type NepaliCharacter = NepaliVowelsInfo | NepaliConsonantsInfo;
|
|
38
|
+
export declare function isVowel(character: NepaliCharacter): character is NepaliVowelsInfo;
|
|
39
|
+
export declare function isConsonant(character: NepaliCharacter): character is NepaliConsonantsInfo;
|
|
40
|
+
export declare const nepaliVowels: NepaliVowelsInfo[];
|
|
41
|
+
export declare const nepaliConsonants: NepaliConsonantsInfo[];
|
|
42
|
+
export declare const nepaliAllCharacters: (NepaliVowelsInfo | NepaliConsonantsInfo)[];
|
|
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: "i", charType: "vowel", ipa: "ɪ", name: "इ", length: "short" },
|
|
11
|
+
{ char: "उ", id: "u", charType: "vowel", ipa: "ʊ", name: "उ", length: "short" },
|
|
12
|
+
// Long vowels
|
|
13
|
+
{ char: "आ", id: "aa", charType: "vowel", ipa: "aː", name: "आ", length: "long" },
|
|
14
|
+
{ char: "ई", id: "ii", charType: "vowel", ipa: "iː", name: "ई", length: "long" },
|
|
15
|
+
{ char: "ऊ", id: "uu", charType: "vowel", ipa: "uː", name: "ऊ", length: "long" },
|
|
16
|
+
{ char: "ए", id: "e", charType: "vowel", ipa: "ɛ", name: "ए", length: "short" },
|
|
17
|
+
{ char: "ओ", id: "o", charType: "vowel", ipa: "ɔ", name: "ओ", length: "short" },
|
|
18
|
+
{ char: "औ", id: "au", charType: "vowel", ipa: "ɔʊ", name: "औ", length: "short" },
|
|
19
|
+
{ char: "ऐ", id: "ai", charType: "vowel", ipa: "ɛɪ", name: "ऐ", length: "short" },
|
|
20
|
+
// Vowel signs (matras)
|
|
21
|
+
{ char: "ा", id: "aa_matra", charType: "vowel", ipa: "aː", name: "ा (aa matra)", length: "long" },
|
|
22
|
+
{ char: "ि", id: "i_matra", charType: "vowel", ipa: "i", name: "ि (i matra)", length: "short" },
|
|
23
|
+
{ char: "ी", id: "ii_matra", charType: "vowel", ipa: "iː", name: "ी (ii matra)", length: "long" },
|
|
24
|
+
{ char: "ु", id: "u_matra", charType: "vowel", ipa: "u", name: "ु (u matra)", length: "short" },
|
|
25
|
+
{ char: "ू", id: "uu_matra", charType: "vowel", ipa: "uː", name: "ू (uu matra)", length: "long" },
|
|
26
|
+
{ char: "े", id: "e_matra", charType: "vowel", ipa: "ɛ", name: "े (e matra)", length: "short" },
|
|
27
|
+
{ char: "ो", id: "o_matra", charType: "vowel", ipa: "ɔ", name: "ो (o matra)", length: "short" },
|
|
28
|
+
{ char: "ौ", id: "au_matra", charType: "vowel", ipa: "ɔʊ", name: "ौ (au matra)", length: "short" },
|
|
29
|
+
{ char: "ै", id: "ai_matra", charType: "vowel", ipa: "ɛɪ", name: "ै (ai matra)", length: "short" }
|
|
30
|
+
], n = [
|
|
31
|
+
// Velar consonants (कण)
|
|
32
|
+
{ char: "क", id: "ka", charType: "consonant", ipa: "k", name: "क", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
33
|
+
{ char: "ख", id: "kha", charType: "consonant", ipa: "kʰ", name: "ख", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
34
|
+
{ char: "ग", id: "ga", charType: "consonant", ipa: "ɡ", name: "ग", voicing: "voiced", articulation: "stop", place: "velar" },
|
|
35
|
+
{ char: "घ", id: "gha", charType: "consonant", ipa: "ɡʰ", name: "घ", voicing: "voiced", articulation: "stop", place: "velar" },
|
|
36
|
+
{ char: "ङ", id: "nga", charType: "consonant", ipa: "ŋ", name: "ङ", voicing: "nasal", articulation: "nasal", place: "velar" },
|
|
37
|
+
// Palatal consonants (चण)
|
|
38
|
+
{ char: "च", id: "cha", charType: "consonant", ipa: "tʃ", name: "च", voicing: "voiceless", articulation: "stop", place: "palatal" },
|
|
39
|
+
{ char: "छ", id: "chha", charType: "consonant", ipa: "tʃʰ", name: "छ", voicing: "voiceless", articulation: "stop", place: "palatal" },
|
|
40
|
+
{ char: "ज", id: "ja", charType: "consonant", ipa: "dʒ", name: "ज", voicing: "voiced", articulation: "stop", place: "palatal" },
|
|
41
|
+
{ char: "झ", id: "jha", charType: "consonant", ipa: "dʒʰ", name: "झ", voicing: "voiced", articulation: "stop", place: "palatal" },
|
|
42
|
+
{ char: "ञ", id: "nya", charType: "consonant", ipa: "ɲ", name: "ञ", voicing: "nasal", articulation: "nasal", place: "palatal" },
|
|
43
|
+
// Retroflex consonants (टण)
|
|
44
|
+
{ char: "ट", id: "tta", charType: "consonant", ipa: "ʈ", name: "ट", voicing: "voiceless", articulation: "stop", place: "retroflex" },
|
|
45
|
+
{ char: "ठ", id: "ttha", charType: "consonant", ipa: "ʈʰ", name: "ठ", voicing: "voiceless", articulation: "stop", place: "retroflex" },
|
|
46
|
+
{ char: "ड", id: "dda", charType: "consonant", ipa: "ɖ", name: "ड", voicing: "voiced", articulation: "stop", place: "retroflex" },
|
|
47
|
+
{ char: "ढ", id: "ddha", charType: "consonant", ipa: "ɖʰ", name: "ढ", voicing: "voiced", articulation: "stop", place: "retroflex" },
|
|
48
|
+
{ char: "ण", id: "nna", charType: "consonant", ipa: "ɳ", name: "ण", voicing: "nasal", articulation: "nasal", place: "retroflex" },
|
|
49
|
+
// Dental consonants (तण)
|
|
50
|
+
{ char: "त", id: "ta", charType: "consonant", ipa: "t", name: "त", voicing: "voiceless", articulation: "stop", place: "dental" },
|
|
51
|
+
{ char: "थ", id: "tha", charType: "consonant", ipa: "tʰ", name: "थ", voicing: "voiceless", articulation: "stop", place: "dental" },
|
|
52
|
+
{ char: "द", id: "da", charType: "consonant", ipa: "d", name: "द", voicing: "voiced", articulation: "stop", place: "dental" },
|
|
53
|
+
{ char: "ध", id: "dha", charType: "consonant", ipa: "dʰ", name: "ध", voicing: "voiced", articulation: "stop", place: "dental" },
|
|
54
|
+
{ char: "न", id: "na", charType: "consonant", ipa: "n", name: "न", voicing: "nasal", articulation: "nasal", place: "dental" },
|
|
55
|
+
// Labial consonants (पण)
|
|
56
|
+
{ char: "प", id: "pa", charType: "consonant", ipa: "p", name: "प", voicing: "voiceless", articulation: "stop", place: "labial" },
|
|
57
|
+
{ char: "फ", id: "pha", charType: "consonant", ipa: "pʰ", name: "फ", voicing: "voiceless", articulation: "stop", place: "labial" },
|
|
58
|
+
{ char: "ब", id: "ba", charType: "consonant", ipa: "b", name: "ब", voicing: "voiced", articulation: "stop", place: "labial" },
|
|
59
|
+
{ char: "भ", id: "bha", charType: "consonant", ipa: "bʰ", name: "भ", voicing: "voiced", articulation: "stop", place: "labial" },
|
|
60
|
+
{ char: "म", id: "ma", charType: "consonant", ipa: "m", name: "म", voicing: "nasal", articulation: "nasal", place: "labial" },
|
|
61
|
+
// Other consonants
|
|
62
|
+
{ char: "य", id: "ya", charType: "consonant", ipa: "j", name: "य", voicing: "approximant", articulation: "approximant", place: "palatal" },
|
|
63
|
+
{ char: "र", id: "ra", charType: "consonant", ipa: "r", name: "र", voicing: "trill", articulation: "trill", place: "retroflex" },
|
|
64
|
+
{ char: "ल", id: "la", charType: "consonant", ipa: "l", name: "ल", voicing: "lateral", articulation: "lateral", place: "dental" },
|
|
65
|
+
{ char: "व", id: "va", charType: "consonant", ipa: "ʋ", name: "व", voicing: "approximant", articulation: "approximant", place: "labial" },
|
|
66
|
+
{ char: "श", id: "sha", charType: "consonant", ipa: "ʃ", name: "श", voicing: "voiceless", articulation: "fricative", place: "palatal" },
|
|
67
|
+
{ char: "ष", id: "ssa", charType: "consonant", ipa: "ʂ", name: "ष", voicing: "voiceless", articulation: "fricative", place: "retroflex" },
|
|
68
|
+
{ char: "स", id: "sa", charType: "consonant", ipa: "s", name: "स", voicing: "voiceless", articulation: "fricative", place: "dental" },
|
|
69
|
+
{ char: "ह", id: "ha", charType: "consonant", ipa: "h", name: "ह", voicing: "voiceless", articulation: "fricative", place: "glottal" },
|
|
70
|
+
{ char: "ळ", id: "lla", charType: "consonant", ipa: "ɭ", name: "ळ", voicing: "lateral", articulation: "lateral", place: "retroflex" },
|
|
71
|
+
{ char: "क्ष", id: "ksha", charType: "consonant", ipa: "kʃ", name: "क्ष", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
72
|
+
{ char: "ज्ञ", id: "gya", charType: "consonant", ipa: "dʒɲ", name: "ज्ञ", voicing: "voiced", articulation: "stop", place: "palatal" },
|
|
73
|
+
{ char: "ऱ", id: "rra", charType: "consonant", ipa: "ɽ", name: "ऱ", voicing: "trill", articulation: "trill", place: "retroflex" },
|
|
74
|
+
{ char: "ऴ", id: "lla_palatal", charType: "consonant", ipa: "ʎ", name: "ऴ", voicing: "lateral", articulation: "lateral", place: "palatal" },
|
|
75
|
+
// Modern additions (for loanwords)
|
|
76
|
+
{ char: "फ़", id: "fa", charType: "consonant", ipa: "f", name: "फ़", voicing: "voiceless", articulation: "fricative", place: "labial" },
|
|
77
|
+
{ char: "ज़", id: "za", charType: "consonant", ipa: "z", name: "ज़", voicing: "voiced", articulation: "fricative", place: "palatal" },
|
|
78
|
+
{ char: "ख़", id: "kha_farsi", charType: "consonant", ipa: "x", name: "ख़", voicing: "voiceless", articulation: "fricative", place: "velar" },
|
|
79
|
+
{ char: "ग़", id: "gha_farsi", charType: "consonant", ipa: "ɣ", name: "ग़", voicing: "voiced", articulation: "fricative", place: "velar" },
|
|
80
|
+
{ char: "ड़", id: "dda_dot", charType: "consonant", ipa: "ɽ", name: "ड़", voicing: "voiced", articulation: "stop", place: "retroflex" },
|
|
81
|
+
{ char: "ढ़", id: "ddha_dot", charType: "consonant", ipa: "ɽʰ", name: "ढ़", voicing: "voiced", articulation: "stop", place: "retroflex" },
|
|
82
|
+
{ char: "ङ्क", id: "nga_ka", charType: "consonant", ipa: "ŋk", name: "ङ्क", voicing: "nasal", articulation: "stop", place: "velar" }
|
|
83
|
+
], o = [
|
|
84
|
+
...i,
|
|
85
|
+
...n
|
|
86
|
+
];
|
|
87
|
+
export {
|
|
88
|
+
e as isConsonant,
|
|
89
|
+
c as isVowel,
|
|
90
|
+
o as nepaliAllCharacters,
|
|
91
|
+
n as nepaliConsonants,
|
|
92
|
+
i as nepaliVowels
|
|
93
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { nepaliVowels, nepaliConsonants, nepaliAllCharacters, type NepaliVowelsInfo, type NepaliConsonantsInfo, type NepaliCharacter, isVowel, isConsonant, } from './characters.js';
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@polyglot-bundles/ne-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/ne/lang"
|
|
35
|
+
}
|
|
36
|
+
}
|