@strapi/content-manager 0.0.0-experimental.9df68962083938acba06546a7901c68a63266aec → 0.0.0-experimental.9f812af47f0e9db3d5531382c836c2ac0776afdf

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 (220) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -1
  3. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -1
  4. package/dist/_chunks/{ComponentConfigurationPage-C-49MccQ.js → ComponentConfigurationPage-BSEZcJVB.js} +5 -6
  5. package/dist/_chunks/{ComponentConfigurationPage-C-49MccQ.js.map → ComponentConfigurationPage-BSEZcJVB.js.map} +1 -1
  6. package/dist/_chunks/{ComponentConfigurationPage-DmwmiFQy.mjs → ComponentConfigurationPage-BiASGi7x.mjs} +4 -4
  7. package/dist/_chunks/{ComponentConfigurationPage-DmwmiFQy.mjs.map → ComponentConfigurationPage-BiASGi7x.mjs.map} +1 -1
  8. package/dist/_chunks/{ComponentIcon-BXdiCGQp.js → ComponentIcon-CRbtQEUV.js} +2 -3
  9. package/dist/_chunks/{ComponentIcon-BXdiCGQp.js.map → ComponentIcon-CRbtQEUV.js.map} +1 -1
  10. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -1
  11. package/dist/_chunks/{EditConfigurationPage-DjFJw56M.js → EditConfigurationPage-D2rtvneE.js} +5 -6
  12. package/dist/_chunks/{EditConfigurationPage-DjFJw56M.js.map → EditConfigurationPage-D2rtvneE.js.map} +1 -1
  13. package/dist/_chunks/{EditConfigurationPage-JT3E7NZy.mjs → EditConfigurationPage-vN4zupij.mjs} +4 -4
  14. package/dist/_chunks/{EditConfigurationPage-JT3E7NZy.mjs.map → EditConfigurationPage-vN4zupij.mjs.map} +1 -1
  15. package/dist/_chunks/{EditViewPage-zT3fBr4Y.js → EditViewPage-BwisF04Q.js} +63 -13
  16. package/dist/_chunks/EditViewPage-BwisF04Q.js.map +1 -0
  17. package/dist/_chunks/{EditViewPage-CPj61RMh.mjs → EditViewPage-_A31Cl4g.mjs} +63 -12
  18. package/dist/_chunks/EditViewPage-_A31Cl4g.mjs.map +1 -0
  19. package/dist/_chunks/{Field-dha5VnIQ.mjs → Field-CvIunNOj.mjs} +405 -256
  20. package/dist/_chunks/Field-CvIunNOj.mjs.map +1 -0
  21. package/dist/_chunks/{Field-Boxf9Ajp.js → Field-Dsu6-FrM.js} +409 -260
  22. package/dist/_chunks/Field-Dsu6-FrM.js.map +1 -0
  23. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +1 -1
  24. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +1 -1
  25. package/dist/_chunks/{Form-DHrru2AV.mjs → Form-DK0fG0Gj.mjs} +37 -18
  26. package/dist/_chunks/Form-DK0fG0Gj.mjs.map +1 -0
  27. package/dist/_chunks/{Form-y5g1SRsh.js → Form-DUwWcCmA.js} +39 -21
  28. package/dist/_chunks/Form-DUwWcCmA.js.map +1 -0
  29. package/dist/_chunks/{History-CqN6K7SX.js → History-CeCDhoJG.js} +81 -114
  30. package/dist/_chunks/History-CeCDhoJG.js.map +1 -0
  31. package/dist/_chunks/{History-Bru_KoeP.mjs → History-DP8gmXpm.mjs} +82 -114
  32. package/dist/_chunks/History-DP8gmXpm.mjs.map +1 -0
  33. package/dist/_chunks/{ListConfigurationPage-D8wGABj0.mjs → ListConfigurationPage-BCkO5iuN.mjs} +25 -12
  34. package/dist/_chunks/ListConfigurationPage-BCkO5iuN.mjs.map +1 -0
  35. package/dist/_chunks/{ListConfigurationPage-R_p-SbHZ.js → ListConfigurationPage-C-bAd44a.js} +25 -13
  36. package/dist/_chunks/ListConfigurationPage-C-bAd44a.js.map +1 -0
  37. package/dist/_chunks/{ListViewPage-pEw_zug9.js → ListViewPage-BKTZFhsM.js} +121 -81
  38. package/dist/_chunks/ListViewPage-BKTZFhsM.js.map +1 -0
  39. package/dist/_chunks/{ListViewPage-SID6TRb9.mjs → ListViewPage-Cf_DgaFV.mjs} +118 -77
  40. package/dist/_chunks/ListViewPage-Cf_DgaFV.mjs.map +1 -0
  41. package/dist/_chunks/{NoContentTypePage-C5dcQojD.js → NoContentTypePage-D3Cm3v3q.js} +2 -2
  42. package/dist/_chunks/{NoContentTypePage-C5dcQojD.js.map → NoContentTypePage-D3Cm3v3q.js.map} +1 -1
  43. package/dist/_chunks/{NoContentTypePage-CJ7UXwrQ.mjs → NoContentTypePage-nHIyvJcB.mjs} +2 -2
  44. package/dist/_chunks/{NoContentTypePage-CJ7UXwrQ.mjs.map → NoContentTypePage-nHIyvJcB.mjs.map} +1 -1
  45. package/dist/_chunks/{NoPermissionsPage-B7syEq5E.mjs → NoPermissionsPage-BALVSJ7x.mjs} +2 -2
  46. package/dist/_chunks/{NoPermissionsPage-B7syEq5E.mjs.map → NoPermissionsPage-BALVSJ7x.mjs.map} +1 -1
  47. package/dist/_chunks/{NoPermissionsPage-BtPrImPP.js → NoPermissionsPage-CChGWBj5.js} +2 -2
  48. package/dist/_chunks/{NoPermissionsPage-BtPrImPP.js.map → NoPermissionsPage-CChGWBj5.js.map} +1 -1
  49. package/dist/_chunks/Preview-C4NBzKUV.mjs +294 -0
  50. package/dist/_chunks/Preview-C4NBzKUV.mjs.map +1 -0
  51. package/dist/_chunks/Preview-CT28Ckpg.js +312 -0
  52. package/dist/_chunks/Preview-CT28Ckpg.js.map +1 -0
  53. package/dist/_chunks/{Relations-B9Crnhnn.mjs → Relations-C8uC89cT.mjs} +76 -42
  54. package/dist/_chunks/Relations-C8uC89cT.mjs.map +1 -0
  55. package/dist/_chunks/{Relations-DjTQ5kGB.js → Relations-CvkPCng_.js} +76 -43
  56. package/dist/_chunks/Relations-CvkPCng_.js.map +1 -0
  57. package/dist/_chunks/{en-fbKQxLGn.js → en-BK8Xyl5I.js} +32 -18
  58. package/dist/_chunks/{en-fbKQxLGn.js.map → en-BK8Xyl5I.js.map} +1 -1
  59. package/dist/_chunks/{en-Ux26r5pl.mjs → en-Dtk_ot79.mjs} +32 -18
  60. package/dist/_chunks/{en-Ux26r5pl.mjs.map → en-Dtk_ot79.mjs.map} +1 -1
  61. package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
  62. package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
  63. package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
  64. package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
  65. package/dist/_chunks/{fr-CD9VFbPM.mjs → fr--pg5jUbt.mjs} +13 -3
  66. package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
  67. package/dist/_chunks/{fr-B7kGGg3E.js → fr-B2Kyv8Z9.js} +13 -3
  68. package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-B2Kyv8Z9.js.map} +1 -1
  69. package/dist/_chunks/hooks-BAaaKPS_.js.map +1 -1
  70. package/dist/_chunks/{index-DVPWZkbS.js → index-CnX_j5h-.js} +1235 -746
  71. package/dist/_chunks/index-CnX_j5h-.js.map +1 -0
  72. package/dist/_chunks/{index-DJXJw9V5.mjs → index-Dh2aGTGJ.mjs} +1252 -763
  73. package/dist/_chunks/index-Dh2aGTGJ.mjs.map +1 -0
  74. package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
  75. package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
  76. package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
  77. package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
  78. package/dist/_chunks/{layout-Bau7ZfLV.mjs → layout-B5qsPihj.mjs} +26 -13
  79. package/dist/_chunks/layout-B5qsPihj.mjs.map +1 -0
  80. package/dist/_chunks/{layout-Dm6fbiQj.js → layout-B_qdWGny.js} +26 -14
  81. package/dist/_chunks/layout-B_qdWGny.js.map +1 -0
  82. package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
  83. package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
  84. package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
  85. package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
  86. package/dist/_chunks/{relations-CKnpRgrN.js → relations-ChcieiF5.js} +6 -7
  87. package/dist/_chunks/relations-ChcieiF5.js.map +1 -0
  88. package/dist/_chunks/{relations-BH_kBSJ0.mjs → relations-DMXpNY-e.mjs} +6 -7
  89. package/dist/_chunks/relations-DMXpNY-e.mjs.map +1 -0
  90. package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
  91. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  92. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  93. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  94. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js → useDragAndDrop-BMtgCYzL.js} +5 -9
  95. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js.map → useDragAndDrop-BMtgCYzL.js.map} +1 -1
  96. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
  97. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs.map → useDragAndDrop-DJ6jqvZN.mjs.map} +1 -1
  98. package/dist/admin/index.js +2 -1
  99. package/dist/admin/index.js.map +1 -1
  100. package/dist/admin/index.mjs +5 -4
  101. package/dist/admin/src/content-manager.d.ts +3 -2
  102. package/dist/admin/src/exports.d.ts +1 -1
  103. package/dist/admin/src/history/index.d.ts +3 -0
  104. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  105. package/dist/admin/src/hooks/useDocument.d.ts +32 -1
  106. package/dist/admin/src/index.d.ts +1 -0
  107. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  108. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +2 -1
  109. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
  110. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +7 -0
  111. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +49 -0
  112. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +1 -0
  113. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +20 -0
  114. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
  115. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  116. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +4 -48
  117. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  118. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  119. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  120. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  121. package/dist/admin/src/preview/index.d.ts +4 -0
  122. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  123. package/dist/admin/src/preview/routes.d.ts +3 -0
  124. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  125. package/dist/admin/src/router.d.ts +1 -1
  126. package/dist/admin/src/services/api.d.ts +1 -1
  127. package/dist/admin/src/services/components.d.ts +2 -2
  128. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  129. package/dist/admin/src/services/documents.d.ts +19 -20
  130. package/dist/admin/src/services/init.d.ts +1 -1
  131. package/dist/admin/src/services/relations.d.ts +2 -2
  132. package/dist/admin/src/services/uid.d.ts +3 -3
  133. package/dist/admin/src/utils/validation.d.ts +4 -1
  134. package/dist/server/index.js +686 -360
  135. package/dist/server/index.js.map +1 -1
  136. package/dist/server/index.mjs +687 -360
  137. package/dist/server/index.mjs.map +1 -1
  138. package/dist/server/src/bootstrap.d.ts.map +1 -1
  139. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  140. package/dist/server/src/controllers/index.d.ts.map +1 -1
  141. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  142. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  143. package/dist/server/src/controllers/utils/metadata.d.ts +16 -1
  144. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  145. package/dist/server/src/controllers/validation/dimensions.d.ts +4 -2
  146. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -1
  147. package/dist/server/src/history/services/history.d.ts.map +1 -1
  148. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  149. package/dist/server/src/history/services/utils.d.ts +4 -4
  150. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  151. package/dist/server/src/index.d.ts +7 -6
  152. package/dist/server/src/index.d.ts.map +1 -1
  153. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  154. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  155. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  156. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  157. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  158. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  159. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  160. package/dist/server/src/preview/index.d.ts +4 -0
  161. package/dist/server/src/preview/index.d.ts.map +1 -0
  162. package/dist/server/src/preview/routes/index.d.ts +8 -0
  163. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  164. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  165. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  166. package/dist/server/src/preview/services/index.d.ts +16 -0
  167. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  168. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  169. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  170. package/dist/server/src/preview/services/preview.d.ts +12 -0
  171. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  172. package/dist/server/src/preview/utils.d.ts +19 -0
  173. package/dist/server/src/preview/utils.d.ts.map +1 -0
  174. package/dist/server/src/register.d.ts.map +1 -1
  175. package/dist/server/src/routes/index.d.ts.map +1 -1
  176. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  177. package/dist/server/src/services/document-metadata.d.ts +12 -10
  178. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  179. package/dist/server/src/services/index.d.ts +7 -6
  180. package/dist/server/src/services/index.d.ts.map +1 -1
  181. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  182. package/dist/server/src/services/utils/populate.d.ts +2 -2
  183. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  184. package/dist/server/src/utils/index.d.ts +2 -0
  185. package/dist/server/src/utils/index.d.ts.map +1 -1
  186. package/dist/shared/contracts/collection-types.d.ts +3 -1
  187. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  188. package/dist/shared/contracts/index.d.ts +1 -0
  189. package/dist/shared/contracts/index.d.ts.map +1 -1
  190. package/dist/shared/contracts/preview.d.ts +27 -0
  191. package/dist/shared/contracts/preview.d.ts.map +1 -0
  192. package/dist/shared/index.js +4 -0
  193. package/dist/shared/index.js.map +1 -1
  194. package/dist/shared/index.mjs +4 -0
  195. package/dist/shared/index.mjs.map +1 -1
  196. package/package.json +17 -15
  197. package/dist/_chunks/EditViewPage-CPj61RMh.mjs.map +0 -1
  198. package/dist/_chunks/EditViewPage-zT3fBr4Y.js.map +0 -1
  199. package/dist/_chunks/Field-Boxf9Ajp.js.map +0 -1
  200. package/dist/_chunks/Field-dha5VnIQ.mjs.map +0 -1
  201. package/dist/_chunks/Form-DHrru2AV.mjs.map +0 -1
  202. package/dist/_chunks/Form-y5g1SRsh.js.map +0 -1
  203. package/dist/_chunks/History-Bru_KoeP.mjs.map +0 -1
  204. package/dist/_chunks/History-CqN6K7SX.js.map +0 -1
  205. package/dist/_chunks/ListConfigurationPage-D8wGABj0.mjs.map +0 -1
  206. package/dist/_chunks/ListConfigurationPage-R_p-SbHZ.js.map +0 -1
  207. package/dist/_chunks/ListViewPage-SID6TRb9.mjs.map +0 -1
  208. package/dist/_chunks/ListViewPage-pEw_zug9.js.map +0 -1
  209. package/dist/_chunks/Relations-B9Crnhnn.mjs.map +0 -1
  210. package/dist/_chunks/Relations-DjTQ5kGB.js.map +0 -1
  211. package/dist/_chunks/index-DJXJw9V5.mjs.map +0 -1
  212. package/dist/_chunks/index-DVPWZkbS.js.map +0 -1
  213. package/dist/_chunks/layout-Bau7ZfLV.mjs.map +0 -1
  214. package/dist/_chunks/layout-Dm6fbiQj.js.map +0 -1
  215. package/dist/_chunks/relations-BH_kBSJ0.mjs.map +0 -1
  216. package/dist/_chunks/relations-CKnpRgrN.js.map +0 -1
  217. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  218. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  219. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
  220. package/strapi-server.js +0 -3
