@intlayer/design-system 5.3.3 → 5.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/.vite/manifest.json +72 -54
  2. package/dist/{Form-MjLzPGze.js → Form-CriPBaZk.js} +11 -1
  3. package/dist/Form-CriPBaZk.js.map +1 -0
  4. package/dist/{Form-BpxW17v4.cjs → Form-DJrUK3mm.cjs} +11 -1
  5. package/dist/Form-DJrUK3mm.cjs.map +1 -0
  6. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +1 -1
  7. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +1 -1
  8. package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs +1 -1
  9. package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs +1 -1
  10. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +1 -1
  11. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +1 -1
  12. package/dist/components/Auth/SignInForm/SignInForm.cjs +1 -1
  13. package/dist/components/Auth/SignInForm/SignInForm.mjs +1 -1
  14. package/dist/components/Auth/SignUpForm/SignUpForm.cjs +1 -1
  15. package/dist/components/Auth/SignUpForm/SignUpForm.mjs +1 -1
  16. package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs +1 -1
  17. package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs +1 -1
  18. package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
  19. package/dist/components/ContentEditor/ContentEditor.d.ts +3 -2
  20. package/dist/components/ContentEditor/ContentEditor.d.ts.map +1 -1
  21. package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
  22. package/dist/components/ContentEditor/ContentEditorTextArea.cjs +1 -1
  23. package/dist/components/ContentEditor/ContentEditorTextArea.mjs +1 -1
  24. package/dist/components/DictionaryEditor/DictionaryEditor.cjs +2 -1
  25. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  26. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
  27. package/dist/components/DictionaryEditor/DictionaryEditor.mjs +2 -1
  28. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  29. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs +1 -1
  30. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +1 -1
  31. package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.cjs +1 -1
  32. package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs +1 -1
  33. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs +1 -1
  34. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +1 -1
  35. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.cjs +58 -0
  36. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.cjs.map +1 -0
  37. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.d.ts +9 -0
  38. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.d.ts.map +1 -0
  39. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs +58 -0
  40. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs.map +1 -0
  41. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.cjs +21 -0
  42. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.cjs.map +1 -0
  43. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.d.ts +9 -0
  44. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.d.ts.map +1 -0
  45. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.mjs +21 -0
  46. package/dist/components/DictionaryEditor/NodeWrapper/InsertionWrapper.mjs.map +1 -0
  47. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs +4 -15
  48. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs.map +1 -1
  49. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.d.ts +2 -2
  50. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.d.ts.map +1 -1
  51. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs +4 -15
  52. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs.map +1 -1
  53. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs +1 -1
  54. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +1 -1
  55. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +8 -5
  56. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
  57. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts +2 -2
  58. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts.map +1 -1
  59. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +8 -5
  60. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
  61. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs +1 -1
  62. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs +1 -1
  63. package/dist/components/DictionaryEditor/NodeWrapper/index.cjs +2 -2
  64. package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts +4 -2
  65. package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts.map +1 -1
  66. package/dist/components/DictionaryEditor/NodeWrapper/index.mjs +2 -2
  67. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +102 -22
  68. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
  69. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts +3 -1
  70. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
  71. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +102 -22
  72. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
  73. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -1
  74. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
  75. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -1
  76. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +1 -1
  77. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +48 -114
  78. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  79. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
  80. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +49 -115
  81. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  82. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +0 -51
  83. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
  84. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +0 -105
  85. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
  86. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +0 -51
  87. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
  88. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +6 -5
  89. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  90. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
  91. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +7 -6
  92. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  93. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +1 -1
  94. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +1 -1
  95. package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs +10 -2
  96. package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
  97. package/dist/components/DictionaryFieldEditor/getIsEditableSection.d.ts.map +1 -1
  98. package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs +11 -3
  99. package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
  100. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +30 -0
  101. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
  102. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +66 -0
  103. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
  104. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +30 -0
  105. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
  106. package/dist/components/Form/Form.cjs +1 -1
  107. package/dist/components/Form/Form.mjs +1 -1
  108. package/dist/components/Form/elements/AutoSizeTextAreaElement.cjs +1 -1
  109. package/dist/components/Form/elements/AutoSizeTextAreaElement.mjs +1 -1
  110. package/dist/components/Form/elements/CheckboxElement.cjs +1 -1
  111. package/dist/components/Form/elements/CheckboxElement.mjs +1 -1
  112. package/dist/components/Form/elements/EditableFieldInputElement.cjs +1 -1
  113. package/dist/components/Form/elements/EditableFieldInputElement.d.ts +2 -2
  114. package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
  115. package/dist/components/Form/elements/EditableFieldInputElement.mjs +1 -1
  116. package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +1 -1
  117. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +2 -2
  118. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
  119. package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +1 -1
  120. package/dist/components/Form/elements/FormElement.cjs +1 -1
  121. package/dist/components/Form/elements/FormElement.mjs +1 -1
  122. package/dist/components/Form/elements/InputElement.cjs +1 -1
  123. package/dist/components/Form/elements/InputElement.d.ts +2 -2
  124. package/dist/components/Form/elements/InputElement.d.ts.map +1 -1
  125. package/dist/components/Form/elements/InputElement.mjs +1 -1
  126. package/dist/components/Form/elements/InputPasswordElement.cjs +1 -1
  127. package/dist/components/Form/elements/InputPasswordElement.d.ts +2 -2
  128. package/dist/components/Form/elements/InputPasswordElement.d.ts.map +1 -1
  129. package/dist/components/Form/elements/InputPasswordElement.mjs +1 -1
  130. package/dist/components/Form/elements/MultiselectElement.cjs +1 -1
  131. package/dist/components/Form/elements/MultiselectElement.mjs +1 -1
  132. package/dist/components/Form/elements/SelectElement.cjs +1 -1
  133. package/dist/components/Form/elements/SelectElement.mjs +1 -1
  134. package/dist/components/Form/elements/SwitchSelectorElement.cjs +1 -1
  135. package/dist/components/Form/elements/SwitchSelectorElement.mjs +1 -1
  136. package/dist/components/Form/elements/TextAreaElement.cjs +1 -1
  137. package/dist/components/Form/elements/TextAreaElement.d.ts +3 -3
  138. package/dist/components/Form/elements/TextAreaElement.d.ts.map +1 -1
  139. package/dist/components/Form/elements/TextAreaElement.mjs +1 -1
  140. package/dist/components/Form/elements/index.cjs +1 -1
  141. package/dist/components/Form/elements/index.mjs +1 -1
  142. package/dist/components/Form/index.cjs +1 -1
  143. package/dist/components/Form/index.mjs +1 -1
  144. package/dist/components/Form/layout/FormItemLayout.cjs +1 -1
  145. package/dist/components/Form/layout/FormItemLayout.mjs +1 -1
  146. package/dist/components/Form/layout/FormLabelLayout.cjs +12 -4
  147. package/dist/components/Form/layout/FormLabelLayout.cjs.map +1 -1
  148. package/dist/components/Form/layout/FormLabelLayout.d.ts.map +1 -1
  149. package/dist/components/Form/layout/FormLabelLayout.mjs +12 -4
  150. package/dist/components/Form/layout/FormLabelLayout.mjs.map +1 -1
  151. package/dist/components/Form/layout/index.cjs +1 -1
  152. package/dist/components/Form/layout/index.mjs +1 -1
  153. package/dist/components/Input/Input.cjs.map +1 -1
  154. package/dist/components/Input/Input.d.ts +1 -7
  155. package/dist/components/Input/Input.d.ts.map +1 -1
  156. package/dist/components/Input/Input.mjs.map +1 -1
  157. package/dist/components/TextArea/TextArea.cjs.map +1 -1
  158. package/dist/components/TextArea/TextArea.d.ts +1 -7
  159. package/dist/components/TextArea/TextArea.d.ts.map +1 -1
  160. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  161. package/dist/components/index.cjs +1 -1
  162. package/dist/components/index.mjs +1 -1
  163. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  164. package/dist/hooks/intlayerAPIHooks.d.ts +54 -54
  165. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  166. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  167. package/dist/hooks/useIntlayerAPI.d.ts +1 -1
  168. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  169. package/dist/{index-CVTE3oHq.js → index-Au2tP3vA.js} +27 -3
  170. package/dist/index-Au2tP3vA.js.map +1 -0
  171. package/dist/{index-BpCAhDMe.cjs → index-DbyCRREy.cjs} +27 -3
  172. package/dist/index-DbyCRREy.cjs.map +1 -0
  173. package/dist/utils/camelCase.cjs +2 -2
  174. package/dist/utils/camelCase.cjs.map +1 -1
  175. package/dist/utils/camelCase.d.ts +1 -1
  176. package/dist/utils/camelCase.d.ts.map +1 -1
  177. package/dist/utils/camelCase.mjs +2 -2
  178. package/dist/utils/camelCase.mjs.map +1 -1
  179. package/package.json +16 -18
  180. package/dist/Form-BpxW17v4.cjs.map +0 -1
  181. package/dist/Form-MjLzPGze.js.map +0 -1
  182. package/dist/index-BpCAhDMe.cjs.map +0 -1
  183. package/dist/index-CVTE3oHq.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@intlayer/core";
