@intlayer/design-system 3.3.2 → 3.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (471) hide show
  1. package/dist/.vite/manifest.json +233 -180
  2. package/dist/{Form-DERuauvB.cjs → Form-BDcoNTLV.cjs} +2 -2
  3. package/dist/{Form-DERuauvB.cjs.map → Form-BDcoNTLV.cjs.map} +1 -1
  4. package/dist/{Form-CQpKjeW6.js → Form-DhsgC7kB.js} +2 -2
  5. package/dist/{Form-CQpKjeW6.js.map → Form-DhsgC7kB.js.map} +1 -1
  6. package/dist/components/Accordion/Accordion.cjs +1 -1
  7. package/dist/components/Accordion/Accordion.mjs +1 -1
  8. package/dist/components/Auth/AuthModal/index.cjs +1 -1
  9. package/dist/components/Auth/AuthModal/index.mjs +1 -1
  10. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs +1 -1
  11. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs +1 -1
  12. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +2 -2
  13. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +2 -2
  14. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +1 -1
  15. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +1 -1
  16. package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.cjs +1 -1
  17. package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.mjs +1 -1
  18. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs +1 -1
  19. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs +1 -1
  20. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +2 -2
  21. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +2 -2
  22. package/dist/components/Auth/SignInForm/SignInForm.cjs +2 -2
  23. package/dist/components/Auth/SignInForm/SignInForm.mjs +2 -2
  24. package/dist/components/Auth/SignUpForm/SignUpForm.cjs +2 -2
  25. package/dist/components/Auth/SignUpForm/SignUpForm.mjs +2 -2
  26. package/dist/components/Avatar/index.cjs +1 -1
  27. package/dist/components/Avatar/index.mjs +1 -1
  28. package/dist/components/Badge/index.cjs +1 -1
  29. package/dist/components/Badge/index.d.ts +1 -1
  30. package/dist/components/Badge/index.mjs +1 -1
  31. package/dist/components/Breadcrumb/index.cjs +39 -20
  32. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  33. package/dist/components/Breadcrumb/index.d.ts +2 -2
  34. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  35. package/dist/components/Breadcrumb/index.mjs +39 -20
  36. package/dist/components/Breadcrumb/index.mjs.map +1 -1
  37. package/dist/components/Button/Button.cjs +10 -4
  38. package/dist/components/Button/Button.cjs.map +1 -1
  39. package/dist/components/Button/Button.d.ts +2 -2
  40. package/dist/components/Button/Button.d.ts.map +1 -1
  41. package/dist/components/Button/Button.mjs +10 -4
  42. package/dist/components/Button/Button.mjs.map +1 -1
  43. package/dist/components/Command/index.cjs +1 -1
  44. package/dist/components/Command/index.d.ts.map +1 -1
  45. package/dist/components/Command/index.mjs +1 -1
  46. package/dist/components/Container/index.cjs +11 -2
  47. package/dist/components/Container/index.cjs.map +1 -1
  48. package/dist/components/Container/index.d.ts +2 -0
  49. package/dist/components/Container/index.d.ts.map +1 -1
  50. package/dist/components/Container/index.mjs +11 -2
  51. package/dist/components/Container/index.mjs.map +1 -1
  52. package/dist/components/ContentEditor/ContentEditor.cjs +1 -1
  53. package/dist/components/ContentEditor/ContentEditor.mjs +1 -1
  54. package/dist/components/ContentEditor/ContentEditorTextArea.cjs +18 -5
  55. package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
  56. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +2 -0
  57. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
  58. package/dist/components/ContentEditor/ContentEditorTextArea.mjs +18 -5
  59. package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
  60. package/dist/components/ContentSelector/ContentSelector.cjs +1 -1
  61. package/dist/components/ContentSelector/ContentSelector.mjs +1 -1
  62. package/dist/components/CopyToClipboard/index.cjs +1 -1
  63. package/dist/components/CopyToClipboard/index.mjs +1 -1
  64. package/dist/components/DictionaryEditor/DictionaryEditor.cjs +11 -5
  65. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  66. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
  67. package/dist/components/DictionaryEditor/DictionaryEditor.mjs +11 -5
  68. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  69. package/dist/components/DictionaryEditor/ItemLayout.cjs +1 -1
  70. package/dist/components/DictionaryEditor/ItemLayout.mjs +1 -1
  71. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs +2 -2
  72. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +2 -2
  73. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs +2 -2
  74. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +2 -2
  75. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs +2 -2
  76. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +2 -2
  77. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +1 -1
  78. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +1 -1
  79. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs +2 -2
  80. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs +2 -2
  81. package/dist/components/DictionaryEditor/NodeWrapper/index.cjs +2 -2
  82. package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts +2 -2
  83. package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts.map +1 -1
  84. package/dist/components/DictionaryEditor/NodeWrapper/index.mjs +2 -2
  85. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +2 -2
  86. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +2 -2
  87. package/dist/components/DictionaryEditor/useEditedContentStore.cjs +13 -10
  88. package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
  89. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +1 -0
  90. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
  91. package/dist/components/DictionaryEditor/useEditedContentStore.mjs +13 -10
  92. package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
  93. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +6 -6
  94. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -1
  95. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +6 -6
  96. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -1
  97. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +2 -2
  98. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +2 -2
  99. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +2 -2
  100. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +2 -2
  101. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +2 -2
  102. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +2 -2
  103. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +36 -55
  104. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  105. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  106. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +37 -56
  107. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  108. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +50 -23
  109. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
  110. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
  111. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +51 -24
  112. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
  113. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +2 -2
  114. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +2 -2
  115. package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs +1 -1
  116. package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs +1 -1
  117. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +59 -0
  118. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -0
  119. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts +8 -0
  120. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -0
  121. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +59 -0
  122. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -0
  123. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs +1 -1
  124. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +1 -1
  125. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +2 -2
  126. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -2
  127. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +98 -0
  128. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -0
  129. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts +8 -0
  130. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -0
  131. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +98 -0
  132. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -0
  133. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +2 -2
  134. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +2 -2
  135. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +6 -4
  136. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  137. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  138. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +6 -4
  139. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  140. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +6 -6
  141. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  142. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +6 -6
  143. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  144. package/dist/components/DictionaryFieldEditor/editorView.content.cjs +12 -0
  145. package/dist/components/DictionaryFieldEditor/editorView.content.cjs.map +1 -1
  146. package/dist/components/DictionaryFieldEditor/editorView.content.d.ts +4 -0
  147. package/dist/components/DictionaryFieldEditor/editorView.content.d.ts.map +1 -1
  148. package/dist/components/DictionaryFieldEditor/editorView.content.mjs +12 -0
  149. package/dist/components/DictionaryFieldEditor/editorView.content.mjs.map +1 -1
  150. package/dist/components/DropDown/index.cjs +1 -1
  151. package/dist/components/DropDown/index.mjs +1 -1
  152. package/dist/components/EditableField/EditableFieldInput.cjs +1 -1
  153. package/dist/components/EditableField/EditableFieldInput.mjs +1 -1
  154. package/dist/components/EditableField/EditableFieldLayout.cjs +9 -3
  155. package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
  156. package/dist/components/EditableField/EditableFieldLayout.d.ts +3 -3
  157. package/dist/components/EditableField/EditableFieldLayout.d.ts.map +1 -1
  158. package/dist/components/EditableField/EditableFieldLayout.mjs +9 -3
  159. package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
  160. package/dist/components/EditableField/EditableFieldTextArea.cjs +23 -6
  161. package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
  162. package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
  163. package/dist/components/EditableField/EditableFieldTextArea.mjs +24 -7
  164. package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
  165. package/dist/components/Flags/Flag.cjs +1 -1
  166. package/dist/components/Flags/Flag.mjs +1 -1
  167. package/dist/components/Footer/index.cjs +1 -1
  168. package/dist/components/Footer/index.mjs +1 -1
  169. package/dist/components/Form/Form.cjs +2 -2
  170. package/dist/components/Form/Form.mjs +2 -2
  171. package/dist/components/Form/FormBase.cjs +1 -1
  172. package/dist/components/Form/FormBase.d.ts.map +1 -1
  173. package/dist/components/Form/FormBase.mjs +1 -1
  174. package/dist/components/Form/FormControl.cjs +1 -1
  175. package/dist/components/Form/FormControl.mjs +1 -1
  176. package/dist/components/Form/FormDescription.cjs +1 -1
  177. package/dist/components/Form/FormDescription.mjs +1 -1
  178. package/dist/components/Form/FormField.cjs +1 -1
  179. package/dist/components/Form/FormField.mjs +1 -1
  180. package/dist/components/Form/FormItem.cjs +1 -1
  181. package/dist/components/Form/FormItem.mjs +1 -1
  182. package/dist/components/Form/FormLabel.cjs +1 -1
  183. package/dist/components/Form/FormLabel.mjs +1 -1
  184. package/dist/components/Form/FormMessage.cjs +1 -1
  185. package/dist/components/Form/FormMessage.mjs +1 -1
  186. package/dist/components/Form/elements/CheckboxElement.cjs +2 -2
  187. package/dist/components/Form/elements/CheckboxElement.mjs +2 -2
  188. package/dist/components/Form/elements/EditableFieldInputElement.cjs +2 -2
  189. package/dist/components/Form/elements/EditableFieldInputElement.mjs +2 -2
  190. package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +2 -2
  191. package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +2 -2
  192. package/dist/components/Form/elements/FormElement.cjs +2 -2
  193. package/dist/components/Form/elements/FormElement.mjs +2 -2
  194. package/dist/components/Form/elements/FormElementWrapper.cjs +1 -1
  195. package/dist/components/Form/elements/FormElementWrapper.mjs +1 -1
  196. package/dist/components/Form/elements/InputElement.cjs +2 -2
  197. package/dist/components/Form/elements/InputElement.mjs +2 -2
  198. package/dist/components/Form/elements/InputPasswordElement.cjs +2 -2
  199. package/dist/components/Form/elements/InputPasswordElement.mjs +2 -2
  200. package/dist/components/Form/elements/MultiselectElement.cjs +2 -2
  201. package/dist/components/Form/elements/MultiselectElement.mjs +2 -2
  202. package/dist/components/Form/elements/SelectElement.cjs +2 -2
  203. package/dist/components/Form/elements/SelectElement.mjs +2 -2
  204. package/dist/components/Form/elements/SwitchSelectorElement.cjs +2 -2
  205. package/dist/components/Form/elements/SwitchSelectorElement.mjs +2 -2
  206. package/dist/components/Form/elements/TextAreaElement.cjs +2 -2
  207. package/dist/components/Form/elements/TextAreaElement.mjs +2 -2
  208. package/dist/components/Form/elements/index.cjs +1 -1
  209. package/dist/components/Form/elements/index.mjs +1 -1
  210. package/dist/components/Form/index.cjs +1 -1
  211. package/dist/components/Form/index.mjs +1 -1
  212. package/dist/components/Form/layout/FormItemLayout.cjs +2 -2
  213. package/dist/components/Form/layout/FormItemLayout.mjs +2 -2
  214. package/dist/components/Form/layout/FormLabelLayout.cjs +1 -1
  215. package/dist/components/Form/layout/FormLabelLayout.mjs +1 -1
  216. package/dist/components/Form/layout/RequiredStar.cjs +1 -1
  217. package/dist/components/Form/layout/RequiredStar.mjs +1 -1
  218. package/dist/components/Form/layout/index.cjs +1 -1
  219. package/dist/components/Form/layout/index.mjs +1 -1
  220. package/dist/components/Headers/index.cjs +1 -1
  221. package/dist/components/Headers/index.mjs +1 -1
  222. package/dist/components/IDE/CodeRender.cjs +1 -1
  223. package/dist/components/IDE/CodeRender.mjs +1 -1
  224. package/dist/components/IDE/FileList.cjs +1 -1
  225. package/dist/components/IDE/FileList.mjs +1 -1
  226. package/dist/components/IDE/FileTree.cjs +1 -1
  227. package/dist/components/IDE/FileTree.mjs +1 -1
  228. package/dist/components/IDE/IDE.cjs +1 -1
  229. package/dist/components/IDE/IDE.mjs +1 -1
  230. package/dist/components/IDE/MarkDownRender.cjs +1 -1
  231. package/dist/components/IDE/MarkDownRender.mjs +1 -1
  232. package/dist/components/InformationTag/index.cjs +1 -1
  233. package/dist/components/InformationTag/index.mjs +1 -1
  234. package/dist/components/Input/Checkbox.cjs +1 -1
  235. package/dist/components/Input/Checkbox.d.ts +1 -1
  236. package/dist/components/Input/Checkbox.mjs +1 -1
  237. package/dist/components/Input/Input.cjs +1 -1
  238. package/dist/components/Input/Input.mjs +1 -1
  239. package/dist/components/Input/InputPassword.cjs +1 -1
  240. package/dist/components/Input/InputPassword.mjs +1 -1
  241. package/dist/components/Label/index.cjs +1 -1
  242. package/dist/components/Label/index.mjs +1 -1
  243. package/dist/components/Link/Link.cjs +1 -1
  244. package/dist/components/Link/Link.d.ts +1 -1
  245. package/dist/components/Link/Link.mjs +1 -1
  246. package/dist/components/Loader/index.cjs +1 -1
  247. package/dist/components/Loader/index.mjs +1 -1
  248. package/dist/components/Loader/spinner.cjs +1 -1
  249. package/dist/components/Loader/spinner.mjs +1 -1
  250. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +1 -1
  251. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +1 -1
  252. package/dist/components/Logo/LogoCircle.cjs +1 -1
  253. package/dist/components/Logo/LogoCircle.mjs +1 -1
  254. package/dist/components/Logo/LogoNoFrame.cjs +1 -1
  255. package/dist/components/Logo/LogoNoFrame.mjs +1 -1
  256. package/dist/components/Logo/LogoSquare.cjs +1 -1
  257. package/dist/components/Logo/LogoSquare.mjs +1 -1
  258. package/dist/components/Logo/LogoSquircle.cjs +1 -1
  259. package/dist/components/Logo/LogoSquircle.mjs +1 -1
  260. package/dist/components/Logo/LogoTextOnly.cjs +1 -1
  261. package/dist/components/Logo/LogoTextOnly.mjs +1 -1
  262. package/dist/components/Logo/LogoWithTextBelowCircle.cjs +1 -1
  263. package/dist/components/Logo/LogoWithTextBelowCircle.mjs +1 -1
  264. package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs +1 -1
  265. package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs +1 -1
  266. package/dist/components/Logo/LogoWithTextBelowSquircle.cjs +1 -1
  267. package/dist/components/Logo/LogoWithTextBelowSquircle.mjs +1 -1
  268. package/dist/components/Logo/LogoWithTextCircle.cjs +1 -1
  269. package/dist/components/Logo/LogoWithTextCircle.mjs +1 -1
  270. package/dist/components/Logo/LogoWithTextNoFrame.cjs +1 -1
  271. package/dist/components/Logo/LogoWithTextNoFrame.mjs +1 -1
  272. package/dist/components/Logo/LogoWithTextSquircle.cjs +1 -1
  273. package/dist/components/Logo/LogoWithTextSquircle.mjs +1 -1
  274. package/dist/components/Logo/index.cjs +1 -1
  275. package/dist/components/Logo/index.mjs +1 -1
  276. package/dist/components/MarkDownRender/index.cjs +1 -1
  277. package/dist/components/MarkDownRender/index.mjs +1 -1
  278. package/dist/components/MaxHeightSmoother/index.cjs +1 -1
  279. package/dist/components/MaxHeightSmoother/index.mjs +1 -1
  280. package/dist/components/MaxWidthSmoother/index.cjs +1 -1
  281. package/dist/components/MaxWidthSmoother/index.mjs +1 -1
  282. package/dist/components/Modal/Modal.cjs +1 -1
  283. package/dist/components/Modal/Modal.cjs.map +1 -1
  284. package/dist/components/Modal/Modal.d.ts.map +1 -1
  285. package/dist/components/Modal/Modal.mjs +1 -1
  286. package/dist/components/Modal/Modal.mjs.map +1 -1
  287. package/dist/components/Navbar/Burger.cjs +1 -1
  288. package/dist/components/Navbar/Burger.mjs +1 -1
  289. package/dist/components/Navbar/DesktopNavbar.cjs +1 -1
  290. package/dist/components/Navbar/DesktopNavbar.mjs +1 -1
  291. package/dist/components/Navbar/MobileNavbar.cjs +1 -1
  292. package/dist/components/Navbar/MobileNavbar.mjs +1 -1
  293. package/dist/components/Navbar/index.cjs +1 -1
  294. package/dist/components/Navbar/index.mjs +1 -1
  295. package/dist/components/Pattern/DotPattern.cjs +1 -1
  296. package/dist/components/Pattern/DotPattern.mjs +1 -1
  297. package/dist/components/Pattern/GridPattern.cjs +1 -1
  298. package/dist/components/Pattern/GridPattern.mjs +1 -1
  299. package/dist/components/Pattern/SpotLight.cjs +1 -1
  300. package/dist/components/Pattern/SpotLight.mjs +1 -1
  301. package/dist/components/Popover/index.cjs +1 -1
  302. package/dist/components/Popover/index.mjs +1 -1
  303. package/dist/components/PressableSpan/PressableSpan.cjs +1 -1
  304. package/dist/components/PressableSpan/PressableSpan.mjs +1 -1
  305. package/dist/components/ProfileDropDown/index.cjs +1 -1
  306. package/dist/components/ProfileDropDown/index.mjs +1 -1
  307. package/dist/components/RightDrawer/RightDrawer.cjs +1 -1
  308. package/dist/components/RightDrawer/RightDrawer.mjs +1 -1
  309. package/dist/components/Select/Multiselect.cjs +1 -1
  310. package/dist/components/Select/Multiselect.d.ts.map +1 -1
  311. package/dist/components/Select/Multiselect.mjs +1 -1
  312. package/dist/components/Select/Select.cjs +1 -1
  313. package/dist/components/Select/Select.mjs +1 -1
  314. package/dist/components/SwitchSelector/index.cjs +1 -1
  315. package/dist/components/SwitchSelector/index.d.ts +1 -1
  316. package/dist/components/SwitchSelector/index.mjs +1 -1
  317. package/dist/components/TabSelector/TabSelector.cjs +1 -1
  318. package/dist/components/TabSelector/TabSelector.d.ts +1 -1
  319. package/dist/components/TabSelector/TabSelector.mjs +1 -1
  320. package/dist/components/Tag/index.cjs +1 -1
  321. package/dist/components/Tag/index.mjs +1 -1
  322. package/dist/components/TextArea/AutoSizeTextArea.cjs +1 -1
  323. package/dist/components/TextArea/AutoSizeTextArea.mjs +1 -1
  324. package/dist/components/TextArea/TextArea.cjs +1 -1
  325. package/dist/components/TextArea/TextArea.mjs +1 -1
  326. package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs +1 -1
  327. package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +1 -1
  328. package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs +1 -1
  329. package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs +1 -1
  330. package/dist/components/Toaster/Toast.cjs +1 -1
  331. package/dist/components/Toaster/Toast.mjs +1 -1
  332. package/dist/components/Toaster/Toaster.cjs +1 -1
  333. package/dist/components/Toaster/Toaster.mjs +1 -1
  334. package/dist/components/WithResizer/index.cjs +1 -1
  335. package/dist/components/WithResizer/index.mjs +1 -1
  336. package/dist/components/index.cjs +3 -1
  337. package/dist/components/index.cjs.map +1 -1
  338. package/dist/components/index.d.ts +1 -0
  339. package/dist/components/index.d.ts.map +1 -1
  340. package/dist/components/index.mjs +3 -1
  341. package/dist/components/index.mjs.map +1 -1
  342. package/dist/hooks/intlayerAPIHooks.cjs +1 -1
  343. package/dist/hooks/intlayerAPIHooks.mjs +1 -1
  344. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  345. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  346. package/dist/{index-BZQDMSxb.cjs → index-BtZWYJhL.cjs} +2 -2
  347. package/dist/index-BtZWYJhL.cjs.map +1 -0
  348. package/dist/{index-pLq_417z.js → index-D9oaKvKC.js} +2 -2
  349. package/dist/index-D9oaKvKC.js.map +1 -0
  350. package/dist/{jsx-runtime-BgSF1HG2.js → jsx-runtime-DaNGiM0W.js} +15 -9
  351. package/dist/{jsx-runtime-BgSF1HG2.js.map → jsx-runtime-DaNGiM0W.js.map} +1 -1
  352. package/dist/{jsx-runtime-DvCoRj5u.cjs → jsx-runtime-XHKiWCTo.cjs} +15 -9
  353. package/dist/{jsx-runtime-DvCoRj5u.cjs.map → jsx-runtime-XHKiWCTo.cjs.map} +1 -1
  354. package/dist/tailwind.css +1 -1
  355. package/dist/zod-BV4nCGJE.js.map +1 -1
  356. package/dist/zod-DSrtTSD_.cjs.map +1 -1
  357. package/package.json +47 -45
  358. package/tailwind.config.d.ts +8 -0
  359. package/tailwind.config.js +215 -0
  360. package/dist/Form-2XHQV7F_.cjs +0 -295
  361. package/dist/Form-2XHQV7F_.cjs.map +0 -1
  362. package/dist/Form-BO0i3nT9.js +0 -300
  363. package/dist/Form-BO0i3nT9.js.map +0 -1
  364. package/dist/Form-BaHDK0RZ.cjs +0 -298
  365. package/dist/Form-BaHDK0RZ.cjs.map +0 -1
  366. package/dist/Form-BfZMqK2D.js +0 -300
  367. package/dist/Form-BfZMqK2D.js.map +0 -1
  368. package/dist/Form-C13KWSZs.cjs +0 -299
  369. package/dist/Form-C13KWSZs.cjs.map +0 -1
  370. package/dist/Form-C8K2f8ph.js +0 -300
  371. package/dist/Form-C8K2f8ph.js.map +0 -1
  372. package/dist/Form-CKvCgz8c.cjs +0 -299
  373. package/dist/Form-CKvCgz8c.cjs.map +0 -1
  374. package/dist/Form-Cbk5Lhpd.js +0 -299
  375. package/dist/Form-Cbk5Lhpd.js.map +0 -1
  376. package/dist/Form-Cbu7ff1e.js +0 -278
  377. package/dist/Form-Cbu7ff1e.js.map +0 -1
  378. package/dist/Form-CiAgFAPb.cjs +0 -300
  379. package/dist/Form-CiAgFAPb.cjs.map +0 -1
  380. package/dist/Form-CnBKDneQ.js +0 -296
  381. package/dist/Form-CnBKDneQ.js.map +0 -1
  382. package/dist/Form-DhlDf3ML.cjs +0 -299
  383. package/dist/Form-DhlDf3ML.cjs.map +0 -1
  384. package/dist/Form-DkAZ0Jdf.cjs +0 -299
  385. package/dist/Form-DkAZ0Jdf.cjs.map +0 -1
  386. package/dist/Form-DqnNP4DA.js +0 -300
  387. package/dist/Form-DqnNP4DA.js.map +0 -1
  388. package/dist/Form-DyFBmVya.js +0 -301
  389. package/dist/Form-DyFBmVya.js.map +0 -1
  390. package/dist/Form-FW4Odjfm.js +0 -301
  391. package/dist/Form-FW4Odjfm.js.map +0 -1
  392. package/dist/Form-wWTTkxTp.cjs +0 -277
  393. package/dist/Form-wWTTkxTp.cjs.map +0 -1
  394. package/dist/TabSelector-BmkzVPXl.js +0 -660
  395. package/dist/TabSelector-BmkzVPXl.js.map +0 -1
  396. package/dist/TabSelector-o_NRBvPQ.cjs +0 -659
  397. package/dist/TabSelector-o_NRBvPQ.cjs.map +0 -1
  398. package/dist/components/Auth/AuthProvider/index.cjs +0 -55
  399. package/dist/components/Auth/AuthProvider/index.cjs.map +0 -1
  400. package/dist/components/Auth/AuthProvider/index.d.ts +0 -31
  401. package/dist/components/Auth/AuthProvider/index.d.ts.map +0 -1
  402. package/dist/components/Auth/AuthProvider/index.mjs +0 -55
  403. package/dist/components/Auth/AuthProvider/index.mjs.map +0 -1
  404. package/dist/components/Auth/AuthProvider/useCSRF.cjs +0 -22
  405. package/dist/components/Auth/AuthProvider/useCSRF.cjs.map +0 -1
  406. package/dist/components/Auth/AuthProvider/useCSRF.d.ts +0 -5
  407. package/dist/components/Auth/AuthProvider/useCSRF.d.ts.map +0 -1
  408. package/dist/components/Auth/AuthProvider/useCSRF.mjs +0 -22
  409. package/dist/components/Auth/AuthProvider/useCSRF.mjs.map +0 -1
  410. package/dist/components/Auth/AuthProvider/useOAuth2.cjs +0 -26
  411. package/dist/components/Auth/AuthProvider/useOAuth2.cjs.map +0 -1
  412. package/dist/components/Auth/AuthProvider/useOAuth2.d.ts +0 -4
  413. package/dist/components/Auth/AuthProvider/useOAuth2.d.ts.map +0 -1
  414. package/dist/components/Auth/AuthProvider/useOAuth2.mjs +0 -26
  415. package/dist/components/Auth/AuthProvider/useOAuth2.mjs.map +0 -1
  416. package/dist/components/Auth/AuthProvider/useSession.cjs +0 -70
  417. package/dist/components/Auth/AuthProvider/useSession.cjs.map +0 -1
  418. package/dist/components/Auth/AuthProvider/useSession.d.ts +0 -8
  419. package/dist/components/Auth/AuthProvider/useSession.d.ts.map +0 -1
  420. package/dist/components/Auth/AuthProvider/useSession.mjs +0 -70
  421. package/dist/components/Auth/AuthProvider/useSession.mjs.map +0 -1
  422. package/dist/hooks/useAsync/useProxyState.d.ts +0 -3
  423. package/dist/hooks/useAsync/useProxyState.d.ts.map +0 -1
  424. package/dist/hooks/usePersistenceStore.cjs +0 -22
  425. package/dist/hooks/usePersistenceStore.cjs.map +0 -1
  426. package/dist/hooks/usePersistenceStore.d.ts +0 -2
  427. package/dist/hooks/usePersistenceStore.d.ts.map +0 -1
  428. package/dist/hooks/usePersistenceStore.mjs +0 -22
  429. package/dist/hooks/usePersistenceStore.mjs.map +0 -1
  430. package/dist/index-BUDsCMdX.cjs +0 -204
  431. package/dist/index-BUDsCMdX.cjs.map +0 -1
  432. package/dist/index-BZQDMSxb.cjs.map +0 -1
  433. package/dist/index-C09rI9kw.js +0 -205
  434. package/dist/index-C09rI9kw.js.map +0 -1
  435. package/dist/index-pLq_417z.js.map +0 -1
  436. package/dist/stripe-BsI0lJWz.js +0 -22
  437. package/dist/stripe-BsI0lJWz.js.map +0 -1
  438. package/dist/stripe-C-u5RvGh.js +0 -22
  439. package/dist/stripe-C-u5RvGh.js.map +0 -1
  440. package/dist/stripe-CF_E65Vu.js +0 -22
  441. package/dist/stripe-CF_E65Vu.js.map +0 -1
  442. package/dist/stripe-CpGvfq6T.cjs +0 -21
  443. package/dist/stripe-CpGvfq6T.cjs.map +0 -1
  444. package/dist/stripe-DEv4DjAL.cjs +0 -21
  445. package/dist/stripe-DEv4DjAL.cjs.map +0 -1
  446. package/dist/stripe-DuG0uaEn.cjs +0 -21
  447. package/dist/stripe-DuG0uaEn.cjs.map +0 -1
  448. package/dist/useProxyState-D5GLrY2y.js +0 -20
  449. package/dist/useProxyState-D5GLrY2y.js.map +0 -1
  450. package/dist/useProxyState-DewdF3no.cjs +0 -19
  451. package/dist/useProxyState-DewdF3no.cjs.map +0 -1
  452. package/dist/validDictionaryChangeButtons.content-BK9QaXPm.cjs +0 -66
  453. package/dist/validDictionaryChangeButtons.content-BK9QaXPm.cjs.map +0 -1
  454. package/dist/validDictionaryChangeButtons.content-CAAscqJI.cjs +0 -66
  455. package/dist/validDictionaryChangeButtons.content-CAAscqJI.cjs.map +0 -1
  456. package/dist/validDictionaryChangeButtons.content-D7AvoBdl.js +0 -67
  457. package/dist/validDictionaryChangeButtons.content-D7AvoBdl.js.map +0 -1
  458. package/dist/validDictionaryChangeButtons.content-DQwoUNCC.cjs +0 -45
  459. package/dist/validDictionaryChangeButtons.content-DQwoUNCC.cjs.map +0 -1
  460. package/dist/validDictionaryChangeButtons.content-DQxPoIe6.js +0 -67
  461. package/dist/validDictionaryChangeButtons.content-DQxPoIe6.js.map +0 -1
  462. package/dist/validDictionaryChangeButtons.content-JUcjGdBx.cjs +0 -66
  463. package/dist/validDictionaryChangeButtons.content-JUcjGdBx.cjs.map +0 -1
  464. package/dist/validDictionaryChangeButtons.content-ejY3-sbG.js +0 -67
  465. package/dist/validDictionaryChangeButtons.content-ejY3-sbG.js.map +0 -1
  466. package/dist/validDictionaryChangeButtons.content-iyT0lKy7.js +0 -46
  467. package/dist/validDictionaryChangeButtons.content-iyT0lKy7.js.map +0 -1
  468. package/dist/validDictionaryChangeButtons.content-u4qShrQh.cjs +0 -66
  469. package/dist/validDictionaryChangeButtons.content-u4qShrQh.cjs.map +0 -1
  470. package/dist/validDictionaryChangeButtons.content-y4up9NU8.js +0 -67
  471. package/dist/validDictionaryChangeButtons.content-y4up9NU8.js.map +0 -1