@@ -5,19 +5,70 @@ const strapiAdmin = require("@strapi/admin/strapi-admin");
5
5
  const designSystem = require("@strapi/design-system");
6
6
  const pipe$1 = require("lodash/fp/pipe");
7
7
  const reactIntl = require("react-intl");
8
- const index = require("./index-DVPWZkbS.js");
8
+ const index = require("./index-CnX_j5h-.js");
9
9
  const fractionalIndexing = require("fractional-indexing");
10
- const Relations = require("./Relations-DjTQ5kGB.js");
10
+ const Relations = require("./Relations-CvkPCng_.js");
11
11
  const Icons = require("@strapi/icons");
12
12
  const styledComponents = require("styled-components");
13
- const ComponentIcon = require("./ComponentIcon-BXdiCGQp.js");
13
+ const ComponentIcon = require("./ComponentIcon-CRbtQEUV.js");
14
14
  const reactDndHtml5Backend = require("react-dnd-html5-backend");
15
- const useDragAndDrop = require("./useDragAndDrop-J0TUUbR6.js");
16
- const objects = require("./objects-gigeqt7s.js");
15
+ const useDragAndDrop = require("./useDragAndDrop-BMtgCYzL.js");
16
+ const objects = require("./objects-BcXOv6_9.js");
17
17
  const slate = require("slate");
18
18
  const slateHistory = require("slate-history");
19
19
  const slateReact = require("slate-react");
20
- const usePrev = require("./usePrev-B9w_-eYc.js");
20
+ const Prism = require("prismjs");
21
+ require("prismjs/themes/prism-solarizedlight.css");
22
+ require("prismjs/components/prism-asmatmel");
23
+ require("prismjs/components/prism-bash");
24
+ require("prismjs/components/prism-basic");
25
+ require("prismjs/components/prism-c");
26
+ require("prismjs/components/prism-clojure");
27
+ require("prismjs/components/prism-cobol");
28
+ require("prismjs/components/prism-cpp");
29
+ require("prismjs/components/prism-csharp");
30
+ require("prismjs/components/prism-dart");
31
+ require("prismjs/components/prism-docker");
32
+ require("prismjs/components/prism-elixir");
33
+ require("prismjs/components/prism-erlang");
34
+ require("prismjs/components/prism-fortran");
35
+ require("prismjs/components/prism-fsharp");
36
+ require("prismjs/components/prism-go");
37
+ require("prismjs/components/prism-graphql");
38
+ require("prismjs/components/prism-groovy");
39
+ require("prismjs/components/prism-haskell");
40
+ require("prismjs/components/prism-haxe");
41
+ require("prismjs/components/prism-ini");
42
+ require("prismjs/components/prism-java");
43
+ require("prismjs/components/prism-javascript");
44
+ require("prismjs/components/prism-jsx");
45
+ require("prismjs/components/prism-json");
46
+ require("prismjs/components/prism-julia");
47
+ require("prismjs/components/prism-kotlin");
48
+ require("prismjs/components/prism-latex");
49
+ require("prismjs/components/prism-lua");
50
+ require("prismjs/components/prism-markdown");
51
+ require("prismjs/components/prism-matlab");
52
+ require("prismjs/components/prism-makefile");
53
+ require("prismjs/components/prism-objectivec");
54
+ require("prismjs/components/prism-perl");
55
+ require("prismjs/components/prism-php");
56
+ require("prismjs/components/prism-powershell");
57
+ require("prismjs/components/prism-python");
58
+ require("prismjs/components/prism-r");
59
+ require("prismjs/components/prism-ruby");
60
+ require("prismjs/components/prism-rust");
61
+ require("prismjs/components/prism-sas");
62
+ require("prismjs/components/prism-scala");
63
+ require("prismjs/components/prism-scheme");
64
+ require("prismjs/components/prism-sql");
65
+ require("prismjs/components/prism-stata");
66
+ require("prismjs/components/prism-swift");
67
+ require("prismjs/components/prism-typescript");
68
+ require("prismjs/components/prism-tsx");
69
+ require("prismjs/components/prism-vbnet");
70
+ require("prismjs/components/prism-yaml");
71
+ const useDebounce = require("./useDebounce-CtcjDB3L.js");
21
72
  const Toolbar = require("@radix-ui/react-toolbar");
22
73
  const reactRouterDom = require("react-router-dom");
23
74
  const CodeMirror = require("codemirror5");
@@ -37,8 +88,7 @@ require("highlight.js/styles/solarized-dark.css");
37
88
  require("codemirror5/addon/display/placeholder");
