@generaltranslation/react-core 11.0.0-odysseus.9 → 11.0.0

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 (217) hide show
  1. package/CHANGELOG.md +241 -0
  2. package/dist/components/branches/Plural.shared.cjs +1 -1
  3. package/dist/components/branches/Plural.shared.cjs.map +1 -1
  4. package/dist/components/branches/Plural.shared.mjs +1 -1
  5. package/dist/components/branches/Plural.shared.mjs.map +1 -1
  6. package/dist/components/helpers/InternalLocaleSelector.cjs +1 -1
  7. package/dist/components/helpers/InternalLocaleSelector.cjs.map +1 -1
  8. package/dist/components/helpers/InternalLocaleSelector.mjs +1 -1
  9. package/dist/components/helpers/InternalRegionSelector.cjs +1 -1
  10. package/dist/components/helpers/InternalRegionSelector.cjs.map +1 -1
  11. package/dist/components/helpers/InternalRegionSelector.mjs +1 -1
  12. package/dist/components/translation/T.cjs +1 -1
  13. package/dist/components/translation/T.cjs.map +1 -1
  14. package/dist/components/translation/T.mjs +1 -1
  15. package/dist/components/translation/T.mjs.map +1 -1
  16. package/dist/components/translation/T.rsc.cjs +1 -1
  17. package/dist/components/translation/T.rsc.cjs.map +1 -1
  18. package/dist/components/translation/T.rsc.mjs +1 -1
  19. package/dist/components/translation/T.rsc.mjs.map +1 -1
  20. package/dist/components-rsc.cjs +1 -1
  21. package/dist/components-rsc.d.ts +5 -5
  22. package/dist/components-rsc.mjs +1 -1
  23. package/dist/condition-store/singleton-operations.cjs +1 -1
  24. package/dist/condition-store/singleton-operations.cjs.map +1 -1
  25. package/dist/condition-store/singleton-operations.d.ts +2 -7
  26. package/dist/condition-store/singleton-operations.d.ts.map +1 -1
  27. package/dist/condition-store/singleton-operations.mjs +1 -1
  28. package/dist/condition-store/singleton-operations.mjs.map +1 -1
  29. package/dist/context/InternalGTProvider.cjs +1 -1
  30. package/dist/context/InternalGTProvider.mjs +1 -1
  31. package/dist/context/context.cjs +1 -1
  32. package/dist/context/context.cjs.map +1 -1
  33. package/dist/context/context.mjs +1 -1
  34. package/dist/context/context.mjs.map +1 -1
  35. package/dist/functions/translation/t.cjs +1 -1
  36. package/dist/functions/translation/t.cjs.map +1 -1
  37. package/dist/functions/translation/t.d.ts.map +1 -1
  38. package/dist/functions/translation/t.mjs +1 -1
  39. package/dist/functions/translation/t.mjs.map +1 -1
  40. package/dist/hooks/condition-store.cjs +1 -1
  41. package/dist/hooks/condition-store.cjs.map +1 -1
  42. package/dist/hooks/condition-store.mjs +1 -1
  43. package/dist/hooks/condition-store.mjs.map +1 -1
  44. package/dist/hooks/external-store/useSubscribeToTrackedLookups.cjs +2 -0
  45. package/dist/hooks/external-store/useSubscribeToTrackedLookups.cjs.map +1 -0
  46. package/dist/hooks/external-store/useSubscribeToTrackedLookups.mjs +2 -0
  47. package/dist/hooks/external-store/useSubscribeToTrackedLookups.mjs.map +1 -0
  48. package/dist/hooks/external-store/useTrackedDictionaryObjResolver.cjs +1 -1
  49. package/dist/hooks/external-store/useTrackedDictionaryObjResolver.cjs.map +1 -1
  50. package/dist/hooks/external-store/useTrackedDictionaryObjResolver.mjs +1 -1
  51. package/dist/hooks/external-store/useTrackedDictionaryObjResolver.mjs.map +1 -1
  52. package/dist/hooks/external-store/useTrackedDictionaryResolver.cjs +1 -1
  53. package/dist/hooks/external-store/useTrackedDictionaryResolver.cjs.map +1 -1
  54. package/dist/hooks/external-store/useTrackedDictionaryResolver.mjs +1 -1
  55. package/dist/hooks/external-store/useTrackedDictionaryResolver.mjs.map +1 -1
  56. package/dist/hooks/external-store/useTrackedTranslationResolver.cjs +1 -1
  57. package/dist/hooks/external-store/useTrackedTranslationResolver.cjs.map +1 -1
  58. package/dist/hooks/external-store/useTrackedTranslationResolver.d.ts.map +1 -1
  59. package/dist/hooks/external-store/useTrackedTranslationResolver.mjs +1 -1
  60. package/dist/hooks/external-store/useTrackedTranslationResolver.mjs.map +1 -1
  61. package/dist/hooks/external-store.cjs +1 -1
  62. package/dist/hooks/external-store.cjs.map +1 -1
  63. package/dist/hooks/external-store.mjs +1 -1
  64. package/dist/hooks/external-store.mjs.map +1 -1
  65. package/dist/hooks/i18n-config.cjs +1 -1
  66. package/dist/hooks/i18n-config.mjs +1 -1
  67. package/dist/hooks/useGT.cjs +1 -1
  68. package/dist/hooks/useGT.cjs.map +1 -1
  69. package/dist/hooks/useGT.mjs +1 -1
  70. package/dist/hooks/useGT.mjs.map +1 -1
  71. package/dist/hooks/useInternalLocaleSelector.cjs +1 -1
  72. package/dist/hooks/useInternalLocaleSelector.cjs.map +1 -1
  73. package/dist/hooks/useInternalLocaleSelector.d.ts +5 -4
  74. package/dist/hooks/useInternalLocaleSelector.d.ts.map +1 -1
  75. package/dist/hooks/useInternalLocaleSelector.mjs +1 -1
  76. package/dist/hooks/useInternalLocaleSelector.mjs.map +1 -1
  77. package/dist/hooks/useInternalRegionSelector.cjs +1 -1
  78. package/dist/hooks/useInternalRegionSelector.cjs.map +1 -1
  79. package/dist/hooks/useInternalRegionSelector.d.ts +9 -8
  80. package/dist/hooks/useInternalRegionSelector.d.ts.map +1 -1
  81. package/dist/hooks/useInternalRegionSelector.mjs +1 -1
  82. package/dist/hooks/useInternalRegionSelector.mjs.map +1 -1
  83. package/dist/hooks/useMessages.cjs +1 -1
  84. package/dist/hooks/useMessages.mjs +1 -1
  85. package/dist/hooks/useTranslations.cjs +1 -1
  86. package/dist/hooks/useTranslations.mjs +1 -1
  87. package/dist/hooks/utils/getShouldTranslate.cjs +1 -1
  88. package/dist/hooks/utils/getShouldTranslate.cjs.map +1 -1
  89. package/dist/hooks/utils/getShouldTranslate.mjs +1 -1
  90. package/dist/hooks/utils/getShouldTranslate.mjs.map +1 -1
  91. package/dist/hooks/utils/missing-translation.cjs +1 -1
  92. package/dist/hooks/utils/missing-translation.cjs.map +1 -1
  93. package/dist/hooks/utils/missing-translation.mjs +1 -1
  94. package/dist/hooks/utils/missing-translation.mjs.map +1 -1
  95. package/dist/hooks/utils.cjs +1 -1
  96. package/dist/hooks/utils.cjs.map +1 -1
  97. package/dist/hooks/utils.d.ts +2 -6
  98. package/dist/hooks/utils.d.ts.map +1 -1
  99. package/dist/hooks/utils.mjs +1 -1
  100. package/dist/hooks/utils.mjs.map +1 -1
  101. package/dist/hooks.cjs +1 -1
  102. package/dist/hooks.d.ts +4 -4
  103. package/dist/hooks.mjs +1 -1
  104. package/dist/i18n-cache/ReactI18nCache.cjs.map +1 -1
  105. package/dist/i18n-cache/ReactI18nCache.d.ts +1 -1
  106. package/dist/i18n-cache/ReactI18nCache.d.ts.map +1 -1
  107. package/dist/i18n-cache/ReactI18nCache.mjs.map +1 -1
  108. package/dist/i18n-store/I18nStore.cjs.map +1 -1
  109. package/dist/i18n-store/I18nStore.d.ts.map +1 -1
  110. package/dist/i18n-store/I18nStore.mjs.map +1 -1
  111. package/dist/i18n-store/singleton-operations.cjs +1 -1
  112. package/dist/i18n-store/singleton-operations.cjs.map +1 -1
  113. package/dist/i18n-store/singleton-operations.d.ts +2 -4
  114. package/dist/i18n-store/singleton-operations.d.ts.map +1 -1
  115. package/dist/i18n-store/singleton-operations.mjs +1 -1
  116. package/dist/i18n-store/singleton-operations.mjs.map +1 -1
  117. package/dist/i18n-store/storeTypes.d.ts +2 -1
  118. package/dist/i18n-store/storeTypes.d.ts.map +1 -1
  119. package/dist/pure.cjs +1 -1
  120. package/dist/pure.d.ts +7 -21
  121. package/dist/pure.mjs +1 -1
  122. package/dist/setup/i18nConfig.cjs +1 -1
  123. package/dist/setup/i18nConfig.cjs.map +1 -1
  124. package/dist/setup/i18nConfig.d.ts +31 -4
  125. package/dist/setup/i18nConfig.d.ts.map +1 -1
  126. package/dist/setup/i18nConfig.mjs +1 -1
  127. package/dist/setup/i18nConfig.mjs.map +1 -1
  128. package/dist/setup/initializeGTSRA.cjs +1 -1
  129. package/dist/setup/initializeGTSRA.cjs.map +1 -1
  130. package/dist/setup/initializeGTSRA.d.ts +2 -2
  131. package/dist/setup/initializeGTSRA.d.ts.map +1 -1
  132. package/dist/setup/initializeGTSRA.mjs +1 -1
  133. package/dist/setup/initializeGTSRA.mjs.map +1 -1
  134. package/dist/utils/rendering/createRenderPipeline.cjs +1 -1
  135. package/dist/utils/rendering/createRenderPipeline.cjs.map +1 -1
  136. package/dist/utils/rendering/createRenderPipeline.d.ts +2 -2
  137. package/dist/utils/rendering/createRenderPipeline.mjs +1 -1
  138. package/dist/utils/rendering/createRenderPipeline.mjs.map +1 -1
  139. package/dist/utils/rendering/renderDefaultChildren.shared.cjs +1 -1
  140. package/dist/utils/rendering/renderDefaultChildren.shared.cjs.map +1 -1
  141. package/dist/utils/rendering/renderDefaultChildren.shared.mjs +1 -1
  142. package/dist/utils/rendering/renderDefaultChildren.shared.mjs.map +1 -1
  143. package/dist/utils/rendering/renderPipeline.rsc.d.ts +1 -1
  144. package/dist/utils/rendering/renderPreparedT.shared.cjs +1 -1
  145. package/dist/utils/rendering/renderPreparedT.shared.cjs.map +1 -1
  146. package/dist/utils/rendering/renderPreparedT.shared.mjs +1 -1
  147. package/dist/utils/rendering/renderPreparedT.shared.mjs.map +1 -1
  148. package/dist/utils/rendering/renderTranslatedChildren.shared.cjs +1 -1
  149. package/dist/utils/rendering/renderTranslatedChildren.shared.cjs.map +1 -1
  150. package/dist/utils/rendering/renderTranslatedChildren.shared.mjs +1 -1
  151. package/dist/utils/rendering/renderTranslatedChildren.shared.mjs.map +1 -1
  152. package/dist/utils/translation/prepareT.shared.cjs +1 -1
  153. package/dist/utils/translation/prepareT.shared.cjs.map +1 -1
  154. package/dist/utils/translation/prepareT.shared.mjs +1 -1
  155. package/dist/utils/translation/prepareT.shared.mjs.map +1 -1
  156. package/dist/utils/translation/usePrepareT.cjs +1 -1
  157. package/dist/utils/translation/usePrepareT.mjs +1 -1
  158. package/dist/utils/types.d.ts +1 -43
  159. package/dist/utils/types.d.ts.map +1 -1
  160. package/package.json +5 -33
  161. package/dist/cookies.cjs +0 -1
  162. package/dist/cookies.d.ts +0 -2
  163. package/dist/cookies.mjs +0 -1
  164. package/dist/setup/initializeGTSPA.cjs +0 -2
  165. package/dist/setup/initializeGTSPA.cjs.map +0 -1
  166. package/dist/setup/initializeGTSPA.d.ts +0 -16
  167. package/dist/setup/initializeGTSPA.d.ts.map +0 -1
  168. package/dist/setup/initializeGTSPA.mjs +0 -2
  169. package/dist/setup/initializeGTSPA.mjs.map +0 -1
  170. package/dist/utils/cookies.cjs +0 -2
  171. package/dist/utils/cookies.cjs.map +0 -1
  172. package/dist/utils/cookies.d.ts +0 -16
  173. package/dist/utils/cookies.d.ts.map +0 -1
  174. package/dist/utils/cookies.mjs +0 -2
  175. package/dist/utils/cookies.mjs.map +0 -1
  176. package/dist/utils/dictionaries/flattenDictionary.cjs +0 -2
  177. package/dist/utils/dictionaries/flattenDictionary.cjs.map +0 -1
  178. package/dist/utils/dictionaries/flattenDictionary.d.ts +0 -15
  179. package/dist/utils/dictionaries/flattenDictionary.d.ts.map +0 -1
  180. package/dist/utils/dictionaries/flattenDictionary.mjs +0 -2
  181. package/dist/utils/dictionaries/flattenDictionary.mjs.map +0 -1
  182. package/dist/utils/dictionaries/getDictionaryEntry.cjs +0 -2
  183. package/dist/utils/dictionaries/getDictionaryEntry.cjs.map +0 -1
  184. package/dist/utils/dictionaries/getDictionaryEntry.d.ts +0 -8
  185. package/dist/utils/dictionaries/getDictionaryEntry.d.ts.map +0 -1
  186. package/dist/utils/dictionaries/getDictionaryEntry.mjs +0 -2
  187. package/dist/utils/dictionaries/getDictionaryEntry.mjs.map +0 -1
  188. package/dist/utils/dictionaries/getEntryAndMetadata.cjs +0 -2
  189. package/dist/utils/dictionaries/getEntryAndMetadata.cjs.map +0 -1
  190. package/dist/utils/dictionaries/getEntryAndMetadata.d.ts +0 -10
  191. package/dist/utils/dictionaries/getEntryAndMetadata.d.ts.map +0 -1
  192. package/dist/utils/dictionaries/getEntryAndMetadata.mjs +0 -2
  193. package/dist/utils/dictionaries/getEntryAndMetadata.mjs.map +0 -1
  194. package/dist/utils/dictionaries/indexDict.cjs +0 -2
  195. package/dist/utils/dictionaries/indexDict.cjs.map +0 -1
  196. package/dist/utils/dictionaries/indexDict.mjs +0 -2
  197. package/dist/utils/dictionaries/indexDict.mjs.map +0 -1
  198. package/dist/utils/dictionaries/isDictionaryEntry.cjs +0 -2
  199. package/dist/utils/dictionaries/isDictionaryEntry.cjs.map +0 -1
  200. package/dist/utils/dictionaries/isDictionaryEntry.d.ts +0 -12
  201. package/dist/utils/dictionaries/isDictionaryEntry.d.ts.map +0 -1
  202. package/dist/utils/dictionaries/isDictionaryEntry.mjs +0 -2
  203. package/dist/utils/dictionaries/isDictionaryEntry.mjs.map +0 -1
  204. package/dist/utils/dictionaries/mergeDictionaries.cjs +0 -2
  205. package/dist/utils/dictionaries/mergeDictionaries.cjs.map +0 -1
  206. package/dist/utils/dictionaries/mergeDictionaries.d.ts +0 -7
  207. package/dist/utils/dictionaries/mergeDictionaries.d.ts.map +0 -1
  208. package/dist/utils/dictionaries/mergeDictionaries.mjs +0 -2
  209. package/dist/utils/dictionaries/mergeDictionaries.mjs.map +0 -1
  210. package/dist/utils/internal/addGTIdentifier.d.ts +0 -8
  211. package/dist/utils/internal/addGTIdentifier.d.ts.map +0 -1
  212. package/dist/utils/internal/writeChildrenAsObjects.d.ts +0 -14
  213. package/dist/utils/internal/writeChildrenAsObjects.d.ts.map +0 -1
  214. package/dist/utils/variables/_getVariableProps.d.ts +0 -13
  215. package/dist/utils/variables/_getVariableProps.d.ts.map +0 -1
  216. package/dist/utils/variables/getVariableName.d.ts +0 -12
  217. package/dist/utils/variables/getVariableName.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,192 @@
