waha-shared 1.0.18 → 1.0.21

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.
Files changed (47) hide show
  1. package/assets/fonts/arabic/Bold.ttf +0 -0
  2. package/assets/fonts/arabic/Regular.ttf +0 -0
  3. package/assets/fonts/burmese/Bold.ttf +0 -0
  4. package/assets/fonts/burmese/Regular.ttf +0 -0
  5. package/assets/fonts/chinese/Bold.ttf +0 -0
  6. package/assets/fonts/chinese/Regular.ttf +0 -0
  7. package/assets/fonts/cyrillic/Bold.ttf +0 -0
  8. package/assets/fonts/cyrillic/Regular.ttf +0 -0
  9. package/assets/fonts/devanagari/Bold.ttf +0 -0
  10. package/assets/fonts/devanagari/Regular.ttf +0 -0
  11. package/assets/fonts/fonts.css +178 -0
  12. package/assets/fonts/japanese/Bold.ttf +0 -0
  13. package/assets/fonts/japanese/Regular.ttf +0 -0
  14. package/assets/fonts/khmer/Bold.ttf +0 -0
  15. package/assets/fonts/khmer/Regular.ttf +0 -0
  16. package/assets/fonts/latin/Bold.ttf +0 -0
  17. package/assets/fonts/latin/Regular.ttf +0 -0
  18. package/assets/fonts/telugu/Bold.ttf +0 -0
  19. package/assets/fonts/telugu/Regular.ttf +0 -0
  20. package/assets/fonts/thai/Bold.ttf +0 -0
  21. package/assets/fonts/thai/Regular.ttf +0 -0
  22. package/assets/fonts/uyghur/Bold.ttf +0 -0
  23. package/assets/fonts/uyghur/Regular.ttf +0 -0
  24. package/dist/data/bibleAudios.json +18 -9
  25. package/dist/data/bibleTexts.json +34 -11
  26. package/dist/data/languages.json +57 -37
  27. package/dist/data/releaseNotes.json +81 -46
  28. package/dist/data/typescript/appTranslations.d.ts +52 -43
  29. package/dist/data/typescript/appTranslations.js +20 -17
  30. package/dist/data/typescript/setTranslations.d.ts +13 -10
  31. package/dist/data/typescript/setTranslations.js +15 -11
  32. package/dist/functions/languages.d.ts +1 -1
  33. package/dist/functions/languages.js +9 -9
  34. package/dist/functions/scripturePassages.d.ts +12 -0
  35. package/dist/functions/scripturePassages.js +1 -0
  36. package/dist/functions/sets.js +4 -0
  37. package/dist/translations/appTranslations.d.ts +17 -14
  38. package/dist/translations/appTranslations.json +1915 -1912
  39. package/dist/translations/setTranslations.d.ts +4 -3
  40. package/dist/translations/setTranslations.json +5211 -5168
  41. package/dist/types/analytics.d.ts +19 -1
  42. package/dist/types/notifications.d.ts +13 -3
  43. package/dist/types/notifications.js +16 -2
  44. package/dist/types/sets.d.ts +1 -0
  45. package/dist/types/users.d.ts +209 -20
  46. package/dist/types/users.js +19 -0
  47. package/package.json +3 -2
@@ -5,7 +5,6 @@ const zod_1 = require("zod");
5
5
  exports.AppTranslations = zod_1.z
