@intlayer/core 9.7.0 → 9.7.1

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 (544) hide show
  1. package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -2
  2. package/dist/cjs/deepTransformPlugins/getEditedContent.cjs +2 -3
  3. package/dist/cjs/deepTransformPlugins/getFilterMissingTranslationsContent.cjs +5 -6
  4. package/dist/cjs/deepTransformPlugins/getFilterTranslationsOnlyContent.cjs +4 -5
  5. package/dist/cjs/deepTransformPlugins/getFilteredLocalesContent.cjs +3 -4
  6. package/dist/cjs/deepTransformPlugins/getLocalizedContent.cjs +3 -4
  7. package/dist/cjs/deepTransformPlugins/getMaskContent.cjs +2 -3
  8. package/dist/cjs/deepTransformPlugins/getMissingLocalesContent.cjs +3 -4
  9. package/dist/cjs/deepTransformPlugins/getMultilingualDictionary.cjs +3 -4
  10. package/dist/cjs/deepTransformPlugins/getReplacedValuesContent.cjs +2 -3
  11. package/dist/cjs/deepTransformPlugins/getSplittedContent.cjs +2 -3
  12. package/dist/cjs/deepTransformPlugins/index.cjs +11 -11
  13. package/dist/cjs/deepTransformPlugins/insertContentInDictionary.cjs +2 -3
  14. package/dist/cjs/dictionaryManipulator/editDictionaryByKeyPath.cjs +2 -3
  15. package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs +7 -4
  16. package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs.map +1 -1
  17. package/dist/cjs/dictionaryManipulator/getDefaultNode.cjs +2 -3
  18. package/dist/cjs/dictionaryManipulator/getEmptyNode.cjs +2 -3
  19. package/dist/cjs/dictionaryManipulator/getNestedDictionaryReferences.cjs +1 -2
  20. package/dist/cjs/dictionaryManipulator/getNodeChildren.cjs +2 -3
  21. package/dist/cjs/dictionaryManipulator/getNodeType.cjs +3 -4
  22. package/dist/cjs/dictionaryManipulator/index.cjs +31 -21
  23. package/dist/cjs/dictionaryManipulator/mergeDictionaries.cjs +3 -4
  24. package/dist/cjs/dictionaryManipulator/mergeQualifiedDictionaries.cjs +4 -5
  25. package/dist/cjs/dictionaryManipulator/normalizeDictionary.cjs +4 -5
  26. package/dist/cjs/dictionaryManipulator/orderDictionaries.cjs +1 -2
  27. package/dist/cjs/dictionaryManipulator/plainDynamicLoader.cjs +1 -2
  28. package/dist/cjs/dictionaryManipulator/preloadedDynamicLoader.cjs +7 -3
  29. package/dist/cjs/dictionaryManipulator/qualifiedDictionary.cjs +1 -2
  30. package/dist/cjs/dictionaryManipulator/qualifiedDictionaryDeclaration.cjs +2 -3
  31. package/dist/cjs/dictionaryManipulator/qualifiedDynamicLoader.cjs +8 -4
  32. package/dist/cjs/dictionaryManipulator/removeContentNodeByKeyPath.cjs +2 -3
  33. package/dist/cjs/dictionaryManipulator/renameContentNodeByKeyPath.cjs +2 -3
  34. package/dist/cjs/dictionaryManipulator/updateNodeChildren.cjs +2 -3
  35. package/dist/cjs/formatters/compact.cjs +2 -3
  36. package/dist/cjs/formatters/currency.cjs +2 -3
  37. package/dist/cjs/formatters/date.cjs +2 -3
  38. package/dist/cjs/formatters/index.cjs +9 -9
  39. package/dist/cjs/formatters/list.cjs +2 -3
  40. package/dist/cjs/formatters/number.cjs +2 -3
  41. package/dist/cjs/formatters/percentage.cjs +2 -3
  42. package/dist/cjs/formatters/relativeTime.cjs +2 -3
  43. package/dist/cjs/formatters/units.cjs +2 -3
  44. package/dist/cjs/index.cjs +129 -119
  45. package/dist/cjs/interpreter/dictionaryTransformCache.cjs +1 -2
  46. package/dist/cjs/interpreter/getCondition.cjs +1 -2
  47. package/dist/cjs/interpreter/getContent/deepTransform.cjs +2 -3
  48. package/dist/cjs/interpreter/getContent/getContent.cjs +3 -4
  49. package/dist/cjs/interpreter/getContent/index.cjs +3 -3
  50. package/dist/cjs/interpreter/getContent/plugins.cjs +17 -16
  51. package/dist/cjs/interpreter/getContent/plugins.cjs.map +1 -1
  52. package/dist/cjs/interpreter/getDictionary.cjs +5 -6
  53. package/dist/cjs/interpreter/getDictionaryAsync.cjs +7 -8
  54. package/dist/cjs/interpreter/getEnumeration.cjs +1 -2
  55. package/dist/cjs/interpreter/getGender.cjs +1 -2
  56. package/dist/cjs/interpreter/getHTML.cjs +1 -2
  57. package/dist/cjs/interpreter/getInsertion.cjs +1 -2
  58. package/dist/cjs/interpreter/getIntlayer.cjs +2 -3
  59. package/dist/cjs/interpreter/getIntlayerAsync.cjs +3 -4
  60. package/dist/cjs/interpreter/getNesting.cjs +2 -3
  61. package/dist/cjs/interpreter/getNesting.optimized.cjs +2 -3
  62. package/dist/cjs/interpreter/getPlural.cjs +2 -3
  63. package/dist/cjs/interpreter/getSelect.cjs +1 -2
  64. package/dist/cjs/interpreter/getTranslation.cjs +1 -2
  65. package/dist/cjs/interpreter/index.cjs +20 -20
  66. package/dist/cjs/interpreter/interpolableNode.cjs +3 -4
  67. package/dist/cjs/interpreter/resolveInterpreterLocale.cjs +2 -3
  68. package/dist/cjs/interpreter/splitAndJoinInsertion.cjs +1 -2
  69. package/dist/cjs/localization/comparePaths.cjs +3 -4
  70. package/dist/cjs/localization/domainUtils.cjs +1 -2
  71. package/dist/cjs/localization/generateSitemap.cjs +4 -5
  72. package/dist/cjs/localization/getBrowserLocale.cjs +3 -4
  73. package/dist/cjs/localization/getCanonicalPath.cjs +2 -3
  74. package/dist/cjs/localization/getHTMLTextDir.cjs +1 -2
  75. package/dist/cjs/localization/getLocale.cjs +4 -5
  76. package/dist/cjs/localization/getLocaleFromPath.cjs +3 -4
  77. package/dist/cjs/localization/getLocaleFromRequest.cjs +5 -6
  78. package/dist/cjs/localization/getLocaleLang.cjs +1 -2
  79. package/dist/cjs/localization/getLocaleName.cjs +2 -3
  80. package/dist/cjs/localization/getLocalizedPath.cjs +6 -7
  81. package/dist/cjs/localization/getLocalizedUrl.cjs +5 -6
  82. package/dist/cjs/localization/getMultilingualUrls.cjs +3 -4
  83. package/dist/cjs/localization/getPathWithoutLocale.cjs +2 -3
  84. package/dist/cjs/localization/getPrefix.cjs +2 -3
  85. package/dist/cjs/localization/index.cjs +24 -24
  86. package/dist/cjs/localization/localeDetector.cjs +2 -3
  87. package/dist/cjs/localization/localeMapper.cjs +2 -3
  88. package/dist/cjs/localization/localeResolver.cjs +1 -2
  89. package/dist/cjs/localization/proxyMode.cjs +2 -3
  90. package/dist/cjs/localization/resolveBrowserLocale.cjs +5 -6
  91. package/dist/cjs/localization/rewriteMatch.cjs +1 -2
  92. package/dist/cjs/localization/rewriteUtils.cjs +3 -4
  93. package/dist/cjs/localization/validatePrefix.cjs +2 -3
  94. package/dist/cjs/markdown/compiler.cjs +6 -7
  95. package/dist/cjs/markdown/constants.cjs +1 -2
  96. package/dist/cjs/markdown/elementScanner.cjs +1 -2
  97. package/dist/cjs/markdown/index.cjs +8 -8
  98. package/dist/cjs/markdown/parser.cjs +3 -4
  99. package/dist/cjs/markdown/renderer.cjs +1 -2
  100. package/dist/cjs/markdown/utils.cjs +2 -3
  101. package/dist/cjs/messageFormat/ICU.cjs +9 -10
  102. package/dist/cjs/messageFormat/i18next.cjs +9 -10
  103. package/dist/cjs/messageFormat/index.cjs +6 -6
  104. package/dist/cjs/messageFormat/navigatePath.cjs +1 -2
  105. package/dist/cjs/messageFormat/po.cjs +8 -9
  106. package/dist/cjs/messageFormat/resolveMessage.cjs +9 -10
  107. package/dist/cjs/messageFormat/verify-icu-format.cjs +5 -6
  108. package/dist/cjs/messageFormat/vue-i18n.cjs +5 -6
  109. package/dist/cjs/transpiler/condition/condition.cjs +1 -2
  110. package/dist/cjs/transpiler/condition/index.cjs +1 -1
  111. package/dist/cjs/transpiler/enumeration/enumeration.cjs +1 -2
  112. package/dist/cjs/transpiler/enumeration/index.cjs +1 -1
  113. package/dist/cjs/transpiler/file/file.cjs +1 -2
  114. package/dist/cjs/transpiler/file/fileBrowser.cjs +1 -2
  115. package/dist/cjs/transpiler/file/index.cjs +1 -1
  116. package/dist/cjs/transpiler/gender/gender.cjs +1 -2
  117. package/dist/cjs/transpiler/gender/index.cjs +1 -1
  118. package/dist/cjs/transpiler/html/getHTMLCustomComponents.cjs +1 -2
  119. package/dist/cjs/transpiler/html/html.cjs +3 -4
  120. package/dist/cjs/transpiler/html/htmlTags.cjs +1 -2
  121. package/dist/cjs/transpiler/html/index.cjs +3 -3
  122. package/dist/cjs/transpiler/html/validateHTML.cjs +1 -2
  123. package/dist/cjs/transpiler/index.cjs +15 -15
  124. package/dist/cjs/transpiler/insertion/getInsertionValues.cjs +1 -2
  125. package/dist/cjs/transpiler/insertion/index.cjs +2 -2
  126. package/dist/cjs/transpiler/insertion/insertion.cjs +2 -3
  127. package/dist/cjs/transpiler/markdown/getMarkdownMetadata.cjs +2 -3
  128. package/dist/cjs/transpiler/markdown/index.cjs +3 -3
  129. package/dist/cjs/transpiler/markdown/markdown.cjs +5 -6
  130. package/dist/cjs/transpiler/markdown/validateMarkdown.cjs +2 -3
  131. package/dist/cjs/transpiler/nesting/index.cjs +1 -1
  132. package/dist/cjs/transpiler/nesting/nesting.cjs +1 -2
  133. package/dist/cjs/transpiler/plural/index.cjs +1 -1
  134. package/dist/cjs/transpiler/plural/plural.cjs +1 -2
  135. package/dist/cjs/transpiler/select/index.cjs +1 -1
  136. package/dist/cjs/transpiler/select/select.cjs +1 -2
  137. package/dist/cjs/transpiler/translation/index.cjs +1 -1
  138. package/dist/cjs/transpiler/translation/translation.cjs +1 -2
  139. package/dist/cjs/utils/checkIsURLAbsolute.cjs +1 -2
  140. package/dist/cjs/utils/cookieExpiry.cjs +1 -2
  141. package/dist/cjs/utils/getCookie.cjs +1 -2
  142. package/dist/cjs/utils/index.cjs +9 -9
  143. package/dist/cjs/utils/intl.cjs +2 -3
  144. package/dist/cjs/utils/intlayerNodePrototype.cjs +1 -2
  145. package/dist/cjs/utils/isSameKeyPath.cjs +1 -2
  146. package/dist/cjs/utils/isValidReactElement.cjs +1 -2
  147. package/dist/cjs/utils/localeStorage.cjs +3 -4
  148. package/dist/cjs/utils/parseYaml.cjs +1 -2
  149. package/dist/cjs/utils/stringifyYaml.cjs +1 -2
  150. package/dist/esm/deepTransformPlugins/getEditedContent.mjs +1 -2
  151. package/dist/esm/deepTransformPlugins/getFilterMissingTranslationsContent.mjs +2 -3
  152. package/dist/esm/deepTransformPlugins/getFilterTranslationsOnlyContent.mjs +2 -3
  153. package/dist/esm/deepTransformPlugins/getFilteredLocalesContent.mjs +1 -2
  154. package/dist/esm/deepTransformPlugins/getLocalizedContent.mjs +2 -3
  155. package/dist/esm/deepTransformPlugins/getMaskContent.mjs +1 -2
  156. package/dist/esm/deepTransformPlugins/getMissingLocalesContent.mjs +1 -2
  157. package/dist/esm/deepTransformPlugins/getMultilingualDictionary.mjs +1 -2
  158. package/dist/esm/deepTransformPlugins/getReplacedValuesContent.mjs +1 -2
  159. package/dist/esm/deepTransformPlugins/getSplittedContent.mjs +1 -2
  160. package/dist/esm/deepTransformPlugins/insertContentInDictionary.mjs +1 -2
  161. package/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs +1 -2
  162. package/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs +6 -3
  163. package/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs.map +1 -1
  164. package/dist/esm/dictionaryManipulator/getDefaultNode.mjs +1 -2
  165. package/dist/esm/dictionaryManipulator/getEmptyNode.mjs +1 -2
  166. package/dist/esm/dictionaryManipulator/getNestedDictionaryReferences.mjs +1 -2
  167. package/dist/esm/dictionaryManipulator/getNodeChildren.mjs +1 -2
  168. package/dist/esm/dictionaryManipulator/getNodeType.mjs +1 -2
  169. package/dist/esm/dictionaryManipulator/index.mjs +6 -6
  170. package/dist/esm/dictionaryManipulator/mergeDictionaries.mjs +1 -2
  171. package/dist/esm/dictionaryManipulator/mergeQualifiedDictionaries.mjs +2 -3
  172. package/dist/esm/dictionaryManipulator/normalizeDictionary.mjs +2 -3
  173. package/dist/esm/dictionaryManipulator/orderDictionaries.mjs +1 -2
  174. package/dist/esm/dictionaryManipulator/plainDynamicLoader.mjs +1 -2
  175. package/dist/esm/dictionaryManipulator/preloadedDynamicLoader.mjs +1 -2
  176. package/dist/esm/dictionaryManipulator/qualifiedDictionary.mjs +1 -2
  177. package/dist/esm/dictionaryManipulator/qualifiedDictionaryDeclaration.mjs +1 -2
  178. package/dist/esm/dictionaryManipulator/qualifiedDynamicLoader.mjs +1 -2
  179. package/dist/esm/dictionaryManipulator/removeContentNodeByKeyPath.mjs +1 -2
  180. package/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs +1 -2
  181. package/dist/esm/dictionaryManipulator/updateNodeChildren.mjs +1 -2
  182. package/dist/esm/formatters/compact.mjs +1 -2
  183. package/dist/esm/formatters/currency.mjs +1 -2
  184. package/dist/esm/formatters/date.mjs +1 -2
  185. package/dist/esm/formatters/list.mjs +1 -2
  186. package/dist/esm/formatters/number.mjs +1 -2
  187. package/dist/esm/formatters/percentage.mjs +1 -2
  188. package/dist/esm/formatters/relativeTime.mjs +1 -2
  189. package/dist/esm/formatters/units.mjs +1 -2
  190. package/dist/esm/index.mjs +1 -1
  191. package/dist/esm/interpreter/dictionaryTransformCache.mjs +1 -2
  192. package/dist/esm/interpreter/getCondition.mjs +1 -2
  193. package/dist/esm/interpreter/getContent/deepTransform.mjs +1 -2
  194. package/dist/esm/interpreter/getContent/getContent.mjs +1 -2
  195. package/dist/esm/interpreter/getContent/index.mjs +1 -1
  196. package/dist/esm/interpreter/getContent/plugins.mjs +6 -5
  197. package/dist/esm/interpreter/getContent/plugins.mjs.map +1 -1
  198. package/dist/esm/interpreter/getDictionary.mjs +3 -4
  199. package/dist/esm/interpreter/getDictionaryAsync.mjs +5 -6
  200. package/dist/esm/interpreter/getEnumeration.mjs +1 -2
  201. package/dist/esm/interpreter/getGender.mjs +1 -2
  202. package/dist/esm/interpreter/getHTML.mjs +1 -2
  203. package/dist/esm/interpreter/getInsertion.mjs +1 -2
  204. package/dist/esm/interpreter/getIntlayer.mjs +1 -2
  205. package/dist/esm/interpreter/getIntlayerAsync.mjs +2 -3
  206. package/dist/esm/interpreter/getNesting.mjs +1 -2
  207. package/dist/esm/interpreter/getNesting.optimized.mjs +1 -2
  208. package/dist/esm/interpreter/getPlural.mjs +1 -2
  209. package/dist/esm/interpreter/getSelect.mjs +1 -2
  210. package/dist/esm/interpreter/getTranslation.mjs +1 -2
  211. package/dist/esm/interpreter/index.mjs +7 -7
  212. package/dist/esm/interpreter/interpolableNode.mjs +1 -2
  213. package/dist/esm/interpreter/resolveInterpreterLocale.mjs +1 -2
  214. package/dist/esm/interpreter/splitAndJoinInsertion.mjs +1 -2
  215. package/dist/esm/localization/comparePaths.mjs +1 -2
  216. package/dist/esm/localization/domainUtils.mjs +1 -2
  217. package/dist/esm/localization/generateSitemap.mjs +2 -3
  218. package/dist/esm/localization/getBrowserLocale.mjs +1 -2
  219. package/dist/esm/localization/getCanonicalPath.mjs +1 -2
  220. package/dist/esm/localization/getHTMLTextDir.mjs +1 -2
  221. package/dist/esm/localization/getLocale.mjs +2 -3
  222. package/dist/esm/localization/getLocaleFromPath.mjs +1 -2
  223. package/dist/esm/localization/getLocaleFromRequest.mjs +2 -3
  224. package/dist/esm/localization/getLocaleLang.mjs +1 -2
  225. package/dist/esm/localization/getLocaleName.mjs +1 -2
  226. package/dist/esm/localization/getLocalizedPath.mjs +3 -4
  227. package/dist/esm/localization/getLocalizedUrl.mjs +2 -3
  228. package/dist/esm/localization/getMultilingualUrls.mjs +2 -3
  229. package/dist/esm/localization/getPathWithoutLocale.mjs +1 -2
  230. package/dist/esm/localization/getPrefix.mjs +1 -2
  231. package/dist/esm/localization/index.mjs +10 -10
  232. package/dist/esm/localization/localeDetector.mjs +1 -2
  233. package/dist/esm/localization/localeMapper.mjs +1 -2
  234. package/dist/esm/localization/localeResolver.mjs +1 -2
  235. package/dist/esm/localization/proxyMode.mjs +1 -2
  236. package/dist/esm/localization/resolveBrowserLocale.mjs +2 -3
  237. package/dist/esm/localization/rewriteMatch.mjs +1 -2
  238. package/dist/esm/localization/rewriteUtils.mjs +2 -3
  239. package/dist/esm/localization/validatePrefix.mjs +1 -2
  240. package/dist/esm/markdown/compiler.mjs +2 -3
  241. package/dist/esm/markdown/constants.mjs +1 -2
  242. package/dist/esm/markdown/elementScanner.mjs +1 -2
  243. package/dist/esm/markdown/index.mjs +2 -2
  244. package/dist/esm/markdown/parser.mjs +1 -2
  245. package/dist/esm/markdown/renderer.mjs +1 -2
  246. package/dist/esm/markdown/utils.mjs +1 -2
  247. package/dist/esm/messageFormat/ICU.mjs +1 -2
  248. package/dist/esm/messageFormat/i18next.mjs +1 -2
  249. package/dist/esm/messageFormat/index.mjs +1 -1
  250. package/dist/esm/messageFormat/navigatePath.mjs +1 -2
  251. package/dist/esm/messageFormat/po.mjs +1 -2
  252. package/dist/esm/messageFormat/resolveMessage.mjs +2 -3
  253. package/dist/esm/messageFormat/verify-icu-format.mjs +1 -2
  254. package/dist/esm/messageFormat/vue-i18n.mjs +1 -2
  255. package/dist/esm/transpiler/condition/condition.mjs +1 -2
  256. package/dist/esm/transpiler/enumeration/enumeration.mjs +1 -2
  257. package/dist/esm/transpiler/file/file.mjs +1 -2
  258. package/dist/esm/transpiler/file/fileBrowser.mjs +1 -2
  259. package/dist/esm/transpiler/gender/gender.mjs +1 -2
  260. package/dist/esm/transpiler/html/getHTMLCustomComponents.mjs +1 -2
  261. package/dist/esm/transpiler/html/html.mjs +1 -2
  262. package/dist/esm/transpiler/html/htmlTags.mjs +1 -2
  263. package/dist/esm/transpiler/html/index.mjs +1 -1
  264. package/dist/esm/transpiler/html/validateHTML.mjs +1 -2
  265. package/dist/esm/transpiler/index.mjs +1 -1
  266. package/dist/esm/transpiler/insertion/getInsertionValues.mjs +1 -2
  267. package/dist/esm/transpiler/insertion/insertion.mjs +1 -2
  268. package/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs +1 -2
  269. package/dist/esm/transpiler/markdown/index.mjs +1 -1
  270. package/dist/esm/transpiler/markdown/markdown.mjs +1 -2
  271. package/dist/esm/transpiler/markdown/validateMarkdown.mjs +1 -2
  272. package/dist/esm/transpiler/nesting/nesting.mjs +1 -2
  273. package/dist/esm/transpiler/plural/plural.mjs +1 -2
  274. package/dist/esm/transpiler/select/select.mjs +1 -2
  275. package/dist/esm/transpiler/translation/translation.mjs +1 -2
  276. package/dist/esm/utils/checkIsURLAbsolute.mjs +1 -2
  277. package/dist/esm/utils/cookieExpiry.mjs +1 -2
  278. package/dist/esm/utils/getCookie.mjs +1 -2
  279. package/dist/esm/utils/index.mjs +4 -4
  280. package/dist/esm/utils/intl.mjs +1 -2
  281. package/dist/esm/utils/intlayerNodePrototype.mjs +1 -2
  282. package/dist/esm/utils/isSameKeyPath.mjs +1 -2
  283. package/dist/esm/utils/isValidReactElement.mjs +1 -2
  284. package/dist/esm/utils/localeStorage.mjs +1 -2
  285. package/dist/esm/utils/parseYaml.mjs +1 -2
  286. package/dist/esm/utils/stringifyYaml.mjs +1 -2
  287. package/dist/types/deepTransformPlugins/getEditedContent.d.ts +0 -2
  288. package/dist/types/deepTransformPlugins/getEditedContent.d.ts.map +1 -1
  289. package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +0 -2
  290. package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts.map +1 -1
  291. package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +0 -2
  292. package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts.map +1 -1
  293. package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +0 -2
  294. package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts.map +1 -1
  295. package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts +0 -2
  296. package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts.map +1 -1
  297. package/dist/types/deepTransformPlugins/getMaskContent.d.ts +0 -2
  298. package/dist/types/deepTransformPlugins/getMaskContent.d.ts.map +1 -1
  299. package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts +0 -2
  300. package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts.map +1 -1
  301. package/dist/types/deepTransformPlugins/getMultilingualDictionary.d.ts +0 -2
  302. package/dist/types/deepTransformPlugins/getMultilingualDictionary.d.ts.map +1 -1
  303. package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts +0 -2
  304. package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts.map +1 -1
  305. package/dist/types/deepTransformPlugins/getSplittedContent.d.ts +1 -2
  306. package/dist/types/deepTransformPlugins/getSplittedContent.d.ts.map +1 -1
  307. package/dist/types/deepTransformPlugins/index.d.ts +1 -1
  308. package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts +0 -2
  309. package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts.map +1 -1
  310. package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts +0 -2
  311. package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts.map +1 -1
  312. package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts +0 -2
  313. package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts.map +1 -1
  314. package/dist/types/dictionaryManipulator/getDefaultNode.d.ts +0 -2
  315. package/dist/types/dictionaryManipulator/getDefaultNode.d.ts.map +1 -1
  316. package/dist/types/dictionaryManipulator/getEmptyNode.d.ts +0 -2
  317. package/dist/types/dictionaryManipulator/getEmptyNode.d.ts.map +1 -1
  318. package/dist/types/dictionaryManipulator/getNestedDictionaryReferences.d.ts +0 -2
  319. package/dist/types/dictionaryManipulator/getNestedDictionaryReferences.d.ts.map +1 -1
  320. package/dist/types/dictionaryManipulator/getNodeChildren.d.ts +0 -2
  321. package/dist/types/dictionaryManipulator/getNodeChildren.d.ts.map +1 -1
  322. package/dist/types/dictionaryManipulator/getNodeType.d.ts +0 -2
  323. package/dist/types/dictionaryManipulator/getNodeType.d.ts.map +1 -1
  324. package/dist/types/dictionaryManipulator/index.d.ts +2 -2
  325. package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts +0 -2
  326. package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts.map +1 -1
  327. package/dist/types/dictionaryManipulator/mergeQualifiedDictionaries.d.ts +0 -2
  328. package/dist/types/dictionaryManipulator/mergeQualifiedDictionaries.d.ts.map +1 -1
  329. package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts +0 -2
  330. package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts.map +1 -1
  331. package/dist/types/dictionaryManipulator/orderDictionaries.d.ts +0 -2
  332. package/dist/types/dictionaryManipulator/orderDictionaries.d.ts.map +1 -1
  333. package/dist/types/dictionaryManipulator/plainDynamicLoader.d.ts +0 -2
  334. package/dist/types/dictionaryManipulator/plainDynamicLoader.d.ts.map +1 -1
  335. package/dist/types/dictionaryManipulator/preloadedDynamicLoader.d.ts +0 -2
  336. package/dist/types/dictionaryManipulator/preloadedDynamicLoader.d.ts.map +1 -1
  337. package/dist/types/dictionaryManipulator/qualifiedDictionary.d.ts +0 -2
  338. package/dist/types/dictionaryManipulator/qualifiedDictionary.d.ts.map +1 -1
  339. package/dist/types/dictionaryManipulator/qualifiedDictionaryDeclaration.d.ts +0 -2
  340. package/dist/types/dictionaryManipulator/qualifiedDictionaryDeclaration.d.ts.map +1 -1
  341. package/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts +0 -2
  342. package/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts.map +1 -1
  343. package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts +0 -2
  344. package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts.map +1 -1
  345. package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts +0 -2
  346. package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts.map +1 -1
  347. package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts +0 -2
  348. package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts.map +1 -1
  349. package/dist/types/formatters/compact.d.ts +0 -2
  350. package/dist/types/formatters/compact.d.ts.map +1 -1
  351. package/dist/types/formatters/currency.d.ts +0 -2
  352. package/dist/types/formatters/currency.d.ts.map +1 -1
  353. package/dist/types/formatters/date.d.ts +0 -2
  354. package/dist/types/formatters/date.d.ts.map +1 -1
  355. package/dist/types/formatters/index.d.ts +1 -1
  356. package/dist/types/formatters/list.d.ts +0 -2
  357. package/dist/types/formatters/list.d.ts.map +1 -1
  358. package/dist/types/formatters/number.d.ts +0 -2
  359. package/dist/types/formatters/number.d.ts.map +1 -1
  360. package/dist/types/formatters/percentage.d.ts +0 -2
  361. package/dist/types/formatters/percentage.d.ts.map +1 -1
  362. package/dist/types/formatters/relativeTime.d.ts +1 -2
  363. package/dist/types/formatters/relativeTime.d.ts.map +1 -1
  364. package/dist/types/formatters/units.d.ts +0 -2
  365. package/dist/types/formatters/units.d.ts.map +1 -1
  366. package/dist/types/index.d.ts +8 -8
  367. package/dist/types/interpreter/dictionaryTransformCache.d.ts +0 -2
  368. package/dist/types/interpreter/dictionaryTransformCache.d.ts.map +1 -1
  369. package/dist/types/interpreter/getCondition.d.ts +0 -2
  370. package/dist/types/interpreter/getCondition.d.ts.map +1 -1
  371. package/dist/types/interpreter/getContent/deepTransform.d.ts +0 -2
  372. package/dist/types/interpreter/getContent/deepTransform.d.ts.map +1 -1
  373. package/dist/types/interpreter/getContent/getContent.d.ts +0 -2
  374. package/dist/types/interpreter/getContent/getContent.d.ts.map +1 -1
  375. package/dist/types/interpreter/getContent/index.d.ts +1 -1
  376. package/dist/types/interpreter/getContent/plugins.d.ts +8 -5
  377. package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -1
  378. package/dist/types/interpreter/getDictionary.d.ts +0 -2
  379. package/dist/types/interpreter/getDictionary.d.ts.map +1 -1
  380. package/dist/types/interpreter/getDictionaryAsync.d.ts +1 -3
  381. package/dist/types/interpreter/getDictionaryAsync.d.ts.map +1 -1
  382. package/dist/types/interpreter/getEnumeration.d.ts +0 -2
  383. package/dist/types/interpreter/getEnumeration.d.ts.map +1 -1
  384. package/dist/types/interpreter/getGender.d.ts +1 -2
  385. package/dist/types/interpreter/getGender.d.ts.map +1 -1
  386. package/dist/types/interpreter/getHTML.d.ts +1 -2
  387. package/dist/types/interpreter/getHTML.d.ts.map +1 -1
  388. package/dist/types/interpreter/getInsertion.d.ts +0 -2
  389. package/dist/types/interpreter/getInsertion.d.ts.map +1 -1
  390. package/dist/types/interpreter/getIntlayer.d.ts +0 -2
  391. package/dist/types/interpreter/getIntlayer.d.ts.map +1 -1
  392. package/dist/types/interpreter/getIntlayerAsync.d.ts +0 -2
  393. package/dist/types/interpreter/getIntlayerAsync.d.ts.map +1 -1
  394. package/dist/types/interpreter/getNesting.d.ts +0 -2
  395. package/dist/types/interpreter/getNesting.d.ts.map +1 -1
  396. package/dist/types/interpreter/getNesting.optimized.d.ts +2 -4
  397. package/dist/types/interpreter/getNesting.optimized.d.ts.map +1 -1
  398. package/dist/types/interpreter/getPlural.d.ts +0 -2
  399. package/dist/types/interpreter/getPlural.d.ts.map +1 -1
  400. package/dist/types/interpreter/getSelect.d.ts +0 -2
  401. package/dist/types/interpreter/getSelect.d.ts.map +1 -1
  402. package/dist/types/interpreter/getTranslation.d.ts +0 -2
  403. package/dist/types/interpreter/getTranslation.d.ts.map +1 -1
  404. package/dist/types/interpreter/index.d.ts +3 -3
  405. package/dist/types/interpreter/interpolableNode.d.ts +0 -2
  406. package/dist/types/interpreter/interpolableNode.d.ts.map +1 -1
  407. package/dist/types/interpreter/resolveInterpreterLocale.d.ts +0 -2
  408. package/dist/types/interpreter/resolveInterpreterLocale.d.ts.map +1 -1
  409. package/dist/types/interpreter/splitAndJoinInsertion.d.ts +0 -2
  410. package/dist/types/interpreter/splitAndJoinInsertion.d.ts.map +1 -1
  411. package/dist/types/localization/comparePaths.d.ts +0 -2
  412. package/dist/types/localization/comparePaths.d.ts.map +1 -1
  413. package/dist/types/localization/domainUtils.d.ts +0 -2
  414. package/dist/types/localization/domainUtils.d.ts.map +1 -1
  415. package/dist/types/localization/generateSitemap.d.ts +0 -2
  416. package/dist/types/localization/generateSitemap.d.ts.map +1 -1
  417. package/dist/types/localization/getBrowserLocale.d.ts +1 -2
  418. package/dist/types/localization/getBrowserLocale.d.ts.map +1 -1
  419. package/dist/types/localization/getCanonicalPath.d.ts +0 -2
  420. package/dist/types/localization/getCanonicalPath.d.ts.map +1 -1
  421. package/dist/types/localization/getHTMLTextDir.d.ts +1 -2
  422. package/dist/types/localization/getHTMLTextDir.d.ts.map +1 -1
  423. package/dist/types/localization/getLocale.d.ts +0 -2
  424. package/dist/types/localization/getLocale.d.ts.map +1 -1
  425. package/dist/types/localization/getLocaleFromPath.d.ts +0 -2
  426. package/dist/types/localization/getLocaleFromPath.d.ts.map +1 -1
  427. package/dist/types/localization/getLocaleFromRequest.d.ts +0 -2
  428. package/dist/types/localization/getLocaleFromRequest.d.ts.map +1 -1
  429. package/dist/types/localization/getLocaleLang.d.ts +0 -2
  430. package/dist/types/localization/getLocaleLang.d.ts.map +1 -1
  431. package/dist/types/localization/getLocaleName.d.ts +0 -2
  432. package/dist/types/localization/getLocaleName.d.ts.map +1 -1
  433. package/dist/types/localization/getLocalizedPath.d.ts +0 -2
  434. package/dist/types/localization/getLocalizedPath.d.ts.map +1 -1
  435. package/dist/types/localization/getLocalizedUrl.d.ts +0 -2
  436. package/dist/types/localization/getLocalizedUrl.d.ts.map +1 -1
  437. package/dist/types/localization/getMultilingualUrls.d.ts +0 -2
  438. package/dist/types/localization/getMultilingualUrls.d.ts.map +1 -1
  439. package/dist/types/localization/getPathWithoutLocale.d.ts +0 -2
  440. package/dist/types/localization/getPathWithoutLocale.d.ts.map +1 -1
  441. package/dist/types/localization/getPrefix.d.ts +0 -2
  442. package/dist/types/localization/getPrefix.d.ts.map +1 -1
  443. package/dist/types/localization/index.d.ts +1 -1
  444. package/dist/types/localization/localeDetector.d.ts +0 -2
  445. package/dist/types/localization/localeDetector.d.ts.map +1 -1
  446. package/dist/types/localization/localeMapper.d.ts +0 -2
  447. package/dist/types/localization/localeMapper.d.ts.map +1 -1
  448. package/dist/types/localization/localeResolver.d.ts +0 -2
  449. package/dist/types/localization/localeResolver.d.ts.map +1 -1
  450. package/dist/types/localization/proxyMode.d.ts +0 -2
  451. package/dist/types/localization/proxyMode.d.ts.map +1 -1
  452. package/dist/types/localization/resolveBrowserLocale.d.ts +0 -2
  453. package/dist/types/localization/resolveBrowserLocale.d.ts.map +1 -1
  454. package/dist/types/localization/rewriteMatch.d.ts +0 -2
  455. package/dist/types/localization/rewriteMatch.d.ts.map +1 -1
  456. package/dist/types/localization/rewriteUtils.d.ts +1 -2
  457. package/dist/types/localization/rewriteUtils.d.ts.map +1 -1
  458. package/dist/types/localization/validatePrefix.d.ts +0 -2
  459. package/dist/types/localization/validatePrefix.d.ts.map +1 -1
  460. package/dist/types/markdown/compiler.d.ts +2 -3
  461. package/dist/types/markdown/compiler.d.ts.map +1 -1
  462. package/dist/types/markdown/constants.d.ts +0 -2
  463. package/dist/types/markdown/constants.d.ts.map +1 -1
  464. package/dist/types/markdown/elementScanner.d.ts +0 -2
  465. package/dist/types/markdown/elementScanner.d.ts.map +1 -1
  466. package/dist/types/markdown/index.d.ts +2 -2
  467. package/dist/types/markdown/parser.d.ts +0 -2
  468. package/dist/types/markdown/parser.d.ts.map +1 -1
  469. package/dist/types/markdown/renderer.d.ts +0 -2
  470. package/dist/types/markdown/renderer.d.ts.map +1 -1
  471. package/dist/types/markdown/types.d.ts +0 -2
  472. package/dist/types/markdown/types.d.ts.map +1 -1
  473. package/dist/types/markdown/utils.d.ts +1 -2
  474. package/dist/types/markdown/utils.d.ts.map +1 -1
  475. package/dist/types/messageFormat/ICU.d.ts +0 -2
  476. package/dist/types/messageFormat/ICU.d.ts.map +1 -1
  477. package/dist/types/messageFormat/i18next.d.ts +0 -2
  478. package/dist/types/messageFormat/i18next.d.ts.map +1 -1
  479. package/dist/types/messageFormat/navigatePath.d.ts +0 -2
  480. package/dist/types/messageFormat/navigatePath.d.ts.map +1 -1
  481. package/dist/types/messageFormat/po.d.ts +0 -2
  482. package/dist/types/messageFormat/po.d.ts.map +1 -1
  483. package/dist/types/messageFormat/resolveMessage.d.ts +0 -2
  484. package/dist/types/messageFormat/resolveMessage.d.ts.map +1 -1
  485. package/dist/types/messageFormat/vue-i18n.d.ts +0 -2
  486. package/dist/types/messageFormat/vue-i18n.d.ts.map +1 -1
  487. package/dist/types/transpiler/condition/condition.d.ts +0 -2
  488. package/dist/types/transpiler/condition/condition.d.ts.map +1 -1
  489. package/dist/types/transpiler/enumeration/enumeration.d.ts +0 -2
  490. package/dist/types/transpiler/enumeration/enumeration.d.ts.map +1 -1
  491. package/dist/types/transpiler/file/file.d.ts +0 -2
  492. package/dist/types/transpiler/file/file.d.ts.map +1 -1
  493. package/dist/types/transpiler/file/fileBrowser.d.ts +0 -2
  494. package/dist/types/transpiler/file/fileBrowser.d.ts.map +1 -1
  495. package/dist/types/transpiler/gender/gender.d.ts +0 -2
  496. package/dist/types/transpiler/gender/gender.d.ts.map +1 -1
  497. package/dist/types/transpiler/html/getHTMLCustomComponents.d.ts +0 -2
  498. package/dist/types/transpiler/html/getHTMLCustomComponents.d.ts.map +1 -1
  499. package/dist/types/transpiler/html/html.d.ts +1 -2
  500. package/dist/types/transpiler/html/html.d.ts.map +1 -1
  501. package/dist/types/transpiler/html/htmlTags.d.ts +0 -2
  502. package/dist/types/transpiler/html/htmlTags.d.ts.map +1 -1
  503. package/dist/types/transpiler/html/validateHTML.d.ts +0 -2
  504. package/dist/types/transpiler/html/validateHTML.d.ts.map +1 -1
  505. package/dist/types/transpiler/insertion/getInsertionValues.d.ts +0 -2
  506. package/dist/types/transpiler/insertion/getInsertionValues.d.ts.map +1 -1
  507. package/dist/types/transpiler/insertion/insertion.d.ts +0 -2
  508. package/dist/types/transpiler/insertion/insertion.d.ts.map +1 -1
  509. package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts +0 -2
  510. package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts.map +1 -1
  511. package/dist/types/transpiler/markdown/markdown.d.ts +0 -2
  512. package/dist/types/transpiler/markdown/markdown.d.ts.map +1 -1
  513. package/dist/types/transpiler/markdown/validateMarkdown.d.ts +0 -2
  514. package/dist/types/transpiler/markdown/validateMarkdown.d.ts.map +1 -1
  515. package/dist/types/transpiler/nesting/nesting.d.ts +0 -2
  516. package/dist/types/transpiler/nesting/nesting.d.ts.map +1 -1
  517. package/dist/types/transpiler/plural/plural.d.ts +0 -2
  518. package/dist/types/transpiler/plural/plural.d.ts.map +1 -1
  519. package/dist/types/transpiler/select/select.d.ts +0 -2
  520. package/dist/types/transpiler/select/select.d.ts.map +1 -1
  521. package/dist/types/transpiler/translation/translation.d.ts +0 -2
  522. package/dist/types/transpiler/translation/translation.d.ts.map +1 -1
  523. package/dist/types/utils/checkIsURLAbsolute.d.ts +0 -2
  524. package/dist/types/utils/checkIsURLAbsolute.d.ts.map +1 -1
  525. package/dist/types/utils/cookieExpiry.d.ts +0 -2
  526. package/dist/types/utils/cookieExpiry.d.ts.map +1 -1
  527. package/dist/types/utils/getCookie.d.ts +0 -2
  528. package/dist/types/utils/getCookie.d.ts.map +1 -1
  529. package/dist/types/utils/index.d.ts +1 -1
  530. package/dist/types/utils/intl.d.ts +0 -2
  531. package/dist/types/utils/intl.d.ts.map +1 -1
  532. package/dist/types/utils/intlayerNodePrototype.d.ts +0 -2
  533. package/dist/types/utils/intlayerNodePrototype.d.ts.map +1 -1
  534. package/dist/types/utils/isSameKeyPath.d.ts +0 -2
  535. package/dist/types/utils/isSameKeyPath.d.ts.map +1 -1
  536. package/dist/types/utils/isValidReactElement.d.ts +0 -2
  537. package/dist/types/utils/isValidReactElement.d.ts.map +1 -1
  538. package/dist/types/utils/localeStorage.d.ts +0 -2
  539. package/dist/types/utils/localeStorage.d.ts.map +1 -1
  540. package/dist/types/utils/parseYaml.d.ts +0 -2
  541. package/dist/types/utils/parseYaml.d.ts.map +1 -1
  542. package/dist/types/utils/stringifyYaml.d.ts +0 -2
  543. package/dist/types/utils/stringifyYaml.d.ts.map +1 -1
  544. package/package.json +7 -7
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/interpreter/getCondition.ts
2
+ // src/interpreter/getCondition.ts
3
3
  /**
4
4
  * Picks content based on a boolean condition.
5
5
  *
@@ -22,6 +22,5 @@ const getCondition = (conditionContent, state) => {
22
22
  return conditionContent[`${state}`] ?? conditionContent.fallback ?? conditionContent[fallbackState];
23
23
  };
24
24
 
25
- //#endregion
26
25
  exports.getCondition = getCondition;
27
26
  //# sourceMappingURL=getCondition.cjs.map
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
3
3
  let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
4
4
  _intlayer_types_nodeType = require_runtime.__toESM(_intlayer_types_nodeType);
5
5
 
6
- //#region src/interpreter/getContent/deepTransform.ts
6
+ // src/interpreter/getContent/deepTransform.ts
7
7
  /** Props of a child node: same context, one more key path segment. */
