@intlayer/design-system 3.5.4 → 3.5.6

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 (486) hide show
  1. package/dist/.vite/manifest.json +351 -60
  2. package/dist/CodeBlockShiki-BlmZyrr7.cjs +29 -0
  3. package/dist/CodeBlockShiki-BlmZyrr7.cjs.map +1 -0
  4. package/dist/CodeBlockShiki-CcpV9SVi.js +29 -0
  5. package/dist/CodeBlockShiki-CcpV9SVi.js.map +1 -0
  6. package/dist/CopyButton-Cxu3goRg.cjs +59 -0
  7. package/dist/CopyButton-Cxu3goRg.cjs.map +1 -0
  8. package/dist/CopyButton-DlcDlf6U.js +60 -0
  9. package/dist/CopyButton-DlcDlf6U.js.map +1 -0
  10. package/dist/Form-BB0kpER9.cjs +301 -0
  11. package/dist/Form-BB0kpER9.cjs.map +1 -0
  12. package/dist/Form-BDcoNTLV.cjs.map +1 -1
  13. package/dist/Form-DGLgTAdY.js +302 -0
  14. package/dist/Form-DGLgTAdY.js.map +1 -0
  15. package/dist/Form-DhsgC7kB.js.map +1 -1
  16. package/dist/components/Auth/useAuth/useSession.cjs +1 -0
  17. package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
  18. package/dist/components/Auth/useAuth/useSession.mjs +1 -0
  19. package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
  20. package/dist/components/Breadcrumb/breadcrumb.content.cjs +26 -0
  21. package/dist/components/Breadcrumb/breadcrumb.content.cjs.map +1 -0
  22. package/dist/components/Breadcrumb/breadcrumb.content.d.ts +8 -0
  23. package/dist/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -0
  24. package/dist/components/Breadcrumb/breadcrumb.content.mjs +26 -0
  25. package/dist/components/Breadcrumb/breadcrumb.content.mjs.map +1 -0
  26. package/dist/components/Breadcrumb/index.cjs +106 -34
  27. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  28. package/dist/components/Breadcrumb/index.d.ts +6 -2
  29. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  30. package/dist/components/Breadcrumb/index.mjs +106 -34
  31. package/dist/components/Breadcrumb/index.mjs.map +1 -1
  32. package/dist/components/Button/Button.cjs +7 -8
  33. package/dist/components/Button/Button.cjs.map +1 -1
  34. package/dist/components/Button/Button.d.ts.map +1 -1
  35. package/dist/components/Button/Button.mjs +7 -8
  36. package/dist/components/Button/Button.mjs.map +1 -1
  37. package/dist/components/ClickOutsideDiv/index.cjs +26 -0
  38. package/dist/components/ClickOutsideDiv/index.cjs.map +1 -0
  39. package/dist/components/ClickOutsideDiv/index.d.ts +6 -0
  40. package/dist/components/ClickOutsideDiv/index.d.ts.map +1 -0
  41. package/dist/components/ClickOutsideDiv/index.mjs +26 -0
  42. package/dist/components/ClickOutsideDiv/index.mjs.map +1 -0
  43. package/dist/components/Container/index.cjs +2 -2
  44. package/dist/components/Container/index.cjs.map +1 -1
  45. package/dist/components/Container/index.mjs +2 -2
  46. package/dist/components/Container/index.mjs.map +1 -1
  47. package/dist/components/ContentEditor/ContentEditorCode.cjs +78 -0
  48. package/dist/components/ContentEditor/ContentEditorCode.cjs.map +1 -0
  49. package/dist/components/ContentEditor/ContentEditorCode.d.ts +11 -0
  50. package/dist/components/ContentEditor/ContentEditorCode.d.ts.map +1 -0
  51. package/dist/components/ContentEditor/ContentEditorCode.mjs +78 -0
  52. package/dist/components/ContentEditor/ContentEditorCode.mjs.map +1 -0
  53. package/dist/components/ContentEditor/ContentEditorTextArea.cjs +30 -26
  54. package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
  55. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +2 -1
  56. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
  57. package/dist/components/ContentEditor/ContentEditorTextArea.mjs +30 -26
  58. package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
  59. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +3 -3
  60. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  61. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +3 -3
  62. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  63. package/dist/components/DictionaryEditor/index.cjs +4 -0
  64. package/dist/components/DictionaryEditor/index.cjs.map +1 -1
  65. package/dist/components/DictionaryEditor/index.mjs +4 -0
  66. package/dist/components/DictionaryEditor/index.mjs.map +1 -1
  67. package/dist/components/DictionaryEditor/useEditedContentStore.cjs +3 -0
  68. package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
  69. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +2 -2
  70. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
  71. package/dist/components/DictionaryEditor/useEditedContentStore.mjs +3 -0
  72. package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
  73. package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +1 -1
  74. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +1 -1
  75. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts.map +1 -1
  76. package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +1 -1
  77. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +9 -5
  78. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  79. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +3 -0
  80. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
  81. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +9 -5
  82. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  83. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +161 -69
  84. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  85. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
  86. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +163 -71
  87. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  88. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +123 -0
  89. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
  90. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +14 -0
  91. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
  92. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +123 -0
  93. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  94. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +9 -2
  95. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
  96. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +15 -0
  97. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -1
  98. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +1 -0
  99. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
  100. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +15 -0
  101. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
  102. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts +6 -0
  103. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
  104. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +9 -2
  105. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
  106. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +17 -6
  107. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  108. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +3 -0
  109. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  110. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +17 -6
  111. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  112. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +7 -5
  113. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
  114. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts +2 -0
  115. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
  116. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +7 -5
  117. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
  118. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +117 -55
  119. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
  120. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts +4 -2
  121. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
  122. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +115 -53
  123. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
  124. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +20 -18
  125. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
  126. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts +1 -0
  127. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
  128. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +20 -18
  129. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
  130. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs +10 -2
  131. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
  132. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts +2 -0
  133. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts.map +1 -1
  134. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +10 -2
  135. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
  136. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts +8 -0
  137. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts.map +1 -0
  138. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts +13 -0
  139. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts.map +1 -0
  140. package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts +9 -0
  141. package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts.map +1 -0
  142. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +10 -10
  143. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  144. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +10 -10
  145. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  146. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +32 -23
  147. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
  148. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts +2 -0
  149. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
  150. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +32 -23
  151. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
  152. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +1 -1
  153. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  154. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +1 -1
  155. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  156. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +59 -18
  157. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  158. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  159. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +62 -21
  160. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  161. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +32 -0
  162. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  163. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +4 -0
  164. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
  165. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +32 -0
  166. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  167. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +73 -0
  168. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -0
  169. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts +7 -0
  170. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts.map +1 -0
  171. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +73 -0
  172. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -0
  173. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +37 -0
  174. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -0
  175. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts +14 -0
  176. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts.map +1 -0
  177. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +37 -0
  178. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -0
  179. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.cjs +8 -0
  180. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.cjs.map +1 -0
  181. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.d.ts +3 -0
  182. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.d.ts.map +1 -0
  183. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs +8 -0
  184. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs.map +1 -0
  185. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs +54 -0
  186. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs.map +1 -0
  187. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +10 -0
  188. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts.map +1 -0
  189. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs +55 -0
  190. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs.map +1 -0
  191. package/dist/components/DictionaryFieldEditor/index.cjs +5 -0
  192. package/dist/components/DictionaryFieldEditor/index.cjs.map +1 -1
  193. package/dist/components/DictionaryFieldEditor/index.d.ts +1 -0
  194. package/dist/components/DictionaryFieldEditor/index.d.ts.map +1 -1
  195. package/dist/components/DictionaryFieldEditor/index.mjs +6 -1
  196. package/dist/components/DictionaryFieldEditor/index.mjs.map +1 -1
  197. package/dist/components/DropDown/index.cjs.map +1 -1
  198. package/dist/components/DropDown/index.d.ts +18 -1
  199. package/dist/components/DropDown/index.d.ts.map +1 -1
  200. package/dist/components/DropDown/index.mjs.map +1 -1
  201. package/dist/components/EditableField/EditableFieldInput.cjs +5 -1
  202. package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
  203. package/dist/components/EditableField/EditableFieldInput.d.ts.map +1 -1
  204. package/dist/components/EditableField/EditableFieldInput.mjs +6 -2
  205. package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
  206. package/dist/components/EditableField/EditableFieldTextArea.cjs +2 -8
  207. package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
  208. package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
  209. package/dist/components/EditableField/EditableFieldTextArea.mjs +2 -8
  210. package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
  211. package/dist/components/Form/FormLabel.cjs +6 -2
  212. package/dist/components/Form/FormLabel.cjs.map +1 -1
  213. package/dist/components/Form/FormLabel.d.ts.map +1 -1
  214. package/dist/components/Form/FormLabel.mjs +6 -2
  215. package/dist/components/Form/FormLabel.mjs.map +1 -1
  216. package/dist/components/Form/elements/EditableFieldInputElement.d.ts +1 -1
  217. package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
  218. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +1 -1
  219. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
  220. package/dist/components/Form/elements/SelectElement.d.ts.map +1 -1
  221. package/dist/components/Headers/index.cjs +1 -1
  222. package/dist/components/Headers/index.cjs.map +1 -1
  223. package/dist/components/Headers/index.mjs +1 -1
  224. package/dist/components/Headers/index.mjs.map +1 -1
  225. package/dist/components/IDE/Code.cjs +77 -0
  226. package/dist/components/IDE/Code.cjs.map +1 -0
  227. package/dist/components/IDE/Code.d.ts +18 -0
  228. package/dist/components/IDE/Code.d.ts.map +1 -0
  229. package/dist/components/IDE/Code.mjs +77 -0
  230. package/dist/components/IDE/Code.mjs.map +1 -0
  231. package/dist/components/IDE/CodeBlock.cjs +54 -0
  232. package/dist/components/IDE/CodeBlock.cjs.map +1 -0
  233. package/dist/components/IDE/CodeBlock.d.ts +12 -0
  234. package/dist/components/IDE/CodeBlock.d.ts.map +1 -0
  235. package/dist/components/IDE/CodeBlock.mjs +54 -0
  236. package/dist/components/IDE/CodeBlock.mjs.map +1 -0
  237. package/dist/components/IDE/CodeBlockClient.cjs +55 -0
  238. package/dist/components/IDE/CodeBlockClient.cjs.map +1 -0
  239. package/dist/components/IDE/CodeBlockClient.mjs +55 -0
  240. package/dist/components/IDE/CodeBlockClient.mjs.map +1 -0
  241. package/dist/components/IDE/CodeBlockLoader.cjs +28 -0
  242. package/dist/components/IDE/CodeBlockLoader.cjs.map +1 -0
  243. package/dist/components/IDE/CodeBlockLoader.d.ts +4 -0
  244. package/dist/components/IDE/CodeBlockLoader.d.ts.map +1 -0
  245. package/dist/components/IDE/CodeBlockLoader.mjs +28 -0
  246. package/dist/components/IDE/CodeBlockLoader.mjs.map +1 -0
  247. package/dist/components/IDE/CodeBlockServer.cjs +53 -0
  248. package/dist/components/IDE/CodeBlockServer.cjs.map +1 -0
  249. package/dist/components/IDE/CodeBlockServer.d.ts +12 -0
  250. package/dist/components/IDE/CodeBlockServer.d.ts.map +1 -0
  251. package/dist/components/IDE/CodeBlockServer.mjs +53 -0
  252. package/dist/components/IDE/CodeBlockServer.mjs.map +1 -0
  253. package/dist/components/IDE/CodeBlockShiki.d.ts +3 -0
  254. package/dist/components/IDE/CodeBlockShiki.d.ts.map +1 -0
  255. package/dist/components/IDE/CodeBlockclient.d.ts +12 -0
  256. package/dist/components/IDE/CodeBlockclient.d.ts.map +1 -0
  257. package/dist/components/IDE/CodeConditionalRenderer.cjs +20 -0
  258. package/dist/components/IDE/CodeConditionalRenderer.cjs.map +1 -0
  259. package/dist/components/IDE/CodeConditionalRenderer.d.ts +4 -0
  260. package/dist/components/IDE/CodeConditionalRenderer.d.ts.map +1 -0
  261. package/dist/components/IDE/CodeConditionalRenderer.mjs +20 -0
  262. package/dist/components/IDE/CodeConditionalRenderer.mjs.map +1 -0
  263. package/dist/components/IDE/CodeContext.cjs +57 -0
  264. package/dist/components/IDE/CodeContext.cjs.map +1 -0
  265. package/dist/components/IDE/CodeContext.d.ts +26 -0
  266. package/dist/components/IDE/CodeContext.d.ts.map +1 -0
  267. package/dist/components/IDE/CodeContext.mjs +57 -0
  268. package/dist/components/IDE/CodeContext.mjs.map +1 -0
  269. package/dist/components/IDE/CodeFormatSelector.cjs +30 -0
  270. package/dist/components/IDE/CodeFormatSelector.cjs.map +1 -0
  271. package/dist/components/IDE/CodeFormatSelector.d.ts +3 -0
  272. package/dist/components/IDE/CodeFormatSelector.d.ts.map +1 -0
  273. package/dist/components/IDE/CodeFormatSelector.mjs +30 -0
  274. package/dist/components/IDE/CodeFormatSelector.mjs.map +1 -0
  275. package/dist/components/IDE/CodeRender copy.cjs +141 -0
  276. package/dist/components/IDE/CodeRender copy.cjs.map +1 -0
  277. package/dist/components/IDE/CodeRender copy.d.ts +14 -0
  278. package/dist/components/IDE/CodeRender copy.d.ts.map +1 -0
  279. package/dist/components/IDE/CodeRender copy.mjs +141 -0
  280. package/dist/components/IDE/CodeRender copy.mjs.map +1 -0
  281. package/dist/components/IDE/CodeRender.cjs +39 -625
  282. package/dist/components/IDE/CodeRender.cjs.map +1 -1
  283. package/dist/components/IDE/CodeRender.d.ts +4 -5
  284. package/dist/components/IDE/CodeRender.d.ts.map +1 -1
  285. package/dist/components/IDE/CodeRender.mjs +40 -604
  286. package/dist/components/IDE/CodeRender.mjs.map +1 -1
  287. package/dist/components/IDE/CodeRenderer.cjs +27 -0
  288. package/dist/components/IDE/CodeRenderer.cjs.map +1 -0
  289. package/dist/components/IDE/CodeRenderer.d.ts +5 -0
  290. package/dist/components/IDE/CodeRenderer.d.ts.map +1 -0
  291. package/dist/components/IDE/CodeRenderer.mjs +27 -0
  292. package/dist/components/IDE/CodeRenderer.mjs.map +1 -0
  293. package/dist/components/IDE/ContentDeclarationFormatSelector.cjs +28 -0
  294. package/dist/components/IDE/ContentDeclarationFormatSelector.cjs.map +1 -0
  295. package/dist/components/IDE/ContentDeclarationFormatSelector.d.ts +3 -0
  296. package/dist/components/IDE/ContentDeclarationFormatSelector.d.ts.map +1 -0
  297. package/dist/components/IDE/ContentDeclarationFormatSelector.mjs +28 -0
  298. package/dist/components/IDE/ContentDeclarationFormatSelector.mjs.map +1 -0
  299. package/dist/components/IDE/CopyButton.cjs +40 -0
  300. package/dist/components/IDE/CopyButton.cjs.map +1 -0
  301. package/dist/components/IDE/CopyButton.content.cjs +26 -0
  302. package/dist/components/IDE/CopyButton.content.cjs.map +1 -0
  303. package/dist/components/IDE/CopyButton.content.d.ts +8 -0
  304. package/dist/components/IDE/CopyButton.content.d.ts.map +1 -0
  305. package/dist/components/IDE/CopyButton.content.mjs +26 -0
  306. package/dist/components/IDE/CopyButton.content.mjs.map +1 -0
  307. package/dist/components/IDE/CopyButton.d.ts +7 -0
  308. package/dist/components/IDE/CopyButton.d.ts.map +1 -0
  309. package/dist/components/IDE/CopyButton.mjs +40 -0
  310. package/dist/components/IDE/CopyButton.mjs.map +1 -0
  311. package/dist/components/IDE/EditableCodeBlock.d.ts +9 -0
  312. package/dist/components/IDE/EditableCodeBlock.d.ts.map +1 -0
  313. package/dist/components/IDE/IDE.cjs +1 -1
  314. package/dist/components/IDE/IDE.cjs.map +1 -1
  315. package/dist/components/IDE/IDE.mjs +1 -1
  316. package/dist/components/IDE/IDE.mjs.map +1 -1
  317. package/dist/components/IDE/MarkDownRender.cjs +11 -4
  318. package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
  319. package/dist/components/IDE/MarkDownRender.d.ts.map +1 -1
  320. package/dist/components/IDE/MarkDownRender.mjs +11 -4
  321. package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
  322. package/dist/components/IDE/MonacoCode.cjs +129 -0
  323. package/dist/components/IDE/MonacoCode.cjs.map +1 -0
  324. package/dist/components/IDE/MonacoCode.d.ts +14 -0
  325. package/dist/components/IDE/MonacoCode.d.ts.map +1 -0
  326. package/dist/components/IDE/MonacoCode.mjs +129 -0
  327. package/dist/components/IDE/MonacoCode.mjs.map +1 -0
  328. package/dist/components/IDE/PackageManagerSelector.cjs +20 -0
  329. package/dist/components/IDE/PackageManagerSelector.cjs.map +1 -0
  330. package/dist/components/IDE/PackageManagerSelector.d.ts +3 -0
  331. package/dist/components/IDE/PackageManagerSelector.d.ts.map +1 -0
  332. package/dist/components/IDE/PackageManagerSelector.mjs +20 -0
  333. package/dist/components/IDE/PackageManagerSelector.mjs.map +1 -0
  334. package/dist/components/IDE/index.cjs +2 -2
  335. package/dist/components/IDE/index.d.ts +1 -1
  336. package/dist/components/IDE/index.d.ts.map +1 -1
  337. package/dist/components/IDE/index.mjs +1 -1
  338. package/dist/components/Link/Link.cjs +50 -31
  339. package/dist/components/Link/Link.cjs.map +1 -1
  340. package/dist/components/Link/Link.d.ts +3 -0
  341. package/dist/components/Link/Link.d.ts.map +1 -1
  342. package/dist/components/Link/Link.mjs +51 -32
  343. package/dist/components/Link/Link.mjs.map +1 -1
  344. package/dist/components/Link/index.cjs +1 -0
  345. package/dist/components/Link/index.cjs.map +1 -1
  346. package/dist/components/Link/index.mjs +3 -2
  347. package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts +13 -0
  348. package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts.map +1 -0
  349. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +218 -0
  350. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -0
  351. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts +8 -0
  352. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -0
  353. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +218 -0
  354. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -0
  355. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +42 -0
  356. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -0
  357. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts +15 -0
  358. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts.map +1 -0
  359. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +42 -0
  360. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -0
  361. package/dist/components/LocaleSwitcherContentDropDown/index.cjs +8 -0
  362. package/dist/components/LocaleSwitcherContentDropDown/index.cjs.map +1 -0
  363. package/dist/components/LocaleSwitcherContentDropDown/index.d.ts +3 -0
  364. package/dist/components/LocaleSwitcherContentDropDown/index.d.ts.map +1 -0
  365. package/dist/components/LocaleSwitcherContentDropDown/index.mjs +8 -0
  366. package/dist/components/LocaleSwitcherContentDropDown/index.mjs.map +1 -0
  367. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs +118 -0
  368. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs.map +1 -0
  369. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +18 -0
  370. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -0
  371. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs +119 -0
  372. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -0
  373. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +110 -34
  374. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
  375. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +2 -0
  376. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
  377. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +111 -35
  378. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  379. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs +63 -1
  380. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -1
  381. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +6 -0
  382. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
  383. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs +63 -1
  384. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -1
  385. package/dist/components/MarkDownRender/index.cjs +22 -26
  386. package/dist/components/MarkDownRender/index.cjs.map +1 -1
  387. package/dist/components/MarkDownRender/index.d.ts +5 -1
  388. package/dist/components/MarkDownRender/index.d.ts.map +1 -1
  389. package/dist/components/MarkDownRender/index.mjs +22 -26
  390. package/dist/components/MarkDownRender/index.mjs.map +1 -1
  391. package/dist/components/Modal/Modal.cjs +11 -13
  392. package/dist/components/Modal/Modal.cjs.map +1 -1
  393. package/dist/components/Modal/Modal.d.ts +1 -1
  394. package/dist/components/Modal/Modal.d.ts.map +1 -1
  395. package/dist/components/Modal/Modal.mjs +11 -13
  396. package/dist/components/Modal/Modal.mjs.map +1 -1
  397. package/dist/components/Navbar/DesktopNavbar.cjs +1 -1
  398. package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
  399. package/dist/components/Navbar/DesktopNavbar.mjs +1 -1
  400. package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
  401. package/dist/components/SwitchSelector/index.cjs +4 -0
  402. package/dist/components/SwitchSelector/index.cjs.map +1 -1
  403. package/dist/components/SwitchSelector/index.d.ts.map +1 -1
  404. package/dist/components/SwitchSelector/index.mjs +5 -1
  405. package/dist/components/SwitchSelector/index.mjs.map +1 -1
  406. package/dist/components/index.cjs +21 -4
  407. package/dist/components/index.cjs.map +1 -1
  408. package/dist/components/index.d.ts +3 -1
  409. package/dist/components/index.d.ts.map +1 -1
  410. package/dist/components/index.mjs +21 -4
  411. package/dist/components/index.mjs.map +1 -1
  412. package/dist/design-system.css +235 -0
  413. package/dist/hooks/index.cjs +13 -0
  414. package/dist/hooks/index.cjs.map +1 -1
  415. package/dist/hooks/index.d.ts +1 -0
  416. package/dist/hooks/index.d.ts.map +1 -1
  417. package/dist/hooks/index.mjs +14 -1
  418. package/dist/hooks/index.mjs.map +1 -1
  419. package/dist/hooks/intlayerAPIHooks.cjs +86 -5
  420. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  421. package/dist/hooks/intlayerAPIHooks.d.ts +15 -1
  422. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  423. package/dist/hooks/intlayerAPIHooks.mjs +86 -5
  424. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  425. package/dist/hooks/useAsync/index.cjs +3 -0
  426. package/dist/hooks/useAsync/index.cjs.map +1 -1
  427. package/dist/hooks/useAsync/index.d.ts +1 -0
  428. package/dist/hooks/useAsync/index.d.ts.map +1 -1
  429. package/dist/hooks/useAsync/index.mjs +4 -1
  430. package/dist/hooks/useAsync/index.mjs.map +1 -1
  431. package/dist/hooks/useAsync/useAsync.cjs +2 -9
  432. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  433. package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
  434. package/dist/hooks/useAsync/useAsync.mjs +3 -10
  435. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  436. package/dist/hooks/useAsync/useAsyncStateStore.cjs +123 -73
  437. package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
  438. package/dist/hooks/useAsync/useAsyncStateStore.d.ts +35 -11
  439. package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
  440. package/dist/hooks/useAsync/useAsyncStateStore.mjs +123 -73
  441. package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
  442. package/dist/hooks/useGetAllDictionaries.cjs +4 -2
  443. package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
  444. package/dist/hooks/useGetAllDictionaries.d.ts +4 -1
  445. package/dist/hooks/useGetAllDictionaries.d.ts.map +1 -1
  446. package/dist/hooks/useGetAllDictionaries.mjs +4 -2
  447. package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
  448. package/dist/hooks/useIntlayerAPI.d.ts +13 -1
  449. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  450. package/dist/hooks/useIsDarkMode.cjs +15 -0
  451. package/dist/hooks/useIsDarkMode.cjs.map +1 -0
  452. package/dist/hooks/useIsDarkMode.d.ts +2 -0
  453. package/dist/hooks/useIsDarkMode.d.ts.map +1 -0
  454. package/dist/hooks/useIsDarkMode.mjs +15 -0
  455. package/dist/hooks/useIsDarkMode.mjs.map +1 -0
  456. package/dist/hooks/usePersistedStore.cjs +17 -5
  457. package/dist/hooks/usePersistedStore.cjs.map +1 -1
  458. package/dist/hooks/usePersistedStore.d.ts.map +1 -1
  459. package/dist/hooks/usePersistedStore.mjs +17 -5
  460. package/dist/hooks/usePersistedStore.mjs.map +1 -1
  461. package/dist/libs/intlayer-api/ai.cjs +54 -0
  462. package/dist/libs/intlayer-api/ai.cjs.map +1 -0
  463. package/dist/libs/intlayer-api/ai.d.ts +16 -0
  464. package/dist/libs/intlayer-api/ai.d.ts.map +1 -0
  465. package/dist/libs/intlayer-api/ai.mjs +54 -0
  466. package/dist/libs/intlayer-api/ai.mjs.map +1 -0
  467. package/dist/libs/intlayer-api/dictionary.cjs +2 -2
  468. package/dist/libs/intlayer-api/dictionary.cjs.map +1 -1
  469. package/dist/libs/intlayer-api/dictionary.d.ts +3 -3
  470. package/dist/libs/intlayer-api/dictionary.d.ts.map +1 -1
  471. package/dist/libs/intlayer-api/dictionary.mjs +2 -2
  472. package/dist/libs/intlayer-api/dictionary.mjs.map +1 -1
  473. package/dist/libs/intlayer-api/index.cjs +5 -1
  474. package/dist/libs/intlayer-api/index.cjs.map +1 -1
  475. package/dist/libs/intlayer-api/index.d.ts +26 -2
  476. package/dist/libs/intlayer-api/index.d.ts.map +1 -1
  477. package/dist/libs/intlayer-api/index.mjs +5 -1
  478. package/dist/libs/intlayer-api/index.mjs.map +1 -1
  479. package/dist/libs/intlayer-api/tag.cjs +52 -0
  480. package/dist/libs/intlayer-api/tag.cjs.map +1 -0
  481. package/dist/libs/intlayer-api/tag.d.ts +16 -0
  482. package/dist/libs/intlayer-api/tag.d.ts.map +1 -0
  483. package/dist/libs/intlayer-api/tag.mjs +52 -0
  484. package/dist/libs/intlayer-api/tag.mjs.map +1 -0
  485. package/dist/tailwind.css +1 -1
  486. package/package.json +20 -18
