@wordpress/edit-widgets 5.15.0 → 5.17.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 (177) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/blocks/widget-area/edit/index.js +4 -16
  3. package/build/blocks/widget-area/edit/index.js.map +1 -1
  4. package/build/blocks/widget-area/edit/inner-blocks.js +5 -10
  5. package/build/blocks/widget-area/edit/inner-blocks.js.map +1 -1
  6. package/build/blocks/widget-area/edit/use-is-dragging-within.js +5 -10
  7. package/build/blocks/widget-area/edit/use-is-dragging-within.js.map +1 -1
  8. package/build/blocks/widget-area/index.js +0 -5
  9. package/build/blocks/widget-area/index.js.map +1 -1
  10. package/build/components/error-boundary/index.js +1 -15
  11. package/build/components/error-boundary/index.js.map +1 -1
  12. package/build/components/header/index.js +9 -32
  13. package/build/components/header/index.js.map +1 -1
  14. package/build/components/header/undo-redo/redo.js +3 -9
  15. package/build/components/header/undo-redo/redo.js.map +1 -1
  16. package/build/components/header/undo-redo/undo.js +3 -9
  17. package/build/components/header/undo-redo/undo.js.map +1 -1
  18. package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
  19. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  20. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -9
  21. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  22. package/build/components/keyboard-shortcut-help-modal/index.js +4 -20
  23. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  24. package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -6
  25. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  26. package/build/components/keyboard-shortcuts/index.js +1 -18
  27. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  28. package/build/components/layout/index.js +2 -19
  29. package/build/components/layout/index.js.map +1 -1
  30. package/build/components/layout/interface.js +5 -21
  31. package/build/components/layout/interface.js.map +1 -1
  32. package/build/components/layout/unsaved-changes-warning.js +0 -6
  33. package/build/components/layout/unsaved-changes-warning.js.map +1 -1
  34. package/build/components/more-menu/index.js +2 -17
  35. package/build/components/more-menu/index.js.map +1 -1
  36. package/build/components/more-menu/tools-more-menu-group.js +1 -5
  37. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  38. package/build/components/notices/index.js +1 -6
  39. package/build/components/notices/index.js.map +1 -1
  40. package/build/components/save-button/index.js +1 -7
  41. package/build/components/save-button/index.js.map +1 -1
  42. package/build/components/secondary-sidebar/index.js +1 -10
  43. package/build/components/secondary-sidebar/index.js.map +1 -1
  44. package/build/components/secondary-sidebar/inserter-sidebar.js +1 -11
  45. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  46. package/build/components/secondary-sidebar/list-view-sidebar.js +6 -15
  47. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  48. package/build/components/sidebar/index.js +12 -26
  49. package/build/components/sidebar/index.js.map +1 -1
  50. package/build/components/sidebar/widget-areas.js +1 -12
  51. package/build/components/sidebar/widget-areas.js.map +1 -1
  52. package/build/components/welcome-guide/index.js +3 -12
  53. package/build/components/welcome-guide/index.js.map +1 -1
  54. package/build/components/widget-areas-block-editor-content/index.js +1 -8
  55. package/build/components/widget-areas-block-editor-content/index.js.map +1 -1
  56. package/build/components/widget-areas-block-editor-provider/index.js +8 -23
  57. package/build/components/widget-areas-block-editor-provider/index.js.map +1 -1
  58. package/build/constants.js.map +1 -1
  59. package/build/filters/index.js +0 -1
  60. package/build/filters/index.js.map +1 -1
  61. package/build/filters/move-to-widget-area.js +3 -9
  62. package/build/filters/move-to-widget-area.js.map +1 -1
  63. package/build/filters/replace-media-upload.js +1 -3
  64. package/build/filters/replace-media-upload.js.map +1 -1
  65. package/build/hooks/use-last-selected-widget-area.js +5 -13
  66. package/build/hooks/use-last-selected-widget-area.js.map +1 -1
  67. package/build/hooks/use-widget-library-insertion-point.js +6 -14
  68. package/build/hooks/use-widget-library-insertion-point.js.map +1 -1
  69. package/build/index.js +6 -34
  70. package/build/index.js.map +1 -1
  71. package/build/lock-unlock.js +1 -2
  72. package/build/lock-unlock.js.map +1 -1
  73. package/build/store/actions.js +41 -79
  74. package/build/store/actions.js.map +1 -1
  75. package/build/store/constants.js +0 -1
  76. package/build/store/constants.js.map +1 -1
  77. package/build/store/index.js +4 -15
  78. package/build/store/index.js.map +1 -1
  79. package/build/store/reducer.js +4 -16
  80. package/build/store/reducer.js.map +1 -1
  81. package/build/store/resolvers.js +1 -17
  82. package/build/store/resolvers.js.map +1 -1
  83. package/build/store/selectors.js +28 -49
  84. package/build/store/selectors.js.map +1 -1
  85. package/build/store/transformers.js +7 -16
  86. package/build/store/transformers.js.map +1 -1
  87. package/build/store/utils.js +7 -16
  88. package/build/store/utils.js.map +1 -1
  89. package/build-module/blocks/widget-area/edit/index.js +5 -8
  90. package/build-module/blocks/widget-area/edit/index.js.map +1 -1
  91. package/build-module/blocks/widget-area/edit/inner-blocks.js +6 -6
  92. package/build-module/blocks/widget-area/edit/inner-blocks.js.map +1 -1
  93. package/build-module/blocks/widget-area/edit/use-is-dragging-within.js +6 -9
  94. package/build-module/blocks/widget-area/edit/use-is-dragging-within.js.map +1 -1
  95. package/build-module/blocks/widget-area/index.js +1 -1
  96. package/build-module/blocks/widget-area/index.js.map +1 -1
  97. package/build-module/components/error-boundary/index.js +0 -9
  98. package/build-module/components/error-boundary/index.js.map +1 -1
  99. package/build-module/components/header/index.js +9 -17
  100. package/build-module/components/header/index.js.map +1 -1
  101. package/build-module/components/header/undo-redo/redo.js +2 -2
  102. package/build-module/components/header/undo-redo/redo.js.map +1 -1
  103. package/build-module/components/header/undo-redo/undo.js +2 -2
  104. package/build-module/components/header/undo-redo/undo.js.map +1 -1
  105. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  106. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -6
  107. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  108. package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -13
  109. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  110. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -5
  111. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  112. package/build-module/components/keyboard-shortcuts/index.js +1 -10
  113. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  114. package/build-module/components/layout/index.js +2 -8
  115. package/build-module/components/layout/index.js.map +1 -1
  116. package/build-module/components/layout/interface.js +5 -9
  117. package/build-module/components/layout/interface.js.map +1 -1
  118. package/build-module/components/layout/unsaved-changes-warning.js +2 -3
  119. package/build-module/components/layout/unsaved-changes-warning.js.map +1 -1
  120. package/build-module/components/more-menu/index.js +2 -6
  121. package/build-module/components/more-menu/index.js.map +1 -1
  122. package/build-module/components/more-menu/tools-more-menu-group.js +0 -3
  123. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  124. package/build-module/components/notices/index.js +0 -3
  125. package/build-module/components/notices/index.js.map +1 -1
  126. package/build-module/components/save-button/index.js +1 -4
  127. package/build-module/components/save-button/index.js.map +1 -1
  128. package/build-module/components/secondary-sidebar/index.js +1 -6
  129. package/build-module/components/secondary-sidebar/index.js.map +1 -1
  130. package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -2
  131. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  132. package/build-module/components/secondary-sidebar/list-view-sidebar.js +6 -7
  133. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  134. package/build-module/components/sidebar/index.js +13 -18
  135. package/build-module/components/sidebar/index.js.map +1 -1
  136. package/build-module/components/sidebar/widget-areas.js +1 -4
  137. package/build-module/components/sidebar/widget-areas.js.map +1 -1
  138. package/build-module/components/welcome-guide/index.js +3 -7
  139. package/build-module/components/welcome-guide/index.js.map +1 -1
  140. package/build-module/components/widget-areas-block-editor-content/index.js +1 -2
  141. package/build-module/components/widget-areas-block-editor-content/index.js.map +1 -1
  142. package/build-module/components/widget-areas-block-editor-provider/index.js +8 -7
  143. package/build-module/components/widget-areas-block-editor-provider/index.js.map +1 -1
  144. package/build-module/constants.js.map +1 -1
  145. package/build-module/filters/index.js.map +1 -1
  146. package/build-module/filters/move-to-widget-area.js +4 -4
  147. package/build-module/filters/move-to-widget-area.js.map +1 -1
  148. package/build-module/filters/replace-media-upload.js +0 -2
  149. package/build-module/filters/replace-media-upload.js.map +1 -1
  150. package/build-module/hooks/use-last-selected-widget-area.js +7 -9
  151. package/build-module/hooks/use-last-selected-widget-area.js.map +1 -1
  152. package/build-module/hooks/use-widget-library-insertion-point.js +6 -10
  153. package/build-module/hooks/use-widget-library-insertion-point.js.map +1 -1
  154. package/build-module/index.js +8 -20
  155. package/build-module/index.js.map +1 -1
  156. package/build-module/lock-unlock.js.map +1 -1
  157. package/build-module/store/actions.js +43 -56
  158. package/build-module/store/actions.js.map +1 -1
  159. package/build-module/store/constants.js.map +1 -1
  160. package/build-module/store/index.js +6 -6
  161. package/build-module/store/index.js.map +1 -1
  162. package/build-module/store/reducer.js +5 -11
  163. package/build-module/store/reducer.js.map +1 -1
  164. package/build-module/store/resolvers.js +3 -10
  165. package/build-module/store/resolvers.js.map +1 -1
  166. package/build-module/store/selectors.js +29 -38
  167. package/build-module/store/selectors.js.map +1 -1
  168. package/build-module/store/transformers.js +8 -13
  169. package/build-module/store/transformers.js.map +1 -1
  170. package/build-module/store/utils.js +7 -7
  171. package/build-module/store/utils.js.map +1 -1
  172. package/build-style/style-rtl.css +14 -8
  173. package/build-style/style.css +14 -8
  174. package/package.json +28 -27
  175. package/src/components/widget-areas-block-editor-provider/index.js +3 -3
  176. package/src/index.js +0 -1
  177. package/src/store/selectors.js +10 -2