6
6
  .record(zod_1.z
7
7
  .object({
8
- percent_available: zod_1.z.string().min(1).optional(),
9
8
  name: zod_1.z.string().min(1),
10
9
  version: zod_1.z.string().min(1),
11
10
  a11y_add_secondary_language_hint: zod_1.z.string().min(1),
@@ -56,7 +55,6 @@ exports.AppTranslations = zod_1.z
56
55
  add_language: zod_1.z.string().min(1),
57
56
  all: zod_1.z.string().min(1),
58
57
  all_languages: zod_1.z.string().min(1),
59
- app_store_listing_title: zod_1.z.string().min(1),
60
58
  app_store_listing_description: zod_1.z.string().min(1),
61
59
  app_store_listing_screenshot_foundations: zod_1.z.string().min(1),
62
60
  app_store_listing_screenshot_languages: zod_1.z.string().min(1),
@@ -69,6 +67,7 @@ exports.AppTranslations = zod_1.z
69
67
  app_store_listing_screenshot_testimonial: zod_1.z.string().min(1),
70
68
  app_store_listing_screenshot_topics: zod_1.z.string().min(1),
71
69
  app_store_listing_subtitle: zod_1.z.string().min(1),
70
+ app_store_listing_title: zod_1.z.string().min(1),
72
71
  appearance: zod_1.z.string().min(1),
73
72
  application: zod_1.z.string().min(1),
74
73
  article_categories_65004e85fba2e8c9d281a73e: zod_1.z.string().min(1),
@@ -129,7 +128,10 @@ exports.AppTranslations = zod_1.z
129
128
  enter_passcode: zod_1.z.string().min(1),
130
129
  favorites: zod_1.z.string().min(1),
131
130
  fellowship: zod_1.z.string().min(1),
131
+ fetch_bible_error: zod_1.z.string().min(1),
132
+ fetch_bible_no_internet: zod_1.z.string().min(1),
132
133
  filter_articles: zod_1.z.string().min(1),
134
+ finish: zod_1.z.string().min(1).optional(),
133
135
  font_size: zod_1.z.string().min(1),
134
136
  foundations: zod_1.z.string().min(1),
135
137
  get_started_foundations: zod_1.z.string().min(1),
@@ -146,11 +148,15 @@ exports.AppTranslations = zod_1.z
146
148
  internet_required_download: zod_1.z.string().min(1),
147
149
  internet_required_download_share: zod_1.z.string().min(1),
148
150
  introduction: zod_1.z.string().min(1),
151
+ language_names: zod_1.z
152
+ .record(zod_1.z.string().min(1))
153
+ .describe('Mapping of language codes (ISO 639 or internal codes) to their localized display names'),
149
154
  language_types_app_interface: zod_1.z.string().min(1),
150
155
  language_types_meet: zod_1.z.string().min(1),
151
156
  language_types_meet_primary: zod_1.z.string().min(1),
152
157
  language_types_meet_secondary: zod_1.z.string().min(1),
153
158
  language_types_video_bridge: zod_1.z.string().min(1),
159
+ later: zod_1.z.string().min(1).optional(),
154
160
  learn: zod_1.z.string().min(1),
155
161
  learn_more: zod_1.z.string().min(1),
156
162
  light: zod_1.z.string().min(1),
@@ -173,38 +179,40 @@ exports.AppTranslations = zod_1.z
173
179
  note_placeholder: zod_1.z.string().min(1),
174
180
  note_saved: zod_1.z.string().min(1),
175
181
  notes_view: zod_1.z.string().min(1),
182
+ notifications: zod_1.z.string().min(1).optional(),
176
183
  notifications_enable: zod_1.z.string().min(1),
177
184
  ok: zod_1.z.string().min(1),
178
185
  passcode_set: zod_1.z.string().min(1),
186
+ percent_available: zod_1.z.string().min(1).optional(),
179
187
  piano: zod_1.z.string().min(1),
180
188
  piano_description: zod_1.z.string().min(1),
181
189
  playback_speed: zod_1.z.string().min(1),
182
190
  popups_app_interface_help: zod_1.z.string().min(1),
183
191
  popups_casting_stop_confirm: zod_1.z.string().min(1),
184
192
  popups_code_request_success_message: zod_1.z.string().min(1),
185
- popups_codes_no_match_title: zod_1.z.string().min(1),
186
193
  popups_codes_no_match_message: zod_1.z.string().min(1),
194
+ popups_codes_no_match_title: zod_1.z.string().min(1),
187
195
  popups_foundations_description_believer: zod_1.z.string().min(1),
188
196
  popups_foundations_description_seeker: zod_1.z.string().min(1),
189
- popups_group_help_title: zod_1.z.string().min(1),
190
197
  popups_group_help_message: zod_1.z.string().min(1),
198
+ popups_group_help_title: zod_1.z.string().min(1),
191
199
  popups_meet_help: zod_1.z.string().min(1),
192
- popups_notification_opt_in_title: zod_1.z.string().min(1),
193
200
  popups_notification_opt_in_message: zod_1.z.string().min(1),
194
- popups_play_help_title: zod_1.z.string().min(1),
201
+ popups_notification_opt_in_title: zod_1.z.string().min(1),
195
202
  popups_play_help_message: zod_1.z.string().min(1),
196
- popups_remove_meeting_title: zod_1.z.string().min(1),
203
+ popups_play_help_title: zod_1.z.string().min(1),
197
204
  popups_remove_meeting_message: zod_1.z.string().min(1),
198
- popups_submit_feedback_error_title: zod_1.z.string().min(1),
205
+ popups_remove_meeting_title: zod_1.z.string().min(1),
199
206
  popups_submit_feedback_error_message: zod_1.z.string().min(1),
200
- popups_submit_feedback_success_title: zod_1.z.string().min(1),
207
+ popups_submit_feedback_error_title: zod_1.z.string().min(1),
201
208
  popups_submit_feedback_success_message: zod_1.z.string().min(1),
209
+ popups_submit_feedback_success_title: zod_1.z.string().min(1),
202
210
  popups_topics_description: zod_1.z.string().min(1),
203
211
  popups_training_description_believer: zod_1.z.string().min(1),
204
- popups_unlock_successful_title: zod_1.z.string().min(1),
205
212
  popups_unlock_successful_message: zod_1.z.string().min(1),
206
- popups_unlocked_learn_help_title: zod_1.z.string().min(1),
213
+ popups_unlock_successful_title: zod_1.z.string().min(1),
207
214
  popups_unlocked_learn_help_message: zod_1.z.string().min(1),
215
+ popups_unlocked_learn_help_title: zod_1.z.string().min(1),
208
216
  popups_watch_on_youtube_blurb: zod_1.z.string().min(1),
209
217
  privacy_policy: zod_1.z.string().min(1),
210
218
  question: zod_1.z.string().min(1),
@@ -234,6 +242,7 @@ exports.AppTranslations = zod_1.z
234
242
  report_problem_help: zod_1.z.string().min(1),
235
243
  request_passcode: zod_1.z.string().min(1),
236
244
  required: zod_1.z.string().min(1),
245
+ retry: zod_1.z.string().min(1),
237
246
  return_home: zod_1.z.string().min(1),
238
247
  save_and_close: zod_1.z.string().min(1),
239
248
  search: zod_1.z.string().min(1),
@@ -304,12 +313,6 @@ exports.AppTranslations = zod_1.z
304
313
  week: zod_1.z.string().min(1),
305
314
  welcome_blurb: zod_1.z.string().min(1),
306
315
  yes: zod_1.z.string().min(1),
307
- retry: zod_1.z.string().min(1),
308
- fetch_bible_no_internet: zod_1.z.string().min(1),
309
- fetch_bible_error: zod_1.z.string().min(1),
310
- language_names: zod_1.z
311
- .record(zod_1.z.string().min(1))
312
- .describe('Mapping of language codes (ISO 639 or internal codes) to their localized display names'),
313
316
  })
314
317
  .describe('Translations for a single language (identified by a 3-letter code)_'))
