@strapi/content-manager 0.0.0-experimental.a65a85fdea97faae8679d3ffc5f9d79af61abd26 → 0.0.0-experimental.abc

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 (184) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/{CardDragPreview-DSVYodBX.js → CardDragPreview-C0QyJgRA.js} +10 -14
  3. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -0
  4. package/dist/_chunks/{CardDragPreview-ikSG4M46.mjs → CardDragPreview-DOxamsuj.mjs} +7 -9
  5. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -0
  6. package/dist/_chunks/{ComponentConfigurationPage--2aLCv-G.mjs → ComponentConfigurationPage-B3yDbeU1.mjs} +3 -3
  7. package/dist/_chunks/{ComponentConfigurationPage--2aLCv-G.mjs.map → ComponentConfigurationPage-B3yDbeU1.mjs.map} +1 -1
  8. package/dist/_chunks/{ComponentConfigurationPage-43KmCNQE.js → ComponentConfigurationPage-KXSuLnQD.js} +3 -3
  9. package/dist/_chunks/{ComponentConfigurationPage-43KmCNQE.js.map → ComponentConfigurationPage-KXSuLnQD.js.map} +1 -1
  10. package/dist/_chunks/{ComponentIcon-BBQsYCVn.js → ComponentIcon-BXdiCGQp.js} +8 -2
  11. package/dist/_chunks/ComponentIcon-BXdiCGQp.js.map +1 -0
  12. package/dist/_chunks/{ComponentIcon-BOFnK76n.mjs → ComponentIcon-u4bIXTFY.mjs} +9 -3
  13. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -0
  14. package/dist/_chunks/{EditConfigurationPage-BfFzJ4Br.js → EditConfigurationPage-BQ17--5R.js} +3 -3
  15. package/dist/_chunks/{EditConfigurationPage-BfFzJ4Br.js.map → EditConfigurationPage-BQ17--5R.js.map} +1 -1
  16. package/dist/_chunks/{EditConfigurationPage-CUcGHHvQ.mjs → EditConfigurationPage-D7PrLO8j.mjs} +3 -3
  17. package/dist/_chunks/{EditConfigurationPage-CUcGHHvQ.mjs.map → EditConfigurationPage-D7PrLO8j.mjs.map} +1 -1
  18. package/dist/_chunks/{EditViewPage-Bm8lgcm6.mjs → EditViewPage-B7VgwJaG.mjs} +58 -47
  19. package/dist/_chunks/EditViewPage-B7VgwJaG.mjs.map +1 -0
  20. package/dist/_chunks/{EditViewPage-CzOT5Kpj.js → EditViewPage-BgjdnGz2.js} +57 -48
  21. package/dist/_chunks/EditViewPage-BgjdnGz2.js.map +1 -0
  22. package/dist/_chunks/{Field-Caef4JjM.js → Field-CdK7ZLmv.js} +1030 -800
  23. package/dist/_chunks/Field-CdK7ZLmv.js.map +1 -0
  24. package/dist/_chunks/{Field-Dlh0uGnL.mjs → Field-tHCw4lGA.mjs} +981 -750
  25. package/dist/_chunks/Field-tHCw4lGA.mjs.map +1 -0
  26. package/dist/_chunks/{Form-EnaQL_6L.mjs → Form-BJxdTv3Q.mjs} +56 -43
  27. package/dist/_chunks/Form-BJxdTv3Q.mjs.map +1 -0
  28. package/dist/_chunks/{Form-BzuAjtRq.js → Form-C_0KTVvV.js} +55 -43
  29. package/dist/_chunks/Form-C_0KTVvV.js.map +1 -0
  30. package/dist/_chunks/{History-D6sbCJvo.mjs → History-DR2txJLE.mjs} +151 -57
  31. package/dist/_chunks/History-DR2txJLE.mjs.map +1 -0
  32. package/dist/_chunks/{History-C17LiyRg.js → History-nuEzM5qm.js} +151 -58
  33. package/dist/_chunks/History-nuEzM5qm.js.map +1 -0
  34. package/dist/_chunks/{ListConfigurationPage-Dks5SX6f.js → ListConfigurationPage-CnB86Psm.js} +70 -61
  35. package/dist/_chunks/ListConfigurationPage-CnB86Psm.js.map +1 -0
  36. package/dist/_chunks/{ListConfigurationPage-Ce4qs7qE.mjs → ListConfigurationPage-voFVtXu6.mjs} +67 -57
  37. package/dist/_chunks/ListConfigurationPage-voFVtXu6.mjs.map +1 -0
  38. package/dist/_chunks/{ListViewPage-Be7S5aKL.mjs → ListViewPage-B_GaWgRH.mjs} +95 -106
  39. package/dist/_chunks/ListViewPage-B_GaWgRH.mjs.map +1 -0
  40. package/dist/_chunks/{ListViewPage-BwrZrPsh.js → ListViewPage-SXIXm-RM.js} +100 -111
  41. package/dist/_chunks/ListViewPage-SXIXm-RM.js.map +1 -0
  42. package/dist/_chunks/{NoContentTypePage-Cu5r1-JT.js → NoContentTypePage-BzsQ3hLZ.js} +5 -5
  43. package/dist/_chunks/NoContentTypePage-BzsQ3hLZ.js.map +1 -0
  44. package/dist/_chunks/{NoContentTypePage-CIPmYQMm.mjs → NoContentTypePage-CYiGpsbj.mjs} +7 -7
  45. package/dist/_chunks/NoContentTypePage-CYiGpsbj.mjs.map +1 -0
  46. package/dist/_chunks/{NoPermissionsPage-DhJ7LYrr.mjs → NoPermissionsPage-B5baIHal.mjs} +5 -6
  47. package/dist/_chunks/NoPermissionsPage-B5baIHal.mjs.map +1 -0
  48. package/dist/_chunks/{NoPermissionsPage-C-j6TEUF.js → NoPermissionsPage-IGkId4C5.js} +4 -5
  49. package/dist/_chunks/NoPermissionsPage-IGkId4C5.js.map +1 -0
  50. package/dist/_chunks/{Relations-CY7AtkDA.mjs → Relations-CIYDdKU-.mjs} +67 -57
  51. package/dist/_chunks/Relations-CIYDdKU-.mjs.map +1 -0
  52. package/dist/_chunks/{Relations-Czs-uZ-s.js → Relations-Dhuurpx2.js} +71 -62
  53. package/dist/_chunks/Relations-Dhuurpx2.js.map +1 -0
  54. package/dist/_chunks/{en-MBPul9Su.mjs → en-BrCTWlZv.mjs} +11 -4
  55. package/dist/_chunks/{en-MBPul9Su.mjs.map → en-BrCTWlZv.mjs.map} +1 -1
  56. package/dist/_chunks/{en-C-V1_90f.js → en-uOUIxfcQ.js} +11 -4
  57. package/dist/_chunks/{en-C-V1_90f.js.map → en-uOUIxfcQ.js.map} +1 -1
  58. package/dist/_chunks/{index-DNVx8ssZ.mjs → index-C9TJPyni.mjs} +1696 -912
  59. package/dist/_chunks/index-C9TJPyni.mjs.map +1 -0
  60. package/dist/_chunks/{index-X_2tafck.js → index-CdT0kHZ8.js} +1626 -843
  61. package/dist/_chunks/index-CdT0kHZ8.js.map +1 -0
  62. package/dist/_chunks/{layout-Dnh0PNp9.mjs → layout-BNqvLR_b.mjs} +45 -28
  63. package/dist/_chunks/layout-BNqvLR_b.mjs.map +1 -0
  64. package/dist/_chunks/{layout-dBc7wN7L.js → layout-C6dxWYT7.js} +45 -30
  65. package/dist/_chunks/layout-C6dxWYT7.js.map +1 -0
  66. package/dist/_chunks/{relations-Dx7tMKJN.mjs → relations-CkKqKw65.mjs} +2 -2
  67. package/dist/_chunks/{relations-Dx7tMKJN.mjs.map → relations-CkKqKw65.mjs.map} +1 -1
  68. package/dist/_chunks/{relations-4pHtBrHJ.js → relations-DtFaDnP1.js} +2 -2
  69. package/dist/_chunks/{relations-4pHtBrHJ.js.map → relations-DtFaDnP1.js.map} +1 -1
  70. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +1 -1
  71. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +1 -1
  72. package/dist/_chunks/usePrev-B9w_-eYc.js +15 -0
  73. package/dist/_chunks/usePrev-B9w_-eYc.js.map +1 -0
  74. package/dist/_chunks/usePrev-DH6iah0A.mjs +16 -0
  75. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +1 -0
  76. package/dist/admin/index.js +2 -1
  77. package/dist/admin/index.js.map +1 -1
  78. package/dist/admin/index.mjs +5 -4
  79. package/dist/admin/src/components/ComponentIcon.d.ts +6 -3
  80. package/dist/admin/src/content-manager.d.ts +3 -3
  81. package/dist/admin/src/exports.d.ts +1 -0
  82. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
  83. package/dist/admin/src/history/index.d.ts +3 -0
  84. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  85. package/dist/admin/src/hooks/useDocument.d.ts +5 -8
  86. package/dist/admin/src/hooks/useDocumentActions.d.ts +24 -3
  87. package/dist/admin/src/hooks/useDocumentLayout.d.ts +2 -2
  88. package/dist/admin/src/hooks/useDragAndDrop.d.ts +4 -4
  89. package/dist/admin/src/hooks/useKeyboardDragAndDrop.d.ts +1 -1
  90. package/dist/admin/src/index.d.ts +1 -0
  91. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +11 -4
  92. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.d.ts +3 -3
  93. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
  94. package/dist/admin/src/pages/EditView/components/FormInputs/Component/Input.d.ts +2 -2
  95. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.d.ts +3 -5
  96. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +1 -1
  97. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +30 -18
  98. package/dist/admin/src/pages/EditView/components/FormInputs/UID.d.ts +2 -2
  99. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +3 -49
  100. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/Field.d.ts +2 -2
  101. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  102. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +48 -53
  103. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +2 -10
  104. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  105. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  106. package/dist/admin/src/pages/ListView/components/BulkActions/PublishAction.d.ts +9 -26
  107. package/dist/admin/src/services/api.d.ts +2 -3
  108. package/dist/admin/src/services/components.d.ts +2 -2
  109. package/dist/admin/src/services/contentTypes.d.ts +5 -5
  110. package/dist/admin/src/services/documents.d.ts +29 -17
  111. package/dist/admin/src/services/init.d.ts +2 -2
  112. package/dist/admin/src/services/relations.d.ts +3 -3
  113. package/dist/admin/src/services/uid.d.ts +3 -3
  114. package/dist/admin/src/utils/api.d.ts +4 -18
  115. package/dist/admin/src/utils/validation.d.ts +1 -6
  116. package/dist/server/index.js +602 -426
  117. package/dist/server/index.js.map +1 -1
  118. package/dist/server/index.mjs +610 -434
  119. package/dist/server/index.mjs.map +1 -1
  120. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  121. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  122. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  123. package/dist/server/src/controllers/utils/metadata.d.ts +8 -0
  124. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -0
  125. package/dist/server/src/controllers/validation/dimensions.d.ts +11 -0
  126. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -0
  127. package/dist/server/src/controllers/validation/index.d.ts +1 -1
  128. package/dist/server/src/history/services/history.d.ts +2 -4
  129. package/dist/server/src/history/services/history.d.ts.map +1 -1
  130. package/dist/server/src/history/services/index.d.ts +6 -2
  131. package/dist/server/src/history/services/index.d.ts.map +1 -1
  132. package/dist/server/src/history/services/lifecycles.d.ts +9 -0
  133. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -0
  134. package/dist/server/src/history/services/utils.d.ts +41 -9
  135. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  136. package/dist/server/src/history/utils.d.ts +6 -2
  137. package/dist/server/src/history/utils.d.ts.map +1 -1
  138. package/dist/server/src/index.d.ts +18 -39
  139. package/dist/server/src/index.d.ts.map +1 -1
  140. package/dist/server/src/services/document-manager.d.ts +13 -12
  141. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  142. package/dist/server/src/services/document-metadata.d.ts +8 -29
  143. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  144. package/dist/server/src/services/index.d.ts +18 -39
  145. package/dist/server/src/services/index.d.ts.map +1 -1
  146. package/dist/server/src/services/utils/populate.d.ts +8 -1
  147. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  148. package/dist/shared/contracts/collection-types.d.ts +14 -6
  149. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  150. package/dist/shared/contracts/relations.d.ts +2 -2
  151. package/dist/shared/contracts/relations.d.ts.map +1 -1
  152. package/package.json +13 -14
  153. package/dist/_chunks/CardDragPreview-DSVYodBX.js.map +0 -1
  154. package/dist/_chunks/CardDragPreview-ikSG4M46.mjs.map +0 -1
  155. package/dist/_chunks/ComponentIcon-BBQsYCVn.js.map +0 -1
  156. package/dist/_chunks/ComponentIcon-BOFnK76n.mjs.map +0 -1
  157. package/dist/_chunks/EditViewPage-Bm8lgcm6.mjs.map +0 -1
  158. package/dist/_chunks/EditViewPage-CzOT5Kpj.js.map +0 -1
  159. package/dist/_chunks/Field-Caef4JjM.js.map +0 -1
  160. package/dist/_chunks/Field-Dlh0uGnL.mjs.map +0 -1
  161. package/dist/_chunks/Form-BzuAjtRq.js.map +0 -1
  162. package/dist/_chunks/Form-EnaQL_6L.mjs.map +0 -1
  163. package/dist/_chunks/History-C17LiyRg.js.map +0 -1
  164. package/dist/_chunks/History-D6sbCJvo.mjs.map +0 -1
  165. package/dist/_chunks/ListConfigurationPage-Ce4qs7qE.mjs.map +0 -1
  166. package/dist/_chunks/ListConfigurationPage-Dks5SX6f.js.map +0 -1
  167. package/dist/_chunks/ListViewPage-Be7S5aKL.mjs.map +0 -1
  168. package/dist/_chunks/ListViewPage-BwrZrPsh.js.map +0 -1
  169. package/dist/_chunks/NoContentTypePage-CIPmYQMm.mjs.map +0 -1
  170. package/dist/_chunks/NoContentTypePage-Cu5r1-JT.js.map +0 -1
  171. package/dist/_chunks/NoPermissionsPage-C-j6TEUF.js.map +0 -1
  172. package/dist/_chunks/NoPermissionsPage-DhJ7LYrr.mjs.map +0 -1
  173. package/dist/_chunks/Relations-CY7AtkDA.mjs.map +0 -1
  174. package/dist/_chunks/Relations-Czs-uZ-s.js.map +0 -1
  175. package/dist/_chunks/index-DNVx8ssZ.mjs.map +0 -1
  176. package/dist/_chunks/index-X_2tafck.js.map +0 -1
  177. package/dist/_chunks/layout-Dnh0PNp9.mjs.map +0 -1
  178. package/dist/_chunks/layout-dBc7wN7L.js.map +0 -1
  179. package/dist/_chunks/urls-CbOsUOoW.mjs +0 -7
  180. package/dist/_chunks/urls-CbOsUOoW.mjs.map +0 -1
  181. package/dist/_chunks/urls-DzZya_gm.js +0 -6
  182. package/dist/_chunks/urls-DzZya_gm.js.map +0 -1
  183. package/dist/server/src/controllers/utils/dimensions.d.ts +0 -5
  184. package/dist/server/src/controllers/utils/dimensions.d.ts.map +0 -1
@@ -5,19 +5,19 @@ 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-X_2tafck.js");
8
+ const index = require("./index-CdT0kHZ8.js");
9
9
  const fractionalIndexing = require("fractional-indexing");
10
- const Relations = require("./Relations-Czs-uZ-s.js");
10
+ const Relations = require("./Relations-Dhuurpx2.js");
11
11
  const Icons = require("@strapi/icons");
12
- const styled = require("styled-components");
13
- const ComponentIcon = require("./ComponentIcon-BBQsYCVn.js");
12
+ const styledComponents = require("styled-components");
13
+ const ComponentIcon = require("./ComponentIcon-BXdiCGQp.js");
14
14
  const reactDndHtml5Backend = require("react-dnd-html5-backend");
15
15
  const useDragAndDrop = require("./useDragAndDrop-J0TUUbR6.js");
16
16
  const objects = require("./objects-gigeqt7s.js");
17
17
  const slate = require("slate");
18
18
  const slateHistory = require("slate-history");
19
19
  const slateReact = require("slate-react");
20
- const urls = require("./urls-DzZya_gm.js");
20
+ const usePrev = require("./usePrev-B9w_-eYc.js");
21
21
  const Toolbar = require("@radix-ui/react-toolbar");
22
22
  const reactRouterDom = require("react-router-dom");
23
23
  const CodeMirror = require("codemirror5");
@@ -56,7 +56,6 @@ function _interopNamespace(e) {
56
56
  }
57
57
  const React__namespace = /* @__PURE__ */ _interopNamespace(React);
58
58
  const pipe__default = /* @__PURE__ */ _interopDefault(pipe$1);
59
- const styled__default = /* @__PURE__ */ _interopDefault(styled);
60
59
  const Toolbar__namespace = /* @__PURE__ */ _interopNamespace(Toolbar);
61
60
  const CodeMirror__default = /* @__PURE__ */ _interopDefault(CodeMirror);
62
61
  const sanitizeHtml__default = /* @__PURE__ */ _interopDefault(sanitizeHtml);
@@ -195,6 +194,220 @@ const useLazyComponents = (componentUids = []) => {
195
194
  }, []);
196
195
  return { isLazyLoading: loading, lazyComponentStore, cleanup };
197
196
  };