@@ -4,58 +4,59 @@
4
4
  * @type {string}
5
5
  */
6
6
  export const KIND = 'root';
7
+
7
8
  /**
8
9
  * "post type" of the navigation post.
9
10
  *
10
11
  * @type {string}
11
12
  */
12
-
13
13
  export const WIDGET_AREA_ENTITY_TYPE = 'sidebar';
14
+
14
15
  /**
15
16
  * "post type" of the widget area post.
16
17
  *
17
18
  * @type {string}
18
19
  */
19
-
20
20
  export const POST_TYPE = 'postType';
21
+
21
22
  /**
22
23
  * Builds an ID for a new widget area post.
23
24
  *
24
25
  * @param {number} widgetAreaId Widget area id.
25
26
  * @return {string} An ID.
26
27
  */
27
-
28
28
  export const buildWidgetAreaPostId = widgetAreaId => `widget-area-${widgetAreaId}`;
29
+
29
30
  /**
30
31
  * Builds an ID for a global widget areas post.
31
32
  *
32
33
  * @return {string} An ID.
33
34
  */
34
-
35
35
  export const buildWidgetAreasPostId = () => `widget-areas`;
36
+
36
37
  /**
37
38
  * Builds a query to resolve sidebars.
38
39
  *
39
40
  * @return {Object} Query.
40
41
  */