8
8
  const getChildProps = (props, children, keyPathSegment) => ({
9
9
  ...props,
@@ -50,6 +50,5 @@ const deepTransformNode = (node, props) => {
50
50
  return result;
51
51
  };
52
52
 
53
- //#endregion
54
53
  exports.deepTransformNode = deepTransformNode;
55
54
  //# sourceMappingURL=deepTransform.cjs.map
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_interpreter_getContent_deepTransform = require('./deepTransform.cjs');
3
- const require_interpreter_getContent_plugins = require('./plugins.cjs');
2
+ const require_interpreter_getContent_deepTransform = require("./deepTransform.cjs");
3
+ const require_interpreter_getContent_plugins = require("./plugins.cjs");
4
4
  let _intlayer_config_built = require("@intlayer/config/built");
5
5
 
6
- //#region src/interpreter/getContent/getContent.ts
6
+ // src/interpreter/getContent/getContent.ts
7
7
  const getBasePlugins = (locale, fallback = true) => [
8
8
  require_interpreter_getContent_plugins.translationPlugin(locale ?? _intlayer_config_built.internationalization.defaultLocale, fallback ? _intlayer_config_built.internationalization.defaultLocale : void 0),
9
9
  require_interpreter_getContent_plugins.enumerationPlugin,
@@ -26,7 +26,6 @@ const getContent = (node, nodeProps, plugins = []) => require_interpreter_getCon
26
26
  plugins
27
27
  });
28
28
 
29
- //#endregion
30
29
  exports.getBasePlugins = getBasePlugins;
31
30
  exports.getContent = getContent;
32
31
  //# sourceMappingURL=getContent.cjs.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_interpreter_getContent_deepTransform = require('./deepTransform.cjs');
3
- const require_interpreter_getContent_plugins = require('./plugins.cjs');
4
- const require_interpreter_getContent_getContent = require('./getContent.cjs');
2
+ const require_interpreter_getContent_deepTransform = require("./deepTransform.cjs");
3
+ const require_interpreter_getContent_getContent = require("./getContent.cjs");
4
+ const require_interpreter_getContent_plugins = require("./plugins.cjs");
5
5
 
6
6
  exports.bindInsertedValues = require_interpreter_getContent_plugins.bindInsertedValues;
7
7
  exports.conditionPlugin = require_interpreter_getContent_plugins.conditionPlugin;
@@ -1,19 +1,20 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
- const require_interpreter_getCondition = require('../getCondition.cjs');
4
- const require_interpreter_getEnumeration = require('../getEnumeration.cjs');
5
- const require_interpreter_getGender = require('../getGender.cjs');
6
- const require_interpreter_getInsertion = require('../getInsertion.cjs');
7
- const require_interpreter_getNesting = require('../getNesting.cjs');
8
- const require_interpreter_getNesting_optimized = require('../getNesting.optimized.cjs');
9
- const require_interpreter_getPlural = require('../getPlural.cjs');
10
- const require_interpreter_getSelect = require('../getSelect.cjs');
11
- const require_interpreter_getTranslation = require('../getTranslation.cjs');
12
- const require_interpreter_interpolableNode = require('../interpolableNode.cjs');
2
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
3
+ const require_transpiler_plural_plural = require("../../transpiler/plural/plural.cjs");
4
+ const require_interpreter_getCondition = require("../getCondition.cjs");
5
+ const require_interpreter_getEnumeration = require("../getEnumeration.cjs");
6
+ const require_interpreter_getGender = require("../getGender.cjs");
7
+ const require_interpreter_getInsertion = require("../getInsertion.cjs");
8
+ const require_interpreter_getNesting = require("../getNesting.cjs");
9
+ const require_interpreter_getNesting_optimized = require("../getNesting.optimized.cjs");
10
+ const require_interpreter_getPlural = require("../getPlural.cjs");
11
+ const require_interpreter_getSelect = require("../getSelect.cjs");
12
+ const require_interpreter_getTranslation = require("../getTranslation.cjs");
13
+ const require_interpreter_interpolableNode = require("../interpolableNode.cjs");
13
14
  let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
14
15
  _intlayer_types_nodeType = require_runtime.__toESM(_intlayer_types_nodeType);
15
16
 
16
- //#region src/interpreter/getContent/plugins.ts
17
+ // src/interpreter/getContent/plugins.ts
17
18
  /** ---------------------------------------------
18
19
  * FALLBACK PLUGIN
19
20
  *
@@ -90,7 +91,8 @@ const pluralPlugin = (locale) => process.env.INTLAYER_NODE_TYPE_PLURAL === "fals
90
91
  transform: (node, props, deepTransformNode) => {
91
92
  const original = node[_intlayer_types_nodeType.PLURAL];
92
93
  const result = {};
93
- const branchPlugins = (props.plugins ?? []).filter((plugin) => plugin.id !== "insertion-string-plugin");
94
+ const variable = node.variable ?? "count";
95
+ const branchPlugins = (props.plugins ?? []).filter((plugin) => plugin.id !== "insertion-string-plugin" && plugin.id !== "plural-string-plugin");
94
96
  /** String plugin for plural. Replaces string node with a component that renders the insertion. */
95
97
  const pluralStringPlugin = {
96
98
  id: "plural-string-plugin",
@@ -130,8 +132,8 @@ const pluralPlugin = (locale) => process.env.INTLAYER_NODE_TYPE_PLURAL === "fals
130
132
  }
131
133
  const effectiveLocale = String(locale ?? props.locale ?? "en");
132
134
  return (arg) => {
133
- const count = typeof arg === "number" ? arg : arg.count;
134
- const values = typeof arg === "number" ? { count: arg } : arg;
135
+ const values = typeof arg === "number" ? { [variable]: arg } : arg;
136
+ const count = Number(values[variable]);
135
137
  const subResult = require_interpreter_getPlural.getPlural(result, count, effectiveLocale);
136
138
  if (isAwaitingValues(subResult)) return subResult(values);
137
139
  return subResult;
@@ -316,7 +318,6 @@ const filePlugin = process.env.INTLAYER_NODE_TYPE_FILE === "false" ? fallbackPlu
316
318
  })