197
+ const codeLanguages = [
198
+ {
199
+ value: "asm",
200
+ label: "Assembly"
201
+ },
202
+ {
203
+ value: "bash",
204
+ label: "Bash"
205
+ },
206
+ {
207
+ value: "c",
208
+ label: "C"
209
+ },
210
+ {
211
+ value: "clojure",
212
+ label: "Clojure"
213
+ },
214
+ {
215
+ value: "cobol",
216
+ label: "COBOL"
217
+ },
218
+ {
219
+ value: "cpp",
220
+ label: "C++"
221
+ },
222
+ {
223
+ value: "csharp",
224
+ label: "C#"
225
+ },
226
+ {
227
+ value: "css",
228
+ label: "CSS"
229
+ },
230
+ {
231
+ value: "dart",
232
+ label: "Dart"
233
+ },
234
+ {
235
+ value: "dockerfile",
236
+ label: "Dockerfile"
237
+ },
238
+ {
239
+ value: "elixir",
240
+ label: "Elixir"
241
+ },
242
+ {
243
+ value: "erlang",
244
+ label: "Erlang"
245
+ },
246
+ {
247
+ value: "fortran",
248
+ label: "Fortran"
249
+ },
250
+ {
251
+ value: "fsharp",
252
+ label: "F#"
253
+ },
254
+ {
255
+ value: "go",
256
+ label: "Go"
257
+ },
258
+ {
259
+ value: "graphql",
260
+ label: "GraphQL"
261
+ },
262
+ {
263
+ value: "groovy",
264
+ label: "Groovy"
265
+ },
266
+ {
267
+ value: "haskell",
268
+ label: "Haskell"
269
+ },
270
+ {
271
+ value: "haxe",
272
+ label: "Haxe"
273
+ },
274
+ {
275
+ value: "html",
276
+ label: "HTML"
277
+ },
278
+ {
279
+ value: "ini",
280
+ label: "INI"
281
+ },
282
+ {
283
+ value: "java",
284
+ label: "Java"
285
+ },
286
+ {
287
+ value: "javascript",
288
+ label: "JavaScript"
289
+ },
290
+ {
291
+ value: "jsx",
292
+ label: "JavaScript (React)"
293
+ },
294
+ {
295
+ value: "json",
296
+ label: "JSON"
297
+ },
298
+ {
299
+ value: "julia",
300
+ label: "Julia"
301
+ },
302
+ {
303
+ value: "kotlin",
304
+ label: "Kotlin"
305
+ },
306
+ {
307
+ value: "latex",
308
+ label: "LaTeX"
309
+ },
310
+ {
311
+ value: "lua",
312
+ label: "Lua"
313
+ },
314
+ {
315
+ value: "markdown",
316
+ label: "Markdown"
317
+ },
318
+ {
319
+ value: "matlab",
320
+ label: "MATLAB"
321
+ },
322
+ {
323
+ value: "makefile",
324
+ label: "Makefile"
325
+ },
326
+ {
327
+ value: "objectivec",
328
+ label: "Objective-C"
329
+ },
330
+ {
331
+ value: "perl",
332
+ label: "Perl"
333
+ },
334
+ {
335
+ value: "php",
336
+ label: "PHP"
337
+ },
338
+ {
339
+ value: "plaintext",
340
+ label: "Plain text"
341
+ },
342
+ {
343
+ value: "powershell",
344
+ label: "PowerShell"
345
+ },
346
+ {
347
+ value: "python",
348
+ label: "Python"
349
+ },
350
+ {
351
+ value: "r",
352
+ label: "R"
353
+ },
354
+ {
355
+ value: "ruby",
356
+ label: "Ruby"
357
+ },
358
+ {
359
+ value: "rust",
360
+ label: "Rust"
361
+ },
362
+ {
363
+ value: "sas",
364
+ label: "SAS"
365
+ },
366
+ {
367
+ value: "scala",
368
+ label: "Scala"
369
+ },
370
+ {
371
+ value: "scheme",
372
+ label: "Scheme"
373
+ },
374
+ {
375
+ value: "shell",
376
+ label: "Shell"
377
+ },
378
+ {
379
+ value: "sql",
380
+ label: "SQL"
381
+ },
382
+ {
383
+ value: "stata",
384
+ label: "Stata"
385
+ },
386
+ {
387
+ value: "swift",
388
+ label: "Swift"
389
+ },
390
+ {
391
+ value: "typescript",
392
+ label: "TypeScript"
393
+ },
394
+ {
395
+ value: "tsx",
396
+ label: "TypeScript (React)"
397
+ },
398
+ {
399
+ value: "vbnet",
400
+ label: "VB.NET"
401
+ },
402
+ {
403
+ value: "xml",
404
+ label: "XML"
405
+ },
406
+ {
407
+ value: "yaml",
408
+ label: "YAML"
409
+ }
410
+ ];
198
411
  const baseHandleConvert = (editor, attributesToSet) => {
199
412
  const [_, lastNodePath] = slate.Editor.last(editor, []);
200
413
  slate.Transforms.unwrapNodes(editor, {
@@ -258,13 +471,14 @@ const pressEnterTwiceToExit = (editor) => {
258
471
  });
259
472
  }
260
473
  };
261
- const CodeBlock = styled__default.default.pre.attrs({ role: "code" })`
474
+ const CodeBlock = styledComponents.styled.pre`
262
475
  border-radius: ${({ theme }) => theme.borderRadius};
263
476
  background-color: ${({ theme }) => theme.colors.neutral100};
264
477
  max-width: 100%;
265
478
  overflow: auto;
266
479
  padding: ${({ theme }) => `${theme.spaces[3]} ${theme.spaces[4]}`};
267
480
  flex-shrink: 1;
481
+
268
482
  & > code {
269
483
  font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas,
270
484
  monospace;
@@ -273,9 +487,61 @@ const CodeBlock = styled__default.default.pre.attrs({ role: "code" })`
273
487
  max-width: 100%;
274
488
  }
275
489
  `;
490
+ const CodeEditor = (props) => {
491
+ const { editor } = useBlocksEditorContext("ImageDialog");
492
+ const editorIsFocused = slateReact.useFocused();
493
+ const imageIsSelected = slateReact.useSelected();
494
+ const { formatMessage } = reactIntl.useIntl();
495
+ const [isSelectOpen, setIsSelectOpen] = React__namespace.useState(false);
496
+ const shouldDisplayLanguageSelect = editorIsFocused && imageIsSelected || isSelectOpen;
497
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { position: "relative", width: "100%", children: [
498
+ /* @__PURE__ */ jsxRuntime.jsx(CodeBlock, { ...props.attributes, children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: props.children }) }),
499
+ shouldDisplayLanguageSelect && /* @__PURE__ */ jsxRuntime.jsx(
500
+ designSystem.Box,
501
+ {
502
+ position: "absolute",
503
+ background: "neutral0",
504
+ borderColor: "neutral150",
505
+ borderStyle: "solid",
506
+ borderWidth: "0.5px",
507
+ shadow: "tableShadow",
508
+ top: "100%",
509
+ marginTop: 1,
510
+ right: 0,
511
+ padding: 1,
512
+ hasRadius: true,
513
+ children: /* @__PURE__ */ jsxRuntime.jsx(
514
+ designSystem.SingleSelect,
515
+ {
516
+ onChange: (open) => {
517
+ slate.Transforms.setNodes(
518
+ editor,
519
+ { language: open.toString() },
520
+ { match: (node) => !slate.Editor.isEditor(node) && node.type === "code" }
521
+ );
522
+ },
523
+ value: props.element.type === "code" && props.element.language || "plaintext",
524
+ onOpenChange: (open) => {
525
+ setIsSelectOpen(open);
526
+ if (!open) {
527
+ slateReact.ReactEditor.focus(editor);
528
+ }
529
+ },
530
+ onCloseAutoFocus: (e) => e.preventDefault(),
531
+ "aria-label": formatMessage({
532
+ id: "components.Blocks.blocks.code.languageLabel",
533
+ defaultMessage: "Select a language"
534
+ }),
535
+ children: codeLanguages.map(({ value, label }) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value, children: label }, value))
536
+ }
537
+ )
538
+ }
539
+ )
540
+ ] });
541
+ };
276
542
  const codeBlocks = {
277
543
  code: {
278
- renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(CodeBlock, { ...props.attributes, children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: props.children }) }),
544
+ renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(CodeEditor, { ...props }),
279
545
  icon: Icons.Code,
280
546
  label: {
281
547
  id: "components.Blocks.blocks.code",
@@ -284,7 +550,7 @@ const codeBlocks = {
284
550
  matchNode: (node) => node.type === "code",
285
551
  isInBlocksSelector: true,
286
552
  handleConvert(editor) {
287
- baseHandleConvert(editor, { type: "code" });
553
+ baseHandleConvert(editor, { type: "code", language: "plaintext" });
288
554
  },
289
555
  handleEnterKey(editor) {
290
556
  pressEnterTwiceToExit(editor);
@@ -293,27 +559,27 @@ const codeBlocks = {
293
559
  dragHandleTopMargin: "10px"
294
560
  }
295
561
  };
296
- const H1 = styled__default.default(designSystem.Typography).attrs({ as: "h1" })`
562
+ const H1 = styledComponents.styled(designSystem.Typography).attrs({ tag: "h1" })`
297
563
  font-size: 4.2rem;
298
564
  line-height: ${({ theme }) => theme.lineHeights[1]};
299
565
  `;
300
- const H2 = styled__default.default(designSystem.Typography).attrs({ as: "h2" })`
566
+ const H2 = styledComponents.styled(designSystem.Typography).attrs({ tag: "h2" })`
301
567
  font-size: 3.5rem;
302
568
  line-height: ${({ theme }) => theme.lineHeights[1]};
303
569
  `;
304
- const H3 = styled__default.default(designSystem.Typography).attrs({ as: "h3" })`
570
+ const H3 = styledComponents.styled(designSystem.Typography).attrs({ tag: "h3" })`
305
571
  font-size: 2.9rem;
306
572
  line-height: ${({ theme }) => theme.lineHeights[1]};
307
573
  `;
308
- const H4 = styled__default.default(designSystem.Typography).attrs({ as: "h4" })`
574
+ const H4 = styledComponents.styled(designSystem.Typography).attrs({ tag: "h4" })`
309
575
  font-size: 2.4rem;
310
576
  line-height: ${({ theme }) => theme.lineHeights[1]};
311
577
  `;
312
- const H5 = styled__default.default(designSystem.Typography).attrs({ as: "h5" })`
578
+ const H5 = styledComponents.styled(designSystem.Typography).attrs({ tag: "h5" })`
313
579
  font-size: 2rem;
314
580
  line-height: ${({ theme }) => theme.lineHeights[1]};
315
581
  `;
316
- const H6 = styled__default.default(designSystem.Typography).attrs({ as: "h6" })`
582
+ const H6 = styledComponents.styled(designSystem.Typography).attrs({ tag: "h6" })`
317
583
  font-size: 1.6rem;
318
584
  line-height: ${({ theme }) => theme.lineHeights[1]};
319
585
  `;
@@ -399,10 +665,10 @@ const headingBlocks = {
399
665
  dragHandleTopMargin: "-2px"
400
666
  }
401
667
  };
402
- const ImageWrapper = styled__default.default(designSystem.Flex)`
668
+ const ImageWrapper = styledComponents.styled(designSystem.Flex)`
403
669
  transition-property: box-shadow;
404
670
  transition-duration: 0.2s;
405
- ${(props) => props.isFocused && styled.css`
671
+ ${(props) => props.$isFocused && styledComponents.css`
406
672
  box-shadow: ${props.theme.colors.primary600} 0px 0px 0px 3px;
407
673
  `}
408
674
 
@@ -454,7 +720,7 @@ const Image = ({ attributes, children, element }) => {
454
720
  background: "neutral100",
455
721
  contentEditable: false,
456
722
  justifyContent: "center",
457
- isFocused: editorIsFocused && imageIsSelected,
723
+ $isFocused: editorIsFocused && imageIsSelected,
458
724
  hasRadius: true,
459
725
  children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: url, alt: alternativeText, width, height })
460
726
  }
@@ -502,7 +768,7 @@ const ImageDialog = () => {
502
768
  const nodeImage = {
503
769
  ...expectedImage,
504
770
  alternativeText: expectedImage.alternativeText || expectedImage.name,
505
- url: urls.prefixFileUrlWithBackendUrl(image.url)
771
+ url: usePrev.prefixFileUrlWithBackendUrl(image.url)
506
772
  };
507
773
  return nodeImage;
508
774
  });
@@ -610,11 +876,11 @@ const isLinkNode = (element) => {
610
876
  const isListNode$1 = (element) => {
611
877
  return element.type === "list";
612
878
  };
613
- const StyledBaseLink = styled__default.default(designSystem.BaseLink)`
879
+ const StyledBaseLink = styledComponents.styled(designSystem.BaseLink)`
614
880
  text-decoration: none;
615
881
  `;
616
- const RemoveButton = styled__default.default(designSystem.Button)`
617
- visibility: ${(props) => props.visible ? "visible" : "hidden"};
882
+ const RemoveButton = styledComponents.styled(designSystem.Button)`
883
+ visibility: ${(props) => props.$visible ? "visible" : "hidden"};
618
884
  `;
619
885
  const LinkContent = React__namespace.forwardRef(
620
886
  ({ link, children, attributes }, forwardedRef) => {
@@ -624,18 +890,12 @@ const LinkContent = React__namespace.forwardRef(
624
890
  const [popoverOpen, setPopoverOpen] = React__namespace.useState(
625
891
  editor.lastInsertedLinkPath ? slate.Path.equals(path, editor.lastInsertedLinkPath) : false
626
892
  );
627
- const linkRef = React__namespace.useRef(null);
628
893
  const elementText = link.children.map((child) => child.text).join("");
629
894
  const [linkText, setLinkText] = React__namespace.useState(elementText);
630
895
  const [linkUrl, setLinkUrl] = React__namespace.useState(link.url);
631
896
  const linkInputRef = React__namespace.useRef(null);
632
- const [showRemoveButton, setShowRemoveButton] = React__namespace.useState(false);
897
+ const isLastInsertedLink = editor.lastInsertedLinkPath ? !slate.Path.equals(path, editor.lastInsertedLinkPath) : true;
633
898
  const [isSaveDisabled, setIsSaveDisabled] = React__namespace.useState(false);
634
- const handleOpenEditPopover = (e) => {
635
- e.preventDefault();
636
- setPopoverOpen(true);
637
- setShowRemoveButton(true);
638
- };
639
899
  const onLinkChange = (e) => {
640
900
  setIsSaveDisabled(false);
641
901
  setLinkUrl(e.target.value);
@@ -656,40 +916,40 @@ const LinkContent = React__namespace.forwardRef(
656
916
  editLink(editor, { url: linkUrl, text: linkText });
657
917
  setPopoverOpen(false);
658
918
  editor.lastInsertedLinkPath = null;
919
+ slateReact.ReactEditor.focus(editor);
659
920
  };
660
- const handleDismiss = () => {
661
- setPopoverOpen(false);
921
+ const handleClose = () => {
662
922
  if (link.url === "") {
663
923
  removeLink(editor);
664
924
  }
925
+ setPopoverOpen(false);
665
926
  slateReact.ReactEditor.focus(editor);
666
927
  };
667
- const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
668
- const composedRefs = designSystem.useComposedRefs(linkRef, forwardedRef);
669
928
  React__namespace.useEffect(() => {
670
929
  if (popoverOpen)
671
930
  linkInputRef.current?.focus();
672
931
  }, [popoverOpen]);
673
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
674
- /* @__PURE__ */ jsxRuntime.jsx(
932
+ const inputNotDirty = !linkText || !linkUrl || link.url && link.url === linkUrl && elementText && elementText === linkText;
933
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { open: popoverOpen, children: [
934
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
675
935
  StyledBaseLink,
676
936
  {
677
937
  ...attributes,
678
- ref: composedRefs,
938
+ ref: forwardedRef,
679
939
  href: link.url,
680
- onClick: handleOpenEditPopover,
940
+ onClick: () => setPopoverOpen(true),
681
941
  color: "primary600",
682
942
  children
683
943
  }
684
- ),
685
- popoverOpen && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover, { source: linkRef, onDismiss: handleDismiss, padding: 4, contentEditable: false, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { as: "form", onSubmit: handleSave, direction: "column", gap: 4, children: [
686
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field, { width: "368px", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "stretch", children: [
687
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { children: formatMessage({
944
+ ) }),
945
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { onPointerDownOutside: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 4, direction: "column", gap: 4, children: [
946
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { width: "368px", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "stretch", children: [
947
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
688
948
  id: "components.Blocks.popover.text",
689
949
  defaultMessage: "Text"
690
950
  }) }),
691
951
  /* @__PURE__ */ jsxRuntime.jsx(
692
- designSystem.FieldInput,
952
+ designSystem.Field.Input,
693
953
  {
694
954
  name: "text",
695
955
  placeholder: formatMessage({
@@ -703,13 +963,13 @@ const LinkContent = React__namespace.forwardRef(
703
963
  }
704
964
  )
705
965
  ] }) }),
706
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field, { width: "368px", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "stretch", children: [
707
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { children: formatMessage({
966
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { width: "368px", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "stretch", children: [
967
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
708
968
  id: "components.Blocks.popover.link",
709
969
  defaultMessage: "Link"
710
970
  }) }),
711
971
  /* @__PURE__ */ jsxRuntime.jsx(
712
- designSystem.FieldInput,
972
+ designSystem.Field.Input,
713
973
  {
714
974
  ref: linkInputRef,
715
975
  name: "url",
@@ -728,7 +988,7 @@ const LinkContent = React__namespace.forwardRef(
728
988
  {
729
989
  variant: "danger-light",
730
990
  onClick: () => removeLink(editor),
731
- visible: showRemoveButton,
991
+ $visible: isLastInsertedLink,
732
992
  children: formatMessage({
733
993
  id: "components.Blocks.popover.remove",
734
994
  defaultMessage: "Remove"
@@ -736,11 +996,11 @@ const LinkContent = React__namespace.forwardRef(
736
996
  }
737
997
  ),
738
998
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
739
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick: handleDismiss, children: formatMessage({
999
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", onClick: handleClose, children: formatMessage({
740
1000
  id: "components.Blocks.popover.cancel",
741
1001
  defaultMessage: "Cancel"
742
1002
  }) }),
743
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { type: "submit", disabled: Boolean(inputNotDirty) || isSaveDisabled, children: formatMessage({
1003
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { disabled: Boolean(inputNotDirty) || isSaveDisabled, onClick: handleSave, children: formatMessage({
744
1004
  id: "components.Blocks.popover.save",
745
1005
  defaultMessage: "Save"
746
1006
  }) })
@@ -764,7 +1024,7 @@ const linkBlocks = {
764
1024
  isInBlocksSelector: false
765
1025
  }
766
1026
  };
767
- const listStyle = styled.css`
1027
+ const listStyle = styledComponents.css`
768
1028
  display: flex;
769
1029
  flex-direction: column;
770
1030
  gap: ${({ theme }) => theme.spaces[2]};
@@ -782,12 +1042,12 @@ const listStyle = styled.css`
782
1042
  margin-inline-start: ${({ theme }) => theme.spaces[3]};
783
1043
  }
784
1044
  `;
785
- const Orderedlist = styled__default.default.ol`
786
- list-style-type: ${(props) => props.listStyleType};
1045
+ const Orderedlist = styledComponents.styled.ol`
1046
+ list-style-type: ${(props) => props.$listStyleType};
787
1047
  ${listStyle}
788
1048
  `;
789
- const Unorderedlist = styled__default.default.ul`
790
- list-style-type: ${(props) => props.listStyleType};
1049
+ const Unorderedlist = styledComponents.styled.ul`
1050
+ list-style-type: ${(props) => props.$listStyleType};
791
1051
  ${listStyle}
792
1052
  `;
793
1053
  const orderedStyles = ["decimal", "lower-alpha", "upper-roman"];
@@ -800,9 +1060,9 @@ const List = ({ attributes, children, element }) => {
800
1060
  const nextIndex = (element.indentLevel || 0) % listStyles.length;
801
1061
  const listStyleType = listStyles[nextIndex];
802
1062
  if (element.format === "ordered") {
803
- return /* @__PURE__ */ jsxRuntime.jsx(Orderedlist, { listStyleType, ...attributes, children });
1063
+ return /* @__PURE__ */ jsxRuntime.jsx(Orderedlist, { $listStyleType: listStyleType, ...attributes, children });
804
1064
  }
805
- return /* @__PURE__ */ jsxRuntime.jsx(Unorderedlist, { listStyleType, ...attributes, children });
1065
+ return /* @__PURE__ */ jsxRuntime.jsx(Unorderedlist, { $listStyleType: listStyleType, ...attributes, children });
806
1066
  };
807
1067
  const replaceListWithEmptyBlock = (editor, currentListPath) => {
808
1068
  slate.Transforms.removeNodes(editor, { at: currentListPath });
@@ -999,7 +1259,7 @@ const listBlocks = {
999
1259
  snippets: ["-", "*", "+"]
1000
1260
  },
1001
1261
  "list-item": {
1002
- renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "li", ...props.attributes, children: props.children }),
1262
+ renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "li", ...props.attributes, children: props.children }),
1003
1263
  // No handleConvert, list items are created when converting to the parent list
1004
1264
  matchNode: (node) => node.type === "list-item",
1005
1265
  isInBlocksSelector: false,
@@ -1008,7 +1268,7 @@ const listBlocks = {
1008
1268
  };
1009
1269
  const paragraphBlocks = {
1010
1270
  paragraph: {
1011
- renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "p", variant: "omega", ...props.attributes, children: props.children }),
1271
+ renderElement: (props) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "p", variant: "omega", ...props.attributes, children: props.children }),
1012
1272
  icon: Icons.Paragraph,
1013
1273
  label: {
1014
1274
  id: "components.Blocks.blocks.text",
@@ -1056,7 +1316,7 @@ const paragraphBlocks = {
1056
1316
  }
1057
1317
  }
1058
1318
  };
1059
- const Blockquote = styled__default.default.blockquote.attrs({ role: "blockquote" })`
1319
+ const Blockquote = styledComponents.styled.blockquote.attrs({ role: "blockquote" })`
1060
1320
  font-weight: ${({ theme }) => theme.fontWeights.regular};
1061
1321
  border-left: ${({ theme }) => `${theme.spaces[1]} solid ${theme.colors.neutral200}`};
1062
1322
  padding: ${({ theme }) => theme.spaces[2]} ${({ theme }) => theme.spaces[4]};
@@ -1086,17 +1346,17 @@ const quoteBlocks = {
1086
1346
  dragHandleTopMargin: "6px"
1087
1347
  }
1088
1348
  };
1089
- const ToolbarWrapper = styled__default.default(designSystem.Flex)`
1349
+ const ToolbarWrapper = styledComponents.styled(designSystem.Flex)`
1090
1350
  &[aria-disabled='true'] {
1091
1351
  cursor: not-allowed;
1092
1352
  }
1093
1353
  `;
1094
- const Separator = styled__default.default(Toolbar__namespace.Separator)`
1354
+ const Separator = styledComponents.styled(Toolbar__namespace.Separator)`
1095
1355
  background: ${({ theme }) => theme.colors.neutral150};
1096
1356
  width: 1px;
1097
1357
  height: 2.4rem;
1098
1358
  `;
1099
- const FlexButton = styled__default.default(designSystem.Flex)`
1359
+ const FlexButton = styledComponents.styled(designSystem.Flex)`
1100
1360
  // Inherit the not-allowed cursor from ToolbarWrapper when disabled
1101
1361
  &[aria-disabled] {
1102
1362
  cursor: inherit;
@@ -1111,7 +1371,7 @@ const FlexButton = styled__default.default(designSystem.Flex)`
1111
1371
  }
