@strapi/content-manager 0.0.0-experimental.e9144fc8a193f9875a2c0832d689c14001c79f00 → 0.0.0-experimental.eb2d102c03f0984bece7258f6e0e8ab9ee39c82d

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 (219) hide show
  1. package/dist/admin/chunks/{CardDragPreview-DwuraT0K.js → CardDragPreview-DwuraT0K.mjs} +1 -1
  2. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs.map +1 -0
  3. package/dist/admin/chunks/{ComponentConfigurationPage-DLYW6wzP.js → ComponentConfigurationPage-BGBNQxFJ.js} +4 -3
  4. package/dist/admin/chunks/{ComponentConfigurationPage-DLYW6wzP.js.map → ComponentConfigurationPage-BGBNQxFJ.js.map} +1 -1
  5. package/dist/admin/chunks/{ComponentConfigurationPage-BnZmgOiE.js → ComponentConfigurationPage-DKtL-tec.mjs} +9 -8
  6. package/dist/admin/chunks/ComponentConfigurationPage-DKtL-tec.mjs.map +1 -0
  7. package/dist/admin/chunks/{ComponentIcon-BZcTc4rj.js → ComponentIcon-BZcTc4rj.mjs} +1 -1
  8. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs.map +1 -0
  9. package/dist/admin/chunks/{EditConfigurationPage-D343zenK.js → EditConfigurationPage-KDwSFRyn.mjs} +9 -8
  10. package/dist/admin/chunks/EditConfigurationPage-KDwSFRyn.mjs.map +1 -0
  11. package/dist/admin/chunks/{EditConfigurationPage-D6MAzDx9.js → EditConfigurationPage-yliOxLUv.js} +4 -3
  12. package/dist/admin/chunks/{EditConfigurationPage-D343zenK.js.map → EditConfigurationPage-yliOxLUv.js.map} +1 -1
  13. package/dist/admin/chunks/{EditViewPage-CAgp5yFQ.js → EditViewPage-BAI2r49P.mjs} +11 -14
  14. package/dist/admin/chunks/EditViewPage-BAI2r49P.mjs.map +1 -0
  15. package/dist/admin/chunks/{EditViewPage-BEiXdIh3.js → EditViewPage-DpvonssD.js} +7 -10
  16. package/dist/admin/chunks/EditViewPage-DpvonssD.js.map +1 -0
  17. package/dist/admin/chunks/{FieldTypeIcon-BY6MrVF4.js → FieldTypeIcon-BY6MrVF4.mjs} +1 -1
  18. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs.map +1 -0
  19. package/dist/admin/chunks/{Form-DnpEddIm.js → Form-BrzQyDxU.mjs} +5 -5
  20. package/dist/admin/chunks/Form-BrzQyDxU.mjs.map +1 -0
  21. package/dist/admin/chunks/{Form-DT-mJpeC.js → Form-XD_sf25E.js} +2 -2
  22. package/dist/admin/chunks/{Form-DT-mJpeC.js.map → Form-XD_sf25E.js.map} +1 -1
  23. package/dist/admin/chunks/{History-DcmMS40h.js → History-C-_o7tz8.js} +6 -6
  24. package/dist/admin/chunks/{History-DcmMS40h.js.map → History-C-_o7tz8.js.map} +1 -1
  25. package/dist/admin/chunks/{History-CAcsKxvW.js → History-DClLuGIg.mjs} +11 -11
  26. package/dist/admin/chunks/History-DClLuGIg.mjs.map +1 -0
  27. package/dist/admin/chunks/{Input-Bn_9U9AX.js → Input-BMLRZBE3.mjs} +756 -321
  28. package/dist/admin/chunks/Input-BMLRZBE3.mjs.map +1 -0
  29. package/dist/admin/chunks/{Input-DKc071zK.js → Input-Bv-rqfYH.js} +751 -315
  30. package/dist/admin/chunks/Input-Bv-rqfYH.js.map +1 -0
  31. package/dist/admin/chunks/{ListConfigurationPage-9g-kIzuq.js → ListConfigurationPage-D66hgG4-.js} +3 -2
  32. package/dist/admin/chunks/{ListConfigurationPage-CCkKvrdu.js.map → ListConfigurationPage-D66hgG4-.js.map} +1 -1
  33. package/dist/admin/chunks/{ListConfigurationPage-CCkKvrdu.js → ListConfigurationPage-Do3UDres.mjs} +8 -7
  34. package/dist/admin/chunks/ListConfigurationPage-Do3UDres.mjs.map +1 -0
  35. package/dist/admin/chunks/{ListViewPage-CkbK_jTo.js → ListViewPage-DNvysJaJ.js} +4 -3
  36. package/dist/admin/chunks/{ListViewPage-C4RIOx9_.js.map → ListViewPage-DNvysJaJ.js.map} +1 -1
  37. package/dist/admin/chunks/{ListViewPage-C4RIOx9_.js → ListViewPage-Q0auz5lE.mjs} +6 -5
  38. package/dist/admin/chunks/ListViewPage-Q0auz5lE.mjs.map +1 -0
  39. package/dist/admin/chunks/{NoContentTypePage-B37btBcO.js → NoContentTypePage-B_oOeOQb.mjs} +3 -2
  40. package/dist/admin/chunks/NoContentTypePage-B_oOeOQb.mjs.map +1 -0
  41. package/dist/admin/chunks/{NoContentTypePage-B2sy8eF1.js → NoContentTypePage-C5qFFfgn.js} +3 -2
  42. package/dist/admin/chunks/{NoContentTypePage-B2sy8eF1.js.map → NoContentTypePage-C5qFFfgn.js.map} +1 -1
  43. package/dist/admin/chunks/{NoPermissionsPage-CGuHcAGX.js → NoPermissionsPage-BAW7WY-M.mjs} +3 -2
  44. package/dist/admin/chunks/NoPermissionsPage-BAW7WY-M.mjs.map +1 -0
  45. package/dist/admin/chunks/{NoPermissionsPage-BZp87Adj.js → NoPermissionsPage-C9sDJXRu.js} +3 -2
  46. package/dist/admin/chunks/{NoPermissionsPage-BZp87Adj.js.map → NoPermissionsPage-C9sDJXRu.js.map} +1 -1
  47. package/dist/admin/chunks/{Preview-D1A984oV.js → Preview-05BZGpV2.mjs} +244 -100
  48. package/dist/admin/chunks/Preview-05BZGpV2.mjs.map +1 -0
  49. package/dist/admin/chunks/{Preview-C7doSaZl.js → Preview-B6ThL2SA.js} +236 -92
  50. package/dist/admin/chunks/Preview-B6ThL2SA.js.map +1 -0
  51. package/dist/admin/chunks/{Relations-DFmdcIeQ.js → Relations-CJ0GWuqq.js} +469 -4
  52. package/dist/admin/chunks/Relations-CJ0GWuqq.js.map +1 -0
  53. package/dist/admin/chunks/{Relations-B9xxwrI5.js → Relations-CiOfFNxW.mjs} +471 -7
  54. package/dist/admin/chunks/Relations-CiOfFNxW.mjs.map +1 -0
  55. package/dist/admin/chunks/{ar-DckYq_WK.js → ar-DckYq_WK.mjs} +1 -1
  56. package/dist/admin/chunks/ar-DckYq_WK.mjs.map +1 -0
  57. package/dist/admin/chunks/{ca-DviY7mRj.js → ca-DviY7mRj.mjs} +1 -1
  58. package/dist/admin/chunks/ca-DviY7mRj.mjs.map +1 -0
  59. package/dist/admin/chunks/{cs-C7OSYFQ7.js → cs-C7OSYFQ7.mjs} +1 -1
  60. package/dist/admin/chunks/cs-C7OSYFQ7.mjs.map +1 -0
  61. package/dist/admin/chunks/{de-5QRlDHyR.js → de-5QRlDHyR.mjs} +1 -1
  62. package/dist/admin/chunks/de-5QRlDHyR.mjs.map +1 -0
  63. package/dist/admin/chunks/{en-LfhocNG2.js → en-CImiNxXE.mjs} +3 -1
  64. package/dist/admin/chunks/en-CImiNxXE.mjs.map +1 -0
  65. package/dist/admin/chunks/{en-C1CjdAtC.js → en-CLf4SuMQ.js} +3 -1
  66. package/dist/admin/chunks/{en-LfhocNG2.js.map → en-CLf4SuMQ.js.map} +1 -1
  67. package/dist/admin/chunks/{es-DkoWSExG.js → es-DkoWSExG.mjs} +1 -1
  68. package/dist/admin/chunks/es-DkoWSExG.mjs.map +1 -0
  69. package/dist/admin/chunks/{eu-BG1xX7HK.js → eu-BG1xX7HK.mjs} +1 -1
  70. package/dist/admin/chunks/eu-BG1xX7HK.mjs.map +1 -0
  71. package/dist/admin/chunks/{fr-CFdRaRVj.js → fr-CFdRaRVj.mjs} +1 -1
  72. package/dist/admin/chunks/fr-CFdRaRVj.mjs.map +1 -0
  73. package/dist/admin/chunks/{gu-D5MMMXRs.js → gu-D5MMMXRs.mjs} +1 -1
  74. package/dist/admin/chunks/gu-D5MMMXRs.mjs.map +1 -0
  75. package/dist/admin/chunks/{hi-lp17SCjr.js → hi-lp17SCjr.mjs} +1 -1
  76. package/dist/admin/chunks/hi-lp17SCjr.mjs.map +1 -0
  77. package/dist/admin/chunks/{hooks-DMvik5y_.js → hooks-DMvik5y_.mjs} +1 -1
  78. package/dist/admin/chunks/hooks-DMvik5y_.mjs.map +1 -0
  79. package/dist/admin/chunks/{hu-CLka1U2C.js → hu-CLka1U2C.mjs} +1 -1
  80. package/dist/admin/chunks/hu-CLka1U2C.mjs.map +1 -0
  81. package/dist/admin/chunks/{id-USfY9m1g.js → id-USfY9m1g.mjs} +1 -1
  82. package/dist/admin/chunks/id-USfY9m1g.mjs.map +1 -0
  83. package/dist/admin/chunks/{index-Cj2lSt7S.js → index-CcJLBLNf.mjs} +122 -73
  84. package/dist/admin/chunks/index-CcJLBLNf.mjs.map +1 -0
  85. package/dist/admin/chunks/{index-OSrndyon.js → index-SQ88CePz.js} +93 -43
  86. package/dist/admin/chunks/index-SQ88CePz.js.map +1 -0
  87. package/dist/admin/chunks/{it-BAHrwmYS.js → it-BAHrwmYS.mjs} +1 -1
  88. package/dist/admin/chunks/it-BAHrwmYS.mjs.map +1 -0
  89. package/dist/admin/chunks/{ja-BWKmBJFT.js → ja-BWKmBJFT.mjs} +1 -1
  90. package/dist/admin/chunks/ja-BWKmBJFT.mjs.map +1 -0
  91. package/dist/admin/chunks/{ko-CgADGBNt.js → ko-CgADGBNt.mjs} +1 -1
  92. package/dist/admin/chunks/ko-CgADGBNt.mjs.map +1 -0
  93. package/dist/admin/chunks/{layout-DZO1GLQr.js → layout-4nCaNnTs.mjs} +8 -7
  94. package/dist/admin/chunks/layout-4nCaNnTs.mjs.map +1 -0
  95. package/dist/admin/chunks/{layout-ixNm7FpJ.js → layout-xxDnIsHG.js} +5 -4
  96. package/dist/admin/chunks/{layout-DZO1GLQr.js.map → layout-xxDnIsHG.js.map} +1 -1
  97. package/dist/admin/chunks/{ml-CnhCfOn_.js → ml-CnhCfOn_.mjs} +1 -1
  98. package/dist/admin/chunks/ml-CnhCfOn_.mjs.map +1 -0
  99. package/dist/admin/chunks/{ms-Bh09NFff.js → ms-Bh09NFff.mjs} +1 -1
  100. package/dist/admin/chunks/ms-Bh09NFff.mjs.map +1 -0
  101. package/dist/admin/chunks/{nl-C8HYflTc.js → nl-C8HYflTc.mjs} +1 -1
  102. package/dist/admin/chunks/nl-C8HYflTc.mjs.map +1 -0
  103. package/dist/admin/chunks/{objects-wl73iEma.js → objects-wl73iEma.mjs} +1 -1
  104. package/dist/admin/chunks/objects-wl73iEma.mjs.map +1 -0
  105. package/dist/admin/chunks/{pl-MFCZJZuZ.js → pl-MFCZJZuZ.mjs} +1 -1
  106. package/dist/admin/chunks/pl-MFCZJZuZ.mjs.map +1 -0
  107. package/dist/admin/chunks/{pt-BR-CcotyBGJ.js → pt-BR-CcotyBGJ.mjs} +1 -1
  108. package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs.map +1 -0
  109. package/dist/admin/chunks/{pt-HbmgeiYO.js → pt-HbmgeiYO.mjs} +1 -1
  110. package/dist/admin/chunks/pt-HbmgeiYO.mjs.map +1 -0
  111. package/dist/admin/chunks/{relations-Cdrtwdwh.js → relations-D1R7vM_e.mjs} +2 -2
  112. package/dist/admin/chunks/relations-D1R7vM_e.mjs.map +1 -0
  113. package/dist/admin/chunks/{relations-CQOKwshG.js → relations-VlsO9KQZ.js} +2 -2
  114. package/dist/admin/chunks/{relations-CQOKwshG.js.map → relations-VlsO9KQZ.js.map} +1 -1
  115. package/dist/admin/chunks/{ru-CB4BUyQp.js → ru-CB4BUyQp.mjs} +1 -1
  116. package/dist/admin/chunks/{ru-CB4BUyQp.js.map → ru-CB4BUyQp.mjs.map} +1 -1
  117. package/dist/admin/chunks/{sa-n_aPA-pU.js → sa-n_aPA-pU.mjs} +1 -1
  118. package/dist/admin/chunks/sa-n_aPA-pU.mjs.map +1 -0
  119. package/dist/admin/chunks/{sk-tn_BDjE2.js → sk-tn_BDjE2.mjs} +1 -1
  120. package/dist/admin/chunks/sk-tn_BDjE2.mjs.map +1 -0
  121. package/dist/admin/chunks/{sv-cq4ZrQRd.js → sv-cq4ZrQRd.mjs} +1 -1
  122. package/dist/admin/chunks/sv-cq4ZrQRd.mjs.map +1 -0
  123. package/dist/admin/chunks/{th-mUH7hEtc.js → th-mUH7hEtc.mjs} +1 -1
  124. package/dist/admin/chunks/th-mUH7hEtc.mjs.map +1 -0
  125. package/dist/admin/chunks/{tr-Yt38daxh.js → tr-Yt38daxh.mjs} +1 -1
  126. package/dist/admin/chunks/tr-Yt38daxh.mjs.map +1 -0
  127. package/dist/admin/chunks/uk-BtM6WnaE.mjs +313 -0
  128. package/dist/admin/chunks/uk-BtM6WnaE.mjs.map +1 -0
  129. package/dist/admin/chunks/uk-DB6OgySY.js +318 -0
  130. package/dist/admin/chunks/{en-C1CjdAtC.js.map → uk-DB6OgySY.js.map} +1 -1
  131. package/dist/admin/chunks/{useDragAndDrop-HYwNDExe.js → useDragAndDrop-HYwNDExe.mjs} +1 -1
  132. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs.map +1 -0
  133. package/dist/admin/chunks/{usePrev-Bjw2dhmq.js → usePrev-Bjw2dhmq.mjs} +1 -1
  134. package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs.map +1 -0
  135. package/dist/admin/chunks/{vi-CvBGlTjr.js → vi-CvBGlTjr.mjs} +1 -1
  136. package/dist/admin/chunks/vi-CvBGlTjr.mjs.map +1 -0
  137. package/dist/admin/chunks/{zh-BmF-sHaT.js → zh-BmF-sHaT.mjs} +1 -1
  138. package/dist/admin/chunks/zh-BmF-sHaT.mjs.map +1 -0
  139. package/dist/admin/chunks/{zh-Hans-CI0HKio3.js → zh-Hans-CI0HKio3.mjs} +1 -1
  140. package/dist/admin/chunks/{zh-Hans-CI0HKio3.js.map → zh-Hans-CI0HKio3.mjs.map} +1 -1
  141. package/dist/admin/index.js +2 -1
  142. package/dist/admin/index.js.map +1 -1
  143. package/dist/admin/index.mjs +2 -1
  144. package/dist/admin/index.mjs.map +1 -1
  145. package/dist/admin/src/components/InjectionZone.d.ts +7 -1
  146. package/dist/admin/src/content-manager.d.ts +4 -0
  147. package/dist/admin/src/hooks/useDocument.d.ts +2 -0
  148. package/dist/admin/src/hooks/useDocumentActions.d.ts +1 -0
  149. package/dist/admin/src/index.d.ts +1 -0
  150. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +2 -1
  151. package/dist/admin/src/pages/EditView/components/EditorToolbarObserver.d.ts +11 -0
  152. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +2 -1
  153. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.d.ts +1 -2
  154. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +2 -1
  155. package/dist/admin/src/preview/components/PreviewContent.d.ts +1 -2
  156. package/dist/admin/src/preview/pages/Preview.d.ts +4 -0
  157. package/dist/server/index.js +1 -1
  158. package/dist/server/index.js.map +1 -1
  159. package/dist/server/index.mjs +1 -1
  160. package/dist/server/index.mjs.map +1 -1
  161. package/package.json +8 -8
  162. package/dist/admin/chunks/CardDragPreview-DwuraT0K.js.map +0 -1
  163. package/dist/admin/chunks/ComponentConfigurationPage-BnZmgOiE.js.map +0 -1
  164. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.js.map +0 -1
  165. package/dist/admin/chunks/EditConfigurationPage-D6MAzDx9.js.map +0 -1
  166. package/dist/admin/chunks/EditViewPage-BEiXdIh3.js.map +0 -1
  167. package/dist/admin/chunks/EditViewPage-CAgp5yFQ.js.map +0 -1
  168. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.js.map +0 -1
  169. package/dist/admin/chunks/Form-DnpEddIm.js.map +0 -1
  170. package/dist/admin/chunks/History-CAcsKxvW.js.map +0 -1
  171. package/dist/admin/chunks/Input-Bn_9U9AX.js.map +0 -1
  172. package/dist/admin/chunks/Input-DKc071zK.js.map +0 -1
  173. package/dist/admin/chunks/ListConfigurationPage-9g-kIzuq.js.map +0 -1
  174. package/dist/admin/chunks/ListViewPage-CkbK_jTo.js.map +0 -1
  175. package/dist/admin/chunks/NoContentTypePage-B37btBcO.js.map +0 -1
  176. package/dist/admin/chunks/NoPermissionsPage-CGuHcAGX.js.map +0 -1
  177. package/dist/admin/chunks/Preview-C7doSaZl.js.map +0 -1
  178. package/dist/admin/chunks/Preview-D1A984oV.js.map +0 -1
  179. package/dist/admin/chunks/Relations-B9xxwrI5.js.map +0 -1
  180. package/dist/admin/chunks/Relations-DFmdcIeQ.js.map +0 -1
  181. package/dist/admin/chunks/ar-DckYq_WK.js.map +0 -1
  182. package/dist/admin/chunks/ca-DviY7mRj.js.map +0 -1
  183. package/dist/admin/chunks/cs-C7OSYFQ7.js.map +0 -1
  184. package/dist/admin/chunks/de-5QRlDHyR.js.map +0 -1
  185. package/dist/admin/chunks/es-DkoWSExG.js.map +0 -1
  186. package/dist/admin/chunks/eu-BG1xX7HK.js.map +0 -1
  187. package/dist/admin/chunks/fr-CFdRaRVj.js.map +0 -1
  188. package/dist/admin/chunks/gu-D5MMMXRs.js.map +0 -1
  189. package/dist/admin/chunks/hi-lp17SCjr.js.map +0 -1
  190. package/dist/admin/chunks/hooks-DMvik5y_.js.map +0 -1
  191. package/dist/admin/chunks/hu-CLka1U2C.js.map +0 -1
  192. package/dist/admin/chunks/id-USfY9m1g.js.map +0 -1
  193. package/dist/admin/chunks/index-Cj2lSt7S.js.map +0 -1
  194. package/dist/admin/chunks/index-OSrndyon.js.map +0 -1
  195. package/dist/admin/chunks/it-BAHrwmYS.js.map +0 -1
  196. package/dist/admin/chunks/ja-BWKmBJFT.js.map +0 -1
  197. package/dist/admin/chunks/ko-CgADGBNt.js.map +0 -1
  198. package/dist/admin/chunks/layout-ixNm7FpJ.js.map +0 -1
  199. package/dist/admin/chunks/ml-CnhCfOn_.js.map +0 -1
  200. package/dist/admin/chunks/ms-Bh09NFff.js.map +0 -1
  201. package/dist/admin/chunks/nl-C8HYflTc.js.map +0 -1
  202. package/dist/admin/chunks/objects-wl73iEma.js.map +0 -1
  203. package/dist/admin/chunks/pl-MFCZJZuZ.js.map +0 -1
  204. package/dist/admin/chunks/pt-BR-CcotyBGJ.js.map +0 -1
  205. package/dist/admin/chunks/pt-HbmgeiYO.js.map +0 -1
  206. package/dist/admin/chunks/relations-Cdrtwdwh.js.map +0 -1
  207. package/dist/admin/chunks/sa-n_aPA-pU.js.map +0 -1
  208. package/dist/admin/chunks/sk-tn_BDjE2.js.map +0 -1
  209. package/dist/admin/chunks/sv-cq4ZrQRd.js.map +0 -1
  210. package/dist/admin/chunks/th-mUH7hEtc.js.map +0 -1
  211. package/dist/admin/chunks/tr-Yt38daxh.js.map +0 -1
  212. package/dist/admin/chunks/uk-B24MoTVg.js +0 -145
  213. package/dist/admin/chunks/uk-B24MoTVg.js.map +0 -1
  214. package/dist/admin/chunks/uk-Cpgmm7gE.js +0 -140
  215. package/dist/admin/chunks/uk-Cpgmm7gE.js.map +0 -1
  216. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.js.map +0 -1
  217. package/dist/admin/chunks/usePrev-Bjw2dhmq.js.map +0 -1
  218. package/dist/admin/chunks/vi-CvBGlTjr.js.map +0 -1
  219. package/dist/admin/chunks/zh-BmF-sHaT.js.map +0 -1
