@wordpress/edit-widgets 6.57.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/build/blocks/widget-area/edit/index.cjs +106 -116
  2. package/build/blocks/widget-area/edit/index.cjs.map +1 -7
  3. package/build/blocks/widget-area/edit/inner-blocks.cjs +44 -62
  4. package/build/blocks/widget-area/edit/inner-blocks.cjs.map +1 -7
  5. package/build/blocks/widget-area/edit/use-is-dragging-within.cjs +41 -53
  6. package/build/blocks/widget-area/edit/use-is-dragging-within.cjs.map +1 -7
  7. package/build/blocks/widget-area/index.cjs +40 -44
  8. package/build/blocks/widget-area/index.cjs.map +1 -7
  9. package/build/components/error-boundary/index.cjs +115 -155
  10. package/build/components/error-boundary/index.cjs.map +1 -7
  11. package/build/components/header/document-tools/index.cjs +80 -115
  12. package/build/components/header/document-tools/index.cjs.map +1 -7
  13. package/build/components/header/index.cjs +72 -80
  14. package/build/components/header/index.cjs.map +1 -7
  15. package/build/components/header/undo-redo/redo.cjs +30 -52
  16. package/build/components/header/undo-redo/redo.cjs.map +1 -7
  17. package/build/components/header/undo-redo/undo.cjs +29 -51
  18. package/build/components/header/undo-redo/undo.cjs.map +1 -7
  19. package/build/components/keyboard-shortcut-help-modal/config.cjs +88 -85
  20. package/build/components/keyboard-shortcut-help-modal/config.cjs.map +1 -7
  21. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +40 -57
  22. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +1 -7
  23. package/build/components/keyboard-shortcut-help-modal/index.cjs +94 -161
  24. package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -7
  25. package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +37 -75
  26. package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -7
  27. package/build/components/keyboard-shortcuts/index.cjs +107 -140
  28. package/build/components/keyboard-shortcuts/index.cjs.map +1 -7
  29. package/build/components/layout/index.cjs +65 -74
  30. package/build/components/layout/index.cjs.map +1 -7
  31. package/build/components/layout/interface.cjs +82 -102
  32. package/build/components/layout/interface.cjs.map +1 -7
  33. package/build/components/layout/unsaved-changes-warning.cjs +44 -48
  34. package/build/components/layout/unsaved-changes-warning.cjs.map +1 -7
  35. package/build/components/more-menu/index.cjs +125 -191
  36. package/build/components/more-menu/index.cjs.map +1 -7
  37. package/build/components/more-menu/tools-more-menu-group.cjs +9 -29
  38. package/build/components/more-menu/tools-more-menu-group.cjs.map +1 -7
  39. package/build/components/notices/index.cjs +19 -39
  40. package/build/components/notices/index.cjs.map +1 -7
  41. package/build/components/save-button/index.cjs +31 -58
  42. package/build/components/save-button/index.cjs.map +1 -7
  43. package/build/components/secondary-sidebar/index.cjs +38 -45
  44. package/build/components/secondary-sidebar/index.cjs.map +1 -7
  45. package/build/components/secondary-sidebar/inserter-sidebar.cjs +50 -51
  46. package/build/components/secondary-sidebar/inserter-sidebar.cjs.map +1 -7
  47. package/build/components/secondary-sidebar/list-view-sidebar.cjs +51 -82
  48. package/build/components/secondary-sidebar/list-view-sidebar.cjs.map +1 -7
  49. package/build/components/sidebar/index.cjs +117 -180
  50. package/build/components/sidebar/index.cjs.map +1 -7
  51. package/build/components/sidebar/widget-areas.cjs +43 -85
  52. package/build/components/sidebar/widget-areas.cjs.map +1 -7
  53. package/build/components/welcome-guide/index.cjs +110 -186
  54. package/build/components/welcome-guide/index.cjs.map +1 -7
  55. package/build/components/widget-areas-block-editor-content/index.cjs +59 -63
  56. package/build/components/widget-areas-block-editor-content/index.cjs.map +1 -7
  57. package/build/components/widget-areas-block-editor-provider/index.cjs +105 -140
  58. package/build/components/widget-areas-block-editor-provider/index.cjs.map +1 -7
  59. package/build/constants.cjs +11 -32
  60. package/build/constants.cjs.map +1 -7
  61. package/build/filters/index.cjs +7 -4
  62. package/build/filters/move-to-widget-area.cjs +38 -53
  63. package/build/filters/move-to-widget-area.cjs.map +1 -7
  64. package/build/filters/replace-media-upload.cjs +11 -9
  65. package/build/filters/replace-media-upload.cjs.map +1 -7
  66. package/build/hooks/use-last-selected-widget-area.cjs +28 -49
  67. package/build/hooks/use-last-selected-widget-area.cjs.map +1 -7
  68. package/build/hooks/use-widget-library-insertion-point.cjs +33 -67
  69. package/build/hooks/use-widget-library-insertion-point.cjs.map +1 -7
  70. package/build/index.cjs +96 -97
  71. package/build/index.cjs.map +1 -7
  72. package/build/lock-unlock.cjs +10 -35
  73. package/build/lock-unlock.cjs.map +1 -7
  74. package/build/store/actions.cjs +269 -278
  75. package/build/store/actions.cjs.map +1 -7
  76. package/build/store/constants.cjs +12 -29
  77. package/build/store/constants.cjs.map +1 -7
  78. package/build/store/index.cjs +61 -52
  79. package/build/store/index.cjs.map +1 -7
  80. package/build/store/private-selectors.cjs +11 -32
  81. package/build/store/private-selectors.cjs.map +1 -7
  82. package/build/store/reducer.cjs +107 -88
  83. package/build/store/reducer.cjs.map +1 -7
  84. package/build/store/resolvers.cjs +60 -91
  85. package/build/store/resolvers.cjs.map +1 -7
  86. package/build/store/selectors.cjs +196 -229
  87. package/build/store/selectors.cjs.map +1 -7
  88. package/build/store/transformers.cjs +51 -82
  89. package/build/store/transformers.cjs.map +1 -7
  90. package/build/store/utils.cjs +76 -63
  91. package/build/store/utils.cjs.map +1 -7
  92. package/build-module/blocks/widget-area/edit/index.mjs +82 -94
  93. package/build-module/blocks/widget-area/edit/index.mjs.map +1 -7
  94. package/build-module/blocks/widget-area/edit/inner-blocks.mjs +19 -35
  95. package/build-module/blocks/widget-area/edit/inner-blocks.mjs.map +1 -7
  96. package/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs +36 -33
  97. package/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs.map +1 -7
  98. package/build-module/blocks/widget-area/index.mjs +12 -15
  99. package/build-module/blocks/widget-area/index.mjs.map +1 -7
  100. package/build-module/components/error-boundary/index.mjs +103 -128
  101. package/build-module/components/error-boundary/index.mjs.map +1 -7
  102. package/build-module/components/header/document-tools/index.mjs +51 -84
  103. package/build-module/components/header/document-tools/index.mjs.map +1 -7
  104. package/build-module/components/header/index.mjs +40 -47
  105. package/build-module/components/header/index.mjs.map +1 -7
  106. package/build-module/components/header/undo-redo/redo.mjs +20 -27
  107. package/build-module/components/header/undo-redo/redo.mjs.map +1 -7
  108. package/build-module/components/header/undo-redo/undo.mjs +19 -26
  109. package/build-module/components/header/undo-redo/undo.mjs.map +1 -7
  110. package/build-module/components/keyboard-shortcut-help-modal/config.mjs +83 -61
  111. package/build-module/components/keyboard-shortcut-help-modal/config.mjs.map +1 -7
  112. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs +19 -33
  113. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs.map +1 -7
  114. package/build-module/components/keyboard-shortcut-help-modal/index.mjs +67 -136
  115. package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -7
  116. package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +31 -54
  117. package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -7
  118. package/build-module/components/keyboard-shortcuts/index.mjs +99 -119
  119. package/build-module/components/keyboard-shortcuts/index.mjs.map +1 -7
  120. package/build-module/components/layout/index.mjs +29 -40
  121. package/build-module/components/layout/index.mjs.map +1 -7
  122. package/build-module/components/layout/interface.mjs +53 -76
  123. package/build-module/components/layout/interface.mjs.map +1 -7
  124. package/build-module/components/layout/unsaved-changes-warning.mjs +37 -26
  125. package/build-module/components/layout/unsaved-changes-warning.mjs.map +1 -7
  126. package/build-module/components/more-menu/index.mjs +95 -162
  127. package/build-module/components/more-menu/index.mjs.map +1 -7
  128. package/build-module/components/more-menu/tools-more-menu-group.mjs +5 -9
  129. package/build-module/components/more-menu/tools-more-menu-group.mjs.map +1 -7
  130. package/build-module/components/notices/index.mjs +12 -17
  131. package/build-module/components/notices/index.mjs.map +1 -7
  132. package/build-module/components/save-button/index.mjs +23 -35
  133. package/build-module/components/save-button/index.mjs.map +1 -7
  134. package/build-module/components/secondary-sidebar/index.mjs +15 -20
  135. package/build-module/components/secondary-sidebar/index.mjs.map +1 -7
  136. package/build-module/components/secondary-sidebar/inserter-sidebar.mjs +27 -25
  137. package/build-module/components/secondary-sidebar/inserter-sidebar.mjs.map +1 -7
  138. package/build-module/components/secondary-sidebar/list-view-sidebar.mjs +39 -55
  139. package/build-module/components/secondary-sidebar/list-view-sidebar.mjs.map +1 -7
  140. package/build-module/components/sidebar/index.mjs +96 -162
  141. package/build-module/components/sidebar/index.mjs.map +1 -7
  142. package/build-module/components/sidebar/widget-areas.mjs +30 -57
  143. package/build-module/components/sidebar/widget-areas.mjs.map +1 -7
  144. package/build-module/components/welcome-guide/index.mjs +103 -164
  145. package/build-module/components/welcome-guide/index.mjs.map +1 -7
  146. package/build-module/components/widget-areas-block-editor-content/index.mjs +35 -44
  147. package/build-module/components/widget-areas-block-editor-content/index.mjs.map +1 -7
  148. package/build-module/components/widget-areas-block-editor-provider/index.mjs +76 -109
  149. package/build-module/components/widget-areas-block-editor-provider/index.mjs.map +1 -7
  150. package/build-module/constants.mjs +5 -7
  151. package/build-module/constants.mjs.map +1 -7
  152. package/build-module/filters/index.mjs +0 -2
  153. package/build-module/filters/move-to-widget-area.mjs +28 -48
  154. package/build-module/filters/move-to-widget-area.mjs.map +1 -7
  155. package/build-module/filters/replace-media-upload.mjs +5 -8
  156. package/build-module/filters/replace-media-upload.mjs.map +1 -7
  157. package/build-module/hooks/use-last-selected-widget-area.mjs +23 -29
  158. package/build-module/hooks/use-last-selected-widget-area.mjs.map +1 -7
  159. package/build-module/hooks/use-widget-library-insertion-point.mjs +28 -47
  160. package/build-module/hooks/use-widget-library-insertion-point.mjs.map +1 -7
  161. package/build-module/index.mjs +62 -79
  162. package/build-module/index.mjs.map +1 -7
  163. package/build-module/lock-unlock.mjs +5 -10
  164. package/build-module/lock-unlock.mjs.map +1 -7
  165. package/build-module/store/actions.mjs +250 -247
  166. package/build-module/store/actions.mjs.map +1 -7
  167. package/build-module/store/constants.mjs +7 -5
  168. package/build-module/store/constants.mjs.map +1 -7
  169. package/build-module/store/index.mjs +18 -16
  170. package/build-module/store/index.mjs.map +1 -7
  171. package/build-module/store/private-selectors.mjs +5 -7
  172. package/build-module/store/private-selectors.mjs.map +1 -7
  173. package/build-module/store/reducer.mjs +95 -58
  174. package/build-module/store/reducer.mjs.map +1 -7
  175. package/build-module/store/resolvers.mjs +52 -71
  176. package/build-module/store/resolvers.mjs.map +1 -7
  177. package/build-module/store/selectors.mjs +178 -199
  178. package/build-module/store/selectors.mjs.map +1 -7
  179. package/build-module/store/transformers.mjs +44 -56
  180. package/build-module/store/transformers.mjs.map +1 -7
  181. package/build-module/store/utils.mjs +64 -32
  182. package/build-module/store/utils.mjs.map +1 -7
  183. package/build-style/style-rtl.css +12 -12
  184. package/build-style/style.css +12 -12
  185. package/package.json +35 -36
  186. package/src/components/header/index.jsx +2 -2
  187. package/src/components/layout/interface.jsx +4 -1
  188. package/src/components/layout/style.scss +11 -0
  189. package/src/components/notices/style.scss +2 -2
  190. package/src/components/sidebar/index.jsx +18 -18
  191. package/src/components/welcome-guide/index.jsx +4 -2
  192. package/src/components/widget-areas-block-editor-content/index.jsx +4 -3
  193. package/CHANGELOG.md +0 -325
  194. package/build/filters/index.cjs.map +0 -7
  195. package/build-module/filters/index.mjs.map +0 -7