1112
1372
  }
1113
1373
  `;
1114
- const SelectWrapper = styled__default.default(designSystem.Box)`
1374
+ const SelectWrapper = styledComponents.styled(designSystem.Box)`
1115
1375
  // Styling changes to SingleSelect component don't work, so adding wrapper to target SingleSelect
1116
1376
  div[role='combobox'] {
1117
1377
  border: none;
@@ -1174,7 +1434,7 @@ const ToolbarButton = ({
1174
1434
  children: /* @__PURE__ */ jsxRuntime.jsx(
1175
1435
  FlexButton,
1176
1436
  {
1177
- as: "button",
1437
+ tag: "button",
1178
1438
  background: isActive ? "primary100" : "",
1179
1439
  alignItems: "center",
1180
1440
  justifyContent: "center",
@@ -1326,6 +1586,26 @@ const ListButton = ({ block, format }) => {
1326
1586
  }
1327
1587
  return false;
1328
1588
  };
1589
+ const isListDisabled = () => {
1590
+ if (disabled) {
1591
+ return true;
1592
+ }
1593
+ if (!editor.selection) {
1594
+ return false;
1595
+ }
1596
+ const anchorNodeEntry = slate.Editor.above(editor, {
1597
+ at: editor.selection.anchor,
1598
+ match: (node) => !slate.Editor.isEditor(node) && node.type !== "text"
1599
+ });
1600
+ const focusNodeEntry = slate.Editor.above(editor, {
1601
+ at: editor.selection.focus,
1602
+ match: (node) => !slate.Editor.isEditor(node) && node.type !== "text"
1603
+ });
1604
+ if (!anchorNodeEntry || !focusNodeEntry) {
1605
+ return false;
1606
+ }
1607
+ return anchorNodeEntry[0] !== focusNodeEntry[0];
1608
+ };
1329
1609
  const toggleList = (format2) => {
1330
1610
  let currentListEntry;
1331
1611
  if (editor.selection) {
@@ -1359,7 +1639,7 @@ const ListButton = ({ block, format }) => {
1359
1639
  name: format,
1360
1640
  label: block.label,
1361
1641
  isActive: isListActive(),
1362
- disabled,
1642
+ disabled: isListDisabled(),
1363
1643
  handleClick: () => toggleList(format)
1364
1644
  }
1365
1645
  );
@@ -1458,7 +1738,7 @@ const BlocksToolbar = () => {
1458
1738
  ] }) })
1459
1739
  ] }) });
1460
1740
  };
1461
- const StyledEditable = styled__default.default(slateReact.Editable)`
1741
+ const StyledEditable = styledComponents.styled(slateReact.Editable)`
1462
1742
  // The outline style is set on the wrapper with :focus-within
1463
1743
  outline: none;
1464
1744
  display: flex;
@@ -1473,20 +1753,20 @@ const StyledEditable = styled__default.default(slateReact.Editable)`
1473
1753
  padding-bottom: ${({ theme }) => theme.spaces[3]};
1474
1754
  }
1475
1755
  `;
1476
- const Wrapper$1 = styled__default.default(designSystem.Box)`
1756
+ const Wrapper$1 = styledComponents.styled(designSystem.Box)`
1477
1757
  position: ${({ isOverDropTarget }) => isOverDropTarget && "relative"};
1478
1758
  `;
1479
- const DropPlaceholder = styled__default.default(designSystem.Box)`
1759
+ const DropPlaceholder = styledComponents.styled(designSystem.Box)`
1480
1760
  position: absolute;
1481
1761
  right: 0;
1482
1762
 
1483
1763
  // Show drop placeholder 8px above or below the drop target
1484
- ${({ dragDirection, theme, placeholderMargin }) => styled.css`
1764
+ ${({ dragDirection, theme, placeholderMargin }) => styledComponents.css`
1485
1765
  top: ${dragDirection === useDragAndDrop.DIRECTIONS.UPWARD && `-${theme.spaces[placeholderMargin]}`};
1486
1766
  bottom: ${dragDirection === useDragAndDrop.DIRECTIONS.DOWNWARD && `-${theme.spaces[placeholderMargin]}`};
1487
1767
  `}
1488
1768
  `;
1489
- const DragItem = styled__default.default(designSystem.Flex)`
1769
+ const DragItem = styledComponents.styled(designSystem.Flex)`
1490
1770
  // Style each block rendered using renderElement()
1491
1771
  & > [data-slate-node='element'] {
1492
1772
  width: 100%;
@@ -1495,14 +1775,14 @@ const DragItem = styled__default.default(designSystem.Flex)`
1495
1775
 
1496
1776
  // Set the visibility of drag button
1497
1777
  [role='button'] {
1498
- visibility: ${(props) => props.dragVisibility};
1778
+ visibility: ${(props) => props.$dragVisibility};
1499
1779
  opacity: inherit;
1500
1780
  }
1501
1781
  &[aria-disabled='true'] {
1502
1782
  user-drag: none;
1503
1783
  }
1504
1784
  `;
1505
- const DragIconButton = styled__default.default(designSystem.IconButton)`
1785
+ const DragIconButton = styledComponents.styled(designSystem.IconButton)`
1506
1786
  display: flex;
1507
1787
  align-items: center;
1508
1788
  justify-content: center;
@@ -1512,7 +1792,7 @@ const DragIconButton = styled__default.default(designSystem.IconButton)`
1512
1792
  visibility: hidden;
1513
1793
  cursor: grab;
1514
1794
  opacity: inherit;
1515
- margin-top: ${(props) => props.dragHandleTopMargin ?? 0};
1795
+ margin-top: ${(props) => props.$dragHandleTopMargin ?? 0};
1516
1796
 
1517
1797
  &:hover {
1518
1798
  background: ${({ theme }) => theme.colors.neutral200};
@@ -1526,7 +1806,7 @@ const DragIconButton = styled__default.default(designSystem.IconButton)`
1526
1806
  }
1527
1807
  svg {
1528
1808
  height: auto;
1529
- width: ${({ theme }) => theme.spaces[3]};
1809
+ min-width: ${({ theme }) => theme.spaces[3]};
1530
1810
 
1531
1811
  path {
1532
1812
  fill: ${({ theme }) => theme.colors.neutral700};
@@ -1587,7 +1867,7 @@ const DragAndDropElement = ({
1587
1867
  React__namespace.useEffect(() => {
1588
1868
  setDragVisibility("hidden");
1589
1869
  }, [editor.selection]);
1590
- return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$1, { ref: (ref) => composedBoxRefs(ref), isOverDropTarget, children: [
1870
+ return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$1, { ref: composedBoxRefs, isOverDropTarget, children: [
1591
1871
  isOverDropTarget && /* @__PURE__ */ jsxRuntime.jsx(
1592
1872
  DropPlaceholder,
1593
1873
  {
@@ -1625,15 +1905,16 @@ const DragAndDropElement = ({
1625
1905
  onSelect: () => setDragVisibility("visible"),
1626
1906
  onMouseLeave: () => setDragVisibility("hidden"),
1627
1907
  "aria-disabled": disabled,
1628
- dragVisibility,
1908
+ $dragVisibility: dragVisibility,
1629
1909
  children: [
1630
1910
  /* @__PURE__ */ jsxRuntime.jsx(
1631
1911
  DragIconButton,
1632
1912
  {
1633
- forwardedAs: "div",
1913
+ tag: "div",
1634
1914
  role: "button",
1635
1915
  tabIndex: 0,
1636
- "aria-label": formatMessage({
1916
+ withTooltip: false,
1917
+ label: formatMessage({
1637
1918
  id: index.getTranslation("components.DragHandle-label"),
1638
1919
  defaultMessage: "Drag"
1639
1920
  }),
@@ -1641,8 +1922,8 @@ const DragAndDropElement = ({
1641
1922
  "aria-disabled": disabled,
1642
1923
  disabled,
1643
1924
  draggable: true,
1644
- dragHandleTopMargin,
1645
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "neutral600" })
1925
+ $dragHandleTopMargin: dragHandleTopMargin,
1926
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "primary500" })
1646
1927
  }
1647
1928
  ),
1648
1929
  children
@@ -1653,17 +1934,18 @@ const DragAndDropElement = ({
1653
1934
  };
1654
1935
  const CloneDragItem = ({ children, dragHandleTopMargin }) => {
1655
1936
  const { formatMessage } = reactIntl.useIntl();
1656
- return /* @__PURE__ */ jsxRuntime.jsxs(DragItem, { gap: 2, paddingLeft: 2, alignItems: "start", dragVisibility: "visible", children: [
1937
+ return /* @__PURE__ */ jsxRuntime.jsxs(DragItem, { gap: 2, paddingLeft: 2, alignItems: "start", $dragVisibility: "visible", children: [
1657
1938
  /* @__PURE__ */ jsxRuntime.jsx(
1658
1939
  DragIconButton,
1659
1940
  {
1660
- forwardedAs: "div",
1941
+ tag: "div",
1661
1942
  role: "button",
1662
- "aria-label": formatMessage({
1943
+ withTooltip: false,
1944
+ label: formatMessage({
1663
1945
  id: index.getTranslation("components.DragHandle-label"),
1664
1946
  defaultMessage: "Drag"
1665
1947
  }),
1666
- dragHandleTopMargin,
1948
+ $dragHandleTopMargin: dragHandleTopMargin,
1667
1949
  children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, { color: "neutral600" })
1668
1950
  }
1669
1951
  ),
@@ -1910,12 +2192,12 @@ const BlocksContent = ({ placeholder, ariaLabelId }) => {
1910
2192
  }
1911
2193
  );
1912
2194
  };
1913
- const CollapseIconButton = styled__default.default(designSystem.IconButton)`
2195
+ const CollapseIconButton = styledComponents.styled(designSystem.IconButton)`
1914
2196
  position: absolute;
1915
2197
  bottom: 1.2rem;
1916
2198
  right: 1.2rem;
1917
2199
  `;
1918
- const ExpandWrapper$1 = styled__default.default(designSystem.Flex)`
2200
+ const ExpandWrapper$1 = styledComponents.styled(designSystem.Flex)`
1919
2201
  // Background with 20% opacity
1920
2202
  background: ${({ theme }) => `${theme.colors.neutral800}1F`};
1921
2203
  `;
@@ -1965,7 +2247,7 @@ const EditorLayout$1 = ({
1965
2247
  /* @__PURE__ */ jsxRuntime.jsx(
1966
2248
  CollapseIconButton,
1967
2249
  {
1968
- "aria-label": formatMessage({
2250
+ label: formatMessage({
1969
2251
  id: index.getTranslation("components.Blocks.collapse"),
1970
2252
  defaultMessage: "Collapse"
1971
2253
  }),
@@ -1980,13 +2262,13 @@ const EditorLayout$1 = ({
1980
2262
  ) }) });
1981
2263
  }
1982
2264
  return /* @__PURE__ */ jsxRuntime.jsx(
1983
- designSystem.InputWrapper,
2265
+ InputWrapper,
1984
2266
  {
1985
2267
  direction: "column",
1986
2268
  alignItems: "flex-start",
1987
2269
  height: "512px",
1988
- disabled,
1989
- hasError: Boolean(error),
2270
+ $disabled: disabled,
2271
+ $hasError: Boolean(error),
1990
2272
  style: { overflow: "hidden" },
1991
2273
  "aria-describedby": ariaDescriptionId,
1992
2274
  position: "relative",
@@ -1994,25 +2276,52 @@ const EditorLayout$1 = ({
1994
2276
  }
1995
2277
  );
1996
2278
  };
1997
- const stylesToInherit = styled.css`
2279
+ const InputWrapper = styledComponents.styled(designSystem.Flex)`
2280
+ border: 1px solid
2281
+ ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
2282
+ border-radius: ${({ theme }) => theme.borderRadius};
2283
+ background: ${({ theme }) => theme.colors.neutral0};
2284
+
2285
+ ${({ theme, $hasError = false }) => styledComponents.css`
2286
+ outline: none;
2287
+ box-shadow: 0;
2288
+ transition-property: border-color, box-shadow, fill;
2289
+ transition-duration: 0.2s;
2290
+
2291
+ &:focus-within {
2292
+ border: 1px solid ${$hasError ? theme.colors.danger600 : theme.colors.primary600};
2293
+ box-shadow: ${$hasError ? theme.colors.danger600 : theme.colors.primary600} 0px 0px 0px 2px;
2294
+ }
2295
+ `}
2296
+
2297
+ ${({ theme, $disabled }) => $disabled ? styledComponents.css`
2298
+ color: ${theme.colors.neutral600};
2299
+ background: ${theme.colors.neutral150};
2300
+ ` : void 0}
2301
+ `;
2302
+ const stylesToInherit = styledComponents.css`
1998
2303
  font-size: inherit;
1999
2304
  color: inherit;
2000
2305
  line-height: inherit;
2001
2306
  `;
2002
- const BoldText = styled__default.default(designSystem.Typography).attrs({ fontWeight: "bold" })`
2307
+ const BoldText = styledComponents.styled(designSystem.Typography).attrs({ fontWeight: "bold" })`
2003
2308
  ${stylesToInherit}
2004
2309
  `;
2005
- const ItalicText = styled__default.default(designSystem.Typography)`
2310
+ const ItalicText = styledComponents.styled(designSystem.Typography)`
2006
2311
  font-style: italic;
2007
2312
  ${stylesToInherit}
2008
2313
  `;
2009
- const UnderlineText = styled__default.default(designSystem.Typography).attrs({ textDecoration: "underline" })`
2314
+ const UnderlineText = styledComponents.styled(designSystem.Typography).attrs({
2315
+ textDecoration: "underline"
2316
+ })`
2010
2317
  ${stylesToInherit}
2011
2318
  `;
2012
- const StrikeThroughText = styled__default.default(designSystem.Typography).attrs({ textDecoration: "line-through" })`
2319
+ const StrikeThroughText = styledComponents.styled(designSystem.Typography).attrs({
2320
+ textDecoration: "line-through"
2321
+ })`
2013
2322
  ${stylesToInherit}
2014
2323
  `;
2015
- const InlineCode = styled__default.default.code`
2324
+ const InlineCode = styledComponents.styled.code`
2016
2325
  background-color: ${({ theme }) => theme.colors.neutral150};
2017
2326
  border-radius: ${({ theme }) => theme.borderRadius};
2018
2327
  padding: ${({ theme }) => `0 ${theme.spaces[2]}`};
@@ -2182,10 +2491,10 @@ function useBlocksEditorContext(consumerName) {
2182
2491
  editor
2183
2492
  };
2184
2493
  }
2185
- const EditorDivider = styled__default.default(designSystem.Divider)`
2494
+ const EditorDivider = styledComponents.styled(designSystem.Divider)`
2186
2495
  background: ${({ theme }) => theme.colors.neutral200};
2187
2496
  `;
2188
- const ExpandIconButton = styled__default.default(designSystem.IconButton)`
2497
+ const ExpandIconButton = styledComponents.styled(designSystem.IconButton)`
2189
2498
  position: absolute;
2190
2499
  bottom: 1.2rem;
2191
2500
  right: 1.2rem;
@@ -2277,7 +2586,7 @@ const BlocksEditor = React__namespace.forwardRef(
2277
2586
  !isExpandedMode && /* @__PURE__ */ jsxRuntime.jsx(
2278
2587
  ExpandIconButton,
2279
2588
  {
2280
- "aria-label": formatMessage({
2589
+ label: formatMessage({
2281
2590
  id: index.getTranslation("components.Blocks.expand"),
2282
2591
  defaultMessage: "Expand"
2283
2592
  }),
@@ -2300,8 +2609,8 @@ const BlocksInput = React__namespace.forwardRef(
2300
2609
  ({ label, name: name2, required = false, hint, labelAction, ...editorProps }, forwardedRef) => {
2301
2610
  const id = React__namespace.useId();
2302
2611
  const field = strapiAdmin.useField(name2);
2303
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field, { id, name: name2, hint, error: field.error, required, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
2304
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { action: labelAction, children: label }),
2612
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { id, name: name2, hint, error: field.error, required, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
2613
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
2305
2614
  /* @__PURE__ */ jsxRuntime.jsx(
2306
2615
  BlocksEditor,
2307
2616
  {
@@ -2314,11 +2623,12 @@ const BlocksInput = React__namespace.forwardRef(
2314
2623
  ...editorProps
2315
2624
  }
2316
2625
  ),
2317
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldHint, {}),
2318
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldError, {})
2626
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {}),
2627
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
2319
2628
  ] }) });
2320
2629
  }
2321
2630
  );
2631
+ const MemoizedBlocksInput = React__namespace.memo(BlocksInput);
2322
2632
  const createDefaultForm = (contentType, components = {}) => {
2323
2633
  const traverseSchema = (attributes) => {
2324
2634
  return Object.entries(attributes).reduce((acc, [key, attribute]) => {
@@ -2342,32 +2652,29 @@ const createDefaultForm = (contentType, components = {}) => {
2342
2652
  const Initializer = ({ disabled, name: name2, onClick }) => {
2343
2653
  const { formatMessage } = reactIntl.useIntl();
2344
2654
  const field = strapiAdmin.useField(name2);
2345
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2346
- /* @__PURE__ */ jsxRuntime.jsx(
2347
- designSystem.Box,
2348
- {
2349
- as: "button",
2350
- background: "neutral100",
2351
- borderColor: field.error ? "danger600" : "neutral200",
2352
- hasRadius: true,
2353
- disabled,
2354
- onClick,
2355
- paddingTop: 9,
2356
- paddingBottom: 9,
2357
- type: "button",
2358
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
2359
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, {}) }),
2360
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
2361
- id: index.getTranslation("components.empty-repeatable"),
2362
- defaultMessage: "No entry yet. Click on the button below to add one."
2363
- }) }) })
2364
- ] })
2365
- }
2366
- ),
2367
- field.error && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "danger600", variant: "pi", children: field.error })
2368
- ] });
2655
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
2656
+ designSystem.Box,
2657
+ {
2658
+ tag: "button",
2659
+ background: "neutral100",
2660
+ borderColor: field.error ? "danger600" : "neutral200",
2661
+ hasRadius: true,
2662
+ disabled,
2663
+ onClick,
2664
+ paddingTop: 9,
2665
+ paddingBottom: 9,
2666
+ type: "button",
2667
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
2668
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CircleIcon, {}) }),
2669
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", fontWeight: "bold", children: formatMessage({
2670
+ id: index.getTranslation("components.empty-repeatable"),
2671
+ defaultMessage: "No entry yet. Click on the button below to add one."
2672
+ }) }) })
2673
+ ] })
2674
+ }
2675
+ ) });
2369
2676
  };
