@generaltranslation/react-core 1.8.17 → 1.8.18

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 (194) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/errors.cjs.min.cjs +2 -2
  3. package/dist/errors.cjs.min.cjs.map +1 -1
  4. package/dist/errors.d.ts +3 -1
  5. package/dist/errors.d.ts.map +1 -1
  6. package/dist/errors.esm.min.mjs +2 -2
  7. package/dist/errors.esm.min.mjs.map +1 -1
  8. package/dist/index.cjs.min.cjs +2 -2
  9. package/dist/index.cjs.min.cjs.map +1 -1
  10. package/dist/index.d.ts +1384 -35
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.esm.min.mjs +2 -2
  13. package/dist/index.esm.min.mjs.map +1 -1
  14. package/dist/internal.cjs.min.cjs +2 -2
  15. package/dist/internal.cjs.min.cjs.map +1 -1
  16. package/dist/internal.d.ts +764 -31
  17. package/dist/internal.d.ts.map +1 -1
  18. package/dist/internal.esm.min.mjs +2 -2
  19. package/dist/internal.esm.min.mjs.map +1 -1
  20. package/dist/types.d.ts +357 -174
  21. package/dist/types.d.ts.map +1 -1
  22. package/package.json +7 -6
  23. package/dist/branches/Branch.d.ts +0 -34
  24. package/dist/branches/Branch.d.ts.map +0 -1
  25. package/dist/branches/plurals/Plural.d.ts +0 -38
  26. package/dist/branches/plurals/Plural.d.ts.map +0 -1
  27. package/dist/branches/plurals/getPluralBranch.d.ts +0 -9
  28. package/dist/branches/plurals/getPluralBranch.d.ts.map +0 -1
  29. package/dist/dictionaries/collectUntranslatedEntries.d.ts +0 -18
  30. package/dist/dictionaries/collectUntranslatedEntries.d.ts.map +0 -1
  31. package/dist/dictionaries/getDictionaryEntry.d.ts +0 -4
  32. package/dist/dictionaries/getDictionaryEntry.d.ts.map +0 -1
  33. package/dist/dictionaries/getEntryAndMetadata.d.ts +0 -6
  34. package/dist/dictionaries/getEntryAndMetadata.d.ts.map +0 -1
  35. package/dist/dictionaries/getSubtree.d.ts +0 -18
  36. package/dist/dictionaries/getSubtree.d.ts.map +0 -1
  37. package/dist/dictionaries/indexDict.d.ts +0 -15
  38. package/dist/dictionaries/indexDict.d.ts.map +0 -1
  39. package/dist/dictionaries/injectAndMerge.d.ts +0 -9
  40. package/dist/dictionaries/injectAndMerge.d.ts.map +0 -1
  41. package/dist/dictionaries/injectEntry.d.ts +0 -18
  42. package/dist/dictionaries/injectEntry.d.ts.map +0 -1
  43. package/dist/dictionaries/injectFallbacks.d.ts +0 -18
  44. package/dist/dictionaries/injectFallbacks.d.ts.map +0 -1
  45. package/dist/dictionaries/injectHashes.d.ts +0 -11
  46. package/dist/dictionaries/injectHashes.d.ts.map +0 -1
  47. package/dist/dictionaries/injectTranslations.d.ts +0 -21
  48. package/dist/dictionaries/injectTranslations.d.ts.map +0 -1
  49. package/dist/dictionaries/isDictionaryEntry.d.ts +0 -8
  50. package/dist/dictionaries/isDictionaryEntry.d.ts.map +0 -1
  51. package/dist/dictionaries/loadDictionaryHelper.d.ts +0 -3
  52. package/dist/dictionaries/loadDictionaryHelper.d.ts.map +0 -1
  53. package/dist/dictionaries/mergeDictionaries.d.ts +0 -3
  54. package/dist/dictionaries/mergeDictionaries.d.ts.map +0 -1
  55. package/dist/dictionaries/stripMetadataFromEntries.d.ts +0 -6
  56. package/dist/dictionaries/stripMetadataFromEntries.d.ts.map +0 -1
  57. package/dist/errors-dir/constants.d.ts +0 -2
  58. package/dist/errors-dir/constants.d.ts.map +0 -1
  59. package/dist/errors-dir/createErrors.d.ts +0 -36
  60. package/dist/errors-dir/createErrors.d.ts.map +0 -1
  61. package/dist/errors-dir/internalErrors.d.ts +0 -8
  62. package/dist/errors-dir/internalErrors.d.ts.map +0 -1
  63. package/dist/hooks/useDefaultLocale.d.ts +0 -13
  64. package/dist/hooks/useDefaultLocale.d.ts.map +0 -1
  65. package/dist/hooks/useGTClass.d.ts +0 -23
  66. package/dist/hooks/useGTClass.d.ts.map +0 -1
  67. package/dist/hooks/useLocale.d.ts +0 -11
  68. package/dist/hooks/useLocale.d.ts.map +0 -1
  69. package/dist/hooks/useLocaleDirection.d.ts +0 -14
  70. package/dist/hooks/useLocaleDirection.d.ts.map +0 -1
  71. package/dist/hooks/useLocaleSelector.d.ts +0 -19
  72. package/dist/hooks/useLocaleSelector.d.ts.map +0 -1
  73. package/dist/hooks/useLocales.d.ts +0 -11
  74. package/dist/hooks/useLocales.d.ts.map +0 -1
  75. package/dist/hooks/useRegion.d.ts +0 -20
  76. package/dist/hooks/useRegion.d.ts.map +0 -1
  77. package/dist/hooks/useRegionSelector.d.ts +0 -82
  78. package/dist/hooks/useRegionSelector.d.ts.map +0 -1
  79. package/dist/hooks/useSetLocale.d.ts +0 -12
  80. package/dist/hooks/useSetLocale.d.ts.map +0 -1
  81. package/dist/hooks/useVersionId.d.ts +0 -11
  82. package/dist/hooks/useVersionId.d.ts.map +0 -1
  83. package/dist/internal/addGTIdentifier.d.ts +0 -4
  84. package/dist/internal/addGTIdentifier.d.ts.map +0 -1
  85. package/dist/internal/flattenDictionary.d.ts +0 -11
  86. package/dist/internal/flattenDictionary.d.ts.map +0 -1
  87. package/dist/internal/removeInjectedT.d.ts +0 -11
  88. package/dist/internal/removeInjectedT.d.ts.map +0 -1
  89. package/dist/internal/writeChildrenAsObjects.d.ts +0 -10
  90. package/dist/internal/writeChildrenAsObjects.d.ts.map +0 -1
  91. package/dist/messages/messages.d.ts +0 -2
  92. package/dist/messages/messages.d.ts.map +0 -1
  93. package/dist/promises/dangerouslyUsable.d.ts +0 -37
  94. package/dist/promises/dangerouslyUsable.d.ts.map +0 -1
  95. package/dist/promises/reactHasUse.d.ts +0 -2
  96. package/dist/promises/reactHasUse.d.ts.map +0 -1
  97. package/dist/provider/GTContext.d.ts +0 -4
  98. package/dist/provider/GTContext.d.ts.map +0 -1
  99. package/dist/provider/GTProvider.d.ts +0 -3
  100. package/dist/provider/GTProvider.d.ts.map +0 -1
  101. package/dist/provider/config/defaultProps.d.ts +0 -4
  102. package/dist/provider/config/defaultProps.d.ts.map +0 -1
  103. package/dist/provider/helpers/isSSREnabled.d.ts +0 -5
  104. package/dist/provider/helpers/isSSREnabled.d.ts.map +0 -1
  105. package/dist/provider/helpers/validateString.d.ts +0 -6
  106. package/dist/provider/helpers/validateString.d.ts.map +0 -1
  107. package/dist/provider/hooks/locales/types.d.ts +0 -13
  108. package/dist/provider/hooks/locales/types.d.ts.map +0 -1
  109. package/dist/provider/hooks/locales/useDetermineLocale.d.ts +0 -6
  110. package/dist/provider/hooks/locales/useDetermineLocale.d.ts.map +0 -1
  111. package/dist/provider/hooks/locales/useLocaleState.d.ts +0 -20
  112. package/dist/provider/hooks/locales/useLocaleState.d.ts.map +0 -1
  113. package/dist/provider/hooks/translation/useCreateInternalUseGTFunction.d.ts +0 -19
  114. package/dist/provider/hooks/translation/useCreateInternalUseGTFunction.d.ts.map +0 -1
  115. package/dist/provider/hooks/translation/useCreateInternalUseTranslationsFunction.d.ts +0 -5
  116. package/dist/provider/hooks/translation/useCreateInternalUseTranslationsFunction.d.ts.map +0 -1
  117. package/dist/provider/hooks/translation/useCreateInternalUseTranslationsObjFunction.d.ts +0 -4
  118. package/dist/provider/hooks/translation/useCreateInternalUseTranslationsObjFunction.d.ts.map +0 -1
  119. package/dist/provider/hooks/types.d.ts +0 -19
  120. package/dist/provider/hooks/types.d.ts.map +0 -1
  121. package/dist/provider/hooks/useEnableI18n.d.ts +0 -3
  122. package/dist/provider/hooks/useEnableI18n.d.ts.map +0 -1
  123. package/dist/provider/hooks/useErrorChecks.d.ts +0 -10
  124. package/dist/provider/hooks/useErrorChecks.d.ts.map +0 -1
  125. package/dist/provider/hooks/useLoadDictionary.d.ts +0 -15
  126. package/dist/provider/hooks/useLoadDictionary.d.ts.map +0 -1
  127. package/dist/provider/hooks/useLoadTranslations.d.ts +0 -17
  128. package/dist/provider/hooks/useLoadTranslations.d.ts.map +0 -1
  129. package/dist/provider/hooks/useRegionState.d.ts +0 -6
  130. package/dist/provider/hooks/useRegionState.d.ts.map +0 -1
  131. package/dist/provider/hooks/useRuntimeTranslation.d.ts +0 -24
  132. package/dist/provider/hooks/useRuntimeTranslation.d.ts.map +0 -1
  133. package/dist/rendering/getDefaultRenderSettings.d.ts +0 -6
  134. package/dist/rendering/getDefaultRenderSettings.d.ts.map +0 -1
  135. package/dist/rendering/getGTTag.d.ts +0 -3
  136. package/dist/rendering/getGTTag.d.ts.map +0 -1
  137. package/dist/rendering/isVariableObject.d.ts +0 -3
  138. package/dist/rendering/isVariableObject.d.ts.map +0 -1
  139. package/dist/rendering/renderDefaultChildren.d.ts +0 -8
  140. package/dist/rendering/renderDefaultChildren.d.ts.map +0 -1
  141. package/dist/rendering/renderSkeleton.d.ts +0 -8
  142. package/dist/rendering/renderSkeleton.d.ts.map +0 -1
  143. package/dist/rendering/renderTranslatedChildren.d.ts +0 -9
  144. package/dist/rendering/renderTranslatedChildren.d.ts.map +0 -1
  145. package/dist/rendering/renderVariable.d.ts +0 -4
  146. package/dist/rendering/renderVariable.d.ts.map +0 -1
  147. package/dist/translation/T.d.ts +0 -42
  148. package/dist/translation/T.d.ts.map +0 -1
  149. package/dist/translation/hooks/useGT.d.ts +0 -21
  150. package/dist/translation/hooks/useGT.d.ts.map +0 -1
  151. package/dist/translation/hooks/useMessages.d.ts +0 -19
  152. package/dist/translation/hooks/useMessages.d.ts.map +0 -1
  153. package/dist/translation/hooks/useTranslations.d.ts +0 -17
  154. package/dist/translation/hooks/useTranslations.d.ts.map +0 -1
  155. package/dist/types-dir/config.d.ts +0 -69
  156. package/dist/types-dir/config.d.ts.map +0 -1
  157. package/dist/types-dir/context.d.ts +0 -31
  158. package/dist/types-dir/context.d.ts.map +0 -1
  159. package/dist/types-dir/runtime.d.ts +0 -22
  160. package/dist/types-dir/runtime.d.ts.map +0 -1
  161. package/dist/types-dir/types.d.ts +0 -90
  162. package/dist/types-dir/types.d.ts.map +0 -1
  163. package/dist/ui/LocaleSelector.d.ts +0 -7
  164. package/dist/ui/LocaleSelector.d.ts.map +0 -1
  165. package/dist/ui/RegionSelector.d.ts +0 -7
  166. package/dist/ui/RegionSelector.d.ts.map +0 -1
  167. package/dist/ui/types.d.ts +0 -18
  168. package/dist/ui/types.d.ts.map +0 -1
  169. package/dist/utils/cookies.d.ts +0 -14
  170. package/dist/utils/cookies.d.ts.map +0 -1
  171. package/dist/utils/fetchTranslations.d.ts +0 -9
  172. package/dist/utils/fetchTranslations.d.ts.map +0 -1
  173. package/dist/utils/types.d.ts +0 -9
  174. package/dist/utils/types.d.ts.map +0 -1
  175. package/dist/utils/use.d.ts +0 -4
  176. package/dist/utils/use.d.ts.map +0 -1
  177. package/dist/utils/utils.d.ts +0 -8
  178. package/dist/utils/utils.d.ts.map +0 -1
  179. package/dist/variables/Currency.d.ts +0 -30
  180. package/dist/variables/Currency.d.ts.map +0 -1
  181. package/dist/variables/DateTime.d.ts +0 -29
  182. package/dist/variables/DateTime.d.ts.map +0 -1
  183. package/dist/variables/Derive.d.ts +0 -76
  184. package/dist/variables/Derive.d.ts.map +0 -1
  185. package/dist/variables/Num.d.ts +0 -31
  186. package/dist/variables/Num.d.ts.map +0 -1
  187. package/dist/variables/RelativeTime.d.ts +0 -45
  188. package/dist/variables/RelativeTime.d.ts.map +0 -1
  189. package/dist/variables/Var.d.ts +0 -32
  190. package/dist/variables/Var.d.ts.map +0 -1
  191. package/dist/variables/_getVariableProps.d.ts +0 -11
  192. package/dist/variables/_getVariableProps.d.ts.map +0 -1
  193. package/dist/variables/getVariableName.d.ts +0 -11
  194. package/dist/variables/getVariableName.d.ts.map +0 -1