3
3
  import "../ItemLayout.mjs";
4
- import { a } from "../../../index-CVTE3oHq.js";
4
+ import { a } from "../../../index-Au2tP3vA.js";
5
5
  export {
6
6
  a as NestedObjectWrapper
7
7
  };
@@ -13,15 +13,17 @@ const StringWrapper = ({
13
13
  keyPath,
14
14
  section,
15
15
  editedContent,
16
+ editedContentValue: editedContentValueProp,
16
17
  onContentChange,
17
- onFocusKeyPath
18
+ onFocusKeyPath,
19
+ renderSection
18
20
  }) => {
19
- const editedContentValue = core.getContentNodeByKeyPath(editedContent, keyPath);
21
+ const editedContentValue = editedContentValueProp ?? core.getContentNodeByKeyPath(editedContent, keyPath);
20
22
  if (editedContentValue && typeof editedContentValue !== "string") {
21
23
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Error loading section - Edited content Incoherence with the original content format" });
22
24
  }
23
25
  const level = keyPath.length;
24
- const content = editedContentValue ?? section;
26
+ const content = String(editedContentValue ?? section);
25
27
  return /* @__PURE__ */ jsxRuntime.jsx(
26
28
  "span",
27
29
  {
@@ -37,10 +39,11 @@ const StringWrapper = ({
37
39
  e.stopPropagation();
38
40
  onFocusKeyPath(keyPath);
39
41
  },
40
- children: /* @__PURE__ */ jsxRuntime.jsx(
42
+ children: typeof renderSection === "function" ? renderSection(content) : /* @__PURE__ */ jsxRuntime.jsx(
41
43
  components_EditableField_EditableFieldTextArea.EditableFieldTextArea,
42
44
  {
43
- defaultValue: String(content),
45
+ "aria-label": "Editable field",
46
+ defaultValue: content,
44
47
  onSave: (newValue) => onContentChange({ keyPath, newValue }),
45
48
  onCancel: () => null
46
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StringWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\ntype StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n onContentChange,\n onFocusKeyPath,\n}) => {\n const editedContentValue = getContentNodeByKeyPath(editedContent, keyPath);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return (\n <>\n Error loading section - Edited content Incoherence with the original\n content format\n </>\n );\n }\n\n const level = keyPath.length;\n\n const content = editedContentValue ?? section;\n\n return (\n <span\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n <EditableFieldTextArea\n defaultValue={String(content)}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n </span>\n );\n};\n"],"names":["getContentNodeByKeyPath","jsx","cn","EditableFieldTextArea"],"mappings":";;;;;;;;;;;AAUO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,qBAAqBA,KAAAA,wBAAwB,eAAe,OAAO;AAErE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,iEACI,UAGF,sFAAA,CAAA;AAAA,EAAA;AAIJ,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,sBAAsB;AAGpC,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAWC,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEA,UAAAD,2BAAA;AAAA,QAACE,+CAAA;AAAA,QAAA;AAAA,UACC,cAAc,OAAO,OAAO;AAAA,UAC5B,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EACF;AAEJ;;"}
1
+ {"version":3,"file":"StringWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\nexport type StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n editedContentValue?: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n editedContentValue: editedContentValueProp,\n onContentChange,\n onFocusKeyPath,\n renderSection,\n}) => {\n const editedContentValue =\n editedContentValueProp ?? getContentNodeByKeyPath(editedContent, keyPath);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return (\n <>\n Error loading section - Edited content Incoherence with the original\n content format\n </>\n );\n }\n\n const level = keyPath.length;\n\n const content = String(editedContentValue ?? section);\n\n return (\n <span\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n {typeof renderSection === 'function' ? (\n renderSection(content)\n ) : (\n <EditableFieldTextArea\n aria-label=\"Editable field\"\n defaultValue={content}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n )}\n </span>\n );\n};\n"],"names":["getContentNodeByKeyPath","jsx","cn","EditableFieldTextArea"],"mappings":";;;;;;;;;;;AAWO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,qBACJ,0BAA0BA,6BAAwB,eAAe,OAAO;AAEtE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,iEACI,UAGF,sFAAA,CAAA;AAAA,EAAA;AAIJ,QAAM,QAAQ,QAAQ;AAEhB,QAAA,UAAU,OAAO,sBAAsB,OAAO;AAGlD,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAWC,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEC,UAAO,OAAA,kBAAkB,aACxB,cAAc,OAAO,IAErBD,2BAAA;AAAA,QAACE,+CAAA;AAAA,QAAA;AAAA,UACC,cAAW;AAAA,UACX,cAAc;AAAA,UACd,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EAEJ;AAEJ;;"}
@@ -1,8 +1,8 @@
1
1
  import { FC } from 'react';
2
2
  import { NodeWrapperProps } from './index';
3
- type StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {
3
+ export type StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {
4
4
  section: string;
5
+ editedContentValue?: string;
5
6
  };
6
7
  export declare const StringWrapper: FC<StringWrapperProps>;
7
- export {};
8
8
  //# sourceMappingURL=StringWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StringWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,KAAK,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IAC5D,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA4ChD,CAAC"}
1
+ {"version":3,"file":"StringWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAoDhD,CAAC"}
@@ -11,15 +11,17 @@ const StringWrapper = ({
11
11
  keyPath,
12
12
  section,
13
13
  editedContent,
14
+ editedContentValue: editedContentValueProp,
14
15
  onContentChange,
15
- onFocusKeyPath
16
+ onFocusKeyPath,
17
+ renderSection
16
18
  }) => {
17
- const editedContentValue = getContentNodeByKeyPath(editedContent, keyPath);
19
+ const editedContentValue = editedContentValueProp ?? getContentNodeByKeyPath(editedContent, keyPath);
18
20
  if (editedContentValue && typeof editedContentValue !== "string") {
19
21
  return /* @__PURE__ */ jsx(Fragment, { children: "Error loading section - Edited content Incoherence with the original content format" });
20
22
  }
21
23
  const level = keyPath.length;
22
- const content = editedContentValue ?? section;
24
+ const content = String(editedContentValue ?? section);
23
25
  return /* @__PURE__ */ jsx(
24
26
  "span",
25
27
  {
@@ -35,10 +37,11 @@ const StringWrapper = ({
35
37
  e.stopPropagation();
36
38
  onFocusKeyPath(keyPath);
37
39
  },
38
- children: /* @__PURE__ */ jsx(
40
+ children: typeof renderSection === "function" ? renderSection(content) : /* @__PURE__ */ jsx(
39
41
  EditableFieldTextArea,
40
42
  {
41
- defaultValue: String(content),
43
+ "aria-label": "Editable field",
44
+ defaultValue: content,
42
45
  onSave: (newValue) => onContentChange({ keyPath, newValue }),
43
46
  onCancel: () => null
44
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StringWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\ntype StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n onContentChange,\n onFocusKeyPath,\n}) => {\n const editedContentValue = getContentNodeByKeyPath(editedContent, keyPath);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return (\n <>\n Error loading section - Edited content Incoherence with the original\n content format\n </>\n );\n }\n\n const level = keyPath.length;\n\n const content = editedContentValue ?? section;\n\n return (\n <span\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n <EditableFieldTextArea\n defaultValue={String(content)}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n </span>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAUO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,qBAAqB,wBAAwB,eAAe,OAAO;AAErE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,2CACI,UAGF,sFAAA,CAAA;AAAA,EAAA;AAIJ,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,sBAAsB;AAGpC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEA,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,cAAc,OAAO,OAAO;AAAA,UAC5B,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"StringWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\nexport type StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n editedContentValue?: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n editedContentValue: editedContentValueProp,\n onContentChange,\n onFocusKeyPath,\n renderSection,\n}) => {\n const editedContentValue =\n editedContentValueProp ?? getContentNodeByKeyPath(editedContent, keyPath);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return (\n <>\n Error loading section - Edited content Incoherence with the original\n content format\n </>\n );\n }\n\n const level = keyPath.length;\n\n const content = String(editedContentValue ?? section);\n\n return (\n <span\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n {typeof renderSection === 'function' ? (\n renderSection(content)\n ) : (\n <EditableFieldTextArea\n aria-label=\"Editable field\"\n defaultValue={content}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n )}\n </span>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAWO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,qBACJ,0BAA0B,wBAAwB,eAAe,OAAO;AAEtE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,2CACI,UAGF,sFAAA,CAAA;AAAA,EAAA;AAIJ,QAAM,QAAQ,QAAQ;AAEhB,QAAA,UAAU,OAAO,sBAAsB,OAAO;AAGlD,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEC,UAAO,OAAA,kBAAkB,aACxB,cAAc,OAAO,IAErB;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,cAAW;AAAA,UACX,cAAc;AAAA,UACd,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EAEJ;AAEJ;"}
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("@intlayer/core");
5
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
5
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-DbyCRREy.cjs");
6
6
  exports.TranslationWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.TranslationWrapper;
7
7
  //# sourceMappingURL=TranslationWrapper.cjs.map
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@intlayer/core";
3
- import { T } from "../../../index-CVTE3oHq.js";
3
+ import { T } from "../../../index-Au2tP3vA.js";
4
4
  export {
5
5
  T as TranslationWrapper
6
6
  };
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("@intlayer/core");
5
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
6
- require("./MarkdownWrapper.cjs");
5
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-DbyCRREy.cjs");
7
6
  require("./StringWrapper.cjs");
7
+ require("./FileWrapper.cjs");
8
8
  exports.NodeWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.NodeWrapper;
9
9
  exports.traceKeys = components_DictionaryEditor_NodeWrapper_ArrayWrapper.traceKeys;
10
10
  //# sourceMappingURL=index.cjs.map
@@ -1,9 +1,10 @@
1
1
  import { Locales } from '@intlayer/config/client';
2
- import { KeyPath, ContentNode } from '@intlayer/core';
3
- import { FC } from 'react';
2
+ import { KeyPath, ContentNode, Dictionary } from '@intlayer/core';
3
+ import { ReactNode, FC } from 'react';
4
4
  export declare const traceKeys: string[];
5
5
  export type NodeWrapperProps = {
6
6
  keyPath: KeyPath[];
7
+ dictionary: Dictionary;
7
8
  section: ContentNode;
8
9
  onContentChange: (content: {
9
10
  keyPath: KeyPath[];
@@ -14,6 +15,7 @@ export type NodeWrapperProps = {
14
15
  focusedKeyPath: KeyPath[] | undefined;
15
16
  onFocusKeyPath: (keyPath: KeyPath[]) => void;
16
17
  onClickEdit?: (keyPath: KeyPath[]) => void;
18
+ renderSection?: (content: string) => ReactNode;
17
19
  };
18
20
  export declare const NodeWrapper: FC<NodeWrapperProps>;
19
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAShC,eAAO,MAAM,SAAS,EAAE,MAAM,EAAmC,CAAC;AAElE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC;IACrB,eAAe,EAAE,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7E,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,WAAW,CAAC;IAC3B,cAAc,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IACtC,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAC7C,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAwE5C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAOL,KAAK,OAAO,EACZ,KAAK,WAAW,EAEhB,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAU3C,eAAO,MAAM,SAAS,EAAE,MAAM,EAAmC,CAAC;AAElE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;IACrB,eAAe,EAAE,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7E,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,WAAW,CAAC;IAC3B,cAAc,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IACtC,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAC7C,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAC3C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,SAAS,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAqF5C,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@intlayer/core";
3
- import { N, t } from "../../../index-CVTE3oHq.js";
4
- import "./MarkdownWrapper.mjs";
3
+ import { N, t } from "../../../index-Au2tP3vA.js";
5
4
  import "./StringWrapper.mjs";
5
+ import "./FileWrapper.mjs";
6
6
  export {
7
7
  N as NodeWrapper,
8
8
  t as traceKeys
@@ -125,7 +125,8 @@ const ContentEditorToggle = ({
125
125
  const TranslationTextEditor = ({
126
126
  section,
127
127
  keyPath,
128
- dictionary
128
+ dictionary,
129
+ renderSection
129
130
  }) => {
130
131
  const { locale, defaultLocale } = reactIntlayer.useLocale();
131
132
  const { selectedLocales, availableLocales } = components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext.useLocaleSwitcherContent();
@@ -147,7 +148,8 @@ const TranslationTextEditor = ({
147
148
  ...keyPath,
148
149
  { type: core.NodeType.Translation, key: translationKey }
149
150
  ],
150
- dictionary
151
+ dictionary,
152
+ renderSection
151
153
  }
152
154
  ) })
153
155
  ] }, translationKey)) }) });
@@ -155,7 +157,8 @@ const TranslationTextEditor = ({
155
157
  const EnumerationTextEditor = ({
156
158
  section,
157
159
  keyPath,
158
- dictionary
160
+ dictionary,
161
+ renderSection
159
162
  }) => {
160
163
  const { addEditedContent } = editorReact.useEditedContent();
161
164
  const { addNewEnumeration, removeEnumeration } = reactIntlayer.useDictionary(
@@ -212,7 +215,8 @@ const EnumerationTextEditor = ({
212
215
  {
213
216
  section: content[enumKey] ?? core.getEmptyNode(content[firstKey]),
214
217
  keyPath: childrenKeyPath,
215
- dictionary
218
+ dictionary,
219
+ renderSection
216
220
  }
217
221
  ) })
218
222
  ] }, enumKey);
@@ -240,7 +244,8 @@ const EnumerationTextEditor = ({
240
244
  const ConditionTextEditor = ({
241
245
  section,
242
246
  keyPath,
243
- dictionary
247
+ dictionary,
248
+ renderSection
244
249
  }) => {
245
250
  const content = section[core.NodeType.Condition];
246
251
  return /* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "flex w-full flex-col gap-2", children: ["true", "false", "fallback"].map((condKey) => /* @__PURE__ */ jsxRuntime.jsxs(ReactExports.Fragment, { children: [
@@ -256,7 +261,8 @@ const ConditionTextEditor = ({
256
261
  key: condKey
257
262
  }
258
263
  ],
259
- dictionary
264
+ dictionary,
265
+ renderSection
260
266
  }
261
267
  ) }, condKey)
262
268
  ] }, condKey)) }) });
