preact-intlayer 6.1.6 → 7.0.0-canary.2

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 (297) hide show
  1. package/dist/cjs/IntlayerNode.cjs +15 -45
  2. package/dist/cjs/IntlayerNode.cjs.map +1 -1
  3. package/dist/cjs/UI/ContentSelector.cjs +98 -130
  4. package/dist/cjs/UI/ContentSelector.cjs.map +1 -1
  5. package/dist/cjs/_virtual/rolldown_runtime.cjs +25 -0
  6. package/dist/cjs/client/IntlayerProvider.cjs +67 -95
  7. package/dist/cjs/client/IntlayerProvider.cjs.map +1 -1
  8. package/dist/cjs/client/format/index.cjs +17 -50
  9. package/dist/cjs/client/format/useCompact.cjs +29 -39
  10. package/dist/cjs/client/format/useCompact.cjs.map +1 -1
  11. package/dist/cjs/client/format/useCurrency.cjs +43 -39
  12. package/dist/cjs/client/format/useCurrency.cjs.map +1 -1
  13. package/dist/cjs/client/format/useDate.cjs +45 -36
  14. package/dist/cjs/client/format/useDate.cjs.map +1 -1
  15. package/dist/cjs/client/format/useList.cjs +40 -39
  16. package/dist/cjs/client/format/useList.cjs.map +1 -1
  17. package/dist/cjs/client/format/useNumber.cjs +41 -39
  18. package/dist/cjs/client/format/useNumber.cjs.map +1 -1
  19. package/dist/cjs/client/format/usePercentage.cjs +37 -39
  20. package/dist/cjs/client/format/usePercentage.cjs.map +1 -1
  21. package/dist/cjs/client/format/useRelativeTime.cjs +37 -39
  22. package/dist/cjs/client/format/useRelativeTime.cjs.map +1 -1
  23. package/dist/cjs/client/format/useUnit.cjs +36 -39
  24. package/dist/cjs/client/format/useUnit.cjs.map +1 -1
  25. package/dist/cjs/client/index.cjs +29 -69
  26. package/dist/cjs/client/t.cjs +21 -34
  27. package/dist/cjs/client/t.cjs.map +1 -1
  28. package/dist/cjs/client/useContent.cjs +16 -36
  29. package/dist/cjs/client/useContent.cjs.map +1 -1
  30. package/dist/cjs/client/useDictionary.cjs +26 -36
  31. package/dist/cjs/client/useDictionary.cjs.map +1 -1
  32. package/dist/cjs/client/useDictionaryAsync.cjs +23 -52
  33. package/dist/cjs/client/useDictionaryAsync.cjs.map +1 -1
  34. package/dist/cjs/client/useDictionaryDynamic.cjs +22 -42
  35. package/dist/cjs/client/useDictionaryDynamic.cjs.map +1 -1
  36. package/dist/cjs/client/useIntlayer.cjs +26 -36
  37. package/dist/cjs/client/useIntlayer.cjs.map +1 -1
  38. package/dist/cjs/client/useLoadDynamic.cjs +21 -50
  39. package/dist/cjs/client/useLoadDynamic.cjs.map +1 -1
  40. package/dist/cjs/client/useLocale.cjs +36 -67
  41. package/dist/cjs/client/useLocale.cjs.map +1 -1
  42. package/dist/cjs/client/useLocaleBase.cjs +25 -53
  43. package/dist/cjs/client/useLocaleBase.cjs.map +1 -1
  44. package/dist/cjs/client/useLocaleStorage.cjs +60 -0
  45. package/dist/cjs/client/useLocaleStorage.cjs.map +1 -0
  46. package/dist/cjs/client/useTraduction.cjs +34 -35
  47. package/dist/cjs/client/useTraduction.cjs.map +1 -1
  48. package/dist/cjs/editor/CommunicatorContext.cjs +40 -62
  49. package/dist/cjs/editor/CommunicatorContext.cjs.map +1 -1
  50. package/dist/cjs/editor/ConfigurationContext.cjs +26 -47
  51. package/dist/cjs/editor/ConfigurationContext.cjs.map +1 -1
  52. package/dist/cjs/editor/ContentSelectorWrapper.cjs +58 -94
  53. package/dist/cjs/editor/ContentSelectorWrapper.cjs.map +1 -1
  54. package/dist/cjs/editor/DictionariesRecordContext.cjs +47 -73
  55. package/dist/cjs/editor/DictionariesRecordContext.cjs.map +1 -1
  56. package/dist/cjs/editor/EditedContentContext.cjs +160 -211
  57. package/dist/cjs/editor/EditedContentContext.cjs.map +1 -1
  58. package/dist/cjs/editor/EditorEnabledContext.cjs +34 -59
  59. package/dist/cjs/editor/EditorEnabledContext.cjs.map +1 -1
  60. package/dist/cjs/editor/EditorProvider.cjs +62 -66
  61. package/dist/cjs/editor/EditorProvider.cjs.map +1 -1
  62. package/dist/cjs/editor/FocusDictionaryContext.cjs +51 -75
  63. package/dist/cjs/editor/FocusDictionaryContext.cjs.map +1 -1
  64. package/dist/cjs/editor/IntlayerEditorProvider.cjs +45 -94
  65. package/dist/cjs/editor/IntlayerEditorProvider.cjs.map +1 -1
  66. package/dist/cjs/editor/index.cjs +3 -23
  67. package/dist/cjs/editor/useCrossFrameMessageListener.cjs +73 -50
  68. package/dist/cjs/editor/useCrossFrameMessageListener.cjs.map +1 -1
  69. package/dist/cjs/editor/useCrossFrameState.cjs +106 -73
  70. package/dist/cjs/editor/useCrossFrameState.cjs.map +1 -1
  71. package/dist/cjs/editor/useCrossURLPathState.cjs +67 -66
  72. package/dist/cjs/editor/useCrossURLPathState.cjs.map +1 -1
  73. package/dist/cjs/editor/useEditedContentRenderer.cjs +27 -59
  74. package/dist/cjs/editor/useEditedContentRenderer.cjs.map +1 -1
  75. package/dist/cjs/editor/useIframeClickInterceptor.cjs +24 -47
  76. package/dist/cjs/editor/useIframeClickInterceptor.cjs.map +1 -1
  77. package/dist/cjs/getDictionary.cjs +15 -40
  78. package/dist/cjs/getDictionary.cjs.map +1 -1
  79. package/dist/cjs/getIntlayer.cjs +15 -36
  80. package/dist/cjs/getIntlayer.cjs.map +1 -1
  81. package/dist/cjs/index.cjs +30 -62
  82. package/dist/cjs/markdown/MarkdownProvider.cjs +19 -39
  83. package/dist/cjs/markdown/MarkdownProvider.cjs.map +1 -1
  84. package/dist/cjs/markdown/MarkdownRenderer.cjs +39 -80
  85. package/dist/cjs/markdown/MarkdownRenderer.cjs.map +1 -1
  86. package/dist/cjs/markdown/index.cjs +7 -25
  87. package/dist/cjs/plugins.cjs +97 -119
  88. package/dist/cjs/plugins.cjs.map +1 -1
  89. package/dist/cjs/preactElement/renderPreactElement.cjs +34 -59
  90. package/dist/cjs/preactElement/renderPreactElement.cjs.map +1 -1
  91. package/dist/esm/IntlayerNode.mjs +13 -25
  92. package/dist/esm/IntlayerNode.mjs.map +1 -1
  93. package/dist/esm/UI/ContentSelector.mjs +94 -105
  94. package/dist/esm/UI/ContentSelector.mjs.map +1 -1
  95. package/dist/esm/client/IntlayerProvider.mjs +51 -54
  96. package/dist/esm/client/IntlayerProvider.mjs.map +1 -1
  97. package/dist/esm/client/format/index.mjs +2 -11
  98. package/dist/esm/client/format/useCompact.mjs +24 -13
  99. package/dist/esm/client/format/useCompact.mjs.map +1 -1
  100. package/dist/esm/client/format/useCurrency.mjs +38 -13
  101. package/dist/esm/client/format/useCurrency.mjs.map +1 -1
  102. package/dist/esm/client/format/useDate.mjs +40 -10
  103. package/dist/esm/client/format/useDate.mjs.map +1 -1
  104. package/dist/esm/client/format/useList.mjs +35 -13
  105. package/dist/esm/client/format/useList.mjs.map +1 -1
  106. package/dist/esm/client/format/useNumber.mjs +36 -13
  107. package/dist/esm/client/format/useNumber.mjs.map +1 -1
  108. package/dist/esm/client/format/usePercentage.mjs +32 -13
  109. package/dist/esm/client/format/usePercentage.mjs.map +1 -1
  110. package/dist/esm/client/format/useRelativeTime.mjs +32 -13
  111. package/dist/esm/client/format/useRelativeTime.mjs.map +1 -1
  112. package/dist/esm/client/format/useUnit.mjs +31 -13
  113. package/dist/esm/client/format/useUnit.mjs.map +1 -1
  114. package/dist/esm/client/index.mjs +5 -32
  115. package/dist/esm/client/t.mjs +16 -8
  116. package/dist/esm/client/t.mjs.map +1 -1
  117. package/dist/esm/client/useContent.mjs +14 -10
  118. package/dist/esm/client/useContent.mjs.map +1 -1
  119. package/dist/esm/client/useDictionary.mjs +23 -11
  120. package/dist/esm/client/useDictionary.mjs.map +1 -1
  121. package/dist/esm/client/useDictionaryAsync.mjs +18 -16
  122. package/dist/esm/client/useDictionaryAsync.mjs.map +1 -1
  123. package/dist/esm/client/useDictionaryDynamic.mjs +17 -15
  124. package/dist/esm/client/useDictionaryDynamic.mjs.map +1 -1
  125. package/dist/esm/client/useIntlayer.mjs +23 -11
  126. package/dist/esm/client/useIntlayer.mjs.map +1 -1
  127. package/dist/esm/client/useLoadDynamic.mjs +20 -26
  128. package/dist/esm/client/useLoadDynamic.mjs.map +1 -1
  129. package/dist/esm/client/useLocale.mjs +31 -31
  130. package/dist/esm/client/useLocale.mjs.map +1 -1
  131. package/dist/esm/client/useLocaleBase.mjs +19 -16
  132. package/dist/esm/client/useLocaleBase.mjs.map +1 -1
  133. package/dist/esm/client/useLocaleStorage.mjs +52 -0
  134. package/dist/esm/client/useLocaleStorage.mjs.map +1 -0
  135. package/dist/esm/client/useTraduction.mjs +29 -9
  136. package/dist/esm/client/useTraduction.mjs.map +1 -1
  137. package/dist/esm/editor/CommunicatorContext.mjs +28 -24
  138. package/dist/esm/editor/CommunicatorContext.mjs.map +1 -1
  139. package/dist/esm/editor/ConfigurationContext.mjs +20 -24
  140. package/dist/esm/editor/ConfigurationContext.mjs.map +1 -1
  141. package/dist/esm/editor/ContentSelectorWrapper.mjs +50 -70
  142. package/dist/esm/editor/ContentSelectorWrapper.mjs.map +1 -1
  143. package/dist/esm/editor/DictionariesRecordContext.mjs +37 -47
  144. package/dist/esm/editor/DictionariesRecordContext.mjs.map +1 -1
  145. package/dist/esm/editor/EditedContentContext.mjs +146 -187
  146. package/dist/esm/editor/EditedContentContext.mjs.map +1 -1
  147. package/dist/esm/editor/EditorEnabledContext.mjs +23 -33
  148. package/dist/esm/editor/EditorEnabledContext.mjs.map +1 -1
  149. package/dist/esm/editor/EditorProvider.mjs +57 -54
  150. package/dist/esm/editor/EditorProvider.mjs.map +1 -1
  151. package/dist/esm/editor/FocusDictionaryContext.mjs +42 -49
  152. package/dist/esm/editor/FocusDictionaryContext.mjs.map +1 -1
  153. package/dist/esm/editor/IntlayerEditorProvider.mjs +37 -55
  154. package/dist/esm/editor/IntlayerEditorProvider.mjs.map +1 -1
  155. package/dist/esm/editor/index.mjs +3 -2
  156. package/dist/esm/editor/useCrossFrameMessageListener.mjs +68 -24
  157. package/dist/esm/editor/useCrossFrameMessageListener.mjs.map +1 -1
  158. package/dist/esm/editor/useCrossFrameState.mjs +102 -47
  159. package/dist/esm/editor/useCrossFrameState.mjs.map +1 -1
  160. package/dist/esm/editor/useCrossURLPathState.mjs +60 -40
  161. package/dist/esm/editor/useCrossURLPathState.mjs.map +1 -1
  162. package/dist/esm/editor/useEditedContentRenderer.mjs +23 -33
  163. package/dist/esm/editor/useEditedContentRenderer.mjs.map +1 -1
  164. package/dist/esm/editor/useIframeClickInterceptor.mjs +18 -20
  165. package/dist/esm/editor/useIframeClickInterceptor.mjs.map +1 -1
  166. package/dist/esm/getDictionary.mjs +13 -22
  167. package/dist/esm/getDictionary.mjs.map +1 -1
  168. package/dist/esm/getIntlayer.mjs +13 -18
  169. package/dist/esm/getIntlayer.mjs.map +1 -1
  170. package/dist/esm/index.mjs +13 -39
  171. package/dist/esm/markdown/MarkdownProvider.mjs +14 -16
  172. package/dist/esm/markdown/MarkdownProvider.mjs.map +1 -1
  173. package/dist/esm/markdown/MarkdownRenderer.mjs +34 -57
  174. package/dist/esm/markdown/MarkdownRenderer.mjs.map +1 -1
  175. package/dist/esm/markdown/index.mjs +4 -3
  176. package/dist/esm/plugins.mjs +86 -92
  177. package/dist/esm/plugins.mjs.map +1 -1
  178. package/dist/esm/preactElement/renderPreactElement.mjs +31 -34
  179. package/dist/esm/preactElement/renderPreactElement.mjs.map +1 -1
  180. package/dist/types/IntlayerNode.d.ts +19 -12
  181. package/dist/types/IntlayerNode.d.ts.map +1 -1
  182. package/dist/types/UI/ContentSelector.d.ts +12 -9
  183. package/dist/types/UI/ContentSelector.d.ts.map +1 -1
  184. package/dist/types/client/IntlayerProvider.d.ts +22 -16
  185. package/dist/types/client/IntlayerProvider.d.ts.map +1 -1
  186. package/dist/types/client/format/index.d.ts +9 -9
  187. package/dist/types/client/format/useCompact.d.ts +8 -2
  188. package/dist/types/client/format/useCompact.d.ts.map +1 -1
  189. package/dist/types/client/format/useCurrency.d.ts +8 -2
  190. package/dist/types/client/format/useCurrency.d.ts.map +1 -1
  191. package/dist/types/client/format/useDate.d.ts +7 -2
  192. package/dist/types/client/format/useDate.d.ts.map +1 -1
  193. package/dist/types/client/format/useList.d.ts +8 -2
  194. package/dist/types/client/format/useList.d.ts.map +1 -1
  195. package/dist/types/client/format/useNumber.d.ts +8 -2
  196. package/dist/types/client/format/useNumber.d.ts.map +1 -1
  197. package/dist/types/client/format/usePercentage.d.ts +8 -2
  198. package/dist/types/client/format/usePercentage.d.ts.map +1 -1
  199. package/dist/types/client/format/useRelativeTime.d.ts +9 -3
  200. package/dist/types/client/format/useRelativeTime.d.ts.map +1 -1
  201. package/dist/types/client/format/useUnit.d.ts +8 -2
  202. package/dist/types/client/format/useUnit.d.ts.map +1 -1
  203. package/dist/types/client/index.d.ts +11 -12
  204. package/dist/types/client/t.d.ts +7 -3
  205. package/dist/types/client/t.d.ts.map +1 -1
  206. package/dist/types/client/useContent.d.ts +10 -5
  207. package/dist/types/client/useContent.d.ts.map +1 -1
  208. package/dist/types/client/useDictionary.d.ts +9 -3
  209. package/dist/types/client/useDictionary.d.ts.map +1 -1
  210. package/dist/types/client/useDictionaryAsync.d.ts +7 -3
  211. package/dist/types/client/useDictionaryAsync.d.ts.map +1 -1
  212. package/dist/types/client/useDictionaryDynamic.d.ts +9 -3
  213. package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
  214. package/dist/types/client/useIntlayer.d.ts +8 -5
  215. package/dist/types/client/useIntlayer.d.ts.map +1 -1
  216. package/dist/types/client/useLoadDynamic.d.ts +4 -1
  217. package/dist/types/client/useLoadDynamic.d.ts.map +1 -1
  218. package/dist/types/client/useLocale.d.ts +16 -8
  219. package/dist/types/client/useLocale.d.ts.map +1 -1
  220. package/dist/types/client/useLocaleBase.d.ts +10 -5
  221. package/dist/types/client/useLocaleBase.d.ts.map +1 -1
  222. package/dist/types/client/useLocaleStorage.d.ts +45 -0
  223. package/dist/types/client/useLocaleStorage.d.ts.map +1 -0
  224. package/dist/types/client/useTraduction.d.ts +7 -2
  225. package/dist/types/client/useTraduction.d.ts.map +1 -1
  226. package/dist/types/editor/CommunicatorContext.d.ts +15 -11
  227. package/dist/types/editor/CommunicatorContext.d.ts.map +1 -1
  228. package/dist/types/editor/ConfigurationContext.d.ts +12 -7
  229. package/dist/types/editor/ConfigurationContext.d.ts.map +1 -1
  230. package/dist/types/editor/ContentSelectorWrapper.d.ts +8 -4
  231. package/dist/types/editor/ContentSelectorWrapper.d.ts.map +1 -1
  232. package/dist/types/editor/DictionariesRecordContext.d.ts +15 -12
  233. package/dist/types/editor/DictionariesRecordContext.d.ts.map +1 -1
  234. package/dist/types/editor/EditedContentContext.d.ts +32 -29
  235. package/dist/types/editor/EditedContentContext.d.ts.map +1 -1
  236. package/dist/types/editor/EditorEnabledContext.d.ts +14 -9
  237. package/dist/types/editor/EditorEnabledContext.d.ts.map +1 -1
  238. package/dist/types/editor/EditorProvider.d.ts +9 -5
  239. package/dist/types/editor/EditorProvider.d.ts.map +1 -1
  240. package/dist/types/editor/FocusDictionaryContext.d.ts +18 -15
  241. package/dist/types/editor/FocusDictionaryContext.d.ts.map +1 -1
  242. package/dist/types/editor/IntlayerEditorProvider.d.ts +7 -3
  243. package/dist/types/editor/IntlayerEditorProvider.d.ts.map +1 -1
  244. package/dist/types/editor/index.d.ts +2 -2
  245. package/dist/types/editor/useCrossFrameMessageListener.d.ts +7 -2
  246. package/dist/types/editor/useCrossFrameMessageListener.d.ts.map +1 -1
  247. package/dist/types/editor/useCrossFrameState.d.ts +11 -7
  248. package/dist/types/editor/useCrossFrameState.d.ts.map +1 -1
  249. package/dist/types/editor/useCrossURLPathState.d.ts +8 -3
  250. package/dist/types/editor/useCrossURLPathState.d.ts.map +1 -1
  251. package/dist/types/editor/useEditedContentRenderer.d.ts +16 -10
  252. package/dist/types/editor/useEditedContentRenderer.d.ts.map +1 -1
  253. package/dist/types/editor/useIframeClickInterceptor.d.ts +5 -2
  254. package/dist/types/editor/useIframeClickInterceptor.d.ts.map +1 -1
  255. package/dist/types/getDictionary.d.ts +8 -4
  256. package/dist/types/getDictionary.d.ts.map +1 -1
  257. package/dist/types/getIntlayer.d.ts +8 -4
  258. package/dist/types/getIntlayer.d.ts.map +1 -1
  259. package/dist/types/index.d.ts +18 -6
  260. package/dist/types/index.d.ts.map +1 -1
  261. package/dist/types/markdown/MarkdownProvider.d.ts +8 -5
  262. package/dist/types/markdown/MarkdownProvider.d.ts.map +1 -1
  263. package/dist/types/markdown/MarkdownRenderer.d.ts +13 -11
  264. package/dist/types/markdown/MarkdownRenderer.d.ts.map +1 -1
  265. package/dist/types/markdown/index.d.ts +3 -3
  266. package/dist/types/plugins.d.ts +33 -27
  267. package/dist/types/plugins.d.ts.map +1 -1
  268. package/dist/types/preactElement/renderPreactElement.d.ts +7 -3
  269. package/dist/types/preactElement/renderPreactElement.d.ts.map +1 -1
  270. package/package.json +40 -46
  271. package/LICENSE +0 -202
  272. package/dist/cjs/client/format/index.cjs.map +0 -1
  273. package/dist/cjs/client/getBrowserLocale.cjs +0 -173
  274. package/dist/cjs/client/getBrowserLocale.cjs.map +0 -1
  275. package/dist/cjs/client/index.cjs.map +0 -1
  276. package/dist/cjs/client/useLocaleCookie.cjs +0 -60
  277. package/dist/cjs/client/useLocaleCookie.cjs.map +0 -1
  278. package/dist/cjs/editor/index.cjs.map +0 -1
  279. package/dist/cjs/index.cjs.map +0 -1
  280. package/dist/cjs/markdown/index.cjs.map +0 -1
  281. package/dist/esm/client/format/index.mjs.map +0 -1
  282. package/dist/esm/client/getBrowserLocale.mjs +0 -138
  283. package/dist/esm/client/getBrowserLocale.mjs.map +0 -1
  284. package/dist/esm/client/index.mjs.map +0 -1
  285. package/dist/esm/client/useLocaleCookie.mjs +0 -24
  286. package/dist/esm/client/useLocaleCookie.mjs.map +0 -1
  287. package/dist/esm/editor/index.mjs.map +0 -1
  288. package/dist/esm/index.mjs.map +0 -1
  289. package/dist/esm/markdown/index.mjs.map +0 -1
  290. package/dist/types/client/format/index.d.ts.map +0 -1
  291. package/dist/types/client/getBrowserLocale.d.ts +0 -25
  292. package/dist/types/client/getBrowserLocale.d.ts.map +0 -1
  293. package/dist/types/client/index.d.ts.map +0 -1
  294. package/dist/types/client/useLocaleCookie.d.ts +0 -17
  295. package/dist/types/client/useLocaleCookie.d.ts.map +0 -1
  296. package/dist/types/editor/index.d.ts.map +0 -1
  297. package/dist/types/markdown/index.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"IntlayerProvider.d.ts","sourceRoot":"","sources":["../../../src/client/IntlayerProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,iBAAiB,EACvB,MAAM,QAAQ,CAAC;AAMhB,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,yCAIhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,qBAA0C,CAAC;AAE1E,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,iBAAiB,CACrD,qBAAqB,CA+CtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,CAMrE,CAAC"}