@@ -1,14 +1,17 @@
1
1
  "use client";
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("../../jsx-runtime-DvCoRj5u.cjs");
4
+ const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
5
5
  const lucideReact = require("lucide-react");
6
6
  const require$$0 = require("react");
7
+ const components_Button_Button = require("../Button/Button.cjs");
7
8
  const components_TextArea_AutoSizeTextArea = require("../TextArea/AutoSizeTextArea.cjs");
8
9
  require("../TextArea/TextArea.cjs");
9
10
  const ContentEditorTextArea = ({
10
11
  children,
11
12
  onContentChange,
13
+ disabled,
14
+ validate,
12
15
  ...props
13
16
  }) => {
14
17
  const [newValue, setNewValue] = require$$0.useState(children);
@@ -25,6 +28,7 @@ const ContentEditorTextArea = ({
25
28
  require$$0.useEffect(() => {
26
29
  setNewValue(children);
27
30
  }, [children]);
31
+ const isValid = validate?.(newValue) ?? true;
28
32
  return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
29
33
  "div",
30
34
  {
@@ -43,18 +47,27 @@ const ContentEditorTextArea = ({
43
47
  ),
44
48
  isEdited && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-end gap-2", children: [
45
49
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
46
- lucideReact.Check,
50
+ components_Button_Button.Button,
47
51
  {
52
+ Icon: lucideReact.Check,
53
+ label: "Validate",
54
+ variant: "hoverable",
55
+ color: "text",
56
+ size: "icon-sm",
48
57
  className: "cursor-pointer hover:scale-110",
49
- size: 20,
58
+ disabled: disabled || !isValid,
50
59
  onClick: handleValid
51
60
  }
52
61
  ),
53
62
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
54
- lucideReact.X,
63
+ components_Button_Button.Button,
55
64
  {
65
+ Icon: lucideReact.X,
66
+ label: "Cancel",
67
+ variant: "hoverable",
68
+ size: "icon-sm",
69
+ color: "text",
56
70
  className: "cursor-pointer hover:scale-110",
57
- size: 20,
58
71
  onClick: handleCancel
59
72
  }
60
73
  )
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorTextArea.cjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler, useEffect } from 'react';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={20}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={20}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useEffect","jsxs","jsx","AutoSizedTextArea","Check","X"],"mappings":";;;;;;;;AAWO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,oBAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,oBAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EAAA;AAExC,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAAA;AAG1B,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzCC,aAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAGX,SAAAC,2BAAA,kBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAA,kBAAA;AAAA,UAACC,qCAAA;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,QACC,YACCF,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,UAAAC,2BAAA,kBAAA;AAAA,YAACE,YAAA;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,MAAM;AAAA,cACN,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,UACAF,2BAAA,kBAAA;AAAA,YAACG,YAAA;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,MAAM;AAAA,cACN,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAtBG;AAAA,EAAA;AA0BX;;"}
1
+ {"version":3,"file":"ContentEditorTextArea.cjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler, useEffect } from 'react';\nimport { Button } from '../Button';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useEffect","jsxs","jsx","AutoSizedTextArea","Button","Check","X"],"mappings":";;;;;;;;;AAcO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,oBAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,oBAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EAAA;AAExC,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAAA;AAG1B,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzCC,aAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAC,2BAAA,kBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAA,kBAAA;AAAA,UAACC,qCAAA;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,QACC,YACCF,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,UAAAC,2BAAA,kBAAA;AAAA,YAACE,yBAAA;AAAA,YAAA;AAAA,cACC,MAAMC,YAAA;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,OAAM;AAAA,cACN,MAAK;AAAA,cACL,WAAU;AAAA,cACV,UAAU,YAAY,CAAC;AAAA,cACvB,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,UACAH,2BAAA,kBAAA;AAAA,YAACE,yBAAA;AAAA,YAAA;AAAA,cACC,MAAME,YAAA;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAU;AAAA,cACV,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,IA/BG;AAAA,EAAA;AAmCX;;"}
@@ -3,6 +3,8 @@ import { AutoSizedTextAreaProps } from '../TextArea';
3
3
  export type ContentEditorTextAreaProps = {
4
4
  children: string;
5
5
  onContentChange: (content: string) => void;
6
+ disabled?: boolean;
7
+ validate?: (content: string) => boolean;
6
8
  } & Omit<AutoSizedTextAreaProps, 'children'>;
7
9
  export declare const ContentEditorTextArea: FC<ContentEditorTextAreaProps>;
8
10
  //# sourceMappingURL=ContentEditorTextArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,EAAE,EAAsC,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAqB,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAExE,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAqDhE,CAAC"}
1
+ {"version":3,"file":"ContentEditorTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,EAAE,EAAsC,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAqB,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAExE,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CACzC,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAkEhE,CAAC"}
@@ -1,12 +1,15 @@
1
1
  "use client";
2
- import { j as jsxRuntimeExports } from "../../jsx-runtime-BgSF1HG2.js";
2
+ import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
3
3
  import { Check, X } from "lucide-react";
4
4
  import { useState, useEffect } from "react";
5
+ import { Button } from "../Button/Button.mjs";
5
6
  import { AutoSizedTextArea } from "../TextArea/AutoSizeTextArea.mjs";
6
7
  import "../TextArea/TextArea.mjs";
7
8
  const ContentEditorTextArea = ({
8
9
  children,
9
10
  onContentChange,
11
+ disabled,
12
+ validate,
10
13
  ...props
11
14
  }) => {
12
15
  const [newValue, setNewValue] = useState(children);
@@ -23,6 +26,7 @@ const ContentEditorTextArea = ({
23
26
  useEffect(() => {
24
27
  setNewValue(children);
25
28
  }, [children]);
29
+ const isValid = validate?.(newValue) ?? true;
26
30
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
27
31
  "div",
28
32
  {
@@ -41,18 +45,27 @@ const ContentEditorTextArea = ({
41
45
  ),
42
46
  isEdited && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-end gap-2", children: [
43
47
  /* @__PURE__ */ jsxRuntimeExports.jsx(
44
- Check,
48
+ Button,
45
49
  {
50
+ Icon: Check,
51
+ label: "Validate",
52
+ variant: "hoverable",
53
+ color: "text",
54
+ size: "icon-sm",
46
55
  className: "cursor-pointer hover:scale-110",
47
- size: 20,
56
+ disabled: disabled || !isValid,
48
57
  onClick: handleValid
49
58
  }
50
59
  ),
51
60
  /* @__PURE__ */ jsxRuntimeExports.jsx(
52
- X,
61
+ Button,
53
62
  {
63
+ Icon: X,
64
+ label: "Cancel",
65
+ variant: "hoverable",
66
+ size: "icon-sm",
67
+ color: "text",
54
68
  className: "cursor-pointer hover:scale-110",
55
- size: 20,
56
69
  onClick: handleCancel
57
70
  }
58
71
  )
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler, useEffect } from 'react';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={20}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={20}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;AAWO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EAAA;AAExC,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAAA;AAG1B,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzC,YAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAGX,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,QACC,YACCD,kCAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,UAAAC,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,MAAM;AAAA,cACN,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,UACAA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,MAAM;AAAA,cACN,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAtBG;AAAA,EAAA;AA0BX;"}
1
+ {"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler, useEffect } from 'react';\nimport { Button } from '../Button';\nimport { AutoSizedTextArea, AutoSizedTextAreaProps } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoSizedTextArea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;AAcO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EAAA;AAExC,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAAA;AAG1B,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzC,YAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,QACC,YACCD,kCAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,UAAAC,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,OAAM;AAAA,cACN,MAAK;AAAA,cACL,WAAU;AAAA,cACV,UAAU,YAAY,CAAC;AAAA,cACvB,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,UACAA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAM;AAAA,cACN,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAU;AAAA,cACV,SAAS;AAAA,YAAA;AAAA,UACX;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,IA/BG;AAAA,EAAA;AAmCX;"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("../../jsx-runtime-DvCoRj5u.cjs");
4
+ const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
5
5
  const components_PressableSpan_PressableSpan = require("../PressableSpan/PressableSpan.cjs");
6
6
  const ContentSelector = ({
7
7
  children,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { j as jsxRuntimeExports } from "../../jsx-runtime-BgSF1HG2.js";
2
+ import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
3
3
  import { PressableSpan } from "../PressableSpan/PressableSpan.mjs";
4
4
  const ContentSelector = ({
5
5
  children,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("../../jsx-runtime-DvCoRj5u.cjs");
4
+ const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
5
5
  const require$$0 = require("react");
6
6
  const lucideReact = require("lucide-react");
7
7
  const utils_cn = require("../../utils/cn.cjs");
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { j as jsxRuntimeExports } from "../../jsx-runtime-BgSF1HG2.js";
2
+ import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
3
3
  import { useState } from "react";
4
4
  import { CopyCheck, CopyIcon } from "lucide-react";
5
5
  import { cn } from "../../utils/cn.mjs";
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("../../jsx-runtime-DvCoRj5u.cjs");
5
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../index-BZQDMSxb.cjs");
4
+ const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
5
+ const require$$0 = require("react");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../index-BtZWYJhL.cjs");
6
7
  const components_DictionaryEditor_useEditedContentStore = require("./useEditedContentStore.cjs");
7
8
  const components_DictionaryEditor_useEditionPanelStore = require("./useEditionPanelStore.cjs");
8
9
  const components_DictionaryEditor_ValidDictionaryChangeButtons = require("./ValidDictionaryChangeButtons.cjs");
@@ -22,15 +23,20 @@ const DictionaryEditor = ({
22
23
  );
23
24
  const focusedKeyPath = focusedContent?.keyPath;
24
25
  return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col justify-between gap-2", children: [
25
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
26
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ require$$0.createElement(
26
27
  components_DictionaryEditor_NodeWrapper_ArrayWrapper.NodeWrapper,
27
28
  {
28
29
  ...props,
29
30
  keyPath: [],
30
- editedContent: editedContent.content,
31
+ key: JSON.stringify(
32
+ (editedContent[dictionary.key] ?? dictionary).content
33
+ ),
34
+ editedContent: editedContent[dictionary.key]?.content,
31
35
  focusedKeyPath,
32
36
  section: dictionary.content,
33
- onContentChange: (content) => addEditedContent(dictionary.key, content.newValue, content.keyPath),
37
+ onContentChange: (content) => {
38
+ addEditedContent(dictionary.key, content.newValue, content.keyPath);
39
+ },
34
40
  onFocusKeyPath: setFocusedContentKeyPath
35
41
  }
36
42
  ) }),
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }));\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n editedContent={editedContent.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) =>\n addEditedContent(dictionary.key, content.newValue, content.keyPath)\n }\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <ValidDictionaryChangeButtons dictionary={dictionary} />\n </div>\n );\n};\n"],"names":["useEditedContentStore","useEditionPanelStore","jsxs","jsx","NodeWrapper","ValidDictionaryChangeButtons"],"mappings":";;;;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,kBAAkB,cAAkB,IAAAA,kDAAA,sBAAsB,CAAC,OAAO;AAAA,IACxE,kBAAkB,EAAE;AAAA,IACpB,eAAe,EAAE;AAAA,EACjB,EAAA;AACI,QAAA,EAAE,gBAAgB,yBAAA,IAA6BC,iDAAA;AAAA,IACnD,CAAC,OAAO;AAAA,MACN,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA;AAAA,EAC9B;AAGF,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,iDAAC,OACC,EAAA,UAAAA,2BAAA,kBAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,eAAe,cAAc;AAAA,QAC7B;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAChB,iBAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QAEpE,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAD,iDAACE,yDAAAA,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;;"}
1
+ {"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }));\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <ValidDictionaryChangeButtons dictionary={dictionary} />\n </div>\n );\n};\n"],"names":["useEditedContentStore","useEditionPanelStore","jsxs","jsx","createElement","NodeWrapper","ValidDictionaryChangeButtons"],"mappings":";;;;;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,kBAAkB,cAAkB,IAAAA,kDAAA,sBAAsB,CAAC,OAAO;AAAA,IACxE,kBAAkB,EAAE;AAAA,IACpB,eAAe,EAAE;AAAA,EACjB,EAAA;AACI,QAAA,EAAE,gBAAgB,yBAAA,IAA6BC,iDAAA;AAAA,IACnD,CAAC,OAAO;AAAA,MACN,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA;AAAA,EAC9B;AAGF,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,iDAAC,OACC,EAAA,UAAAC,2BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,cAAc,WAAW,GAAG,KAAK,YAAY;AAAA,QAChD;AAAA,QACA,eAAe,cAAc,WAAW,GAAG,GAAG;AAAA,QAC9C;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAF,iDAACG,yDAAAA,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAmCtD,CAAC"}
1
+ {"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAsCtD,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use client";
2
- import { j as jsxRuntimeExports } from "../../jsx-runtime-BgSF1HG2.js";
3
- import { N as NodeWrapper } from "../../index-pLq_417z.js";
2
+ import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
3
+ import { createElement } from "react";
4
+ import { N as NodeWrapper } from "../../index-D9oaKvKC.js";
4
5
  import { useEditedContentStore } from "./useEditedContentStore.mjs";
5
6
  import { useEditionPanelStore } from "./useEditionPanelStore.mjs";
6
7
  import { ValidDictionaryChangeButtons } from "./ValidDictionaryChangeButtons.mjs";
@@ -20,15 +21,20 @@ const DictionaryEditor = ({
20
21
  );
21
22
  const focusedKeyPath = focusedContent?.keyPath;
22
23
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col justify-between gap-2", children: [
23
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ createElement(
24
25
  NodeWrapper,
25
26
  {
26
27
  ...props,
27
28
  keyPath: [],
28
- editedContent: editedContent.content,
29
+ key: JSON.stringify(
30
+ (editedContent[dictionary.key] ?? dictionary).content
31
+ ),
32
+ editedContent: editedContent[dictionary.key]?.content,
29
33
  focusedKeyPath,
30
34
  section: dictionary.content,
31
- onContentChange: (content) => addEditedContent(dictionary.key, content.newValue, content.keyPath),
35
+ onContentChange: (content) => {
36
+ addEditedContent(dictionary.key, content.newValue, content.keyPath);
37
+ },
32
38
  onFocusKeyPath: setFocusedContentKeyPath
33
39
  }
34
40
  ) }),
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }));\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n editedContent={editedContent.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) =>\n addEditedContent(dictionary.key, content.newValue, content.keyPath)\n }\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <ValidDictionaryChangeButtons dictionary={dictionary} />\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,kBAAkB,cAAkB,IAAA,sBAAsB,CAAC,OAAO;AAAA,IACxE,kBAAkB,EAAE;AAAA,IACpB,eAAe,EAAE;AAAA,EACjB,EAAA;AACI,QAAA,EAAE,gBAAgB,yBAAA,IAA6B;AAAA,IACnD,CAAC,OAAO;AAAA,MACN,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA;AAAA,EAC9B;AAGF,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAA,kCAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,sCAAC,OACC,EAAA,UAAAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,eAAe,cAAc;AAAA,QAC7B;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAChB,iBAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QAEpE,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAA,sCAAC,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }));\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <ValidDictionaryChangeButtons dictionary={dictionary} />\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,kBAAkB,cAAkB,IAAA,sBAAsB,CAAC,OAAO;AAAA,IACxE,kBAAkB,EAAE;AAAA,IACpB,eAAe,EAAE;AAAA,EACjB,EAAA;AACI,QAAA,EAAE,gBAAgB,yBAAA,IAA6B;AAAA,IACnD,CAAC,OAAO;AAAA,MACN,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA;AAAA,EAC9B;AAGF,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAA,kCAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,sCAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,cAAc,WAAW,GAAG,KAAK,YAAY;AAAA,QAChD;AAAA,QACA,eAAe,cAAc,WAAW,GAAG,GAAG;AAAA,QAC9C;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAA,sCAAC,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("../../jsx-runtime-DvCoRj5u.cjs");
3
+ const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
4
4
  const utils_cn = require("../../utils/cn.cjs");
