@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
@@ -1 +0,0 @@
1
- {"version":3,"file":"initializeGTSPA.cjs","names":["I18nCache","WritableConditionStore","I18nStore"],"sources":["../../src/setup/initializeGTSPA.ts"],"sourcesContent":["import {\n I18nCache,\n setupGTServicesEnabled,\n WritableConditionStore,\n} from 'gt-i18n/internal';\nimport type {\n GTServicesEnabledParams,\n I18nConfigParams,\n WritableConditionStoreParams,\n} from 'gt-i18n/internal/types';\nimport type { Translation } from 'gt-i18n/types';\nimport { setReactI18nCache } from '../i18n-cache/singleton-operations';\nimport type { ReactI18nCacheParams } from '../i18n-cache/ReactI18nCache';\nimport { I18nStore } from '../i18n-store/I18nStore';\nimport { setReadonlyConditionStore } from '../condition-store/singleton-operations';\nimport { setI18nStore } from '../i18n-store/singleton-operations';\nimport { initializeI18nConfig } from './i18nConfig';\n\n/**\n * Initialize GT for an SPA\n * - i18nCache\n * - conditionStore\n * - i18nStore\n *\n * @deprecated moved to /react and /react-native\n */\nexport function internalInitializeGTSPA(\n config: I18nConfigParams &\n GTServicesEnabledParams &\n ReactI18nCacheParams &\n WritableConditionStoreParams\n): void {\n setupGTServicesEnabled(config);\n initializeI18nConfig(config, 'SPA');\n\n const i18nCache = new I18nCache<Translation>(config);\n setReactI18nCache(i18nCache);\n\n const conditionStore = new WritableConditionStore(config);\n setReadonlyConditionStore(conditionStore);\n\n const i18nStore = new I18nStore();\n setI18nStore(i18nStore);\n}\n"],"mappings":"6TA0BA,SAAgB,EACd,EAIM,EACN,EAAA,EAAA,wBAAuB,EAAO,CAC9B,EAAA,qBAAqB,EAAQ,MAAM,CAGnC,EAAA,kBAAkB,IADIA,EAAAA,UAAuB,EAClB,CAAC,CAG5B,EAAA,kBAA0B,IADCC,EAAAA,uBAAuB,EACV,CAAC,CAGzC,EAAA,aAAa,IADSC,EAAAA,UACC"}
@@ -1,16 +0,0 @@
1
- import { ReactI18nCacheParams } from "../i18n-cache/ReactI18nCache.js";
2
- import { GTServicesEnabledParams, I18nConfigParams, WritableConditionStoreParams } from "gt-i18n/internal/types";
3
-
4
- //#region src/setup/initializeGTSPA.d.ts
5
- /**
6
- * Initialize GT for an SPA
7
- * - i18nCache
8
- * - conditionStore
9
- * - i18nStore
10
- *
11
- * @deprecated moved to /react and /react-native
12
- */
13
- declare function internalInitializeGTSPA(config: I18nConfigParams & GTServicesEnabledParams & ReactI18nCacheParams & WritableConditionStoreParams): void;
14
- //#endregion
15
- export { internalInitializeGTSPA };
16
- //# sourceMappingURL=initializeGTSPA.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"initializeGTSPA.d.ts","names":[],"sources":["../../src/setup/initializeGTSPA.ts"],"mappings":";;;;;;AA0BA;;;;;;iBAAgB,uBAAA,CACd,MAAA,EAAQ,gBAAA,GACN,uBAAA,GACA,oBAAA,GACA,4BAAA"}
@@ -1,2 +0,0 @@
1
- import{setReactI18nCache as e}from"../i18n-cache/singleton-operations.mjs";import{initializeI18nConfig as t}from"./i18nConfig.mjs";import{setConditionStore as n}from"../condition-store/singleton-operations.mjs";import{I18nStore as r}from"../i18n-store/I18nStore.mjs";import{setI18nStore as i}from"../i18n-store/singleton-operations.mjs";import{I18nCache as a,WritableConditionStore as o,setupGTServicesEnabled as s}from"gt-i18n/internal";function c(c){s(c),t(c,`SPA`),e(new a(c)),n(new o(c)),i(new r)}export{c as internalInitializeGTSPA};
2
- //# sourceMappingURL=initializeGTSPA.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"initializeGTSPA.mjs","names":[],"sources":["../../src/setup/initializeGTSPA.ts"],"sourcesContent":["import {\n I18nCache,\n setupGTServicesEnabled,\n WritableConditionStore,\n} from 'gt-i18n/internal';\nimport type {\n GTServicesEnabledParams,\n I18nConfigParams,\n WritableConditionStoreParams,\n} from 'gt-i18n/internal/types';\nimport type { Translation } from 'gt-i18n/types';\nimport { setReactI18nCache } from '../i18n-cache/singleton-operations';\nimport type { ReactI18nCacheParams } from '../i18n-cache/ReactI18nCache';\nimport { I18nStore } from '../i18n-store/I18nStore';\nimport { setReadonlyConditionStore } from '../condition-store/singleton-operations';\nimport { setI18nStore } from '../i18n-store/singleton-operations';\nimport { initializeI18nConfig } from './i18nConfig';\n\n/**\n * Initialize GT for an SPA\n * - i18nCache\n * - conditionStore\n * - i18nStore\n *\n * @deprecated moved to /react and /react-native\n */\nexport function internalInitializeGTSPA(\n config: I18nConfigParams &\n GTServicesEnabledParams &\n ReactI18nCacheParams &\n WritableConditionStoreParams\n): void {\n setupGTServicesEnabled(config);\n initializeI18nConfig(config, 'SPA');\n\n const i18nCache = new I18nCache<Translation>(config);\n setReactI18nCache(i18nCache);\n\n const conditionStore = new WritableConditionStore(config);\n setReadonlyConditionStore(conditionStore);\n\n const i18nStore = new I18nStore();\n setI18nStore(i18nStore);\n}\n"],"mappings":"sbA0BA,SAAgB,EACd,EAIM,CACN,EAAuB,EAAO,CAC9B,EAAqB,EAAQ,MAAM,CAGnC,EAAkB,IADI,EAAuB,EAClB,CAAC,CAG5B,EAA0B,IADC,EAAuB,EACV,CAAC,CAGzC,EAAa,IADS,EACC"}
@@ -1,2 +0,0 @@
1
- exports.defaultEnableI18nCookieName=`generaltranslation.enable-i18n`,exports.defaultLocaleCookieName=`generaltranslation.locale`,exports.defaultRegionCookieName=`generaltranslation.region`;
2
- //# sourceMappingURL=cookies.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cookies.cjs","names":[],"sources":["../../src/utils/cookies.ts"],"sourcesContent":["/**\n * Cookie name for tracking the user's selected locale.\n */\nexport const defaultLocaleCookieName = 'generaltranslation.locale';\n\n/**\n * Cookie name for tracking the user's selected region.\n */\nexport const defaultRegionCookieName = 'generaltranslation.region';\n\n/**\n * Cookie name for persisting the enableI18n feature flag.\n */\nexport const defaultEnableI18nCookieName = 'generaltranslation.enable-i18n';\n"],"mappings":""}
@@ -1,16 +0,0 @@
1
- //#region src/utils/cookies.d.ts
2
- /**
3
- * Cookie name for tracking the user's selected locale.
4
- */
5
- declare const defaultLocaleCookieName = "generaltranslation.locale";
6
- /**
7
- * Cookie name for tracking the user's selected region.
8
- */
9
- declare const defaultRegionCookieName = "generaltranslation.region";
10
- /**
11
- * Cookie name for persisting the enableI18n feature flag.
12
- */
13
- declare const defaultEnableI18nCookieName = "generaltranslation.enable-i18n";
14
- //#endregion
15
- export { defaultEnableI18nCookieName, defaultLocaleCookieName, defaultRegionCookieName };
16
- //# sourceMappingURL=cookies.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cookies.d.ts","names":[],"sources":["../../src/utils/cookies.ts"],"mappings":";;AAGA;;cAAa,uBAAA;;;AAKb;cAAa,uBAAA;;;;cAKA,2BAAA"}
@@ -1,2 +0,0 @@
1
- const e=`generaltranslation.locale`,t=`generaltranslation.region`,n=`generaltranslation.enable-i18n`;export{n as defaultEnableI18nCookieName,e as defaultLocaleCookieName,t as defaultRegionCookieName};
2
- //# sourceMappingURL=cookies.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cookies.mjs","names":[],"sources":["../../src/utils/cookies.ts"],"sourcesContent":["/**\n * Cookie name for tracking the user's selected locale.\n */\nexport const defaultLocaleCookieName = 'generaltranslation.locale';\n\n/**\n * Cookie name for tracking the user's selected region.\n */\nexport const defaultRegionCookieName = 'generaltranslation.region';\n\n/**\n * Cookie name for persisting the enableI18n feature flag.\n */\nexport const defaultEnableI18nCookieName = 'generaltranslation.enable-i18n';\n"],"mappings":"AAGA,MAAa,EAA0B,4BAK1B,EAA0B,4BAK1B,EAA8B"}
@@ -1,2 +0,0 @@
1
- const e=require(`./indexDict.cjs`),t=e=>`Duplicate key found in dictionary: "${e}"`;function n(r,i=``){let a={};for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o)){let s=i?`${i}.${o}`:o;if(typeof e.get(r,o)==`object`&&e.get(r,o)!==null&&!Array.isArray(e.get(r,o))){let i=n(e.get(r,o),s);for(let e in i){if(Object.prototype.hasOwnProperty.call(a,e))throw Error(t(e));a[e]=i[e]}}else{if(Object.prototype.hasOwnProperty.call(a,s))throw Error(t(s));a[s]=e.get(r,o)}}return a}exports.flattenDictionary=n;
2
- //# sourceMappingURL=flattenDictionary.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flattenDictionary.cjs","names":["get"],"sources":["../../../src/utils/dictionaries/flattenDictionary.ts"],"sourcesContent":["import type {\n Dictionary,\n DictionaryEntry,\n FlattenedDictionary,\n} from '../types';\nimport { get } from './indexDict';\n\nconst createDuplicateKeyError = (key: string) =>\n `Duplicate key found in dictionary: \"${key}\"`;\n\n/**\n * Flattens a nested dictionary by concatenating nested keys.\n * Throws an error if two keys result in the same flattened key.\n * @param {Record<string, any>} dictionary - The dictionary to flatten.\n * @param {string} [prefix=''] - The prefix for nested keys.\n * @returns {Record<string, React.ReactNode>} The flattened dictionary object.\n * @throws {Error} If two keys result in the same flattened key.\n */\nexport function flattenDictionary(\n dictionary: Dictionary,\n prefix: string = ''\n): FlattenedDictionary {\n const flattened: FlattenedDictionary = {};\n for (const key in dictionary) {\n if (Object.prototype.hasOwnProperty.call(dictionary, key)) {\n const newKey = prefix ? `${prefix}.${key}` : key;\n if (\n typeof get(dictionary, key) === 'object' &&\n get(dictionary, key) !== null &&\n !Array.isArray(get(dictionary, key))\n ) {\n const nestedFlattened = flattenDictionary(\n get(dictionary, key) as Dictionary,\n newKey\n );\n for (const flatKey in nestedFlattened) {\n if (Object.prototype.hasOwnProperty.call(flattened, flatKey)) {\n throw new Error(createDuplicateKeyError(flatKey));\n }\n flattened[flatKey] = nestedFlattened[flatKey];\n }\n } else {\n if (Object.prototype.hasOwnProperty.call(flattened, newKey)) {\n throw new Error(createDuplicateKeyError(newKey));\n }\n flattened[newKey] = get(dictionary, key) as DictionaryEntry;\n }\n }\n }\n return flattened;\n}\n"],"mappings":"mCAOM,EAA2B,GAC/B,uCAAuC,EAAI,GAU7C,SAAgB,EACd,EACA,EAAiB,GACI,CACrB,IAAM,EAAiC,EAAE,CACzC,IAAK,IAAM,KAAO,EAChB,GAAI,OAAO,UAAU,eAAe,KAAK,EAAY,EAAI,CAAE,CACzD,IAAM,EAAS,EAAS,GAAG,EAAO,GAAG,IAAQ,EAC7C,GACE,OAAOA,EAAAA,IAAI,EAAY,EAAI,EAAK,UAChCA,EAAAA,IAAI,EAAY,EAAI,GAAK,MACzB,CAAC,MAAM,QAAQA,EAAAA,IAAI,EAAY,EAAI,CAAC,CACpC,CACA,IAAM,EAAkB,EACtBA,EAAAA,IAAI,EAAY,EAAI,CACpB,EACD,CACD,IAAK,IAAM,KAAW,EAAiB,CACrC,GAAI,OAAO,UAAU,eAAe,KAAK,EAAW,EAAQ,CAC1D,MAAU,MAAM,EAAwB,EAAQ,CAAC,CAEnD,EAAU,GAAW,EAAgB,QAElC,CACL,GAAI,OAAO,UAAU,eAAe,KAAK,EAAW,EAAO,CACzD,MAAU,MAAM,EAAwB,EAAO,CAAC,CAElD,EAAU,GAAUA,EAAAA,IAAI,EAAY,EAAI,EAI9C,OAAO"}
@@ -1,15 +0,0 @@
1
- import { Dictionary, FlattenedDictionary } from "../types.js";
2
-
3
- //#region src/utils/dictionaries/flattenDictionary.d.ts
4
- /**
5
- * Flattens a nested dictionary by concatenating nested keys.
6
- * Throws an error if two keys result in the same flattened key.
7
- * @param {Record<string, any>} dictionary - The dictionary to flatten.
8
- * @param {string} [prefix=''] - The prefix for nested keys.
9
- * @returns {Record<string, React.ReactNode>} The flattened dictionary object.
10
- * @throws {Error} If two keys result in the same flattened key.
11
- */
12
- declare function flattenDictionary(dictionary: Dictionary, prefix?: string): FlattenedDictionary;
13
- //#endregion
14
- export { flattenDictionary };
15
- //# sourceMappingURL=flattenDictionary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flattenDictionary.d.ts","names":[],"sources":["../../../src/utils/dictionaries/flattenDictionary.ts"],"mappings":";;;;;AAkBA;;;;;;iBAAgB,iBAAA,CACd,UAAA,EAAY,UAAA,EACZ,MAAA,YACC,mBAAA"}
@@ -1,2 +0,0 @@
1
- import{get as e}from"./indexDict.mjs";const t=e=>`Duplicate key found in dictionary: "${e}"`;function n(r,i=``){let a={};for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o)){let s=i?`${i}.${o}`:o;if(typeof e(r,o)==`object`&&e(r,o)!==null&&!Array.isArray(e(r,o))){let i=n(e(r,o),s);for(let e in i){if(Object.prototype.hasOwnProperty.call(a,e))throw Error(t(e));a[e]=i[e]}}else{if(Object.prototype.hasOwnProperty.call(a,s))throw Error(t(s));a[s]=e(r,o)}}return a}export{n as flattenDictionary};
2
- //# sourceMappingURL=flattenDictionary.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flattenDictionary.mjs","names":[],"sources":["../../../src/utils/dictionaries/flattenDictionary.ts"],"sourcesContent":["import type {\n Dictionary,\n DictionaryEntry,\n FlattenedDictionary,\n} from '../types';\nimport { get } from './indexDict';\n\nconst createDuplicateKeyError = (key: string) =>\n `Duplicate key found in dictionary: \"${key}\"`;\n\n/**\n * Flattens a nested dictionary by concatenating nested keys.\n * Throws an error if two keys result in the same flattened key.\n * @param {Record<string, any>} dictionary - The dictionary to flatten.\n * @param {string} [prefix=''] - The prefix for nested keys.\n * @returns {Record<string, React.ReactNode>} The flattened dictionary object.\n * @throws {Error} If two keys result in the same flattened key.\n */\nexport function flattenDictionary(\n dictionary: Dictionary,\n prefix: string = ''\n): FlattenedDictionary {\n const flattened: FlattenedDictionary = {};\n for (const key in dictionary) {\n if (Object.prototype.hasOwnProperty.call(dictionary, key)) {\n const newKey = prefix ? `${prefix}.${key}` : key;\n if (\n typeof get(dictionary, key) === 'object' &&\n get(dictionary, key) !== null &&\n !Array.isArray(get(dictionary, key))\n ) {\n const nestedFlattened = flattenDictionary(\n get(dictionary, key) as Dictionary,\n newKey\n );\n for (const flatKey in nestedFlattened) {\n if (Object.prototype.hasOwnProperty.call(flattened, flatKey)) {\n throw new Error(createDuplicateKeyError(flatKey));\n }\n flattened[flatKey] = nestedFlattened[flatKey];\n }\n } else {\n if (Object.prototype.hasOwnProperty.call(flattened, newKey)) {\n throw new Error(createDuplicateKeyError(newKey));\n }\n flattened[newKey] = get(dictionary, key) as DictionaryEntry;\n }\n }\n }\n return flattened;\n}\n"],"mappings":"sCAOA,MAAM,EAA2B,GAC/B,uCAAuC,EAAI,GAU7C,SAAgB,EACd,EACA,EAAiB,GACI,CACrB,IAAM,EAAiC,EAAE,CACzC,IAAK,IAAM,KAAO,EAChB,GAAI,OAAO,UAAU,eAAe,KAAK,EAAY,EAAI,CAAE,CACzD,IAAM,EAAS,EAAS,GAAG,EAAO,GAAG,IAAQ,EAC7C,GACE,OAAO,EAAI,EAAY,EAAI,EAAK,UAChC,EAAI,EAAY,EAAI,GAAK,MACzB,CAAC,MAAM,QAAQ,EAAI,EAAY,EAAI,CAAC,CACpC,CACA,IAAM,EAAkB,EACtB,EAAI,EAAY,EAAI,CACpB,EACD,CACD,IAAK,IAAM,KAAW,EAAiB,CACrC,GAAI,OAAO,UAAU,eAAe,KAAK,EAAW,EAAQ,CAC1D,MAAU,MAAM,EAAwB,EAAQ,CAAC,CAEnD,EAAU,GAAW,EAAgB,QAElC,CACL,GAAI,OAAO,UAAU,eAAe,KAAK,EAAW,EAAO,CACzD,MAAU,MAAM,EAAwB,EAAO,CAAC,CAElD,EAAU,GAAU,EAAI,EAAY,EAAI,EAI9C,OAAO"}
@@ -1,2 +0,0 @@
1
- const e=require(`./indexDict.cjs`);function t(e){if(typeof e==`string`)return!0;if(Array.isArray(e)){if(typeof e?.[0]!=`string`)return!1;let t=e?.[1];if(t===void 0||t&&typeof t==`object`)return!0}return!1}function n(t,n){let r=t,i=n.split(`.`);for(let t of i){if(typeof r!=`object`&&!Array.isArray(r))return;r=e.get(r,t)}return r}exports.getDictionaryEntry=n,exports.isValidDictionaryEntry=t;
2
- //# sourceMappingURL=getDictionaryEntry.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDictionaryEntry.cjs","names":["get"],"sources":["../../../src/utils/dictionaries/getDictionaryEntry.ts"],"sourcesContent":["import type { Dictionary, DictionaryEntry } from '../types';\nimport { get } from './indexDict';\n\nexport function isValidDictionaryEntry(\n value: unknown\n): value is DictionaryEntry {\n if (typeof value === 'string') {\n return true;\n }\n\n if (Array.isArray(value)) {\n if (typeof value?.[0] !== 'string') {\n return false;\n }\n const provisionalMetadata = value?.[1];\n if (typeof provisionalMetadata === 'undefined') return true;\n if (provisionalMetadata && typeof provisionalMetadata === 'object')\n return true;\n }\n\n return false;\n}\n\nexport function getDictionaryEntry<T extends Dictionary>(\n dictionary: T,\n id: string\n): Dictionary | DictionaryEntry | undefined {\n let current: Dictionary | DictionaryEntry = dictionary;\n const dictionaryPath = id.split('.');\n for (const key of dictionaryPath) {\n if (typeof current !== 'object' && !Array.isArray(current)) {\n return undefined;\n }\n current = get(current as Dictionary, key);\n }\n return current;\n}\n"],"mappings":"mCAGA,SAAgB,EACd,EAC0B,CAC1B,GAAI,OAAO,GAAU,SACnB,MAAO,GAGT,GAAI,MAAM,QAAQ,EAAM,CAAE,CACxB,GAAI,OAAO,IAAQ,IAAO,SACxB,MAAO,GAET,IAAM,EAAsB,IAAQ,GAEpC,GADW,IAAwB,QAC/B,GAAuB,OAAO,GAAwB,SACxD,MAAO,GAGX,MAAO,GAGT,SAAgB,EACd,EACA,EAC0C,CAC1C,IAAI,EAAwC,EACtC,EAAiB,EAAG,MAAM,IAAI,CACpC,IAAK,IAAM,KAAO,EAAgB,CAChC,GAAI,OAAO,GAAY,UAAY,CAAC,MAAM,QAAQ,EAAQ,CACxD,OAEF,EAAUA,EAAAA,IAAI,EAAuB,EAAI,CAE3C,OAAO"}
@@ -1,8 +0,0 @@
1
- import { Dictionary, DictionaryEntry } from "../types.js";
2
-
3
- //#region src/utils/dictionaries/getDictionaryEntry.d.ts
4
- declare function isValidDictionaryEntry(value: unknown): value is DictionaryEntry;
5
- declare function getDictionaryEntry<T extends Dictionary>(dictionary: T, id: string): Dictionary | DictionaryEntry | undefined;
6
- //#endregion
7
- export { getDictionaryEntry, isValidDictionaryEntry };
8
- //# sourceMappingURL=getDictionaryEntry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDictionaryEntry.d.ts","names":[],"sources":["../../../src/utils/dictionaries/getDictionaryEntry.ts"],"mappings":";;;iBAGgB,sBAAA,CACd,KAAA,YACC,KAAA,IAAS,eAAA;AAAA,iBAkBI,kBAAA,WAA6B,UAAA,CAAA,CAC3C,UAAA,EAAY,CAAA,EACZ,EAAA,WACC,UAAA,GAAa,eAAA"}
@@ -1,2 +0,0 @@
1
- import{get as e}from"./indexDict.mjs";function t(e){if(typeof e==`string`)return!0;if(Array.isArray(e)){if(typeof e?.[0]!=`string`)return!1;let t=e?.[1];if(t===void 0||t&&typeof t==`object`)return!0}return!1}function n(t,n){let r=t,i=n.split(`.`);for(let t of i){if(typeof r!=`object`&&!Array.isArray(r))return;r=e(r,t)}return r}export{n as getDictionaryEntry,t as isValidDictionaryEntry};
2
- //# sourceMappingURL=getDictionaryEntry.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDictionaryEntry.mjs","names":[],"sources":["../../../src/utils/dictionaries/getDictionaryEntry.ts"],"sourcesContent":["import type { Dictionary, DictionaryEntry } from '../types';\nimport { get } from './indexDict';\n\nexport function isValidDictionaryEntry(\n value: unknown\n): value is DictionaryEntry {\n if (typeof value === 'string') {\n return true;\n }\n\n if (Array.isArray(value)) {\n if (typeof value?.[0] !== 'string') {\n return false;\n }\n const provisionalMetadata = value?.[1];\n if (typeof provisionalMetadata === 'undefined') return true;\n if (provisionalMetadata && typeof provisionalMetadata === 'object')\n return true;\n }\n\n return false;\n}\n\nexport function getDictionaryEntry<T extends Dictionary>(\n dictionary: T,\n id: string\n): Dictionary | DictionaryEntry | undefined {\n let current: Dictionary | DictionaryEntry = dictionary;\n const dictionaryPath = id.split('.');\n for (const key of dictionaryPath) {\n if (typeof current !== 'object' && !Array.isArray(current)) {\n return undefined;\n }\n current = get(current as Dictionary, key);\n }\n return current;\n}\n"],"mappings":"sCAGA,SAAgB,EACd,EAC0B,CAC1B,GAAI,OAAO,GAAU,SACnB,MAAO,GAGT,GAAI,MAAM,QAAQ,EAAM,CAAE,CACxB,GAAI,OAAO,IAAQ,IAAO,SACxB,MAAO,GAET,IAAM,EAAsB,IAAQ,GAEpC,GADW,IAAwB,QAC/B,GAAuB,OAAO,GAAwB,SACxD,MAAO,GAGX,MAAO,GAGT,SAAgB,EACd,EACA,EAC0C,CAC1C,IAAI,EAAwC,EACtC,EAAiB,EAAG,MAAM,IAAI,CACpC,IAAK,IAAM,KAAO,EAAgB,CAChC,GAAI,OAAO,GAAY,UAAY,CAAC,MAAM,QAAQ,EAAQ,CACxD,OAEF,EAAU,EAAI,EAAuB,EAAI,CAE3C,OAAO"}
@@ -1,2 +0,0 @@
1
- function e(e){if(Array.isArray(e)){if(e.length===1)return{entry:e[0]};if(e.length===2)return{entry:e[0],metadata:e[1]}}return{entry:e}}exports.getEntryAndMetadata=e;
2
- //# sourceMappingURL=getEntryAndMetadata.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getEntryAndMetadata.cjs","names":[],"sources":["../../../src/utils/dictionaries/getEntryAndMetadata.ts"],"sourcesContent":["import type { DictionaryEntry, MetaEntry } from '../types';\n\nexport function getEntryAndMetadata(value: DictionaryEntry): {\n entry: string;\n metadata?: MetaEntry;\n} {\n if (Array.isArray(value)) {\n if (value.length === 1) {\n return { entry: value[0] };\n }\n if (value.length === 2) {\n return { entry: value[0], metadata: value[1] as MetaEntry };\n }\n }\n return { entry: value };\n}\n"],"mappings":"AAEA,SAAgB,EAAoB,EAGlC,CACA,GAAI,MAAM,QAAQ,EAAM,CAAE,CACxB,GAAI,EAAM,SAAW,EACnB,MAAO,CAAE,MAAO,EAAM,GAAI,CAE5B,GAAI,EAAM,SAAW,EACnB,MAAO,CAAE,MAAO,EAAM,GAAI,SAAU,EAAM,GAAiB,CAG/D,MAAO,CAAE,MAAO,EAAO"}
@@ -1,10 +0,0 @@
1
- import { DictionaryEntry, MetaEntry } from "../types.js";
2
-
3
- //#region src/utils/dictionaries/getEntryAndMetadata.d.ts
4
- declare function getEntryAndMetadata(value: DictionaryEntry): {
5
- entry: string;
6
- metadata?: MetaEntry;
7
- };
8
- //#endregion
9
- export { getEntryAndMetadata };
10
- //# sourceMappingURL=getEntryAndMetadata.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getEntryAndMetadata.d.ts","names":[],"sources":["../../../src/utils/dictionaries/getEntryAndMetadata.ts"],"mappings":";;;iBAEgB,mBAAA,CAAoB,KAAA,EAAO,eAAA;EACzC,KAAA;EACA,QAAA,GAAW,SAAA;AAAA"}
@@ -1,2 +0,0 @@
1
- function e(e){if(Array.isArray(e)){if(e.length===1)return{entry:e[0]};if(e.length===2)return{entry:e[0],metadata:e[1]}}return{entry:e}}export{e as getEntryAndMetadata};
2
- //# sourceMappingURL=getEntryAndMetadata.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getEntryAndMetadata.mjs","names":[],"sources":["../../../src/utils/dictionaries/getEntryAndMetadata.ts"],"sourcesContent":["import type { DictionaryEntry, MetaEntry } from '../types';\n\nexport function getEntryAndMetadata(value: DictionaryEntry): {\n entry: string;\n metadata?: MetaEntry;\n} {\n if (Array.isArray(value)) {\n if (value.length === 1) {\n return { entry: value[0] };\n }\n if (value.length === 2) {\n return { entry: value[0], metadata: value[1] as MetaEntry };\n }\n }\n return { entry: value };\n}\n"],"mappings":"AAEA,SAAgB,EAAoB,EAGlC,CACA,GAAI,MAAM,QAAQ,EAAM,CAAE,CACxB,GAAI,EAAM,SAAW,EACnB,MAAO,CAAE,MAAO,EAAM,GAAI,CAE5B,GAAI,EAAM,SAAW,EACnB,MAAO,CAAE,MAAO,EAAM,GAAI,SAAU,EAAM,GAAiB,CAG/D,MAAO,CAAE,MAAO,EAAO"}
@@ -1,2 +0,0 @@
1
- function e(e,t){if(e==null)throw Error(`Cannot index into an undefined dictionary`);return e[t]}exports.get=e;
2
- //# sourceMappingURL=indexDict.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"indexDict.cjs","names":[],"sources":["../../../src/utils/dictionaries/indexDict.ts"],"sourcesContent":["import type { Dictionary, DictionaryEntry } from '../types';\n\n/**\n * @description A function that gets a value from a dictionary, only one level\n * @param dictionary - dictionary to get the value from\n * @param id - id of the value to get\n */\nexport function get(dictionary: Dictionary, id: string | number) {\n if (dictionary == null) {\n throw new Error('Cannot index into an undefined dictionary');\n }\n if (Array.isArray(dictionary)) {\n return dictionary[id as number];\n }\n return dictionary[id as string];\n}\n\n/**\n * @description A function that sets a value in a dictionary\n * @param dictionary - dictionary to set the value in\n * @param id - id of the value to set\n * @param value - value to set\n */\nexport function set(\n dictionary: Dictionary,\n id: string | number,\n value: Dictionary | DictionaryEntry\n) {\n if (Array.isArray(dictionary)) {\n dictionary[id as number] = value;\n } else {\n (dictionary as Record<string, Dictionary | DictionaryEntry>)[id as string] =\n value;\n }\n}\n"],"mappings":"AAOA,SAAgB,EAAI,EAAwB,EAAqB,CAC/D,GAAI,GAAc,KAChB,MAAU,MAAM,4CAA4C,CAK9D,OAFS,EAAW"}
@@ -1,2 +0,0 @@
1
- function e(e,t){if(e==null)throw Error(`Cannot index into an undefined dictionary`);return e[t]}export{e as get};
2
- //# sourceMappingURL=indexDict.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"indexDict.mjs","names":[],"sources":["../../../src/utils/dictionaries/indexDict.ts"],"sourcesContent":["import type { Dictionary, DictionaryEntry } from '../types';\n\n/**\n * @description A function that gets a value from a dictionary, only one level\n * @param dictionary - dictionary to get the value from\n * @param id - id of the value to get\n */\nexport function get(dictionary: Dictionary, id: string | number) {\n if (dictionary == null) {\n throw new Error('Cannot index into an undefined dictionary');\n }\n if (Array.isArray(dictionary)) {\n return dictionary[id as number];\n }\n return dictionary[id as string];\n}\n\n/**\n * @description A function that sets a value in a dictionary\n * @param dictionary - dictionary to set the value in\n * @param id - id of the value to set\n * @param value - value to set\n */\nexport function set(\n dictionary: Dictionary,\n id: string | number,\n value: Dictionary | DictionaryEntry\n) {\n if (Array.isArray(dictionary)) {\n dictionary[id as number] = value;\n } else {\n (dictionary as Record<string, Dictionary | DictionaryEntry>)[id as string] =\n value;\n }\n}\n"],"mappings":"AAOA,SAAgB,EAAI,EAAwB,EAAqB,CAC/D,GAAI,GAAc,KAChB,MAAU,MAAM,4CAA4C,CAK9D,OAFS,EAAW"}
@@ -1,2 +0,0 @@
1
- function e(e){return e===void 0?!1:typeof e==`string`?!0:Array.isArray(e)?!(e.length!==1&&e.length!==2||typeof e[0]!=`string`||e.length===2&&(typeof e[1]!=`object`||e[1]===null||!(`$context`in e[1])&&!(`$maxChars`in e[1])&&!(`$_hash`in e[1]))):!1}exports.isDictionaryEntry=e;
2
- //# sourceMappingURL=isDictionaryEntry.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isDictionaryEntry.cjs","names":[],"sources":["../../../src/utils/dictionaries/isDictionaryEntry.ts"],"sourcesContent":["import type { Dictionary, DictionaryEntry } from '../types';\n\n/**\n * Type guard function that checks if a value is a DictionaryEntry\n * @param value - The value to check\n * @returns true if the value is a DictionaryEntry, false otherwise\n */\nexport function isDictionaryEntry(\n value: Dictionary | DictionaryEntry | undefined\n): value is DictionaryEntry {\n if (value === undefined) {\n return false;\n }\n\n // Check if it's a string (Entry)\n if (typeof value === 'string') {\n return true;\n }\n\n // Check if it's an array\n if (Array.isArray(value)) {\n // Must have 1 or 2 elements\n if (value.length !== 1 && value.length !== 2) {\n return false;\n }\n\n // First element must be a string (Entry)\n if (typeof value[0] !== 'string') {\n return false;\n }\n\n // If there's a second element, it must be an object (MetaEntry)\n if (\n value.length === 2 &&\n (typeof value[1] !== 'object' ||\n value[1] === null ||\n (!('$context' in value[1]) &&\n !('$maxChars' in value[1]) &&\n !('$_hash' in value[1])))\n ) {\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n"],"mappings":"AAOA,SAAgB,EACd,EAC0B,CAqC1B,OApCI,IAAU,IAAA,GACL,GAIL,OAAO,GAAU,SACZ,GAIL,MAAM,QAAQ,EAAM,CAYtB,EAVI,EAAM,SAAW,GAAK,EAAM,SAAW,GAKvC,OAAO,EAAM,IAAO,UAMtB,EAAM,SAAW,IAChB,OAAO,EAAM,IAAO,UACnB,EAAM,KAAO,MACZ,EAAE,aAAc,EAAM,KACrB,EAAE,cAAe,EAAM,KACvB,EAAE,WAAY,EAAM,MAQrB"}
@@ -1,12 +0,0 @@
1
- import { Dictionary, DictionaryEntry } from "../types.js";
2
-
3
- //#region src/utils/dictionaries/isDictionaryEntry.d.ts
4
- /**
5
- * Type guard function that checks if a value is a DictionaryEntry
6
- * @param value - The value to check
7
- * @returns true if the value is a DictionaryEntry, false otherwise
8
- */
9
- declare function isDictionaryEntry(value: Dictionary | DictionaryEntry | undefined): value is DictionaryEntry;
10
- //#endregion
11
- export { isDictionaryEntry };
12
- //# sourceMappingURL=isDictionaryEntry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isDictionaryEntry.d.ts","names":[],"sources":["../../../src/utils/dictionaries/isDictionaryEntry.ts"],"mappings":";;;;;AAOA;;;iBAAgB,iBAAA,CACd,KAAA,EAAO,UAAA,GAAa,eAAA,eACnB,KAAA,IAAS,eAAA"}
@@ -1,2 +0,0 @@
1
- function e(e){return e===void 0?!1:typeof e==`string`?!0:Array.isArray(e)?!(e.length!==1&&e.length!==2||typeof e[0]!=`string`||e.length===2&&(typeof e[1]!=`object`||e[1]===null||!(`$context`in e[1])&&!(`$maxChars`in e[1])&&!(`$_hash`in e[1]))):!1}export{e as isDictionaryEntry};
2
- //# sourceMappingURL=isDictionaryEntry.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isDictionaryEntry.mjs","names":[],"sources":["../../../src/utils/dictionaries/isDictionaryEntry.ts"],"sourcesContent":["import type { Dictionary, DictionaryEntry } from '../types';\n\n/**\n * Type guard function that checks if a value is a DictionaryEntry\n * @param value - The value to check\n * @returns true if the value is a DictionaryEntry, false otherwise\n */\nexport function isDictionaryEntry(\n value: Dictionary | DictionaryEntry | undefined\n): value is DictionaryEntry {\n if (value === undefined) {\n return false;\n }\n\n // Check if it's a string (Entry)\n if (typeof value === 'string') {\n return true;\n }\n\n // Check if it's an array\n if (Array.isArray(value)) {\n // Must have 1 or 2 elements\n if (value.length !== 1 && value.length !== 2) {\n return false;\n }\n\n // First element must be a string (Entry)\n if (typeof value[0] !== 'string') {\n return false;\n }\n\n // If there's a second element, it must be an object (MetaEntry)\n if (\n value.length === 2 &&\n (typeof value[1] !== 'object' ||\n value[1] === null ||\n (!('$context' in value[1]) &&\n !('$maxChars' in value[1]) &&\n !('$_hash' in value[1])))\n ) {\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n"],"mappings":"AAOA,SAAgB,EACd,EAC0B,CAqC1B,OApCI,IAAU,IAAA,GACL,GAIL,OAAO,GAAU,SACZ,GAIL,MAAM,QAAQ,EAAM,CAYtB,EAVI,EAAM,SAAW,GAAK,EAAM,SAAW,GAKvC,OAAO,EAAM,IAAO,UAMtB,EAAM,SAAW,IAChB,OAAO,EAAM,IAAO,UACnB,EAAM,KAAO,MACZ,EAAE,aAAc,EAAM,KACrB,EAAE,cAAe,EAAM,KACvB,EAAE,WAAY,EAAM,MAQrB"}
@@ -1,2 +0,0 @@
1
- const e=require(`./indexDict.cjs`),t=require(`./isDictionaryEntry.cjs`),n=e=>typeof e==`string`||Array.isArray(e),r=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function i(a,o){if(Array.isArray(a))return a.map((e,n)=>t.isDictionaryEntry(e)?o[n]:i(e,o[n]));let s={...Object.fromEntries(Object.entries(a).filter(([,e])=>n(e))),...Object.fromEntries(Object.entries(o).filter(([,e])=>n(e)))},c=Object.entries(a).filter(([,e])=>r(e)).map(([e])=>e),l=Object.entries(o).filter(([,e])=>r(e)).map(([e])=>e),u=new Set([...c,...l]);for(let t of u)s[t]=i(e.get(a,t)||{},e.get(o,t)||{});return s}exports.mergeDictionaries=i;
2
- //# sourceMappingURL=mergeDictionaries.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mergeDictionaries.cjs","names":["isDictionaryEntry","get"],"sources":["../../../src/utils/dictionaries/mergeDictionaries.ts"],"sourcesContent":["import type { Dictionary, DictionaryEntry } from '../types';\nimport { get } from './indexDict';\nimport { isDictionaryEntry } from './isDictionaryEntry';\n\nconst isPrimitiveOrArray = (value: unknown): boolean =>\n typeof value === 'string' || Array.isArray(value);\n\nconst isObjectDictionary = (value: unknown): boolean =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\nexport function mergeDictionaries(\n defaultLocaleDictionary: Dictionary,\n localeDictionary: Dictionary\n): Dictionary {\n if (Array.isArray(defaultLocaleDictionary)) {\n return defaultLocaleDictionary.map((value, key) => {\n if (isDictionaryEntry(value)) {\n return (localeDictionary as (Dictionary | DictionaryEntry)[])[key];\n }\n return mergeDictionaries(\n value as Dictionary,\n (localeDictionary as (Dictionary | DictionaryEntry)[])[\n key\n ] as Dictionary\n );\n });\n }\n\n const mergedDictionary: Dictionary = {\n ...Object.fromEntries(\n Object.entries(defaultLocaleDictionary).filter(([, value]) =>\n isPrimitiveOrArray(value)\n )\n ),\n ...Object.fromEntries(\n Object.entries(localeDictionary).filter(([, value]) =>\n isPrimitiveOrArray(value)\n )\n ),\n };\n\n const defaultDictionaryKeys = Object.entries(defaultLocaleDictionary)\n .filter(([, value]) => isObjectDictionary(value))\n .map(([key]) => key);\n\n const localeDictionaryKeys = Object.entries(localeDictionary)\n .filter(([, value]) => isObjectDictionary(value))\n .map(([key]) => key);\n\n const allKeys = new Set([...defaultDictionaryKeys, ...localeDictionaryKeys]);\n for (const key of allKeys) {\n mergedDictionary[key] = mergeDictionaries(\n (get(defaultLocaleDictionary, key) || {}) as Dictionary,\n (get(localeDictionary, key) || {}) as Dictionary\n );\n }\n\n return mergedDictionary;\n}\n"],"mappings":"wEAIM,EAAsB,GAC1B,OAAO,GAAU,UAAY,MAAM,QAAQ,EAAM,CAE7C,EAAsB,GAC1B,OAAO,GAAU,YAAY,GAAkB,CAAC,MAAM,QAAQ,EAAM,CAEtE,SAAgB,EACd,EACA,EACY,CACZ,GAAI,MAAM,QAAQ,EAAwB,CACxC,OAAO,EAAwB,KAAK,EAAO,IACrCA,EAAAA,kBAAkB,EAAM,CAClB,EAAsD,GAEzD,EACL,EACC,EACC,GAEH,CACD,CAGJ,IAAM,EAA+B,CACnC,GAAG,OAAO,YACR,OAAO,QAAQ,EAAwB,CAAC,QAAQ,EAAG,KACjD,EAAmB,EAAM,CAC1B,CACF,CACD,GAAG,OAAO,YACR,OAAO,QAAQ,EAAiB,CAAC,QAAQ,EAAG,KAC1C,EAAmB,EAAM,CAC1B,CACF,CACF,CAEK,EAAwB,OAAO,QAAQ,EAAwB,CAClE,QAAQ,EAAG,KAAW,EAAmB,EAAM,CAAC,CAChD,KAAK,CAAC,KAAS,EAAI,CAEhB,EAAuB,OAAO,QAAQ,EAAiB,CAC1D,QAAQ,EAAG,KAAW,EAAmB,EAAM,CAAC,CAChD,KAAK,CAAC,KAAS,EAAI,CAEhB,EAAU,IAAI,IAAI,CAAC,GAAG,EAAuB,GAAG,EAAqB,CAAC,CAC5E,IAAK,IAAM,KAAO,EAChB,EAAiB,GAAO,EACrBC,EAAAA,IAAI,EAAyB,EAAI,EAAI,EAAE,CACvCA,EAAAA,IAAI,EAAkB,EAAI,EAAI,EAAE,CAClC,CAGH,OAAO"}
@@ -1,7 +0,0 @@
1
- import { Dictionary } from "../types.js";
2
-
3
- //#region src/utils/dictionaries/mergeDictionaries.d.ts
4
- declare function mergeDictionaries(defaultLocaleDictionary: Dictionary, localeDictionary: Dictionary): Dictionary;
5
- //#endregion
6
- export { mergeDictionaries };
7
- //# sourceMappingURL=mergeDictionaries.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mergeDictionaries.d.ts","names":[],"sources":["../../../src/utils/dictionaries/mergeDictionaries.ts"],"mappings":";;;iBAUgB,iBAAA,CACd,uBAAA,EAAyB,UAAA,EACzB,gBAAA,EAAkB,UAAA,GACjB,UAAA"}
@@ -1,2 +0,0 @@
1
- import{get as e}from"./indexDict.mjs";import{isDictionaryEntry as t}from"./isDictionaryEntry.mjs";const n=e=>typeof e==`string`||Array.isArray(e),r=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function i(a,o){if(Array.isArray(a))return a.map((e,n)=>t(e)?o[n]:i(e,o[n]));let s={...Object.fromEntries(Object.entries(a).filter(([,e])=>n(e))),...Object.fromEntries(Object.entries(o).filter(([,e])=>n(e)))},c=Object.entries(a).filter(([,e])=>r(e)).map(([e])=>e),l=Object.entries(o).filter(([,e])=>r(e)).map(([e])=>e),u=new Set([...c,...l]);for(let t of u)s[t]=i(e(a,t)||{},e(o,t)||{});return s}export{i as mergeDictionaries};
2
- //# sourceMappingURL=mergeDictionaries.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mergeDictionaries.mjs","names":[],"sources":["../../../src/utils/dictionaries/mergeDictionaries.ts"],"sourcesContent":["import type { Dictionary, DictionaryEntry } from '../types';\nimport { get } from './indexDict';\nimport { isDictionaryEntry } from './isDictionaryEntry';\n\nconst isPrimitiveOrArray = (value: unknown): boolean =>\n typeof value === 'string' || Array.isArray(value);\n\nconst isObjectDictionary = (value: unknown): boolean =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\nexport function mergeDictionaries(\n defaultLocaleDictionary: Dictionary,\n localeDictionary: Dictionary\n): Dictionary {\n if (Array.isArray(defaultLocaleDictionary)) {\n return defaultLocaleDictionary.map((value, key) => {\n if (isDictionaryEntry(value)) {\n return (localeDictionary as (Dictionary | DictionaryEntry)[])[key];\n }\n return mergeDictionaries(\n value as Dictionary,\n (localeDictionary as (Dictionary | DictionaryEntry)[])[\n key\n ] as Dictionary\n );\n });\n }\n\n const mergedDictionary: Dictionary = {\n ...Object.fromEntries(\n Object.entries(defaultLocaleDictionary).filter(([, value]) =>\n isPrimitiveOrArray(value)\n )\n ),\n ...Object.fromEntries(\n Object.entries(localeDictionary).filter(([, value]) =>\n isPrimitiveOrArray(value)\n )\n ),\n };\n\n const defaultDictionaryKeys = Object.entries(defaultLocaleDictionary)\n .filter(([, value]) => isObjectDictionary(value))\n .map(([key]) => key);\n\n const localeDictionaryKeys = Object.entries(localeDictionary)\n .filter(([, value]) => isObjectDictionary(value))\n .map(([key]) => key);\n\n const allKeys = new Set([...defaultDictionaryKeys, ...localeDictionaryKeys]);\n for (const key of allKeys) {\n mergedDictionary[key] = mergeDictionaries(\n (get(defaultLocaleDictionary, key) || {}) as Dictionary,\n (get(localeDictionary, key) || {}) as Dictionary\n );\n }\n\n return mergedDictionary;\n}\n"],"mappings":"kGAIA,MAAM,EAAsB,GAC1B,OAAO,GAAU,UAAY,MAAM,QAAQ,EAAM,CAE7C,EAAsB,GAC1B,OAAO,GAAU,YAAY,GAAkB,CAAC,MAAM,QAAQ,EAAM,CAEtE,SAAgB,EACd,EACA,EACY,CACZ,GAAI,MAAM,QAAQ,EAAwB,CACxC,OAAO,EAAwB,KAAK,EAAO,IACrC,EAAkB,EAAM,CAClB,EAAsD,GAEzD,EACL,EACC,EACC,GAEH,CACD,CAGJ,IAAM,EAA+B,CACnC,GAAG,OAAO,YACR,OAAO,QAAQ,EAAwB,CAAC,QAAQ,EAAG,KACjD,EAAmB,EAAM,CAC1B,CACF,CACD,GAAG,OAAO,YACR,OAAO,QAAQ,EAAiB,CAAC,QAAQ,EAAG,KAC1C,EAAmB,EAAM,CAC1B,CACF,CACF,CAEK,EAAwB,OAAO,QAAQ,EAAwB,CAClE,QAAQ,EAAG,KAAW,EAAmB,EAAM,CAAC,CAChD,KAAK,CAAC,KAAS,EAAI,CAEhB,EAAuB,OAAO,QAAQ,EAAiB,CAC1D,QAAQ,EAAG,KAAW,EAAmB,EAAM,CAAC,CAChD,KAAK,CAAC,KAAS,EAAI,CAEhB,EAAU,IAAI,IAAI,CAAC,GAAG,EAAuB,GAAG,EAAqB,CAAC,CAC5E,IAAK,IAAM,KAAO,EAChB,EAAiB,GAAO,EACrB,EAAI,EAAyB,EAAI,EAAI,EAAE,CACvC,EAAI,EAAkB,EAAI,EAAI,EAAE,CAClC,CAGH,OAAO"}
@@ -1,8 +0,0 @@
1
- import { TaggedChildren } from "../types.js";
2
- import { ReactNode } from "react";
3
-
4
- //#region src/utils/internal/addGTIdentifier.d.ts
5
- declare function addGTIdentifier(children: ReactNode, startingIndex?: number): TaggedChildren;
6
- //#endregion
7
- export { addGTIdentifier };
8
- //# sourceMappingURL=addGTIdentifier.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addGTIdentifier.d.ts","names":[],"sources":["../../../src/utils/internal/addGTIdentifier.ts"],"mappings":";;;;iBAmBgB,eAAA,CACd,QAAA,EAAU,SAAA,EACV,aAAA,YACC,cAAA"}
@@ -1,14 +0,0 @@
1
- import { TaggedChildren } from "../types.js";
2
- import { JsxChildren } from "@generaltranslation/format/types";
3
-
4
- //#region src/utils/internal/writeChildrenAsObjects.d.ts
5
- /**
6
- * Transforms children elements into objects, processing each child recursively if needed.
7
- * TaggedChildren are transformed into JsxChildren
8
- * @param {Children} children - The children to process.
9
- * @returns {object} The processed children as objects.
10
- */
11
- declare function writeChildrenAsObjects(children: TaggedChildren): JsxChildren;
12
- //#endregion
13
- export { writeChildrenAsObjects };
14
- //# sourceMappingURL=writeChildrenAsObjects.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writeChildrenAsObjects.d.ts","names":[],"sources":["../../../src/utils/internal/writeChildrenAsObjects.ts"],"mappings":";;;;;;AA2KA;;;;iBAAgB,sBAAA,CAAuB,QAAA,EAAU,cAAA,GAAiB,WAAA"}
@@ -1,13 +0,0 @@
1
- import { GTTag, VariableProps } from "../types.js";
2
-
3
- //#region src/utils/variables/_getVariableProps.d.ts
4
- type VariableElementProps = {
5
- 'data-_gt': GTTag & {
6
- transformation: 'variable';
7
- };
8
- [key: string]: unknown;
9
- };
10
- declare function getVariableProps(props: VariableElementProps): VariableProps;
11
- //#endregion
12
- export { getVariableProps };
13
- //# sourceMappingURL=_getVariableProps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_getVariableProps.d.ts","names":[],"sources":["../../../src/utils/variables/_getVariableProps.ts"],"mappings":";;;KAKK,oBAAA;EACH,UAAA,EAAY,KAAA;IACV,cAAA;EAAA;EAAA,CAED,GAAA;AAAA;AAAA,iBAiBa,gBAAA,CAAiB,KAAA,EAAO,oBAAA,GAAuB,aAAA"}
@@ -1,12 +0,0 @@
1
- //#region src/utils/variables/getVariableName.d.ts
2
- declare const defaultVariableNames: {
3
- readonly variable: "value";
4
- readonly number: "n";
5
- readonly datetime: "date";
6
- readonly currency: "cost";
7
- readonly 'relative-time': "time";
8
- };
9
- declare function getVariableName(props: Record<string, unknown> | undefined, variableType: keyof typeof defaultVariableNames): string;
10
- //#endregion
11
- export { getVariableName };
12
- //# sourceMappingURL=getVariableName.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getVariableName.d.ts","names":[],"sources":["../../../src/utils/variables/getVariableName.ts"],"mappings":";cAAM,oBAAA;EAAA;;;;;;iBAUU,eAAA,CACd,KAAA,EAAO,MAAA,+BACP,YAAA,eAA2B,oBAAA"}