@polyglot-bundles/pt-br 0.5.1 → 0.5.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/index.js CHANGED
@@ -1,27 +1,104 @@
1
+ //#region ../../shared/content-shared/dist/capabilities.js
2
+ var e = [
3
+ "characters",
4
+ "sounds",
5
+ "minimalPairs",
6
+ "parallelText",
7
+ "wordLists",
8
+ "stories",
9
+ "puzzles"
10
+ ];
11
+ function t(e) {
12
+ return !!e && typeof e == "object" && Object.keys(e).length > 0;
13
+ }
14
+ function n(e) {
15
+ return Array.isArray(e) && e.length > 0;
16
+ }
17
+ var r = {
18
+ characters: {
19
+ id: "characters",
20
+ inputKey: "characters",
21
+ bundleKey: "characters",
22
+ hasInputData: (e) => t(e.characters),
23
+ hasBundleData: (e) => i(e.characters)
24
+ },
25
+ sounds: {
26
+ id: "sounds",
27
+ inputKey: "getSounds",
28
+ bundleKey: "getSounds",
29
+ hasInputData: (e) => typeof e.getSounds == "function",
30
+ hasBundleData: (e) => typeof e.getSounds == "function"
31
+ },
32
+ minimalPairs: {
33
+ id: "minimalPairs",
34
+ inputKey: "getMinimalPairs",
35
+ bundleKey: "getMinimalPairs",
36
+ hasInputData: (e) => typeof e.getMinimalPairs == "function",
37
+ hasBundleData: (e) => typeof e.getMinimalPairs == "function"
38
+ },
39
+ parallelText: {
40
+ id: "parallelText",
41
+ inputKey: "parallelTextSets",
42
+ bundleKey: "parallelTextSets",
43
+ hasInputData: (e) => n(e.parallelTextSets),
44
+ hasBundleData: (e) => n(e.parallelTextSets)
45
+ },
46
+ wordLists: {
47
+ id: "wordLists",
48
+ inputKey: "wordListDescriptors",
49
+ bundleKey: "wordListDescriptors",
50
+ hasInputData: (e) => n(e.wordListDescriptors),
51
+ hasBundleData: (e) => n(e.wordListDescriptors)
52
+ },
53
+ stories: {
54
+ id: "stories",
55
+ inputKey: "getStories",
56
+ bundleKey: "getStories",
57
+ hasInputData: (e) => typeof e.getStories == "function",
58
+ hasBundleData: (e) => typeof e.getStories == "function"
59
+ },
60
+ puzzles: {
61
+ id: "puzzles",
62
+ inputKey: "getPuzzles",
63
+ bundleKey: "getPuzzles",
64
+ hasInputData: (e) => typeof e.getPuzzles == "function",
65
+ hasBundleData: (e) => typeof e.getPuzzles == "function"
66
+ }
67
+ };
68
+ function i(e) {
69
+ if (!e || typeof e != "object") return !1;
70
+ for (let t of Object.values(e)) {
71
+ let e = t;
72
+ if (Array.isArray(e?.characters) && e.characters.length > 0) return !0;
73
+ }
74
+ return !1;
75
+ }
76
+ //#endregion
1
77
  //#region ../../shared/content-shared/dist/compose.js