38
89
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
39
90
  function _interopNamespace(e) {
40
- if (e && e.__esModule)
41
- return e;
91
+ if (e && e.__esModule) return e;
42
92
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
43
93
  if (e) {
44
94
  for (const k in e) {
@@ -56,6 +106,7 @@ function _interopNamespace(e) {
56
106
  }
57
107
  const React__namespace = /* @__PURE__ */ _interopNamespace(React);
58
108
  const pipe__default = /* @__PURE__ */ _interopDefault(pipe$1);
109
+ const Prism__namespace = /* @__PURE__ */ _interopNamespace(Prism);
59
110
  const Toolbar__namespace = /* @__PURE__ */ _interopNamespace(Toolbar);
60
111
  const CodeMirror__default = /* @__PURE__ */ _interopDefault(CodeMirror);
61
112
  const sanitizeHtml__default = /* @__PURE__ */ _interopDefault(sanitizeHtml);
@@ -197,7 +248,8 @@ const useLazyComponents = (componentUids = []) => {
197
248
  const codeLanguages = [
198
249
  {
199
250
  value: "asm",
200
- label: "Assembly"
251
+ label: "Assembly",
252
+ decorate: "asmatmel"
201
253
  },
202
254
  {
203
255
  value: "bash",
@@ -233,7 +285,8 @@ const codeLanguages = [
233
285
  },
234
286
  {
235
287
  value: "dockerfile",
236
- label: "Dockerfile"
288
+ label: "Dockerfile",
289
+ decorate: "docker"
237
290
  },
238
291
  {
239
292
  value: "elixir",
@@ -389,7 +442,8 @@ const codeLanguages = [
389
442
  },
390
443
  {
391
444
  value: "typescript",
392
- label: "TypeScript"
445
+ label: "TypeScript",
446
+ decorate: "ts"
393
447
  },
394
448
  {
395
449
  value: "tsx",
@@ -405,7 +459,8 @@ const codeLanguages = [
405
459
  },
406
460
  {
407
461
  value: "yaml",
408
- label: "YAML"
462
+ label: "YAML",
463
+ decorate: "yml"
409
464
  }
410
465
  ];
411
466
  const baseHandleConvert = (editor, attributesToSet) => {
@@ -471,6 +526,29 @@ const pressEnterTwiceToExit = (editor) => {
471
526
  });
472
527
  }
473
528
  };
529
+ const decorateCode = ([node, path]) => {
530
+ const ranges = [];
531
+ if (!slate.Element.isElement(node) || node.type !== "code") return ranges;
532
+ const text = slate.Node.string(node);
533
+ const language = codeLanguages.find((lang) => lang.value === node.language);
534
+ const decorateKey = language?.decorate ?? language?.value;
535
+ const selectedLanguage = Prism__namespace.languages[decorateKey || "plaintext"];
536
+ const tokens = Prism__namespace.tokenize(text, selectedLanguage);
537
+ let start = 0;
538
+ for (const token of tokens) {
539
+ const length = token.length;
540
+ const end = start + length;
541
+ if (typeof token !== "string") {
542
+ ranges.push({
543
+ anchor: { path, offset: start },
544
+ focus: { path, offset: end },
545
+ className: `token ${token.type}`
546
+ });
547
+ }
548
+ start = end;
549
+ }
550
+ return ranges;
551
+ };
474
552
  const CodeBlock = styledComponents.styled.pre`
475
553
  border-radius: ${({ theme }) => theme.borderRadius};
476
554
  background-color: ${({ theme }) => theme.colors.neutral100};
@@ -542,7 +620,7 @@ const CodeEditor = (props) => {
542
620
  const codeBlocks = {
543
621
  code: {
544
622
  renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(CodeEditor, { ...props }),
545
- icon: Icons.Code,
623
+ icon: Icons.CodeBlock,
546
624
  label: {
547
625
  id: "components.Blocks.blocks.code",
548
626
  defaultMessage: "Code block"
@@ -555,8 +633,7 @@ const codeBlocks = {
555
633
  handleEnterKey(editor) {
556
634
  pressEnterTwiceToExit(editor);
557
635
  },
558
- snippets: ["```"],
559
- dragHandleTopMargin: "10px"
636
+ snippets: ["```"]
560
637
  }
561
638
  };
562
639
  const H1 = styledComponents.styled(designSystem.Typography).attrs({ tag: "h1" })`
@@ -731,8 +808,7 @@ const ImageDialog = () => {
731
808
  const [isOpen, setIsOpen] = React__namespace.useState(true);
732
809
  const { editor } = useBlocksEditorContext("ImageDialog");
733
810
  const components = strapiAdmin.useStrapiApp("ImageDialog", (state) => state.components);
734
- if (!components || !isOpen)
735
- return null;
811
+ if (!components || !isOpen) return null;
736
812
  const MediaLibraryDialog = components["media-library"];
737
813
  const insertImages = (images) => {
738
814
  slate.Transforms.unwrapNodes(editor, {
@@ -741,14 +817,12 @@ const ImageDialog = () => {
741
817
  });
742
818
  const nodeEntryBeingReplaced = slate.Editor.above(editor, {
743
819
  match(node) {
744
- if (slate.Editor.isEditor(node))
745
- return false;
820
+ if (slate.Editor.isEditor(node)) return false;
746
821
  const isInlineNode = ["text", "link"].includes(node.type);
747
822
  return !isInlineNode;
748
823
  }
749
824
  });
750
- if (!nodeEntryBeingReplaced)
751
- return;
825
+ if (!nodeEntryBeingReplaced) return;
752
826
  const [, pathToInsert] = nodeEntryBeingReplaced;
753
827
  slate.Transforms.removeNodes(editor);
754
828
  const nodesToInsert = images.map((image) => {
@@ -768,7 +842,7 @@ const ImageDialog = () => {
768
842
  const nodeImage = {
769
843
  ...expectedImage,
770
844
  alternativeText: expectedImage.alternativeText || expectedImage.name,
771
- url: usePrev.prefixFileUrlWithBackendUrl(image.url)
845
+ url: useDebounce.prefixFileUrlWithBackendUrl(image.url)
772
846
  };
773
847
  return nodeImage;
774
848
  });
@@ -894,20 +968,8 @@ const LinkContent = React__namespace.forwardRef(
894
968
  const [linkText, setLinkText] = React__namespace.useState(elementText);
895
969
  const [linkUrl, setLinkUrl] = React__namespace.useState(link.url);
896
970
  const linkInputRef = React__namespace.useRef(null);
897
- const [showRemoveButton, setShowRemoveButton] = React__namespace.useState(false);
971
+ const isLastInsertedLink = editor.lastInsertedLinkPath ? !slate.Path.equals(path, editor.lastInsertedLinkPath) : true;
898
972
  const [isSaveDisabled, setIsSaveDisabled] = React__namespace.useState(false);
899
- const handleOpenChange = (isOpen) => {
900
- if (isOpen) {
901
- setPopoverOpen(isOpen);
902
- setShowRemoveButton(isOpen);
903
- } else {
904
- setPopoverOpen(isOpen);
905
- if (link.url === "") {
906
- removeLink(editor);
907
- }
908
- slateReact.ReactEditor.focus(editor);
909
- }
910
- };
911
973
  const onLinkChange = (e) => {
912
974
  setIsSaveDisabled(false);
913
975
  setLinkUrl(e.target.value);
@@ -928,15 +990,32 @@ const LinkContent = React__namespace.forwardRef(
928
990
  editLink(editor, { url: linkUrl, text: linkText });
929
991
  setPopoverOpen(false);
930
992
  editor.lastInsertedLinkPath = null;
993
+ slateReact.ReactEditor.focus(editor);
994
+ };
995
+ const handleClose = () => {
996
+ if (link.url === "") {
997
+ removeLink(editor);
998
+ }
999
+ setPopoverOpen(false);
1000
+ slateReact.ReactEditor.focus(editor);
931
1001
  };
932
1002
  React__namespace.useEffect(() => {
933
- if (popoverOpen)
934
- linkInputRef.current?.focus();
1003
+ if (popoverOpen) linkInputRef.current?.focus();
935
1004
  }, [popoverOpen]);
936
1005
  const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
937
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { onOpenChange: handleOpenChange, open: popoverOpen, children: [
938
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(StyledBaseLink, { ...attributes, ref: forwardedRef, href: link.url, color: "primary600", children }) }),
939
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 4, tag: "form", onSubmit: handleSave, direction: "column", gap: 4, children: [
1006
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { open: popoverOpen, children: [
1007
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
1008
+ StyledBaseLink,
1009
+ {
1010
+ ...attributes,
1011
+ ref: forwardedRef,
1012
+ href: link.url,
1013
+ onClick: () => setPopoverOpen(true),
1014
+ color: "primary600",
1015
+ children
1016
+ }
1017
+ ) }),
1018
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { onPointerDownOutside: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 4, direction: "column", gap: 4, children: [
940
1019
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { width: "368px", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "stretch", children: [
941
1020
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
942
1021
  id: "components.Blocks.popover.text",
@@ -982,7 +1061,7 @@ const LinkContent = React__namespace.forwardRef(
982
1061
  {
983
1062
  variant: "danger-light",
984
1063
  onClick: () => removeLink(editor),
985
- $visible: showRemoveButton,
1064
+ $visible: isLastInsertedLink,
986
1065
  children: formatMessage({
987
1066
  id: "components.Blocks.popover.remove",
988
1067
  defaultMessage: "Remove"
@@ -990,12 +1069,12 @@ const LinkContent = React__namespace.forwardRef(
990
1069
  }
991
1070
  ),
992
1071
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
993
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick: () => handleOpenChange(false), children: formatMessage({
994
- id: "components.Blocks.popover.cancel",
1072
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick: handleClose, children: formatMessage({
1073
+ id: "global.cancel",
995
1074
  defaultMessage: "Cancel"
996
1075
  }) }),
997
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { type: "submit", disabled: Boolean(inputNotDirty) || isSaveDisabled, children: formatMessage({
998
- id: "components.Blocks.popover.save",
1076
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { disabled: Boolean(inputNotDirty) || isSaveDisabled, onClick: handleSave, children: formatMessage({
1077
+ id: "global.save",
999
1078
  defaultMessage: "Save"
1000
1079
  }) })
1001
1080
  ] })
@@ -1076,8 +1155,7 @@ const isText$1 = (node) => {
1076
1155
  return slate.Node.isNode(node) && !slate.Editor.isEditor(node) && node.type === "text";
1077
1156
  };
1078
1157
  const handleBackspaceKeyOnList = (editor, event) => {
1079
- if (!editor.selection)
1080
- return;
1158
+ if (!editor.selection) return;
1081
1159
  const [currentListItem, currentListItemPath] = slate.Editor.parent(editor, editor.selection.anchor);
1082
1160
  const [currentList, currentListPath] = slate.Editor.parent(editor, currentListItemPath);
1083
1161
  const isListEmpty = currentList.children.length === 1 && isText$1(currentListItem.children[0]) && currentListItem.children[0].text === "";
@@ -1186,8 +1264,7 @@ const handleEnterKeyOnList = (editor) => {
1186
1264
  };
1187
1265
  const handleConvertToList = (editor, format) => {
1188
1266
  const convertedPath = baseHandleConvert(editor, { type: "list-item" });
1189
- if (!convertedPath)
1190
- return;
1267
+ if (!convertedPath) return;
1191
1268
  slate.Transforms.wrapNodes(editor, { type: "list", format, children: [] }, { at: convertedPath });
1192
1269
  };
1193
1270
  const handleTabOnList = (editor) => {
@@ -1199,8 +1276,7 @@ const handleTabOnList = (editor) => {
1199
1276
  }
1200
1277
  const [currentListItem, currentListItemPath] = currentListItemEntry;
1201
1278
  const [currentList] = slate.Editor.parent(editor, currentListItemPath);
1202
- if (currentListItem === currentList.children[0])
1203
- return;
1279
+ if (currentListItem === currentList.children[0]) return;
1204
1280
  const currentListItemIndex = currentList.children.findIndex((item) => item === currentListItem);
1205
1281
  const previousNode = currentList.children[currentListItemIndex - 1];
1206
1282
  if (previousNode.type === "list") {
@@ -1336,13 +1412,13 @@ const quoteBlocks = {
1336
1412
  handleEnterKey(editor) {
1337
1413
  pressEnterTwiceToExit(editor);
1338
1414
  },
1339
- snippets: [">"],
1340
- dragHandleTopMargin: "6px"
1415
+ snippets: [">"]
1341
1416
  }
1342
1417
  };
1343
1418
  const ToolbarWrapper = styledComponents.styled(designSystem.Flex)`
1344
1419
  &[aria-disabled='true'] {
1345
1420
  cursor: not-allowed;
1421
+ background: ${({ theme }) => theme.colors.neutral150};
1346
1422
  }
1347
1423
  `;
1348
1424
  const Separator = styledComponents.styled(Toolbar__namespace.Separator)`
@@ -1353,7 +1429,7 @@ const Separator = styledComponents.styled(Toolbar__namespace.Separator)`
1353
1429
  const FlexButton = styledComponents.styled(designSystem.Flex)`
1354
1430
  // Inherit the not-allowed cursor from ToolbarWrapper when disabled
1355
1431
  &[aria-disabled] {
1356
- cursor: inherit;
1432
+ cursor: not-allowed;
1357
1433
  }
1358
1434
 
1359
1435
  &[aria-disabled='false'] {
@@ -1435,7 +1511,7 @@ const ToolbarButton = ({
1435
1511
  width: 7,
1436
1512
  height: 7,
1437
1513
  hasRadius: true,
1438
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { width: "1.2rem", height: "1.2rem", fill: disabled ? "neutral300" : enabledColor })
1514
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { fill: disabled ? "neutral300" : enabledColor })
1439
1515
  }
1440
1516
  )
1441
1517
  }
@@ -1567,8 +1643,7 @@ const isListNode = (node) => {
1567
1643
  const ListButton = ({ block, format }) => {
1568
1644
  const { editor, disabled, blocks } = useBlocksEditorContext("ListButton");
1569
1645
  const isListActive = () => {
1570
- if (!editor.selection)
1571
- return false;
1646
+ if (!editor.selection) return false;
1572
1647
  const currentListEntry = slate.Editor.above(editor, {
1573
1648
  match: (node) => !slate.Editor.isEditor(node) && node.type === "list",
1574
1649
  at: editor.selection.anchor
@@ -1580,6 +1655,26 @@ const ListButton = ({ block, format }) => {
1580
1655
  }
1581
1656
  return false;
1582
1657
  };
1658
+ const isListDisabled = () => {
1659
+ if (disabled) {
1660
+ return true;
1661
+ }
1662
+ if (!editor.selection) {
1663
+ return false;
1664
+ }
1665
+ const anchorNodeEntry = slate.Editor.above(editor, {
1666
+ at: editor.selection.anchor,
1667
+ match: (node) => !slate.Editor.isEditor(node) && node.type !== "text"
1668
+ });
1669
+ const focusNodeEntry = slate.Editor.above(editor, {
1670
+ at: editor.selection.focus,
1671
+ match: (node) => !slate.Editor.isEditor(node) && node.type !== "text"
1672
+ });
1673
+ if (!anchorNodeEntry || !focusNodeEntry) {
1674
+ return false;
1675
+ }
1676
+ return anchorNodeEntry[0] !== focusNodeEntry[0];
1677
+ };
1583
1678
  const toggleList = (format2) => {
1584
1679
  let currentListEntry;
1585
1680
  if (editor.selection) {
@@ -1613,7 +1708,7 @@ const ListButton = ({ block, format }) => {
1613
1708
  name: format,
1614
1709
  label: block.label,
1615
1710
  isActive: isListActive(),
1616
- disabled,
1711
+ disabled: isListDisabled(),
1617
1712
  handleClick: () => toggleList(format)
1618
1713
  }
1619
1714
  );
@@ -1622,8 +1717,7 @@ const LinkButton = ({ disabled }) => {
1622
1717
  const { editor } = useBlocksEditorContext("LinkButton");
1623
1718
  const isLinkActive = () => {
1624
1719
  const { selection } = editor;
1625
- if (!selection)
1626
- return false;
1720
+ if (!selection) return false;
1627
1721
  const [match] = Array.from(
1628
1722
  slate.Editor.nodes(editor, {
1629
1723
  at: slate.Editor.unhangRange(editor, selection),
@@ -1687,7 +1781,7 @@ const BlocksToolbar = () => {
1687
1781
  return false;
1688
1782
  };
1689
1783
  const isButtonDisabled = checkButtonDisabled();
1690
- return /* @__PURE__ */ jsxRuntime.jsx(Toolbar__namespace.Root, { "aria-disabled": disabled, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarWrapper, { gap: 2, padding: 2, children: [
1784
+ return /* @__PURE__ */ jsxRuntime.jsx(Toolbar__namespace.Root, { "aria-disabled": disabled, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarWrapper, { gap: 2, padding: 2, width: "100%", children: [
1691
1785
  /* @__PURE__ */ jsxRuntime.jsx(BlocksDropdown, {}),
1692
1786
  /* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
1693
1787
  /* @__PURE__ */ jsxRuntime.jsx(Toolbar__namespace.ToggleGroup, { type: "multiple", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 1, children: [
@@ -1757,33 +1851,36 @@ const DragItem = styledComponents.styled(designSystem.Flex)`
1757
1851
  }
1758
1852
  `;
1759
1853
  const DragIconButton = styledComponents.styled(designSystem.IconButton)`
1854
+ user-select: none;
1760
1855
  display: flex;
1761
1856
  align-items: center;
1762
1857
  justify-content: center;
1858
+ border: none;
1763
1859
  border-radius: ${({ theme }) => theme.borderRadius};
1764
- width: ${({ theme }) => theme.spaces[4]};
1765
- height: ${({ theme }) => theme.spaces[6]};
1860
+ padding-left: ${({ theme }) => theme.spaces[0]};
1861
+ padding-right: ${({ theme }) => theme.spaces[0]};
1862
+ padding-top: ${({ theme }) => theme.spaces[1]};
1863
+ padding-bottom: ${({ theme }) => theme.spaces[1]};
1766
1864
  visibility: hidden;
1767
1865
  cursor: grab;
1768
1866
  opacity: inherit;
1769
1867
  margin-top: ${(props) => props.$dragHandleTopMargin ?? 0};
1770
1868
 
1771
1869
  &:hover {
1772
- background: ${({ theme }) => theme.colors.neutral200};
1870
+ background: ${({ theme }) => theme.colors.neutral100};
1773
1871
  }
1774
1872
  &:active {
1775
1873
  cursor: grabbing;
1874
+ background: ${({ theme }) => theme.colors.neutral150};
1776
1875
  }
1777
1876
  &[aria-disabled='true'] {
1778
- cursor: not-allowed;
1779
- background: transparent;
1877
+ visibility: hidden;
1780
1878
  }
1781
1879
  svg {
1782
- height: auto;
1783
- width: ${({ theme }) => theme.spaces[3]};
1880
+ min-width: ${({ theme }) => theme.spaces[3]};
1784
1881
 
1785
1882
  path {
1786
- fill: ${({ theme }) => theme.colors.neutral700};
1883
+ fill: ${({ theme }) => theme.colors.neutral500};
1787
1884
  }
1788
1885
  }
1789
1886
  `;
@@ -1828,8 +1925,7 @@ const DragAndDropElement = ({
1828
1925
  displayedValue: children
1829
1926
  },
1830
1927
  onDropItem(currentIndex, newIndex) {
1831
- if (newIndex)
1832
- handleMoveBlock(newIndex, currentIndex);
1928
+ if (newIndex) handleMoveBlock(newIndex, currentIndex);
1833
1929
  }
1834
1930
  });
1835
1931
  const composedBoxRefs = designSystem.useComposedRefs(blockRef, dropRef);
@@ -1885,6 +1981,7 @@ const DragAndDropElement = ({
1885
1981
  DragIconButton,
1886
1982
  {
1887
1983
  tag: "div",
1984
+ contentEditable: false,
1888
1985
  role: "button",
1889
1986
  tabIndex: 0,
1890
1987
  withTooltip: false,
@@ -1897,7 +1994,7 @@ const DragAndDropElement = ({
1897
1994
  disabled,
1898
1995
  draggable: true,
1899
1996
  $dragHandleTopMargin: dragHandleTopMargin,
1900
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "neutral600" })
1997
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "primary500" })
1901
1998
  }
1902
1999
  ),
1903
2000
  children
@@ -1934,7 +2031,7 @@ const baseRenderLeaf = (props, modifiers2) => {
1934
2031
  }
1935
2032
  return currentChildren;
1936
2033
  }, props.children);
1937
- return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props.attributes, children: wrappedChildren });
2034
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props.attributes, className: props.leaf.className, children: wrappedChildren });
1938
2035
  };
1939
2036
  const baseRenderElement = ({
1940
2037
  props,
@@ -1972,8 +2069,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
1972
2069
  [modifiers2]
1973
2070
  );
1974
2071
  const handleMoveBlocks = (editor2, event) => {
1975
- if (!editor2.selection)
1976
- return;
2072
+ if (!editor2.selection) return;
1977
2073
  const start = slate.Range.start(editor2.selection);
1978
2074
  const currentIndex = [start.path[0]];
1979
2075
  let newIndexPosition = 0;
@@ -2110,8 +2206,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
2110
2206
  }
2111
2207
  };
2112
2208
  const handleScrollSelectionIntoView = () => {
2113
- if (!editor.selection)
2114
- return;
2209
+ if (!editor.selection) return;
2115
2210
  const domRange = slateReact.ReactEditor.toDOMRange(editor, editor.selection);
2116
2211
  const domRect = domRange.getBoundingClientRect();
2117
2212
  const blocksInput = blocksRef.current;
@@ -2138,7 +2233,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
2138
2233
  background: "neutral0",
2139
2234
  color: "neutral800",
2140
2235
  lineHeight: 6,
2141
- paddingRight: 4,
2236
+ paddingRight: 7,
2142
2237
  paddingTop: 6,
2143
2238
  paddingBottom: 3,
2144
2239
  children: [
@@ -2149,6 +2244,7 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
2149
2244
  readOnly: disabled,
2150
2245
  placeholder,
2151
2246
  isExpandedMode,
2247
+ decorate: decorateCode,
2152
2248
  renderElement,
2153
2249
  renderLeaf,
2154
2250
  onKeyDown: handleKeyDown,
@@ -2221,7 +2317,7 @@ const EditorLayout$1 = ({
2221
2317
  /* @__PURE__ */ jsxRuntime.jsx(
2222
2318
  CollapseIconButton,
2223
2319
  {
2224
- "aria-label": formatMessage({
2320
+ label: formatMessage({
2225
2321
  id: index.getTranslation("components.Blocks.collapse"),
2226
2322
  defaultMessage: "Collapse"
2227
2323
  }),
@@ -2305,8 +2401,7 @@ const InlineCode = styledComponents.styled.code`
2305
2401
  `;
2306
2402
  const baseCheckIsActive = (editor, name2) => {
2307
2403
  const marks = slate.Editor.marks(editor);
2308
- if (!marks)
2309
- return false;
2404
+ if (!marks) return false;
2310
2405
  return Boolean(marks[name2]);
2311
2406
  };
2312
2407
  const baseHandleToggle = (editor, name2) => {
@@ -2472,6 +2567,7 @@ const ExpandIconButton = styledComponents.styled(designSystem.IconButton)`
2472
2567
  position: absolute;
2473
2568
  bottom: 1.2rem;
2474
2569
  right: 1.2rem;
2570
+ box-shadow: ${({ theme }) => theme.shadows.filterShadow};
2475
2571
  `;
2476
2572
  function useResetKey(value) {
2477
2573
  const slateUpdatesCount = React__namespace.useRef(0);
@@ -2560,7 +2656,7 @@ const BlocksEditor = React__namespace.forwardRef(
2560
2656
  !isExpandedMode && /* @__PURE__ */ jsxRuntime.jsx(
2561
2657
  ExpandIconButton,
2562
2658
  {
2563
- "aria-label": formatMessage({
2659
+ label: formatMessage({
2564
2660
  id: index.getTranslation("components.Blocks.expand"),
2565
2661
  defaultMessage: "Expand"
2566
2662
  }),
@@ -2626,47 +2722,44 @@ const createDefaultForm = (contentType, components = {}) => {
2626
2722
  const Initializer = ({ disabled, name: name2, onClick }) => {
2627
2723
  const { formatMessage } = reactIntl.useIntl();
2628
2724
  const field = strapiAdmin.useField(name2);
2629
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2630
- /* @__PURE__ */ jsxRuntime.jsx(
2631
- designSystem.Box,
2632
- {
2633
- tag: "button",
2634
- background: "neutral100",
2635
- borderColor: field.error ? "danger600" : "neutral200",
2636
- hasRadius: true,
2637
- disabled,
2638
- onClick,
2639
- paddingTop: 9,
2640
- paddingBottom: 9,
2641
- type: "button",
2642
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
2643
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, {}) }),
2644
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
2645
- id: index.getTranslation("components.empty-repeatable"),
2646
- defaultMessage: "No entry yet. Click on the button below to add one."
2647
- }) }) })
2648
- ] })
2649
- }
2650
- ),
2651
- field.error && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "danger600", variant: "pi", children: field.error })
2652
- ] });
2725
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
2726
+ designSystem.Box,
2727
+ {
2728
+ tag: "button",
2729
+ background: disabled ? "neutral150" : "neutral100",
2730
+ borderColor: field.error ? "danger600" : "neutral200",
2731
+ hasRadius: true,
2732
+ disabled,
2733
+ onClick,
2734
+ paddingTop: 9,
2735
+ paddingBottom: 9,
2736
+ type: "button",
2737
+ style: { cursor: disabled ? "not-allowed" : "pointer" },
2738
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
2739
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", color: disabled ? "neutral500" : "primary600", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.PlusCircle, { width: "3.2rem", height: "3.2rem" }) }),
2740
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
2741
+ designSystem.Typography,
2742
+ {
2743
+ textColor: disabled ? "neutral600" : "primary600",
2744
+ variant: "pi",
2745
+ fontWeight: "bold",
2746
+ children: formatMessage({
2747
+ id: index.getTranslation("components.empty-repeatable"),
2748
+ defaultMessage: "No entry yet. Click to add one."
2749
+ })
2750
+ }
2751
+ ) })
2752
+ ] })
2753
+ }
2754
+ ) });
2653
2755
  };
2654
- const CircleIcon = styledComponents.styled(Icons.PlusCircle)`
2655
- width: 2.4rem;
2656
- height: 2.4rem;
2657
- > circle {
2658
- fill: ${({ theme }) => theme.colors.primary200};
2659
- }
2660
- > path {
2661
- fill: ${({ theme }) => theme.colors.primary600};
2662
- }
2663
- `;
2664
2756
  const NonRepeatableComponent = ({
2665
2757
  attribute,
2666
2758
  name: name2,
2667
2759
  children,
2668
2760
  layout
2669
2761
  }) => {
2762
+ const { formatMessage } = reactIntl.useIntl();
2670
2763
  const { value } = strapiAdmin.useField(name2);
2671
2764
  const level = Relations.useComponent("NonRepeatableComponent", (state) => state.level);
2672
2765
  const isNested = level > 0;
@@ -2683,7 +2776,22 @@ const NonRepeatableComponent = ({
2683
2776
  children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index2) => {
2684
2777
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2685
2778
  const completeFieldName = `${name2}.${field.name}`;
2686
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, s: 12, xs: 12, children: children({ ...field, name: completeFieldName }) }, completeFieldName);
2779
+ const translatedLabel = formatMessage({
2780
+ id: `content-manager.components.${attribute.component}.${field.name}`,
2781
+ defaultMessage: field.label
2782
+ });
2783
+ return /* @__PURE__ */ jsxRuntime.jsx(
2784
+ designSystem.Grid.Item,
2785
+ {
2786
+ col: size,
2787
+ s: 12,
2788
+ xs: 12,
2789
+ direction: "column",
2790
+ alignItems: "stretch",
2791
+ children: children({ ...field, label: translatedLabel, name: completeFieldName })
2792
+ },
2793
+ completeFieldName
2794
+ );
2687
2795
  }) }, index2);
