@wordpress/editor 13.30.0 → 13.32.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 (219) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +857 -0
  3. package/build/bindings/index.js +3 -1
  4. package/build/bindings/index.js.map +1 -1
  5. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +107 -0
  6. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -0
  7. package/build/components/commands/index.js +1 -1
  8. package/build/components/commands/index.js.map +1 -1
  9. package/build/components/deprecated.js +158 -0
  10. package/build/components/deprecated.js.map +1 -1
  11. package/build/components/document-bar/index.js +7 -10
  12. package/build/components/document-bar/index.js.map +1 -1
  13. package/build/components/document-outline/index.js +1 -1
  14. package/build/components/document-outline/index.js.map +1 -1
  15. package/build/components/editor-canvas/edit-template-blocks-notification.js +2 -39
  16. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  17. package/build/components/editor-canvas/index.js +3 -0
  18. package/build/components/editor-canvas/index.js.map +1 -1
  19. package/build/components/entities-saved-states/hooks/use-is-dirty.js +10 -16
  20. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  21. package/build/components/entities-saved-states/index.js +28 -88
  22. package/build/components/entities-saved-states/index.js.map +1 -1
  23. package/build/components/error-boundary/index.native.js +133 -0
  24. package/build/components/error-boundary/index.native.js.map +1 -0
  25. package/build/components/index.js +33 -8
  26. package/build/components/index.js.map +1 -1
  27. package/build/components/index.native.js +9 -1
  28. package/build/components/index.native.js.map +1 -1
  29. package/build/components/inserter-sidebar/index.js +5 -1
  30. package/build/components/inserter-sidebar/index.js.map +1 -1
  31. package/build/components/list-view-sidebar/index.js +2 -1
  32. package/build/components/list-view-sidebar/index.js.map +1 -1
  33. package/build/components/pattern-overrides-panel/index.js +30 -0
  34. package/build/components/pattern-overrides-panel/index.js.map +1 -0
  35. package/build/components/plugin-document-setting-panel/index.js +123 -0
  36. package/build/components/plugin-document-setting-panel/index.js.map +1 -0
  37. package/build/components/plugin-post-publish-panel/index.js +68 -0
  38. package/build/components/plugin-post-publish-panel/index.js.map +1 -0
  39. package/build/components/plugin-pre-publish-panel/index.js +71 -0
  40. package/build/components/plugin-pre-publish-panel/index.js.map +1 -0
  41. package/build/components/post-actions/actions.js +455 -0
  42. package/build/components/post-actions/actions.js.map +1 -0
  43. package/build/components/post-card-panel/index.js +93 -0
  44. package/build/components/post-card-panel/index.js.map +1 -0
  45. package/build/components/post-featured-image/index.js +3 -8
  46. package/build/components/post-featured-image/index.js.map +1 -1
  47. package/build/components/post-featured-image/panel.js +7 -3
  48. package/build/components/post-featured-image/panel.js.map +1 -1
  49. package/build/components/post-sync-status/index.js +0 -72
  50. package/build/components/post-sync-status/index.js.map +1 -1
  51. package/build/components/post-taxonomies/flat-term-selector.js +7 -3
  52. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  53. package/build/components/post-title/index.native.js +1 -1
  54. package/build/components/post-title/index.native.js.map +1 -1
  55. package/build/components/provider/disable-non-page-content-blocks.js +36 -20
  56. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  57. package/build/components/provider/index.js +1 -1
  58. package/build/components/provider/index.js.map +1 -1
  59. package/build/components/provider/use-block-editor-settings.js +8 -9
  60. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  61. package/build/components/provider/use-hide-blocks-from-inserter.js +4 -3
  62. package/build/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  63. package/build/components/template-areas/index.js +70 -0
  64. package/build/components/template-areas/index.js.map +1 -0
  65. package/build/hooks/use-select-nearest-editable-block.js +87 -0
  66. package/build/hooks/use-select-nearest-editable-block.js.map +1 -0
  67. package/build/private-apis.js +6 -2
  68. package/build/private-apis.js.map +1 -1
  69. package/build/store/actions.js +46 -6
  70. package/build/store/actions.js.map +1 -1
  71. package/build/store/constants.js +3 -1
  72. package/build/store/constants.js.map +1 -1
  73. package/build/store/private-actions.js +80 -1
  74. package/build/store/private-actions.js.map +1 -1
  75. package/build/store/private-selectors.js +56 -3
  76. package/build/store/private-selectors.js.map +1 -1
  77. package/build/store/reducer.js +14 -1
  78. package/build/store/reducer.js.map +1 -1
  79. package/build/store/selectors.js +21 -11
  80. package/build/store/selectors.js.map +1 -1
  81. package/build/store/utils/get-filtered-template-parts.js +71 -0
  82. package/build/store/utils/get-filtered-template-parts.js.map +1 -0
  83. package/build-module/bindings/index.js +3 -1
  84. package/build-module/bindings/index.js.map +1 -1
  85. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +100 -0
  86. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -0
  87. package/build-module/components/commands/index.js +1 -1
  88. package/build-module/components/commands/index.js.map +1 -1
  89. package/build-module/components/deprecated.js +159 -0
  90. package/build-module/components/deprecated.js.map +1 -1
  91. package/build-module/components/document-bar/index.js +8 -11
  92. package/build-module/components/document-bar/index.js.map +1 -1
  93. package/build-module/components/document-outline/index.js +1 -1
  94. package/build-module/components/document-outline/index.js.map +1 -1
  95. package/build-module/components/editor-canvas/edit-template-blocks-notification.js +4 -41
  96. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  97. package/build-module/components/editor-canvas/index.js +3 -0
  98. package/build-module/components/editor-canvas/index.js.map +1 -1
  99. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +10 -16
  100. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  101. package/build-module/components/entities-saved-states/index.js +29 -89
  102. package/build-module/components/entities-saved-states/index.js.map +1 -1
  103. package/build-module/components/error-boundary/index.native.js +125 -0
  104. package/build-module/components/error-boundary/index.native.js.map +1 -0
  105. package/build-module/components/index.js +5 -1
  106. package/build-module/components/index.js.map +1 -1
  107. package/build-module/components/index.native.js +1 -0
  108. package/build-module/components/index.native.js.map +1 -1
  109. package/build-module/components/inserter-sidebar/index.js +5 -1
  110. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  111. package/build-module/components/list-view-sidebar/index.js +2 -1
  112. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  113. package/build-module/components/pattern-overrides-panel/index.js +23 -0
  114. package/build-module/components/pattern-overrides-panel/index.js.map +1 -0
  115. package/build-module/components/plugin-document-setting-panel/index.js +115 -0
  116. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -0
  117. package/build-module/components/plugin-post-publish-panel/index.js +61 -0
  118. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -0
  119. package/build-module/components/plugin-pre-publish-panel/index.js +64 -0
  120. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -0
  121. package/build-module/components/post-actions/actions.js +444 -0
  122. package/build-module/components/post-actions/actions.js.map +1 -0
  123. package/build-module/components/post-card-panel/index.js +85 -0
  124. package/build-module/components/post-card-panel/index.js.map +1 -0
  125. package/build-module/components/post-featured-image/index.js +4 -9
  126. package/build-module/components/post-featured-image/index.js.map +1 -1
  127. package/build-module/components/post-featured-image/panel.js +6 -2
  128. package/build-module/components/post-featured-image/panel.js.map +1 -1
  129. package/build-module/components/post-sync-status/index.js +2 -73
  130. package/build-module/components/post-sync-status/index.js.map +1 -1
  131. package/build-module/components/post-taxonomies/flat-term-selector.js +7 -3
  132. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  133. package/build-module/components/post-title/index.native.js +1 -1
  134. package/build-module/components/post-title/index.native.js.map +1 -1
  135. package/build-module/components/provider/disable-non-page-content-blocks.js +36 -20
  136. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  137. package/build-module/components/provider/index.js +1 -1
  138. package/build-module/components/provider/index.js.map +1 -1
  139. package/build-module/components/provider/use-block-editor-settings.js +9 -10
  140. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  141. package/build-module/components/provider/use-hide-blocks-from-inserter.js +4 -3
  142. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  143. package/build-module/components/template-areas/index.js +63 -0
  144. package/build-module/components/template-areas/index.js.map +1 -0
  145. package/build-module/hooks/use-select-nearest-editable-block.js +80 -0
  146. package/build-module/hooks/use-select-nearest-editable-block.js.map +1 -0
  147. package/build-module/private-apis.js +6 -2
  148. package/build-module/private-apis.js.map +1 -1
  149. package/build-module/store/actions.js +37 -3
  150. package/build-module/store/actions.js.map +1 -1
  151. package/build-module/store/constants.js +2 -0
  152. package/build-module/store/constants.js.map +1 -1
  153. package/build-module/store/private-actions.js +78 -0
  154. package/build-module/store/private-actions.js.map +1 -1
  155. package/build-module/store/private-selectors.js +54 -3
  156. package/build-module/store/private-selectors.js.map +1 -1
  157. package/build-module/store/reducer.js +13 -1
  158. package/build-module/store/reducer.js.map +1 -1
  159. package/build-module/store/selectors.js +19 -10
  160. package/build-module/store/selectors.js.map +1 -1
  161. package/build-module/store/utils/get-filtered-template-parts.js +64 -0
  162. package/build-module/store/utils/get-filtered-template-parts.js.map +1 -0
  163. package/build-style/style-rtl.css +76 -33
  164. package/build-style/style.css +76 -33
  165. package/package.json +35 -33
  166. package/src/bindings/index.js +4 -1
  167. package/src/components/block-settings-menu/plugin-block-settings-menu-item.js +108 -0
  168. package/src/components/commands/index.js +1 -1
  169. package/src/components/deprecated.js +157 -0
  170. package/src/components/document-bar/index.js +12 -17
  171. package/src/components/document-bar/style.scss +9 -12
  172. package/src/components/document-outline/index.js +2 -1
  173. package/src/components/document-tools/style.scss +4 -11
  174. package/src/components/editor-canvas/edit-template-blocks-notification.js +6 -56
  175. package/src/components/editor-canvas/index.js +4 -0
  176. package/src/components/entities-saved-states/hooks/use-is-dirty.js +18 -22
  177. package/src/components/entities-saved-states/index.js +45 -121
  178. package/src/components/entities-saved-states/test/use-is-dirty.js +3 -0
  179. package/src/components/error-boundary/index.native.js +192 -0
  180. package/src/components/error-boundary/style.native.scss +116 -0
  181. package/src/components/index.js +5 -4
  182. package/src/components/index.native.js +1 -0
  183. package/src/components/inserter-sidebar/index.js +7 -1
  184. package/src/components/list-view-sidebar/index.js +1 -0
  185. package/src/components/list-view-sidebar/style.scss +1 -1
  186. package/src/components/pattern-overrides-panel/index.js +26 -0
  187. package/src/components/plugin-document-setting-panel/index.js +121 -0
  188. package/src/components/plugin-post-publish-panel/index.js +64 -0
  189. package/src/components/plugin-post-publish-panel/test/__snapshots__/index.js.snap +39 -0
  190. package/src/components/plugin-post-publish-panel/test/index.js +33 -0
  191. package/src/components/plugin-pre-publish-panel/index.js +67 -0
  192. package/src/components/plugin-pre-publish-panel/test/index.js +33 -0
  193. package/src/components/post-actions/actions.js +582 -0
  194. package/src/components/post-card-panel/index.js +108 -0
  195. package/src/components/post-card-panel/style.scss +32 -0
  196. package/src/components/post-featured-image/index.js +6 -15
  197. package/src/components/post-featured-image/panel.js +9 -3
  198. package/src/components/post-featured-image/style.scss +9 -13
  199. package/src/components/post-sync-status/index.js +1 -94
  200. package/src/components/post-taxonomies/flat-term-selector.js +13 -8
  201. package/src/components/post-title/index.native.js +1 -1
  202. package/src/components/provider/disable-non-page-content-blocks.js +40 -20
  203. package/src/components/provider/index.js +1 -1
  204. package/src/components/provider/test/disable-non-page-content-blocks.js +35 -14
  205. package/src/components/provider/use-block-editor-settings.js +11 -11
  206. package/src/components/provider/use-hide-blocks-from-inserter.js +5 -3
  207. package/src/components/template-areas/index.js +85 -0
  208. package/src/components/template-areas/style.scss +23 -0
  209. package/src/hooks/use-select-nearest-editable-block.js +95 -0
  210. package/src/private-apis.js +6 -2
  211. package/src/store/actions.js +37 -3
  212. package/src/store/constants.js +2 -0
  213. package/src/store/private-actions.js +111 -0
  214. package/src/store/private-selectors.js +105 -17
  215. package/src/store/reducer.js +13 -0
  216. package/src/store/selectors.js +50 -40
  217. package/src/store/utils/get-filtered-template-parts.js +69 -0
  218. package/src/store/utils/test/get-filtered-template-parts.js +189 -0
  219. package/src/style.scss +2 -0
