@molecule/app-i18n-i18next 1.0.2 → 1.0.4

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/LICENSE CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  Apache License
2
3
  Version 2.0, January 2004
3
4
  http://www.apache.org/licenses/
@@ -34,21 +35,33 @@
34
35
 
35
36
  "Work" shall mean the work of authorship, whether in Source or
36
37
  Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work.
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
38
40
 
39
41
  "Derivative Works" shall mean any work, whether in Source or Object
40
42
  form, that is based on (or derived from) the Work and for which the
41
43
  editorial revisions, annotations, elaborations, or other modifications
42
- represent, as a whole, an original work of authorship.
43
-
44
- "Contribution" shall mean any work of authorship, including the
45
- original version of the Work and any modifications or additions
46
- to that Work, that is intentionally submitted to the Licensor for
47
- inclusion in the Work by the copyright owner or by an individual or
48
- Legal Entity authorized to submit on behalf of the copyright owner.
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
49
62
 
50
63
  "Contributor" shall mean Licensor and any individual or Legal Entity
51
- on behalf of whom a Contribution has been received by the Licensor and
64
+ on behalf of whom a Contribution has been received by Licensor and
52
65
  subsequently incorporated within the Work.
53
66
 
54
67
  2. Grant of Copyright License. Subject to the terms and conditions of
@@ -61,8 +74,18 @@
61
74
  3. Grant of Patent License. Subject to the terms and conditions of
62
75
  this License, each Contributor hereby grants to You a perpetual,
63
76
  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
64
- patent license to make, have made, use, offer to sell, sell, import,
65
- and otherwise transfer the Work.
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
66
89
 
67
90
  4. Redistribution. You may reproduce and distribute copies of the
68
91
  Work or Derivative Works thereof in any medium, with or without
@@ -84,23 +107,87 @@
84
107
  (d) If the Work includes a "NOTICE" text file as part of its
85
108
  distribution, then any Derivative Works that You distribute must
86
109
  include a readable copy of the attribution notices contained
87
- within such NOTICE file.
88
-
89
- 5. Submission of Contributions.
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
90
138
 
91
139
  6. Trademarks. This License does not grant permission to use the trade
92
- names, trademarks, service marks, or product names of the Licensor.
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
93
143
 
94
144
  7. Disclaimer of Warranty. Unless required by applicable law or
95
- agreed to in writing, Licensor provides the Work on an "AS IS" BASIS,
96
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.
97
-
98
- 8. Limitation of Liability. In no event and under no legal theory shall
99
- any Contributor be liable to You for damages.
100
-
101
- 9. Accepting Warranty or Additional Liability.
102
-
103
- Copyright 2026 Molecule Dev, Inc.
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
104
191
 
105
192
  Licensed under the Apache License, Version 2.0 (the "License");
106
193
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -3,21 +3,21 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-08-04T01:51:01.207Z
6
+ Generated: 2026-10-25T09:04:07.246Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-i18n-i18next
10
10
 
11
- > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
12
- > It is written to be read by coding agents as much as by people, and is generated from this
13
- > package's source — edit `src/index.ts` JSDoc, not this file.
14
-
15
11
  Framework-agnostic i18next provider for molecule.dev.
16
12
 
17
13
  Implements the I18nProvider interface using i18next directly,
18
14
  without any framework-specific bindings. Suitable for Vue, Angular,
19
15
  Svelte, Solid, and any other framework.
20
16
 
17
+ > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
18
+ > It is written to be read by coding agents as much as by people, and is generated from this
19
+ > package's source — edit `src/index.ts` JSDoc, not this file.
20
+
21
21
  ## Quick Start
22
22
 
23
23
  ```typescript
@@ -49,31 +49,6 @@ npm install @molecule/app-i18n-i18next @molecule/app-i18n @molecule/app-logger i
49
49
 
50
50
  ### Interfaces
51
51
 
52
- #### `DateFormatOptions`
53
-
54
- Date format options.
55
-
56
- ```typescript
57
- interface DateFormatOptions {
58
- /**
59
- * Date style.
60
- */
61
- dateStyle?: 'full' | 'long' | 'medium' | 'short'
62
- /**
63
- * Time style.
64
- */
65
- timeStyle?: 'full' | 'long' | 'medium' | 'short'
66
- /**
67
- * Custom format string (implementation-specific).
68
- */
69
- format?: string
70
- /**
71
- * Relative time.
72
- */
73
- relative?: boolean
74
- }
75
- ```
76
-
77
52
  #### `I18nextProviderConfig`
78
53
 
79
54
  Configuration options for the i18next provider.
@@ -134,6 +109,104 @@ interface I18nextProviderConfig {
134
109
  }
135
110
  ```