315
318
  .describe('Schema for appTranslations_json_ Root keys are 3-letter language identifiers (ISO-639 style)_ Each language object contains well-defined translation collections_');
@@ -1,27 +1,30 @@
1
1
  import { z } from 'zod';
2
2
  export declare const SetTranslations: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
3
3
  setId: z.ZodString;
4
- setTitle: z.ZodString;
5
- setDescription: z.ZodOptional<z.ZodString>;
6
- setTag: z.ZodOptional<z.ZodString>;
4
+ lessonTitles: z.ZodRecord<z.ZodString, z.ZodString>;
5
+ pauseAndDiscuss: z.ZodOptional<z.ZodString>;
7
6
  sectionBodies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8
7
  sectionHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
9
- lessonTitles: z.ZodRecord<z.ZodString, z.ZodString>;
8
+ setDescription: z.ZodOptional<z.ZodString>;
9
+ setTag: z.ZodOptional<z.ZodString>;
10
+ setTitle: z.ZodString;
10
11
  }, "strip", z.ZodTypeAny, {
11
12
  setId: string;
12
- setTitle: string;
13
13
  lessonTitles: Record<string, string>;
14
- setDescription?: string | undefined;
15
- setTag?: string | undefined;
14
+ setTitle: string;
15
+ pauseAndDiscuss?: string | undefined;
16
16
  sectionBodies?: Record<string, string> | undefined;
17
17
  sectionHeaders?: Record<string, string> | undefined;
18
+ setDescription?: string | undefined;
19
+ setTag?: string | undefined;
18
20
  }, {
19
21
  setId: string;
20
- setTitle: string;
21
22
  lessonTitles: Record<string, string>;
22
- setDescription?: string | undefined;
23
- setTag?: string | undefined;
23
+ setTitle: string;
24
+ pauseAndDiscuss?: string | undefined;
24
25
  sectionBodies?: Record<string, string> | undefined;
25
26
  sectionHeaders?: Record<string, string> | undefined;
27
+ setDescription?: string | undefined;
28
+ setTag?: string | undefined;
26
29
  }>, "many">>;