2370
- const CircleIcon = styled__default.default(Icons.PlusCircle)`
2677
+ const CircleIcon = styledComponents.styled(Icons.PlusCircle)`
2371
2678
  width: 2.4rem;
2372
2679
  height: 2.4rem;
2373
2680
  > circle {
@@ -2397,9 +2704,20 @@ const NonRepeatableComponent = ({
2397
2704
  hasRadius: isNested,
2398
2705
  borderColor: isNested ? "neutral200" : void 0,
2399
2706
  children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index2) => {
2400
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: row.map(({ size, ...field }) => {
2707
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2401
2708
  const completeFieldName = `${name2}.${field.name}`;
2402
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: size, s: 12, xs: 12, children: children({ ...field, name: completeFieldName }) }, completeFieldName);
2709
+ return /* @__PURE__ */ jsxRuntime.jsx(
2710
+ designSystem.Grid.Item,
2711
+ {
2712
+ col: size,
2713
+ s: 12,
2714
+ xs: 12,
2715
+ direction: "column",
2716
+ alignItems: "stretch",
2717
+ children: children({ ...field, name: completeFieldName })
2718
+ },
2719
+ completeFieldName
2720
+ );
2403
2721
  }) }, index2);
2404
2722
  }) })
2405
2723
  }
@@ -2423,7 +2741,7 @@ const RepeatableComponent = ({
2423
2741
  const moveFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.moveFieldRow);
2424
2742
  const removeFieldRow = strapiAdmin.useForm("RepeatableComponent", (state) => state.removeFieldRow);
2425
2743
  const { max = Infinity } = attribute;
2426
- const [collapseToOpen, setCollapseToOpen] = React__namespace.useState(null);
2744
+ const [collapseToOpen, setCollapseToOpen] = React__namespace.useState("");
2427
2745
  const [liveText, setLiveText] = React__namespace.useState("");
2428
2746
  const componentTmpKeyWithFocussedField = React__namespace.useMemo(() => {
2429
2747
  if (search.has("field")) {
@@ -2439,13 +2757,19 @@ const RepeatableComponent = ({
2439
2757
  }
2440
2758
  return void 0;
2441
2759
  }, [search, name2, value]);
2760
+ const prevValue = usePrev.usePrev(value);
2442
2761
  React__namespace.useEffect(() => {
2443
- if (typeof componentTmpKeyWithFocussedField === "number") {
2762
+ if (prevValue && prevValue.length < value.length) {
2763
+ setCollapseToOpen(value[value.length - 1].__temp_key__);
2764
+ }
2765
+ }, [value, prevValue]);
2766
+ React__namespace.useEffect(() => {
2767
+ if (typeof componentTmpKeyWithFocussedField === "string") {
2444
2768
  setCollapseToOpen(componentTmpKeyWithFocussedField);
2445
2769
  }
2446
2770
  }, [componentTmpKeyWithFocussedField]);
2447
2771
  const toggleCollapses = () => {
2448
- setCollapseToOpen(null);
2772
+ setCollapseToOpen("");
2449
2773
  };
2450
2774
  const handleClick = () => {
2451
2775
  if (value.length < max) {
@@ -2477,12 +2801,8 @@ const RepeatableComponent = ({
2477
2801
  );
2478
2802
  moveFieldRow(name2, currentIndex, newIndex);
2479
2803
  };
2480
- const handleToggle = (key) => () => {
2481
- if (collapseToOpen === key) {
2482
- setCollapseToOpen(null);
2483
- } else {
2484
- setCollapseToOpen(key);
2485
- }
2804
+ const handleValueChange = (key) => {
2805
+ setCollapseToOpen(key);
2486
2806
  };
2487
2807
  const getItemPos = (index2) => `${index2 + 1} of ${value.length}`;
2488
2808
  const handleCancel = (index$1) => {
@@ -2537,158 +2857,115 @@ const RepeatableComponent = ({
2537
2857
  defaultMessage: `Press spacebar to grab and re-order`
2538
2858
  }) }),
2539
2859
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { "aria-live": "assertive", children: liveText }),
2540
- /* @__PURE__ */ jsxRuntime.jsxs(AccordionGroup, { error, children: [
2541
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { "aria-describedby": ariaDescriptionId, children: value.map(({ __temp_key__: key, id }, index2) => {
2542
- const nameWithIndex = `${name2}.${index2}`;
2543
- return /* @__PURE__ */ jsxRuntime.jsx(
2544
- Relations.ComponentProvider,
2545
- {
2546
- id,
2547
- uid: attribute.component,
2548
- level: level + 1,
2549
- type: "repeatable",
2550
- children: /* @__PURE__ */ jsxRuntime.jsx(
2551
- Component,
2860
+ /* @__PURE__ */ jsxRuntime.jsxs(
2861
+ AccordionRoot,
2862
+ {
2863
+ $error: error,
2864
+ value: collapseToOpen,
2865
+ onValueChange: handleValueChange,
2866
+ "aria-describedby": ariaDescriptionId,
2867
+ children: [
2868
+ value.map(({ __temp_key__: key, id }, index2) => {
2869
+ const nameWithIndex = `${name2}.${index2}`;
2870
+ return /* @__PURE__ */ jsxRuntime.jsx(
2871
+ Relations.ComponentProvider,
2552
2872
  {
2553
- disabled,
2554
- name: nameWithIndex,
2555
- attribute,
2556
- index: index2,
2557
- isOpen: collapseToOpen === key,
2558
- mainField,
2559
- onMoveItem: handleMoveComponentField,
2560
- onClickToggle: handleToggle(key),
2561
- onDeleteComponent: () => {
2562
- removeFieldRow(name2, index2);
2563
- toggleCollapses();
2564
- },
2565
- toggleCollapses,
2566
- onCancel: handleCancel,
2567
- onDropItem: handleDropItem,
2568
- onGrabItem: handleGrabItem,
2569
- children: layout.map((row, index22) => {
2570
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: row.map(({ size, ...field }) => {
2571
- const completeFieldName = `${nameWithIndex}.${field.name}`;
2572
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: size, s: 12, xs: 12, children: children({ ...field, name: completeFieldName }) }, completeFieldName);
2573
- }) }, index22);
2574
- })
2575
- }
2576
- )
2577
- },
2578
- key
2579
- );
2580
- }) }),
2581
- /* @__PURE__ */ jsxRuntime.jsx(AccordionFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", height: "48px", background: "neutral0", children: /* @__PURE__ */ jsxRuntime.jsx(TextButtonCustom, { disabled, onClick: handleClick, startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Plus, {}), children: formatMessage({
2582
- id: index.getTranslation("containers.EditView.add.new-entry"),
2583
- defaultMessage: "Add an entry"
2584
- }) }) }) })
2585
- ] })
2873
+ id,
2874
+ uid: attribute.component,
2875
+ level: level + 1,
2876
+ type: "repeatable",
2877
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2878
+ Component,
2879
+ {
2880
+ disabled,
2881
+ name: nameWithIndex,
2882
+ attribute,
2883
+ index: index2,
2884
+ mainField,
2885
+ onMoveItem: handleMoveComponentField,
2886
+ onDeleteComponent: () => {
2887
+ removeFieldRow(name2, index2);
2888
+ toggleCollapses();
2889
+ },
2890
+ toggleCollapses,
2891
+ onCancel: handleCancel,
2892
+ onDropItem: handleDropItem,
2893
+ onGrabItem: handleGrabItem,
2894
+ __temp_key__: key,
2895
+ children: layout.map((row, index22) => {
2896
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2897
+ const completeFieldName = `${nameWithIndex}.${field.name}`;
2898
+ return /* @__PURE__ */ jsxRuntime.jsx(
2899
+ designSystem.Grid.Item,
2900
+ {
2901
+ col: size,
2902
+ s: 12,
2903
+ xs: 12,
2904
+ direction: "column",
2905
+ alignItems: "stretch",
2906
+ children: children({ ...field, name: completeFieldName })
2907
+ },
2908
+ completeFieldName
2909
+ );
2910
+ }) }, index22);
2911
+ })
2912
+ }
2913
+ )
2914
+ },
2915
+ key
2916
+ );
2917
+ }),
2918
+ /* @__PURE__ */ jsxRuntime.jsx(TextButtonCustom, { disabled, onClick: handleClick, startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Plus, {}), children: formatMessage({
2919
+ id: index.getTranslation("containers.EditView.add.new-entry"),
2920
+ defaultMessage: "Add an entry"
2921
+ }) })
2922
+ ]
2923
+ }
2924
+ )
2586
2925
  ] });
2587
2926
  };
2588
- const TextButtonCustom = styled__default.default(designSystem.TextButton)`
2589
- height: 100%;
2927
+ const AccordionRoot = styledComponents.styled(designSystem.Accordion.Root)`
2928
+ border: 1px solid
2929
+ ${({ theme, $error }) => $error ? theme.colors.danger600 : theme.colors.neutral200};
2930
+ `;
2931
+ const TextButtonCustom = styledComponents.styled(designSystem.TextButton)`
2590
2932
  width: 100%;
2591
- border-radius: 0 0 4px 4px;
2592
2933
  display: flex;
2593
2934
  justify-content: center;
2594
- span {
2595
- font-weight: 600;
2596
- font-size: 14px;
2597
- }
2598
- `;
2599
- const AccordionFooter = styled__default.default(designSystem.Box)`
2600
- overflow: hidden;
2601
- border-bottom: 1px solid ${({ theme }) => theme.colors.neutral200};
2602
- border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
2603
- border-left: 1px solid ${({ theme }) => theme.colors.neutral200};
2604
- border-radius: 0 0 ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius};
2605
- `;
2606
- const AccordionContent = styled__default.default(designSystem.Box)`
2607
- border-bottom: none;
2608
-
2609
- /* add the borders and make sure the top is transparent to avoid jumping with the hover effect */
2610
- & > div > div {
2611
- border: 1px solid ${({ theme }) => theme.colors.neutral200};
2612
- border-top-color: transparent;
2613
- }
2614
-
2615
- /* the top accordion _does_ need a border though */
2616
- & > div:first-child > div {
2617
- border-top: 1px solid ${({ theme }) => theme.colors.neutral200};
2618
- }
2619
-
2620
- /* Reset all the border-radius' */
2621
- & > div > div,
2622
- & > div > div > div {
2623
- border-radius: unset;
2624
- }
2935
+ border-top: 1px solid ${({ theme }) => theme.colors.neutral200};
2936
+ padding-inline: ${(props) => props.theme.spaces[6]};
2937
+ padding-block: ${(props) => props.theme.spaces[3]};
2625
2938
 