@@ -264,7 +270,8 @@ const ConditionTextEditor = ({
264
270
  const ArrayTextEditor = ({
265
271
  section,
266
272
  keyPath,
267
- dictionary
273
+ dictionary,
274
+ renderSection
268
275
  }) => {
269
276
  const { addEditedContent } = editorReact.useEditedContent();
270
277
  const { addNewElement, removeElement } = reactIntlayer.useDictionary(components_DictionaryFieldEditor_NavigationView_navigationViewNode_content.navigationViewContent);
@@ -306,7 +313,8 @@ const ArrayTextEditor = ({
306
313
  key: index
307
314
  }
308
315
  ],
309
- dictionary
316
+ dictionary,
317
+ renderSection
310
318
  }
311
319
  ) })
312
320
  ] }, JSON.stringify(subSection))) }) }),
@@ -342,7 +350,8 @@ const ArrayTextEditor = ({
342
350
  const ObjectTextEditor = ({
343
351
  section,
344
352
  keyPath,
345
- dictionary
353
+ dictionary,
354
+ renderSection
346
355
  }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "flex flex-col gap-2", children: Object.keys(section).map(
347
356
  (key) => {
348
357
  const childKeyPath = [
@@ -368,7 +377,8 @@ const ObjectTextEditor = ({
368
377
  {
369
378
  section: subSection,
370
379
  keyPath: childKeyPath,
371
- dictionary
380
+ dictionary,
381
+ renderSection
372
382
  }
373
383
  ) }, JSON.stringify(subSection))
374
384
  ] }, key);
@@ -378,7 +388,8 @@ const MarkdownTextEditor = ({
378
388
  section,
379
389
  keyPath,
380
390
  dictionary,
381
- isDarkMode
391
+ isDarkMode,
392
+ onContentChange
382
393
  }) => {
383
394
  const [mode, setMode] = ReactExports.useState(
384
395
  0
@@ -396,6 +407,7 @@ const MarkdownTextEditor = ({
396
407
  /* Preview */
397
408
  }
398
409
  ];
410
+ const childKeyPath = [...keyPath, { type: core.NodeType.Markdown }];
399
411
  const content = section[core.NodeType.Markdown];
400
412
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full flex-col justify-center gap-6 p-2", children: [
401
413
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -409,22 +421,61 @@ const MarkdownTextEditor = ({
409
421
  className: "ml-auto"
410
422
  }
411
423
  ),
412
- mode === 0 && /* @__PURE__ */ jsxRuntime.jsx(
413
- ContentEditorTextArea,
424
+ /* @__PURE__ */ jsxRuntime.jsx(
425
+ TextEditorContainer,
414
426
  {
415
- variant: "default",
416
- "aria-label": "Edit field",
417
- keyPath: [...keyPath, { type: core.NodeType.Markdown }],
427
+ section: content,
428
+ keyPath: childKeyPath,
418
429
  dictionary,
419
- children: content
430
+ renderSection: mode === 1 ? (content2) => /* @__PURE__ */ jsxRuntime.jsx(components_MarkDownRender_index.MarkdownRenderer, { isDarkMode, children: content2 }) : void 0,
431
+ onContentChange
420
432
  }
421
- ),
422
- mode === 1 && /* @__PURE__ */ jsxRuntime.jsx(components_MarkDownRender_index.MarkdownRenderer, { isDarkMode, children: content })
433
+ )
434
+ ] });
435
+ };
436
+ const InsertionTextEditor = ({
437
+ section,
438
+ keyPath,
439
+ ...props
440
+ }) => {
441
+ const childKeyPath = [...keyPath, { type: core.NodeType.Insertion }];
442
+ const content = section[core.NodeType.Insertion];
443
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full flex-col justify-center gap-6 p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
444
+ TextEditorContainer,
445
+ {
446
+ section: content,
447
+ keyPath: childKeyPath,
448
+ ...props
449
+ }
450
+ ) });
451
+ };
452
+ const FileTextEditor = ({
453
+ section,
454
+ keyPath,
455
+ ...props
456
+ }) => {
457
+ const childKeyPath = [...keyPath, { type: core.NodeType.File }];
458
+ const fileUrl = section[core.NodeType.File];
459
+ const { content } = section;
460
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full flex-col justify-center gap-6 p-2", children: [
461
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-neutral text-sm", children: [
462
+ fileUrl,
463
+ " "
464
+ ] }),
465
+ /* @__PURE__ */ jsxRuntime.jsx(
466
+ TextEditorContainer,
467
+ {
468
+ section: content,
469
+ keyPath: childKeyPath,
470
+ ...props
471
+ }
472
+ )
423
473
  ] });
