vanilla-intlayer 8.7.14 → 8.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/dist/cjs/_virtual/_rolldown/runtime.cjs +29 -0
  2. package/dist/cjs/client/index.cjs +24 -1
  3. package/dist/cjs/client/installIntlayer.cjs +98 -1
  4. package/dist/cjs/client/installIntlayer.cjs.map +1 -0
  5. package/dist/cjs/client/useDictionary.cjs +59 -1
  6. package/dist/cjs/client/useDictionary.cjs.map +1 -0
  7. package/dist/cjs/client/useDictionaryDynamic.cjs +93 -1
  8. package/dist/cjs/client/useDictionaryDynamic.cjs.map +1 -0
  9. package/dist/cjs/client/useIntlayer.cjs +65 -1
  10. package/dist/cjs/client/useIntlayer.cjs.map +1 -0
  11. package/dist/cjs/client/useLocale.cjs +58 -1
  12. package/dist/cjs/client/useLocale.cjs.map +1 -0
  13. package/dist/cjs/client/useLocaleStorage.cjs +51 -1
  14. package/dist/cjs/client/useLocaleStorage.cjs.map +1 -0
  15. package/dist/cjs/client/useRewriteURL.cjs +46 -1
  16. package/dist/cjs/client/useRewriteURL.cjs.map +1 -0
  17. package/dist/cjs/editor/useEditor.cjs +49 -1
  18. package/dist/cjs/editor/useEditor.cjs.map +1 -0
  19. package/dist/cjs/format/index.cjs +20 -1
  20. package/dist/cjs/format/useCompact.cjs +17 -1
  21. package/dist/cjs/format/useCompact.cjs.map +1 -0
  22. package/dist/cjs/format/useCurrency.cjs +17 -1
  23. package/dist/cjs/format/useCurrency.cjs.map +1 -0
  24. package/dist/cjs/format/useDate.cjs +26 -1
  25. package/dist/cjs/format/useDate.cjs.map +1 -0
  26. package/dist/cjs/format/useIntl.cjs +44 -1
  27. package/dist/cjs/format/useIntl.cjs.map +1 -0
  28. package/dist/cjs/format/useList.cjs +17 -1
  29. package/dist/cjs/format/useList.cjs.map +1 -0
  30. package/dist/cjs/format/useNumber.cjs +20 -1
  31. package/dist/cjs/format/useNumber.cjs.map +1 -0
  32. package/dist/cjs/format/usePercentage.cjs +17 -1
  33. package/dist/cjs/format/usePercentage.cjs.map +1 -0
  34. package/dist/cjs/format/useRelativeTime.cjs +17 -1
  35. package/dist/cjs/format/useRelativeTime.cjs.map +1 -0
  36. package/dist/cjs/format/useUnit.cjs +17 -1
  37. package/dist/cjs/format/useUnit.cjs.map +1 -0
  38. package/dist/cjs/getDictionary.cjs +11 -1
  39. package/dist/cjs/getDictionary.cjs.map +1 -0
  40. package/dist/cjs/getIntlayer.cjs +11 -1
  41. package/dist/cjs/getIntlayer.cjs.map +1 -0
  42. package/dist/cjs/html/HTMLRenderer.cjs +22 -1
  43. package/dist/cjs/html/HTMLRenderer.cjs.map +1 -0
  44. package/dist/cjs/html/index.cjs +9 -1
  45. package/dist/cjs/html/installIntlayerHTML.cjs +91 -1
  46. package/dist/cjs/html/installIntlayerHTML.cjs.map +1 -0
  47. package/dist/cjs/html/types.cjs +0 -1
  48. package/dist/cjs/index.cjs +37 -1
  49. package/dist/cjs/markdown/MarkdownRenderer.cjs +41 -1
  50. package/dist/cjs/markdown/MarkdownRenderer.cjs.map +1 -0
  51. package/dist/cjs/markdown/compiler.cjs +37 -1
  52. package/dist/cjs/markdown/compiler.cjs.map +1 -0
  53. package/dist/cjs/markdown/index.cjs +11 -1
  54. package/dist/cjs/markdown/installIntlayerMarkdown.cjs +98 -1
  55. package/dist/cjs/markdown/installIntlayerMarkdown.cjs.map +1 -0
  56. package/dist/cjs/markdown/runtime.cjs +87 -1
  57. package/dist/cjs/markdown/runtime.cjs.map +1 -0
  58. package/dist/cjs/plugins.cjs +240 -1
  59. package/dist/cjs/plugins.cjs.map +1 -0
  60. package/dist/cjs/renderIntlayerNode.cjs +44 -1
  61. package/dist/cjs/renderIntlayerNode.cjs.map +1 -0
  62. package/dist/esm/client/index.mjs +9 -8
  63. package/dist/esm/client/installIntlayer.mjs +93 -2
  64. package/dist/esm/client/installIntlayer.mjs.map +1 -0
  65. package/dist/esm/client/useDictionary.mjs +55 -8
  66. package/dist/esm/client/useDictionary.mjs.map +1 -0
  67. package/dist/esm/client/useDictionaryDynamic.mjs +82 -28
  68. package/dist/esm/client/useDictionaryDynamic.mjs.map +1 -0
  69. package/dist/esm/client/useIntlayer.mjs +61 -8
  70. package/dist/esm/client/useIntlayer.mjs.map +1 -0
  71. package/dist/esm/client/useLocale.mjs +51 -17
  72. package/dist/esm/client/useLocale.mjs.map +1 -0
  73. package/dist/esm/client/useLocaleStorage.mjs +39 -13
  74. package/dist/esm/client/useLocaleStorage.mjs.map +1 -0
  75. package/dist/esm/client/useRewriteURL.mjs +40 -12
  76. package/dist/esm/client/useRewriteURL.mjs.map +1 -0
  77. package/dist/esm/editor/useEditor.mjs +47 -2
  78. package/dist/esm/editor/useEditor.mjs.map +1 -0
  79. package/dist/esm/format/index.mjs +11 -10
  80. package/dist/esm/format/useCompact.mjs +11 -8
  81. package/dist/esm/format/useCompact.mjs.map +1 -0
  82. package/dist/esm/format/useCurrency.mjs +11 -8
  83. package/dist/esm/format/useCurrency.mjs.map +1 -0
  84. package/dist/esm/format/useDate.mjs +18 -12
  85. package/dist/esm/format/useDate.mjs.map +1 -0
  86. package/dist/esm/format/useIntl.mjs +36 -8
  87. package/dist/esm/format/useIntl.mjs.map +1 -0
  88. package/dist/esm/format/useList.mjs +11 -8
  89. package/dist/esm/format/useList.mjs.map +1 -0
  90. package/dist/esm/format/useNumber.mjs +14 -8
  91. package/dist/esm/format/useNumber.mjs.map +1 -0
  92. package/dist/esm/format/usePercentage.mjs +11 -8
  93. package/dist/esm/format/usePercentage.mjs.map +1 -0
  94. package/dist/esm/format/useRelativeTime.mjs +11 -8
  95. package/dist/esm/format/useRelativeTime.mjs.map +1 -0
  96. package/dist/esm/format/useUnit.mjs +11 -8
  97. package/dist/esm/format/useUnit.mjs.map +1 -0
  98. package/dist/esm/getDictionary.mjs +7 -4
  99. package/dist/esm/getDictionary.mjs.map +1 -0
  100. package/dist/esm/getIntlayer.mjs +7 -4
  101. package/dist/esm/getIntlayer.mjs.map +1 -0
  102. package/dist/esm/html/HTMLRenderer.mjs +17 -5
  103. package/dist/esm/html/HTMLRenderer.mjs.map +1 -0
  104. package/dist/esm/html/index.mjs +4 -3
  105. package/dist/esm/html/installIntlayerHTML.mjs +81 -13
  106. package/dist/esm/html/installIntlayerHTML.mjs.map +1 -0
  107. package/dist/esm/index.mjs +13 -12
  108. package/dist/esm/markdown/MarkdownRenderer.mjs +36 -16
  109. package/dist/esm/markdown/MarkdownRenderer.mjs.map +1 -0
  110. package/dist/esm/markdown/compiler.mjs +28 -4
  111. package/dist/esm/markdown/compiler.mjs.map +1 -0
  112. package/dist/esm/markdown/index.mjs +5 -4
  113. package/dist/esm/markdown/installIntlayerMarkdown.mjs +86 -23
  114. package/dist/esm/markdown/installIntlayerMarkdown.mjs.map +1 -0
  115. package/dist/esm/markdown/runtime.mjs +60 -28
  116. package/dist/esm/markdown/runtime.mjs.map +1 -0
  117. package/dist/esm/plugins.mjs +187 -133
  118. package/dist/esm/plugins.mjs.map +1 -0
  119. package/dist/esm/renderIntlayerNode.mjs +32 -15
  120. package/dist/esm/renderIntlayerNode.mjs.map +1 -0
  121. package/dist/types/client/index.d.ts +8 -0
  122. package/dist/{client → types/client}/installIntlayer.d.ts +27 -20
  123. package/dist/types/client/installIntlayer.d.ts.map +1 -0
  124. package/dist/{client → types/client}/useDictionary.d.ts +22 -17
  125. package/dist/types/client/useDictionary.d.ts.map +1 -0
  126. package/dist/{client → types/client}/useDictionaryDynamic.d.ts +10 -5
  127. package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -0
  128. package/dist/{client → types/client}/useIntlayer.d.ts +9 -4
  129. package/dist/types/client/useIntlayer.d.ts.map +1 -0
  130. package/dist/{client → types/client}/useLocale.d.ts +14 -10
  131. package/dist/types/client/useLocale.d.ts.map +1 -0
  132. package/dist/types/client/useLocaleStorage.d.ts +37 -0
  133. package/dist/types/client/useLocaleStorage.d.ts.map +1 -0
  134. package/dist/{client → types/client}/useRewriteURL.d.ts +5 -1
  135. package/dist/types/client/useRewriteURL.d.ts.map +1 -0
  136. package/dist/{editor → types/editor}/useEditor.d.ts +5 -1
  137. package/dist/types/editor/useEditor.d.ts.map +1 -0
  138. package/dist/types/format/index.d.ts +10 -0
  139. package/dist/types/format/useCompact.d.ts +7 -0
  140. package/dist/types/format/useCompact.d.ts.map +1 -0
  141. package/dist/types/format/useCurrency.d.ts +7 -0
  142. package/dist/types/format/useCurrency.d.ts.map +1 -0
  143. package/dist/types/format/useDate.d.ts +10 -0
  144. package/dist/types/format/useDate.d.ts.map +1 -0
  145. package/dist/{format → types/format}/useIntl.d.ts +10 -5
  146. package/dist/types/format/useIntl.d.ts.map +1 -0
  147. package/dist/types/format/useList.d.ts +7 -0
  148. package/dist/types/format/useList.d.ts.map +1 -0
  149. package/dist/types/format/useNumber.d.ts +10 -0
  150. package/dist/types/format/useNumber.d.ts.map +1 -0
  151. package/dist/types/format/usePercentage.d.ts +7 -0
  152. package/dist/types/format/usePercentage.d.ts.map +1 -0
  153. package/dist/types/format/useRelativeTime.d.ts +7 -0
  154. package/dist/types/format/useRelativeTime.d.ts.map +1 -0
  155. package/dist/types/format/useUnit.d.ts +7 -0
  156. package/dist/types/format/useUnit.d.ts.map +1 -0
  157. package/dist/types/getDictionary.d.ts +9 -0
  158. package/dist/types/getDictionary.d.ts.map +1 -0
  159. package/dist/types/getIntlayer.d.ts +8 -0
  160. package/dist/types/getIntlayer.d.ts.map +1 -0
  161. package/dist/types/html/HTMLRenderer.d.ts +21 -0
  162. package/dist/types/html/HTMLRenderer.d.ts.map +1 -0
  163. package/dist/types/html/index.d.ts +4 -0
  164. package/dist/{html → types/html}/installIntlayerHTML.d.ts +18 -13
  165. package/dist/types/html/installIntlayerHTML.d.ts.map +1 -0
  166. package/dist/{html → types/html}/types.d.ts +12 -14
  167. package/dist/types/html/types.d.ts.map +1 -0
  168. package/dist/types/index.d.ts +20 -0
  169. package/dist/types/index.d.ts.map +1 -0
  170. package/dist/types/markdown/MarkdownRenderer.d.ts +32 -0
  171. package/dist/types/markdown/MarkdownRenderer.d.ts.map +1 -0
  172. package/dist/types/markdown/compiler.d.ts +23 -0
  173. package/dist/types/markdown/compiler.d.ts.map +1 -0
  174. package/dist/types/markdown/index.d.ts +4 -0
  175. package/dist/types/markdown/installIntlayerMarkdown.d.ts +71 -0
  176. package/dist/types/markdown/installIntlayerMarkdown.d.ts.map +1 -0
  177. package/dist/types/markdown/runtime.d.ts +16 -0
  178. package/dist/types/markdown/runtime.d.ts.map +1 -0
  179. package/dist/types/plugins.d.ts +80 -0
  180. package/dist/types/plugins.d.ts.map +1 -0
  181. package/dist/types/renderIntlayerNode.d.ts +31 -0
  182. package/dist/types/renderIntlayerNode.d.ts.map +1 -0
  183. package/package.json +10 -13
  184. package/dist/client/index.d.ts +0 -7
  185. package/dist/client/useLocaleStorage.d.ts +0 -31
  186. package/dist/format/index.d.ts +0 -9
  187. package/dist/format/useCompact.d.ts +0 -2
  188. package/dist/format/useCurrency.d.ts +0 -2
  189. package/dist/format/useDate.d.ts +0 -5
  190. package/dist/format/useList.d.ts +0 -2
  191. package/dist/format/useNumber.d.ts +0 -5
  192. package/dist/format/usePercentage.d.ts +0 -2
  193. package/dist/format/useRelativeTime.d.ts +0 -2
  194. package/dist/format/useUnit.d.ts +0 -2
  195. package/dist/getDictionary.d.ts +0 -4
  196. package/dist/getIntlayer.d.ts +0 -3
  197. package/dist/html/HTMLRenderer.d.ts +0 -14
  198. package/dist/html/index.d.ts +0 -3
  199. package/dist/index.d.ts +0 -11
  200. package/dist/installIntlayer-C99qMzFH.mjs +0 -47
  201. package/dist/installIntlayer-CxkE8IxM.js +0 -1
  202. package/dist/markdown/MarkdownRenderer.d.ts +0 -22
  203. package/dist/markdown/compiler.d.ts +0 -19
  204. package/dist/markdown/index.d.ts +0 -3
  205. package/dist/markdown/installIntlayerMarkdown.d.ts +0 -70
  206. package/dist/markdown/runtime.d.ts +0 -12
  207. package/dist/plugins-Bp8aaTny.js +0 -1
  208. package/dist/plugins.d.ts +0 -78
  209. package/dist/renderIntlayerNode.d.ts +0 -22