1
1
  # @generaltranslation/react-core
2
2
 
3
+ ## 11.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#1816](https://github.com/generaltranslation/gt/pull/1816) [`463a8db`](https://github.com/generaltranslation/gt/commit/463a8dbb03bde35f2f229dfdabfe117197d4527b) Thanks [@bgub](https://github.com/bgub)! - Add a config-aware `resolveCanonicalLocale` helper and remove the public `getGTClass` helper.
8
+
9
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`e12fb17`](https://github.com/generaltranslation/gt/commit/e12fb17d41cfa5fa231e64fe70423434739ea985) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Prepare Odysseus major releases for core runtime packages.
10
+
11
+ - [#1816](https://github.com/generaltranslation/gt/pull/1816) [`463a8db`](https://github.com/generaltranslation/gt/commit/463a8dbb03bde35f2f229dfdabfe117197d4527b) Thanks [@bgub](https://github.com/bgub)! - Remove the deprecated `useGTClass` hook from public entry points.
12
+
13
+ - [#1821](https://github.com/generaltranslation/gt/pull/1821) [`40db0c5`](https://github.com/generaltranslation/gt/commit/40db0c54a58e82d693d8a16d19fe5071baabecdc) Thanks [@bgub](https://github.com/bgub)! - Remove `useVersionId` from public package entrypoints.
14
+
15
+ The `getVersionId` helper remains available from public function entrypoints and `gt-i18n/internal`.
16
+
17
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`8a2f7ee`](https://github.com/generaltranslation/gt/commit/8a2f7ee79f4b890fb1aaf47f42bb844334899793) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Simplify translation option types. Replace deprecated inline and dictionary option aliases with `GTTranslationOptions`, use interpolation variables for dictionary `t()` options, and trim higher-level type exports to avoid exposing internal translation option fields.
18
+
19
+ ### Patch Changes
20
+
21
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`37e0080`](https://github.com/generaltranslation/gt/commit/37e0080b2c072840cf6c0f1c66a8f0f3a54e17e5) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Add default form and accessibility labels to LocaleSelector.
22
+
23
+ - [#1815](https://github.com/generaltranslation/gt/pull/1815) [`1212135`](https://github.com/generaltranslation/gt/commit/1212135e4e09ed754756cac2805bc3a139408dc1) Thanks [@bgub](https://github.com/bgub)! - Clean up the `@generaltranslation/react-core` public API surface.
24
+ - `@generaltranslation/react-core`: Removed dead dictionary helper exports and source files, stopped exporting JSX serialization internals from `/pure`, dropped internal singleton/plumbing exports from `/pure`, removed `useShouldTranslate` from `/hooks`, and kept only `internalInitializeGTSRA` for the server-rendered initializer.
25
+ - `gt-react`: Aliases `internalInitializeGTSRA` locally from the RSC entrypoint so the public `initializeGT` export remains unchanged.
26
+ - `gt-next`: Replaced imports of removed react-core legacy types with equivalent local types.
27
+
28
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`04f419d`](https://github.com/generaltranslation/gt/commit/04f419d65e69db3eb4adb8ee6299c0ddee153135) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Fix source interpolation for default-locale string helpers.
29
+ Clarify that `tx()` does not apply ICU formatting by default.
30
+
31
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`72e9e16`](https://github.com/generaltranslation/gt/commit/72e9e1643797be8e4ae1453897fd0b023fce2674) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Split the runtime surface of the GT class (locale management, formatting, runtime translation) into a GTRuntime base class exported from the new `generaltranslation/runtime` entry point. The SDK runtime (gt-i18n's I18nConfig, gt-next middleware) now constructs GTRuntime, so production browser bundles no longer ship the project/file management API client (enqueueFiles, uploads, downloads, etc.). The GT class extends GTRuntime and keeps its full API for the CLI and other tooling. Also import getLocaleProperties from @generaltranslation/format directly in react-core so client bundles don't reach the full core entry.
32
+
33
+ - [#1811](https://github.com/generaltranslation/gt/pull/1811) [`bea8233`](https://github.com/generaltranslation/gt/commit/bea8233d8b055980483cb2e226157f6adcbd8c2b) Thanks [@bgub](https://github.com/bgub)! - Statically gate dev hot-reload code paths (tracked resolver invalidation, missing-translation queue, T hot-reload fallbacks, getGT dev preload) behind `process.env.NODE_ENV !== 'production'` so bundlers can drop them from production builds. Behavior is unchanged: the existing runtime `isDevHotReloadEnabled()` check still applies in development.
34
+
35
+ - [#1812](https://github.com/generaltranslation/gt/pull/1812) [`5736d58`](https://github.com/generaltranslation/gt/commit/5736d585b8285ef56cc6f412799308969ac786c0) Thanks [@bgub](https://github.com/bgub)! - Use production no-op stubs for dev hot-reload hooks so bundlers can drop more dev-only hot-reload code.
36
+
37
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`947fe0c`](https://github.com/generaltranslation/gt/commit/947fe0c97a2821a0980cd3e779252ea0078e80f8) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Fix `useVersionId()` throwing and `useLocaleDirection()` requiring a locale argument in the client and server entrypoints.
38
+
39
+ `useVersionId()` now returns the current version id (instead of throwing the react-core "not implemented" error), and `useLocaleDirection()` once again accepts an optional locale that defaults to the current locale. The shared implementation now lives in `@generaltranslation/react-core/hooks`, so `gt-react` and `gt-react-native` use the same behavior; the RSC entrypoint keeps its stricter signatures.
40
+
41
+ - [#1820](https://github.com/generaltranslation/gt/pull/1820) [`1f53e42`](https://github.com/generaltranslation/gt/commit/1f53e420e9a6475f85cf27e1cd0c9c89f4beeb36) Thanks [@bgub](https://github.com/bgub)! - Clean up the `gt-i18n` public API surface by removing dead subpaths, internal exports, and unused types.
42
+
43
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`b3bb391`](https://github.com/generaltranslation/gt/commit/b3bb391d33041680e2d62b6a7c9b05662946544f) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Store cookie names in I18nConfig so custom cookie names work before the condition store is initialized.
44
+ - `gt-i18n`: Removed the unused React locale cookie name from the shared GT config type.
45
+ - `@generaltranslation/react-core`: `ReactI18nConfig` now accepts `localeCookieName`, `regionCookieName`, and `enableI18nCookieName`, exposes getters that fall back to the default names, and exports the default storage names from the `pure` entrypoint.
46
+ - `gt-next`: Imports default cookie names from the React Core `pure` entrypoint instead of the removed React Core cookie constants subpath.
47
+ - `gt-react`: The browser condition store now resolves cookie names from `I18nConfig` instead of hardcoding the defaults, so custom cookie names passed to `initializeGT()` are honored for both reads and writes.
48
+ - `gt-react-native`: Native condition storage now resolves its store keys from `I18nConfig`, matching `gt-react` behavior.
49
+ - `gt-tanstack-start`: `parseLocale()` reads and writes the locale cookie using the configured cookie name instead of the default.
50
+
51
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`d48604e`](https://github.com/generaltranslation/gt/commit/d48604e2171aa84c76873cacb6eb8d43c2f17546) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Trigger an odysseus prerelease patch for all publishable packages.
52
+
53
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`44bc998`](https://github.com/generaltranslation/gt/commit/44bc998abf813ea4a96ade6c2632e1143034bd45) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Trigger a new Odysseus prerelease after updating the release workflow.
54
+
55
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`b7d44dc`](https://github.com/generaltranslation/gt/commit/b7d44dc2d79ac3332a0ed55da0ba130b6896f756) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Share render pipeline child renderers with prepared translation rendering.
56
+
57
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`9561761`](https://github.com/generaltranslation/gt/commit/9561761c3ab72a5e39327415b3274eccc63f4ffe) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Build `@generaltranslation/react-core` as unbundled, tree-shakeable modules.
58
+
59
+ Each entrypoint (`pure`, `hooks`, `components`, `components-rsc`, `cookies`) was previously emitted as a single pre-bundled, minified file, so a consumer importing one component pulled the entire entry. The package now builds unbundled (per-module) output in both ESM and CJS: entrypoints are thin re-export barrels over granular sibling modules, allowing a downstream bundler to drop unused components and hooks.
60
+
61
+ The build also stops inlining `generaltranslation`/`@generaltranslation/format` into react-core's output, so they resolve to their single shared copy instead of being duplicated in react-core (they are already loaded standalone). This removes the duplication and keeps the per-module declarations referencing the dependency packages directly, so inferred types stay portable for downstream packages.
62
+
63
+ When consumed via ESM (see the companion `gt-next` ESM change), tree-shaking plus de-duplication cuts react-core's client footprint substantially. Output filenames change from `*.cjs.min.cjs`/`*.esm.min.mjs` to `*.cjs`/`*.mjs` (resolved through the `exports` map, so no consumer-facing API change). The package-shape test is updated to assert the new unbundled layout.
64
+
65
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`72c6a85`](https://github.com/generaltranslation/gt/commit/72c6a85cc3ca025ebdeb006dbdd865e935ec77ae) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Add portable selector hook return types for React Native declarations.
66
+
67
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`3d95277`](https://github.com/generaltranslation/gt/commit/3d95277a057b28fffc73b3fa616210bdcb447e85) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Remove unused internal exports and dead utility code.
68
+
69
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`97dc7f4`](https://github.com/generaltranslation/gt/commit/97dc7f4818476a319a54b1519e994a62d5a9a3a5) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Remove default exports from package entrypoints and internal source modules.
70
+
71
+ Use named imports for affected public entrypoints, including `import { plugin } from 'gt-react-native/plugin'`. The `gt-next/link` entrypoint keeps its default export to match `next/link`.
72
+
73
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`85a0c19`](https://github.com/generaltranslation/gt/commit/85a0c1998a6500233affd8c1987551170584c782) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Remove the deprecated `internalInitializeGTSPA` export from `@generaltranslation/react-core/pure` and the downstream `gt-react` server/types surfaces. Use `initializeGTSPA` from `gt-react` for browser SPA initialization.
74
+
75
+ - [#1825](https://github.com/generaltranslation/gt/pull/1825) [`e343775`](https://github.com/generaltranslation/gt/commit/e343775d8a41ce3eea03dd319b90497a9744cc4f) Thanks [@bgub](https://github.com/bgub)! - Remove the accidental `useShouldTranslate` export from `@generaltranslation/react-core/hooks`. The hook is an internal implementation detail and was never meant to be public.
76
+
77
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`2c46baf`](https://github.com/generaltranslation/gt/commit/2c46baf137400613495e3fe2865865b5506edece) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Persist TanStack Start locale resolution through the browser locale cookie.
78
+ Allow React i18n config checks to work across bundled react-core entrypoints.
79
+
80
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`9e78cf0`](https://github.com/generaltranslation/gt/commit/9e78cf07db58bfe6063bcd0b217553176c9681bd) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Share tracked lookup subscription handling across resolver hooks.
81
+
82
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`338e5e8`](https://github.com/generaltranslation/gt/commit/338e5e8a42354c7d288d9be960ebd1d58adfd402) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Remove the unused dictionary-injection helpers from `@generaltranslation/react-core/pure`.
83
+
84
+ `collectUntranslatedEntries`, `injectAndMerge`, `injectEntry`, `injectFallbacks`, `injectHashes`, `injectTranslations`, `getSubtree`, `getSubtreeWithCreation`, and `stripMetadataFromEntries` were a self-referential cluster with no consumers anywhere in the library or its packages. Removing them (and their modules/tests) trims ~415 LOC of dead code from the client-shipped `/pure` entry. The still-used dictionary helpers (`getDictionaryEntry`, `getEntryAndMetadata`, `mergeDictionaries`, `flattenDictionary`, `indexDict`, `isDictionaryEntry`) are unchanged.
85
+
86
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`8834c51`](https://github.com/generaltranslation/gt/commit/8834c518ac84259706f2b603fd024ad13a9072ee) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Remove three unused exports from `@generaltranslation/react-core/pure`: `isVariableObject`, `renderSkeleton`, and `reactHasUse`. None had consumers anywhere in the libraries. Trims dead code from the client-shipped `/pure` entry.
87
+
88
+ - [#1439](https://github.com/generaltranslation/gt/pull/1439) [`195f009`](https://github.com/generaltranslation/gt/commit/195f00910c2a675a6f9da327e19e3d3c5e44e26b) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - fix: make singleton not-initialized errors consistent and descriptive, and stop error paths from masking the original failure when I18nConfig is also uninitialized
89
+
90
+ - Updated dependencies [[`463a8db`](https://github.com/generaltranslation/gt/commit/463a8dbb03bde35f2f229dfdabfe117197d4527b), [`8870496`](https://github.com/generaltranslation/gt/commit/88704963eb74e81401994681ce7cdae3ba91b6c0), [`b72c30b`](https://github.com/generaltranslation/gt/commit/b72c30bc603562310a51b656fb003f1486315a8a), [`72e9e16`](https://github.com/generaltranslation/gt/commit/72e9e1643797be8e4ae1453897fd0b023fce2674), [`42a440f`](https://github.com/generaltranslation/gt/commit/42a440ff3420bdbdb35ed24f9a5af1c9040eaf66), [`fd22c68`](https://github.com/generaltranslation/gt/commit/fd22c68978af50ce519dc06c7b887d3fa67181ae), [`bea8233`](https://github.com/generaltranslation/gt/commit/bea8233d8b055980483cb2e226157f6adcbd8c2b), [`8870496`](https://github.com/generaltranslation/gt/commit/88704963eb74e81401994681ce7cdae3ba91b6c0), [`04b5064`](https://github.com/generaltranslation/gt/commit/04b50645675abb9e927a82056b249b50f0907fcc), [`5adeede`](https://github.com/generaltranslation/gt/commit/5adeede157922d547a33a078d0f527f572c9a8b4), [`328795b`](https://github.com/generaltranslation/gt/commit/328795bf730296658a57b7132bbd1e0bbff2fd62), [`1f53e42`](https://github.com/generaltranslation/gt/commit/1f53e420e9a6475f85cf27e1cd0c9c89f4beeb36), [`b3bb391`](https://github.com/generaltranslation/gt/commit/b3bb391d33041680e2d62b6a7c9b05662946544f), [`d48604e`](https://github.com/generaltranslation/gt/commit/d48604e2171aa84c76873cacb6eb8d43c2f17546), [`88f3a2e`](https://github.com/generaltranslation/gt/commit/88f3a2e0f304fdd19891afac0b41954edc9497c6), [`e12fb17`](https://github.com/generaltranslation/gt/commit/e12fb17d41cfa5fa231e64fe70423434739ea985), [`5752fe8`](https://github.com/generaltranslation/gt/commit/5752fe81bf5b5deaae878638e0de99959bf719be), [`3d95277`](https://github.com/generaltranslation/gt/commit/3d95277a057b28fffc73b3fa616210bdcb447e85), [`97dc7f4`](https://github.com/generaltranslation/gt/commit/97dc7f4818476a319a54b1519e994a62d5a9a3a5), [`c1e0a0f`](https://github.com/generaltranslation/gt/commit/c1e0a0f837da440eeed84af10b553dee24bfc936), [`693288d`](https://github.com/generaltranslation/gt/commit/693288d632c42b923920a2fdd9ae2babc1bc28f5), [`8a2f7ee`](https://github.com/generaltranslation/gt/commit/8a2f7ee79f4b890fb1aaf47f42bb844334899793), [`c5364f9`](https://github.com/generaltranslation/gt/commit/c5364f977ffb4b387ad39206e6ed626bbeec56f3), [`2e85ebd`](https://github.com/generaltranslation/gt/commit/2e85ebd1528a4f99a8e36e1d8d6714a639040596), [`d5cf2d3`](https://github.com/generaltranslation/gt/commit/d5cf2d34f412ad49e8b2818fe788b870a5964d65), [`4986567`](https://github.com/generaltranslation/gt/commit/498656728741898a56ae348a536107bd92f95c04), [`795edc8`](https://github.com/generaltranslation/gt/commit/795edc8a2b3e91fc9801d726f4b5cd6fbbc98fb0), [`d863bcf`](https://github.com/generaltranslation/gt/commit/d863bcf05770c336c98b2b2fae8534c90f00df51), [`11ecf87`](https://github.com/generaltranslation/gt/commit/11ecf876a1221b9dbce9fc0c0f0804101558c8a7), [`03bae6d`](https://github.com/generaltranslation/gt/commit/03bae6d3b4791107781cb800c1ae7ac4f675705c), [`5d42608`](https://github.com/generaltranslation/gt/commit/5d426089f04f37dd7369620e9db3e6512f06eee8), [`9804aa4`](https://github.com/generaltranslation/gt/commit/9804aa460c07ec36d2e667d79a839720a1e011e8), [`2ca78ec`](https://github.com/generaltranslation/gt/commit/2ca78ec4805639c10c7b200c8dee660b55eddf15), [`195f009`](https://github.com/generaltranslation/gt/commit/195f00910c2a675a6f9da327e19e3d3c5e44e26b)]:
91
+ - gt-i18n@1.0.0
92
+ - generaltranslation@9.0.0
93
+ - @generaltranslation/format@0.1.2
94
+ - @generaltranslation/supported-locales@2.1.2
95
+
96
+ ## 11.0.0-odysseus.16
97
+
98
+ ### Major Changes
99
+
100
+ - 463a8db: Add a config-aware `resolveCanonicalLocale` helper and remove the public `getGTClass` helper.
101
+ - 463a8db: Remove the deprecated `useGTClass` hook from public entry points.
102
+ - 40db0c5: Remove `useVersionId` from public package entrypoints.
103
+
104
+ The `getVersionId` helper remains available from public function entrypoints and `gt-i18n/internal`.
105
+
106
+ ### Patch Changes
107
+
108
+ - bea8233: Statically gate dev hot-reload code paths (tracked resolver invalidation, missing-translation queue, T hot-reload fallbacks, getGT dev preload) behind `process.env.NODE_ENV !== 'production'` so bundlers can drop them from production builds. Behavior is unchanged: the existing runtime `isDevHotReloadEnabled()` check still applies in development.
109
+ - 5736d58: Use production no-op stubs for dev hot-reload hooks so bundlers can drop more dev-only hot-reload code.
110
+ - 1f53e42: Clean up the `gt-i18n` public API surface by removing dead subpaths, internal exports, and unused types.
111
+ - e343775: Remove the accidental `useShouldTranslate` export from `@generaltranslation/react-core/hooks`. The hook is an internal implementation detail and was never meant to be public.
112
+ - Updated dependencies [463a8db]
113
+ - Updated dependencies [b72c30b]
114
+ - Updated dependencies [bea8233]
115
+ - Updated dependencies [1f53e42]
116
+ - Updated dependencies [d5cf2d3]
117
+ - gt-i18n@1.0.0-odysseus.9
118
+ - generaltranslation@9.0.0-odysseus.6
119
+ - @generaltranslation/supported-locales@2.1.2-odysseus.6
120
+
121
+ ## 11.0.0-odysseus.15
122
+
123
+ ### Patch Changes
124
+
125
+ - 04f419d: Fix source interpolation for default-locale string helpers.
126
+ Clarify that `tx()` does not apply ICU formatting by default.
127
+ - 72e9e16: Split the runtime surface of the GT class (locale management, formatting, runtime translation) into a GTRuntime base class exported from the new `generaltranslation/runtime` entry point. The SDK runtime (gt-i18n's I18nConfig, gt-next middleware) now constructs GTRuntime, so production browser bundles no longer ship the project/file management API client (enqueueFiles, uploads, downloads, etc.). The GT class extends GTRuntime and keeps its full API for the CLI and other tooling. Also import getLocaleProperties from @generaltranslation/format directly in react-core so client bundles don't reach the full core entry.
128
+ - 195f009: fix: make singleton not-initialized errors consistent and descriptive, and stop error paths from masking the original failure when I18nConfig is also uninitialized
129
+ - Updated dependencies [72e9e16]
130
+ - Updated dependencies [42a440f]
131
+ - Updated dependencies [5adeede]
132
+ - Updated dependencies [c5364f9]
133
+ - Updated dependencies [2e85ebd]
134
+ - Updated dependencies [195f009]
135
+ - generaltranslation@9.0.0-odysseus.5
136
+ - gt-i18n@1.0.0-odysseus.8
137
+ - @generaltranslation/supported-locales@2.1.2-odysseus.5
138
+
139
+ ## 11.0.0-odysseus.14
140
+
141
+ ### Patch Changes
142
+
143
+ - 0cd7813: Store cookie names in I18nConfig so custom cookie names work before the condition store is initialized.
144
+ - `gt-i18n`: Removed the unused React locale cookie name from the shared GT config type.
145
+ - `@generaltranslation/react-core`: `ReactI18nConfig` now accepts `localeCookieName`, `regionCookieName`, and `enableI18nCookieName`, exposes getters that fall back to the default names, and exports the default storage names from the `pure` entrypoint.
146
+ - `gt-next`: Imports default cookie names from the React Core `pure` entrypoint instead of the removed React Core cookie constants subpath.
147
+ - `gt-react`: The browser condition store now resolves cookie names from `I18nConfig` instead of hardcoding the defaults, so custom cookie names passed to `initializeGT()` are honored for both reads and writes.
148
+ - `gt-react-native`: Native condition storage now resolves its store keys from `I18nConfig`, matching `gt-react` behavior.
149
+ - `gt-tanstack-start`: `parseLocale()` reads and writes the locale cookie using the configured cookie name instead of the default.
150
+
151
+ - Updated dependencies [ab61565]
152
+ - Updated dependencies [0cd7813]
153
+ - gt-i18n@1.0.0-odysseus.7
154
+
155
+ ## 11.0.0-odysseus.13
156
+
157
+ ### Patch Changes
158
+
159
+ - Updated dependencies [a2b9677]
160
+ - Updated dependencies [41371e0]
161
+ - gt-i18n@1.0.0-odysseus.6
162
+
163
+ ## 11.0.0-odysseus.12
164
+
165
+ ### Patch Changes
166
+
167
+ - 7be23bc: Share tracked lookup subscription handling across resolver hooks.
168
+
169
+ ## 11.0.0-odysseus.11
170
+
171
+ ## 11.0.0-odysseus.10
172
+
173
+ ### Patch Changes
174
+
175
+ - bcba6fd: Fix `useVersionId()` throwing and `useLocaleDirection()` requiring a locale argument in the client and server entrypoints.
176
+
177
+ `useVersionId()` now returns the current version id (instead of throwing the react-core "not implemented" error), and `useLocaleDirection()` once again accepts an optional locale that defaults to the current locale. The shared implementation now lives in `@generaltranslation/react-core/hooks`, so `gt-react` and `gt-react-native` use the same behavior; the RSC entrypoint keeps its stricter signatures.
178
+
179
+ - b7b3eaf: Share render pipeline child renderers with prepared translation rendering.
180
+ - dfb5fc9: Add portable selector hook return types for React Native declarations.
181
+ - 4a5f8e8: Remove unused internal exports and dead utility code.
182
+ - 288c9f8: Remove the deprecated `internalInitializeGTSPA` export from `@generaltranslation/react-core/pure` and the downstream `gt-react` server/types surfaces. Use `initializeGTSPA` from `gt-react` for browser SPA initialization.
183
+ - Updated dependencies [432fa49]
184
+ - Updated dependencies [432fa49]
185
+ - Updated dependencies [933916e]
186
+ - Updated dependencies [4a5f8e8]
187
+ - Updated dependencies [083d306]
188
+ - gt-i18n@1.0.0-odysseus.5
189
+
3
190
  ## 11.0.0-odysseus.9
4
191
 
5
192
  ## 11.0.0-odysseus.8
@@ -133,6 +320,60 @@
133
320
 
134
321
  ### Patch Changes
135
322
 
323
+ - Updated dependencies [[`cc4edc1`](https://github.com/generaltranslation/gt/commit/cc4edc1e40d9977125bf6d053fb7f8cdbdd40b05)]:
324
+ - @generaltranslation/supported-locales@2.1.0
325
+ - gt-i18n@0.9.4
326
+
327
+ ## 1.8.25
328
+
329
+ ### Patch Changes
330
+
331
+ - [#1786](https://github.com/generaltranslation/gt/pull/1786) [`6945a98`](https://github.com/generaltranslation/gt/commit/6945a9871ea260dd999dcb2246c48b21134721f6) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Add `requiresReview`
332
+
333
+ - Updated dependencies [[`6945a98`](https://github.com/generaltranslation/gt/commit/6945a9871ea260dd999dcb2246c48b21134721f6)]:
334
+ - generaltranslation@8.2.19
335
+ - gt-i18n@0.9.9
336
+ - @generaltranslation/supported-locales@2.1.5
337
+
338
+ ## 1.8.24
339
+
340
+ ### Patch Changes
341
+
342
+ - Updated dependencies [[`a2a3dd0`](https://github.com/generaltranslation/gt/commit/a2a3dd0bcdce9abe360c406a12fc6bb3bc3ca181)]:
343
+ - @generaltranslation/supported-locales@2.1.4
344
+ - gt-i18n@0.9.8
345
+
346
+ ## 1.8.23
347
+
348
+ ### Patch Changes
349
+
350
+ - Updated dependencies [[`9709a2f`](https://github.com/generaltranslation/gt/commit/9709a2f2b97b9d8239298e39bb31e57692bbffd8)]:
351
+ - generaltranslation@8.2.18
352
+ - gt-i18n@0.9.7
353
+ - @generaltranslation/supported-locales@2.1.3
354
+
355
+ ## 1.8.22
356
+
357
+ ### Patch Changes
358
+
359
+ - Updated dependencies [[`3197028`](https://github.com/generaltranslation/gt/commit/319702855a7b129f95217d41be9f2402680a2f01)]:
360
+ - generaltranslation@8.2.17
361
+ - gt-i18n@0.9.6
362
+ - @generaltranslation/supported-locales@2.1.2
363
+
364
+ ## 1.8.21
365
+
366
+ ### Patch Changes
367
+
368
+ - Updated dependencies [[`e041312`](https://github.com/generaltranslation/gt/commit/e04131263dd61e469db977bcc196dc1283e773d0)]:
369
+ - generaltranslation@8.2.16
370
+ - gt-i18n@0.9.5
371
+ - @generaltranslation/supported-locales@2.1.1
372
+
373
+ ## 1.8.20
374
+
375
+ ### Patch Changes
376
+
136
377
  - Updated dependencies [[`cc4edc1`](https://github.com/generaltranslation/gt/commit/cc4edc1e40d9977125bf6d053fb7f8cdbdd40b05)]:
137
378
  - @generaltranslation/supported-locales@2.1.0
138
379
  - gt-i18n@0.9.4
@@ -1,2 +1,2 @@
1
- const e=require(`../../utils/plurals/getPluralBranch.cjs`),t=require(`../../hooks/utils/getFormatLocales.cjs`);function n({_enableI18n:n,_locale:r,children:i,n:a,locales:o=[],...s}){let c=t.getFormatLocales({locale:r,enableI18n:n,localesProp:o});return typeof a==`number`&&e.getPluralBranch(a,c,s)||i}exports.renderPlural=n;
1
+ const e=require(`../../hooks/utils/getFormatLocales.cjs`),t=require(`../../utils/plurals/getPluralBranch.cjs`);function n({_enableI18n:n,_locale:r,children:i,n:a,locales:o=[],...s}){let c=e.getFormatLocales({locale:r,enableI18n:n,localesProp:o});return typeof a==`number`?t.getPluralBranch(a,c,s)??i:i}exports.renderPlural=n;
2
2
  //# sourceMappingURL=Plural.shared.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Plural.shared.cjs","names":["getFormatLocales","getPluralBranch"],"sources":["../../../src/components/branches/Plural.shared.ts"],"sourcesContent":["import { getPluralBranch } from '../../utils/plurals/getPluralBranch';\nimport type { ReactNode } from 'react';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure render logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype PluralProps = {\n children?: ReactNode;\n n: number;\n locales?: string[];\n _locale?: string;\n _enableI18n?: boolean;\n [key: string]: ReactNode;\n};\n\ntype ResolvedPluralProps = PluralProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction renderPlural({\n _enableI18n,\n _locale,\n children,\n n,\n locales: localesProp = [],\n ...branches\n}: ResolvedPluralProps): ReactNode {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n if (typeof n !== 'number') {\n return children;\n }\n return getPluralBranch(n, locales, branches) || children;\n}\n\nexport { renderPlural };\nexport type { PluralProps, ResolvedPluralProps };\n"],"mappings":"+GAsBA,SAAS,EAAa,CACpB,cACA,UACA,WACA,IACA,QAAS,EAAc,EAAE,CACzB,GAAG,GAC8B,CACjC,IAAM,EAAUA,EAAAA,iBAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CAIF,OAHI,OAAO,GAAM,UAGVC,EAAAA,gBAAgB,EAAG,EAAS,EAAS,EAFnC"}
1
+ {"version":3,"file":"Plural.shared.cjs","names":["getFormatLocales","getPluralBranch"],"sources":["../../../src/components/branches/Plural.shared.ts"],"sourcesContent":["import { getPluralBranch } from '../../utils/plurals/getPluralBranch';\nimport type { ReactNode } from 'react';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure render logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype PluralProps = {\n children?: ReactNode;\n n: number;\n locales?: string[];\n _locale?: string;\n _enableI18n?: boolean;\n [key: string]: ReactNode;\n};\n\ntype ResolvedPluralProps = PluralProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction renderPlural({\n _enableI18n,\n _locale,\n children,\n n,\n locales: localesProp = [],\n ...branches\n}: ResolvedPluralProps): ReactNode {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n if (typeof n !== 'number') {\n return children;\n }\n const resolvedBranch = getPluralBranch(n, locales, branches);\n return resolvedBranch != null ? resolvedBranch : children;\n}\n\nexport { renderPlural };\nexport type { PluralProps, ResolvedPluralProps };\n"],"mappings":"+GAsBA,SAAS,EAAa,CACpB,cACA,UACA,WACA,IACA,QAAS,EAAc,EAAE,CACzB,GAAG,GAC8B,CACjC,IAAM,EAAUA,EAAAA,iBAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CAKF,OAJI,OAAO,GAAM,SAGMC,EAAAA,gBAAgB,EAAG,EAAS,EAC5C,EAA0C,EAHxC"}
@@ -1,2 +1,2 @@
1
- import{getPluralBranch as e}from"../../utils/plurals/getPluralBranch.mjs";import{getFormatLocales as t}from"../../hooks/utils/getFormatLocales.mjs";function n({_enableI18n:n,_locale:r,children:i,n:a,locales:o=[],...s}){let c=t({locale:r,enableI18n:n,localesProp:o});return typeof a==`number`&&e(a,c,s)||i}export{n as renderPlural};
1
+ import{getFormatLocales as e}from"../../hooks/utils/getFormatLocales.mjs";import{getPluralBranch as t}from"../../utils/plurals/getPluralBranch.mjs";function n({_enableI18n:n,_locale:r,children:i,n:a,locales:o=[],...s}){let c=e({locale:r,enableI18n:n,localesProp:o});return typeof a==`number`?t(a,c,s)??i:i}export{n as renderPlural};
2
2
  //# sourceMappingURL=Plural.shared.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Plural.shared.mjs","names":[],"sources":["../../../src/components/branches/Plural.shared.ts"],"sourcesContent":["import { getPluralBranch } from '../../utils/plurals/getPluralBranch';\nimport type { ReactNode } from 'react';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure render logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype PluralProps = {\n children?: ReactNode;\n n: number;\n locales?: string[];\n _locale?: string;\n _enableI18n?: boolean;\n [key: string]: ReactNode;\n};\n\ntype ResolvedPluralProps = PluralProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction renderPlural({\n _enableI18n,\n _locale,\n children,\n n,\n locales: localesProp = [],\n ...branches\n}: ResolvedPluralProps): ReactNode {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n if (typeof n !== 'number') {\n return children;\n }\n return getPluralBranch(n, locales, branches) || children;\n}\n\nexport { renderPlural };\nexport type { PluralProps, ResolvedPluralProps };\n"],"mappings":"oJAsBA,SAAS,EAAa,CACpB,cACA,UACA,WACA,IACA,QAAS,EAAc,EAAE,CACzB,GAAG,GAC8B,CACjC,IAAM,EAAU,EAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CAIF,OAHI,OAAO,GAAM,UAGV,EAAgB,EAAG,EAAS,EAAS,EAFnC"}
1
+ {"version":3,"file":"Plural.shared.mjs","names":[],"sources":["../../../src/components/branches/Plural.shared.ts"],"sourcesContent":["import { getPluralBranch } from '../../utils/plurals/getPluralBranch';\nimport type { ReactNode } from 'react';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure render logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype PluralProps = {\n children?: ReactNode;\n n: number;\n locales?: string[];\n _locale?: string;\n _enableI18n?: boolean;\n [key: string]: ReactNode;\n};\n\ntype ResolvedPluralProps = PluralProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction renderPlural({\n _enableI18n,\n _locale,\n children,\n n,\n locales: localesProp = [],\n ...branches\n}: ResolvedPluralProps): ReactNode {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n if (typeof n !== 'number') {\n return children;\n }\n const resolvedBranch = getPluralBranch(n, locales, branches);\n return resolvedBranch != null ? resolvedBranch : children;\n}\n\nexport { renderPlural };\nexport type { PluralProps, ResolvedPluralProps };\n"],"mappings":"oJAsBA,SAAS,EAAa,CACpB,cACA,UACA,WACA,IACA,QAAS,EAAc,EAAE,CACzB,GAAG,GAC8B,CACjC,IAAM,EAAU,EAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CAKF,OAJI,OAAO,GAAM,SAGM,EAAgB,EAAG,EAAS,EAC5C,EAA0C,EAHxC"}
@@ -1,2 +1,2 @@
1
- const e=require(`../../_virtual/_rolldown/runtime.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);function r(e){return e?e.charAt(0).toUpperCase()+(e.length>1?e.slice(1):``):``}function i(e){if(!e)return;let t={};for(let n in e)t[n]={name:e[n]};return t}function a({locale:e,locales:t,customNames:a,customMapping:o=i(a),setLocale:s,getLocaleProperties:c,...l}){let u=e=>{if(o&&o[e]){if(typeof o[e]==`string`)return o[e];if(o[e].name)return o[e].name}return r(c(e).nativeNameWithRegionCode)};return!t||t.length===0||!s?null:(0,n.jsxs)(`select`,{name:`generaltranslation-locale`,"aria-label":`General Translation locale selector`,...l,value:e||``,onChange:e=>s(e.target.value),children:[!e&&(0,n.jsx)(`option`,{value:``}),t.map(e=>(0,n.jsx)(`option`,{value:e,suppressHydrationWarning:!0,children:u(e)},e))]})}exports.InternalLocaleSelector=a;
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`);let t=require(`react/jsx-runtime`),n=require(`react`);n=e.__toESM(n);function r(e){return e?e.charAt(0).toUpperCase()+(e.length>1?e.slice(1):``):``}function i(e){if(!e)return;let t={};for(let n in e)t[n]={name:e[n]};return t}function a({locale:e,locales:n,customNames:a,customMapping:o=i(a),setLocale:s,getLocaleProperties:c,...l}){let u=e=>{if(o&&o[e]){if(typeof o[e]==`string`)return o[e];if(o[e].name)return o[e].name}return r(c(e).nativeNameWithRegionCode)};return!n||n.length===0||!s?null:(0,t.jsxs)(`select`,{name:`generaltranslation-locale`,"aria-label":`General Translation locale selector`,...l,value:e||``,onChange:e=>s(e.target.value),children:[!e&&(0,t.jsx)(`option`,{value:``}),n.map(e=>(0,t.jsx)(`option`,{value:e,suppressHydrationWarning:!0,children:u(e)},e))]})}exports.InternalLocaleSelector=a;
2
2
  //# sourceMappingURL=InternalLocaleSelector.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"InternalLocaleSelector.cjs","names":[],"sources":["../../../src/components/helpers/InternalLocaleSelector.tsx"],"sourcesContent":["import React from 'react';\nimport { CustomMapping, LocaleProperties } from 'generaltranslation/types';\n\n/**\n * Capitalizes the first letter of a string if applicable.\n * For strings that do not use capitalization, it returns the string unchanged.\n * @param {string} str - The string to capitalize.\n * @returns {string} The string with the first letter capitalized if applicable.\n */\nfunction capitalizeName(str: string): string {\n if (!str) return '';\n return str.charAt(0).toUpperCase() + (str.length > 1 ? str.slice(1) : '');\n}\n\n/**\n * Internal helper to convert deprecated customNames prop to the new customMapping format.\n * Used for backward compatibility with previous LocaleSelector API.\n * @param {object} customNames - Mapping of locale to display name.\n * @returns {CustomMapping | undefined} The converted mapping or undefined.\n * @internal\n */\nfunction _convertCustomNamesToMapping(\n customNames?: { [key: string]: string } | undefined\n): CustomMapping | undefined {\n if (!customNames) return undefined;\n const result: CustomMapping = {};\n for (const locale in customNames) {\n result[locale] = { name: customNames[locale] };\n }\n return result;\n}\n\n/**\n * A dropdown component that allows users to select a locale.\n * @param {string} locale - The currently selected locale.\n * @param {string[]} locales - The list of all available locales.\n * @param {function} setLocale - Function to update the current locale.\n * @param {function} getLocaleProperties - Function to retrieve properties for a given locale.\n * @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.\n * @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.\n * @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.\n *\n * @internal\n */\nexport function InternalLocaleSelector({\n locale,\n locales,\n customNames,\n customMapping = _convertCustomNamesToMapping(customNames),\n setLocale,\n getLocaleProperties,\n ...props\n}: {\n locale: string;\n locales: string[];\n customNames?: { [key: string]: string };\n customMapping?: CustomMapping;\n setLocale: (locale: string) => void;\n getLocaleProperties: (locale: string) => LocaleProperties;\n [key: string]: any;\n}): React.JSX.Element | null {\n // Get display name\n const getDisplayName = (locale: string) => {\n if (customMapping && customMapping[locale]) {\n if (typeof customMapping[locale] === 'string')\n return customMapping[locale];\n if (customMapping[locale].name) return customMapping[locale].name;\n }\n return capitalizeName(getLocaleProperties(locale).nativeNameWithRegionCode);\n };\n\n // If no locales are returned, just render nothing or handle gracefully\n if (!locales || locales.length === 0 || !setLocale) {\n return null;\n }\n\n return (\n <select\n name='generaltranslation-locale'\n aria-label='General Translation locale selector'\n {...props}\n // Fallback to an empty string if currentLocale is undefined\n value={locale || ''}\n onChange={(e) => setLocale(e.target.value)}\n >\n {/* Optional fallback for when no locale is set */}\n {!locale && <option value='' />}\n\n {locales.map((locale) => (\n <option key={locale} value={locale} suppressHydrationWarning>\n {getDisplayName(locale)}\n </option>\n ))}\n </select>\n );\n}\n"],"mappings":"iIASA,SAAS,EAAe,EAAqB,CAE3C,OADK,EACE,EAAI,OAAO,EAAE,CAAC,aAAa,EAAI,EAAI,OAAS,EAAI,EAAI,MAAM,EAAE,CAAG,IADrD,GAWnB,SAAS,EACP,EAC2B,CAC3B,GAAI,CAAC,EAAa,OAClB,IAAM,EAAwB,EAAE,CAChC,IAAK,IAAM,KAAU,EACnB,EAAO,GAAU,CAAE,KAAM,EAAY,GAAS,CAEhD,OAAO,EAeT,SAAgB,EAAuB,CACrC,SACA,UACA,cACA,gBAAgB,EAA6B,EAAY,CACzD,YACA,sBACA,GAAG,GASwB,CAE3B,IAAM,EAAkB,GAAmB,CACzC,GAAI,GAAiB,EAAc,GAAS,CAC1C,GAAI,OAAO,EAAc,IAAY,SACnC,OAAO,EAAc,GACvB,GAAI,EAAc,GAAQ,KAAM,OAAO,EAAc,GAAQ,KAE/D,OAAO,EAAe,EAAoB,EAAO,CAAC,yBAAyB,EAQ7E,MAJI,CAAC,GAAW,EAAQ,SAAW,GAAK,CAAC,EAChC,MAIP,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,4BACL,aAAW,sCACX,GAAI,EAEJ,MAAO,GAAU,GACjB,SAAW,GAAM,EAAU,EAAE,OAAO,MAAM,UAN5C,CASG,CAAC,IAAU,EAAA,EAAA,KAAC,SAAD,CAAQ,MAAM,GAAK,CAAA,CAE9B,EAAQ,IAAK,IACZ,EAAA,EAAA,KAAC,SAAD,CAAqB,MAAO,EAAQ,yBAAA,YACjC,EAAe,EAAO,CAChB,CAFI,EAEJ,CACT,CACK"}
1
+ {"version":3,"file":"InternalLocaleSelector.cjs","names":[],"sources":["../../../src/components/helpers/InternalLocaleSelector.tsx"],"sourcesContent":["import React from 'react';\nimport { CustomMapping, LocaleProperties } from 'generaltranslation/types';\n\n/**\n * Capitalizes the first letter of a string if applicable.\n * For strings that do not use capitalization, it returns the string unchanged.\n * @param {string} str - The string to capitalize.\n * @returns {string} The string with the first letter capitalized if applicable.\n */\nfunction capitalizeName(str: string): string {\n if (!str) return '';\n return str.charAt(0).toUpperCase() + (str.length > 1 ? str.slice(1) : '');\n}\n\n/**\n * Internal helper to convert deprecated customNames prop to the new customMapping format.\n * Used for backward compatibility with previous LocaleSelector API.\n * @param {object} customNames - Mapping of locale to display name.\n * @returns {CustomMapping | undefined} The converted mapping or undefined.\n * @internal\n */\nfunction _convertCustomNamesToMapping(\n customNames?: { [key: string]: string } | undefined\n): CustomMapping | undefined {\n if (!customNames) return undefined;\n const result: CustomMapping = {};\n for (const locale in customNames) {\n result[locale] = { name: customNames[locale] };\n }\n return result;\n}\n\n/**\n * A dropdown component that allows users to select a locale.\n * @param {string} locale - The currently selected locale.\n * @param {string[]} locales - The list of all available locales.\n * @param {function} setLocale - Function to update the current locale.\n * @param {function} getLocaleProperties - Function to retrieve properties for a given locale.\n * @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.\n * @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.\n * @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.\n *\n * @internal\n */\nexport function InternalLocaleSelector({\n locale,\n locales,\n customNames,\n customMapping = _convertCustomNamesToMapping(customNames),\n setLocale,\n getLocaleProperties,\n ...props\n}: {\n locale: string;\n locales: string[];\n customNames?: { [key: string]: string };\n customMapping?: CustomMapping;\n setLocale: (locale: string) => void;\n getLocaleProperties: (locale: string) => LocaleProperties;\n [key: string]: any;\n}): React.JSX.Element | null {\n // Get display name\n const getDisplayName = (locale: string) => {\n if (customMapping && customMapping[locale]) {\n if (typeof customMapping[locale] === 'string')\n return customMapping[locale];\n if (customMapping[locale].name) return customMapping[locale].name;\n }\n return capitalizeName(getLocaleProperties(locale).nativeNameWithRegionCode);\n };\n\n // If no locales are returned, just render nothing or handle gracefully\n if (!locales || locales.length === 0 || !setLocale) {\n return null;\n }\n\n return (\n <select\n name='generaltranslation-locale'\n aria-label='General Translation locale selector'\n {...props}\n // Fallback to an empty string if currentLocale is undefined\n value={locale || ''}\n onChange={(e) => setLocale(e.target.value)}\n >\n {/* Optional fallback for when no locale is set */}\n {!locale && <option value='' />}\n\n {locales.map((locale) => (\n <option key={locale} value={locale} suppressHydrationWarning>\n {getDisplayName(locale)}\n </option>\n ))}\n </select>\n );\n}\n"],"mappings":"6HASA,SAAS,EAAe,EAAqB,CAE3C,OADK,EACE,EAAI,OAAO,EAAE,CAAC,aAAa,EAAI,EAAI,OAAS,EAAI,EAAI,MAAM,EAAE,CAAG,IADrD,GAWnB,SAAS,EACP,EAC2B,CAC3B,GAAI,CAAC,EAAa,OAClB,IAAM,EAAwB,EAAE,CAChC,IAAK,IAAM,KAAU,EACnB,EAAO,GAAU,CAAE,KAAM,EAAY,GAAS,CAEhD,OAAO,EAeT,SAAgB,EAAuB,CACrC,SACA,UACA,cACA,gBAAgB,EAA6B,EAAY,CACzD,YACA,sBACA,GAAG,GASwB,CAE3B,IAAM,EAAkB,GAAmB,CACzC,GAAI,GAAiB,EAAc,GAAS,CAC1C,GAAI,OAAO,EAAc,IAAY,SACnC,OAAO,EAAc,GACvB,GAAI,EAAc,GAAQ,KAAM,OAAO,EAAc,GAAQ,KAE/D,OAAO,EAAe,EAAoB,EAAO,CAAC,yBAAyB,EAQ7E,MAJI,CAAC,GAAW,EAAQ,SAAW,GAAK,CAAC,EAChC,MAIP,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,4BACL,aAAW,sCACX,GAAI,EAEJ,MAAO,GAAU,GACjB,SAAW,GAAM,EAAU,EAAE,OAAO,MAAM,UAN5C,CASG,CAAC,IAAU,EAAA,EAAA,KAAC,SAAD,CAAQ,MAAM,GAAK,CAAA,CAE9B,EAAQ,IAAK,IACZ,EAAA,EAAA,KAAC,SAAD,CAAqB,MAAO,EAAQ,yBAAA,YACjC,EAAe,EAAO,CAChB,CAFI,EAEJ,CACT,CACK"}
@@ -1,2 +1,2 @@
1
- import"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function n(e){return e?e.charAt(0).toUpperCase()+(e.length>1?e.slice(1):``):``}function r(e){if(!e)return;let t={};for(let n in e)t[n]={name:e[n]};return t}function i({locale:i,locales:a,customNames:o,customMapping:s=r(o),setLocale:c,getLocaleProperties:l,...u}){let d=e=>{if(s&&s[e]){if(typeof s[e]==`string`)return s[e];if(s[e].name)return s[e].name}return n(l(e).nativeNameWithRegionCode)};return!a||a.length===0||!c?null:t(`select`,{name:`generaltranslation-locale`,"aria-label":`General Translation locale selector`,...u,value:i||``,onChange:e=>c(e.target.value),children:[!i&&e(`option`,{value:``}),a.map(t=>e(`option`,{value:t,suppressHydrationWarning:!0,children:d(t)},t))]})}export{i as InternalLocaleSelector};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import"react";function n(e){return e?e.charAt(0).toUpperCase()+(e.length>1?e.slice(1):``):``}function r(e){if(!e)return;let t={};for(let n in e)t[n]={name:e[n]};return t}function i({locale:i,locales:a,customNames:o,customMapping:s=r(o),setLocale:c,getLocaleProperties:l,...u}){let d=e=>{if(s&&s[e]){if(typeof s[e]==`string`)return s[e];if(s[e].name)return s[e].name}return n(l(e).nativeNameWithRegionCode)};return!a||a.length===0||!c?null:t(`select`,{name:`generaltranslation-locale`,"aria-label":`General Translation locale selector`,...u,value:i||``,onChange:e=>c(e.target.value),children:[!i&&e(`option`,{value:``}),a.map(t=>e(`option`,{value:t,suppressHydrationWarning:!0,children:d(t)},t))]})}export{i as InternalLocaleSelector};
2
2
  //# sourceMappingURL=InternalLocaleSelector.mjs.map
@@ -1,2 +1,2 @@
1
- const e=require(`../../_virtual/_rolldown/runtime.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);function r({region:e,regions:t,regionData:r,setRegion:i,placeholder:a,...o}){return!t||t.length===0||!i?null:(0,n.jsxs)(`select`,{name:`generaltranslation-region`,"aria-label":`General Translation region selector`,...o,value:e||``,onChange:e=>i(e.target.value),children:[!e&&(0,n.jsx)(`option`,{value:``,suppressHydrationWarning:!0,children:a||``},`placeholder`),t.map(e=>(0,n.jsx)(`option`,{value:e,suppressHydrationWarning:!0,children:r.get(e)?.name??e},e))]})}exports.InternalRegionSelector=r;
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`);let t=require(`react/jsx-runtime`),n=require(`react`);n=e.__toESM(n);function r({region:e,regions:n,regionData:r,setRegion:i,placeholder:a,...o}){return!n||n.length===0||!i?null:(0,t.jsxs)(`select`,{name:`generaltranslation-region`,"aria-label":`General Translation region selector`,...o,value:e||``,onChange:e=>i(e.target.value),children:[!e&&(0,t.jsx)(`option`,{value:``,suppressHydrationWarning:!0,children:a||``},`placeholder`),n.map(e=>(0,t.jsx)(`option`,{value:e,suppressHydrationWarning:!0,children:r.get(e)?.name??e},e))]})}exports.InternalRegionSelector=r;
2
2
  //# sourceMappingURL=InternalRegionSelector.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"InternalRegionSelector.cjs","names":[],"sources":["../../../src/components/helpers/InternalRegionSelector.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport type { RegionData } from '../../hooks/useInternalRegionSelector';\n\n/**\n * A dropdown component that allows users to select a region.\n * @param {string | undefined} region - The currently selected region.\n * @param {string[]} regions - The ordered list of available region codes.\n * @param {Map<string, RegionData>} regionData - Map of region codes to their display data (name, emoji, locale).\n * @param {function} setRegion - Function to update the current region.\n * @param {React.ReactNode} [placeholder] - Optional placeholder node to display as the first option when no region is selected.\n * @returns {React.ReactElement | null} The rendered region dropdown component or null to prevent rendering.\n *\n * @internal\n */\nexport function InternalRegionSelector({\n region,\n regions,\n regionData,\n setRegion,\n placeholder,\n ...props\n}: {\n region: string | undefined;\n regions: string[];\n regionData: Map<string, RegionData>;\n setRegion: (region: string) => void;\n placeholder?: ReactNode;\n [key: string]: any;\n}): React.JSX.Element | null {\n // If no regions are returned, just render nothing or handle gracefully\n if (!regions || regions.length === 0 || !setRegion) {\n return null;\n }\n\n return (\n <select\n name='generaltranslation-region'\n aria-label='General Translation region selector'\n {...props}\n // Fallback to an empty string if no region is set\n value={region || ''}\n onChange={(e) => setRegion(e.target.value)}\n >\n {/* Optional placeholder for when no region is set */}\n {!region && (\n <option key='placeholder' value='' suppressHydrationWarning>\n {placeholder || ''}\n </option>\n )}\n\n {regions.map((r) => (\n <option key={r} value={r} suppressHydrationWarning>\n {regionData.get(r)?.name ?? r}\n </option>\n ))}\n </select>\n );\n}\n"],"mappings":"iIAcA,SAAgB,EAAuB,CACrC,SACA,UACA,aACA,YACA,cACA,GAAG,GAQwB,CAM3B,MAJI,CAAC,GAAW,EAAQ,SAAW,GAAK,CAAC,EAChC,MAIP,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,4BACL,aAAW,sCACX,GAAI,EAEJ,MAAO,GAAU,GACjB,SAAW,GAAM,EAAU,EAAE,OAAO,MAAM,UAN5C,CASG,CAAC,IACA,EAAA,EAAA,KAAC,SAAD,CAA0B,MAAM,GAAG,yBAAA,YAChC,GAAe,GACT,CAFG,cAEH,CAGV,EAAQ,IAAK,IACZ,EAAA,EAAA,KAAC,SAAD,CAAgB,MAAO,EAAG,yBAAA,YACvB,EAAW,IAAI,EAAE,EAAE,MAAQ,EACrB,CAFI,EAEJ,CACT,CACK"}
1
+ {"version":3,"file":"InternalRegionSelector.cjs","names":[],"sources":["../../../src/components/helpers/InternalRegionSelector.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport type { RegionData } from '../../hooks/useInternalRegionSelector';\n\n/**\n * A dropdown component that allows users to select a region.\n * @param {string | undefined} region - The currently selected region.\n * @param {string[]} regions - The ordered list of available region codes.\n * @param {Map<string, RegionData>} regionData - Map of region codes to their display data (name, emoji, locale).\n * @param {function} setRegion - Function to update the current region.\n * @param {React.ReactNode} [placeholder] - Optional placeholder node to display as the first option when no region is selected.\n * @returns {React.ReactElement | null} The rendered region dropdown component or null to prevent rendering.\n *\n * @internal\n */\nexport function InternalRegionSelector({\n region,\n regions,\n regionData,\n setRegion,\n placeholder,\n ...props\n}: {\n region: string | undefined;\n regions: string[];\n regionData: Map<string, RegionData>;\n setRegion: (region: string) => void;\n placeholder?: ReactNode;\n [key: string]: any;\n}): React.JSX.Element | null {\n // If no regions are returned, just render nothing or handle gracefully\n if (!regions || regions.length === 0 || !setRegion) {\n return null;\n }\n\n return (\n <select\n name='generaltranslation-region'\n aria-label='General Translation region selector'\n {...props}\n // Fallback to an empty string if no region is set\n value={region || ''}\n onChange={(e) => setRegion(e.target.value)}\n >\n {/* Optional placeholder for when no region is set */}\n {!region && (\n <option key='placeholder' value='' suppressHydrationWarning>\n {placeholder || ''}\n </option>\n )}\n\n {regions.map((r) => (\n <option key={r} value={r} suppressHydrationWarning>\n {regionData.get(r)?.name ?? r}\n </option>\n ))}\n </select>\n );\n}\n"],"mappings":"6HAcA,SAAgB,EAAuB,CACrC,SACA,UACA,aACA,YACA,cACA,GAAG,GAQwB,CAM3B,MAJI,CAAC,GAAW,EAAQ,SAAW,GAAK,CAAC,EAChC,MAIP,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,4BACL,aAAW,sCACX,GAAI,EAEJ,MAAO,GAAU,GACjB,SAAW,GAAM,EAAU,EAAE,OAAO,MAAM,UAN5C,CASG,CAAC,IACA,EAAA,EAAA,KAAC,SAAD,CAA0B,MAAM,GAAG,yBAAA,YAChC,GAAe,GACT,CAFG,cAEH,CAGV,EAAQ,IAAK,IACZ,EAAA,EAAA,KAAC,SAAD,CAAgB,MAAO,EAAG,yBAAA,YACvB,EAAW,IAAI,EAAE,EAAE,MAAQ,EACrB,CAFI,EAEJ,CACT,CACK"}
@@ -1,2 +1,2 @@
1
- import"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function n({region:n,regions:r,regionData:i,setRegion:a,placeholder:o,...s}){return!r||r.length===0||!a?null:t(`select`,{name:`generaltranslation-region`,"aria-label":`General Translation region selector`,...s,value:n||``,onChange:e=>a(e.target.value),children:[!n&&e(`option`,{value:``,suppressHydrationWarning:!0,children:o||``},`placeholder`),r.map(t=>e(`option`,{value:t,suppressHydrationWarning:!0,children:i.get(t)?.name??t},t))]})}export{n as InternalRegionSelector};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import"react";function n({region:n,regions:r,regionData:i,setRegion:a,placeholder:o,...s}){return!r||r.length===0||!a?null:t(`select`,{name:`generaltranslation-region`,"aria-label":`General Translation region selector`,...s,value:n||``,onChange:e=>a(e.target.value),children:[!n&&e(`option`,{value:``,suppressHydrationWarning:!0,children:o||``},`placeholder`),r.map(t=>e(`option`,{value:t,suppressHydrationWarning:!0,children:i.get(t)?.name??t},t))]})}export{n as InternalRegionSelector};
2
2
  //# sourceMappingURL=InternalRegionSelector.mjs.map
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../hooks/external-store.cjs`),t=require(`../../utils/rendering/renderPipeline.cjs`),n=require(`../../utils/translation/usePrepareT.cjs`);let r=require(`react`),i=require(`gt-i18n/internal`);function a(e){return s(e)}function o(e){return s(e)}a._gtt=`translate-client`,o._gtt=`translate-client-automatic`;function s({children:a,_locale:o,_enableI18n:s,_renderPreparedT:c=t.renderPreparedT,...l}){let{defaultLocale:u,locale:d,enableI18n:f,targetOptions:p,taggedSourceChildren:m,sourceJsxChildren:h,shouldTranslate:g}=n.usePrepareT({sourceChildren:a,params:l,_locale:o,_enableI18n:s}),_=e.useTranslate({locale:d,message:h,options:p}),v=(0,r.useRef)(null);if((0,i.getI18nConfig)().isDevHotReloadEnabled()&&_==null&&v.current!=null&&g)return v.current;let y=c({taggedSourceChildren:m,targetJsxChildren:_,locale:d,defaultLocale:u,enableI18n:f,shouldTranslate:g});return v.current=y,y}exports.GtInternalTranslateJsx=o,exports.T=a;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../hooks/external-store.cjs`),t=require(`../../utils/rendering/renderPipeline.cjs`),n=require(`../../utils/translation/usePrepareT.cjs`);let r=require(`gt-i18n/internal`),i=require(`react`);function a(e){return s(e)}function o(e){return s(e)}a._gtt=`translate-client`,o._gtt=`translate-client-automatic`;function s({children:a,_locale:o,_enableI18n:s,_renderPreparedT:c=t.renderPreparedT,...l}){let{defaultLocale:u,locale:d,enableI18n:f,targetOptions:p,taggedSourceChildren:m,sourceJsxChildren:h,shouldTranslate:g}=n.usePrepareT({sourceChildren:a,params:l,_locale:o,_enableI18n:s}),_=e.useTranslate({locale:d,message:h,options:p}),v=(0,i.useRef)(null);if(process.env.NODE_ENV!==`production`&&(0,r.getI18nConfig)().isDevHotReloadEnabled()&&_==null&&v.current!=null&&g)return v.current;let y=c({taggedSourceChildren:m,targetJsxChildren:_,locale:d,defaultLocale:u,enableI18n:f,shouldTranslate:g});return v.current=y,y}exports.GtInternalTranslateJsx=o,exports.T=a;
2
2
  //# sourceMappingURL=T.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"T.cjs","names":["renderPreparedT","usePrepareT","useTranslate"],"sources":["../../../src/components/translation/T.tsx"],"sourcesContent":["import { useTranslate } from '../../hooks/external-store';\nimport { getI18nConfig } from 'gt-i18n/internal';\nimport { useRef, type ReactNode } from 'react';\nimport { renderPreparedT } from '../../utils/rendering/renderPipeline';\nimport type { TProps } from '../../utils/translation/prepareT.shared';\nimport { usePrepareT } from '../../utils/translation/usePrepareT';\n\n// ===== Component ===== //\n\n/**\n * External-store version of the `<T>` component.\n */\nfunction T(props: TProps): ReactNode {\n return useComputeT(props);\n}\n\nfunction GtInternalTranslateJsx(props: TProps): ReactNode {\n return useComputeT(props);\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nT._gtt = 'translate-client';\nGtInternalTranslateJsx._gtt = 'translate-client-automatic';\n\nexport { GtInternalTranslateJsx, T };\n\n/**\n * Render logic\n */\nfunction useComputeT({\n children: sourceChildren,\n _locale,\n _enableI18n,\n _renderPreparedT = renderPreparedT,\n ...params\n}: TProps): ReactNode {\n // Prepare our source children for rendering\n const {\n defaultLocale,\n locale,\n enableI18n,\n targetOptions,\n taggedSourceChildren,\n sourceJsxChildren,\n shouldTranslate,\n } = usePrepareT({\n sourceChildren,\n params,\n _locale,\n _enableI18n,\n });\n\n // Lookup translation in cache\n const targetJsxChildren = useTranslate({\n locale,\n message: sourceJsxChildren,\n options: targetOptions,\n });\n\n // Tx hot reload: render previous translation while loading new one\n // TODO: account for success vs loading vs failed request states\n const prev = useRef<ReactNode | null>(null);\n if (\n getI18nConfig().isDevHotReloadEnabled() &&\n targetJsxChildren == null &&\n prev.current != null &&\n shouldTranslate\n ) {\n return prev.current;\n }\n\n const result = _renderPreparedT({\n taggedSourceChildren,\n targetJsxChildren,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n\n // record previous result\n prev.current = result;\n\n return result;\n}\n"],"mappings":"kQAYA,SAAS,EAAE,EAA0B,CACnC,OAAO,EAAY,EAAM,CAG3B,SAAS,EAAuB,EAA0B,CACxD,OAAO,EAAY,EAAM,CAI3B,EAAE,KAAO,mBACT,EAAuB,KAAO,6BAO9B,SAAS,EAAY,CACnB,SAAU,EACV,UACA,cACA,mBAAmBA,EAAAA,gBACnB,GAAG,GACiB,CAEpB,GAAM,CACJ,gBACA,SACA,aACA,gBACA,uBACA,oBACA,mBACEC,EAAAA,YAAY,CACd,iBACA,SACA,UACA,cACD,CAAC,CAGI,EAAoBC,EAAAA,aAAa,CACrC,SACA,QAAS,EACT,QAAS,EACV,CAAC,CAII,GAAA,EAAA,EAAA,QAAgC,KAAK,CAC3C,IAAA,EAAA,EAAA,gBACiB,CAAC,uBAAuB,EACvC,GAAqB,MACrB,EAAK,SAAW,MAChB,EAEA,OAAO,EAAK,QAGd,IAAM,EAAS,EAAiB,CAC9B,uBACA,oBACA,SACA,gBACA,aACA,kBACD,CAAC,CAKF,MAFA,GAAK,QAAU,EAER"}
1
+ {"version":3,"file":"T.cjs","names":["renderPreparedT","usePrepareT","useTranslate"],"sources":["../../../src/components/translation/T.tsx"],"sourcesContent":["import { useTranslate } from '../../hooks/external-store';\nimport { getI18nConfig } from 'gt-i18n/internal';\nimport { useRef, type ReactNode } from 'react';\nimport { renderPreparedT } from '../../utils/rendering/renderPipeline';\nimport type { TProps } from '../../utils/translation/prepareT.shared';\nimport { usePrepareT } from '../../utils/translation/usePrepareT';\n\n// ===== Component ===== //\n\n/**\n * External-store version of the `<T>` component.\n */\nfunction T(props: TProps): ReactNode {\n return useComputeT(props);\n}\n\nfunction GtInternalTranslateJsx(props: TProps): ReactNode {\n return useComputeT(props);\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nT._gtt = 'translate-client';\nGtInternalTranslateJsx._gtt = 'translate-client-automatic';\n\nexport { GtInternalTranslateJsx, T };\n\n/**\n * Render logic\n */\nfunction useComputeT({\n children: sourceChildren,\n _locale,\n _enableI18n,\n _renderPreparedT = renderPreparedT,\n ...params\n}: TProps): ReactNode {\n // Prepare our source children for rendering\n const {\n defaultLocale,\n locale,\n enableI18n,\n targetOptions,\n taggedSourceChildren,\n sourceJsxChildren,\n shouldTranslate,\n } = usePrepareT({\n sourceChildren,\n params,\n _locale,\n _enableI18n,\n });\n\n // Lookup translation in cache\n const targetJsxChildren = useTranslate({\n locale,\n message: sourceJsxChildren,\n options: targetOptions,\n });\n\n // Tx hot reload: render previous translation while loading new one\n // TODO: account for success vs loading vs failed request states\n const prev = useRef<ReactNode | null>(null);\n if (\n process.env.NODE_ENV !== 'production' &&\n getI18nConfig().isDevHotReloadEnabled() &&\n targetJsxChildren == null &&\n prev.current != null &&\n shouldTranslate\n ) {\n return prev.current;\n }\n\n const result = _renderPreparedT({\n taggedSourceChildren,\n targetJsxChildren,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n\n // record previous result\n prev.current = result;\n\n return result;\n}\n"],"mappings":"kQAYA,SAAS,EAAE,EAA0B,CACnC,OAAO,EAAY,EAAM,CAG3B,SAAS,EAAuB,EAA0B,CACxD,OAAO,EAAY,EAAM,CAI3B,EAAE,KAAO,mBACT,EAAuB,KAAO,6BAO9B,SAAS,EAAY,CACnB,SAAU,EACV,UACA,cACA,mBAAmBA,EAAAA,gBACnB,GAAG,GACiB,CAEpB,GAAM,CACJ,gBACA,SACA,aACA,gBACA,uBACA,oBACA,mBACEC,EAAAA,YAAY,CACd,iBACA,SACA,UACA,cACD,CAAC,CAGI,EAAoBC,EAAAA,aAAa,CACrC,SACA,QAAS,EACT,QAAS,EACV,CAAC,CAII,GAAA,EAAA,EAAA,QAAgC,KAAK,CAC3C,GACE,QAAQ,IAAI,WAAa,eAAA,EAAA,EAAA,gBACV,CAAC,uBAAuB,EACvC,GAAqB,MACrB,EAAK,SAAW,MAChB,EAEA,OAAO,EAAK,QAGd,IAAM,EAAS,EAAiB,CAC9B,uBACA,oBACA,SACA,gBACA,aACA,kBACD,CAAC,CAKF,MAFA,GAAK,QAAU,EAER"}
@@ -1,2 +1,2 @@
1
- import{useTranslate as e}from"../../hooks/external-store.mjs";import{renderPreparedT as t}from"../../utils/rendering/renderPipeline.mjs";import{usePrepareT as n}from"../../utils/translation/usePrepareT.mjs";import{useRef as r}from"react";import{getI18nConfig as i}from"gt-i18n/internal";function a(e){return s(e)}function o(e){return s(e)}a._gtt=`translate-client`,o._gtt=`translate-client-automatic`;function s({children:a,_locale:o,_enableI18n:s,_renderPreparedT:c=t,...l}){let{defaultLocale:u,locale:d,enableI18n:f,targetOptions:p,taggedSourceChildren:m,sourceJsxChildren:h,shouldTranslate:g}=n({sourceChildren:a,params:l,_locale:o,_enableI18n:s}),_=e({locale:d,message:h,options:p}),v=r(null);if(i().isDevHotReloadEnabled()&&_==null&&v.current!=null&&g)return v.current;let y=c({taggedSourceChildren:m,targetJsxChildren:_,locale:d,defaultLocale:u,enableI18n:f,shouldTranslate:g});return v.current=y,y}export{o as GtInternalTranslateJsx,a as T};
1
+ import{useTranslate as e}from"../../hooks/external-store.mjs";import{renderPreparedT as t}from"../../utils/rendering/renderPipeline.mjs";import{usePrepareT as n}from"../../utils/translation/usePrepareT.mjs";import{getI18nConfig as r}from"gt-i18n/internal";import{useRef as i}from"react";function a(e){return s(e)}function o(e){return s(e)}a._gtt=`translate-client`,o._gtt=`translate-client-automatic`;function s({children:a,_locale:o,_enableI18n:s,_renderPreparedT:c=t,...l}){let{defaultLocale:u,locale:d,enableI18n:f,targetOptions:p,taggedSourceChildren:m,sourceJsxChildren:h,shouldTranslate:g}=n({sourceChildren:a,params:l,_locale:o,_enableI18n:s}),_=e({locale:d,message:h,options:p}),v=i(null);if(process.env.NODE_ENV!==`production`&&r().isDevHotReloadEnabled()&&_==null&&v.current!=null&&g)return v.current;let y=c({taggedSourceChildren:m,targetJsxChildren:_,locale:d,defaultLocale:u,enableI18n:f,shouldTranslate:g});return v.current=y,y}export{o as GtInternalTranslateJsx,a as T};
2
2
  //# sourceMappingURL=T.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"T.mjs","names":[],"sources":["../../../src/components/translation/T.tsx"],"sourcesContent":["import { useTranslate } from '../../hooks/external-store';\nimport { getI18nConfig } from 'gt-i18n/internal';\nimport { useRef, type ReactNode } from 'react';\nimport { renderPreparedT } from '../../utils/rendering/renderPipeline';\nimport type { TProps } from '../../utils/translation/prepareT.shared';\nimport { usePrepareT } from '../../utils/translation/usePrepareT';\n\n// ===== Component ===== //\n\n/**\n * External-store version of the `<T>` component.\n */\nfunction T(props: TProps): ReactNode {\n return useComputeT(props);\n}\n\nfunction GtInternalTranslateJsx(props: TProps): ReactNode {\n return useComputeT(props);\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nT._gtt = 'translate-client';\nGtInternalTranslateJsx._gtt = 'translate-client-automatic';\n\nexport { GtInternalTranslateJsx, T };\n\n/**\n * Render logic\n */\nfunction useComputeT({\n children: sourceChildren,\n _locale,\n _enableI18n,\n _renderPreparedT = renderPreparedT,\n ...params\n}: TProps): ReactNode {\n // Prepare our source children for rendering\n const {\n defaultLocale,\n locale,\n enableI18n,\n targetOptions,\n taggedSourceChildren,\n sourceJsxChildren,\n shouldTranslate,\n } = usePrepareT({\n sourceChildren,\n params,\n _locale,\n _enableI18n,\n });\n\n // Lookup translation in cache\n const targetJsxChildren = useTranslate({\n locale,\n message: sourceJsxChildren,\n options: targetOptions,\n });\n\n // Tx hot reload: render previous translation while loading new one\n // TODO: account for success vs loading vs failed request states\n const prev = useRef<ReactNode | null>(null);\n if (\n getI18nConfig().isDevHotReloadEnabled() &&\n targetJsxChildren == null &&\n prev.current != null &&\n shouldTranslate\n ) {\n return prev.current;\n }\n\n const result = _renderPreparedT({\n taggedSourceChildren,\n targetJsxChildren,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n\n // record previous result\n prev.current = result;\n\n return result;\n}\n"],"mappings":"+RAYA,SAAS,EAAE,EAA0B,CACnC,OAAO,EAAY,EAAM,CAG3B,SAAS,EAAuB,EAA0B,CACxD,OAAO,EAAY,EAAM,CAI3B,EAAE,KAAO,mBACT,EAAuB,KAAO,6BAO9B,SAAS,EAAY,CACnB,SAAU,EACV,UACA,cACA,mBAAmB,EACnB,GAAG,GACiB,CAEpB,GAAM,CACJ,gBACA,SACA,aACA,gBACA,uBACA,oBACA,mBACE,EAAY,CACd,iBACA,SACA,UACA,cACD,CAAC,CAGI,EAAoB,EAAa,CACrC,SACA,QAAS,EACT,QAAS,EACV,CAAC,CAII,EAAO,EAAyB,KAAK,CAC3C,GACE,GAAe,CAAC,uBAAuB,EACvC,GAAqB,MACrB,EAAK,SAAW,MAChB,EAEA,OAAO,EAAK,QAGd,IAAM,EAAS,EAAiB,CAC9B,uBACA,oBACA,SACA,gBACA,aACA,kBACD,CAAC,CAKF,MAFA,GAAK,QAAU,EAER"}
1
+ {"version":3,"file":"T.mjs","names":[],"sources":["../../../src/components/translation/T.tsx"],"sourcesContent":["import { useTranslate } from '../../hooks/external-store';\nimport { getI18nConfig } from 'gt-i18n/internal';\nimport { useRef, type ReactNode } from 'react';\nimport { renderPreparedT } from '../../utils/rendering/renderPipeline';\nimport type { TProps } from '../../utils/translation/prepareT.shared';\nimport { usePrepareT } from '../../utils/translation/usePrepareT';\n\n// ===== Component ===== //\n\n/**\n * External-store version of the `<T>` component.\n */\nfunction T(props: TProps): ReactNode {\n return useComputeT(props);\n}\n\nfunction GtInternalTranslateJsx(props: TProps): ReactNode {\n return useComputeT(props);\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nT._gtt = 'translate-client';\nGtInternalTranslateJsx._gtt = 'translate-client-automatic';\n\nexport { GtInternalTranslateJsx, T };\n\n/**\n * Render logic\n */\nfunction useComputeT({\n children: sourceChildren,\n _locale,\n _enableI18n,\n _renderPreparedT = renderPreparedT,\n ...params\n}: TProps): ReactNode {\n // Prepare our source children for rendering\n const {\n defaultLocale,\n locale,\n enableI18n,\n targetOptions,\n taggedSourceChildren,\n sourceJsxChildren,\n shouldTranslate,\n } = usePrepareT({\n sourceChildren,\n params,\n _locale,\n _enableI18n,\n });\n\n // Lookup translation in cache\n const targetJsxChildren = useTranslate({\n locale,\n message: sourceJsxChildren,\n options: targetOptions,\n });\n\n // Tx hot reload: render previous translation while loading new one\n // TODO: account for success vs loading vs failed request states\n const prev = useRef<ReactNode | null>(null);\n if (\n process.env.NODE_ENV !== 'production' &&\n getI18nConfig().isDevHotReloadEnabled() &&\n targetJsxChildren == null &&\n prev.current != null &&\n shouldTranslate\n ) {\n return prev.current;\n }\n\n const result = _renderPreparedT({\n taggedSourceChildren,\n targetJsxChildren,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n\n // record previous result\n prev.current = result;\n\n return result;\n}\n"],"mappings":"+RAYA,SAAS,EAAE,EAA0B,CACnC,OAAO,EAAY,EAAM,CAG3B,SAAS,EAAuB,EAA0B,CACxD,OAAO,EAAY,EAAM,CAI3B,EAAE,KAAO,mBACT,EAAuB,KAAO,6BAO9B,SAAS,EAAY,CACnB,SAAU,EACV,UACA,cACA,mBAAmB,EACnB,GAAG,GACiB,CAEpB,GAAM,CACJ,gBACA,SACA,aACA,gBACA,uBACA,oBACA,mBACE,EAAY,CACd,iBACA,SACA,UACA,cACD,CAAC,CAGI,EAAoB,EAAa,CACrC,SACA,QAAS,EACT,QAAS,EACV,CAAC,CAII,EAAO,EAAyB,KAAK,CAC3C,GACE,QAAQ,IAAI,WAAa,cACzB,GAAe,CAAC,uBAAuB,EACvC,GAAqB,MACrB,EAAK,SAAW,MAChB,EAEA,OAAO,EAAK,QAGd,IAAM,EAAS,EAAiB,CAC9B,uBACA,oBACA,SACA,gBACA,aACA,kBACD,CAAC,CAKF,MAFA,GAAK,QAAU,EAER"}
@@ -1,2 +1,2 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../i18n-cache/singleton-operations.cjs`),t=require(`../../utils/translation/prepareT.shared.cjs`),n=require(`../../utils/rendering/renderPipeline.rsc.cjs`);let r=require(`gt-i18n/internal`);async function i({children:i,_locale:a,_enableI18n:o,_renderPreparedT:s=n.renderPreparedT,...c}){let l=a,u=o,d=(0,r.getI18nConfig)().getDefaultLocale(),f=u&&(0,r.getI18nConfig)().requiresTranslation(l),p=t.prepareT({sourceChildren:i,params:c,locale:l});if(!f)return s({...p,targetJsxChildren:void 0,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f});let m,h=e.getReactI18nCache();return m=(0,r.getI18nConfig)().isDevHotReloadEnabled()?await h.lookupTranslationWithFallback(l,p.sourceJsxChildren,p.targetOptions):(await h.getLookupTranslation(l))(p.sourceJsxChildren,p.targetOptions),s({...p,targetJsxChildren:m,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f})}i._gtt=`translate-server`,exports.RscT=i;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../i18n-cache/singleton-operations.cjs`),t=require(`../../utils/translation/prepareT.shared.cjs`),n=require(`../../utils/rendering/renderPipeline.rsc.cjs`);let r=require(`gt-i18n/internal`);async function i({children:i,_locale:a,_enableI18n:o,_renderPreparedT:s=n.renderPreparedT,...c}){let l=a,u=o,d=(0,r.getI18nConfig)().getDefaultLocale(),f=u&&(0,r.getI18nConfig)().requiresTranslation(l),p=t.prepareT({sourceChildren:i,params:c,locale:l});if(!f)return s({...p,targetJsxChildren:void 0,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f});let m,h=e.getReactI18nCache();return m=process.env.NODE_ENV!==`production`&&(0,r.getI18nConfig)().isDevHotReloadEnabled()?await h.lookupTranslationWithFallback(l,p.sourceJsxChildren,p.targetOptions):(await h.getLookupTranslation(l))(p.sourceJsxChildren,p.targetOptions),s({...p,targetJsxChildren:m,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f})}i._gtt=`translate-server`,exports.RscT=i;
2
2
  //# sourceMappingURL=T.rsc.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"T.rsc.cjs","names":["renderPreparedT","prepareT","getReactI18nCache"],"sources":["../../../src/components/translation/T.rsc.tsx"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport type { ReactNode } from 'react';\nimport { getReactI18nCache } from '../../i18n-cache/singleton-operations';\nimport { renderPreparedT } from '../../utils/rendering/renderPipeline.rsc';\nimport {\n prepareT,\n type ResolvedTProps,\n} from '../../utils/translation/prepareT.shared';\nimport { JsxChildren } from '@generaltranslation/format/types';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nasync function RscT({\n children: sourceChildren,\n _locale,\n _enableI18n,\n // TODO: don't expose to consumer, this should be thru an internal path\n _renderPreparedT = renderPreparedT,\n ...params\n}: ResolvedTProps): Promise<ReactNode> {\n const locale = _locale;\n const enableI18n = _enableI18n;\n const defaultLocale = getI18nConfig().getDefaultLocale();\n const shouldTranslate =\n enableI18n && getI18nConfig().requiresTranslation(locale);\n const prepared = prepareT({\n sourceChildren,\n params,\n locale,\n });\n\n if (!shouldTranslate) {\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren: undefined,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n }\n\n let targetJsxChildren: JsxChildren | undefined;\n const i18nCache = getReactI18nCache();\n if (getI18nConfig().isDevHotReloadEnabled()) {\n targetJsxChildren = await i18nCache.lookupTranslationWithFallback(\n locale,\n prepared.sourceJsxChildren,\n prepared.targetOptions\n );\n } else {\n const lookupTranslation = await i18nCache.getLookupTranslation(locale);\n targetJsxChildren = lookupTranslation(\n prepared.sourceJsxChildren,\n prepared.targetOptions\n );\n }\n\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscT._gtt = 'translate-server';\n\n// ===== Exports ===== //\n\nexport { RscT };\n"],"mappings":"kQAcA,eAAe,EAAK,CAClB,SAAU,EACV,UACA,cAEA,mBAAmBA,EAAAA,gBACnB,GAAG,GACkC,CACrC,IAAM,EAAS,EACT,EAAa,EACb,GAAA,EAAA,EAAA,gBAA+B,CAAC,kBAAkB,CAClD,EACJ,IAAA,EAAA,EAAA,gBAA6B,CAAC,oBAAoB,EAAO,CACrD,EAAWC,EAAAA,SAAS,CACxB,iBACA,SACA,SACD,CAAC,CAEF,GAAI,CAAC,EACH,OAAO,EAAiB,CACtB,GAAG,EACH,kBAAmB,IAAA,GACnB,SACA,gBACA,aACA,kBACD,CAAC,CAGJ,IAAI,EACE,EAAYC,EAAAA,mBAAmB,CAerC,MAdA,CAQE,GARF,EAAA,EAAA,gBAAmB,CAAC,uBAAuB,CACrB,MAAM,EAAU,8BAClC,EACA,EAAS,kBACT,EAAS,cACV,EAGmB,MADY,EAAU,qBAAqB,EAAO,EAEpE,EAAS,kBACT,EAAS,cACV,CAGI,EAAiB,CACtB,GAAG,EACH,oBACA,SACA,gBACA,aACA,kBACD,CAAC,CAIJ,EAAK,KAAO"}
1
+ {"version":3,"file":"T.rsc.cjs","names":["renderPreparedT","prepareT","getReactI18nCache"],"sources":["../../../src/components/translation/T.rsc.tsx"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport type { ReactNode } from 'react';\nimport { getReactI18nCache } from '../../i18n-cache/singleton-operations';\nimport { renderPreparedT } from '../../utils/rendering/renderPipeline.rsc';\nimport {\n prepareT,\n type ResolvedTProps,\n} from '../../utils/translation/prepareT.shared';\nimport { JsxChildren } from '@generaltranslation/format/types';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nasync function RscT({\n children: sourceChildren,\n _locale,\n _enableI18n,\n // TODO: don't expose to consumer, this should be thru an internal path\n _renderPreparedT = renderPreparedT,\n ...params\n}: ResolvedTProps): Promise<ReactNode> {\n const locale = _locale;\n const enableI18n = _enableI18n;\n const defaultLocale = getI18nConfig().getDefaultLocale();\n const shouldTranslate =\n enableI18n && getI18nConfig().requiresTranslation(locale);\n const prepared = prepareT({\n sourceChildren,\n params,\n locale,\n });\n\n if (!shouldTranslate) {\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren: undefined,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n }\n\n let targetJsxChildren: JsxChildren | undefined;\n const i18nCache = getReactI18nCache();\n if (\n process.env.NODE_ENV !== 'production' &&\n getI18nConfig().isDevHotReloadEnabled()\n ) {\n targetJsxChildren = await i18nCache.lookupTranslationWithFallback(\n locale,\n prepared.sourceJsxChildren,\n prepared.targetOptions\n );\n } else {\n const lookupTranslation = await i18nCache.getLookupTranslation(locale);\n targetJsxChildren = lookupTranslation(\n prepared.sourceJsxChildren,\n prepared.targetOptions\n );\n }\n\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscT._gtt = 'translate-server';\n\n// ===== Exports ===== //\n\nexport { RscT };\n"],"mappings":"kQAcA,eAAe,EAAK,CAClB,SAAU,EACV,UACA,cAEA,mBAAmBA,EAAAA,gBACnB,GAAG,GACkC,CACrC,IAAM,EAAS,EACT,EAAa,EACb,GAAA,EAAA,EAAA,gBAA+B,CAAC,kBAAkB,CAClD,EACJ,IAAA,EAAA,EAAA,gBAA6B,CAAC,oBAAoB,EAAO,CACrD,EAAWC,EAAAA,SAAS,CACxB,iBACA,SACA,SACD,CAAC,CAEF,GAAI,CAAC,EACH,OAAO,EAAiB,CACtB,GAAG,EACH,kBAAmB,IAAA,GACnB,SACA,gBACA,aACA,kBACD,CAAC,CAGJ,IAAI,EACE,EAAYC,EAAAA,mBAAmB,CAkBrC,MAjBA,CAWE,EAVA,QAAQ,IAAI,WAAa,eAAA,EAAA,EAAA,gBACV,CAAC,uBAAuB,CAEnB,MAAM,EAAU,8BAClC,EACA,EAAS,kBACT,EAAS,cACV,EAGmB,MADY,EAAU,qBAAqB,EAAO,EAEpE,EAAS,kBACT,EAAS,cACV,CAGI,EAAiB,CACtB,GAAG,EACH,oBACA,SACA,gBACA,aACA,kBACD,CAAC,CAIJ,EAAK,KAAO"}
@@ -1,2 +1,2 @@
1
- import{getReactI18nCache as e}from"../../i18n-cache/singleton-operations.mjs";import{prepareT as t}from"../../utils/translation/prepareT.shared.mjs";import{renderPreparedT as n}from"../../utils/rendering/renderPipeline.rsc.mjs";import{getI18nConfig as r}from"gt-i18n/internal";async function i({children:i,_locale:a,_enableI18n:o,_renderPreparedT:s=n,...c}){let l=a,u=o,d=r().getDefaultLocale(),f=u&&r().requiresTranslation(l),p=t({sourceChildren:i,params:c,locale:l});if(!f)return s({...p,targetJsxChildren:void 0,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f});let m,h=e();return m=r().isDevHotReloadEnabled()?await h.lookupTranslationWithFallback(l,p.sourceJsxChildren,p.targetOptions):(await h.getLookupTranslation(l))(p.sourceJsxChildren,p.targetOptions),s({...p,targetJsxChildren:m,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f})}i._gtt=`translate-server`;export{i as RscT};
1
+ import{getReactI18nCache as e}from"../../i18n-cache/singleton-operations.mjs";import{prepareT as t}from"../../utils/translation/prepareT.shared.mjs";import{renderPreparedT as n}from"../../utils/rendering/renderPipeline.rsc.mjs";import{getI18nConfig as r}from"gt-i18n/internal";async function i({children:i,_locale:a,_enableI18n:o,_renderPreparedT:s=n,...c}){let l=a,u=o,d=r().getDefaultLocale(),f=u&&r().requiresTranslation(l),p=t({sourceChildren:i,params:c,locale:l});if(!f)return s({...p,targetJsxChildren:void 0,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f});let m,h=e();return m=process.env.NODE_ENV!==`production`&&r().isDevHotReloadEnabled()?await h.lookupTranslationWithFallback(l,p.sourceJsxChildren,p.targetOptions):(await h.getLookupTranslation(l))(p.sourceJsxChildren,p.targetOptions),s({...p,targetJsxChildren:m,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f})}i._gtt=`translate-server`;export{i as RscT};
2
2
  //# sourceMappingURL=T.rsc.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"T.rsc.mjs","names":[],"sources":["../../../src/components/translation/T.rsc.tsx"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport type { ReactNode } from 'react';\nimport { getReactI18nCache } from '../../i18n-cache/singleton-operations';\nimport { renderPreparedT } from '../../utils/rendering/renderPipeline.rsc';\nimport {\n prepareT,\n type ResolvedTProps,\n} from '../../utils/translation/prepareT.shared';\nimport { JsxChildren } from '@generaltranslation/format/types';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nasync function RscT({\n children: sourceChildren,\n _locale,\n _enableI18n,\n // TODO: don't expose to consumer, this should be thru an internal path\n _renderPreparedT = renderPreparedT,\n ...params\n}: ResolvedTProps): Promise<ReactNode> {\n const locale = _locale;\n const enableI18n = _enableI18n;\n const defaultLocale = getI18nConfig().getDefaultLocale();\n const shouldTranslate =\n enableI18n && getI18nConfig().requiresTranslation(locale);\n const prepared = prepareT({\n sourceChildren,\n params,\n locale,\n });\n\n if (!shouldTranslate) {\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren: undefined,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n }\n\n let targetJsxChildren: JsxChildren | undefined;\n const i18nCache = getReactI18nCache();\n if (getI18nConfig().isDevHotReloadEnabled()) {\n targetJsxChildren = await i18nCache.lookupTranslationWithFallback(\n locale,\n prepared.sourceJsxChildren,\n prepared.targetOptions\n );\n } else {\n const lookupTranslation = await i18nCache.getLookupTranslation(locale);\n targetJsxChildren = lookupTranslation(\n prepared.sourceJsxChildren,\n prepared.targetOptions\n );\n }\n\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscT._gtt = 'translate-server';\n\n// ===== Exports ===== //\n\nexport { RscT };\n"],"mappings":"qRAcA,eAAe,EAAK,CAClB,SAAU,EACV,UACA,cAEA,mBAAmB,EACnB,GAAG,GACkC,CACrC,IAAM,EAAS,EACT,EAAa,EACb,EAAgB,GAAe,CAAC,kBAAkB,CAClD,EACJ,GAAc,GAAe,CAAC,oBAAoB,EAAO,CACrD,EAAW,EAAS,CACxB,iBACA,SACA,SACD,CAAC,CAEF,GAAI,CAAC,EACH,OAAO,EAAiB,CACtB,GAAG,EACH,kBAAmB,IAAA,GACnB,SACA,gBACA,aACA,kBACD,CAAC,CAGJ,IAAI,EACE,EAAY,GAAmB,CAerC,MAdA,CAQE,EARE,GAAe,CAAC,uBAAuB,CACrB,MAAM,EAAU,8BAClC,EACA,EAAS,kBACT,EAAS,cACV,EAGmB,MADY,EAAU,qBAAqB,EAAO,EAEpE,EAAS,kBACT,EAAS,cACV,CAGI,EAAiB,CACtB,GAAG,EACH,oBACA,SACA,gBACA,aACA,kBACD,CAAC,CAIJ,EAAK,KAAO"}
1
+ {"version":3,"file":"T.rsc.mjs","names":[],"sources":["../../../src/components/translation/T.rsc.tsx"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport type { ReactNode } from 'react';\nimport { getReactI18nCache } from '../../i18n-cache/singleton-operations';\nimport { renderPreparedT } from '../../utils/rendering/renderPipeline.rsc';\nimport {\n prepareT,\n type ResolvedTProps,\n} from '../../utils/translation/prepareT.shared';\nimport { JsxChildren } from '@generaltranslation/format/types';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nasync function RscT({\n children: sourceChildren,\n _locale,\n _enableI18n,\n // TODO: don't expose to consumer, this should be thru an internal path\n _renderPreparedT = renderPreparedT,\n ...params\n}: ResolvedTProps): Promise<ReactNode> {\n const locale = _locale;\n const enableI18n = _enableI18n;\n const defaultLocale = getI18nConfig().getDefaultLocale();\n const shouldTranslate =\n enableI18n && getI18nConfig().requiresTranslation(locale);\n const prepared = prepareT({\n sourceChildren,\n params,\n locale,\n });\n\n if (!shouldTranslate) {\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren: undefined,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n }\n\n let targetJsxChildren: JsxChildren | undefined;\n const i18nCache = getReactI18nCache();\n if (\n process.env.NODE_ENV !== 'production' &&\n getI18nConfig().isDevHotReloadEnabled()\n ) {\n targetJsxChildren = await i18nCache.lookupTranslationWithFallback(\n locale,\n prepared.sourceJsxChildren,\n prepared.targetOptions\n );\n } else {\n const lookupTranslation = await i18nCache.getLookupTranslation(locale);\n targetJsxChildren = lookupTranslation(\n prepared.sourceJsxChildren,\n prepared.targetOptions\n );\n }\n\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscT._gtt = 'translate-server';\n\n// ===== Exports ===== //\n\nexport { RscT };\n"],"mappings":"qRAcA,eAAe,EAAK,CAClB,SAAU,EACV,UACA,cAEA,mBAAmB,EACnB,GAAG,GACkC,CACrC,IAAM,EAAS,EACT,EAAa,EACb,EAAgB,GAAe,CAAC,kBAAkB,CAClD,EACJ,GAAc,GAAe,CAAC,oBAAoB,EAAO,CACrD,EAAW,EAAS,CACxB,iBACA,SACA,SACD,CAAC,CAEF,GAAI,CAAC,EACH,OAAO,EAAiB,CACtB,GAAG,EACH,kBAAmB,IAAA,GACnB,SACA,gBACA,aACA,kBACD,CAAC,CAGJ,IAAI,EACE,EAAY,GAAmB,CAkBrC,MAjBA,CAWE,EAVA,QAAQ,IAAI,WAAa,cACzB,GAAe,CAAC,uBAAuB,CAEnB,MAAM,EAAU,8BAClC,EACA,EAAS,kBACT,EAAS,cACV,EAGmB,MADY,EAAU,qBAAqB,EAAO,EAEpE,EAAS,kBACT,EAAS,cACV,CAGI,EAAiB,CACtB,GAAG,EACH,oBACA,SACA,gBACA,aACA,kBACD,CAAC,CAIJ,EAAK,KAAO"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./utils/plurals/getPluralBranch.cjs`),t=require(`./hooks/utils/getFormatLocales.cjs`),n=require(`./i18n-cache/singleton-operations.cjs`),r=require(`./functions/helpers/getTranslationsSnapshot.cjs`),i=require(`./condition-store/singleton-operations.cjs`),a=require(`./hooks/utils/getShouldTranslate.cjs`),o=require(`./functions/translation/t.cjs`),s=require(`./utils/rendering/createRenderVariable.cjs`),c=require(`./utils/rendering/createRenderPipeline.cjs`),l=require(`./setup/initializeGTSRA.cjs`),u=require(`./components/branches/Branch.cjs`),d=require(`./components/derivation/Derive.cjs`),f=require(`./components/variables/Var.cjs`),p=require(`./utils/translation/prepareT.shared.cjs`),m=require(`./components/branches/Plural.rsc.cjs`),h=require(`./components/variables/Currency.rsc.cjs`),g=require(`./components/variables/DateTime.rsc.cjs`),_=require(`./components/variables/Num.rsc.cjs`),v=require(`./components/variables/RelativeTime.rsc.cjs`),y=require(`./utils/rendering/renderPipeline.rsc.cjs`),b=require(`./components/translation/T.rsc.cjs`),x=require(`./components/translation/Tx.rsc.cjs`);exports.Branch=u.Branch,exports.Currency=h.RscCurrency,exports.DateTime=g.RscDateTime,exports.Derive=d.Derive,exports.GtInternalBranch=u.GtInternalBranch,exports.GtInternalCurrency=h.RscGtInternalCurrency,exports.GtInternalDateTime=g.RscGtInternalDateTime,exports.GtInternalDerive=d.GtInternalDerive,exports.GtInternalNum=_.RscGtInternalNum,exports.GtInternalPlural=m.RscGtInternalPlural,exports.GtInternalRelativeTime=v.RscGtInternalRelativeTime,exports.GtInternalVar=f.GtInternalVar,exports.Num=_.RscNum,exports.Plural=m.RscPlural,exports.RelativeTime=v.RscRelativeTime,exports.T=b.RscT,exports.Tx=x.RscTx,exports.Var=f.Var,exports.createRenderPipeline=c.createRenderPipeline,exports.createRenderVariable=s.createRenderVariable,exports.getFormatLocales=t.getFormatLocales,exports.getPluralBranch=e.getPluralBranch,exports.getReactI18nCache=n.getReactI18nCache,exports.getReadonlyConditionStoreWithFallback=i.getReadonlyConditionStoreWithFallback,exports.getShouldTranslate=a.getShouldTranslate,exports.getTranslationsSnapshot=r.getTranslationsSnapshot,exports.internalInitializeGTSRA=l.internalInitializeGTSRA,exports.prepareT=p.prepareT,exports.renderDefaultChildren=y.renderDefaultChildren,exports.renderPreparedT=y.renderPreparedT,exports.renderTranslatedChildren=y.renderTranslatedChildren,exports.renderVariable=y.renderVariable,exports.setReactI18nCache=n.setReactI18nCache,exports.t=o.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./hooks/utils/getFormatLocales.cjs`),t=require(`./i18n-cache/singleton-operations.cjs`),n=require(`./functions/helpers/getTranslationsSnapshot.cjs`),r=require(`./condition-store/singleton-operations.cjs`),i=require(`./hooks/utils/getShouldTranslate.cjs`),a=require(`./functions/translation/t.cjs`),o=require(`./utils/rendering/createRenderVariable.cjs`),s=require(`./utils/plurals/getPluralBranch.cjs`),c=require(`./utils/rendering/createRenderPipeline.cjs`),l=require(`./setup/initializeGTSRA.cjs`),u=require(`./components/branches/Branch.cjs`),d=require(`./components/derivation/Derive.cjs`),f=require(`./components/variables/Var.cjs`),p=require(`./utils/translation/prepareT.shared.cjs`),m=require(`./components/branches/Plural.rsc.cjs`),h=require(`./components/variables/Currency.rsc.cjs`),g=require(`./components/variables/DateTime.rsc.cjs`),_=require(`./components/variables/Num.rsc.cjs`),v=require(`./components/variables/RelativeTime.rsc.cjs`),y=require(`./utils/rendering/renderPipeline.rsc.cjs`),b=require(`./components/translation/T.rsc.cjs`),x=require(`./components/translation/Tx.rsc.cjs`);exports.Branch=u.Branch,exports.Currency=h.RscCurrency,exports.DateTime=g.RscDateTime,exports.Derive=d.Derive,exports.GtInternalBranch=u.GtInternalBranch,exports.GtInternalCurrency=h.RscGtInternalCurrency,exports.GtInternalDateTime=g.RscGtInternalDateTime,exports.GtInternalDerive=d.GtInternalDerive,exports.GtInternalNum=_.RscGtInternalNum,exports.GtInternalPlural=m.RscGtInternalPlural,exports.GtInternalRelativeTime=v.RscGtInternalRelativeTime,exports.GtInternalVar=f.GtInternalVar,exports.Num=_.RscNum,exports.Plural=m.RscPlural,exports.RelativeTime=v.RscRelativeTime,exports.T=b.RscT,exports.Tx=x.RscTx,exports.Var=f.Var,exports.createRenderPipeline=c.createRenderPipeline,exports.createRenderVariable=o.createRenderVariable,exports.getFormatLocales=e.getFormatLocales,exports.getPluralBranch=s.getPluralBranch,exports.getReactI18nCache=t.getReactI18nCache,exports.getReadonlyConditionStore=r.getConditionStore,exports.getShouldTranslate=i.getShouldTranslate,exports.getTranslationsSnapshot=n.getTranslationsSnapshot,exports.internalInitializeGTSRA=l.internalInitializeGTSRA,exports.prepareT=p.prepareT,exports.renderDefaultChildren=y.renderDefaultChildren,exports.renderPreparedT=y.renderPreparedT,exports.renderTranslatedChildren=y.renderTranslatedChildren,exports.renderVariable=y.renderVariable,exports.setReactI18nCache=t.setReactI18nCache,exports.t=a.t;
@@ -12,21 +12,21 @@ import { RscGtInternalNum, RscNum } from "./components/variables/Num.rsc.js";
12
12
  import { RelativeTimeProps, ResolvedRelativeTimeProps } from "./components/variables/RelativeTime.shared.js";
13
13
  import { RscGtInternalRelativeTime, RscRelativeTime } from "./components/variables/RelativeTime.rsc.js";
14
14
  import { RelativeTimeFormatOptions, RenderVariable } from "./utils/types.js";
15
+ import { RenderDefaultChildrenArgs } from "./utils/rendering/renderDefaultChildren.shared.js";
16
+ import { RenderTranslatedChildrenArgs } from "./utils/rendering/renderTranslatedChildren.shared.js";
15
17
  import { RenderPreparedTParams } from "./utils/rendering/renderPreparedT.shared.js";
16
18
  import { JsxTranslationOptions, PreparedT, prepareT } from "./utils/translation/prepareT.shared.js";
17
19
  import { RscT } from "./components/translation/T.rsc.js";
18
20
  import { RscTx } from "./components/translation/Tx.rsc.js";
19
21
  import { getTranslationsSnapshot } from "./functions/helpers/getTranslationsSnapshot.js";
20
22
  import { t } from "./functions/translation/t.js";
21
- import { getPluralBranch } from "./utils/plurals/getPluralBranch.js";
22
23
  import { getFormatLocales } from "./hooks/utils/getFormatLocales.js";
23
24
  import { createRenderVariable } from "./utils/rendering/createRenderVariable.js";
24
- import { RenderDefaultChildrenArgs } from "./utils/rendering/renderDefaultChildren.shared.js";
25
- import { RenderTranslatedChildrenArgs } from "./utils/rendering/renderTranslatedChildren.shared.js";
26
25
  import { RenderPipeline, createRenderPipeline } from "./utils/rendering/createRenderPipeline.js";
27
26
  import { getReactI18nCache, setReactI18nCache } from "./i18n-cache/singleton-operations.js";
28
27
  import { internalInitializeGTSRA } from "./setup/initializeGTSRA.js";
29
- import { getReadonlyConditionStoreWithFallback } from "./condition-store/singleton-operations.js";
28
+ import { getConditionStore } from "./condition-store/singleton-operations.js";
29
+ import { getPluralBranch } from "./utils/plurals/getPluralBranch.js";
30
30
  import { getShouldTranslate } from "./hooks/utils/getShouldTranslate.js";
31
31
  import { renderDefaultChildren, renderPreparedT, renderTranslatedChildren, renderVariable } from "./utils/rendering/renderPipeline.rsc.js";
32
- export { Branch, RscCurrency as Currency, type CurrencyProps, RscDateTime as DateTime, type DateTimeProps, Derive, GtInternalBranch, RscGtInternalCurrency as GtInternalCurrency, RscGtInternalDateTime as GtInternalDateTime, GtInternalDerive, RscGtInternalNum as GtInternalNum, RscGtInternalPlural as GtInternalPlural, RscGtInternalRelativeTime as GtInternalRelativeTime, GtInternalVar, type JsxTranslationOptions, RscNum as Num, type NumProps, RscPlural as Plural, type PluralProps, type PreparedT, RscRelativeTime as RelativeTime, type RelativeTimeFormatOptions, type RelativeTimeProps, type RenderDefaultChildrenArgs, type RenderPipeline, type RenderPreparedTParams, type RenderTranslatedChildrenArgs, type RenderVariable, type ResolvedCurrencyProps, type ResolvedDateTimeProps, type ResolvedNumProps, type ResolvedPluralProps, type ResolvedRelativeTimeProps, RscT as T, RscTx as Tx, Var, createRenderPipeline, createRenderVariable, getFormatLocales, getPluralBranch, getReactI18nCache, getReadonlyConditionStoreWithFallback, getShouldTranslate, getTranslationsSnapshot, internalInitializeGTSRA, prepareT, renderDefaultChildren, renderPreparedT, renderTranslatedChildren, renderVariable, setReactI18nCache, t };
32
+ export { Branch, RscCurrency as Currency, type CurrencyProps, RscDateTime as DateTime, type DateTimeProps, Derive, GtInternalBranch, RscGtInternalCurrency as GtInternalCurrency, RscGtInternalDateTime as GtInternalDateTime, GtInternalDerive, RscGtInternalNum as GtInternalNum, RscGtInternalPlural as GtInternalPlural, RscGtInternalRelativeTime as GtInternalRelativeTime, GtInternalVar, type JsxTranslationOptions, RscNum as Num, type NumProps, RscPlural as Plural, type PluralProps, type PreparedT, RscRelativeTime as RelativeTime, type RelativeTimeFormatOptions, type RelativeTimeProps, type RenderDefaultChildrenArgs, type RenderPipeline, type RenderPreparedTParams, type RenderTranslatedChildrenArgs, type RenderVariable, type ResolvedCurrencyProps, type ResolvedDateTimeProps, type ResolvedNumProps, type ResolvedPluralProps, type ResolvedRelativeTimeProps, RscT as T, RscTx as Tx, Var, createRenderPipeline, createRenderVariable, getFormatLocales, getPluralBranch, getReactI18nCache, getConditionStore as getReadonlyConditionStore, getShouldTranslate, getTranslationsSnapshot, internalInitializeGTSRA, prepareT, renderDefaultChildren, renderPreparedT, renderTranslatedChildren, renderVariable, setReactI18nCache, t };
@@ -1 +1 @@
1
- import{getPluralBranch as e}from"./utils/plurals/getPluralBranch.mjs";import{getFormatLocales as t}from"./hooks/utils/getFormatLocales.mjs";import{getReactI18nCache as n,setReactI18nCache as r}from"./i18n-cache/singleton-operations.mjs";import{getTranslationsSnapshot as i}from"./functions/helpers/getTranslationsSnapshot.mjs";import{getReadonlyConditionStoreWithFallback as a}from"./condition-store/singleton-operations.mjs";import{getShouldTranslate as o}from"./hooks/utils/getShouldTranslate.mjs";import{t as s}from"./functions/translation/t.mjs";import{createRenderVariable as c}from"./utils/rendering/createRenderVariable.mjs";import{createRenderPipeline as l}from"./utils/rendering/createRenderPipeline.mjs";import{internalInitializeGTSRA as u}from"./setup/initializeGTSRA.mjs";import{Branch as d,GtInternalBranch as f}from"./components/branches/Branch.mjs";import{Derive as p,GtInternalDerive as m}from"./components/derivation/Derive.mjs";import{GtInternalVar as h,Var as g}from"./components/variables/Var.mjs";import{prepareT as _}from"./utils/translation/prepareT.shared.mjs";import{RscGtInternalPlural as v,RscPlural as y}from"./components/branches/Plural.rsc.mjs";import{RscCurrency as b,RscGtInternalCurrency as x}from"./components/variables/Currency.rsc.mjs";import{RscDateTime as S,RscGtInternalDateTime as C}from"./components/variables/DateTime.rsc.mjs";import{RscGtInternalNum as w,RscNum as T}from"./components/variables/Num.rsc.mjs";import{RscGtInternalRelativeTime as E,RscRelativeTime as D}from"./components/variables/RelativeTime.rsc.mjs";import{renderDefaultChildren as O,renderPreparedT as k,renderTranslatedChildren as A,renderVariable as j}from"./utils/rendering/renderPipeline.rsc.mjs";import{RscT as M}from"./components/translation/T.rsc.mjs";import{RscTx as N}from"./components/translation/Tx.rsc.mjs";export{d as Branch,b as Currency,S as DateTime,p as Derive,f as GtInternalBranch,x as GtInternalCurrency,C as GtInternalDateTime,m as GtInternalDerive,w as GtInternalNum,v as GtInternalPlural,E as GtInternalRelativeTime,h as GtInternalVar,T as Num,y as Plural,D as RelativeTime,M as T,N as Tx,g as Var,l as createRenderPipeline,c as createRenderVariable,t as getFormatLocales,e as getPluralBranch,n as getReactI18nCache,a as getReadonlyConditionStoreWithFallback,o as getShouldTranslate,i as getTranslationsSnapshot,u as internalInitializeGTSRA,_ as prepareT,O as renderDefaultChildren,k as renderPreparedT,A as renderTranslatedChildren,j as renderVariable,r as setReactI18nCache,s as t};
1
+ import{getFormatLocales as e}from"./hooks/utils/getFormatLocales.mjs";import{getReactI18nCache as t,setReactI18nCache as n}from"./i18n-cache/singleton-operations.mjs";import{getTranslationsSnapshot as r}from"./functions/helpers/getTranslationsSnapshot.mjs";import{getConditionStore as i}from"./condition-store/singleton-operations.mjs";import{getShouldTranslate as a}from"./hooks/utils/getShouldTranslate.mjs";import{t as o}from"./functions/translation/t.mjs";import{createRenderVariable as s}from"./utils/rendering/createRenderVariable.mjs";import{getPluralBranch as c}from"./utils/plurals/getPluralBranch.mjs";import{createRenderPipeline as l}from"./utils/rendering/createRenderPipeline.mjs";import{internalInitializeGTSRA as u}from"./setup/initializeGTSRA.mjs";import{Branch as d,GtInternalBranch as f}from"./components/branches/Branch.mjs";import{Derive as p,GtInternalDerive as m}from"./components/derivation/Derive.mjs";import{GtInternalVar as h,Var as g}from"./components/variables/Var.mjs";import{prepareT as _}from"./utils/translation/prepareT.shared.mjs";import{RscGtInternalPlural as v,RscPlural as y}from"./components/branches/Plural.rsc.mjs";import{RscCurrency as b,RscGtInternalCurrency as x}from"./components/variables/Currency.rsc.mjs";import{RscDateTime as S,RscGtInternalDateTime as C}from"./components/variables/DateTime.rsc.mjs";import{RscGtInternalNum as w,RscNum as T}from"./components/variables/Num.rsc.mjs";import{RscGtInternalRelativeTime as E,RscRelativeTime as D}from"./components/variables/RelativeTime.rsc.mjs";import{renderDefaultChildren as O,renderPreparedT as k,renderTranslatedChildren as A,renderVariable as j}from"./utils/rendering/renderPipeline.rsc.mjs";import{RscT as M}from"./components/translation/T.rsc.mjs";import{RscTx as N}from"./components/translation/Tx.rsc.mjs";export{d as Branch,b as Currency,S as DateTime,p as Derive,f as GtInternalBranch,x as GtInternalCurrency,C as GtInternalDateTime,m as GtInternalDerive,w as GtInternalNum,v as GtInternalPlural,E as GtInternalRelativeTime,h as GtInternalVar,T as Num,y as Plural,D as RelativeTime,M as T,N as Tx,g as Var,l as createRenderPipeline,s as createRenderVariable,e as getFormatLocales,c as getPluralBranch,t as getReactI18nCache,i as getReadonlyConditionStore,a as getShouldTranslate,r as getTranslationsSnapshot,u as internalInitializeGTSRA,_ as prepareT,O as renderDefaultChildren,k as renderPreparedT,A as renderTranslatedChildren,j as renderVariable,n as setReactI18nCache,o as t};
@@ -1,2 +1,2 @@
1
- require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../setup/i18nConfig.cjs`);let t=require(`generaltranslation/internal`),n=require(`gt-i18n/internal`);const{getConditionStore:r,setConditionStore:i,isConditionStoreInitialized:a}=(0,n.createConditionStoreSingleton)((0,t.createDiagnosticMessage)({source:`@generaltranslation/react-core`,severity:`Error`,whatHappened:`Cannot read GT runtime context before it has been initialized`,why:`The internal ConditionStore is unavailable`}));function o(){try{return r()}catch(r){let i=(0,n.getRuntimeEnvironment)(),a=e.getI18nConfig().getRenderStrategy(),o=(0,t.createDiagnosticMessage)({source:`@generaltranslation/react-core`,severity:`Error`,whatHappened:`Cannot access ConditionStore before it is initialized.`,details:(0,t.formatDiagnosticErrorDetails)(r),fix:a===`SPA`?`Initialize GT before reading GT runtime context.`:`Add a <GTProvider> at the root of your component tree.`,wayOut:i===`development`?void 0:a===`SPA`?`Request-specific values will fall back to the default configuration.`:`Request-specific values will fall back to the default configuration. This may cause hydration mismatches.`});if(i===`development`)throw Error(o);return console.error(o),{getLocale:()=>t.libraryDefaultLocale,getRegion:()=>void 0,getEnableI18n:()=>!0,setLocale:()=>{},setRegion:()=>{},setEnableI18n:()=>{}}}}exports.getReadonlyConditionStoreWithFallback=o,exports.isConditionStoreInitialized=a,exports.setConditionStore=i;
1
+ require(`../_virtual/_rolldown/runtime.cjs`);let e=require(`gt-i18n/internal`),t=require(`generaltranslation/internal`);const{getConditionStore:n,setConditionStore:r,isConditionStoreInitialized:i}=(0,e.createConditionStoreSingleton)((0,t.createDiagnosticMessage)({source:`@generaltranslation/react-core`,severity:`Error`,whatHappened:`Cannot read GT runtime context before it has been initialized`,why:`The internal ConditionStore is unavailable`,fix:`Call initializeGT() during setup (gt-next runs this automatically) and add a <GTProvider> at the root of your component tree.`}));exports.getConditionStore=n,exports.isConditionStoreInitialized=i;
2
2
  //# sourceMappingURL=singleton-operations.cjs.map