1
+ {"version":3,"file":"IntlayerProvider.d.ts","names":[],"sources":["../../../src/client/IntlayerProvider.tsx"],"sourcesContent":[],"mappings":";;;;;KAgBK,aAAA;UACK;yBACe;EAFpB,aAAA,CAAA,EAAa,OAAA;EAUL,eAAA,CAAA,EAAA,OAIX;AAKF,CAAA;AAEA;;;AAGkB,cAdL,qBAcK,EAdgB,OAAA,CAAA,OAchB,CAdgB,aAchB,CAAA;;;AASlB;AAoDa,cAlEA,kBAkEoC,EAAA,GAAA,GAlElB,aAkEA;KAhEnB,qBAAA;aACC;WACF;kBACO;uBACK;;;;;;;cAQV,yBAAyB,kBACpC;cAmDW,kBAAkB,kBAAkB"}
@@ -1,9 +1,9 @@
1
- export { useCompact } from './useCompact';
2
- export { useCurrency } from './useCurrency';
3
- export { useDate } from './useDate';
4
- export { useList } from './useList';
5
- export { useNumber } from './useNumber';
6
- export { usePercentage } from './usePercentage';
7
- export { useRelativeTime } from './useRelativeTime';
8
- export { useUnit } from './useUnit';
9
- //# sourceMappingURL=index.d.ts.map
1
+ import { useCompact } from "./useCompact.js";
2
+ import { useCurrency } from "./useCurrency.js";
3
+ import { useDate } from "./useDate.js";
4
+ import { useList } from "./useList.js";
5
+ import { useNumber } from "./useNumber.js";
6
+ import { usePercentage } from "./usePercentage.js";
7
+ import { useRelativeTime } from "./useRelativeTime.js";
8
+ import { useUnit } from "./useUnit.js";
9
+ export { useCompact, useCurrency, useDate, useList, useNumber, usePercentage, useRelativeTime, useUnit };
@@ -1,3 +1,7 @@
1
+ import * as intlayer18 from "intlayer";
2
+
3
+ //#region src/client/format/useCompact.d.ts
4
+
1
5
  /**
2
6
  * React client hook that provides a compact number formatter
3
7
  * bound to the current application locale.
@@ -8,7 +12,9 @@
8
12
  * formatCompact(1500); // "1.5K"
9
13
  * ```
10
14
  */