@@ -1 +1 @@
1
- {"version":3,"file":"useEditedContentStore.mjs","sources":["../../../../../../node_modules/.pnpm/zustand@4.5.5_@types+react@18.3.14_immer@9.0.21_react@18.3.1/node_modules/zustand/esm/middleware.mjs","../../../src/components/DictionaryEditor/useEditedContentStore.ts"],"sourcesContent":["const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...a) => api.dispatch(...a), ...initial };\n};\nconst redux = reduxImpl;\n\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (_e) {\n }\n if (!extensionConnector) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && enabled) {\n console.warn(\n \"[zustand devtools middleware] Please install/enable Redux devtools extension\"\n );\n }\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = (state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? { type: anonymousActionType || \"anonymous\" } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (api.dispatchFromDevtools && typeof api.dispatch === \"function\") {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...a) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && a[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...a);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format. \n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (!api.dispatchFromDevtools) return;\n if (typeof api.dispatch !== \"function\") return;\n api.dispatch(action);\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, f) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) f(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = (selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n };\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nconst combine = (initialState, create) => (...a) => Object.assign({}, initialState, create(...a));\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (_e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(\n name,\n JSON.stringify(newValue, options == null ? void 0 : options.replacer)\n ),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst oldImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n getStorage: () => localStorage,\n serialize: JSON.stringify,\n deserialize: JSON.parse,\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage;\n try {\n storage = options.getStorage();\n } catch (_e) {\n }\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const thenableSerialize = toThenable(options.serialize);\n const setItem = () => {\n const state = options.partialize({ ...get() });\n let errorInSync;\n const thenable = thenableSerialize({ state, version: options.version }).then(\n (serializedValue) => storage.setItem(options.name, serializedValue)\n ).catch((e) => {\n errorInSync = e;\n });\n if (errorInSync) {\n throw errorInSync;\n }\n return thenable;\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n void setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n void setItem();\n },\n get,\n api\n );\n let stateFromStorage;\n const hydrate = () => {\n var _a;\n if (!storage) return;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => cb(get()));\n const postRehydrationCallback = ((_a = options.onRehydrateStorage) == null ? void 0 : _a.call(options, get())) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((storageValue) => {\n if (storageValue) {\n return options.deserialize(storageValue);\n }\n }).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n return options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return deserializedStorageValue.state;\n }\n }\n }).then((migratedState) => {\n var _a2;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n return setItem();\n }).then(() => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.getStorage) {\n storage = newOptions.getStorage();\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n hydrate();\n return stateFromStorage || configResult;\n};\nconst newImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n void setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n void setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n return [\n true,\n options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n )\n ];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persistImpl = (config, baseOptions) => {\n if (\"getStorage\" in baseOptions || \"serialize\" in baseOptions || \"deserialize\" in baseOptions) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead.\"\n );\n }\n return oldImpl(config, baseOptions);\n }\n return newImpl(config, baseOptions);\n};\nconst persist = persistImpl;\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector };\n","import type { Dictionary, DictionaryValue, KeyPath } from '@intlayer/core';\nimport { create } from 'zustand';\nimport { persist, createJSONStorage } from 'zustand/middleware';\nimport {\n editDictionaryByKeyPath,\n getDictionaryValueByKeyPath,\n renameDictionaryValueByKeyPath,\n} from '../../utils/dictionary';\n\nexport type DictionaryContent = Record<Dictionary['key'], Dictionary>;\n\ntype EditedContentStore = {\n dictionariesRecord: DictionaryContent;\n editedContent: DictionaryContent;\n setDictionariesRecord: (\n dictionariesRecord: Record<Dictionary['key'], Dictionary>\n ) => void;\n setEditedContent: (\n dictionaryKey: Dictionary['key'],\n newValue: string\n ) => void;\n addEditedContent: (\n dictionaryKey: Dictionary['key'],\n newValue: DictionaryValue,\n keyPath?: KeyPath[],\n overwrite?: boolean\n ) => void;\n renameEditedContent: (\n dictionaryKey: Dictionary['key'],\n newKey: KeyPath['key'],\n keyPath?: KeyPath[]\n ) => void;\n removeEditedContent: (\n dictionaryKey: Dictionary['key'],\n keyPath: KeyPath[]\n ) => void;\n restoreEditedContent: (dictionaryKey: Dictionary['key']) => void;\n clearEditedDictionaryContent: (dictionaryKey: Dictionary['key']) => void;\n clearEditedContent: () => void;\n getEditedContentValue: (\n dictionaryKey: Dictionary['key'],\n keyPath: KeyPath[]\n ) => DictionaryValue | undefined;\n};\n\nexport const useEditedContentStore = create(\n persist<EditedContentStore>(\n (set, get) => ({\n dictionariesRecord: {},\n editedContent: {},\n setDictionariesRecord: (dictionariesRecord) =>\n set((state) => ({\n dictionariesRecord: {\n ...state.dictionariesRecord,\n ...dictionariesRecord,\n },\n })),\n\n setEditedContent: (dictionaryKey, newValue) =>\n set((state) => ({\n editedContent: {\n ...state.editedContent,\n [dictionaryKey]: {\n ...state.editedContent[dictionaryKey],\n content: newValue,\n },\n },\n })),\n addEditedContent: (\n dictionaryKey,\n newValue,\n keyPath = [],\n overwrite = true\n ) =>\n set((state) => {\n const dictionaryContent =\n state.editedContent[dictionaryKey]?.content ??\n JSON.parse(\n JSON.stringify(state.dictionariesRecord[dictionaryKey].content)\n );\n\n let newKeyPath: KeyPath[] = keyPath;\n\n if (!overwrite) {\n // Check if the key already exists, and increment the key if it does\n\n let isKeyExist = false;\n let index = 0;\n const otherKeyPath: KeyPath[] = keyPath.slice(0, -1);\n const lastKeyPath: KeyPath = keyPath[keyPath.length - 1];\n let finalKey = lastKeyPath.key;\n\n while (!isKeyExist) {\n const content = getDictionaryValueByKeyPath(\n dictionaryContent,\n newKeyPath\n );\n\n if (typeof content === 'undefined') {\n isKeyExist = true;\n } else {\n index++;\n finalKey =\n index === 0\n ? lastKeyPath.key\n : `${lastKeyPath.key} (${index})`;\n\n newKeyPath = [\n ...otherKeyPath,\n { ...lastKeyPath, key: finalKey } as KeyPath,\n ];\n }\n }\n }\n\n const editedContent = editDictionaryByKeyPath(\n dictionaryContent,\n newKeyPath,\n newValue\n );\n\n return {\n editedContent: {\n ...state.editedContent,\n [dictionaryKey]: {\n ...state.editedContent[dictionaryKey],\n content: editedContent,\n },\n },\n };\n }),\n renameEditedContent: (dictionaryKey, newKey, keyPath = []) => {\n set((state) => {\n const initialDictionaryContent = JSON.parse(\n JSON.stringify(state.dictionariesRecord[dictionaryKey].content)\n );\n\n const dictionaryContent =\n state.editedContent[dictionaryKey]?.content ??\n initialDictionaryContent;\n\n // Add the new field\n const contentWithNewField = renameDictionaryValueByKeyPath(\n dictionaryContent,\n newKey,\n keyPath\n );\n\n return {\n editedContent: {\n ...state.editedContent,\n [dictionaryKey]: {\n ...state.editedContent[dictionaryKey],\n content: contentWithNewField,\n },\n },\n };\n });\n },\n removeEditedContent: (dictionaryKey, keyPath) => {\n set((state) => {\n const initialDictionaryContent = JSON.parse(\n JSON.stringify(state.dictionariesRecord[dictionaryKey].content)\n );\n\n const editedDictionaryContent =\n state.editedContent[dictionaryKey]?.content ??\n initialDictionaryContent;\n\n const initialContent = getDictionaryValueByKeyPath(\n initialDictionaryContent,\n keyPath\n );\n\n const restoredContent = editDictionaryByKeyPath(\n editedDictionaryContent,\n keyPath,\n initialContent\n );\n\n return {\n editedContent: {\n ...state.editedContent,\n [dictionaryKey]: {\n ...state.editedContent[dictionaryKey],\n content: restoredContent,\n },\n },\n };\n });\n },\n\n restoreEditedContent: (dictionaryKey) => {\n set((state) => {\n const updatedEditedContent = { ...state.editedContent };\n delete updatedEditedContent[dictionaryKey];\n\n return {\n editedContent: updatedEditedContent,\n };\n });\n },\n\n clearEditedDictionaryContent: (dictionaryKey) => {\n set((state) => {\n const filteredEditedContent = Object.entries(\n state.editedContent\n ).reduce((acc, [path, content]) => {\n if (path === dictionaryKey) {\n return acc;\n }\n\n return {\n ...acc,\n [path]: content,\n };\n }, {});\n\n return {\n editedContent: filteredEditedContent,\n };\n });\n },\n\n clearEditedContent: () => {\n set({ editedContent: {} });\n },\n\n getEditedContentValue: (dictionaryKey, keyPath) =>\n getDictionaryValueByKeyPath(\n get().editedContent[dictionaryKey]?.content ?? {},\n keyPath\n ),\n }),\n {\n name: 'edited-content-store',\n storage: createJSONStorage(() => sessionStorage),\n }\n )\n);\n"],"names":[],"mappings":";;;AAuPA,SAAS,kBAAkB,YAAY,SAAS;AAC1C,MAAA;AACA,MAAA;AACF,cAAU,WAAW;AAAA,WACd,IAAI;AACX;AAAA,EAAA;AAEF,QAAM,iBAAiB;AAAA,IACrB,SAAS,CAAC,SAAS;AACb,UAAA;AACE,YAAA,QAAQ,CAAC,SAAS;AACtB,YAAI,SAAS,MAAM;AACV,iBAAA;AAAA,QAAA;AAET,eAAO,KAAK,MAAM,MAAwB,MAAwB;AAAA,MACpE;AACA,YAAM,OAAO,KAAK,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK;AACxD,UAAI,eAAe,SAAS;AACnB,eAAA,IAAI,KAAK,KAAK;AAAA,MAAA;AAEvB,aAAO,MAAM,GAAG;AAAA,IAClB;AAAA,IACA,SAAS,CAAC,MAAM,aAAa,QAAQ;AAAA,MACnC;AAAA,MACA,KAAK,UAAU,UAA4B,MAAyB;AAAA,IACtE;AAAA,IACA,YAAY,CAAC,SAAS,QAAQ,WAAW,IAAI;AAAA,EAC/C;AACO,SAAA;AACT;AACA,MAAM,aAAa,CAAC,OAAO,CAAC,UAAU;AAChC,MAAA;AACI,UAAA,SAAS,GAAG,KAAK;AACvB,QAAI,kBAAkB,SAAS;AACtB,aAAA;AAAA,IAAA;AAEF,WAAA;AAAA,MACL,KAAK,aAAa;AACT,eAAA,WAAW,WAAW,EAAE,MA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EAAA,cAAc,aAAa,GAAG,WAAW,CAAC;AAAA,QAChD;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ;AAAA,MACE,MAAM;AAAA,MACN,SAAS,kBAAkB,MAAM,cAAc;AAAA,IAAA;AAAA,EACjD;AAEJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useEditedContentStore.mjs","sources":["../../../../../../node_modules/.pnpm/zustand@4.5.5_@types+react@18.3.14_immer@9.0.21_react@18.3.1/node_modules/zustand/esm/middleware.mjs","../../../src/components/DictionaryEditor/useEditedContentStore.ts"],"sourcesContent":["const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...a) => api.dispatch(...a), ...initial };\n};\nconst redux = reduxImpl;\n\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (_e) {\n }\n if (!extensionConnector) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && enabled) {\n console.warn(\n \"[zustand devtools middleware] Please install/enable Redux devtools extension\"\n );\n }\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = (state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? { type: anonymousActionType || \"anonymous\" } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (api.dispatchFromDevtools && typeof api.dispatch === \"function\") {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...a) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && a[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...a);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format. \n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (!api.dispatchFromDevtools) return;\n if (typeof api.dispatch !== \"function\") return;\n api.dispatch(action);\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, f) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) f(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = (selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n };\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nconst combine = (initialState, create) => (...a) => Object.assign({}, initialState, create(...a));\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (_e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(\n name,\n JSON.stringify(newValue, options == null ? void 0 : options.replacer)\n ),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst oldImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n getStorage: () => localStorage,\n serialize: JSON.stringify,\n deserialize: JSON.parse,\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage;\n try {\n storage = options.getStorage();\n } catch (_e) {\n }\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const thenableSerialize = toThenable(options.serialize);\n const setItem = () => {\n const state = options.partialize({ ...get() });\n let errorInSync;\n const thenable = thenableSerialize({ state, version: options.version }).then(\n (serializedValue) => storage.setItem(options.name, serializedValue)\n ).catch((e) => {\n errorInSync = e;\n });\n if (errorInSync) {\n throw errorInSync;\n }\n return thenable;\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n void setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n void setItem();\n },\n get,\n api\n );\n let stateFromStorage;\n const hydrate = () => {\n var _a;\n if (!storage) return;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => cb(get()));\n const postRehydrationCallback = ((_a = options.onRehydrateStorage) == null ? void 0 : _a.call(options, get())) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((storageValue) => {\n if (storageValue) {\n return options.deserialize(storageValue);\n }\n }).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n return options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return deserializedStorageValue.state;\n }\n }\n }).then((migratedState) => {\n var _a2;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n return setItem();\n }).then(() => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.getStorage) {\n storage = newOptions.getStorage();\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n hydrate();\n return stateFromStorage || configResult;\n};\nconst newImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n void setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n void setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n return [\n true,\n options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n )\n ];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persistImpl = (config, baseOptions) => {\n if (\"getStorage\" in baseOptions || \"serialize\" in baseOptions || \"deserialize\" in baseOptions) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead.\"\n );\n }\n return oldImpl(config, baseOptions);\n }\n return newImpl(config, baseOptions);\n};\nconst persist = persistImpl;\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector };\n","import type { Dictionary, DictionaryValue, KeyPath } from '@intlayer/core';\nimport { create } from 'zustand';\nimport { persist, createJSONStorage } from 'zustand/middleware';\nimport {\n editDictionaryByKeyPath,\n getDictionaryValueByKeyPath,\n renameDictionaryValueByKeyPath,\n} from '../../utils/dictionary';\n\nexport {\n editDictionaryByKeyPath,\n getDictionaryValueByKeyPath,\n renameDictionaryValueByKeyPath,\n} from '../../utils/dictionary';\n\nexport type DictionaryContent = Record<Dictionary['key'], Dictionary>;\n\ntype EditedContentStore = {\n dictionariesRecord: DictionaryContent;\n editedContent: DictionaryContent;\n setDictionariesRecord: (\n dictionariesRecord: Record<Dictionary['key'], Dictionary>\n ) => void;\n setEditedContent: (\n dictionaryKey: Dictionary['key'],\n newValue: DictionaryValue\n ) => void;\n addEditedContent: (\n dictionaryKey: Dictionary['key'],\n newValue: DictionaryValue,\n keyPath?: KeyPath[],\n overwrite?: boolean\n ) => void;\n renameEditedContent: (\n dictionaryKey: Dictionary['key'],\n newKey: KeyPath['key'],\n keyPath?: KeyPath[]\n ) => void;\n removeEditedContent: (\n dictionaryKey: Dictionary['key'],\n keyPath: KeyPath[]\n ) => void;\n restoreEditedContent: (dictionaryKey: Dictionary['key']) => void;\n clearEditedDictionaryContent: (dictionaryKey: Dictionary['key']) => void;\n clearEditedContent: () => void;\n getEditedContentValue: (\n dictionaryKey: Dictionary['key'],\n keyPath: KeyPath[]\n ) => DictionaryValue | undefined;\n};\n\nexport const useEditedContentStore = create(\n persist<EditedContentStore>(\n (set, get) => ({\n dictionariesRecord: {},\n editedContent: {},\n setDictionariesRecord: (dictionariesRecord) =>\n set((state) => ({\n dictionariesRecord: {\n ...state.dictionariesRecord,\n ...dictionariesRecord,\n },\n })),\n\n setEditedContent: (dictionaryKey, newValue) =>\n set((state) => ({\n editedContent: {\n ...state.editedContent,\n [dictionaryKey]: {\n ...state.editedContent[dictionaryKey],\n content: newValue,\n },\n },\n })),\n addEditedContent: (\n dictionaryKey,\n newValue,\n keyPath = [],\n overwrite = true\n ) =>\n set((state) => {\n const dictionaryContent =\n state.editedContent[dictionaryKey]?.content ??\n JSON.parse(\n JSON.stringify(state.dictionariesRecord[dictionaryKey].content)\n );\n\n let newKeyPath: KeyPath[] = keyPath;\n\n if (!overwrite) {\n // Check if the key already exists, and increment the key if it does\n\n let isKeyExist = false;\n let index = 0;\n const otherKeyPath: KeyPath[] = keyPath.slice(0, -1);\n const lastKeyPath: KeyPath = keyPath[keyPath.length - 1];\n let finalKey = lastKeyPath.key;\n\n while (!isKeyExist) {\n const content = getDictionaryValueByKeyPath(\n dictionaryContent,\n newKeyPath\n );\n\n if (typeof content === 'undefined') {\n isKeyExist = true;\n } else {\n index++;\n finalKey =\n index === 0\n ? lastKeyPath.key\n : `${lastKeyPath.key} (${index})`;\n\n newKeyPath = [\n ...otherKeyPath,\n { ...lastKeyPath, key: finalKey } as KeyPath,\n ];\n }\n }\n }\n\n const editedContent = editDictionaryByKeyPath(\n dictionaryContent,\n newKeyPath,\n newValue\n );\n\n return {\n editedContent: {\n ...state.editedContent,\n [dictionaryKey]: {\n ...state.editedContent[dictionaryKey],\n content: editedContent,\n },\n },\n };\n }),\n renameEditedContent: (dictionaryKey, newKey, keyPath = []) => {\n set((state) => {\n const initialDictionaryContent = JSON.parse(\n JSON.stringify(state.dictionariesRecord[dictionaryKey].content)\n );\n\n const dictionaryContent =\n state.editedContent[dictionaryKey]?.content ??\n initialDictionaryContent;\n\n // Add the new field\n const contentWithNewField = renameDictionaryValueByKeyPath(\n dictionaryContent,\n newKey,\n keyPath\n );\n\n return {\n editedContent: {\n ...state.editedContent,\n [dictionaryKey]: {\n ...state.editedContent[dictionaryKey],\n content: contentWithNewField,\n },\n },\n };\n });\n },\n removeEditedContent: (dictionaryKey, keyPath) => {\n set((state) => {\n const initialDictionaryContent = JSON.parse(\n JSON.stringify(state.dictionariesRecord[dictionaryKey].content)\n );\n\n const editedDictionaryContent =\n state.editedContent[dictionaryKey]?.content ??\n initialDictionaryContent;\n\n const initialContent = getDictionaryValueByKeyPath(\n initialDictionaryContent,\n keyPath\n );\n\n const restoredContent = editDictionaryByKeyPath(\n editedDictionaryContent,\n keyPath,\n initialContent\n );\n\n return {\n editedContent: {\n ...state.editedContent,\n [dictionaryKey]: {\n ...state.editedContent[dictionaryKey],\n content: restoredContent,\n },\n },\n };\n });\n },\n\n restoreEditedContent: (dictionaryKey) => {\n set((state) => {\n const updatedEditedContent = { ...state.editedContent };\n delete updatedEditedContent[dictionaryKey];\n\n return {\n editedContent: updatedEditedContent,\n };\n });\n },\n\n clearEditedDictionaryContent: (dictionaryKey) => {\n set((state) => {\n const filteredEditedContent = Object.entries(\n state.editedContent\n ).reduce((acc, [path, content]) => {\n if (path === dictionaryKey) {\n return acc;\n }\n\n return {\n ...acc,\n [path]: content,\n };\n }, {});\n\n return {\n editedContent: filteredEditedContent,\n };\n });\n },\n\n clearEditedContent: () => {\n set({ editedContent: {} });\n },\n\n getEditedContentValue: (dictionaryKey, keyPath) =>\n getDictionaryValueByKeyPath(\n get().editedContent[dictionaryKey]?.content ?? {},\n keyPath\n ),\n }),\n {\n name: 'edited-content-store',\n storage: createJSONStorage(() => sessionStorage),\n }\n )\n);\n"],"names":[],"mappings":";;;AAuPA,SAAS,kBAAkB,YAAY,SAAS;AAC1C,MAAA;AACA,MAAA;AACF,cAAU,WAAW;AAAA,WACd,IAAI;AACX;AAAA,EAAA;AAE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AAA,QAAA,CACD;AAAA,MACH;AAAA,MAEA,sBAAsB,CAAC,kBAAkB;AACvC,YAAI,CAAC,UAAU;AACb,gBAAM,uBAAuB,EAAE,GAAG,MAAM,cAAc;AACtD,iBAAO,qBAAqB,aAAa;AAElC,iBAAA;AAAA,YACL,eAAe;AAAA,UACjB;AAAA,QAAA,CACD;AAAA,MACH;AAAA,MAEA,8BAA8B,CAAC,kBAAkB;AAC/C,YAAI,CAAC,UAAU;AACb,gBAAM,wBAAwB,OAAO;AAAA,YACnC,MAAM;AAAA,YACN,OAAO,CAAC,KAAK,CAAC,MAAM,OAAO,MAAM;AACjC,gBAAI,SAAS,eAAe;AACnB,qBAAA;AAAA,YAAA;AAGF,mBAAA;AAAA,cACL,GAAG;AAAA,cACH,CAAC,IAAI,GAAG;AAAA,YACV;AAAA,UACF,GAAG,EAAE;AAEE,iBAAA;AAAA,YACL,eAAe;AAAA,UACjB;AAAA,QAAA,CACD;AAAA,MACH;AAAA,MAEA,oBAAoB,MAAM;AACxB,YAAI,EAAE,eAAe,CAAA,GAAI;AAAA,MAC3B;AAAA,MAEA,uBAAuB,CAAC,eAAe,YACrC;AAAA,QACE,IAAM,EAAA,cAAc,aAAa,GAAG,WAAW,CAAC;AAAA,QAChD;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ;AAAA,MACE,MAAM;AAAA,MACN,SAAS,kBAAkB,MAAM,cAAc;AAAA,IAAA;AAAA,EACjD;AAEJ;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useEditionPanelStore.cjs","sources":["../../../src/components/DictionaryEditor/useEditionPanelStore.ts"],"sourcesContent":["import type { KeyPath } from '@intlayer/core';\nimport { create } from 'zustand';\n\ntype DictionaryPath = string;\ntype FileContent = {\n dictionaryId: string;\n keyPath?: KeyPath[];\n dictionaryPath?: DictionaryPath;\n};\n\ntype EditionPanelStore = {\n focusedContent: FileContent | null;\n setFocusedContent: (content: FileContent | null) => void;\n setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;\n};\n\nexport const useEditionPanelStore = create<EditionPanelStore>((set) => ({\n focusedContent: null,\n setFocusedContent: (content) => set({ focusedContent: content }),\n setFocusedContentKeyPath: (keyPath) =>\n set((state) => ({\n focusedContent: {\n ...state.focusedContent!,\n keyPath,\n },\n })),\n}));\n"],"names":["create"],"mappings":";;;AAgBa,MAAA,uBAAuBA,QAAAA,OAA0B,CAAC,SAAS;AAAA,EACtE,gBAAgB;AAAA,EAChB,mBAAmB,CAAC,YAAY,IAAI,EAAE,gBAAgB,SAAS;AAAA,EAC/D,0BAA0B,CAAC,YACzB,IAAI,CAAC,WAAW;AAAA,IACd,gBAAgB;AAAA,MACd,GAAG,MAAM;AAAA,MACT;AAAA,IAAA;AAAA,EACF,EACA;AACN,EAAE;;"}
1
+ {"version":3,"file":"useEditionPanelStore.cjs","sources":["../../../src/components/DictionaryEditor/useEditionPanelStore.ts"],"sourcesContent":["import type { KeyPath } from '@intlayer/core';\nimport { create } from 'zustand';\n\ntype DictionaryPath = string;\ntype FileContent = {\n dictionaryKey: string;\n keyPath?: KeyPath[];\n dictionaryPath?: DictionaryPath;\n};\n\ntype EditionPanelStore = {\n focusedContent: FileContent | null;\n setFocusedContent: (content: FileContent | null) => void;\n setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;\n};\n\nexport const useEditionPanelStore = create<EditionPanelStore>((set) => ({\n focusedContent: null,\n setFocusedContent: (content) => set({ focusedContent: content }),\n setFocusedContentKeyPath: (keyPath) =>\n set((state) => ({\n focusedContent: {\n ...state.focusedContent!,\n keyPath,\n },\n })),\n}));\n"],"names":["create"],"mappings":";;;AAgBa,MAAA,uBAAuBA,QAAAA,OAA0B,CAAC,SAAS;AAAA,EACtE,gBAAgB;AAAA,EAChB,mBAAmB,CAAC,YAAY,IAAI,EAAE,gBAAgB,SAAS;AAAA,EAC/D,0BAA0B,CAAC,YACzB,IAAI,CAAC,WAAW;AAAA,IACd,gBAAgB;AAAA,MACd,GAAG,MAAM;AAAA,MACT;AAAA,IAAA;AAAA,EACF,EACA;AACN,EAAE;;"}
@@ -1,7 +1,7 @@
1
1
  import { KeyPath } from '@intlayer/core';