2626
- /* Give the border radius back to the first accordion */
2627
- & > div:first-child > div,
2628
- & > div:first-child > div > div {
2629
- border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0;
2630
- }
2939
+ &:not([disabled]) {
2940
+ cursor: pointer;
2631
2941
 
2632
- & > div > div[data-strapi-expanded='true'] {
2633
- border: 1px solid ${({ theme }) => theme.colors.primary600};
2942
+ &:hover {
2943
+ background-color: ${(props) => props.theme.colors.primary100};
2944
+ }
2634
2945
  }
2635
- `;
2636
- const AccordionGroup = ({ children, error }) => {
2637
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.KeyboardNavigable, { attributeName: "data-strapi-accordion-toggle", children: [
2638
- children,
2639
- error && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "danger600", children: error }) })
2640
- ] });
2641
- };
2642
- const CustomIconButton$1 = styled__default.default(designSystem.IconButton)`
2643
- background-color: transparent;
2644
2946
 
2645
- svg {
2646
- path {
2647
- fill: ${({ theme, expanded }) => expanded ? theme.colors.primary600 : theme.colors.neutral600};
2648
- }
2947
+ span {
2948
+ font-weight: 600;
2949
+ font-size: 1.4rem;
2950
+ line-height: 2.4rem;
2649
2951
  }
2650
2952
 
2651
- &:hover {
2652
- svg {
2653
- path {
2654
- fill: ${({ theme }) => theme.colors.primary600};
2655
- }
2656
- }
2657
- }
2658
- `;
2659
- const ActionsFlex$1 = styled__default.default(designSystem.Flex)`
2660
- & .drag-handle {
2661
- background: unset;
2662
-
2663
- svg {
2664
- path {
2665
- fill: ${({ theme, expanded }) => expanded ? theme.colors.primary600 : void 0};
2666
- }
2667
- }
2668
-
2669
- &:hover {
2670
- svg {
2671
- path {
2672
- /* keeps the hover style of the accordion */
2673
- fill: ${({ theme }) => theme.colors.primary600};
2674
- }
2675
- }
2676
- }
2953
+ @media (prefers-reduced-motion: no-preference) {
2954
+ transition: background-color 120ms ${(props) => props.theme.motion.easings.easeOutQuad};
2677
2955
  }
2678
2956
  `;
2679
2957
  const Component = ({
2680
2958
  disabled,
2681
2959
  index: index$1,
2682
- isOpen,
2683
2960
  name: name2,
2684
2961
  mainField = {
2685
2962
  name: "id",
2686
2963
  type: "integer"
2687
2964
  },
2688
2965
  children,
2689
- onClickToggle,
2690
2966
  onDeleteComponent,
2691
2967
  toggleCollapses,
2968
+ __temp_key__,
2692
2969
  ...dragProps
2693
2970
  }) => {
2694
2971
  const { formatMessage } = reactIntl.useIntl();
@@ -2713,50 +2990,44 @@ const Component = ({
2713
2990
  dragPreviewRef(reactDndHtml5Backend.getEmptyImage(), { captureDraggingState: false });
2714
2991
  }, [dragPreviewRef, index$1]);
2715
2992
  const composedAccordionRefs = designSystem.useComposedRefs(accordionRef, dragRef);
2716
- const composedBoxRefs = designSystem.useComposedRefs(boxRef, dropRef);
2717
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { ref: (ref) => composedBoxRefs(ref), children: isDragging ? /* @__PURE__ */ jsxRuntime.jsx(Preview$1, {}) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion, { expanded: isOpen, onToggle: onClickToggle, id: name2, size: "S", children: [
2718
- /* @__PURE__ */ jsxRuntime.jsx(
2719
- designSystem.AccordionToggle,
2720
- {
2721
- action: disabled ? null : /* @__PURE__ */ jsxRuntime.jsxs(ActionsFlex$1, { gap: 0, expanded: isOpen, children: [
2722
- /* @__PURE__ */ jsxRuntime.jsx(
2723
- CustomIconButton$1,
2724
- {
2725
- expanded: isOpen,
2726
- borderWidth: 0,
2727
- onClick: onDeleteComponent,
2728
- label: formatMessage({
2729
- id: index.getTranslation("containers.Edit.delete"),
2730
- defaultMessage: "Delete"
2731
- }),
2732
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {})
2733
- }
2734
- ),
2735
- /* @__PURE__ */ jsxRuntime.jsx(
2736
- designSystem.IconButton,
2737
- {
2738
- className: "drag-handle",
2739
- ref: composedAccordionRefs,
2740
- forwardedAs: "div",
2741
- role: "button",
2742
- borderWidth: 0,
2743
- tabIndex: 0,
2744
- onClick: (e) => e.stopPropagation(),
2745
- "data-handler-id": handlerId,
2746
- label: formatMessage({
2747
- id: index.getTranslation("components.DragHandle-label"),
2748
- defaultMessage: "Drag"
2749
- }),
2750
- onKeyDown: handleKeyDown,
2751
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, {})
2752
- }
2753
- )
2754
- ] }),
2755
- title: displayValue,
2756
- togglePosition: "left"
2757
- }
2758
- ),
2759
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.AccordionContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
2993
+ const composedBoxRefs = designSystem.useComposedRefs(
2994
+ boxRef,
2995
+ dropRef
2996
+ );
2997
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: isDragging ? /* @__PURE__ */ jsxRuntime.jsx(Preview$1, {}) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Item, { ref: composedBoxRefs, value: __temp_key__, children: [
2998
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Header, { children: [
2999
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Trigger, { children: displayValue }),
3000
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Actions, { children: [
3001
+ /* @__PURE__ */ jsxRuntime.jsx(
3002
+ designSystem.IconButton,
3003
+ {
3004
+ variant: "ghost",
3005
+ onClick: onDeleteComponent,
3006
+ label: formatMessage({
3007
+ id: index.getTranslation("containers.Edit.delete"),
3008
+ defaultMessage: "Delete"
3009
+ }),
3010
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {})
3011
+ }
3012
+ ),
3013
+ /* @__PURE__ */ jsxRuntime.jsx(
3014
+ designSystem.IconButton,
3015
+ {
3016
+ ref: composedAccordionRefs,
3017
+ variant: "ghost",
3018
+ onClick: (e) => e.stopPropagation(),
3019
+ "data-handler-id": handlerId,
3020
+ label: formatMessage({
3021
+ id: index.getTranslation("components.DragHandle-label"),
3022
+ defaultMessage: "Drag"
3023
+ }),
3024
+ onKeyDown: handleKeyDown,
3025
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, {})
3026
+ }
3027
+ )
3028
+ ] })
3029
+ ] }),
3030
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(
2760
3031
  designSystem.Flex,
2761
3032
  {
2762
3033
  direction: "column",
@@ -2770,9 +3041,9 @@ const Component = ({
2770
3041
  ] }) });
2771
3042
  };
2772
3043
  const Preview$1 = () => {
2773
- return /* @__PURE__ */ jsxRuntime.jsx(StyledSpan, { as: "span", padding: 6, background: "primary100" });
3044
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledSpan, { tag: "span", padding: 6, background: "primary100" });
2774
3045
  };
2775
- const StyledSpan = styled__default.default(designSystem.Box)`
3046
+ const StyledSpan = styledComponents.styled(designSystem.Box)`
2776
3047
  display: block;
2777
3048
  outline: 1px dashed ${({ theme }) => theme.colors.primary500};
2778
3049
  outline-offset: -1px;
@@ -2796,29 +3067,15 @@ const ComponentInput = ({
2796
3067
  const data = transformDocument(schema, components)(form);
2797
3068
  field.onChange(name2, data);
2798
3069
  };
2799
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
3070
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { error: field.error, required, children: [
2800
3071
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", children: [
2801
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { paddingBottom: 1, children: [
2802
- /* @__PURE__ */ jsxRuntime.jsxs(
2803
- designSystem.Typography,
2804
- {
2805
- textColor: "neutral800",
2806
- htmlFor: name2,
2807
- variant: "pi",
2808
- fontWeight: "bold",
2809
- as: "label",
2810
- children: [
2811
- label,
2812
- attribute.repeatable && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2813
- " (",
2814
- Array.isArray(field.value) ? field.value.length : 0,
2815
- ")"
2816
- ] }),
2817
- required && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "danger600", children: "*" })
2818
- ]
2819
- }
2820
- ),
2821
- labelAction && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 1, children: labelAction })
3072
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Label, { action: labelAction, children: [
3073
+ label,
3074
+ attribute.repeatable && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3075
+ " (",
3076
+ Array.isArray(field.value) ? field.value.length : 0,
3077
+ ")"
3078
+ ] })
2822
3079
  ] }),
2823
3080
  showResetComponent && /* @__PURE__ */ jsxRuntime.jsx(
2824
3081
  designSystem.IconButton,
@@ -2827,21 +3084,21 @@ const ComponentInput = ({
2827
3084
  id: index.getTranslation("components.reset-entry"),
2828
3085
  defaultMessage: "Reset Entry"
2829
3086
  }),
2830
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {}),
2831
- borderWidth: 0,
3087
+ variant: "ghost",
2832
3088
  onClick: () => {
2833
3089
  field.onChange(name2, null);
2834
- }
3090
+ },
3091
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {})
2835
3092
  }
2836
3093
  )
2837
3094
  ] }),
2838
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
2839
- !attribute.repeatable && !field.value && /* @__PURE__ */ jsxRuntime.jsx(Initializer, { disabled, name: name2, onClick: handleInitialisationClick }),
2840
- !attribute.repeatable && field.value ? /* @__PURE__ */ jsxRuntime.jsx(NonRepeatableComponent, { attribute, name: name2, disabled, ...props, children: props.children }) : null,
2841
- attribute.repeatable && /* @__PURE__ */ jsxRuntime.jsx(RepeatableComponent, { attribute, name: name2, disabled, ...props, children: props.children })
2842
- ] })
3095
+ !attribute.repeatable && !field.value && /* @__PURE__ */ jsxRuntime.jsx(Initializer, { disabled, name: name2, onClick: handleInitialisationClick }),
3096
+ !attribute.repeatable && field.value ? /* @__PURE__ */ jsxRuntime.jsx(NonRepeatableComponent, { attribute, name: name2, disabled, ...props, children: props.children }) : null,
3097
+ attribute.repeatable && /* @__PURE__ */ jsxRuntime.jsx(RepeatableComponent, { attribute, name: name2, disabled, ...props, children: props.children }),
3098
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
2843
3099
  ] });
2844
3100
  };
3101
+ const MemoizedComponentInput = React__namespace.memo(ComponentInput);
2845
3102
  const AddComponentButton = ({
2846
3103
  hasError,
2847
3104
  isDisabled,
@@ -2856,15 +3113,12 @@ const AddComponentButton = ({
2856
3113
  onClick,
2857
3114
  disabled: isDisabled,
2858
3115
  background: "neutral0",
2859
- paddingTop: 3,
2860
- paddingBottom: 3,
2861
- paddingLeft: 4,
2862
- paddingRight: 4,
2863
3116
  style: { cursor: isDisabled ? "not-allowed" : "pointer" },
2864
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { as: "span", gap: 2, children: [
3117
+ variant: "tertiary",
3118
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "span", gap: 2, children: [
2865
3119
  /* @__PURE__ */ jsxRuntime.jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
2866
3120
  /* @__PURE__ */ jsxRuntime.jsx(
2867
- designSystem.Typography,
3121
+ AddComponentTitle,
2868
3122
  {
2869
3123
  variant: "pi",
2870
3124
  fontWeight: "bold",
@@ -2876,7 +3130,7 @@ const AddComponentButton = ({
2876
3130
  }
2877
3131
  );
2878
3132
  };
2879
- const StyledAddIcon = styled__default.default(Icons.PlusCircle)`
3133
+ const StyledAddIcon = styledComponents.styled(Icons.PlusCircle)`
2880
3134
  height: ${({ theme }) => theme.spaces[6]};
2881
3135
  width: ${({ theme }) => theme.spaces[6]};
2882
3136
  transform: ${({ $isOpen }) => $isOpen ? "rotate(45deg)" : "rotate(0deg)"};
@@ -2888,13 +3142,15 @@ const StyledAddIcon = styled__default.default(Icons.PlusCircle)`
2888
3142
  fill: ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral600};
2889
3143
  }
2890
3144
  `;
2891
- const StyledButton = styled__default.default(designSystem.BaseButton)`
3145
+ const AddComponentTitle = styledComponents.styled(designSystem.Typography)``;
3146
+ const StyledButton = styledComponents.styled(designSystem.Button)`
2892
3147
  border-radius: 26px;
2893
3148
  border-color: ${({ theme }) => theme.colors.neutral150};
2894
3149
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
3150
+ height: 5rem;
2895
3151
 
2896
3152
  &:hover {
2897
- ${designSystem.Typography} {
3153
+ ${AddComponentTitle} {
2898
3154
  color: ${({ theme }) => theme.colors.primary600};
2899
3155
  }
2900
3156
 
@@ -2903,12 +3159,12 @@ const StyledButton = styled__default.default(designSystem.BaseButton)`
2903
3159
  fill: ${({ theme }) => theme.colors.primary600};
2904
3160
  }
2905
3161
  > path {
2906
- fill: ${({ theme }) => theme.colors.neutral100};
3162
+ fill: ${({ theme }) => theme.colors.primary600};
2907
3163
  }
2908
3164
  }
2909
3165
  }
2910
3166
  &:active {
2911
- ${designSystem.Typography} {
3167
+ ${AddComponentTitle} {
2912
3168
  color: ${({ theme }) => theme.colors.primary600};
2913
3169
  }
2914
3170
  ${StyledAddIcon} {
@@ -2925,27 +3181,15 @@ const ComponentCategory = ({
2925
3181
  category,
2926
3182
  components = [],
2927
3183
  variant = "primary",
2928
- isOpen,
2929
- onAddComponent,
2930
- onToggle
3184
+ onAddComponent
2931
3185
  }) => {
2932
3186
  const { formatMessage } = reactIntl.useIntl();
2933
- const handleToggle = () => {
2934
- onToggle(category);
2935
- };
2936
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion, { expanded: isOpen, onToggle: handleToggle, size: "S", children: [
2937
- /* @__PURE__ */ jsxRuntime.jsx(
2938
- designSystem.AccordionToggle,
2939
- {
2940
- variant,
2941
- title: formatMessage({ id: category, defaultMessage: category }),
2942
- togglePosition: "left"
2943
- }
2944
- ),
2945
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.AccordionContent, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 4, paddingBottom: 4, paddingLeft: 3, paddingRight: 3, children: /* @__PURE__ */ jsxRuntime.jsx(Grid, { children: components.map(({ uid, displayName, icon }) => /* @__PURE__ */ jsxRuntime.jsx(
3187
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Item, { value: category, children: [
3188
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Header, { variant, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Trigger, { children: formatMessage({ id: category, defaultMessage: category }) }) }),
3189
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(Grid, { paddingTop: 4, paddingBottom: 4, paddingLeft: 3, paddingRight: 3, children: components.map(({ uid, displayName, icon }) => /* @__PURE__ */ jsxRuntime.jsx(
2946
3190
  ComponentBox,
2947
3191
  {
2948
- as: "button",
3192
+ tag: "button",
2949
3193
  type: "button",
2950
3194
  background: "neutral100",
2951
3195
  justifyContent: "center",
@@ -2955,34 +3199,32 @@ const ComponentCategory = ({
2955
3199
  shrink: 0,
2956
3200
  borderColor: "neutral200",
2957
3201
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "center", justifyContent: "center", children: [
2958
- /* @__PURE__ */ jsxRuntime.jsx(ComponentIcon.ComponentIcon, { icon }),
2959
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", fontWeight: "bold", textColor: "neutral600", children: displayName })
3202
+ /* @__PURE__ */ jsxRuntime.jsx(ComponentIcon.ComponentIcon, { color: "currentColor", background: "primary200", icon }),
3203
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", fontWeight: "bold", children: displayName })
2960
3204
  ] })
2961
3205
  },
2962
3206
  uid
2963
- )) }) }) })
3207
+ )) }) })
2964
3208
  ] });
2965
3209
  };
2966
- const Grid = styled__default.default.div`
3210
+ const Grid = styledComponents.styled(designSystem.Box)`
2967
3211
  display: grid;
2968
3212
  grid-template-columns: repeat(auto-fit, 14rem);
2969
3213
  grid-gap: ${({ theme }) => theme.spaces[1]};
2970
3214
  `;
2971
- const ComponentBox = styled__default.default(designSystem.Flex)`
3215
+ const ComponentBox = styledComponents.styled(designSystem.Flex)`
3216
+ color: ${({ theme }) => theme.colors.neutral600};
3217
+ cursor: pointer;
3218
+
3219
+ @media (prefers-reduced-motion: no-preference) {
3220
+ transition: color 120ms ${(props) => props.theme.motion.easings.easeOutQuad};
3221
+ }
3222
+
2972
3223
  &:focus,
2973
3224
  &:hover {
2974
3225
  border: 1px solid ${({ theme }) => theme.colors.primary200};
2975
3226
  background: ${({ theme }) => theme.colors.primary100};
2976
-
2977
- ${designSystem.Typography} {
2978
- color: ${({ theme }) => theme.colors.primary600};
2979
- }
2980
-
2981
- /* > Flex > ComponentIcon */
2982
- > div > div:first-child {
2983
- background: ${({ theme }) => theme.colors.primary200};
2984
- color: ${({ theme }) => theme.colors.primary600};
2985
- }
3227
+ color: ${({ theme }) => theme.colors.primary600};
2986
3228
  }
2987
3229
  `;
2988
3230
  const ComponentPicker = ({
@@ -2991,19 +3233,8 @@ const ComponentPicker = ({
2991
3233
  onClickAddComponent
2992
3234
  }) => {
2993
3235
  const { formatMessage } = reactIntl.useIntl();
2994
- const [categoryToOpen, setCategoryToOpen] = React__namespace.useState("");
2995
- React__namespace.useEffect(() => {
2996
- const categoryKeys = Object.keys(dynamicComponentsByCategory);
2997
- if (isOpen && categoryKeys.length > 0) {
2998
- setCategoryToOpen(categoryKeys[0]);
2999
- }
3000
- }, [isOpen, dynamicComponentsByCategory]);
3001
3236
  const handleAddComponentToDz = (componentUid) => () => {
3002
3237
  onClickAddComponent(componentUid);
3003
- setCategoryToOpen("");
3004
- };
3005
- const handleClickToggle = (categoryName) => {
3006
- setCategoryToOpen((currentCat) => currentCat === categoryName ? "" : categoryName);
3007
3238
  };
3008
3239
  if (!isOpen) {
3009
3240
  return null;
@@ -3024,14 +3255,12 @@ const ComponentPicker = ({
3024
3255
  id: index.getTranslation("components.DynamicZone.ComponentPicker-label"),
3025
3256
  defaultMessage: "Pick one component"
3026
3257
  }) }) }),