2
- function e(e) {
3
- let t = [];
4
- return e.characters !== void 0 && Object.keys(e.characters).length > 0 && t.push("characters"), typeof e.getSounds == "function" && t.push("sounds"), typeof e.getMinimalPairs == "function" && t.push("minimalPairs"), e.parallelTextSets !== void 0 && e.parallelTextSets.length > 0 && t.push("parallelText"), e.wordListDescriptors !== void 0 && e.wordListDescriptors.length > 0 && t.push("wordLists"), typeof e.getStories == "function" && t.push("stories"), typeof e.getPuzzles == "function" && t.push("puzzles"), {
5
- ...e.identity,
6
- capabilities: t,
7
- characters: e.characters,
8
- parallelTextSets: e.parallelTextSets,
9
- wordListDescriptors: e.wordListDescriptors,
10
- getSounds: e.getSounds,
11
- getMinimalPairs: e.getMinimalPairs,
12
- getStories: e.getStories,
13
- getPuzzles: e.getPuzzles
78
+ function a(t) {
79
+ let n = [], i = t;
80
+ for (let t of e) r[t].hasInputData(i) && n.push(t);
81
+ return {
82
+ ...t.identity,
83
+ capabilities: n,
84
+ characters: t.characters,
85
+ parallelTextSets: t.parallelTextSets,
86
+ wordListDescriptors: t.wordListDescriptors,
87
+ getSounds: t.getSounds,
88
+ getMinimalPairs: t.getMinimalPairs,
89
+ getStories: t.getStories,
90
+ getPuzzles: t.getPuzzles
14
91
  };
15
92
  }
16
- function t(e) {
93
+ function o(e) {
17
94
  return async () => (await e()).default;
18
95
  }
19
- function n(e, t) {
96
+ function s(e, t) {
20
97
  return async () => (await t())[e];
21
98
  }
22
99
  //#endregion
23
100
  //#region ../lang/dist/characters.js
24
- var r = [
101
+ var c = [
25
102
  {
26
103
  char: "a",
27
104
  id: "a",
@@ -246,7 +323,7 @@ var r = [
246
323
  name: "UN",
247
324
  length: "short"
248
325
  }
249
- ], i = [
326
+ ], l = [
250
327
  {
251
328
  char: "b",
252
329
  id: "b",
@@ -558,10 +635,10 @@ var r = [
558
635
  place: "uvular"
559
636
  }
560
637
  ];
561
- [...r, ...i];
638
+ [...c, ...l];
562
639
  //#endregion
563
640
  //#region src/index.ts
564
- var a = e({
641
+ var u = a({
565
642
  identity: {
566
643
  locale: "pt-BR",
567
644
  languageCode: "pt-br",
@@ -572,15 +649,15 @@ var a = e({
572
649
  characters: {
573
650
  vowels: {
574
651
  kind: "vowel",
575
- characters: r
652
+ characters: c
576
653
  },
577
654
  consonants: {
578
655
  kind: "consonant",
579
- characters: i
656
+ characters: l
580
657
  }
581
658
  },
582
- getMinimalPairs: t(() => import("./dist-Cy1Lk8MS.js")),
583
- getSounds: n("brazilianPortugueseSoundsConfig", () => import("./sounds-CzW6-WOO.js"))
659
+ getMinimalPairs: o(() => import("./dist-Cy1Lk8MS.js")),
660
+ getSounds: s("brazilianPortugueseSoundsConfig", () => import("./sounds-BnFk8wK3.js"))
584
661
  });
585
662
  //#endregion
586
- export { a as brazilianPortugueseBundle, a as default, i as portugueseBrConsonants, r as portugueseBrVowels };
663
+ export { u as brazilianPortugueseBundle, u as default, l as portugueseBrConsonants, c as portugueseBrVowels };
@@ -203,32 +203,28 @@ var e = [
203
203
  charType: "vowel",
204
204
  ipa: "ũ"
205
205
  }
206
- ], r = {
207
- categories: [
208
- {
209
- id: "consonants",
210
- label: "Consonants",
211
- sounds: e,
212
- charType: "consonant",
213
- color: "blue"
214
- },
215
- {
216
- id: "oral-vowels",
217
- label: "Oral Vowels (7)",
218
- sounds: t,
219
- charType: "vowel",
220
- color: "green"
221
- },
222
- {
223
- id: "nasal-vowels",
224
- label: "Nasal Vowels",
225
- sounds: n,
226
- charType: "vowel",
227
- color: "red"
228
- }
229
- ],
230
- audioBasePath: "/audio/portuguese-br",
231
- audioFilePattern: "{id}.mp3"
232
- };
206
+ ], r = { categories: [
207
+ {
208
+ id: "consonants",
209
+ label: "Consonants",
210
+ sounds: e,
211
+ charType: "consonant",
212
+ color: "blue"
213
+ },
214
+ {
215
+ id: "oral-vowels",
216
+ label: "Oral Vowels (7)",
217
+ sounds: t,
218
+ charType: "vowel",
219
+ color: "green"
220
+ },
221
+ {
222
+ id: "nasal-vowels",
223
+ label: "Nasal Vowels",
224
+ sounds: n,
225
+ charType: "vowel",
226
+ color: "red"
227
+ }
228
+ ] };
233
229
  //#endregion
234
230
  export { r as brazilianPortugueseSoundsConfig, e as ptBrConsonants, n as ptBrNasalVowels, t as ptBrOralVowels };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyglot-bundles/pt-br",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Portuguese (Brazil) language bundle — composes the @polyglot-bundles/pt-br-* sub-packages into a single LanguageBundle",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,10 +33,10 @@
33
33
  "vite": "^8.0.8",
34
34
  "vite-plugin-dts": "^4.5.4",
35
35
  "vitest": "^4.1.4",
36
+ "@polyglot-bundles/content-shared": "0.8.0",
36
37
  "@polyglot-bundles/lang-tooling": "0.0.0",
37
- "@polyglot-bundles/pt-br-lang": "0.5.1",
38
- "@polyglot-bundles/content-shared": "0.7.1",
39
- "@polyglot-bundles/pt-br-minimal-pairs": "0.5.1"
38
+ "@polyglot-bundles/pt-br-lang": "0.5.2",
39
+ "@polyglot-bundles/pt-br-minimal-pairs": "0.5.2"
40
40
  },
41
41
  "scripts": {
42
42
  "typecheck": "tsc --noEmit",