2
2
  type DictionaryPath = string;
3
3
  type FileContent = {
4
- dictionaryId: string;
4
+ dictionaryKey: string;
5
5
  keyPath?: KeyPath[];
6
6
  dictionaryPath?: DictionaryPath;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useEditionPanelStore.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/useEditionPanelStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,KAAK,cAAc,GAAG,MAAM,CAAC;AAC7B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,cAAc,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,iBAAiB,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,wBAAwB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,eAAO,MAAM,oBAAoB,gFAU9B,CAAC"}
1
+ {"version":3,"file":"useEditionPanelStore.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/useEditionPanelStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,KAAK,cAAc,GAAG,MAAM,CAAC;AAC7B,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,cAAc,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,iBAAiB,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,wBAAwB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,eAAO,MAAM,oBAAoB,gFAU9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEditionPanelStore.mjs","sources":["../../../src/components/DictionaryEditor/useEditionPanelStore.ts"],"sourcesContent":["import type { KeyPath } from '@intlayer/core';\nimport { create } from 'zustand';\n\ntype DictionaryPath = string;\ntype FileContent = {\n dictionaryId: string;\n keyPath?: KeyPath[];\n dictionaryPath?: DictionaryPath;\n};\n\ntype EditionPanelStore = {\n focusedContent: FileContent | null;\n setFocusedContent: (content: FileContent | null) => void;\n setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;\n};\n\nexport const useEditionPanelStore = create<EditionPanelStore>((set) => ({\n focusedContent: null,\n setFocusedContent: (content) => set({ focusedContent: content }),\n setFocusedContentKeyPath: (keyPath) =>\n set((state) => ({\n focusedContent: {\n ...state.focusedContent!,\n keyPath,\n },\n })),\n}));\n"],"names":[],"mappings":";AAgBa,MAAA,uBAAuB,OAA0B,CAAC,SAAS;AAAA,EACtE,gBAAgB;AAAA,EAChB,mBAAmB,CAAC,YAAY,IAAI,EAAE,gBAAgB,SAAS;AAAA,EAC/D,0BAA0B,CAAC,YACzB,IAAI,CAAC,WAAW;AAAA,IACd,gBAAgB;AAAA,MACd,GAAG,MAAM;AAAA,MACT;AAAA,IAAA;AAAA,EACF,EACA;AACN,EAAE;"}
1
+ {"version":3,"file":"useEditionPanelStore.mjs","sources":["../../../src/components/DictionaryEditor/useEditionPanelStore.ts"],"sourcesContent":["import type { KeyPath } from '@intlayer/core';\nimport { create } from 'zustand';\n\ntype DictionaryPath = string;\ntype FileContent = {\n dictionaryKey: string;\n keyPath?: KeyPath[];\n dictionaryPath?: DictionaryPath;\n};\n\ntype EditionPanelStore = {\n focusedContent: FileContent | null;\n setFocusedContent: (content: FileContent | null) => void;\n setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;\n};\n\nexport const useEditionPanelStore = create<EditionPanelStore>((set) => ({\n focusedContent: null,\n setFocusedContent: (content) => set({ focusedContent: content }),\n setFocusedContentKeyPath: (keyPath) =>\n set((state) => ({\n focusedContent: {\n ...state.focusedContent!,\n keyPath,\n },\n })),\n}));\n"],"names":[],"mappings":";AAgBa,MAAA,uBAAuB,OAA0B,CAAC,SAAS;AAAA,EACtE,gBAAgB;AAAA,EAChB,mBAAmB,CAAC,YAAY,IAAI,EAAE,gBAAgB,SAAS;AAAA,EAC/D,0BAA0B,CAAC,YACzB,IAAI,CAAC,WAAW;AAAA,IACd,gBAAgB;AAAA,MACd,GAAG,MAAM;AAAA,MACT;AAAA,IAAA;AAAA,EACF,EACA;AACN,EAAE;"}
@@ -29,7 +29,9 @@ const components_Loader_index = require("../../Loader/index.cjs");
29
29
  const components_DictionaryFieldEditor_DictionaryFieldEditor = require("../DictionaryFieldEditor.cjs");
30
30
  const components_DictionaryFieldEditor_DictionariesSelector_dictionariesSelector_content = require("./dictionariesSelector.content.cjs");
31
31
  const DictionariesSelector = ({
32
- onClickDictionaryList
32
+ onClickDictionaryList,
33
+ isDarkMode,
34
+ availableLocales
33
35
  }) => {
34
36
  const { online, locale, isLoading } = hooks_useGetAllDictionaries.useGetAllDictionaries();
35
37
  const { focusedContent } = components_DictionaryEditor_useEditionPanelStore.useEditionPanelStore(
@@ -41,17 +43,19 @@ const DictionariesSelector = ({
41
43
  components_DictionaryFieldEditor_DictionariesSelector_dictionariesSelector_content.dictionariesSelectorContent
42
44
  );
43
45
  const dictionary = require$$0.useMemo(
44
- () => focusedContent?.dictionaryId ? online?.[focusedContent?.dictionaryId] ?? locale?.[focusedContent?.dictionaryId] : null,
45
- [online, locale, focusedContent?.dictionaryId]
46
+ () => focusedContent?.dictionaryKey ? online?.[focusedContent?.dictionaryKey] ?? locale?.[focusedContent?.dictionaryKey] : null,
47
+ [online, locale, focusedContent?.dictionaryKey]
46
48
  );
47
49
  if (isLoading) return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_Loader_index.Loader, {});
48
- if (!focusedContent?.dictionaryId) return noDictionaryMessage;
50
+ if (!focusedContent?.dictionaryKey) return noDictionaryMessage;
49
51
  if (!dictionary) return dictionaryNotFoundMessage;
50
52
  return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
51
53
  components_DictionaryFieldEditor_DictionaryFieldEditor.DictionaryFieldEditor,
52
54
  {
53
55
  dictionary,
54
- onClickDictionaryList
56
+ onClickDictionaryList,
57
+ isDarkMode,
58
+ availableLocales
55
59
  }
56
60
  );
57
61
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DictionariesSelector.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetAllDictionaries } from '../../../hooks';\nimport { useEditionPanelStore } from '../../DictionaryEditor';\nimport { Loader } from '../../Loader';\nimport { DictionaryFieldEditor } from '../DictionaryFieldEditor';\nimport { dictionariesSelectorContent } from './dictionariesSelector.content';\n\ntype DictionariesSelectorProps = {\n onClickDictionaryList: () => void;\n};\n\nexport const DictionariesSelector: FC<DictionariesSelectorProps> = ({\n onClickDictionaryList,\n}) => {\n const { online, locale, isLoading } = useGetAllDictionaries();\n const { focusedContent } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n }))\n );\n const { noDictionaryMessage, dictionaryNotFoundMessage } = useDictionary(\n dictionariesSelectorContent\n );\n const dictionary = useMemo(\n () =>\n focusedContent?.dictionaryId\n ? (online?.[focusedContent?.dictionaryId] ??\n locale?.[focusedContent?.dictionaryId])\n : null,\n [online, locale, focusedContent?.dictionaryId]\n );\n\n if (isLoading) return <Loader />;\n\n if (!focusedContent?.dictionaryId) return noDictionaryMessage;\n\n if (!dictionary) return dictionaryNotFoundMessage;\n\n return (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n />\n );\n};\n"],"names":["useGetAllDictionaries","useEditionPanelStore","useShallow","useDictionary","dictionariesSelectorContent","useMemo","jsx","Loader","DictionaryFieldEditor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,MAAM,uBAAsD,CAAC;AAAA,EAClE;AACF,MAAM;AACJ,QAAM,EAAE,QAAQ,QAAQ,UAAA,IAAcA,4BAAAA,sBAAsB;AACtD,QAAA,EAAE,mBAAmBC,iDAAA;AAAA,IACzBC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AACM,QAAA,EAAE,qBAAqB,0BAAA,IAA8BC,cAAA;AAAA,IACzDC,mFAAAA;AAAAA,EACF;AACA,QAAM,aAAaC,WAAA;AAAA,IACjB,MACE,gBAAgB,eACX,SAAS,gBAAgB,YAAY,KACtC,SAAS,gBAAgB,YAAY,IACrC;AAAA,IACN,CAAC,QAAQ,QAAQ,gBAAgB,YAAY;AAAA,EAC/C;AAEI,MAAA,UAAkB,QAAAC,iDAACC,wBAAAA,QAAO,CAAA,CAAA;AAE1B,MAAA,CAAC,gBAAgB,aAAqB,QAAA;AAEtC,MAAA,CAAC,WAAmB,QAAA;AAGtB,SAAAD,2BAAA,kBAAA;AAAA,IAACE,uDAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
1
+ {"version":3,"file":"DictionariesSelector.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config';\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetAllDictionaries } from '../../../hooks';\nimport { useEditionPanelStore } from '../../DictionaryEditor';\nimport { Loader } from '../../Loader';\nimport { DictionaryFieldEditor } from '../DictionaryFieldEditor';\nimport { dictionariesSelectorContent } from './dictionariesSelector.content';\n\ntype DictionariesSelectorProps = {\n onClickDictionaryList: () => void;\n isDarkMode?: boolean;\n availableLocales: Locales[];\n};\n\nexport const DictionariesSelector: FC<DictionariesSelectorProps> = ({\n onClickDictionaryList,\n isDarkMode,\n availableLocales,\n}) => {\n const { online, locale, isLoading } = useGetAllDictionaries();\n const { focusedContent } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n }))\n );\n const { noDictionaryMessage, dictionaryNotFoundMessage } = useDictionary(\n dictionariesSelectorContent\n );\n const dictionary = useMemo(\n () =>\n focusedContent?.dictionaryKey\n ? (online?.[focusedContent?.dictionaryKey] ??\n locale?.[focusedContent?.dictionaryKey])\n : null,\n [online, locale, focusedContent?.dictionaryKey]\n );\n\n if (isLoading) return <Loader />;\n\n if (!focusedContent?.dictionaryKey) return noDictionaryMessage;\n\n if (!dictionary) return dictionaryNotFoundMessage;\n\n return (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n isDarkMode={isDarkMode}\n availableLocales={availableLocales}\n />\n );\n};\n"],"names":["useGetAllDictionaries","useEditionPanelStore","useShallow","useDictionary","dictionariesSelectorContent","useMemo","jsx","Loader","DictionaryFieldEditor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,QAAQ,QAAQ,UAAA,IAAcA,4BAAAA,sBAAsB;AACtD,QAAA,EAAE,mBAAmBC,iDAAA;AAAA,IACzBC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AACM,QAAA,EAAE,qBAAqB,0BAAA,IAA8BC,cAAA;AAAA,IACzDC,mFAAAA;AAAAA,EACF;AACA,QAAM,aAAaC,WAAA;AAAA,IACjB,MACE,gBAAgB,gBACX,SAAS,gBAAgB,aAAa,KACvC,SAAS,gBAAgB,aAAa,IACtC;AAAA,IACN,CAAC,QAAQ,QAAQ,gBAAgB,aAAa;AAAA,EAChD;AAEI,MAAA,UAAkB,QAAAC,iDAACC,wBAAAA,QAAO,CAAA,CAAA;AAE1B,MAAA,CAAC,gBAAgB,cAAsB,QAAA;AAEvC,MAAA,CAAC,WAAmB,QAAA;AAGtB,SAAAD,2BAAA,kBAAA;AAAA,IAACE,uDAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
@@ -1,6 +1,9 @@
1
+ import { Locales } from '@intlayer/config';
1
2
  import { FC } from 'react';
2
3
  type DictionariesSelectorProps = {
3
4
  onClickDictionaryList: () => void;
5
+ isDarkMode?: boolean;
6
+ availableLocales: Locales[];
4
7
  };
5
8
  export declare const DictionariesSelector: FC<DictionariesSelectorProps>;
6
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"DictionariesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAUzC,KAAK,yBAAyB,GAAG;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAiC9D,CAAC"}
1
+ {"version":3,"file":"DictionariesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAUzC,KAAK,yBAAyB,GAAG;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,EAAE,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAqC9D,CAAC"}
@@ -27,7 +27,9 @@ import { Loader } from "../../Loader/index.mjs";
27
27
  import { DictionaryFieldEditor } from "../DictionaryFieldEditor.mjs";
