@polyglot-bundles/mg-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 +70 -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
|
+
* Malagasy Character Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for Malagasy characters (Latin script).
|
|
5
|
+
* Malagasy has 21 letters: 5 vowels, 16 consonants.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Base character info
|
|
9
|
+
*/
|
|
10
|
+
type MalagasyCharacterBaseInfo = {
|
|
11
|
+
char: string;
|
|
12
|
+
id: string;
|
|
13
|
+
display?: string;
|
|
14
|
+
audio?: string;
|
|
15
|
+
notes?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Malagasy Vowels
|
|
19
|
+
*/
|
|
20
|
+
export type MalagasyVowelsInfo = {
|
|
21
|
+
charType: "vowel";
|
|
22
|
+
ipa: string;
|
|
23
|
+
name: string;
|
|
24
|
+
length?: "short" | "long";
|
|
25
|
+
} & MalagasyCharacterBaseInfo;
|
|
26
|
+
/**
|
|
27
|
+
* Malagasy Consonants
|
|
28
|
+
*/
|
|
29
|
+
export type MalagasyConsonantsInfo = {
|
|
30
|
+
charType: "consonant";
|
|
31
|
+
ipa: string;
|
|
32
|
+
name: string;
|
|
33
|
+
articulation: "stop" | "fricative" | "nasal" | "approximant" | "lateral" | "trill" | "affricate";
|
|
34
|
+
voicing: "voiced" | "voiceless" | "nasal" | "lateral" | "approximant" | "trill" | "affricate" | "fricative";
|
|
35
|
+
place: "velar" | "palatal" | "alveolar" | "dental" | "labial" | "glottal" | "retroflex" | "alveolar";
|
|
36
|
+
} & MalagasyCharacterBaseInfo;
|
|
37
|
+
export type MalagasyCharacter = MalagasyVowelsInfo | MalagasyConsonantsInfo;
|
|
38
|
+
export declare function isVowel(character: MalagasyCharacter): character is MalagasyVowelsInfo;
|
|
39
|
+
export declare function isConsonant(character: MalagasyCharacter): character is MalagasyConsonantsInfo;
|
|
40
|
+
export declare const malagasyVowels: MalagasyVowelsInfo[];
|
|
41
|
+
export declare const malagasyConsonants: MalagasyConsonantsInfo[];
|
|
42
|
+
export declare const malagasyAllCharacters: (MalagasyVowelsInfo | MalagasyConsonantsInfo)[];
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function c(a) {
|
|
2
|
+
return a.charType === "vowel";
|
|
3
|
+
}
|
|
4
|
+
function n(a) {
|
|
5
|
+
return a.charType === "consonant";
|
|
6
|
+
}
|
|
7
|
+
const i = [
|
|
8
|
+
// Short vowels
|
|
9
|
+
{ char: "a", id: "a", charType: "vowel", ipa: "a", name: "A", length: "short" },
|
|
10
|
+
{ char: "e", id: "e", charType: "vowel", ipa: "ɛ", name: "E", length: "short" },
|
|
11
|
+
{ char: "i", id: "i", charType: "vowel", ipa: "i", name: "I", length: "short" },
|
|
12
|
+
{ char: "o", id: "o", charType: "vowel", ipa: "ɔ", name: "O", length: "short" },
|
|
13
|
+
{ char: "u", id: "u", charType: "vowel", ipa: "u", name: "U", length: "short" },
|
|
14
|
+
// Long vowels
|
|
15
|
+
{ char: "â", id: "a_circumflex", charType: "vowel", ipa: "a", name: "Â", length: "short" },
|
|
16
|
+
{ char: "ê", id: "e_circumflex", charType: "vowel", ipa: "ɛ", name: "Ê", length: "short" },
|
|
17
|
+
{ char: "î", id: "i_circumflex", charType: "vowel", ipa: "i", name: "Î", length: "short" },
|
|
18
|
+
{ char: "ô", id: "o_circumflex", charType: "vowel", ipa: "ɔ", name: "Ô", length: "short" },
|
|
19
|
+
{ char: "û", id: "u_circumflex", charType: "vowel", ipa: "u", name: "Û", length: "short" },
|
|
20
|
+
// Diphthongs
|
|
21
|
+
{ char: "ai", id: "ai", charType: "vowel", ipa: "ai", name: "AI", length: "short" },
|
|
22
|
+
{ char: "ao", id: "ao", charType: "vowel", ipa: "aʊ", name: "AO", length: "short" },
|
|
23
|
+
{ char: "au", id: "au", charType: "vowel", ipa: "au", name: "AU", length: "short" },
|
|
24
|
+
{ char: "ei", id: "ei", charType: "vowel", ipa: "ɛi", name: "EI", length: "short" },
|
|
25
|
+
{ char: "io", id: "io", charType: "vowel", ipa: "io", name: "IO", length: "short" },
|
|
26
|
+
{ char: "iu", id: "iu", charType: "vowel", ipa: "iu", name: "IU", length: "short" },
|
|
27
|
+
{ char: "oe", id: "oe", charType: "vowel", ipa: "uɛ", name: "OE", length: "short" },
|
|
28
|
+
{ char: "ou", id: "ou", charType: "vowel", ipa: "ʊu", name: "OU", length: "short" }
|
|
29
|
+
], e = [
|
|
30
|
+
// Bilabial consonants
|
|
31
|
+
{ char: "b", id: "b", charType: "consonant", ipa: "b", name: "B", voicing: "voiced", articulation: "stop", place: "labial" },
|
|
32
|
+
{ char: "p", id: "p", charType: "consonant", ipa: "p", name: "P", voicing: "voiceless", articulation: "stop", place: "labial" },
|
|
33
|
+
{ char: "m", id: "m", charType: "consonant", ipa: "m", name: "M", voicing: "nasal", articulation: "nasal", place: "labial" },
|
|
34
|
+
// Labiodental consonants
|
|
35
|
+
{ char: "v", id: "v", charType: "consonant", ipa: "v", name: "V", voicing: "voiced", articulation: "fricative", place: "labial" },
|
|
36
|
+
{ char: "f", id: "f", charType: "consonant", ipa: "f", name: "F", voicing: "voiceless", articulation: "fricative", place: "labial" },
|
|
37
|
+
// Dental/Alveolar consonants
|
|
38
|
+
{ char: "t", id: "t", charType: "consonant", ipa: "t", name: "T", voicing: "voiceless", articulation: "stop", place: "dental" },
|
|
39
|
+
{ char: "d", id: "d_foreign", charType: "consonant", ipa: "d", name: "D (foreign)", voicing: "voiced", articulation: "stop", place: "dental" },
|
|
40
|
+
{ char: "s", id: "s", charType: "consonant", ipa: "s", name: "S", voicing: "voiceless", articulation: "fricative", place: "alveolar" },
|
|
41
|
+
{ char: "z", id: "z_foreign", charType: "consonant", ipa: "z", name: "Z (foreign)", voicing: "voiced", articulation: "fricative", place: "alveolar" },
|
|
42
|
+
{ char: "n", id: "n", charType: "consonant", ipa: "n", name: "N", voicing: "nasal", articulation: "nasal", place: "alveolar" },
|
|
43
|
+
{ char: "l", id: "l", charType: "consonant", ipa: "l", name: "L", voicing: "lateral", articulation: "lateral", place: "alveolar" },
|
|
44
|
+
{ char: "r", id: "r", charType: "consonant", ipa: "r", name: "R", voicing: "trill", articulation: "trill", place: "alveolar" },
|
|
45
|
+
// Palatal consonants
|
|
46
|
+
{ char: "y", id: "y", charType: "consonant", ipa: "j", name: "Y", voicing: "voiced", articulation: "approximant", place: "palatal" },
|
|
47
|
+
{ char: "j", id: "j_foreign", charType: "consonant", ipa: "dʒ", name: "J (foreign)", voicing: "voiced", articulation: "affricate", place: "palatal" },
|
|
48
|
+
// Velar consonants
|
|
49
|
+
{ char: "k", id: "k", charType: "consonant", ipa: "k", name: "K", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
50
|
+
{ char: "g", id: "g_foreign", charType: "consonant", ipa: "ɡ", name: "G (foreign)", voicing: "voiced", articulation: "stop", place: "velar" },
|
|
51
|
+
{ char: "h", id: "h", charType: "consonant", ipa: "h", name: "H", voicing: "voiceless", articulation: "fricative", place: "glottal" },
|
|
52
|
+
{ char: "g", id: "g_velar", charType: "consonant", ipa: "ɡ", name: "G (velar)", voicing: "voiced", articulation: "stop", place: "velar" },
|
|
53
|
+
// Other consonants
|
|
54
|
+
{ char: "q", id: "q_foreign", charType: "consonant", ipa: "k", name: "Q (foreign)", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
55
|
+
{ char: "c", id: "c_foreign", charType: "consonant", ipa: "k", name: "C (foreign)", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
56
|
+
{ char: "x", id: "x_foreign", charType: "consonant", ipa: "ks", name: "X (foreign)", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
57
|
+
{ char: "w", id: "w_foreign", charType: "consonant", ipa: "w", name: "W (foreign)", voicing: "voiced", articulation: "approximant", place: "labial" },
|
|
58
|
+
{ char: "d", id: "d_apical", charType: "consonant", ipa: "ɽ", name: "D (apical)", voicing: "voiced", articulation: "stop", place: "retroflex" },
|
|
59
|
+
{ char: "z", id: "z_apical", charType: "consonant", ipa: "z", name: "Z (apical)", voicing: "voiced", articulation: "fricative", place: "alveolar" }
|
|
60
|
+
], o = [
|
|
61
|
+
...i,
|
|
62
|
+
...e
|
|
63
|
+
];
|
|
64
|
+
export {
|
|
65
|
+
n as isConsonant,
|
|
66
|
+
c as isVowel,
|
|
67
|
+
o as malagasyAllCharacters,
|
|
68
|
+
e as malagasyConsonants,
|
|
69
|
+
i as malagasyVowels
|
|
70
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { malagasyVowels, malagasyConsonants, malagasyAllCharacters, type MalagasyVowelsInfo, type MalagasyConsonantsInfo, type MalagasyCharacter, isVowel, isConsonant, } from './characters.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { isConsonant as o, isVowel as l, malagasyAllCharacters as n, malagasyConsonants as e, malagasyVowels as m } from "./characters.js";
|
|
2
|
+
export {
|
|
3
|
+
o as isConsonant,
|
|
4
|
+
l as isVowel,
|
|
5
|
+
n as malagasyAllCharacters,
|
|
6
|
+
e as malagasyConsonants,
|
|
7
|
+
m as malagasyVowels
|
|
8
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@polyglot-bundles/mg-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/mg/lang"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "vite build",
|
|
34
|
+
"clean": "rm -rf dist"
|
|
35
|
+
}
|
|
36
|
+
}
|