5
5
  const components_Accordion_Accordion = require("../Accordion/Accordion.cjs");
6
6
  const ItemLayout = ({
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntimeExports } from "../../jsx-runtime-BgSF1HG2.js";
1
+ import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
2
2
  import { cn } from "../../utils/cn.mjs";
3
3
  import { Accordion } from "../Accordion/Accordion.mjs";
4
4
  const ItemLayout = ({
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- require("../../../jsx-runtime-DvCoRj5u.cjs");
3
+ require("../../../jsx-runtime-XHKiWCTo.cjs");
4
4
  require("@intlayer/core");
5
5
  require("lucide-react");
6
6
  require("../ItemLayout.cjs");
7
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BZQDMSxb.cjs");
7
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BtZWYJhL.cjs");
8
8
  exports.ArrayWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.ArrayWrapper;
9
9
  //# sourceMappingURL=ArrayWrapper.cjs.map
@@ -1,8 +1,8 @@
1
- import "../../../jsx-runtime-BgSF1HG2.js";
1
+ import "../../../jsx-runtime-DaNGiM0W.js";
2
2
  import "@intlayer/core";
3
3
  import "lucide-react";
4
4
  import "../ItemLayout.mjs";
5
- import { A } from "../../../index-pLq_417z.js";
5
+ import { A } from "../../../index-D9oaKvKC.js";
6
6
  export {
7
7
  A as ArrayWrapper
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- require("../../../jsx-runtime-DvCoRj5u.cjs");
3
+ require("../../../jsx-runtime-XHKiWCTo.cjs");
4
4
  require("react");
5
5
  require("@intlayer/core");
6
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BZQDMSxb.cjs");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BtZWYJhL.cjs");
7
7
  exports.EnumerationWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.EnumerationWrapper;
8
8
  //# sourceMappingURL=EnumerationWrapper.cjs.map
@@ -1,7 +1,7 @@
1
- import "../../../jsx-runtime-BgSF1HG2.js";
1
+ import "../../../jsx-runtime-DaNGiM0W.js";
2
2
  import "react";
3
3
  import "@intlayer/core";
4
- import { E } from "../../../index-pLq_417z.js";
4
+ import { E } from "../../../index-D9oaKvKC.js";
5
5
  export {
6
6
  E as EnumerationWrapper
7
7
  };
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- require("../../../jsx-runtime-DvCoRj5u.cjs");
3
+ require("../../../jsx-runtime-XHKiWCTo.cjs");
4
4
  require("@intlayer/core");
5
5
  require("lucide-react");
6
6
  require("../ItemLayout.cjs");
7
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BZQDMSxb.cjs");
7
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BtZWYJhL.cjs");
8
8
  exports.NestedObjectWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.NestedObjectWrapper;
9
9
  //# sourceMappingURL=NestedObjectWrapper.cjs.map
@@ -1,8 +1,8 @@
1
- import "../../../jsx-runtime-BgSF1HG2.js";
1
+ import "../../../jsx-runtime-DaNGiM0W.js";
2
2
  import "@intlayer/core";
3
3
  import "lucide-react";
4
4
  import "../ItemLayout.mjs";
5
- import { a } from "../../../index-pLq_417z.js";
5
+ import { a } from "../../../index-D9oaKvKC.js";
6
6
  export {
7
7
  a as NestedObjectWrapper
8
8
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("../../../jsx-runtime-DvCoRj5u.cjs");
3
+ const jsxRuntime = require("../../../jsx-runtime-XHKiWCTo.cjs");
4
4
  require("../../EditableField/EditableFieldInput.cjs");
5
5
  const components_EditableField_EditableFieldTextArea = require("../../EditableField/EditableFieldTextArea.cjs");
6
6
  const utils_cn = require("../../../utils/cn.cjs");
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntimeExports } from "../../../jsx-runtime-BgSF1HG2.js";
1
+ import { j as jsxRuntimeExports } from "../../../jsx-runtime-DaNGiM0W.js";
2
2
  import "../../EditableField/EditableFieldInput.mjs";
3
3
  import { EditableFieldTextArea } from "../../EditableField/EditableFieldTextArea.mjs";
4
4
  import { cn } from "../../../utils/cn.mjs";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- require("../../../jsx-runtime-DvCoRj5u.cjs");
3
+ require("../../../jsx-runtime-XHKiWCTo.cjs");
4
4
  require("@intlayer/core");
5
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BZQDMSxb.cjs");
5
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BtZWYJhL.cjs");
6
6
  exports.TranslationWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.TranslationWrapper;
7
7
  //# sourceMappingURL=TranslationWrapper.cjs.map
@@ -1,6 +1,6 @@
1
- import "../../../jsx-runtime-BgSF1HG2.js";
1
+ import "../../../jsx-runtime-DaNGiM0W.js";
2
2
  import "@intlayer/core";
3
- import { T } from "../../../index-pLq_417z.js";
3
+ import { T } from "../../../index-D9oaKvKC.js";
4
4
  export {
5
5
  T as TranslationWrapper
6
6
  };
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- require("../../../jsx-runtime-DvCoRj5u.cjs");
3
+ require("../../../jsx-runtime-XHKiWCTo.cjs");
4
4
  require("@intlayer/core");
5
5
  require("react");
6
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BZQDMSxb.cjs");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BtZWYJhL.cjs");
7
7
  require("./StringWrapper.cjs");
8
8
  exports.NodeWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.NodeWrapper;
9
9
  exports.traceKeys = components_DictionaryEditor_NodeWrapper_ArrayWrapper.traceKeys;
@@ -1,5 +1,5 @@
1
1
  import { Locales } from '@intlayer/config/client';
2
- import { KeyPath, DictionaryValue, Dictionary } from '@intlayer/core';
2
+ import { KeyPath, DictionaryValue } from '@intlayer/core';
3
3
  import { FC } from 'react';
4
4
  export declare const traceKeys: string[];
5
5
  export type NodeWrapperProps = {
@@ -10,7 +10,7 @@ export type NodeWrapperProps = {
10
10
  newValue: string;
11
11
  }) => void;
12
12
  locale: Locales;
13
- editedContent: Dictionary;
13
+ editedContent: DictionaryValue;
14
14
  focusedKeyPath: KeyPath[] | undefined;
15
15
  onFocusKeyPath: (keyPath: KeyPath[]) => void;
16
16
  onClickEdit?: (keyPath: KeyPath[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAIL,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAOf,eAAO,MAAM,SAAS,EAAE,MAAM,EAAmC,CAAC;AAKlE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,eAAe,EAAE,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7E,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,UAAU,CAAC;IAC1B,cAAc,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IACtC,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAC7C,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC5C,CAAC;AAsCF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAsD5C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAIL,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAOf,eAAO,MAAM,SAAS,EAAE,MAAM,EAAmC,CAAC;AAKlE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,eAAe,EAAE,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7E,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,eAAe,CAAC;IAC/B,cAAc,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IACtC,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAC7C,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC5C,CAAC;AAsCF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAsD5C,CAAC"}
@@ -1,7 +1,7 @@
1
- import "../../../jsx-runtime-BgSF1HG2.js";
1
+ import "../../../jsx-runtime-DaNGiM0W.js";
2
2
  import "@intlayer/core";
3
3
  import "react";
4
- import { N, t } from "../../../index-pLq_417z.js";
4
+ import { N, t } from "../../../index-D9oaKvKC.js";
5
5
  import "./StringWrapper.mjs";
6
6
  export {
7
7
  N as NodeWrapper,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("../../jsx-runtime-DvCoRj5u.cjs");
4
+ const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
5
5
  const lucideReact = require("lucide-react");
6
6
  const require$$0 = require("react");
7
7
  const reactIntlayer = require("react-intlayer");
@@ -12,7 +12,7 @@ require("@intlayer/dictionaries-entry");
12
12
  require("deepmerge");
13
13
  const components_Form_FormBase = require("../Form/FormBase.cjs");
14
14
  require("../Form/FormField.cjs");
15
- const components_Form_layout_FormItemLayout = require("../../Form-DERuauvB.cjs");
15
+ const components_Form_layout_FormItemLayout = require("../../Form-BDcoNTLV.cjs");
16
16
  const components_DictionaryEditor_useEditedContentStore = require("./useEditedContentStore.cjs");
17
17
  const components_DictionaryEditor_validDictionaryChangeButtons_content = require("./validDictionaryChangeButtons.content.cjs");
18
18
  const components_DictionaryEditor_validDictionaryChangeButtonsSchema = require("./validDictionaryChangeButtonsSchema.cjs");
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { j as jsxRuntimeExports } from "../../jsx-runtime-BgSF1HG2.js";
2
+ import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
3
3
  import { RotateCcw, ArrowUpFromLine, Save } from "lucide-react";
4
4
  import { useMemo } from "react";
5
5
  import { useDictionary } from "react-intlayer";
@@ -10,7 +10,7 @@ import "@intlayer/dictionaries-entry";
10
10
  import "deepmerge";
11
11
  import { useForm } from "../Form/FormBase.mjs";
12
12
  import "../Form/FormField.mjs";
13
- import { F as Form } from "../../Form-CQpKjeW6.js";
13
+ import { F as Form } from "../../Form-DhsgC7kB.js";
14
14
  import { useEditedContentStore } from "./useEditedContentStore.mjs";
15
15
  import { validDictionaryChangeButtonsContent } from "./validDictionaryChangeButtons.content.mjs";
16
16
  import { getValidDictionaryChangeButtonsSchemaSchema } from "./validDictionaryChangeButtonsSchema.mjs";
@@ -348,6 +348,15 @@ const useEditedContentStore = zustand.create(
348
348
  ...dictionariesRecord
349
349
  }
350
350
  })),
351
+ setEditedContent: (dictionaryKey, newValue) => set((state) => ({
352
+ editedContent: {
353
+ ...state.editedContent,
354
+ [dictionaryKey]: {
355
+ ...state.editedContent[dictionaryKey],
356
+ content: newValue
357
+ }
358
+ }
359
+ })),
351
360
  addEditedContent: (dictionaryKey, newValue, keyPath = [], overwrite = true) => set((state) => {
352
361
  const dictionaryContent = state.editedContent[dictionaryKey]?.content ?? JSON.parse(
353
362
  JSON.stringify(state.dictionariesRecord[dictionaryKey].content)
@@ -441,16 +450,10 @@ const useEditedContentStore = zustand.create(
441
450
  },
442
451
  restoreEditedContent: (dictionaryKey) => {
443
452
  set((state) => {
444
- const dictionaryContent = state.dictionariesRecord[dictionaryKey].content;
445
- const clonedContent = JSON.parse(JSON.stringify(dictionaryContent));
453
+ const updatedEditedContent = { ...state.editedContent };
454
+ delete updatedEditedContent[dictionaryKey];
446
455
  return {
447
- editedContent: {
448
- ...state.editedContent,
449
- [dictionaryKey]: {
450
- ...state.editedContent[dictionaryKey],
451
- content: clonedContent
452
- }
453
- }
456
+ editedContent: updatedEditedContent
454
457
  };
455
458
  });
456
459
  },
@@ -476,7 +479,7 @@ const useEditedContentStore = zustand.create(
476
479
  set({ editedContent: {} });
477
480
  },
478
481
  getEditedContentValue: (dictionaryKey, keyPath) => utils_dictionary.getDictionaryValueByKeyPath(
479
- get().editedContent[dictionaryKey],
482
+ get().editedContent[dictionaryKey]?.content ?? {},
480
483
  keyPath
481
484
  )
482
485
  }),