28
28
  import { dictionariesSelectorContent } from "./dictionariesSelector.content.mjs";
29
29
  const DictionariesSelector = ({
30
- onClickDictionaryList
30
+ onClickDictionaryList,
31
+ isDarkMode,
32
+ availableLocales
31
33
  }) => {
32
34
  const { online, locale, isLoading } = useGetAllDictionaries();
33
35
  const { focusedContent } = useEditionPanelStore(
@@ -39,17 +41,19 @@ const DictionariesSelector = ({
39
41
  dictionariesSelectorContent
40
42
  );
41
43
  const dictionary = useMemo(
42
- () => focusedContent?.dictionaryId ? online?.[focusedContent?.dictionaryId] ?? locale?.[focusedContent?.dictionaryId] : null,
43
- [online, locale, focusedContent?.dictionaryId]
44
+ () => focusedContent?.dictionaryKey ? online?.[focusedContent?.dictionaryKey] ?? locale?.[focusedContent?.dictionaryKey] : null,
45
+ [online, locale, focusedContent?.dictionaryKey]
44
46
  );
45
47
  if (isLoading) return /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, {});
46
- if (!focusedContent?.dictionaryId) return noDictionaryMessage;
48
+ if (!focusedContent?.dictionaryKey) return noDictionaryMessage;
47
49
  if (!dictionary) return dictionaryNotFoundMessage;
48
50
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
49
51
  DictionaryFieldEditor,
50
52
  {
51
53
  dictionary,
52
- onClickDictionaryList
54
+ onClickDictionaryList,
55
+ isDarkMode,
56
+ availableLocales
53
57
  }
54
58
  );
55
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DictionariesSelector.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetAllDictionaries } from '../../../hooks';\nimport { useEditionPanelStore } from '../../DictionaryEditor';\nimport { Loader } from '../../Loader';\nimport { DictionaryFieldEditor } from '../DictionaryFieldEditor';\nimport { dictionariesSelectorContent } from './dictionariesSelector.content';\n\ntype DictionariesSelectorProps = {\n onClickDictionaryList: () => void;\n};\n\nexport const DictionariesSelector: FC<DictionariesSelectorProps> = ({\n onClickDictionaryList,\n}) => {\n const { online, locale, isLoading } = useGetAllDictionaries();\n const { focusedContent } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n }))\n );\n const { noDictionaryMessage, dictionaryNotFoundMessage } = useDictionary(\n dictionariesSelectorContent\n );\n const dictionary = useMemo(\n () =>\n focusedContent?.dictionaryId\n ? (online?.[focusedContent?.dictionaryId] ??\n locale?.[focusedContent?.dictionaryId])\n : null,\n [online, locale, focusedContent?.dictionaryId]\n );\n\n if (isLoading) return <Loader />;\n\n if (!focusedContent?.dictionaryId) return noDictionaryMessage;\n\n if (!dictionary) return dictionaryNotFoundMessage;\n\n return (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n />\n );\n};\n"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,MAAM,uBAAsD,CAAC;AAAA,EAClE;AACF,MAAM;AACJ,QAAM,EAAE,QAAQ,QAAQ,UAAA,IAAc,sBAAsB;AACtD,QAAA,EAAE,mBAAmB;AAAA,IACzB,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AACM,QAAA,EAAE,qBAAqB,0BAAA,IAA8B;AAAA,IACzD;AAAA,EACF;AACA,QAAM,aAAa;AAAA,IACjB,MACE,gBAAgB,eACX,SAAS,gBAAgB,YAAY,KACtC,SAAS,gBAAgB,YAAY,IACrC;AAAA,IACN,CAAC,QAAQ,QAAQ,gBAAgB,YAAY;AAAA,EAC/C;AAEI,MAAA,UAAkB,QAAAA,sCAAC,QAAO,CAAA,CAAA;AAE1B,MAAA,CAAC,gBAAgB,aAAqB,QAAA;AAEtC,MAAA,CAAC,WAAmB,QAAA;AAGtB,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"DictionariesSelector.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config';\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetAllDictionaries } from '../../../hooks';\nimport { useEditionPanelStore } from '../../DictionaryEditor';\nimport { Loader } from '../../Loader';\nimport { DictionaryFieldEditor } from '../DictionaryFieldEditor';\nimport { dictionariesSelectorContent } from './dictionariesSelector.content';\n\ntype DictionariesSelectorProps = {\n onClickDictionaryList: () => void;\n isDarkMode?: boolean;\n availableLocales: Locales[];\n};\n\nexport const DictionariesSelector: FC<DictionariesSelectorProps> = ({\n onClickDictionaryList,\n isDarkMode,\n availableLocales,\n}) => {\n const { online, locale, isLoading } = useGetAllDictionaries();\n const { focusedContent } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n }))\n );\n const { noDictionaryMessage, dictionaryNotFoundMessage } = useDictionary(\n dictionariesSelectorContent\n );\n const dictionary = useMemo(\n () =>\n focusedContent?.dictionaryKey\n ? (online?.[focusedContent?.dictionaryKey] ??\n locale?.[focusedContent?.dictionaryKey])\n : null,\n [online, locale, focusedContent?.dictionaryKey]\n );\n\n if (isLoading) return <Loader />;\n\n if (!focusedContent?.dictionaryKey) return noDictionaryMessage;\n\n if (!dictionary) return dictionaryNotFoundMessage;\n\n return (\n <DictionaryFieldEditor\n dictionary={dictionary}\n onClickDictionaryList={onClickDictionaryList}\n isDarkMode={isDarkMode}\n availableLocales={availableLocales}\n />\n );\n};\n"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,QAAQ,QAAQ,UAAA,IAAc,sBAAsB;AACtD,QAAA,EAAE,mBAAmB;AAAA,IACzB,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,IAAA,EAClB;AAAA,EACJ;AACM,QAAA,EAAE,qBAAqB,0BAAA,IAA8B;AAAA,IACzD;AAAA,EACF;AACA,QAAM,aAAa;AAAA,IACjB,MACE,gBAAgB,gBACX,SAAS,gBAAgB,aAAa,KACvC,SAAS,gBAAgB,aAAa,IACtC;AAAA,IACN,CAAC,QAAQ,QAAQ,gBAAgB,aAAa;AAAA,EAChD;AAEI,MAAA,UAAkB,QAAAA,sCAAC,QAAO,CAAA,CAAA;AAE1B,MAAA,CAAC,gBAAgB,cAAsB,QAAA;AAEvC,MAAA,CAAC,WAAmB,QAAA;AAGtB,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAEJ;"}