2688
2796
  }) })
2689
2797
  }
@@ -2702,13 +2810,34 @@ const RepeatableComponent = ({
2702
2810
  const { search: searchString } = reactRouterDom.useLocation();
2703
2811
  const search = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
2704
2812
  const { components } = index.useDoc();
2705
- const { value = [], error } = strapiAdmin.useField(name2);
2813
+ const {
2814
+ value = [],
2815
+ error,
2816
+ rawError
2817
+ } = strapiAdmin.useField(name2);
2706
2818
  const addFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.addFieldRow);
2707
2819
  const moveFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.moveFieldRow);
2708
2820
  const removeFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.removeFieldRow);
2709
2821
  const { max = Infinity } = attribute;
2710
2822
  const [collapseToOpen, setCollapseToOpen] = React__namespace.useState("");
2711
2823
  const [liveText, setLiveText] = React__namespace.useState("");
2824
+ React__namespace.useEffect(() => {
2825
+ const hasNestedErrors = rawError && Array.isArray(rawError) && rawError.length > 0;
2826
+ const hasNestedValue = value && Array.isArray(value) && value.length > 0;
2827
+ if (hasNestedErrors && hasNestedValue) {
2828
+ const errorOpenItems = rawError.map((_, idx) => {
2829
+ return value[idx] ? value[idx].__temp_key__ : null;
2830
+ }).filter((value2) => !!value2);
2831
+ if (errorOpenItems && errorOpenItems.length > 0) {
2832
+ setCollapseToOpen((collapseToOpen2) => {
2833
+ if (!errorOpenItems.includes(collapseToOpen2)) {
2834
+ return errorOpenItems[0];
2835
+ }
2836
+ return collapseToOpen2;
2837
+ });
2838
+ }
2839
+ }
2840
+ }, [rawError, value]);
2712
2841
  const componentTmpKeyWithFocussedField = React__namespace.useMemo(() => {
2713
2842
  if (search.has("field")) {
2714
2843
  const fieldParam = search.get("field");
@@ -2723,7 +2852,7 @@ const RepeatableComponent = ({
2723
2852
  }
2724
2853
  return void 0;
2725
2854
  }, [search, name2, value]);
2726
- const prevValue = usePrev.usePrev(value);
2855
+ const prevValue = useDebounce.usePrev(value);
2727
2856
  React__namespace.useEffect(() => {
2728
2857
  if (prevValue && prevValue.length < value.length) {
2729
2858
  setCollapseToOpen(value[value.length - 1].__temp_key__);
@@ -2861,7 +2990,26 @@ const RepeatableComponent = ({
2861
2990
  children: layout.map((row, index22) => {
2862
2991
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2863
2992
  const completeFieldName = `${nameWithIndex}.${field.name}`;
2864
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, s: 12, xs: 12, children: children({ ...field, name: completeFieldName }) }, completeFieldName);
2993
+ const translatedLabel = formatMessage({
2994
+ id: `content-manager.components.${attribute.component}.${field.name}`,
2995
+ defaultMessage: field.label
2996
+ });
2997
+ return /* @__PURE__ */ jsxRuntime.jsx(
2998
+ designSystem.Grid.Item,
2999
+ {
3000
+ col: size,
3001
+ s: 12,
3002
+ xs: 12,
3003
+ direction: "column",
3004
+ alignItems: "stretch",
3005
+ children: children({
3006
+ ...field,
3007
+ label: translatedLabel,
3008
+ name: completeFieldName
3009
+ })
3010
+ },
3011
+ completeFieldName
3012
+ );
2865
3013
  }) }, index22);
2866
3014
  })
2867
3015
  }