3027
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.KeyboardNavigable, { attributeName: "data-strapi-accordion-toggle", children: Object.entries(dynamicComponentsByCategory).map(([category, components], index2) => /* @__PURE__ */ jsxRuntime.jsx(
3258
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Root, { defaultValue: Object.keys(dynamicComponentsByCategory)[0], children: Object.entries(dynamicComponentsByCategory).map(([category, components], index2) => /* @__PURE__ */ jsxRuntime.jsx(
3028
3259
  ComponentCategory,
3029
3260
  {
3030
3261
  category,
3031
3262
  components,
3032
3263
  onAddComponent: handleAddComponentToDz,
3033
- isOpen: category === categoryToOpen,
3034
- onToggle: handleClickToggle,
3035
3264
  variant: index2 % 2 === 1 ? "primary" : "secondary"
3036
3265
  },
3037
3266
  category
@@ -3046,27 +3275,21 @@ const NotAllowedInput = ({ hint, label, required, name: name2 }) => {
3046
3275
  id: "components.NotAllowedInput.text",
3047
3276
  defaultMessage: "No permissions to see this field"
3048
3277
  });
3049
- return /* @__PURE__ */ jsxRuntime.jsx(
3050
- designSystem.TextInput,
3051
- {
3052
- disabled: true,
3053
- label,
3054
- id: name2,
3055
- hint,
3056
- name: name2,
3057
- placeholder,
3058
- required,
3059
- startAction: /* @__PURE__ */ jsxRuntime.jsx(StyledIcon, {}),
3060
- type: "text",
3061
- value: ""
3062
- }
3063
- );
3278
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { id: name2, hint, name: name2, required, children: [
3279
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: label }),
3280
+ /* @__PURE__ */ jsxRuntime.jsx(
3281
+ designSystem.TextInput,
3282
+ {
3283
+ disabled: true,
3284
+ placeholder,
3285
+ startAction: /* @__PURE__ */ jsxRuntime.jsx(Icons.EyeStriked, { fill: "neutral600" }),
3286
+ type: "text",
3287
+ value: ""
3288
+ }
3289
+ ),
3290
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
3291
+ ] });
3064
3292
  };
3065
- const StyledIcon = styled__default.default(Icons.EyeStriked)`
3066
- & > path {
3067
- fill: ${({ theme }) => theme.colors.neutral600};
3068
- }
3069
- `;
3070
3293
  function useDebounce(value, delay) {
3071
3294
  const [debouncedValue, setDebouncedValue] = React.useState(value);
3072
3295
  React.useEffect(() => {
@@ -3119,188 +3342,193 @@ const uidApi = index.contentManagerApi.injectEndpoints({
3119
3342
  });
3120
3343
  const { useGenerateUIDMutation, useGetDefaultUIDQuery, useGetAvailabilityQuery } = uidApi;
3121
3344
  const UID_REGEX = /^[A-Za-z0-9-_.~]*$/;
3122
- const UIDInput = React__namespace.forwardRef((props, ref) => {
3123
- const { model, id } = index.useDoc();
3124
- const allFormValues = strapiAdmin.useForm("InputUID", (form) => form.values);
3125
- const [availability, setAvailability] = React__namespace.useState();
3126
- const [showRegenerate, setShowRegenerate] = React__namespace.useState(false);
3127
- const field = strapiAdmin.useField(props.name);
3128
- const debouncedValue = useDebounce(field.value, 300);
3129
- const { toggleNotification } = strapiAdmin.useNotification();
3130
- const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
3131
- const { formatMessage } = reactIntl.useIntl();
3132
- const [{ query }] = strapiAdmin.useQueryParams();
3133
- const params = React__namespace.useMemo(() => index.buildValidParams(query), [query]);
3134
- const {
3135
- data: defaultGeneratedUID,
3136
- isLoading: isGeneratingDefaultUID,
3137
- error: apiError
3138
- } = useGetDefaultUIDQuery(
3139
- {
3140
- contentTypeUID: model,
3141
- field: props.name,
3142
- data: {
3143
- id: id ?? "",
3144
- ...allFormValues
3145
- },
3146
- params
3147
- },
3148
- {
3149
- skip: field.value || !props.required
3150
- }
3151
- );
3152
- React__namespace.useEffect(() => {
3153
- if (apiError) {
3154
- toggleNotification({
3155
- type: "warning",
3156
- message: formatAPIError(apiError)
3157
- });
3158
- }
3159
- }, [apiError, formatAPIError, toggleNotification]);
3160
- React__namespace.useEffect(() => {
3161
- if (defaultGeneratedUID && field.value === void 0) {
3162
- field.onChange(props.name, defaultGeneratedUID);
3163
- }
3164
- }, [defaultGeneratedUID, field, props.name]);
3165
- const [generateUID, { isLoading: isGeneratingUID }] = useGenerateUIDMutation();
3166
- const handleRegenerateClick = async () => {
3167
- try {
3168
- const res = await generateUID({
3345
+ const UIDInput = React__namespace.forwardRef(
3346
+ ({ hint, label, labelAction, name: name2, required, ...props }, ref) => {
3347
+ const { model, id } = index.useDoc();
3348
+ const allFormValues = strapiAdmin.useForm("InputUID", (form) => form.values);
3349
+ const [availability, setAvailability] = React__namespace.useState();
3350
+ const [showRegenerate, setShowRegenerate] = React__namespace.useState(false);
3351
+ const field = strapiAdmin.useField(name2);
3352
+ const debouncedValue = useDebounce(field.value, 300);
3353
+ const { toggleNotification } = strapiAdmin.useNotification();
3354
+ const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
3355
+ const { formatMessage } = reactIntl.useIntl();
3356
+ const [{ query }] = strapiAdmin.useQueryParams();
3357
+ const params = React__namespace.useMemo(() => index.buildValidParams(query), [query]);
3358
+ const {
3359
+ data: defaultGeneratedUID,
3360
+ isLoading: isGeneratingDefaultUID,
3361
+ error: apiError
3362
+ } = useGetDefaultUIDQuery(
3363
+ {
3169
3364
  contentTypeUID: model,
3170
- field: props.name,
3171
- data: { id: id ?? "", ...allFormValues },
3365
+ field: name2,
3366
+ data: {
3367
+ id: id ?? "",
3368
+ ...allFormValues
3369
+ },
3172
3370
  params
3173
- });
3174
- if ("data" in res) {
3175
- field.onChange(props.name, res.data);
3176
- } else {
3371
+ },
3372
+ {
3373
+ skip: field.value || !required
3374
+ }
3375
+ );
3376
+ React__namespace.useEffect(() => {
3377
+ if (apiError) {
3177
3378
  toggleNotification({
3178
- type: "danger",
3179
- message: formatAPIError(res.error)
3379
+ type: "warning",
3380
+ message: formatAPIError(apiError)
3180
3381
  });
3181
3382
  }
3182
- } catch (err) {
3183
- toggleNotification({
3184
- type: "danger",
3185
- message: formatMessage({
3186
- id: "notification.error",
3187
- defaultMessage: "An error occurred."
3188
- })
3189
- });
3190
- }
3191
- };
3192
- const {
3193
- data: availabilityData,
3194
- isLoading: isCheckingAvailability,
3195
- error: availabilityError
3196
- } = useGetAvailabilityQuery(
3197
- {
3198
- contentTypeUID: model,
3199
- field: props.name,
3200
- value: debouncedValue ? debouncedValue.trim() : "",
3201
- params
3202
- },
3203
- {
3204
- skip: !Boolean(
3205
- debouncedValue !== field.initialValue && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3206
- )
3207
- }
3208
- );
3209
- React__namespace.useEffect(() => {
3210
- if (availabilityError) {
3211
- toggleNotification({
3212
- type: "warning",
3213
- message: formatAPIError(availabilityError)
3214
- });
3215
- }
3216
- }, [availabilityError, formatAPIError, toggleNotification]);
3217
- React__namespace.useEffect(() => {
3218
- setAvailability(availabilityData);
3219
- let timer;
3220
- if (availabilityData?.isAvailable) {
3221
- timer = window.setTimeout(() => {
3222
- setAvailability(void 0);
3223
- }, 4e3);
3224
- }
3225
- return () => {
3226
- if (timer) {
3227
- clearTimeout(timer);
3383
+ }, [apiError, formatAPIError, toggleNotification]);
3384
+ React__namespace.useEffect(() => {
3385
+ if (defaultGeneratedUID && field.value === void 0) {
3386
+ field.onChange(name2, defaultGeneratedUID);
3387
+ }
3388
+ }, [defaultGeneratedUID, field, name2]);
3389
+ const [generateUID, { isLoading: isGeneratingUID }] = useGenerateUIDMutation();
3390
+ const handleRegenerateClick = async () => {
3391
+ try {
3392
+ const res = await generateUID({
3393
+ contentTypeUID: model,
3394
+ field: name2,
3395
+ data: { id: id ?? "", ...allFormValues },
3396
+ params
3397
+ });
3398
+ if ("data" in res) {
3399
+ field.onChange(name2, res.data);
3400
+ } else {
3401
+ toggleNotification({
3402
+ type: "danger",
3403
+ message: formatAPIError(res.error)
3404
+ });
3405
+ }
3406
+ } catch (err) {
3407
+ toggleNotification({
3408
+ type: "danger",
3409
+ message: formatMessage({
3410
+ id: "notification.error",
3411
+ defaultMessage: "An error occurred."
3412
+ })
3413
+ });
3228
3414
  }
3229
3415
  };
3230
- }, [availabilityData]);
3231
- const isLoading = isGeneratingDefaultUID || isGeneratingUID || isCheckingAvailability;
3232
- const fieldRef = strapiAdmin.useFocusInputField(props.name);
3233
- const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
3234
- return (
3235
- // @ts-expect-error – label _could_ be a ReactNode since it's a child, this should be fixed in the DS.
3236
- /* @__PURE__ */ jsxRuntime.jsx(
3237
- designSystem.TextInput,
3416
+ const {
3417
+ data: availabilityData,
3418
+ isLoading: isCheckingAvailability,
3419
+ error: availabilityError
3420
+ } = useGetAvailabilityQuery(
3238
3421
  {
3239
- ref: composedRefs,
3240
- disabled: props.disabled,
3241
- error: field.error,
3242
- endAction: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { position: "relative", gap: 1, children: [
3243
- availability && !showRegenerate && /* @__PURE__ */ jsxRuntime.jsxs(
3244
- TextValidation,
3245
- {
3246
- alignItems: "center",
3247
- gap: 1,
3248
- justifyContent: "flex-end",
3249
- available: !!availability?.isAvailable,
3250
- "data-not-here-outer": true,
3251
- position: "absolute",
3252
- pointerEvents: "none",
3253
- right: 6,
3254
- width: "100px",
3255
- children: [
3256
- availability?.isAvailable ? /* @__PURE__ */ jsxRuntime.jsx(Icons.CheckCircle, {}) : /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, {}),
3257
- /* @__PURE__ */ jsxRuntime.jsx(
3258
- designSystem.Typography,
3259
- {
3260
- textColor: availability.isAvailable ? "success600" : "danger600",
3261
- variant: "pi",
3262
- children: formatMessage(
3263
- availability.isAvailable ? {
3264
- id: "content-manager.components.uid.available",
3265
- defaultMessage: "Available"
3266
- } : {
3267
- id: "content-manager.components.uid.unavailable",
3268
- defaultMessage: "Unavailable"
3269
- }
3270
- )
3271
- }
3272
- )
3273
- ]
3274
- }
3275
- ),
3276
- !props.disabled && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3277
- showRegenerate && /* @__PURE__ */ jsxRuntime.jsx(TextValidation, { alignItems: "center", justifyContent: "flex-end", gap: 1, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", children: formatMessage({
3278
- id: "content-manager.components.uid.regenerate",
3279
- defaultMessage: "Regenerate"
3280
- }) }) }),
3281
- /* @__PURE__ */ jsxRuntime.jsx(
3282
- FieldActionWrapper,
3422
+ contentTypeUID: model,
3423
+ field: name2,
3424
+ value: debouncedValue ? debouncedValue.trim() : "",
3425
+ params
3426
+ },
3427
+ {
3428
+ skip: !Boolean(
3429
+ debouncedValue !== field.initialValue && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3430
+ )
3431
+ }
3432
+ );
3433
+ React__namespace.useEffect(() => {
3434
+ if (availabilityError) {
3435
+ toggleNotification({
3436
+ type: "warning",
3437
+ message: formatAPIError(availabilityError)
3438
+ });
3439
+ }
3440
+ }, [availabilityError, formatAPIError, toggleNotification]);
3441
+ React__namespace.useEffect(() => {
3442
+ setAvailability(availabilityData);
3443
+ let timer;
3444
+ if (availabilityData?.isAvailable) {
3445
+ timer = window.setTimeout(() => {
3446
+ setAvailability(void 0);
3447
+ }, 4e3);
3448
+ }
3449
+ return () => {
3450
+ if (timer) {
3451
+ clearTimeout(timer);
3452
+ }
3453
+ };
3454
+ }, [availabilityData]);
3455
+ const isLoading = isGeneratingDefaultUID || isGeneratingUID || isCheckingAvailability;
3456
+ const fieldRef = strapiAdmin.useFocusInputField(name2);
3457
+ const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
3458
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { hint, name: name2, error: field.error, required, children: [
3459
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
3460
+ /* @__PURE__ */ jsxRuntime.jsx(
3461
+ designSystem.TextInput,
3462
+ {
3463
+ ref: composedRefs,
3464
+ disabled: props.disabled,
3465
+ endAction: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { position: "relative", gap: 1, children: [
3466
+ availability && !showRegenerate && /* @__PURE__ */ jsxRuntime.jsxs(
3467
+ TextValidation,
3283
3468
  {
3284
- onClick: handleRegenerateClick,
3285
- label: formatMessage({
3286
- id: "content-manager.components.uid.regenerate",
3287
- defaultMessage: "Regenerate"
3288
- }),
3289
- onMouseEnter: () => setShowRegenerate(true),
3290
- onMouseLeave: () => setShowRegenerate(false),
3291
- children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingWrapper, { "data-testid": "loading-wrapper", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(Icons.ArrowClockwise, {})
3469
+ alignItems: "center",
3470
+ gap: 1,
3471
+ justifyContent: "flex-end",
3472
+ $available: !!availability?.isAvailable,
3473
+ "data-not-here-outer": true,
3474
+ position: "absolute",
3475
+ pointerEvents: "none",
3476
+ right: 6,
3477
+ width: "100px",
3478
+ children: [
3479
+ availability?.isAvailable ? /* @__PURE__ */ jsxRuntime.jsx(Icons.CheckCircle, {}) : /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, {}),
3480
+ /* @__PURE__ */ jsxRuntime.jsx(
3481
+ designSystem.Typography,
3482
+ {
3483
+ textColor: availability.isAvailable ? "success600" : "danger600",
3484
+ variant: "pi",
3485
+ children: formatMessage(
3486
+ availability.isAvailable ? {
3487
+ id: "content-manager.components.uid.available",
3488
+ defaultMessage: "Available"
3489
+ } : {
3490
+ id: "content-manager.components.uid.unavailable",
3491
+ defaultMessage: "Unavailable"
3492
+ }
3493
+ )
3494
+ }
3495
+ )
3496
+ ]
3292
3497
  }
3293
- )
3294
- ] })
3295
- ] }),
3296
- onChange: field.onChange,
3297
- value: field.value ?? "",
3298
- ...props
3299
- }
3300
- )
3301
- );
3302
- });
3303
- const FieldActionWrapper = styled__default.default(designSystem.FieldAction)`
3498
+ ),
3499
+ !props.disabled && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3500
+ showRegenerate && /* @__PURE__ */ jsxRuntime.jsx(TextValidation, { alignItems: "center", justifyContent: "flex-end", gap: 1, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", children: formatMessage({
3501
+ id: "content-manager.components.uid.regenerate",
3502
+ defaultMessage: "Regenerate"
3503
+ }) }) }),
3504
+ /* @__PURE__ */ jsxRuntime.jsx(
3505
+ FieldActionWrapper,
3506
+ {
3507
+ onClick: handleRegenerateClick,
3508
+ label: formatMessage({
3509
+ id: "content-manager.components.uid.regenerate",
3510
+ defaultMessage: "Regenerate"
3511
+ }),
3512
+ onMouseEnter: () => setShowRegenerate(true),
3513
+ onMouseLeave: () => setShowRegenerate(false),
3514
+ children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingWrapper, { "data-testid": "loading-wrapper", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(Icons.ArrowClockwise, {})
3515
+ }
3516
+ )
3517
+ ] })
3518
+ ] }),
3519
+ onChange: field.onChange,
3520
+ value: field.value ?? "",
3521
+ ...props
3522
+ }
3523
+ ),
3524
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {}),
3525
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
3526
+ ] });
3527
+ }
3528
+ );
3529
+ const FieldActionWrapper = styledComponents.styled(designSystem.Field.Action)`
3530
+ width: 1.6rem;
3531
+
3304
3532
  svg {
3305
3533
  height: 1.6rem;
3306
3534
  width: 1.6rem;
@@ -3315,17 +3543,17 @@ const FieldActionWrapper = styled__default.default(designSystem.FieldAction)`
3315
3543
  }
3316
3544
  }
3317
3545
  `;
3318
- const TextValidation = styled__default.default(designSystem.Flex)`
3546
+ const TextValidation = styledComponents.styled(designSystem.Flex)`
3319
3547
  svg {
3320
3548
  height: 1.2rem;
3321
3549
  width: 1.2rem;
3322
3550
 
3323
3551
  path {
3324
- fill: ${({ theme, available }) => available ? theme.colors.success600 : theme.colors.danger600};
3552
+ fill: ${({ theme, $available }) => $available ? theme.colors.success600 : theme.colors.danger600};
3325
3553
  }
3326
3554
  }
3327
3555
  `;
3328
- const rotation = styled.keyframes`
3556
+ const rotation = styledComponents.keyframes`
3329
3557
  from {
3330
3558
  transform: rotate(0deg);
3331
3559
  }
@@ -3333,9 +3561,10 @@ const rotation = styled.keyframes`
3333
3561
  transform: rotate(359deg);
3334
3562
  }
3335
3563
  `;
3336
- const LoadingWrapper = styled__default.default(designSystem.Flex)`
3564
+ const LoadingWrapper = styledComponents.styled(designSystem.Flex)`
3337
3565
  animation: ${rotation} 2s infinite linear;
3338
3566
  `;
3567
+ const MemoizedUIDInput = React__namespace.memo(UIDInput);
3339
3568
  const md = new Markdown__default.default({
3340
3569
  html: true,
3341
3570
  // Enable HTML tags in source
@@ -3378,7 +3607,7 @@ const PreviewWysiwyg = ({ data = "" }) => {
3378
3607
  );
3379
3608
  return /* @__PURE__ */ jsxRuntime.jsx(Wrapper, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: html } }) });
3380
3609
  };
3381
- const Wrapper = styled__default.default.div`
3610
+ const Wrapper = styledComponents.styled.div`
3382
3611
  position: absolute;
3383
3612
  top: 0;
3384
3613
  width: 100%;
@@ -3670,17 +3899,17 @@ const Editor = React__namespace.forwardRef(
3670
3899
  [editorRef]
3671
3900
  );
3672
3901
  return /* @__PURE__ */ jsxRuntime.jsxs(EditorAndPreviewWrapper, { children: [
3673
- /* @__PURE__ */ jsxRuntime.jsx(EditorStylesContainer, { isExpandMode, disabled: disabled || isPreviewMode, children: /* @__PURE__ */ jsxRuntime.jsx("textarea", { ref: textareaRef }) }),
3902
+ /* @__PURE__ */ jsxRuntime.jsx(EditorStylesContainer, { $isExpandMode: isExpandMode, $disabled: disabled || isPreviewMode, children: /* @__PURE__ */ jsxRuntime.jsx("textarea", { ref: textareaRef }) }),
3674
3903
  isPreviewMode && /* @__PURE__ */ jsxRuntime.jsx(PreviewWysiwyg, { data: value })
3675
3904
  ] });
3676
3905
  }
3677
3906
  );
3678
- const EditorAndPreviewWrapper = styled__default.default.div`
3907
+ const EditorAndPreviewWrapper = styledComponents.styled.div`
3679
3908
  position: relative;
3680
3909
  height: calc(100% - 48px);
3681
3910
  `;
3682
- const EditorStylesContainer = styled__default.default.div`
3683
- cursor: ${({ disabled }) => disabled ? "not-allowed !important" : "auto"};
3911
+ const EditorStylesContainer = styledComponents.styled.div`
3912
+ cursor: ${({ $disabled }) => $disabled ? "not-allowed !important" : "auto"};
3684
3913
  height: 100%;
3685
3914
  /* BASICS */
3686
3915
  .CodeMirror-placeholder {
@@ -3690,7 +3919,7 @@ const EditorStylesContainer = styled__default.default.div`
3690
3919
  .CodeMirror {
3691
3920
  /* Set height, width, borders, and global font properties here */
3692
3921
  font-size: 1.4rem;
3693
- height: ${({ isExpandMode }) => isExpandMode ? "100%" : "410px"}; // 512px(total height) - 48px (header) - 52px(footer) - 2px border
3922
+ height: ${({ $isExpandMode }) => $isExpandMode ? "100%" : "410px"}; // 512px(total height) - 48px (header) - 52px(footer) - 2px border
3694
3923
  color: ${({ theme }) => theme.colors.neutral800};
3695
3924
  direction: ltr;
3696
3925
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
@@ -4068,7 +4297,7 @@ const EditorLayout = ({
4068
4297
  justifyContent: "flex-end",
4069
4298
  shrink: 0,
4070
4299
  width: "100%",
4071
- children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, children: [
4300
+ children: /* @__PURE__ */ jsxRuntime.jsxs(ExpandButton$1, { onClick: onCollapse, variant: "tertiary", size: "M", children: [
4072
4301
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
4073
4302
  id: "components.Wysiwyg.collapse",
4074
4303
  defaultMessage: "Collapse"
@@ -4086,27 +4315,37 @@ const EditorLayout = ({
4086
4315
  ) }) });
4087
4316
  }
4088
4317
  return /* @__PURE__ */ jsxRuntime.jsx(
4089
- designSystem.Box,
4318
+ designSystem.Flex,
4090
4319
  {
4091
4320
  borderColor: error ? "danger600" : "neutral200",
4092
4321
  borderStyle: "solid",
4093
4322
  borderWidth: "1px",
4094
4323
  hasRadius: true,
4324
+ direction: "column",
4325
+ alignItems: "stretch",
4095
4326
  children
4096
4327
  }
4097
4328
  );
4098
4329
  };
4099
- const ExpandWrapper = styled__default.default(designSystem.Flex)`
4330
+ const ExpandWrapper = styledComponents.styled(designSystem.Flex)`
4100
4331
  background: ${({ theme }) => `${theme.colors.neutral800}${Math.floor(0.2 * 255).toString(16).padStart(2, "0")}`};
4101
4332
  `;
4102
- const BoxWithBorder = styled__default.default(designSystem.Box)`
4333
+ const BoxWithBorder = styledComponents.styled(designSystem.Box)`
4103
4334
  border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
4104
4335
  `;
4105
- const ExpandButton$1 = styled__default.default(designSystem.BaseButton)`
4336
+ const ExpandButton$1 = styledComponents.styled(designSystem.Button)`
4106
4337
  background-color: transparent;
4107
4338
  border: none;
4108
4339
  align-items: center;
4109
4340
 
4341
+ & > span {
4342
+ display: flex;
4343
+ justify-content: space-between;
4344
+ align-items: center;
4345
+ width: 100%;
4346
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4347
+ }
4348
+
4110
4349
  svg {
4111
4350
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4112
4351
 
@@ -4373,26 +4612,24 @@ const quoteAndCodeHandler = (editor, markdownType) => {
4373
4612
  insertWithoutTextToEdit(editor, markdownType, line, contentLength);
4374
4613
  }
4375
4614
  };
4376
- const CustomIconButton = styled__default.default(designSystem.IconButton)`
4615
+ const CustomIconButton = styledComponents.styled(designSystem.IconButton)`
4377
4616
  padding: ${({ theme }) => theme.spaces[2]};
4378
- /* Trick to prevent the outline from overflowing because of the general outline-offset */
4379
- outline-offset: -2px !important;
4380
4617
 
4381
4618
  svg {
4382
4619
  width: 1.8rem;
4383
4620
  height: 1.8rem;
4384
4621
  }
4385
4622
  `;
4386
- const CustomLinkIconButton = styled__default.default(CustomIconButton)`
4623
+ const CustomLinkIconButton = styledComponents.styled(CustomIconButton)`
4387
4624
  svg {
4388
4625
  width: 0.8rem;
4389
4626
  height: 0.8rem;
4390
4627
  }
4391
4628
  `;
4392
- const MainButtons = styled__default.default(designSystem.IconButtonGroup)`
4629
+ const MainButtons = styledComponents.styled(designSystem.IconButtonGroup)`
4393
4630
  margin-left: ${({ theme }) => theme.spaces[4]};
4394
4631
  `;
4395
- const MoreButton = styled__default.default(designSystem.IconButton)`
4632
+ const MoreButton = styledComponents.styled(designSystem.IconButton)`
4396
4633
  margin: ${({ theme }) => `0 ${theme.spaces[2]}`};
4397
4634
  padding: ${({ theme }) => theme.spaces[2]};
4398
4635
 
@@ -4401,14 +4638,22 @@ const MoreButton = styled__default.default(designSystem.IconButton)`
4401
4638
  height: 1.8rem;
4402
4639
  }
4403
4640
  `;
4404
- const IconButtonGroupMargin = styled__default.default(designSystem.IconButtonGroup)`
4641
+ const IconButtonGroupMargin = styledComponents.styled(designSystem.IconButtonGroup)`
4405
4642
  margin-right: ${({ theme }) => `${theme.spaces[2]}`};
4406
4643
  `;
4407
- const ExpandButton = styled__default.default(designSystem.BaseButton)`
4644
+ const ExpandButton = styledComponents.styled(designSystem.Button)`
4408
4645
  background-color: transparent;
4409
4646
  border: none;
4410
4647
  align-items: center;
4411
4648
 
4649
+ & > span {
4650
+ display: flex;
4651
+ justify-content: space-between;
4652
+ align-items: center;
4653
+ width: 100%;
4654
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4655
+ }
4656
+
4412
4657
  svg {
4413
4658
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4414
4659
  path {
@@ -4420,8 +4665,8 @@ const ExpandButton = styled__default.default(designSystem.BaseButton)`
4420
4665
  `;
4421
4666
  const WysiwygFooter = ({ onToggleExpand }) => {
4422
4667
  const { formatMessage } = reactIntl.useIntl();
4423
- 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: [
4424
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
4668
+ 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: [
4669
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: formatMessage({
4425
4670
  id: "components.WysiwygBottomControls.fullscreen",
4426
4671
  defaultMessage: "Expand"
4427
4672
  }) }),
@@ -4443,7 +4688,7 @@ const WysiwygNav = ({
4443
4688
  id: "components.Wysiwyg.selectOptions.title",
4444
4689
  defaultMessage: "Add a title"
4445
4690
  });
4446
- const buttonMoreRef = React__namespace.useRef(null);
4691
+ React__namespace.useRef(null);
4447
4692
  const handleTogglePopover = () => {
4448
4693
  setVisiblePopover((prev) => !prev);
4449
4694
  };
@@ -4456,21 +4701,30 @@ const WysiwygNav = ({
4456
4701
  justifyContent: "space-between",
4457
4702
  borderRadius: `0.4rem 0.4rem 0 0`,
4458
4703
  children: [
4459
- /* @__PURE__ */ jsxRuntime.jsxs(StyledFlex, { children: [
4460
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.SingleSelect, { disabled: true, placeholder: selectPlaceholder, size: "S", label: selectPlaceholder, children: [
4461
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4462
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
4463
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
4464
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
4465
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
4466
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4467
- ] }),
4704
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
4705
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4706
+ designSystem.SingleSelect,
4707
+ {
4708
+ disabled: true,
4709
+ placeholder: selectPlaceholder,
4710
+ "aria-label": selectPlaceholder,
4711
+ size: "S",
4712
+ children: [
4713
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4714
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
4715
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h3", children: "h3" }),
4716
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h4", children: "h4" }),
4717
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h5", children: "h5" }),
4718
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4719
+ ]
4720
+ }
4721
+ ) }),
4468
4722
  /* @__PURE__ */ jsxRuntime.jsxs(MainButtons, { children: [
4469
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Bold", name: "Bold", icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4470
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Italic", name: "Italic", icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {}) }),
4471
- /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Underline", name: "Underline", icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Underline, {}) })
4723
+ /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {}) }),
4724
+ /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {}) }),
4725
+ /* @__PURE__ */ jsxRuntime.jsx(CustomIconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Underline, {}) })
4472
4726
  ] }),
