@polyglot-bundles/qu-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,44 @@
1
+ /**
2
+ * Quechua Character Types
3
+ *
4
+ * Type definitions for Quechua characters (Latin script).
5
+ * Quechua has 24 letters: 3 vowels, 21 consonants.
6
+ * Note: Spanish loanwords use 5 vowels (a, e, i, o, u).
7
+ */
8
+ /**
9
+ * Base character info
10
+ */
11
+ type QuechuaCharacterBaseInfo = {
12
+ char: string;
13
+ id: string;
14
+ display?: string;
15
+ audio?: string;
16
+ notes?: string;
17
+ };
18
+ /**
19
+ * Quechua Vowels
20
+ */
21
+ export type QuechuaVowelsInfo = {
22
+ charType: "vowel";
23
+ ipa: string;
24
+ name: string;
25
+ length?: "short" | "long";
26
+ } & QuechuaCharacterBaseInfo;
27
+ /**
28
+ * Quechua Consonants
29
+ */
30
+ export type QuechuaConsonantsInfo = {
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" | "fricative" | "affricate";
36
+ place: "velar" | "palatal" | "alveolar" | "dental" | "labial" | "glottal" | "alveolar" | "retroflex" | "uvular";
37
+ } & QuechuaCharacterBaseInfo;
38
+ export type QuechuaCharacter = QuechuaVowelsInfo | QuechuaConsonantsInfo;
39
+ export declare function isVowel(character: QuechuaCharacter): character is QuechuaVowelsInfo;
40
+ export declare function isConsonant(character: QuechuaCharacter): character is QuechuaConsonantsInfo;
41
+ export declare const quechuaVowels: QuechuaVowelsInfo[];
42
+ export declare const quechuaConsonants: QuechuaConsonantsInfo[];
43
+ export declare const quechuaAllCharacters: (QuechuaVowelsInfo | QuechuaConsonantsInfo)[];
44
+ export {};
@@ -0,0 +1,78 @@
1
+ function o(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: "a", id: "a", charType: "vowel", ipa: "a", name: "A", length: "short" },
10
+ { char: "i", id: "i", charType: "vowel", ipa: "i", name: "I", length: "short" },
11
+ { char: "u", id: "u", charType: "vowel", ipa: "u", name: "U", length: "short" },
12
+ // Long vowels (doubled in spelling)
13
+ { char: "aa", id: "a_long", charType: "vowel", ipa: "aː", name: "A (long)", length: "long" },
14
+ { char: "ii", id: "i_long", charType: "vowel", ipa: "iː", name: "I (long)", length: "long" },
15
+ { char: "uu", id: "u_long", charType: "vowel", ipa: "uː", name: "U (long)", length: "long" },
16
+ // Spanish vowels (in loanwords)
17
+ { char: "e", id: "e_loanword", charType: "vowel", ipa: "ɛ", name: "E (loanword)", length: "short" },
18
+ { char: "o", id: "o_loanword", charType: "vowel", ipa: "o", name: "O (loanword)", length: "short" },
19
+ // Diphthongs
20
+ { char: "ai", id: "ai", charType: "vowel", ipa: "ai", name: "AI", length: "short" },
21
+ { char: "au", id: "au", charType: "vowel", ipa: "au", name: "AU", length: "short" },
22
+ { char: "ia", id: "ia", charType: "vowel", ipa: "ia", name: "IA", length: "short" },
23
+ { char: "iu", id: "iu", charType: "vowel", ipa: "iu", name: "IU", length: "short" },
24
+ { char: "ua", id: "ua", charType: "vowel", ipa: "ua", name: "UA", length: "short" },
25
+ { char: "ui", id: "ui", charType: "vowel", ipa: "ui", name: "UI", length: "short" },
26
+ { char: "ea", id: "ea", charType: "vowel", ipa: "ea", name: "EA", length: "short" },
27
+ { char: "ei", id: "ei", charType: "vowel", ipa: "ei", name: "EI", length: "short" },
28
+ { char: "eu", id: "eu", charType: "vowel", ipa: "eu", name: "EU", length: "short" },
29
+ { char: "oa", id: "oa", charType: "vowel", ipa: "oa", name: "OA", length: "short" },
30
+ { char: "oi", id: "oi", charType: "vowel", ipa: "oi", name: "OI", length: "short" },
31
+ { char: "ou", id: "ou", charType: "vowel", ipa: "ou", name: "OU", length: "short" }
32
+ ], n = [
33
+ // Bilabial consonants
34
+ { char: "p", id: "p", charType: "consonant", ipa: "p", name: "P", voicing: "voiceless", articulation: "stop", place: "labial" },
35
+ { char: "b", id: "b", charType: "consonant", ipa: "b", name: "B", voicing: "voiced", articulation: "stop", place: "labial" },
36
+ { char: "m", id: "m", charType: "consonant", ipa: "m", name: "M", voicing: "nasal", articulation: "nasal", place: "labial" },
37
+ // Labiodental consonants
38
+ { char: "f", id: "f_loanword", charType: "consonant", ipa: "f", name: "F (loanword)", voicing: "voiceless", articulation: "fricative", place: "labial" },
39
+ { char: "v", id: "v_loanword", charType: "consonant", ipa: "v", name: "V (loanword)", voicing: "voiced", articulation: "fricative", place: "labial" },
40
+ // Dental/Alveolar consonants
41
+ { char: "t", id: "t", charType: "consonant", ipa: "t", name: "T", voicing: "voiceless", articulation: "stop", place: "dental" },
42
+ { char: "d", id: "d_loanword", charType: "consonant", ipa: "d", name: "D (loanword)", voicing: "voiced", articulation: "stop", place: "dental" },
43
+ { char: "s", id: "s", charType: "consonant", ipa: "s", name: "S", voicing: "voiceless", articulation: "fricative", place: "alveolar" },
44
+ { char: "z", id: "z_loanword", charType: "consonant", ipa: "s", name: "Z (loanword)", voicing: "voiceless", articulation: "fricative", place: "alveolar" },
45
+ { char: "n", id: "n", charType: "consonant", ipa: "n", name: "N", voicing: "nasal", articulation: "nasal", place: "alveolar" },
46
+ { char: "l", id: "l", charType: "consonant", ipa: "l", name: "L", voicing: "lateral", articulation: "lateral", place: "alveolar" },
47
+ { char: "r", id: "r", charType: "consonant", ipa: "r", name: "R", voicing: "trill", articulation: "trill", place: "alveolar" },
48
+ // Retroflex consonants
49
+ { char: "ʈ", id: "rt", charType: "consonant", ipa: "ʈ", name: "RT", voicing: "voiceless", articulation: "stop", place: "retroflex" },
50
+ { char: "ɳ", id: "rn", charType: "consonant", ipa: "ɳ", name: "RN", voicing: "nasal", articulation: "nasal", place: "retroflex" },
51
+ // Palatal consonants
52
+ { char: "c", id: "c", charType: "consonant", ipa: "tʃ", name: "C", voicing: "voiceless", articulation: "affricate", place: "palatal" },
53
+ { char: "j", id: "j", charType: "consonant", ipa: "x", name: "J", voicing: "voiceless", articulation: "fricative", place: "velar" },
54
+ { char: "ñ", id: "ñ", charType: "consonant", ipa: "ɲ", name: "Ñ", voicing: "nasal", articulation: "nasal", place: "palatal" },
55
+ // Velar consonants
56
+ { char: "k", id: "k", charType: "consonant", ipa: "k", name: "K", voicing: "voiceless", articulation: "stop", place: "velar" },
57
+ { char: "g", id: "g", charType: "consonant", ipa: "ɡ", name: "G", voicing: "voiced", articulation: "stop", place: "velar" },
58
+ { char: "ŋ", id: "ng", charType: "consonant", ipa: "ŋ", name: "NG", voicing: "nasal", articulation: "nasal", place: "velar" },
59
+ // Glottal
60
+ { char: "h", id: "h", charType: "consonant", ipa: "h", name: "H", voicing: "voiceless", articulation: "fricative", place: "glottal" },
61
+ { char: "ʔ", id: "glottal_stop", charType: "consonant", ipa: "ʔ", name: "Glottal Stop", voicing: "voiceless", articulation: "stop", place: "glottal" },
62
+ // Other consonants
63
+ { char: "w", id: "w", charType: "consonant", ipa: "w", name: "W", voicing: "voiced", articulation: "approximant", place: "labial" },
64
+ { char: "y", id: "y", charType: "consonant", ipa: "j", name: "Y", voicing: "voiced", articulation: "approximant", place: "palatal" },
65
+ { char: "x", id: "x_loanword", charType: "consonant", ipa: "ks", name: "X (loanword)", voicing: "voiceless", articulation: "stop", place: "velar" },
66
+ { char: "q", id: "q_foreign", charType: "consonant", ipa: "q", name: "Q (foreign)", voicing: "voiceless", articulation: "stop", place: "uvular" },
67
+ { char: "f", id: "f_foreign", charType: "consonant", ipa: "f", name: "F (foreign)", voicing: "voiceless", articulation: "fricative", place: "labial" }
68
+ ], c = [
69
+ ...i,
70
+ ...n
71
+ ];
72
+ export {
73
+ e as isConsonant,
74
+ o as isVowel,
75
+ c as quechuaAllCharacters,
76
+ n as quechuaConsonants,
77
+ i as quechuaVowels
78
+ };
@@ -0,0 +1 @@
1
+ export { quechuaVowels, quechuaConsonants, quechuaAllCharacters, type QuechuaVowelsInfo, type QuechuaConsonantsInfo, type QuechuaCharacter, isVowel, isConsonant, } from './characters.js';
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { isConsonant as e, isVowel as s, quechuaAllCharacters as n, quechuaConsonants as u, quechuaVowels as c } from "./characters.js";
2
+ export {
3
+ e as isConsonant,
4
+ s as isVowel,
5
+ n as quechuaAllCharacters,
6
+ u as quechuaConsonants,
7
+ c as quechuaVowels
8
+ };
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@polyglot-bundles/qu-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/qu/lang"
35
+ }
36
+ }