@@ -6,7 +6,7 @@ var strapiAdmin = require('@strapi/admin/strapi-admin');
6
6
  var designSystem = require('@strapi/design-system');
7
7
  var Icons = require('@strapi/icons');
8
8
  var reactIntl = require('react-intl');
9
- var index = require('./index-OSrndyon.js');
9
+ var index = require('./index-SQ88CePz.js');
10
10
  var styledComponents = require('styled-components');
11
11
  var slate = require('slate');
12
12
  var slateHistory = require('slate-history');
@@ -68,10 +68,10 @@ var Toolbar = require('@radix-ui/react-toolbar');
68
68
  var reactDndHtml5Backend = require('react-dnd-html5-backend');
69
69
  var reactRouterDom = require('react-router-dom');
70
70
  var objects = require('./objects-C3EebVVe.js');
71
- var Relations = require('./Relations-DFmdcIeQ.js');
71
+ var Relations = require('./Relations-CJ0GWuqq.js');
72
72
  var pipe$1 = require('lodash/fp/pipe');
73
73
  var ComponentIcon = require('./ComponentIcon-C-EjOUPA.js');
74
- var relations = require('./relations-CQOKwshG.js');
74
+ var relations = require('./relations-VlsO9KQZ.js');
75
75
  var CodeMirror = require('codemirror5');
