@polyglot-bundles/pt-br-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
+ * Portuguese (Brazil) Character Types
3
+ *
4
+ * Type definitions for Portuguese (Brazil) characters (Latin script).
5
+ * Portuguese has 26 letters: 5 vowels, 21 consonants.
6
+ */
7
+ /**
8
+ * Base character info
9
+ */
10
+ type PortugueseBrCharacterBaseInfo = {
11
+ char: string;
12
+ id: string;
13
+ display?: string;
14
+ audio?: string;
15
+ notes?: string;
16
+ };
17
+ /**
18
+ * Portuguese (Brazil) Vowels
19
+ */
20
+ export type PortugueseBrVowelsInfo = {
21
+ charType: "vowel";
22
+ ipa: string;
23
+ name: string;
24
+ length?: "short" | "long";
25
+ } & PortugueseBrCharacterBaseInfo;
26
+ /**
27
+ * Portuguese (Brazil) Consonants
28
+ */
29
+ export type PortugueseBrConsonantsInfo = {
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" | "fricative" | "affricate";
35
+ place: "velar" | "palatal" | "alveolar" | "dental" | "labial" | "glottal" | "uvular" | "alveolar";
36
+ } & PortugueseBrCharacterBaseInfo;
37
+ export type PortugueseBrCharacter = PortugueseBrVowelsInfo | PortugueseBrConsonantsInfo;
38
+ export declare function isVowel(character: PortugueseBrCharacter): character is PortugueseBrVowelsInfo;
39
+ export declare function isConsonant(character: PortugueseBrCharacter): character is PortugueseBrConsonantsInfo;
40
+ export declare const portugueseBrVowels: PortugueseBrVowelsInfo[];
41
+ export declare const portugueseBrConsonants: PortugueseBrConsonantsInfo[];
42
+ export declare const portugueseBrAllCharacters: (PortugueseBrVowelsInfo | PortugueseBrConsonantsInfo)[];
43
+ export {};
@@ -0,0 +1,88 @@
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_acute", charType: "vowel", ipa: "a", name: "Á", length: "short" },
16
+ { char: "é", id: "e_acute", charType: "vowel", ipa: "ɛ", name: "É", length: "short" },
17
+ { char: "í", id: "i_acute", charType: "vowel", ipa: "i", name: "Í", length: "short" },
18
+ { char: "ó", id: "o_acute", charType: "vowel", ipa: "ɔ", name: "Ó", length: "short" },
19
+ { char: "ú", id: "u_acute", charType: "vowel", ipa: "u", name: "Ú", length: "short" },
20
+ // Diphthongs
21
+ { char: "ai", id: "ai", charType: "vowel", ipa: "a'i", name: "AI", length: "short" },
22
+ { char: "au", id: "au", charType: "vowel", ipa: "a'u", name: "AU", length: "short" },
23
+ { char: "ei", id: "ei", charType: "vowel", ipa: "e'i", name: "EI", length: "short" },
24
+ { char: "eu", id: "eu", charType: "vowel", ipa: "e'u", name: "EU", length: "short" },
25
+ { char: "oi", id: "oi", charType: "vowel", ipa: "o'i", name: "OI", length: "short" },
26
+ { char: "ui", id: "ui", charType: "vowel", ipa: "u'i", name: "UI", length: "short" },
27
+ { char: "iu", id: "iu", charType: "vowel", ipa: "i'u", name: "IU", length: "short" },
28
+ { char: "ou", id: "ou", charType: "vowel", ipa: "oʊ", name: "OU", length: "short" },
29
+ // Nasal diphthongs
30
+ { char: "am", id: "am", charType: "vowel", ipa: "ã", name: "AM", length: "short" },
31
+ { char: "an", id: "an", charType: "vowel", ipa: "ã", name: "AN", length: "short" },
32
+ { char: "em", id: "em", charType: "vowel", ipa: "ẽ", name: "EM", length: "short" },
33
+ { char: "en", id: "en", charType: "vowel", ipa: "ẽ", name: "EN", length: "short" },
34
+ { char: "im", id: "im", charType: "vowel", ipa: "ĩ", name: "IM", length: "short" },
35
+ { char: "in", id: "in", charType: "vowel", ipa: "ĩ", name: "IN", length: "short" },
36
+ { char: "om", id: "om", charType: "vowel", ipa: "õ", name: "OM", length: "short" },
37
+ { char: "on", id: "on", charType: "vowel", ipa: "õ", name: "ON", length: "short" },
38
+ { char: "um", id: "um", charType: "vowel", ipa: "ũ", name: "UM", length: "short" },
39
+ { char: "un", id: "un", charType: "vowel", ipa: "ũ", name: "UN", length: "short" }
40
+ ], e = [
41
+ // Bilabial consonants
42
+ { char: "b", id: "b", charType: "consonant", ipa: "b", name: "B", voicing: "voiced", articulation: "stop", place: "labial" },
43
+ { char: "p", id: "p", charType: "consonant", ipa: "p", name: "P", voicing: "voiceless", articulation: "stop", place: "labial" },
44
+ { char: "m", id: "m", charType: "consonant", ipa: "m", name: "M", voicing: "nasal", articulation: "nasal", place: "labial" },
45
+ { char: "β", id: "b_fricative", charType: "consonant", ipa: "β", name: "B (fricative)", voicing: "voiced", articulation: "fricative", place: "labial" },
46
+ // Labiodental consonants
47
+ { char: "f", id: "f", charType: "consonant", ipa: "f", name: "F", voicing: "voiceless", articulation: "fricative", place: "labial" },
48
+ { char: "v", id: "v", charType: "consonant", ipa: "v", name: "V", voicing: "voiced", articulation: "fricative", place: "labial" },
49
+ // Dental/Alveolar consonants
50
+ { char: "t", id: "t", charType: "consonant", ipa: "t", name: "T", voicing: "voiceless", articulation: "stop", place: "dental" },
51
+ { char: "d", id: "d", charType: "consonant", ipa: "d", name: "D", voicing: "voiced", articulation: "stop", place: "dental" },
52
+ { char: "ð", id: "d_fricative", charType: "consonant", ipa: "ð", name: "D (fricative)", voicing: "voiced", articulation: "fricative", place: "dental" },
53
+ { char: "s", id: "s", charType: "consonant", ipa: "s", name: "S", voicing: "voiceless", articulation: "fricative", place: "alveolar" },
54
+ { char: "z", id: "z", charType: "consonant", ipa: "z", name: "Z", voicing: "voiced", articulation: "fricative", place: "alveolar" },
55
+ { char: "n", id: "n", charType: "consonant", ipa: "n", name: "N", voicing: "nasal", articulation: "nasal", place: "alveolar" },
56
+ { char: "l", id: "l", charType: "consonant", ipa: "l", name: "L", voicing: "lateral", articulation: "lateral", place: "alveolar" },
57
+ { char: "r", id: "r", charType: "consonant", ipa: "r", name: "R", voicing: "trill", articulation: "trill", place: "alveolar" },
58
+ // Palatal consonants
59
+ { char: "ʃ", id: "ch", charType: "consonant", ipa: "ʃ", name: "CH", voicing: "voiceless", articulation: "fricative", place: "palatal" },
60
+ { char: "ʒ", id: "j", charType: "consonant", ipa: "ʒ", name: "J", voicing: "voiced", articulation: "fricative", place: "palatal" },
61
+ { char: "j", id: "j_palatal", charType: "consonant", ipa: "j", name: "J (palatal)", voicing: "voiced", articulation: "approximant", place: "palatal" },
62
+ { char: "ʝ", id: "j_fricative", charType: "consonant", ipa: "ʝ", name: "J (fricative)", voicing: "voiced", articulation: "fricative", place: "palatal" },
63
+ // Velar consonants
64
+ { char: "k", id: "c", charType: "consonant", ipa: "k", name: "C", voicing: "voiceless", articulation: "stop", place: "velar" },
65
+ { char: "ɡ", id: "g", charType: "consonant", ipa: "ɡ", name: "G", voicing: "voiced", articulation: "stop", place: "velar" },
66
+ { char: "x", id: "g_before_e_i", charType: "consonant", ipa: "x", name: "G (before e/i)", voicing: "voiceless", articulation: "fricative", place: "velar" },
67
+ { char: "ŋ", id: "n_before_k_g", charType: "consonant", ipa: "ŋ", name: "N (before k/g)", voicing: "nasal", articulation: "nasal", place: "velar" },
68
+ // Other consonants
69
+ { char: "w", id: "w_foreign", charType: "consonant", ipa: "w", name: "W (foreign)", voicing: "voiced", articulation: "approximant", place: "labial" },
70
+ { char: "y", id: "y_foreign", charType: "consonant", ipa: "j", name: "Y (foreign)", voicing: "voiced", articulation: "approximant", place: "palatal" },
71
+ { char: "q", id: "q_foreign", charType: "consonant", ipa: "k", name: "Q (foreign)", voicing: "voiceless", articulation: "stop", place: "velar" },
72
+ { char: "x", id: "x_foreign", charType: "consonant", ipa: "ʃ", name: "X (foreign)", voicing: "voiceless", articulation: "fricative", place: "palatal" },
73
+ { char: "z", id: "z_palatal", charType: "consonant", ipa: "ʒ", name: "Z (palatal)", voicing: "voiced", articulation: "fricative", place: "palatal" },
74
+ { char: "d", id: "d_palatal", charType: "consonant", ipa: "dʒ", name: "D (palatal)", voicing: "voiced", articulation: "affricate", place: "palatal" },
75
+ { char: "t", id: "t_palatal", charType: "consonant", ipa: "tʃ", name: "T (palatal)", voicing: "voiceless", articulation: "affricate", place: "palatal" },
76
+ { char: "l", id: "l_velarized", charType: "consonant", ipa: "ɫ", name: "L (velarized)", voicing: "lateral", articulation: "lateral", place: "alveolar" },
77
+ { char: "r", id: "r_fricative", charType: "consonant", ipa: "ʁ", name: "R (fricative)", voicing: "voiced", articulation: "fricative", place: "uvular" }
78
+ ], o = [
79
+ ...i,
80
+ ...e
81
+ ];
82
+ export {
83
+ n as isConsonant,
84
+ c as isVowel,
85
+ o as portugueseBrAllCharacters,
86
+ e as portugueseBrConsonants,
87
+ i as portugueseBrVowels
88
+ };
@@ -0,0 +1 @@
1
+ export { portugueseBrVowels, portugueseBrConsonants, portugueseBrAllCharacters, type PortugueseBrVowelsInfo, type PortugueseBrConsonantsInfo, type PortugueseBrCharacter, isVowel, isConsonant, } from './characters.js';
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { isConsonant as r, isVowel as s, portugueseBrAllCharacters as t, portugueseBrConsonants as n, portugueseBrVowels as u } from "./characters.js";
2
+ export {
3
+ r as isConsonant,
4
+ s as isVowel,
5
+ t as portugueseBrAllCharacters,
6
+ n as portugueseBrConsonants,
7
+ u as portugueseBrVowels
8
+ };
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@polyglot-bundles/pt-br-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/pt-br/lang"
35
+ }
36
+ }