@@ -2956,7 +3104,7 @@ const Component = ({
2956
3104
  /* @__PURE__ */ jsxRuntime.jsx(
2957
3105
  designSystem.IconButton,
2958
3106
  {
2959
- borderWidth: 0,
3107
+ variant: "ghost",
2960
3108
  onClick: onDeleteComponent,
2961
3109
  label: formatMessage({
2962
3110
  id: index.getTranslation("containers.Edit.delete"),
@@ -2969,7 +3117,7 @@ const Component = ({
2969
3117
  designSystem.IconButton,
2970
3118
  {
2971
3119
  ref: composedAccordionRefs,
2972
- borderWidth: 0,
3120
+ variant: "ghost",
2973
3121
  onClick: (e) => e.stopPropagation(),
2974
3122
  "data-handler-id": handlerId,
2975
3123
  label: formatMessage({
@@ -3039,7 +3187,7 @@ const ComponentInput = ({
3039
3187
  id: index.getTranslation("components.reset-entry"),
3040
3188
  defaultMessage: "Reset Entry"
3041
3189
  }),
3042
- borderWidth: 0,
3190
+ variant: "ghost",
3043
3191
  onClick: () => {
3044
3192
  field.onChange(name2, null);
3045
3193
  },
@@ -3068,19 +3216,16 @@ const AddComponentButton = ({
3068
3216
  onClick,
3069
3217
  disabled: isDisabled,
3070
3218
  background: "neutral0",
3071
- paddingTop: 3,
3072
- paddingBottom: 3,
3073
- paddingLeft: 4,
3074
- paddingRight: 4,
3075
3219
  style: { cursor: isDisabled ? "not-allowed" : "pointer" },
3220
+ variant: "tertiary",
3076
3221
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "span", gap: 2, children: [
3077
3222
  /* @__PURE__ */ jsxRuntime.jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
3078
3223
  /* @__PURE__ */ jsxRuntime.jsx(
3079
- AddComponentTitle,
3224
+ designSystem.Typography,
3080
3225
  {
3081
3226
  variant: "pi",
3082
3227
  fontWeight: "bold",
3083
- textColor: hasError && !isOpen ? "danger600" : "neutral500",
3228
+ textColor: hasError && !isOpen ? "danger600" : "neutral600",
3084
3229
  children
3085
3230
  }
3086
3231
  )
@@ -3097,42 +3242,14 @@ const StyledAddIcon = styledComponents.styled(Icons.PlusCircle)`
3097
3242
  fill: ${({ theme, $hasError }) => $hasError ? theme.colors.danger200 : theme.colors.neutral150};
3098
3243
  }
3099
3244
  > path {
3100
- fill: ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral600};
3245
+ fill: ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral500};
3101
3246
  }
3102
3247
  `;
3103
- const AddComponentTitle = styledComponents.styled(designSystem.Typography)``;
3104
- const StyledButton = styledComponents.styled(designSystem.BaseButton)`
3248
+ const StyledButton = styledComponents.styled(designSystem.Button)`
3249
+ padding-left: ${({ theme }) => theme.spaces[3]};
3105
3250
  border-radius: 26px;
3106
- border-color: ${({ theme }) => theme.colors.neutral150};
3107
3251
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
3108
-
3109
- &:hover {
3110
- ${AddComponentTitle} {
3111
- color: ${({ theme }) => theme.colors.primary600};
3112
- }
3113
-
3114
- ${StyledAddIcon} {
3115
- > circle {
3116
- fill: ${({ theme }) => theme.colors.primary600};
3117
- }
3118
- > path {
3119
- fill: ${({ theme }) => theme.colors.neutral100};
3120
- }
3121
- }
3122
- }
3123
- &:active {
3124
- ${AddComponentTitle} {
3125
- color: ${({ theme }) => theme.colors.primary600};
3126
- }
3127
- ${StyledAddIcon} {
3128
- > circle {
3129
- fill: ${({ theme }) => theme.colors.primary600};
3130
- }
3131
- > path {
3132
- fill: ${({ theme }) => theme.colors.neutral100};
3133
- }
3134
- }
3135
- }
3252
+ height: 5rem;
3136
3253
  `;
3137
3254
  const ComponentCategory = ({
3138
3255
  category,
@@ -3247,18 +3364,6 @@ const NotAllowedInput = ({ hint, label, required, name: name2 }) => {
3247
3364
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
3248
3365
  ] });
3249
3366
  };
3250
- function useDebounce(value, delay) {
3251
- const [debouncedValue, setDebouncedValue] = React.useState(value);
3252
- React.useEffect(() => {
3253
- const handler = setTimeout(() => {
3254
- setDebouncedValue(value);
3255
- }, delay);
3256
- return () => {
3257
- clearTimeout(handler);
3258
- };
3259
- }, [value, delay]);
3260
- return debouncedValue;
3261
- }
3262
3367
  const uidApi = index.contentManagerApi.injectEndpoints({
3263
3368
  endpoints: (builder) => ({
3264
3369
  getDefaultUID: builder.query({
@@ -3293,7 +3398,10 @@ const uidApi = index.contentManagerApi.injectEndpoints({
3293
3398
  config: {
3294
3399
  params
3295
3400
  }
3296
- })
3401
+ }),
3402
+ providesTags: (_res, _error, params) => [
3403
+ { type: "UidAvailability", id: params.contentTypeUID }
3404
+ ]
3297
3405
  })
3298
3406
  })
3299
3407
  });
@@ -3305,8 +3413,10 @@ const UIDInput = React__namespace.forwardRef(
3305
3413
  const allFormValues = strapiAdmin.useForm("InputUID", (form) => form.values);
3306
3414
  const [availability, setAvailability] = React__namespace.useState();
3307
3415
  const [showRegenerate, setShowRegenerate] = React__namespace.useState(false);
3416
+ const isCloning = reactRouterDom.useMatch(index.CLONE_PATH) !== null;
3308
3417
  const field = strapiAdmin.useField(name2);
3309
- const debouncedValue = useDebounce(field.value, 300);
3418
+ const debouncedValue = useDebounce.useDebounce(field.value, 300);
3419
+ const hasChanged = debouncedValue !== field.initialValue;
3310
3420
  const { toggleNotification } = strapiAdmin.useNotification();
3311
3421
  const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
3312
3422
  const { formatMessage } = reactIntl.useIntl();
@@ -3382,8 +3492,9 @@ const UIDInput = React__namespace.forwardRef(
3382
3492
  params
3383
3493
  },
3384
3494
  {
3495
+ // Don't check availability if the value is empty or wasn't changed
3385
3496
  skip: !Boolean(
3386
- debouncedValue !== field.initialValue && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3497
+ (hasChanged || isCloning) && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3387
3498
  )
3388
3499
  }
3389
3500
  );
@@ -3412,6 +3523,7 @@ const UIDInput = React__namespace.forwardRef(
3412
3523
  const isLoading = isGeneratingDefaultUID || isGeneratingUID || isCheckingAvailability;
3413
3524
  const fieldRef = strapiAdmin.useFocusInputField(name2);
3414
3525
  const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
3526
+ const shouldShowAvailability = (hasChanged || isCloning) && debouncedValue != null && availability && !showRegenerate;
3415
3527
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { hint, name: name2, error: field.error, required, children: [
3416
3528
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
3417
3529
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3420,7 +3532,7 @@ const UIDInput = React__namespace.forwardRef(
3420
3532
  ref: composedRefs,
3421
3533
  disabled: props.disabled,
3422
3534
  endAction: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { position: "relative", gap: 1, children: [
3423
- availability && !showRegenerate && /* @__PURE__ */ jsxRuntime.jsxs(
3535
+ shouldShowAvailability && /* @__PURE__ */ jsxRuntime.jsxs(
3424
3536
  TextValidation,
3425
3537
  {
3426
3538
  alignItems: "center",
@@ -3709,8 +3821,7 @@ const Wrapper = styledComponents.styled.div`
3709
3821
  `;
3710
3822
  var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/, emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/, unorderedListRE = /[*+-]\s/;
3711
3823
  function newlineAndIndentContinueMarkdownList(cm) {
3712
- if (cm.getOption("disableInput"))
3713
- return CodeMirror__default.default.Pass;
3824
+ if (cm.getOption("disableInput")) return CodeMirror__default.default.Pass;
3714
3825
  var ranges = cm.listSelections(), replacements = [];
3715
3826
  for (var i = 0; i < ranges.length; i++) {
3716
3827
  var pos = ranges[i].head;
@@ -3744,8 +3855,7 @@ function newlineAndIndentContinueMarkdownList(cm) {
3744
3855
  var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
3745
3856
  var bullet = numbered ? parseInt(match[3], 10) + 1 + match[4] : match[2].replace("x", " ");
3746
3857
  replacements[i] = "\n" + indent + bullet + after;
3747
- if (numbered)
3748
- incrementRemainingMarkdownListNumbers(cm, pos);
3858
+ if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
3749
3859
  }
3750
3860
  }
3751
3861
  cm.replaceSelections(replacements);
@@ -3763,10 +3873,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
3763
3873
  var newNumber = parseInt(startItem[3], 10) + lookAhead - skipCount;
3764
3874
  var nextNumber = parseInt(nextItem[3], 10), itemNumber = nextNumber;
3765
3875
  if (startIndent === nextIndent && !isNaN(nextNumber)) {
3766
- if (newNumber === nextNumber)
3767
- itemNumber = nextNumber + 1;
3768
- if (newNumber > nextNumber)
3769
- itemNumber = newNumber + 1;
3876
+ if (newNumber === nextNumber) itemNumber = nextNumber + 1;
3877
+ if (newNumber > nextNumber) itemNumber = newNumber + 1;
3770
3878
  cm.replaceRange(
3771
3879
  nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
3772
3880
  {
@@ -3779,10 +3887,8 @@ function incrementRemainingMarkdownListNumbers(cm, pos) {
3779
3887
  }
3780
3888
  );
3781
3889
  } else {
3782
- if (startIndent.length > nextIndent.length)
3783
- return;
3784
- if (startIndent.length < nextIndent.length && lookAhead === 1)
3785
- return;
3890
+ if (startIndent.length > nextIndent.length) return;
3891
+ if (startIndent.length < nextIndent.length && lookAhead === 1) return;
3786
3892
  skipCount += 1;
3787
3893
  }
3788
3894
  }
@@ -4254,7 +4360,7 @@ const EditorLayout = ({
4254
4360
  justifyContent: "flex-end",
4255
4361
  shrink: 0,
4256
4362
  width: "100%",
4257
- children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, children: [
4363
+ children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, variant: "tertiary", size: "M", children: [
4258
4364
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
4259
4365
  id: "components.Wysiwyg.collapse",
4260
4366
  defaultMessage: "Collapse"
@@ -4272,12 +4378,14 @@ const EditorLayout = ({
4272
4378
  ) }) });
4273
4379
  }
4274
4380
  return /* @__PURE__ */ jsxRuntime.jsx(
4275
- designSystem.Box,
4381
+ designSystem.Flex,
4276
4382
  {
4277
4383
  borderColor: error ? "danger600" : "neutral200",
4278
4384
  borderStyle: "solid",
4279
4385
  borderWidth: "1px",
4280
4386
  hasRadius: true,
4387
+ direction: "column",
4388
+ alignItems: "stretch",
4281
4389
  children
4282
4390
  }
4283
4391
  );
@@ -4288,11 +4396,19 @@ const ExpandWrapper = styledComponents.styled(designSystem.Flex)`
4288
4396
  const BoxWithBorder = styledComponents.styled(designSystem.Box)`
4289
4397
  border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
4290
4398
  `;
4291
- const ExpandButton$1 = styledComponents.styled(designSystem.BaseButton)`
4399
+ const ExpandButton$1 = styledComponents.styled(designSystem.Button)`
4292
4400
  background-color: transparent;
4293
4401
  border: none;
4294
4402
  align-items: center;
4295
4403
 
4404
+ & > span {
4405
+ display: flex;
4406
+ justify-content: space-between;
4407
+ align-items: center;
4408
+ width: 100%;
4409
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4410
+ }
4411
+
4296
4412
  svg {
4297
4413
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4298
4414
 
@@ -4559,40 +4675,28 @@ const quoteAndCodeHandler = (editor, markdownType) => {
4559
4675
  insertWithoutTextToEdit(editor, markdownType, line, contentLength);
4560
4676
  }
4561
4677
  };
4562
- const CustomIconButton = styledComponents.styled(designSystem.IconButton)`
4563
- padding: ${({ theme }) => theme.spaces[2]};
4564
-
4565
- svg {
4566
- width: 1.8rem;
4567
- height: 1.8rem;
4568
- }
4569
- `;
4570
- const CustomLinkIconButton = styledComponents.styled(CustomIconButton)`
4571
- svg {
4572
- width: 0.8rem;
4573
- height: 0.8rem;
4574
- }
4575
- `;
4576
4678
  const MainButtons = styledComponents.styled(designSystem.IconButtonGroup)`
4577
4679
  margin-left: ${({ theme }) => theme.spaces[4]};
4578
4680
  `;
4579
4681
  const MoreButton = styledComponents.styled(designSystem.IconButton)`
4580
4682
  margin: ${({ theme }) => `0 ${theme.spaces[2]}`};
4581
- padding: ${({ theme }) => theme.spaces[2]};
4582
-
4583
- svg {
4584
- width: 1.8rem;
4585
- height: 1.8rem;
4586
- }
4587
4683
  `;
4588
4684
  const IconButtonGroupMargin = styledComponents.styled(designSystem.IconButtonGroup)`
4589
4685
  margin-right: ${({ theme }) => `${theme.spaces[2]}`};
4590
4686
  `;
4591
- const ExpandButton = styledComponents.styled(designSystem.BaseButton)`
4687
+ const ExpandButton = styledComponents.styled(designSystem.Button)`
4592
4688
  background-color: transparent;
4593
4689
  border: none;
4594
4690
  align-items: center;
4595
4691
 
4692
+ & > span {
4693
+ display: flex;
4694
+ justify-content: space-between;
4695
+ align-items: center;
4696
+ width: 100%;
4697
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4698
+ }
4699
+
4596
4700
  svg {
4597
4701
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4598
4702
  path {
@@ -4604,8 +4708,8 @@ const ExpandButton = styledComponents.styled(designSystem.BaseButton)`
4604
4708
  `;
4605
4709
  const WysiwygFooter = ({ onToggleExpand }) => {
4606
4710
  const { formatMessage } = reactIntl.useIntl();
4607
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, children: [
4608
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
4711
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, variant: "tertiary", size: "M", children: [
4712
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: formatMessage({
4609
4713
  id: "components.WysiwygBottomControls.fullscreen",
4610
4714
  defaultMessage: "Expand"
4611
4715
  }) }),
@@ -4641,18 +4745,27 @@ const WysiwygNav = ({
4641
4745
  borderRadius: `0.4rem 0.4rem 0 0`,
4642
4746
  children: [
4643
4747
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
4644
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.SingleSelect, { disabled: true, placeholder: selectPlaceholder, "aria-label": selectPlaceholder, children: [
4645
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4646
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
4647
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
4648
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
4649
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
4650
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4651
- ] }) }),
4748
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4749
+ designSystem.SingleSelect,
4750
+ {
4751
+ disabled: true,
4752
+ placeholder: selectPlaceholder,
4753
+ "aria-label": selectPlaceholder,
4754
+ size: "S",
4755
+ children: [
4756
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4757
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
4758
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
4759
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
4760
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
4761
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4762
+ ]
4763
+ }
4764
+ ) }),
4652
4765
  /* @__PURE__ */ jsxRuntime.jsxs(MainButtons, { children: [
4653
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4654
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {}) }),
4655
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Underline, {}) })
4766
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4767
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {}) }),
4768
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Underline, {}) })
4656
4769
  ] }),
4657
4770
  /* @__PURE__ */ jsxRuntime.jsx(MoreButton, { disabled: true, label: "More", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.More, {}) })
4658
4771
  ] }),