4473
- /* @__PURE__ */ jsxRuntime.jsx(MoreButton, { disabled: true, label: "More", icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.More, {}) })
4727
+ /* @__PURE__ */ jsxRuntime.jsx(MoreButton, { disabled: true, label: "More", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.More, {}) })
4474
4728
  ] }),
4475
4729
  !isExpandMode && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: onTogglePreviewMode, variant: "tertiary", children: formatMessage({
4476
4730
  id: "components.Wysiwyg.ToggleMode.markdown-mode",
@@ -4488,14 +4742,14 @@ const WysiwygNav = ({
4488
4742
  justifyContent: "space-between",
4489
4743
  borderRadius: `0.4rem 0.4rem 0 0`,
4490
4744
  children: [
4491
- /* @__PURE__ */ jsxRuntime.jsxs(StyledFlex, { children: [
4492
- /* @__PURE__ */ jsxRuntime.jsxs(
4745
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
4746
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4493
4747
  designSystem.SingleSelect,
4494
4748
  {
4495
4749
  placeholder: selectPlaceholder,
4496
- label: selectPlaceholder,
4497
- size: "S",
4750
+ "aria-label": selectPlaceholder,
4498
4751
  onChange: (value) => onActionClick(value, editorRef),
4752
+ size: "S",
4499
4753
  children: [
4500
4754
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h1", children: "h1" }),
4501
4755
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h2", children: "h2" }),
@@ -4505,7 +4759,7 @@ const WysiwygNav = ({
4505
4759
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "h6", children: "h6" })
4506
4760
  ]
4507
4761
  }
4508
- ),
4762
+ ) }),
4509
4763
  /* @__PURE__ */ jsxRuntime.jsxs(MainButtons, { children: [
4510
4764
  /* @__PURE__ */ jsxRuntime.jsx(
4511
4765
  CustomIconButton,
@@ -4513,7 +4767,7 @@ const WysiwygNav = ({
4513
4767
  onClick: () => onActionClick("Bold", editorRef),
4514
4768
  label: "Bold",
4515
4769
  name: "Bold",
4516
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {})
4770
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Bold, {})
4517
4771
  }
4518
4772
  ),
4519
4773
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4522,7 +4776,7 @@ const WysiwygNav = ({
4522
4776
  onClick: () => onActionClick("Italic", editorRef),
4523
4777
  label: "Italic",
4524
4778
  name: "Italic",
4525
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {})
4779
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Italic, {})
4526
4780
  }
4527
4781
  ),
4528
4782
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4531,91 +4785,85 @@ const WysiwygNav = ({
4531
4785
  onClick: () => onActionClick("Underline", editorRef),
4532
4786
  label: "Underline",
4533
4787
  name: "Underline",
4534
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Underline, {})
4788
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Underline, {})
4535
4789
  }
4536
4790
  )
4537
4791
  ] }),
4538
- /* @__PURE__ */ jsxRuntime.jsx(
4539
- MoreButton,
4540
- {
4541
- ref: buttonMoreRef,
4542
- onClick: handleTogglePopover,
4543
- label: "More",
4544
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.More, {})
4545
- }
4546
- ),
4547
- visiblePopover && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover, { onDismiss: handleTogglePopover, centered: true, source: buttonMoreRef, spacing: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
4548
- /* @__PURE__ */ jsxRuntime.jsxs(IconButtonGroupMargin, { children: [
4549
- /* @__PURE__ */ jsxRuntime.jsx(
4550
- CustomIconButton,
4551
- {
4552
- onClick: () => onActionClick("Strikethrough", editorRef, handleTogglePopover),
4553
- label: "Strikethrough",
4554
- name: "Strikethrough",
4555
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.StrikeThrough, {})
4556
- }
4557
- ),
4558
- /* @__PURE__ */ jsxRuntime.jsx(
4559
- CustomIconButton,
4560
- {
4561
- onClick: () => onActionClick("BulletList", editorRef, handleTogglePopover),
4562
- label: "BulletList",
4563
- name: "BulletList",
4564
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.BulletList, {})
4565
- }
4566
- ),
4567
- /* @__PURE__ */ jsxRuntime.jsx(
4568
- CustomIconButton,
4569
- {
4570
- onClick: () => onActionClick("NumberList", editorRef, handleTogglePopover),
4571
- label: "NumberList",
4572
- name: "NumberList",
4573
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.NumberList, {})
4574
- }
4575
- )
4576
- ] }),
4577
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.IconButtonGroup, { children: [
4578
- /* @__PURE__ */ jsxRuntime.jsx(
4579
- CustomIconButton,
4580
- {
4581
- onClick: () => onActionClick("Code", editorRef, handleTogglePopover),
4582
- label: "Code",
4583
- name: "Code",
4584
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Code, {})
4585
- }
4586
- ),
4587
- /* @__PURE__ */ jsxRuntime.jsx(
4588
- CustomIconButton,
4589
- {
4590
- onClick: () => {
4591
- handleTogglePopover();
4592
- onToggleMediaLib();
4593
- },
4594
- label: "Image",
4595
- name: "Image",
4596
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Image, {})
4597
- }
4598
- ),
4599
- /* @__PURE__ */ jsxRuntime.jsx(
4600
- CustomLinkIconButton,
4601
- {
4602
- onClick: () => onActionClick("Link", editorRef, handleTogglePopover),
4603
- label: "Link",
4604
- name: "Link",
4605
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Link, {})
4606
- }
4607
- ),
4608
- /* @__PURE__ */ jsxRuntime.jsx(
4609
- CustomIconButton,
4610
- {
4611
- onClick: () => onActionClick("Quote", editorRef, handleTogglePopover),
4612
- label: "Quote",
4613
- name: "Quote",
4614
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Quotes, {})
4615
- }
4616
- )
4617
- ] })
4618
- ] }) })
4792
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { children: [
4793
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(MoreButton, { label: "More", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.More, {}) }) }),
4794
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { sideOffset: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 2, children: [
4795
+ /* @__PURE__ */ jsxRuntime.jsxs(IconButtonGroupMargin, { children: [
4796
+ /* @__PURE__ */ jsxRuntime.jsx(
4797
+ CustomIconButton,
4798
+ {
4799
+ onClick: () => onActionClick("Strikethrough", editorRef, handleTogglePopover),
4800
+ label: "Strikethrough",
4801
+ name: "Strikethrough",
4802
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.StrikeThrough, {})
4803
+ }
4804
+ ),
4805
+ /* @__PURE__ */ jsxRuntime.jsx(
4806
+ CustomIconButton,
4807
+ {
4808
+ onClick: () => onActionClick("BulletList", editorRef, handleTogglePopover),
4809
+ label: "BulletList",
4810
+ name: "BulletList",
4811
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.BulletList, {})
4812
+ }
4813
+ ),
4814
+ /* @__PURE__ */ jsxRuntime.jsx(
4815
+ CustomIconButton,
4816
+ {
4817
+ onClick: () => onActionClick("NumberList", editorRef, handleTogglePopover),
4818
+ label: "NumberList",
4819
+ name: "NumberList",
4820
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.NumberList, {})
4821
+ }
4822
+ )
4823
+ ] }),
4824
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.IconButtonGroup, { children: [
4825
+ /* @__PURE__ */ jsxRuntime.jsx(
4826
+ CustomIconButton,
4827
+ {
4828
+ onClick: () => onActionClick("Code", editorRef, handleTogglePopover),
4829
+ label: "Code",
4830
+ name: "Code",
4831
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Code, {})
4832
+ }
4833
+ ),
4834
+ /* @__PURE__ */ jsxRuntime.jsx(
4835
+ CustomIconButton,
4836
+ {
4837
+ onClick: () => {
4838
+ handleTogglePopover();
4839
+ onToggleMediaLib();
4840
+ },
4841
+ label: "Image",
4842
+ name: "Image",
4843
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Image, {})
4844
+ }
4845
+ ),
4846
+ /* @__PURE__ */ jsxRuntime.jsx(
4847
+ CustomLinkIconButton,
4848
+ {
4849
+ onClick: () => onActionClick("Link", editorRef, handleTogglePopover),
4850
+ label: "Link",
4851
+ name: "Link",
4852
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Link, {})
4853
+ }
4854
+ ),
4855
+ /* @__PURE__ */ jsxRuntime.jsx(
4856
+ CustomIconButton,
4857
+ {
4858
+ onClick: () => onActionClick("Quote", editorRef, handleTogglePopover),
4859
+ label: "Quote",
4860
+ name: "Quote",
4861
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Quotes, {})
4862
+ }
4863
+ )
4864
+ ] })
4865
+ ] }) })
4866
+ ] })
4619
4867
  ] }),