@@ -1,38 +1,70 @@
1
1
  // packages/edit-widgets/src/store/utils.js
2
- var KIND = "root";
3
- var WIDGET_AREA_ENTITY_TYPE = "sidebar";
4
- var POST_TYPE = "postType";
5
- var buildWidgetAreaPostId = (widgetAreaId) => `widget-area-${widgetAreaId}`;
6
- var buildWidgetAreasPostId = () => `widget-areas`;
2
+ /**
3
+ * "Kind" of the navigation post.
4
+ *
5
+ * @type {string}
6
+ */
7
+ const KIND = "root";
8
+ /**
9
+ * "post type" of the navigation post.
10
+ *
11
+ * @type {string}
12
+ */
13
+ const WIDGET_AREA_ENTITY_TYPE = "sidebar";
14
+ /**
15
+ * "post type" of the widget area post.
16
+ *
17
+ * @type {string}
18
+ */
19
+ const POST_TYPE = "postType";
20
+ /**
21
+ * Builds an ID for a new widget area post.
22
+ *
23
+ * @param {number} widgetAreaId Widget area id.
24
+ * @return {string} An ID.
25
+ */
26
+ const buildWidgetAreaPostId = (widgetAreaId) => `widget-area-${widgetAreaId}`;
27
+ /**
28
+ * Builds an ID for a global widget areas post.
29
+ *
30
+ * @return {string} An ID.
31
+ */
32
+ const buildWidgetAreasPostId = () => `widget-areas`;
33
+ /**
34
+ * Builds a query to resolve sidebars.
35
+ *
36
+ * @return {Object} Query.
37
+ */
7
38
  function buildWidgetAreasQuery() {
8
- return {
9
- per_page: -1
10
- };
39
+ return { per_page: -1 };
11
40
  }