27
30
  export type SetTranslations = z.infer<typeof SetTranslations>;
@@ -6,15 +6,12 @@ exports.SetTranslations = zod_1.z
6
6
  .record(zod_1.z
7
7
  .array(zod_1.z.object({
8
8
  setId: zod_1.z.string().min(1).describe('Identifier of the set.'),
9
- setTitle: zod_1.z.string().min(1).describe('Localized title for the set.'),
10
- setDescription: zod_1.z
11
- .string()
12
- .describe('Localized description for the set.')
13
- .optional(),
14
- setTag: zod_1.z
9
+ lessonTitles: zod_1.z
10
+ .record(zod_1.z.string().min(1))
11
+ .describe('Mapping of lessonId to localized lesson title.'),
12
+ pauseAndDiscuss: zod_1.z
15
13
  .string()
16
- .min(1)
17
- .describe('Optional topical tag for the set.')
14
+ .describe("Localized text for 'Pause and Discuss' prompts. Used for lesson videos.")
18
15
  .optional(),
19
16
  sectionBodies: zod_1.z
20
17
  .record(zod_1.z.string().min(1))
@@ -24,9 +21,16 @@ exports.SetTranslations = zod_1.z
24
21
  .record(zod_1.z.string().min(1))
25
22
  .describe('Mapping of sectionId to localized section header text.')
26
23
  .optional(),
27
- lessonTitles: zod_1.z
28
- .record(zod_1.z.string().min(1))
29
- .describe('Mapping of lessonId to localized lesson title.'),
24
+ setDescription: zod_1.z
25
+ .string()
26
+ .describe('Localized description for the set.')
27
+ .optional(),
28
+ setTag: zod_1.z
29
+ .string()
30
+ .min(1)
31
+ .describe('Optional topical tag for the set.')
32
+ .optional(),
33
+ setTitle: zod_1.z.string().min(1).describe('Localized title for the set.'),
30
34
  }))
31
35
  .describe('Array of translated sets for a given 3-letter language id (ISO-ish).'))
32
36
  .describe('Record of language ids to arrays of translated sets used by the app. Produced by scripts/prebuild/combine.ts (setTranslations.json). Each set item merges metadata translation fields (setTitle, setDescription, lessonTitles, etc.) under a setId.');