@@ -0,0 +1,64 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import memoize from 'memize';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { isTemplatePart } from '@wordpress/blocks';
10
+ const EMPTY_ARRAY = [];
11
+
12
+ /**
13
+ * Get a flattened and filtered list of template parts and the matching block for that template part.
14
+ *
15
+ * Takes a list of blocks defined within a template, and a list of template parts, and returns a
16
+ * flattened list of template parts and the matching block for that template part.
17
+ *
18
+ * @param {Array} blocks Blocks to flatten.
19
+ * @param {?Array} templateParts Available template parts.
20
+ * @return {Array} An array of template parts and their blocks.
21
+ */
22
+ function getFilteredTemplatePartBlocks(blocks = EMPTY_ARRAY, templateParts) {
23
+ const templatePartsById = templateParts ?
24
+ // Key template parts by their ID.
25
+ templateParts.reduce((newTemplateParts, part) => ({
26
+ ...newTemplateParts,
27
+ [part.id]: part
28
+ }), {}) : {};
29
+ const result = [];
30
+
31
+ // Iterate over all blocks, recursing into inner blocks.
32
+ // Output will be based on a depth-first traversal.
33
+ const stack = [...blocks];
34
+ while (stack.length) {
35
+ const {
36
+ innerBlocks,
37
+ ...block
38
+ } = stack.shift();
39
+ // Place inner blocks at the beginning of the stack to preserve order.
40
+ stack.unshift(...innerBlocks);
41
+ if (isTemplatePart(block)) {
42
+ const {
43
+ attributes: {
44
+ theme,
45
+ slug
46
+ }
47
+ } = block;
48
+ const templatePartId = `${theme}//${slug}`;
49
+ const templatePart = templatePartsById[templatePartId];
50
+
51
+ // Only add to output if the found template part block is in the list of available template parts.
52
+ if (templatePart) {
53
+ result.push({
54
+ templatePart,
55
+ block
56
+ });
57
+ }
58
+ }
59
+ }
60
+ return result;
61
+ }
62
+ const memoizedGetFilteredTemplatePartBlocks = memoize(getFilteredTemplatePartBlocks);
63
+ export { memoizedGetFilteredTemplatePartBlocks as getFilteredTemplatePartBlocks };
64
+ //# sourceMappingURL=get-filtered-template-parts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["memoize","isTemplatePart","EMPTY_ARRAY","getFilteredTemplatePartBlocks","blocks","templateParts","templatePartsById","reduce","newTemplateParts","part","id","result","stack","length","innerBlocks","block","shift","unshift","attributes","theme","slug","templatePartId","templatePart","push","memoizedGetFilteredTemplatePartBlocks"],"sources":["@wordpress/editor/src/store/utils/get-filtered-template-parts.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport memoize from 'memize';\n\n/**\n * WordPress dependencies\n */\nimport { isTemplatePart } from '@wordpress/blocks';\n\nconst EMPTY_ARRAY = [];\n\n/**\n * Get a flattened and filtered list of template parts and the matching block for that template part.\n *\n * Takes a list of blocks defined within a template, and a list of template parts, and returns a\n * flattened list of template parts and the matching block for that template part.\n *\n * @param {Array} blocks Blocks to flatten.\n * @param {?Array} templateParts Available template parts.\n * @return {Array} An array of template parts and their blocks.\n */\nfunction getFilteredTemplatePartBlocks( blocks = EMPTY_ARRAY, templateParts ) {\n\tconst templatePartsById = templateParts\n\t\t? // Key template parts by their ID.\n\t\t templateParts.reduce(\n\t\t\t\t( newTemplateParts, part ) => ( {\n\t\t\t\t\t...newTemplateParts,\n\t\t\t\t\t[ part.id ]: part,\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t )\n\t\t: {};\n\n\tconst result = [];\n\n\t// Iterate over all blocks, recursing into inner blocks.\n\t// Output will be based on a depth-first traversal.\n\tconst stack = [ ...blocks ];\n\twhile ( stack.length ) {\n\t\tconst { innerBlocks, ...block } = stack.shift();\n\t\t// Place inner blocks at the beginning of the stack to preserve order.\n\t\tstack.unshift( ...innerBlocks );\n\n\t\tif ( isTemplatePart( block ) ) {\n\t\t\tconst {\n\t\t\t\tattributes: { theme, slug },\n\t\t\t} = block;\n\t\t\tconst templatePartId = `${ theme }//${ slug }`;\n\t\t\tconst templatePart = templatePartsById[ templatePartId ];\n\n\t\t\t// Only add to output if the found template part block is in the list of available template parts.\n\t\t\tif ( templatePart ) {\n\t\t\t\tresult.push( {\n\t\t\t\t\ttemplatePart,\n\t\t\t\t\tblock,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\nconst memoizedGetFilteredTemplatePartBlocks = memoize(\n\tgetFilteredTemplatePartBlocks\n);\n\nexport { memoizedGetFilteredTemplatePartBlocks as getFilteredTemplatePartBlocks };\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,OAAO,MAAM,QAAQ;;AAE5B;AACA;AACA;AACA,SAASC,cAAc,QAAQ,mBAAmB;AAElD,MAAMC,WAAW,GAAG,EAAE;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,6BAA6BA,CAAEC,MAAM,GAAGF,WAAW,EAAEG,aAAa,EAAG;EAC7E,MAAMC,iBAAiB,GAAGD,aAAa;EACpC;EACAA,aAAa,CAACE,MAAM,CACpB,CAAEC,gBAAgB,EAAEC,IAAI,MAAQ;IAC/B,GAAGD,gBAAgB;IACnB,CAAEC,IAAI,CAACC,EAAE,GAAID;EACd,CAAC,CAAE,EACH,CAAC,CACD,CAAC,GACD,CAAC,CAAC;EAEL,MAAME,MAAM,GAAG,EAAE;;EAEjB;EACA;EACA,MAAMC,KAAK,GAAG,CAAE,GAAGR,MAAM,CAAE;EAC3B,OAAQQ,KAAK,CAACC,MAAM,EAAG;IACtB,MAAM;MAAEC,WAAW;MAAE,GAAGC;IAAM,CAAC,GAAGH,KAAK,CAACI,KAAK,CAAC,CAAC;IAC/C;IACAJ,KAAK,CAACK,OAAO,CAAE,GAAGH,WAAY,CAAC;IAE/B,IAAKb,cAAc,CAAEc,KAAM,CAAC,EAAG;MAC9B,MAAM;QACLG,UAAU,EAAE;UAAEC,KAAK;UAAEC;QAAK;MAC3B,CAAC,GAAGL,KAAK;MACT,MAAMM,cAAc,GAAI,GAAGF,KAAO,KAAKC,IAAM,EAAC;MAC9C,MAAME,YAAY,GAAGhB,iBAAiB,CAAEe,cAAc,CAAE;;MAExD;MACA,IAAKC,YAAY,EAAG;QACnBX,MAAM,CAACY,IAAI,CAAE;UACZD,YAAY;UACZP;QACD,CAAE,CAAC;MACJ;IACD;EACD;EAEA,OAAOJ,MAAM;AACd;AAEA,MAAMa,qCAAqC,GAAGxB,OAAO,CACpDG,6BACD,CAAC;AAED,SAASqB,qCAAqC,IAAIrB,6BAA6B"}
@@ -226,16 +226,22 @@
226
226
  min-width: 0;