11
- export declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
12
- locale?: import("intlayer").LocalesValues;
15
+ declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
16
+ locale?: intlayer18.LocalesValues;
13
17
  }) => string;
18
+ //#endregion
19
+ export { useCompact };
14
20
  //# sourceMappingURL=useCompact.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCompact.d.ts","sourceRoot":"","sources":["../../../../src/client/format/useCompact.ts"],"names":[],"mappings":"AAMA;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU;;YAWtB,CAAC"}
1
+ {"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/client/format/useCompact.ts"],"sourcesContent":[],"mappings":";;;;;;;AAgBA;;;;;;;cAAa,qDAAU,IAAA,CAAA;WAAA,UAAA,CAAA"}
@@ -1,3 +1,7 @@
1
+ import * as intlayer13 from "intlayer";
2
+
3
+ //#region src/client/format/useCurrency.d.ts
4
+
1
5
  /**
2
6
  * React client hook that provides a currency formatter
3
7
  * bound to the current application locale.
@@ -22,7 +26,9 @@
22
26
  * // "¥9,876,543"
23
27
  * ```
24
28
  */
25
- export declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
26
- locale?: import("intlayer").LocalesValues;
29
+ declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
30
+ locale?: intlayer13.LocalesValues;
27
31
  }) => string;
