@intlayer/design-system 5.5.11 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/README.md +1 -1
  2. package/dist/.vite/manifest.json +126 -570
  3. package/dist/components/Command/index.d.ts +5 -5
  4. package/dist/components/Container/index.cjs +2 -1
  5. package/dist/components/Container/index.cjs.map +1 -1
  6. package/dist/components/Container/index.d.ts +2 -3
  7. package/dist/components/Container/index.d.ts.map +1 -1
  8. package/dist/components/Container/index.mjs +3 -2
  9. package/dist/components/Container/index.mjs.map +1 -1
  10. package/dist/components/ContentEditor/ContentEditorTextArea.cjs +2 -27
  11. package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
  12. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +1 -1
  13. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
  14. package/dist/components/ContentEditor/ContentEditorTextArea.mjs +1 -26
  15. package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
  16. package/dist/components/{IDE/CopyButton.cjs → CopyButton/index.cjs} +6 -5
  17. package/dist/components/CopyButton/index.cjs.map +1 -0
  18. package/dist/components/{IDE/CopyButton.d.ts → CopyButton/index.d.ts} +3 -2
  19. package/dist/components/CopyButton/index.d.ts.map +1 -0
  20. package/dist/components/{IDE/CopyButton.mjs → CopyButton/index.mjs} +6 -5
  21. package/dist/components/CopyButton/index.mjs.map +1 -0
  22. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +2 -0
  23. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
  24. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +2 -0
  25. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
  26. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +9 -28
  27. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
  28. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +8 -27
  29. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
  30. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs +1 -1
  31. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +1 -1
  32. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +10 -26
  33. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  34. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +9 -25
  35. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  36. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +1 -1
  37. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +1 -1
  38. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +2 -2
  39. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +2 -2
  40. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +7 -20
  41. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  42. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +6 -19
  43. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  44. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +2 -2
  45. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +2 -2
  46. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +2 -2
  47. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +2 -2
  48. package/dist/components/EditableField/EditableFieldTextArea.cjs +2 -2
  49. package/dist/components/EditableField/EditableFieldTextArea.mjs +2 -2
  50. package/dist/components/Form/elements/FormElementWrapper.cjs +1 -1
  51. package/dist/components/Form/elements/FormElementWrapper.mjs +1 -1
  52. package/dist/components/IDE/Code.cjs +3 -3
  53. package/dist/components/IDE/Code.cjs.map +1 -1
  54. package/dist/components/IDE/Code.d.ts +1 -1
  55. package/dist/components/IDE/Code.d.ts.map +1 -1
  56. package/dist/components/IDE/Code.mjs +3 -3
  57. package/dist/components/IDE/Code.mjs.map +1 -1
  58. package/dist/components/IDE/CodeContext.cjs +2 -2
  59. package/dist/components/IDE/CodeContext.mjs +2 -2
  60. package/dist/components/IDE/CopyCode.cjs +28 -0
  61. package/dist/components/IDE/CopyCode.cjs.map +1 -0
  62. package/dist/components/IDE/CopyCode.d.ts +7 -0
  63. package/dist/components/IDE/CopyCode.d.ts.map +1 -0
  64. package/dist/components/IDE/CopyCode.mjs +28 -0
  65. package/dist/components/IDE/CopyCode.mjs.map +1 -0
  66. package/dist/components/IDE/MonacoCode.cjs +2 -2
  67. package/dist/components/IDE/MonacoCode.cjs.map +1 -1
  68. package/dist/components/IDE/MonacoCode.mjs +1 -1
  69. package/dist/components/IDE/MonacoCode.mjs.map +1 -1
  70. package/dist/components/IDE/code.content.cjs +39 -0
  71. package/dist/components/IDE/code.content.cjs.map +1 -0
  72. package/dist/components/{Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts → IDE/code.content.d.ts} +23 -56
  73. package/dist/components/IDE/code.content.d.ts.map +1 -0
  74. package/dist/components/IDE/code.content.mjs +40 -0
  75. package/dist/components/IDE/code.content.mjs.map +1 -0
  76. package/dist/components/IDE/copyCode.content.cjs +39 -0
  77. package/dist/components/IDE/copyCode.content.cjs.map +1 -0
  78. package/dist/components/IDE/copyCode.content.d.ts +73 -0
  79. package/dist/components/IDE/copyCode.content.d.ts.map +1 -0
  80. package/dist/components/IDE/copyCode.content.mjs +40 -0
  81. package/dist/components/IDE/copyCode.content.mjs.map +1 -0
  82. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +2 -2
  83. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -2
  84. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +2 -2
  85. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +2 -2
  86. package/dist/components/Modal/Modal.cjs +3 -3
  87. package/dist/components/Modal/Modal.mjs +3 -3
  88. package/dist/components/Navbar/MobileNavbar.cjs +2 -2
  89. package/dist/components/Navbar/MobileNavbar.mjs +2 -2
  90. package/dist/components/Navbar/index.cjs +3 -3
  91. package/dist/components/Navbar/index.mjs +3 -3
  92. package/dist/components/Pattern/GridPattern.cjs +45 -48
  93. package/dist/components/Pattern/GridPattern.cjs.map +1 -1
  94. package/dist/components/Pattern/GridPattern.d.ts.map +1 -1
  95. package/dist/components/Pattern/GridPattern.mjs +45 -48
  96. package/dist/components/Pattern/GridPattern.mjs.map +1 -1
  97. package/dist/components/Popover/index.cjs +59 -15
  98. package/dist/components/Popover/index.cjs.map +1 -1
  99. package/dist/components/Popover/index.d.ts +32 -6
  100. package/dist/components/Popover/index.d.ts.map +1 -1
  101. package/dist/components/Popover/index.mjs +60 -16
  102. package/dist/components/Popover/index.mjs.map +1 -1
  103. package/dist/components/SocialNetworks/index.cjs +1 -1
  104. package/dist/components/SocialNetworks/index.cjs.map +1 -1
  105. package/dist/components/SocialNetworks/index.mjs +1 -1
  106. package/dist/components/SocialNetworks/index.mjs.map +1 -1
  107. package/dist/components/SwitchSelector/index.cjs +2 -2
  108. package/dist/components/SwitchSelector/index.mjs +2 -2
  109. package/dist/components/TabSelector/TabSelector.cjs +2 -2
  110. package/dist/components/TabSelector/TabSelector.mjs +2 -2
  111. package/dist/components/TextArea/AutocompleteTextArea.cjs +90 -13
  112. package/dist/components/TextArea/AutocompleteTextArea.cjs.map +1 -1
  113. package/dist/components/TextArea/AutocompleteTextArea.d.ts.map +1 -1
  114. package/dist/components/TextArea/AutocompleteTextArea.mjs +92 -15
  115. package/dist/components/TextArea/AutocompleteTextArea.mjs.map +1 -1
  116. package/dist/components/index.cjs +3 -38
  117. package/dist/components/index.cjs.map +1 -1
  118. package/dist/components/index.d.ts +1 -2
  119. package/dist/components/index.d.ts.map +1 -1
  120. package/dist/components/index.mjs +4 -39
  121. package/dist/components/index.mjs.map +1 -1
  122. package/dist/hooks/index.cjs +8 -1
  123. package/dist/hooks/index.cjs.map +1 -1
  124. package/dist/hooks/index.d.ts +2 -0
  125. package/dist/hooks/index.d.ts.map +1 -1
  126. package/dist/hooks/index.mjs +9 -2
  127. package/dist/hooks/index.mjs.map +1 -1
  128. package/dist/hooks/intlayerAPIHooks.cjs +29 -31
  129. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  130. package/dist/hooks/intlayerAPIHooks.d.ts +678 -10
  131. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  132. package/dist/hooks/intlayerAPIHooks.mjs +29 -31
  133. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  134. package/dist/hooks/useAsync/useAsync.cjs +0 -1
  135. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  136. package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
  137. package/dist/hooks/useAsync/useAsync.mjs +0 -1
  138. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  139. package/dist/hooks/useAuth/index.cjs +9 -0
  140. package/dist/{components/Auth/AuthenticationBarrier → hooks/useAuth}/index.cjs.map +1 -1
  141. package/dist/hooks/useAuth/index.d.ts +4 -0
  142. package/dist/hooks/useAuth/index.d.ts.map +1 -0
  143. package/dist/hooks/useAuth/index.mjs +9 -0
  144. package/dist/{components/Auth/ExternalsLoginButtons → hooks/useAuth}/index.mjs.map +1 -1
  145. package/dist/hooks/useAuth/useAuth.cjs +25 -0
  146. package/dist/hooks/useAuth/useAuth.cjs.map +1 -0
  147. package/dist/{components/Auth/useAuth/index.d.ts → hooks/useAuth/useAuth.d.ts} +3 -13
  148. package/dist/hooks/useAuth/useAuth.d.ts.map +1 -0
  149. package/dist/{components/Auth/useAuth/index.mjs → hooks/useAuth/useAuth.mjs} +2 -8
  150. package/dist/hooks/useAuth/useAuth.mjs.map +1 -0
  151. package/dist/{components/Auth → hooks}/useAuth/useOAuth2.cjs +3 -3
  152. package/dist/hooks/useAuth/useOAuth2.cjs.map +1 -0
  153. package/dist/{components/Auth → hooks}/useAuth/useOAuth2.d.ts +1 -1
  154. package/dist/hooks/useAuth/useOAuth2.d.ts.map +1 -0
  155. package/dist/{components/Auth → hooks}/useAuth/useOAuth2.mjs +4 -4
  156. package/dist/hooks/useAuth/useOAuth2.mjs.map +1 -0
  157. package/dist/{components/Auth → hooks}/useAuth/useSession.cjs +6 -25
  158. package/dist/hooks/useAuth/useSession.cjs.map +1 -0
  159. package/dist/{components/Auth → hooks}/useAuth/useSession.d.ts +3 -3
  160. package/dist/hooks/useAuth/useSession.d.ts.map +1 -0
  161. package/dist/hooks/useAuth/useSession.mjs +47 -0
  162. package/dist/hooks/useAuth/useSession.mjs.map +1 -0
  163. package/dist/hooks/useIntlayerAPI.cjs +5 -4
  164. package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
  165. package/dist/hooks/useIntlayerAPI.mjs +5 -4
  166. package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
  167. package/dist/{components/Auth → hooks}/useUser/index.cjs +7 -5
  168. package/dist/hooks/useUser/index.cjs.map +1 -0
  169. package/dist/hooks/useUser/index.d.ts +8 -0
  170. package/dist/hooks/useUser/index.d.ts.map +1 -0
  171. package/dist/{components/Auth → hooks}/useUser/index.mjs +6 -4
  172. package/dist/hooks/useUser/index.mjs.map +1 -0
  173. package/dist/{schemas-itjzX6bG.js → schemas-BIuxHDyZ.js} +3 -7
  174. package/dist/{schemas-itjzX6bG.js.map → schemas-BIuxHDyZ.js.map} +1 -1
  175. package/dist/{schemas-DlCjM5d_.cjs → schemas-Q6C7ZNs3.cjs} +3 -7
  176. package/dist/{schemas-DlCjM5d_.cjs.map → schemas-Q6C7ZNs3.cjs.map} +1 -1
  177. package/dist/tailwind.css +1 -1
  178. package/package.json +18 -18
  179. package/dist/components/Auth/AuthModal/index.cjs +0 -106
  180. package/dist/components/Auth/AuthModal/index.cjs.map +0 -1
  181. package/dist/components/Auth/AuthModal/index.d.ts +0 -20
  182. package/dist/components/Auth/AuthModal/index.d.ts.map +0 -1
  183. package/dist/components/Auth/AuthModal/index.mjs +0 -106
  184. package/dist/components/Auth/AuthModal/index.mjs.map +0 -1
  185. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs +0 -36
  186. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs.map +0 -1
  187. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.d.ts +0 -5
  188. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.d.ts.map +0 -1
  189. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs +0 -36
  190. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs.map +0 -1
  191. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs +0 -22
  192. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs.map +0 -1
  193. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts +0 -8
  194. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts.map +0 -1
  195. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs +0 -22
  196. package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs.map +0 -1
  197. package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs +0 -15
  198. package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs.map +0 -1
  199. package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts +0 -4
  200. package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts.map +0 -1
  201. package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs +0 -15
  202. package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs.map +0 -1
  203. package/dist/components/Auth/AuthenticationBarrier/index.cjs +0 -7
  204. package/dist/components/Auth/AuthenticationBarrier/index.d.ts +0 -23
  205. package/dist/components/Auth/AuthenticationBarrier/index.d.ts.map +0 -1
  206. package/dist/components/Auth/AuthenticationBarrier/index.mjs +0 -7
  207. package/dist/components/Auth/AuthenticationBarrier/index.mjs.map +0 -1
  208. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +0 -95
  209. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +0 -1
  210. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +0 -9
  211. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +0 -1
  212. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +0 -95
  213. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +0 -1
  214. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs +0 -138
  215. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs.map +0 -1
  216. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts +0 -278
  217. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts.map +0 -1
  218. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs +0 -138
  219. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs.map +0 -1
  220. package/dist/components/Auth/ChangePasswordForm/index.cjs +0 -7
  221. package/dist/components/Auth/ChangePasswordForm/index.cjs.map +0 -1
  222. package/dist/components/Auth/ChangePasswordForm/index.d.ts +0 -3
  223. package/dist/components/Auth/ChangePasswordForm/index.d.ts.map +0 -1
  224. package/dist/components/Auth/ChangePasswordForm/index.mjs +0 -7
  225. package/dist/components/Auth/ChangePasswordForm/index.mjs.map +0 -1
  226. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs +0 -34
  227. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs.map +0 -1
  228. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs +0 -131
  229. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs.map +0 -1
  230. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts +0 -271
  231. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts.map +0 -1
  232. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs +0 -131
  233. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs.map +0 -1
  234. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.d.ts +0 -8
  235. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.d.ts.map +0 -1
  236. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs +0 -34
  237. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs.map +0 -1
  238. package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs +0 -81
  239. package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs.map +0 -1
  240. package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.d.ts +0 -9
  241. package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.d.ts.map +0 -1
  242. package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs +0 -81
  243. package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs.map +0 -1
  244. package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.cjs +0 -106
  245. package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.cjs.map +0 -1
  246. package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.d.ts +0 -210
  247. package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.d.ts.map +0 -1
  248. package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.mjs +0 -106
  249. package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.mjs.map +0 -1
  250. package/dist/components/Auth/DefineNewPasswordForm/index.cjs +0 -7
  251. package/dist/components/Auth/DefineNewPasswordForm/index.cjs.map +0 -1
  252. package/dist/components/Auth/DefineNewPasswordForm/index.d.ts +0 -3
  253. package/dist/components/Auth/DefineNewPasswordForm/index.d.ts.map +0 -1
  254. package/dist/components/Auth/DefineNewPasswordForm/index.mjs +0 -7
  255. package/dist/components/Auth/DefineNewPasswordForm/index.mjs.map +0 -1
  256. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.cjs +0 -29
  257. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.cjs.map +0 -1
  258. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.cjs +0 -101
  259. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.cjs.map +0 -1
  260. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.d.ts +0 -205
  261. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.d.ts.map +0 -1
  262. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.mjs +0 -101
  263. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.mjs.map +0 -1
  264. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.d.ts +0 -7
  265. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.d.ts.map +0 -1
  266. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.mjs +0 -29
  267. package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.mjs.map +0 -1
  268. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +0 -81
  269. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +0 -1
  270. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts +0 -9
  271. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts.map +0 -1
  272. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +0 -81
  273. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +0 -1
  274. package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.cjs +0 -15
  275. package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.cjs.map +0 -1
  276. package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.d.ts +0 -3
  277. package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.d.ts.map +0 -1
  278. package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.mjs +0 -15
  279. package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.mjs.map +0 -1
  280. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs +0 -23
  281. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs.map +0 -1
  282. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.d.ts +0 -3
  283. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.d.ts.map +0 -1
  284. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs +0 -23
  285. package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs.map +0 -1
  286. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs +0 -90
  287. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +0 -1
  288. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +0 -176
  289. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts.map +0 -1
  290. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs +0 -90
  291. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +0 -1
  292. package/dist/components/Auth/ExternalsLoginButtons/index.cjs +0 -7
  293. package/dist/components/Auth/ExternalsLoginButtons/index.cjs.map +0 -1
  294. package/dist/components/Auth/ExternalsLoginButtons/index.d.ts +0 -2
  295. package/dist/components/Auth/ExternalsLoginButtons/index.d.ts.map +0 -1
  296. package/dist/components/Auth/ExternalsLoginButtons/index.mjs +0 -7
  297. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +0 -113
  298. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +0 -1
  299. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts +0 -11
  300. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts.map +0 -1
  301. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +0 -113
  302. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +0 -1
  303. package/dist/components/Auth/ResetPasswordForm/index.cjs +0 -7
  304. package/dist/components/Auth/ResetPasswordForm/index.cjs.map +0 -1
  305. package/dist/components/Auth/ResetPasswordForm/index.d.ts +0 -3
  306. package/dist/components/Auth/ResetPasswordForm/index.d.ts.map +0 -1
  307. package/dist/components/Auth/ResetPasswordForm/index.mjs +0 -7
  308. package/dist/components/Auth/ResetPasswordForm/index.mjs.map +0 -1
  309. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.cjs +0 -123
  310. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.cjs.map +0 -1
  311. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts +0 -245
  312. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts.map +0 -1
  313. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.mjs +0 -123
  314. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.mjs.map +0 -1
  315. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs +0 -15
  316. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs.map +0 -1
  317. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs +0 -56
  318. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs.map +0 -1
  319. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts.map +0 -1
  320. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs +0 -56
  321. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs.map +0 -1
  322. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts +0 -6
  323. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts.map +0 -1
  324. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs +0 -15
  325. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs.map +0 -1
  326. package/dist/components/Auth/SignInForm/SignInForm.cjs +0 -105
  327. package/dist/components/Auth/SignInForm/SignInForm.cjs.map +0 -1
  328. package/dist/components/Auth/SignInForm/SignInForm.d.ts +0 -11
  329. package/dist/components/Auth/SignInForm/SignInForm.d.ts.map +0 -1
  330. package/dist/components/Auth/SignInForm/SignInForm.mjs +0 -105
  331. package/dist/components/Auth/SignInForm/SignInForm.mjs.map +0 -1
  332. package/dist/components/Auth/SignInForm/index.cjs +0 -7
  333. package/dist/components/Auth/SignInForm/index.cjs.map +0 -1
  334. package/dist/components/Auth/SignInForm/index.d.ts +0 -3
  335. package/dist/components/Auth/SignInForm/index.d.ts.map +0 -1
  336. package/dist/components/Auth/SignInForm/index.mjs +0 -7
  337. package/dist/components/Auth/SignInForm/index.mjs.map +0 -1
  338. package/dist/components/Auth/SignInForm/signIn.content.cjs +0 -217
  339. package/dist/components/Auth/SignInForm/signIn.content.cjs.map +0 -1
  340. package/dist/components/Auth/SignInForm/signIn.content.d.ts +0 -447
  341. package/dist/components/Auth/SignInForm/signIn.content.d.ts.map +0 -1
  342. package/dist/components/Auth/SignInForm/signIn.content.mjs +0 -217
  343. package/dist/components/Auth/SignInForm/signIn.content.mjs.map +0 -1
  344. package/dist/components/Auth/SignInForm/useSignInSchema.cjs +0 -23
  345. package/dist/components/Auth/SignInForm/useSignInSchema.cjs.map +0 -1
  346. package/dist/components/Auth/SignInForm/useSignInSchema.content.cjs +0 -71
  347. package/dist/components/Auth/SignInForm/useSignInSchema.content.cjs.map +0 -1
  348. package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts +0 -139
  349. package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts.map +0 -1
  350. package/dist/components/Auth/SignInForm/useSignInSchema.content.mjs +0 -71
  351. package/dist/components/Auth/SignInForm/useSignInSchema.content.mjs.map +0 -1
  352. package/dist/components/Auth/SignInForm/useSignInSchema.d.ts +0 -7
  353. package/dist/components/Auth/SignInForm/useSignInSchema.d.ts.map +0 -1
  354. package/dist/components/Auth/SignInForm/useSignInSchema.mjs +0 -23
  355. package/dist/components/Auth/SignInForm/useSignInSchema.mjs.map +0 -1
  356. package/dist/components/Auth/SignUpForm/SignUpForm.cjs +0 -98
  357. package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +0 -1
  358. package/dist/components/Auth/SignUpForm/SignUpForm.d.ts +0 -10
  359. package/dist/components/Auth/SignUpForm/SignUpForm.d.ts.map +0 -1
  360. package/dist/components/Auth/SignUpForm/SignUpForm.mjs +0 -98
  361. package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +0 -1
  362. package/dist/components/Auth/SignUpForm/index.cjs +0 -7
  363. package/dist/components/Auth/SignUpForm/index.cjs.map +0 -1
  364. package/dist/components/Auth/SignUpForm/index.d.ts +0 -3
  365. package/dist/components/Auth/SignUpForm/index.d.ts.map +0 -1
  366. package/dist/components/Auth/SignUpForm/index.mjs +0 -7
  367. package/dist/components/Auth/SignUpForm/index.mjs.map +0 -1
  368. package/dist/components/Auth/SignUpForm/signUpForm.content.cjs +0 -184
  369. package/dist/components/Auth/SignUpForm/signUpForm.content.cjs.map +0 -1
  370. package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +0 -380
  371. package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts.map +0 -1
  372. package/dist/components/Auth/SignUpForm/signUpForm.content.mjs +0 -185
  373. package/dist/components/Auth/SignUpForm/signUpForm.content.mjs.map +0 -1
  374. package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs +0 -33
  375. package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs.map +0 -1
  376. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.cjs +0 -116
  377. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.cjs.map +0 -1
  378. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts +0 -238
  379. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts.map +0 -1
  380. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.mjs +0 -116
  381. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.mjs.map +0 -1
  382. package/dist/components/Auth/SignUpForm/useSignUpSchema.d.ts +0 -8
  383. package/dist/components/Auth/SignUpForm/useSignUpSchema.d.ts.map +0 -1
  384. package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs +0 -33
  385. package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs.map +0 -1
  386. package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs +0 -79
  387. package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs.map +0 -1
  388. package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.d.ts +0 -10
  389. package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.d.ts.map +0 -1
  390. package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs +0 -79
  391. package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs.map +0 -1
  392. package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.cjs +0 -8
  393. package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.cjs.map +0 -1
  394. package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.d.ts +0 -4
  395. package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.d.ts.map +0 -1
  396. package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.mjs +0 -8
  397. package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.mjs.map +0 -1
  398. package/dist/components/Auth/VerifyEmailForm/index.cjs +0 -5
  399. package/dist/components/Auth/VerifyEmailForm/index.cjs.map +0 -1
  400. package/dist/components/Auth/VerifyEmailForm/index.content.cjs +0 -73
  401. package/dist/components/Auth/VerifyEmailForm/index.content.cjs.map +0 -1
  402. package/dist/components/Auth/VerifyEmailForm/index.content.d.ts +0 -143
  403. package/dist/components/Auth/VerifyEmailForm/index.content.d.ts.map +0 -1
  404. package/dist/components/Auth/VerifyEmailForm/index.content.mjs +0 -74
  405. package/dist/components/Auth/VerifyEmailForm/index.content.mjs.map +0 -1
  406. package/dist/components/Auth/VerifyEmailForm/index.d.ts +0 -2
  407. package/dist/components/Auth/VerifyEmailForm/index.d.ts.map +0 -1
  408. package/dist/components/Auth/VerifyEmailForm/index.mjs +0 -5
  409. package/dist/components/Auth/VerifyEmailForm/index.mjs.map +0 -1
  410. package/dist/components/Auth/index.cjs +0 -39
  411. package/dist/components/Auth/index.cjs.map +0 -1
  412. package/dist/components/Auth/index.d.ts +0 -12
  413. package/dist/components/Auth/index.d.ts.map +0 -1
  414. package/dist/components/Auth/index.mjs +0 -39
  415. package/dist/components/Auth/index.mjs.map +0 -1
  416. package/dist/components/Auth/useAuth/index.cjs +0 -31
  417. package/dist/components/Auth/useAuth/index.cjs.map +0 -1
  418. package/dist/components/Auth/useAuth/index.d.ts.map +0 -1
  419. package/dist/components/Auth/useAuth/index.mjs.map +0 -1
  420. package/dist/components/Auth/useAuth/useCSRF.cjs +0 -27
  421. package/dist/components/Auth/useAuth/useCSRF.cjs.map +0 -1
  422. package/dist/components/Auth/useAuth/useCSRF.d.ts +0 -6
  423. package/dist/components/Auth/useAuth/useCSRF.d.ts.map +0 -1
  424. package/dist/components/Auth/useAuth/useCSRF.mjs +0 -27
  425. package/dist/components/Auth/useAuth/useCSRF.mjs.map +0 -1
  426. package/dist/components/Auth/useAuth/useOAuth2.cjs.map +0 -1
  427. package/dist/components/Auth/useAuth/useOAuth2.d.ts.map +0 -1
  428. package/dist/components/Auth/useAuth/useOAuth2.mjs.map +0 -1
  429. package/dist/components/Auth/useAuth/useSession.cjs.map +0 -1
  430. package/dist/components/Auth/useAuth/useSession.d.ts.map +0 -1
  431. package/dist/components/Auth/useAuth/useSession.mjs +0 -66
  432. package/dist/components/Auth/useAuth/useSession.mjs.map +0 -1
  433. package/dist/components/Auth/useUser/index.cjs.map +0 -1
  434. package/dist/components/Auth/useUser/index.d.ts +0 -8
  435. package/dist/components/Auth/useUser/index.d.ts.map +0 -1
  436. package/dist/components/Auth/useUser/index.mjs.map +0 -1
  437. package/dist/components/IDE/CopyButton.cjs.map +0 -1
  438. package/dist/components/IDE/CopyButton.d.ts.map +0 -1
  439. package/dist/components/IDE/CopyButton.mjs.map +0 -1
  440. package/dist/components/ProfileDropDown/index.cjs +0 -25
  441. package/dist/components/ProfileDropDown/index.cjs.map +0 -1
  442. package/dist/components/ProfileDropDown/index.d.ts +0 -6
  443. package/dist/components/ProfileDropDown/index.d.ts.map +0 -1
  444. package/dist/components/ProfileDropDown/index.mjs +0 -25
  445. package/dist/components/ProfileDropDown/index.mjs.map +0 -1
  446. package/dist/hooks/useIntlayerAPI.d.ts +0 -103
  447. package/dist/hooks/useIntlayerAPI.d.ts.map +0 -1