@@ -1,7 +1,9 @@
1
- import { Dictionary } from '@intlayer/types/dictionary';
2
- import { DictionaryKeys, LocalesValues, StrictModeLocaleMap } from '@intlayer/types/module_augmentation';
3
- import { DeepTransformContent } from '../plugins';
4
- import { WithOnChange } from './useDictionary';
1
+ import { DeepTransformContent } from "../plugins.js";
2
+ import { WithOnChange } from "./useDictionary.js";
3
+ import { DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
4
+ import { Dictionary } from "@intlayer/types/dictionary";
5
+
6
+ //#region src/client/useDictionaryDynamic.d.ts
5
7
  /**
6
8
  * Dynamically load and transform a locale-keyed dictionary.
7
9
  *
@@ -32,4 +34,7 @@ import { WithOnChange } from './useDictionary';
32
34
  * getIntlayerClient().subscribe(() => render());
33
35
  * ```
34
36
  */
35
- export declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys, L extends LocalesValues = LocalesValues>(dictionaryLoaders: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: L) => WithOnChange<DeepTransformContent<T["content"], L>>;
37
+ declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys, L extends LocalesValues = LocalesValues>(dictionaryLoaders: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: L) => WithOnChange<DeepTransformContent<T["content"], L>>;
38
+ //#endregion
39
+ export { useDictionaryDynamic };
40
+ //# sourceMappingURL=useDictionaryDynamic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":";;;;;;;;AAgEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,oBAAA,aACD,UAAA,YACA,cAAA,YACA,aAAA,GAAgB,aAAA,EAE1B,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,CAAA,KACR,YAAA,CAAa,oBAAA,CAAqB,CAAA,aAAc,CAAA"}
@@ -1,6 +1,8 @@
1
- import { DictionaryKeys, DictionaryRegistryContent, LocalesValues } from '@intlayer/types/module_augmentation';
2
- import { DeepTransformContent } from '../plugins';
3
- import { WithOnChange } from './useDictionary';
1
+ import { DeepTransformContent } from "../plugins.js";
2
+ import { WithOnChange } from "./useDictionary.js";
3
+ import { DictionaryKeys, DictionaryRegistryContent, LocalesValues } from "@intlayer/types/module_augmentation";
4
+
5
+ //#region src/client/useIntlayer.d.ts
4
6
  /**
5
7
  * Get the translated content for the given key and optionally subscribe to
6
8
  * locale changes via the chainable `.onChange()` method — mirroring the API
@@ -46,4 +48,7 @@ import { WithOnChange } from './useDictionary';
46
48
  * });
47
49
  * ```
48
50
  */
49
- export declare const useIntlayer: <T extends DictionaryKeys>(key: T, locale?: LocalesValues) => WithOnChange<DeepTransformContent<DictionaryRegistryContent<T>>>;
51
+ declare const useIntlayer: <T extends DictionaryKeys>(key: T, locale?: LocalesValues) => WithOnChange<DeepTransformContent<DictionaryRegistryContent<T>>>;
52
+ //#endregion
53
+ export { useIntlayer };
54
+ //# sourceMappingURL=useIntlayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"mappings":";;;;;;;AAuDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,WAAA,aAAyB,cAAA,EACpC,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,aAAA,KACR,YAAA,CAAa,oBAAA,CAAqB,yBAAA,CAA0B,CAAA"}
@@ -1,7 +1,9 @@
1
- import { DeclaredLocales, LocalesValues } from '@intlayer/types/module_augmentation';
1
+ import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
2
+
3
+ //#region src/client/useLocale.d.ts
2
4
  type UseLocaleProps = {
3
- isCookieEnabled?: boolean;
4
- onLocaleChange?: (locale: LocalesValues) => void;
5
+ isCookieEnabled?: boolean;
6
+ onLocaleChange?: (locale: LocalesValues) => void;
5
7
  };
6
8
  /**
7
9
  * Get the current locale state and locale management utilities.
@@ -30,11 +32,13 @@ type UseLocaleProps = {
30
32
  * });
31
33
  * ```
32
34
  */
33
- export declare const useLocale: (props?: UseLocaleProps) => {
34
- locale: DeclaredLocales;
35
- defaultLocale: DeclaredLocales;
36
- availableLocales: DeclaredLocales[];
37
- setLocale: (newLocale: LocalesValues) => void;
38
- subscribe: (callback: (locale: LocalesValues) => void) => () => void;
35
+ declare const useLocale: (props?: UseLocaleProps) => {
36
+ locale: DeclaredLocales;
37
+ defaultLocale: DeclaredLocales;
38
+ availableLocales: DeclaredLocales[];
39
+ setLocale: (newLocale: LocalesValues) => void;
40
+ subscribe: (callback: (locale: LocalesValues) => void) => () => void;
39
41
  };
40
- export {};
42
+ //#endregion
43
+ export { useLocale };
44
+ //# sourceMappingURL=useLocale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":";;;KAQK,cAAA;EACH,eAAA;EACA,cAAA,IAAkB,MAAA,EAAQ,aAAA;AAAA;;;;;;;;;AA8B5B;;;;;;;;;;;;;;;;;;;cAAa,SAAA,GACX,KAAA,GAAO,cAAA;EAEP,MAAA,EAAQ,eAAA;EACR,aAAA,EAAe,eAAA;EACf,gBAAA,EAAkB,eAAA;EAClB,SAAA,GAAY,SAAA,EAAW,aAAA;EACvB,SAAA,GAAY,QAAA,GAAW,MAAA,EAAQ,aAAA;AAAA"}
@@ -0,0 +1,37 @@
1
+ import { LocalesValues } from "@intlayer/types/module_augmentation";
2
+ import * as _$intlayer from "intlayer";
3
+
4
+ //#region src/client/useLocaleStorage.d.ts
5
+ /**
6
+ * Get the current locale from storage (cookie or localStorage).
7
+ */
8
+ declare const localeInStorage: _$intlayer.Locale;
9
+ /**
10
+ * @deprecated Use localeInStorage instead.
11
+ */
12
+ declare const localeCookie: _$intlayer.Locale;
13
+ /**
14
+ * Persist the locale to storage (cookie and/or localStorage).
15
+ */
16
+ declare const setLocaleInStorage: (locale: LocalesValues, isCookieEnabled: boolean) => void;
17
+ /**
18
+ * @deprecated Use setLocaleInStorage instead.
19
+ */
20
+ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean) => void;
21
+ /**
22
+ * Returns the current locale from storage and a setter.
23
+ */
24
+ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
25
+ localeStorage: _$intlayer.Locale;
26
+ setLocaleStorage: (locale: LocalesValues) => void;
27
+ };
28
+ /**
29
+ * @deprecated Use useLocaleStorage instead.
30
+ */
31
+ declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
32
+ localeStorage: _$intlayer.Locale;
33
+ setLocaleStorage: (locale: LocalesValues) => void;
34
+ };
35
+ //#endregion
36
+ export { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage };
37
+ //# sourceMappingURL=useLocaleStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;cAWa,eAAA,EAAkE,UAAA,CAAnD,MAAA;;;;cAKf,YAAA,EAA8B,UAAA,CAAlB,MAAA;AAAzB;;;AAAA,cAKa,kBAAA,GACX,MAAA,EAAQ,aAAA,EACR,eAAA;;AAFF;;cAYa,eAAA,GAAe,MAAA,EAXlB,aAAA,EAAa,eAAA;;;;cAgBV,gBAAA,GAAoB,eAAA;iBAUhC,UAAA,CAAA,MAAA;6BAAA,aAAA;AAAA;;;;cAKY,eAAA,GAAe,eAAA;iBAAmB,UAAA,CAAA,MAAA;6BAAA,aAAA;AAAA"}
@@ -1,3 +1,4 @@
1
+ //#region src/client/useRewriteURL.d.ts
1
2
  /**
2
3
  * Keep the browser URL in sync with the current locale.
3
4
  *
@@ -20,4 +21,7 @@
20
21
  * unsubscribe();
21
22
  * ```
22
23
  */
