@polyglot-bundles/si-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
+ * Sinhala Character Types
3
+ *
4
+ * Type definitions for Sinhala characters (Sinhala script).
5
+ * Sinhala has 60 characters: 18 vowels, 42 consonants.
6
+ */
7
+ /**
8
+ * Base character info
9
+ */
10
+ type SinhalaCharacterBaseInfo = {
11
+ char: string;
12
+ id: string;
13
+ display?: string;
14
+ audio?: string;
15
+ notes?: string;
16
+ };
17
+ /**
18
+ * Sinhala Vowels (Swaraya)
19
+ */
20
+ export type SinhalaVowelsInfo = {
21
+ charType: "vowel";
22
+ ipa: string;
23
+ name: string;
24
+ length?: "short" | "long";
25
+ } & SinhalaCharacterBaseInfo;
26
+ /**
27
+ * Sinhala Consonants (Vyanjana)
28
+ */
29
+ export type SinhalaConsonantsInfo = {
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
+ } & SinhalaCharacterBaseInfo;
37
+ export type SinhalaCharacter = SinhalaVowelsInfo | SinhalaConsonantsInfo;
38
+ export declare function isVowel(character: SinhalaCharacter): character is SinhalaVowelsInfo;
39
+ export declare function isConsonant(character: SinhalaCharacter): character is SinhalaConsonantsInfo;
40
+ export declare const sinhalaVowels: SinhalaVowelsInfo[];
41
+ export declare const sinhalaConsonants: SinhalaConsonantsInfo[];
42
+ export declare const sinhalaAllCharacters: (SinhalaVowelsInfo | SinhalaConsonantsInfo)[];
43
+ export {};
@@ -0,0 +1,112 @@
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: "උ (long)", length: "long" },
16
+ { char: "ඍ", id: "r", charType: "vowel", ipa: "rɪ", name: "ඍ", length: "short" },
17
+ { char: "ඏ", id: "e", charType: "vowel", ipa: "ɛ", name: "ඏ", length: "short" },
18
+ { char: "ඔ", id: "o", charType: "vowel", ipa: "ɔ", name: "ඔ", length: "short" },
19
+ { char: "ඕ", id: "au", charType: "vowel", ipa: "au", name: "ඕ", length: "short" },
20
+ { char: "ඟ", id: "am", charType: "vowel", ipa: "əŋ", name: "ඟ", length: "short" },
21
+ // Additional vowels
22
+ { char: "ଆ", id: "a_long", charType: "vowel", ipa: "aː", name: "ଆ (long)", length: "long" },
23
+ { char: "ଈ", id: "ii_extra", charType: "vowel", ipa: "iː", name: "ଈ (extra)", length: "long" },
24
+ { char: "ଉ", id: "u_extra", charType: "vowel", ipa: "ʊ", name: "ଉ (extra)", length: "short" },
25
+ { char: "ଌ", id: "u_extra2", charType: "vowel", ipa: "u", name: "ଌ (extra2)", length: "short" },
26
+ { char: "ඟ", id: "ng", charType: "vowel", ipa: "ŋ", name: "ඟ (ng)", length: "short" },
27
+ { char: "ඤ", id: "ny", charType: "vowel", ipa: "ɲ", name: "ඤ (ny)", length: "short" },
28
+ // Vowel signs (matras)
29
+ { char: "ා", id: "aa_matra", charType: "vowel", ipa: "aː", name: "ා (aa matra)", length: "long" },
30
+ { char: "ි", id: "i_matra", charType: "vowel", ipa: "i", name: "ි (i matra)", length: "short" },
31
+ { char: "ී", id: "ii_matra", charType: "vowel", ipa: "iː", name: "ී (ii matra)", length: "long" },
32
+ { char: "ු", id: "u_matra", charType: "vowel", ipa: "u", name: "ු (u matra)", length: "short" },
33
+ { char: "ූ", id: "uu_matra", charType: "vowel", ipa: "uː", name: "ූ (uu matra)", length: "long" },
34
+ { char: "ෙ", id: "e_matra", charType: "vowel", ipa: "ɛ", name: "ෙ (e matra)", length: "short" },
35
+ { char: "ේ", id: "ee_matra", charType: "vowel", ipa: "eː", name: "ේ (ee matra)", length: "long" },
36
+ { char: "ෛ", id: "ai_matra", charType: "vowel", ipa: "ai", name: "ෛ (ai matra)", length: "short" },
37
+ { char: "ො", id: "o_matra", charType: "vowel", ipa: "ɔ", name: "ො (o matra)", length: "short" },
38
+ { char: "ෝ", id: "oo_matra", charType: "vowel", ipa: "oː", name: "ෝ (oo matra)", length: "long" },
39
+ { char: "ෞ", id: "au_matra", charType: "vowel", ipa: "au", name: "ෞ (au matra)", length: "short" },
40
+ { char: "ෟ", id: "u_matra_long", charType: "vowel", ipa: "uː", name: "ෟ (u matra long)", length: "long" }
41
+ ], n = [
42
+ // Velar consonants (කණ)
43
+ { char: "ක", id: "ka", charType: "consonant", ipa: "k", name: "ක", voicing: "voiceless", articulation: "stop", place: "velar" },
44
+ { char: "ඛ", id: "kha", charType: "consonant", ipa: "kʰ", name: "ඛ", voicing: "voiceless", articulation: "stop", place: "velar" },
45
+ { char: "ග", id: "ga", charType: "consonant", ipa: "ɡ", name: "ග", voicing: "voiced", articulation: "stop", place: "velar" },
46
+ { char: "ඝ", id: "gha", charType: "consonant", ipa: "ɡʰ", name: "ඝ", voicing: "voiced", articulation: "stop", place: "velar" },
47
+ { char: "ඞ", id: "nga", charType: "consonant", ipa: "ŋ", name: "ඞ", voicing: "nasal", articulation: "nasal", place: "velar" },
48
+ // Palatal consonants (චණ)
49
+ { char: "ච", id: "cha", charType: "consonant", ipa: "tʃ", name: "ච", voicing: "voiceless", articulation: "stop", place: "palatal" },
50
+ { char: "ඡ", id: "chha", charType: "consonant", ipa: "tʃʰ", name: "ඡ", voicing: "voiceless", articulation: "stop", place: "palatal" },
51
+ { char: "ජ", id: "ja", charType: "consonant", ipa: "dʒ", name: "ජ", voicing: "voiced", articulation: "stop", place: "palatal" },
52
+ { char: "ඣ", id: "jha", charType: "consonant", ipa: "dʒʰ", name: "ඣ", voicing: "voiced", articulation: "stop", place: "palatal" },
53
+ { char: "ඤ", id: "nya", charType: "consonant", ipa: "ɲ", name: "ඤ", voicing: "nasal", articulation: "nasal", place: "palatal" },
54
+ // Retroflex consonants (ටණ)
55
+ { char: "ට", id: "tta", charType: "consonant", ipa: "ʈ", name: "ට", voicing: "voiceless", articulation: "stop", place: "retroflex" },
56
+ { char: "ಠ", id: "ttha", charType: "consonant", ipa: "ʈʰ", name: "ಠ", voicing: "voiceless", articulation: "stop", place: "retroflex" },
57
+ { char: "ඩ", id: "dda", charType: "consonant", ipa: "ɖ", name: "ඩ", voicing: "voiced", articulation: "stop", place: "retroflex" },
58
+ { char: "ඪ", id: "ddha", charType: "consonant", ipa: "ɖʰ", name: "ඪ", voicing: "voiced", articulation: "stop", place: "retroflex" },
59
+ { char: "ණ", id: "nna", charType: "consonant", ipa: "ɳ", name: "ණ", voicing: "nasal", articulation: "nasal", place: "retroflex" },
60
+ // Dental consonants (තණ)
61
+ { char: "ත", id: "ta", charType: "consonant", ipa: "t", name: "ත", voicing: "voiceless", articulation: "stop", place: "dental" },
62
+ { char: "ථ", id: "tha", charType: "consonant", ipa: "tʰ", name: "ථ", voicing: "voiceless", articulation: "stop", place: "dental" },
63
+ { char: "ද", id: "da", charType: "consonant", ipa: "d", name: "ද", voicing: "voiced", articulation: "stop", place: "dental" },
64
+ { char: "ධ", id: "dha", charType: "consonant", ipa: "dʰ", name: "ධ", voicing: "voiced", articulation: "stop", place: "dental" },
65
+ { char: "න", id: "na", charType: "consonant", ipa: "n", name: "න", voicing: "nasal", articulation: "nasal", place: "dental" },
66
+ // Labial consonants (පණ)
67
+ { char: "ප", id: "pa", charType: "consonant", ipa: "p", name: "ප", voicing: "voiceless", articulation: "stop", place: "labial" },
68
+ { char: "ඵ", id: "pha", charType: "consonant", ipa: "pʰ", name: "ඵ", voicing: "voiceless", articulation: "stop", place: "labial" },
69
+ { char: "බ", id: "ba", charType: "consonant", ipa: "b", name: "බ", voicing: "voiced", articulation: "stop", place: "labial" },
70
+ { char: "භ", id: "bha", charType: "consonant", ipa: "bʰ", name: "භ", voicing: "voiced", articulation: "stop", place: "labial" },
71
+ { char: "ම", id: "ma", charType: "consonant", ipa: "m", name: "ම", voicing: "nasal", articulation: "nasal", place: "labial" },
72
+ // Other consonants
73
+ { char: "ය", id: "ya", charType: "consonant", ipa: "j", name: "ය", voicing: "approximant", articulation: "approximant", place: "palatal" },
74
+ { char: "ර", id: "ra", charType: "consonant", ipa: "r", name: "ර", voicing: "trill", articulation: "trill", place: "retroflex" },
75
+ { char: "ල", id: "la", charType: "consonant", ipa: "l", name: "ල", voicing: "lateral", articulation: "lateral", place: "dental" },
76
+ { char: "ව", id: "va", charType: "consonant", ipa: "ʋ", name: "ව", voicing: "approximant", articulation: "approximant", place: "labial" },
77
+ { char: "ශ", id: "sha", charType: "consonant", ipa: "ʃ", name: "ශ", voicing: "voiceless", articulation: "fricative", place: "palatal" },
78
+ { char: "ෂ", id: "ssa", charType: "consonant", ipa: "ʂ", name: "ෂ", voicing: "voiceless", articulation: "fricative", place: "retroflex" },
79
+ { char: "ස", id: "sa", charType: "consonant", ipa: "s", name: "ස", voicing: "voiceless", articulation: "fricative", place: "dental" },
80
+ { char: "හ", id: "ha", charType: "consonant", ipa: "h", name: "හ", voicing: "voiceless", articulation: "fricative", place: "glottal" },
81
+ { char: "ළ", id: "lla", charType: "consonant", ipa: "ɭ", name: "ළ", voicing: "lateral", articulation: "lateral", place: "retroflex" },
82
+ { char: "ෆ", id: "fa_foreign", charType: "consonant", ipa: "f", name: "ෆ (foreign)", voicing: "voiceless", articulation: "fricative", place: "labial" },
83
+ { char: "ළ්", id: "lla_virama", charType: "consonant", ipa: "ɭ", name: "ළ් (lla virama)", voicing: "lateral", articulation: "lateral", place: "retroflex" },
84
+ { char: "ඟ", id: "nga_singhala", charType: "consonant", ipa: "ŋɡ", name: "ඟ (Singhala)", voicing: "nasal", articulation: "stop", place: "velar" },
85
+ { char: "ඤ", id: "nya_sinhala", charType: "consonant", ipa: "ɲj", name: "ඤ (Sinhala)", voicing: "nasal", articulation: "stop", place: "palatal" },
86
+ { char: "ඨ", id: "ttha_extra", charType: "consonant", ipa: "ʈʰ", name: "ඨ (extra)", voicing: "voiceless", articulation: "stop", place: "retroflex" },
87
+ { char: "ඪ", id: "ddha_extra", charType: "consonant", ipa: "ɖʰ", name: "ඪ (extra)", voicing: "voiced", articulation: "stop", place: "retroflex" },
88
+ { char: "ඬ", id: "nna_extra", charType: "consonant", ipa: "ɳ", name: "ඬ (extra)", voicing: "nasal", articulation: "nasal", place: "retroflex" },
89
+ { char: "ඳ", id: "dda_extra", charType: "consonant", ipa: "ɖ", name: "ඳ (extra)", voicing: "voiced", articulation: "stop", place: "retroflex" },
90
+ { char: "ඵ", id: "pha_extra", charType: "consonant", ipa: "pʰ", name: "ඵ (extra)", voicing: "voiceless", articulation: "stop", place: "labial" },
91
+ { char: "ඹ", id: "bha_extra", charType: "consonant", ipa: "bʰ", name: "ඹ (extra)", voicing: "voiced", articulation: "stop", place: "labial" },
92
+ { char: "඘", id: "gha_extra", charType: "consonant", ipa: "ɡʰ", name: "඘ (extra)", voicing: "voiced", articulation: "stop", place: "velar" },
93
+ { char: "ඣ", id: "jha_extra", charType: "consonant", ipa: "dʒʰ", name: "ඣ (extra)", voicing: "voiced", articulation: "stop", place: "palatal" },
94
+ { char: "ඥ", id: "gya", charType: "consonant", ipa: "dʒɲ", name: "ඥ", voicing: "voiced", articulation: "stop", place: "palatal" },
95
+ { char: "ක්ෂ", id: "ksha", charType: "consonant", ipa: "kʃ", name: "ක්ෂ", voicing: "voiceless", articulation: "stop", place: "velar" },
96
+ { char: "ත්‍ෂ", id: "tsha", charType: "consonant", ipa: "tʃ", name: "ත්‍ෂ", voicing: "voiceless", articulation: "stop", place: "palatal" },
97
+ { char: "ද්‍ව", id: "dva", charType: "consonant", ipa: "dv", name: "ද්‍ව", voicing: "voiced", articulation: "stop", place: "labial" },
98
+ { char: "ස්ක", id: "ska", charType: "consonant", ipa: "sk", name: "ස්ක", voicing: "voiceless", articulation: "stop", place: "velar" },
99
+ { char: "ස්ප", id: "spa", charType: "consonant", ipa: "sp", name: "ස්ප", voicing: "voiceless", articulation: "stop", place: "labial" },
100
+ { char: "ස්ත", id: "sta", charType: "consonant", ipa: "st", name: "ස්ත", voicing: "voiceless", articulation: "stop", place: "dental" },
101
+ { char: "ස්න", id: "sna", charType: "consonant", ipa: "sn", name: "ස්න", voicing: "voiceless", articulation: "stop", place: "dental" }
102
+ ], o = [
103
+ ...i,
104
+ ...n
105
+ ];
106
+ export {
107
+ e as isConsonant,
108
+ c as isVowel,
109
+ o as sinhalaAllCharacters,
110
+ n as sinhalaConsonants,
111
+ i as sinhalaVowels
112
+ };
@@ -0,0 +1 @@
1
+ export { sinhalaVowels, sinhalaConsonants, sinhalaAllCharacters, type SinhalaVowelsInfo, type SinhalaConsonantsInfo, type SinhalaCharacter, isVowel, isConsonant, } from './characters.js';
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { isConsonant as n, isVowel as o, sinhalaAllCharacters as l, sinhalaConsonants as i, sinhalaVowels as e } from "./characters.js";
2
+ export {
3
+ n as isConsonant,
4
+ o as isVowel,
5
+ l as sinhalaAllCharacters,
6
+ i as sinhalaConsonants,
7
+ e as sinhalaVowels
8
+ };
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@polyglot-bundles/si-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/si/lang"
35
+ }
36
+ }