@polyglot-bundles/pl-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 +43 -0
- package/dist/characters.js +75 -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
|
+
* Polish Character Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for Polish characters (Latin script with diacritics).
|
|
5
|
+
* Polish has 32 letters: 9 vowels, 23 consonants (including 4 digraphs).
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Base character info
|
|
9
|
+
*/
|
|
10
|
+
type PolishCharacterBaseInfo = {
|
|
11
|
+
char: string;
|
|
12
|
+
id: string;
|
|
13
|
+
display?: string;
|
|
14
|
+
audio?: string;
|
|
15
|
+
notes?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Polish Vowels
|
|
19
|
+
*/
|
|
20
|
+
export type PolishVowelsInfo = {
|
|
21
|
+
charType: "vowel";
|
|
22
|
+
ipa: string;
|
|
23
|
+
name: string;
|
|
24
|
+
length?: "short" | "long";
|
|
25
|
+
} & PolishCharacterBaseInfo;
|
|
26
|
+
/**
|
|
27
|
+
* Polish Consonants
|
|
28
|
+
*/
|
|
29
|
+
export type PolishConsonantsInfo = {
|
|
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" | "alveolar" | "postalveolar" | "retroflex";
|
|
36
|
+
} & PolishCharacterBaseInfo;
|
|
37
|
+
export type PolishCharacter = PolishVowelsInfo | PolishConsonantsInfo;
|
|
38
|
+
export declare function isVowel(character: PolishCharacter): character is PolishVowelsInfo;
|
|
39
|
+
export declare function isConsonant(character: PolishCharacter): character is PolishConsonantsInfo;
|
|
40
|
+
export declare const polishVowels: PolishVowelsInfo[];
|
|
41
|
+
export declare const polishConsonants: PolishConsonantsInfo[];
|
|
42
|
+
export declare const polishAllCharacters: (PolishVowelsInfo | PolishConsonantsInfo)[];
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
function n(a) {
|
|
2
|
+
return a.charType === "vowel";
|
|
3
|
+
}
|
|
4
|
+
function e(a) {
|
|
5
|
+
return a.charType === "consonant";
|
|
6
|
+
}
|
|
7
|
+
const i = [
|
|
8
|
+
// Pure 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
|
+
// Nasal vowels
|
|
15
|
+
{ char: "ą", id: "a_ogonek", charType: "vowel", ipa: "ɔ̃", name: "Ą", length: "short" },
|
|
16
|
+
{ char: "ę", id: "e_ogonek", charType: "vowel", ipa: "ɛ̃", name: "Ę", length: "short" },
|
|
17
|
+
// Y-based
|
|
18
|
+
{ char: "y", id: "y", charType: "vowel", ipa: "ɨ", name: "Y", length: "short" },
|
|
19
|
+
// Long vowels
|
|
20
|
+
{ char: "ó", id: "o_acute", charType: "vowel", ipa: "u", name: "Ó", length: "long" }
|
|
21
|
+
], c = [
|
|
22
|
+
// Bilabial consonants
|
|
23
|
+
{ char: "b", id: "b", charType: "consonant", ipa: "b", name: "B", voicing: "voiced", articulation: "stop", place: "labial" },
|
|
24
|
+
{ char: "p", id: "p", charType: "consonant", ipa: "p", name: "P", voicing: "voiceless", articulation: "stop", place: "labial" },
|
|
25
|
+
{ char: "m", id: "m", charType: "consonant", ipa: "m", name: "M", voicing: "nasal", articulation: "nasal", place: "labial" },
|
|
26
|
+
// Labiodental consonants
|
|
27
|
+
{ char: "f", id: "f", charType: "consonant", ipa: "f", name: "F", voicing: "voiceless", articulation: "fricative", place: "labial" },
|
|
28
|
+
{ char: "w", id: "w", charType: "consonant", ipa: "v", name: "W", voicing: "voiced", articulation: "fricative", place: "labial" },
|
|
29
|
+
{ char: "v", id: "v_foreign", charType: "consonant", ipa: "v", name: "V (foreign)", voicing: "voiced", articulation: "fricative", place: "labial" },
|
|
30
|
+
// Dental/Alveolar consonants
|
|
31
|
+
{ char: "t", id: "t", charType: "consonant", ipa: "t", name: "T", voicing: "voiceless", articulation: "stop", place: "dental" },
|
|
32
|
+
{ char: "d", id: "d", charType: "consonant", ipa: "d", name: "D", voicing: "voiced", articulation: "stop", place: "dental" },
|
|
33
|
+
{ char: "s", id: "s", charType: "consonant", ipa: "s", name: "S", voicing: "voiceless", articulation: "fricative", place: "alveolar" },
|
|
34
|
+
{ char: "z", id: "z", charType: "consonant", ipa: "z", name: "Z", voicing: "voiced", articulation: "fricative", place: "alveolar" },
|
|
35
|
+
{ char: "n", id: "n", charType: "consonant", ipa: "n", name: "N", voicing: "nasal", articulation: "nasal", place: "alveolar" },
|
|
36
|
+
{ char: "l", id: "l", charType: "consonant", ipa: "l", name: "L", voicing: "lateral", articulation: "lateral", place: "alveolar" },
|
|
37
|
+
{ char: "r", id: "r", charType: "consonant", ipa: "r", name: "R", voicing: "trill", articulation: "trill", place: "alveolar" },
|
|
38
|
+
// Palatal consonants
|
|
39
|
+
{ char: "ć", id: "c_acute", charType: "consonant", ipa: "tɕ", name: "Ć", voicing: "voiceless", articulation: "affricate", place: "palatal" },
|
|
40
|
+
{ char: "ś", id: "s_acute", charType: "consonant", ipa: "ɕ", name: "Ś", voicing: "voiceless", articulation: "fricative", place: "palatal" },
|
|
41
|
+
{ char: "ź", id: "z_acute", charType: "consonant", ipa: "ʑ", name: "Ź", voicing: "voiced", articulation: "fricative", place: "palatal" },
|
|
42
|
+
{ char: "dź", id: "dz_acute", charType: "consonant", ipa: "dʑ", name: "ĎŽ", voicing: "voiced", articulation: "affricate", place: "palatal" },
|
|
43
|
+
{ char: "ni", id: "ni", charType: "consonant", ipa: "ɲ", name: "NI", voicing: "nasal", articulation: "nasal", place: "palatal" },
|
|
44
|
+
{ char: "li", id: "li", charType: "consonant", ipa: "lʲ", name: "LI", voicing: "lateral", articulation: "lateral", place: "palatal" },
|
|
45
|
+
{ char: "ci", id: "ci", charType: "consonant", ipa: "tʃ", name: "CI", voicing: "voiceless", articulation: "affricate", place: "palatal" },
|
|
46
|
+
{ char: "zi", id: "zi", charType: "consonant", ipa: "ʒ", name: "ZI", voicing: "voiced", articulation: "fricative", place: "palatal" },
|
|
47
|
+
{ char: "si", id: "si", charType: "consonant", ipa: "ʃ", name: "SI", voicing: "voiceless", articulation: "fricative", place: "palatal" },
|
|
48
|
+
// Retroflex consonants
|
|
49
|
+
{ char: "ż", id: "z_dot", charType: "consonant", ipa: "ʐ", name: "Ż", voicing: "voiced", articulation: "fricative", place: "retroflex" },
|
|
50
|
+
{ char: "rz", id: "rz", charType: "consonant", ipa: "ʐ", name: "RZ", voicing: "voiced", articulation: "fricative", place: "retroflex" },
|
|
51
|
+
// Postalveolar consonants
|
|
52
|
+
{ char: "cz", id: "cz", charType: "consonant", ipa: "tʃ", name: "CZ", voicing: "voiceless", articulation: "affricate", place: "postalveolar" },
|
|
53
|
+
{ char: "sz", id: "sz", charType: "consonant", ipa: "ʃ", name: "SZ", voicing: "voiceless", articulation: "fricative", place: "postalveolar" },
|
|
54
|
+
// Velar consonants
|
|
55
|
+
{ char: "k", id: "k", charType: "consonant", ipa: "k", name: "K", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
56
|
+
{ char: "g", id: "g", charType: "consonant", ipa: "ɡ", name: "G", voicing: "voiced", articulation: "stop", place: "velar" },
|
|
57
|
+
{ char: "h", id: "h", charType: "consonant", ipa: "x", name: "H", voicing: "voiceless", articulation: "fricative", place: "velar" },
|
|
58
|
+
{ char: "ch", id: "ch", charType: "consonant", ipa: "x", name: "CH", voicing: "voiceless", articulation: "fricative", place: "velar" },
|
|
59
|
+
// Glottal
|
|
60
|
+
{ char: "h", id: "h_glottal", charType: "consonant", ipa: "h", name: "H (glottal)", voicing: "voiceless", articulation: "fricative", place: "glottal" },
|
|
61
|
+
// Other consonants
|
|
62
|
+
{ char: "q", id: "q_foreign", charType: "consonant", ipa: "kw", name: "Q (foreign)", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
63
|
+
{ char: "x", id: "x_foreign", charType: "consonant", ipa: "ks", name: "X (foreign)", voicing: "voiceless", articulation: "stop", place: "velar" },
|
|
64
|
+
{ char: "ź", id: "ź_digraph", charType: "consonant", ipa: "ʑ", name: "Ź (digraph)", voicing: "voiced", articulation: "fricative", place: "palatal" }
|
|
65
|
+
], o = [
|
|
66
|
+
...i,
|
|
67
|
+
...c
|
|
68
|
+
];
|
|
69
|
+
export {
|
|
70
|
+
e as isConsonant,
|
|
71
|
+
n as isVowel,
|
|
72
|
+
o as polishAllCharacters,
|
|
73
|
+
c as polishConsonants,
|
|
74
|
+
i as polishVowels
|
|
75
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { polishVowels, polishConsonants, polishAllCharacters, type PolishVowelsInfo, type PolishConsonantsInfo, type PolishCharacter, isVowel, isConsonant, } from './characters.js';
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@polyglot-bundles/pl-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/pl/lang"
|
|
35
|
+
}
|
|
36
|
+
}
|