424
474
  };
425
475
  const NestedTextEditor = ({
426
476
  keyPath,
427
477
  dictionary,
478
+ renderSection,
428
479
  section,
429
480
  ...props
430
481
  }) => {
@@ -439,6 +490,7 @@ const NestedTextEditor = ({
439
490
  "aria-label": "Edit field",
440
491
  type: "text",
441
492
  variant: "default",
493
+ ...props,
442
494
  onContentChange: (newValue) => {
443
495
  addEditedContent(
444
496
  dictionary.key,
@@ -449,7 +501,6 @@ const NestedTextEditor = ({
449
501
  childrenKeyPath
450
502
  );
451
503
  },
452
- ...props,
453
504
  children: content.dictionaryKey ?? ""
454
505
  }
455
506
  ),
@@ -460,6 +511,7 @@ const NestedTextEditor = ({
460
511
  "aria-label": "Edit field",
461
512
  type: "text",
462
513
  variant: "default",
514
+ ...props,
463
515
  onContentChange: (newValue) => {
464
516
  addEditedContent(
465
517
  dictionary.key,
@@ -470,7 +522,6 @@ const NestedTextEditor = ({
470
522
  childrenKeyPath
471
523
  );
472
524
  },
473
- ...props,
474
525
  children: content.path ?? ""
475
526
  }
476
527
  )
@@ -480,6 +531,7 @@ const TextEditor = ({
480
531
  section,
481
532
  keyPath,
482
533
  dictionary,
534
+ renderSection,
483
535
  isDarkMode
484
536
  }) => {
485
537
  const { tsxNotEditable } = reactIntlayer.useDictionary(components_DictionaryFieldEditor_NavigationView_navigationViewNode_content.navigationViewContent);
@@ -495,6 +547,7 @@ const TextEditor = ({
495
547
  NestedTextEditor,
496
548
  {
497
549
  dictionary,
550
+ renderSection,
498
551
  keyPath,
499
552
  section
500
553
  }
@@ -505,6 +558,7 @@ const TextEditor = ({
505
558
  TranslationTextEditor,
506
559
  {
507
560
  dictionary,
561
+ renderSection,
508
562
  keyPath,
509
563
  section
510
564
  }
@@ -515,6 +569,7 @@ const TextEditor = ({
515
569
  EnumerationTextEditor,
516
570
  {
517
571
  dictionary,
572
+ renderSection,
518
573
  keyPath,
519
574
  section
520
575
  }
@@ -525,6 +580,18 @@ const TextEditor = ({
525
580
  ConditionTextEditor,
526
581
  {
527
582
  dictionary,
583
+ renderSection,
584
+ keyPath,
585
+ section
586
+ }
587
+ );
588
+ }
589
+ if (nodeType === core.NodeType.Insertion) {
590
+ return /* @__PURE__ */ jsxRuntime.jsx(
591
+ InsertionTextEditor,
592
+ {
593
+ dictionary,
594
+ renderSection,
528
595
  keyPath,
529
596
  section
530
597
  }
@@ -541,11 +608,23 @@ const TextEditor = ({
541
608
  }
542
609
  );
543
610
  }
611
+ if (nodeType === core.NodeType.File) {
612
+ return /* @__PURE__ */ jsxRuntime.jsx(
613
+ FileTextEditor,
614
+ {
615
+ dictionary,
616
+ renderSection,
617
+ keyPath,
618
+ section
619
+ }
620
+ );
621
+ }
544
622
  if (nodeType === core.NodeType.Array) {
545
623
  return /* @__PURE__ */ jsxRuntime.jsx(
546
624
  ArrayTextEditor,
547
625
  {
548
626
  dictionary,
627
+ renderSection,
549
628
  keyPath,
550
629
  section
551
630
  }
@@ -556,6 +635,7 @@ const TextEditor = ({
556
635
  ObjectTextEditor,
557
636
  {
558
637
  dictionary,
638
+ renderSection,
559
639
  keyPath,
560
640
  section
561
641
  }
@@ -574,7 +654,7 @@ const TextEditor = ({
574
654
  ) });
575
655
  }
576
656
  if (nodeType === core.NodeType.Text) {
577
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
657
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full p-2", children: typeof renderSection === "function" ? renderSection(section) : /* @__PURE__ */ jsxRuntime.jsx(
578
658
  ContentEditorTextArea,
579
659
  {
580
660
  variant: "default",