@intlayer/design-system 4.0.2 → 4.0.4

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 (240) hide show
  1. package/README.md +1 -1
  2. package/dist/.vite/manifest.json +58 -197
  3. package/dist/components/Accordion/Accordion.cjs +1 -1
  4. package/dist/components/Accordion/Accordion.cjs.map +1 -1
  5. package/dist/components/Accordion/Accordion.mjs +1 -1
  6. package/dist/components/Accordion/Accordion.mjs.map +1 -1
  7. package/dist/components/Auth/AuthModal/index.cjs +1 -1
  8. package/dist/components/Auth/AuthModal/index.mjs +1 -1
  9. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +2 -1
  10. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
  11. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +2 -1
  12. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
  13. package/dist/components/Auth/useAuth/index.cjs +8 -4
  14. package/dist/components/Auth/useAuth/index.cjs.map +1 -1
  15. package/dist/components/Auth/useAuth/index.d.ts +3 -1
  16. package/dist/components/Auth/useAuth/index.d.ts.map +1 -1
  17. package/dist/components/Auth/useAuth/index.mjs +8 -4
  18. package/dist/components/Auth/useAuth/index.mjs.map +1 -1
  19. package/dist/components/Auth/useAuth/useCSRF.cjs +6 -3
  20. package/dist/components/Auth/useAuth/useCSRF.cjs.map +1 -1
  21. package/dist/components/Auth/useAuth/useCSRF.d.ts +2 -1
  22. package/dist/components/Auth/useAuth/useCSRF.d.ts.map +1 -1
  23. package/dist/components/Auth/useAuth/useCSRF.mjs +5 -2
  24. package/dist/components/Auth/useAuth/useCSRF.mjs.map +1 -1
  25. package/dist/components/Auth/useAuth/useOAuth2.cjs +6 -5
  26. package/dist/components/Auth/useAuth/useOAuth2.cjs.map +1 -1
  27. package/dist/components/Auth/useAuth/useOAuth2.d.ts +2 -1
  28. package/dist/components/Auth/useAuth/useOAuth2.d.ts.map +1 -1
  29. package/dist/components/Auth/useAuth/useOAuth2.mjs +5 -4
  30. package/dist/components/Auth/useAuth/useOAuth2.mjs.map +1 -1
  31. package/dist/components/Auth/useAuth/useSession.cjs +6 -3
  32. package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
  33. package/dist/components/Auth/useAuth/useSession.d.ts +2 -1
  34. package/dist/components/Auth/useAuth/useSession.d.ts.map +1 -1
  35. package/dist/components/Auth/useAuth/useSession.mjs +6 -3
  36. package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
  37. package/dist/components/Auth/useUser/index.cjs +1 -1
  38. package/dist/components/Auth/useUser/index.mjs +1 -1
  39. package/dist/components/Container/index.d.ts +2 -2
  40. package/dist/components/DictionaryEditor/DictionaryEditor.cjs +4 -16
  41. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  42. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
  43. package/dist/components/DictionaryEditor/DictionaryEditor.mjs +4 -16
  44. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  45. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs +2 -1
  46. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs.map +1 -1
  47. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.d.ts.map +1 -1
  48. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +2 -1
  49. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs.map +1 -1
  50. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs +1 -1
  51. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +1 -1
  52. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs +2 -1
  53. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs.map +1 -1
  54. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.d.ts.map +1 -1
  55. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +2 -1
  56. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs.map +1 -1
  57. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +3 -3
  58. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
  59. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts.map +1 -1
  60. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +2 -2
  61. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
  62. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs +1 -1
  63. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs +1 -1
  64. package/dist/components/DictionaryEditor/NodeWrapper/index.cjs +1 -1
  65. package/dist/components/DictionaryEditor/NodeWrapper/index.mjs +1 -1
  66. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +2 -9
  67. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  68. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
  69. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +2 -9
  70. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  71. package/dist/components/DictionaryEditor/index.cjs +0 -8
  72. package/dist/components/DictionaryEditor/index.cjs.map +1 -1
  73. package/dist/components/DictionaryEditor/index.d.ts +0 -2
  74. package/dist/components/DictionaryEditor/index.d.ts.map +1 -1
  75. package/dist/components/DictionaryEditor/index.mjs +1 -9
  76. package/dist/components/DictionaryEditor/index.mjs.map +1 -1
  77. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +1 -1
  78. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +3 -21
  79. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  80. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
  81. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +3 -21
  82. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  83. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +4 -2
  84. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
  85. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +4 -2
  86. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
  87. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +4 -2
  88. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  89. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +4 -2
  90. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  91. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +5 -31
  92. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  93. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  94. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +6 -32
  95. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  96. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +8 -37
  97. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
  98. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
  99. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +6 -35
  100. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
  101. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +6 -24
  102. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
  103. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
  104. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +5 -23
  105. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
  106. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +2 -29
  107. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
  108. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
  109. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +2 -29
  110. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
  111. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +9 -33
  112. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  113. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
  114. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +4 -28
  115. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  116. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +3 -43
  117. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
  118. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
  119. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +3 -43
  120. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
  121. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +4 -27
  122. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  123. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
  124. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +3 -26
  125. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  126. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +9 -19
  127. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  128. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  129. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +9 -19
  130. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  131. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +2 -2
  132. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +2 -2
  133. package/dist/components/EditableField/EditableFieldLayout.cjs +7 -3
  134. package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
  135. package/dist/components/EditableField/EditableFieldLayout.d.ts.map +1 -1
  136. package/dist/components/EditableField/EditableFieldLayout.mjs +7 -3
  137. package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
  138. package/dist/components/IDE/CodeContext.cjs +2 -2
  139. package/dist/components/IDE/CodeContext.mjs +2 -2
  140. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +2 -2
  141. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -2
  142. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +2 -2
  143. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +2 -2
  144. package/dist/components/Modal/Modal.cjs +12 -8
  145. package/dist/components/Modal/Modal.cjs.map +1 -1
  146. package/dist/components/Modal/Modal.d.ts.map +1 -1
  147. package/dist/components/Modal/Modal.mjs +12 -8
  148. package/dist/components/Modal/Modal.mjs.map +1 -1
  149. package/dist/components/Navbar/MobileNavbar.cjs +3 -3
  150. package/dist/components/Navbar/MobileNavbar.mjs +3 -3
  151. package/dist/components/Navbar/index.cjs +2 -2
  152. package/dist/components/Navbar/index.mjs +2 -2
  153. package/dist/components/RightDrawer/RightDrawer.cjs +34 -18
  154. package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
  155. package/dist/components/RightDrawer/RightDrawer.d.ts.map +1 -1
  156. package/dist/components/RightDrawer/RightDrawer.mjs +33 -17
  157. package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
  158. package/dist/components/SwitchSelector/index.cjs +2 -2
  159. package/dist/components/SwitchSelector/index.mjs +2 -2
  160. package/dist/components/TabSelector/TabSelector.cjs +2 -2
  161. package/dist/components/TabSelector/TabSelector.mjs +2 -2
  162. package/dist/components/index.cjs +0 -8
  163. package/dist/components/index.cjs.map +1 -1
  164. package/dist/components/index.mjs +0 -8
  165. package/dist/components/index.mjs.map +1 -1
  166. package/dist/hooks/index.cjs +1 -1
  167. package/dist/hooks/index.mjs +2 -2
  168. package/dist/hooks/intlayerAPIHooks.cjs +5 -1
  169. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  170. package/dist/hooks/intlayerAPIHooks.d.ts +49 -49
  171. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  172. package/dist/hooks/intlayerAPIHooks.mjs +5 -1
  173. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  174. package/dist/hooks/useAsync/useAsync.cjs +14 -0
  175. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  176. package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
  177. package/dist/hooks/useAsync/useAsync.mjs +14 -0
  178. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  179. package/dist/hooks/useGetAllDictionaries.cjs +3 -2
  180. package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
  181. package/dist/hooks/useGetAllDictionaries.d.ts +2 -2
  182. package/dist/hooks/useGetAllDictionaries.d.ts.map +1 -1
  183. package/dist/hooks/useGetAllDictionaries.mjs +3 -2
  184. package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
  185. package/dist/hooks/useIntlayerAPI.cjs +10 -7
  186. package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
  187. package/dist/hooks/useIntlayerAPI.d.ts +8 -2
  188. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  189. package/dist/hooks/useIntlayerAPI.mjs +10 -7
  190. package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
  191. package/dist/hooks/usePersistedStore.cjs +25 -15
  192. package/dist/hooks/usePersistedStore.cjs.map +1 -1
  193. package/dist/hooks/usePersistedStore.d.ts +2 -1
  194. package/dist/hooks/usePersistedStore.d.ts.map +1 -1
  195. package/dist/hooks/usePersistedStore.mjs +26 -16
  196. package/dist/hooks/usePersistedStore.mjs.map +1 -1
  197. package/dist/hooks/useScrollBlockage/index.cjs +5 -31
  198. package/dist/hooks/useScrollBlockage/index.cjs.map +1 -1
  199. package/dist/hooks/useScrollBlockage/index.mjs +5 -31
  200. package/dist/hooks/useScrollBlockage/index.mjs.map +1 -1
  201. package/dist/hooks/useScrollDetection.cjs +1 -1
  202. package/dist/hooks/useScrollDetection.mjs +1 -1
  203. package/dist/index-B-VAyQ9R.js +673 -0
  204. package/dist/index-B-VAyQ9R.js.map +1 -0
  205. package/dist/index-B-adg6xa.js +206 -0
  206. package/dist/index-B-adg6xa.js.map +1 -0
  207. package/dist/index-BIV0x_z2.js +206 -0
  208. package/dist/index-BIV0x_z2.js.map +1 -0
  209. package/dist/index-BNH9wXVj.cjs +205 -0
  210. package/dist/index-BNH9wXVj.cjs.map +1 -0
  211. package/dist/index-Cg-S9ry9.cjs +77 -0
  212. package/dist/index-Cg-S9ry9.cjs.map +1 -0
  213. package/dist/index-D69JRZcQ.js +206 -0
  214. package/dist/index-D69JRZcQ.js.map +1 -0
  215. package/dist/index-DAsui9u9.cjs +205 -0
  216. package/dist/index-DAsui9u9.cjs.map +1 -0
  217. package/dist/index-O_7rYrbW.js +78 -0
  218. package/dist/index-O_7rYrbW.js.map +1 -0
  219. package/dist/index-SOIahRpS.cjs +205 -0
  220. package/dist/index-SOIahRpS.cjs.map +1 -0
  221. package/dist/index-T-TjVQoD.js +671 -0
  222. package/dist/index-T-TjVQoD.js.map +1 -0
  223. package/dist/index-f8_VC6c8.cjs +672 -0
  224. package/dist/index-f8_VC6c8.cjs.map +1 -0
  225. package/dist/index-llGIfxqV.cjs +670 -0
  226. package/dist/index-llGIfxqV.cjs.map +1 -0
  227. package/dist/tailwind.css +1 -1
  228. package/dist/useGetAllDictionaries-B1sqs2IB.cjs +34 -0
  229. package/dist/useGetAllDictionaries-B1sqs2IB.cjs.map +1 -0
  230. package/dist/useGetAllDictionaries-BbH8vTkY.js +35 -0
  231. package/dist/useGetAllDictionaries-BbH8vTkY.js.map +1 -0
  232. package/dist/useGetAllDictionaries-Bgkytpa2.cjs +34 -0
  233. package/dist/useGetAllDictionaries-Bgkytpa2.cjs.map +1 -0
  234. package/dist/useGetAllDictionaries-D8ma3h41.cjs +33 -0
  235. package/dist/useGetAllDictionaries-D8ma3h41.cjs.map +1 -0
  236. package/dist/useGetAllDictionaries-DHgHEbD5.js +34 -0
  237. package/dist/useGetAllDictionaries-DHgHEbD5.js.map +1 -0
  238. package/dist/useGetAllDictionaries-DUzm0rIa.js +35 -0
  239. package/dist/useGetAllDictionaries-DUzm0rIa.js.map +1 -0
  240. package/package.json +24 -16
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetAllDictionaries-DHgHEbD5.js","sources":["../src/hooks/useGetAllDictionaries.tsx"],"sourcesContent":["'use client';\n\n/**\n * @intlayer/dictionaries-entry is a package that only returns the dictionary entry path.\n * Using an external package allow to alias it in the bundle configuration (such as webpack).\n * The alias allow hot reload the app (such as nextjs) on any dictionary change.\n */\nimport { Dictionary } from '@intlayer/core';\nimport localeDictionaries from '@intlayer/dictionaries-entry';\nimport merge from 'deepmerge';\nimport { useMemo } from 'react';\nimport { useGetDictionaries } from './intlayerAPIHooks';\n\ntype Args = Parameters<typeof useGetDictionaries>;\n\nexport const useGetAllDictionaries = (...props: Args) => {\n const { data: onlineDictionariesAPI, isWaitingData } = useGetDictionaries(\n ...props\n );\n\n const onlineDictionaries: Record<string, Dictionary> = useMemo(\n () =>\n (onlineDictionariesAPI?.data ?? []).reduce(\n (acc, dictionary) => {\n acc[dictionary.key] = dictionary;\n return acc;\n },\n {} as Record<string, Dictionary>\n ),\n [onlineDictionariesAPI]\n );\n\n const allDictionaries: Record<string, Dictionary> = useMemo(\n () => merge(onlineDictionaries ?? {}, localeDictionaries),\n [onlineDictionaries]\n );\n\n return {\n online: onlineDictionaries,\n locale: localeDictionaries,\n all: allDictionaries,\n isLoading: isWaitingData,\n };\n};\n"],"names":[],"mappings":";;;;;AAea,MAAA,wBAAwB,IAAI,UAAgB;AACvD,QAAM,EAAE,MAAM,uBAAuB,cAAkB,IAAA;AAAA,IACrD,GAAG;AAAA,EACL;AAEA,QAAM,qBAAiD;AAAA,IACrD,OACG,uBAAuB,QAAQ,CAAA,GAAI;AAAA,MAClC,CAAC,KAAK,eAAe;AACf,YAAA,WAAW,GAAG,IAAI;AACf,eAAA;AAAA,MACT;AAAA,MACA,CAAA;AAAA,IACF;AAAA,IACF,CAAC,qBAAqB;AAAA,EACxB;AAEA,QAAM,kBAA8C;AAAA,IAClD,MAAM,MAAM,sBAAsB,IAAI,kBAAkB;AAAA,IACxD,CAAC,kBAAkB;AAAA,EACrB;AAEO,SAAA;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,WAAW;AAAA,EACb;AACF;"}
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { useDictionariesRecord } from "@intlayer/editor-react";
3
+ import merge from "deepmerge";
4
+ import { useMemo } from "react";
5
+ import { useGetDictionaries } from "./hooks/intlayerAPIHooks.mjs";
6
+ const useGetAllDictionaries = (...props) => {
7
+ const { localeDictionaries } = useDictionariesRecord();
8
+ const { data: onlineDictionariesAPI, isWaitingData } = useGetDictionaries(
9
+ ...props
10
+ );
11
+ const onlineDictionaries = useMemo(
12
+ () => (onlineDictionariesAPI?.data ?? []).reduce(
13
+ (acc, dictionary) => {
14
+ acc[dictionary.key] = dictionary;
15
+ return acc;
16
+ },
17
+ {}
18
+ ),
19
+ [onlineDictionariesAPI]
20
+ );
21
+ const allDictionaries = useMemo(
22
+ () => merge(onlineDictionaries ?? {}, localeDictionaries),
23
+ [onlineDictionaries]
24
+ );
25
+ return {
26
+ online: onlineDictionaries,
27
+ locale: localeDictionaries,
28
+ all: allDictionaries,
29
+ isLoading: isWaitingData
30
+ };
31
+ };
32
+ export {
33
+ useGetAllDictionaries as u
34
+ };
35
+ //# sourceMappingURL=useGetAllDictionaries-DUzm0rIa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetAllDictionaries-DUzm0rIa.js","sources":["../src/hooks/useGetAllDictionaries.tsx"],"sourcesContent":["'use client';\n\n/**\n * @intlayer/dictionaries-entry is a package that only returns the dictionary entry path.\n * Using an external package allow to alias it in the bundle configuration (such as webpack).\n * The alias allow hot reload the app (such as nextjs) on any dictionary change.\n */\nimport { Dictionary } from '@intlayer/core';\nimport { useDictionariesRecord } from '@intlayer/editor-react';\nimport merge from 'deepmerge';\nimport { useMemo } from 'react';\nimport { useGetDictionaries } from './intlayerAPIHooks';\n\ntype Args = Parameters<typeof useGetDictionaries>;\n\nexport const useGetAllDictionaries = (...props: Args) => {\n const { localeDictionaries } = useDictionariesRecord();\n const { data: onlineDictionariesAPI, isWaitingData } = useGetDictionaries(\n ...props\n );\n\n const onlineDictionaries: Record<string, Dictionary> = useMemo(\n () =>\n (onlineDictionariesAPI?.data ?? []).reduce(\n (acc, dictionary) => {\n acc[dictionary.key] = dictionary;\n return acc;\n },\n {} as Record<string, Dictionary>\n ),\n [onlineDictionariesAPI]\n );\n\n const allDictionaries: Record<string, Dictionary> = useMemo(\n () => merge(onlineDictionaries ?? {}, localeDictionaries),\n [onlineDictionaries]\n );\n\n return {\n online: onlineDictionaries,\n locale: localeDictionaries,\n all: allDictionaries,\n isLoading: isWaitingData,\n };\n};\n"],"names":[],"mappings":";;;;;AAea,MAAA,wBAAwB,IAAI,UAAgB;AACjD,QAAA,EAAE,mBAAmB,IAAI,sBAAsB;AACrD,QAAM,EAAE,MAAM,uBAAuB,cAAkB,IAAA;AAAA,IACrD,GAAG;AAAA,EACL;AAEA,QAAM,qBAAiD;AAAA,IACrD,OACG,uBAAuB,QAAQ,CAAA,GAAI;AAAA,MAClC,CAAC,KAAK,eAAe;AACf,YAAA,WAAW,GAAG,IAAI;AACf,eAAA;AAAA,MACT;AAAA,MACA,CAAA;AAAA,IACF;AAAA,IACF,CAAC,qBAAqB;AAAA,EACxB;AAEA,QAAM,kBAA8C;AAAA,IAClD,MAAM,MAAM,sBAAsB,IAAI,kBAAkB;AAAA,IACxD,CAAC,kBAAkB;AAAA,EACrB;AAEO,SAAA;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,WAAW;AAAA,EACb;AACF;"}
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@intlayer/design-system",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "private": false,
5
+ "description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
5
6
  "keywords": [
6
7
  "design-system",
7
8
  "intlayer",
@@ -76,11 +77,13 @@
76
77
  "tailwind-merge": "^2.6.0",
77
78
  "zod": "^3.24.1",
78
79
  "zustand": "^4.5.6",
79
- "@intlayer/config": "4.0.2",
80
- "@intlayer/core": "4.0.2",
81
- "react-intlayer": "4.0.2",
82
- "@intlayer/api": "4.0.2",
83
- "@intlayer/dictionaries-entry": "4.0.2"
80
+ "@intlayer/config": "4.0.4",
81
+ "@intlayer/core": "4.0.4",
82
+ "@intlayer/editor-react": "4.0.4",
83
+ "@intlayer/editor": "4.0.4",
84
+ "@intlayer/dictionaries-entry": "4.0.4",
85
+ "@intlayer/api": "4.0.4",
86
+ "react-intlayer": "4.0.4"
84
87
  },