136
111
 
112
+ #### `Translations`
113
+
114
+ Translation key/value map.
115
+
116
+ ```typescript
117
+ interface Translations {
118
+ [key: string]: string | Translations
119
+ }
120
+ ```
121
+
122
+ #### `LocaleConfig`
123
+
124
+ Configuration for a supported locale (code, display name, text direction, translations or lazy loader).
125
+
126
+ ```typescript
127
+ interface LocaleConfig {
128
+ /**
129
+ * Locale code (e.g., 'en-US', 'fr-FR').
130
+ */
131
+ code: string
132
+ /**
133
+ * Display name (e.g., 'English (US)', 'Francais').
134
+ */
135
+ name: string
136
+ /**
137
+ * Native display name.
138
+ */
139
+ nativeName?: string
140
+ /**
141
+ * Text direction.
142
+ */
143
+ direction?: 'ltr' | 'rtl'
144
+ /**
145
+ * Translations for this locale.
146
+ */
147
+ translations?: Translations
148
+ /**
149
+ * Lazy loader for translations. Called on first setLocale() to this locale.
150
+ * When provided, translations can be omitted and will be loaded on demand.
151
+ */
152
+ loader?: () => Promise<Translations>
153
+ }
154
+ ```
155
+
156
+ #### `NumberFormatOptions`
157
+
158
+ Number format options.
159
+
160
+ ```typescript
161
+ interface NumberFormatOptions {
162
+ /**
163
+ * Number style.
164
+ */
165
+ style?: 'decimal' | 'currency' | 'percent' | 'unit'
166
+ /**
167
+ * Currency code (for currency style).
168
+ */
169
+ currency?: string
170
+ /**
171
+ * Minimum fraction digits.
172
+ */
173
+ minimumFractionDigits?: number
174
+ /**
175
+ * Maximum fraction digits.
176
+ */
177
+ maximumFractionDigits?: number
178
+ /**
179
+ * Use grouping separators.
180
+ */
181
+ useGrouping?: boolean
182
+ }
183
+ ```
184
+
185
+ #### `DateFormatOptions`
186
+
187
+ Date format options.
188
+
189
+ ```typescript
190
+ interface DateFormatOptions {
191
+ /**
192
+ * Date style.
193
+ */
194
+ dateStyle?: 'full' | 'long' | 'medium' | 'short'
195
+ /**
196
+ * Time style.
197
+ */
198
+ timeStyle?: 'full' | 'long' | 'medium' | 'short'
199
+ /**
200
+ * Custom format string (implementation-specific).
201
+ */
202
+ format?: string
203
+ /**
204
+ * Relative time.
205
+ */
206
+ relative?: boolean
207
+ }
208
+ ```
209
+
137
210
  #### `I18nProvider`
138
211
 
139
212
  i18n provider interface.