41
+ /**
42
+ * Builds a query to resolve widgets.
43
+ *
44
+ * @return {Object} Query.
45
+ */
12
46
  function buildWidgetsQuery() {
13
- return {
14
- per_page: -1,
15
- _embed: "about"
16
- };
47
+ return {
48
+ per_page: -1,
49
+ _embed: "about"
50
+ };
17
51
  }
18
- var createStubPost = (id, blocks) => ({
19
- id,
20
- slug: id,
21
- status: "draft",
22
- type: "page",
23
- blocks,
24
- meta: {
25
- widgetAreaId: id
26
- }
52
+ /**
53
+ * Creates a stub post with given id and set of blocks. Used as a governing entity records
54
+ * for all widget areas.
55
+ *
56
+ * @param {string} id Post ID.
57
+ * @param {Array} blocks The list of blocks.
58
+ * @return {Object} A stub post object formatted in compliance with the data layer.
59
+ */
60
+ const createStubPost = (id, blocks) => ({
61
+ id,
62
+ slug: id,
63
+ status: "draft",
64
+ type: "page",
65
+ blocks,
66
+ meta: { widgetAreaId: id }
27
67
  });
28
- export {
29
- KIND,
30
- POST_TYPE,
31
- WIDGET_AREA_ENTITY_TYPE,
32
- buildWidgetAreaPostId,
33
- buildWidgetAreasPostId,
34
- buildWidgetAreasQuery,
35
- buildWidgetsQuery,
36
- createStubPost
37
- };
38
- //# sourceMappingURL=utils.mjs.map
68
+ export { KIND, POST_TYPE, WIDGET_AREA_ENTITY_TYPE, buildWidgetAreaPostId, buildWidgetAreasPostId, buildWidgetAreasQuery, buildWidgetsQuery, createStubPost };
69
+
70
+ //# sourceMappingURL=utils.mjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/store/utils.js"],
4
- "sourcesContent": ["/**\n * \"Kind\" of the navigation post.\n *\n * @type {string}\n */\nexport const KIND = 'root';\n\n/**\n * \"post type\" of the navigation post.\n *\n * @type {string}\n */\nexport const WIDGET_AREA_ENTITY_TYPE = 'sidebar';\n\n/**\n * \"post type\" of the widget area post.\n *\n * @type {string}\n */\nexport const POST_TYPE = 'postType';\n\n/**\n * Builds an ID for a new widget area post.\n *\n * @param {number} widgetAreaId Widget area id.\n * @return {string} An ID.\n */\nexport const buildWidgetAreaPostId = ( widgetAreaId ) =>\n\t`widget-area-${ widgetAreaId }`;\n\n/**\n * Builds an ID for a global widget areas post.\n *\n * @return {string} An ID.\n */\nexport const buildWidgetAreasPostId = () => `widget-areas`;\n\n/**\n * Builds a query to resolve sidebars.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetAreasQuery() {\n\treturn {\n\t\tper_page: -1,\n\t};\n}\n\n/**\n * Builds a query to resolve widgets.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetsQuery() {\n\treturn {\n\t\tper_page: -1,\n\t\t_embed: 'about',\n\t};\n}\n\n/**\n * Creates a stub post with given id and set of blocks. Used as a governing entity records\n * for all widget areas.\n *\n * @param {string} id Post ID.\n * @param {Array} blocks The list of blocks.\n * @return {Object} A stub post object formatted in compliance with the data layer.\n */\nexport const createStubPost = ( id, blocks ) => ( {\n\tid,\n\tslug: id,\n\tstatus: 'draft',\n\ttype: 'page',\n\tblocks,\n\tmeta: {\n\t\twidgetAreaId: id,\n\t},\n} );\n"],
5
- "mappings": ";AAKO,IAAM,OAAO;AAOb,IAAM,0BAA0B;AAOhC,IAAM,YAAY;AAQlB,IAAM,wBAAwB,CAAE,iBACtC,eAAgB,YAAa;AAOvB,IAAM,yBAAyB,MAAM;AAOrC,SAAS,wBAAwB;AACvC,SAAO;AAAA,IACN,UAAU;AAAA,EACX;AACD;AAOO,SAAS,oBAAoB;AACnC,SAAO;AAAA,IACN,UAAU;AAAA,IACV,QAAQ;AAAA,EACT;AACD;AAUO,IAAM,iBAAiB,CAAE,IAAI,YAAc;AAAA,EACjD;AAAA,EACA,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN;AAAA,EACA,MAAM;AAAA,IACL,cAAc;AAAA,EACf;AACD;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"utils.mjs","names":[],"sources":["../../src/store/utils.js"],"sourcesContent":["/**\n * \"Kind\" of the navigation post.\n *\n * @type {string}\n */\nexport const KIND = 'root';\n\n/**\n * \"post type\" of the navigation post.\n *\n * @type {string}\n */\nexport const WIDGET_AREA_ENTITY_TYPE = 'sidebar';\n\n/**\n * \"post type\" of the widget area post.\n *\n * @type {string}\n */\nexport const POST_TYPE = 'postType';\n\n/**\n * Builds an ID for a new widget area post.\n *\n * @param {number} widgetAreaId Widget area id.\n * @return {string} An ID.\n */\nexport const buildWidgetAreaPostId = ( widgetAreaId ) =>\n\t`widget-area-${ widgetAreaId }`;\n\n/**\n * Builds an ID for a global widget areas post.\n *\n * @return {string} An ID.\n */\nexport const buildWidgetAreasPostId = () => `widget-areas`;\n\n/**\n * Builds a query to resolve sidebars.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetAreasQuery() {\n\treturn {\n\t\tper_page: -1,\n\t};\n}\n\n/**\n * Builds a query to resolve widgets.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetsQuery() {\n\treturn {\n\t\tper_page: -1,\n\t\t_embed: 'about',\n\t};\n}\n\n/**\n * Creates a stub post with given id and set of blocks. Used as a governing entity records\n * for all widget areas.\n *\n * @param {string} id Post ID.\n * @param {Array} blocks The list of blocks.\n * @return {Object} A stub post object formatted in compliance with the data layer.\n */\nexport const createStubPost = ( id, blocks ) => ( {\n\tid,\n\tslug: id,\n\tstatus: 'draft',\n\ttype: 'page',\n\tblocks,\n\tmeta: {\n\t\twidgetAreaId: id,\n\t},\n} );\n"],"mappings":";;;;;;AAKA,MAAa,OAAO;;;;;;AAOpB,MAAa,0BAA0B;;;;;;AAOvC,MAAa,YAAY;;;;;;;AAQzB,MAAa,yBAA0B,iBACtC,eAAgB;;;;;;AAOjB,MAAa,+BAA+B;;;;;;AAO5C,SAAgB,wBAAwB;CACvC,OAAO,EACN,UAAU,GACX;AACD;;;;;;AAOA,SAAgB,oBAAoB;CACnC,OAAO;EACN,UAAU;EACV,QAAQ;CACT;AACD;;;;;;;;;AAUA,MAAa,kBAAmB,IAAI,YAAc;CACjD;CACA,MAAM;CACN,QAAQ;CACR,MAAM;CACN;CACA,MAAM,EACL,cAAc,GACf;AACD"}
@@ -485,16 +485,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
485
485
  display: flex;
486
486
  }
487
487
  }