85
88
  "devDependencies": {
86
89
  "@chromatic-com/storybook": "^3.2.3",
@@ -113,24 +116,29 @@
113
116
  "vite": "^6.0.7",
114
117
  "vite-plugin-dts": "^4.5.0",
115
118
  "vitest": "^2.1.8",
116
- "@intlayer/backend": "4.0.2",
117
- "@utils/eslint-config": "1.0.4",
118
- "@utils/tsup-config": "1.0.4",
119
119
  "@utils/ts-config": "1.0.4",
120
- "@utils/ts-config-types": "1.0.4"
120
+ "@utils/eslint-config": "1.0.4",
121
+ "@utils/ts-config-types": "1.0.4",
122
+ "@intlayer/backend": "4.0.4",
123
+ "@utils/tsup-config": "1.0.4"
121
124
  },
122
125
  "peerDependencies": {
123
126
  "@monaco-editor/react": "^4.6.0",
127
+ "clsx": "^2.1.1",
128
+ "framer-motion": "^11.18.0",
124
129
  "fuse.js": "^7.0.0",
125
130
  "react": ">=18.3.1",
126
131
  "react-dom": ">=18.3.1",
132
+ "tailwind-merge": "^2.6.0",
127
133
  "zustand": "^4.5.6",
128
- "@intlayer/api": "4.0.2",
129
- "@intlayer/config": "4.0.2",
130
- "@intlayer/core": "4.0.2",
131
- "intlayer": "4.0.2",
132
- "react-intlayer": "4.0.2",
133
- "@intlayer/dictionaries-entry": "4.0.2"
134
+ "@intlayer/config": "4.0.4",
135
+ "@intlayer/editor": "4.0.4",
136
+ "@intlayer/editor-react": "4.0.4",
137
+ "@intlayer/dictionaries-entry": "4.0.4",
138
+ "@intlayer/api": "4.0.4",
139
+ "intlayer": "4.0.4",
140
+ "@intlayer/core": "4.0.4",
141
+ "react-intlayer": "4.0.4"
134
142
  },
135
143
  "scripts": {
136
144
  "build": "pnpm build:package && pnpm build:css",