23
- export declare const useRewriteURL: () => (() => void);
24
+ declare const useRewriteURL: () => (() => void);
25
+ //#endregion
26
+ export { useRewriteURL };
27
+ //# sourceMappingURL=useRewriteURL.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRewriteURL.d.ts","names":[],"sources":["../../../src/client/useRewriteURL.ts"],"mappings":";;AA8CA;;;;;;;;;;;;;;;;;;;;;cAAa,aAAA"}
@@ -1,3 +1,4 @@
1
+ //#region src/editor/useEditor.d.ts
1
2
  /**
2
3
  * Initialises the Intlayer visual editor client.
3
4
  *
@@ -16,4 +17,7 @@
16
17
  * const stopEditor = useEditor();
17
18
  * ```
18
19
  */
19
- export declare const useEditor: () => (() => void);
20
+ declare const useEditor: () => (() => void);
21
+ //#endregion
22
+ export { useEditor };
23
+ //# sourceMappingURL=useEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEditor.d.ts","names":[],"sources":["../../../src/editor/useEditor.ts"],"mappings":";;AAwBA;;;;;;;;;;;;;;;;;cAAa,SAAA"}
@@ -0,0 +1,10 @@
1
+ import { useCompact } from "./useCompact.js";
2
+ import { useCurrency } from "./useCurrency.js";
3
+ import { useDate } from "./useDate.js";
4
+ import { useIntl } from "./useIntl.js";
5
+ import { useList } from "./useList.js";
6
+ import { useNumber } from "./useNumber.js";
7
+ import { usePercentage } from "./usePercentage.js";
8
+ import { useRelativeTime } from "./useRelativeTime.js";
9
+ import { useUnit } from "./useUnit.js";
10
+ export { useCompact, useCurrency, useDate, useIntl, useList, useNumber, usePercentage, useRelativeTime, useUnit };
@@ -0,0 +1,7 @@
1
+ import { compact } from "@intlayer/core/formatters";
2
+
3
+ //#region src/format/useCompact.d.ts
4
+ declare const useCompact: () => (...args: Parameters<typeof compact>) => string;
5
+ //#endregion
6
+ export { useCompact };
7
+ //# sourceMappingURL=useCompact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":";;;cAGa,UAAA,YAGA,IAAA,EAAM,UAAA,QAAkB,OAAA"}
@@ -0,0 +1,7 @@
1
+ import { currency } from "@intlayer/core/formatters";
2
+
3
+ //#region src/format/useCurrency.d.ts
4
+ declare const useCurrency: () => (...args: Parameters<typeof currency>) => string;
5
+ //#endregion
6
+ export { useCurrency };
7
+ //# sourceMappingURL=useCurrency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":";;;cAGa,WAAA,YAGA,IAAA,EAAM,UAAA,QAAkB,QAAA"}
@@ -0,0 +1,10 @@
1
+ import { date } from "@intlayer/core/formatters";
2
+
3
+ //#region src/format/useDate.d.ts
4
+ /**
5
+ * Vanilla JS hook that provides a localized date/time formatter.
6
+ */
7
+ declare const useDate: () => (...args: Parameters<typeof date>) => string;
8
+ //#endregion
9
+ export { useDate };
10
+ //# sourceMappingURL=useDate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../src/format/useDate.ts"],"mappings":";;;;;AAMA;cAAa,OAAA,YAGA,IAAA,EAAM,UAAA,QAAkB,IAAA"}
@@ -1,5 +1,7 @@
1
- import { WrappedIntl } from '@intlayer/core/utils';
2
- import { LocalesValues } from '@intlayer/types/module_augmentation';
1
+ import { LocalesValues } from "@intlayer/types/module_augmentation";
2
+ import { WrappedIntl } from "@intlayer/core/utils";
3
+
4
+ //#region src/format/useIntl.d.ts
3
5
  /**
4
6
  * Get a locale-bound `Intl` object and subscribe to locale changes.
5
7
  *
@@ -25,7 +27,10 @@ import { LocalesValues } from '@intlayer/types/module_augmentation';
25
27
  * });
26
28
  * ```
27
29
  */