41
-
42
42
  export function buildWidgetAreasQuery() {
43
43
  return {
44
44
  per_page: -1
45
45
  };
46
46
  }
47
+
47
48
  /**
48
49
  * Builds a query to resolve widgets.
49
50
  *
50
51
  * @return {Object} Query.
51
52
  */
52
-
53
53
  export function buildWidgetsQuery() {
54
54
  return {
55
55
  per_page: -1,
56
56
  _embed: 'about'
57
57
  };
58
58
  }
59
+
59
60
  /**
60
61
  * Creates a stub post with given id and set of blocks. Used as a governing entity records
61
62
  * for all widget areas.
@@ -64,7 +65,6 @@ export function buildWidgetsQuery() {
64
65
  * @param {Array} blocks The list of blocks.
65
66
  * @return {Object} A stub post object formatted in compliance with the data layer.
66
67
  */
67
-
68
68
  export const createStubPost = (id, blocks) => ({
69
69
  id,
70
70
  slug: id,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/store/utils.js"],"names":["KIND","WIDGET_AREA_ENTITY_TYPE","POST_TYPE","buildWidgetAreaPostId","widgetAreaId","buildWidgetAreasPostId","buildWidgetAreasQuery","per_page","buildWidgetsQuery","_embed","createStubPost","id","blocks","slug","status","type","meta"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,IAAI,GAAG,MAAb;AAEP;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,uBAAuB,GAAG,SAAhC;AAEP;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,SAAS,GAAG,UAAlB;AAEP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,qBAAqB,GAAKC,YAAF,IACnC,eAAeA,YAAc,EADxB;AAGP;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,sBAAsB,GAAG,MAAO,cAAtC;AAEP;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,qBAAT,GAAiC;AACvC,SAAO;AACNC,IAAAA,QAAQ,EAAE,CAAC;AADL,GAAP;AAGA;AAED;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,iBAAT,GAA6B;AACnC,SAAO;AACND,IAAAA,QAAQ,EAAE,CAAC,CADL;AAENE,IAAAA,MAAM,EAAE;AAFF,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,cAAc,GAAG,CAAEC,EAAF,EAAMC,MAAN,MAAoB;AACjDD,EAAAA,EADiD;AAEjDE,EAAAA,IAAI,EAAEF,EAF2C;AAGjDG,EAAAA,MAAM,EAAE,OAHyC;AAIjDC,EAAAA,IAAI,EAAE,MAJ2C;AAKjDH,EAAAA,MALiD;AAMjDI,EAAAA,IAAI,EAAE;AACLZ,IAAAA,YAAY,EAAEO;AADT;AAN2C,CAApB,CAAvB","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"]}