@@ -35,7 +35,7 @@ export declare const Command: {
35
35
  ref?: React.Ref<HTMLDivElement>;
36
36
  } & {
37
37
  asChild?: boolean;
38
- }, "key" | "asChild" | keyof HTMLAttributes<HTMLDivElement>> & {
38
+ }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild"> & {
39
39
  label?: string;
40
40
  } & import('react').RefAttributes<HTMLDivElement>>;
41
41
  Empty: FC<{
@@ -44,14 +44,14 @@ export declare const Command: {
44
44
  ref?: React.Ref<HTMLDivElement>;
45
45
  } & {
46
46
  asChild?: boolean;
47
- }, "key" | "asChild" | keyof HTMLAttributes<HTMLDivElement>> & import('react').RefAttributes<HTMLDivElement>>;
47
+ }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild"> & import('react').RefAttributes<HTMLDivElement>>;
48
48
  Group: FC<{
49
49
  children?: React.ReactNode;
50
50
  } & Omit<Pick<Pick<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & {
51
51
  ref?: React.Ref<HTMLDivElement>;
52
52
  } & {
53
53
  asChild?: boolean;
54
- }, "key" | "asChild" | keyof HTMLAttributes<HTMLDivElement>>, "heading" | "value"> & {
54
+ }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
55
55
  heading?: React.ReactNode;