32
+ //#endregion
33
+ export { useCurrency };
28
34
  //# sourceMappingURL=useCurrency.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCurrency.d.ts","sourceRoot":"","sources":["../../../../src/client/format/useCurrency.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,WAAW;;YAWvB,CAAC"}
1
+ {"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;;;;;;;;;;;;;;;;;;;;;cAAa,sDAAW,IAAA,CAAA;WAAA,UAAA,CAAA"}
@@ -1,4 +1,7 @@
1
- import { date } from '@intlayer/core';
1
+ import { date } from "@intlayer/core";
2
+
3
+ //#region src/client/format/useDate.d.ts
4
+
2
5
  /**
3
6
  * React client hook that provides a localized date/time formatter
4
7
  * bound to the current application locale.
@@ -25,5 +28,7 @@ import { date } from '@intlayer/core';
25
28
  *
26
29
  * @see createDate
27
30
  */
28
- export declare const useDate: () => (...args: Parameters<typeof date>) => string;
31
+ declare const useDate: () => (...args: Parameters<typeof date>) => string;
32
+ //#endregion
33
+ export { useDate };
29
34
  //# sourceMappingURL=useDate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDate.d.ts","sourceRoot":"","sources":["../../../../src/client/format/useDate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAItC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,OAAO,SAGV,GAAG,MAAM,UAAU,CAAC,OAAO,IAAI,CAAC,WAKzC,CAAC"}
