@polyglot-bundles/dv-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 +44 -0
- package/dist/characters.js +92 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -0
- package/package.json +36 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Divehi (Maldivian) Character Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for Divehi characters (Thaana script).
|
|
5
|
+
* Divehi has 44 letters: 27 vowels (including diacritics), 17 consonants.
|
|
6
|
+
* Thaana is an abugida where consonants have an inherent 'a' vowel.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Base character info
|
|
10
|
+
*/
|
|
11
|
+
type DivehiCharacterBaseInfo = {
|
|
12
|
+
char: string;
|
|
13
|
+
id: string;
|
|
14
|
+
display?: string;
|
|
15
|
+
audio?: string;
|
|
16
|
+
notes?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Divehi Vowels (Hukaru)
|
|
20
|
+
*/
|
|
21
|
+
export type DivehiVowelsInfo = {
|
|
22
|
+
charType: "vowel";
|
|
23
|
+
ipa: string;
|
|
24
|
+
name: string;
|
|
25
|
+
length?: "short" | "long";
|
|
26
|
+
} & DivehiCharacterBaseInfo;
|
|
27
|
+
/**
|
|
28
|
+
* Divehi Consonants (Hakuru)
|
|
29
|
+
*/
|
|
30
|
+
export type DivehiConsonantsInfo = {
|
|
31
|
+
charType: "consonant";
|
|
32
|
+
ipa: string;
|
|
33
|
+
name: string;
|
|
34
|
+
articulation: "stop" | "fricative" | "nasal" | "approximant" | "lateral" | "trill" | "affricate";
|
|
35
|
+
voicing: "voiced" | "voiceless" | "nasal" | "lateral" | "approximant" | "trill" | "affricate" | "fricative";
|
|
36
|
+
place: "velar" | "palatal" | "alveolar" | "dental" | "labial" | "glottal" | "uvular" | "alveolar";
|
|
37
|
+
} & DivehiCharacterBaseInfo;
|
|
38
|
+
export type DivehiCharacter = DivehiVowelsInfo | DivehiConsonantsInfo;
|
|
39
|
+
export declare function isVowel(character: DivehiCharacter): character is DivehiVowelsInfo;
|
|
40
|
+
export declare function isConsonant(character: DivehiCharacter): character is DivehiConsonantsInfo;
|
|
41
|
+
export declare const divehiConsonants: DivehiConsonantsInfo[];
|
|
42
|
+
export declare const divehiVowels: DivehiVowelsInfo[];
|
|
43
|
+
export declare const divehiAllCharacters: (DivehiVowelsInfo | DivehiConsonantsInfo)[];
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
function n(a) {
|
|
2
|
+
return a.charType === "vowel";
|
|
3
|
+
}
|
|
4
|
+
function e(a) {
|
|
5
|
+
return a.charType === "consonant";
|
|
6
|
+
}
|
|
7
|
+
const i = [
|
|
8
|
+
// First letter (independent consonants)
|
|
9
|
+
{ char: "ހ", id: "ha", charType: "consonant", ipa: "h", name: "ހ", voicing: "voiceless", articulation: "fricative", place: "glottal" },
|
|
10
|
+
{ char: "ށ", id: "hha", charType: "consonant", ipa: "x", name: "ށ", voicing: "voiceless", articulation: "fricative", place: "velar" },
|
|
11
|
+
{ char: "ނ", id: "na", charType: "consonant", ipa: "n", name: "ނ", voicing: "nasal", articulation: "nasal", place: "dental" },
|
|
12
|
+
{ char: "ރ", id: "ra", charType: "consonant", ipa: "r", name: "ރ", voicing: "trill", articulation: "trill", place: "alveolar" },
|
|
13
|
+
{ char: "ކ", id: "la", charType: "consonant", ipa: "l", name: "ކ", voicing: "lateral", articulation: "lateral", place: "alveolar" },
|
|
14
|
+
{ char: "އ", id: "a", charType: "consonant", ipa: "ʔ", name: "އ", voicing: "voiceless", articulation: "stop", place: "glottal" },
|
|
15
|
+
// Middle letters
|
|
16
|
+
{ char: "ބ", id: "ba", charType: "consonant", ipa: "b", name: "ބ", voicing: "voiced", articulation: "stop", place: "labial" },
|
|
17
|
+
{ char: "ޅ", id: "pa", charType: "consonant", ipa: "p", name: "ޅ", voicing: "voiceless", articulation: "stop", place: "labial" },
|
|
18
|
+
{ char: "ތ", id: "qa", charType: "consonant", ipa: "q", name: "ތ", voicing: "voiceless", articulation: "stop", place: "uvular" },
|
|
19
|
+
{ char: "ގ", id: "fa", charType: "consonant", ipa: "f", name: "ގ", voicing: "voiceless", articulation: "fricative", place: "labial" },
|
|
20
|
+
{ char: "ވ", id: "va", charType: "consonant", ipa: "v", name: "ވ", voicing: "voiced", articulation: "fricative", place: "labial" },
|
|
21
|
+
{ char: "ލ", id: "ma", charType: "consonant", ipa: "m", name: "ލ", voicing: "nasal", articulation: "nasal", place: "labial" },
|
|
22
|
+
{ char: "ޑ", id: "ya", charType: "consonant", ipa: "j", name: "ޑ", voicing: "voiced", articulation: "approximant", place: "palatal" },
|
|
23
|
+
{ char: "ޓ", id: "ha", charType: "consonant", ipa: "h", name: "ޓ", voicing: "voiceless", articulation: "fricative", place: "glottal" },
|
|
24
|
+
{ char: "ޔ", id: "hha", charType: "consonant", ipa: "x", name: "ޔ", voicing: "voiceless", articulation: "fricative", place: "velar" },
|
|
25
|
+
{ char: "ޕ", id: "kha", charType: "consonant", ipa: "x", name: "ޕ", voicing: "voiceless", articulation: "fricative", place: "velar" },
|
|
26
|
+
// Final letters
|
|
27
|
+
{ char: "ޗ", id: "ga", charType: "consonant", ipa: "ɡ", name: "ޗ", voicing: "voiced", articulation: "stop", place: "velar" },
|
|
28
|
+
{ char: "ޘ", id: "gha", charType: "consonant", ipa: "ɣ", name: "ޘ", voicing: "voiced", articulation: "fricative", place: "velar" },
|
|
29
|
+
{ char: "ޙ", id: "ng", charType: "consonant", ipa: "ŋ", name: "ޙ", voicing: "nasal", articulation: "nasal", place: "velar" },
|
|
30
|
+
{ char: "ޚ", id: "ca", charType: "consonant", ipa: "tʃ", name: "ޚ", voicing: "voiceless", articulation: "affricate", place: "palatal" },
|
|
31
|
+
{ char: "ޛ", id: "cha", charType: "consonant", ipa: "tʃʰ", name: "ޛ", voicing: "voiceless", articulation: "affricate", place: "palatal" },
|
|
32
|
+
{ char: "ޜ", id: "ja", charType: "consonant", ipa: "dʒ", name: "ޜ", voicing: "voiced", articulation: "affricate", place: "palatal" },
|
|
33
|
+
{ char: "ޝ", id: "jha", charType: "consonant", ipa: "dʒʰ", name: "ޝ", voicing: "voiced", articulation: "affricate", place: "palatal" },
|
|
34
|
+
{ char: "ޞ", id: "nya", charType: "consonant", ipa: "ɲ", name: "ޞ", voicing: "nasal", articulation: "nasal", place: "palatal" },
|
|
35
|
+
{ char: "ޟ", id: "ta", charType: "consonant", ipa: "t", name: "ޟ", voicing: "voiceless", articulation: "stop", place: "dental" },
|
|
36
|
+
{ char: "ޠ", id: "tha", charType: "consonant", ipa: "tʰ", name: "ޠ", voicing: "voiceless", articulation: "stop", place: "dental" },
|
|
37
|
+
{ char: "ޡ", id: "da", charType: "consonant", ipa: "d", name: "ޡ", voicing: "voiced", articulation: "stop", place: "dental" },
|
|
38
|
+
{ char: "ޢ", id: "dha", charType: "consonant", ipa: "dʰ", name: "ޢ", voicing: "voiced", articulation: "stop", place: "dental" },
|
|
39
|
+
{ char: "ޣ", id: "na", charType: "consonant", ipa: "n", name: "ޣ", voicing: "nasal", articulation: "nasal", place: "alveolar" },
|
|
40
|
+
{ char: "ޤ", id: "sa", charType: "consonant", ipa: "s", name: "ޤ", voicing: "voiceless", articulation: "fricative", place: "alveolar" },
|
|
41
|
+
{ char: "ޥ", id: "sha", charType: "consonant", ipa: "ʃ", name: "ޥ", voicing: "voiceless", articulation: "fricative", place: "palatal" },
|
|
42
|
+
{ char: "ަ", id: "za", charType: "consonant", ipa: "z", name: "ަ", voicing: "voiced", articulation: "fricative", place: "alveolar" },
|
|
43
|
+
{ char: "ާ", id: "za", charType: "consonant", ipa: "z", name: "ާ", voicing: "voiced", articulation: "fricative", place: "alveolar" },
|
|
44
|
+
{ char: "ި", id: "ha", charType: "consonant", ipa: "h", name: "ި", voicing: "voiceless", articulation: "fricative", place: "glottal" },
|
|
45
|
+
{ char: "ީ", id: "ha", charType: "consonant", ipa: "h", name: "ީ", voicing: "voiceless", articulation: "fricative", place: "glottal" },
|
|
46
|
+
{ char: "ު", id: "fa", charType: "consonant", ipa: "f", name: "ު", voicing: "voiceless", articulation: "fricative", place: "labial" },
|
|
47
|
+
{ char: "ޫ", id: "va", charType: "consonant", ipa: "v", name: "ޫ", voicing: "voiced", articulation: "fricative", place: "labial" },
|
|
48
|
+
{ char: "ެ", id: "ba", charType: "consonant", ipa: "b", name: "ެ", voicing: "voiced", articulation: "stop", place: "labial" },
|
|
49
|
+
{ char: "ޭ", id: "bb", charType: "consonant", ipa: "b", name: "ޭ", voicing: "voiced", articulation: "stop", place: "labial" },
|
|
50
|
+
{ char: "ޮ", id: "pa", charType: "consonant", ipa: "p", name: "ޮ", voicing: "voiceless", articulation: "stop", place: "labial" },
|
|
51
|
+
{ char: "ޯ", id: "pb", charType: "consonant", ipa: "p", name: "ޯ", voicing: "voiceless", articulation: "stop", place: "labial" },
|
|
52
|
+
{ char: "ް", id: "short_vowel", charType: "consonant", ipa: "", name: "ް (short vowel)", voicing: "voiceless", articulation: "stop", place: "glottal" }
|
|
53
|
+
], c = [
|
|
54
|
+
// Short vowels (independent)
|
|
55
|
+
{ char: "ަ", id: "a", charType: "vowel", ipa: "a", name: "ަ (a)", length: "short" },
|
|
56
|
+
{ char: "ާ", id: "aa", charType: "vowel", ipa: "aː", name: "ާ (aa)", length: "long" },
|
|
57
|
+
{ char: "ި", id: "i", charType: "vowel", ipa: "ɪ", name: "ި (i)", length: "short" },
|
|
58
|
+
{ char: "ީ", id: "ii", charType: "vowel", ipa: "iː", name: "ީ (ii)", length: "long" },
|
|
59
|
+
{ char: "ު", id: "u", charType: "vowel", ipa: "ʊ", name: "ު (u)", length: "short" },
|
|
60
|
+
{ char: "ޫ", id: "uu", charType: "vowel", ipa: "uː", name: "ޫ (uu)", length: "long" },
|
|
61
|
+
{ char: "ެ", id: "e", charType: "vowel", ipa: "ɛ", name: "ެ (e)", length: "short" },
|
|
62
|
+
{ char: "ޭ", id: "ee", charType: "vowel", ipa: "eː", name: "ޭ (ee)", length: "long" },
|
|
63
|
+
{ char: "ޮ", id: "o", charType: "vowel", ipa: "ɔ", name: "ޮ (o)", length: "short" },
|
|
64
|
+
{ char: "ޯ", id: "oo", charType: "vowel", ipa: "oː", name: "ޯ (oo)", length: "long" },
|
|
65
|
+
{ char: "ް", id: "ri", charType: "vowel", ipa: "ɾ", name: "ް (ri)", length: "short" },
|
|
66
|
+
{ char: "ޱ", id: "rri", charType: "vowel", ipa: "ɾː", name: "ޱ (rri)", length: "long" },
|
|
67
|
+
{ char: "", id: "lh", charType: "vowel", ipa: "ɭ", name: " (lh)", length: "short" },
|
|
68
|
+
{ char: "", id: "lhh", charType: "vowel", ipa: "ɭː", name: " (lhh)", length: "long" },
|
|
69
|
+
{ char: "", id: "s", charType: "vowel", ipa: "s", name: " (s)", length: "short" },
|
|
70
|
+
{ char: "", id: "sh", charType: "vowel", ipa: "ʃ", name: " (sh)", length: "short" },
|
|
71
|
+
{ char: "", id: "z", charType: "vowel", ipa: "z", name: " (z)", length: "short" },
|
|
72
|
+
{ char: "", id: "y", charType: "vowel", ipa: "j", name: " (y)", length: "short" },
|
|
73
|
+
{ char: "", id: "w", charType: "vowel", ipa: "w", name: " (w)", length: "short" },
|
|
74
|
+
{ char: "", id: "k", charType: "vowel", ipa: "k", name: " (k)", length: "short" },
|
|
75
|
+
{ char: "", id: "g", charType: "vowel", ipa: "ɡ", name: " (g)", length: "short" },
|
|
76
|
+
{ char: "", id: "ng", charType: "vowel", ipa: "ŋ", name: " (ng)", length: "short" },
|
|
77
|
+
{ char: "", id: "c", charType: "vowel", ipa: "tʃ", name: " (c)", length: "short" },
|
|
78
|
+
{ char: "", id: "j", charType: "vowel", ipa: "dʒ", name: " (j)", length: "short" },
|
|
79
|
+
{ char: "", id: "ny", charType: "vowel", ipa: "ɲ", name: " (ny)", length: "short" },
|
|
80
|
+
{ char: "", id: "tt", charType: "vowel", ipa: "ʈ", name: " (tt)", length: "short" },
|
|
81
|
+
{ char: "ހި", id: "ha_n", charType: "vowel", ipa: "hə", name: "ހި (ha-n)", length: "short" }
|
|
82
|
+
], o = [
|
|
83
|
+
...c,
|
|
84
|
+
...i
|
|
85
|
+
];
|
|
86
|
+
export {
|
|
87
|
+
o as divehiAllCharacters,
|
|
88
|
+
i as divehiConsonants,
|
|
89
|
+
c as divehiVowels,
|
|
90
|
+
e as isConsonant,
|
|
91
|
+
n as isVowel
|
|
92
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { divehiVowels, divehiConsonants, divehiAllCharacters, type DivehiVowelsInfo, type DivehiConsonantsInfo, type DivehiCharacter, isVowel, isConsonant, } from './characters.js';
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@polyglot-bundles/dv-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/dv/lang"
|
|
35
|
+
}
|
|
36
|
+
}
|