56
56
  value?: string;
57
57
  forceMount?: boolean;
@@ -60,7 +60,7 @@ export declare const Command: {
60
60
  ref?: React.Ref<HTMLDivElement>;
61
61
  } & {
62
62
  asChild?: boolean;
63
- }, "key" | "asChild" | keyof HTMLAttributes<HTMLDivElement>> & {
63
+ }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild"> & {
64
64
  alwaysRender?: boolean;
65
65
  } & import('react').RefAttributes<HTMLDivElement>>;
66
66
  Item: FC<{
@@ -69,7 +69,7 @@ export declare const Command: {
69
69
  ref?: React.Ref<HTMLDivElement>;
70
70
  } & {
71
71
  asChild?: boolean;
72
- }, "key" | "asChild" | keyof HTMLAttributes<HTMLDivElement>>, "onSelect" | "disabled" | "value"> & {
72
+ }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
73
73
  disabled?: boolean;
74
74
  onSelect?: (value: string) => void;
75
75
  value?: string;
@@ -17,7 +17,7 @@ const containerVariants = classVarianceAuthority.cva("flex text-text flex-col ba
17
17
  },
18
18
  transparency: {
19
19
  none: "bg-card",
20
- sm: "bg-card/90",
20
+ sm: "bg-card/95",
21
21
  md: "bg-card/70",
22
22
  lg: "bg-card/40",
23
23
  xl: "bg-card/20",
@@ -104,4 +104,5 @@ const Container = ({
104
104
  }
105
105
  );
106
106
  exports.Container = Container;
107
+ exports.containerVariants = containerVariants;
107
108
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type PropsWithChildren,\n type HTMLAttributes,\n type FC,\n type DetailedHTMLProps,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nconst containerVariants = cva('flex text-text flex-col backdrop-blur', {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card',\n sm: 'bg-card/90',\n md: 'bg-card/70',\n lg: 'bg-card/40',\n xl: 'bg-card/20',\n full: '',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20',\n y: 'divide-y divide-dashed divide-text/20',\n both: 'divide-x divide-y divide-dashed divide-text/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary',\n secondary: 'border-secondary',\n neutral: 'border-neutral',\n text: 'border-text ',\n error: 'border-error',\n warning: 'border-warning',\n success: 'border-success',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n});\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n"],"names":["cva","jsx","cn"],"mappings":";;;;;AASA,MAAM,oBAAoBA,2BAAI,yCAAyC;AAAA,EACrE,UAAU;AAAA,IACR,aAAa;AAAA,MACX,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IACA,WAAW;AAAA,MACT,SAAS;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MACH,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,WACE;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,KAAK;AAAA,MACH,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,SAAS;AAAA,IACT,WAAW;AAAA,IACX,KAAK;AAAA,EAAA;AAET,CAAC;AASM,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEC,2BAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACH;AAAA,IACC,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type DetailedHTMLProps,\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const containerVariants = cva('flex text-text flex-col backdrop-blur', {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card',\n sm: 'bg-card/95',\n md: 'bg-card/70',\n lg: 'bg-card/40',\n xl: 'bg-card/20',\n full: '',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20',\n y: 'divide-y divide-dashed divide-text/20',\n both: 'divide-x divide-y divide-dashed divide-text/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary',\n secondary: 'border-secondary',\n neutral: 'border-neutral',\n text: 'border-text ',\n error: 'border-error',\n warning: 'border-warning',\n success: 'border-success',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n});\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n"],"names":["cva","jsx","cn"],"mappings":";;;;;AASa,MAAA,oBAAoBA,2BAAI,yCAAyC;AAAA,EAC5E,UAAU;AAAA,IACR,aAAa;AAAA,MACX,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IACA,WAAW;AAAA,MACT,SAAS;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MACH,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,WACE;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,KAAK;AAAA,MACH,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,SAAS;AAAA,IACT,WAAW;AAAA,IACX,KAAK;AAAA,EAAA;AAET,CAAC;AASM,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEC,2BAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACH;AAAA,IACC,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;;;"}
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { PropsWithChildren, HTMLAttributes, FC, DetailedHTMLProps } from 'react';
3
- declare const containerVariants: (props?: ({
2
+ import { DetailedHTMLProps, FC, HTMLAttributes, PropsWithChildren } from 'react';
3
+ export declare const containerVariants: (props?: ({
4
4
  roundedSize?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | null | undefined;
5
5
  transparency?: "none" | "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
6
6
  padding?: "none" | "sm" | "md" | "lg" | "xl" | null | undefined;
@@ -14,5 +14,4 @@ export type ContainerProps = PropsWithChildren<Omit<VariantProps<typeof containe
14
14
  border?: boolean;
15
15
  };
16
16
  export declare const Container: FC<ContainerProps>;
17
- export {};
18
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Container/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,EAAE,EACP,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAGf,QAAA,MAAM,iBAAiB;;;;;;;;;8EAsErB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAC5C,IAAI,CAAC,YAAY,CAAC,OAAO,iBAAiB,CAAC,EAAE,QAAQ,CAAC,CACvD,GACC,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,GAAG;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA8BxC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Container/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,EAAE,EACP,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAGf,eAAO,MAAM,iBAAiB;;;;;;;;;8EAsE5B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAC5C,IAAI,CAAC,YAAY,CAAC,OAAO,iBAAiB,CAAC,EAAE,QAAQ,CAAC,CACvD,GACC,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,GAAG;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA8BxC,CAAC"}
@@ -15,7 +15,7 @@ const containerVariants = cva("flex text-text flex-col backdrop-blur", {
15
15
  },
16
16
  transparency: {
17
17
  none: "bg-card",
18
- sm: "bg-card/90",
18
+ sm: "bg-card/95",
19
19
  md: "bg-card/70",
20
20
  lg: "bg-card/40",
21
21
  xl: "bg-card/20",
@@ -102,6 +102,7 @@ const Container = ({
102
102
  }
103
103
  );
104
104
  export {
105
- Container
105
+ Container,
106
+ containerVariants
106
107
  };
107
108
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type PropsWithChildren,\n type HTMLAttributes,\n type FC,\n type DetailedHTMLProps,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nconst containerVariants = cva('flex text-text flex-col backdrop-blur', {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card',\n sm: 'bg-card/90',\n md: 'bg-card/70',\n lg: 'bg-card/40',\n xl: 'bg-card/20',\n full: '',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20',\n y: 'divide-y divide-dashed divide-text/20',\n both: 'divide-x divide-y divide-dashed divide-text/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary',\n secondary: 'border-secondary',\n neutral: 'border-neutral',\n text: 'border-text ',\n error: 'border-error',\n warning: 'border-warning',\n success: 'border-success',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n});\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n"],"names":[],"mappings":";;;AASA,MAAM,oBAAoB,IAAI,yCAAyC;AAAA,EACrE,UAAU;AAAA,IACR,aAAa;AAAA,MACX,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IACA,WAAW;AAAA,MACT,SAAS;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MACH,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,WACE;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,KAAK;AAAA,MACH,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,SAAS;AAAA,IACT,WAAW;AAAA,IACX,KAAK;AAAA,EAAA;AAET,CAAC;AASM,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACH;AAAA,IACC,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type DetailedHTMLProps,\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const containerVariants = cva('flex text-text flex-col backdrop-blur', {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card',\n sm: 'bg-card/95',\n md: 'bg-card/70',\n lg: 'bg-card/40',\n xl: 'bg-card/20',\n full: '',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20',\n y: 'divide-y divide-dashed divide-text/20',\n both: 'divide-x divide-y divide-dashed divide-text/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary',\n secondary: 'border-secondary',\n neutral: 'border-neutral',\n text: 'border-text ',\n error: 'border-error',\n warning: 'border-warning',\n success: 'border-success',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n});\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n"],"names":[],"mappings":";;;AASa,MAAA,oBAAoB,IAAI,yCAAyC;AAAA,EAC5E,UAAU;AAAA,IACR,aAAa;AAAA,MACX,MAAM;AAAA,MACN,I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A;AAAA,IACC,WAAW;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACH;AAAA,IACC,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;"}
@@ -4,38 +4,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const lucideReact = require("lucide-react");
6
6
  const ReactExports = require("react");
7
+ const hooks_useUser_index = require("../../hooks/useUser/index.cjs");
7
8
  const components_Button_Button = require("../Button/Button.cjs");
8
9
  require("clsx");
9
10
  require("tailwind-merge");
10
11
  require("../Input/Input.cjs");
11
12
  require("../Input/Checkbox.cjs");
12
13
  const components_TextArea_AutocompleteTextArea = require("../TextArea/AutocompleteTextArea.cjs");
13
- require("react-intlayer");
14
- const components_Auth_useUser_index = require("../Auth/useUser/index.cjs");
15
- require("../Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs");
16
- require("@intlayer/api");
17
- require("@hookform/resolvers");
18
- require("react-hook-form");
19
- require("../Form/FormField.cjs");
20
- require("../../Form-DJrUK3mm.cjs");
21
- require("../Auth/SignInForm/signIn.content.cjs");
22
- require("../Auth/SignInForm/useSignInSchema.content.cjs");
23
- require("../Auth/SignUpForm/signUpForm.content.cjs");
24
- require("../Auth/SignUpForm/useSignUpSchema.content.cjs");
25
- require("../Auth/ChangePasswordForm/changePasswordForm.content.cjs");
26
- require("../Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs");
27
- require("../Auth/ResetPasswordForm/resetPasswordContent.content.cjs");
28
- require("../Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs");
29
- require("@intlayer/editor-react");
30
- require("@intlayer/config/built");
31
- require("../../hooks/useAsync/useAsyncStateStore.cjs");
32
- require("../Toaster/Toast.cjs");
33
- require("deepmerge");
34
- require("../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
35
- require("../Modal/Modal.cjs");
36
- require("../Auth/VerifyEmailForm/index.content.cjs");
37
- require("../Auth/DefineNewPasswordForm/defineNewPasswordForm.content.cjs");
38
- require("../Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.cjs");
39
14
  const ContentEditorTextArea = ({
40
15
  children,
41
16
  onContentChange,
@@ -44,7 +19,7 @@ const ContentEditorTextArea = ({
44
19
  additionalButtons,
45
20
  ...props
46
21
  }) => {
47
- const { isAuthenticated } = components_Auth_useUser_index.useUser();
22
+ const { isAuthenticated } = hooks_useUser_index.useUser();
48
23
  const [newValue, setNewValue] = ReactExports.useState(children);
49
24
  const [resetIncrementor, setResetIncrementor] = ReactExports.useState(0);
50
25
  const isEdited = newValue !== children;
@@ -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 {\n type ReactNode,\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n} from 'react';\nimport { Button } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\nimport { useUser } from '../Auth';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\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 <AutoCompleteTextarea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n isActive={isAuthenticated}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\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 </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useUser","useState","useEffect","jsxs","jsx","AutoCompleteTextarea","Fragment","Button","Check","X"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,EAAE,gBAAgB,IAAIA,sCAAQ;AACpC,QAAM,CAAC,UAAU,WAAW,IAAIC,aAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ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cesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { useUser } from '../../hooks/useUser';\nimport { Button } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\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 <AutoCompleteTextarea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n isActive={isAuthenticated}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\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 </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useUser","useState","useEffect","jsxs","jsx","AutoCompleteTextarea","Fragment","Button","Check","X"],"mappings":";;;;;;;;;;;;;AAsBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,EAAE,gBAAgB,IAAIA,4BAAQ;AACpC,QAAM,CAAC,UAAU,WAAW,IAAIC,aAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzCC,eAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAA;AAAA,UAACC,yCAAA;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACd,UAAU;AAAA,YACT,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAMP;AAAA,SACE,YAAY,sBACXF,2BAAA,KAAA,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YAEGA,2BAAA,KAAAG,qBAAA,EAAA,UAAA;AAAA,YAAAF,2BAAA;AAAA,cAACG,yBAAA;AAAA,cAAA;AAAA,gBACC,MAAMC,YAAA;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACAJ,2BAAA;AAAA,cAACG,yBAAA;AAAA,cAAA;AAAA,gBACC,MAAME,YAAA;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG;AAAA,EAuCP;AAEJ;;"}
@@ -1,4 +1,4 @@
1
- import { ReactNode, FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import { AutoSizedTextAreaProps } from '../TextArea';
3
3
  export type ContentEditorTextAreaProps = {
4
4
  children: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,EAAE,EAGR,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,sBAAsB,EAAwB,MAAM,aAAa,CAAC;AAGhF,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;IACxC,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA0EhE,CAAC"}
1
+ {"version":3,"file":"ContentEditorTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,sBAAsB,EAAwB,MAAM,aAAa,CAAC;AAEhF,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;IACxC,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA0EhE,CAAC"}
@@ -2,38 +2,13 @@
2
2
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
3
  import { Check, X } from "lucide-react";
4
4
  import { useState, useEffect } from "react";
5
+ import { useUser } from "../../hooks/useUser/index.mjs";
5
6
  import { Button } from "../Button/Button.mjs";
6
7
  import "clsx";
7
8
  import "tailwind-merge";
8
9
  import "../Input/Input.mjs";
9
10
  import "../Input/Checkbox.mjs";
10
11
  import { AutoCompleteTextarea } from "../TextArea/AutocompleteTextArea.mjs";
11
- import "react-intlayer";
12
- import { useUser } from "../Auth/useUser/index.mjs";
13
- import "../Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs";
14
- import "@intlayer/api";
15
- import "@hookform/resolvers";
16
- import "react-hook-form";
17
- import "../Form/FormField.mjs";
18
- import "../../Form-CriPBaZk.js";
19
- import "../Auth/SignInForm/signIn.content.mjs";
20
- import "../Auth/SignInForm/useSignInSchema.content.mjs";
21
- import "../Auth/SignUpForm/signUpForm.content.mjs";
22
- import "../Auth/SignUpForm/useSignUpSchema.content.mjs";
23
- import "../Auth/ChangePasswordForm/changePasswordForm.content.mjs";
24
- import "../Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs";
25
- import "../Auth/ResetPasswordForm/resetPasswordContent.content.mjs";
26
- import "../Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs";
27
- import "@intlayer/editor-react";
28
- import "@intlayer/config/built";
29
- import "../../hooks/useAsync/useAsyncStateStore.mjs";
30
- import "../Toaster/Toast.mjs";
31
- import "deepmerge";
32
- import "../../hooks/useScrollBlockage/useScrollBlockageStore.mjs";
33
- import "../Modal/Modal.mjs";
34
- import "../Auth/VerifyEmailForm/index.content.mjs";
35
- import "../Auth/DefineNewPasswordForm/defineNewPasswordForm.content.mjs";
36
- import "../Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.mjs";
37
12
  const ContentEditorTextArea = ({
38
13
  children,
39
14
  onContentChange,
@@ -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 {\n type ReactNode,\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n} from 'react';\nimport { Button } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\nimport { useUser } from '../Auth';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\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 <AutoCompleteTextarea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n isActive={isAuthenticated}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\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 </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,EAAE,gBAAgB,IAAI,QAAQ;AACpC,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,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,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,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACd,UAAU;AAAA,YACT,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAMP;AAAA,SACE,YAAY,sBACX,qBAAA,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YAEG,qBAAA,UAAA,EAAA,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG;AAAA,EAuCP;AAEJ;"}
1
+ {"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { useUser } from '../../hooks/useUser';\nimport { Button } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\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 <AutoCompleteTextarea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n isActive={isAuthenticated}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\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 on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ACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG;AAAA,EAuCP;AAEJ;"}
@@ -6,8 +6,8 @@ const lucideReact = require("lucide-react");
6
6
  const ReactExports = require("react");
7
7
  const reactIntlayer = require("react-intlayer");
8
8
  const components_Button_Button = require("../Button/Button.cjs");
9
- const components_IDE_CopyButton_content = require("./CopyButton.content.cjs");
10
- const CopyButton = ({ content }) => {
9
+ const components_IDE_CopyButton_content = require("../IDE/CopyButton.content.cjs");
10
+ const CopyButton = ({ content, ...props }) => {
11
11
  const [copied, setCopied] = ReactExports.useState(false);
12
12
  const { label } = reactIntlayer.useDictionary(components_IDE_CopyButton_content.copyContentContent);
13
13
  const handleCopy = async () => {
@@ -31,10 +31,11 @@ const CopyButton = ({ content }) => {
31
31
  onClick: handleCopy,
32
32
  variant: "hoverable",
33
33
  color: "text",
34
- label: label.value,
35
- size: "icon-sm"
34
+ size: "icon-sm",
35
+ ...props,
36
+ label: props.label ?? label.value
36
37
  }
37
38
  );
38
39
  };
39
40
  exports.CopyButton = CopyButton;
40
- //# sourceMappingURL=CopyButton.cjs.map
41
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/CopyButton/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button, ButtonProps } from '../Button';\nimport { copyContentContent } from '../IDE/CopyButton.content';\n\ntype CopyButtonProps = {\n content: string;\n} & Partial<ButtonProps>;\n\nexport const CopyButton: FC<CopyButtonProps> = ({ content, ...props }) => {\n const [copied, setCopied] = useState(false);\n const { label } = useDictionary(copyContentContent);\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n } catch (error) {\n console.error('Failed to copy text: ', error);\n }\n };\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setCopied(false);\n }, 1000);\n return () => clearTimeout(timer);\n }, [copied]);\n\n return (\n <Button\n Icon={copied ? CopyCheckIcon : CopyIcon}\n onClick={handleCopy}\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n {...props}\n label={props.label ?? label.value}\n />\n );\n};\n"],"names":["useState","useDictionary","copyContentContent","useEffect","jsx","Button","CopyCheckIcon","CopyIcon"],"mappings":";;;;;;;;;AAYO,MAAM,aAAkC,CAAC,EAAE,SAAS,GAAG,YAAY;AACxE,QAAM,CAAC,QAAQ,SAAS,IAAIA,aAAAA,SAAS,KAAK;AAC1C,QAAM,EAAE,MAAA,IAAUC,cAAA,cAAcC,oDAAkB;AAElD,QAAM,aAAa,YAAY;AACzB,QAAA;AACI,YAAA,UAAU,UAAU,UAAU,OAAO;AAC3C,gBAAU,IAAI;AAAA,aACP,OAAO;AACN,cAAA,MAAM,yBAAyB,KAAK;AAAA,IAAA;AAAA,EAEhD;AAEAC,eAAAA,UAAU,MAAM;AACR,UAAA,QAAQ,WAAW,MAAM;AAC7B,gBAAU,KAAK;AAAA,OACd,GAAI;AACA,WAAA,MAAM,aAAa,KAAK;AAAA,EAAA,GAC9B,CAAC,MAAM,CAAC;AAGT,SAAAC,2BAAA;AAAA,IAACC,yBAAA;AAAA,IAAA;AAAA,MACC,MAAM,SAASC,YAAAA,gBAAgBC,YAAA;AAAA,MAC/B,SAAS;AAAA,MACT,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,MAAK;AAAA,MACJ,GAAG;AAAA,MACJ,OAAO,MAAM,SAAS,MAAM;AAAA,IAAA;AAAA,EAC9B;AAEJ;;"}
@@ -1,7 +1,8 @@
1
1
  import { FC } from 'react';
2
+ import { ButtonProps } from '../Button';
2
3
  type CopyButtonProps = {
3
4
  content: string;
4
- };
5
+ } & Partial<ButtonProps>;
5
6
  export declare const CopyButton: FC<CopyButtonProps>;
6
7
  export {};
7
- //# sourceMappingURL=CopyButton.d.ts.map
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CopyButton/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAU,WAAW,EAAE,MAAM,WAAW,CAAC;AAGhD,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEzB,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA+B1C,CAAC"}
@@ -4,8 +4,8 @@ import { CopyCheckIcon, CopyIcon } from "lucide-react";
4
4
  import { useState, useEffect } from "react";
5
5
  import { useDictionary } from "react-intlayer";
6
6
  import { Button } from "../Button/Button.mjs";
7
- import { copyContentContent } from "./CopyButton.content.mjs";
8
- const CopyButton = ({ content }) => {
7
+ import { copyContentContent } from "../IDE/CopyButton.content.mjs";
8
+ const CopyButton = ({ content, ...props }) => {
9
9
  const [copied, setCopied] = useState(false);
10
10
  const { label } = useDictionary(copyContentContent);
11
11
  const handleCopy = async () => {
@@ -29,12 +29,13 @@ const CopyButton = ({ content }) => {
29
29
  onClick: handleCopy,
30
30
  variant: "hoverable",
31
31
  color: "text",
32
- label: label.value,
33
- size: "icon-sm"
32
+ size: "icon-sm",
33
+ ...props,
34
+ label: props.label ?? label.value
34
35
  }
35
36
  );
36
37
  };
37
38
  export {
38
39
  CopyButton
39
40
  };
40
- //# sourceMappingURL=CopyButton.mjs.map
41
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/CopyButton/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button, ButtonProps } from '../Button';\nimport { copyContentContent } from '../IDE/CopyButton.content';\n\ntype CopyButtonProps = {\n content: string;\n} & Partial<ButtonProps>;\n\nexport const CopyButton: FC<CopyButtonProps> = ({ content, ...props }) => {\n const [copied, setCopied] = useState(false);\n const { label } = useDictionary(copyContentContent);\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n } catch (error) {\n console.error('Failed to copy text: ', error);\n }\n };\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setCopied(false);\n }, 1000);\n return () => clearTimeout(timer);\n }, [copied]);\n\n return (\n <Button\n Icon={copied ? CopyCheckIcon : CopyIcon}\n onClick={handleCopy}\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n {...props}\n label={props.label ?? label.value}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AAYO,MAAM,aAAkC,CAAC,EAAE,SAAS,GAAG,YAAY;AACxE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,EAAE,MAAA,IAAU,cAAc,kBAAkB;AAElD,QAAM,aAAa,YAAY;AACzB,QAAA;AACI,YAAA,UAAU,UAAU,UAAU,OAAO;AAC3C,gBAAU,IAAI;AAAA,aACP,OAAO;AACN,cAAA,MAAM,yBAAyB,KAAK;AAAA,IAAA;AAAA,EAEhD;AAEA,YAAU,MAAM;AACR,UAAA,QAAQ,WAAW,MAAM;AAC7B,gBAAU,KAAK;AAAA,OACd,GAAI;AACA,WAAA,MAAM,aAAa,KAAK;AAAA,EAAA,GAC9B,CAAC,MAAM,CAAC;AAGT,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAM,SAAS,gBAAgB;AAAA,MAC/B,SAAS;AAAA,MACT,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,MAAK;AAAA,MACJ,GAAG;AAAA,MACJ,OAAO,MAAM,SAAS,MAAM;AAAA,IAAA;AAAA,EAC9B;AAEJ;"}
@@ -9,6 +9,8 @@ const ReactExports = require("react");
9
9
  const reactIntlayer = require("react-intlayer");
10
10
  const hooks_intlayerAPIHooks = require("../../../hooks/intlayerAPIHooks.cjs");
11
11
  require("../../../hooks/useAsync/useAsyncStateStore.cjs");
12
+ require("@intlayer/api");
13
+ require("@intlayer/config/built");
12
14
  require("deepmerge");
13
15
  require("../../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
14
16
  const utils_object = require("../../../utils/object.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"TextEditor.cjs","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config';\nimport {\n type Dictionary,\n type MarkdownContent,\n type NestedContent,\n type EnumerationContent,\n type TranslationContent,\n NodeType,\n type KeyPath,\n type ContentNode,\n getLocaleName,\n getNodeType,\n type ConditionContent,\n getEmptyNode,\n InsertionContent,\n FileContent,\n} from '@intlayer/core';\nimport { useConfiguration, useEditedContent } from '@intlayer/editor-react';\nimport { Plus, Trash, WandSparkles } from 'lucide-react';\nimport { Fragment, ReactNode, useState, type FC } from 'react';\nimport { useDictionary, useLocale } from 'react-intlayer';\nimport { useAuditContentDeclarationField } from '../../../hooks';\nimport { renameKey } from '../../../utils/object';\nimport { Button } from '../../Button';\nimport { Container } from '../../Container';\nimport {\n type ContentEditorInputProps as ContentEditorInputPropsBase,\n ContentEditorInput as ContentEditorInputBase,\n} from '../../ContentEditor/ContentEditorInput';\nimport {\n type ContentEditorTextAreaProps as ContentEditorTextAreaPropsBase,\n ContentEditorTextArea as ContentEditorTextAreaBase,\n} from '../../ContentEditor/ContentEditorTextArea';\nimport { Label } from '../../Label';\nimport { useLocaleSwitcherContent } from '../../LocaleSwitcherContentDropDown';\nimport { MarkdownRenderer } from '../../MarkDownRender';\nimport {\n type SwitchSelectorChoices,\n type SwitchSelectorProps,\n SwitchSelector,\n} from '../../SwitchSelector';\nimport { EnumKeyInput } from '../EnumKeyInput';\nimport { navigationViewContent } from '../NavigationView/navigationViewNode.content';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\ntype ContentEditorTextAreaProps = Omit<\n ContentEditorTextAreaPropsBase,\n 'onContentChange'\n> & {\n keyPath: KeyPath[];\n dictionary: Dictionary;\n};\n\nconst ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n keyPath,\n dictionary,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const configuration = useConfiguration();\n const { auditContentDeclarationField, isLoading: isAuditing } =\n useAuditContentDeclarationField();\n\n return (\n <ContentEditorTextAreaBase\n variant=\"default\"\n onContentChange={(newValue) =>\n addEditedContent(dictionary.key, newValue, keyPath)\n }\n additionalButtons={\n <Button\n Icon={WandSparkles}\n label=\"Audit\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n isLoading={isAuditing}\n onClick={() => {\n auditContentDeclarationField({\n fileContent: JSON.stringify({\n ...dictionary,\n ...(editedContent?.[dictionary.key] ?? {}),\n }),\n keyPath,\n locales: configuration.internationalization.locales ?? [],\n openAiApiKey: configuration.editor.openAiApiKey,\n model: configuration.editor.openAiApiModel,\n temperature: configuration.editor.openAiApiTemperature,\n }).then((response) => {\n if (!response?.data) return;\n\n try {\n const editedContent = response.data.fileContent as string;\n\n addEditedContent(dictionary.key, editedContent, keyPath);\n } catch (error) {\n console.error(error);\n }\n });\n }}\n />\n }\n {...props}\n />\n );\n};\n\ntype ContentEditorInputProps = Omit<\n ContentEditorInputPropsBase,\n 'onContentChange'\n> & {\n keyPath: KeyPath[];\n dictionary: Dictionary;\n};\n\nconst ContentEditorInput: FC<ContentEditorInputProps> = ({\n keyPath,\n dictionary,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n return (\n <ContentEditorInputBase\n variant=\"default\"\n onContentChange={(newValue) =>\n addEditedContent(dictionary.key, newValue, keyPath)\n }\n {...props}\n />\n );\n};\n\nconst toggleContent = [\n {\n content: 'False',\n value: false,\n },\n {\n content: 'True',\n value: true,\n },\n] as SwitchSelectorChoices<boolean>;\n\ntype ContentEditorToggleProps = SwitchSelectorProps & {\n dictionary: Dictionary;\n keyPath: KeyPath[];\n};\n\nconst ContentEditorToggle: FC<ContentEditorToggleProps> = ({\n dictionary,\n keyPath,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n return (\n <SwitchSelector\n choices={toggleContent}\n value={true}\n onChange={(value) => addEditedContent(dictionary.key, value, keyPath)}\n color=\"text\"\n size=\"sm\"\n {...props}\n />\n );\n};\n\nexport type TextEditorProps = {\n dictionary: Dictionary;\n keyPath: KeyPath[];\n section: ContentNode;\n isDarkMode?: boolean;\n renderSection?: (content: string) => ReactNode;\n onContentChange?: (newValue: string) => void;\n};\n\nconst TranslationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}: TextEditorProps) => {\n const { locale, defaultLocale } = useLocale();\n const { selectedLocales, availableLocales } = useLocaleSwitcherContent();\n\n const sectionContent = (section as TranslationContent<string>)[\n NodeType.Translation\n ] as Record<Locales, string>;\n\n const sectionContentKeys = Object.keys(sectionContent) as Locales[];\n\n const isFiltered = availableLocales.length > selectedLocales.length;\n\n const localesList = isFiltered\n ? selectedLocales\n : // If the translation include content in other locales, we display all of them\n [...new Set([...availableLocales, ...sectionContentKeys])];\n\n const content = (section as TranslationContent<string>)[NodeType.Translation];\n\n return (\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {localesList.map((translationKey) => (\n <Fragment key={translationKey}>\n <tr className=\"mt-2 w-full p-2 text-xs\">\n {getLocaleName(translationKey, locale)}\n </tr>\n <tr>\n <TextEditorContainer\n section={\n content[translationKey] ??\n getEmptyNode(content[defaultLocale])\n }\n keyPath={[\n ...keyPath,\n { type: NodeType.Translation, key: translationKey },\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n );\n};\n\nconst EnumerationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const { addEditedContent } = useEditedContent();\n const { addNewEnumeration, removeEnumeration } = useDictionary(\n navigationViewContent\n );\n\n const content = (section as EnumerationContent<string>)[NodeType.Enumeration];\n const firstKey = Object.keys(content)[0] as keyof typeof content;\n\n return (\n <div className=\"flex flex-col gap-2\">\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {Object.keys(\n (section as EnumerationContent<ContentNode>)[NodeType.Enumeration]\n ).map((enumKey) => {\n const childrenKeyPath = [\n ...keyPath,\n { type: NodeType.Enumeration },\n ] as KeyPath[];\n return (\n <Fragment key={enumKey}>\n <tr className=\"mt-2 w-full\">\n <div className=\"flex flex-1\">\n <Button\n label={removeEnumeration.label.value}\n variant=\"hoverable\"\n color=\"text\"\n Icon={Trash}\n className=\"ml-auto\"\n onClick={() =>\n addEditedContent(\n dictionary.key,\n undefined,\n childrenKeyPath\n )\n }\n >\n {removeEnumeration.text}\n </Button>\n </div>\n </tr>\n <tr className=\"w-full p-2\">\n <EnumKeyInput\n value={enumKey}\n onChange={(value) => {\n const preValueContent = (\n section as EnumerationContent<string>\n )[NodeType.Enumeration];\n const newValueContent = renameKey(\n preValueContent,\n enumKey as keyof typeof preValueContent,\n value\n );\n const newValue = {\n ...(section as EnumerationContent<string>),\n [NodeType.Enumeration]: newValueContent,\n };\n\n addEditedContent(dictionary.key, newValue, keyPath);\n }}\n />\n </tr>\n <tr className=\"block w-full\">\n <TextEditor\n section={\n content[enumKey as keyof typeof content] ??\n getEmptyNode(content[firstKey])\n }\n keyPath={childrenKeyPath}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n );\n })}\n </tbody>\n </table>\n\n <Button\n label={addNewEnumeration.label.value}\n variant=\"hoverable\"\n color=\"neutral\"\n textAlign=\"left\"\n isFullWidth\n onClick={() =>\n addEditedContent(\n dictionary.key,\n getEmptyNode(content[firstKey]) ?? '',\n [...keyPath, { type: NodeType.Enumeration, key: 'unknown' }]\n )\n }\n Icon={Plus}\n className=\"m-2\"\n >\n {addNewEnumeration.text}\n </Button>\n </div>\n );\n};\n\nconst ConditionTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const content = (section as ConditionContent<string>)[NodeType.Condition];\n\n return (\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {['true', 'false', 'fallback'].map((condKey) => (\n <Fragment key={condKey}>\n <tr key={condKey} className=\"mt-2 block w-full p-2 text-xs\">\n {String(condKey)}\n </tr>\n <tr key={condKey} className=\"block w-full\">\n <TextEditorContainer\n section={\n content[condKey as keyof typeof content] ??\n getEmptyNode(content['true'])\n }\n keyPath={[\n ...keyPath,\n {\n type: NodeType.Condition,\n key: condKey,\n } as KeyPath,\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n );\n};\n\nconst ArrayTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const { addEditedContent } = useEditedContent();\n const { addNewElement, removeElement } = useDictionary(navigationViewContent);\n\n return (\n <div className=\"flex flex-col gap-2\">\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {(section as unknown as ContentNode[]).map((subSection, index) => (\n <Fragment key={JSON.stringify(subSection)}>\n <tr className=\"mt-2 flex w-full justify-between gap-2 p-2\">\n <span className=\"text-xs\">{String(index)}</span>\n <Button\n label={removeElement.label.value}\n variant=\"hoverable\"\n color=\"neutral\"\n className=\"ml-auto\"\n textAlign=\"left\"\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Array,\n key: (section as unknown as ContentNode[]).length,\n },\n ];\n addEditedContent(dictionary.key, undefined, newKeyPath);\n }}\n Icon={Trash}\n >\n {removeElement.text}\n </Button>\n </tr>\n\n <tr className=\"block w-full\">\n <TextEditorContainer\n section={\n subSection ??\n getEmptyNode((section as unknown as ContentNode[])[0])\n }\n keyPath={[\n ...keyPath,\n {\n type: NodeType.Array,\n key: index,\n },\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n <Button\n label={addNewElement.label.value}\n variant=\"hoverable\"\n color=\"neutral\"\n textAlign=\"left\"\n isFullWidth\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Array,\n key: (section as unknown as ContentNode[]).length,\n },\n ];\n addEditedContent(\n dictionary.key,\n getEmptyNode((section as unknown as ContentNode[])[0]) ?? '',\n newKeyPath,\n false\n );\n }}\n Icon={Plus}\n >\n {addNewElement.text}\n </Button>\n </div>\n );\n};\n\nconst ObjectTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => (\n <>\n <table className=\"w-full\">\n <tbody className=\"flex flex-col gap-2\">\n {Object.keys(section as unknown as Record<string, ContentNode>).map(\n (key) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: NodeType.Object, key },\n ];\n const typedSection = section as unknown as Record<\n string,\n ContentNode\n >;\n const firstKey = Object.keys(\n typedSection\n )[0] as keyof typeof section;\n const subSection =\n typedSection[key as keyof typeof section] ??\n getEmptyNode(typedSection[firstKey]);\n\n return (\n <Fragment key={key}>\n <tr\n key={JSON.stringify(subSection)}\n className=\"mt-2 p-2 text-xs\"\n >\n {String(key)}\n </tr>\n <tr key={JSON.stringify(subSection)} className=\"block w-full\">\n <TextEditor\n section={subSection}\n keyPath={childKeyPath}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n );\n }\n )}\n </tbody>\n </table>\n </>\n);\n\nenum MarkdownViewMode {\n Edit,\n Preview,\n}\n\nconst MarkdownTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n isDarkMode,\n onContentChange,\n}) => {\n const [mode, setMode] = useState(MarkdownViewMode.Edit);\n const toggleContent = [\n {\n content: 'Edit',\n value: MarkdownViewMode.Edit,\n },\n {\n content: 'Preview',\n value: MarkdownViewMode.Preview,\n },\n ] as SwitchSelectorChoices<MarkdownViewMode>;\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.Markdown }];\n\n const content = (section as MarkdownContent<ContentNode>)[\n NodeType.Markdown\n ] as ContentNode;\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <SwitchSelector\n choices={toggleContent}\n value={mode}\n onChange={setMode}\n color=\"text\"\n size=\"sm\"\n className=\"ml-auto\"\n />\n\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n dictionary={dictionary}\n renderSection={\n mode === MarkdownViewMode.Preview\n ? (content) => (\n <MarkdownRenderer isDarkMode={isDarkMode}>\n {content}\n </MarkdownRenderer>\n )\n : undefined\n }\n onContentChange={onContentChange}\n />\n </div>\n );\n};\n\nconst InsertionTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n ...props\n}) => {\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.Insertion }];\n\n const content = (section as InsertionContent<ContentNode>)[\n NodeType.Insertion\n ];\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n {...props}\n />\n </div>\n );\n};\n\nconst FileTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n ...props\n}) => {\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.File }];\n\n const fileUrl = (section as FileContent)[NodeType.File];\n const { content } = section as FileContent;\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <span className=\"text-neutral text-sm\">{fileUrl} </span>\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n {...props}\n />\n </div>\n );\n};\n\nconst NestedTextEditor: FC<TextEditorProps> = ({\n keyPath,\n dictionary,\n renderSection,\n section,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n const content = (section as NestedContent)[NodeType.Nested];\n const childrenKeyPath = [...keyPath, { type: NodeType.Nested }] as KeyPath[];\n\n return (\n <div className=\"w-full p-2\">\n <Label>Dictionary key</Label>\n <ContentEditorInputBase\n aria-label=\"Edit field\"\n type=\"text\"\n variant=\"default\"\n {...props}\n onContentChange={(newValue) => {\n addEditedContent(\n dictionary.key,\n {\n ...content,\n dictionaryKey: String(newValue),\n },\n childrenKeyPath\n );\n }}\n >\n {content.dictionaryKey ?? ''}\n </ContentEditorInputBase>\n\n <Label>Path (optional)</Label>\n <ContentEditorInputBase\n aria-label=\"Edit field\"\n type=\"text\"\n variant=\"default\"\n {...props}\n onContentChange={(newValue) => {\n addEditedContent(\n dictionary.key,\n {\n ...content,\n path: newValue !== '' ? newValue : undefined,\n },\n childrenKeyPath\n );\n }}\n >\n {content.path ?? ''}\n </ContentEditorInputBase>\n </div>\n );\n};\n\nexport const TextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n isDarkMode,\n}) => {\n const { tsxNotEditable } = useDictionary(navigationViewContent);\n const nodeType = getNodeType(section);\n\n if (nodeType === NodeType.ReactNode) {\n return (\n <>\n <span>[React Node]</span>\n <span className=\"text-neutral text-xs\">{tsxNotEditable}</span>\n </>\n );\n }\n\n if (nodeType === NodeType.Nested) {\n return (\n <NestedTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Translation) {\n return (\n <TranslationTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Enumeration) {\n return (\n <EnumerationTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Condition) {\n return (\n <ConditionTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Insertion) {\n return (\n <InsertionTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Markdown) {\n return (\n <MarkdownTextEditor\n dictionary={dictionary}\n keyPath={keyPath}\n section={section}\n isDarkMode={isDarkMode}\n />\n );\n }\n\n if (nodeType === NodeType.File) {\n return (\n <FileTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Array) {\n return (\n <ArrayTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Object) {\n return (\n <ObjectTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Number) {\n return (\n <div className=\"w-full p-2\">\n <ContentEditorInput\n dictionary={dictionary}\n keyPath={keyPath}\n type=\"number\"\n aria-label=\"Edit field\"\n >\n {section as number}\n </ContentEditorInput>\n </div>\n );\n }\n\n if (nodeType === NodeType.Text) {\n return (\n <div className=\"w-full p-2\">\n {typeof renderSection === 'function' ? (\n renderSection(section as string)\n ) : (\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n keyPath={keyPath}\n dictionary={dictionary}\n >\n {section as string}\n </ContentEditorTextArea>\n )}\n </div>\n );\n }\n\n if (nodeType === NodeType.Boolean) {\n return (\n <div className=\"w-full p-2\">\n <ContentEditorToggle\n dictionary={dictionary}\n keyPath={keyPath}\n value={section as boolean}\n />\n </div>\n );\n }\n\n return (\n <div className=\"w-full p-2\">\n Error. Format not supported.\n {JSON.stringify(section, null, 2)}\n {JSON.stringify(keyPath, null, 2)}\n NodeType : {nodeType}\n </div>\n );\n};\n\nexport const TextEditorContainer: FC<TextEditorProps> = (props) => (\n <Container\n border\n background=\"none\"\n className=\"top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky\"\n roundedSize=\"xl\"\n >\n <TextEditor {...props} />\n </Container>\n);\n"],"names":["useEditedContent","useConfiguration","useAuditContentDeclarationField","jsx","ContentEditorTextAreaBase","Button","WandSparkles","editedContent","ContentEditorInputBase","SwitchSelector","useLocale","useLocaleSwitcherContent","NodeType","jsxs","Fragment","getLocaleName","getEmptyNode","useDictionary","navigationViewContent","Trash","EnumKeyInput","renameKey","Plus","useState","toggleContent","content","MarkdownRenderer","Label","getNodeType","Container"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,MAAM,YAAsB,CAAC,YAAY,MAAM,UAAU;AAUhE,MAAM,wBAAwD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAIA,6BAAiB;AAC7D,QAAM,gBAAgBC,YAAAA,iBAAiB;AACvC,QAAM,EAAE,8BAA8B,WAAW,WAAA,IAC/CC,uBAAAA,gCAAgC;AAGhC,SAAAC,2BAAA;AAAA,IAACC,+CAAA;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,iBAAiB,CAAC,aAChB,iBAAiB,WAAW,KAAK,UAAU,OAAO;AAAA,MAEpD,mBACED,2BAAA;AAAA,QAACE,yBAAA;AAAA,QAAA;AAAA,UACC,MAAMC,YAAA;AAAA,UACN,OAAM;AAAA,UACN,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UACN,WAAU;AAAA,UACV,WAAW;AAAA,UACX,SAAS,MAAM;AACgB,yCAAA;AAAA,cAC3B,aAAa,KAAK,UAAU;AAAA,gBAC1B,GA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ACA;AAAA,QACA,OAAO;AAAA,MAAA;AAAA,IAAA,GAEX;AAAA,EAAA;AAKF,SAAAU,2BAAA,KAAC,OAAI,EAAA,WAAU,cAAa,UAAA;AAAA,IAAA;AAAA,IAEzB,KAAK,UAAU,SAAS,MAAM,CAAC;AAAA,IAC/B,KAAK,UAAU,SAAS,MAAM,CAAC;AAAA,IAAE;AAAA,IACtB;AAAA,EAAA,GACd;AAEJ;AAEa,MAAA,sBAA2C,CAAC,UACvDV,2BAAA;AAAA,EAAC0B,2BAAA;AAAA,EAAA;AAAA,IACC,QAAM;AAAA,IACN,YAAW;AAAA,IACX,WAAU;AAAA,IACV,aAAY;AAAA,IAEZ,UAAA1B,2BAAA,IAAC,YAAY,EAAA,GAAG,MAAO,CAAA;AAAA,EAAA;AACzB;;;;"}
1
+ {"version":3,"file":"TextEditor.cjs","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config';\nimport {\n type Dictionary,\n type MarkdownContent,\n type NestedContent,\n type EnumerationContent,\n type TranslationContent,\n NodeType,\n type KeyPath,\n type ContentNode,\n getLocaleName,\n getNodeType,\n type ConditionContent,\n getEmptyNode,\n InsertionContent,\n FileContent,\n} from '@intlayer/core';\nimport { useConfiguration, useEditedContent } from '@intlayer/editor-react';\nimport { Plus, Trash, WandSparkles } from 'lucide-react';\nimport { Fragment, ReactNode, useState, type FC } from 'react';\nimport { useDictionary, useLocale } from 'react-intlayer';\nimport { useAuditContentDeclarationField } from '../../../hooks';\nimport { renameKey } from '../../../utils/object';\nimport { Button } from '../../Button';\nimport { Container } from '../../Container';\nimport {\n type ContentEditorInputProps as ContentEditorInputPropsBase,\n ContentEditorInput as ContentEditorInputBase,\n} from '../../ContentEditor/ContentEditorInput';\nimport {\n type ContentEditorTextAreaProps as ContentEditorTextAreaPropsBase,\n ContentEditorTextArea as ContentEditorTextAreaBase,\n} from '../../ContentEditor/ContentEditorTextArea';\nimport { Label } from '../../Label';\nimport { useLocaleSwitcherContent } from '../../LocaleSwitcherContentDropDown';\nimport { MarkdownRenderer } from '../../MarkDownRender';\nimport {\n type SwitchSelectorChoices,\n type SwitchSelectorProps,\n SwitchSelector,\n} from '../../SwitchSelector';\nimport { EnumKeyInput } from '../EnumKeyInput';\nimport { navigationViewContent } from '../NavigationView/navigationViewNode.content';\n\nexport const traceKeys: string[] = ['filePath', 'id', 'nodeType'];\n\ntype ContentEditorTextAreaProps = Omit<\n ContentEditorTextAreaPropsBase,\n 'onContentChange'\n> & {\n keyPath: KeyPath[];\n dictionary: Dictionary;\n};\n\nconst ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n keyPath,\n dictionary,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const configuration = useConfiguration();\n const { auditContentDeclarationField, isLoading: isAuditing } =\n useAuditContentDeclarationField();\n\n return (\n <ContentEditorTextAreaBase\n variant=\"default\"\n onContentChange={(newValue) =>\n addEditedContent(dictionary.key, newValue, keyPath)\n }\n additionalButtons={\n <Button\n Icon={WandSparkles}\n label=\"Audit\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n isLoading={isAuditing}\n onClick={() => {\n auditContentDeclarationField({\n fileContent: JSON.stringify({\n ...dictionary,\n ...(editedContent?.[dictionary.key] ?? {}),\n }),\n keyPath,\n locales: configuration.internationalization.locales ?? [],\n openAiApiKey: configuration.editor.openAiApiKey,\n model: configuration.editor.openAiApiModel,\n temperature: configuration.editor.openAiApiTemperature,\n }).then((response) => {\n if (!response?.data) return;\n\n try {\n const editedContent = response.data.fileContent as string;\n\n addEditedContent(dictionary.key, editedContent, keyPath);\n } catch (error) {\n console.error(error);\n }\n });\n }}\n />\n }\n {...props}\n />\n );\n};\n\ntype ContentEditorInputProps = Omit<\n ContentEditorInputPropsBase,\n 'onContentChange'\n> & {\n keyPath: KeyPath[];\n dictionary: Dictionary;\n};\n\nconst ContentEditorInput: FC<ContentEditorInputProps> = ({\n keyPath,\n dictionary,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n return (\n <ContentEditorInputBase\n variant=\"default\"\n onContentChange={(newValue) =>\n addEditedContent(dictionary.key, newValue, keyPath)\n }\n {...props}\n />\n );\n};\n\nconst toggleContent = [\n {\n content: 'False',\n value: false,\n },\n {\n content: 'True',\n value: true,\n },\n] as SwitchSelectorChoices<boolean>;\n\ntype ContentEditorToggleProps = SwitchSelectorProps & {\n dictionary: Dictionary;\n keyPath: KeyPath[];\n};\n\nconst ContentEditorToggle: FC<ContentEditorToggleProps> = ({\n dictionary,\n keyPath,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n return (\n <SwitchSelector\n choices={toggleContent}\n value={true}\n onChange={(value) => addEditedContent(dictionary.key, value, keyPath)}\n color=\"text\"\n size=\"sm\"\n {...props}\n />\n );\n};\n\nexport type TextEditorProps = {\n dictionary: Dictionary;\n keyPath: KeyPath[];\n section: ContentNode;\n isDarkMode?: boolean;\n renderSection?: (content: string) => ReactNode;\n onContentChange?: (newValue: string) => void;\n};\n\nconst TranslationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}: TextEditorProps) => {\n const { locale, defaultLocale } = useLocale();\n const { selectedLocales, availableLocales } = useLocaleSwitcherContent();\n\n const sectionContent = (section as TranslationContent<string>)[\n NodeType.Translation\n ] as Record<Locales, string>;\n\n const sectionContentKeys = Object.keys(sectionContent) as Locales[];\n\n const isFiltered = availableLocales.length > selectedLocales.length;\n\n const localesList = isFiltered\n ? selectedLocales\n : // If the translation include content in other locales, we display all of them\n [...new Set([...availableLocales, ...sectionContentKeys])];\n\n const content = (section as TranslationContent<string>)[NodeType.Translation];\n\n return (\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {localesList.map((translationKey) => (\n <Fragment key={translationKey}>\n <tr className=\"mt-2 w-full p-2 text-xs\">\n {getLocaleName(translationKey, locale)}\n </tr>\n <tr>\n <TextEditorContainer\n section={\n content[translationKey] ??\n getEmptyNode(content[defaultLocale])\n }\n keyPath={[\n ...keyPath,\n { type: NodeType.Translation, key: translationKey },\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n );\n};\n\nconst EnumerationTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const { addEditedContent } = useEditedContent();\n const { addNewEnumeration, removeEnumeration } = useDictionary(\n navigationViewContent\n );\n\n const content = (section as EnumerationContent<string>)[NodeType.Enumeration];\n const firstKey = Object.keys(content)[0] as keyof typeof content;\n\n return (\n <div className=\"flex flex-col gap-2\">\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {Object.keys(\n (section as EnumerationContent<ContentNode>)[NodeType.Enumeration]\n ).map((enumKey) => {\n const childrenKeyPath = [\n ...keyPath,\n { type: NodeType.Enumeration },\n ] as KeyPath[];\n return (\n <Fragment key={enumKey}>\n <tr className=\"mt-2 w-full\">\n <div className=\"flex flex-1\">\n <Button\n label={removeEnumeration.label.value}\n variant=\"hoverable\"\n color=\"text\"\n Icon={Trash}\n className=\"ml-auto\"\n onClick={() =>\n addEditedContent(\n dictionary.key,\n undefined,\n childrenKeyPath\n )\n }\n >\n {removeEnumeration.text}\n </Button>\n </div>\n </tr>\n <tr className=\"w-full p-2\">\n <EnumKeyInput\n value={enumKey}\n onChange={(value) => {\n const preValueContent = (\n section as EnumerationContent<string>\n )[NodeType.Enumeration];\n const newValueContent = renameKey(\n preValueContent,\n enumKey as keyof typeof preValueContent,\n value\n );\n const newValue = {\n ...(section as EnumerationContent<string>),\n [NodeType.Enumeration]: newValueContent,\n };\n\n addEditedContent(dictionary.key, newValue, keyPath);\n }}\n />\n </tr>\n <tr className=\"block w-full\">\n <TextEditor\n section={\n content[enumKey as keyof typeof content] ??\n getEmptyNode(content[firstKey])\n }\n keyPath={childrenKeyPath}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n );\n })}\n </tbody>\n </table>\n\n <Button\n label={addNewEnumeration.label.value}\n variant=\"hoverable\"\n color=\"neutral\"\n textAlign=\"left\"\n isFullWidth\n onClick={() =>\n addEditedContent(\n dictionary.key,\n getEmptyNode(content[firstKey]) ?? '',\n [...keyPath, { type: NodeType.Enumeration, key: 'unknown' }]\n )\n }\n Icon={Plus}\n className=\"m-2\"\n >\n {addNewEnumeration.text}\n </Button>\n </div>\n );\n};\n\nconst ConditionTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const content = (section as ConditionContent<string>)[NodeType.Condition];\n\n return (\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {['true', 'false', 'fallback'].map((condKey) => (\n <Fragment key={condKey}>\n <tr key={condKey} className=\"mt-2 block w-full p-2 text-xs\">\n {String(condKey)}\n </tr>\n <tr key={condKey} className=\"block w-full\">\n <TextEditorContainer\n section={\n content[condKey as keyof typeof content] ??\n getEmptyNode(content['true'])\n }\n keyPath={[\n ...keyPath,\n {\n type: NodeType.Condition,\n key: condKey,\n } as KeyPath,\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n );\n};\n\nconst ArrayTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => {\n const { addEditedContent } = useEditedContent();\n const { addNewElement, removeElement } = useDictionary(navigationViewContent);\n\n return (\n <div className=\"flex flex-col gap-2\">\n <table className=\"w-full\">\n <tbody className=\"flex w-full flex-col gap-2\">\n {(section as unknown as ContentNode[]).map((subSection, index) => (\n <Fragment key={JSON.stringify(subSection)}>\n <tr className=\"mt-2 flex w-full justify-between gap-2 p-2\">\n <span className=\"text-xs\">{String(index)}</span>\n <Button\n label={removeElement.label.value}\n variant=\"hoverable\"\n color=\"neutral\"\n className=\"ml-auto\"\n textAlign=\"left\"\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Array,\n key: (section as unknown as ContentNode[]).length,\n },\n ];\n addEditedContent(dictionary.key, undefined, newKeyPath);\n }}\n Icon={Trash}\n >\n {removeElement.text}\n </Button>\n </tr>\n\n <tr className=\"block w-full\">\n <TextEditorContainer\n section={\n subSection ??\n getEmptyNode((section as unknown as ContentNode[])[0])\n }\n keyPath={[\n ...keyPath,\n {\n type: NodeType.Array,\n key: index,\n },\n ]}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n ))}\n </tbody>\n </table>\n <Button\n label={addNewElement.label.value}\n variant=\"hoverable\"\n color=\"neutral\"\n textAlign=\"left\"\n isFullWidth\n onClick={() => {\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Array,\n key: (section as unknown as ContentNode[]).length,\n },\n ];\n addEditedContent(\n dictionary.key,\n getEmptyNode((section as unknown as ContentNode[])[0]) ?? '',\n newKeyPath,\n false\n );\n }}\n Icon={Plus}\n >\n {addNewElement.text}\n </Button>\n </div>\n );\n};\n\nconst ObjectTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n}) => (\n <>\n <table className=\"w-full\">\n <tbody className=\"flex flex-col gap-2\">\n {Object.keys(section as unknown as Record<string, ContentNode>).map(\n (key) => {\n const childKeyPath: KeyPath[] = [\n ...keyPath,\n { type: NodeType.Object, key },\n ];\n const typedSection = section as unknown as Record<\n string,\n ContentNode\n >;\n const firstKey = Object.keys(\n typedSection\n )[0] as keyof typeof section;\n const subSection =\n typedSection[key as keyof typeof section] ??\n getEmptyNode(typedSection[firstKey]);\n\n return (\n <Fragment key={key}>\n <tr\n key={JSON.stringify(subSection)}\n className=\"mt-2 p-2 text-xs\"\n >\n {String(key)}\n </tr>\n <tr key={JSON.stringify(subSection)} className=\"block w-full\">\n <TextEditor\n section={subSection}\n keyPath={childKeyPath}\n dictionary={dictionary}\n renderSection={renderSection}\n />\n </tr>\n </Fragment>\n );\n }\n )}\n </tbody>\n </table>\n </>\n);\n\nenum MarkdownViewMode {\n Edit,\n Preview,\n}\n\nconst MarkdownTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n isDarkMode,\n onContentChange,\n}) => {\n const [mode, setMode] = useState(MarkdownViewMode.Edit);\n const toggleContent = [\n {\n content: 'Edit',\n value: MarkdownViewMode.Edit,\n },\n {\n content: 'Preview',\n value: MarkdownViewMode.Preview,\n },\n ] as SwitchSelectorChoices<MarkdownViewMode>;\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.Markdown }];\n\n const content = (section as MarkdownContent<ContentNode>)[\n NodeType.Markdown\n ] as ContentNode;\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <SwitchSelector\n choices={toggleContent}\n value={mode}\n onChange={setMode}\n color=\"text\"\n size=\"sm\"\n className=\"ml-auto\"\n />\n\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n dictionary={dictionary}\n renderSection={\n mode === MarkdownViewMode.Preview\n ? (content) => (\n <MarkdownRenderer isDarkMode={isDarkMode}>\n {content}\n </MarkdownRenderer>\n )\n : undefined\n }\n onContentChange={onContentChange}\n />\n </div>\n );\n};\n\nconst InsertionTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n ...props\n}) => {\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.Insertion }];\n\n const content = (section as InsertionContent<ContentNode>)[\n NodeType.Insertion\n ];\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n {...props}\n />\n </div>\n );\n};\n\nconst FileTextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n ...props\n}) => {\n const childKeyPath: KeyPath[] = [...keyPath, { type: NodeType.File }];\n\n const fileUrl = (section as FileContent)[NodeType.File];\n const { content } = section as FileContent;\n\n return (\n <div className=\"flex w-full flex-col justify-center gap-6 p-2\">\n <span className=\"text-neutral text-sm\">{fileUrl} </span>\n <TextEditorContainer\n section={content}\n keyPath={childKeyPath}\n {...props}\n />\n </div>\n );\n};\n\nconst NestedTextEditor: FC<TextEditorProps> = ({\n keyPath,\n dictionary,\n renderSection,\n section,\n ...props\n}) => {\n const { addEditedContent } = useEditedContent();\n\n const content = (section as NestedContent)[NodeType.Nested];\n const childrenKeyPath = [...keyPath, { type: NodeType.Nested }] as KeyPath[];\n\n return (\n <div className=\"w-full p-2\">\n <Label>Dictionary key</Label>\n <ContentEditorInputBase\n aria-label=\"Edit field\"\n type=\"text\"\n variant=\"default\"\n {...props}\n onContentChange={(newValue) => {\n addEditedContent(\n dictionary.key,\n {\n ...content,\n dictionaryKey: String(newValue),\n },\n childrenKeyPath\n );\n }}\n >\n {content.dictionaryKey ?? ''}\n </ContentEditorInputBase>\n\n <Label>Path (optional)</Label>\n <ContentEditorInputBase\n aria-label=\"Edit field\"\n type=\"text\"\n variant=\"default\"\n {...props}\n onContentChange={(newValue) => {\n addEditedContent(\n dictionary.key,\n {\n ...content,\n path: newValue !== '' ? newValue : undefined,\n },\n childrenKeyPath\n );\n }}\n >\n {content.path ?? ''}\n </ContentEditorInputBase>\n </div>\n );\n};\n\nexport const TextEditor: FC<TextEditorProps> = ({\n section,\n keyPath,\n dictionary,\n renderSection,\n isDarkMode,\n}) => {\n const { tsxNotEditable } = useDictionary(navigationViewContent);\n const nodeType = getNodeType(section);\n\n if (nodeType === NodeType.ReactNode) {\n return (\n <>\n <span>[React Node]</span>\n <span className=\"text-neutral text-xs\">{tsxNotEditable}</span>\n </>\n );\n }\n\n if (nodeType === NodeType.Nested) {\n return (\n <NestedTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Translation) {\n return (\n <TranslationTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Enumeration) {\n return (\n <EnumerationTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Condition) {\n return (\n <ConditionTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Insertion) {\n return (\n <InsertionTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Markdown) {\n return (\n <MarkdownTextEditor\n dictionary={dictionary}\n keyPath={keyPath}\n section={section}\n isDarkMode={isDarkMode}\n />\n );\n }\n\n if (nodeType === NodeType.File) {\n return (\n <FileTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Array) {\n return (\n <ArrayTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Object) {\n return (\n <ObjectTextEditor\n dictionary={dictionary}\n renderSection={renderSection}\n keyPath={keyPath}\n section={section}\n />\n );\n }\n\n if (nodeType === NodeType.Number) {\n return (\n <div className=\"w-full p-2\">\n <ContentEditorInput\n dictionary={dictionary}\n keyPath={keyPath}\n type=\"number\"\n aria-label=\"Edit field\"\n >\n {section as number}\n </ContentEditorInput>\n </div>\n );\n }\n\n if (nodeType === NodeType.Text) {\n return (\n <div className=\"w-full p-2\">\n {typeof renderSection === 'function' ? (\n renderSection(section as string)\n ) : (\n <ContentEditorTextArea\n variant=\"default\"\n aria-label=\"Edit field\"\n keyPath={keyPath}\n dictionary={dictionary}\n >\n {section as string}\n </ContentEditorTextArea>\n )}\n </div>\n );\n }\n\n if (nodeType === NodeType.Boolean) {\n return (\n <div className=\"w-full p-2\">\n <ContentEditorToggle\n dictionary={dictionary}\n keyPath={keyPath}\n value={section as boolean}\n />\n </div>\n );\n }\n\n return (\n <div className=\"w-full p-2\">\n Error. Format not supported.\n {JSON.stringify(section, null, 2)}\n {JSON.stringify(keyPath, null, 2)}\n NodeType : {nodeType}\n </div>\n );\n};\n\nexport const TextEditorContainer: FC<TextEditorProps> = (props) => (\n <Container\n border\n background=\"none\"\n className=\"top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky\"\n roundedSize=\"xl\"\n >\n <TextEditor {...props} />\n </Container>\n);\n"],"names":["useEditedContent","useConfiguration","useAuditContentDeclarationField","jsx","ContentEditorTextAreaBase","Button","WandSparkles","editedContent","ContentEditorInputBase","SwitchSelector","useLocale","useLocaleSwitcherContent","NodeType","jsxs","Fragment","getLocaleName","getEmptyNode","useDictionary","navigationViewContent","Trash","EnumKeyInput","renameKey","Plus","useState","toggleContent","content","MarkdownRenderer","Label","getNodeType","Container"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,MAAM,YAAsB,CAAC,YAAY,MAAM,UAAU;AAUhE,MAAM,wBAAwD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAIA,6BAAiB;AAC7D,QAAM,gBAAgBC,YAAAA,iBAAiB;AACvC,QAAM,EAAE,8BAA8B,WAAW,WAAA,IAC/CC,uBAAAA,gCAAgC;AAGhC,SAAAC,2BAAA;AAAA,IAACC,+CAAA;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,iBAAiB,CAAC,aAChB,iBAAiB,WAAW,KAAK,UAAU,OAAO;AAAA,MAEpD,mBACED,2BAAA;AAAA,QAACE,yBAAA;AAAA,QAAA;AAAA,UACC,MAAMC,YAAA;AAAA,UACN,OAAM;AAAA,UACN,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UACN,WAAU;AAAA,UACV,WAAW;AAAA,UACX,SAAS,MAAM;AACgB,yCAAA;AAAA,cAC3B,aAAa,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