76
76
  var sanitizeHtml = require('sanitize-html');
77
77
  var highlight_js = require('highlight.js');
@@ -106,6 +106,7 @@ function _interopNamespaceDefault(e) {
106
106
  }
107
107
 
108
108
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
109
+ var Prism__namespace = /*#__PURE__*/_interopNamespaceDefault(Prism);
109
110
  var Toolbar__namespace = /*#__PURE__*/_interopNamespaceDefault(Toolbar);
110
111
 
111
112
  const componentStore = new Map();
@@ -488,9 +489,9 @@ const decorateCode = ([node, path])=>{
488
489
  const text = slate.Node.string(node);
489
490
  const language = codeLanguages.find((lang)=>lang.value === node.language);
490
491
  const decorateKey = language?.decorate ?? language?.value;
491
- const selectedLanguage = Prism.languages[decorateKey || 'plaintext'];
492
+ const selectedLanguage = Prism__namespace.languages[decorateKey || 'plaintext'];
492
493
  // create "tokens" with "prismjs" and put them in "ranges"
493
- const tokens = Prism.tokenize(text, selectedLanguage);
494
+ const tokens = Prism__namespace.tokenize(text, selectedLanguage);
494
495
  let start = 0;
495
496
  for (const token of tokens){
496
497
  const length = token.length;
@@ -1052,7 +1053,7 @@ const isListNode$1 = (element)=>{
1052
1053
  return element.type === 'list';
1053
1054
  };
1054
1055
 
1055
- const StyledBaseLink = styledComponents.styled(designSystem.BaseLink)`
1056
+ const StyledLink = styledComponents.styled(designSystem.Box)`
1056
1057
  text-decoration: none;
1057
1058
  `;
1058
1059
  const RemoveButton = styledComponents.styled(designSystem.Button)`
@@ -1112,9 +1113,10 @@ const LinkContent = /*#__PURE__*/ React__namespace.forwardRef(({ link, children,
1112
1113
  open: popoverOpen,
1113
1114
  children: [
1114
1115
  /*#__PURE__*/ jsxRuntime.jsx(designSystem.Popover.Trigger, {
1115
- children: /*#__PURE__*/ jsxRuntime.jsx(StyledBaseLink, {
1116
+ children: /*#__PURE__*/ jsxRuntime.jsx(StyledLink, {
1116
1117
  ...attributes,
1117
1118
  ref: forwardedRef,
1119
+ tag: "a",
1118
1120
  href: link.url,
1119
1121
  onClick: ()=>setPopoverOpen(true),
1120
1122
  color: "primary600",
@@ -1718,13 +1720,102 @@ const quoteBlocks = {
1718
1720
  }
1719
1721
  };
1720
1722
 
1723
+ const ObservedToolbarComponent = ({ index, lastVisibleIndex, setLastVisibleIndex, rootRef, children })=>{
1724
+ const isVisible = index <= lastVisibleIndex;
1725
+ const containerRef = strapiAdmin.useElementOnScreen((isVisible)=>{
1726
+ /**
1727
+ * It's the MoreMenu's job to make an item not visible when there's not room for it.
1728
+ * But we need to react here to the element becoming visible again.
1729
+ */ if (isVisible) {
1730
+ setLastVisibleIndex((prev)=>Math.max(prev, index));
1731
+ }
1732
+ }, {
1733
+ threshold: 1,
1734
+ root: rootRef.current
1735
+ });
1736
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
1737
+ ref: containerRef,
1738
+ style: {
1739
+ /**
1740
+ * Use visibility so that the element occupies the space if requires even when there's not
1741
+ * enough room for it to be visible. The empty reserved space will be clipped by the
1742
+ * overflow:hidden rule on the parent, so it doesn't affect the UI.
1743
+ * This way we can keep observing its visiblity and react to browser resize events.
1744
+ */ visibility: isVisible ? 'visible' : 'hidden'
1745
+ },
1746
+ children: children
1747
+ });
1748
+ };
1749
+ const EditorToolbarObserver = ({ observedComponents, menuTriggerVariant = 'ghost' })=>{
1750
+ const { formatMessage } = reactIntl.useIntl();
1751
+ const toolbarRef = React__namespace.useRef(null);
1752
+ const [lastVisibleIndex, setLastVisibleIndex] = React__namespace.useState(observedComponents.length - 1);
1753
+ const hasHiddenItems = lastVisibleIndex < observedComponents.length - 1;
1754
+ const menuIndex = lastVisibleIndex + 1;
1755
+ const [open, setOpen] = React__namespace.useState(false);
1756
+ const isMenuOpenWithContent = open && hasHiddenItems;
1757
+ const menuTriggerRef = strapiAdmin.useElementOnScreen((isVisible)=>{
1758
+ // We only react to the menu becoming invisible. When that happens, we hide the last item.
1759
+ if (!isVisible) {
1760
+ /**
1761
+ * If there's no room for any item, the index can be -1.
1762
+ * This is intentional, in that case only the more menu will be visible.
1763
+ **/ setLastVisibleIndex((prev)=>prev - 1);
1764
+ // Maintain the menu state if it has content
1765
+ setOpen(isMenuOpenWithContent);
1766
+ }
1767
+ }, {
1768
+ threshold: 1,
1769
+ root: toolbarRef.current
1770
+ });
1771
+ return observedComponents.map((component, index)=>{
1772
+ return /*#__PURE__*/ jsxRuntime.jsx(ObservedToolbarComponent, {
1773
+ index: index,
1774
+ lastVisibleIndex: lastVisibleIndex,
1775
+ setLastVisibleIndex: setLastVisibleIndex,
1776
+ rootRef: toolbarRef,
1777
+ children: component.toolbar
1778
+ }, component.key);
1779
+ }).toSpliced(menuIndex, 0, /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Menu.Root, {
1780
+ defaultOpen: false,
1781
+ open: isMenuOpenWithContent,
1782
+ onOpenChange: setOpen,
1783
+ children: [
1784
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Trigger, {
1785
+ paddingLeft: 0,
1786
+ paddingRight: 0,
1787
+ ref: menuTriggerRef,
1788
+ variant: menuTriggerVariant,
1789
+ style: {
1790
+ visibility: hasHiddenItems ? 'visible' : 'hidden'
1791
+ },
1792
+ label: formatMessage({
1793
+ id: 'global.more',
1794
+ defaultMessage: 'More'
1795
+ }),
1796
+ tag: designSystem.IconButton,
1797
+ icon: /*#__PURE__*/ jsxRuntime.jsx(Icons.More, {})
1798
+ }),
1799
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Content, {
1800
+ onCloseAutoFocus: (e)=>e.preventDefault(),
1801
+ maxHeight: "100%",
1802
+ minWidth: "256px",
1803
+ popoverPlacement: "bottom-end",
1804
+ children: observedComponents.slice(menuIndex).map((component)=>/*#__PURE__*/ jsxRuntime.jsx(React__namespace.Fragment, {
1805
+ children: component.menu
1806
+ }, component.key))
1807
+ })
1808
+ ]
1809
+ }, "more-menu"));
1810
+ };
1811
+
1721
1812
  const ToolbarWrapper = styledComponents.styled(designSystem.Flex)`
1722
1813
  &[aria-disabled='true'] {
1723
1814
  cursor: not-allowed;
1724
1815
  background: ${({ theme })=>theme.colors.neutral150};
1725
1816
  }
1726
1817
  `;
1727
- const Separator = styledComponents.styled(Toolbar__namespace.Separator)`
1818
+ const ToolbarSeparator = styledComponents.styled(Toolbar__namespace.Separator)`
1728
1819
  background: ${({ theme })=>theme.colors.neutral150};
1729
1820
  width: 1px;
1730
1821
  height: 2.4rem;
@@ -1794,7 +1885,7 @@ const ToolbarButton = ({ icon: Icon, name, label, isActive, disabled, handleClic
1794
1885
  const labelMessage = formatMessage(label);
1795
1886
  const enabledColor = isActive ? 'primary600' : 'neutral600';
1796
1887
  return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Tooltip, {
1797
- description: labelMessage,
1888
+ label: labelMessage,
1798
1889
  children: /*#__PURE__*/ jsxRuntime.jsx(Toolbar__namespace.ToggleItem, {
1799
1890
  value: name,
1800
1891
  "data-state": isActive ? 'on' : 'off',
@@ -1986,8 +2077,9 @@ const BlockOption = ({ value, icon: Icon, label, blockSelected })=>{
1986
2077
  const isListNode = (node)=>{
1987
2078
  return slate.Node.isNode(node) && !slate.Editor.isEditor(node) && node.type === 'list';
1988
2079
  };
1989
- const ListButton = ({ block, format })=>{
2080
+ const ListButton = ({ block, format, location = 'toolbar' })=>{
1990
2081
  const { editor, disabled, blocks } = useBlocksEditorContext('ListButton');
2082
+ const { formatMessage } = reactIntl.useIntl();
1991
2083
  const isListActive = ()=>{
1992
2084
  if (!editor.selection) return false;
1993
2085
  // Get the parent list at selection anchor node
@@ -2063,6 +2155,18 @@ const ListButton = ({ block, format })=>{
2063
2155
  }
2064
2156
  }
2065
2157
  };
2158
+ if (location === 'menu') {
2159
+ const Icon = block.icon;
2160
+ return /*#__PURE__*/ jsxRuntime.jsxs(StyledMenuItem, {
2161
+ onSelect: ()=>toggleList(format),
2162
+ isActive: isListActive(),
2163
+ disabled: isListDisabled(),
2164
+ children: [
2165
+ /*#__PURE__*/ jsxRuntime.jsx(Icon, {}),
2166
+ formatMessage(block.label)
2167
+ ]
2168
+ });
2169
+ }
2066
2170
  return /*#__PURE__*/ jsxRuntime.jsx(ToolbarButton, {
2067
2171
  icon: block.icon,
2068
2172
  name: format,
@@ -2072,8 +2176,9 @@ const ListButton = ({ block, format })=>{
2072
2176
  handleClick: ()=>toggleList(format)
2073
2177
  });
2074
2178
  };
2075
- const LinkButton = ({ disabled })=>{
2179
+ const LinkButton = ({ disabled, location = 'toolbar' })=>{
2076
2180
  const { editor } = useBlocksEditorContext('LinkButton');
2181
+ const { formatMessage } = reactIntl.useIntl();
2077
2182
  const isLinkActive = ()=>{
2078
2183
  const { selection } = editor;
2079
2184
  if (!selection) return false;
@@ -2114,20 +2219,55 @@ const LinkButton = ({ disabled })=>{
2114
2219
  url: ''
2115
2220
  });
2116
2221
  };
2222
+ const label = {
2223
+ id: 'components.Blocks.link',
2224
+ defaultMessage: 'Link'
2225
+ };
2226
+ if (location === 'menu') {
2227
+ return /*#__PURE__*/ jsxRuntime.jsxs(StyledMenuItem, {
2228
+ onSelect: addLink,
2229
+ isActive: isLinkActive(),
2230
+ disabled: isLinkDisabled(),
2231
+ children: [
2232
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.Link, {}),
2233
+ formatMessage(label)
2234
+ ]
2235
+ });
2236
+ }
2117
2237
  return /*#__PURE__*/ jsxRuntime.jsx(ToolbarButton, {
2118
2238
  icon: Icons.Link,
2119
2239
  name: "link",
2120
- label: {
2121
- id: 'components.Blocks.link',
2122
- defaultMessage: 'Link'
2123
- },
2240
+ label: label,
2124
2241
  isActive: isLinkActive(),
2125
2242
  handleClick: addLink,
2126
2243
  disabled: isLinkDisabled()
2127
2244
  });
2128
2245
  };
2246
+ const StyledMenuItem = styledComponents.styled(designSystem.Menu.Item)`
2247
+ &:hover {
2248
+ background-color: ${({ theme })=>theme.colors.primary100};
2249
+ }
2250
+
2251
+ ${(props)=>props.isActive && styledComponents.css`
2252
+ font-weight: bold;
2253
+ background-color: ${({ theme })=>theme.colors.primary100};
2254
+ color: ${({ theme })=>theme.colors.primary600};
2255
+ font-weight: bold;
2256
+ `}
2257
+
2258
+ > span {
2259
+ display: inline-flex;
2260
+ gap: ${({ theme })=>theme.spaces[2]};
2261
+ align-items: center;
2262
+ }
2263
+
2264
+ svg {
2265
+ fill: ${({ theme, isActive })=>isActive ? theme.colors.primary600 : theme.colors.neutral600};
2266
+ }
2267
+ `;
2129
2268
  const BlocksToolbar = ()=>{
2130
2269
  const { editor, blocks, modifiers, disabled } = useBlocksEditorContext('BlocksToolbar');
2270
+ const { formatMessage } = reactIntl.useIntl();
2131
2271
  /**
2132
2272
  * The modifier buttons are disabled when an image is selected.
2133
2273
  */ const checkButtonDisabled = ()=>{
@@ -2148,6 +2288,94 @@ const BlocksToolbar = ()=>{
2148
2288
  return false;
2149
2289
  };
2150
2290
  const isButtonDisabled = checkButtonDisabled();
2291
+ /**
2292
+ * Observed components are ones that may or may not be visible in the toolbar, depending on the
2293
+ * available space. They provide two render props:
2294
+ * - renderInToolbar: for when we try to render the component in the toolbar (may be hidden)
2295
+ * - renderInMenu: for when the component didn't fit in the toolbar and is relegated
2296
+ * to the "more" menu
2297
+ */ const observedComponents = [
2298
+ ...Object.entries(modifiers).map(([name, modifier])=>{
2299
+ const Icon = modifier.icon;
2300
+ const isActive = modifier.checkIsActive(editor);
2301
+ const handleSelect = ()=>modifier.handleToggle(editor);
2302
+ return {
2303
+ toolbar: /*#__PURE__*/ jsxRuntime.jsx(ToolbarButton, {
2304
+ name: name,
2305
+ icon: modifier.icon,
2306
+ label: modifier.label,
2307
+ isActive: modifier.checkIsActive(editor),
2308
+ handleClick: handleSelect,
2309
+ disabled: isButtonDisabled
2310
+ }, name),
2311
+ menu: /*#__PURE__*/ jsxRuntime.jsxs(StyledMenuItem, {
2312
+ onSelect: handleSelect,
2313
+ isActive: isActive,
2314
+ children: [
2315
+ /*#__PURE__*/ jsxRuntime.jsx(Icon, {}),
2316
+ formatMessage(modifier.label)
2317
+ ]
2318
+ }),
2319
+ key: `modifier.${name}`
2320
+ };
2321
+ }),
2322
+ {
2323
+ toolbar: /*#__PURE__*/ jsxRuntime.jsx(LinkButton, {
2324
+ disabled: isButtonDisabled,
2325
+ location: "toolbar"
2326
+ }),
2327
+ menu: /*#__PURE__*/ jsxRuntime.jsx(LinkButton, {
2328
+ disabled: isButtonDisabled,
2329
+ location: "menu"
2330
+ }),
2331
+ key: 'block.link'
2332
+ },
2333
+ {
2334
+ // List buttons can only be rendered together when in the toolbar
2335
+ toolbar: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
2336
+ direction: "row",
2337
+ gap: 1,
2338
+ children: [
2339
+ /*#__PURE__*/ jsxRuntime.jsx(ToolbarSeparator, {}),
2340
+ /*#__PURE__*/ jsxRuntime.jsx(Toolbar__namespace.ToggleGroup, {
2341
+ type: "single",
2342
+ asChild: true,
2343
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
2344
+ gap: 1,
2345
+ children: [
2346
+ /*#__PURE__*/ jsxRuntime.jsx(ListButton, {
2347
+ block: blocks['list-unordered'],
2348
+ format: "unordered",
2349
+ location: "toolbar"
2350
+ }),
2351
+ /*#__PURE__*/ jsxRuntime.jsx(ListButton, {
2352
+ block: blocks['list-ordered'],
2353
+ format: "ordered",
2354
+ location: "toolbar"
2355
+ })
2356
+ ]
2357
+ })
2358
+ })
2359
+ ]
2360
+ }),
2361
+ menu: /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
2362
+ children: [
2363
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Separator, {}),
2364
+ /*#__PURE__*/ jsxRuntime.jsx(ListButton, {
2365
+ block: blocks['list-unordered'],
2366
+ format: "unordered",
2367
+ location: "menu"
2368
+ }),
2369
+ /*#__PURE__*/ jsxRuntime.jsx(ListButton, {
2370
+ block: blocks['list-ordered'],
2371
+ format: "ordered",
2372
+ location: "menu"
2373
+ })
2374
+ ]
2375
+ }),
2376
+ key: 'block.list'
2377
+ }
2378
+ ];
2151
2379
  return /*#__PURE__*/ jsxRuntime.jsx(Toolbar__namespace.Root, {
2152
2380
  "aria-disabled": disabled,
2153
2381
  asChild: true,
@@ -2157,43 +2385,18 @@ const BlocksToolbar = ()=>{
2157
2385
  width: "100%",
2158
2386
  children: [
2159
2387
  /*#__PURE__*/ jsxRuntime.jsx(BlocksDropdown, {}),
2160
- /*#__PURE__*/ jsxRuntime.jsx(Separator, {}),
2388
+ /*#__PURE__*/ jsxRuntime.jsx(ToolbarSeparator, {}),
2161
2389
  /*#__PURE__*/ jsxRuntime.jsx(Toolbar__namespace.ToggleGroup, {
2162
2390
  type: "multiple",
2163
2391
  asChild: true,
2164
- children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
2165
- gap: 1,
2166
- children: [
2167
- Object.entries(modifiers).map(([name, modifier])=>/*#__PURE__*/ jsxRuntime.jsx(ToolbarButton, {
2168
- name: name,
2169
- icon: modifier.icon,
2170
- label: modifier.label,
2171
- isActive: modifier.checkIsActive(editor),
2172
- handleClick: ()=>modifier.handleToggle(editor),
2173
- disabled: isButtonDisabled
2174
- }, name)),
2175
- /*#__PURE__*/ jsxRuntime.jsx(LinkButton, {
2176
- disabled: isButtonDisabled
2177
- })
2178
- ]
2179
- })
2180
- }),
2181
- /*#__PURE__*/ jsxRuntime.jsx(Separator, {}),
2182
- /*#__PURE__*/ jsxRuntime.jsx(Toolbar__namespace.ToggleGroup, {
2183
- type: "single",
2184
- asChild: true,
2185
- children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
2392
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
2393
+ direction: "row",
2186
2394
  gap: 1,
2187
- children: [
2188
- /*#__PURE__*/ jsxRuntime.jsx(ListButton, {
2189
- block: blocks['list-unordered'],
2190
- format: "unordered"
2191
- }),
2192
- /*#__PURE__*/ jsxRuntime.jsx(ListButton, {
2193
- block: blocks['list-ordered'],
2194
- format: "ordered"
2195
- })
2196
- ]
2395
+ grow: 1,
2396
+ overflow: "hidden",
2397
+ children: /*#__PURE__*/ jsxRuntime.jsx(EditorToolbarObserver, {
2398
+ observedComponents: observedComponents
2399
+ })
2197
2400
  })
2198
2401
  })
2199
2402
  ]
@@ -5549,14 +5752,14 @@ const quoteAndCodeHandler = (editor, markdownType)=>{
5549
5752
  };
5550
5753
 
5551
5754
  // NAV BUTTONS
5552
- const MainButtons = styledComponents.styled(designSystem.IconButtonGroup)`
5755
+ styledComponents.styled(designSystem.IconButtonGroup)`
5553
5756
  margin-left: ${({ theme })=>theme.spaces[4]};
5554
5757
  `;
5555
- const MoreButton = styledComponents.styled(designSystem.IconButton)`
5758
+ styledComponents.styled(designSystem.IconButton)`
5556
5759
  margin: ${({ theme })=>`0 ${theme.spaces[2]}`};
5557
5760
  `;
5558
5761
  // NAV
5559
- const IconButtonGroupMargin = styledComponents.styled(designSystem.IconButtonGroup)`
5762
+ styledComponents.styled(designSystem.IconButtonGroup)`
5560
5763
  margin-right: ${({ theme })=>`${theme.spaces[2]}`};
5561
5764
  `;
5562
5765
  // FOOTER
@@ -5614,245 +5817,515 @@ const WysiwygFooter = ({ onToggleExpand })=>{
5614
5817
 
5615
5818
  /**
5616
5819
  * TODO: refactor this mess.
5617
- */ const WysiwygNav = ({ disabled, editorRef, isExpandMode, isPreviewMode, onActionClick, onToggleMediaLib, onTogglePreviewMode })=>{
5618
- const [visiblePopover, setVisiblePopover] = React__namespace.useState(false);
5820
+ */ const WysiwygNav = ({ disabled, editorRef, isPreviewMode, onToggleMediaLib, onTogglePreviewMode })=>{
5619
5821
  const { formatMessage } = reactIntl.useIntl();
5620
- const selectPlaceholder = formatMessage({
5621
- id: 'components.Wysiwyg.selectOptions.title',
5622
- defaultMessage: 'Add a title'
5623
- });
5624
- React__namespace.useRef(null);
5625
- const handleTogglePopover = ()=>{
5626
- setVisiblePopover((prev)=>!prev);
5822
+ const isDisabled = disabled || isPreviewMode;
5823
+ const handleActionClick = (value, currentEditorRef)=>{
5824
+ switch(value){
5825
+ case 'Link':
5826
+ {
5827
+ markdownHandler(currentEditorRef, value);
5828
+ break;
5829
+ }
5830
+ case 'Code':
5831
+ case 'Quote':
5832
+ {
5833
+ quoteAndCodeHandler(currentEditorRef, value);
5834
+ break;
5835
+ }
5836
+ case 'Bold':
5837
+ case 'Italic':
5838
+ case 'Underline':
5839
+ case 'Strikethrough':
5840
+ {
5841
+ markdownHandler(currentEditorRef, value);
5842
+ break;
5843
+ }
5844
+ case 'BulletList':
5845
+ case 'NumberList':
5846
+ {
5847
+ listHandler(currentEditorRef, value);
5848
+ break;
5849
+ }
5850
+ case 'h1':
5851
+ case 'h2':
5852
+ case 'h3':
5853
+ case 'h4':
5854
+ case 'h5':
5855
+ case 'h6':
5856
+ {
5857
+ titleHandler(currentEditorRef, value);
5858
+ break;
5859
+ }
5860
+ }
5627
5861
  };
5628
- if (disabled || isPreviewMode) {
5629
- return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
5630
- padding: 2,
5631
- background: "neutral100",
5632
- justifyContent: "space-between",
5633
- borderRadius: `0.4rem 0.4rem 0 0`,
5634
- children: [
5635
- /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
5636
- children: [
5637
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Root, {
5638
- children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.SingleSelect, {
5639
- disabled: true,
5640
- placeholder: selectPlaceholder,
5641
- "aria-label": selectPlaceholder,
5642
- size: "S",
5643
- children: [
5644
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5645
- value: "h1",
5646
- children: "h1"
5647
- }),
5648
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5649
- value: "h2",
5650
- children: "h2"
5651
- }),
5652
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5653
- value: "h3",
5654
- children: "h3"
5655
- }),
5656
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5657
- value: "h4",
5658
- children: "h4"
5659
- }),
5660
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5661
- value: "h5",
5662
- children: "h5"
5663
- }),
5664
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5665
- value: "h6",
5666
- children: "h6"
5667
- })
5668
- ]
5669
- })
5862
+ const observedComponents = [
5863
+ {
5864
+ toolbar: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.IconButtonGroup, {
5865
+ children: [
5866
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5867
+ disabled: isDisabled,
5868
+ onClick: ()=>handleActionClick('Bold', editorRef),
5869
+ label: formatMessage({
5870
+ id: 'components.Blocks.modifiers.bold',
5871
+ defaultMessage: 'Bold'
5872
+ }),
5873
+ name: formatMessage({
5874
+ id: 'components.Blocks.modifiers.bold',
5875
+ defaultMessage: 'Bold'
5670
5876
  }),
5671
- /*#__PURE__*/ jsxRuntime.jsxs(MainButtons, {
5877
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Bold, {})
5878
+ }),
5879
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5880
+ disabled: isDisabled,
5881
+ onClick: ()=>handleActionClick('Italic', editorRef),
5882
+ label: formatMessage({
5883
+ id: 'components.Blocks.modifiers.italic',
5884
+ defaultMessage: 'Italic'
5885
+ }),
5886
+ name: formatMessage({
5887
+ id: 'components.Blocks.modifiers.italic',
5888
+ defaultMessage: 'Italic'
5889
+ }),
5890
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Italic, {})
5891
+ }),
5892
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5893
+ disabled: isDisabled,
5894
+ onClick: ()=>handleActionClick('Underline', editorRef),
5895
+ label: formatMessage({
5896
+ id: 'components.Blocks.modifiers.underline',
5897
+ defaultMessage: 'Underline'
5898
+ }),
5899
+ name: formatMessage({
5900
+ id: 'components.Blocks.modifiers.underline',
5901
+ defaultMessage: 'Underline'
5902
+ }),
5903
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Underline, {})
5904
+ }),
5905
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5906
+ disabled: isDisabled,
5907
+ onClick: ()=>handleActionClick('Strikethrough', editorRef),
5908
+ label: formatMessage({
5909
+ id: 'components.Blocks.modifiers.strikethrough',
5910
+ defaultMessage: 'Strikethrough'
5911
+ }),
5912
+ name: formatMessage({
5913
+ id: 'components.Blocks.modifiers.strikethrough',
5914
+ defaultMessage: 'Strikethrough'
5915
+ }),
5916
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.StrikeThrough, {})
5917
+ })
5918
+ ]
5919
+ }),
5920
+ menu: /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
5921
+ children: [
5922
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Separator, {}),
5923
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
5924
+ onSelect: ()=>handleActionClick('Bold', editorRef),
5925
+ disabled: isDisabled,
5926
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
5927
+ tag: "span",
5928
+ gap: 2,
5672
5929
  children: [
5673
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5674
- disabled: true,
5675
- label: "Bold",
5676
- name: "Bold",
5677
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Bold, {})
5930
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.Bold, {
5931
+ "aria-hidden": true,
5932
+ fill: "neutral600"
5678
5933
  }),
5679
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5680
- disabled: true,
5681
- label: "Italic",
5682
- name: "Italic",
5683
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Italic, {})
5934
+ formatMessage({
5935
+ id: 'components.Blocks.modifiers.bold',
5936
+ defaultMessage: 'Bold'
5937
+ })
5938
+ ]
5939
+ })
5940
+ }),
5941
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
5942
+ onSelect: ()=>handleActionClick('Italic', editorRef),
5943
+ disabled: isDisabled,
5944
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
5945
+ tag: "span",
5946
+ gap: 2,
5947
+ children: [
5948
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.Italic, {
5949
+ "aria-hidden": true,
5950
+ fill: "neutral600"
5684
5951
  }),
5685
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5686
- disabled: true,
5687
- label: "Underline",
5688
- name: "Underline",
5689
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Underline, {})
5952
+ formatMessage({
5953
+ id: 'components.Blocks.modifiers.italic',
5954
+ defaultMessage: 'Italic'
5955
+ })
5956
+ ]
5957
+ })
5958
+ }),
5959
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
5960
+ onSelect: ()=>handleActionClick('Underline', editorRef),
5961
+ disabled: isDisabled,
5962
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
5963
+ tag: "span",
5964
+ gap: 2,
5965
+ children: [
5966
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.Underline, {
5967
+ "aria-hidden": true,
5968
+ fill: "neutral600"
5969
+ }),
5970
+ formatMessage({
5971
+ id: 'components.Blocks.modifiers.underline',
5972
+ defaultMessage: 'Underline'
5973
+ })
5974
+ ]
5975
+ })
5976
+ }),
5977
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
5978
+ onSelect: ()=>handleActionClick('Strikethrough', editorRef),
5979
+ disabled: isDisabled,
5980
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
5981
+ tag: "span",
5982
+ gap: 2,
5983
+ children: [
5984
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.StrikeThrough, {
5985
+ "aria-hidden": true,
5986
+ fill: "neutral600"
5987
+ }),
5988
+ formatMessage({
5989
+ id: 'components.Blocks.modifiers.strikethrough',
5990
+ defaultMessage: 'Strikethrough'
5690
5991
  })
5691
5992
  ]
5692
- }),
5693
- /*#__PURE__*/ jsxRuntime.jsx(MoreButton, {
5694
- disabled: true,
5695
- label: "More",
5696
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.More, {})
5697
5993
  })
5698
- ]
5699
- }),
5700
- !isExpandMode && /*#__PURE__*/ jsxRuntime.jsx(designSystem.Button, {
5701
- onClick: onTogglePreviewMode,
5702
- variant: "tertiary",
5703
- children: formatMessage({
5704
- id: 'components.Wysiwyg.ToggleMode.markdown-mode',
5705
- defaultMessage: 'Markdown mode'
5706
5994
  })
5707
- })
5708
- ]
5709
- });
5710
- }
5711
- return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
5712
- padding: 2,
5713
- background: "neutral100",
5714
- justifyContent: "space-between",
5715
- borderRadius: `0.4rem 0.4rem 0 0`,
5716
- children: [
5717
- /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
5995
+ ]
5996
+ }),
5997
+ key: 'formatting-group-1'
5998
+ },
5999
+ {
6000
+ toolbar: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.IconButtonGroup, {
5718
6001
  children: [
5719
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Root, {
5720
- children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.SingleSelect, {
5721
- placeholder: selectPlaceholder,
5722
- "aria-label": selectPlaceholder,
5723
- // @ts-expect-error – DS v2 will only allow strings.
5724
- onChange: (value)=>onActionClick(value, editorRef),
5725
- size: "S",
6002
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
6003
+ disabled: isDisabled,
6004
+ onClick: ()=>handleActionClick('BulletList', editorRef),
6005
+ label: formatMessage({
6006
+ id: 'components.Blocks.blocks.bulletList',
6007
+ defaultMessage: 'Bulleted list'
6008
+ }),
6009
+ name: formatMessage({
6010
+ id: 'components.Blocks.blocks.bulletList',
6011
+ defaultMessage: 'Bulleted list'
6012
+ }),
6013
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.BulletList, {})
6014
+ }),
6015
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
6016
+ disabled: isDisabled,
6017
+ onClick: ()=>handleActionClick('NumberList', editorRef),
6018
+ label: formatMessage({
6019
+ id: 'components.Blocks.blocks.numberList',
6020
+ defaultMessage: 'Numbered list'
6021
+ }),
6022
+ name: formatMessage({
6023
+ id: 'components.Blocks.blocks.numberList',
6024
+ defaultMessage: 'Numbered list'
6025
+ }),
6026
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.NumberList, {})
6027
+ })
6028
+ ]
6029
+ }),
6030
+ menu: /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
6031
+ children: [
6032
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Separator, {}),
6033
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
6034
+ onSelect: ()=>handleActionClick('BulletList', editorRef),
6035
+ disabled: isDisabled,
6036
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
6037
+ tag: "span",
6038
+ gap: 2,
5726
6039
  children: [
5727
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5728
- value: "h1",
5729
- children: "h1"
6040
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.BulletList, {
6041
+ "aria-hidden": true,
6042
+ fill: "neutral600"
5730
6043
  }),
5731
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5732
- value: "h2",
5733
- children: "h2"
6044
+ formatMessage({
6045
+ id: 'components.Blocks.blocks.unorderedList',
6046
+ defaultMessage: 'Bulleted list'
6047
+ })
6048
+ ]
6049
+ })
6050
+ }),
6051
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
6052
+ onSelect: ()=>handleActionClick('NumberList', editorRef),
6053
+ disabled: isDisabled,
6054
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
6055
+ tag: "span",
6056
+ gap: 2,
6057
+ children: [
6058
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.NumberList, {
6059
+ "aria-hidden": true,
6060
+ fill: "neutral600"
5734
6061
  }),
5735
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5736
- value: "h3",
5737
- children: "h3"
6062
+ formatMessage({
6063
+ id: 'components.Blocks.blocks.orderedList',
6064
+ defaultMessage: 'Numbered list'
6065
+ })
6066
+ ]
6067
+ })
6068
+ })
6069
+ ]
6070
+ }),
6071
+ key: 'formatting-group-2'
6072
+ },
6073
+ {
6074
+ toolbar: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.IconButtonGroup, {
6075
+ children: [
6076
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
6077
+ disabled: isDisabled,
6078
+ onClick: ()=>handleActionClick('Code', editorRef),
6079
+ label: formatMessage({
6080
+ id: 'components.Wysiwyg.blocks.code',
6081
+ defaultMessage: 'Code'
6082
+ }),
6083
+ name: formatMessage({
6084
+ id: 'components.Wysiwyg.blocks.code',
6085
+ defaultMessage: 'Code'
6086
+ }),
6087
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Code, {})
6088
+ }),
6089
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
6090
+ disabled: isDisabled,
6091
+ onClick: ()=>{
6092
+ onToggleMediaLib();
6093
+ },
6094
+ label: formatMessage({
6095
+ id: 'components.Blocks.blocks.image',
6096
+ defaultMessage: 'Image'
6097
+ }),
6098
+ name: formatMessage({
6099
+ id: 'components.Blocks.blocks.image',
6100
+ defaultMessage: 'Image'
6101
+ }),
6102
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Image, {})
6103
+ }),
6104
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
6105
+ disabled: isDisabled,
6106
+ onClick: ()=>handleActionClick('Link', editorRef),
6107
+ label: formatMessage({
6108
+ id: 'components.Blocks.popover.link',
6109
+ defaultMessage: 'Link'
6110
+ }),
6111
+ name: formatMessage({
6112
+ id: 'components.Blocks.popover.link',
6113
+ defaultMessage: 'Link'
6114
+ }),
6115
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Link, {})
6116
+ }),
6117
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
6118
+ disabled: isDisabled,
6119
+ onClick: ()=>handleActionClick('Quote', editorRef),
6120
+ label: formatMessage({
6121
+ id: 'components.Blocks.blocks.quote',
6122
+ defaultMessage: 'Quote'
6123
+ }),
6124
+ name: formatMessage({
6125
+ id: 'components.Blocks.blocks.quote',
6126
+ defaultMessage: 'Quote'
6127
+ }),
6128
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Quotes, {})
6129
+ })
6130
+ ]
6131
+ }),
6132
+ menu: /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
6133
+ children: [
6134
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Separator, {}),
6135
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
6136
+ onSelect: ()=>handleActionClick('Code', editorRef),
6137
+ disabled: isDisabled,
6138
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
6139
+ tag: "span",
6140
+ gap: 2,
6141
+ children: [
6142
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.Code, {
6143
+ "aria-hidden": true,
6144
+ fill: "neutral600"
5738
6145
  }),
5739
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5740
- value: "h4",
5741
- children: "h4"
6146
+ formatMessage({
6147
+ id: 'components.Wysiwyg.blocks.code',
6148
+ defaultMessage: 'Code'
6149
+ })
6150
+ ]
6151
+ })
6152
+ }),
6153
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
6154
+ startIcon: /*#__PURE__*/ jsxRuntime.jsx(Icons.Image, {}),
6155
+ onSelect: ()=>{
6156
+ onToggleMediaLib();
6157
+ },
6158
+ disabled: isDisabled,
6159
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
6160
+ tag: "span",
6161
+ gap: 2,
6162
+ children: [
6163
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.Image, {
6164
+ "aria-hidden": true,
6165
+ fill: "neutral600"
5742
6166
  }),
5743
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5744
- value: "h5",
5745
- children: "h5"
6167
+ formatMessage({
6168
+ id: 'components.Blocks.blocks.image',
6169
+ defaultMessage: 'Image'
6170
+ })
6171
+ ]
6172
+ })
6173
+ }),
6174
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
6175
+ startIcon: /*#__PURE__*/ jsxRuntime.jsx(Icons.Link, {}),
6176
+ onSelect: ()=>handleActionClick('Link', editorRef),
6177
+ disabled: isDisabled,
6178
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
6179
+ tag: "span",
6180
+ gap: 2,
6181
+ children: [
6182
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.Link, {
6183
+ "aria-hidden": true,
6184
+ fill: "neutral600"
5746
6185
  }),
5747
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
5748
- value: "h6",
5749
- children: "h6"
6186
+ formatMessage({
6187
+ id: 'components.Blocks.popover.link',
6188
+ defaultMessage: 'Link'
5750
6189
  })
5751
6190
  ]
5752
6191
  })
5753
6192
  }),
5754
- /*#__PURE__*/ jsxRuntime.jsxs(MainButtons, {
5755
- children: [
5756
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5757
- onClick: ()=>onActionClick('Bold', editorRef),
5758
- label: "Bold",
5759
- name: "Bold",
5760
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Bold, {})
6193
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Menu.Item, {
6194
+ onSelect: ()=>handleActionClick('Quote', editorRef),
6195
+ disabled: isDisabled,
6196
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
6197
+ tag: "span",
6198
+ gap: 2,
6199
+ children: [
6200
+ /*#__PURE__*/ jsxRuntime.jsx(Icons.Quotes, {
6201
+ "aria-hidden": true,
6202
+ fill: "neutral600"
6203
+ }),
6204
+ formatMessage({
6205
+ id: 'components.Blocks.blocks.quote',
6206
+ defaultMessage: 'Quote'
6207
+ })
6208
+ ]
6209
+ })
6210
+ })
6211
+ ]
6212
+ }),
6213
+ key: 'formatting-group-3'
6214
+ }
6215
+ ];
6216
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
6217
+ padding: 2,
6218
+ background: "neutral100",
6219
+ justifyContent: "space-between",
6220
+ borderRadius: "0.4rem 0.4rem 0 0",
6221
+ width: "100%",
6222
+ gap: 4,
6223
+ children: [
6224
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Root, {
6225
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.SingleSelect, {
6226
+ disabled: isDisabled,
6227
+ placeholder: formatMessage({
6228
+ id: 'components.Wysiwyg.selectOptions.title',
6229
+ defaultMessage: 'Headings'
6230
+ }),
6231
+ "aria-label": formatMessage({
6232
+ id: 'components.Wysiwyg.selectOptions.title',
6233
+ defaultMessage: 'Headings'
6234
+ }),
6235
+ // @ts-expect-error – DS v2 will only allow strings.
6236
+ onChange: (value)=>handleActionClick(value, editorRef),
6237
+ size: "S",
6238
+ children: [
6239
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
6240
+ value: "h1",
6241
+ startIcon: /*#__PURE__*/ jsxRuntime.jsx(Icons.HeadingOne, {
6242
+ fill: "neutral600"
5761
6243
  }),
5762
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5763
- onClick: ()=>onActionClick('Italic', editorRef),
5764
- label: "Italic",
5765
- name: "Italic",
5766
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Italic, {})
6244
+ children: formatMessage({
6245
+ id: 'components.Wysiwyg.selectOptions.H1',
6246
+ defaultMessage: 'Heading 1'
6247
+ })
6248
+ }),
6249
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
6250
+ value: "h2",
6251
+ startIcon: /*#__PURE__*/ jsxRuntime.jsx(Icons.HeadingTwo, {
6252
+ fill: "neutral600"
5767
6253
  }),
5768
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5769
- onClick: ()=>onActionClick('Underline', editorRef),
5770
- label: "Underline",
5771
- name: "Underline",
5772
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Underline, {})
6254
+ children: formatMessage({
6255
+ id: 'components.Wysiwyg.selectOptions.H2',
6256
+ defaultMessage: 'Heading 2'
5773
6257
  })
5774
- ]
5775
- }),
5776
- /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Popover.Root, {
5777
- children: [
5778
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Popover.Trigger, {
5779
- children: /*#__PURE__*/ jsxRuntime.jsx(MoreButton, {
5780
- label: "More",
5781
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.More, {})
5782
- })
6258
+ }),
6259
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
6260
+ value: "h3",
6261
+ startIcon: /*#__PURE__*/ jsxRuntime.jsx(Icons.HeadingThree, {
6262
+ fill: "neutral600"
5783
6263
  }),
5784
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Popover.Content, {
5785
- sideOffset: 12,
5786
- children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
5787
- padding: 2,
5788
- children: [
5789
- /*#__PURE__*/ jsxRuntime.jsxs(IconButtonGroupMargin, {
5790
- children: [
5791
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5792
- onClick: ()=>onActionClick('Strikethrough', editorRef, handleTogglePopover),
5793
- label: "Strikethrough",
5794
- name: "Strikethrough",
5795
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.StrikeThrough, {})
5796
- }),
5797
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5798
- onClick: ()=>onActionClick('BulletList', editorRef, handleTogglePopover),
5799
- label: "BulletList",
5800
- name: "BulletList",
5801
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.BulletList, {})
5802
- }),
5803
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5804
- onClick: ()=>onActionClick('NumberList', editorRef, handleTogglePopover),
5805
- label: "NumberList",
5806
- name: "NumberList",
5807
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.NumberList, {})
5808
- })
5809
- ]
5810
- }),
5811
- /*#__PURE__*/ jsxRuntime.jsxs(designSystem.IconButtonGroup, {
5812
- children: [
5813
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5814
- onClick: ()=>onActionClick('Code', editorRef, handleTogglePopover),
5815
- label: "Code",
5816
- name: "Code",
5817
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Code, {})
5818
- }),
5819
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5820
- onClick: ()=>{
5821
- handleTogglePopover();
5822
- onToggleMediaLib();
5823
- },
5824
- label: "Image",
5825
- name: "Image",
5826
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Image, {})
5827
- }),
5828
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5829
- onClick: ()=>onActionClick('Link', editorRef, handleTogglePopover),
5830
- label: "Link",
5831
- name: "Link",
5832
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Link, {})
5833
- }),
5834
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
5835
- onClick: ()=>onActionClick('Quote', editorRef, handleTogglePopover),
5836
- label: "Quote",
5837
- name: "Quote",
5838
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Quotes, {})
5839
- })
5840
- ]
5841
- })
5842
- ]
5843
- })
6264
+ children: formatMessage({
6265
+ id: 'components.Wysiwyg.selectOptions.H3',
6266
+ defaultMessage: 'Heading 3'
5844
6267
  })
5845
- ]
6268
+ }),
6269
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
6270
+ value: "h4",
6271
+ startIcon: /*#__PURE__*/ jsxRuntime.jsx(Icons.HeadingFour, {
6272
+ fill: "neutral600"
6273
+ }),
6274
+ children: formatMessage({
6275
+ id: 'components.Wysiwyg.selectOptions.H4',
6276
+ defaultMessage: 'Heading 4'
6277
+ })
6278
+ }),
6279
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
6280
+ value: "h5",
6281
+ startIcon: /*#__PURE__*/ jsxRuntime.jsx(Icons.HeadingFive, {
6282
+ fill: "neutral600"
6283
+ }),
6284
+ children: formatMessage({
6285
+ id: 'components.Wysiwyg.selectOptions.H5',
6286
+ defaultMessage: 'Heading 5'
6287
+ })
6288
+ }),
6289
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
6290
+ value: "h6",
6291
+ startIcon: /*#__PURE__*/ jsxRuntime.jsx(Icons.HeadingSix, {
6292
+ fill: "neutral600"
6293
+ }),
6294
+ children: formatMessage({
6295
+ id: 'components.Wysiwyg.selectOptions.H6',
6296
+ defaultMessage: 'Heading 6'
6297
+ })
6298
+ })
6299
+ ]
6300
+ })
6301
+ }),
6302
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
6303
+ width: "100%",
6304
+ justifyContent: "space-between",
6305
+ overflow: "hidden",
6306
+ children: [
6307
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
6308
+ gap: 2,
6309
+ overflow: "hidden",
6310
+ width: "100%",
6311
+ children: /*#__PURE__*/ jsxRuntime.jsx(EditorToolbarObserver, {
6312
+ menuTriggerVariant: "tertiary",
6313
+ observedComponents: observedComponents
6314
+ })
6315
+ }),
6316
+ onTogglePreviewMode && /*#__PURE__*/ jsxRuntime.jsx(designSystem.Button, {
6317
+ onClick: onTogglePreviewMode,
6318
+ variant: "tertiary",
6319
+ minWidth: "132px",
6320
+ children: isPreviewMode ? formatMessage({
6321
+ id: 'components.Wysiwyg.ToggleMode.markdown-mode',
6322
+ defaultMessage: 'Markdown mode'
6323
+ }) : formatMessage({
6324
+ id: 'components.Wysiwyg.ToggleMode.preview-mode',
6325
+ defaultMessage: 'Preview mode'
6326
+ })
5846
6327
  })
5847
6328
  ]
5848
- }),
5849
- onTogglePreviewMode && /*#__PURE__*/ jsxRuntime.jsx(designSystem.Button, {
5850
- onClick: onTogglePreviewMode,
5851
- variant: "tertiary",
5852
- children: formatMessage({
5853
- id: 'components.Wysiwyg.ToggleMode.preview-mode',
5854
- defaultMessage: 'Preview mode'
5855
- })
5856
6329
  })
5857
6330
  ]
5858
6331
  });
@@ -5873,48 +6346,6 @@ const Wysiwyg = /*#__PURE__*/ React__namespace.forwardRef(({ hint, disabled, lab
5873
6346
  setIsPreviewMode(false);
5874
6347
  setIsExpandMode((prev)=>!prev);
5875
6348
  };
5876
- const handleActionClick = (value, currentEditorRef, togglePopover)=>{
5877
- switch(value){
5878
- case 'Link':
5879
- case 'Strikethrough':
5880
- {
5881
- markdownHandler(currentEditorRef, value);
5882
- togglePopover?.();
5883
- break;
5884
- }
5885
- case 'Code':
5886
- case 'Quote':
5887
- {
5888
- quoteAndCodeHandler(currentEditorRef, value);
5889
- togglePopover?.();
5890
- break;
5891
- }
5892
- case 'Bold':
5893
- case 'Italic':
5894
- case 'Underline':
5895
- {
5896
- markdownHandler(currentEditorRef, value);
5897
- break;
5898
- }
5899
- case 'BulletList':
5900
- case 'NumberList':
5901
- {
5902
- listHandler(currentEditorRef, value);
5903
- togglePopover?.();
5904
- break;
5905
- }
5906
- case 'h1':
5907
- case 'h2':
5908
- case 'h3':
5909
- case 'h4':
5910
- case 'h5':
5911
- case 'h6':
5912
- {
5913
- titleHandler(currentEditorRef, value);
5914
- break;
5915
- }
5916
- }
5917
- };
5918
6349
  const handleSelectAssets = (files)=>{
5919
6350
  const formattedFiles = files.map((f)=>({
5920
6351
  alt: f.alternativeText || f.name,
@@ -5949,7 +6380,6 @@ const Wysiwyg = /*#__PURE__*/ React__namespace.forwardRef(({ hint, disabled, lab
5949
6380
  isExpandMode: isExpandMode,
5950
6381
  editorRef: editorRef,
5951
6382
  isPreviewMode: isPreviewMode,
5952
- onActionClick: handleActionClick,
5953
6383
  onToggleMediaLib: handleToggleMediaLib,
5954
6384
  onTogglePreviewMode: isExpandMode ? undefined : handleTogglePreviewMode,
5955
6385
  disabled: disabled
@@ -6094,6 +6524,13 @@ const MemoizedWysiwyg = /*#__PURE__*/ React__namespace.memo(Wysiwyg);
6094
6524
  disabled: fieldIsDisabled
6095
6525
  });
6096
6526
  case 'relation':
6527
+ if (window.strapi.future.isEnabled('unstableRelationsOnTheFly')) {
6528
+ return /*#__PURE__*/ jsxRuntime.jsx(Relations.MemoizedUnstableRelationsField, {
6529
+ ...props,
6530
+ hint: hint,
6531
+ disabled: fieldIsDisabled
6532
+ });
6533
+ }
6097
6534
  return /*#__PURE__*/ jsxRuntime.jsx(Relations.MemoizedRelationsField, {
6098
6535
  ...props,
6099
6536
  hint: hint,
@@ -6206,7 +6643,7 @@ const ResponsiveGridItem = styledComponents.styled(designSystem.Grid.Item)`
6206
6643
  ${({ col })=>col && `grid-column: span ${col};`}
6207
6644
  }
6208
6645
  `;
6209
- const FormLayout = ({ layout })=>{
6646
+ const FormLayout = ({ layout, hasBackground = false })=>{
6210
6647
  const { formatMessage } = reactIntl.useIntl();
6211
6648
  const { model } = index.useDoc();
6212
6649
  return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
@@ -6239,14 +6676,13 @@ const FormLayout = ({ layout })=>{
6239
6676
  }, field.name);
6240
6677
  }
6241
6678
  return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
6242
- hasRadius: true,
6243
- background: "neutral0",
6244
- shadow: "tableShadow",
6245
- paddingLeft: 6,
6246
- paddingRight: 6,
6247
- paddingTop: 6,
6248
- paddingBottom: 6,
6249
- borderColor: "neutral150",
6679
+ ...!hasBackground && {
6680
+ padding: 6,
6681
+ borderColor: 'neutral150',
6682
+ background: 'neutral0',
6683
+ hasRadius: true,
6684
+ shadow: 'tableShadow'
6685
+ },
6250
6686
  children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
6251
6687
  direction: "column",
6252
6688
  alignItems: "stretch",
@@ -6782,4 +7218,4 @@ exports.NotAllowedInput = NotAllowedInput;
6782
7218
  exports.useDynamicZone = useDynamicZone;
6783
7219
  exports.useFieldHint = useFieldHint;
6784
7220
  exports.useLazyComponents = useLazyComponents;
6785
- //# sourceMappingURL=Input-DKc071zK.js.map
7221
+ //# sourceMappingURL=Input-Bv-rqfYH.js.map