preact-intlayer 8.4.3 → 8.4.5

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 (254) hide show
  1. package/dist/cjs/IntlayerNode.cjs +16 -1
  2. package/dist/cjs/IntlayerNode.cjs.map +1 -1
  3. package/dist/cjs/UI/ContentSelector.cjs +96 -1
  4. package/dist/cjs/UI/ContentSelector.cjs.map +1 -1
  5. package/dist/cjs/_virtual/_rolldown/runtime.cjs +29 -0
  6. package/dist/cjs/client/IntlayerProvider.cjs +88 -1
  7. package/dist/cjs/client/IntlayerProvider.cjs.map +1 -0
  8. package/dist/cjs/client/format/index.cjs +18 -1
  9. package/dist/cjs/client/format/useCompact.cjs +27 -1
  10. package/dist/cjs/client/format/useCompact.cjs.map +1 -1
  11. package/dist/cjs/client/format/useCurrency.cjs +41 -1
  12. package/dist/cjs/client/format/useCurrency.cjs.map +1 -1
  13. package/dist/cjs/client/format/useDate.cjs +43 -1
  14. package/dist/cjs/client/format/useDate.cjs.map +1 -1
  15. package/dist/cjs/client/format/useIntl.cjs +33 -1
  16. package/dist/cjs/client/format/useIntl.cjs.map +1 -1
  17. package/dist/cjs/client/format/useList.cjs +38 -1
  18. package/dist/cjs/client/format/useList.cjs.map +1 -1
  19. package/dist/cjs/client/format/useNumber.cjs +39 -1
  20. package/dist/cjs/client/format/useNumber.cjs.map +1 -1
  21. package/dist/cjs/client/format/usePercentage.cjs +35 -1
  22. package/dist/cjs/client/format/usePercentage.cjs.map +1 -1
  23. package/dist/cjs/client/format/useRelativeTime.cjs +35 -1
  24. package/dist/cjs/client/format/useRelativeTime.cjs.map +1 -1
  25. package/dist/cjs/client/format/useUnit.cjs +34 -1
  26. package/dist/cjs/client/format/useUnit.cjs.map +1 -1
  27. package/dist/cjs/client/index.cjs +32 -1
  28. package/dist/cjs/client/t.cjs +19 -1
  29. package/dist/cjs/client/t.cjs.map +1 -1
  30. package/dist/cjs/client/useContent.cjs +19 -1
  31. package/dist/cjs/client/useContent.cjs.map +1 -1
  32. package/dist/cjs/client/useDictionary.cjs +25 -1
  33. package/dist/cjs/client/useDictionary.cjs.map +1 -1
  34. package/dist/cjs/client/useDictionaryAsync.cjs +22 -1
  35. package/dist/cjs/client/useDictionaryAsync.cjs.map +1 -1
  36. package/dist/cjs/client/useDictionaryDynamic.cjs +21 -1
  37. package/dist/cjs/client/useDictionaryDynamic.cjs.map +1 -1
  38. package/dist/cjs/client/useIntlayer.cjs +40 -1
  39. package/dist/cjs/client/useIntlayer.cjs.map +1 -1
  40. package/dist/cjs/client/useLoadDynamic.cjs +27 -1
  41. package/dist/cjs/client/useLoadDynamic.cjs.map +1 -1
  42. package/dist/cjs/client/useLocale.cjs +54 -1
  43. package/dist/cjs/client/useLocale.cjs.map +1 -1
  44. package/dist/cjs/client/useLocaleBase.cjs +24 -1
  45. package/dist/cjs/client/useLocaleBase.cjs.map +1 -1
  46. package/dist/cjs/client/useLocaleStorage.cjs +59 -1
  47. package/dist/cjs/client/useLocaleStorage.cjs.map +1 -1
  48. package/dist/cjs/client/useTraduction.cjs +35 -1
  49. package/dist/cjs/client/useTraduction.cjs.map +1 -1
  50. package/dist/cjs/editor/ContentSelector.cjs +24 -1
  51. package/dist/cjs/editor/ContentSelector.cjs.map +1 -1
  52. package/dist/cjs/editor/EditorProvider.cjs +12 -1
  53. package/dist/cjs/editor/EditorProvider.cjs.map +1 -0
  54. package/dist/cjs/editor/useEditor.cjs +38 -1
  55. package/dist/cjs/editor/useEditor.cjs.map +1 -0
  56. package/dist/cjs/getDictionary.cjs +10 -1
  57. package/dist/cjs/getDictionary.cjs.map +1 -1
  58. package/dist/cjs/getIntlayer.cjs +10 -1
  59. package/dist/cjs/getIntlayer.cjs.map +1 -1
  60. package/dist/cjs/html/HTMLProvider.cjs +17 -1
  61. package/dist/cjs/html/HTMLProvider.cjs.map +1 -1
  62. package/dist/cjs/html/HTMLRenderer.cjs +54 -1
  63. package/dist/cjs/html/HTMLRenderer.cjs.map +1 -1
  64. package/dist/cjs/html/index.cjs +10 -1
  65. package/dist/cjs/index.cjs +57 -1
  66. package/dist/cjs/markdown/MarkdownProvider.cjs +54 -1
  67. package/dist/cjs/markdown/MarkdownProvider.cjs.map +1 -1
  68. package/dist/cjs/markdown/MarkdownRenderer.cjs +77 -1
  69. package/dist/cjs/markdown/MarkdownRenderer.cjs.map +1 -1
  70. package/dist/cjs/markdown/MarkdownRendererPlugin.cjs +26 -1
  71. package/dist/cjs/markdown/MarkdownRendererPlugin.cjs.map +1 -1
  72. package/dist/cjs/markdown/compiler.cjs +24 -1
  73. package/dist/cjs/markdown/compiler.cjs.map +1 -1
  74. package/dist/cjs/markdown/index.cjs +23 -1
  75. package/dist/cjs/markdown/runtime.cjs +18 -1
  76. package/dist/cjs/markdown/runtime.cjs.map +1 -1
  77. package/dist/cjs/plugins.cjs +222 -1
  78. package/dist/cjs/plugins.cjs.map +1 -1
  79. package/dist/cjs/preactElement/renderPreactElement.cjs +42 -1
  80. package/dist/cjs/preactElement/renderPreactElement.cjs.map +1 -1
  81. package/dist/esm/IntlayerNode.mjs +14 -1
  82. package/dist/esm/IntlayerNode.mjs.map +1 -1
  83. package/dist/esm/UI/ContentSelector.mjs +94 -1
  84. package/dist/esm/UI/ContentSelector.mjs.map +1 -1
  85. package/dist/esm/client/IntlayerProvider.mjs +82 -1
  86. package/dist/esm/client/IntlayerProvider.mjs.map +1 -0
  87. package/dist/esm/client/format/index.mjs +10 -1
  88. package/dist/esm/client/format/useCompact.mjs +25 -1
  89. package/dist/esm/client/format/useCompact.mjs.map +1 -1
  90. package/dist/esm/client/format/useCurrency.mjs +39 -1
  91. package/dist/esm/client/format/useCurrency.mjs.map +1 -1
  92. package/dist/esm/client/format/useDate.mjs +41 -1
  93. package/dist/esm/client/format/useDate.mjs.map +1 -1
  94. package/dist/esm/client/format/useIntl.mjs +31 -1
  95. package/dist/esm/client/format/useIntl.mjs.map +1 -1
  96. package/dist/esm/client/format/useList.mjs +36 -1
  97. package/dist/esm/client/format/useList.mjs.map +1 -1
  98. package/dist/esm/client/format/useNumber.mjs +37 -1
  99. package/dist/esm/client/format/useNumber.mjs.map +1 -1
  100. package/dist/esm/client/format/usePercentage.mjs +33 -1
  101. package/dist/esm/client/format/usePercentage.mjs.map +1 -1
  102. package/dist/esm/client/format/useRelativeTime.mjs +33 -1
  103. package/dist/esm/client/format/useRelativeTime.mjs.map +1 -1
  104. package/dist/esm/client/format/useUnit.mjs +32 -1
  105. package/dist/esm/client/format/useUnit.mjs.map +1 -1
  106. package/dist/esm/client/index.mjs +13 -1
  107. package/dist/esm/client/t.mjs +17 -1
  108. package/dist/esm/client/t.mjs.map +1 -1
  109. package/dist/esm/client/useContent.mjs +18 -1
  110. package/dist/esm/client/useContent.mjs.map +1 -1
  111. package/dist/esm/client/useDictionary.mjs +23 -1
  112. package/dist/esm/client/useDictionary.mjs.map +1 -1
  113. package/dist/esm/client/useDictionaryAsync.mjs +19 -1
  114. package/dist/esm/client/useDictionaryAsync.mjs.map +1 -1
  115. package/dist/esm/client/useDictionaryDynamic.mjs +19 -1
  116. package/dist/esm/client/useDictionaryDynamic.mjs.map +1 -1
  117. package/dist/esm/client/useIntlayer.mjs +38 -1
  118. package/dist/esm/client/useIntlayer.mjs.map +1 -1
  119. package/dist/esm/client/useLoadDynamic.mjs +25 -1
  120. package/dist/esm/client/useLoadDynamic.mjs.map +1 -1
  121. package/dist/esm/client/useLocale.mjs +51 -1
  122. package/dist/esm/client/useLocale.mjs.map +1 -1
  123. package/dist/esm/client/useLocaleBase.mjs +21 -1
  124. package/dist/esm/client/useLocaleBase.mjs.map +1 -1
  125. package/dist/esm/client/useLocaleStorage.mjs +52 -1
  126. package/dist/esm/client/useLocaleStorage.mjs.map +1 -1
  127. package/dist/esm/client/useTraduction.mjs +33 -1
  128. package/dist/esm/client/useTraduction.mjs.map +1 -1
  129. package/dist/esm/editor/ContentSelector.mjs +22 -1
  130. package/dist/esm/editor/ContentSelector.mjs.map +1 -1
  131. package/dist/esm/editor/EditorProvider.mjs +11 -1
  132. package/dist/esm/editor/EditorProvider.mjs.map +1 -0
  133. package/dist/esm/editor/useEditor.mjs +36 -1
  134. package/dist/esm/editor/useEditor.mjs.map +1 -0
  135. package/dist/esm/getDictionary.mjs +8 -1
  136. package/dist/esm/getDictionary.mjs.map +1 -1
  137. package/dist/esm/getIntlayer.mjs +8 -1
  138. package/dist/esm/getIntlayer.mjs.map +1 -1
  139. package/dist/esm/html/HTMLProvider.mjs +14 -1
  140. package/dist/esm/html/HTMLProvider.mjs.map +1 -1
  141. package/dist/esm/html/HTMLRenderer.mjs +49 -1
  142. package/dist/esm/html/HTMLRenderer.mjs.map +1 -1
  143. package/dist/esm/html/index.mjs +4 -1
  144. package/dist/esm/index.mjs +22 -1
  145. package/dist/esm/markdown/MarkdownProvider.mjs +51 -1
  146. package/dist/esm/markdown/MarkdownProvider.mjs.map +1 -1
  147. package/dist/esm/markdown/MarkdownRenderer.mjs +73 -1
  148. package/dist/esm/markdown/MarkdownRenderer.mjs.map +1 -1
  149. package/dist/esm/markdown/MarkdownRendererPlugin.mjs +23 -1
  150. package/dist/esm/markdown/MarkdownRendererPlugin.mjs.map +1 -1
  151. package/dist/esm/markdown/compiler.mjs +17 -1
  152. package/dist/esm/markdown/compiler.mjs.map +1 -1
  153. package/dist/esm/markdown/index.mjs +7 -1
  154. package/dist/esm/markdown/runtime.mjs +15 -1
  155. package/dist/esm/markdown/runtime.mjs.map +1 -1
  156. package/dist/esm/plugins.mjs +212 -1
  157. package/dist/esm/plugins.mjs.map +1 -1
  158. package/dist/esm/preactElement/renderPreactElement.mjs +40 -1
  159. package/dist/esm/preactElement/renderPreactElement.mjs.map +1 -1
  160. package/dist/types/IntlayerNode.d.ts +23 -2
  161. package/dist/types/IntlayerNode.d.ts.map +1 -0
  162. package/dist/types/client/IntlayerProvider.d.ts +53 -2
  163. package/dist/types/client/IntlayerProvider.d.ts.map +1 -0
  164. package/dist/types/client/format/useIntl.d.ts +26 -2
  165. package/dist/types/client/format/useIntl.d.ts.map +1 -0
  166. package/dist/types/client/index.d.ts +11 -11
  167. package/dist/types/client/t.d.ts +13 -2
  168. package/dist/types/client/t.d.ts.map +1 -0
  169. package/dist/types/client/useDictionary.d.ts +16 -2
  170. package/dist/types/client/useDictionary.d.ts.map +1 -0
  171. package/dist/types/client/useDictionaryAsync.d.ts +13 -2
  172. package/dist/types/client/useDictionaryAsync.d.ts.map +1 -0
  173. package/dist/types/client/useDictionaryDynamic.d.ts +16 -2
  174. package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -0
  175. package/dist/types/client/useIntlayer.d.ts +28 -2
  176. package/dist/types/client/useIntlayer.d.ts.map +1 -0
  177. package/dist/types/client/useLoadDynamic.d.ts +5 -2
  178. package/dist/types/client/useLoadDynamic.d.ts.map +1 -0
  179. package/dist/types/client/useLocale.d.ts +43 -2
  180. package/dist/types/client/useLocale.d.ts.map +1 -0
  181. package/dist/types/client/useLocaleBase.d.ts +16 -2
  182. package/dist/types/client/useLocaleBase.d.ts.map +1 -0
  183. package/dist/types/client/useLocaleStorage.d.ts +45 -2
  184. package/dist/types/client/useLocaleStorage.d.ts.map +1 -0
  185. package/dist/types/getDictionary.d.ts +1 -1
  186. package/dist/types/getIntlayer.d.ts +1 -1
  187. package/dist/types/html/HTMLProvider.d.ts +18 -2
  188. package/dist/types/html/HTMLProvider.d.ts.map +1 -0
  189. package/dist/types/html/HTMLRenderer.d.ts +61 -2
  190. package/dist/types/html/HTMLRenderer.d.ts.map +1 -0
  191. package/dist/types/html/index.d.ts +2 -2
  192. package/dist/types/html/types.d.ts +38 -2
  193. package/dist/types/html/types.d.ts.map +1 -0
  194. package/dist/types/index.d.ts +19 -19
  195. package/dist/types/markdown/MarkdownProvider.d.ts +52 -2
  196. package/dist/types/markdown/MarkdownProvider.d.ts.map +1 -0
  197. package/dist/types/markdown/MarkdownRenderer.d.ts +61 -2
  198. package/dist/types/markdown/MarkdownRenderer.d.ts.map +1 -0
  199. package/dist/types/markdown/MarkdownRendererPlugin.d.ts +23 -2
  200. package/dist/types/markdown/MarkdownRendererPlugin.d.ts.map +1 -0
  201. package/dist/types/markdown/compiler.d.ts +14 -2
  202. package/dist/types/markdown/compiler.d.ts.map +1 -0
  203. package/dist/types/markdown/index.d.ts +5 -5
  204. package/dist/types/markdown/runtime.d.ts +10 -2
  205. package/dist/types/markdown/runtime.d.ts.map +1 -0
  206. package/dist/types/plugins.d.ts +96 -2
  207. package/dist/types/plugins.d.ts.map +1 -0
  208. package/package.json +7 -7
  209. package/dist/cjs/IntlayerProvider-sM1gzsx7.cjs +0 -2
  210. package/dist/cjs/IntlayerProvider-sM1gzsx7.cjs.map +0 -1
  211. package/dist/esm/IntlayerProvider-ClOcEK3A.mjs +0 -2
  212. package/dist/esm/IntlayerProvider-ClOcEK3A.mjs.map +0 -1
  213. package/dist/types/HTMLProvider-8sO8DU8H.d.ts +0 -18
  214. package/dist/types/HTMLProvider-8sO8DU8H.d.ts.map +0 -1
  215. package/dist/types/HTMLRenderer-NNa_9oMD.d.ts +0 -61
  216. package/dist/types/HTMLRenderer-NNa_9oMD.d.ts.map +0 -1
  217. package/dist/types/IntlayerNode-CIzFHYnC.d.ts +0 -23
  218. package/dist/types/IntlayerNode-CIzFHYnC.d.ts.map +0 -1
  219. package/dist/types/IntlayerProvider-aV596OL4.d.ts +0 -53
  220. package/dist/types/IntlayerProvider-aV596OL4.d.ts.map +0 -1
  221. package/dist/types/MarkdownProvider-chUIO05u.d.ts +0 -52
  222. package/dist/types/MarkdownProvider-chUIO05u.d.ts.map +0 -1
  223. package/dist/types/MarkdownRenderer-BMhuurZW.d.ts +0 -61
  224. package/dist/types/MarkdownRenderer-BMhuurZW.d.ts.map +0 -1
  225. package/dist/types/MarkdownRendererPlugin-DFRVdHCA.d.ts +0 -23
  226. package/dist/types/MarkdownRendererPlugin-DFRVdHCA.d.ts.map +0 -1
  227. package/dist/types/compiler-BB0gAVbe.d.ts +0 -14
  228. package/dist/types/compiler-BB0gAVbe.d.ts.map +0 -1
  229. package/dist/types/plugins-D6OB94dO.d.ts +0 -95
  230. package/dist/types/plugins-D6OB94dO.d.ts.map +0 -1
  231. package/dist/types/runtime-BMHAtT-R.d.ts +0 -10
  232. package/dist/types/runtime-BMHAtT-R.d.ts.map +0 -1
  233. package/dist/types/t-CalXqnSB.d.ts +0 -13
  234. package/dist/types/t-CalXqnSB.d.ts.map +0 -1
  235. package/dist/types/types-B3Kzdco6.d.ts +0 -38
  236. package/dist/types/types-B3Kzdco6.d.ts.map +0 -1
  237. package/dist/types/useDictionary-cjQAc1l1.d.ts +0 -16
  238. package/dist/types/useDictionary-cjQAc1l1.d.ts.map +0 -1
  239. package/dist/types/useDictionaryAsync-CDCcBnXn.d.ts +0 -13
  240. package/dist/types/useDictionaryAsync-CDCcBnXn.d.ts.map +0 -1
  241. package/dist/types/useDictionaryDynamic-BQgaM0vp.d.ts +0 -16
  242. package/dist/types/useDictionaryDynamic-BQgaM0vp.d.ts.map +0 -1
  243. package/dist/types/useIntl-DfzrSGu4.d.ts +0 -26
  244. package/dist/types/useIntl-DfzrSGu4.d.ts.map +0 -1
  245. package/dist/types/useIntlayer-BINmW9T1.d.ts +0 -28
  246. package/dist/types/useIntlayer-BINmW9T1.d.ts.map +0 -1
  247. package/dist/types/useLoadDynamic-DFXHehpF.d.ts +0 -5
  248. package/dist/types/useLoadDynamic-DFXHehpF.d.ts.map +0 -1
  249. package/dist/types/useLocale-BDQ4yLc5.d.ts +0 -43
  250. package/dist/types/useLocale-BDQ4yLc5.d.ts.map +0 -1
  251. package/dist/types/useLocaleBase-1L1RLyXD.d.ts +0 -16
  252. package/dist/types/useLocaleBase-1L1RLyXD.d.ts.map +0 -1
  253. package/dist/types/useLocaleStorage-BwH9gqN5.d.ts +0 -45
  254. package/dist/types/useLocaleStorage-BwH9gqN5.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-BMHAtT-R.d.ts","names":[],"sources":["../../src/markdown/runtime.ts"],"mappings":";;;;;;cAgBa,aAAA,EAAe,eAAA"}