1
+ {"version":3,"names":["KIND","WIDGET_AREA_ENTITY_TYPE","POST_TYPE","buildWidgetAreaPostId","widgetAreaId","buildWidgetAreasPostId","buildWidgetAreasQuery","per_page","buildWidgetsQuery","_embed","createStubPost","id","blocks","slug","status","type","meta"],"sources":["@wordpress/edit-widgets/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":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,IAAI,GAAG,MAAM;;AAE1B;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,SAAS;;AAEhD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAG,UAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAKC,YAAY,IACjD,eAAeA,YAAc,EAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAO,cAAa;;AAE1D;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAA,EAAG;EACvC,OAAO;IACNC,QAAQ,EAAE,CAAC;EACZ,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EACnC,OAAO;IACND,QAAQ,EAAE,CAAC,CAAC;IACZE,MAAM,EAAE;EACT,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAEC,EAAE,EAAEC,MAAM,MAAQ;EACjDD,EAAE;EACFE,IAAI,EAAEF,EAAE;EACRG,MAAM,EAAE,OAAO;EACfC,IAAI,EAAE,MAAM;EACZH,MAAM;EACNI,IAAI,EAAE;IACLZ,YAAY,EAAEO;EACf;AACD,CAAC,CAAE"}
@@ -320,6 +320,11 @@ body.is-fullscreen-mode .interface-interface-skeleton {
320
320
  overflow: auto;
321
321
  z-index: 20;
322
322
  }
323
+ @media (min-width: 782px) {
324
+ .interface-interface-skeleton__content {
325
+ z-index: auto;
326
+ }
327
+ }
323
328
 
324
329
  .interface-interface-skeleton__secondary-sidebar,
325
330
  .interface-interface-skeleton__sidebar {
@@ -466,21 +471,22 @@ body.is-fullscreen-mode .interface-interface-skeleton {
466
471
  gap: 4px;
467
472
  margin-left: -4px;
468
473
  }
469
- .interface-pinned-items .components-button:not(:first-child) {
470
- display: none;
471
- }
472
- @media (min-width: 600px) {
473
- .interface-pinned-items .components-button:not(:first-child) {
474
- display: flex;
475
- }
476
- }
477
474
  .interface-pinned-items .components-button {
475
+ display: none;
478
476
  margin: 0;
479
477
  }
478
+ .interface-pinned-items .components-button:nth-last-child(1), .interface-pinned-items .components-button:nth-last-child(2) {
479
+ display: flex;
480
+ }
480
481
  .interface-pinned-items .components-button svg {
481
482
  max-width: 24px;
482
483
  max-height: 24px;
483
484
  }
485
+ @media (min-width: 600px) {
486
+ .interface-pinned-items .components-button {
487
+ display: flex;
488
+ }
489
+ }
484
490
 
485
491
  @media (min-width: 600px) {
486
492
  .interface-preferences-modal {
@@ -320,6 +320,11 @@ body.is-fullscreen-mode .interface-interface-skeleton {
320
320
  overflow: auto;
321
321
  z-index: 20;
322
322
  }
323
+ @media (min-width: 782px) {
324
+ .interface-interface-skeleton__content {
325
+ z-index: auto;
326
+ }
327
+ }
323
328
 
324
329
  .interface-interface-skeleton__secondary-sidebar,
325
330
  .interface-interface-skeleton__sidebar {
@@ -466,21 +471,22 @@ body.is-fullscreen-mode .interface-interface-skeleton {
466
471
  gap: 4px;
467
472
  margin-right: -4px;
468
473
  }
469
- .interface-pinned-items .components-button:not(:first-child) {
470
- display: none;
471
- }
472
- @media (min-width: 600px) {
473
- .interface-pinned-items .components-button:not(:first-child) {
474
- display: flex;
475
- }
476
- }
477
474
  .interface-pinned-items .components-button {
475
+ display: none;
478
476
  margin: 0;
479
477
  }
478
+ .interface-pinned-items .components-button:nth-last-child(1), .interface-pinned-items .components-button:nth-last-child(2) {
479
+ display: flex;
480
+ }
480
481
  .interface-pinned-items .components-button svg {
481
482
  max-width: 24px;
482
483
  max-height: 24px;
483
484
  }
485
+ @media (min-width: 600px) {
486
+ .interface-pinned-items .components-button {
487
+ display: flex;
488
+ }
489
+ }
484
490
 
485
491
  @media (min-width: 600px) {
486
492
  .interface-preferences-modal {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-widgets",
3
- "version": "5.15.0",
3
+ "version": "5.17.0",
4
4
  "description": "Widgets Page module for WordPress..",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,31 +27,32 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/api-fetch": "^6.35.0",
31
- "@wordpress/block-editor": "^12.6.0",
32
- "@wordpress/block-library": "^8.15.0",
33
- "@wordpress/blocks": "^12.15.0",
34
- "@wordpress/components": "^25.4.0",
35
- "@wordpress/compose": "^6.15.0",
36
- "@wordpress/core-data": "^6.15.0",
37
- "@wordpress/data": "^9.8.0",
38
- "@wordpress/deprecated": "^3.38.0",
39
- "@wordpress/dom": "^3.38.0",
40
- "@wordpress/element": "^5.15.0",
41
- "@wordpress/hooks": "^3.38.0",
42
- "@wordpress/i18n": "^4.38.0",
43
- "@wordpress/icons": "^9.29.0",
44
- "@wordpress/interface": "^5.15.0",
45
- "@wordpress/keyboard-shortcuts": "^4.15.0",
46
- "@wordpress/keycodes": "^3.38.0",
47
- "@wordpress/media-utils": "^4.29.0",
48
- "@wordpress/notices": "^4.6.0",
49
- "@wordpress/plugins": "^6.6.0",
50
- "@wordpress/preferences": "^3.15.0",
51
- "@wordpress/private-apis": "^0.20.0",
52
- "@wordpress/reusable-blocks": "^4.15.0",
53
- "@wordpress/url": "^3.39.0",
54
- "@wordpress/widgets": "^3.15.0",
30
+ "@wordpress/api-fetch": "^6.37.0",
31
+ "@wordpress/block-editor": "^12.8.0",
32
+ "@wordpress/block-library": "^8.17.0",
33
+ "@wordpress/blocks": "^12.17.0",
34
+ "@wordpress/components": "^25.6.0",
35
+ "@wordpress/compose": "^6.17.0",
36
+ "@wordpress/core-data": "^6.17.0",
37
+ "@wordpress/data": "^9.10.0",
38
+ "@wordpress/deprecated": "^3.40.0",
39
+ "@wordpress/dom": "^3.40.0",
40
+ "@wordpress/element": "^5.17.0",
41
+ "@wordpress/hooks": "^3.40.0",
42
+ "@wordpress/i18n": "^4.40.0",
43
+ "@wordpress/icons": "^9.31.0",
44
+ "@wordpress/interface": "^5.17.0",
45
+ "@wordpress/keyboard-shortcuts": "^4.17.0",
46
+ "@wordpress/keycodes": "^3.40.0",
47
+ "@wordpress/media-utils": "^4.31.0",
48
+ "@wordpress/notices": "^4.8.0",
49
+ "@wordpress/patterns": "^1.1.0",
50
+ "@wordpress/plugins": "^6.8.0",
51
+ "@wordpress/preferences": "^3.17.0",
52
+ "@wordpress/private-apis": "^0.22.0",
53
+ "@wordpress/reusable-blocks": "^4.17.0",
54
+ "@wordpress/url": "^3.41.0",
55
+ "@wordpress/widgets": "^3.17.0",
55
56
  "classnames": "^2.3.1"
56
57
  },
57
58
  "peerDependencies": {
@@ -61,5 +62,5 @@
61
62
  "publishConfig": {
62
63
  "access": "public"
63
64
  },
64
- "gitHead": "6f14d11ed4cb59df110a28ebaa23ecba95eb673a"
65
+ "gitHead": "78a288d55b83a713b2f7d98d5a855c0771a2afc6"
65
66
  }
@@ -15,7 +15,7 @@ import {
15
15
  CopyHandler,
16
16
  privateApis as blockEditorPrivateApis,
17
17
  } from '@wordpress/block-editor';
18
- import { ReusableBlocksMenuItems } from '@wordpress/reusable-blocks';
18
+ import { privateApis as editPatternsPrivateApis } from '@wordpress/patterns';
19
19
  import { ShortcutProvider } from '@wordpress/keyboard-shortcuts';
20
20
  import { store as preferencesStore } from '@wordpress/preferences';
21
21
 
@@ -30,7 +30,7 @@ import { ALLOW_REUSABLE_BLOCKS } from '../../constants';
30
30
  import { unlock } from '../../lock-unlock';
31
31
 
32
32
  const { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );
33
-
33
+ const { PatternsMenuItems } = unlock( editPatternsPrivateApis );
34
34
  export default function WidgetAreasBlockEditorProvider( {
35
35
  blockEditorSettings,
36
36
  children,
@@ -112,7 +112,7 @@ export default function WidgetAreasBlockEditorProvider( {
112
112
  { ...props }
113
113
  >
114
114
  <CopyHandler>{ children }</CopyHandler>
115
- <ReusableBlocksMenuItems rootClientId={ widgetAreaId } />
115
+ <PatternsMenuItems rootClientId={ widgetAreaId } />
116
116
  </ExperimentalBlockEditorProvider>
117
117
  </SlotFillProvider>
118
118
  </ShortcutProvider>
package/src/index.js CHANGED
@@ -112,7 +112,6 @@ export function reinitializeEditor() {
112
112
  * Function to register an individual block.
113
113
  *
114
114
  * @param {Object} block The block to be registered.
115
- *
116
115
  */
117
116
  const registerBlock = ( block ) => {
118
117
  if ( ! block ) {
@@ -19,6 +19,11 @@ import {
19
19
  } from './utils';
20
20
  import { STORE_NAME as editWidgetsStoreName } from './constants';
21
21
 
22
+ const EMPTY_INSERTION_POINT = {
23
+ rootClientId: undefined,
24
+ insertionIndex: undefined,
25
+ };
26
+
22
27
  /**
23
28
  * Returns all API widgets.
24
29
  *
@@ -254,8 +259,11 @@ export function isInserterOpened( state ) {
254
259
  * @return {Object} The root client ID and index to insert at.
255
260
  */
256
261
  export function __experimentalGetInsertionPoint( state ) {
257
- const { rootClientId, insertionIndex } = state.blockInserterPanel;
258
- return { rootClientId, insertionIndex };
262
+ if ( typeof state === 'boolean' ) {
263
+ return EMPTY_INSERTION_POINT;
264
+ }
265
+
266
+ return state.blockInserterPanel;
259
267
  }
260
268
 
261
269
  /**