317
319
  };
318
320
 
319
- //#endregion
320
321
  exports.bindInsertedValues = bindInsertedValues;
321
322
  exports.conditionPlugin = conditionPlugin;
322
323
  exports.enumerationPlugin = enumerationPlugin;
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.cjs","names":["NodeTypes","getTranslation","getEnumeration","isInterpolableWrapperNode","transformInterpolableNode","getInsertion","getPlural","getCondition","getGender","getSelect","getNestingOptimized","getNesting"],"sources":["../../../../src/interpreter/getContent/plugins.ts"],"sourcesContent":["import type { Locale } from '@intlayer/types/allLocales';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport type {\n DeclaredLocales,\n DictionaryKeys,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport type { NodeType } from '@intlayer/types/nodeType';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport type {\n ConditionContent,\n EnumerationContent,\n FileContent,\n Gender,\n GenderContent,\n InsertionContent,\n NestedContent,\n PluralContent,\n PluralContentState,\n SelectContent,\n TranslationContent,\n} from '../../transpiler';\nimport { getCondition } from '../getCondition';\nimport { getEnumeration } from '../getEnumeration';\nimport { getGender } from '../getGender';\nimport { getInsertion } from '../getInsertion';\nimport { type GetNestingResult, getNesting } from '../getNesting';\nimport { getNesting as getNestingOptimized } from '../getNesting.optimized';\nimport { getPlural } from '../getPlural';\nimport { getSelect } from '../getSelect';\nimport { getTranslation } from '../getTranslation';\nimport {\n isInterpolableWrapperNode,\n transformInterpolableNode,\n} from '../interpolableNode';\n\n// ── Tree-shake constants ──────────────────────────────────────────────────────\n// When these env vars are injected at build time, bundlers eliminate the\n// branches guarded by these constants.\n\n/** ---------------------------------------------\n * PLUGIN DEFINITION\n * --------------------------------------------- */\n\n/**\n * A plugin/transformer that can optionally transform a node during a single DFS pass.\n * - `canHandle` decides if the node is transformable by this plugin.\n * - `transform` returns the transformed node (and does not recurse further).\n *\n * > `transformFn` is a function that can be used to deeply transform inside the plugin.\n */\nexport type Plugins = {\n id: string;\n canHandle: (node: any) => boolean;\n transform: (\n node: any,\n props: NodeProps,\n transformFn: (node: any, props: NodeProps) => any\n ) => any;\n};\n\n/** ---------------------------------------------\n * FALLBACK PLUGIN\n *\n * Used to fallback a tree-shaken plugin\n * --------------------------------------------- */\n\nexport const fallbackPlugin: Plugins = {\n id: 'fallback-plugin',\n canHandle: () => false,\n transform: (node) => node,\n};\n\n/**\n * Whether a resolved branch still expects insertion values.\n *\n * Some renderers return callable nodes (Svelte components, Angular proxies)\n * exposing their content on `.value`: those are final and must not be called\n * with the values. A pending insertion either has no `.value` or a function\n * one.\n */\nconst isAwaitingValues = (\n branch: unknown\n): branch is (values: Record<string, unknown>) => unknown => {\n if (typeof branch !== 'function') return false;\n\n const { value } = branch as { value?: unknown };\n\n return value === undefined || typeof value === 'function';\n};\n\n/** ---------------------------------------------\n * TRANSLATION PLUGIN\n * --------------------------------------------- */\n\nexport type UnionKeys<T> = T extends unknown ? keyof T : never;\nexport type ValueAtKey<T, K> = T extends unknown\n ? K extends keyof T\n ? T[K]\n : never\n : never;\n\nexport type TranslationCond<T, S, L extends LocalesValues> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.TRANSLATION]: infer U;\n}\n ? U extends Record<PropertyKey, unknown>\n ? U[keyof U] extends Record<PropertyKey, unknown>\n ? {\n [K in UnionKeys<U[keyof U]>]: L extends keyof U\n ? K extends keyof U[L]\n ? U[L][K]\n : ValueAtKey<U[keyof U], K>\n : ValueAtKey<U[keyof U], K>;\n } extends infer Content\n ? DeepTransformContent<Content, S>\n : never\n : (L extends keyof U ? U[L] : U[keyof U]) extends infer Content\n ? DeepTransformContent<Content, S>\n : never\n : never\n : never;\n\n/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */\nexport const translationPlugin = (\n locale: LocalesValues,\n fallback?: LocalesValues\n): Plugins =>\n process.env.INTLAYER_NODE_TYPE_TRANSLATION === 'false'\n ? fallbackPlugin\n : {\n id: 'translation-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.TRANSLATION,\n transform: (node: TranslationContent, props, deepTransformNode) => {\n // Resolve on the raw content first: only the displayed locale (and\n // the fallback keys it lacks) is ever transformed\n const content = getTranslation(\n node[NodeTypes.TRANSLATION] ?? {},\n locale,\n fallback\n );\n\n return deepTransformNode(content, {\n ...props,\n children: content,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.TRANSLATION, key: locale } as KeyPath,\n ],\n });\n },\n };\n\n/** ---------------------------------------------\n * ENUMERATION PLUGIN\n * --------------------------------------------- */\n\nexport type EnumerationCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.ENUMERATION]: object;\n}\n ? (\n quantity: number\n ) => DeepTransformContent<\n T[typeof NodeTypes.ENUMERATION][keyof T[typeof NodeTypes.ENUMERATION]],\n S\n >\n : never;\n\n/** Enumeration plugin. Replaces node with a function that takes quantity => string. */\nexport const enumerationPlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_ENUMERATION === 'false'\n ? fallbackPlugin\n : {\n id: 'enumeration-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.ENUMERATION,\n transform: (node: EnumerationContent, props, deepTransformNode) => {\n const original = node[NodeTypes.ENUMERATION];\n const result: Record<string, any> = {};\n\n for (const key in original) {\n const child = original[key as unknown as keyof typeof original];\n const childProps = {\n ...props,\n children: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.ENUMERATION, key } as KeyPath,\n ],\n };\n result[key] = deepTransformNode(child, childProps);\n }\n\n return (arg: number | { count: number }) => {\n const quantity = typeof arg === 'number' ? arg : arg.count;\n const subResult = getEnumeration(result, quantity);\n\n if (isAwaitingValues(subResult) && typeof arg === 'object') {\n return subResult(arg);\n }\n\n return subResult;\n };\n },\n };\n\n/** ---------------------------------------------\n * PLURAL PLUGIN\n * --------------------------------------------- */\n\n/**\n * A plural branch wrapped in an `insertion` node (auto-transformed\n * `{{count}}`) resolves to its inner content: the plural applies the values.\n */\ntype PluralBranch<Branch> = Branch extends {\n nodeType: NodeType | string;\n [NodeTypes.INSERTION]: infer InsertionContent;\n fields: readonly string[];\n}\n ? InsertionContent\n : Branch;\n\nexport type PluralCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.PLURAL]: object;\n}\n ? (\n arg: number | { count: number; [key: string]: unknown }\n ) => DeepTransformContent<\n PluralBranch<\n T[typeof NodeTypes.PLURAL][keyof T[typeof NodeTypes.PLURAL]]\n >,\n S\n >\n : never;\n\ntype SubResultFunction = (values: Record<string, string | number>) => string;\n\n/**\n * Plural plugin. Replaces node with a function that takes a count (or\n * `{ count, ...values }`) => string, picking the matching CLDR plural form\n * for the active locale and interpolating `{{count}}` (and other values).\n */\nexport const pluralPlugin = (locale?: LocalesValues): Plugins =>\n process.env.INTLAYER_NODE_TYPE_PLURAL === 'false'\n ? fallbackPlugin\n : {\n id: 'plural-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.PLURAL,\n transform: (node: PluralContent, props, deepTransformNode) => {\n const original = node[NodeTypes.PLURAL];\n const result: Record<string, any> = {};\n // The plural interpolates its own branches. A string plugin from an\n // enclosing `insert()` would turn them into functions first.\n const branchPlugins = (props.plugins ?? []).filter(\n (plugin) => plugin.id !== 'insertion-string-plugin'\n );\n\n /** String plugin for plural. Replaces string node with a component that renders the insertion. */\n const pluralStringPlugin: Plugins = {\n id: 'plural-string-plugin',\n canHandle: (node) =>\n typeof node === 'string' || isInterpolableWrapperNode(node),\n transform: (node, subProps, deepTransformNode) => {\n // An `insertion` node below the plural (e.g. auto-transformed\n // `{{count}}` branches) already returns `(values) => …`. Leave its\n // strings untouched, or its template would become a function.\n const isInsideInsertion = subProps.keyPath\n .slice(props.keyPath.length)\n .some((keyPath) => keyPath.type === NodeTypes.INSERTION);\n\n if (isInsideInsertion) {\n return deepTransformNode(node, {\n ...subProps,\n plugins: subProps.plugins?.filter(\n (plugin) => plugin.id !== 'plural-string-plugin'\n ),\n });\n }\n\n // `html()`/`markdown()` nodes carry their `{{count}}` placeholders\n // inside a raw string. Interpolate into that string, then re-run\n // the transform so the html/markdown renderer applies afterwards.\n if (isInterpolableWrapperNode(node)) {\n return (values: { [k: string]: string | number }) =>\n transformInterpolableNode(\n node,\n values,\n subProps,\n branchPlugins,\n deepTransformNode\n );\n }\n\n const transformedResult = deepTransformNode(node, {\n ...subProps,\n children: node,\n plugins: [\n ...branchPlugins.filter(\n (plugin) => plugin.id !== 'intlayer-node-plugin'\n ),\n ],\n });\n\n return (values: { [k: string]: string | number }) => {\n const children = getInsertion(transformedResult, values);\n\n return deepTransformNode(children, {\n ...subProps,\n plugins: branchPlugins,\n children,\n });\n };\n },\n };\n\n for (const key in original) {\n const child = original[key as keyof typeof original];\n const childProps = {\n ...props,\n children: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.PLURAL, key } as KeyPath,\n ],\n plugins: [pluralStringPlugin, ...branchPlugins],\n };\n result[key] = deepTransformNode(child, childProps);\n }\n\n const effectiveLocale = String(locale ?? props.locale ?? 'en');\n\n return (arg: number | { count: number; [key: string]: unknown }) => {\n const count = typeof arg === 'number' ? arg : arg.count;\n const values =\n typeof arg === 'number'\n ? { count: arg }\n : (arg as { count: number; [key: string]: unknown });\n\n const subResult: string | SubResultFunction = getPlural(\n result as PluralContent['plural'] as PluralContentState<string>,\n count,\n effectiveLocale\n );\n\n if (isAwaitingValues(subResult)) {\n return (subResult as SubResultFunction)(values);\n }\n\n return subResult;\n };\n },\n };\n\n/** ---------------------------------------------\n * CONDITION PLUGIN\n * --------------------------------------------- */\n\nexport type ConditionCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.CONDITION]: object;\n}\n ? (\n value: boolean | { value: boolean }\n ) => DeepTransformContent<\n T[typeof NodeTypes.CONDITION][keyof T[typeof NodeTypes.CONDITION]],\n S\n >\n : never;\n\n/** Condition plugin. Replaces node with a function that takes boolean => string. */\nexport const conditionPlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_CONDITION === 'false'\n ? fallbackPlugin\n : {\n id: 'condition-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.CONDITION,\n transform: (node: ConditionContent, props, deepTransformNode) => {\n const original = node[NodeTypes.CONDITION];\n const result: Record<string, any> = {};\n\n for (const key in original) {\n const child = original[key as keyof typeof original];\n const childProps = {\n ...props,\n children: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.CONDITION, key } as KeyPath,\n ],\n };\n result[key] = deepTransformNode(child, childProps);\n }\n\n return (arg: boolean | { value: boolean }) => {\n const value = typeof arg === 'boolean' ? arg : arg.value;\n const subResult = getCondition(result as any, value);\n\n if (isAwaitingValues(subResult) && typeof arg === 'object') {\n return subResult(arg);\n }\n\n return subResult;\n };\n },\n };\n\n/** ---------------------------------------------\n * INSERTION PLUGIN\n * --------------------------------------------- */\n\nexport type InsertionCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.INSERTION]: infer I;\n fields: readonly string[];\n}\n ? (\n values: {\n [K in T['fields'][number]]: string | number;\n }\n ) => I extends string\n ? DeepTransformContent<string, S>\n : DeepTransformContent<I, S>\n : never;\n\n/** Insertion plugin. Replaces node with a function that takes quantity => string. */\nexport const insertionPlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_INSERTION === 'false'\n ? fallbackPlugin\n : {\n id: 'insertion-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.INSERTION,\n transform: (node: InsertionContent, props, deepTransformNode) => {\n const newKeyPath: KeyPath[] = [\n ...props.keyPath,\n {\n type: NodeTypes.INSERTION,\n },\n ];\n\n const children = node[NodeTypes.INSERTION];\n\n /** Insertion string plugin. Replaces string node with a component that render the insertion. */\n const insertionStringPlugin: Plugins = {\n id: 'insertion-string-plugin',\n canHandle: (node) =>\n typeof node === 'string' || isInterpolableWrapperNode(node),\n transform: (node, subProps, deepTransformNode) => {\n // `html()`/`markdown()` nodes carry their `{{ … }}` placeholders\n // inside a raw string. Interpolate into that string, then re-run\n // the transform so the html/markdown renderer applies afterwards.\n if (isInterpolableWrapperNode(node)) {\n return (\n values: {\n [K in InsertionContent['fields'][number]]: string | number;\n }\n ) =>\n transformInterpolableNode(\n node,\n values,\n subProps,\n props.plugins,\n deepTransformNode\n );\n }\n\n const transformedResult = deepTransformNode(node, {\n ...subProps,\n children: node,\n plugins: [\n ...(props.plugins ?? ([] as Plugins[])).filter(\n (plugin) => plugin.id !== 'intlayer-node-plugin'\n ),\n ],\n });\n\n return (\n values: {\n [K in InsertionContent['fields'][number]]: string | number;\n }\n ) => {\n const children = getInsertion(transformedResult, values);\n\n return deepTransformNode(children, {\n ...subProps,\n plugins: props.plugins,\n children,\n });\n };\n },\n };\n\n const result = deepTransformNode(children, {\n ...props,\n children,\n keyPath: newKeyPath,\n plugins: [insertionStringPlugin, ...(props.plugins ?? [])],\n });\n\n return resolveInsertedSelector(children, result);\n },\n };\n\n/** Container nodes resolved by a selector call: `enu(3)`, `cond(true)`, … */\nconst selectorNodeTypes: string[] = [\n NodeTypes.ENUMERATION,\n NodeTypes.CONDITION,\n NodeTypes.PLURAL,\n NodeTypes.GENDER,\n NodeTypes.SELECT,\n];\n\n/**\n * Binds the values of an `insert()` to the selector node it wraps, returning\n * `(selector) => content`. Any other child result is returned unchanged.\n *\n * `areBranchesInterpolated` is set by frameworks that interpolate the branch\n * strings as soon as the values are known: the selected branch is then final\n * content and is never called with the values.\n */\nexport const bindInsertedValues = (\n children: unknown,\n result: unknown,\n values: Record<string, unknown>,\n areBranchesInterpolated = false\n): unknown => {\n const nodeType = (children as { nodeType?: string })?.nodeType;\n if (\n typeof result !== 'function' ||\n !nodeType ||\n !selectorNodeTypes.includes(nodeType)\n ) {\n return result;\n }\n\n const isCountSelector =\n nodeType === NodeTypes.PLURAL || nodeType === NodeTypes.ENUMERATION;\n\n return (selector: unknown) => {\n // Object selectors (`{ count }`, `{ value }`) carry the values along.\n if (typeof selector === 'object' && selector !== null) {\n return result({ ...values, ...selector });\n }\n\n // The count both selects the branch and fills `{{count}}`: the selector\n // wins over a `count` passed with the values.\n if (isCountSelector) {\n return result({ ...values, count: selector });\n }\n\n const selected = result(selector);\n\n return !areBranchesInterpolated && isAwaitingValues(selected)\n ? selected(values)\n : selected;\n };\n};\n\n/**\n * Shapes the result of `insert()` wrapping a selector node as\n * `(values) => (selector) => content`, so the values reach the selected\n * branch. Any other child result is returned unchanged.\n */\nexport const resolveInsertedSelector = (\n children: unknown,\n result: unknown\n): unknown =>\n typeof result === 'function' &&\n selectorNodeTypes.includes(\n (children as { nodeType?: string })?.nodeType ?? ''\n )\n ? (values: Record<string, unknown>) =>\n bindInsertedValues(children, result, values)\n : result;\n\n/** ---------------------------------------------\n * GENDER PLUGIN\n * --------------------------------------------- */\n\nexport type GenderCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.GENDER]: object;\n}\n ? (\n value: Gender\n ) => DeepTransformContent<\n T[typeof NodeTypes.GENDER][keyof T[typeof NodeTypes.GENDER]],\n S\n >\n : never;\n\n/** Gender plugin. Replaces node with a function that takes gender => string. */\nexport const genderPlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_GENDER === 'false'\n ? fallbackPlugin\n : {\n id: 'gender-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.GENDER,\n transform: (node: GenderContent, props, deepTransformNode) => {\n const original = node[NodeTypes.GENDER];\n const result: Record<string, any> = {};\n\n for (const key in original) {\n const child = original[key as keyof typeof original];\n const childProps = {\n ...props,\n children: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.GENDER, key } as KeyPath,\n ],\n };\n result[key] = deepTransformNode(child, childProps);\n }\n\n return (value: Gender) => getGender(result as any, value);\n },\n };\n\n/** ---------------------------------------------\n * SELECT PLUGIN\n * --------------------------------------------- */\n\n/**\n * Accepted selector for a select node.\n *\n * When the node declares a `fallback` case, any string is accepted (the\n * fallback covers the unmatched values) while the declared cases still\n * autocomplete. Without a `fallback`, only the declared cases are accepted.\n */\nexport type SelectSelector<States> = 'fallback' extends keyof States\n ? Exclude<keyof States & string, 'fallback'> | (string & {})\n : keyof States & string;\n\nexport type SelectCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.SELECT]: object;\n}\n ? (\n value:\n | SelectSelector<T[typeof NodeTypes.SELECT]>\n | { value: SelectSelector<T[typeof NodeTypes.SELECT]> }\n ) => DeepTransformContent<\n T[typeof NodeTypes.SELECT][keyof T[typeof NodeTypes.SELECT]],\n S\n >\n : never;\n\n/** Select plugin. Replaces node with a function that takes a string => content. */\nexport const selectPlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_SELECT === 'false'\n ? fallbackPlugin\n : {\n id: 'select-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.SELECT,\n transform: (node: SelectContent, props, deepTransformNode) => {\n const original = node[NodeTypes.SELECT];\n const result: Record<string, any> = {};\n\n for (const key in original) {\n const child = original[key as keyof typeof original];\n const childProps = {\n ...props,\n children: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.SELECT, key } as KeyPath,\n ],\n };\n result[key] = deepTransformNode(child, childProps);\n }\n\n return (arg: string | { value: string }) => {\n const value = typeof arg === 'string' ? arg : arg?.value;\n const subResult = getSelect(result, value);\n\n if (isAwaitingValues(subResult) && typeof arg === 'object') {\n return subResult(arg);\n }\n\n return subResult;\n };\n },\n };\n\n/** ---------------------------------------------\n * NESTED PLUGIN\n * --------------------------------------------- */\n\nexport type NestedCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.NESTED]: infer U;\n}\n ? U extends {\n dictionaryKey: infer K extends DictionaryKeys;\n path?: infer P;\n }\n ? GetNestingResult<K, P, S>\n : never\n : never;\n\n/**\n * Resolver used to turn a nested node into content.\n *\n * Optimized builds set `INTLAYER_OPTIMIZED_NESTING` so bundlers fold this to\n * the local resolver and dead-code-eliminate the registry-based one — together\n * with its `getIntlayer` import, and therefore the whole\n * `@intlayer/dictionaries-entry` module. That is what allows the dictionaries\n * entry to be emptied while `nest()` keeps working.\n */\nconst resolveNesting =\n process.env.INTLAYER_OPTIMIZED_NESTING === 'true'\n ? getNestingOptimized\n : getNesting;\n\n/** Nested plugin. Replaces node with the result of `getNesting`. */\nexport const nestedPlugin = (locale?: LocalesValues): Plugins =>\n process.env.INTLAYER_NODE_TYPE_NESTED === 'false'\n ? fallbackPlugin\n : {\n id: 'nested-plugin',\n canHandle: (node) =>\n typeof node === 'object' &&\n (node?.nodeType === NodeTypes.NESTED || node?.nodeType === 'n'),\n transform: (node: NestedContent, props) =>\n resolveNesting(\n node[NodeTypes.NESTED].dictionaryKey,\n node[NodeTypes.NESTED].path,\n {\n ...props,\n locale: (locale ?? props.locale) as Locale,\n }\n ),\n };\n\n/** ---------------------------------------------\n * FILE PLUGIN\n * --------------------------------------------- */\n\nexport type FileCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.FILE]: string;\n content?: string;\n}\n ? DeepTransformContent<string, S>\n : never;\n\n/** File plugin. Replaces node with the result of `getNesting`. */\nexport const filePlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_FILE === 'false'\n ? fallbackPlugin\n : {\n id: 'file-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.FILE,\n transform: (node: FileContent, props, deepTransform) =>\n deepTransform(node.content, {\n ...props,\n children: node.content,\n }),\n };\n\n/**\n * PLUGIN RESULT\n */\n\n/**\n * Interface that defines the properties of a node.\n * This interface can be augmented in other packages, such as `react-intlayer`.\n */\nexport interface NodeProps {\n dictionaryKey: string;\n keyPath: KeyPath[];\n plugins?: Plugins[];\n locale?: Locale;\n dictionaryPath?: string;\n children?: any;\n /**\n * Dictionaries referenced through `nest()`, attached to the consuming\n * dictionary by the build optimization and threaded down by\n * `deepTransformNode`.\n *\n * Present only in optimized builds, where the global dictionary registry is\n * stripped and `getNesting` resolves from this map instead. See\n * `getNesting.optimized.ts`.\n */\n nestedDictionaries?: Record<string, unknown>;\n /**\n * Forces eager traversal of plain objects in `deepTransformNode`. By default\n * traversal is lazy (property getters), so callers that discard the returned\n * value never trigger plugins on nested nodes. Set this when running plugins\n * for their side effects only (e.g. missing-locale detection), or when most\n * of the content is read anyway: defining a getter per key, then redefining\n * it on first read, costs more than transforming the key outright.\n */\n eager?: boolean;\n}\n\n/**\n * Interface that defines the plugins that can be used to transform a node.\n * This interface can be augmented in other packages, such as `react-intlayer`.\n */\nexport interface IInterpreterPlugin<T, S, L extends LocalesValues> {\n translation: TranslationCond<T, S, L>;\n enumeration: EnumerationCond<T, S, L>;\n plural: PluralCond<T, S, L>;\n condition: ConditionCond<T, S, L>;\n insertion: InsertionCond<T, S, L>;\n gender: GenderCond<T, S, L>;\n select: SelectCond<T, S, L>;\n nested: NestedCond<T, S, L>;\n file: FileCond<T, S, L>;\n}\n\n/**\n * Allow to avoid overwriting import from `intlayer` package when `IInterpreterPlugin<T>` interface is augmented in another package, such as `react-intlayer`.\n */\nexport type IInterpreterPluginState = {\n translation: true;\n enumeration: true;\n plural: true;\n condition: true;\n insertion: true;\n gender: true;\n select: true;\n nested: true;\n file: true;\n};\n\n/**\n * Utility type to check if a plugin can be applied to a node.\n */\ntype CheckApplyPlugin<\n T,\n K extends keyof IInterpreterPlugin<T, S, L>,\n S,\n L extends LocalesValues = DeclaredLocales,\n> = K extends keyof S // Test if the key is a key of S.\n ? // Test if the key of S is true. Then the plugin can be applied.\n S[K] extends true\n ? // Test if the key of S exist\n IInterpreterPlugin<T, S, L>[K] extends never\n ? never\n : // Test if the plugin condition is true (if it's not, the plugin is skipped for this node)\n IInterpreterPlugin<T, S, L>[K]\n : never\n : never;\n\n/**\n * Traverse recursively through an object or array, applying each plugin as needed.\n */\ntype Traverse<T, S, L extends LocalesValues = DeclaredLocales> =\n T extends ReadonlyArray<infer U> // Turn any read-only array into a plain mutable array\n ? Array<DeepTransformContent<U, S, L>>\n : T extends object\n ? { [K in keyof T]: DeepTransformContent<T[K], S, L> }\n : T;\n\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\n\n/**\n * Traverse recursively through an object or array, applying each plugin as needed.\n */\nexport type DeepTransformContent<\n T,\n S = IInterpreterPluginState,\n L extends LocalesValues = DeclaredLocales,\n> =\n IsAny<T> extends true\n ? T\n : CheckApplyPlugin<T, keyof IInterpreterPlugin<T, S, L>, S, L> extends never // Check if there is a plugin for T:\n ? // No plugin was found, so try to transform T recursively:\n Traverse<T, S, L>\n : // A plugin was found – use the plugin's transformation.\n CheckApplyPlugin<T, keyof IInterpreterPlugin<T, S, L>, S, L>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmEA,MAAa,iBAA0B;CACrC,IAAI;CACJ,iBAAiB;CACjB,YAAY,SAAS;AACvB;;;;;;;;;AAUA,MAAM,oBACJ,WAC2D;CAC3D,IAAI,OAAO,WAAW,YAAY,OAAO;CAEzC,MAAM,EAAE,UAAU;CAElB,OAAO,UAAU,UAAa,OAAO,UAAU;AACjD;;AAmCA,MAAa,qBACX,QACA,aAEA,QAAQ,IAAI,mCAAmC,UAC3C,iBACA;CACE,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAAY,MAAM,aAAaA,yBAAU;CAC3D,YAAY,MAA0B,OAAO,sBAAsB;EAGjE,MAAM,UAAUC,kDACd,KAAKD,yBAAU,gBAAgB,CAAC,GAChC,QACA,QACF;EAEA,OAAO,kBAAkB,SAAS;GAChC,GAAG;GACH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YAAY,MAAmB,OAAO,kBACpC,cAAc,KAAK,SAAS;EAC1B,GAAG;EACH,UAAU,KAAK;CACjB,CAAC;AACL"}
1
+ {"version":3,"file":"plugins.cjs","names":["NodeTypes","getTranslation","getEnumeration","isInterpolableWrapperNode","transformInterpolableNode","getInsertion","getPlural","getCondition","getGender","getSelect","getNestingOptimized","getNesting"],"sources":["../../../../src/interpreter/getContent/plugins.ts"],"sourcesContent":["import type { Locale } from '@intlayer/types/allLocales';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport type {\n DeclaredLocales,\n DictionaryKeys,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport type { NodeType } from '@intlayer/types/nodeType';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport type {\n ConditionContent,\n EnumerationContent,\n FileContent,\n Gender,\n GenderContent,\n InsertionContent,\n NestedContent,\n PluralContent,\n PluralContentState,\n SelectContent,\n TranslationContent,\n} from '../../transpiler';\nimport { DEFAULT_PLURAL_VARIABLE } from '../../transpiler/plural/plural';\nimport { getCondition } from '../getCondition';\nimport { getEnumeration } from '../getEnumeration';\nimport { getGender } from '../getGender';\nimport { getInsertion } from '../getInsertion';\nimport { type GetNestingResult, getNesting } from '../getNesting';\nimport { getNesting as getNestingOptimized } from '../getNesting.optimized';\nimport { getPlural } from '../getPlural';\nimport { getSelect } from '../getSelect';\nimport { getTranslation } from '../getTranslation';\nimport {\n isInterpolableWrapperNode,\n transformInterpolableNode,\n} from '../interpolableNode';\n\n// ── Tree-shake constants ──────────────────────────────────────────────────────\n// When these env vars are injected at build time, bundlers eliminate the\n// branches guarded by these constants.\n\n/** ---------------------------------------------\n * PLUGIN DEFINITION\n * --------------------------------------------- */\n\n/**\n * A plugin/transformer that can optionally transform a node during a single DFS pass.\n * - `canHandle` decides if the node is transformable by this plugin.\n * - `transform` returns the transformed node (and does not recurse further).\n *\n * > `transformFn` is a function that can be used to deeply transform inside the plugin.\n */\nexport type Plugins = {\n id: string;\n canHandle: (node: any) => boolean;\n transform: (\n node: any,\n props: NodeProps,\n transformFn: (node: any, props: NodeProps) => any\n ) => any;\n};\n\n/** ---------------------------------------------\n * FALLBACK PLUGIN\n *\n * Used to fallback a tree-shaken plugin\n * --------------------------------------------- */\n\nexport const fallbackPlugin: Plugins = {\n id: 'fallback-plugin',\n canHandle: () => false,\n transform: (node) => node,\n};\n\n/**\n * Whether a resolved branch still expects insertion values.\n *\n * Some renderers return callable nodes (Svelte components, Angular proxies)\n * exposing their content on `.value`: those are final and must not be called\n * with the values. A pending insertion either has no `.value` or a function\n * one.\n */\nconst isAwaitingValues = (\n branch: unknown\n): branch is (values: Record<string, unknown>) => unknown => {\n if (typeof branch !== 'function') return false;\n\n const { value } = branch as { value?: unknown };\n\n return value === undefined || typeof value === 'function';\n};\n\n/** ---------------------------------------------\n * TRANSLATION PLUGIN\n * --------------------------------------------- */\n\nexport type UnionKeys<T> = T extends unknown ? keyof T : never;\nexport type ValueAtKey<T, K> = T extends unknown\n ? K extends keyof T\n ? T[K]\n : never\n : never;\n\nexport type TranslationCond<T, S, L extends LocalesValues> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.TRANSLATION]: infer U;\n}\n ? U extends Record<PropertyKey, unknown>\n ? U[keyof U] extends Record<PropertyKey, unknown>\n ? {\n [K in UnionKeys<U[keyof U]>]: L extends keyof U\n ? K extends keyof U[L]\n ? U[L][K]\n : ValueAtKey<U[keyof U], K>\n : ValueAtKey<U[keyof U], K>;\n } extends infer Content\n ? DeepTransformContent<Content, S>\n : never\n : (L extends keyof U ? U[L] : U[keyof U]) extends infer Content\n ? DeepTransformContent<Content, S>\n : never\n : never\n : never;\n\n/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */\nexport const translationPlugin = (\n locale: LocalesValues,\n fallback?: LocalesValues\n): Plugins =>\n process.env.INTLAYER_NODE_TYPE_TRANSLATION === 'false'\n ? fallbackPlugin\n : {\n id: 'translation-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.TRANSLATION,\n transform: (node: TranslationContent, props, deepTransformNode) => {\n // Resolve on the raw content first: only the displayed locale (and\n // the fallback keys it lacks) is ever transformed\n const content = getTranslation(\n node[NodeTypes.TRANSLATION] ?? {},\n locale,\n fallback\n );\n\n return deepTransformNode(content, {\n ...props,\n children: content,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.TRANSLATION, key: locale } as KeyPath,\n ],\n });\n },\n };\n\n/** ---------------------------------------------\n * ENUMERATION PLUGIN\n * --------------------------------------------- */\n\nexport type EnumerationCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.ENUMERATION]: object;\n}\n ? (\n quantity: number\n ) => DeepTransformContent<\n T[typeof NodeTypes.ENUMERATION][keyof T[typeof NodeTypes.ENUMERATION]],\n S\n >\n : never;\n\n/** Enumeration plugin. Replaces node with a function that takes quantity => string. */\nexport const enumerationPlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_ENUMERATION === 'false'\n ? fallbackPlugin\n : {\n id: 'enumeration-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.ENUMERATION,\n transform: (node: EnumerationContent, props, deepTransformNode) => {\n const original = node[NodeTypes.ENUMERATION];\n const result: Record<string, any> = {};\n\n for (const key in original) {\n const child = original[key as unknown as keyof typeof original];\n const childProps = {\n ...props,\n children: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.ENUMERATION, key } as KeyPath,\n ],\n };\n result[key] = deepTransformNode(child, childProps);\n }\n\n return (arg: number | { count: number }) => {\n const quantity = typeof arg === 'number' ? arg : arg.count;\n const subResult = getEnumeration(result, quantity);\n\n if (isAwaitingValues(subResult) && typeof arg === 'object') {\n return subResult(arg);\n }\n\n return subResult;\n };\n },\n };\n\n/** ---------------------------------------------\n * PLURAL PLUGIN\n * --------------------------------------------- */\n\n/**\n * A plural branch wrapped in an `insertion` node (auto-transformed\n * `{{count}}`) resolves to its inner content: the plural applies the values.\n */\ntype PluralBranch<Branch> = Branch extends {\n nodeType: NodeType | string;\n [NodeTypes.INSERTION]: infer InsertionContent;\n fields: readonly string[];\n}\n ? InsertionContent\n : Branch;\n\n/** Value name a plural node selects on (`variable`, defaulting to `count`). */\ntype PluralVariable<T> = T extends { variable: infer Variable extends string }\n ? Variable\n : typeof DEFAULT_PLURAL_VARIABLE;\n\nexport type PluralCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.PLURAL]: object;\n}\n ? (\n arg:\n | number\n | ({ [Key in PluralVariable<T>]: number } & { [key: string]: unknown })\n ) => DeepTransformContent<\n PluralBranch<\n T[typeof NodeTypes.PLURAL][keyof T[typeof NodeTypes.PLURAL]]\n >,\n S\n >\n : never;\n\ntype SubResultFunction = (values: Record<string, string | number>) => string;\n\n/**\n * Plural plugin. Replaces node with a function that takes a count (or\n * `{ count, ...values }`) => string, picking the matching CLDR plural form\n * for the active locale and interpolating `{{count}}` (and other values).\n */\nexport const pluralPlugin = (locale?: LocalesValues): Plugins =>\n process.env.INTLAYER_NODE_TYPE_PLURAL === 'false'\n ? fallbackPlugin\n : {\n id: 'plural-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.PLURAL,\n transform: (node: PluralContent, props, deepTransformNode) => {\n const original = node[NodeTypes.PLURAL];\n const result: Record<string, any> = {};\n const variable = node.variable ?? DEFAULT_PLURAL_VARIABLE;\n // The plural interpolates its own branches. A string plugin from an\n // enclosing `insert()` or `plural()` would turn them into functions.\n const branchPlugins = (props.plugins ?? []).filter(\n (plugin) =>\n plugin.id !== 'insertion-string-plugin' &&\n plugin.id !== 'plural-string-plugin'\n );\n\n /** String plugin for plural. Replaces string node with a component that renders the insertion. */\n const pluralStringPlugin: Plugins = {\n id: 'plural-string-plugin',\n canHandle: (node) =>\n typeof node === 'string' || isInterpolableWrapperNode(node),\n transform: (node, subProps, deepTransformNode) => {\n // An `insertion` node below the plural (e.g. auto-transformed\n // `{{count}}` branches) already returns `(values) => …`. Leave its\n // strings untouched, or its template would become a function.\n const isInsideInsertion = subProps.keyPath\n .slice(props.keyPath.length)\n .some((keyPath) => keyPath.type === NodeTypes.INSERTION);\n\n if (isInsideInsertion) {\n return deepTransformNode(node, {\n ...subProps,\n plugins: subProps.plugins?.filter(\n (plugin) => plugin.id !== 'plural-string-plugin'\n ),\n });\n }\n\n // `html()`/`markdown()` nodes carry their `{{count}}` placeholders\n // inside a raw string. Interpolate into that string, then re-run\n // the transform so the html/markdown renderer applies afterwards.\n if (isInterpolableWrapperNode(node)) {\n return (values: { [k: string]: string | number }) =>\n transformInterpolableNode(\n node,\n values,\n subProps,\n branchPlugins,\n deepTransformNode\n );\n }\n\n const transformedResult = deepTransformNode(node, {\n ...subProps,\n children: node,\n plugins: [\n ...branchPlugins.filter(\n (plugin) => plugin.id !== 'intlayer-node-plugin'\n ),\n ],\n });\n\n return (values: { [k: string]: string | number }) => {\n const children = getInsertion(transformedResult, values);\n\n return deepTransformNode(children, {\n ...subProps,\n plugins: branchPlugins,\n children,\n });\n };\n },\n };\n\n for (const key in original) {\n const child = original[key as keyof typeof original];\n const childProps = {\n ...props,\n children: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.PLURAL, key } as KeyPath,\n ],\n plugins: [pluralStringPlugin, ...branchPlugins],\n };\n result[key] = deepTransformNode(child, childProps);\n }\n\n const effectiveLocale = String(locale ?? props.locale ?? 'en');\n\n return (arg: number | { [key: string]: unknown }) => {\n const values: Record<string, unknown> =\n typeof arg === 'number' ? { [variable]: arg } : arg;\n const count = Number(values[variable]);\n\n const subResult: string | SubResultFunction = getPlural(\n result as PluralContent['plural'] as PluralContentState<string>,\n count,\n effectiveLocale\n );\n\n if (isAwaitingValues(subResult)) {\n return (subResult as SubResultFunction)(\n values as Record<string, string | number>\n );\n }\n\n return subResult;\n };\n },\n };\n\n/** ---------------------------------------------\n * CONDITION PLUGIN\n * --------------------------------------------- */\n\nexport type ConditionCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.CONDITION]: object;\n}\n ? (\n value: boolean | { value: boolean }\n ) => DeepTransformContent<\n T[typeof NodeTypes.CONDITION][keyof T[typeof NodeTypes.CONDITION]],\n S\n >\n : never;\n\n/** Condition plugin. Replaces node with a function that takes boolean => string. */\nexport const conditionPlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_CONDITION === 'false'\n ? fallbackPlugin\n : {\n id: 'condition-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.CONDITION,\n transform: (node: ConditionContent, props, deepTransformNode) => {\n const original = node[NodeTypes.CONDITION];\n const result: Record<string, any> = {};\n\n for (const key in original) {\n const child = original[key as keyof typeof original];\n const childProps = {\n ...props,\n children: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.CONDITION, key } as KeyPath,\n ],\n };\n result[key] = deepTransformNode(child, childProps);\n }\n\n return (arg: boolean | { value: boolean }) => {\n const value = typeof arg === 'boolean' ? arg : arg.value;\n const subResult = getCondition(result as any, value);\n\n if (isAwaitingValues(subResult) && typeof arg === 'object') {\n return subResult(arg);\n }\n\n return subResult;\n };\n },\n };\n\n/** ---------------------------------------------\n * INSERTION PLUGIN\n * --------------------------------------------- */\n\nexport type InsertionCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.INSERTION]: infer I;\n fields: readonly string[];\n}\n ? (\n values: {\n [K in T['fields'][number]]: string | number;\n }\n ) => I extends string\n ? DeepTransformContent<string, S>\n : DeepTransformContent<I, S>\n : never;\n\n/** Insertion plugin. Replaces node with a function that takes quantity => string. */\nexport const insertionPlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_INSERTION === 'false'\n ? fallbackPlugin\n : {\n id: 'insertion-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.INSERTION,\n transform: (node: InsertionContent, props, deepTransformNode) => {\n const newKeyPath: KeyPath[] = [\n ...props.keyPath,\n {\n type: NodeTypes.INSERTION,\n },\n ];\n\n const children = node[NodeTypes.INSERTION];\n\n /** Insertion string plugin. Replaces string node with a component that render the insertion. */\n const insertionStringPlugin: Plugins = {\n id: 'insertion-string-plugin',\n canHandle: (node) =>\n typeof node === 'string' || isInterpolableWrapperNode(node),\n transform: (node, subProps, deepTransformNode) => {\n // `html()`/`markdown()` nodes carry their `{{ … }}` placeholders\n // inside a raw string. Interpolate into that string, then re-run\n // the transform so the html/markdown renderer applies afterwards.\n if (isInterpolableWrapperNode(node)) {\n return (\n values: {\n [K in InsertionContent['fields'][number]]: string | number;\n }\n ) =>\n transformInterpolableNode(\n node,\n values,\n subProps,\n props.plugins,\n deepTransformNode\n );\n }\n\n const transformedResult = deepTransformNode(node, {\n ...subProps,\n children: node,\n plugins: [\n ...(props.plugins ?? ([] as Plugins[])).filter(\n (plugin) => plugin.id !== 'intlayer-node-plugin'\n ),\n ],\n });\n\n return (\n values: {\n [K in InsertionContent['fields'][number]]: string | number;\n }\n ) => {\n const children = getInsertion(transformedResult, values);\n\n return deepTransformNode(children, {\n ...subProps,\n plugins: props.plugins,\n children,\n });\n };\n },\n };\n\n const result = deepTransformNode(children, {\n ...props,\n children,\n keyPath: newKeyPath,\n plugins: [insertionStringPlugin, ...(props.plugins ?? [])],\n });\n\n return resolveInsertedSelector(children, result);\n },\n };\n\n/** Container nodes resolved by a selector call: `enu(3)`, `cond(true)`, … */\nconst selectorNodeTypes: string[] = [\n NodeTypes.ENUMERATION,\n NodeTypes.CONDITION,\n NodeTypes.PLURAL,\n NodeTypes.GENDER,\n NodeTypes.SELECT,\n];\n\n/**\n * Binds the values of an `insert()` to the selector node it wraps, returning\n * `(selector) => content`. Any other child result is returned unchanged.\n *\n * `areBranchesInterpolated` is set by frameworks that interpolate the branch\n * strings as soon as the values are known: the selected branch is then final\n * content and is never called with the values.\n */\nexport const bindInsertedValues = (\n children: unknown,\n result: unknown,\n values: Record<string, unknown>,\n areBranchesInterpolated = false\n): unknown => {\n const nodeType = (children as { nodeType?: string })?.nodeType;\n if (\n typeof result !== 'function' ||\n !nodeType ||\n !selectorNodeTypes.includes(nodeType)\n ) {\n return result;\n }\n\n const isCountSelector =\n nodeType === NodeTypes.PLURAL || nodeType === NodeTypes.ENUMERATION;\n\n return (selector: unknown) => {\n // Object selectors (`{ count }`, `{ value }`) carry the values along.\n if (typeof selector === 'object' && selector !== null) {\n return result({ ...values, ...selector });\n }\n\n // The count both selects the branch and fills `{{count}}`: the selector\n // wins over a `count` passed with the values.\n if (isCountSelector) {\n return result({ ...values, count: selector });\n }\n\n const selected = result(selector);\n\n return !areBranchesInterpolated && isAwaitingValues(selected)\n ? selected(values)\n : selected;\n };\n};\n\n/**\n * Shapes the result of `insert()` wrapping a selector node as\n * `(values) => (selector) => content`, so the values reach the selected\n * branch. Any other child result is returned unchanged.\n */\nexport const resolveInsertedSelector = (\n children: unknown,\n result: unknown\n): unknown =>\n typeof result === 'function' &&\n selectorNodeTypes.includes(\n (children as { nodeType?: string })?.nodeType ?? ''\n )\n ? (values: Record<string, unknown>) =>\n bindInsertedValues(children, result, values)\n : result;\n\n/** ---------------------------------------------\n * GENDER PLUGIN\n * --------------------------------------------- */\n\nexport type GenderCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.GENDER]: object;\n}\n ? (\n value: Gender\n ) => DeepTransformContent<\n T[typeof NodeTypes.GENDER][keyof T[typeof NodeTypes.GENDER]],\n S\n >\n : never;\n\n/** Gender plugin. Replaces node with a function that takes gender => string. */\nexport const genderPlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_GENDER === 'false'\n ? fallbackPlugin\n : {\n id: 'gender-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.GENDER,\n transform: (node: GenderContent, props, deepTransformNode) => {\n const original = node[NodeTypes.GENDER];\n const result: Record<string, any> = {};\n\n for (const key in original) {\n const child = original[key as keyof typeof original];\n const childProps = {\n ...props,\n children: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.GENDER, key } as KeyPath,\n ],\n };\n result[key] = deepTransformNode(child, childProps);\n }\n\n return (value: Gender) => getGender(result as any, value);\n },\n };\n\n/** ---------------------------------------------\n * SELECT PLUGIN\n * --------------------------------------------- */\n\n/**\n * Accepted selector for a select node.\n *\n * When the node declares a `fallback` case, any string is accepted (the\n * fallback covers the unmatched values) while the declared cases still\n * autocomplete. Without a `fallback`, only the declared cases are accepted.\n */\nexport type SelectSelector<States> = 'fallback' extends keyof States\n ? Exclude<keyof States & string, 'fallback'> | (string & {})\n : keyof States & string;\n\nexport type SelectCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.SELECT]: object;\n}\n ? (\n value:\n | SelectSelector<T[typeof NodeTypes.SELECT]>\n | { value: SelectSelector<T[typeof NodeTypes.SELECT]> }\n ) => DeepTransformContent<\n T[typeof NodeTypes.SELECT][keyof T[typeof NodeTypes.SELECT]],\n S\n >\n : never;\n\n/** Select plugin. Replaces node with a function that takes a string => content. */\nexport const selectPlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_SELECT === 'false'\n ? fallbackPlugin\n : {\n id: 'select-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.SELECT,\n transform: (node: SelectContent, props, deepTransformNode) => {\n const original = node[NodeTypes.SELECT];\n const result: Record<string, any> = {};\n\n for (const key in original) {\n const child = original[key as keyof typeof original];\n const childProps = {\n ...props,\n children: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeTypes.SELECT, key } as KeyPath,\n ],\n };\n result[key] = deepTransformNode(child, childProps);\n }\n\n return (arg: string | { value: string }) => {\n const value = typeof arg === 'string' ? arg : arg?.value;\n const subResult = getSelect(result, value);\n\n if (isAwaitingValues(subResult) && typeof arg === 'object') {\n return subResult(arg);\n }\n\n return subResult;\n };\n },\n };\n\n/** ---------------------------------------------\n * NESTED PLUGIN\n * --------------------------------------------- */\n\nexport type NestedCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.NESTED]: infer U;\n}\n ? U extends {\n dictionaryKey: infer K extends DictionaryKeys;\n path?: infer P;\n }\n ? GetNestingResult<K, P, S>\n : never\n : never;\n\n/**\n * Resolver used to turn a nested node into content.\n *\n * Optimized builds set `INTLAYER_OPTIMIZED_NESTING` so bundlers fold this to\n * the local resolver and dead-code-eliminate the registry-based one — together\n * with its `getIntlayer` import, and therefore the whole\n * `@intlayer/dictionaries-entry` module. That is what allows the dictionaries\n * entry to be emptied while `nest()` keeps working.\n */\nconst resolveNesting =\n process.env.INTLAYER_OPTIMIZED_NESTING === 'true'\n ? getNestingOptimized\n : getNesting;\n\n/** Nested plugin. Replaces node with the result of `getNesting`. */\nexport const nestedPlugin = (locale?: LocalesValues): Plugins =>\n process.env.INTLAYER_NODE_TYPE_NESTED === 'false'\n ? fallbackPlugin\n : {\n id: 'nested-plugin',\n canHandle: (node) =>\n typeof node === 'object' &&\n (node?.nodeType === NodeTypes.NESTED || node?.nodeType === 'n'),\n transform: (node: NestedContent, props) =>\n resolveNesting(\n node[NodeTypes.NESTED].dictionaryKey,\n node[NodeTypes.NESTED].path,\n {\n ...props,\n locale: (locale ?? props.locale) as Locale,\n }\n ),\n };\n\n/** ---------------------------------------------\n * FILE PLUGIN\n * --------------------------------------------- */\n\nexport type FileCond<T, S, _L> = T extends {\n nodeType: NodeType | string;\n [NodeTypes.FILE]: string;\n content?: string;\n}\n ? DeepTransformContent<string, S>\n : never;\n\n/** File plugin. Replaces node with the result of `getNesting`. */\nexport const filePlugin: Plugins =\n process.env.INTLAYER_NODE_TYPE_FILE === 'false'\n ? fallbackPlugin\n : {\n id: 'file-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeTypes.FILE,\n transform: (node: FileContent, props, deepTransform) =>\n deepTransform(node.content, {\n ...props,\n children: node.content,\n }),\n };\n\n/**\n * PLUGIN RESULT\n */\n\n/**\n * Interface that defines the properties of a node.\n * This interface can be augmented in other packages, such as `react-intlayer`.\n */\nexport interface NodeProps {\n dictionaryKey: string;\n keyPath: KeyPath[];\n plugins?: Plugins[];\n locale?: Locale;\n dictionaryPath?: string;\n children?: any;\n /**\n * Dictionaries referenced through `nest()`, attached to the consuming\n * dictionary by the build optimization and threaded down by\n * `deepTransformNode`.\n *\n * Present only in optimized builds, where the global dictionary registry is\n * stripped and `getNesting` resolves from this map instead. See\n * `getNesting.optimized.ts`.\n */\n nestedDictionaries?: Record<string, unknown>;\n /**\n * Forces eager traversal of plain objects in `deepTransformNode`. By default\n * traversal is lazy (property getters), so callers that discard the returned\n * value never trigger plugins on nested nodes. Set this when running plugins\n * for their side effects only (e.g. missing-locale detection), or when most\n * of the content is read anyway: defining a getter per key, then redefining\n * it on first read, costs more than transforming the key outright.\n */\n eager?: boolean;\n}\n\n/**\n * Interface that defines the plugins that can be used to transform a node.\n * This interface can be augmented in other packages, such as `react-intlayer`.\n */\nexport interface IInterpreterPlugin<T, S, L extends LocalesValues> {\n translation: TranslationCond<T, S, L>;\n enumeration: EnumerationCond<T, S, L>;\n plural: PluralCond<T, S, L>;\n condition: ConditionCond<T, S, L>;\n insertion: InsertionCond<T, S, L>;\n gender: GenderCond<T, S, L>;\n select: SelectCond<T, S, L>;\n nested: NestedCond<T, S, L>;\n file: FileCond<T, S, L>;\n}\n\n/**\n * Allow to avoid overwriting import from `intlayer` package when `IInterpreterPlugin<T>` interface is augmented in another package, such as `react-intlayer`.\n */\nexport type IInterpreterPluginState = {\n translation: true;\n enumeration: true;\n plural: true;\n condition: true;\n insertion: true;\n gender: true;\n select: true;\n nested: true;\n file: true;\n};\n\n/**\n * Utility type to check if a plugin can be applied to a node.\n */\ntype CheckApplyPlugin<\n T,\n K extends keyof IInterpreterPlugin<T, S, L>,\n S,\n L extends LocalesValues = DeclaredLocales,\n> = K extends keyof S // Test if the key is a key of S.\n ? // Test if the key of S is true. Then the plugin can be applied.\n S[K] extends true\n ? // Test if the key of S exist\n IInterpreterPlugin<T, S, L>[K] extends never\n ? never\n : // Test if the plugin condition is true (if it's not, the plugin is skipped for this node)\n IInterpreterPlugin<T, S, L>[K]\n : never\n : never;\n\n/**\n * Traverse recursively through an object or array, applying each plugin as needed.\n */\ntype Traverse<T, S, L extends LocalesValues = DeclaredLocales> =\n T extends ReadonlyArray<infer U> // Turn any read-only array into a plain mutable array\n ? Array<DeepTransformContent<U, S, L>>\n : T extends object\n ? { [K in keyof T]: DeepTransformContent<T[K], S, L> }\n : T;\n\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\n\n/**\n * Traverse recursively through an object or array, applying each plugin as needed.\n */\nexport type DeepTransformContent<\n T,\n S = IInterpreterPluginState,\n L extends LocalesValues = DeclaredLocales,\n> =\n IsAny<T> extends true\n ? T\n : CheckApplyPlugin<T, keyof IInterpreterPlugin<T, S, L>, S, L> extends never // Check if there is a plugin for T:\n ? // No plugin was found, so try to transform T recursively:\n Traverse<T, S, L>\n : // A plugin was found – use the plugin's transformation.\n CheckApplyPlugin<T, keyof IInterpreterPlugin<T, S, L>, S, L>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoEA,MAAa,iBAA0B;CACrC,IAAI;CACJ,iBAAiB;CACjB,YAAY,SAAS;AACvB;;;;;;;;;AAUA,MAAM,oBACJ,WAC2D;CAC3D,IAAI,OAAO,WAAW,YAAY,OAAO;CAEzC,MAAM,EAAE,UAAU;CAElB,OAAO,UAAU,UAAa,OAAO,UAAU;AACjD;;AAmCA,MAAa,qBACX,QACA,aAEA,QAAQ,IAAI,mCAAmC,UAC3C,iBACA;CACE,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAAY,MAAM,aAAaA,yBAAU;CAC3D,YAAY,MAA0B,OAAO,sBAAsB;EAGjE,MAAM,UAAUC,kDACd,KAAKD,yBAAU,gBAAgB,CAAC,GAChC,QACA,QACF;EAEA,OAAO,kBAAkB,SAAS;GAChC,GAAG;GACH,UAAU;GACV,SAAS,CACP,GAAG,MAAM,SACT;IAAE,MAAMA,yBAAU;IAAa,KAAK;GAAO,CAC7C;EACF,CAAC;CACH;AACF;;AAmBN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"}
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_interpreter_dictionaryTransformCache = require('./dictionaryTransformCache.cjs');
3
- const require_dictionaryManipulator_qualifiedDictionary = require('../dictionaryManipulator/qualifiedDictionary.cjs');
4
- const require_interpreter_resolveInterpreterLocale = require('./resolveInterpreterLocale.cjs');
5
- const require_interpreter_getContent_getContent = require('./getContent/getContent.cjs');
2
+ const require_dictionaryManipulator_qualifiedDictionary = require("../dictionaryManipulator/qualifiedDictionary.cjs");
3
+ const require_interpreter_dictionaryTransformCache = require("./dictionaryTransformCache.cjs");
4
+ const require_interpreter_getContent_getContent = require("./getContent/getContent.cjs");
5
+ const require_interpreter_resolveInterpreterLocale = require("./resolveInterpreterLocale.cjs");
6
6
 
7
- //#region src/interpreter/getDictionary.ts
7
+ // src/interpreter/getDictionary.ts
8
8
  /**
9
9
  * Dictionaries whose transform is running. Content is transformed eagerly, so a
10
10
  * dictionary reached again through a `nest()` cycle is transformed lazily
@@ -52,6 +52,5 @@ const getDictionary = (dictionary, localeOrSelector, plugins) => {
52
52
  return require_interpreter_dictionaryTransformCache.writeTransformCache(dictionary, cacheKey, transformDictionary(resolved));
53
53
  };
54
54
 
55
- //#endregion
56
55
  exports.getDictionary = getDictionary;
57
56
  //# sourceMappingURL=getDictionary.cjs.map
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_interpreter_dictionaryTransformCache = require('./dictionaryTransformCache.cjs');
3
- const require_dictionaryManipulator_qualifiedDictionary = require('../dictionaryManipulator/qualifiedDictionary.cjs');
4
- const require_interpreter_resolveInterpreterLocale = require('./resolveInterpreterLocale.cjs');
5
- const require_interpreter_getDictionary = require('./getDictionary.cjs');
6
- const require_dictionaryManipulator_qualifiedDynamicLoader = require('../dictionaryManipulator/qualifiedDynamicLoader.cjs');
7
- const require_dictionaryManipulator_plainDynamicLoader = require('../dictionaryManipulator/plainDynamicLoader.cjs');
2
+ const require_dictionaryManipulator_plainDynamicLoader = require("../dictionaryManipulator/plainDynamicLoader.cjs");
3
+ const require_dictionaryManipulator_qualifiedDictionary = require("../dictionaryManipulator/qualifiedDictionary.cjs");
4
+ const require_dictionaryManipulator_qualifiedDynamicLoader = require("../dictionaryManipulator/qualifiedDynamicLoader.cjs");
5
+ const require_interpreter_dictionaryTransformCache = require("./dictionaryTransformCache.cjs");
6
+ const require_interpreter_getDictionary = require("./getDictionary.cjs");
7
+ const require_interpreter_resolveInterpreterLocale = require("./resolveInterpreterLocale.cjs");
8
8
 
9
- //#region src/interpreter/getDictionaryAsync.ts
9
+ // src/interpreter/getDictionaryAsync.ts
10
10
  /**
11
11
  * Content already resolved for a `key + locale + selector` triple, or the
12
12
  * in-flight promise resolving it. Storing the promise itself makes the cache
@@ -74,6 +74,5 @@ const getDictionaryAsync = async (dictionaryLoaders, key, localeOrSelector, plug
74
74
  return contentPromise;
75
75
  };
76
76
 
77
- //#endregion
78
77
  exports.getDictionaryAsync = getDictionaryAsync;
79
78
  //# sourceMappingURL=getDictionaryAsync.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/interpreter/getEnumeration.ts
2
+ // src/interpreter/getEnumeration.ts
3
3
  /**
4
4
  * Find the matching condition for a quantity.
5
5
  *
@@ -66,7 +66,6 @@ const getEnumeration = (enumerationContent, quantity) => {
66
66
  return enumerationContent[findMatchingCondition(enumerationContent, quantity) ?? "fallback"];
67
67
  };
68
68
 
69
- //#endregion
70
69
  exports.findMatchingCondition = findMatchingCondition;
71
70
  exports.getEnumeration = getEnumeration;
72
71
  //# sourceMappingURL=getEnumeration.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/interpreter/getGender.ts
2
+ // src/interpreter/getGender.ts
3
3
  const getGenderEntry = (gender) => {
4
4
  if (gender === "m" || gender === "male") return "male";
5
5
  if (gender === "f" || gender === "female") return "female";
@@ -33,6 +33,5 @@ const getGender = (genderContent, gender) => {
33
33
  return genderContent[getGenderEntry(gender)] ?? genderContent.fallback ?? genderContent[fallbackState];
34
34
  };
35
35
 
36
- //#endregion
37
36
  exports.getGender = getGender;
38
37
  //# sourceMappingURL=getGender.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/interpreter/getHTML.ts
2
+ // src/interpreter/getHTML.ts
3
3
  /**
4
4
  * Helper to parse attributes from a tag string.
5
5
  */
@@ -119,6 +119,5 @@ const getHTML = (content, values) => {
119
119
  return result.length === 1 ? result[0] : result;
120
120
  };
121
121
 
122
- //#endregion
123
122
  exports.getHTML = getHTML;
124
123
  //# sourceMappingURL=getHTML.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/interpreter/getInsertion.ts
2
+ // src/interpreter/getInsertion.ts
3
3
  /**
4
4
  * Allow to insert values in a string.
5
5
  *
@@ -17,6 +17,5 @@ const getInsertion = (content, values) => content.replace(/\{\{\s*(.*?)\s*\}\}/g
17
17
  return (values[key.trim()] ?? "").toString();
18
18
  });
19
19
 
20
- //#endregion
21
20
  exports.getInsertion = getInsertion;
22
21
  //# sourceMappingURL=getInsertion.cjs.map
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_interpreter_getDictionary = require('./getDictionary.cjs');
2
+ const require_interpreter_getDictionary = require("./getDictionary.cjs");
3
3
  let _intlayer_config_built = require("@intlayer/config/built");
4
4
  let _intlayer_config_logger = require("@intlayer/config/logger");
5
5
  let _intlayer_dictionaries_entry = require("@intlayer/dictionaries-entry");
6
6
 
7
- //#region src/interpreter/getIntlayer.ts
7
+ // src/interpreter/getIntlayer.ts
8
8
  /**
9
9
  * Object.prototype methods libraries call on arbitrary values while inspecting
10
10
  * them — TanStack Router's `isPlainObject` reaches for `hasOwnProperty` on
@@ -63,6 +63,5 @@ const getIntlayer = (key, localeOrSelector, plugins) => {
63
63
  return require_interpreter_getDictionary.getDictionary(dictionary, localeOrSelector, plugins);
64
64
  };
65
65
 
66
- //#endregion
67
66
  exports.getIntlayer = getIntlayer;
68
67
  //# sourceMappingURL=getIntlayer.cjs.map
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_interpreter_resolveInterpreterLocale = require('./resolveInterpreterLocale.cjs');
3
- const require_interpreter_getIntlayer = require('./getIntlayer.cjs');
2
+ const require_interpreter_getIntlayer = require("./getIntlayer.cjs");
3
+ const require_interpreter_resolveInterpreterLocale = require("./resolveInterpreterLocale.cjs");
4
4
 
5
- //#region src/interpreter/getIntlayerAsync.ts
5
+ // src/interpreter/getIntlayerAsync.ts
6
6
  /**
7
7
  * Picks one dictionary by its key and resolves its content for the given
8
8
  * locale or selector, loading that locale alone.
@@ -40,6 +40,5 @@ const getIntlayerAsync = async (key, localeOrSelector, plugins) => {
40
40
  } : locale, plugins);
41
41
  };
42
42
 
43
- //#endregion
44
43
  exports.getIntlayerAsync = getIntlayerAsync;
45
44
  //# sourceMappingURL=getIntlayerAsync.cjs.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_interpreter_getIntlayer = require('./getIntlayer.cjs');
2
+ const require_interpreter_getIntlayer = require("./getIntlayer.cjs");
3
3
 
4
- //#region src/interpreter/getNesting.ts
4
+ // src/interpreter/getNesting.ts
5
5
  /**
6
6
  * Extracts content from another dictionary by its key and an optional path.
7
7
  *
@@ -32,6 +32,5 @@ const getNesting = (dictionaryKey, path, props) => {
32
32
  return dictionary;
33
33
  };
34
34
 
35
- //#endregion
36
35
  exports.getNesting = getNesting;
37
36
  //# sourceMappingURL=getNesting.cjs.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_interpreter_getDictionary = require('./getDictionary.cjs');
2
+ const require_interpreter_getDictionary = require("./getDictionary.cjs");
3
3
 
4
- //#region src/interpreter/getNesting.optimized.ts
4
+ // src/interpreter/getNesting.optimized.ts
5
5
  /**
6
6
  * Walks a dot-separated path on an already-interpreted dictionary content.
7
7
  *
@@ -54,6 +54,5 @@ const getNesting = (dictionaryKey, path, props) => {
54
54
  return walkPath(content, path);
55
55
  };
56
56
 
57
- //#endregion
58
57
  exports.getNesting = getNesting;
59
58
  //# sourceMappingURL=getNesting.optimized.cjs.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_utils_intl = require('../utils/intl.cjs');
2
+ const require_utils_intl = require("../utils/intl.cjs");
3
3
 
4
- //#region src/interpreter/getPlural.ts
4
+ // src/interpreter/getPlural.ts
5
5
  /**
6
6
  * Picks content from a plural map based on a count and locale, using CLDR
7
7
  * pluralization rules (`Intl.PluralRules`).
@@ -21,6 +21,5 @@ const getPlural = (pluralContent, count, locale) => {
21
21
  return pluralContent[require_utils_intl.getCachedIntl("PluralRules", locale).select(count)] ?? pluralContent.other;
22
22
  };
23
23
 
24
- //#endregion
25
24
  exports.getPlural = getPlural;
26
25
  //# sourceMappingURL=getPlural.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/interpreter/getSelect.ts
2
+ // src/interpreter/getSelect.ts
3
3
  /**
4
4
  * Picks content from a select map based on an arbitrary string value.
5
5
  *
@@ -30,6 +30,5 @@ const getSelect = (selectContent, value) => {
30
30
  return selectContent[value] ?? selectContent.fallback ?? selectContent.other ?? selectContent[lastCase];
31
31
  };
32
32
 
33
- //#endregion
34
33
  exports.getSelect = getSelect;
35
34
  //# sourceMappingURL=getSelect.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/interpreter/getTranslation.ts
2
+ // src/interpreter/getTranslation.ts
3
3
  /**
4
4
  * Check if a value is a plain object that can be safely merged.
5
5
  * Returns false for Promises, React elements, class instances, etc.
@@ -86,6 +86,5 @@ const getTranslation = (languageContent, locale, fallback) => {
86
86
  return results.reduce((acc, curr) => deepMerge(acc, curr));
87
87
  };
88
88
 
89
- //#endregion
90
89
  exports.getTranslation = getTranslation;
91
90
  //# sourceMappingURL=getTranslation.cjs.map
@@ -1,24 +1,24 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_interpreter_dictionaryTransformCache = require('./dictionaryTransformCache.cjs');
3
- const require_interpreter_getCondition = require('./getCondition.cjs');
4
- const require_interpreter_getContent_deepTransform = require('./getContent/deepTransform.cjs');
5
- const require_interpreter_getEnumeration = require('./getEnumeration.cjs');
6
- const require_interpreter_getGender = require('./getGender.cjs');
7
- const require_interpreter_getInsertion = require('./getInsertion.cjs');
8
- const require_interpreter_resolveInterpreterLocale = require('./resolveInterpreterLocale.cjs');
9
- const require_interpreter_getDictionary = require('./getDictionary.cjs');
10
- const require_interpreter_getIntlayer = require('./getIntlayer.cjs');
11
- const require_interpreter_getNesting = require('./getNesting.cjs');
12
- const require_interpreter_getPlural = require('./getPlural.cjs');
13
- const require_interpreter_getSelect = require('./getSelect.cjs');
14
- const require_interpreter_getTranslation = require('./getTranslation.cjs');
15
- const require_interpreter_interpolableNode = require('./interpolableNode.cjs');
16
- const require_interpreter_getContent_plugins = require('./getContent/plugins.cjs');
17
- const require_interpreter_getContent_getContent = require('./getContent/getContent.cjs');
18
- const require_interpreter_getDictionaryAsync = require('./getDictionaryAsync.cjs');
19
- const require_interpreter_getHTML = require('./getHTML.cjs');
20
- const require_interpreter_getIntlayerAsync = require('./getIntlayerAsync.cjs');
21
- const require_interpreter_splitAndJoinInsertion = require('./splitAndJoinInsertion.cjs');
2
+ const require_interpreter_dictionaryTransformCache = require("./dictionaryTransformCache.cjs");
3
+ const require_interpreter_getCondition = require("./getCondition.cjs");
4
+ const require_interpreter_getContent_deepTransform = require("./getContent/deepTransform.cjs");
5
+ const require_interpreter_getDictionary = require("./getDictionary.cjs");
6
+ const require_interpreter_getDictionaryAsync = require("./getDictionaryAsync.cjs");
7
+ const require_interpreter_getEnumeration = require("./getEnumeration.cjs");
8
+ const require_interpreter_getGender = require("./getGender.cjs");
9
+ const require_interpreter_getHTML = require("./getHTML.cjs");
10
+ const require_interpreter_getInsertion = require("./getInsertion.cjs");
11
+ const require_interpreter_getIntlayer = require("./getIntlayer.cjs");
12
+ const require_interpreter_getIntlayerAsync = require("./getIntlayerAsync.cjs");
13
+ const require_interpreter_getNesting = require("./getNesting.cjs");
14
+ const require_interpreter_getPlural = require("./getPlural.cjs");
15
+ const require_interpreter_getSelect = require("./getSelect.cjs");
16
+ const require_interpreter_getContent_plugins = require("./getContent/plugins.cjs");
17
+ const require_interpreter_getContent_getContent = require("./getContent/getContent.cjs");
18
+ const require_interpreter_getTranslation = require("./getTranslation.cjs");
19
+ const require_interpreter_interpolableNode = require("./interpolableNode.cjs");
20
+ const require_interpreter_resolveInterpreterLocale = require("./resolveInterpreterLocale.cjs");
21
+ const require_interpreter_splitAndJoinInsertion = require("./splitAndJoinInsertion.cjs");
22
22
 
23
23
  exports.bindInsertedValues = require_interpreter_getContent_plugins.bindInsertedValues;
24
24
  exports.conditionPlugin = require_interpreter_getContent_plugins.conditionPlugin;