227
227
  background: #f0f0f0;
228
228
  border-radius: 4px;
229
- width: min(100%, 450px);
229
+ width: min(100%, 416px);
230
230
  }
231
231
  .editor-document-bar:hover {
232
232
  background-color: #e0e0e0;
233
233
  }
234
234
  .editor-document-bar .components-button {
235
235
  border-radius: 4px;
236
+ transition: all 0.1s ease-out;
237
+ }
238
+ @media (prefers-reduced-motion: reduce) {
239
+ .editor-document-bar .components-button {
240
+ transition-duration: 0s;
241
+ transition-delay: 0s;
242
+ }
236
243
  }
237
244
  .editor-document-bar .components-button:hover {
238
- color: var(--wp-block-synced-color);
239
245
  background: #e0e0e0;
240
246
  }
241
247
  @media (min-width: 960px) {
@@ -253,20 +259,17 @@
253
259
  .editor-document-bar__title {
254
260
  flex-grow: 1;
255
261
  overflow: hidden;
256
- color: #2f2f2f;
262
+ color: #1e1e1e;
257
263
  gap: 4px;
258
264
  display: flex;
259
265
  justify-content: center;
260
266
  align-items: center;
261
267
  }
262
- @media (min-width: 600px) {
268
+ @media (min-width: 782px) {
263
269
  .editor-document-bar__title {
264
- padding-right: 32px;
270
+ padding-right: 24px;
265
271
  }
266
272
  }
267
- .editor-document-bar__title:hover {
268
- color: var(--wp-block-synced-color);
269
- }
270
273
  .editor-document-bar.is-global .editor-document-bar__title {
271
274
  color: var(--wp-block-synced-color);
272
275
  }
@@ -278,13 +281,13 @@
278
281
  white-space: nowrap;
279
282
  overflow: hidden;
280
283
  text-overflow: ellipsis;
281
- max-width: 50%;
284
+ max-width: 70%;
282
285
  color: currentColor;
283
286
  }
284
287
 
285
288
  .editor-document-bar__shortcut {
286
289
  color: #2f2f2f;
287
- min-width: 32px;
290
+ min-width: 24px;
288
291
  display: none;
289
292
  }
290
293
  @media (min-width: 782px) {
@@ -302,7 +305,7 @@
302
305
  position: absolute;
303
306
  }
304
307
  .editor-document-bar__back.components-button.has-icon.has-text:hover {
305
- color: var(--wp-block-synced-color);
308
+ color: #1e1e1e;
306
309
  background-color: transparent;
307
310
  }
308
311
 
@@ -393,11 +396,13 @@
393
396
  display: inline-flex;
394
397
  align-items: center;
395
398
  }