@@ -4679,6 +4792,7 @@ const WysiwygNav = ({
4679
4792
  placeholder: selectPlaceholder,
4680
4793
  "aria-label": selectPlaceholder,
4681
4794
  onChange: (value) => onActionClick(value, editorRef),
4795
+ size: "S",
4682
4796
  children: [
4683
4797
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4684
4798
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
@@ -4690,17 +4804,9 @@ const WysiwygNav = ({
4690
4804
  }
4691
4805
  ) }),
4692
4806
  /* @__PURE__ */ jsxRuntime.jsxs(MainButtons, { children: [
4807
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { onClick: () => onActionClick("Bold", editorRef), label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4693
4808
  /* @__PURE__ */ jsxRuntime.jsx(
4694
- CustomIconButton,
4695
- {
4696
- onClick: () => onActionClick("Bold", editorRef),
4697
- label: "Bold",
4698
- name: "Bold",
4699
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {})
4700
- }
4701
- ),
4702
- /* @__PURE__ */ jsxRuntime.jsx(
4703
- CustomIconButton,
4809
+ designSystem.IconButton,
4704
4810
  {
4705
4811
  onClick: () => onActionClick("Italic", editorRef),
4706
4812
  label: "Italic",
@@ -4709,7 +4815,7 @@ const WysiwygNav = ({
4709
4815
  }
4710
4816
  ),
4711
4817
  /* @__PURE__ */ jsxRuntime.jsx(
4712
- CustomIconButton,
4818
+ designSystem.IconButton,
4713
4819
  {
4714
4820
  onClick: () => onActionClick("Underline", editorRef),
4715
4821
  label: "Underline",
@@ -4723,7 +4829,7 @@ const WysiwygNav = ({
4723
4829
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { sideOffset: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 2, children: [
4724
4830
  /* @__PURE__ */ jsxRuntime.jsxs(IconButtonGroupMargin, { children: [
4725
4831
  /* @__PURE__ */ jsxRuntime.jsx(
4726
- CustomIconButton,
4832
+ designSystem.IconButton,
4727
4833
  {
4728
4834
  onClick: () => onActionClick("Strikethrough", editorRef, handleTogglePopover),
4729
4835
  label: "Strikethrough",
@@ -4732,7 +4838,7 @@ const WysiwygNav = ({
4732
4838
  }
4733
4839
  ),
4734
4840
  /* @__PURE__ */ jsxRuntime.jsx(
4735
- CustomIconButton,
4841
+ designSystem.IconButton,
4736
4842
  {
4737
4843
  onClick: () => onActionClick("BulletList", editorRef, handleTogglePopover),
4738
4844
  label: "BulletList",
@@ -4741,7 +4847,7 @@ const WysiwygNav = ({
4741
4847
  }
4742
4848
  ),
4743
4849
  /* @__PURE__ */ jsxRuntime.jsx(
4744
- CustomIconButton,
4850
+ designSystem.IconButton,
4745
4851
  {
4746
4852
  onClick: () => onActionClick("NumberList", editorRef, handleTogglePopover),
4747
4853
  label: "NumberList",
@@ -4752,7 +4858,7 @@ const WysiwygNav = ({
4752
4858
  ] }),
4753
4859
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.IconButtonGroup, { children: [
4754
4860
  /* @__PURE__ */ jsxRuntime.jsx(
4755
- CustomIconButton,
4861
+ designSystem.IconButton,
4756
4862
  {
4757
4863
  onClick: () => onActionClick("Code", editorRef, handleTogglePopover),
4758
4864
  label: "Code",
@@ -4761,7 +4867,7 @@ const WysiwygNav = ({
4761
4867
  }
4762
4868
  ),
4763
4869
  /* @__PURE__ */ jsxRuntime.jsx(
4764
- CustomIconButton,
4870
+ designSystem.IconButton,
4765
4871
  {
4766
4872
  onClick: () => {
4767
4873
  handleTogglePopover();
@@ -4773,7 +4879,7 @@ const WysiwygNav = ({
4773
4879
  }
4774
4880
  ),
4775
4881
  /* @__PURE__ */ jsxRuntime.jsx(
4776
- CustomLinkIconButton,
4882
+ designSystem.IconButton,
4777
4883
  {
4778
4884
  onClick: () => onActionClick("Link", editorRef, handleTogglePopover),
4779
4885
  label: "Link",
@@ -4782,7 +4888,7 @@ const WysiwygNav = ({
4782
4888
  }
4783
4889
  ),
4784
4890
  /* @__PURE__ */ jsxRuntime.jsx(
4785
- CustomIconButton,
4891
+ designSystem.IconButton,
4786
4892
  {
4787
4893
  onClick: () => onActionClick("Quote", editorRef, handleTogglePopover),
4788
4894
  label: "Quote",
@@ -4860,7 +4966,7 @@ const Wysiwyg = React__namespace.forwardRef(
4860
4966
  const handleSelectAssets = (files) => {
4861
4967
  const formattedFiles = files.map((f) => ({
4862
4968
  alt: f.alternativeText || f.name,
4863
- url: usePrev.prefixFileUrlWithBackendUrl(f.url),
4969
+ url: useDebounce.prefixFileUrlWithBackendUrl(f.url),
4864
4970
  mime: f.mime
4865
4971
  }));
4866
4972
  insertFile(editorRef, formattedFiles);
@@ -4919,15 +5025,19 @@ const Wysiwyg = React__namespace.forwardRef(
4919
5025
  );
4920
5026
  const MemoizedWysiwyg = React__namespace.memo(Wysiwyg);
4921
5027
  const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4922
- const { id } = index.useDoc();
5028
+ const { id, document: document2, collectionType } = index.useDoc();
4923
5029
  const isFormDisabled = strapiAdmin.useForm("InputRenderer", (state) => state.disabled);
4924
5030
  const isInDynamicZone = useDynamicZone("isInDynamicZone", (state) => state.isInDynamicZone);
4925
5031
  const canCreateFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canCreateFields);
4926
5032
  const canReadFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canReadFields);
4927
5033
  const canUpdateFields = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUpdateFields);
4928
5034
  const canUserAction = index.useDocumentRBAC("InputRenderer", (rbac) => rbac.canUserAction);
4929
- const editableFields = id ? canUpdateFields : canCreateFields;
4930
- const readableFields = id ? canReadFields : canCreateFields;
5035
+ let idToCheck = id;
5036
+ if (collectionType === index.SINGLE_TYPES) {
5037
+ idToCheck = document2?.documentId;
5038
+ }
5039
+ const editableFields = idToCheck ? canUpdateFields : canCreateFields;
5040
+ const readableFields = idToCheck ? canReadFields : canCreateFields;
4931
5041
  const canUserReadField = canUserAction(props.name, readableFields, props.type);
4932
5042
  const canUserEditField = canUserAction(props.name, editableFields, props.type);
4933
5043
  const fields = strapiAdmin.useStrapiApp("InputRenderer", (app) => app.fields);
@@ -4938,6 +5048,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4938
5048
  const {
4939
5049
  edit: { components }
4940
5050
  } = index.useDocLayout();
5051
+ const field = strapiAdmin.useField(props.name);
4941
5052
  if (!visible) {
4942
5053
  return null;
4943
5054
  }
@@ -4948,7 +5059,7 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4948
5059
  if (attributeHasCustomFieldProperty(props.attribute)) {
4949
5060
  const CustomInput = lazyComponentStore[props.attribute.customField];
4950
5061
  if (CustomInput) {
4951
- return /* @__PURE__ */ jsxRuntime.jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
5062
+ return /* @__PURE__ */ jsxRuntime.jsx(CustomInput, { ...props, ...field, hint, disabled: fieldIsDisabled });
4952
5063
  }
4953
5064
  return /* @__PURE__ */ jsxRuntime.jsx(
4954
5065
  strapiAdmin.InputRenderer,
@@ -5018,7 +5129,9 @@ const useFieldHint = (hint = void 0, attribute) => {
5018
5129
  if (!maximum && !minimum) {
5019
5130
  return hint;
5020
5131
  }
5021
- const units = !["biginteger", "integer", "number"].includes(attribute.type) ? formatMessage(
5132
+ const units = !["biginteger", "integer", "number", "dynamiczone", "component"].includes(
5133
+ attribute.type
5134
+ ) ? formatMessage(
5022
5135
  {
5023
5136
  id: "content-manager.form.Input.hint.character.unit",
5024
5137
  defaultMessage: "{maxValue, plural, one { character} other { characters}}"
@@ -5107,12 +5220,20 @@ const DynamicComponent = ({
5107
5220
  React__namespace.useEffect(() => {
5108
5221
  dragPreviewRef(reactDndHtml5Backend.getEmptyImage(), { captureDraggingState: false });
5109
5222
  }, [dragPreviewRef, index$1]);
5223
+ const accordionValue = React__namespace.useId();
5224
+ const { value = [], rawError } = strapiAdmin.useField(`${name2}.${index$1}`);
5225
+ const [collapseToOpen, setCollapseToOpen] = React__namespace.useState("");
5226
+ React__namespace.useEffect(() => {
5227
+ if (rawError && value) {
5228
+ setCollapseToOpen(accordionValue);
5229
+ }
5230
+ }, [rawError, value, accordionValue]);
5110
5231
  const composedBoxRefs = designSystem.useComposedRefs(boxRef, dropRef);
5111
5232
  const accordionActions = disabled ? null : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5112
5233
  /* @__PURE__ */ jsxRuntime.jsx(
5113
5234
  designSystem.IconButton,
5114
5235
  {
5115
- borderWidth: 0,
5236
+ variant: "ghost",
5116
5237
  label: formatMessage(
5117
5238
  {
5118
5239
  id: index.getTranslation("components.DynamicZone.delete-label"),
@@ -5127,7 +5248,7 @@ const DynamicComponent = ({
5127
5248
  /* @__PURE__ */ jsxRuntime.jsx(
5128
5249
  designSystem.IconButton,
5129
5250
  {
5130
- borderWidth: 0,
5251
+ variant: "ghost",
5131
5252
  onClick: (e) => e.stopPropagation(),
5132
5253
  "data-handler-id": handlerId,
5133
5254
  ref: dragRef,
@@ -5172,10 +5293,9 @@ const DynamicComponent = ({
5172
5293
  ] })
5173
5294
  ] });
5174
5295
  const accordionTitle = title ? `${displayName} ${title}` : displayName;
5175
- const accordionValue = React__namespace.useId();
5176
5296
  return /* @__PURE__ */ jsxRuntime.jsxs(ComponentContainer, { tag: "li", width: "100%", children: [
5177
5297
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Rectangle, { background: "neutral200" }) }),
5178
- /* @__PURE__ */ jsxRuntime.jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsxRuntime.jsx(Preview, {}) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Item, { value: accordionValue, children: [
5298
+ /* @__PURE__ */ jsxRuntime.jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsxRuntime.jsx(Preview, {}) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Root, { value: collapseToOpen, onValueChange: setCollapseToOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Item, { value: accordionValue, children: [
5179
5299
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Header, { children: [
5180
5300
  /* @__PURE__ */ jsxRuntime.jsx(
5181
5301
  designSystem.Accordion.Trigger,
@@ -5186,10 +5306,39 @@ const DynamicComponent = ({
5186
5306
  ),
5187
5307
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Actions, { children: accordionActions })
5188
5308
  ] }),
5189
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
5190
- const fieldName = `${name2}.${index$1}.${field.name}`;
5191
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, s: 12, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field, name: fieldName }) }, fieldName);
5192
- }) }, rowInd)) }) }) })
5309
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsxRuntime.jsx(
5310
+ designSystem.Grid.Item,
5311
+ {
5312
+ col: 12,
5313
+ s: 12,
5314
+ xs: 12,
5315
+ direction: "column",
5316
+ alignItems: "stretch",
5317
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
5318
+ const fieldName = `${name2}.${index$1}.${field.name}`;
5319
+ const fieldWithTranslatedLabel = {
5320
+ ...field,
5321
+ label: formatMessage({
5322
+ id: `content-manager.components.${componentUid}.${field.name}`,
5323
+ defaultMessage: field.label
5324
+ })
5325
+ };
5326
+ return /* @__PURE__ */ jsxRuntime.jsx(
5327
+ designSystem.Grid.Item,
5328
+ {
5329
+ col: size,
5330
+ s: 12,
5331
+ xs: 12,
5332
+ direction: "column",
5333
+ alignItems: "stretch",
5334
+ children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...fieldWithTranslatedLabel, name: fieldName })
5335
+ },
5336
+ fieldName
5337
+ );
5338
+ }) })
5339
+ },
5340
+ rowInd
5341
+ )) }) }) }) })
5193
5342
  ] }) }) })
5194
5343
  ] });
5195
5344
  };
@@ -5381,7 +5530,7 @@ const DynamicZone = ({
5381
5530
  const handleRemoveComponent = (name22, currentIndex) => () => {
5382
5531
  removeFieldRow(name22, currentIndex);
5383
5532
  };
5384
- const hasError = error !== void 0 || dynamicDisplayedComponentsLength < min || dynamicDisplayedComponentsLength > max;
5533
+ const hasError = error !== void 0;
5385
5534
  const renderButtonLabel = () => {
5386
5535
  if (addComponentIsOpen) {
5387
5536
  return formatMessage({ id: "app.utils.close-label", defaultMessage: "Close" });
@@ -5495,4 +5644,4 @@ exports.transformDocument = transformDocument;
5495
5644
  exports.useDynamicZone = useDynamicZone;
5496
5645
  exports.useFieldHint = useFieldHint;
5497
5646
  exports.useLazyComponents = useLazyComponents;
5498
- //# sourceMappingURL=Field-Boxf9Ajp.js.map
5647
+ //# sourceMappingURL=Field-Dsu6-FrM.js.map