488
- .interface-interface-skeleton__footer .block-editor-block-breadcrumb {
489
- z-index: 30;
490
- display: flex;
491
- background: #fff;
492
- height: var(--wpds-dimension-size-md, 32px);
493
- align-items: center;
494
- font-size: 13px;
495
- padding: 0 18px;
496
- }
497
-
498
488
  .interface-interface-skeleton__actions {
499
489
  z-index: 100000;
500
490
  position: fixed !important;
@@ -835,15 +825,25 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
835
825
  }
836
826
 
837
827
  .edit-widgets-notices.notices-inline-notices-wrapper,
838
- .edit-widgets-notices .components-notice-list {
828
+ .edit-widgets-notices .notices-inline-notices__list {
839
829
  gap: 0;
840
830
  }
841
831
 
842
- .edit-widgets-notices .components-notice {
832
+ .edit-widgets-notices .notices-inline-notices__notice {
843
833
  border-top-width: 0;
844
834
  border-inline-width: 0;
845
835
  }
846
836
 
837
+ .edit-widgets-layout__footer {
838
+ flex: 1 1 auto;
839
+ min-width: 0;
840
+ }
841
+
842
+ .edit-widgets-layout__breadcrumbs {
843
+ height: var(--wpds-dimension-size-md, 32px);
844
+ padding: 0 18px;
845
+ }
846
+
847
847
  .edit-widgets-layout__inserter-panel {
848
848
  height: 100%;
849
849
  display: flex;
@@ -485,16 +485,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
485
485
  display: flex;
486
486
  }
487
487
  }
488
- .interface-interface-skeleton__footer .block-editor-block-breadcrumb {
489
- z-index: 30;
490
- display: flex;
491
- background: #fff;
492
- height: var(--wpds-dimension-size-md, 32px);
493
- align-items: center;
494
- font-size: 13px;
495
- padding: 0 18px;
496
- }
497
-
498
488
  .interface-interface-skeleton__actions {
499
489
  z-index: 100000;
500
490
  position: fixed !important;
@@ -835,15 +825,25 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
835
825
  }
836
826
 
837
827
  .edit-widgets-notices.notices-inline-notices-wrapper,
838
- .edit-widgets-notices .components-notice-list {
828
+ .edit-widgets-notices .notices-inline-notices__list {
839
829
  gap: 0;
840
830
  }
841
831
 
842
- .edit-widgets-notices .components-notice {
832
+ .edit-widgets-notices .notices-inline-notices__notice {
843
833
  border-top-width: 0;
844
834
  border-inline-width: 0;
845
835
  }
846
836
 
837
+ .edit-widgets-layout__footer {
838
+ flex: 1 1 auto;
839
+ min-width: 0;
840
+ }
841
+
842
+ .edit-widgets-layout__breadcrumbs {
843
+ height: var(--wpds-dimension-size-md, 32px);
844
+ padding: 0 18px;
845
+ }
846
+
847
847
  .edit-widgets-layout__inserter-panel {
848
848
  height: 100%;
849
849
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-widgets",
3
- "version": "6.57.0",
3
+ "version": "7.1.0",
4
4
  "description": "Widgets Page module for WordPress..",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -20,15 +20,14 @@
20
20
  "url": "https://github.com/WordPress/gutenberg/issues"
21
21
  },
22
22
  "engines": {
23
- "node": ">=18.12.0"
23
+ "node": ">=22.13.0"
24
24
  },
25
25
  "files": [
26
26
  "src",
27
27
  "build",
28
28
  "build-module",
29
29
  "build-style",
30
- "build-types",
31
- "*.md"
30
+ "build-types"
32
31
  ],
33
32
  "main": "build/index.cjs",
34
33
  "module": "build-module/index.mjs",
@@ -46,43 +45,43 @@
46
45
  ]
47
46
  },
48
47
  "dependencies": {
49
- "@wordpress/a11y": "^4.57.0",
50
- "@wordpress/admin-ui": "^2.12.0",
51
- "@wordpress/api-fetch": "^7.57.0",
52
- "@wordpress/base-styles": "^13.3.0",
53
- "@wordpress/block-editor": "^18.1.0",
54
- "@wordpress/block-library": "^11.2.0",
55
- "@wordpress/blocks": "^16.2.0",
56
- "@wordpress/components": "^42.0.0",
57
- "@wordpress/compose": "^8.10.0",
58
- "@wordpress/core-data": "^8.2.0",
59
- "@wordpress/data": "^10.57.0",
60
- "@wordpress/deprecated": "^4.57.0",
61
- "@wordpress/dom": "^4.57.0",
62
- "@wordpress/element": "^9.0.0",
63
- "@wordpress/hooks": "^4.57.0",
64
- "@wordpress/i18n": "^6.30.0",
65
- "@wordpress/icons": "^18.0.0",
66
- "@wordpress/interface": "^10.3.0",
67
- "@wordpress/keyboard-shortcuts": "^5.57.0",
68
- "@wordpress/keycodes": "^4.57.0",
69
- "@wordpress/media-utils": "^5.57.0",
70
- "@wordpress/notices": "^5.57.0",
71
- "@wordpress/patterns": "^2.57.0",
72
- "@wordpress/plugins": "^7.57.0",
73
- "@wordpress/preferences": "^4.57.0",
74
- "@wordpress/private-apis": "^2.0.0",
75
- "@wordpress/theme": "^2.3.0",
76
- "@wordpress/ui": "^0.24.0",
77
- "@wordpress/url": "^4.57.0",
78
- "@wordpress/widgets": "^4.57.0",
48
+ "@wordpress/a11y": "^5.1.0",
49
+ "@wordpress/admin-ui": "^3.1.0",
50
+ "@wordpress/api-fetch": "^8.1.0",
51
+ "@wordpress/base-styles": "^15.0.0",
52
+ "@wordpress/block-editor": "^20.0.0",
53
+ "@wordpress/block-library": "^12.1.0",
54
+ "@wordpress/blocks": "^17.1.0",
55
+ "@wordpress/components": "^44.0.0",
56
+ "@wordpress/compose": "^9.1.0",
57
+ "@wordpress/core-data": "^9.1.0",
58
+ "@wordpress/data": "^11.1.0",
59
+ "@wordpress/deprecated": "^5.1.0",
60
+ "@wordpress/dom": "^5.1.0",
61
+ "@wordpress/element": "^10.1.0",
62
+ "@wordpress/hooks": "^5.1.0",
63
+ "@wordpress/i18n": "^7.1.0",
64
+ "@wordpress/icons": "^20.0.0",
65
+ "@wordpress/interface": "^11.1.0",
66
+ "@wordpress/keyboard-shortcuts": "^6.1.0",
67
+ "@wordpress/keycodes": "^5.1.0",
68
+ "@wordpress/media-utils": "^6.1.0",
69
+ "@wordpress/notices": "^6.1.0",
70
+ "@wordpress/patterns": "^3.1.0",
71
+ "@wordpress/plugins": "^8.1.0",
72
+ "@wordpress/preferences": "^5.1.0",
73
+ "@wordpress/private-apis": "^3.1.0",
74
+ "@wordpress/theme": "^4.0.0",
75
+ "@wordpress/ui": "^0.26.0",
76
+ "@wordpress/url": "^5.1.0",
77
+ "@wordpress/widgets": "^5.1.0",
79
78
  "clsx": "^2.1.1"
80
79
  },
81
80
  "devDependencies": {
82
81
  "@testing-library/dom": "^10.4.2",
83
82
  "@testing-library/react": "^16.3.3",
84
83
  "deep-freeze": "^0.0.1",
85
- "vitest": "^5.0.3"
84
+ "vitest": "^5.0.5"
86
85
  },
87
86
  "peerDependencies": {
88
87
  "react": "^18 || ^19",
@@ -91,5 +90,5 @@
91
90
  "publishConfig": {
92
91
  "access": "public"
93
92
  },
94
- "gitHead": "12441e2520c78b2254a792a8cba40c34110be060"
93
+ "gitHead": "9b70363b9f93cff0583a1f3153738d383cf5a49e"
95
94
  }
@@ -2,7 +2,7 @@ import { BlockToolbar } from '@wordpress/block-editor';
2
2
  import { useSelect } from '@wordpress/data';
3
3
  import { useRef } from '@wordpress/element';
4
4
  import { __ } from '@wordpress/i18n';
5
- import { Popover } from '@wordpress/components';
5
+ import { Popover as WCPopover } from '@wordpress/components';
6
6
  import { PinnedItems } from '@wordpress/interface';
7
7
  import { useViewportMatch } from '@wordpress/compose';
8
8
  import { store as preferencesStore } from '@wordpress/preferences';
@@ -47,7 +47,7 @@ function Header() {
47
47
  <div className="selected-block-tools-wrapper">
48
48
  <BlockToolbar hideDragHandle />
49
49
  </div>
50
- <Popover.Slot
50
+ <WCPopover.Slot
51
51
  ref={ blockToolbarRef }
52
52
  name="block-toolbar"
53
53
  />
@@ -90,7 +90,10 @@ function Interface( { blockEditorSettings } ) {
90
90
  hasBlockBreadCrumbsEnabled &&
91
91
  ! isMobileViewport && (
92
92
  <div className="edit-widgets-layout__footer">
93
- <BlockBreadcrumb rootLabelText={ __( 'Widgets' ) } />
93
+ <BlockBreadcrumb
94
+ className="edit-widgets-layout__breadcrumbs"
95
+ rootLabelText={ __( 'Widgets' ) }
96
+ />
94
97
  </div>
95
98
  )
96
99
  }
@@ -1,6 +1,17 @@
1
1
  @use "@wordpress/base-styles/mixins" as *;
2
2
  @use "@wordpress/base-styles/variables" as *;
3
3
 
4
+ .edit-widgets-layout__footer {
5
+ flex: 1 1 auto;
6
+ // Let the flex item shrink below the trail's content width so breadcrumbs can collapse.
7
+ min-width: 0;
8
+ }
9
+
10
+ .edit-widgets-layout__breadcrumbs {
11
+ height: var(--wpds-dimension-size-md);
12
+ padding: 0 ($grid-unit-15 + 6px);
13
+ }
14
+
4
15
  .edit-widgets-layout__inserter-panel {
5
16
  height: 100%;
6
17
  display: flex;
@@ -6,11 +6,11 @@
6
6
  }
7
7
 
8
8
  .edit-widgets-notices.notices-inline-notices-wrapper,
9
- .edit-widgets-notices .components-notice-list {
9
+ .edit-widgets-notices .notices-inline-notices__list {
10
10
  gap: 0;
11
11
  }
12
12
 
13
- .edit-widgets-notices .components-notice {
13
+ .edit-widgets-notices .notices-inline-notices__notice {
14
14
  border-top-width: 0;
15
15
  border-inline-width: 0;
16
16
  }
@@ -20,20 +20,20 @@ import WidgetAreas from './widget-areas';
20
20
  import { store as editWidgetsStore } from '../../store';
21
21
  import { unlock } from '../../lock-unlock';
22
22
 
23
- const { Tabs } = unlock( componentsPrivateApis );
23
+ const { Tabs: WCTabs } = unlock( componentsPrivateApis );
24
24
 
25
25
  function SidebarHeader( { selectedWidgetAreaBlock } ) {
26
26
  return (
27
- <Tabs.TabList>
28
- <Tabs.Tab tabId={ WIDGET_AREAS_IDENTIFIER }>
27
+ <WCTabs.TabList>
28
+ <WCTabs.Tab tabId={ WIDGET_AREAS_IDENTIFIER }>
29
29
  { selectedWidgetAreaBlock
30
30
  ? selectedWidgetAreaBlock.attributes.name
31
31
  : __( 'Widget Areas' ) }
32
- </Tabs.Tab>
33
- <Tabs.Tab tabId={ BLOCK_INSPECTOR_IDENTIFIER }>
32
+ </WCTabs.Tab>
33
+ <WCTabs.Tab tabId={ BLOCK_INSPECTOR_IDENTIFIER }>
34
34
  { __( 'Block' ) }
35
- </Tabs.Tab>
36
- </Tabs.TabList>
35
+ </WCTabs.Tab>
36
+ </WCTabs.TabList>
37
37
  );
38
38
  }
39
39
 
@@ -71,17 +71,17 @@ function SidebarContent( {
71
71
  // block selection changes, not sidebar state changes.
72
72
  }, [ hasSelectedNonAreaBlock, enableComplementaryArea ] );
73
73
 
74
- const tabsContextValue = useContext( Tabs.Context );
74
+ const tabsContextValue = useContext( WCTabs.Context );
75
75
 
76
76
  return (
77
77
  <ComplementaryArea
78
78
  className="edit-widgets-sidebar"
79
79
  header={
80
- <Tabs.Context.Provider value={ tabsContextValue }>
80
+ <WCTabs.Context.Provider value={ tabsContextValue }>
81
81
  <SidebarHeader
82
82
  selectedWidgetAreaBlock={ selectedWidgetAreaBlock }
83
83
  />
84
- </Tabs.Context.Provider>
84
+ </WCTabs.Context.Provider>
85
85
  }
86
86
  headerClassName="edit-widgets-sidebar__panel-tabs"
87
87
  /* translators: button label text should, if possible, be under 16 characters. */
@@ -92,8 +92,8 @@ function SidebarContent( {
92
92
  icon={ isRTL() ? drawerLeft : drawerRight }
93
93
  isActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }
94
94
  >
95
- <Tabs.Context.Provider value={ tabsContextValue }>
96
- <Tabs.TabPanel
95
+ <WCTabs.Context.Provider value={ tabsContextValue }>
96
+ <WCTabs.TabPanel
97
97
  tabId={ WIDGET_AREAS_IDENTIFIER }
98
98
  focusable={ false }
99
99
  >
@@ -102,8 +102,8 @@ function SidebarContent( {
102
102
  selectedWidgetAreaBlock?.attributes.id
103
103
  }
104
104
  />
105
- </Tabs.TabPanel>
106
- <Tabs.TabPanel
105
+ </WCTabs.TabPanel>
106
+ <WCTabs.TabPanel
107
107
  tabId={ BLOCK_INSPECTOR_IDENTIFIER }
108
108
  focusable={ false }
109
109
  >
@@ -116,8 +116,8 @@ function SidebarContent( {
116
116
  { __( 'No block selected.' ) }
117
117
  </span>
118
118
  ) }
119
- </Tabs.TabPanel>
120
- </Tabs.Context.Provider>
119
+ </WCTabs.TabPanel>
120
+ </WCTabs.Context.Provider>
121
121
  </ComplementaryArea>
122
122
  );
123
123
  }
@@ -189,7 +189,7 @@ export default function Sidebar() {
189
189
  );
190
190
 
191
191
  return (
192
- <Tabs
192
+ <WCTabs
193
193
  // Due to how this component is controlled (via a value from the
194
194
  // `interfaceStore`), when the sidebar closes the currently selected
195
195
  // tab can't be found. This causes the component to continuously reset
@@ -205,6 +205,6 @@ export default function Sidebar() {
205
205
  isGeneralSidebarOpen={ isGeneralSidebarOpen }
206
206
  selectedWidgetAreaBlock={ selectedWidgetAreaBlock }
207
207
  />
208
- </Tabs>
208
+ </WCTabs>
209
209
  );
210
210
  }
@@ -15,7 +15,7 @@ export default function WelcomeGuide() {
15
15
  []
16
16
  );
17
17
 
18
- const { toggle } = useDispatch( preferencesStore );
18
+ const { set: setPreference } = useDispatch( preferencesStore );
19
19
 
20
20
  const widgetAreas = useSelect(
21
21
  ( select ) =>
@@ -45,7 +45,9 @@ export default function WelcomeGuide() {
45
45
  className="edit-widgets-welcome-guide"
46
46
  contentLabel={ __( 'Welcome to block Widgets' ) }
47
47
  finishButtonText={ __( 'Get started' ) }
48
- onFinish={ () => toggle( 'core/edit-widgets', 'welcomeGuide' ) }
48
+ onFinish={ () =>
49
+ setPreference( 'core/edit-widgets', 'welcomeGuide', false )
50
+ }
49
51
  pages={ [
50
52
  {
51
53
  image: (
@@ -8,7 +8,7 @@ import {
8
8
  } from '@wordpress/block-editor';
9
9
  import { useViewportMatch } from '@wordpress/compose';
10
10
  import { useSelect } from '@wordpress/data';
11
- import { useMemo } from '@wordpress/element';
11
+ import { useMemo, useRef } from '@wordpress/element';
12
12
  import { store as preferencesStore } from '@wordpress/preferences';
13
13
  import Notices from '../notices';
14
14
  import KeyboardShortcuts from '../keyboard-shortcuts';
@@ -25,6 +25,7 @@ export default function WidgetAreasBlockEditorContent( {
25
25
  []
26
26
  );
27
27
  const isLargeViewport = useViewportMatch( 'medium' );
28
+ const contentRef = useRef();
28
29
 
29
30
  const styles = useMemo( () => {
30
31
  return hasThemeStyles ? blockEditorSettings.styles : [];
@@ -34,14 +35,14 @@ export default function WidgetAreasBlockEditorContent( {
34
35
  <div className="edit-widgets-block-editor">
35
36
  <Notices />
36
37
  { ! isLargeViewport && <BlockToolbar hideDragHandle /> }
37
- <BlockTools>
38
+ <BlockTools __unstableContentRef={ contentRef }>
38
39
  <KeyboardShortcuts />
39
40
  <EditorStyles
40
41
  styles={ styles }
41
42
  scope=":where(.editor-styles-wrapper)"
42
43
  />
43
44
  <BlockSelectionClearer>
44
- <WritingFlow>
45
+ <WritingFlow ref={ contentRef }>
45
46
  <BlockList className="edit-widgets-main-block-list" />
46
47
  </WritingFlow>
47
48
  </BlockSelectionClearer>