4620
4868
  onTogglePreviewMode && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: onTogglePreviewMode, variant: "tertiary", children: formatMessage({
4621
4869
  id: "components.Wysiwyg.ToggleMode.preview-mode",
@@ -4625,19 +4873,6 @@ const WysiwygNav = ({
4625
4873
  }
4626
4874
  );
4627
4875
  };
4628
- const StyledFlex = styled__default.default(designSystem.Flex)`
4629
- /* Hide the label, every input needs a label. */
4630
- label {
4631
- border: 0;
4632
- clip: rect(0 0 0 0);
4633
- height: 1px;
4634
- margin: -1px;
4635
- overflow: hidden;
4636
- padding: 0;
4637
- position: absolute;
4638
- width: 1px;
4639
- }
4640
- `;
4641
4876
  const Wysiwyg = React__namespace.forwardRef(
4642
4877
  ({ hint, disabled, label, name: name2, placeholder, required, labelAction }, forwardedRef) => {
4643
4878
  const field = strapiAdmin.useField(name2);
@@ -4696,15 +4931,15 @@ const Wysiwyg = React__namespace.forwardRef(
4696
4931
  const handleSelectAssets = (files) => {
4697
4932
  const formattedFiles = files.map((f) => ({
4698
4933
  alt: f.alternativeText || f.name,
4699
- url: urls.prefixFileUrlWithBackendUrl(f.url),
4934
+ url: usePrev.prefixFileUrlWithBackendUrl(f.url),
4700
4935
  mime: f.mime
4701
4936
  }));
4702
4937
  insertFile(editorRef, formattedFiles);
4703
4938
  setMediaLibVisible(false);
4704
4939
  };
4705
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field, { name: name2, hint, error: field.error, required, children: [
4940
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: name2, hint, error: field.error, required, children: [
4706
4941
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
4707
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { action: labelAction, children: label }),
4942
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
4708
4943
  /* @__PURE__ */ jsxRuntime.jsxs(
4709
4944
  EditorLayout,
4710
4945
  {
@@ -4745,14 +4980,15 @@ const Wysiwyg = React__namespace.forwardRef(
4745
4980
  ]
4746
4981
  }
4747
4982
  ),
4748
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldHint, {}),
4749
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldError, {})
4983
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {}),
4984
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
4750
4985
  ] }),
4751
4986
  mediaLibVisible && // @ts-expect-error – TODO: fix this way of injecting because it's not really typeable without a registry.
4752
4987
  /* @__PURE__ */ jsxRuntime.jsx(MediaLibraryDialog, { onClose: handleToggleMediaLib, onSelectAssets: handleSelectAssets })
4753
4988
  ] });
4754
4989
  }
4755
4990
  );
4991
+ const MemoizedWysiwyg = React__namespace.memo(Wysiwyg);
4756
4992
  const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4757
4993
  const { id } = index.useDoc();
4758
4994
  const isFormDisabled = strapiAdmin.useForm("InputRenderer", (state) => state.disabled);
@@ -4802,10 +5038,10 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4802
5038
  }
4803
5039
  switch (props.type) {
4804
5040
  case "blocks":
4805
- return /* @__PURE__ */ jsxRuntime.jsx(BlocksInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
5041
+ return /* @__PURE__ */ jsxRuntime.jsx(MemoizedBlocksInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
4806
5042
  case "component":
4807
5043
  return /* @__PURE__ */ jsxRuntime.jsx(
4808
- ComponentInput,
5044
+ MemoizedComponentInput,
4809
5045
  {
4810
5046
  ...props,
4811
5047
  hint,
@@ -4817,11 +5053,11 @@ const InputRenderer = ({ visible, hint: providedHint, ...props }) => {
4817
5053
  case "dynamiczone":
4818
5054
  return /* @__PURE__ */ jsxRuntime.jsx(DynamicZone, { ...props, hint, disabled: fieldIsDisabled });
4819
5055
  case "relation":
4820
- return /* @__PURE__ */ jsxRuntime.jsx(Relations.RelationsField, { ...props, hint, disabled: fieldIsDisabled });
5056
+ return /* @__PURE__ */ jsxRuntime.jsx(Relations.MemoizedRelationsField, { ...props, hint, disabled: fieldIsDisabled });
4821
5057
  case "richtext":
4822
- return /* @__PURE__ */ jsxRuntime.jsx(Wysiwyg, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
5058
+ return /* @__PURE__ */ jsxRuntime.jsx(MemoizedWysiwyg, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
4823
5059
  case "uid":
4824
- return /* @__PURE__ */ jsxRuntime.jsx(UIDInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
5060
+ return /* @__PURE__ */ jsxRuntime.jsx(MemoizedUIDInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
4825
5061
  case "enumeration":
4826
5062
  return /* @__PURE__ */ jsxRuntime.jsx(
4827
5063
  strapiAdmin.InputRenderer,
@@ -4853,7 +5089,9 @@ const useFieldHint = (hint = void 0, attribute) => {
4853
5089
  if (!maximum && !minimum) {
4854
5090
  return hint;
4855
5091
  }
4856
- const units = !["biginteger", "integer", "number"].includes(attribute.type) ? formatMessage(
5092
+ const units = !["biginteger", "integer", "number", "dynamiczone", "component"].includes(
5093
+ attribute.type
5094
+ ) ? formatMessage(
4857
5095
  {
4858
5096
  id: "content-manager.form.Input.hint.character.unit",
4859
5097
  defaultMessage: "{maxValue, plural, one { character} other { characters}}"
@@ -4893,6 +5131,7 @@ const getMinMax = (attribute) => {
4893
5131
  return { maximum: void 0, minimum: void 0 };
4894
5132
  }
4895
5133
  };
5134
+ const MemoizedInputRenderer = React.memo(InputRenderer);
4896
5135
  const DynamicComponent = ({
4897
5136
  componentUid,
4898
5137
  disabled,
@@ -4906,7 +5145,6 @@ const DynamicComponent = ({
4906
5145
  dynamicComponentsByCategory = {},
4907
5146
  onAddComponent
4908
5147
  }) => {
4909
- const [isOpen, setIsOpen] = React__namespace.useState(true);
4910
5148
  const { formatMessage } = reactIntl.useIntl();
4911
5149
  const formValues = strapiAdmin.useForm("DynamicComponent", (state) => state.values);
4912
5150
  const {
@@ -4915,7 +5153,7 @@ const DynamicComponent = ({
4915
5153
  const title = React__namespace.useMemo(() => {
4916
5154
  const { mainField } = components[componentUid]?.settings ?? { mainField: "id" };
4917
5155
  const mainFieldValue = objects.getIn(formValues, `${name2}.${index$1}.${mainField}`);
4918
- const displayedValue = mainField === "id" ? "" : String(mainFieldValue).trim();
5156
+ const displayedValue = mainField === "id" || !mainFieldValue ? "" : String(mainFieldValue).trim();
4919
5157
  const mainValue = displayedValue.length > 0 ? `- ${displayedValue}` : displayedValue;
4920
5158
  return mainValue;
4921
5159
  }, [componentUid, components, formValues, name2, index$1]);
@@ -4926,9 +5164,6 @@ const DynamicComponent = ({
4926
5164
  ) ?? { icon: null, displayName: null };
4927
5165
  return { icon: icon2, displayName: displayName2 };
4928
5166
  }, [componentUid, dynamicComponentsByCategory]);
4929
- const handleToggle = () => {
4930
- setIsOpen((s) => !s);
4931
- };
4932
5167
  const [{ handlerId, isDragging, handleKeyDown }, boxRef, dropRef, dragRef, dragPreviewRef] = useDragAndDrop.useDragAndDrop(!disabled, {
4933
5168
  type: `${useDragAndDrop.ItemTypes.DYNAMIC_ZONE}_${name2}`,
4934
5169
  index: index$1,
@@ -4946,11 +5181,11 @@ const DynamicComponent = ({
4946
5181
  dragPreviewRef(reactDndHtml5Backend.getEmptyImage(), { captureDraggingState: false });
4947
5182
  }, [dragPreviewRef, index$1]);
4948
5183
  const composedBoxRefs = designSystem.useComposedRefs(boxRef, dropRef);
4949
- const accordionActions = disabled ? null : /* @__PURE__ */ jsxRuntime.jsxs(ActionsFlex, { gap: 0, children: [
5184
+ const accordionActions = disabled ? null : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4950
5185
  /* @__PURE__ */ jsxRuntime.jsx(
4951
- IconButtonCustom,
5186
+ designSystem.IconButton,
4952
5187
  {
4953
- borderWidth: 0,
5188
+ variant: "ghost",
4954
5189
  label: formatMessage(
4955
5190
  {
4956
5191
  id: index.getTranslation("components.DynamicZone.delete-label"),
@@ -4965,10 +5200,7 @@ const DynamicComponent = ({
4965
5200
  /* @__PURE__ */ jsxRuntime.jsx(
4966
5201
  designSystem.IconButton,
4967
5202
  {
4968
- forwardedAs: "div",
4969
- role: "button",
4970
- borderWidth: 0,
4971
- tabIndex: 0,
5203
+ variant: "ghost",
4972
5204
  onClick: (e) => e.stopPropagation(),
4973
5205
  "data-handler-id": handlerId,
4974
5206
  ref: dragRef,
@@ -4983,7 +5215,7 @@ const DynamicComponent = ({
4983
5215
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Root, { children: [
4984
5216
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Trigger, { size: "S", endIcon: null, paddingLeft: 2, paddingRight: 2, children: [
4985
5217
  /* @__PURE__ */ jsxRuntime.jsx(Icons.More, { "aria-hidden": true, focusable: false }),
4986
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { as: "span", children: formatMessage({
5218
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { tag: "span", children: formatMessage({
4987
5219
  id: index.getTranslation("components.DynamicZone.more-actions"),
4988
5220
  defaultMessage: "More actions"
4989
5221
  }) })
@@ -5012,62 +5244,59 @@ const DynamicComponent = ({
5012
5244
  ] })
5013
5245
  ] })
5014
5246
  ] });
5015
- return /* @__PURE__ */ jsxRuntime.jsxs(ComponentContainer, { as: "li", width: "100%", children: [
5247
+ const accordionTitle = title ? `${displayName} ${title}` : displayName;
5248
+ const accordionValue = React__namespace.useId();
5249
+ return /* @__PURE__ */ jsxRuntime.jsxs(ComponentContainer, { tag: "li", width: "100%", children: [
5016
5250
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Rectangle, { background: "neutral200" }) }),
5017
- /* @__PURE__ */ jsxRuntime.jsx(StyledBox, { ref: composedBoxRefs, hasRadius: true, children: isDragging ? /* @__PURE__ */ jsxRuntime.jsx(Preview, {}) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion, { expanded: isOpen, onToggle: handleToggle, size: "S", children: [
5018
- /* @__PURE__ */ jsxRuntime.jsx(
5019
- designSystem.AccordionToggle,
5020
- {
5021
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(ComponentIcon.ComponentIcon, { icon, showBackground: false, size: "S" }),
5022
- action: accordionActions,
5023
- title: `${displayName} ${title}`,
5024
- togglePosition: "left"
5025
- }
5026
- ),
5027
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.AccordionContent, { 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, { gap: 4, children: row.map(({ size, ...field }) => {
5251
+ /* @__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: [
5252
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Accordion.Header, { children: [
5253
+ /* @__PURE__ */ jsxRuntime.jsx(
5254
+ designSystem.Accordion.Trigger,
5255
+ {
5256
+ icon: icon && ComponentIcon.COMPONENT_ICONS[icon] ? ComponentIcon.COMPONENT_ICONS[icon] : ComponentIcon.COMPONENT_ICONS.dashboard,
5257
+ children: accordionTitle
5258
+ }
5259
+ ),
5260
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Actions, { children: accordionActions })
5261
+ ] }),
5262
+ /* @__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 }) => {
5028
5263
  const fieldName = `${name2}.${index$1}.${field.name}`;
5029
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: size, s: 12, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(InputRenderer, { ...field, name: fieldName }) }, fieldName);
5264
+ return /* @__PURE__ */ jsxRuntime.jsx(
5265
+ designSystem.Grid.Item,
5266
+ {
5267
+ col: size,
5268
+ s: 12,
5269
+ xs: 12,
5270
+ direction: "column",
5271
+ alignItems: "stretch",
5272
+ children: /* @__PURE__ */ jsxRuntime.jsx(MemoizedInputRenderer, { ...field, name: fieldName })
5273
+ },
5274
+ fieldName
5275
+ );
5030
5276
  }) }, rowInd)) }) }) })
5031
- ] }) })
5277
+ ] }) }) })
5032
5278
  ] });
5033
5279
  };
5034
- const ActionsFlex = styled__default.default(designSystem.Flex)`
5035
- /*
5036
- we need to remove the background from the button but we can't
5037
- wrap the element in styled because it breaks the forwardedAs which
5038
- we need for drag handler to work on firefox
5039
- */
5040
- div[role='button'] {
5041
- background: transparent;
5042
- }
5043
- `;
5044
- const IconButtonCustom = styled__default.default(designSystem.IconButton)`
5045
- background-color: transparent;
5046
-
5047
- svg path {
5048
- fill: ${({ theme, expanded }) => expanded ? theme.colors.primary600 : theme.colors.neutral600};
5049
- }
5050
- `;
5051
- const StyledBox = styled__default.default(designSystem.Box)`
5280
+ const StyledBox = styledComponents.styled(designSystem.Box)`
5052
5281
  > div:first-child {
5053
5282
  box-shadow: ${({ theme }) => theme.shadows.tableShadow};
5054
5283
  }
5055
5284
  `;
5056
- const AccordionContentRadius = styled__default.default(designSystem.Box)`
5285
+ const AccordionContentRadius = styledComponents.styled(designSystem.Box)`
5057
5286
  border-radius: 0 0 ${({ theme }) => theme.spaces[1]} ${({ theme }) => theme.spaces[1]};
5058
5287
  `;
5059
- const Rectangle = styled__default.default(designSystem.Box)`
5288
+ const Rectangle = styledComponents.styled(designSystem.Box)`
5060
5289
  width: ${({ theme }) => theme.spaces[2]};
5061
5290
  height: ${({ theme }) => theme.spaces[4]};
5062
5291
  `;
5063
- const Preview = styled__default.default.span`
5292
+ const Preview = styledComponents.styled.span`
5064
5293
  display: block;
5065
5294
  background-color: ${({ theme }) => theme.colors.primary100};
5066
5295
  outline: 1px dashed ${({ theme }) => theme.colors.primary500};
5067
5296
  outline-offset: -1px;
5068
5297
  padding: ${({ theme }) => theme.spaces[6]};
5069
5298
  `;
5070
- const ComponentContainer = styled__default.default(designSystem.Box)`
5299
+ const ComponentContainer = styledComponents.styled(designSystem.Box)`
5071
5300
  list-style: none;
5072
5301
  padding: 0;
5073
5302
  margin: 0;
@@ -5118,7 +5347,7 @@ const [DynamicZoneProvider, useDynamicZone] = strapiAdmin.createContext(
5118
5347
  );
5119
5348
  const DynamicZone = ({
5120
5349
  attribute,
5121
- disabled,
5350
+ disabled: disabledProp,
5122
5351
  hint,
5123
5352
  label,
5124
5353
  labelAction,
@@ -5128,7 +5357,8 @@ const DynamicZone = ({
5128
5357
  const { max = Infinity, min = -Infinity } = attribute ?? {};
5129
5358
  const [addComponentIsOpen, setAddComponentIsOpen] = React__namespace.useState(false);
5130
5359
  const [liveText, setLiveText] = React__namespace.useState("");
5131
- const { components } = index.useDoc();
5360
+ const { components, isLoading } = index.useDoc();
5361
+ const disabled = disabledProp || isLoading;
5132
5362
  const { addFieldRow, removeFieldRow, moveFieldRow } = strapiAdmin.useForm(
5133
5363
  "DynamicZone",
5134
5364
  ({ addFieldRow: addFieldRow2, removeFieldRow: removeFieldRow2, moveFieldRow: moveFieldRow2 }) => ({
@@ -5235,7 +5465,7 @@ const DynamicZone = ({
5235
5465
  const handleRemoveComponent = (name22, currentIndex) => () => {
5236
5466
  removeFieldRow(name22, currentIndex);
5237
5467
  };
5238
- const hasError = error !== void 0 || dynamicDisplayedComponentsLength < min || dynamicDisplayedComponentsLength > max;
5468
+ const hasError = error !== void 0;
5239
5469
  const renderButtonLabel = () => {
5240
5470
  if (addComponentIsOpen) {
5241
5471
  return formatMessage({ id: "app.utils.close-label", defaultMessage: "Close" });
@@ -5335,13 +5565,13 @@ const DynamicZone = ({
5335
5565
  )
5336
5566
  ] }) });
5337
5567
  };
5338
- exports.BlocksInput = BlocksInput;
5339
- exports.ComponentInput = ComponentInput;
5340
5568
  exports.DynamicZone = DynamicZone;
5341
- exports.InputRenderer = InputRenderer;
5569
+ exports.MemoizedBlocksInput = MemoizedBlocksInput;
5570
+ exports.MemoizedComponentInput = MemoizedComponentInput;
5571
+ exports.MemoizedInputRenderer = MemoizedInputRenderer;
5572
+ exports.MemoizedUIDInput = MemoizedUIDInput;
5573
+ exports.MemoizedWysiwyg = MemoizedWysiwyg;
5342
5574
  exports.NotAllowedInput = NotAllowedInput;
5343
- exports.UIDInput = UIDInput;
5344
- exports.Wysiwyg = Wysiwyg;
5345
5575
  exports.createDefaultForm = createDefaultForm;
5346
5576
  exports.prepareTempKeys = prepareTempKeys;
5347
5577
  exports.removeFieldsThatDontExistOnSchema = removeFieldsThatDontExistOnSchema;
@@ -5349,4 +5579,4 @@ exports.transformDocument = transformDocument;
5349
5579
  exports.useDynamicZone = useDynamicZone;
5350
5580
  exports.useFieldHint = useFieldHint;
5351
5581
  exports.useLazyComponents = useLazyComponents;
5352
- //# sourceMappingURL=Field-Caef4JjM.js.map
5582
+ //# sourceMappingURL=Field-CdK7ZLmv.js.map