@@ -1,13 +0,0 @@
1
- import { StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
2
- import { Locale } from "@intlayer/types/allLocales";
3
-
4
- //#region src/client/t.d.ts
5
- /**
6
- * On the client side, this function returns the translation of the provided multilang content.
7
- *
8
- * If the locale is not provided, it will use the locale from the client context
9
- */
10
- declare const t: <Content = string>(multilangContent: StrictModeLocaleMap<Content>, locale?: Locale) => Content;
11
- //#endregion
12
- export { t };
13
- //# sourceMappingURL=t-CalXqnSB.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"t-CalXqnSB.d.ts","names":[],"sources":["../../src/client/t.ts"],"mappings":";;;;;;AAWA;;;cAAa,CAAA,qBACX,gBAAA,EAAkB,mBAAA,CAAoB,OAAA,GACtC,MAAA,GAAS,MAAA,KAAM,OAAA"}
@@ -1,38 +0,0 @@
1
- import { FunctionalComponent, JSX } from "preact";
2
- import { HTMLTagsType } from "@intlayer/core/transpiler";
3
-
4
- //#region src/html/types.d.ts
5
- /**
6
- * Helper to extract specific props from the configuration value.
7
- */
8
- type PropsFromConfig<Value> = Value extends true ? {} : Value extends object ? Value : {};
9
- /**
10
- * Smart Type to resolve props based on the key K.
11
- */
12
- type ElementProps<K> = K extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[K] : JSX.HTMLAttributes<HTMLElement>;
13
- /**
14
- * Helper: Defines the mapping for the explicitly listed keys in T.
15
- * Handles whether they are Required or Optional.
16
- */
17
- type DefinedComponents<T, IsRequired extends boolean> = IsRequired extends true ? { [K in keyof T]: FunctionalComponent<ElementProps<K> & PropsFromConfig<T[K]>> } : { [K in keyof T]?: FunctionalComponent<ElementProps<K> & PropsFromConfig<T[K]>> };
18
- /**
19
- * Helper: Defines the standard HTML tags NOT listed in T.
20
- * These are always optional when included.
21
- */
22
- type RestHTMLComponents<T> = { [K in Exclude<keyof HTMLTagsType, keyof T>]?: FunctionalComponent<K extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[K] : JSX.HTMLAttributes<HTMLElement>> };
23
- /**
24
- * The supported modes for the HTMLComponents type.
25
- */
26
- type HTMLComponentMode = 'permissive' | 'optional' | 'inclusive' | 'strict';
27
- /**
28
- * The main component definition with Mode support.
29
- */
30
- type HTMLComponents<Mode extends HTMLComponentMode = 'optional', T = {}> = Mode extends 'strict' ? DefinedComponents<T, true> : Mode extends 'inclusive' ? // Inclusive: Keys in T are required. Rest of HTML is optional.
31
- DefinedComponents<T, true> & RestHTMLComponents<T> : Mode extends 'permissive' ? // Permissive: Keys in T optional. Rest of HTML optional. Any other string allowed.
32
- DefinedComponents<T, false> & RestHTMLComponents<T> & {
33
- [key: string]: FunctionalComponent<JSX.HTMLAttributes<HTMLElement>>;
34
- } : // Optional (Default): Keys in T optional. Rest of HTML optional.
35
- DefinedComponents<T, false> & RestHTMLComponents<T>;
36
- //#endregion
37
- export { HTMLComponents as n, HTMLComponentMode as t };
38
- //# sourceMappingURL=types-B3Kzdco6.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-B3Kzdco6.d.ts","names":[],"sources":["../../src/html/types.ts"],"mappings":";;;;;;AACuD;KAKlD,eAAA,UAAyB,KAAA,qBAE1B,KAAA,kBACE,KAAA;;;;KAMD,YAAA,MAAkB,CAAA,eAAgB,GAAA,CAAI,iBAAA,GACvC,GAAA,CAAI,iBAAA,CAAkB,CAAA,IACtB,GAAA,CAAI,cAAA,CAAe,WAAA;;;;;KAMlB,iBAAA,kCAAmD,UAAA,8BAGtC,CAAA,GAAI,mBAAA,CACd,YAAA,CAAa,CAAA,IAAK,eAAA,CAAgB,CAAA,CAAE,CAAA,sBAK1B,CAAA,IAAK,mBAAA,CACf,YAAA,CAAa,CAAA,IAAK,eAAA,CAAgB,CAAA,CAAE,CAAA;;;;;KAQvC,kBAAA,cACG,OAAA,OAAc,YAAA,QAAoB,CAAA,KAAM,mBAAA,CAC5C,CAAA,eAAgB,GAAA,CAAI,iBAAA,GAChB,GAAA,CAAI,iBAAA,CAAkB,CAAA,IACtB,GAAA,CAAI,cAAA,CAAe,WAAA;;;;KAOf,iBAAA;;;;KASA,cAAA,cACG,iBAAA,yBAEX,IAAA,oBAEA,iBAAA,CAAkB,CAAA,UAClB,IAAA;AAEE,iBAAA,CAAkB,CAAA,UAAW,kBAAA,CAAmB,CAAA,IAChD,IAAA;AAEE,iBAAA,CAAkB,CAAA,WAChB,kBAAA,CAAmB,CAAA;EAAA,CAChB,GAAA,WAAc,mBAAA,CAAoB,GAAA,CAAI,cAAA,CAAe,WAAA;AAAA;AAG1D,iBAAA,CAAkB,CAAA,WAAY,kBAAA,CAAmB,CAAA"}
@@ -1,16 +0,0 @@
1
- import { i as IInterpreterPluginState$1 } from "./plugins-D6OB94dO.js";
2
- import * as _intlayer_core_interpreter0 from "@intlayer/core/interpreter";
3
- import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
4
- import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
5
- import { Dictionary } from "@intlayer/types/dictionary";
6
-
7
- //#region src/client/useDictionary.d.ts
8
- /**
9
- * On the server side, Hook that transform a dictionary and return the content
10
- *
11
- * If the locale is not provided, it will use the locale from the client context
12
- */
13
- declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core_interpreter0.DeepTransformContent<T["content"], IInterpreterPluginState$1, _intlayer_types_allLocales0.Locale>;
14
- //#endregion
15
- export { useDictionary as t };
16
- //# sourceMappingURL=useDictionary-cjQAc1l1.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDictionary-cjQAc1l1.d.ts","names":[],"sources":["../../src/client/useDictionary.ts"],"mappings":";;;;;;;;;;;;cAca,aAAA,aACD,UAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,UAAA,EAAY,CAAA,EACZ,MAAA,GAAS,CAAA,KAAC,2BAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,yBAAA,EAAA,2BAAA,CAAA,MAAA"}
@@ -1,13 +0,0 @@
1
- import { LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
2
- import { Dictionary } from "@intlayer/types/dictionary";
3
-
4
- //#region src/client/useDictionaryAsync.d.ts
5
- /**
6
- * On the server side, Hook that transform a dictionary and return the content
7
- *
8
- * If the locale is not provided, it will use the locale from the client context
9
- */
10
- declare const useDictionaryAsync: <T extends Dictionary>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: LocalesValues) => Promise<T>;
11
- //#endregion
12
- export { useDictionaryAsync as t };
13
- //# sourceMappingURL=useDictionaryAsync-CDCcBnXn.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDictionaryAsync-CDCcBnXn.d.ts","names":[],"sources":["../../src/client/useDictionaryAsync.ts"],"mappings":";;;;;;AAeA;;;cAAa,kBAAA,aAAsC,UAAA,EACjD,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,MAAA,GAAS,aAAA,KACR,OAAA,CAAQ,CAAA"}
@@ -1,16 +0,0 @@
1
- import { i as IInterpreterPluginState$1 } from "./plugins-D6OB94dO.js";
2
- import * as _intlayer_core_interpreter0 from "@intlayer/core/interpreter";
3
- import { DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
4
- import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
5
- import { Dictionary } from "@intlayer/types/dictionary";
6
-
7
- //#region src/client/useDictionaryDynamic.d.ts
8
- /**
9
- * On the server side, Hook that transform a dictionary and return the content
10
- *
11
- * If the locale is not provided, it will use the locale from the client context
12
- */
13
- declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _intlayer_core_interpreter0.DeepTransformContent<T["content"], IInterpreterPluginState$1, _intlayer_types_allLocales0.Locale>;
14
- //#endregion
15
- export { useDictionaryDynamic as t };
16
- //# sourceMappingURL=useDictionaryDynamic-BQgaM0vp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDictionaryDynamic-BQgaM0vp.d.ts","names":[],"sources":["../../src/client/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;;cAgBa,oBAAA,aACD,UAAA,YACA,cAAA,EAEV,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,aAAA,KAAa,2BAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,yBAAA,EAAA,2BAAA,CAAA,MAAA"}
@@ -1,26 +0,0 @@
1
- import { LocalesValues } from "@intlayer/types/module_augmentation";
2
- import { WrappedIntl } from "@intlayer/core/formatters";
3
-
4
- //#region src/client/format/useIntl.d.ts
5
- /**
6
- * Preact client hook that provides a locale-bound `Intl` object.
7
- *
8
- * It acts exactly like the native `Intl` object, but acts as a proxy to:
9
- * 1. Inject the current locale automatically if none is provided.
10
- * 2. Use the performance-optimized `CachedIntl` under the hood.
11
- *
12
- * @example
13
- * ```tsx
14
- * const intl = useIntl(); // uses context locale
15
- *
16
- * // Standard API, but no need to pass locale as the first argument
17
- * const formatted = new intl.NumberFormat({
18
- * style: 'currency',
19
- * currency: 'USD'
20
- * }).format(123.45);
21
- * ```
22
- */
23
- declare const useIntl: (locale?: LocalesValues) => WrappedIntl;
24
- //#endregion
25
- export { useIntl as t };
26
- //# sourceMappingURL=useIntl-DfzrSGu4.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useIntl-DfzrSGu4.d.ts","names":[],"sources":["../../src/client/format/useIntl.ts"],"mappings":";;;;;;AAuBA;;;;;;;;;;;;;;;;cAAa,OAAA,GAAW,MAAA,GAAS,aAAA,KAAa,WAAA"}
@@ -1,28 +0,0 @@
1
- import { t as DeepTransformContent } from "./plugins-D6OB94dO.js";
2
- import { DictionaryKeys, DictionaryRegistryContent, LocalesValues } from "@intlayer/types/module_augmentation";
3
-
4
- //#region src/client/useIntlayer.d.ts
5
- /**
6
- * Preact hook that picks one dictionary by its key and returns its content.
7
- *
8
- * If the locale is not provided, it will use the locale from the client context.
9
- *
10
- * @param key - The unique key of the dictionary to retrieve.
11
- * @param locale - Optional locale to override the current context locale.
12
- * @returns The transformed dictionary content.
13
- *
14
- * @example
15
- * ```tsx
16
- * import { useIntlayer } from 'preact-intlayer';
17
- *
18
- * const MyComponent = () => {
19
- * const content = useIntlayer('my-dictionary-key');
20
- *
21
- * return <div>{content.myField.value}</div>;
22
- * };
23
- * ```
24
- */
25
- declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues>(key: T, locale?: L) => DeepTransformContent<DictionaryRegistryContent<T>>;
26
- //#endregion
27
- export { useIntlayer as t };
28
- //# sourceMappingURL=useIntlayer-BINmW9T1.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useIntlayer-BINmW9T1.d.ts","names":[],"sources":["../../src/client/useIntlayer.ts"],"mappings":";;;;;;AA8BA;;;;;;;;;;;;;;;;;;cAAa,WAAA,aAAyB,cAAA,YAA0B,aAAA,EAC9D,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,CAAA,KAAC,oBAAA,CAAA,yBAAA,CAAA,CAAA"}
@@ -1,5 +0,0 @@
1
- //#region src/client/useLoadDynamic.d.ts
2
- declare const useLoadDynamic: <T>(key: string, promise: Promise<T>) => T;
3
- //#endregion
4
- export { useLoadDynamic as t };
5
- //# sourceMappingURL=useLoadDynamic-DFXHehpF.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLoadDynamic-DFXHehpF.d.ts","names":[],"sources":["../../src/client/useLoadDynamic.ts"],"mappings":";cA2Ba,cAAA,MAAqB,GAAA,UAAa,OAAA,EAAS,OAAA,CAAQ,CAAA,MAAK,CAAA"}
@@ -1,43 +0,0 @@
1
- import { LocalesValues } from "@intlayer/types/module_augmentation";
2
- import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
3
-
4
- //#region src/client/useLocale.d.ts
5
- type useLocaleProps = {
6
- isCookieEnabled?: boolean;
7
- onLocaleChange?: (locale: LocalesValues) => void;
8
- };
9
- /**
10
- * Preact hook to get the current locale and related locale management functions.
11
- *
12
- * @param props - Optional properties for the hook.
13
- * @returns An object containing the current locale, default locale, available locales, and a function to update the locale.
14
- *
15
- * @example
16
- * ```tsx
17
- * import { useLocale } from 'preact-intlayer';
18
- *
19
- * const LocaleSwitcher = () => {
20
- * const { locale, setLocale, availableLocales } = useLocale();
21
- *
22
- * return (
23
- * <select value={locale} onChange={(e) => setLocale(e.target.value)}>
24
- * {availableLocales.map((loc) => (
25
- * <option key={loc} value={loc}>{loc}</option>
26
- * ))}
27
- * </select>
28
- * );
29
- * };
30
- * ```
31
- */
32
- declare const useLocale: ({
33
- isCookieEnabled,
34
- onLocaleChange
35
- }?: useLocaleProps) => {
36
- locale: LocalesValues;
37
- defaultLocale: _intlayer_types_allLocales0.Locale;
38
- availableLocales: _intlayer_types_allLocales0.Locale[];
39
- setLocale: (locale: LocalesValues) => void;
40
- };
41
- //#endregion
42
- export { useLocale as t };
43
- //# sourceMappingURL=useLocale-BDQ4yLc5.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLocale-BDQ4yLc5.d.ts","names":[],"sources":["../../src/client/useLocale.ts"],"mappings":";;;;KAMK,cAAA;EACH,eAAA;EACA,cAAA,IAAkB,MAAA,EAAQ,aAAA;AAAA;;;;;;;;;;AA0B5B;;;;;;;;;;;;;;cAAa,SAAA;EAAa,eAAA;EAAA;AAAA,IAGvB,cAAA;;;;sBAU0B,aAAA;AAAA"}
@@ -1,16 +0,0 @@
1
- import * as _intlayer_types_module_augmentation0 from "@intlayer/types/module_augmentation";
2
- import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
3
-
4
- //#region src/client/useLocaleBase.d.ts
5
- /**
6
- * On the client side, hook to get the current locale and all related fields
7
- */
8
- declare const useLocaleBase: () => {
9
- locale: _intlayer_types_module_augmentation0.LocalesValues;
10
- defaultLocale: _intlayer_types_allLocales0.Locale;
11
- availableLocales: _intlayer_types_allLocales0.Locale[];
12
- setLocale: (newLocale: _intlayer_types_module_augmentation0.LocalesValues) => void;
13
- };
14
- //#endregion
15
- export { useLocaleBase as t };
16
- //# sourceMappingURL=useLocaleBase-1L1RLyXD.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLocaleBase-1L1RLyXD.d.ts","names":[],"sources":["../../src/client/useLocaleBase.ts"],"mappings":";;;;;;;cAUa,aAAA;UASZ,oCAAA,CAAA,aAAA"}
@@ -1,45 +0,0 @@
1
- import { LocalesValues } from "@intlayer/types/module_augmentation";
2
- import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
3
-
4
- //#region src/client/useLocaleStorage.d.ts
5
- /**
6
- * Get the locale cookie
7
- */
8
- declare const localeInStorage: _intlayer_types_allLocales0.Locale;
9
- /**
10
- * @deprecated Use localeInStorage instead
11
- *
12
- * Get the locale cookie
13
- */
14
- declare const localeCookie: _intlayer_types_allLocales0.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: () => _intlayer_types_allLocales0.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: _intlayer_types_allLocales0.Locale;
41
- setLocaleCookie: (locale: LocalesValues) => void;
42
- };
43
- //#endregion
44
- export { useLocaleCookie as a, setLocaleInStorage as i, localeInStorage as n, useLocaleStorage as o, setLocaleCookie as r, localeCookie as t };
45
- //# sourceMappingURL=useLocaleStorage-BwH9gqN5.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLocaleStorage-BwH9gqN5.d.ts","names":[],"sources":["../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;cAYa,eAAA,EAA4D,2BAAA,CAA7C,MAAA;;;;;AAM5B;cAAa,YAAA,EAA8B,2BAAA,CAAlB,MAAA;;;;cAKZ,kBAAA,GACX,MAAA,EAAQ,aAAA,EACR,eAAA;;;;;;cAYW,eAAA,GAAe,MAAA,EAblB,aAAA,EAAa,eAAA;;;AAavB;cAKa,gBAAA,GAAoB,eAAA;mBAQ9B,2BAAA,CAAA,MAAA;sBAAA,aAAA;AAAA;;;;;AARH;;;cAiBa,eAAA,GAAmB,eAAA;gBAM/B,2BAAA,CAAA,MAAA;4BAAA,aAAA;AAAA"}