1
+ {"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../../src/client/format/useDate.ts"],"sourcesContent":[],"mappings":";;;;;;AAgCA;;;;;;;;;;;;;;;;;;;;;;;;cAAa,yBAGM,kBAAkB"}
@@ -1,3 +1,7 @@
1
+ import * as intlayer15 from "intlayer";
2
+
3
+ //#region src/client/format/useList.d.ts
4
+
1
5
  /**
2
6
  * React client hook that provides a list formatter
3
7
  * bound to the current application locale.
@@ -19,7 +23,9 @@
19
23
  * // "1, 2 und 3"
20
24
  * ```
21
25
  */
22
- export declare const useList: () => (values: (string | number)[], options?: Intl.ListFormatOptions & {
23
- locale?: import("intlayer").LocalesValues;
26
+ declare const useList: () => (values: (string | number)[], options?: Intl.ListFormatOptions & {
27
+ locale?: intlayer15.LocalesValues;
24
28
  }) => string;
29
+ //#endregion
30
+ export { useList };
25
31
  //# sourceMappingURL=useList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useList.d.ts","sourceRoot":"","sources":["../../../../src/client/format/useList.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,OAAO;;YAWnB,CAAC"}
1
+ {"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"sourcesContent":[],"mappings":";;;;;;;AA2BA;;;;;;;;;;;;;;;;;;cAAa,uDAAO,IAAA,CAAA;WAAA,UAAA,CAAA"}
@@ -1,3 +1,7 @@
1
+ import * as intlayer19 from "intlayer";
2
+
3
+ //#region src/client/format/useNumber.d.ts
4
+
1
5
  /**
2
6
  * React client hook that provides a localized number formatter.
3
7
  *
@@ -20,7 +24,9 @@
20
24
  * @returns {(value: string | number, options?: import("../createNumber").NumberProps) => string}
21
25
  * A number formatting function bound to the active locale.
22
26
  */
23
- export declare const useNumber: () => (value: string | number, options?: Intl.NumberFormatOptions & {
24
- locale?: import("intlayer").LocalesValues;
27
+ declare const useNumber: () => (value: string | number, options?: Intl.NumberFormatOptions & {
28
+ locale?: intlayer19.LocalesValues;
25
29
  }) => string;
30
+ //#endregion
31
+ export { useNumber };
26
32
  //# sourceMappingURL=useNumber.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useNumber.d.ts","sourceRoot":"","sources":["../../../../src/client/format/useNumber.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,SAAS;;YAWrB,CAAC"}
1
+ {"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/client/format/useNumber.ts"],"sourcesContent":[],"mappings":";;;;;;;AA4BA;;;;;;;;;;;;;;;;;;;cAAa,oDAAS,IAAA,CAAA;WAAA,UAAA,CAAA"}
@@ -1,3 +1,7 @@
1
+ import * as intlayer17 from "intlayer";
2
+
3
+ //#region src/client/format/usePercentage.d.ts
4
+
1
5
  /**
2
6
  * React hook to provide a percentage formatter function
3
7
  * based on the current application locale.
@@ -16,7 +20,9 @@
16
20
  * @returns {(value: string | number, options?: Omit<PercentageOptions, "value">) => string}
17
21
  * A function that formats numbers or numeric strings into localized percentages.
18
22
  */
19
- export declare const usePercentage: () => (value: string | number, options?: Intl.NumberFormatOptions & {
20
- locale?: import("intlayer").LocalesValues;
23
+ declare const usePercentage: () => (value: string | number, options?: Intl.NumberFormatOptions & {
24
+ locale?: intlayer17.LocalesValues;
21
25
  }) => string;
26
+ //#endregion
27
+ export { usePercentage };
22
28
  //# sourceMappingURL=usePercentage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePercentage.d.ts","sourceRoot":"","sources":["../../../../src/client/format/usePercentage.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa;;YAWzB,CAAC"}
1
+ {"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/client/format/usePercentage.ts"],"sourcesContent":[],"mappings":";;;;;;;AAwBA;;;;;;;;;;;;;;;cAAa,wDAAa,IAAA,CAAA;WAAA,UAAA,CAAA"}
@@ -1,3 +1,7 @@
1
+ import * as intlayer14 from "intlayer";
2
+
3
+ //#region src/client/format/useRelativeTime.d.ts
4
+
1
5
  /**
2
6
  * Client-side React hook for accessing a localized relative time formatter.
3
7
  *
@@ -16,8 +20,10 @@
16
20
  * @returns {ReturnType<typeof createRelativeTime>} A relative time formatting function
17
21
  * bound to the current client locale.
18
22
  */
19
- export declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
20
- locale?: import("intlayer").LocalesValues;
21
- unit?: Intl.RelativeTimeFormatUnit;
23
+ declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
24
+ locale?: intlayer14.LocalesValues;
25
+ unit?: Intl.RelativeTimeFormatUnit;
22
26
  }) => string;
27
+ //#endregion
28
+ export { useRelativeTime };
23
29
  //# sourceMappingURL=useRelativeTime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRelativeTime.d.ts","sourceRoot":"","sources":["../../../../src/client/format/useRelativeTime.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe;;;YAW3B,CAAC"}
1
+ {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/client/format/useRelativeTime.ts"],"sourcesContent":[],"mappings":";;;;;;;AAwBA;;;;;;;;;;;;;;;cAAa,gDAAe,6BAAA,gBAAA,IAAA,CAAA;WAAA,UAAA,CAAA"}
@@ -1,3 +1,7 @@
1
+ import * as intlayer16 from "intlayer";
2
+
3
+ //#region src/client/format/useUnit.d.ts
4
+
1
5
  /**
2
6
  * React hook that provides a unit formatting function
3
7
  * based on the current locale from {@link useLocaleBase}.
@@ -15,7 +19,9 @@
15
19
  *
16
20
  * @returns {Function} A unit formatting function that accepts a value and optional formatting options.
17
21
  */
18
- export declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
19
- locale?: import("intlayer").LocalesValues;
22
+ declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
23
+ locale?: intlayer16.LocalesValues;
20
24
  }) => string;
25
+ //#endregion
26
+ export { useUnit };
21
27
  //# sourceMappingURL=useUnit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useUnit.d.ts","sourceRoot":"","sources":["../../../../src/client/format/useUnit.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO;;YAWnB,CAAC"}
1
+ {"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/client/format/useUnit.ts"],"sourcesContent":[],"mappings":";;;;;;;AAuBA;;;;;;;;;;;;;;cAAa,kDAAO,IAAA,CAAA;WAAA,UAAA,CAAA"}
@@ -1,12 +1,11 @@
1
- export { getBrowserLocale } from './getBrowserLocale';
2
- export { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, useIntlayerContext, type IntlayerProviderProps, } from './IntlayerProvider';
3
- export { t } from './t';
4
- export { useDictionary } from './useDictionary';
5
- export { useDictionaryAsync } from './useDictionaryAsync';
6
- export { useDictionaryDynamic } from './useDictionaryDynamic';
7
- export { useIntlayer } from './useIntlayer';
8
- export { useLoadDynamic } from './useLoadDynamic';
9
- export { useLocale } from './useLocale';
10
- export { useLocaleBase } from './useLocaleBase';
11
- export { localeCookie, setLocaleCookie, useLocaleCookie, } from './useLocaleCookie';
12
- //# sourceMappingURL=index.d.ts.map
1
+ import { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, IntlayerProviderProps, useIntlayerContext } from "./IntlayerProvider.js";
2
+ import { t } from "./t.js";
3
+ import { useDictionary } from "./useDictionary.js";
4
+ import { useDictionaryAsync } from "./useDictionaryAsync.js";
5
+ import { useDictionaryDynamic } from "./useDictionaryDynamic.js";
6
+ import { useIntlayer } from "./useIntlayer.js";
7
+ import { useLoadDynamic } from "./useLoadDynamic.js";
8
+ import { useLocale } from "./useLocale.js";
9
+ import { useLocaleBase } from "./useLocaleBase.js";
10
+ import { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage } from "./useLocaleStorage.js";
11
+ export { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, type IntlayerProviderProps, localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, t, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useIntlayerContext, useLoadDynamic, useLocale, useLocaleBase, useLocaleCookie, useLocaleStorage };
@@ -1,9 +1,13 @@
1
- import type { Locales } from '@intlayer/config/client';
2
- import { type LanguageContent } from '@intlayer/core';
1
+ import { Locale, StrictModeLocaleMap } from "@intlayer/types";
2
+
3
+ //#region src/client/t.d.ts
4
+
3
5
  /**
4
6
  * On the client side, this function returns the translation of the provided multilang content.
5
7
  *
6
8
  * If the locale is not provided, it will use the locale from the client context
7
9
  */
8
- export declare const t: <Content = string>(multilangContent: LanguageContent<Content>, locale?: Locales) => Content;
10
+ declare const t: <Content = string>(multilangContent: StrictModeLocaleMap<Content>, locale?: Locale) => Content;
11
+ //#endregion
12
+ export { t };
9
13
  //# sourceMappingURL=t.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"t.d.ts","sourceRoot":"","sources":["../../../src/client/t.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAItE;;;;GAIG;AACH,eAAO,MAAM,CAAC,GAAI,OAAO,GAAG,MAAM,EAChC,kBAAkB,eAAe,CAAC,OAAO,CAAC,EAC1C,SAAS,OAAO,YAMjB,CAAC"}
1
+ {"version":3,"file":"t.d.ts","names":[],"sources":["../../../src/client/t.ts"],"sourcesContent":[],"mappings":";;;;;;AAYA;;;AAEW,cAFE,CAEF,EAAA,CAAA,UAAA,MAAA,CAAA,CAAA,gBAAA,EADS,mBACT,CAD6B,OAC7B,CAAA,EAAA,MAAA,CAAA,EAAA,MAAA,EAAA,GAAM,OAAN"}
@@ -1,10 +1,15 @@
1
- import type { LanguageContent } from '@intlayer/core';
1
+ import { StrictModeLocaleMap } from "@intlayer/types";
2
+ import * as intlayer2 from "intlayer";
3
+
4
+ //#region src/client/useContent.d.ts
2
5
  /**
3
6
  * On the client side, hook to get the translation content based on the locale
4
7
  */
5
- export declare const useContent: <Content>(languageContent: LanguageContent<Content>) => {
6
- locale: import("intlayer").LocalesValues;
7
- content: Content;
8
- t: <Content_1 = string>(languageContent: LanguageContent<Content_1>) => Content_1;
8
+ declare const useContent: <Content>(languageContent: StrictModeLocaleMap<Content>) => {
9
+ locale: intlayer2.Locale | (string & {});
10
+ content: Content;
11
+ t: <Content_1 = string>(languageContent: StrictModeLocaleMap<Content_1>) => Content_1;
9
12
  };
13
+ //#endregion
14
+ export { useContent };
10
15
  //# sourceMappingURL=useContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useContent.d.ts","sourceRoot":"","sources":["../../../src/client/useContent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,EAChC,iBAAiB,eAAe,CAAC,OAAO,CAAC;;;;CAW1C,CAAC"}
1
+ {"version":3,"file":"useContent.d.ts","names":[],"sources":["../../../src/client/useContent.ts"],"sourcesContent":[],"mappings":";;;;;;;AAOa,cAAA,UAYZ,EAAA,CAAA,OAAA,CAAA,CAAA,eAAA,EAXkB,mBAWlB,CAXsC,OAWtC,CAAA,EAAA,GAAA;EAXsC,MAAA,EAAD,SAAA,CAAA,MAAA,GAAC,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA;EAApB,OAAA,SAAA;EAAmB,CAAA,EAAA,CAAA,YAAA,MAAA,CAAA,CAAA,eAAA,qBAAA,UAAA,CAAA,EAAA,YAAA"}
@@ -1,9 +1,15 @@
1
- import type { LocalesValues } from '@intlayer/config/client';
2
- import type { Dictionary } from '@intlayer/core';
1
+ import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
2
+ import * as _intlayer_core0 from "@intlayer/core";
3
+ import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
4
+ import * as intlayer11 from "intlayer";
5
+
6
+ //#region src/client/useDictionary.d.ts
3
7
  /**
4
8
  * On the server side, Hook that transform a dictionary and return the content
5
9
  *
6
10
  * If the locale is not provided, it will use the locale from the client context
7
11
  */
8
- export declare const useDictionary: <T extends Dictionary>(dictionary: T, locale?: LocalesValues) => import("@intlayer/core").DeepTransformContent<T["content"], import("../plugins").IInterpreterPluginState>;
12
+ declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, intlayer11.Locale>;
13
+ //#endregion
14
+ export { useDictionary };
9
15
  //# sourceMappingURL=useDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionary.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAKjD;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,UAAU,EAChD,YAAY,CAAC,EACb,SAAS,aAAa,8GASvB,CAAC"}
1
+ {"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/client/useDictionary.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAgBa,cAAA,aAcZ,EAAA,CAAA,UAbW,UAaX,EAAA,UAZW,aAYX,GAZ2B,eAY3B,CAAA,CAAA,UAAA,EAVa,CAUb,EAAA,MAAA,CAAA,EATU,CASV,EAAA,GATW,eAAA,CAAA,oBASX,CATW,CASX,CAAA,SAAA,CAAA,EATW,yBAAA,EAAA,UAAA,CAAA,MAAA,CASX"}
@@ -1,9 +1,13 @@
1
- import type { LocalesValues } from '@intlayer/config/client';
2
- import type { Dictionary, LanguageContent } from '@intlayer/core';
1
+ import { Dictionary, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
2
+
3
+ //#region src/client/useDictionaryAsync.d.ts
4
+
3
5
  /**
4
6
  * On the server side, Hook that transform a dictionary and return the content
5
7
  *
6
8
  * If the locale is not provided, it will use the locale from the client context
7
9
  */
8
- export declare const useDictionaryAsync: <T extends Dictionary>(dictionaryPromise: LanguageContent<() => Promise<T>>, locale?: LocalesValues) => Promise<T>;
10
+ declare const useDictionaryAsync: <T extends Dictionary>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: LocalesValues) => Promise<T>;
11
+ //#endregion
12
+ export { useDictionaryAsync };
9
13
  //# sourceMappingURL=useDictionaryAsync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionaryAsync.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionaryAsync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKlE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAU,CAAC,SAAS,UAAU,EAC3D,mBAAmB,eAAe,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,EACpD,SAAS,aAAa,KACrB,OAAO,CAAC,CAAC,CAoBX,CAAC"}
1
+ {"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/client/useDictionaryAsync.ts"],"sourcesContent":[],"mappings":";;;;;;AAiBA;;;AAC+C,cADlC,kBACkC,EAAA,CAAA,UADI,UACJ,CAAA,CAAA,iBAAA,EAA1B,mBAA0B,CAAA,GAAA,GAAA,OAAA,CAAQ,CAAR,CAAA,CAAA,EAAA,MAAA,CAAA,EACpC,aADoC,EAAA,GAE5C,OAF4C,CAEpC,CAFoC,CAAA"}
@@ -1,9 +1,15 @@
1
- import type { LocalesValues } from '@intlayer/config/client';
2
- import type { Dictionary, DictionaryKeys, LanguageContent } from '@intlayer/core';
1
+ import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
2
+ import * as _intlayer_core0 from "@intlayer/core";
3
+ import { Dictionary, DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
4
+ import * as intlayer12 from "intlayer";
5
+
6
+ //#region src/client/useDictionaryDynamic.d.ts
3
7
  /**
4
8
  * On the server side, Hook that transform a dictionary and return the content
5
9
  *
6
10
  * If the locale is not provided, it will use the locale from the client context
7
11
  */
8
- export declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: LanguageContent<() => Promise<T>>, key: K, locale?: LocalesValues) => import("@intlayer/core").DeepTransformContent<T["content"], import("../plugins").IInterpreterPluginState>;
12
+ declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, intlayer12.Locale>;
13
+ //#endregion
14
+ export { useDictionaryDynamic };
9
15
  //# sourceMappingURL=useDictionaryDynamic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionaryDynamic.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionaryDynamic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAMxB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,cAAc,EAExB,mBAAmB,eAAe,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,EACpD,KAAK,CAAC,EACN,SAAS,aAAa,8GAcvB,CAAC"}
1
+ {"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAkBa,cAAA,oBAoBZ,EAAA,CAAA,UAnBW,UAmBX,EAAA,UAlBW,cAkBX,CAAA,CAAA,iBAAA,EAhBoB,mBAgBpB,CAAA,GAAA,GAhB8C,OAgB9C,CAhBsD,CAgBtD,CAAA,CAAA,EAAA,GAAA,EAfM,CAeN,EAAA,MAAA,CAAA,EAdU,aAcV,EAAA,GAduB,eAAA,CAAA,oBAcvB,CAduB,CAcvB,CAAA,SAAA,CAAA,EAduB,yBAAA,EAAA,UAAA,CAAA,MAAA,CAcvB"}
@@ -1,11 +1,14 @@
1
- import type { LocalesValues } from '@intlayer/config/client';
2
- import type { DictionaryKeys } from '@intlayer/core';
3
- import type { IntlayerDictionaryTypesConnector } from 'intlayer';
4
- import type { DeepTransformContent } from '../plugins';
1
+ import { DeepTransformContent } from "../plugins.js";
2
+ import { DictionaryKeys, DictionaryRegistryContent, LocalesValues } from "@intlayer/types";
3
+
4
+ //#region src/client/useIntlayer.d.ts
5
+
5
6
  /**
6
7
  * On the client side, Hook that picking one dictionary by its key and return the content
7
8
  *
8
9
  * If the locale is not provided, it will use the locale from the client context
9
10
  */
10
- export declare const useIntlayer: <T extends DictionaryKeys>(key: T, locale?: LocalesValues) => DeepTransformContent<IntlayerDictionaryTypesConnector[T]["content"]>;
11
+ declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues>(key: T, locale?: L) => DeepTransformContent<DictionaryRegistryContent<T>>;
12
+ //#endregion
13
+ export { useIntlayer };
11
14
  //# sourceMappingURL=useIntlayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIntlayer.d.ts","sourceRoot":"","sources":["../../../src/client/useIntlayer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAGjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAGvD;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,cAAc,EAClD,KAAK,CAAC,EACN,SAAS,aAAa,KACrB,oBAAoB,CAAC,gCAAgC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAQrE,CAAC"}
1
+ {"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"sourcesContent":[],"mappings":";;;;;;;AAiBA;;;AACO,cADM,WACN,EAAA,CAAA,UAD+B,cAC/B,EAAA,UADyD,aACzD,CAAA,CAAA,GAAA,EAAA,CAAA,EAAA,MAAA,CAAA,EACI,CADJ,EAAA,GACK,oBADL,CACK,yBADL,CACK,CADL,CAAA,CAAA"}
@@ -1,2 +1,5 @@
1
- export declare const useLoadDynamic: <T>(key: string, promise: Promise<T>) => T;
1
+ //#region src/client/useLoadDynamic.d.ts
2
+ declare const useLoadDynamic: <T>(key: string, promise: Promise<T>) => T;
3
+ //#endregion
4
+ export { useLoadDynamic };
2
5
  //# sourceMappingURL=useLoadDynamic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLoadDynamic.d.ts","sourceRoot":"","sources":["../../../src/client/useLoadDynamic.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,cAAc,GAAI,CAAC,EAAE,KAAK,MAAM,EAAE,SAAS,OAAO,CAAC,CAAC,CAAC,KAAG,CAMpE,CAAC"}
1
+ {"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"sourcesContent":[],"mappings":";cA2Ba,0CAA2C,QAAQ,OAAK"}
@@ -1,15 +1,23 @@
1
- import type { LocalesValues } from '@intlayer/config/client';
1
+ import { LocalesValues } from "@intlayer/types";
2
+ import * as intlayer0 from "intlayer";
3
+
4
+ //#region src/client/useLocale.d.ts
2
5
  type useLocaleProps = {
3
- onLocaleChange?: (locale: LocalesValues) => void;
6
+ isCookieEnabled?: boolean;
7
+ onLocaleChange?: (locale: LocalesValues) => void;
4
8
  };
5
9
  /**
6
10
  * On the client side, hook to get the current locale and all related fields
7
11
  */
8
- export declare const useLocale: ({ onLocaleChange }?: useLocaleProps) => {
9
- locale: LocalesValues;
10
- defaultLocale: import("intlayer").Locales;
11
- availableLocales: import("intlayer").Locales[];
12
- setLocale: (locale: LocalesValues) => void;
12
+ declare const useLocale: ({
13
+ isCookieEnabled,
14
+ onLocaleChange
15
+ }?: useLocaleProps) => {
16
+ locale: intlayer0.Locale | (string & {});
17
+ defaultLocale: intlayer0.Locale;
18
+ availableLocales: intlayer0.Locale[];
19
+ setLocale: (locale: LocalesValues) => void;
13
20
  };
14
- export {};
21
+ //#endregion
22
+ export { useLocale };
15
23
  //# sourceMappingURL=useLocale.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../src/client/useLocale.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAK7D,KAAK,cAAc,GAAG;IACpB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,qBAAoB,cAAmB;;;;wBASpC,aAAa;CAiBzC,CAAC"}
1
+ {"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"sourcesContent":[],"mappings":";;;;KAQK,cAAA;;4BAEuB;AAPyB,CAAA;AAarD;;;AAGG,cAHU,SAGV,EAAA,CAAA;EAAA,eAAA;EAAA;AAAA,CAAA,CAAA,EAAA,cAAA,EAAA,GAAA;EAAmB,MAAA,EAAA,SAAA,CAAA,MAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA;;;EAUO,SAAA,EAAA,CAAA,MAAA,EAAA,aAAA,EAAA,GAAA,IAAA;CAAa"}
@@ -1,10 +1,15 @@
1
+ import * as intlayer3 from "intlayer";
2
+
3
+ //#region src/client/useLocaleBase.d.ts
1
4
  /**
2
5
  * On the client side, hook to get the current locale and all related fields
3
6
  */
4
- export declare const useLocaleBase: () => {
5
- locale: import("intlayer").LocalesValues;
6
- defaultLocale: import("intlayer").Locales;
7
- availableLocales: import("intlayer").Locales[];
8
- setLocale: (newLocale: import("intlayer").LocalesValues) => void;
7
+ declare const useLocaleBase: () => {
8
+ locale: intlayer3.Locale | (string & {});
9
+ defaultLocale: intlayer3.Locale;
10
+ availableLocales: intlayer3.Locale[];
11
+ setLocale: (newLocale: intlayer3.LocalesValues) => void;
9
12
  };
13
+ //#endregion
14
+ export { useLocaleBase };
10
15
  //# sourceMappingURL=useLocaleBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocaleBase.d.ts","sourceRoot":"","sources":["../../../src/client/useLocaleBase.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;CASzB,CAAC"}
1
+ {"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"sourcesContent":[],"mappings":";;;;;;AAYa,cAAA,aASZ,EAAA,GAAA,GAAA;EAAA,MAAA,EAAA,SAAA,CAAA,MAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA"}
@@ -0,0 +1,45 @@
1
+ import { LocalesValues } from "@intlayer/types";
2
+ import * as intlayer7 from "intlayer";
3
+
4
+ //#region src/client/useLocaleStorage.d.ts
5
+ /**
6
+ * Get the locale cookie
7
+ */
8
+ declare const localeInStorage: intlayer7.Locale;
9
+ /**
10
+ * @deprecated Use localeInStorage instead
11
+ *
12
+ * Get the locale cookie
13
+ */
14
+ declare const localeCookie: intlayer7.Locale;
15
+ /**
16
+ * Set the locale cookie
17
+ */
18
+ declare const setLocaleInStorage: (locale: LocalesValues, isCookieEnabled: boolean) => void;
19
+ /**
20
+ * @deprecated Use setLocaleInStorage instead
21
+ *
22
+ * Set the locale cookie
23
+ */
24
+ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean) => void;
25
+ /**
26
+ * Hook that provides the locale storage and a function to set it
27
+ */
28
+ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
29
+ getLocale: () => intlayer7.Locale;
30
+ setLocale: (locale: LocalesValues) => void;
31
+ };
32
+ /**
33
+ * @deprecated Use useLocaleStorage instead
34
+ *
35
+ * For GDPR compliance, use useLocaleStorage instead
36
+ *
37
+ * Hook that provides the locale cookie and a function to set it
38
+ */
39
+ declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
40
+ localeCookie: intlayer7.Locale;
41
+ setLocaleCookie: (locale: LocalesValues) => void;
42
+ };
43
+ //#endregion
44
+ export { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage };
45
+ //# sourceMappingURL=useLocaleStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"sourcesContent":[],"mappings":";;;;;;;AAYa,cAAA,eAA4D,EAAA,SAAA,CAA7C,MAA6C;AAMzE;AAKA;AAcA;AAKA;AAiBA;cAzCa,cAA8B,SAAA,CAAlB;;;;cAKZ,6BACH;;;;;;cAaG,0BAbH;;;;cAkBG;mBAQV,SAAA,CAAA;sBAAA;;;;;;;;;cASU;gBAMZ,SAAA,CAAA;4BAAA"}
@@ -1,4 +1,7 @@
1
- import { type LanguageContent } from '@intlayer/core';
1
+ import { StrictModeLocaleMap } from "@intlayer/types";
2
+
3
+ //#region src/client/useTraduction.d.ts
4
+
2
5
  /**
3
6
  * On the client side, Hook that picking one dictionary by its id and return the content.
4
7
  *
@@ -20,5 +23,7 @@ import { type LanguageContent } from '@intlayer/core';
20
23
  * - this function will require each locale to be defined if defined in the project configuration.
21
24
  * - If a locale is missing, it will make each existing locale optional and raise an error if the locale is not found.
22
25
  */
23
- export declare const useTranslation: <Content = string>(languageContent: LanguageContent<Content>) => Content;
26
+ declare const useTranslation: <Content = string>(languageContent: StrictModeLocaleMap<Content>) => Content;
27
+ //#endregion
28
+ export { useTranslation };
24
29
  //# sourceMappingURL=useTraduction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTraduction.d.ts","sourceRoot":"","sources":["../../../src/client/useTraduction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,GAAG,MAAM,EAC7C,iBAAiB,eAAe,CAAC,OAAO,CAAC,KACxC,OAOF,CAAC"}
1
+ {"version":3,"file":"useTraduction.d.ts","names":[],"sources":["../../../src/client/useTraduction.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;;;;;;;;;;;;;;;;;;;cAAa,oDACM,oBAAoB,aACpC"}