396
- .editor-document-tools .editor-document-tools__left > .components-button {
399
+ .editor-document-tools .editor-document-tools__left > .editor-history__redo,
400
+ .editor-document-tools .editor-document-tools__left > .editor-history__undo {
397
401
  display: none;
398
402
  }
399
- @media (min-width: 600px) {
400
- .editor-document-tools .editor-document-tools__left > .components-button {
403
+ @media (min-width: 782px) {
404
+ .editor-document-tools .editor-document-tools__left > .editor-history__redo,
405
+ .editor-document-tools .editor-document-tools__left > .editor-history__undo {
401
406
  display: inline-flex;
402
407
  }
403
408
  }
@@ -451,16 +456,6 @@
451
456
  gap: 8px;
452
457
  margin-left: 8px;
453
458
  }
454
- @media (min-width: 782px) {
455
- .editor-document-tools__left {
456
- padding-right: 20px;
457
- }
458
- }
459
- @media (min-width: 1280px) {
460
- .editor-document-tools__left {
461
- padding-left: 8px;
462
- }
463
- }
464
459
 
465
460
  .editor-document-tools .editor-document-tools__left > .editor-document-tools__inserter-toggle.has-icon {
466
461
  min-width: 32px;
@@ -584,7 +579,7 @@
584
579
  background: #fff;
585
580
  order: 1;
586
581
  align-self: center;
587
- margin-left: 8px;
582
+ margin-left: 12px;
588
583
  }
589
584
 
590
585
  .editor-list-view-sidebar__tabs-tablist {
@@ -682,6 +677,32 @@
682
677
  width: 100%;
683
678
  }
684
679
 
680
+ .editor-post-card-panel__content {
681
+ flex-grow: 1;
682
+ }
683
+ .editor-post-card-panel__title {
684
+ width: 100%;
685
+ }
686
+ .editor-post-card-panel__title.editor-post-card-panel__title {
687
+ margin: 3px 0 0 0;
688
+ }
689
+ .editor-post-card-panel__icon {
690
+ flex: 0 0 24px;
691
+ width: 24px;
692
+ height: 24px;
693
+ }
694
+ .editor-post-card-panel__header {
695
+ display: flex;
696
+ justify-content: space-between;
697
+ margin: 0 0 8px;
698
+ }
699
+ .editor-post-card-panel__description {
700
+ color: #757575;
701
+ }
702
+ .editor-post-card-panel__description .components-text {
703
+ color: inherit;
704
+ }
705
+
685
706
  .editor-post-excerpt__textarea {
686
707
  width: 100%;
687
708
  margin-bottom: 10px;
@@ -697,10 +718,6 @@
697
718
  margin-top: -9px;
698
719
  margin-right: -9px;
699
720
  }
700
- .editor-post-featured-image .components-responsive-wrapper__content {
701
- max-width: 100%;
702
- width: auto;
703
- }
704
721
 
705
722
  .editor-post-featured-image__container {
706
723
  position: relative;
@@ -716,9 +733,11 @@
716
733
  transition: all 0.1s ease-out;
717
734
  box-shadow: 0 0 0 0 var(--wp-admin-theme-color);
718
735
  overflow: hidden;
736
+ outline-offset: -1px;
737
+ min-height: 80px;
738
+ margin-bottom: 16px;
719
739
  display: flex;
720
740
  justify-content: center;
721
- max-height: 150px;
722
741
  }
723
742
  @media (prefers-reduced-motion: reduce) {
724
743
  .editor-post-featured-image__toggle,
@@ -730,16 +749,19 @@
730
749
 
731
750
  .editor-post-featured-image__preview {
732
751
  height: auto;
752
+ outline: 1px solid rgba(0, 0, 0, 0.1);
733
753
  }
734
- .editor-post-featured-image__preview .components-responsive-wrapper {
754
+ .editor-post-featured-image__preview .editor-post-featured-image__preview-image {
755
+ object-fit: cover;
735
756
  width: 100%;
736
- background: #f0f0f0;
757
+ object-position: 50% 50%;
758
+ aspect-ratio: 2/1;
737
759
  }
738
760
 
739
761
  .editor-post-featured-image__toggle {
740
762
  border-radius: 2px;
741
763
  background-color: #f0f0f0;
742
- min-height: 90px;
764
+ height: 100%;
743
765
  line-height: 20px;
744
766
  padding: 8px 0;
745
767
  text-align: center;
@@ -1449,6 +1471,27 @@
1449
1471
  font-weight: 600;
1450
1472
  }
1451
1473
 
1474
+ .editor-template-areas {
1475
+ margin-top: 16px;
1476
+ }
1477
+ .editor-template-areas__list {
1478
+ margin: 0;
1479
+ }
1480
+ .editor-template-areas__list > li {
1481
+ margin: 0;
1482
+ }
1483
+ .editor-template-areas__item {
1484
+ width: 100%;
1485
+ }
1486
+ .editor-template-areas__item.components-button.has-icon {
1487
+ padding: 0;
1488
+ }
1489
+
1490
+ h3.components-heading.editor-template-areas__title {
1491
+ font-weight: 500;
1492
+ margin: 0 0 8px;
1493
+ }
1494
+
1452
1495
  .editor-template-validation-notice {
1453
1496
  display: flex;
1454
1497
  justify-content: space-between;
@@ -226,16 +226,22 @@
226
226
  min-width: 0;
227
227
  background: #f0f0f0;
228
228
  border-radius: 4px;
229
- width: min(100%, 450px);
229
+ width: min(100%, 416px);
230
230
  }
231
231
  .editor-document-bar:hover {
232
232
  background-color: #e0e0e0;
233
233
  }
234
234
  .editor-document-bar .components-button {
235
235
  border-radius: 4px;
236
+ transition: all 0.1s ease-out;
237
+ }
238
+ @media (prefers-reduced-motion: reduce) {
239
+ .editor-document-bar .components-button {
240
+ transition-duration: 0s;
241
+ transition-delay: 0s;
242
+ }
236
243
  }
237
244
  .editor-document-bar .components-button:hover {
238
- color: var(--wp-block-synced-color);
239
245
  background: #e0e0e0;
240
246
  }
241
247
  @media (min-width: 960px) {
@@ -253,20 +259,17 @@
253
259
  .editor-document-bar__title {
254
260
  flex-grow: 1;
255
261
  overflow: hidden;
256
- color: #2f2f2f;
262
+ color: #1e1e1e;
257
263
  gap: 4px;
258
264
  display: flex;
259
265
  justify-content: center;
260
266
  align-items: center;
261
267
  }
262
- @media (min-width: 600px) {
268
+ @media (min-width: 782px) {
263
269
  .editor-document-bar__title {
264
- padding-left: 32px;
270
+ padding-left: 24px;
265
271
  }
266
272
  }
267
- .editor-document-bar__title:hover {
268
- color: var(--wp-block-synced-color);
269
- }
270
273
  .editor-document-bar.is-global .editor-document-bar__title {
271
274
  color: var(--wp-block-synced-color);
272
275
  }
@@ -278,13 +281,13 @@
278
281
  white-space: nowrap;
279
282
  overflow: hidden;
280
283
  text-overflow: ellipsis;
281
- max-width: 50%;
284
+ max-width: 70%;
282
285
  color: currentColor;
283
286
  }
284
287
 
285
288
  .editor-document-bar__shortcut {
286
289
  color: #2f2f2f;
287
- min-width: 32px;
290
+ min-width: 24px;
288
291
  display: none;
289
292
  }
290
293
  @media (min-width: 782px) {
@@ -302,7 +305,7 @@
302
305
  position: absolute;
303
306
  }
304
307
  .editor-document-bar__back.components-button.has-icon.has-text:hover {
305
- color: var(--wp-block-synced-color);
308
+ color: #1e1e1e;
306
309
  background-color: transparent;
307
310
  }
308
311
 
@@ -393,11 +396,13 @@
393
396
  display: inline-flex;
394
397
  align-items: center;
395
398
  }
396
- .editor-document-tools .editor-document-tools__left > .components-button {
399
+ .editor-document-tools .editor-document-tools__left > .editor-history__redo,
400
+ .editor-document-tools .editor-document-tools__left > .editor-history__undo {
397
401
  display: none;
398
402
  }
399
- @media (min-width: 600px) {
400
- .editor-document-tools .editor-document-tools__left > .components-button {
403
+ @media (min-width: 782px) {
404
+ .editor-document-tools .editor-document-tools__left > .editor-history__redo,
405
+ .editor-document-tools .editor-document-tools__left > .editor-history__undo {
401
406
  display: inline-flex;
402
407
  }
403
408
  }
@@ -451,16 +456,6 @@
451
456
  gap: 8px;
452
457
  margin-right: 8px;
453
458
  }
454
- @media (min-width: 782px) {
455
- .editor-document-tools__left {
456
- padding-left: 20px;
457
- }
458
- }
459
- @media (min-width: 1280px) {
460
- .editor-document-tools__left {
461
- padding-right: 8px;
462
- }
463
- }
464
459
 
465
460
  .editor-document-tools .editor-document-tools__left > .editor-document-tools__inserter-toggle.has-icon {
466
461
  min-width: 32px;
@@ -584,7 +579,7 @@
584
579
  background: #fff;
585
580
  order: 1;
586
581
  align-self: center;
587
- margin-right: 8px;
582
+ margin-right: 12px;
588
583
  }
589
584
 
590
585
  .editor-list-view-sidebar__tabs-tablist {
@@ -682,6 +677,32 @@
682
677
  width: 100%;
683
678
  }
684
679
 
680
+ .editor-post-card-panel__content {
681
+ flex-grow: 1;
682
+ }
683
+ .editor-post-card-panel__title {
684
+ width: 100%;
685
+ }
686
+ .editor-post-card-panel__title.editor-post-card-panel__title {
687
+ margin: 3px 0 0 0;
688
+ }
689
+ .editor-post-card-panel__icon {
690
+ flex: 0 0 24px;
691
+ width: 24px;
692
+ height: 24px;
693
+ }
694
+ .editor-post-card-panel__header {
695
+ display: flex;
696
+ justify-content: space-between;
697
+ margin: 0 0 8px;
698
+ }
699
+ .editor-post-card-panel__description {
700
+ color: #757575;
701
+ }
702
+ .editor-post-card-panel__description .components-text {
703
+ color: inherit;
704
+ }
705
+
685
706
  .editor-post-excerpt__textarea {
686
707
  width: 100%;
687
708
  margin-bottom: 10px;
@@ -697,10 +718,6 @@
697
718
  margin-top: -9px;
698
719
  margin-left: -9px;
699
720
  }
700
- .editor-post-featured-image .components-responsive-wrapper__content {
701
- max-width: 100%;
702
- width: auto;
703
- }
704
721
 
705
722
  .editor-post-featured-image__container {
706
723
  position: relative;
@@ -716,9 +733,11 @@
716
733
  transition: all 0.1s ease-out;
717
734
  box-shadow: 0 0 0 0 var(--wp-admin-theme-color);
718
735
  overflow: hidden;
736
+ outline-offset: -1px;
737
+ min-height: 80px;
738
+ margin-bottom: 16px;
719
739
  display: flex;
720
740
  justify-content: center;
721
- max-height: 150px;
722
741
  }
723
742
  @media (prefers-reduced-motion: reduce) {
724
743
  .editor-post-featured-image__toggle,
@@ -730,16 +749,19 @@
730
749
 
731
750
  .editor-post-featured-image__preview {
732
751
  height: auto;
752
+ outline: 1px solid rgba(0, 0, 0, 0.1);
733
753
  }
734
- .editor-post-featured-image__preview .components-responsive-wrapper {
754
+ .editor-post-featured-image__preview .editor-post-featured-image__preview-image {
755
+ object-fit: cover;
735
756
  width: 100%;
736
- background: #f0f0f0;
757
+ object-position: 50% 50%;
758
+ aspect-ratio: 2/1;
737
759
  }
738
760
 
739
761
  .editor-post-featured-image__toggle {
740
762
  border-radius: 2px;
741
763
  background-color: #f0f0f0;
742
- min-height: 90px;
764
+ height: 100%;
743
765
  line-height: 20px;
744
766
  padding: 8px 0;
745
767
  text-align: center;
@@ -1453,6 +1475,27 @@
1453
1475
  font-weight: 600;
1454
1476
  }
1455
1477
 
1478
+ .editor-template-areas {
1479
+ margin-top: 16px;
1480
+ }
1481
+ .editor-template-areas__list {
1482
+ margin: 0;
1483
+ }
1484
+ .editor-template-areas__list > li {
1485
+ margin: 0;
1486
+ }
1487
+ .editor-template-areas__item {
1488
+ width: 100%;
1489
+ }
1490
+ .editor-template-areas__item.components-button.has-icon {
1491
+ padding: 0;
1492
+ }
1493
+
1494
+ h3.components-heading.editor-template-areas__title {
1495
+ font-weight: 500;
1496
+ margin: 0 0 8px;
1497
+ }
1498
+
1456
1499
  .editor-template-validation-notice {
1457
1500
  display: flex;
1458
1501
  justify-content: space-between;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "13.30.0",
3
+ "version": "13.32.0",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -31,38 +31,40 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.16.0",
34
- "@wordpress/a11y": "^3.53.0",
35
- "@wordpress/api-fetch": "^6.50.0",
36
- "@wordpress/blob": "^3.53.0",
37
- "@wordpress/block-editor": "^12.21.0",
38
- "@wordpress/blocks": "^12.30.0",
39
- "@wordpress/commands": "^0.24.0",
40
- "@wordpress/components": "^27.1.0",
41
- "@wordpress/compose": "^6.30.0",
42
- "@wordpress/core-data": "^6.30.0",
43
- "@wordpress/data": "^9.23.0",
44
- "@wordpress/date": "^4.53.0",
45
- "@wordpress/deprecated": "^3.53.0",
46
- "@wordpress/dom": "^3.53.0",
47
- "@wordpress/element": "^5.30.0",
48
- "@wordpress/hooks": "^3.53.0",
49
- "@wordpress/html-entities": "^3.53.0",
50
- "@wordpress/i18n": "^4.53.0",
51
- "@wordpress/icons": "^9.44.0",
52
- "@wordpress/keyboard-shortcuts": "^4.30.0",
53
- "@wordpress/keycodes": "^3.53.0",
54
- "@wordpress/media-utils": "^4.44.0",
55
- "@wordpress/notices": "^4.21.0",
56
- "@wordpress/patterns": "^1.14.0",
57
- "@wordpress/preferences": "^3.30.0",
58
- "@wordpress/private-apis": "^0.35.0",
59
- "@wordpress/reusable-blocks": "^4.30.0",
60
- "@wordpress/rich-text": "^6.30.0",
61
- "@wordpress/server-side-render": "^4.30.0",
62
- "@wordpress/url": "^3.54.0",
63
- "@wordpress/wordcount": "^3.53.0",
34
+ "@wordpress/a11y": "^3.55.0",
35
+ "@wordpress/api-fetch": "^6.52.0",
36
+ "@wordpress/blob": "^3.55.0",
37
+ "@wordpress/block-editor": "^12.23.0",
38
+ "@wordpress/blocks": "^12.32.0",
39
+ "@wordpress/commands": "^0.26.0",
40
+ "@wordpress/components": "^27.3.0",
41
+ "@wordpress/compose": "^6.32.0",
42
+ "@wordpress/core-data": "^6.32.0",
43
+ "@wordpress/data": "^9.25.0",
44
+ "@wordpress/date": "^4.55.0",
45
+ "@wordpress/deprecated": "^3.55.0",
46
+ "@wordpress/dom": "^3.55.0",
47
+ "@wordpress/element": "^5.32.0",
48
+ "@wordpress/hooks": "^3.55.0",
49
+ "@wordpress/html-entities": "^3.55.0",
50
+ "@wordpress/i18n": "^4.55.0",
51
+ "@wordpress/icons": "^9.46.0",
52
+ "@wordpress/keyboard-shortcuts": "^4.32.0",
53
+ "@wordpress/keycodes": "^3.55.0",
54
+ "@wordpress/media-utils": "^4.46.0",
55
+ "@wordpress/notices": "^4.23.0",
56
+ "@wordpress/patterns": "^1.16.0",
57
+ "@wordpress/plugins": "^6.23.0",
58
+ "@wordpress/preferences": "^3.32.0",
59
+ "@wordpress/private-apis": "^0.37.0",
60
+ "@wordpress/reusable-blocks": "^4.32.0",
61
+ "@wordpress/rich-text": "^6.32.0",
62
+ "@wordpress/server-side-render": "^4.32.0",
63
+ "@wordpress/url": "^3.56.0",
64
+ "@wordpress/warning": "^2.55.0",
65
+ "@wordpress/wordcount": "^3.55.0",
64
66
  "classnames": "^2.3.1",
65
- "date-fns": "^2.28.0",
67
+ "date-fns": "^3.6.0",
66
68
  "memize": "^2.1.0",
67
69
  "react-autosize-textarea": "^7.1.0",
68
70
  "rememo": "^4.0.2",
@@ -75,5 +77,5 @@
75
77
  "publishConfig": {
76
78
  "access": "public"
77
79
  },
78
- "gitHead": "ac3c3e465a083081a86a4da6ee6fb817b41e5130"
80
+ "gitHead": "ac2b13783c28f959770cf029a797a712f59e1958"
79
81
  }
@@ -11,5 +11,8 @@ import patternOverrides from './pattern-overrides';
11
11
  import postMeta from './post-meta';
12
12
 
13
13
  const { registerBlockBindingsSource } = unlock( dispatch( blocksStore ) );
14
- registerBlockBindingsSource( patternOverrides );
15
14
  registerBlockBindingsSource( postMeta );
15
+
16
+ if ( process.env.IS_GUTENBERG_PLUGIN ) {
17
+ registerBlockBindingsSource( patternOverrides );
18
+ }