28
- export declare const useIntl: (locale?: LocalesValues) => {
29
- intl: WrappedIntl;
30
- subscribe: (callback: (intl: WrappedIntl) => void) => () => void;
30
+ declare const useIntl: (locale?: LocalesValues) => {
31
+ intl: WrappedIntl;
32
+ subscribe: (callback: (intl: WrappedIntl) => void) => () => void;
31
33
  };
34
+ //#endregion
35
+ export { useIntl };
36
+ //# sourceMappingURL=useIntl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../src/format/useIntl.ts"],"mappings":";;;;;;AA6BA;;;;;;;;;;;;;;;;;;;;;;;cAAa,OAAA,GACX,MAAA,GAAS,aAAA;EAET,IAAA,EAAM,WAAA;EACN,SAAA,GAAY,QAAA,GAAW,IAAA,EAAM,WAAA;AAAA"}
@@ -0,0 +1,7 @@
1
+ import { list } from "@intlayer/core/formatters";
2
+
3
+ //#region src/format/useList.d.ts
4
+ declare const useList: () => (...args: Parameters<typeof list>) => string;
5
+ //#endregion
6
+ export { useList };
7
+ //# sourceMappingURL=useList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":";;;cAGa,OAAA,YAGA,IAAA,EAAM,UAAA,QAAkB,IAAA"}
@@ -0,0 +1,10 @@
1
+ import { number } from "@intlayer/core/formatters";
2
+
3
+ //#region src/format/useNumber.d.ts
4
+ /**
5
+ * Vanilla JS hook that provides a localized number formatter.
6
+ */
7
+ declare const useNumber: () => (...args: Parameters<typeof number>) => string;
8
+ //#endregion
9
+ export { useNumber };
10
+ //# sourceMappingURL=useNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":";;;;;AAMA;cAAa,SAAA,YAGA,IAAA,EAAM,UAAA,QAAkB,MAAA"}
@@ -0,0 +1,7 @@
1
+ import { percentage } from "@intlayer/core/formatters";
2
+
3
+ //#region src/format/usePercentage.d.ts
4
+ declare const usePercentage: () => (...args: Parameters<typeof percentage>) => string;
5
+ //#endregion
6
+ export { usePercentage };
7
+ //# sourceMappingURL=usePercentage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":";;;cAGa,aAAA,YAGA,IAAA,EAAM,UAAA,QAAkB,UAAA"}
@@ -0,0 +1,7 @@
1
+ import { relativeTime } from "@intlayer/core/formatters";
2
+
3
+ //#region src/format/useRelativeTime.d.ts
4
+ declare const useRelativeTime: () => (...args: Parameters<typeof relativeTime>) => string;
5
+ //#endregion
6
+ export { useRelativeTime };
7
+ //# sourceMappingURL=useRelativeTime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";;;cAGa,eAAA,YAGA,IAAA,EAAM,UAAA,QAAkB,YAAA"}
@@ -0,0 +1,7 @@
1
+ import { units } from "@intlayer/core/formatters";
2
+
3
+ //#region src/format/useUnit.d.ts
4
+ declare const useUnit: () => (...args: Parameters<typeof units>) => string;
5
+ //#endregion
6
+ export { useUnit };
7
+ //# sourceMappingURL=useUnit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";;;cAGa,OAAA,YAGA,IAAA,EAAM,UAAA,QAAkB,KAAA"}
@@ -0,0 +1,9 @@
1
+ import { DeepTransformContent } from "./plugins.js";
2
+ import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
3
+ import { Dictionary } from "@intlayer/types/dictionary";
4
+
5
+ //#region src/getDictionary.d.ts
6
+ declare const getDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => DeepTransformContent<T["content"], L>;
7
+ //#endregion
8
+ export { getDictionary };
9
+ //# sourceMappingURL=getDictionary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"mappings":";;;;;cAQa,aAAA,aACD,UAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,UAAA,EAAY,CAAA,EACZ,MAAA,GAAS,CAAA,KACR,oBAAA,CAAqB,CAAA,aAAc,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { DeepTransformContent } from "./plugins.js";
2
+ import { DeclaredLocales, DictionaryKeys, DictionaryRegistryContent, LocalesValues } from "@intlayer/types/module_augmentation";
3
+
4
+ //#region src/getIntlayer.d.ts
5
+ declare const getIntlayer: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(key: T, locale?: L) => DeepTransformContent<DictionaryRegistryContent<T>, L>;
6
+ //#endregion
7
+ export { getIntlayer };
8
+ //# sourceMappingURL=getIntlayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"mappings":";;;;cASa,WAAA,aACD,cAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,CAAA,KACR,oBAAA,CAAqB,yBAAA,CAA0B,CAAA,GAAI,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { HTMLComponents } from "./types.js";
2
+
3
+ //#region src/html/HTMLRenderer.d.ts
4
+ type RenderHTMLProps = {
5
+ components?: HTMLComponents<'permissive', {}>;
6
+ };
7
+ /**
8
+ * Renders an HTML string directly, without a global provider.
9
+ * Returns the raw string unchanged.
10
+ */
11
+ declare const renderHTML: (content: string, _props?: RenderHTMLProps) => string;
12
+ /**
13
+ * Returns a render function that uses the global provider's configuration
14
+ * (installed via `installIntlayerHTML`), falling back to identity.
15
+ */
16
+ declare const useHTMLRenderer: ({
17
+ components
18
+ }?: RenderHTMLProps) => ((content: string) => string);
19
+ //#endregion
20
+ export { RenderHTMLProps, renderHTML, useHTMLRenderer };
21
+ //# sourceMappingURL=HTMLRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HTMLRenderer.d.ts","names":[],"sources":["../../../src/html/HTMLRenderer.ts"],"mappings":";;;KAGY,eAAA;EACV,UAAA,GAAa,cAAA;AAAA;;;;;cAOF,UAAA,GACX,OAAA,UACA,MAAA,GAAQ,eAAA;;;;;cAOG,eAAA;EAAmB;AAAA,IAE7B,eAAA,OAAyB,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { HTMLComponents } from "./types.js";
2
+ import { RenderHTMLProps, renderHTML, useHTMLRenderer } from "./HTMLRenderer.js";
3
+ import { IntlayerHTMLPluginOptions, IntlayerHTMLProvider, RenderHTMLFunction, RenderHTMLOptions, installIntlayerHTML, installIntlayerHTMLDynamic, useHTML } from "./installIntlayerHTML.js";
4
+ export { type HTMLComponents, type IntlayerHTMLPluginOptions, type IntlayerHTMLProvider, type RenderHTMLFunction, type RenderHTMLOptions, type RenderHTMLProps, installIntlayerHTML, installIntlayerHTMLDynamic, renderHTML, useHTML, useHTMLRenderer };
@@ -1,19 +1,21 @@
1
- import { HTMLComponents } from './types';
2
- export type RenderHTMLOptions = {
3
- components?: HTMLComponents<'permissive', {}>;
1
+ import { HTMLComponents } from "./types.js";
2
+
3
+ //#region src/html/installIntlayerHTML.d.ts
4
+ type RenderHTMLOptions = {
5
+ components?: HTMLComponents<'permissive', {}>;
4
6
  };
5
- export type RenderHTMLFunction = (html: string, overrides?: HTMLComponents<'permissive', {}> | RenderHTMLOptions) => string;
6
- export type IntlayerHTMLProvider = {
7
- renderHTML: RenderHTMLFunction;
7
+ type RenderHTMLFunction = (html: string, overrides?: HTMLComponents<'permissive', {}> | RenderHTMLOptions) => string;
8
+ type IntlayerHTMLProvider = {
9
+ renderHTML: RenderHTMLFunction;
8
10
  };
9
- export type IntlayerHTMLPluginOptions = {
10
- components?: HTMLComponents<'permissive', {}>;
11
- renderHTML?: RenderHTMLFunction;
11
+ type IntlayerHTMLPluginOptions = {
12
+ components?: HTMLComponents<'permissive', {}>;
13
+ renderHTML?: RenderHTMLFunction;
12
14
  };
13
15
  /**
14
16
  * Create and return a single IntlayerHTMLProvider instance.
15
17
  */
16
- export declare const createIntlayerHTMLClient: (renderHTML: RenderHTMLFunction) => IntlayerHTMLProvider;
18
+ declare const createIntlayerHTMLClient: (renderHTML: RenderHTMLFunction) => IntlayerHTMLProvider;
17
19
  /**
18
20
  * Install the Intlayer HTML provider for your vanilla JS application.
19
21
  *
@@ -28,13 +30,13 @@ export declare const createIntlayerHTMLClient: (renderHTML: RenderHTMLFunction)
28
30
  * });
29
31
  * ```
30
32
  */
31
- export declare const installIntlayerHTML: (pluginOptions?: IntlayerHTMLPluginOptions | RenderHTMLFunction) => IntlayerHTMLProvider;
33
+ declare const installIntlayerHTML: (pluginOptions?: IntlayerHTMLPluginOptions | RenderHTMLFunction) => IntlayerHTMLProvider;
32
34
  /**
33
35
  * Access the installed IntlayerHTMLProvider.
34
36
  * Returns a fallback renderer that outputs the raw HTML string if no
35
37
  * provider has been installed.
36
38
  */
37
- export declare const useHTML: () => IntlayerHTMLProvider;
39
+ declare const useHTML: () => IntlayerHTMLProvider;
38
40
  /**
39
41
  * Asynchronously install an HTML renderer whose implementation is loaded
40
42
  * via a dynamic `import()`.
@@ -59,4 +61,7 @@ export declare const useHTML: () => IntlayerHTMLProvider;
59
61
  * });
60
62
  * ```
61
63
  */
62
- export declare const installIntlayerHTMLDynamic: (loader: () => Promise<IntlayerHTMLPluginOptions | RenderHTMLFunction>) => Promise<IntlayerHTMLProvider>;
64
+ declare const installIntlayerHTMLDynamic: (loader: () => Promise<IntlayerHTMLPluginOptions | RenderHTMLFunction>) => Promise<IntlayerHTMLProvider>;
65
+ //#endregion
66
+ export { IntlayerHTMLPluginOptions, IntlayerHTMLProvider, RenderHTMLFunction, RenderHTMLOptions, createIntlayerHTMLClient, installIntlayerHTML, installIntlayerHTMLDynamic, useHTML };
67
+ //# sourceMappingURL=installIntlayerHTML.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installIntlayerHTML.d.ts","names":[],"sources":["../../../src/html/installIntlayerHTML.ts"],"mappings":";;;KAEY,iBAAA;EACV,UAAA,GAAa,cAAA;AAAA;AAAA,KAGH,kBAAA,IACV,IAAA,UACA,SAAA,GAAY,cAAA,qBAAmC,iBAAA;AAAA,KAQrC,oBAAA;EACV,UAAA,EAAY,kBAAA;AAAA;AAAA,KAGF,yBAAA;EACV,UAAA,GAAa,cAAA;EACb,UAAA,GAAa,kBAAA;AAAA;;;;cAMF,wBAAA,GACX,UAAA,EAAY,kBAAA,KACX,oBAAA;;;AAdH;;;;;AAIA;;;;;;;cA8Ba,mBAAA,GACX,aAAA,GAAgB,yBAAA,GAA4B,kBAAA,KAC3C,oBAAA;;;AAxBH;;;cAmEa,OAAA,QAAc,oBAAA;;;;;;AA7C3B;;;;;;;;;;;;;;AA6CA;;;;;cA6Ba,0BAAA,GACX,MAAA,QAAc,OAAA,CAAQ,yBAAA,GAA4B,kBAAA,MACjD,OAAA,CAAQ,oBAAA"}
@@ -1,4 +1,6 @@
1
- import { HTMLTagsType } from '@intlayer/core/transpiler';
1
+ import { HTMLTagsType } from "@intlayer/core/transpiler";
2
+
3
+ //#region src/html/types.d.ts
2
4
  /**
3
5
  * Helper to extract specific props from the configuration value.
4
6
  */
@@ -8,7 +10,7 @@ type PropsFromConfig<Value> = Value extends true ? {} : Value extends object ? V
8
10
  * Components receive these as a plain object and return an HTML string.
9
11
  */
10
12
  type ElementProps = Record<string, unknown> & {
11
- children?: string;
13
+ children?: string;
12
14
  };
13
15
  /**
14
16
  * Vanilla component type — a function that takes props and returns a string of HTML.
@@ -17,26 +19,22 @@ type VanillaHTMLComponent<P = {}> = (props: P & ElementProps) => string;
17
19
  /**
18
20
  * Helper: Defines the mapping for the explicitly listed keys in T.
19
21
  */
20
- type DefinedComponents<T, IsRequired extends boolean> = IsRequired extends true ? {
21
- [K in keyof T]: VanillaHTMLComponent<PropsFromConfig<T[K]>>;
22
- } : {
23
- [K in keyof T]?: VanillaHTMLComponent<PropsFromConfig<T[K]>>;
24
- };
22
+ type DefinedComponents<T, IsRequired extends boolean> = IsRequired extends true ? { [K in keyof T]: VanillaHTMLComponent<PropsFromConfig<T[K]>> } : { [K in keyof T]?: VanillaHTMLComponent<PropsFromConfig<T[K]>> };
25
23
  /**
26
24
  * Helper: Defines the standard HTML tags NOT listed in T.
27
25
  */
28
- type RestHTMLComponents<T> = {
29
- [K in Exclude<keyof HTMLTagsType, keyof T>]?: VanillaHTMLComponent;
30
- };
26
+ type RestHTMLComponents<T> = { [K in Exclude<keyof HTMLTagsType, keyof T>]?: VanillaHTMLComponent };
31
27
  /**
32
28
  * The supported modes for the HTMLComponents type.
33
29
  */
34
- export type HTMLComponentMode = 'permissive' | 'optional' | 'inclusive' | 'strict';
30
+ type HTMLComponentMode = 'permissive' | 'optional' | 'inclusive' | 'strict';
35
31
  /**
36
32
  * Component map for HTML rendering in vanilla JS.
37
33
  * Each component receives props and children and returns an HTML string.
38
34
  */
39
- export type HTMLComponents<Mode extends HTMLComponentMode = 'optional', T = {}> = Mode extends 'strict' ? DefinedComponents<T, true> : Mode extends 'inclusive' ? DefinedComponents<T, true> & RestHTMLComponents<T> : Mode extends 'permissive' ? DefinedComponents<T, false> & RestHTMLComponents<T> & {
40
- [key: string]: VanillaHTMLComponent;
35
+ type HTMLComponents<Mode extends HTMLComponentMode = 'optional', T = {}> = Mode extends 'strict' ? DefinedComponents<T, true> : Mode extends 'inclusive' ? DefinedComponents<T, true> & RestHTMLComponents<T> : Mode extends 'permissive' ? DefinedComponents<T, false> & RestHTMLComponents<T> & {
36
+ [key: string]: VanillaHTMLComponent;
41
37
  } : DefinedComponents<T, false> & RestHTMLComponents<T>;
42
- export {};
38
+ //#endregion
39
+ export { HTMLComponentMode, HTMLComponents };
40
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/html/types.ts"],"mappings":";;;;;AAA8D;KAKzD,eAAA,UAAyB,KAAA,qBAE1B,KAAA,kBACE,KAAA;;;;;KAOD,YAAA,GAAe,MAAA;EAClB,QAAA;AAAA;;;;KAMG,oBAAA,YAAgC,KAAA,EAAO,CAAA,GAAI,YAAA;;AAdrC;;KAmBN,iBAAA,kCAAmD,UAAA,8BAEtC,CAAA,GAAI,oBAAA,CAAqB,eAAA,CAAgB,CAAA,CAAE,CAAA,sBAG3C,CAAA,IAAK,oBAAA,CAAqB,eAAA,CAAgB,CAAA,CAAE,CAAA;;;;KAMzD,kBAAA,cACG,OAAA,OAAc,YAAA,QAAoB,CAAA,KAAM,oBAAA;;;AAjBY;KAuBhD,iBAAA;;;;;KAUA,cAAA,cACG,iBAAA,yBAEX,IAAA,oBACA,iBAAA,CAAkB,CAAA,UAClB,IAAA,uBACE,iBAAA,CAAkB,CAAA,UAAW,kBAAA,CAAmB,CAAA,IAChD,IAAA,wBACE,iBAAA,CAAkB,CAAA,WAChB,kBAAA,CAAmB,CAAA;EAAA,CAChB,GAAA,WAAc,oBAAA;AAAA,IAEnB,iBAAA,CAAkB,CAAA,WAAY,kBAAA,CAAmB,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { IntlayerClient, createIntlayerClient, getIntlayerClient, installIntlayer } from "./client/installIntlayer.js";
2
+ import { DeepTransformContent, HTMLPluginCond, IInterpreterPluginState, IInterpreterPluginVanilla, InsertionCond, IntlayerNode, IntlayerNodeCond, MarkdownCond, MarkdownStringCond, getPlugins, htmlPlugin, insertionPlugin, intlayerNodePlugins, markdownPlugin, markdownStringPlugin } from "./plugins.js";
3
+ import { WithOnChange, useDictionary } from "./client/useDictionary.js";
4
+ import { useDictionaryDynamic } from "./client/useDictionaryDynamic.js";
5
+ import { useIntlayer } from "./client/useIntlayer.js";
6
+ import { useLocale } from "./client/useLocale.js";
7
+ import { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage } from "./client/useLocaleStorage.js";
8
+ import { useRewriteURL } from "./client/useRewriteURL.js";
9
+ import { useEditor } from "./editor/useEditor.js";
10
+ import { getDictionary } from "./getDictionary.js";
11
+ import { getIntlayer } from "./getIntlayer.js";
12
+ import { LocalesValues } from "@intlayer/types/module_augmentation";
13
+
14
+ //#region src/index.d.ts
15
+ declare module '@intlayer/core/interpreter' {
16
+ interface IInterpreterPlugin<T, S, L extends LocalesValues> extends IInterpreterPluginVanilla<T, S, L> {}
17
+ }
18
+ //#endregion
19
+ export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginState, IInterpreterPluginVanilla, InsertionCond, IntlayerClient, IntlayerNode, IntlayerNodeCond, MarkdownCond, MarkdownStringCond, WithOnChange, createIntlayerClient, getDictionary, getIntlayer, getIntlayerClient, getPlugins, htmlPlugin, insertionPlugin, installIntlayer, intlayerNodePlugins, localeCookie, localeInStorage, markdownPlugin, markdownStringPlugin, setLocaleCookie, setLocaleInStorage, useDictionary, useDictionaryDynamic, useEditor, useIntlayer, useLocale, useLocaleCookie, useLocaleStorage, useRewriteURL };
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;;;YAIY,kBAAA,iBAAmC,aAAA,UACnC,yBAAA,CAA0B,CAAA,EAAG,CAAA,EAAG,CAAA;AAAA"}
@@ -0,0 +1,32 @@
1
+ import { HTMLComponents } from "../html/types.js";
2
+ import { MarkdownProviderOptions } from "./installIntlayerMarkdown.js";
3
+
4
+ //#region src/markdown/MarkdownRenderer.d.ts
5
+ type RenderMarkdownProps = MarkdownProviderOptions & {
6
+ components?: HTMLComponents<'permissive', {}>;
7
+ wrapper?: string;
8
+ };
9
+ /**
10
+ * Renders markdown to an HTML string without using the global provider.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { renderMarkdown } from 'vanilla-intlayer/markdown';
15
+ *
16
+ * document.querySelector('#content').innerHTML = renderMarkdown('# Hello **World**');
17
+ * ```
18
+ */
19
+ declare const renderMarkdown: (content: string, {
20
+ forceBlock,
21
+ forceInline,
22
+ preserveFrontmatter,
23
+ tagfilter
24
+ }?: RenderMarkdownProps) => string;
25
+ /**
26
+ * Returns a render function that uses the global provider's configuration
27
+ * (installed via `installIntlayerMarkdown`), falling back to `compileMarkdown`.
28
+ */
29
+ declare const useMarkdownRenderer: (props?: RenderMarkdownProps) => ((content: string) => string | Promise<string>);
30
+ //#endregion
31
+ export { RenderMarkdownProps, renderMarkdown, useMarkdownRenderer };
32
+ //# sourceMappingURL=MarkdownRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.d.ts","names":[],"sources":["../../../src/markdown/MarkdownRenderer.ts"],"mappings":";;;;KAQY,mBAAA,GAAsB,uBAAA;EAChC,UAAA,GAAa,cAAA;EACb,OAAA;AAAA;;;;;;;;;AAaF;;cAAa,cAAA,GACX,OAAA;EACA,UAAA;EAAA,WAAA;EAAA,mBAAA;EAAA;AAAA,IAKG,mBAAA;;;;;cAeQ,mBAAA,GACX,KAAA,GAAO,mBAAA,OACJ,OAAA,sBAA6B,OAAA"}
@@ -0,0 +1,23 @@
1
+ import { CompileOptions, RuleType, sanitizer as defaultSanitizer, slugify as defaultSlugify } from "@intlayer/core/markdown";
2
+
3
+ //#region src/markdown/compiler.d.ts
4
+ type MarkdownCompilerOptions = CompileOptions;
5
+ /**
6
+ * Compile markdown to an HTML string.
7
+ *
8
+ * The resulting string can be inserted into the DOM via `element.innerHTML`
9
+ * or the `renderMarkdown` helper.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * import { compileMarkdown } from 'vanilla-intlayer/markdown';
14
+ *
15
+ * document.querySelector('#content').innerHTML = compileMarkdown('# Hello **World**');
16
+ * ```
17
+ */
18
+ declare const compileMarkdown: (markdown?: string, options?: MarkdownCompilerOptions) => string;
19
+ declare const compiler: (markdown?: string, options?: MarkdownCompilerOptions) => string;
20
+ declare const compile: (markdown?: string, options?: MarkdownCompilerOptions) => string;
21
+ //#endregion
22
+ export { MarkdownCompilerOptions, RuleType, compile, compileMarkdown, compiler, defaultSanitizer as sanitizer, defaultSlugify as slugify };
23
+ //# sourceMappingURL=compiler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compiler.d.ts","names":[],"sources":["../../../src/markdown/compiler.ts"],"mappings":";;;KAmBY,uBAAA,GAA0B,cAAA;;;;;;;;;AAqBtC;;;;;cANa,eAAA,GACX,QAAA,WACA,OAAA,GAAS,uBAAA;AAAA,cAIE,QAAA,GAAQ,QAAA,WAAA,OAAA,GAJV,uBAAA;AAAA,cAKE,OAAA,GAAO,QAAA,WAAA,OAAA,GALT,uBAAA"}
@@ -0,0 +1,4 @@
1
+ import { IntlayerMarkdownPluginOptions, IntlayerMarkdownProvider, MarkdownProviderOptions, RenderMarkdownFunction, installIntlayerMarkdown, installIntlayerMarkdownDynamic, useMarkdown } from "./installIntlayerMarkdown.js";
2
+ import { RenderMarkdownProps, renderMarkdown, useMarkdownRenderer } from "./MarkdownRenderer.js";
3
+ import { compileMarkdown } from "./compiler.js";
4
+ export { type IntlayerMarkdownPluginOptions, type IntlayerMarkdownProvider, type MarkdownProviderOptions, type RenderMarkdownFunction, type RenderMarkdownProps, compileMarkdown, installIntlayerMarkdown, installIntlayerMarkdownDynamic, renderMarkdown, useMarkdown, useMarkdownRenderer };