@@ -11,7 +11,7 @@ export declare function numerals(text: string, script: Languages[number]['script
11
11
  * These values are not the name of the font necessarily, but the identifier of
12
12
  * the font which can be found by inspecting the font in an app like Font Book.
13
13
  */
14
- export declare const fonts: Record<Languages[number]['script'], 'EudoxusSans' | 'NotoSans' | 'IBMPlexSansArabic' | null | 'KhmerOSContent' | 'Padauk' | 'AnekTelugu' | 'UKIJ Tuz'>;
14
+ export declare const fonts: Record<Languages[number]['script'], string | null>;
15
15
  /**
16
16
  * Get the font family for a given script and weight.
17
17
  *
@@ -162,18 +162,19 @@ function numerals(text, script) {
162
162
  exports.fonts = {
163
163
  arabic: 'IBMPlexSansArabic',
164
164
  cyrillic: 'NotoSans',
165
- chinese: 'NotoSans',
166
- devanagari: 'NotoSans',
165
+ chinese: 'NotoSansSP',
166
+ devanagari: 'NotoSansDevanagari',
167
167
  latin: 'EudoxusSans',
168
- greek: 'NotoSans',
169
- japanese: 'NotoSans',
170
- korean: 'NotoSans',
171
- thai: 'NotoSans',
172
- hebrew: 'NotoSans',
168
+ japanese: 'NotoSansJP',
169
+ thai: 'NotoSansThai',
173
170
  khmer: 'KhmerOSContent',
174
- bengali: null,
175
171
  telugu: 'AnekTelugu',
176
172
  burmese: 'Padauk',
173
+ uyghur: 'UKIJ Tuz',
174
+ greek: null,
175
+ bengali: null,
176
+ hebrew: null,
177
+ korean: null,
177
178
  geez: null,
178
179
  georgian: null,
179
180
  gujarati: null,
@@ -181,7 +182,6 @@ exports.fonts = {
181
182
  malayalam: null,
182
183
  tamil: null,
183
184
  gurmukhi: null,
184
- uyghur: 'UKIJ Tuz',
185
185
  };
186
186
  /**
187
187
  * Get the font family for a given script and weight.
@@ -22,6 +22,18 @@ export interface GetChapterParams {
22
22
  bibleId: string;
23
23
  }
24
24
  export type GetChapter = (params: GetChapterParams) => Promise<BibleChapter | undefined>;
25
+ interface GetScripturePassageParams {
26
+ bibleId: string;
27
+ bibleFallbackId: string | undefined;
28
+ passageId: string;
29
+ getChapter: GetChapter;
30
+ languageInfo: LanguageInfo;
31
+ }
32
+ /**
33
+ * Gets a scripture passage by extracting verses from chapters This is the core
34
+ * parsing logic, independent of the data source
35
+ */
36
+ export declare function getScripturePassage({ bibleId, bibleFallbackId, passageId, getChapter, languageInfo, }: GetScripturePassageParams): Promise<ScripturePassage | undefined>;
25
37
  interface GetLessonScriptureParams {
26
38
  bibleId: string;
27
39
  bibleFallbackId: string | undefined;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPassagesString = getPassagesString;
4
+ exports.getScripturePassage = getScripturePassage;
4
5
  exports.getLessonScripture = getLessonScripture;
5
6
  exports.parseBibleSnapshot = parseBibleSnapshot;
6
7
  exports.verseToSuperscript = verseToSuperscript;
@@ -223,6 +223,9 @@ function getLessonInfo({ lessonId, meetLanguageInfo, setInfo, t, }) {
223
223
  };
224
224
  }
225
225
  else {
226
+ const lessonFileName = `${meetLanguageInfo.languageId}.${lessonId}.mp3`;
227
+ const totalDuration = mediaDurations_1.mediaDurations[meetLanguageId]?.lessons?.[lessonFileName] ?? 0;
228
+ const sectionTimings = calculateSectionTimings(sections, totalDuration, meetLanguageId);
226
229
  return {
227
230
  type: 'dbs',
228
231
  ...baseInfo,
@@ -243,6 +246,7 @@ function getLessonInfo({ lessonId, meetLanguageInfo, setInfo, t, }) {
243
246
  `?alt=media`,
244
247
  },
245
248
  passagesString: (0, scripturePassages_1.getPassagesString)(lesson.s, meetLanguageInfo),
249
+ sectionTimings,
246
250
  };
247
251
  }
248
252
  }
@@ -55,7 +55,6 @@ declare const _default: Record<string, {
55
55
  about: string;
56
56
  add_language: string;
57
57
  all_languages: string;
58
- app_store_listing_title: string;
59
58
  app_store_listing_description: string;
60
59
  app_store_listing_screenshot_foundations: string;
61
60
  app_store_listing_screenshot_languages: string;
@@ -68,6 +67,7 @@ declare const _default: Record<string, {
68
67
  app_store_listing_screenshot_testimonial: string;
69
68
  app_store_listing_screenshot_topics: string;
70
69
  app_store_listing_subtitle: string;
70
+ app_store_listing_title: string;
71
71
  appearance: string;
72
72
  application: string;
73
73
  article_categories_65004e85fba2e8c9d281a73e: string;
@@ -126,6 +126,8 @@ declare const _default: Record<string, {
126
126
  enter_passcode: string;
127
127
  favorites: string;
128
128
  fellowship: string;
129
+ fetch_bible_error: string;
130
+ fetch_bible_no_internet: string;
129
131
  filter_articles: string;
130
132
  font_size: string;
131
133
  get_started_foundations: string;
@@ -142,6 +144,7 @@ declare const _default: Record<string, {
142
144
  internet_required_download: string;
143
145
  internet_required_download_share: string;
144
146
  introduction: string;
147
+ language_names: Record<string, string>;
145
148
  language_types_app_interface: string;
146
149
  language_types_meet: string;
147
150
  language_types_meet_primary: string;
@@ -177,29 +180,29 @@ declare const _default: Record<string, {
177
180
  popups_app_interface_help: string;
178
181
  popups_casting_stop_confirm: string;
179
182
  popups_code_request_success_message: string;
180
- popups_codes_no_match_title: string;
181
183
  popups_codes_no_match_message: string;
184
+ popups_codes_no_match_title: string;
182
185
  popups_foundations_description_believer: string;
183
186
  popups_foundations_description_seeker: string;
184
- popups_group_help_title: string;
185
187
  popups_group_help_message: string;
188
+ popups_group_help_title: string;
186
189
  popups_meet_help: string;
187
- popups_notification_opt_in_title: string;
188
190
  popups_notification_opt_in_message: string;
189
- popups_play_help_title: string;
191
+ popups_notification_opt_in_title: string;
190
192
  popups_play_help_message: string;
191
- popups_remove_meeting_title: string;
193
+ popups_play_help_title: string;
192
194
  popups_remove_meeting_message: string;
193
- popups_submit_feedback_error_title: string;
195
+ popups_remove_meeting_title: string;
194
196
  popups_submit_feedback_error_message: string;
195
- popups_submit_feedback_success_title: string;
197
+ popups_submit_feedback_error_title: string;
196
198
  popups_submit_feedback_success_message: string;
199
+ popups_submit_feedback_success_title: string;
197
200
  popups_topics_description: string;
198
201
  popups_training_description_believer: string;
199
- popups_unlock_successful_title: string;
200
202
  popups_unlock_successful_message: string;
201
- popups_unlocked_learn_help_title: string;
203
+ popups_unlock_successful_title: string;
202
204
  popups_unlocked_learn_help_message: string;
205
+ popups_unlocked_learn_help_title: string;
203
206
  popups_watch_on_youtube_blurb: string;
204
207
  privacy_policy: string;
205
208
  question: string;
@@ -229,6 +232,7 @@ declare const _default: Record<string, {
229
232
  report_problem_help: string;
230
233
  request_passcode: string;
231
234
  required: string;
235
+ retry: string;
232
236
  return_home: string;
233
237
  save_and_close: string;
234
238
  search: string;
@@ -297,10 +301,9 @@ declare const _default: Record<string, {
297
301
  week: string;
298
302
  welcome_blurb: string;
299
303
  yes: string;
300
- retry: string;
301
- fetch_bible_no_internet: string;
302
- fetch_bible_error: string;
303
- language_names: Record<string, string>;
304
+ finish?: string | undefined;
305
+ later?: string | undefined;
306
+ notifications?: string | undefined;
304
307
  percent_available?: string | undefined;
305
308
  }>;
306
309
  export default _default;