@@ -1,82 +0,0 @@
1
- type RegionData = {
2
- code: string;
3
- name: string;
4
- emoji: string;
5
- locale: string;
6
- };
7
- /**
8
- * React hook for managing region selection logic in applications supporting multiple regions.
9
- *
10
- * This hook provides the necessary data and handlers to implement a region selector UI component.
11
- * It returns the current region, a list of available regions, region metadata, and functions to update the region or associated locale.
12
- *
13
- * ### Parameters
14
- * @param {Object} [options] - Optional configuration object.
15
- * @param {string[]} [options.regions] - An optional array of ISO 3166 region codes to display. If not provided, regions are inferred from supported locales.
16
- * @param {Object.<string, string|{name?: string, emoji?: string, locale?: string}>} [options.customMapping] - Optional mapping to override region display names, emojis, or associated locales.
17
- * @param {boolean} [options.prioritizeCurrentLocaleRegion=true] - If true, the region corresponding to the current locale is prioritized in the list.
18
- * @param {boolean} [options.sortRegionsAlphabetically=true] - If true, regions are sorted alphabetically by display name.
19
- *
20
- * ### Returns
21
- * @returns {{
22
- * region: string | undefined,
23
- * setRegion: (region: string) => void,
24
- * regions: string[],
25
- * regionData: Map<string, { code: string, name: string, emoji: string, locale: string }>,
26
- * locale: string,
27
- * setLocale: (locale: string) => void
28
- * }} An object containing:
29
- * - `region`: The currently selected region code.
30
- * - `setRegion`: Function to update the selected region.
31
- * - `regions`: Array of available region codes.
32
- * - `regionData`: Map of region codes to their display data (name, emoji, locale).
33
- * - `locale`: The current locale.
34
- * - `setLocale`: Function to update the locale.
35
- *
36
- * ### Example
37
- * ```tsx
38
- * const {
39
- * region,
40
- * setRegion,
41
- * regions,
42
- * regionData,
43
- * locale,
44
- * setLocale
45
- * } = useRegionSelector({
46
- * customMapping: { US: { name: "United States", emoji: "🇺🇸" } }
47
- * });
48
- *
49
- * return (
50
- * <select value={region} onChange={e => setRegion(e.target.value)}>
51
- * {regions.map(r => (
52
- * <option key={r} value={r}>
53
- * {regionData.get(r)?.name}
54
- * </option>
55
- * ))}
56
- * </select>
57
- * );
58
- * ```
59
- */
60
- export declare function useRegionSelector({ regions: _regions, customMapping, prioritizeCurrentLocaleRegion, sortRegionsAlphabetically, }?: {
61
- regions?: string[];
62
- customMapping?: {
63
- [region: string]: string | {
64
- name?: string;
65
- emoji?: string;
66
- locale?: string;
67
- };
68
- };
69
- prioritizeCurrentLocaleRegion?: boolean;
70
- sortRegionsAlphabetically?: boolean;
71
- }): {
72
- region: string | undefined;
73
- setRegion: (region: string | undefined) => void;
74
- regions: string[];
75
- regionData: Map<string, RegionData>;
76
- locales: string[];
77
- locale: string;
78
- localeRegion: string;
79
- setLocale: (locale: string) => void;
80
- };
81
- export {};
82
- //# sourceMappingURL=useRegionSelector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRegionSelector.d.ts","sourceRoot":"","sources":["../../src/hooks/useRegionSelector.ts"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,iBAAiB,CAC/B,EACE,OAAO,EAAE,QAAQ,EACjB,aAAa,EACb,6BAAoC,EACpC,yBAAgC,GACjC,GAAE;IACD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE;QACd,CAAC,MAAM,EAAE,MAAM,GACX,MAAM,GACN;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACxD,CAAC;IACF,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,yBAAyB,CAAC,EAAE,OAAO,CAAC;CAIrC;;;;;;;;;EAmEF"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Sets the user's locale in the `<GTProvider>` context.
3
- * If the locale passed is not supported, will fallback on current locale and then defaultLocale if necessary.
4
- * @note Unless a locale has explicitly been passed to the `<GTProvider>`, this will override the user's browser preferences. The locale passed to `<GTProvider>` will always take priority.
5
- *
6
- * @returns {(locale: string) => void} A function that sets the user's locale.
7
- *
8
- * @example
9
- * setLocale('en-US');
10
- */
11
- export default function useSetLocale(): (locale: string) => void;
12
- //# sourceMappingURL=useSetLocale.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSetLocale.d.ts","sourceRoot":"","sources":["../../src/hooks/useSetLocale.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,IAAI,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAK/D"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Retrieves the version ID from the `<GTProvider>` context.
3
- *
4
- * @returns {string | undefined} The version ID for the current source, if set.
5
- *
6
- * @example
7
- * const versionId = useVersionId();
8
- * console.log(versionId); // 'abc123'
9
- */
10
- export default function useVersionId(): string | undefined;
11
- //# sourceMappingURL=useVersionId.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVersionId.d.ts","sourceRoot":"","sources":["../../src/hooks/useVersionId.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,IAAI,MAAM,GAAG,SAAS,CAIzD"}
@@ -1,4 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { TaggedChildren } from '../types-dir/types';
3
- export default function addGTIdentifier(children: ReactNode, startingIndex?: number): TaggedChildren;
4
- //# sourceMappingURL=addGTIdentifier.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addGTIdentifier.d.ts","sourceRoot":"","sources":["../../src/internal/addGTIdentifier.ts"],"names":[],"mappings":"AAAA,OAAc,EAAgC,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAGL,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAO5B,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,QAAQ,EAAE,SAAS,EACnB,aAAa,GAAE,MAAU,GACxB,cAAc,CA8GhB"}
@@ -1,11 +0,0 @@
1
- import { Dictionary, FlattenedDictionary } from '../types-dir/types';
2
- /**
3
- * Flattens a nested dictionary by concatenating nested keys.
4
- * Throws an error if two keys result in the same flattened key.
5
- * @param {Record<string, any>} dictionary - The dictionary to flatten.
6
- * @param {string} [prefix=''] - The prefix for nested keys.
7
- * @returns {Record<string, React.ReactNode>} The flattened dictionary object.
8
- * @throws {Error} If two keys result in the same flattened key.
9
- */
10
- export default function flattenDictionary(dictionary: Dictionary, prefix?: string): FlattenedDictionary;
11
- //# sourceMappingURL=flattenDictionary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flattenDictionary.d.ts","sourceRoot":"","sources":["../../src/internal/flattenDictionary.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EAEV,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAK5B;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,UAAU,EAAE,UAAU,EACtB,MAAM,GAAE,MAAW,GAClB,mBAAmB,CA6BrB"}
@@ -1,11 +0,0 @@
1
- import { ReactNode } from 'react';
2
- /**
3
- * Remove injected _T components at runtime. This is only for i18n-context T components to use.
4
- * This is necessary because when dealing with deriving fragmented content. The compiler will always
5
- * inject a `_T` component.
6
- *
7
- * Only remove if within a `<Derive>` or `<Static>` component as this scopes this behavior
8
- * to only where it can actually appear.
9
- */
10
- export declare function removeInjectedT(children: ReactNode): ReactNode;
11
- //# sourceMappingURL=removeInjectedT.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"removeInjectedT.d.ts","sourceRoot":"","sources":["../../src/internal/removeInjectedT.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EAKV,MAAM,OAAO,CAAC;AAGf;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,CAE9D"}
@@ -1,10 +0,0 @@
1
- import { TaggedChildren } from '../types-dir/types';
2
- import { JsxChildren } from 'generaltranslation/internal';
3
- /**
4
- * Transforms children elements into objects, processing each child recursively if needed.
5
- * TaggedChildren are transformed into JsxChildren
6
- * @param {Children} children - The children to process.
7
- * @returns {object} The processed children as objects.
8
- */
9
- export default function writeChildrenAsObjects(children: TaggedChildren): JsxChildren;
10
- //# sourceMappingURL=writeChildrenAsObjects.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writeChildrenAsObjects.d.ts","sourceRoot":"","sources":["../../src/internal/writeChildrenAsObjects.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,cAAc,EAAiB,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAEL,WAAW,EAGZ,MAAM,6BAA6B,CAAC;AA8JrC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,QAAQ,EAAE,cAAc,GACvB,WAAW,CAKb"}
@@ -1,2 +0,0 @@
1
- export { msg, decodeMsg, decodeOptions } from 'gt-i18n';
2
- //# sourceMappingURL=messages.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/messages/messages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
@@ -1,37 +0,0 @@
1
- export type CacheKey = string | number | symbol | ReadonlyArray<unknown> | Readonly<Record<string, unknown>>;
2
- type Status = 'pending' | 'fulfilled' | 'rejected';
3
- export type Thenable<T> = Promise<T> & {
4
- status?: Status;
5
- value?: T;
6
- reason?: unknown;
7
- };
8
- type Cell<T> = {
9
- thenable: Thenable<T>;
10
- createdAt: number;
11
- expiresAt: number;
12
- };
13
- export type UseableOptions = {
14
- /** How long to keep a resolved/rejected promise before it’s eligible for GC. Default: Infinity */
15
- ttl?: number;
16
- /** Provide your own Map if you want scoping or SSR hydration games. */
17
- cache?: Map<string, Cell<any>>;
18
- };
19
- /**
20
- * Create or load a cached thenable for use() *even if* it's created during render.
21
- * On first call (per key), invokes `create()`, instruments the promise,
22
- * caches it, and returns the same thenable instance forever (or until invalidated / TTL elapses).
23
- */
24
- export declare function useable<T>(key: CacheKey, create: () => Promise<T>, opts?: UseableOptions): Thenable<T>;
25
- /** Kick off work early without reading. */
26
- export declare function preload<T>(key: CacheKey, create: () => Promise<T>, opts?: UseableOptions): void;
27
- /** Invalidate a key; the next call will recreate the promise. */
28
- export declare function invalidate(key: CacheKey, opts?: UseableOptions): void;
29
- /** If resolved, synchronously read the cached value without suspending. */
30
- export declare function peek<T>(key: CacheKey, opts?: UseableOptions): T | undefined;
31
- /**
32
- * ⚠️ DEV-ONLY: Mute React’s "uncached promise" console warning.
33
- * You should NOT need this if you use `useable()` correctly, but… you asked for risky.
34
- */
35
- export declare function muteReactUncachedPromiseWarning(enable?: boolean): void;
36
- export {};
37
- //# sourceMappingURL=dangerouslyUsable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dangerouslyUsable.d.ts","sourceRoot":"","sources":["../../src/promises/dangerouslyUsable.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,MAAM,GACN,MAAM,GACN,aAAa,CAAC,OAAO,CAAC,GACtB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEtC,KAAK,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAEnD,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,IAAI,CAAC,CAAC,IAAI;IACb,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,kGAAkG;IAClG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,KAAK,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;CAChC,CAAC;AA+DF;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,EACvB,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACxB,IAAI,CAAC,EAAE,cAAc,GACpB,QAAQ,CAAC,CAAC,CAAC,CAuCb;AAED,2CAA2C;AAC3C,wBAAgB,OAAO,CAAC,CAAC,EACvB,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACxB,IAAI,CAAC,EAAE,cAAc,GACpB,IAAI,CAEN;AAED,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAGrE;AAED,2EAA2E;AAC3E,wBAAgB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,CAAC,GAAG,SAAS,CAK3E;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,UAAO,GAAG,IAAI,CAkBnE"}
@@ -1,2 +0,0 @@
1
- export declare const reactHasUse: boolean;
2
- //# sourceMappingURL=reactHasUse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reactHasUse.d.ts","sourceRoot":"","sources":["../../src/promises/reactHasUse.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,SAA2C,CAAC"}
@@ -1,4 +0,0 @@
1
- import { GTContextType } from '../types-dir/context';
2
- export declare const GTContext: import("react").Context<GTContextType | undefined>;
3
- export default function useGTContext(errorString?: string): GTContextType;
4
- //# sourceMappingURL=GTContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GTContext.d.ts","sourceRoot":"","sources":["../../src/provider/GTContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,eAAO,MAAM,SAAS,oDAAsD,CAAC;AAE7E,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,WAAW,SAAuD,GACjE,aAAa,CAMf"}
@@ -1,3 +0,0 @@
1
- import { InternalGTProviderProps } from '../types-dir/config';
2
- export default function GTProvider({ children, config, environment, projectId: _projectId, devApiKey: _devApiKey, _versionId, dictionary: _dictionary, locales, defaultLocale, cacheUrl, runtimeUrl, renderSettings, ssr, localeCookieName, locale: _locale, region: _region, loadDictionary, loadTranslations, fallback, translations: _translations, customMapping, enableI18n: _enableI18n, enableI18nLoaded, reloadOnLocaleUpdate, useEnableI18n, readAuthFromEnv, useDetermineLocale, useRegionState, ...metadata }: InternalGTProviderProps): import("react/jsx-runtime").JSX.Element;
3
- //# sourceMappingURL=GTProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GTProvider.d.ts","sourceRoot":"","sources":["../../src/provider/GTProvider.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAe9D,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,EACR,MAAM,EACN,WAA0B,EAC1B,SAAS,EAAE,UAAoC,EAC/C,SAAS,EAAE,UAAoC,EAC/C,UAA+B,EAC/B,UAAU,EAAE,WAAsC,EAClD,OAA+B,EAC/B,aAA6D,EAC7D,QAA8C,EAC9C,UAAuD,EACvD,cACuC,EACvC,GAAmC,EACnC,gBAAsE,EACtE,MAAM,EAAE,OAAY,EACpB,MAAM,EAAE,OAAO,EACf,cAAc,EACd,gBAAgB,EAChB,QAAoB,EACpB,YAAY,EAAE,aAAoB,EAClC,aAAqC,EACrC,UAAU,EAAE,WAEJ,EACR,gBAAgB,EAChB,oBAAoB,EACpB,aAA8B,EAC9B,eAAkC,EAClC,kBAAwC,EACxC,cAAgC,EAChC,GAAG,QAAQ,EACZ,EAAE,uBAAuB,2CA6NzB"}
@@ -1,4 +0,0 @@
1
- export declare const maxConcurrentRequests = 100;
2
- export declare const maxBatchSize = 25;
3
- export declare const batchInterval = 50;
4
- //# sourceMappingURL=defaultProps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultProps.d.ts","sourceRoot":"","sources":["../../../src/provider/config/defaultProps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,aAAa,KAAK,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated - this function is to always be overridden by a wrapper react package
3
- */
4
- export declare function isSSREnabled(): boolean;
5
- //# sourceMappingURL=isSSREnabled.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isSSREnabled.d.ts","sourceRoot":"","sources":["../../../src/provider/helpers/isSSREnabled.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Given an ISO string, validates that all the variables are present
3
- * @deprecated
4
- */
5
- export declare function validateString(string: string, variables: Record<string, string>): boolean;
6
- //# sourceMappingURL=validateString.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validateString.d.ts","sourceRoot":"","sources":["../../../src/provider/helpers/validateString.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WASlC"}
@@ -1,13 +0,0 @@
1
- import { CustomMapping } from 'generaltranslation/types';
2
- export type UseDetermineLocaleParams = {
3
- defaultLocale: string;
4
- locales: string[];
5
- enableI18n: boolean;
6
- locale?: string;
7
- localeCookieName?: string;
8
- ssr?: boolean;
9
- customMapping?: CustomMapping;
10
- reloadOnLocaleUpdate?: boolean;
11
- };
12
- export type UseDetermineLocaleReturn = [string, (locale: string) => void];
13
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/provider/hooks/locales/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- import { UseDetermineLocaleParams, UseDetermineLocaleReturn } from './types';
2
- /**
3
- * @deprecated - this function is to always be overridden by a wrapper react package
4
- */
5
- export declare function useDetermineLocale(_params: UseDetermineLocaleParams): UseDetermineLocaleReturn;
6
- //# sourceMappingURL=useDetermineLocale.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDetermineLocale.d.ts","sourceRoot":"","sources":["../../../../src/provider/hooks/locales/useDetermineLocale.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAE7E;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,wBAAwB,GAChC,wBAAwB,CAE1B"}
@@ -1,20 +0,0 @@
1
- import { CustomMapping } from 'generaltranslation/types';
2
- import { UseDetermineLocaleParams, UseDetermineLocaleReturn } from './types';
3
- export declare function useLocaleState({ _locale, defaultLocale, locales: _locales, ssr, localeCookieName, customMapping, useDetermineLocale, enableI18n, reloadOnLocaleUpdate, }: {
4
- _locale: string;
5
- defaultLocale: string;
6
- locales: string[];
7
- ssr: boolean;
8
- localeCookieName: string;
9
- customMapping?: CustomMapping;
10
- enableI18n: boolean;
11
- useDetermineLocale: (params: UseDetermineLocaleParams) => UseDetermineLocaleReturn;
12
- reloadOnLocaleUpdate?: boolean;
13
- }): {
14
- locale: string;
15
- setLocale: (locale: string) => void;
16
- locales: string[];
17
- translationRequired: boolean;
18
- dialectTranslationRequired: boolean;
19
- };
20
- //# sourceMappingURL=useLocaleState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLocaleState.d.ts","sourceRoot":"","sources":["../../../../src/provider/hooks/locales/useLocaleState.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAE7E,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,aAAa,EACb,OAAO,EAAE,QAAQ,EACjB,GAAG,EACH,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,oBAAoB,GACrB,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,EAAE,OAAO,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,CAClB,MAAM,EAAE,wBAAwB,KAC7B,wBAAwB,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;;;;;;EAoEA"}
@@ -1,19 +0,0 @@
1
- import { InlineTranslationOptions, Translations, _Messages } from '../../../types-dir/types';
2
- import { TranslateIcuCallback } from '../../../types-dir/runtime';
3
- import { GT } from 'generaltranslation';
4
- export default function useCreateInternalUseGTFunction({ gt, translations, locale, defaultLocale, translationRequired, developmentApiEnabled, registerIcuForTranslation, environment, }: {
5
- gt: GT;
6
- translations: Translations | null;
7
- locale: string;
8
- defaultLocale: string;
9
- translationRequired: boolean;
10
- developmentApiEnabled: boolean;
11
- registerIcuForTranslation: TranslateIcuCallback;
12
- environment: 'development' | 'production' | 'test';
13
- }): {
14
- _gtFunction: (message: string, options?: InlineTranslationOptions, preloadedTranslations?: Translations) => string;
15
- _mFunction: <T extends string | null | undefined>(message: T, options?: Record<string, any>, preloadedTranslations?: Translations) => T extends string ? string : T;
16
- _filterMessagesForPreload: (_messages: _Messages) => _Messages;
17
- _preloadMessages: (_messages: _Messages) => Promise<Translations>;
18
- };
19
- //# sourceMappingURL=useCreateInternalUseGTFunction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCreateInternalUseGTFunction.d.ts","sourceRoot":"","sources":["../../../../src/provider/hooks/translation/useCreateInternalUseGTFunction.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,SAAS,EAEV,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AA0BxC,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,EACrD,EAAE,EACF,YAAY,EACZ,MAAM,EACN,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,WAAW,GACZ,EAAE;IACD,EAAE,EAAE,EAAE,CAAC;IACP,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,oBAAoB,CAAC;IAChD,WAAW,EAAE,aAAa,GAAG,YAAY,GAAG,MAAM,CAAC;CACpD,GAAG;IACF,WAAW,EAAE,CACX,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,wBAAwB,EAClC,qBAAqB,CAAC,EAAE,YAAY,KACjC,MAAM,CAAC;IACZ,UAAU,EAAE,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9C,OAAO,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,qBAAqB,CAAC,EAAE,YAAY,KACjC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC;IACnC,yBAAyB,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,SAAS,CAAC;IAC/D,gBAAgB,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;CACnE,CAoXA"}
@@ -1,5 +0,0 @@
1
- import { Dictionary, DictionaryTranslationOptions, Translations } from '../../../types-dir/types';
2
- import { GT } from 'generaltranslation';
3
- import { TranslateIcuCallback } from '../../../types-dir/runtime';
4
- export default function useCreateInternalUseTranslationsFunction(gt: GT, dictionary: Dictionary | undefined, dictionaryTranslations: Dictionary | undefined, translations: Translations | null, locale: string, defaultLocale: string, translationRequired: boolean, dialectTranslationRequired: boolean, developmentApiEnabled: boolean, registerIcuForTranslation: TranslateIcuCallback, environment: 'development' | 'production' | 'test'): (id: string, options?: DictionaryTranslationOptions) => string;
5
- //# sourceMappingURL=useCreateInternalUseTranslationsFunction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCreateInternalUseTranslationsFunction.d.ts","sourceRoot":"","sources":["../../../../src/provider/hooks/translation/useCreateInternalUseTranslationsFunction.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,YAAY,EACb,MAAM,0BAA0B,CAAC;AAalC,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AASlE,MAAM,CAAC,OAAO,UAAU,wCAAwC,CAC9D,EAAE,EAAE,EAAE,EACN,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,sBAAsB,EAAE,UAAU,GAAG,SAAS,EAC9C,YAAY,EAAE,YAAY,GAAG,IAAI,EACjC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,OAAO,EAC5B,0BAA0B,EAAE,OAAO,EACnC,qBAAqB,EAAE,OAAO,EAC9B,yBAAyB,EAAE,oBAAoB,EAC/C,WAAW,EAAE,aAAa,GAAG,YAAY,GAAG,MAAM,QAG3C,MAAM,YAAW,4BAA4B,KAAQ,MAAM,CAkLnE"}
@@ -1,4 +0,0 @@
1
- import { TranslateIcuCallback } from '../../../types-dir/runtime';
2
- import { Dictionary, DictionaryTranslationOptions, Translations } from '../../../types-dir/types';
3
- export declare function useCreateInternalUseTranslationsObjFunction(dictionary: Dictionary, dictionaryTranslations: Dictionary, setDictionary: Function, setDictionaryTranslations: Function, translations: Translations | null, locale: string, defaultLocale: string, translationRequired: boolean, dialectTranslationRequired: boolean, developmentApiEnabled: boolean, registerIcuForTranslation: TranslateIcuCallback, gtFunction: (id: string, options: DictionaryTranslationOptions) => string): (id: string, idWithParent: string, options?: DictionaryTranslationOptions) => any;
4
- //# sourceMappingURL=useCreateInternalUseTranslationsObjFunction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCreateInternalUseTranslationsObjFunction.d.ts","sourceRoot":"","sources":["../../../../src/provider/hooks/translation/useCreateInternalUseTranslationsObjFunction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACL,UAAU,EACV,4BAA4B,EAE5B,YAAY,EACb,MAAM,0BAA0B,CAAC;AAoBlC,wBAAgB,2CAA2C,CACzD,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,UAAU,EAClC,aAAa,EAAE,QAAQ,EACvB,yBAAyB,EAAE,QAAQ,EACnC,YAAY,EAAE,YAAY,GAAG,IAAI,EACjC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,OAAO,EAC5B,0BAA0B,EAAE,OAAO,EACnC,qBAAqB,EAAE,OAAO,EAC9B,yBAAyB,EAAE,oBAAoB,EAC/C,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,4BAA4B,KAAK,MAAM,QAIjE,MAAM,gBACI,MAAM,YACX,4BAA4B,KACpC,GAAG,CA+IT"}
@@ -1,19 +0,0 @@
1
- export type UseRegionStateParams = {
2
- _region: string | undefined;
3
- ssr: boolean;
4
- regionCookieName: string;
5
- };
6
- export type UseRegionStateReturn = {
7
- region: string | undefined;
8
- setRegion: (region: string | undefined) => void;
9
- };
10
- export type UseEnableI18nParams = {
11
- enableI18n: boolean;
12
- enableI18nCookieName: string;
13
- enableI18nLoaded?: boolean;
14
- ssr: boolean;
15
- };
16
- export type UseEnableI18nReturn = {
17
- enableI18n: boolean;
18
- };
19
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/provider/hooks/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,GAAG,EAAE,OAAO,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACjD,CAAC;AAGF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { UseEnableI18nParams, UseEnableI18nReturn } from './types';
2
- export declare function useEnableI18n({ enableI18n: _enableI18n, }: UseEnableI18nParams): UseEnableI18nReturn;
3
- //# sourceMappingURL=useEnableI18n.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useEnableI18n.d.ts","sourceRoot":"","sources":["../../../src/provider/hooks/useEnableI18n.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnE,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EAAE,WAAW,GACxB,EAAE,mBAAmB,GAAG,mBAAmB,CAG3C"}
@@ -1,10 +0,0 @@
1
- export declare function useErrorChecks({ devApiKey, projectId, runtimeUrl, loadTranslationsType, cacheUrl, locales, environment, }: {
2
- devApiKey?: string;
3
- projectId: string;
4
- runtimeUrl: string | null;
5
- loadTranslationsType: string;
6
- cacheUrl: string | null;
7
- locales: string[];
8
- environment: 'development' | 'production' | 'test';
9
- }): void;
10
- //# sourceMappingURL=useErrorChecks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useErrorChecks.d.ts","sourceRoot":"","sources":["../../../src/provider/hooks/useErrorChecks.ts"],"names":[],"mappings":"AAaA,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,aAAa,GAAG,YAAY,GAAG,MAAM,CAAC;CACpD,QAgDA"}
@@ -1,15 +0,0 @@
1
- import { CustomLoader } from '../../types-dir/types';
2
- import { Dictionary } from '../../types-dir/types';
3
- export declare function useLoadDictionary({ _dictionary, _dictionaryTranslations, loadDictionary, locale, defaultLocale, }: {
4
- _dictionary: Dictionary | undefined;
5
- _dictionaryTranslations: Dictionary | undefined;
6
- loadDictionary: CustomLoader | undefined;
7
- locale: string;
8
- defaultLocale: string;
9
- }): {
10
- dictionary: Dictionary | undefined;
11
- setDictionary: import("react").Dispatch<import("react").SetStateAction<Dictionary | undefined>>;
12
- dictionaryTranslations: Dictionary | undefined;
13
- setDictionaryTranslations: import("react").Dispatch<import("react").SetStateAction<Dictionary | undefined>>;
14
- };
15
- //# sourceMappingURL=useLoadDictionary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLoadDictionary.d.ts","sourceRoot":"","sources":["../../../src/provider/hooks/useLoadDictionary.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,uBAA4B,EAC5B,cAAc,EACd,MAAM,EACN,aAAa,GACd,EAAE;IACD,WAAW,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,uBAAuB,EAAE,UAAU,GAAG,SAAS,CAAC;IAChD,cAAc,EAAE,YAAY,GAAG,SAAS,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB;;;;;EAoDA"}
@@ -1,17 +0,0 @@
1
- import { CustomLoader, Translations } from '../../types-dir/types';
2
- import { GT } from 'generaltranslation';
3
- export declare function useLoadTranslations({ _translations, translationRequired, loadTranslationsType, loadTranslations, locale, cacheUrl, projectId, _versionId, gt, }: {
4
- _translations: Translations | null;
5
- translationRequired: boolean;
6
- loadTranslationsType: string;
7
- loadTranslations?: CustomLoader;
8
- locale: string;
9
- cacheUrl: string | null;
10
- projectId: string;
11
- _versionId?: string;
12
- gt: GT;
13
- }): {
14
- translations: Translations | null;
15
- setTranslations: import("react").Dispatch<import("react").SetStateAction<Translations | null>>;
16
- };
17
- //# sourceMappingURL=useLoadTranslations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLoadTranslations.d.ts","sourceRoot":"","sources":["../../../src/provider/hooks/useLoadTranslations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAGxC,wBAAgB,mBAAmB,CAAC,EAClC,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,EACV,EAAE,GACH,EAAE;IACD,aAAa,EAAE,YAAY,GAAG,IAAI,CAAC;IACnC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,EAAE,CAAC;CACR;;;EAqHA"}
@@ -1,6 +0,0 @@
1
- import { UseRegionStateParams, UseRegionStateReturn } from './types';
2
- /**
3
- * @deprecated - this function is to always be overridden by a wrapper react package
4
- */
5
- export declare function useRegionState(_params: UseRegionStateParams): UseRegionStateReturn;
6
- //# sourceMappingURL=useRegionState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRegionState.d.ts","sourceRoot":"","sources":["../../../src/provider/hooks/useRegionState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAErE;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,oBAAoB,GAC5B,oBAAoB,CAEtB"}
@@ -1,24 +0,0 @@
1
- import * as React from 'react';
2
- import { RenderMethod, Translations } from '../../types-dir/types';
3
- import { TranslateIcuCallback, TranslateChildrenCallback } from '../../types-dir/runtime';
4
- import { GT } from 'generaltranslation';
5
- export default function useRuntimeTranslation({ gt, locale, versionId: _versionId, // kept for API compatibility (not used)
6
- defaultLocale, runtimeUrl, renderSettings, setTranslations, environment, ...additionalMetadata }: {
7
- gt: GT;
8
- locale: string;
9
- versionId?: string;
10
- defaultLocale?: string;
11
- runtimeUrl?: string | null;
12
- renderSettings: {
13
- method: RenderMethod;
14
- timeout?: number;
15
- };
16
- environment: 'development' | 'production' | 'test';
17
- setTranslations: React.Dispatch<React.SetStateAction<Translations | null>>;
18
- [key: string]: any;
19
- }): {
20
- registerIcuForTranslation: TranslateIcuCallback;
21
- registerJsxForTranslation: TranslateChildrenCallback;
22
- developmentApiEnabled: boolean;
23
- };
24
- //# sourceMappingURL=useRuntimeTranslation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRuntimeTranslation.d.ts","sourceRoot":"","sources":["../../../src/provider/hooks/useRuntimeTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EACL,YAAY,EAEZ,YAAY,EACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AA0BxC,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,EAAE,EACF,MAAM,EACN,SAAS,EAAE,UAAU,EAAE,wCAAwC;AAC/D,aAAa,EACb,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,GAAG,kBAAkB,EACtB,EAAE;IACD,EAAE,EAAE,EAAE,CAAC;IACP,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE;QACd,MAAM,EAAE,YAAY,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,WAAW,EAAE,aAAa,GAAG,YAAY,GAAG,MAAM,CAAC;IACnD,eAAe,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC;IAC3E,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG;IACF,yBAAyB,EAAE,oBAAoB,CAAC;IAChD,yBAAyB,EAAE,yBAAyB,CAAC;IACrD,qBAAqB,EAAE,OAAO,CAAC;CAChC,CAoVA"}
@@ -1,6 +0,0 @@
1
- import { RenderMethod } from '../types-dir/types';
2
- export declare const getDefaultRenderSettings: (environment?: "development" | "production" | "test") => {
3
- method: RenderMethod;
4
- timeout: number;
5
- };
6
- //# sourceMappingURL=getDefaultRenderSettings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDefaultRenderSettings.d.ts","sourceRoot":"","sources":["../../src/rendering/getDefaultRenderSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,eAAO,MAAM,wBAAwB,GACnC,cAAa,aAAa,GAAG,YAAY,GAAG,MAAqB,KAChE;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CAIhB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { TaggedElement, GTTag } from '../types-dir/types';
2
- export default function getGTTag(child: TaggedElement): GTTag | null;
3
- //# sourceMappingURL=getGTTag.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getGTTag.d.ts","sourceRoot":"","sources":["../../src/rendering/getGTTag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,KAAK,GAAG,IAAI,CAKnE"}
@@ -1,3 +0,0 @@
1
- import { Variable } from 'generaltranslation/types';
2
- export default function isVariableObject(obj: unknown): obj is Variable;
3
- //# sourceMappingURL=isVariableObject.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isVariableObject.d.ts","sourceRoot":"","sources":["../../src/rendering/isVariableObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,QAAQ,CAsBtE"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { RenderVariable, TaggedChildren } from '../types-dir/types';
3
- export default function renderDefaultChildren({ children, defaultLocale, renderVariable, }: {
4
- children: TaggedChildren;
5
- defaultLocale: string;
6
- renderVariable: RenderVariable;
7
- }): React.ReactNode;
8
- //# sourceMappingURL=renderDefaultChildren.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderDefaultChildren.d.ts","sourceRoot":"","sources":["../../src/rendering/renderDefaultChildren.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAMzC,OAAO,EACL,cAAc,EAEd,cAAc,EAEf,MAAM,oBAAoB,CAAC;AAG5B,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,QAAQ,EACR,aAAoC,EACpC,cAAc,GACf,EAAE;IACD,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,cAAc,CAAC;CAChC,GAAG,KAAK,CAAC,SAAS,CAoElB"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * renderSkeleton is a function that handles the rendering behavior for the skeleton loading method.
4
- * It replaces all content with empty strings
5
- * @returns an empty string
6
- */
7
- export default function renderSkeleton(): React.ReactNode;
8
- //# sourceMappingURL=renderSkeleton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderSkeleton.d.ts","sourceRoot":"","sources":["../../src/rendering/renderSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,KAAK,CAAC,SAAS,CAExD"}
@@ -1,9 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { TaggedChildren, TranslatedChildren, RenderVariable } from '../types-dir/types';
3
- export default function renderTranslatedChildren({ source, target, locales, renderVariable, }: {
4
- source: TaggedChildren;
5
- target: TranslatedChildren;
6
- locales: string[];
7
- renderVariable: RenderVariable;
8
- }): ReactNode;
9
- //# sourceMappingURL=renderTranslatedChildren.d.ts.map