@@ -265,6 +338,27 @@ interface I18nProvider {
265
338
  * @returns An unsubscribe function.
266
339
  */
267
340
  onLocaleChange(listener: (locale: string) => void): () => void
341
+ /**
342
+ * Gets a counter that advances for every change `onLocaleChange` announces:
343
+ * a locale switch, a locale-list change, or translations added for a locale
344
+ * `t()` reads (the active locale and the locales it falls back to — English
345
+ * for `createSimpleI18nProvider`). It does NOT advance for a re-registration
346
+ * that leaves every rendered string identical.
347
+ *
348
+ * **Optional — read it only when present.** A consumer that observes the
349
+ * provider through `useSyncExternalStore` (the React hooks do) compares this
350
+ * value across renders, so it also sees a change that happened before its
351
+ * listener existed: a notification fired from a child's or an earlier
352
+ * sibling's layout effect, or while React kept the tree hidden with its
353
+ * effects unmounted. Providers written before this method existed keep the
354
+ * listener-only behaviour; consumers must fall back to counting
355
+ * notifications.
356
+ *
357
+ * Reads must be side-effect free, and the value must never decrease.
358
+ *
359
+ * @returns The provider's current revision.
360
+ */
361
+ getRevision?(): number
268
362
  /**
269
363
  * Gets the text direction for the current locale.
270
364
  *
@@ -294,79 +388,6 @@ interface I18nProvider {
294
388
  }
295
389
  ```
296
390
 
297
- #### `LocaleConfig`
298
-
299
- Configuration for a supported locale (code, display name, text direction, translations or lazy loader).
300
-
301
- ```typescript
302
- interface LocaleConfig {
303
- /**
304
- * Locale code (e.g., 'en-US', 'fr-FR').
305
- */
306
- code: string
307
- /**
308
- * Display name (e.g., 'English (US)', 'Francais').
309
- */
310
- name: string
311
- /**
312
- * Native display name.
313
- */
314
- nativeName?: string
315
- /**
316
- * Text direction.
317
- */
318
- direction?: 'ltr' | 'rtl'
319
- /**
320
- * Translations for this locale.
321
- */
322
- translations?: Translations
323
- /**
324
- * Lazy loader for translations. Called on first setLocale() to this locale.
325
- * When provided, translations can be omitted and will be loaded on demand.
326
- */
327
- loader?: () => Promise<Translations>
328
- }
329
- ```
330
-
331
- #### `NumberFormatOptions`
332
-
333
- Number format options.
334
-
335
- ```typescript
336
- interface NumberFormatOptions {
337
- /**
338
- * Number style.
339
- */
340
- style?: 'decimal' | 'currency' | 'percent' | 'unit'
341
- /**
342
- * Currency code (for currency style).
343
- */
344
- currency?: string
345
- /**
346
- * Minimum fraction digits.
347
- */
348
- minimumFractionDigits?: number
349
- /**
350
- * Maximum fraction digits.
351
- */
352
- maximumFractionDigits?: number
353
- /**
354
- * Use grouping separators.
355
- */
356
- useGrouping?: boolean
357
- }
358
- ```
359
-
360
- #### `Translations`
361
-
362
- Translation key/value map.
363
-
364
- ```typescript
365
- interface Translations {
366
- [key: string]: string | Translations
367
- }
368
- ```
369
-
370
391
  ### Types
371
392
 
372
393
  #### `InterpolationValues`
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAgB,EAAE,KAAK,IAAI,IAAI,YAAY,EAAoB,MAAM,SAAS,CAAA;AAK9E,OAAO,KAAK,EAEV,qBAAqB,EACrB,YAAY,EAKb,MAAM,YAAY,CAAA;AAmBnB;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAChC,SAAQ,qBAA0B,KACjC,YAAY,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CA8atE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ;UAnbK,YAAY;gBAAc,MAAM,OAAO,CAAC,IAAI,CAAC;CAmbxB,CAAA"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAgB,EAAE,KAAK,IAAI,IAAI,YAAY,EAAoB,MAAM,SAAS,CAAA;AAK9E,OAAO,KAAK,EAEV,qBAAqB,EACrB,YAAY,EAKb,MAAM,YAAY,CAAA;AAuCnB;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAChC,SAAQ,qBAA0B,KACjC,YAAY,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAmetE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ;UAxeK,YAAY;gBAAc,MAAM,OAAO,CAAC,IAAI,CAAC;CAwexB,CAAA"}
package/dist/provider.js CHANGED
@@ -25,6 +25,24 @@ const UNIT_MS = {
25
25
  quarter: 7_776_000_000,
26
26
  year: 31_536_000_000,
27
27
  };
28
+ /**
29
+ * Whether merging `source` into `target` (as i18next's deep merge does) changes
30
+ * any translated string.
31
+ *
32
+ * @param target - Translations already in the store.
33
+ * @param source - Translations being added.
34
+ * @returns `true` when at least one value would change.
35
+ */
36
+ const changesText = (target, source) => Object.keys(source).some((key) => {
37
+ const next = source[key];
38
+ const current = target[key];
39
+ return typeof next === 'object' &&
40
+ next !== null &&
41
+ typeof current === 'object' &&
42
+ current !== null
43
+ ? changesText(current, next)
44
+ : current !== next;
45
+ });
28
46
  /**
29
47
  * Creates a framework-agnostic i18n provider backed by i18next. Supports eager and lazy-loaded
30
48
  * locale translations, browser language detection, custom plugins, and Intl-based number/date/list formatting.
@@ -115,6 +133,32 @@ export const createI18nextProvider = (config = {}) => {
115
133
  const pendingBundles = [];
116
134
  // Locale change listeners
117
135
  const listeners = new Set();
136
+ // Monotonic count of every change announced to listeners. It lives outside
137
+ // the listener set so a consumer that subscribes AFTER the change — a child's
138
+ // or an earlier sibling's layout effect, or a React Activity tree whose
139
+ // effects were unmounted while hidden — can still see that it happened. The
140
+ // React hooks include it in their `useSyncExternalStore` snapshot.
141
+ let revision = 0;
142
+ /**
143
+ * Announces one change: moves the revision and tells every listener.
144
+ *
145
+ * @param locale - The locale to report, defaulting to the active one (what
146
+ * `getLocale()` returns).
147
+ */
148
+ const notify = (locale = i18n.language || defaultLocale) => {
149
+ revision += 1;
150
+ listeners.forEach((listener) => listener(locale));
151
+ };
152
+ /**
153
+ * Whether `t()` currently reads text registered for `locale`. i18next
154
+ * resolves every key along `i18n.languages`: the active code, its base
155
+ * language (`pt-BR` → `pt`) and each configured fallback, whether it came
156
+ * from `fallbackLocale` or from `i18nextOptions.fallbackLng`.
157
+ *
158
+ * @param locale - The locale whose text changed.
159
+ * @returns `true` when that text can be on screen.
160
+ */
161
+ const readsLocale = (locale) => (i18n.languages ?? []).includes(locale);
118
162
  const doInitialize = async () => {
119
163
  const initOptions = {
120
164
  // When detection is enabled, `lng` MUST stay unset: i18next only consults
@@ -181,7 +225,7 @@ export const createI18nextProvider = (config = {}) => {
181
225
  // Listen for language changes
182
226
  i18n.on('languageChanged', (lng) => {
183
227
  applyDocumentLocale(lng);
184
- listeners.forEach((listener) => listener(lng));
228
+ notify(lng);
185
229
  });
186
230
  initialized = true;
187
231
  // Apply the initial (detected or default) locale to the document — the
@@ -196,7 +240,12 @@ export const createI18nextProvider = (config = {}) => {
196
240
  };
197
241
  const initialize = () => {
198
242
  if (!initPromise) {
199
- initPromise = doInitialize();
243
+ // Settling init is itself a change no listener has heard: the language an
244
+ // asynchronous detector settled on (its `languageChanged` fired before the
245
+ // listener above existed), a lazily loaded locale and the replayed startup
246
+ // bundles all land here, after a first render may have shown fallback
247
+ // text. Announce it once, whether init succeeded or failed.
248
+ initPromise = doInitialize().finally(() => notify());
200
249
  }
201
250
  return initPromise;
202
251
  };
@@ -255,7 +304,7 @@ export const createI18nextProvider = (config = {}) => {
255
304
  });
256
305
  }
257
306
  i18n.addResourceBundle(config.code, 'translation', config.translations ?? {}, true, true);
258
- listeners.forEach((listener) => listener(i18n.language));
307
+ notify();
259
308
  },
260
309
  removeLocale(code) {
261
310
  const removed = localeConfigs.delete(code);
@@ -268,7 +317,7 @@ export const createI18nextProvider = (config = {}) => {
268
317
  pendingBundles.splice(i, 1);
269
318
  }
270
319
  i18n.removeResourceBundle(code, 'translation');
271
- listeners.forEach((listener) => listener(i18n.language));
320
+ notify();
272
321
  }
273
322
  return removed;
274
323
  },
@@ -276,6 +325,12 @@ export const createI18nextProvider = (config = {}) => {
276
325
  if (!initialized) {
277
326
  pendingBundles.push({ lng: locale, ns: namespace, translations });
278
327
  }
328
+ // Read the store BEFORE merging: i18next deep-merges into the bundle it
329
+ // returns here, so afterwards "was anything different?" is unanswerable.
330
+ // The store exists from creation on (`init()` starts synchronously), so
331
+ // this also holds while init is still settling.
332
+ const stored = (i18n.getResourceBundle(locale, namespace) ?? {});
333
+ const changed = changesText(stored, translations);
279
334
  i18n.addResourceBundle(locale, namespace, translations, true, true);
280
335
  // Auto-register the locale's metadata entry if it doesn't exist yet —
281
336
  // mirrors the api-i18n-simple bond and the app-i18n core provider,
@@ -285,8 +340,10 @@ export const createI18nextProvider = (config = {}) => {
285
340
  // never satisfies setLocale()'s "is this locale registered?" check,
286
341
  // and getLocales() silently omits it too.
287
342
  let existing = localeConfigs.get(locale);
343
+ let createdLocale = false;
288
344
  if (!existing) {
289
345
  existing = { code: locale, name: locale, translations: {} };
346
+ createdLocale = true;
290
347
  localeConfigs.set(locale, existing);
291
348
  registerSupportedLng(locale);
292
349
  }
@@ -294,11 +351,18 @@ export const createI18nextProvider = (config = {}) => {
294
351
  ...existing.translations,
295
352
  ...translations,
296
353
  };
297
- // Notify listeners when translations are added for the active locale
298
- // so that UI components re-render with the new content.
299
- if (locale === i18n.language) {
300
- listeners.forEach((listener) => listener(locale));
301
- }
354
+ // Notify AFTER the merge: subscribers must read the new keys.
355
+ // - a brand-new locale is announced so language pickers show it;
356
+ // - changed text that `t()` reads (`readsLocale`: the active locale, its
357
+ // base language and the fallbacks) is announced so mounted components
358
+ // re-render instead of showing the previous string;
359
+ // - re-registering text that is already there changes nothing on screen,
360
+ // so it stays quiet — re-rendering every subscriber for it would make a
361
+ // component that registers its own text while rendering loop forever.
362
+ // This holds before init settles too; the end of init is announced once
363
+ // more for whatever it delivered (see `initialize`).
364
+ if (createdLocale || (changed && readsLocale(locale)))
365
+ notify();
302
366
  },
303
367
  t(key, values, options) {
304
368
  const opts = { ...values };
@@ -381,6 +445,9 @@ export const createI18nextProvider = (config = {}) => {
381
445
  listeners.add(listener);
382
446
  return () => listeners.delete(listener);
383
447
  },
448
+ getRevision() {
449
+ return revision;
450
+ },
384
451
  getDirection() {
385
452
  const locale = i18n.language;
386
453
  const config = localeConfigs.get(locale);
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,OAAwD,MAAM,SAAS,CAAA;AAC9E,OAAO,gBAAgB,MAAM,k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D,CAAC;KACF,CAAA;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,qBAAqB,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@molecule/app-i18n-i18next",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Framework-agnostic i18next provider for molecule.dev",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
9
  "build": "tsc",
10
- "test": "vitest run"
10
+ "pretest": "npm run typecheck:tests",
11
+ "test": "vitest run",
12
+ "typecheck:tests": "tsc -p tsconfig.tests.json"
11
13
  },
12
14
  "exports": {
13
15
  ".": {
@@ -21,13 +23,13 @@
21
23
  ],
22
24
  "license": "Apache-2.0",
23
25
  "dependencies": {
24
- "i18next": "26.3.6",
25
- "i18next-browser-languagedetector": "8.2.1"
26
+ "i18next": "26.5.7",
27
+ "i18next-browser-languagedetector": "8.2.2"
26
28
  },
27
29
  "devDependencies": {
28
- "@types/node": "26.1.2",
30
+ "@types/node": "26.6.5",
29
31
  "typescript": "6.0.3",
30
- "vitest": "4.1.11"
32
+ "vitest": "4.1.12"
31
33
  },
32
34
  "peerDependencies": {
33
35
  "@molecule/app-i18n": "^1.0.1",